public ConfigSelectionGump(Mobile from, EventSupplier eventSupplier, int x, int y) : base(x, y) { m_From = from; m_EventSupplier = eventSupplier; AddPage(0); AddImage(105, 131, 3507); AddImage(105, 105, 3501); AddLabel(130, 110, 0, "Armors"); AddButton(115, 115, 2362, 2360, (int)AcceptedTypes.Armors + OFFSET, GumpButtonType.Reply, 0); AddLabel(275, 110, 0, "Weapons"); AddButton(325, 115, 2362, 2360, (int)AcceptedTypes.Weapons + OFFSET, GumpButtonType.Reply, 0); AddLabel(130, 130, 0, "Clothing"); AddButton(115, 135, 2362, 2360, (int)AcceptedTypes.Cloths + OFFSET, GumpButtonType.Reply, 0); AddLabel(275, 130, 0, "Others"); AddButton(325, 135, 2362, 2360, (int)AcceptedTypes.Others + OFFSET, GumpButtonType.Reply, 0); AddImage(80, 105, 3500); AddImage(346, 105, 3502); AddImage(79, 131, 3506); AddImage(346, 131, 3508); }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); ScoreModifier = 1.0; switch (version) { case 3: { ScoringType = (Scoring) reader.ReadInt(); ScoreModifier = reader.ReadDouble(); goto case 2; } case 2: { m_EventSupplier = reader.ReadItem<EventSupplier>(); m_UseSphereRules = reader.ReadBool(); m_GiveHorses = reader.ReadBool(); goto case 1; } case 1: { m_MatchMin = reader.ReadInt(); m_LeaveLocation = reader.ReadPoint3D(); m_LeaveMap = reader.ReadMap(); goto case 0; } case 0: { Started = reader.ReadBool(); m_Active = reader.ReadBool(); m_AcceptingContestants = reader.ReadBool(); m_DMSpawnPoints = reader.ReadStrongItemList<DMSpawnPoint>(); #region Verify loaded spawn points List<DMSpawnPoint> removalList = new List<DMSpawnPoint>(); foreach (DMSpawnPoint dmSpawnPoint in m_DMSpawnPoints) if (dmSpawnPoint.StoneLink != this) removalList.Add(dmSpawnPoint); foreach (DMSpawnPoint dmSpawnPoint in removalList) m_DMSpawnPoints.Remove(dmSpawnPoint); #endregion m_MountCollection = ReadMountCollection(reader); break; } } m_Started = false; AcceptingContestants = false; Active = false; }
public static void SupplyGear(Mobile m, EventSupplier eventSupplier) { //Supply the right type of gear SupplyType supplyType = eventSupplier.SupplyType; if (supplyType == SupplyType.MaxGear) SupplyMaxGear(m, eventSupplier.ClothHue, eventSupplier.GearHue, eventSupplier.TeamName, eventSupplier.NewbieAllItems, eventSupplier.StayEquipped, eventSupplier.ConsumeItems); else if (supplyType == SupplyType.RegularGear) SupplyRegGear(m, eventSupplier.ClothHue, eventSupplier.GearHue, eventSupplier.TeamName, eventSupplier.NewbieAllItems, eventSupplier.StayEquipped, eventSupplier.ConsumeItems); else if (supplyType == SupplyType.Custom) { if (!eventSupplier.CanUseCustomGear) m.PublicOverheadMessage(MessageType.Regular, 906, true, "Custom setup error."); //Copy all the items in our bags and make them to event items for (int i = 0; i < eventSupplier.ItemContaiers.Length; i++) if (eventSupplier.ItemContaiers[i].Items.Count > 0) SupplyCustomItems(eventSupplier.ItemContaiers[i].Items, m, eventSupplier.ItemContaiers[i].AcceptsType, eventSupplier.NewbieAllItems, eventSupplier.ClothHue, eventSupplier.GearHue, eventSupplier.TeamName, eventSupplier.StayEquipped, eventSupplier.ConsumeItems); } }
public ConfigSelectionGump(Mobile from, EventSupplier eventSupplier) : this(from, eventSupplier,180, 180) { }
public ConfigSelectionGump(Mobile from, EventSupplier eventSupplier) : this(from, eventSupplier, 180, 180) { }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); switch (version) { case 5: { m_BeginGame = reader.ReadBool(); } goto case 4; case 4: { int count = reader.ReadInt(); for (int i = 0; i < count; ++i) { PlayerMobile player = reader.ReadMobile() as PlayerMobile; EquipmentStorage storage = reader.ReadItem() as EquipmentStorage; m_PlayerSupplies.Add(player, storage); } goto case 3; } case 3: { m_UseGump = reader.ReadBool(); m_GameName = reader.ReadString(); m_EventType = (EventType)reader.ReadInt(); int count = reader.ReadInt(); for (int i = 0; i < count; ++i) { m_PlayerScores.Add(reader.ReadMobile(), reader.ReadInt()); } goto case 2; } case 2: { Open = reader.ReadBool(); m_GiveSupplies = reader.ReadBool(); m_Supplier = reader.ReadItem() as EventSupplier; goto case 1; } case 1: { m_Players = reader.ReadStrongMobileList(); m_GameMaster = reader.ReadMobile(); m_MsgStaff = reader.ReadBool(); m_Running = reader.ReadBool(); m_StartTime = reader.ReadDateTime(); m_Length = reader.ReadTimeSpan(); m_MaxScore = reader.ReadInt(); m_Lobby = reader.ReadPoint3D(); m_LobbyMap = reader.ReadMap(); break; } } }