mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 22:37:02 +00:00
Update UpdateFields.h. Drop redundant powers and happiness.
thx Strawberry Signed-off-by: Yaki Khadafi <elsoldollo@gmail.com>
This commit is contained in:
parent
53b2e576d1
commit
e9bee9b0b0
13 changed files with 602 additions and 660 deletions
|
|
@ -5403,10 +5403,6 @@ void Unit::setPowerType(Powers new_powertype)
|
|||
case POWER_ENERGY:
|
||||
SetMaxPower(POWER_ENERGY, GetCreatePowers(POWER_ENERGY));
|
||||
break;
|
||||
case POWER_HAPPINESS:
|
||||
SetMaxPower(POWER_HAPPINESS, GetCreatePowers(POWER_HAPPINESS));
|
||||
SetPower(POWER_HAPPINESS, GetCreatePowers(POWER_HAPPINESS));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -9144,7 +9140,6 @@ bool Unit::HandleStatModifier(UnitMods unitMod, UnitModifierType modifierType, f
|
|||
case UNIT_MOD_RAGE:
|
||||
case UNIT_MOD_FOCUS:
|
||||
case UNIT_MOD_ENERGY:
|
||||
case UNIT_MOD_HAPPINESS:
|
||||
case UNIT_MOD_RUNE:
|
||||
case UNIT_MOD_RUNIC_POWER: UpdateMaxPower(GetPowerTypeByAuraGroup(unitMod)); break;
|
||||
|
||||
|
|
@ -9265,7 +9260,6 @@ Powers Unit::GetPowerTypeByAuraGroup(UnitMods unitMod) const
|
|||
case UNIT_MOD_RAGE: return POWER_RAGE;
|
||||
case UNIT_MOD_FOCUS: return POWER_FOCUS;
|
||||
case UNIT_MOD_ENERGY: return POWER_ENERGY;
|
||||
case UNIT_MOD_HAPPINESS: return POWER_HAPPINESS;
|
||||
case UNIT_MOD_RUNE: return POWER_RUNE;
|
||||
case UNIT_MOD_RUNIC_POWER: return POWER_RUNIC_POWER;
|
||||
default: return POWER_MANA;
|
||||
|
|
@ -9397,12 +9391,6 @@ void Unit::SetPower(Powers power, uint32 val)
|
|||
if (owner && (owner->GetTypeId() == TYPEID_PLAYER) && ((Player*)owner)->GetGroup())
|
||||
((Player*)owner)->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_PET_CUR_POWER);
|
||||
}
|
||||
|
||||
// Update the pet's character sheet with happiness damage bonus
|
||||
if (pet->getPetType() == HUNTER_PET && power == POWER_HAPPINESS)
|
||||
{
|
||||
pet->UpdateDamagePhysical(BASE_ATTACK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -9497,7 +9485,6 @@ uint32 Unit::GetCreatePowers(Powers power) const
|
|||
return 100;
|
||||
return (GetTypeId() == TYPEID_PLAYER || !((Creature const*)this)->IsPet() || ((Pet const*)this)->getPetType() != HUNTER_PET ? 0 : 100);
|
||||
case POWER_ENERGY: return 100;
|
||||
case POWER_HAPPINESS: return (GetTypeId() == TYPEID_PLAYER || !((Creature const*)this)->IsPet() || ((Pet const*)this)->getPetType() != HUNTER_PET ? 0 : 1050000);
|
||||
case POWER_RUNE: return (GetTypeId() == TYPEID_PLAYER && ((Player const*)this)->getClass() == CLASS_DEATH_KNIGHT ? 8 : 0);
|
||||
case POWER_RUNIC_POWER: return (GetTypeId() == TYPEID_PLAYER && ((Player const*)this)->getClass() == CLASS_DEATH_KNIGHT ? 1000 : 0);
|
||||
case POWER_SOUL_SHARDS: return 0; // TODO: fix me
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue