KF2-Server-Extension/ServerExt/Classes/Ext_TraitZedative.uc
GenZmeY 1d7c441b4c update localization
- more text supports localization;
- move hardcode to english localization file;
- update the Russian localization file.
2021-01-18 00:55:45 +03:00

48 lines
972 B
Ucode

Class Ext_TraitZedative extends Ext_TraitBase;
var localized string GroupDescription;
function string GetPerkDescription()
{
local string S;
S = Super.GetPerkDescription();
S $= "|"$GroupDescription;
return S;
}
static function bool MeetsRequirements(byte Lvl, Ext_PerkBase Perk)
{
local int i;
if (Perk.CurrentLevel<Default.MinLevel || Perk.CurrentPrestige<2)
return false;
if (Lvl==0)
{
i = Perk.PerkStats.Find('StatType','Heal');
if (i>=0)
return (Perk.PerkStats[i].CurrentValue>=25);
}
return true;
}
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
{
Ext_PerkFieldMedic(Perk).bUseSlug = true;
}
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
{
Ext_PerkFieldMedic(Perk).bUseSlug = false;
}
defaultproperties
{
SupportedPerk=class'Ext_PerkFieldMedic'
TraitGroup=class'Ext_TGroupZEDTime'
NumLevels=1
DefLevelCosts(0)=50
DefMinLevel=65
}