vitorelias1
New Member
- Joined
- Sep 27, 2022
- Messages
- 27
- Reaction score
- 2
In this case, I wanted to put it while the player does not reach 65535 life and mana, his life and mana are not in %, it would remain standard there when he reaches 65535 life there it would be in % 100 the same thing for mana in theory it worked when caught a character that has 65535 he is 100% the same for mana, now if I take a low level character he is literally 0 life and mana.
i'm sorry inglish bad google translate
if (player->getPlayerInfo(PLAYERINFO_MAXMANA) -> 65535)
{
msg->put<uint16_t>(player->getPlayerInfo(PLAYERINFO_MANA) * 100 / player->getPlayerInfo(PLAYERINFO_MAXMANA));
msg->put<uint16_t>(100);
}
else
{
msg->put<uint16_t>(0);
msg->put<uint16_t>(0);
}
i'm sorry inglish bad google translate
if (player->getPlayerInfo(PLAYERINFO_MAXMANA) -> 65535)
{
msg->put<uint16_t>(player->getPlayerInfo(PLAYERINFO_MANA) * 100 / player->getPlayerInfo(PLAYERINFO_MAXMANA));
msg->put<uint16_t>(100);
}
else
{
msg->put<uint16_t>(0);
msg->put<uint16_t>(0);
}