Core/DB scripts:

* provide more information in error messages for DB scripts
* cleanup in DB scripts code

--HG--
branch : trunk
This commit is contained in:
azazel
2010-08-20 14:57:05 +06:00
parent a470c91bf0
commit 812b6694f9
4 changed files with 195 additions and 128 deletions
+18 -14
View File
@@ -74,20 +74,6 @@ struct GameTele
typedef UNORDERED_MAP<uint32, GameTele > GameTeleMap;
struct ScriptInfo
{
uint32 id;
uint32 delay;
uint32 command;
uint32 datalong;
uint32 datalong2;
int32 dataint;
float x;
float y;
float z;
float o;
};
enum ScriptsType
{
SCRIPTS_FIRST = 1,
@@ -103,6 +89,23 @@ enum ScriptsType
SCRIPTS_LAST
};
struct ScriptInfo
{
uint32 id;
uint32 delay;
ScriptCommands command;
uint32 datalong;
uint32 datalong2;
int32 dataint;
float x;
float y;
float z;
float o;
ScriptsType type;
std::string GetDebugInfo() const;
};
typedef std::multimap<uint32, ScriptInfo> ScriptMap;
typedef std::map<uint32, ScriptMap > ScriptMapMap;
typedef std::multimap<uint32, uint32> SpellScriptsMap;
@@ -117,6 +120,7 @@ extern ScriptMapMap sWaypointScripts;
std::string GetScriptsTableNameByType(ScriptsType type);
ScriptMapMap* GetScriptsMapByType(ScriptsType type);
std::string GetScriptCommandName(ScriptCommands command);
struct SpellClickInfo
{