[11615] Apply normal stealth at expire spell 1856 and ranks

Instead current at apply mode.
This commit is contained in:
VladimirMangos 2011-06-06 17:32:42 +04:00
parent c11a2b68b7
commit 0d9e3c8e43
3 changed files with 17 additions and 13 deletions

View file

@ -4431,8 +4431,23 @@ void Aura::HandleModStealth(bool apply, bool Real)
}
else
{
if (!Real)
return;
// Vanish (triggered, normal stealth need apply before remove advanced stealth)
if (target->GetTypeId() == TYPEID_PLAYER && m_removeMode == AURA_REMOVE_BY_EXPIRE &&
GetSpellProto()->IsFitToFamily(SPELLFAMILY_ROGUE, UI64LIT(0x000000000800)))
{
uint32 spellId = 1784; // Stealth
// reset cooldown on it if needed
if (((Player*)target)->HasSpellCooldown(spellId))
((Player*)target)->RemoveSpellCooldown(spellId);
target->CastSpell(target, spellId, true);
}
// only at real aura remove of _last_ SPELL_AURA_MOD_STEALTH
if (Real && !target->HasAuraType(SPELL_AURA_MOD_STEALTH))
if (!target->HasAuraType(SPELL_AURA_MOD_STEALTH))
{
// if no GM invisibility
if (target->GetVisibility()!=VISIBILITY_OFF)