C++:
if (!getTile()->hasFlag(TILESTATE_NOLOGOUT) && !isAccessPlayer() && !isExerciseTraining()) {
idleTime += interval;
const int32_t kickAfterMinutes = g_configManager().getNumber(KICK_AFTER_MINUTES);
if (idleTime > (kickAfterMinutes * 60000) + 60000) {
removePlayer(true);
} else if (client && idleTime == 60000 * kickAfterMinutes) {
std::ostringstream ss;
ss << "There was no variation in your behaviour for " << kickAfterMinutes << " minutes. You will be disconnected in one minute if there is no change in your actions until then.";
client->sendTextMessage(TextMessage(MESSAGE_ADMINISTRADOR, ss.str()));
}
}
I would like that if the player is attacking a monster the time does not count
if (!getTile()->hasFlag(TILESTATE_NOLOGOUT) && !isAccessPlayer() && !isExerciseTraining()) {