aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Commands
diff options
context:
space:
mode:
authorkaelima <kaelima@live.se>2011-10-15 18:38:27 +0200
committerkaelima <kaelima@live.se>2011-10-15 18:38:27 +0200
commit97e5140a1d442608902524e64828ac3a355b062a (patch)
treea4fab6498fe095ccedb76dc5ea50bfb2fe65ccff /src/server/scripts/Commands
parent83a3da2630a1f51fafef3fa6c9bdb609ccb55649 (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.cpp10
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;