Core/Scripts: Nuke db_script_string table and make SCRIPT_COMMAND_TALK with broadcast_text instead

Original code by @Ascathor with modifications
Closes #13092
This commit is contained in:
DDuarte committed 2014-09-13 02:45:51 +01:00
1 parent f5a3913d95
commit 27479cf571
9 files changed
+226 -75

No files matched your search

+21 -2
View File
@@ -1297,14 +1297,29 @@ public:
static bool HandleNpcWhisperCommand(ChatHandler* handler, char const* args)
{
if (!*args)
{
handler->SendSysMessage(LANG_CMD_SYNTAX);
handler->SetSentErrorMessage(true);
return false;
}
char* receiver_str = strtok((char*)args, " ");
char* text = strtok(NULL, "");
Creature* creature = handler->getSelectedCreature();
if (!creature || !receiver_str || !text)
if (!receiver_str || !text)
{
handler->SendSysMessage(LANG_CMD_SYNTAX);
handler->SetSentErrorMessage(true);
return false;
}
Creature* creature = handler->getSelectedCreature();
if (!creature)
{
handler->SendSysMessage(LANG_SELECT_CREATURE);
handler->SetSentErrorMessage(true);
return false;
}
uint64 receiver_guid = atol(receiver_str);
@@ -1320,7 +1335,11 @@ public:
static bool HandleNpcYellCommand(ChatHandler* handler, char const* args)
{
if (!*args)
{
handler->SendSysMessage(LANG_CMD_SYNTAX);
handler->SetSentErrorMessage(true);
return false;
}
Creature* creature = handler->getSelectedCreature();
if (!creature)