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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user