aboutsummaryrefslogtreecommitdiff
path: root/src/server/shared/Database
diff options
context:
space:
mode:
authorRat <none@none>2010-10-27 21:01:47 +0200
committerRat <none@none>2010-10-27 21:01:47 +0200
commit5cb119e617195bfe4ddb35ce377201e0d01807fb (patch)
treeaa8a528ec76b9b28081714dbdb769ccbdfa22556 /src/server/shared/Database
parentc9fba03da9b095ee1b76329af4db90ce18b31598 (diff)
Core/AI: implemented SmartScripts System (still beta) not 100% complete
WARNING: Use scripts at own risk. You were warned. NOTE0: creature, gameobject, areatrigger type scripts should be fully functional NOTE1: has no effect on any core related stuff if not using any SmartScript NOTE2: all event/action/etc descriptions can be found in SmartScriptMgr.h SmartScripts is a reloadable DB-Sript system, with full control for special scripting, like escorting, following, complex combat handling, pre-stored AI templates(caster, turret, etc) and much more with a total of 66 events, 78 actions, 22 target types, and can be easily extended --HG-- branch : trunk
Diffstat (limited to 'src/server/shared/Database')
-rwxr-xr-xsrc/server/shared/Database/Implementation/WorldDatabase.cpp2
-rwxr-xr-xsrc/server/shared/Database/Implementation/WorldDatabase.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/server/shared/Database/Implementation/WorldDatabase.cpp b/src/server/shared/Database/Implementation/WorldDatabase.cpp
index b24e674c39c..fba8dfa0428 100755
--- a/src/server/shared/Database/Implementation/WorldDatabase.cpp
+++ b/src/server/shared/Database/Implementation/WorldDatabase.cpp
@@ -36,6 +36,8 @@ bool WorldDatabaseConnection::Open()
PrepareStatement(WORLD_REP_CRELINKED_RESPAWN, "REPLACE INTO creature_linked_respawn (guid,linkedGuid) VALUES (?, ?)");
PrepareStatement(WORLD_DEL_GAMEOBJECT_RESPAWN_TIMES, "DELETE FROM gameobject_respawn WHERE respawntime <= UNIX_TIMESTAMP(NOW())");
PrepareStatement(WORLD_LOAD_CRETEXT, "SELECT entry, groupid, id, text, type, language, probability, emote, duration, sound FROM creature_text");
+ PrepareStatement(WORLD_LOAD_SMART_SCRIPTS, "SELECT entryorguid, source_type, id, link, event_type, event_phase_mask, event_chance, event_flags, event_param1, event_param2, event_param3, event_param4, action_type, action_param1, action_param2, action_param3, action_param4, action_param5, action_param6, target_type, target_param1, target_param2, target_param3, target_x, target_y, target_z, target_o FROM smart_scripts");
+ PrepareStatement(WORLD_LOAD_SMARTAI_WP, "SELECT entry, pointid, position_x, position_y, position_z FROM waypoints ORDER BY entry, pointid");
return true;
}
diff --git a/src/server/shared/Database/Implementation/WorldDatabase.h b/src/server/shared/Database/Implementation/WorldDatabase.h
index a8d4550d20e..1995b8e6301 100755
--- a/src/server/shared/Database/Implementation/WorldDatabase.h
+++ b/src/server/shared/Database/Implementation/WorldDatabase.h
@@ -49,6 +49,8 @@ enum WorldDatabaseStatements
WORLD_REP_CRELINKED_RESPAWN,
WORLD_DEL_GAMEOBJECT_RESPAWN_TIMES,
WORLD_LOAD_CRETEXT,
+ WORLD_LOAD_SMART_SCRIPTS,
+ WORLD_LOAD_SMARTAI_WP,
MAX_WORLDDATABASE_STATEMENTS,
};