*Fix a crash caused by leave channel.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-26 14:06:12 -05:00
parent 227471fe18
commit f74a134ed6

View File

@@ -160,6 +160,11 @@ void WorldSession::HandleMoveWorldportAckOpcode()
if(!mEntry->IsMountAllowed())
_player->RemoveAurasByType(SPELL_AURA_MOUNTED);
// update zone immediately, otherwise leave channel will cause crash in mtmap
uint32 newzone, newarea;
GetPlayer()->GetZoneAndAreaId(newzone, newarea);
GetPlayer()->UpdateZone(newzone, newarea);
// honorless target
if(GetPlayer()->pvpInfo.inHostileArea)
GetPlayer()->CastSpell(GetPlayer(), SPELL_ID_HONORLESS_TARGET, true);