[7921] Set pet and for creature owner in Spell::EffectSummon similar other summon effects.

This commit is contained in:
VladimirMangos 2009-05-31 04:26:40 +04:00
parent 91157c7eb9
commit c678263bb0
2 changed files with 3 additions and 2 deletions

View file

@ -3293,9 +3293,10 @@ void Spell::EffectSummon(uint32 i)
map->Add((Creature*)spawnCreature);
m_caster->SetPet(spawnCreature);
if(m_caster->GetTypeId() == TYPEID_PLAYER)
{
m_caster->SetPet(spawnCreature);
spawnCreature->GetCharmInfo()->SetReactState( REACT_DEFENSIVE );
spawnCreature->SavePetToDB(PET_SAVE_AS_CURRENT);
((Player*)m_caster)->PetSpellInitialize();