Core/Commands: Also allow .list object possibility to print gameobject entry
--HG-- branch : trunk
This commit is contained in:
@@ -2848,11 +2848,11 @@ bool ChatHandler::HandleListObjectCommand(const char *args)
|
||||
if (m_session)
|
||||
{
|
||||
Player* pl = m_session->GetPlayer();
|
||||
result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map, (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) AS order_ FROM gameobject WHERE id = '%u' ORDER BY order_ ASC LIMIT %u",
|
||||
result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map, id, (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) AS order_ FROM gameobject WHERE id = '%u' ORDER BY order_ ASC LIMIT %u",
|
||||
pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(),go_id,uint32(count));
|
||||
}
|
||||
else
|
||||
result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map FROM gameobject WHERE id = '%u' LIMIT %u",
|
||||
result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map, id FROM gameobject WHERE id = '%u' LIMIT %u",
|
||||
go_id,uint32(count));
|
||||
|
||||
if (result)
|
||||
@@ -2865,9 +2865,10 @@ bool ChatHandler::HandleListObjectCommand(const char *args)
|
||||
float y = fields[2].GetFloat();
|
||||
float z = fields[3].GetFloat();
|
||||
int mapid = fields[4].GetUInt16();
|
||||
uint32 entry = fields[5].GetUInt32();
|
||||
|
||||
if (m_session)
|
||||
PSendSysMessage(LANG_GO_LIST_CHAT, guid, guid, gInfo->name, x, y, z, mapid);
|
||||
PSendSysMessage(LANG_GO_LIST_CHAT, guid, entry, guid, gInfo->name, x, y, z, mapid);
|
||||
else
|
||||
PSendSysMessage(LANG_GO_LIST_CONSOLE, guid, gInfo->name, x, y, z, mapid);
|
||||
} while (result->NextRow());
|
||||
|
||||
Reference in New Issue
Block a user