aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGiacomo Pozzoni <giacomopoz@gmail.com>2020-09-19 23:33:29 +0200
committerShauren <shauren.trinity@gmail.com>2022-02-27 20:08:41 +0100
commita65b3493a7823ba543070c514d54f3c07c417bc1 (patch)
tree5c66df602c726f67fa446eef7a73b8fd3f1f68dd /src
parent60519e947f634f12aa93a1871d53e012ed9e57d2 (diff)
Core/SAI: Add orientation and delay columns to waypoints table (#25472)
* Core/SAI: Add orientation and delay columns to waypoints table * Rename 2020_99_99_99_world.sql to 2020_09_19_00_world.sql (cherry picked from commit 4b7d19c91bde2cabb8498809dee935c7efb2660a)
Diffstat (limited to 'src')
-rw-r--r--src/server/database/Database/Implementation/WorldDatabase.cpp2
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/server/database/Database/Implementation/WorldDatabase.cpp b/src/server/database/Database/Implementation/WorldDatabase.cpp
index f4bb51b5d6c..bcf3df6c980 100644
--- a/src/server/database/Database/Implementation/WorldDatabase.cpp
+++ b/src/server/database/Database/Implementation/WorldDatabase.cpp
@@ -28,7 +28,7 @@ void WorldDatabaseConnection::DoPrepareStatements()
PrepareStatement(WORLD_REP_LINKED_RESPAWN, "REPLACE INTO linked_respawn (guid, linkedGuid, linkType) VALUES (?, ?, ?)", CONNECTION_ASYNC);
PrepareStatement(WORLD_SEL_CREATURE_TEXT, "SELECT CreatureID, GroupID, ID, Text, Type, Language, Probability, Emote, Duration, Sound, SoundPlayType, BroadcastTextId, TextRange FROM creature_text", CONNECTION_SYNCH);
PrepareStatement(WORLD_SEL_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, event_param5, event_param_string, action_type, action_param1, action_param2, action_param3, action_param4, action_param5, action_param6, target_type, target_param1, target_param2, target_param3, target_param4, target_x, target_y, target_z, target_o FROM smart_scripts ORDER BY entryorguid, source_type, id, link", CONNECTION_SYNCH);
- PrepareStatement(WORLD_SEL_SMARTAI_WP, "SELECT entry, pointid, position_x, position_y, position_z FROM waypoints ORDER BY entry, pointid", CONNECTION_SYNCH);
+ PrepareStatement(WORLD_SEL_SMARTAI_WP, "SELECT entry, pointid, position_x, position_y, position_z, orientation, delay FROM waypoints ORDER BY entry, pointid", CONNECTION_SYNCH);
PrepareStatement(WORLD_DEL_GAMEOBJECT, "DELETE FROM gameobject WHERE guid = ?", CONNECTION_ASYNC);
PrepareStatement(WORLD_DEL_EVENT_GAMEOBJECT, "DELETE FROM game_event_gameobject WHERE guid = ?", CONNECTION_ASYNC);
PrepareStatement(WORLD_INS_GRAVEYARD_ZONE, "INSERT INTO graveyard_zone (ID, GhostZone, Faction) VALUES (?, ?, ?)", CONNECTION_ASYNC);
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
index 40a199552a6..3197ca8995b 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
@@ -70,6 +70,8 @@ void SmartWaypointMgr::LoadFromDB()
float x = fields[2].GetFloat();
float y = fields[3].GetFloat();
float z = fields[4].GetFloat();
+ float o = fields[5].GetFloat();
+ uint32 delay = fields[6].GetUInt32();
if (lastEntry != entry)
{
@@ -84,7 +86,7 @@ void SmartWaypointMgr::LoadFromDB()
WaypointPath& path = _waypointStore[entry];
path.id = entry;
- path.nodes.emplace_back(id, x, y, z);
+ path.nodes.emplace_back(id, x, y, z, o, delay);
lastEntry = entry;
++total;