aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Scripting
diff options
context:
space:
mode:
authorVincent_Michael <Vincent_Michael@gmx.de>2013-12-20 17:39:13 +0100
committerVincent_Michael <Vincent_Michael@gmx.de>2013-12-20 17:39:13 +0100
commit8658b5338c905c79daf50cb56dbe739f82d25acc (patch)
treeebb2c18b6d9618ac9fef1d2c5f8b335f34d3702c /src/server/game/Scripting
parent59fd1a164fc38ddd282707b3221dcd64af284166 (diff)
parent9ac96fd702d8ed23491d13eda2238312120cf52f (diff)
Merge branch 'master' of github.com:TrinityCore/TrinityCore into mmaps_rw
Conflicts: src/server/collision/Management/MMapManager.cpp src/server/game/Maps/Map.cpp src/server/game/Movement/PathGenerator.cpp
Diffstat (limited to 'src/server/game/Scripting')
-rw-r--r--src/server/game/Scripting/MapScripts.cpp106
-rw-r--r--src/server/game/Scripting/ScriptLoader.cpp78
-rw-r--r--src/server/game/Scripting/ScriptMgr.cpp16
-rw-r--r--src/server/game/Scripting/ScriptMgr.h2
-rw-r--r--src/server/game/Scripting/ScriptSystem.cpp10
5 files changed, 126 insertions, 86 deletions
diff --git a/src/server/game/Scripting/MapScripts.cpp b/src/server/game/Scripting/MapScripts.cpp
index ff133272724..41c18b850a1 100644
--- a/src/server/game/Scripting/MapScripts.cpp
+++ b/src/server/game/Scripting/MapScripts.cpp
@@ -103,7 +103,7 @@ inline Player* Map::_GetScriptPlayerSourceOrTarget(Object* source, Object* targe
{
Player* player = NULL;
if (!source && !target)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s source and target objects are NULL.", scriptInfo->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s source and target objects are NULL.", scriptInfo->GetDebugInfo().c_str());
else
{
// Check target first, then source.
@@ -113,7 +113,7 @@ inline Player* Map::_GetScriptPlayerSourceOrTarget(Object* source, Object* targe
player = source->ToPlayer();
if (!player)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s neither source nor target object is player (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.",
+ TC_LOG_ERROR("scripts", "%s neither source nor target object is player (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.",
scriptInfo->GetDebugInfo().c_str(),
source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, source ? source->GetGUIDLow() : 0,
target ? target->GetTypeId() : 0, target ? target->GetEntry() : 0, target ? target->GetGUIDLow() : 0);
@@ -125,7 +125,7 @@ inline Creature* Map::_GetScriptCreatureSourceOrTarget(Object* source, Object* t
{
Creature* creature = NULL;
if (!source && !target)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s source and target objects are NULL.", scriptInfo->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s source and target objects are NULL.", scriptInfo->GetDebugInfo().c_str());
else
{
if (bReverse)
@@ -146,7 +146,7 @@ inline Creature* Map::_GetScriptCreatureSourceOrTarget(Object* source, Object* t
}
if (!creature)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s neither source nor target are creatures (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.",
+ TC_LOG_ERROR("scripts", "%s neither source nor target are creatures (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.",
scriptInfo->GetDebugInfo().c_str(),
source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, source ? source->GetGUIDLow() : 0,
target ? target->GetTypeId() : 0, target ? target->GetEntry() : 0, target ? target->GetGUIDLow() : 0);
@@ -158,15 +158,15 @@ inline Unit* Map::_GetScriptUnit(Object* obj, bool isSource, const ScriptInfo* s
{
Unit* unit = NULL;
if (!obj)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
+ TC_LOG_ERROR("scripts", "%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
else if (!obj->isType(TYPEMASK_UNIT))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s %s object is not unit (TypeId: %u, Entry: %u, GUID: %u), skipping.",
+ TC_LOG_ERROR("scripts", "%s %s object is not unit (TypeId: %u, Entry: %u, GUID: %u), skipping.",
scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetTypeId(), obj->GetEntry(), obj->GetGUIDLow());
else
{
unit = obj->ToUnit();
if (!unit)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s %s object could not be casted to unit.",
+ TC_LOG_ERROR("scripts", "%s %s object could not be casted to unit.",
scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
}
return unit;
@@ -176,12 +176,12 @@ inline Player* Map::_GetScriptPlayer(Object* obj, bool isSource, const ScriptInf
{
Player* player = NULL;
if (!obj)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
+ TC_LOG_ERROR("scripts", "%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
else
{
player = obj->ToPlayer();
if (!player)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s %s object is not a player (TypeId: %u, Entry: %u, GUID: %u).",
+ TC_LOG_ERROR("scripts", "%s %s object is not a player (TypeId: %u, Entry: %u, GUID: %u).",
scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetTypeId(), obj->GetEntry(), obj->GetGUIDLow());
}
return player;
@@ -191,12 +191,12 @@ inline Creature* Map::_GetScriptCreature(Object* obj, bool isSource, const Scrip
{
Creature* creature = NULL;
if (!obj)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
+ TC_LOG_ERROR("scripts", "%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
else
{
creature = obj->ToCreature();
if (!creature)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s %s object is not a creature (TypeId: %u, Entry: %u, GUID: %u).", scriptInfo->GetDebugInfo().c_str(),
+ TC_LOG_ERROR("scripts", "%s %s object is not a creature (TypeId: %u, Entry: %u, GUID: %u).", scriptInfo->GetDebugInfo().c_str(),
isSource ? "source" : "target", obj->GetTypeId(), obj->GetEntry(), obj->GetGUIDLow());
}
return creature;
@@ -206,13 +206,13 @@ inline WorldObject* Map::_GetScriptWorldObject(Object* obj, bool isSource, const
{
WorldObject* pWorldObject = NULL;
if (!obj)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s %s object is NULL.",
+ TC_LOG_ERROR("scripts", "%s %s object is NULL.",
scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
else
{
pWorldObject = dynamic_cast<WorldObject*>(obj);
if (!pWorldObject)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s %s object is not a world object (TypeId: %u, Entry: %u, GUID: %u).",
+ TC_LOG_ERROR("scripts", "%s %s object is not a world object (TypeId: %u, Entry: %u, GUID: %u).",
scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetTypeId(), obj->GetEntry(), obj->GetGUIDLow());
}
return pWorldObject;
@@ -228,29 +228,29 @@ inline void Map::_ScriptProcessDoor(Object* source, Object* target, const Script
case SCRIPT_COMMAND_OPEN_DOOR: bOpen = true; break;
case SCRIPT_COMMAND_CLOSE_DOOR: break;
default:
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s unknown command for _ScriptProcessDoor.", scriptInfo->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s unknown command for _ScriptProcessDoor.", scriptInfo->GetDebugInfo().c_str());
return;
}
if (!guid)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s door guid is not specified.", scriptInfo->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s door guid is not specified.", scriptInfo->GetDebugInfo().c_str());
else if (!source)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s source object is NULL.", scriptInfo->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s source object is NULL.", scriptInfo->GetDebugInfo().c_str());
else if (!source->isType(TYPEMASK_UNIT))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s source object is not unit (TypeId: %u, Entry: %u, GUID: %u), skipping.", scriptInfo->GetDebugInfo().c_str(),
+ TC_LOG_ERROR("scripts", "%s source object is not unit (TypeId: %u, Entry: %u, GUID: %u), skipping.", scriptInfo->GetDebugInfo().c_str(),
source->GetTypeId(), source->GetEntry(), source->GetGUIDLow());
else
{
WorldObject* wSource = dynamic_cast <WorldObject*> (source);
if (!wSource)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s source object could not be casted to world object (TypeId: %u, Entry: %u, GUID: %u), skipping.",
+ TC_LOG_ERROR("scripts", "%s source object could not be casted to world object (TypeId: %u, Entry: %u, GUID: %u), skipping.",
scriptInfo->GetDebugInfo().c_str(), source->GetTypeId(), source->GetEntry(), source->GetGUIDLow());
else
{
GameObject* pDoor = _FindGameObject(wSource, guid);
if (!pDoor)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s gameobject was not found (guid: %u).", scriptInfo->GetDebugInfo().c_str(), guid);
+ TC_LOG_ERROR("scripts", "%s gameobject was not found (guid: %u).", scriptInfo->GetDebugInfo().c_str(), guid);
else if (pDoor->GetGoType() != GAMEOBJECT_TYPE_DOOR)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s gameobject is not a door (GoType: %u, Entry: %u, GUID: %u).",
+ TC_LOG_ERROR("scripts", "%s gameobject is not a door (GoType: %u, Entry: %u, GUID: %u).",
scriptInfo->GetDebugInfo().c_str(), pDoor->GetGoType(), pDoor->GetEntry(), pDoor->GetGUIDLow());
else if (bOpen == (pDoor->GetGoState() == GO_STATE_READY))
{
@@ -329,7 +329,7 @@ void Map::ScriptsProcess()
break;
}
default:
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s source with unsupported high guid (GUID: " UI64FMTD ", high guid: %u).",
+ TC_LOG_ERROR("scripts", "%s source with unsupported high guid (GUID: " UI64FMTD ", high guid: %u).",
step.script->GetDebugInfo().c_str(), step.sourceGUID, GUID_HIPART(step.sourceGUID));
break;
}
@@ -364,7 +364,7 @@ void Map::ScriptsProcess()
break;
}
default:
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s target with unsupported high guid (GUID: " UI64FMTD ", high guid: %u).",
+ TC_LOG_ERROR("scripts", "%s target with unsupported high guid (GUID: " UI64FMTD ", high guid: %u).",
step.script->GetDebugInfo().c_str(), step.targetGUID, GUID_HIPART(step.targetGUID));
break;
}
@@ -375,7 +375,7 @@ void Map::ScriptsProcess()
case SCRIPT_COMMAND_TALK:
if (step.script->Talk.ChatType > CHAT_TYPE_WHISPER && step.script->Talk.ChatType != CHAT_MSG_RAID_BOSS_WHISPER)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s invalid chat type (%u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->Talk.ChatType);
+ TC_LOG_ERROR("scripts", "%s invalid chat type (%u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->Talk.ChatType);
break;
}
if (step.script->Talk.Flags & SF_TALK_USE_PLAYER)
@@ -402,7 +402,7 @@ void Map::ScriptsProcess()
{
uint64 targetGUID = target ? target->GetGUID() : 0;
if (!targetGUID || !IS_PLAYER_GUID(targetGUID))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s attempt to whisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s attempt to whisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str());
else
player->Whisper(text, LANG_UNIVERSAL, targetGUID);
break;
@@ -434,13 +434,13 @@ void Map::ScriptsProcess()
break;
case CHAT_TYPE_WHISPER:
if (!targetGUID || !IS_PLAYER_GUID(targetGUID))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s attempt to whisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s attempt to whisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str());
else
cSource->Whisper(step.script->Talk.TextID, targetGUID);
break;
case CHAT_MSG_RAID_BOSS_WHISPER:
if (!targetGUID || !IS_PLAYER_GUID(targetGUID))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s attempt to raidbosswhisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s attempt to raidbosswhisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str());
else
cSource->MonsterWhisper(step.script->Talk.TextID, targetGUID, true);
break;
@@ -468,7 +468,7 @@ void Map::ScriptsProcess()
{
// Validate field number.
if (step.script->FieldSet.FieldID <= OBJECT_FIELD_ENTRY || step.script->FieldSet.FieldID >= cSource->GetValuesCount())
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.",
+ TC_LOG_ERROR("scripts", "%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.",
step.script->GetDebugInfo().c_str(), step.script->FieldSet.FieldID,
cSource->GetValuesCount(), cSource->GetTypeId(), cSource->GetEntry(), cSource->GetGUIDLow());
else
@@ -497,9 +497,9 @@ void Map::ScriptsProcess()
{
// Validate field number.
if (step.script->FlagToggle.FieldID <= OBJECT_FIELD_ENTRY || step.script->FlagToggle.FieldID >= cSource->GetValuesCount())
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.",
+ TC_LOG_ERROR("scripts", "%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.",
step.script->GetDebugInfo().c_str(), step.script->FlagToggle.FieldID,
- source->GetValuesCount(), source->GetTypeId(), source->GetEntry(), source->GetGUIDLow());
+ cSource->GetValuesCount(), cSource->GetTypeId(), cSource->GetEntry(), cSource->GetGUIDLow());
else
cSource->SetFlag(step.script->FlagToggle.FieldID, step.script->FlagToggle.FieldValue);
}
@@ -511,9 +511,9 @@ void Map::ScriptsProcess()
{
// Validate field number.
if (step.script->FlagToggle.FieldID <= OBJECT_FIELD_ENTRY || step.script->FlagToggle.FieldID >= cSource->GetValuesCount())
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.",
+ TC_LOG_ERROR("scripts", "%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.",
step.script->GetDebugInfo().c_str(), step.script->FlagToggle.FieldID,
- source->GetValuesCount(), source->GetTypeId(), source->GetEntry(), source->GetGUIDLow());
+ cSource->GetValuesCount(), cSource->GetTypeId(), cSource->GetEntry(), cSource->GetGUIDLow());
else
cSource->RemoveFlag(step.script->FlagToggle.FieldID, step.script->FlagToggle.FieldValue);
}
@@ -538,12 +538,12 @@ void Map::ScriptsProcess()
{
if (!source)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s source object is NULL.", step.script->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s source object is NULL.", step.script->GetDebugInfo().c_str());
break;
}
if (!target)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s target object is NULL.", step.script->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s target object is NULL.", step.script->GetDebugInfo().c_str());
break;
}
@@ -554,7 +554,7 @@ void Map::ScriptsProcess()
{
if (source->GetTypeId() != TYPEID_UNIT && source->GetTypeId() != TYPEID_GAMEOBJECT && source->GetTypeId() != TYPEID_PLAYER)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s source is not unit, gameobject or player (TypeId: %u, Entry: %u, GUID: %u), skipping.",
+ TC_LOG_ERROR("scripts", "%s source is not unit, gameobject or player (TypeId: %u, Entry: %u, GUID: %u), skipping.",
step.script->GetDebugInfo().c_str(), source->GetTypeId(), source->GetEntry(), source->GetGUIDLow());
break;
}
@@ -567,7 +567,7 @@ void Map::ScriptsProcess()
{
if (target->GetTypeId() != TYPEID_UNIT && target->GetTypeId() != TYPEID_GAMEOBJECT && target->GetTypeId() != TYPEID_PLAYER)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s target is not unit, gameobject or player (TypeId: %u, Entry: %u, GUID: %u), skipping.",
+ TC_LOG_ERROR("scripts", "%s target is not unit, gameobject or player (TypeId: %u, Entry: %u, GUID: %u), skipping.",
step.script->GetDebugInfo().c_str(), target->GetTypeId(), target->GetEntry(), target->GetGUIDLow());
break;
}
@@ -575,7 +575,7 @@ void Map::ScriptsProcess()
}
else
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s neither source nor target is player (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.",
+ TC_LOG_ERROR("scripts", "%s neither source nor target is player (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.",
step.script->GetDebugInfo().c_str(), source->GetTypeId(), source->GetEntry(), source->GetGUIDLow(),
target->GetTypeId(), target->GetEntry(), target->GetGUIDLow());
break;
@@ -606,7 +606,7 @@ void Map::ScriptsProcess()
case SCRIPT_COMMAND_RESPAWN_GAMEOBJECT:
if (!step.script->RespawnGameobject.GOGuid)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s gameobject guid (datalong) is not specified.", step.script->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s gameobject guid (datalong) is not specified.", step.script->GetDebugInfo().c_str());
break;
}
@@ -616,7 +616,7 @@ void Map::ScriptsProcess()
GameObject* pGO = _FindGameObject(pSummoner, step.script->RespawnGameobject.GOGuid);
if (!pGO)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s gameobject was not found (guid: %u).", step.script->GetDebugInfo().c_str(), step.script->RespawnGameobject.GOGuid);
+ TC_LOG_ERROR("scripts", "%s gameobject was not found (guid: %u).", step.script->GetDebugInfo().c_str(), step.script->RespawnGameobject.GOGuid);
break;
}
@@ -625,7 +625,7 @@ void Map::ScriptsProcess()
pGO->GetGoType() == GAMEOBJECT_TYPE_BUTTON ||
pGO->GetGoType() == GAMEOBJECT_TYPE_TRAP)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s can not be used with gameobject of type %u (guid: %u).",
+ TC_LOG_ERROR("scripts", "%s can not be used with gameobject of type %u (guid: %u).",
step.script->GetDebugInfo().c_str(), uint32(pGO->GetGoType()), step.script->RespawnGameobject.GOGuid);
break;
}
@@ -648,7 +648,7 @@ void Map::ScriptsProcess()
if (WorldObject* pSummoner = _GetScriptWorldObject(source, true, step.script))
{
if (!step.script->TempSummonCreature.CreatureEntry)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s creature entry (datalong) is not specified.", step.script->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s creature entry (datalong) is not specified.", step.script->GetDebugInfo().c_str());
else
{
float x = step.script->TempSummonCreature.PosX;
@@ -657,7 +657,7 @@ void Map::ScriptsProcess()
float o = step.script->TempSummonCreature.Orientation;
if (!pSummoner->SummonCreature(step.script->TempSummonCreature.CreatureEntry, x, y, z, o, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, step.script->TempSummonCreature.DespawnDelay))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s creature was not spawned (entry: %u).", step.script->GetDebugInfo().c_str(), step.script->TempSummonCreature.CreatureEntry);
+ TC_LOG_ERROR("scripts", "%s creature was not spawned (entry: %u).", step.script->GetDebugInfo().c_str(), step.script->TempSummonCreature.CreatureEntry);
}
}
break;
@@ -675,13 +675,13 @@ void Map::ScriptsProcess()
// Target must be GameObject.
if (!target)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s target object is NULL.", step.script->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s target object is NULL.", step.script->GetDebugInfo().c_str());
break;
}
if (target->GetTypeId() != TYPEID_GAMEOBJECT)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s target object is not gameobject (TypeId: %u, Entry: %u, GUID: %u), skipping.",
+ TC_LOG_ERROR("scripts", "%s target object is not gameobject (TypeId: %u, Entry: %u, GUID: %u), skipping.",
step.script->GetDebugInfo().c_str(), target->GetTypeId(), target->GetEntry(), target->GetGUIDLow());
break;
}
@@ -705,7 +705,7 @@ void Map::ScriptsProcess()
/// @todo Allow gameobjects to be targets and casters
if (!source && !target)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s source and target objects are NULL.", step.script->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s source and target objects are NULL.", step.script->GetDebugInfo().c_str());
break;
}
@@ -738,13 +738,13 @@ void Map::ScriptsProcess()
if (!uSource || !uSource->isType(TYPEMASK_UNIT))
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s no source unit found for spell %u", step.script->GetDebugInfo().c_str(), step.script->CastSpell.SpellID);
+ TC_LOG_ERROR("scripts", "%s no source unit found for spell %u", step.script->GetDebugInfo().c_str(), step.script->CastSpell.SpellID);
break;
}
if (!uTarget || !uTarget->isType(TYPEMASK_UNIT))
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s no target unit found for spell %u", step.script->GetDebugInfo().c_str(), step.script->CastSpell.SpellID);
+ TC_LOG_ERROR("scripts", "%s no target unit found for spell %u", step.script->GetDebugInfo().c_str(), step.script->CastSpell.SpellID);
break;
}
@@ -804,7 +804,7 @@ void Map::ScriptsProcess()
if (Unit* unit = _GetScriptUnit(source, true, step.script))
{
if (!sWaypointMgr->GetPath(step.script->LoadPath.PathID))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s source object has an invalid path (%u), skipping.", step.script->GetDebugInfo().c_str(), step.script->LoadPath.PathID);
+ TC_LOG_ERROR("scripts", "%s source object has an invalid path (%u), skipping.", step.script->GetDebugInfo().c_str(), step.script->LoadPath.PathID);
else
unit->GetMotionMaster()->MovePath(step.script->LoadPath.PathID, step.script->LoadPath.IsRepeatable);
}
@@ -814,12 +814,12 @@ void Map::ScriptsProcess()
{
if (!step.script->CallScript.CreatureEntry)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s creature entry is not specified, skipping.", step.script->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s creature entry is not specified, skipping.", step.script->GetDebugInfo().c_str());
break;
}
if (!step.script->CallScript.ScriptID)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s script id is not specified, skipping.", step.script->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s script id is not specified, skipping.", step.script->GetDebugInfo().c_str());
break;
}
@@ -845,7 +845,7 @@ void Map::ScriptsProcess()
if (!cTarget)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s target was not found (entry: %u)", step.script->GetDebugInfo().c_str(), step.script->CallScript.CreatureEntry);
+ TC_LOG_ERROR("scripts", "%s target was not found (entry: %u)", step.script->GetDebugInfo().c_str(), step.script->CallScript.CreatureEntry);
break;
}
@@ -854,7 +854,7 @@ void Map::ScriptsProcess()
//if no scriptmap present...
if (!datamap)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s unknown scriptmap (%u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->CallScript.ScriptType);
+ TC_LOG_ERROR("scripts", "%s unknown scriptmap (%u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->CallScript.ScriptType);
break;
}
@@ -868,7 +868,7 @@ void Map::ScriptsProcess()
if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script))
{
if (cSource->isDead())
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s creature is already dead (Entry: %u, GUID: %u)",
+ TC_LOG_ERROR("scripts", "%s creature is already dead (Entry: %u, GUID: %u)",
step.script->GetDebugInfo().c_str(), cSource->GetEntry(), cSource->GetGUIDLow());
else
{
@@ -922,7 +922,7 @@ void Map::ScriptsProcess()
break;
default:
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Unknown script command %s.", step.script->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "Unknown script command %s.", step.script->GetDebugInfo().c_str());
break;
}
diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp
index 31323a66ba9..3b340f8d147 100644
--- a/src/server/game/Scripting/ScriptLoader.cpp
+++ b/src/server/game/Scripting/ScriptLoader.cpp
@@ -272,7 +272,6 @@ void AddSC_ironforge();
void AddSC_isle_of_queldanas();
void AddSC_loch_modan();
void AddSC_redridge_mountains();
-void AddSC_silvermoon_city();
void AddSC_silverpine_forest();
void AddSC_stormwind_city();
void AddSC_stranglethorn_vale();
@@ -322,7 +321,10 @@ void AddSC_boss_ptheradras();
void AddSC_instance_maraudon();
void AddSC_boss_onyxia(); //Onyxia's Lair
void AddSC_instance_onyxias_lair();
-void AddSC_boss_amnennar_the_coldbringer(); //Razorfen Downs
+void AddSC_boss_tuten_kash(); //Razorfen Downs
+void AddSC_boss_mordresh_fire_eye();
+void AddSC_boss_glutton();
+void AddSC_boss_amnennar_the_coldbringer();
void AddSC_razorfen_downs();
void AddSC_instance_razorfen_downs();
void AddSC_razorfen_kraul(); //Razorfen Kraul
@@ -447,6 +449,7 @@ void AddSC_oculus();
void AddSC_boss_malygos(); // The Nexus: Eye of Eternity
void AddSC_instance_eye_of_eternity();
void AddSC_boss_sartharion(); //Obsidian Sanctum
+void AddSC_obsidian_sanctum();
void AddSC_instance_obsidian_sanctum();
void AddSC_boss_bjarngrim(); //Ulduar Halls of Lightning
void AddSC_boss_loken();
@@ -576,7 +579,8 @@ void AddSC_boss_grandmaster_vorpil();
void AddSC_boss_murmur();
void AddSC_instance_shadow_labyrinth();
-void AddSC_black_temple(); //Black Temple
+// Black Temple
+void AddSC_black_temple();
void AddSC_boss_illidan();
void AddSC_boss_shade_of_akama();
void AddSC_boss_supremus();
@@ -587,22 +591,35 @@ void AddSC_boss_teron_gorefiend();
void AddSC_boss_najentus();
void AddSC_boss_illidari_council();
void AddSC_instance_black_temple();
-void AddSC_boss_fathomlord_karathress(); //CR Serpent Shrine Cavern
+
+// Coilfang Reservoir - Serpent Shrine Cavern
+void AddSC_boss_fathomlord_karathress();
void AddSC_boss_hydross_the_unstable();
void AddSC_boss_lady_vashj();
void AddSC_boss_leotheras_the_blind();
void AddSC_boss_morogrim_tidewalker();
void AddSC_instance_serpentshrine_cavern();
void AddSC_boss_the_lurker_below();
-void AddSC_boss_hydromancer_thespia(); //CR Steam Vault
+
+// Coilfang Reservoir - The Steam Vault
+void AddSC_boss_hydromancer_thespia();
void AddSC_boss_mekgineer_steamrigger();
void AddSC_boss_warlord_kalithresh();
void AddSC_instance_steam_vault();
-void AddSC_instance_the_slave_pens(); //The Slave Pens
-void AddSC_boss_hungarfen(); //CR Underbog
-void AddSC_boss_the_black_stalker();
+
+// Coilfang Reservoir - The Slave Pens
+void AddSC_instance_the_slave_pens();
+void AddSC_boss_mennu_the_betrayer();
+void AddSC_boss_rokmar_the_crackler();
+void AddSC_boss_quagmirran();
+
+// Coilfang Reservoir - The Underbog
void AddSC_instance_the_underbog();
-void AddSC_boss_gruul(); //Gruul's Lair
+void AddSC_boss_hungarfen();
+void AddSC_boss_the_black_stalker();
+
+// Gruul's Lair
+void AddSC_boss_gruul();
void AddSC_boss_high_king_maulgar();
void AddSC_instance_gruuls_lair();
void AddSC_boss_broggok(); //HC Blood Furnace
@@ -620,6 +637,9 @@ void AddSC_boss_omor_the_unscarred();
void AddSC_boss_vazruden_the_herald();
void AddSC_instance_ramparts();
void AddSC_arcatraz(); //TK Arcatraz
+void AddSC_boss_zereketh_the_unbound();
+void AddSC_boss_dalliah_the_doomsayer();
+void AddSC_boss_wrath_scryer_soccothrates();
void AddSC_boss_harbinger_skyriss();
void AddSC_instance_arcatraz();
void AddSC_boss_high_botanist_freywinn(); //TK Botanica
@@ -963,7 +983,6 @@ void AddEasternKingdomsScripts()
AddSC_isle_of_queldanas();
AddSC_loch_modan();
AddSC_redridge_mountains();
- AddSC_silvermoon_city();
AddSC_silverpine_forest();
AddSC_stormwind_city();
AddSC_stranglethorn_vale();
@@ -1017,7 +1036,10 @@ void AddKalimdorScripts()
AddSC_instance_maraudon();
AddSC_boss_onyxia(); //Onyxia's Lair
AddSC_instance_onyxias_lair();
- AddSC_boss_amnennar_the_coldbringer(); //Razorfen Downs
+ AddSC_boss_tuten_kash(); //Razorfen Downs
+ AddSC_boss_mordresh_fire_eye();
+ AddSC_boss_glutton();
+ AddSC_boss_amnennar_the_coldbringer();
AddSC_razorfen_downs();
AddSC_instance_razorfen_downs();
AddSC_razorfen_kraul(); //Razorfen Kraul
@@ -1098,7 +1120,8 @@ void AddOutlandScripts()
AddSC_boss_murmur();
AddSC_instance_shadow_labyrinth();
- AddSC_black_temple(); //Black Temple
+ // Black Temple
+ AddSC_black_temple();
AddSC_boss_illidan();
AddSC_boss_shade_of_akama();
AddSC_boss_supremus();
@@ -1109,22 +1132,35 @@ void AddOutlandScripts()
AddSC_boss_najentus();
AddSC_boss_illidari_council();
AddSC_instance_black_temple();
- AddSC_boss_fathomlord_karathress(); //CR Serpent Shrine Cavern
+
+ // Coilfang Reservoir - Serpent Shrine Cavern
+ AddSC_boss_fathomlord_karathress();
AddSC_boss_hydross_the_unstable();
AddSC_boss_lady_vashj();
AddSC_boss_leotheras_the_blind();
AddSC_boss_morogrim_tidewalker();
AddSC_instance_serpentshrine_cavern();
AddSC_boss_the_lurker_below();
- AddSC_boss_hydromancer_thespia(); //CR Steam Vault
+
+ // Coilfang Reservoir - The Steam Vault
+ AddSC_instance_steam_vault();
+ AddSC_boss_hydromancer_thespia();
AddSC_boss_mekgineer_steamrigger();
AddSC_boss_warlord_kalithresh();
- AddSC_instance_steam_vault();
- AddSC_instance_the_slave_pens(); //The Slave Pens
- AddSC_boss_hungarfen(); //CR Underbog
- AddSC_boss_the_black_stalker();
+
+ // Coilfang Reservoir - The Slave Pens
+ AddSC_instance_the_slave_pens();
+ AddSC_boss_mennu_the_betrayer();
+ AddSC_boss_rokmar_the_crackler();
+ AddSC_boss_quagmirran();
+
+ // Coilfang Reservoir - The Underbog
AddSC_instance_the_underbog();
- AddSC_boss_gruul(); //Gruul's Lair
+ AddSC_boss_hungarfen();
+ AddSC_boss_the_black_stalker();
+
+ // Gruul's Lair
+ AddSC_boss_gruul();
AddSC_boss_high_king_maulgar();
AddSC_instance_gruuls_lair();
AddSC_boss_broggok(); //HC Blood Furnace
@@ -1142,6 +1178,9 @@ void AddOutlandScripts()
AddSC_boss_vazruden_the_herald();
AddSC_instance_ramparts();
AddSC_arcatraz(); //TK Arcatraz
+ AddSC_boss_zereketh_the_unbound();
+ AddSC_boss_dalliah_the_doomsayer();
+ AddSC_boss_wrath_scryer_soccothrates();
AddSC_boss_harbinger_skyriss();
AddSC_instance_arcatraz();
AddSC_boss_high_botanist_freywinn(); //TK Botanica
@@ -1249,6 +1288,7 @@ void AddNorthrendScripts()
AddSC_boss_malygos(); // The Nexus: Eye of Eternity
AddSC_instance_eye_of_eternity();
AddSC_boss_sartharion(); //Obsidian Sanctum
+ AddSC_obsidian_sanctum();
AddSC_instance_obsidian_sanctum();
AddSC_boss_bjarngrim(); //Ulduar Halls of Lightning
AddSC_boss_loken();
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index c74cf1735ff..3674f8fe15e 100644
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -62,7 +62,7 @@ class ScriptRegistry
{
if (it->second == script)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Script '%s' has same memory pointer as '%s'.",
+ TC_LOG_ERROR("scripts", "Script '%s' has same memory pointer as '%s'.",
script->GetName().c_str(), it->second->GetName().c_str());
return;
@@ -98,7 +98,7 @@ class ScriptRegistry
else
{
// If the script is already assigned -> delete it!
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Script '%s' already assigned with the same script name, so the script can't work.",
+ TC_LOG_ERROR("scripts", "Script '%s' already assigned with the same script name, so the script can't work.",
script->GetName().c_str());
ASSERT(false); // Error that should be fixed ASAP.
@@ -108,7 +108,7 @@ class ScriptRegistry
{
// The script uses a script name from database, but isn't assigned to anything.
if (script->GetName().find("example") == std::string::npos && script->GetName().find("Smart") == std::string::npos)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Script named '%s' does not have a script name assigned in database.",
+ TC_LOG_ERROR("sql.sql", "Script named '%s' does not have a script name assigned in database.",
script->GetName().c_str());
// These scripts don't get stored anywhere so throw them into this to avoid leaking memory
@@ -186,12 +186,12 @@ void ScriptMgr::Initialize()
LoadDatabase();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading C++ scripts");
+ TC_LOG_INFO("server.loading", "Loading C++ scripts");
FillSpellSummary();
AddScripts();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
}
void ScriptMgr::Unload()
@@ -1419,7 +1419,7 @@ WorldMapScript::WorldMapScript(const char* name, uint32 mapId)
: ScriptObject(name), MapScript<Map>(mapId)
{
if (GetEntry() && !GetEntry()->IsWorldMap())
- TC_LOG_ERROR(LOG_FILTER_TSCR, "WorldMapScript for map %u is invalid.", mapId);
+ TC_LOG_ERROR("scripts", "WorldMapScript for map %u is invalid.", mapId);
ScriptRegistry<WorldMapScript>::AddScript(this);
}
@@ -1428,7 +1428,7 @@ InstanceMapScript::InstanceMapScript(const char* name, uint32 mapId)
: ScriptObject(name), MapScript<InstanceMap>(mapId)
{
if (GetEntry() && !GetEntry()->IsDungeon())
- TC_LOG_ERROR(LOG_FILTER_TSCR, "InstanceMapScript for map %u is invalid.", mapId);
+ TC_LOG_ERROR("scripts", "InstanceMapScript for map %u is invalid.", mapId);
ScriptRegistry<InstanceMapScript>::AddScript(this);
}
@@ -1437,7 +1437,7 @@ BattlegroundMapScript::BattlegroundMapScript(const char* name, uint32 mapId)
: ScriptObject(name), MapScript<BattlegroundMap>(mapId)
{
if (GetEntry() && !GetEntry()->IsBattleground())
- TC_LOG_ERROR(LOG_FILTER_TSCR, "BattlegroundMapScript for map %u is invalid.", mapId);
+ TC_LOG_ERROR("scripts", "BattlegroundMapScript for map %u is invalid.", mapId);
ScriptRegistry<BattlegroundMapScript>::AddScript(this);
}
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h
index 37a95c77254..401be45a4e1 100644
--- a/src/server/game/Scripting/ScriptMgr.h
+++ b/src/server/game/Scripting/ScriptMgr.h
@@ -311,7 +311,7 @@ template<class TMap> class MapScript : public UpdatableScript<TMap>
: _mapEntry(sMapStore.LookupEntry(mapId))
{
if (!_mapEntry)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Invalid MapScript for %u; no such map ID.", mapId);
+ TC_LOG_ERROR("scripts", "Invalid MapScript for %u; no such map ID.", mapId);
}
public:
diff --git a/src/server/game/Scripting/ScriptSystem.cpp b/src/server/game/Scripting/ScriptSystem.cpp
index d44eeabd254..921ae7cbda6 100644
--- a/src/server/game/Scripting/ScriptSystem.cpp
+++ b/src/server/game/Scripting/ScriptSystem.cpp
@@ -37,14 +37,14 @@ void SystemMgr::LoadScriptWaypoints()
if (result)
uiCreatureCount = result->GetRowCount();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Script Waypoints for " UI64FMTD " creature(s)...", uiCreatureCount);
+ TC_LOG_INFO("server.loading", "Loading Script Waypoints for " UI64FMTD " creature(s)...", uiCreatureCount);
// 0 1 2 3 4 5
result = WorldDatabase.Query("SELECT entry, pointid, location_x, location_y, location_z, waittime FROM script_waypoint ORDER BY pointid");
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 Script Waypoints. DB table `script_waypoint` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 Script Waypoints. DB table `script_waypoint` is empty.");
return;
}
@@ -67,17 +67,17 @@ void SystemMgr::LoadScriptWaypoints()
if (!pCInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "TSCR: DB table script_waypoint has waypoint for non-existant creature entry %u", temp.uiCreatureEntry);
+ TC_LOG_ERROR("sql.sql", "TSCR: DB table script_waypoint has waypoint for non-existant creature entry %u", temp.uiCreatureEntry);
continue;
}
if (!pCInfo->ScriptID)
- TC_LOG_ERROR(LOG_FILTER_SQL, "TSCR: DB table script_waypoint has waypoint for creature entry %u, but creature does not have ScriptName defined and then useless.", temp.uiCreatureEntry);
+ TC_LOG_ERROR("sql.sql", "TSCR: DB table script_waypoint has waypoint for creature entry %u, but creature does not have ScriptName defined and then useless.", temp.uiCreatureEntry);
m_mPointMoveMap[uiEntry].push_back(temp);
++count;
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u Script Waypoint nodes in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u Script Waypoint nodes in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}