936 {
938
940 if (!pet->IsAlive())
941 pet->ToTempSummon()->UnSummon();
942
943
946 else
948
950 if (pet->GetCharmInfo() && caster->
ToPlayer())
951 {
952 pet->m_CreatureSpellCooldowns.clear();
954 pet->GetCharmInfo()->ToggleCreatureAutocast(spellInfo, true);
955 pet->GetCharmInfo()->SetSpellAutocast(spellInfo, true);
957 }
958 }
#define sSpellMgr
Definition SpellMgr.h:851
Player * ToPlayer()
Definition Object.h:208
void CharmSpellInitialize()
Definition Player.cpp:9949
Definition SpellInfo.h:340
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:5798
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:1378
ObjectGuid GetPetGUID() const
Definition Unit.h:729
Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:234
@ SPELL_MAGE_SUMMON_WATER_ELEMENTAL_TEMPORARY
Definition spell_mage.cpp:57
@ SPELL_MAGE_SUMMON_WATER_ELEMENTAL_PERMANENT
Definition spell_mage.cpp:56
@ SPELL_MAGE_GLYPH_OF_ETERNAL_WATER
Definition spell_mage.cpp:55