• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

C++ getManaForNextMLevel from table

legadoss

New Member
Joined
Jun 1, 2014
Messages
142
Reaction score
4
Hello, i tried to table for magicLevel, how much mana you need spent for next magic level.

my code:
C++:
uint64_t Player::getManaForNextMLevel(){
    uint64_t ManaForNextML[200] = {
        500,
        1000,
        1500,
        3000,
        6000,
        12000,
        24000,
    };

    //will calculate required mana for a magic level
   // uint64_t reqMana = (uint64_t) ( 400 * powf(ManaMultiplier[(uint64_t)voc], maglevel-1) );
  
    return ManaForNextML[maglevel] - manaspent;
    //old return getReqMana(maglevel+1, vocation) - manaspent;
}

#edit solved. this code is now fixed and working fine
 
Last edited:
Back
Top