mirror of
https://github.com/whoahq/whoa.git
synced 2026-11-12 17:25:04 +03:00
feat(object): simplify getters in CGPlayer_C
This commit is contained in:
3 files changed
+8
-8
No files matched your search
@@ -189,7 +189,7 @@ int32_t Script_UnitXP(lua_State* L) {
|
||||
float xp = 0.0f;
|
||||
|
||||
if (unit && unit->IsA(TYPE_PLAYER)) {
|
||||
xp = static_cast<CGPlayer_C*>(unit)->GetActiveXP();
|
||||
xp = static_cast<CGPlayer_C*>(unit)->GetXP();
|
||||
}
|
||||
|
||||
lua_pushnumber(L, xp);
|
||||
@@ -209,7 +209,7 @@ int32_t Script_UnitXPMax(lua_State* L) {
|
||||
float xpMax = 0.0f;
|
||||
|
||||
if (unit && unit->IsA(TYPE_PLAYER)) {
|
||||
xpMax = static_cast<CGPlayer_C*>(unit)->GetActiveNextLevelXP();
|
||||
xpMax = static_cast<CGPlayer_C*>(unit)->GetNextLevelXP();
|
||||
}
|
||||
|
||||
lua_pushnumber(L, xpMax);
|
||||
|
||||
Reference in new issue
Block a user