aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellAuras.cpp2
-rw-r--r--src/game/SpellEffects.cpp10
-rw-r--r--src/game/Unit.cpp13
-rw-r--r--src/game/Unit.h5
4 files changed, 28 insertions, 2 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index cbfebbb065c..475b99579ee 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -7232,7 +7232,7 @@ void AuraEffect::HandleReflectSpells( bool Apply, bool Real , bool /*changeAmoun
if (Unit * caster = GetCaster())
{
// Improved Spell Reflection
- if (caster->GetDummyAura(59089) || caster->GetDummyAura(59088))
+ if (caster->GetDummyAura(SPELLFAMILY_WARRIOR,1935))
{
// aura remove - remove auras from all party members
std::list<Unit*> PartyMembers;
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 1552747f65c..051ff8bb198 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -5141,6 +5141,16 @@ void Spell::EffectScriptEffect(uint32 effIndex)
{
switch(m_spellInfo->Id)
{
+ // Invigoration
+ case 53412:
+ {
+ if (AuraEffect * aurEff = unitTarget->GetDummyAura(SPELLFAMILY_HUNTER, 3487))
+ {
+ if (roll_chance_i(aurEff->GetAmount()))
+ unitTarget->CastSpell(unitTarget, 53398, true);
+ }
+ break;
+ }
// Heart of the Pheonix
case 55709:
{
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 2510f045c6e..ab63bb42a0d 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -13039,6 +13039,19 @@ AuraEffect* Unit::GetDummyAura( uint32 spell_id ) const
return NULL;
}
+AuraEffect* Unit::GetDummyAura(SpellFamilyNames name, uint32 iconId) const
+{
+ Unit::AuraEffectList const& mDummy = GetAurasByType(SPELL_AURA_DUMMY);
+ for(Unit::AuraEffectList::const_iterator itr = mDummy.begin(); itr != mDummy.end(); ++itr)
+ {
+ SpellEntry const * spell = (*itr)->GetSpellProto();
+ if (spell->SpellIconID == iconId && spell->SpellFamilyName == name
+ && !spell->SpellFamilyFlags)
+ return *itr;
+ }
+ return NULL;
+}
+
bool Unit::IsUnderLastManaUseEffect() const
{
return getMSTimeDiff(m_lastManaUse,getMSTime()) < 5000;
diff --git a/src/game/Unit.h b/src/game/Unit.h
index a9efdffcb9b..7c5bad7c94d 100644
--- a/src/game/Unit.h
+++ b/src/game/Unit.h
@@ -36,6 +36,8 @@
#include "DBCStructure.h"
#include <list>
+enum SpellFamilyNames;
+
#define WORLD_TRIGGER 12999
enum SpellInterruptFlags
@@ -1563,6 +1565,8 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
bool HasAura(Aura * aur) const;
bool HasAuraType(AuraType auraType) const;
bool HasAuraTypeWithMiscvalue(AuraType auratype, uint32 miscvalue) const;
+ AuraEffect* GetDummyAura(uint32 spell_id) const;
+ AuraEffect* GetDummyAura(SpellFamilyNames name, uint32 iconId) const;
uint32 GetDiseasesByCaster(uint64 casterGUID) const;
uint32 GetDoTsByCaster(uint64 casterGUID) const;
@@ -1581,7 +1585,6 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
int32 GetMaxPositiveAuraModifierByMiscValue(AuraType auratype, int32 misc_value) const;
int32 GetMaxNegativeAuraModifierByMiscValue(AuraType auratype, int32 misc_value) const;
- AuraEffect* GetDummyAura(uint32 spell_id) const;
uint32 GetInterruptMask() const { return m_interruptMask; }
void AddInterruptMask(uint32 mask) { m_interruptMask |= mask; }
void UpdateInterruptMask();