public override void OnResponse(NetState state, RelayInfo info) { if ((Guild.NewGuildSystem && !BaseGuildGump.IsLeader(m_Mobile, m_Guild)) || (!Guild.NewGuildSystem && GuildGump.BadLeader(m_Mobile, m_Guild))) { return; } GuildType newType; switch (info.ButtonID) { default: newType = m_Guild.Type; break; case 1: newType = GuildType.Regular; break; case 2: newType = GuildType.Order; break; case 3: newType = GuildType.Chaos; break; } if (m_Guild.Type != newType) { PlayerState pl = PlayerState.Find(m_Mobile); if (pl != null) { m_Mobile.SendLocalizedMessage(1010405); // You cannot change guild types while in a Faction! } else if (m_Guild.TypeLastChange.AddDays(7) > DateTime.Now) { m_Mobile.SendLocalizedMessage(1011142); // You have already changed your guild type recently. // TODO: Clilocs 1011142-1011145 suggest a timer for pending changes } else { m_Guild.Type = newType; m_Guild.GuildMessage(1018022, true, newType.ToString()); // Guild Message: Your guild type has changed: } } if (Guild.NewGuildSystem) { if (m_Mobile is PlayerMobile) { m_Mobile.SendGump(new GuildInfoGump((PlayerMobile)m_Mobile, m_Guild)); } return; } GuildGump.EnsureClosed(m_Mobile); m_Mobile.SendGump(new GuildmasterGump(m_Mobile, m_Guild)); }
public override void OnResponse(NetState state, RelayInfo info) { if (Guild.NewGuildSystem && !BaseGuildGump.IsLeader(m_Mobile, m_Guild) || !Guild.NewGuildSystem && GuildGump.BadLeader(m_Mobile, m_Guild)) { return; } var newType = info.ButtonID switch { 1 => GuildType.Regular, 2 => GuildType.Order, 3 => GuildType.Chaos, _ => m_Guild.Type }; if (m_Guild.Type != newType) { var pl = PlayerState.Find(m_Mobile); if (pl != null) { m_Mobile.SendLocalizedMessage(1010405); // You cannot change guild types while in a Faction! } else if (m_Guild.TypeLastChange.AddDays(7) > Core.Now) { m_Mobile.SendLocalizedMessage(1011142); // You have already changed your guild type recently. // TODO: Clilocs 1011142-1011145 suggest a timer for pending changes } else { m_Guild.Type = newType; m_Guild.GuildMessage(1018022, true, newType.ToString()); // Guild Message: Your guild type has changed: } } if (Guild.NewGuildSystem) { if (m_Mobile is PlayerMobile mobile) { mobile.SendGump(new GuildInfoGump(mobile, m_Guild)); } return; } GuildGump.EnsureClosed(m_Mobile); m_Mobile.SendGump(new GuildmasterGump(m_Mobile, m_Guild)); } }
public override void OnResponse(NetState state, RelayInfo info) { if ((Guild.NewGuildSystem && !BaseGuildGump.IsLeader(m_Mobile, m_Guild)) || (!Guild.NewGuildSystem && GuildGump.BadLeader(m_Mobile, m_Guild))) { return; } if (m_Guild.TypeLastChange.AddDays(7) > DateTime.Now) { m_Mobile.SendLocalizedMessage(1005292); // Your guild type will be changed in one week. } else { GuildType newType; switch (info.ButtonID) { default: return; // Close case 1: newType = GuildType.Regular; break; case 2: newType = GuildType.Order; break; case 3: newType = GuildType.Chaos; break; } if (m_Guild.Type == newType) { return; } m_Guild.Type = newType; m_Guild.GuildMessage(1018022, true, newType.ToString()); // Guild Message: Your guild type has changed: } if (Guild.NewGuildSystem) { if (m_Mobile is PlayerMobile) { m_Mobile.SendGump(new GuildInfoGump((PlayerMobile)m_Mobile, m_Guild)); } return; } GuildGump.EnsureClosed(m_Mobile); m_Mobile.SendGump(new GuildmasterGump(m_Mobile, m_Guild)); }
public override void OnResponse(NetState state, RelayInfo info) { switch (info.ButtonID) { case 0: break; case 1: User.LaunchBrowser("http://uo.com/wiki/ultima-online-wiki/publish-notes/publish-86/"); User.SendGump(new ConfirmSignupGump(User)); break; case 2: Guild g = User.Guild as Guild; if (g != null && BaseGuildGump.IsLeader(User, g)) { ViceVsVirtueSystem.Instance.TryAddGuild(g); } break; } }