C++:uint64_t experience = player->getExperience(); msg->put<uint64_t>(experience);
g_game.enableFeature(GameDoubleExperience)
function updateFeatures(version)
g_game.resetFeatures()
if version <= 0 then
return
end
You are using oldschool protocol correct? It's to prevent cip client from debug, you can probably fix it with otc, but i'm not sure how.There's a way to fix it @4Nathu4 ?
In client side i can see an true exp:
View attachment 63083
in database exp is correct:
View attachment 63084
msg.add<uint32_t>(std::min<uint32_t>(player->getExperience(), 0x7FFFFFFF)); // tibia client debugs if value is higher than 0x7FFFFFFF
Im already using OTClient, in 7.72 version, there is a way to change this @Silba ? Mine protocolgame.cpp:You are using oldschool protocol correct? It's to prevent cip client from debug, you can probably fix it with otc, but i'm not sure how.
protocolgame.cppmsg.add<uint32_t>(std::min<uint32_t>(player->getExperience(), 0x7FFFFFFF)); // tibia client debugs if value is higher than 0x7FFFFFFF
void ProtocolGame::AddPlayerStats(NetworkMessage_ptr msg)
{
msg->put<char>(0xA0);
msg->put<uint16_t>(player->getHealth());
msg->put<uint16_t>(player->getPlayerInfo(PLAYERINFO_MAXHEALTH));
msg->put<uint16_t>(int32_t(player->getFreeCapacity()));
uint32_t experience = player->getExperience();
msg->put<uint32_t>(experience);
#ifdef _MULTIPLATFORM76
msg->put<uint16_t>(player->getPlayerInfo(PLAYERINFO_LEVEL));
#else
msg->put<char>(player->getPlayerInfo(PLAYERINFO_LEVEL));
#endif
msg->put<char>(player->getPlayerInfo(PLAYERINFO_LEVELPERCENT));
msg->put<uint16_t>(player->getPlayerInfo(PLAYERINFO_MANA));
msg->put<uint16_t>(player->getPlayerInfo(PLAYERINFO_MAXMANA));
msg->put<char>(player->getPlayerInfo(PLAYERINFO_MAGICLEVEL));
msg->put<char>(player->getPlayerInfo(PLAYERINFO_MAGICLEVELPERCENT));
#ifdef _MULTIPLATFORM76
msg->put<char>(player->getPlayerInfo(PLAYERINFO_SOUL));
#endif
}
Oh okay, i missed your 0.x tag sorry, i assumed you used a nekiro downgrade.uint32_t experience = player->getExperience(); msg->put<uint32_t>(experience);
i have tried to start use nekiro downgrade, but have a lot of problems with map, so i gave up :/, i'will try change to 64Oh okay, i missed your 0.x tag sorry, i assumed you used a nekiro downgrade.
I think these lines are responsible, they are sending 32 bit integer. Maybe it's as easy as switching them to 64 bit, i'm not experienced enough in this area to give an answer sorry but this is definitely where you should be looking. As far as i know otc doesn't limit this, so it is server sided.
now bugged level changed lines:i have tried to start use nekiro downgrade, but have a lot of problems with map, so i gave up :/, i'will try change to 64
uint64_t experience = player->getExperience();
msg->put<uint64_t>(experience);
This is what i was afraid of and why i said im not experienced enough to answer, i hope you can figure it out. Hopefully someone who knows can give the appropriate help.i have tried to start use nekiro downgrade, but have a lot of problems with map, so i gave up :/, i'will try change to 64
Post automatically merged:
now bugged level changed lines:
C++:uint64_t experience = player->getExperience(); msg->put<uint64_t>(experience);
C++:uint64_t experience = player->getExperience(); msg->put<uint64_t>(experience);
g_game.enableFeature(GameDoubleExperience)
function updateFeatures(version)
g_game.resetFeatures()
if version <= 0 then
return
end
If you make the server send uint64, then you also need to read uint64 on the client side. Try executingi have tried to start use nekiro downgrade, but have a lot of problems with map, so i gave up :/, i'will try change to 64
Post automatically merged:
now bugged level changed lines:
C++:uint64_t experience = player->getExperience(); msg->put<uint64_t>(experience);
g_game.enableFeature(GameDoubleExperience)
in the OTC terminal before logging in and see if that helpsjust paste a decrypted file, thank you guys!