Core/WaypointMgr: Allow to set orientation to waypoints.

- Instead of the need to use a waypoint_script to change orientation on waypoint arrival.
This commit is contained in:
kaelima
2011-10-15 18:38:27 +02:00
parent 83a3da2630
commit 97e5140a1d
5 changed files with 28 additions and 17 deletions
+5 -5
View File
@@ -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;