mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[8111] Implemented support for implicit specify owner when initializing stats for summoned pets.
* Speedup of summoning pets (no need to seach owner by guid) * Fixed problem that summond pets from NPC had not initialized stats (pet was not in world in time of stat init thus owner was not found) Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
parent
06dcbce4ee
commit
aab121fcb2
4 changed files with 12 additions and 9 deletions
|
|
@ -3275,7 +3275,7 @@ void Spell::EffectSummon(uint32 i)
|
|||
spawnCreature->SetCreatorGUID(m_caster->GetGUID());
|
||||
spawnCreature->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id);
|
||||
|
||||
spawnCreature->InitStatsForLevel(level);
|
||||
spawnCreature->InitStatsForLevel(level, m_caster);
|
||||
|
||||
spawnCreature->GetCharmInfo()->SetPetNumber(pet_number, false);
|
||||
|
||||
|
|
@ -3705,7 +3705,7 @@ void Spell::EffectSummonGuardian(uint32 i)
|
|||
spawnCreature->SetCreatorGUID(m_caster->GetGUID());
|
||||
spawnCreature->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id);
|
||||
|
||||
spawnCreature->InitStatsForLevel(level);
|
||||
spawnCreature->InitStatsForLevel(level, m_caster);
|
||||
spawnCreature->GetCharmInfo()->SetPetNumber(pet_number, false);
|
||||
|
||||
spawnCreature->AIM_Initialize();
|
||||
|
|
@ -4195,7 +4195,7 @@ void Spell::EffectSummonPet(uint32 i)
|
|||
if(m_caster->IsPvP())
|
||||
NewSummon->SetPvP(true);
|
||||
|
||||
NewSummon->InitStatsForLevel(petlevel);
|
||||
NewSummon->InitStatsForLevel(petlevel, m_caster);
|
||||
NewSummon->InitPetCreateSpells();
|
||||
NewSummon->InitLevelupSpellsForLevel();
|
||||
NewSummon->InitTalentForLevel();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue