Esempio n. 1
0
bool CItemWeapon::addWsPoints(uint8 points)
{
    if (getCurrentUnlockPoints() + points >= m_wsunlockpoints)
    {
        setCurrentUnlockPoints(m_wsunlockpoints);
        return true;
    }
    else
    {
        setCurrentUnlockPoints(getCurrentUnlockPoints() + points);
        return false;
    }
}
Esempio n. 2
0
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;
}
Esempio n. 3
0
bool CItemWeapon::isUnlocked()
{
    return isUnlockable() && getCurrentUnlockPoints() == m_wsunlockpoints;
}