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

Solved Tibia Client "Premium Account (X days left)" data handling

angelobodj

Lazy OT Researcher
Joined
Dec 24, 2009
Messages
107
Reaction score
3
Location
Spain
Hello OTLand,

KeVRbuk.png


I want to ask you how can I know where does the client take the Premium Account "X days left" number from, and how can I change it, so making it show another number that is not the one shown in "premdays" in database.

I've looked around iologindata.cpp and I've tried editing from there, but if I make it show another field that isn't "premdays", then Premium Accounts doesn't work as they should (they take the new quantity, not the one in "premdays").

Any ideas of how could I manage to fix this please? :$

Regards!
 
Last edited:
protocollogin.cpp (0.2)
[CPP] //Add premium days
if(g_config.getBoolean(ConfigManager::FREE_PREMIUM))
output->AddU16(0xFFFF); //client displays free premium
else
output->AddU16(account.premiumDays);

OutputMessagePool::getInstance()->send(output);[/CPP]
 
0.2.15:
Subversion

Function: bool ProtocolLogin::parseFirstPacket(NetworkMessage& msg)
[cpp]
//Add premium days
if(g_config.getBoolean(ConfigManager::FREE_PREMIUM))
output->AddU16(0xFFFF); //client displays free premium
else
output->AddU16(account.premiumDays);[/cpp]
 
protocollogin.cpp (0.2)
[CPP] //Add premium days
if(g_config.getBoolean(ConfigManager::FREE_PREMIUM))
output->AddU16(0xFFFF); //client displays free premium
else
output->AddU16(account.premiumDays);

OutputMessagePool::getInstance()->send(output);[/CPP]

0.2.15:
Subversion

Function: bool ProtocolLogin::parseFirstPacket(NetworkMessage& msg)
[cpp]
//Add premium days
if(g_config.getBoolean(ConfigManager::FREE_PREMIUM))
output->AddU16(0xFFFF); //client displays free premium
else
output->AddU16(account.premiumDays);[/cpp]

Ahum.. I feel so stupid that I thought it should be in iologindata.cpp for sure xD

I guess I should start reading the whole sources to avoid this kind of dumbnesses :p

Thank you both so much :)
 
Back
Top