当前位置: 首页>>代码示例>>C#>>正文


C# MabiCreature.Revive方法代码示例

本文整理汇总了C#中Aura.World.World.MabiCreature.Revive方法的典型用法代码示例。如果您正苦于以下问题:C# MabiCreature.Revive方法的具体用法?C# MabiCreature.Revive怎么用?C# MabiCreature.Revive使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Aura.World.World.MabiCreature的用法示例。


在下文中一共展示了MabiCreature.Revive方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Complete

        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.Inventory.Decrement(creature.Temp.SkillItem1);

            // TODO: stats

            creature.Revive();

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

            return SkillResults.Okay;
        }
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:24,代码来源:ResurrectionlHandler.cs

示例2: ReviveInArena

        public virtual void ReviveInArena(MabiCreature creature)
        {
            var loc = this.RevivalLocations[RandomProvider.Get().Next(this.RevivalLocations.Length)];
            creature.SetLocation(ArenaRegion, loc.X, loc.Y);
            WorldManager.Instance.BroadcastRegion(new MabiPacket(Op.SetLocation, creature.Id).PutByte(1).PutInts(ArenaRegion, loc.X, loc.Y), ArenaRegion);
            creature.Client.Send(new MabiPacket(Op.WarpUnk2, creature.Id));

            creature.Injuries += creature.LifeInjured * .2f;
            creature.Life = creature.LifeInjured / 2;
            creature.Stamina = creature.StaminaHunger / 2;
            creature.Revive();

            this.HideCreature(creature);

            Send.Revived(creature);
        }
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:16,代码来源:MabiPvP.cs

示例3: ReviveInLobby

 public override void ReviveInLobby(MabiCreature creature)
 {
     try
     {
         var c = creature.Client as WorldClient;
         c.Warp(LobbyRegion, 1150, 3545);
         creature.FullHeal();
         creature.Revive();
         Send.Revived(creature);
     }
     catch
     { }
 }
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:13,代码来源:MabiPvP.cs


注:本文中的Aura.World.World.MabiCreature.Revive方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。