*Implement immunity removal part for Shattering Throw ability - by thenecromancer.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-07-27 17:32:56 +02:00
parent e3ef5da919
commit e8f8b66636
5 changed files with 36 additions and 0 deletions
+1
View File
@@ -71,6 +71,7 @@ INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comm
(48396, 50172, 2, 'Improved Moonkin Form'),
( 20594, 65116, 0, 'Stoneform'),
( 49039, 50397, 2, 'Lichborne - shapeshift'),
( 64382, 64380, 0, 'Shattering Throw'),
-- Creature
( 36574, 36650, 0, 'Apply Phase Slip Vulnerability'),
+5
View File
@@ -0,0 +1,5 @@
DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN(47585, 64382);
INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
( 47585, 60069, 2, 'Dispersion (transform/regen)'),
( 64382, 64380, 0, 'Shattering Throw'),
( 47585, 63230, 2, 'Dispersion (immunity)');
+13
View File
@@ -5480,6 +5480,19 @@ void Spell::EffectScriptEffect(uint32 effIndex)
}
break;
}
case SPELLFAMILY_WARRIOR:
{
// Shattering Throw
if ( m_spellInfo->SpellFamilyFlags[1] & 0x1 )
{
if(!unitTarget)
return;
// remove shields, will still display immune to damage part
unitTarget->RemoveAurasWithMechanic(1<<MECHANIC_IMMUNE_SHIELD);
return;
}
break;
}
}
// normal DB scripted effect
+16
View File
@@ -553,6 +553,22 @@ void Unit::RemoveAurasWithFamily(uint32 family, uint32 familyFlag1, uint32 famil
}
}
void Unit::RemoveAurasWithMechanic(uint32 mechanic_mask, uint32 except)
{
for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end();)
{
if (!except || iter->second->GetId() != except)
{
if(GetAllSpellMechanicMask(iter->second->GetSpellProto()) & mechanic_mask)
{
RemoveAura(iter, AURA_REMOVE_BY_ENEMY_SPELL);
continue;
}
}
++iter;
}
}
void Unit::UpdateInterruptMask()
{
m_interruptMask = 0;
+1
View File
@@ -1450,6 +1450,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
void RemoveAurasWithInterruptFlags(uint32 flag, uint32 except = NULL);
void RemoveAurasWithFamily(uint32 family, uint32 familyFlag1, uint32 familyFlag2, uint32 familyFlag3, uint64 casterGUID);
void RemoveMovementImpairingAuras();
void RemoveAurasWithMechanic(uint32 mechanic_mask, uint32 except=0);
void RemoveAllAuras();
void RemoveArenaAuras(bool onleave = false);
void RemoveAllAurasOnDeath();