Core/Hunters: Fixed focus power for pets.

Closes #8553.
This commit is contained in:
Warpten committed 2013-02-01 19:56:02 +01:00
1 parent 8350c088c7
commit 0b72a91e76
3 files changed
+24 -10

No files matched your search

+4 -4
View File
@@ -2525,7 +2525,7 @@ void Player::Regenerate(Powers power)
return;
// Skip regeneration for power type we cannot have
uint32 powerIndex = GetPowerIndexByClass(power, getClass());
uint32 powerIndex = GetPowerIndex(power);
if (powerIndex == MAX_POWERS)
return;
@@ -17343,7 +17343,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
uint32 loadedPowers = 0;
for (uint32 i = 0; i < MAX_POWERS; ++i)
{
if (GetPowerIndexByClass(Powers(i), getClass()) != MAX_POWERS)
if (GetPowerIndex(i) != MAX_POWERS)
{
uint32 savedPower = fields[47+loadedPowers].GetUInt32();
uint32 maxPower = GetUInt32Value(UNIT_FIELD_MAXPOWER1 + loadedPowers);
@@ -18937,7 +18937,7 @@ void Player::SaveToDB(bool create /*=false*/)
uint32 storedPowers = 0;
for (uint32 i = 0; i < MAX_POWERS; ++i)
{
if (GetPowerIndexByClass(Powers(i), getClass()) != MAX_POWERS)
if (GetPowerIndex(i) != MAX_POWERS)
{
stmt->setUInt32(index++, GetUInt32Value(UNIT_FIELD_POWER1 + storedPowers));
if (++storedPowers >= MAX_POWERS_PER_CLASS)
@@ -19057,7 +19057,7 @@ void Player::SaveToDB(bool create /*=false*/)
uint32 storedPowers = 0;
for (uint32 i = 0; i < MAX_POWERS; ++i)
{
if (GetPowerIndexByClass(Powers(i), getClass()) != MAX_POWERS)
if (GetPowerIndex(i) != MAX_POWERS)
{
stmt->setUInt32(index++, GetUInt32Value(UNIT_FIELD_POWER1 + storedPowers));
if (++storedPowers >= MAX_POWERS_PER_CLASS)