Core/Players: Remove player from transport before teleporting to graveyard, will fix infinite recursion when trying to access unavailable map
Core/Auras: Removed unneeded typecasting Closes issue #4862. --HG-- branch : trunk
This commit is contained in:
@@ -1845,7 +1845,14 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
|||||||
sLog.outDebug("Player %s using client without required expansion tried teleport to non accessible map %u", GetName(), mapid);
|
sLog.outDebug("Player %s using client without required expansion tried teleport to non accessible map %u", GetName(), mapid);
|
||||||
|
|
||||||
if (GetTransport())
|
if (GetTransport())
|
||||||
|
{
|
||||||
|
m_transport->RemovePassenger(this);
|
||||||
|
m_transport = NULL;
|
||||||
|
m_movementInfo.t_pos.Relocate(0.0f, 0.0f, 0.0f, 0.0f);
|
||||||
|
m_movementInfo.t_time = 0;
|
||||||
|
m_movementInfo.t_seat = -1;
|
||||||
RepopAtGraveyard(); // teleport to near graveyard if on transport, looks blizz like :)
|
RepopAtGraveyard(); // teleport to near graveyard if on transport, looks blizz like :)
|
||||||
|
}
|
||||||
|
|
||||||
SendTransferAborted(mapid, TRANSFER_ABORT_INSUF_EXPAN_LVL, mEntry->Expansion());
|
SendTransferAborted(mapid, TRANSFER_ABORT_INSUF_EXPAN_LVL, mEntry->Expansion());
|
||||||
|
|
||||||
|
|||||||
@@ -1241,7 +1241,7 @@ void AuraEffect::SendTickImmune(Unit * target, Unit *caster) const
|
|||||||
|
|
||||||
void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const
|
void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const
|
||||||
{
|
{
|
||||||
bool prevented = GetBase()->CallScriptEffectPeriodicHandlers(const_cast<AuraEffect const *>(this), aurApp);
|
bool prevented = GetBase()->CallScriptEffectPeriodicHandlers(this, aurApp);
|
||||||
if (prevented)
|
if (prevented)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user