Core/Players: Remove remaining loops over all PowerType.db2 rows
This commit is contained in:
@@ -498,9 +498,9 @@ bool Player::Create(ObjectGuid::LowType guidlow, WorldPackets::Character::Charac
|
||||
UpdateMaxHealth(); // Update max Health (for add bonus from stamina)
|
||||
SetFullHealth();
|
||||
|
||||
for (PowerTypeEntry const* powerType : sPowerTypeStore)
|
||||
if (powerType->GetFlags().HasFlag(PowerTypeFlags::SetToMaxOnInitialLogIn))
|
||||
SetFullPower(Powers(powerType->PowerTypeEnum));
|
||||
for (Powers power : GetPowerTypes())
|
||||
if (sDB2Manager.GetPowerTypeEntry(power)->GetFlags().HasFlag(PowerTypeFlags::SetToMaxOnInitialLogIn))
|
||||
SetFullPower(power);
|
||||
|
||||
// original spells
|
||||
LearnDefaultSkills();
|
||||
@@ -2269,9 +2269,9 @@ void Player::GiveLevel(uint8 level)
|
||||
|
||||
// Only health and mana are set to maximum.
|
||||
SetFullHealth();
|
||||
for (PowerTypeEntry const* powerType : sPowerTypeStore)
|
||||
if (powerType->GetFlags().HasFlag(PowerTypeFlags::SetToMaxOnLevelUp))
|
||||
SetFullPower(Powers(powerType->PowerTypeEnum));
|
||||
for (Powers power : GetPowerTypes())
|
||||
if (sDB2Manager.GetPowerTypeEntry(power)->GetFlags().HasFlag(PowerTypeFlags::SetToMaxOnLevelUp))
|
||||
SetFullPower(power);
|
||||
|
||||
// update level to hunter/summon pet
|
||||
if (Pet* pet = GetPet())
|
||||
|
||||
Reference in New Issue
Block a user