[9515] Fix a possible exploit in CMSG_HEARTH_AND_RESURRECT

Signed-off-by: Lightguard <Lightguard@tauri.hu>
This commit is contained in:
tomrus88 2010-03-04 09:45:43 +01:00 committed by Lightguard
parent 6af247d34f
commit 9626d3333e
3 changed files with 33 additions and 29 deletions

View file

@ -1578,6 +1578,10 @@ void WorldSession::HandleHearthandResurrect(WorldPacket & /*recv_data*/)
{
sLog.outDebug("WORLD: CMSG_HEARTH_AND_RESURRECT");
AreaTableEntry const* atEntry = sAreaStore.LookupEntry(_player->GetAreaId());
if(!atEntry || !(atEntry->flags & AREA_FLAG_CAN_HEARTH_AND_RES))
return;
// Can't use in flight
if (_player->isInFlight())
return;