aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Scripting/ScriptMgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Scripting/ScriptMgr.cpp')
-rw-r--r--src/server/game/Scripting/ScriptMgr.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index d2277f3a07a..3f16c503e20 100644
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -301,7 +301,7 @@ void ScriptMgr::CreateSpellScripts(uint32 spell_id, std::list<SpellScript *> & s
if (!script)
{
- sLog.outError("Spell script %s for spell %u returned a NULL SpellScript pointer!", tmpscript->ToString(), spell_id);
+ sLog.outError("Spell script %s for spell %u returned a NULL SpellScript pointer!", tmpscript->GetName().c_str(), spell_id);
continue;
}
@@ -324,7 +324,7 @@ void ScriptMgr::CreateSpellScripts(uint32 spell_id, std::vector<std::pair<SpellS
if (!script)
{
- sLog.outError("Spell script %s for spell %u returned a NULL SpellScript pointer!", tmpscript->ToString(), spell_id);
+ sLog.outError("Spell script %s for spell %u returned a NULL SpellScript pointer!", tmpscript->GetName().c_str(), spell_id);
continue;
}
@@ -462,7 +462,7 @@ void ScriptMgr::OnGroupRateCalculation(float& rate, uint32 count, bool isRaid)
{
#define SCR_MAP_END \
- break; \
+ return; \
} \
} \
}
@@ -1188,7 +1188,7 @@ void ScriptMgr::ScriptRegistry<TScript>::AddScript(TScript* const script)
if (it->second == script)
{
sLog.outError("Script '%s' forgot to allocate memory, so this script and/or the script before that can't work.",
- script->ToString());
+ script->GetName().c_str());
return;
}
@@ -1198,7 +1198,7 @@ void ScriptMgr::ScriptRegistry<TScript>::AddScript(TScript* const script)
{
// Get an ID for the script. An ID only exists if it's a script that is assigned in the database
// through a script name (or similar).
- uint32 id = GetScriptId(script->ToString());
+ uint32 id = GetScriptId(script->GetName().c_str());
if (id)
{
// Try to find an existing script.
@@ -1224,7 +1224,7 @@ void ScriptMgr::ScriptRegistry<TScript>::AddScript(TScript* const script)
{
// If the script is already assigned -> delete it!
sLog.outError("Script '%s' already assigned with the same script name, so the script can't work.",
- script->ToString());
+ script->GetName().c_str());
delete script;
}
@@ -1234,7 +1234,7 @@ void ScriptMgr::ScriptRegistry<TScript>::AddScript(TScript* const script)
// The script uses a script name from database, but isn't assigned to anything.
if (script->GetName().find("example") == std::string::npos)
sLog.outErrorDb("Script named '%s' does not have a script name assigned in database.",
- script->ToString());
+ script->GetName().c_str());
delete script;
}