Am gasit acum, dar ce ar trebui sa modific, ca sa nu mai apara la VIP?
Cod: Selectaţi tot
const char* kingdoms[4] = {"|cFFFFC700[Game Master]|r","|cFFFF0000[Shinshoo]|r","|cFFFFFF00[Chunjo]|r","|cFF0080FF[Jinno]|r"};
char chatbuf_global[CHAT_MAX_LEN + 1];
int my_level = ch->GetLevel();
if (gSpecialShout)
{
if (ch->GetGMLevel() != GM_PLAYER)
{
if (MasterGhostChat)
{
int len_global = snprintf(chatbuf_global, sizeof(chatbuf_global), "%s : %s", kingdoms[0], buf);
}
else
{
int len_global = snprintf(chatbuf_global, sizeof(chatbuf_global), "%s : %s", ch->GetName(), buf);
}
}
else
{
if ((PlayerColorEmpire) and (!PlayerLevelChat))
{
int len_global = snprintf(chatbuf_global, sizeof(chatbuf_global), "%s %s : %s", ch->GetName(), kingdoms[ch->GetEmpire()], buf);
}
else if ((PlayerColorEmpire) and (PlayerLevelChat))
{
int len_global = snprintf(chatbuf_global, sizeof(chatbuf_global), "%s%s[Lv.%d][CH%d]%s", kingdoms[ch->GetEmpire()], ch->GetName(), my_level, g_bChannel, buf);
}
else if ((!PlayerColorEmpire) and (PlayerLevelChat))
{
int len_global = snprintf(chatbuf_global, sizeof(chatbuf_global), "%s [%d] : %s", ch->GetName(), my_level, buf);
}
else
{
int len_global = snprintf(chatbuf_global, sizeof(chatbuf_global), "%s : %s", ch->GetName(), buf);
}
}
}
else
{
int len_global = snprintf(chatbuf_global, sizeof(chatbuf_global), "%s : %s", ch->GetName(), buf);
}
TPacketGGShout p;
p.bHeader = HEADER_GG_SHOUT;
p.bEmpire = ch->GetEmpire();
strlcpy(p.szText, chatbuf_global, sizeof(p.szText));
P2P_MANAGER::instance().Send(&p, sizeof(TPacketGGShout));
SendShout(chatbuf_global, ch->GetEmpire());
return (iExtraLen);
}