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

28 lines
575 B
Ucode
Raw Normal View History

Class Ext_TraitZEDBase extends Ext_TraitBase;
2017-10-20 02:00:49 +00:00
var class<Ext_TraitZEDBase> BaseTrait;
var bool bIsSummoner;
2020-11-28 20:04:55 +00:00
static function bool MeetsRequirements(byte Lvl, Ext_PerkBase Perk)
2017-10-20 02:00:49 +00:00
{
local int i;
// First check level.
2020-11-28 20:12:58 +00:00
if (Perk.CurrentLevel<Default.MinLevel)
2017-10-20 02:00:49 +00:00
return false;
// Then check stats.
2020-11-28 20:12:58 +00:00
if (Lvl==0 && Default.BaseTrait!=None)
2017-10-20 02:00:49 +00:00
{
i = Perk.PerkTraits.Find('TraitType',Default.BaseTrait);
2020-11-28 20:12:58 +00:00
if (i>=0)
2017-10-20 02:00:49 +00:00
return (Perk.PerkTraits[i].CurrentLevel>0);
}
return true;
}
defaultproperties
{
TraitGroup=class'Ext_TGroupMonster'
BaseTrait=class'Ext_TraitZED_Summon'
}