KF2-Server-Extension/ServerExt/Classes/Ext_TraitGrenadeUpg.uc

26 lines
667 B
Ucode
Raw Normal View History

2017-10-20 02:00:49 +00:00
Class Ext_TraitGrenadeUpg extends Ext_TraitBase;
static function bool MeetsRequirements( byte Lvl, Ext_PerkBase Perk )
{
if( Lvl>=1 && Perk.CurrentLevel<50 )
return false;
return Super.MeetsRequirements(Lvl,Perk);
}
static function TraitActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
{
if( Level==1 )
Perk.GrenadeClass = Perk.PerkGrenade;
else if( Level==2 )
Perk.GrenadeClass = Perk.SuperGrenade;
}
static function TraitDeActivate( Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data )
{
Perk.GrenadeClass = Perk.Default.GrenadeClass;
}
defaultproperties
{
NumLevels=2
DefLevelCosts(0)=5
DefLevelCosts(1)=50
}