aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/SpellMgr.cpp14
-rw-r--r--src/game/SpellMgr.h1
-rw-r--r--src/game/Unit.cpp3
3 files changed, 15 insertions, 3 deletions
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 6128383590e..f312329192c 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -398,6 +398,19 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
break;
}
+ for(int i = 0; i < 3; ++i)
+ {
+ if(spellInfo->Effect[i] == SPELL_EFFECT_APPLY_AURA)
+ {
+ switch(spellInfo->EffectApplyAuraName[i])
+ {
+ case SPELL_AURA_MOD_CHARM:
+ case SPELL_AURA_MOD_POSSESS_PET:
+ case SPELL_AURA_MOD_POSSESS:
+ return SPELL_CHARM;
+ }
+ }
+ }
// elixirs can have different families, but potion most ofc.
if(SpellSpecific sp = spellmgr.GetSpellElixirSpecific(spellInfo->Id))
return sp;
@@ -437,6 +450,7 @@ bool IsSingleFromSpellSpecificPerTarget(uint32 spellSpec1,uint32 spellSpec2)
case SPELL_WELL_FED:
case SPELL_DRINK:
case SPELL_FOOD:
+ case SPELL_CHARM:
return spellSpec1==spellSpec2;
case SPELL_BATTLE_ELIXIR:
return spellSpec2==SPELL_BATTLE_ELIXIR
diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h
index 28e574b978f..cb25bbfa522 100644
--- a/src/game/SpellMgr.h
+++ b/src/game/SpellMgr.h
@@ -310,6 +310,7 @@ enum SpellSpecific
SPELL_DRINK = 19,
SPELL_FOOD = 20,
SPELL_PRESENCE = 21,
+ SPELL_CHARM = 22,
};
#define SPELL_LINKED_MAX_SPELLS 200000
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 0c1910d43ea..473be9e88a6 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -12377,9 +12377,6 @@ void Unit::SetCharmedOrPossessedBy(Unit* charmer, bool possess)
if(GetTypeId() == TYPEID_PLAYER)
((Player*)this)->StopCastingCharm();
- // Charmed stop being charmed
- RemoveCharmAuras();
-
// Set charmed
charmer->SetCharm(this);
SetCharmerGUID(charmer->GetGUID());