mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
Crash fix
This commit is contained in:
parent
5ca92eddd7
commit
6707038cfc
1 changed files with 23 additions and 23 deletions
|
|
@ -273,7 +273,13 @@ void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recv_data*/)
|
||||||
|
|
||||||
Corpse *corpse = GetPlayer()->GetCorpse();
|
Corpse *corpse = GetPlayer()->GetCorpse();
|
||||||
|
|
||||||
uint8 found = corpse ? 1 : 0;
|
if(!corpse)
|
||||||
|
{
|
||||||
|
WorldPacket data(MSG_CORPSE_QUERY, 1);
|
||||||
|
data << uint8(0); // corpse not found
|
||||||
|
SendPacket(&data);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int32 mapid = corpse->GetMapId();
|
int32 mapid = corpse->GetMapId();
|
||||||
float x = corpse->GetPositionX();
|
float x = corpse->GetPositionX();
|
||||||
|
|
@ -281,8 +287,6 @@ void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recv_data*/)
|
||||||
float z = corpse->GetPositionZ();
|
float z = corpse->GetPositionZ();
|
||||||
int32 corpsemapid = _player->GetMapId();
|
int32 corpsemapid = _player->GetMapId();
|
||||||
|
|
||||||
if(found)
|
|
||||||
{
|
|
||||||
if(Map *map = corpse->GetMap())
|
if(Map *map = corpse->GetMap())
|
||||||
{
|
{
|
||||||
if(map->IsDungeon())
|
if(map->IsDungeon())
|
||||||
|
|
@ -298,18 +302,14 @@ void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recv_data*/)
|
||||||
corpsemapid = corpse->GetMapId();
|
corpsemapid = corpse->GetMapId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
WorldPacket data(MSG_CORPSE_QUERY, (1+found*(5*4)));
|
WorldPacket data(MSG_CORPSE_QUERY, 1+(5*4));
|
||||||
data << uint8(found);
|
data << uint8(1); // corpse found
|
||||||
if(found)
|
|
||||||
{
|
|
||||||
data << int32(mapid);
|
data << int32(mapid);
|
||||||
data << float(x);
|
data << float(x);
|
||||||
data << float(y);
|
data << float(y);
|
||||||
data << float(z);
|
data << float(z);
|
||||||
data << int32(corpsemapid);
|
data << int32(corpsemapid);
|
||||||
}
|
|
||||||
SendPacket(&data);
|
SendPacket(&data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue