dervin13
Active Member
- Joined
- Apr 26, 2008
- Messages
- 458
- Solutions
- 1
- Reaction score
- 28
Hello, i got a problem that i put freePremium = false in config.lua, and if player get any premium day he will get automaticaly free premium when log in to account... where i can change it?
** The problem is probably in protocollogin.cpp but i cant fix it in tfs 1.2
**Solved
in protocollogin.cpp was
and i chance to
** The problem is probably in protocollogin.cpp but i cant fix it in tfs 1.2
**Solved
in protocollogin.cpp was
Code:
//Add premium days
if (version >= 1080) {
if (version >= 1082)
output->addByte(0);
output->addByte(0x01);
output->add<uint32_t>(0);
}
else {
output->add<uint16_t>(g_config.getBoolean(ConfigManager::FREE_PREMIUM) ? 0xFFFF : account.premiumDays);
}
send(output);
disconnect();
}
and i chance to
Code:
// Add premium days
if (version >= 1080) {
if (version >= 1082)
output->addByte(0);
output->addByte(g_config.getBoolean(ConfigManager::FREE_PREMIUM) || account.premiumDays > 0);
output->add<uint32_t>(g_config.getBoolean(ConfigManager::FREE_PREMIUM) ? 0 : (time(nullptr) + (account.premiumDays * 86400)));
}
else {
output->add<uint16_t>(g_config.getBoolean(ConfigManager::FREE_PREMIUM) ? 0xFFFF : account.premiumDays);
}
send(output);
disconnect();
}
Last edited: