diff options
author | kaelima <kaelima@live.se> | 2011-10-15 18:38:27 +0200 |
---|---|---|
committer | kaelima <kaelima@live.se> | 2011-10-15 18:38:27 +0200 |
commit | 97e5140a1d442608902524e64828ac3a355b062a (patch) | |
tree | a4fab6498fe095ccedb76dc5ea50bfb2fe65ccff /src/server/scripts/Commands | |
parent | 83a3da2630a1f51fafef3fa6c9bdb609ccb55649 (diff) |
Core/WaypointMgr: Allow to set orientation to waypoints.
- Instead of the need to use a waypoint_script to change orientation on waypoint arrival.
Diffstat (limited to 'src/server/scripts/Commands')
-rw-r--r-- | src/server/scripts/Commands/cs_wp.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/scripts/Commands/cs_wp.cpp b/src/server/scripts/Commands/cs_wp.cpp index 75904764f23..c3bfe1a05b9 100644 --- a/src/server/scripts/Commands/cs_wp.cpp +++ b/src/server/scripts/Commands/cs_wp.cpp @@ -858,7 +858,7 @@ public: else Maxpoint = 0; - result = WorldDatabase.PQuery("SELECT position_x, position_y, position_z FROM waypoint_data WHERE point ='%u' AND id = '%u'", Maxpoint, pathid); + result = WorldDatabase.PQuery("SELECT position_x, position_y, position_z, orientation FROM waypoint_data WHERE point ='%u' AND id = '%u'", Maxpoint, pathid); if (!result) { handler->PSendSysMessage(LANG_WAYPOINT_NOTFOUNDLAST, pathid); @@ -866,13 +866,13 @@ public: return false; } Field* fields = result->Fetch(); - float x = fields[0].GetFloat(); - float y = fields[1].GetFloat(); - float z = fields[2].GetFloat(); + float x = fields[0].GetFloat(); + float y = fields[1].GetFloat(); + float z = fields[2].GetFloat(); + float o = fields[3].GetFloat(); uint32 id = VISUAL_WAYPOINT; Player* chr = handler->GetSession()->GetPlayer(); - float o = chr->GetOrientation(); Map* map = chr->GetMap(); Creature* creature = new Creature; |