Core: Fix build and cleanup whitespace and double semicolon

This commit is contained in:
Nay
2012-08-18 17:56:09 +01:00
parent 19bafce5b8
commit c43bba98a3
8 changed files with 28 additions and 22 deletions
+7 -7
View File
@@ -227,11 +227,11 @@ float Player::GetHealthBonusFromStamina()
{
// Taken from PaperDollFrame.lua - 4.3.4.15595
gtOCTHpPerStaminaEntry const* hpBase = sGtOCTHpPerStaminaStore.LookupEntry((getClass() - 1) * GT_MAX_LEVEL + getLevel() - 1);
float stamina = GetStat(STAT_STAMINA);
float baseStam = std::min(20, stamina);
float baseStam = std::min(20.0f, stamina);
float moreStam = stamina - baseStam;
return baseStam + moreStam * hpBase->ratio;
}
@@ -240,7 +240,7 @@ float Player::GetManaBonusFromIntellect()
// Taken from PaperDollFrame.lua - 4.3.4.15595
float intellect = GetStat(STAT_INTELLECT);
float baseInt = std::min(20, intellect);
float baseInt = std::min(20.0f, intellect);
float moreInt = intellect - baseInt;
return baseInt + (moreInt * 15.0f);
@@ -303,12 +303,12 @@ void Player::UpdateAttackPowerAndDamage(bool ranged)
{
float strengthValue = std::max((GetStat(STAT_STRENGTH) - 10.0f) * entry->APPerStrenth, 0.0f);
float agilityValue = std::max((GetStat(STAT_AGILITY) - 10.0f) * entry->APPerAgility, 0.0f);
SpellShapeshiftFormEntry const* form = sSpellShapeshiftFormStore.LookupEntry(GetShapeshiftForm());
// Directly taken from client, SHAPESHIFT_FLAG_AP_FROM_STRENGTH ?
if (form && form->flags1 & 0x20)
agilityValue += std::max((GetStat(STAT_AGILITY) - 10.0f) * entry->APPerStrenth, 0.0f);;
agilityValue += std::max((GetStat(STAT_AGILITY) - 10.0f) * entry->APPerStrenth, 0.0f);
val2 = strengthValue + agilityValue;
}