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

31 lines
760 B
Ucode
Raw Normal View History

2017-10-20 02:00:49 +00:00
Class Ext_TraitAmmoReg extends Ext_TraitBase;
var array<float> RegenValues;
2020-11-28 20:04:55 +00:00
static function ApplyEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
2017-10-20 02:00:49 +00:00
{
local Ext_T_AmmoRegHelp H;
H = Player.Spawn(class'Ext_T_AmmoRegHelp',Player);
2020-11-28 20:04:55 +00:00
if(H!=None)
2017-10-20 02:00:49 +00:00
H.RegCount = Default.RegenValues[Level-1];
}
2020-11-28 20:04:55 +00:00
static function CancelEffectOn(KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
2017-10-20 02:00:49 +00:00
{
local Ext_T_AmmoRegHelp H;
foreach Player.ChildActors(class'Ext_T_AmmoRegHelp',H)
H.Destroy();
}
defaultproperties
{
TraitGroup=class'Ext_TGroupRegen'
NumLevels=3
DefLevelCosts(0)=10
DefLevelCosts(1)=20
DefLevelCosts(2)=40
RegenValues.Add(0.02)
RegenValues.Add(0.05)
RegenValues.Add(0.1)
}