[7664] Implement work of rogue talent 58426.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also fix problems with talent 58426 and 31223 work in case
* fast stealth reapply after stealth lost
* second stealth aura apply while another active.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Lightguard 2009-04-13 12:36:53 +04:00 committed by VladimirMangos
parent 56350b32ed
commit 0aaf266513
3 changed files with 48 additions and 23 deletions

View file

@ -3517,15 +3517,37 @@ void Aura::HandleModStealth(bool apply, bool Real)
pTarget->SetVisibility(VISIBILITY_GROUP_NO_DETECT); pTarget->SetVisibility(VISIBILITY_GROUP_NO_DETECT);
pTarget->SetVisibility(VISIBILITY_GROUP_STEALTH); pTarget->SetVisibility(VISIBILITY_GROUP_STEALTH);
} }
// apply full stealth period bonuses only at first stealth aura in stack
if(pTarget->GetAurasByType(SPELL_AURA_MOD_STEALTH).size()<=1)
{
Unit::AuraList const& mDummyAuras = pTarget->GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraList::const_iterator i = mDummyAuras.begin();i != mDummyAuras.end(); ++i)
{
// Master of Subtlety
if ((*i)->GetSpellProto()->SpellIconID == 2114)
{
pTarget->RemoveAurasDueToSpell(31666);
int32 bp = (*i)->GetModifier()->m_amount;
pTarget->CastCustomSpell(pTarget,31665,&bp,NULL,NULL,true);
}
// Overkill
else if ((*i)->GetId() == 58426 && GetSpellProto()->SpellFamilyFlags & 0x0000000000400000LL)
{
pTarget->RemoveAurasDueToSpell(58428);
pTarget->CastSpell(m_target, 58427, true);
}
}
}
} }
} }
else else
{ {
// only at real aura remove // only at real aura remove of _last_ SPELL_AURA_MOD_STEALTH
if (Real) if (Real && !pTarget->HasAuraType(SPELL_AURA_MOD_STEALTH))
{ {
// if last SPELL_AURA_MOD_STEALTH and no GM invisibility // if no GM invisibility
if (!pTarget->HasAuraType(SPELL_AURA_MOD_STEALTH) && pTarget->GetVisibility()!=VISIBILITY_OFF) if(pTarget->GetVisibility()!=VISIBILITY_OFF)
{ {
pTarget->RemoveStandFlags(UNIT_STAND_FLAGS_CREEP); pTarget->RemoveStandFlags(UNIT_STAND_FLAGS_CREEP);
@ -3541,23 +3563,18 @@ void Aura::HandleModStealth(bool apply, bool Real)
else else
pTarget->SetVisibility(VISIBILITY_ON); pTarget->SetVisibility(VISIBILITY_ON);
} }
}
}
// Master of Subtlety // apply delayed talent bonus remover at last stealth aura remove
Unit::AuraList const& mDummyAuras = pTarget->GetAurasByType(SPELL_AURA_DUMMY); Unit::AuraList const& mDummyAuras = pTarget->GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraList::const_iterator i = mDummyAuras.begin();i != mDummyAuras.end(); ++i) for(Unit::AuraList::const_iterator i = mDummyAuras.begin();i != mDummyAuras.end(); ++i)
{
if ((*i)->GetSpellProto()->SpellIconID == 2114)
{
if (apply)
{ {
int32 bp = (*i)->GetModifier()->m_amount; // Master of Subtlety
pTarget->CastCustomSpell(pTarget,31665,&bp,NULL,NULL,true); if ((*i)->GetSpellProto()->SpellIconID == 2114)
pTarget->CastSpell(pTarget,31666,true);
// Overkill
else if ((*i)->GetId() == 58426 && GetSpellProto()->SpellFamilyFlags & 0x0000000000400000LL)
pTarget->CastSpell(m_target, 58428, true);
} }
else
pTarget->CastSpell(pTarget,31666,true);
break;
} }
} }
} }
@ -4181,11 +4198,15 @@ void Aura::HandleAuraPeriodicDummy(bool apply, bool Real)
{ {
case SPELLFAMILY_ROGUE: case SPELLFAMILY_ROGUE:
{ {
// Master of Subtlety if(!apply)
if (spell->Id==31666 && !apply)
{ {
m_target->RemoveAurasDueToSpell(31665); switch(spell->Id)
break; {
// Master of Subtlety
case 31666: m_target->RemoveAurasDueToSpell(31665); break;
// Overkill
case 58428: m_target->RemoveAurasDueToSpell(58427); break;
}
} }
break; break;
} }

View file

@ -1374,6 +1374,10 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
return false; return false;
} }
//Overkill
if( spellInfo_1->SpellIconID == 2285 && spellInfo_2->SpellIconID == 2285 )
return false;
// Garrote -> Garrote-Silence (multi-family check) // Garrote -> Garrote-Silence (multi-family check)
if( spellInfo_1->SpellIconID == 498 && spellInfo_2->SpellIconID == 498 && spellInfo_2->SpellVisual[0] == 0 ) if( spellInfo_1->SpellIconID == 498 && spellInfo_2->SpellIconID == 498 && spellInfo_2->SpellVisual[0] == 0 )
return false; return false;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "7663" #define REVISION_NR "7664"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__