mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[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:
parent
5083596e26
commit
e269f49f8e
5 changed files with 70 additions and 115 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue