diff options
author | megamage <none@none> | 2008-12-26 17:08:59 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-12-26 17:08:59 -0600 |
commit | 8b209a441dba87ac0a80b6cf51a8643fca5c9738 (patch) | |
tree | 6dd136aaa5a91f02468c3842a6ac6600ce48ff24 /src/game/SpellEffects.cpp | |
parent | 7346ed5951822d5b8f61817ff1ad95d2c4e2cd73 (diff) |
*Update to Mangos 6949.
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r-- | src/game/SpellEffects.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 7ae64d2129f..af17bf0f97e 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -3236,7 +3236,7 @@ void Spell::EffectSummon(uint32 i) Pet* spawnCreature = new Pet(SUMMON_PET); spawnCreature->setActive(m_caster->isActive()); - if(spawnCreature->LoadPetFromDB(m_caster,pet_entry)) + if(m_caster->GetTypeId()==TYPEID_PLAYER && spawnCreature->LoadPetFromDB((Player*)m_caster,pet_entry)) { // set timer for unsummon int32 duration = GetSpellDuration(m_spellInfo); @@ -4106,7 +4106,7 @@ void Spell::EffectSummonPet(uint32 i) NewSummon->setActive(m_caster->isActive()); // petentry==0 for hunter "call pet" (current pet summoned if any) - if(NewSummon->LoadPetFromDB(m_caster,petentry)) + if(m_caster->GetTypeId() == TYPEID_PLAYER && NewSummon->LoadPetFromDB((Player*)m_caster,petentry)) { if(NewSummon->getPetType()==SUMMON_PET) { @@ -4191,7 +4191,8 @@ void Spell::EffectSummonPet(uint32 i) // this enables pet details window (Shift+P) // this enables popup window (pet dismiss, cancel), hunter pet additional flags set later - NewSummon->SetUInt32Value(UNIT_FIELD_FLAGS,UNIT_FLAG_PVP_ATTACKABLE); + if(m_caster->GetTypeId() == TYPEID_PLAYER) + NewSummon->SetUInt32Value(UNIT_FIELD_FLAGS,UNIT_FLAG_PVP_ATTACKABLE); NewSummon->InitStatsForLevel(petlevel); NewSummon->InitPetCreateSpells(); @@ -5471,7 +5472,9 @@ void Spell::EffectSummonTotem(uint32 i) } pTotem->SetUInt32Value(UNIT_CREATED_BY_SPELL,m_spellInfo->Id); - pTotem->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_PVP_ATTACKABLE); + + if(m_caster->GetTypeId() == TYPEID_PLAYER) + pTotem->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_PVP_ATTACKABLE); pTotem->ApplySpellImmune(m_spellInfo->Id,IMMUNITY_STATE,SPELL_AURA_MOD_FEAR,true); pTotem->ApplySpellImmune(m_spellInfo->Id,IMMUNITY_STATE,SPELL_AURA_TRANSFORM,true); |