mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 02:20:27 +00:00
fix(CORE/Spells): Fix Scaling of some Guardians (#12625)
* fix(CORE/Spells): Fix Scaling of some Guardians Guardians summoned by engineering and items have wrong scaling. This will fix Engineering items having the wrong stat scaling. Also fix some Guardians summoned by items to have appropriate level and stats. Closes AzerothCore issue #12446 * Fix whitespace * fix codestyle
This commit is contained in:
@@ -6015,6 +6015,43 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const*
|
||||
case 13049:
|
||||
summonLevel = 55;
|
||||
break;
|
||||
|
||||
// Cleansed Timberling Heart: Summon Timberling
|
||||
case 5666:
|
||||
summonLevel = 7;
|
||||
break;
|
||||
|
||||
// Glowing Cat Figurine: Summon Ghost Saber
|
||||
case 6084:
|
||||
// minLevel 19, maxLevel 20
|
||||
summonLevel = 20;
|
||||
break;
|
||||
|
||||
// Spiked Collar: Summon Felhunter
|
||||
case 8176:
|
||||
summonLevel = 30;
|
||||
break;
|
||||
|
||||
// Dog Whistle: Summon Tracking Hound
|
||||
case 9515:
|
||||
summonLevel = 30;
|
||||
break;
|
||||
|
||||
// Barov Peasant Caller: Death by Peasant
|
||||
case 18307:
|
||||
case 18308:
|
||||
summonLevel = 60;
|
||||
break;
|
||||
|
||||
// Thornling Seed: Plant Thornling
|
||||
case 22792:
|
||||
summonLevel = 60;
|
||||
break;
|
||||
|
||||
// Cannonball Runner: Summon Crimson Cannon
|
||||
case 6251:
|
||||
summonLevel = 61;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6056,6 +6093,12 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const*
|
||||
// xinef: set calculated level
|
||||
summon->SetLevel(summonLevel);
|
||||
|
||||
// if summonLevel changed, set stats for calculated level
|
||||
if (summonLevel != caster->getLevel())
|
||||
{
|
||||
((Guardian*)summon)->InitStatsForLevel(summonLevel);
|
||||
}
|
||||
|
||||
// xinef: if we have more than one guardian, change follow angle
|
||||
if (summon->HasUnitTypeMask(UNIT_MASK_MINION) && totalNumGuardians > 1)
|
||||
((Minion*)summon)->SetFollowAngle(m_caster->GetAbsoluteAngle(pos.GetPositionX(), pos.GetPositionY()));
|
||||
|
||||
Reference in New Issue
Block a user