public void Execute(Player player, string[] args)
{
if (player.GuildRank == 40)
{
foreach (var e in from i in RealmManager.Worlds
where i.Key != 0
from e in i.Value.Players
where string.Equals(e.Value.Client.Account.Name, args[0], StringComparison.CurrentCultureIgnoreCase)
select e)
{
if (e.Value.Client.Account.Guild.Rank == 40)
{
player.SendInfo(e.Value.Client.Account.Name + " has been invited to ally with your guild!");
e.Value.Client.SendPacket(new GuildAllyRequestPacket
{
Name = player.Client.Account.Name,
Guild = player.Client.Account.Guild.Name
});
}
else
player.SendError(e.Value.Client.Account.Guild.Name + " is already one of your allys!");
}
}
else
player.SendInfo("Only founders can ally with other guilds!");
}