What handles the guild name colors for allies/enemies? -Is it packet, sub packet or something like that? -Or only server side?
public static void SendAllGuild(Character TheChar)
{
try
{
foreach (Guild TheGuild in Guilds.AllGuilds.Values)
{
TheChar.MyClient.SendPacket(CoServer.MyPackets.GuildName(TheGuild.UniqId, TheGuild.Name));
if (TheChar.MyGuild != null && TheGuild != null)
{
if (TheChar.MyGuild == TheGuild)
TheChar.MyClient.SendPacket(CoServer.MyPackets.SendGuild(TheGuild.UniqId, 1));
else if (TheChar.MyGuild.Allies.Contains(TheGuild.UniqId))
TheChar.MyClient.SendPacket(CoServer.MyPackets.SendGuild(TheGuild.UniqId, 7));
else if (TheChar.MyGuild.Enemies.Contains(TheGuild.UniqId))
TheChar.MyClient.SendPacket(CoServer.MyPackets.SendGuild(TheGuild.UniqId, 9));
else
TheChar.MyClient.SendPacket(CoServer.MyPackets.SendGuild(TheGuild.UniqId, 8));
}
else
TheChar.MyClient.SendPacket(CoServer.MyPackets.SendGuild(TheGuild.UniqId, 8));
}
}
catch (Exception Exc) { Program.WriteLine(Exc.ToString()); }
}
No its not the greatest reference in the world, but the enum's is mainly what he needed.Quote:
Not the best reference, but from my COPS v3 - Reborn Edition, which had Allies/Enemies working. Note that it is based on LOTF...
Code:public static void SendAllGuild(Character TheChar) { try { foreach (Guild TheGuild in Guilds.AllGuilds.Values) { TheChar.MyClient.SendPacket(CoServer.MyPackets.GuildName(TheGuild.UniqId, TheGuild.Name)); if (TheChar.MyGuild != null && TheGuild != null) { if (TheChar.MyGuild == TheGuild) TheChar.MyClient.SendPacket(CoServer.MyPackets.SendGuild(TheGuild.UniqId, 1)); else if (TheChar.MyGuild.Allies.Contains(TheGuild.UniqId)) TheChar.MyClient.SendPacket(CoServer.MyPackets.SendGuild(TheGuild.UniqId, 7)); else if (TheChar.MyGuild.Enemies.Contains(TheGuild.UniqId)) TheChar.MyClient.SendPacket(CoServer.MyPackets.SendGuild(TheGuild.UniqId, 9)); else TheChar.MyClient.SendPacket(CoServer.MyPackets.SendGuild(TheGuild.UniqId, 8)); } else TheChar.MyClient.SendPacket(CoServer.MyPackets.SendGuild(TheGuild.UniqId, 8)); } } catch (Exception Exc) { Program.WriteLine(Exc.ToString()); } }