Core/DataStores: Refactored "gt" dbc handling. Wrapped these stores in a new GameTable class which will calculate correct dbc entry index based on given row/column as well as read number of rows/columns from client files instead of hardcoded GT_MAX_LEVEL

This commit is contained in:
Shauren
2014-12-07 01:50:50 +01:00
parent b68b6417f6
commit 1b0d296da1
9 changed files with 155 additions and 83 deletions
+1 -1
View File
@@ -258,7 +258,7 @@ float Player::GetHealthBonusFromStamina()
{
// Taken from PaperDollFrame.lua - 4.3.4.15595
float ratio = 10.0f;
if (gtOCTHpPerStaminaEntry const* hpBase = sGtOCTHpPerStaminaStore.LookupEntry((getClass() - 1) * GT_MAX_LEVEL + getLevel() - 1))
if (gtOCTHpPerStaminaEntry const* hpBase = sGtOCTHpPerStaminaStore.EvaluateTable(getLevel() - 1, 0))
ratio = hpBase->ratio;
float stamina = GetStat(STAT_STAMINA);