mirror of
https://github.com/moparisthebest/MoparClassic
synced 2025-02-28 08:21:52 -05:00
Update GameServer/src/org/moparscape/msc/gs/event/WalkMobToMobEvent.java
Fix Npc suddenly stopping when chasing player, and fix Npc not attacking if you move while player has moved.
This commit is contained in:
parent
35c80975de
commit
96ea6cc2d6
@ -67,8 +67,11 @@ public abstract class WalkMobToMobEvent extends DelayedEvent {
|
||||
|
||||
if (owner.withinRange(affectedMob, radius))
|
||||
arrived();
|
||||
else if (owner.hasMoved())
|
||||
else if (owner.hasMoved() || affectedMob.hasMoved()) {
|
||||
owner.resetPath();
|
||||
owner.setPath(new Path(owner.getX(), owner.getY(), affectedMob.getX(), affectedMob.getY()));
|
||||
return; // We're still moving
|
||||
}
|
||||
else {
|
||||
if (GameEngine.getTime() - startTime <= 10000) // Make NPCs
|
||||
// give a 10
|
||||
|
Loading…
x
Reference in New Issue
Block a user