hey guys
one question
is posible chnge hp and mana to % in CipSoft 8.6 tibia ? not in ots engine in CipSoft 8.6 tibia
e.x 40/250hp
20/100 %
i found
but this is to protocolgame.cpp in TFS
one question
is posible chnge hp and mana to % in CipSoft 8.6 tibia ? not in ots engine in CipSoft 8.6 tibia
e.x 40/250hp
20/100 %
i found
Code:
void ProtocolGame::AddPlayerStats(NetworkMessage_ptr msg)
{
msg->put<char>(0xA0);
msg->put((uint16_t)std::ceil(player->getHealth() * 100 / player->getPlayerInfo(PLAYERINFO_MAXHEALTH)));
msg->put((uint16_t)100);
msg->put<uint32_t>(uint32_t(player->getFreeCapacity() * 100));
uint64_t experience = player->getExperience();
if(experience > 0x7FFFFFFF) // client debugs after 2,147,483,647 exp
msg->put<uint32_t>(0x7FFFFFFF);
else
msg->put<uint32_t>(experience);
msg->put<uint16_t>(player->getPlayerInfo(PLAYERINFO_LEVEL));
msg->put<char>(player->getPlayerInfo(PLAYERINFO_LEVELPERCENT));
msg->put((uint16_t)std::ceil(player->getMana() * 100 / player->getPlayerInfo(PLAYERINFO_MAXMANA)));
msg->put((uint16_t)100);
msg->put<char>(player->getPlayerInfo(PLAYERINFO_MAGICLEVEL));
msg->put<char>(player->getPlayerInfo(PLAYERINFO_MAGICLEVELPERCENT));
msg->put<char>(player->getPlayerInfo(PLAYERINFO_SOUL));
msg->put<uint16_t>(player->getStaminaMinutes());
but this is to protocolgame.cpp in TFS