bool CItemWeapon::addWsPoints(uint8 points) { if (getCurrentUnlockPoints() + points >= m_wsunlockpoints) { setCurrentUnlockPoints(m_wsunlockpoints); return true; } else { setCurrentUnlockPoints(getCurrentUnlockPoints() + points); return false; } }
inline int32 CLuaItem::getWeaponskillPoints(lua_State* L) { DSP_DEBUG_BREAK_IF(m_PLuaItem == nullptr); auto PItem = dynamic_cast<CItemWeapon*>(m_PLuaItem); if (PItem) lua_pushinteger(L, PItem->getCurrentUnlockPoints()); else lua_pushinteger(L, 0); return 1; }
bool CItemWeapon::isUnlocked() { return isUnlockable() && getCurrentUnlockPoints() == m_wsunlockpoints; }