2017-10-20 02:00:49 +00:00
|
|
|
Class Ext_TraitMedicPistol extends Ext_TraitBase;
|
|
|
|
|
2020-11-28 20:04:55 +00:00
|
|
|
static function AddDefaultInventory(KFPawn Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
2020-07-07 17:49:25 +00:00
|
|
|
local int i;
|
|
|
|
i = Player.DefaultInventory.Find(class'ExtWeap_Pistol_9mm');
|
|
|
|
if(i != -1)
|
|
|
|
Player.DefaultInventory[i] = class'ExtWeap_Pistol_MedicS';
|
2017-10-20 02:00:49 +00:00
|
|
|
}
|
|
|
|
|
2020-11-28 20:04:55 +00:00
|
|
|
static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
2020-07-07 14:29:42 +00:00
|
|
|
{
|
|
|
|
local Inventory Inv;
|
|
|
|
|
|
|
|
Inv = Player.FindInventoryType(class'ExtWeap_Pistol_9mm');
|
2020-11-28 20:04:55 +00:00
|
|
|
if(Inv!=None)
|
2020-07-07 14:29:42 +00:00
|
|
|
Inv.Destroy();
|
|
|
|
|
2020-11-28 20:04:55 +00:00
|
|
|
if(Player.FindInventoryType(class'ExtWeap_Pistol_MedicS')==None)
|
2020-07-07 14:29:42 +00:00
|
|
|
{
|
|
|
|
Inv = Player.CreateInventory(class'ExtWeap_Pistol_MedicS',Player.Weapon!=None);
|
2020-11-28 20:04:55 +00:00
|
|
|
if (KFWeapon(Inv)!=None)
|
2020-11-28 19:53:57 +00:00
|
|
|
KFWeapon(Inv).bGivenAtStart = true;
|
2020-07-07 14:29:42 +00:00
|
|
|
}
|
2017-10-20 02:00:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
defaultproperties
|
|
|
|
{
|
|
|
|
DefLevelCosts(0)=20
|
|
|
|
}
|