diff options
Diffstat (limited to 'src/game/Level2.cpp')
-rw-r--r-- | src/game/Level2.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp index 9aa1fec4778..4d3ca991af8 100644 --- a/src/game/Level2.cpp +++ b/src/game/Level2.cpp @@ -552,7 +552,7 @@ bool ChatHandler::HandleGameObjectTargetCommand(const char* args) return false; } - GameObject* target = ObjectAccessor::GetGameObject(*m_session->GetPlayer(),MAKE_NEW_GUID(lowguid,id,HIGHGUID_GAMEOBJECT)); + GameObject* target = m_session->GetPlayer()->GetMap()->GetGameObject(MAKE_NEW_GUID(lowguid,id,HIGHGUID_GAMEOBJECT)); PSendSysMessage(LANG_GAMEOBJECT_DETAIL, lowguid, goI->name, lowguid, id, x, y, z, mapid, o); @@ -1384,7 +1384,7 @@ bool ChatHandler::HandleNpcDeleteCommand(const char* args) return false; if (CreatureData const* cr_data = objmgr.GetCreatureData(lowguid)) - unit = ObjectAccessor::GetCreature(*m_session->GetPlayer(), MAKE_NEW_GUID(lowguid, cr_data->id, HIGHGUID_UNIT)); + unit = m_session->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(lowguid, cr_data->id, HIGHGUID_UNIT)); } else unit = getSelectedCreature(); @@ -3071,7 +3071,7 @@ bool ChatHandler::HandleWpModifyCommand(const char* args) // Did the user select a visual spawnpoint? if(wpGuid) - wpCreature = ObjectAccessor::GetCreature(*m_session->GetPlayer(),MAKE_NEW_GUID(wpGuid, VISUAL_WAYPOINT, HIGHGUID_UNIT)); + wpCreature = m_session->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(wpGuid, VISUAL_WAYPOINT, HIGHGUID_UNIT)); // attempt check creature existence by DB data else { @@ -3141,7 +3141,7 @@ bool ChatHandler::HandleWpModifyCommand(const char* args) if( wpGuid != 0 ) { - wpCreature = ObjectAccessor::GetCreature(*m_session->GetPlayer(),MAKE_NEW_GUID(wpGuid, VISUAL_WAYPOINT, HIGHGUID_UNIT)); + wpCreature = m_session->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(wpGuid, VISUAL_WAYPOINT, HIGHGUID_UNIT)); wpCreature->CombatStop(); wpCreature->DeleteFromDB(); wpCreature->AddObjectToRemoveList(); @@ -3170,7 +3170,7 @@ bool ChatHandler::HandleWpModifyCommand(const char* args) // Respawn the owner of the waypoints if( wpGuid != 0 ) { - wpCreature = ObjectAccessor::GetCreature(*m_session->GetPlayer(),MAKE_NEW_GUID(wpGuid, VISUAL_WAYPOINT, HIGHGUID_UNIT)); + wpCreature = m_session->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(wpGuid, VISUAL_WAYPOINT, HIGHGUID_UNIT)); wpCreature->CombatStop(); wpCreature->DeleteFromDB(); wpCreature->AddObjectToRemoveList(); @@ -3281,11 +3281,8 @@ bool ChatHandler::HandleWpShowCommand(const char* args) pathid = atoi((char*)guid_str); } - sLog.outDebug("DEBUG: HandleWpShowCommand: danach"); - - std::string show = show_str; uint32 Maxpoint; @@ -3364,7 +3361,7 @@ bool ChatHandler::HandleWpShowCommand(const char* args) { Field *fields = result2->Fetch(); uint32 wpguid = fields[0].GetUInt32(); - Creature* pCreature = ObjectAccessor::GetCreature(*m_session->GetPlayer(),MAKE_NEW_GUID(wpguid,VISUAL_WAYPOINT,HIGHGUID_UNIT)); + Creature* pCreature = m_session->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(wpguid,VISUAL_WAYPOINT,HIGHGUID_UNIT)); if(!pCreature) { @@ -3582,7 +3579,7 @@ bool ChatHandler::HandleWpShowCommand(const char* args) { Field *fields = result->Fetch(); uint32 guid = fields[0].GetUInt32(); - Creature* pCreature = ObjectAccessor::GetCreature(*m_session->GetPlayer(),MAKE_NEW_GUID(guid,VISUAL_WAYPOINT,HIGHGUID_UNIT)); + Creature* pCreature = m_session->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(guid,VISUAL_WAYPOINT,HIGHGUID_UNIT)); if(!pCreature) { |