• 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!

SPECIAL SKILLS (MANA LEECH & ETC)

lordposei

New Member
Joined
Jan 18, 2011
Messages
16
Reaction score
2
I've always changed the values, and never uint_8 / uint_16 and it doesn't give me the correct values within the game, what can I do? the closest I got was that.
Help me pls guys.

XML:
void ProtocolGame::AddPlayerSkills(NetworkMessage& msg)
{
    msg.addByte(0xA1);

    for (uint8_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {
        //msg.add<uint16_t>(std::min<int32_t>(player->getSkillLevel(i), std::numeric_limits<uint16_t>::max()));
        //msg.add<uint16_t>(player->getBaseSkill(i));
        msg.addByte(std::min<int32_t>(player->getSkillLevel(i), std::numeric_limits<uint8_t>::max()));
        msg.addByte(player->getSkillPercent(i));
    }

    for (uint8_t i = SPECIALSKILL_FIRST; i <= SPECIALSKILL_LAST; ++i) {
        msg.add<uint16_t>(std::min<uint16_t>(100, player->varSpecialSkills[i]));
        msg.add<uint16_t>(0);
    
}
}

skills1.pngskills2.png
 
Back
Top