RuneHive-Game
Loading...
Searching...
No Matches
NpcPostUpdateTask.java
Go to the documentation of this file.
1package com.runehive.game.engine.sync.task;
2
3import com.runehive.game.world.entity.mob.npc.Npc;
4import org.apache.logging.log4j.LogManager;
5import org.apache.logging.log4j.Logger;
6
7public final class NpcPostUpdateTask extends SynchronizationTask {
8
9 private static final Logger logger = LogManager.getLogger(NpcPostUpdateTask.class);
10
11 private final Npc npc;
12
14 this.npc = npc;
15 }
16
17 @Override
18 public void run() {
19 try {
20 npc.updateFlags.clear();
21 npc.resetAnimation();
22 npc.resetGraphic();
23 npc.clearTeleportTarget();
24 npc.positionChange = false;
25 npc.regionChange = false;
26 npc.teleportRegion = false;
27 } catch (Exception ex) {
28 logger.error(String.format("Error in %s", NpcPostUpdateTask.class.getSimpleName()), ex);
29 }
30 }
31
32}
static final Logger logger
void run()
NpcPostUpdateTask(Npc npc)
final Npc npc
Represents a non-player character in the in-game world.
Definition Npc.java:29