Skip to content

Commit

Permalink
Fix Stamina Bug
Browse files Browse the repository at this point in the history
*If a player had a low stamina and died(depending on how long he had been online) he could regain some stamian back, this should fix it
  • Loading branch information
Reason184 committed Dec 12, 2019
1 parent 821c850 commit d756afc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion path_7_x/sources/player.cpp
Expand Up @@ -1537,10 +1537,11 @@ void Player::onCreatureDisappear(const Creature* creature, bool isLogout)
return;

client->clear(true);
lastLogout = time(NULL);

if(isLogout)
{
loginPosition = getPosition();
lastLogout = time(NULL);
}

Item* item = NULL;
Expand Down
3 changes: 2 additions & 1 deletion path_8_5x/sources/player.cpp
Expand Up @@ -1646,10 +1646,11 @@ void Player::onCreatureDisappear(const Creature* creature, bool isLogout)
return;

client->clear(true);
lastLogout = time(NULL);

if(isLogout)
{
loginPosition = getPosition();
lastLogout = time(NULL);
}

Item* item = NULL;
Expand Down
3 changes: 2 additions & 1 deletion path_8_6x/sources/player.cpp
Expand Up @@ -1646,10 +1646,11 @@ void Player::onCreatureDisappear(const Creature* creature, bool isLogout)
return;

client->clear(true);
lastLogout = time(NULL);

if(isLogout)
{
loginPosition = getPosition();
lastLogout = time(NULL);
}

Item* item = NULL;
Expand Down
3 changes: 2 additions & 1 deletion path_8_7x/sources/player.cpp
Expand Up @@ -1645,10 +1645,11 @@ void Player::onCreatureDisappear(const Creature* creature, bool isLogout)
return;

client->clear(true);
lastLogout = time(NULL);

if(isLogout)
{
loginPosition = getPosition();
lastLogout = time(NULL);
}

Item* item = NULL;
Expand Down

0 comments on commit d756afc

Please sign in to comment.