public bool Cast() { if (IsDone) { return(false); } bool CanCast = true; if (Caster.AbtInterface.CanCast(Info, false) == GameData.AbilityResult.ABILITYRESULT_OK) { Caster.ActionPoints -= Info.Info.ApCost; if (Info.Info.ApSec == 0) { DoneTime = TCPServer.GetTimeStampMS(); } if (Handler != null) { if (CanCast && Handler.CanCast(false) == GameData.AbilityResult.ABILITYRESULT_OK) { Caster.EvtInterface.Notify(EventName.ON_CAST, Caster, this); Handler.Cast(); } else { Handler.SendDone(); } } else { SendAbilityDone(0); } WorldMgr.GeneralScripts.OnCastAbility(this); return(true); } else { return(false); } }
public override void SendDone() { DamagesHandler.SendDone(); HealHandler.SendDone(); }