Exemple #1
0
        public override SkillResults Complete(MabiCreature creature, MabiSkill skill, MabiPacket packet)
        {
            var targetId = packet.GetLong();
            // 2 unk ints in older logs
            //var unk1 = packet.GetInt();
            //var unk2 = packet.GetInt();

            var target = WorldManager.Instance.GetCreatureById(targetId);
            if (target == null || !target.IsDead)
                return SkillResults.InvalidTarget;

            if (creature.Temp.SkillItem1 == null || creature.Temp.SkillItem1.Info.Class != 63000 || creature.Temp.SkillItem1.Info.Amount < 1)
                return SkillResults.Failure;

            creature.DecItem(creature.Temp.SkillItem1);

            // TODO: stats

            creature.Revive();

            Send.SkillComplete(creature.Client, creature, skill.Id, targetId);

            return SkillResults.Okay;
        }