[12672] Improve Waypoint Management

* Allow waypoints that have point-ids not from 1 to n
* Remove possibly bad sql-statements to "fix" the above property
* Simplify code a little bit

Remaining TODO: Bring commands up-to-date and also make things more simple instead of using the database to store visual waypoints
This commit is contained in:
Schmoozerd 2013-08-19 16:27:01 +03:00 committed by Antz
parent 5083596e26
commit e269f49f8e
5 changed files with 70 additions and 115 deletions

View file

@ -3635,7 +3635,8 @@ bool ChatHandler::HandleWpShowCommand(char* args)
uint32 model2 = fields[11].GetUInt32();
// Get the creature for which we read the waypoint
Creature* wpCreature = m_session->GetPlayer()->GetMap()->GetCreature(ObjectGuid(HIGHGUID_UNIT, VISUAL_WAYPOINT, wpGuid));
CreatureData const* data = sObjectMgr.GetCreatureData(wpGuid);
Creature* wpCreature = m_session->GetPlayer()->GetMap()->GetCreature(data ? data->GetObjectGuid(wpGuid) : ObjectGuid(HIGHGUID_UNIT, VISUAL_WAYPOINT, wpGuid));
PSendSysMessage(LANG_WAYPOINT_INFO_TITLE, point, (wpCreature ? wpCreature->GetName() : "<not found>"), wpGuid);
PSendSysMessage(LANG_WAYPOINT_INFO_WAITTIME, waittime);