class ExtTraderContainer_Store extends KFGFxTraderContainer_Store; function RefreshWeaponListByPerk(byte FilterIndex, const out array ItemList) { local int i, SlotIndex; local GFxObject ItemDataArray; // This array of information is sent to ActionScript to update the Item data local array OnPerkWeapons, SecondaryWeapons, OffPerkWeapons; local class TargetPerkClass; local ExtPlayerController EKFPC; EKFPC = ExtPlayerController(KFPC); if (EKFPC!=none && EKFPC.ActivePerkManager!=None) { if(FilterIndex 0 && ItemList[i].AssociatedPerkClasses[0] != none && TargetPerkClass != class'KFPerk_Survivalist' && (TargetPerkClass==None || ItemList[i].AssociatedPerkClasses.Find(TargetPerkClass) == INDEX_NONE)) { continue; // filtered by perk } else { if(ItemList[i].AssociatedPerkClasses.length > 0) { switch (ItemList[i].AssociatedPerkClasses.Find(TargetPerkClass)) { case 0: //primary perk OnPerkWeapons.AddItem(ItemList[i]); break; case 1: //secondary perk SecondaryWeapons.AddItem(ItemList[i]); break; default: //off perk OffPerkWeapons.AddItem(ItemList[i]); break; } } } } for (i = 0; i < OnPerkWeapons.length; i++) { SetItemInfo(ItemDataArray, OnPerkWeapons[i], SlotIndex); SlotIndex++; } for (i = 0; i < SecondaryWeapons.length; i++) { SetItemInfo(ItemDataArray, SecondaryWeapons[i], SlotIndex); SlotIndex++; } for (i = 0; i < OffPerkWeapons.length; i++) { SetItemInfo(ItemDataArray, OffPerkWeapons[i], SlotIndex); SlotIndex++; } SetObject("shopData", ItemDataArray); } }