public void UpdateActionPoints(long Tick) { if (Tick >= NextApRegen) { NextApRegen = Tick + ACTION_REGEN_TIME; if (AbtInterface.IsCasting()) { return; } UInt16 Regen = 25; // 25 + items bonus if (ActionPoints < MaxActionPoints) { ActionPoints += Regen; if (ActionPoints > MaxActionPoints) { ActionPoints = MaxActionPoints; } if (IsPlayer()) { GetPlayer().SendHealh(); } } } }