private static int MoonGen(PMList list) { foreach (PMEntry entry in list.Entries) { Item item = new PublicMoongate(); item.MoveToWorld(entry.Location, list.Map); if (entry.Number == 1060642) // Umbra { item.Hue = 0x497; } } return(list.Entries.Length); }
private static int MoonGen(PMList list) { for (var index = 0; index < list.Entries.Length; index++) { PMEntry entry = list.Entries[index]; PublicMoongate o = new PublicMoongate(); o.MoveToWorld(entry.Location, list.Map); if (entry.Number == 1060642) // Umbra { o.Hue = 0x497; } } return(list.Entries.Length); }
private static int MoonGen(PMList list) { foreach (PMEntry entry in list.Entries) { Item item = new PublicMoongate(); var loc = entry.Location; var map = list.Map; if (!MythikStaticValues.UpdateLoc(ref loc, ref map)) { continue; } item.MoveToWorld(loc, map); if (entry.Number == 1060642) // Umbra { item.Hue = 0x497; } } return(list.Entries.Length); }
private static int MoonGen(PMList list) { foreach (PMEntry entry in list.Entries) { Item item = new PublicMoongate(); item.MoveToWorld(entry.Location, list.Map); if (entry.Number == 1060642) // Umbra item.Hue = 0x497; } return list.Entries.Length; }
public MoongateGump(Mobile mobile, PublicMoongate moongate) : base(100, 100) { m_Mobile = mobile; m_Moongate = moongate; PMList[] checkLists; if (mobile.Player) { if (Sigil.ExistsOn(mobile)) { checkLists = PMList.SigilLists; } else if (mobile.Kills >= Mobile.MurderCount) { checkLists = PMList.RedLists; } else { ClientFlags flags = mobile.NetState == null ? ClientFlags.None : mobile.NetState.Flags; bool young = mobile is PlayerMobile && ((PlayerMobile)mobile).Young; if (moongate.EraSE && (flags & ClientFlags.Tokuno) != 0) { checkLists = young ? PMList.SEListsYoung : PMList.SELists; } else if (moongate.EraAOS && (flags & ClientFlags.Malas) != 0) { checkLists = young ? PMList.AOSListsYoung : PMList.AOSLists; } else if (moongate.EraUOTD && (flags & ClientFlags.Ilshenar) != 0) { checkLists = young ? PMList.LBRListsYoung : PMList.LBRLists; } else { checkLists = PMList.RedLists; } //checkLists = young ? PMList.UORListsYoung : PMList.UORLists; } } else { checkLists = PMList.SELists; } m_Lists = new PMList[checkLists.Length]; for (int i = 0; i < m_Lists.Length; ++i) { m_Lists[i] = checkLists[i]; } for (int i = 0; i < m_Lists.Length; ++i) { if (m_Lists[i].Map == mobile.Map) { PMList temp = m_Lists[i]; m_Lists[i] = m_Lists[0]; m_Lists[0] = temp; break; } } AddPage(0); AddBackground(0, 0, 380, 280, 5054); AddButton(10, 210, 4005, 4007, 1, GumpButtonType.Reply, 0); AddHtmlLocalized(45, 210, 140, 25, 1011036, false, false); // OKAY AddButton(10, 235, 4005, 4007, 0, GumpButtonType.Reply, 0); AddHtmlLocalized(45, 235, 140, 25, 1011012, false, false); // CANCEL AddHtmlLocalized(5, 5, 200, 20, 1012011, false, false); // Pick your destination: for (int i = 0; i < checkLists.Length; ++i) { AddButton(10, 35 + (i * 25), 2117, 2118, 0, GumpButtonType.Page, Array.IndexOf(m_Lists, checkLists[i]) + 1); AddHtmlLocalized(30, 35 + (i * 25), 150, 20, checkLists[i].Number, false, false); } for (int i = 0; i < m_Lists.Length; ++i) { RenderPage(i, Array.IndexOf(checkLists, m_Lists[i])); } }