mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +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
|
|
@ -1120,27 +1120,6 @@ void Pet::UpdateDamagePhysical(WeaponAttackType attType)
|
|||
float mindamage = ((base_value + weapon_mindamage) * base_pct + total_value) * total_pct;
|
||||
float maxdamage = ((base_value + weapon_maxdamage) * base_pct + total_value) * total_pct;
|
||||
|
||||
// Pet's base damage changes depending on happiness
|
||||
if (getPetType() == HUNTER_PET && attType == BASE_ATTACK)
|
||||
{
|
||||
switch (GetHappinessState())
|
||||
{
|
||||
case HAPPY:
|
||||
// 125% of normal damage
|
||||
mindamage = mindamage * 1.25f;
|
||||
maxdamage = maxdamage * 1.25f;
|
||||
break;
|
||||
case CONTENT:
|
||||
// 100% of normal damage, nothing to modify
|
||||
break;
|
||||
case UNHAPPY:
|
||||
// 75% of normal damage
|
||||
mindamage = mindamage * 0.75f;
|
||||
maxdamage = maxdamage * 0.75f;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
SetStatFloatValue(UNIT_FIELD_MINDAMAGE, mindamage);
|
||||
SetStatFloatValue(UNIT_FIELD_MAXDAMAGE, maxdamage);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue