933 {
935
937 if (!pet->IsAlive())
938 pet->ToTempSummon()->UnSummon();
939
940
943 else
945
947 if (pet->GetCharmInfo() && caster->
ToPlayer())
948 {
949 pet->m_CreatureSpellCooldowns.clear();
951 pet->GetCharmInfo()->ToggleCreatureAutocast(spellInfo, true);
952 pet->GetCharmInfo()->SetSpellAutocast(spellInfo, true);
954 }
955 }
#define sSpellMgr
Definition SpellMgr.h:847
Player * ToPlayer()
Definition Object.h:202
void CharmSpellInitialize()
Definition Player.cpp:9910
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:6017
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:1361
ObjectGuid GetPetGUID() const
Definition Unit.h:724
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