1
0

Player Xp, includes get/set and addExperience

This commit is contained in:
Daniel O'Brien 2013-11-14 01:05:58 +11:00
parent 3b47a07bac
commit fc0b6adf51

View File

@ -1374,13 +1374,14 @@ bool cPlayer::LoadFromDisk()
}
m_Health = root.get("health", 0).asInt();
m_XpLevel = root.get("experience", 0).asInt();
m_AirLevel = root.get("air", MAX_AIR_LEVEL).asInt();
m_FoodLevel = root.get("food", MAX_FOOD_LEVEL).asInt();
m_FoodSaturationLevel = root.get("foodSaturation", MAX_FOOD_LEVEL).asDouble();
m_FoodTickTimer = root.get("foodTickTimer", 0).asInt();
m_FoodExhaustionLevel = root.get("foodExhaustion", 0).asDouble();
SetExperience(root.get("experience", 0).asInt());
m_GameMode = (eGameMode) root.get("gamemode", eGameMode_NotSet).asInt();
m_Inventory.LoadFromJson(root["inventory"]);