protected override void OnTarget(Mobile from, object targeted) { if (m_Bandage.Deleted) { return; } if (targeted is Mobile) { if (from.InRange(m_Bandage.GetWorldLocation(), Bandage.Range)) { if (BandageContext.BeginHeal(from, (Mobile)targeted) != null) { m_Bandage.Consume(); Server.Gumps.QuickBar.RefreshQuickBar(from); } } else { from.SendLocalizedMessage(500295); // You are too far away to do that. } } else if (targeted is HenchmanFighterItem && from.Skills[SkillName.Anatomy].Value >= 80 && from.Skills[SkillName.Healing].Value >= 80) { HenchmanFighterItem friend = (HenchmanFighterItem)targeted; if (friend.HenchDead > 0) { friend.Name = "fighter henchman"; friend.HenchDead = 0; friend.InvalidateProperties(); m_Bandage.Consume(); } else { from.SendMessage("They are not dead."); } } else if (targeted is HenchmanWizardItem && from.Skills[SkillName.Anatomy].Value >= 80 && from.Skills[SkillName.Healing].Value >= 80) { HenchmanWizardItem friend = (HenchmanWizardItem)targeted; if (friend.HenchDead > 0) { friend.Name = "wizard henchman"; friend.HenchDead = 0; friend.InvalidateProperties(); m_Bandage.Consume(); } else { from.SendMessage("They are not dead."); } } else if (targeted is HenchmanArcherItem && from.Skills[SkillName.Anatomy].Value >= 80 && from.Skills[SkillName.Healing].Value >= 80) { HenchmanArcherItem friend = (HenchmanArcherItem)targeted; if (friend.HenchDead > 0) { friend.Name = "archer henchman"; friend.HenchDead = 0; friend.InvalidateProperties(); m_Bandage.Consume(); } else { from.SendMessage("They are not dead."); } } else if (targeted is HenchmanMonsterItem && from.Skills[SkillName.Anatomy].Value >= 80 && from.Skills[SkillName.Healing].Value >= 80) { HenchmanMonsterItem friend = (HenchmanMonsterItem)targeted; if (friend.HenchDead > 0) { friend.Name = "creature henchman"; friend.HenchDead = 0; friend.InvalidateProperties(); m_Bandage.Consume(); } else { from.SendMessage("They are not dead."); } } else { from.SendLocalizedMessage(500970); // Bandages can not be used on that. } }
public void ItemTarget(Item hench, Mobile from, RodOfResurrection rod) { if (hench is HenchmanFighterItem) { HenchmanFighterItem friend = (HenchmanFighterItem)hench; if (friend.HenchDead > 0) { friend.Name = "fighter henchman"; friend.HenchDead = 0; friend.InvalidateProperties(); from.PlaySound(0x214); ConsumeCharge(rod, from); } else { from.SendMessage("They are not dead."); } } else if (hench is HenchmanWizardItem) { HenchmanWizardItem friend = (HenchmanWizardItem)hench; if (friend.HenchDead > 0) { friend.Name = "wizard henchman"; friend.HenchDead = 0; friend.InvalidateProperties(); from.PlaySound(0x214); ConsumeCharge(rod, from); } else { from.SendMessage("They are not dead."); } } else if (hench is HenchmanArcherItem) { HenchmanArcherItem friend = (HenchmanArcherItem)hench; if (friend.HenchDead > 0) { friend.Name = "archer henchman"; friend.HenchDead = 0; friend.InvalidateProperties(); from.PlaySound(0x214); ConsumeCharge(rod, from); } else { from.SendMessage("They are not dead."); } } else if (hench is HenchmanMonsterItem) { HenchmanMonsterItem friend = (HenchmanMonsterItem)hench; if (friend.HenchDead > 0) { friend.Name = "creature henchman"; friend.HenchDead = 0; friend.InvalidateProperties(); from.PlaySound(0x214); ConsumeCharge(rod, from); } else { from.SendMessage("They are not dead."); } } else { from.SendMessage("This spell didn't seem to work."); } }
public static void ResurrectHenchman(Mobile from) { if (from is PlayerMobile && from.Alive) { bool giveMessage = false; foreach (Item i in from.Backpack.Items) { if (i is HenchmanFighterItem) { HenchmanFighterItem friend = (HenchmanFighterItem)i; if (friend.HenchDead > 0) { friend.Name = "fighter henchman"; friend.HenchDead = 0; friend.InvalidateProperties(); giveMessage = true; } } else if (i is HenchmanWizardItem) { HenchmanWizardItem friend = (HenchmanWizardItem)i; if (friend.HenchDead > 0) { friend.Name = "wizard henchman"; friend.HenchDead = 0; friend.InvalidateProperties(); giveMessage = true; } } else if (i is HenchmanArcherItem) { HenchmanArcherItem friend = (HenchmanArcherItem)i; if (friend.HenchDead > 0) { friend.Name = "archer henchman"; friend.HenchDead = 0; friend.InvalidateProperties(); giveMessage = true; } } else if (i is HenchmanMonsterItem) { HenchmanMonsterItem friend = (HenchmanMonsterItem)i; if (friend.HenchDead > 0) { friend.Name = "creature henchman"; friend.HenchDead = 0; friend.InvalidateProperties(); giveMessage = true; } } } if (giveMessage) { from.SendMessage("Your henchmen have been resurrected."); from.PlaySound(0x214); from.FixedEffect(0x376A, 10, 16); } } }