920 {
922
924 if (!pet->IsAlive())
925 pet->ToTempSummon()->UnSummon();
926
927
930 else
932
934 if (pet->GetCharmInfo() && caster->
ToPlayer())
935 {
936 pet->m_CreatureSpellCooldowns.clear();
938 pet->GetCharmInfo()->ToggleCreatureAutocast(spellInfo, true);
939 pet->GetCharmInfo()->SetSpellAutocast(spellInfo, true);
941 }
942 }
#define sSpellMgr
Definition SpellMgr.h:815
Player * ToPlayer()
Definition Object.h:201
void CharmSpellInitialize()
Definition Player.cpp:9685
Definition SpellInfo.h:316
Unit * GetCaster()
Definition SpellScript.cpp:401
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:5939
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition Unit.cpp:1302
ObjectGuid GetPetGUID() const
Definition Unit.h:723
Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:210
@ SPELL_MAGE_SUMMON_WATER_ELEMENTAL_TEMPORARY
Definition spell_mage.cpp:58
@ SPELL_MAGE_SUMMON_WATER_ELEMENTAL_PERMANENT
Definition spell_mage.cpp:57
@ SPELL_MAGE_GLYPH_OF_ETERNAL_WATER
Definition spell_mage.cpp:56