*Update to Mangos 6949.

--HG--
branch : trunk
This commit is contained in:
megamage committed 2008-12-26 17:08:59 -06:00
1 parent 7346ed5951
commit 8b209a441d
16 files changed
+212 -61

No files matched your search

+7 -4
View File
@@ -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);