2017-10-20 07:02:53 +00:00
|
|
|
Class Ext_TraitDemoProfessional extends Ext_TraitBase;
|
|
|
|
|
|
|
|
static function string GetPerkDescription()
|
|
|
|
{
|
|
|
|
local string S;
|
|
|
|
|
|
|
|
S = Super.GetPerkDescription();
|
|
|
|
S $= "|Trait requires prestige level: #{FF4000}1";
|
|
|
|
return S;
|
|
|
|
}
|
|
|
|
|
2020-11-28 20:04:55 +00:00
|
|
|
static function bool MeetsRequirements(byte Lvl, Ext_PerkBase Perk)
|
2017-10-20 07:02:53 +00:00
|
|
|
{
|
|
|
|
local int i;
|
|
|
|
|
2020-11-28 20:12:58 +00:00
|
|
|
if (Perk.CurrentLevel<Default.MinLevel || Perk.CurrentPrestige<3)
|
2017-10-20 07:02:53 +00:00
|
|
|
return false;
|
|
|
|
|
2020-11-28 20:12:58 +00:00
|
|
|
if (Lvl==0)
|
2017-10-20 07:02:53 +00:00
|
|
|
{
|
|
|
|
i = Perk.PerkStats.Find('StatType','Reload');
|
2020-11-28 20:12:58 +00:00
|
|
|
if (i>=0)
|
2017-10-20 07:02:53 +00:00
|
|
|
return (Perk.PerkStats[i].CurrentValue>=30);
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2020-11-28 20:04:55 +00:00
|
|
|
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
2017-10-20 07:02:53 +00:00
|
|
|
{
|
|
|
|
Ext_PerkDemolition(Perk).bProfessionalActive = true;
|
|
|
|
}
|
|
|
|
|
2020-11-28 20:04:55 +00:00
|
|
|
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
|
2017-10-20 07:02:53 +00:00
|
|
|
{
|
|
|
|
Ext_PerkDemolition(Perk).bProfessionalActive = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
defaultproperties
|
|
|
|
{
|
|
|
|
SupportedPerk=class'Ext_PerkDemolition'
|
|
|
|
DefLevelCosts(0)=100
|
|
|
|
DefMinLevel=100
|
|
|
|
}
|