public void minion_zombie_raise(ZombieMinion zombieMinion) { if (zombieMinion.tag != null) { (zombieMinion.tag as ZombieMinionGUI).onMinionRaise(); } }
public override void OnDoubleClick(Mobile from) { if (!IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. return; } double NecroSkill = from.Skills[SkillName.Necromancy].Value; if (NecroSkill < 20.0) { from.SendMessage("You must have at least 20.0 skill in necromancy to construct a zombie."); return; } double scalar; if (NecroSkill >= 100.0) { scalar = 3.0; } else if (NecroSkill >= 90.0) { scalar = 2.5; } else if (NecroSkill >= 80.0) { scalar = 2.0; } else if (NecroSkill >= 70.0) { scalar = 1.5; } else { scalar = 1.0; } Container pack = from.Backpack; if (pack == null) { return; } int res = pack.ConsumeTotal( new Type[] { typeof(RottingBod), typeof(RottingLegs) }, new int[] { 1, 1 }); switch (res) { case 0: { from.SendMessage("You must have a rotting torso to construct the zombie."); break; } case 1: { from.SendMessage("You must have a pair of rotting legs to construct the zombie."); break; } default: { ZombieMinion g = new ZombieMinion(true, scalar); if (g.SetControlMaster(from)) { Delete(); g.MoveToWorld(from.Location, from.Map); from.PlaySound(0x241); } break; } } }