*Set totem slot to 4 but total summon slot to 6.
*Fix build. --HG-- branch : trunk
This commit is contained in:
1 parent
e121267298
commit
5b73a59f15
4 files changed
+29
-99
No files matched your search
@@ -2901,47 +2901,6 @@ bool ChatHandler::HandleListObjectCommand(const char* args)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleGameObjectNearCommand(const char* args)
|
||||
{
|
||||
float distance = (!*args) ? 10 : atol(args);
|
||||
uint32 count = 0;
|
||||
|
||||
Player* pl = m_session->GetPlayer();
|
||||
QueryResult *result = WorldDatabase.PQuery("SELECT guid, id, 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 map='%u' AND (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) <= '%f' ORDER BY order_",
|
||||
pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(),
|
||||
pl->GetMapId(),pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(),distance*distance);
|
||||
|
||||
if (result)
|
||||
{
|
||||
do
|
||||
{
|
||||
Field *fields = result->Fetch();
|
||||
uint32 guid = fields[0].GetUInt32();
|
||||
uint32 entry = fields[1].GetUInt32();
|
||||
float x = fields[2].GetFloat();
|
||||
float y = fields[3].GetFloat();
|
||||
float z = fields[4].GetFloat();
|
||||
int mapid = fields[5].GetUInt16();
|
||||
|
||||
GameObjectInfo const * gInfo = objmgr.GetGameObjectInfo(entry);
|
||||
|
||||
if(!gInfo)
|
||||
continue;
|
||||
|
||||
PSendSysMessage(LANG_GO_LIST_CHAT, guid, guid, gInfo->name, x, y, z, mapid);
|
||||
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
delete result;
|
||||
}
|
||||
|
||||
PSendSysMessage(LANG_COMMAND_NEAROBJMESSAGE,distance,count);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleGameObjectStateCommand(const char* args)
|
||||
{
|
||||
// number or [name] Shift-click form |color|Hgameobject:go_id|h[name]|h|r
|
||||
|
||||
Reference in new issue
Block a user