diff options
author | megamage <none@none> | 2009-02-01 16:46:57 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-02-01 16:46:57 -0600 |
commit | 05c07aa74a38e73006ba7106574290179942692c (patch) | |
tree | 70cd33698562658805c3643c22890ce23263c3a8 /src/game/Level1.cpp | |
parent | cd0071ae620f2634f609df8b83b24687f073733e (diff) |
[7214] Phase system continue development - Commands and fixes.
* Fixed creature/gameobject save from game (used in commands code only)
* Implement .modify phase (for player), .npc setphase (for creature/pet), .gobject phase (for gameobjects) commands
for set phasemask of selected object. In player/pet case temporary until in game phase switch/re-login/GM-mode change.
In creature/gameobject case change saved in DB.
* Add to .gps output phasemask value print. Allow use .gps command with creature/gameobject shift-link
(work for objects loaded in game in command time).
Author: VladimirMangos
--HG--
branch : trunk
Diffstat (limited to 'src/game/Level1.cpp')
-rw-r--r-- | src/game/Level1.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/game/Level1.cpp b/src/game/Level1.cpp index e31d6fe6170..60ef0fc98c9 100644 --- a/src/game/Level1.cpp +++ b/src/game/Level1.cpp @@ -653,6 +653,8 @@ bool ChatHandler::HandleVisibleCommand(const char* args) return false; } + + bool ChatHandler::HandleGPSCommand(const char* args) { WorldObject *obj = NULL; @@ -664,6 +666,13 @@ bool ChatHandler::HandleGPSCommand(const char* args) if(!obj) { + uint64 guid = extractGuidFromLink((char*)args); + if(guid) + obj = (WorldObject*)ObjectAccessor::GetObjectByTypeMask(*m_session->GetPlayer(),guid,TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT); + } + + if(!obj) + { SendSysMessage(LANG_PLAYER_NOT_FOUND); SetSentErrorMessage(true); return false; @@ -711,6 +720,7 @@ bool ChatHandler::HandleGPSCommand(const char* args) obj->GetMapId(), (mapEntry ? mapEntry->name[m_session->GetSessionDbcLocale()] : "<unknown>" ), zone_id, (zoneEntry ? zoneEntry->area_name[m_session->GetSessionDbcLocale()] : "<unknown>" ), area_id, (areaEntry ? areaEntry->area_name[m_session->GetSessionDbcLocale()] : "<unknown>" ), + obj->GetPhaseMask(), obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ(), obj->GetOrientation(), cell.GridX(), cell.GridY(), cell.CellX(), cell.CellY(), obj->GetInstanceId(), zone_x, zone_y, ground_z, floor_z, have_map, have_vmap ); @@ -723,6 +733,7 @@ bool ChatHandler::HandleGPSCommand(const char* args) obj->GetMapId(), (mapEntry ? mapEntry->name[sWorld.GetDefaultDbcLocale()] : "<unknown>" ), zone_id, (zoneEntry ? zoneEntry->area_name[sWorld.GetDefaultDbcLocale()] : "<unknown>" ), area_id, (areaEntry ? areaEntry->area_name[sWorld.GetDefaultDbcLocale()] : "<unknown>" ), + obj->GetPhaseMask(), obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ(), obj->GetOrientation(), cell.GridX(), cell.GridY(), cell.CellX(), cell.CellY(), obj->GetInstanceId(), zone_x, zone_y, ground_z, floor_z, have_map, have_vmap ); |