Bom, postarei como colocar para gm, adm, cm falar em red nos channels e tutores e senior tutores em orange.
testado em: tfs 0.3.6 |854| pl
Em chat.cpp procure por:
bool ChatChannel::talk(Player* player, SpeakClasses type, const std::string& text, uint32_t _time/* = 0
e vai ter uma linha assim:
if(it == m_users.end())
return false;
de 2 quebra de linhas e adicione em baixo:
SpeakClasses ntype = type;
uint16_t channelId = getId();
if (channelId == 5) {
if (player->getGroupId() == 6) {
ntype = SPEAK_CHANNEL_RN;
}
else if (player->getGroupId() == 5) {
ntype = SPEAK_CHANNEL_RN;
}
else if (player->getGroupId() == 4) {
ntype = SPEAK_CHANNEL_RN;
}
else if(player->getGroupId() >= 2) {
ntype = SPEAK_CHANNEL_O;
}
}
Agora, um pouco em baixo disso que você adicionou, tem essa função:
it->second->sendToChannel(player, type, text, m_id, _time);
troque por essa:
it->second->sendToChannel(player, ntype, text, m_id, _time);
ou, é só adiciona um "n", no type da primeira linha rs
Como Editar os Groups ?
(player->getGroupId() == 5)
"5" -> Grupo do player, no caso aqui seria CM