Exemple #1
0
        public override void Cast(SkillCast skillCast)
        {
            int spiritCost  = skillCast.GetSpCost();
            int staminaCost = skillCast.GetStaCost();

            if (Value.Stats[StatId.Spirit].Total >= spiritCost && Value.Stats[StatId.Stamina].Total >= staminaCost)
            {
                SkillCast = skillCast;

                ConsumeSp(spiritCost);
                ConsumeStamina(staminaCost);
                Value.Session.SendNotice(skillCast.SkillId.ToString());

                // TODO: Move this and all others combat cases like recover sp to its own class.
                // Since the cast is always sent by the skill, we have to check buffs even when not doing damage.
                if (skillCast.IsBuffToOwner() || skillCast.IsBuffToEntity() || skillCast.IsBuffShield() || skillCast.IsDebuffToOwner())
                {
                    Status status = new(skillCast, ObjectId, ObjectId, 1);
                    StatusHandler.Handle(Value.Session, status);
                }

                StartCombatStance();
            }
        }
    public virtual void Cast(SkillCast skillCast)
    {
        SkillCast = skillCast;

        // TODO: Move this and all others combat cases like recover sp to its own class.
        // Since the cast is always sent by the skill, we have to check buffs even when not doing damage.
        if (skillCast.IsBuffToOwner() || skillCast.IsBuffToEntity() || skillCast.IsBuffShield() || skillCast.IsDebuffToOwner())
        {
            Status status = new(skillCast, ObjectId, ObjectId, 1);
            //StatusHandler.Handle(Value.Session, status);
        }
    }