[10214] Small final (as i think ;) ) fixes for restricted flight zone

* Fixed my horriable typo in 58600 effect code. Thanks to zergtmn for pointing to it.
* Remove redundent cast 45472 in 58600 effect code (it casted from 58601 already). Thanks to porteyoplait.
* Prevent restart 58600 debuf timer at temporary leave zone and return to it.
This commit is contained in:
VladimirMangos 2010-07-18 01:05:02 +04:00
parent 73a00a6807
commit 15374bd626
3 changed files with 5 additions and 8 deletions

View file

@ -2172,13 +2172,10 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
AreaTableEntry const* area = GetAreaEntryByAreaID(target->GetAreaId());
// Dalaran restricted flight zone (recheck before apply unmount)
if (area && target->GetTargetGUID() == TYPEID_PLAYER && (area->flags & AREA_FLAG_CANNOT_FLY) &&
if (area && target->GetTypeId() == TYPEID_PLAYER && (area->flags & AREA_FLAG_CANNOT_FLY) &&
((Player*)target)->IsFreeFlying() && !((Player*)target)->isGameMaster())
{
// Remove Flight Auras
target->CastSpell(target, 58601, true);
// Parachute
target->CastSpell(target, 45472, true);
target->CastSpell(target, 58601, true); // Remove Flight Auras (also triggered Parachute (45472))
}
return;
}