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

36 lines
846 B
Ucode
Raw Normal View History

2017-10-20 02:00:49 +00:00
Class Ext_TraitCarryCap extends Ext_TraitBase;
var array<byte> CarryAdds;
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 KFInventoryManager M;
M = KFInventoryManager(Player.InvManager);
2020-11-28 20:12:58 +00:00
if (M!=None)
2017-10-20 02:00:49 +00:00
M.MaxCarryBlocks = M.Default.MaxCarryBlocks+Default.CarryAdds[Level-1];
}
2020-11-28 21:54:57 +00:00
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 KFInventoryManager M;
M = KFInventoryManager(Player.InvManager);
2020-11-28 20:12:58 +00:00
if (M!=None)
2017-10-20 02:00:49 +00:00
M.MaxCarryBlocks = M.Default.MaxCarryBlocks;
}
defaultproperties
{
NumLevels=5
DefLevelCosts(0)=10
DefLevelCosts(1)=15
DefLevelCosts(2)=20
DefLevelCosts(3)=25
DefLevelCosts(4)=50
CarryAdds.Add(2)
CarryAdds.Add(4)
CarryAdds.Add(6)
CarryAdds.Add(8)
CarryAdds.Add(15)
}