aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Scripting/ScriptMgr.h
diff options
context:
space:
mode:
authorXTZGZoReX <none@none>2010-08-09 16:07:03 -0500
committerXTZGZoReX <none@none>2010-08-09 16:07:03 -0500
commitcecb8117d5aeeb42cda8657a0c6f8cf9caf74947 (patch)
tree32496901bbac9e0f5315851382977e9ddfbb1c37 /src/server/game/Scripting/ScriptMgr.h
parent5709c8be0d88a134a25ca28d1cc77203d7666799 (diff)
Aaand, finally, scripting is working. Thanks to Derex for helping with debugging/suggestions.
--HG-- branch : trunk
Diffstat (limited to 'src/server/game/Scripting/ScriptMgr.h')
-rw-r--r--src/server/game/Scripting/ScriptMgr.h15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h
index c98a1574d9d..cf583a68532 100644
--- a/src/server/game/Scripting/ScriptMgr.h
+++ b/src/server/game/Scripting/ScriptMgr.h
@@ -145,13 +145,6 @@ class ScriptObject
public:
- // Called when the script is initialized. Use it to initialize any properties of the script. Do not use
- // the constructor for this.
- virtual void OnInitialize() { }
-
- // Called when the script is deleted. Use it to free memory, etc. Do not use the destructor for this.
- virtual void OnTeardown() { }
-
// Do not override this in scripts; it should be overridden by the various script type classes. It indicates
// whether or not this script type must be assigned in the database.
virtual bool IsDatabaseBound() const { return false; }
@@ -163,14 +156,10 @@ class ScriptObject
ScriptObject(const char* name)
: _name(std::string(name))
{
- // Allow the script to do startup routines.
- OnInitialize();
}
virtual ~ScriptObject()
{
- // Allow the script to do cleanup routines.
- OnTeardown();
}
private:
@@ -902,7 +891,7 @@ class ScriptMgr
sLog.outError("Script '%s' already assigned with the same script name, so the script can't work.",
script->GetName().c_str());
- delete script;
+ ASSERT(false); // Error that should be fixed ASAP.
}
}
else
@@ -911,8 +900,6 @@ class ScriptMgr
if (script->GetName().find("example") == std::string::npos)
sLog.outErrorDb("Script named '%s' does not have a script name assigned in database.",
script->GetName().c_str());
-
- delete script;
}
}
else