922 {
924
926 if (!pet->IsAlive())
927 pet->ToTempSummon()->UnSummon();
928
929
932 else
934
936 if (pet->GetCharmInfo() && caster->
ToPlayer())
937 {
938 pet->m_CreatureSpellCooldowns.clear();
940 pet->GetCharmInfo()->ToggleCreatureAutocast(spellInfo, true);
941 pet->GetCharmInfo()->SetSpellAutocast(spellInfo, true);
943 }
944 }
#define sSpellMgr
Definition SpellMgr.h:825
Player * ToPlayer()
Definition Object.h:201
void CharmSpellInitialize()
Definition Player.cpp:9704
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:5753
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:1178
ObjectGuid GetPetGUID() const
Definition Unit.h:694
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition ObjectAccessor.cpp:210
@ SPELL_MAGE_SUMMON_WATER_ELEMENTAL_TEMPORARY
Definition spell_mage.cpp:56
@ SPELL_MAGE_SUMMON_WATER_ELEMENTAL_PERMANENT
Definition spell_mage.cpp:55
@ SPELL_MAGE_GLYPH_OF_ETERNAL_WATER
Definition spell_mage.cpp:54