[3.3.5] Core/Spell: restore old pet values after dismount (#16551)

* Core/Spell: restore old pet values after dismount & re-summon
Original PR #15667 by ghost

Closes #873
This commit is contained in:
Trond B Krokli
2016-05-26 21:23:59 +02:00
committed by Aokromes
parent 85e2bf54eb
commit d716e6049a

View File

@@ -2782,6 +2782,12 @@ void Spell::EffectSummonPet(SpellEffIndex effIndex)
//OldSummon->Relocate(px, py, pz, OldSummon->GetOrientation());
//OldSummon->SetMap(owner->GetMap());
//owner->GetMap()->Add(OldSummon->ToCreature());
if (OldSummon->getPetType() == SUMMON_PET)
{
OldSummon->SetHealth(OldSummon->GetMaxHealth());
OldSummon->SetPower(OldSummon->getPowerType(),
OldSummon->GetMaxPower(OldSummon->getPowerType()));
}
if (owner->GetTypeId() == TYPEID_PLAYER && OldSummon->isControlled())
owner->ToPlayer()->PetSpellInitialize();