919 {
921
923 if (!pet->IsAlive())
924 pet->ToTempSummon()->UnSummon();
925
926
929 else
931
933 if (pet->GetCharmInfo() && caster->
ToPlayer())
934 {
935 pet->m_CreatureSpellCooldowns.clear();
937 pet->GetCharmInfo()->ToggleCreatureAutocast(spellInfo, true);
938 pet->GetCharmInfo()->SetSpellAutocast(spellInfo, true);
940 }
941 }
#define sSpellMgr
Definition SpellMgr.h:825
Player * ToPlayer()
Definition Object.h:202
void CharmSpellInitialize()
Definition Player.cpp:9653
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:5754
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:1179
ObjectGuid GetPetGUID() const
Definition Unit.h:678
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition ObjectAccessor.cpp:210
@ SPELL_MAGE_SUMMON_WATER_ELEMENTAL_TEMPORARY
Definition spell_mage.cpp:53
@ SPELL_MAGE_SUMMON_WATER_ELEMENTAL_PERMANENT
Definition spell_mage.cpp:52
@ SPELL_MAGE_GLYPH_OF_ETERNAL_WATER
Definition spell_mage.cpp:51