本文整理汇总了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;
}
示例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);
}
示例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
{ }
}