mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[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).
This commit is contained in:
parent
ed52e3f8f0
commit
4602ff9c21
11 changed files with 183 additions and 5 deletions
|
|
@ -250,6 +250,8 @@ bool ChatHandler::HandleVisibleCommand(const char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool ChatHandler::HandleGPSCommand(const char* args)
|
||||
{
|
||||
WorldObject *obj = NULL;
|
||||
|
|
@ -259,6 +261,13 @@ bool ChatHandler::HandleGPSCommand(const char* args)
|
|||
if(normalizePlayerName(name))
|
||||
obj = objmgr.GetPlayer(name.c_str());
|
||||
|
||||
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);
|
||||
|
|
@ -308,6 +317,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 );
|
||||
|
|
@ -321,6 +331,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 );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue