public void UpdateUI(PlayerMobile pm, bool refreshOnly) { var g = pm.FindGump <TournamentArchiveUI>(); if (g == null) { if (refreshOnly) { return; } g = new TournamentArchiveUI(pm, this); } g.Refresh(true); }
public override void SendGump(PlayerMobile pm) { HiMiddleLow game = GetGame(pm) as HiMiddleLow; if (game == null) { game = new HiMiddleLow(pm, this); AddGame(pm, game); } if (pm.FindGump(typeof(HiMiddleLowGump)) is HiMiddleLowGump g) { g.Refresh(); } else { pm.SendGump(new HiMiddleLowGump(pm, game)); } }
public override void SendGump(PlayerMobile pm) { DiceRider game = GetGame(pm) as DiceRider; if (game == null) { game = new DiceRider(pm, this); AddGame(pm, game); } if (pm.FindGump(typeof(DiceRiderGump)) is DiceRiderGump g) { g.Refresh(); } else { pm.SendGump(new DiceRiderGump(pm, game)); } }
public override void SendGump(PlayerMobile pm) { ChucklesLuck game = GetGame(pm) as ChucklesLuck; if (game == null) { game = new ChucklesLuck(pm, this); AddGame(pm, game); } if (pm.FindGump(typeof(ChucklesLuckGump)) is ChucklesLuckGump g) { g.Refresh(); } else { pm.SendGump(new ChucklesLuckGump(pm, game)); } }
public override void OnResponse(RelayInfo info) { switch (info.ButtonID) { case 1: if (RemoveFromBracelet) { GreaterBraceletOfBinding bracelet = User.FindItemOnLayer(Layer.Bracelet) as GreaterBraceletOfBinding; if (bracelet != null && bracelet.Friends[Index] != null) { var entry = bracelet.Friends[Index]; if (entry.Bracelet is GreaterBraceletOfBinding) { PlayerMobile pm = entry.Mobile; GreaterBraceletOfBinding gbr = entry.Bracelet as GreaterBraceletOfBinding; gbr.Remove(User); if (pm != null && pm.NetState != null) { var gump = pm.FindGump <GreaterBraceletOfBindingGump>(); if (gump != null) { gump.Refresh(); } } } bracelet.Remove(entry.Mobile); BaseGump.SendGump(new GreaterBraceletOfBindingGump(User, bracelet)); } } else { BraceletOfBinding brac = User.FindItemOnLayer(Layer.Bracelet) as BraceletOfBinding; if (brac != null) { var entry = new BindEntry(User, brac); Bracelet.Add(entry, Index); var g = From.FindGump <GreaterBraceletOfBindingGump>(); if (g != null) { g.Refresh(); } if (brac is GreaterBraceletOfBinding && !((GreaterBraceletOfBinding)brac).IsBound(From)) { entry = new BindEntry(From, Bracelet); ((GreaterBraceletOfBinding)brac).Pending = entry; BaseGump.SendGump(new GreaterBraceletOfBindingGump(User, (GreaterBraceletOfBinding)brac, entry)); } else { brac.Bound = Bracelet; } } else { User.SendLocalizedMessage(1151772); // You must be wearing this item to bind to another character. From.SendLocalizedMessage(1151771); // The target player must be wearing a Bracelet of Binding or Greater Bracelet of Binding for the device to work. } } break; case 2: if (!RemoveFromBracelet) { From.SendLocalizedMessage(1151778, User.Name); // ~1_val~ has declined your request to bind bracelets. } break; } }