OnixServer
New Member
- Joined
- Jun 4, 2014
- Messages
- 8
- Reaction score
- 0
Hello I need to change this code to work with another message type,.
How i can to change "TALKTYPE_MONSTER_SAY" for "MESSAGE_INFO_DESCR" without crash?
the source archive is game.cpp
Thanks for help
How i can to change "TALKTYPE_MONSTER_SAY" for "MESSAGE_INFO_DESCR" without crash?
Code:
bool Game::playerSaySpell(Player* player, SpeakClasses type, const std::string& text)
{
std::string words = text;
TalkActionResult_t result = g_talkActions->playerSaySpell(player, type, words);
if (result == TALKACTION_BREAK) {
return true;
}
result = g_spells->playerSaySpell(player, words);
if (result == TALKACTION_BREAK) {
if (!g_config.getBoolean(ConfigManager::EMOTE_SPELLS)) {
return internalCreatureSay(player, TALKTYPE_SAY, words, false);
} else {
return internalCreatureSay(player, TALKTYPE_MONSTER_SAY, words, false);
}
} else if (result == TALKACTION_FAILED) {
return true;
}
return false;
}
the source archive is game.cpp
Thanks for help
Last edited by a moderator: