New script for Rajaxx and Andorov in AQ20.

This commit is contained in:
ratkosrb
2022-11-28 18:40:57 +02:00
parent 4dccd56e28
commit ed8647fa5d
16 changed files with 705 additions and 723 deletions
+4 -3
View File
@@ -750,6 +750,7 @@ void ScriptMgr::LoadScripts(ScriptMapMap& scripts, char const* tablename)
break;
}
case SCRIPT_COMMAND_START_SCRIPT:
case SCRIPT_COMMAND_START_SCRIPT_ON_GROUP:
{
if (100 < (tmp.startScript.chance[0] + tmp.startScript.chance[1] + tmp.startScript.chance[2] + tmp.startScript.chance[3]))
{
@@ -2357,8 +2358,8 @@ void ScriptMgr::CollectPossibleGenericIds(std::set<uint32>& genericIds)
Field* fields;
for (const auto& script_table : script_tables)
{
// From SCRIPT_COMMAND_START_SCRIPT.
std::unique_ptr<QueryResult> result(WorldDatabase.PQuery("SELECT `datalong`, `datalong2`, `datalong3`, `datalong4` FROM `%s` WHERE `command`=39", script_table));
// From SCRIPT_COMMAND_START_SCRIPT and SCRIPT_COMMAND_START_SCRIPT_ON_GROUP.
std::unique_ptr<QueryResult> result(WorldDatabase.PQuery("SELECT `datalong`, `datalong2`, `datalong3`, `datalong4` FROM `%s` WHERE `command` IN (39, 90)", script_table));
if (result)
{
@@ -2589,7 +2590,7 @@ void DoScriptText(int32 textId, WorldObject* pSource, Unit* pTarget, int32 chatT
if (chatType == CHAT_TYPE_ZONE_YELL)
{
if (Map* pZone = pSource->GetMap())
pZone->PlayDirectSoundToMap(soundId);
pZone->PlayDirectSoundToMap(soundId, pZone->IsContinent() ? pSource->GetZoneId() : 0);
}
else
pSource->PlayDirectSound(soundId);