IgoR lYCAN
New Member
- Joined
- Dec 1, 2018
- Messages
- 169
- Reaction score
- 4
Can you post your player.cpp?
Can you post your player.cpp?
![]()
opentibiabr/otservbr-global
OTServBR-Global 12x for OpenTibia community. https://forums.otserv.com.br - opentibiabr/otservbr-globalgithub.com
void Player::sendPing()
if (noPongTime >= 60000 && canLogout()) {
if (g_creatureEvents->playerLogout(this)) {
if (client) {
client->logout(true, true);
} else {
g_game.removeCreature(this, true);
}
}
}
bool Player::canLogout()
{
if (isConnecting) {
return false;
}
if (getTile()->hasFlag(TILESTATE_NOLOGOUT)) {
return false;
}
if (getTile()->hasFlag(TILESTATE_PROTECTIONZONE)) {
return true;
}
return !isPzLocked() && !hasCondition(CONDITION_INFIGHT);
}
return !isPzLocked() && !hasCondition(CONDITION_INFIGHT);
&& !hasCondition(CONDITION_INFIGHT)
Which kinda of problems this config avoids?C++:void Player::sendPing()
here you can see
C++:if (noPongTime >= 60000 && canLogout()) { if (g_creatureEvents->playerLogout(this)) { if (client) { client->logout(true, true); } else { g_game.removeCreature(this, true); } } }
so you need to look at canLogout func:
C++:bool Player::canLogout() { if (isConnecting) { return false; } if (getTile()->hasFlag(TILESTATE_NOLOGOUT)) { return false; } if (getTile()->hasFlag(TILESTATE_PROTECTIONZONE)) { return true; } return !isPzLocked() && !hasCondition(CONDITION_INFIGHT); }
which says
C++:return !isPzLocked() && !hasCondition(CONDITION_INFIGHT);
so you can just remove
C++:&& !hasCondition(CONDITION_INFIGHT)
what is not good idea in my opinion cuz a few bad things can happen then
@Perun ? '---'
It worked;
but
Which kinda of problems this config avoids?
You recommend dont change it?