Skip to content

Commit

Permalink
[9946] Prevent remove unexpected for remove spell at cast 35729.
Browse files Browse the repository at this point in the history
Also drop removed spell call for spells 19574/34471.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
  • Loading branch information
j4r0d authored and VladimirMangos committed May 21, 2010
1 parent a3f6b5e commit 570eed5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
10 changes: 1 addition & 9 deletions src/game/SpellAuras.cpp
Expand Up @@ -6374,16 +6374,8 @@ void Aura::HandleSpellSpecificBoosts(bool apply)
break;
case SPELLFAMILY_HUNTER:
{
// The Beast Within and Bestial Wrath - immunity
if (GetId() == 19574 || GetId() == 34471)
{
spellId1 = 24395;
spellId2 = 24396;
spellId3 = 24397;
spellId4 = 26592;
}
// Freezing Trap Effect
else if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000008))
if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000008))
{
if(!apply)
{
Expand Down
10 changes: 5 additions & 5 deletions src/game/SpellEffects.cpp
Expand Up @@ -2622,11 +2622,11 @@ void Spell::EffectTriggerSpell(SpellEffectIndex effIndex)
Unit::AuraMap& Auras = unitTarget->GetAuras();
for(Unit::AuraMap::iterator iter = Auras.begin(); iter != Auras.end(); ++iter)
{
// remove all harmful spells on you...
if( // ignore positive and passive auras
!iter->second->IsPositive() && !iter->second->IsPassive() &&
// ignore physical auras
(GetSpellSchoolMask(iter->second->GetSpellProto()) & SPELL_SCHOOL_MASK_NORMAL)==0 )
// Remove all harmful spells on you except positive/passive/physical auras
if( !iter->second->IsPositive()
&& !iter->second->IsPassive()
&& !iter->second->IsDeathPersistent()
&& (GetSpellSchoolMask(iter->second->GetSpellProto()) & SPELL_SCHOOL_MASK_NORMAL) == 0 )
{
m_caster->RemoveAurasDueToSpell(iter->second->GetSpellProto()->Id);
iter = Auras.begin();
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9945"
#define REVISION_NR "9946"
#endif // __REVISION_NR_H__

2 comments on commit 570eed5

@pasdVn
Copy link
Contributor

@pasdVn pasdVn commented on 570eed5 May 22, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could just add "The Beast Within and Bestial Wrath - immunity" to the 'hack' in Aura::HandleModMechanicImmunity(...) that gives some spells IMMUNE_TO_MOVEMENT_IMPAIRMENT_AND_LOSS_CONTROL_MASK instead of the provided miscvalue. It's no clean sollution ofc, but I don't have any other idea/can not find any new spells.

Edit: Ah sorry... won't work that easy ofc... We also want to keep the immunity for some seconds...

@VladimirMangos
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also not find spell so in this part just drop outdated code... not expect it fixed in this commit.
Ok, in reallity one new spell added for The Bestial Wrath case possible it can be used in both...
But i am not check

Please sign in to comment.