diff options
author | megamage <none@none> | 2008-12-24 11:18:01 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-12-24 11:18:01 -0600 |
commit | 184b82abccfff95b18bed81ded1b5a7e98d2dbd3 (patch) | |
tree | 4329c771076612bc55e52febfb5f323a2f21007e /src/game/QueryHandler.cpp | |
parent | 3cb4e7c716b11f357b3265257c51e7b6cc5c36f9 (diff) |
Backed out changeset: ad4f100c0a9d
--HG--
branch : trunk
Diffstat (limited to 'src/game/QueryHandler.cpp')
-rw-r--r-- | src/game/QueryHandler.cpp | 45 |
1 files changed, 11 insertions, 34 deletions
diff --git a/src/game/QueryHandler.cpp b/src/game/QueryHandler.cpp index 5b5679a81d7..9f9eecc2234 100644 --- a/src/game/QueryHandler.cpp +++ b/src/game/QueryHandler.cpp @@ -33,7 +33,6 @@ #include "NPCHandler.h" #include "ObjectAccessor.h" #include "Pet.h" -#include "MapManager.h" void WorldSession::SendNameQueryOpcode(Player *p) { @@ -186,6 +185,7 @@ void WorldSession::HandleCreatureQueryOpcode( WorldPacket & recv_data ) data << (uint32)ci->type; data << (uint32)ci->family; // family wdbFeild9 data << (uint32)ci->rank; // rank wdbFeild10 + data << (uint32)0; // unknown wdbFeild11 data << (uint32)ci->PetSpellDataId; // Id from CreatureSpellData.dbc wdbField12 data << (uint32)ci->Modelid1; // Modelid1 data << (uint32)ci->Modelid2; // Modelid2 @@ -276,43 +276,20 @@ void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recv_data*/) Corpse *corpse = GetPlayer()->GetCorpse(); + uint8 found = 1; if(!corpse) - { - WorldPacket data(MSG_CORPSE_QUERY, 1); - data << uint8(0); // corpse not found - SendPacket(&data); - return; - } + found = 0; - int32 mapid = corpse->GetMapId(); - float x = corpse->GetPositionX(); - float y = corpse->GetPositionY(); - float z = corpse->GetPositionZ(); - int32 corpsemapid = _player->GetMapId(); - - if(Map *map = corpse->GetMap()) + WorldPacket data(MSG_CORPSE_QUERY, (1+found*(5*4))); + data << uint8(found); + if(found) { - if(map->IsDungeon()) - { - if(!map->GetEntrancePos(mapid, x, y)) - return; - - Map *entrance_map = MapManager::Instance().GetMap(mapid, _player); - if(!entrance_map) - return; - - z = entrance_map->GetHeight(x, y, MAX_HEIGHT); - corpsemapid = corpse->GetMapId(); - } + data << corpse->GetMapId(); + data << corpse->GetPositionX(); + data << corpse->GetPositionY(); + data << corpse->GetPositionZ(); + data << _player->GetMapId(); } - - WorldPacket data(MSG_CORPSE_QUERY, 1+(5*4)); - data << uint8(1); // corpse found - data << int32(mapid); - data << float(x); - data << float(y); - data << float(z); - data << int32(corpsemapid); SendPacket(&data); } |