Scripts/DB_Scripts: enable DB scripts to use CHAT_MSG_RAID_BOSS_WHISPER (42) as chat type
--HG-- branch : trunk
This commit is contained in:
@@ -4745,7 +4745,7 @@ void ObjectMgr::LoadScripts(ScriptsType type)
|
|||||||
{
|
{
|
||||||
case SCRIPT_COMMAND_TALK:
|
case SCRIPT_COMMAND_TALK:
|
||||||
{
|
{
|
||||||
if (tmp.datalong > CHAT_TYPE_WHISPER)
|
if (tmp.datalong > CHAT_TYPE_WHISPER && tmp.datalong != CHAT_MSG_RAID_BOSS_WHISPER)
|
||||||
{
|
{
|
||||||
sLog.outErrorDb("Table `%s` has invalid talk type (datalong = %u) in SCRIPT_COMMAND_TALK for script id %u",
|
sLog.outErrorDb("Table `%s` has invalid talk type (datalong = %u) in SCRIPT_COMMAND_TALK for script id %u",
|
||||||
tableName.c_str(),tmp.datalong,tmp.id);
|
tableName.c_str(),tmp.datalong,tmp.id);
|
||||||
|
|||||||
@@ -3030,7 +3030,7 @@ void Map::ScriptsProcess()
|
|||||||
switch (step.script->command)
|
switch (step.script->command)
|
||||||
{
|
{
|
||||||
case SCRIPT_COMMAND_TALK:
|
case SCRIPT_COMMAND_TALK:
|
||||||
if (step.script->datalong > CHAT_TYPE_WHISPER)
|
if (step.script->datalong > CHAT_TYPE_WHISPER && step.script->datalong != CHAT_MSG_RAID_BOSS_WHISPER)
|
||||||
{
|
{
|
||||||
sLog.outError("%s invalid chat type (%u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->datalong);
|
sLog.outError("%s invalid chat type (%u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->datalong);
|
||||||
break;
|
break;
|
||||||
@@ -3096,6 +3096,14 @@ void Map::ScriptsProcess()
|
|||||||
}
|
}
|
||||||
cSource->Whisper(step.script->dataint, targetGUID);
|
cSource->Whisper(step.script->dataint, targetGUID);
|
||||||
break;
|
break;
|
||||||
|
case CHAT_MSG_RAID_BOSS_WHISPER: //42
|
||||||
|
if (!targetGUID || !IS_PLAYER_GUID(targetGUID))
|
||||||
|
{
|
||||||
|
sLog.outError("%s attempt to raidbosswhisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
cSource->MonsterWhisper(step.script->dataint, targetGUID, true);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break; // must be already checked at load
|
break; // must be already checked at load
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user