private void ReadyPlayer(Mobile m) { if (!ScoreTable.ContainsKey(m.Serial)) { ScoreTable.Add(m.Serial, new ScoreKeeper(m)); } if (EventSupplier != null) { EventSupplier.OnMoveOver(m); } Contestants.Add(m); m.MoveToWorld(JoinLocation, JoinMap); m.Blessed = true; if (m.NetState != null) { m.SendMessage(38, "You have joined a tournament"); } }
private void ReadyPlayer(Mobile m) { if (!m_ScoreTable.ContainsKey(m.Serial)) { m_ScoreTable.Add(m.Serial, new ScoreKeeper(m)); } if (!m_UseSphereRules) { #region DistroCode bool MagicWeapons = MagicWeaponRule == pMagicWeaponRule.Allowed; bool MagicArmor = MagicArmorRule == pMagicArmorRule.Allowed; bool Potions = PotionRule == pPotionRule.Allowed; bool Bandages = BandageRule == pBandaidRule.Allowed; bool Pets = PetRule == pPetRule.Allowed; bool Mounts = MountRule == pMountRule.Allowed; if (!m.Alive) { m.Resurrect(); } Container bp = m.Backpack; Container bag = new Bag(); bag.Hue = 38; BankBox bank = m.BankBox; Item oncurs = m.Holding; if (oncurs != null) { bp.DropItem(oncurs); } m.CurePoison(m); m.Hits = m.HitsMax; m.Mana = m.ManaMax; m.Stam = m.StamMax; m.StatMods.Clear(); List <Item> items = new List <Item>(); foreach (Layer layer in PvpCore.EquipmentLayers) { Item item = m.FindItemOnLayer(layer); if (item != null) { if (item is BaseWeapon && !MagicWeapons) { BaseWeapon weapon = (BaseWeapon)item; if (weapon.AccuracyLevel != WeaponAccuracyLevel.Regular) { items.Add(weapon); } else if (weapon.DamageLevel != WeaponDamageLevel.Regular) { items.Add(weapon); } else if (weapon.DurabilityLevel != WeaponDurabilityLevel.Regular) { items.Add(weapon); } } else if (item is BaseArmor && !MagicArmor) { BaseArmor armor = (BaseArmor)item; if (armor.Durability != ArmorDurabilityLevel.Regular) { items.Add(armor); } else if (armor.ProtectionLevel != ArmorProtectionLevel.Regular) { items.Add(armor); } } } } if (m.Backpack != null) { foreach (Item item in m.Backpack.Items) { if (item != null) { if (item is BaseWeapon && !MagicWeapons) { BaseWeapon weapon = (BaseWeapon)item; if (weapon.AccuracyLevel != WeaponAccuracyLevel.Regular) { items.Add(weapon); } else if (weapon.DamageLevel != WeaponDamageLevel.Regular) { items.Add(weapon); } else if (weapon.DurabilityLevel != WeaponDurabilityLevel.Regular) { items.Add(weapon); } } else if (item is BaseArmor && !MagicArmor) { BaseArmor armor = (BaseArmor)item; if (armor.Durability != ArmorDurabilityLevel.Regular) { items.Add(armor); } else if (armor.ProtectionLevel != ArmorProtectionLevel.Regular) { items.Add(armor); } } else if (item is BasePotion && !Potions) { items.Add(item); } else if (item is EtherealMount && !Mounts) { items.Add(item); } else if (item is Bandage && !Bandages) { items.Add(item); } } } } if (!Mounts) { if (m.Mount != null) { IMount mount = m.Mount; mount.Rider = null; if (mount is BaseMount) { if (mount is BaseCreature) { BaseCreature bc = (BaseCreature)mount; bc.ControlTarget = null; bc.ControlOrder = OrderType.Stay; bc.Internalize(); bc.SetControlMaster(null); bc.SummonMaster = null; bc.IsStabled = true; m.Stabled.Add(bc); MountCollection.Add(m.Serial, bc); m.SendMessage(38, "Your mount has been moved to the your stables"); } } } } if (items.Count > 0) { m.SendMessage(38, "You had items that did not meet the requirements for the deathmatch and were thus moved to your bank."); } foreach (Item item in items) { bag.AddItem(item); } if (bag.Items.Count > 0) { bank.DropItem(bag); } else { bag.Delete(); } #endregion } if (m_EventSupplier != null) { m_EventSupplier.OnMoveOver(m); } Contestants.Add(m); SpawnMobile(m); if (m_GiveHorses) { DMHorse.TryGiveHorse(m); } if (m.NetState != null) { m.SendMessage(38, "You have joined a deathmatch"); m.SendMessage(38, "You can check the score with \".DMScore\""); } }