mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 10:56:38 +01:00
[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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user