Wrap around hpDec schedules (#75)

* Wrap around hpDec schedules

Merges hpDec schedules at character into a world schedule.

* Patch hpDec timer reset on changing maps

Patch timer reset on changing maps with hpDec.

* Update Character.java

* Update Client.java

* Update World.java

Co-authored-by: Ronan Lana <rcpl2010@gmail.com>
This commit is contained in:
ronancpl7
2022-08-03 02:42:15 -03:00
committed by GitHub
parent e5e9b50215
commit 905a0260a6
9 changed files with 86 additions and 33 deletions

View File

@@ -940,6 +940,10 @@ public class Client extends ChannelInboundHandlerAdapter {
if (MapId.isDojo(mapId)) {
this.getChannelServer().freeDojoSectionIfEmpty(mapId);
}
if (player.getMap().getHPDec() > 0) {
getWorldServer().removePlayerHpDecrease(player);
}
}
} catch (final Throwable t) {