public override void OnClick() { PlayerMobile pm = Owner.From as PlayerMobile; if (pm != null) { Guild g = pm.Guild as Guild; if (g != null && pm.GuildRank != null && pm.GuildRank.Rank >= 3 && (pm.AccessLevel > AccessLevel.Player || g.Members.Count >= TownCryerSystem.MinGuildMemberCount)) { if (TownCryerSystem.HasGuildEntry(g)) { Owner.From.SendLocalizedMessage(1158038); // You have reached the maximum entry count. Please remove some and try again. } else { BaseGump.SendGump(new CreateGuildEntryGump(pm, Cryer)); } } else { pm.SendLocalizedMessage(1158025); // Only Guild Leaders and Warlords of guilds with at least 20 members may post in the Town Cryer. } } }
public UpdateGuildEntry(Mobile from, TownCrier cryer) : base(1158024, 3) // Update Guild Town Crier { Cryer = cryer; Enabled = from.Guild != null && !TownCryerSystem.HasGuildEntry(from.Guild as Guild); }