mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-16 06:13:45 -04:00
Fixed client crash when buffs clear on corpse
Corpse despawn now Patrolling NPCs dont despawn, still fixing it
This commit is contained in:
@@ -224,7 +224,8 @@ public class BuffService implements INetworkDispatch {
|
||||
public void run() {
|
||||
|
||||
try {
|
||||
removeBuffFromCreature(target, buff);
|
||||
if (target!=null && buff != null)
|
||||
removeBuffFromCreature(target, buff);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -243,10 +244,12 @@ public class BuffService implements INetworkDispatch {
|
||||
public void run() {
|
||||
try {
|
||||
if (buffer == null || buffer.getClient() == null)
|
||||
removeBuffFromCreature(target, buff);
|
||||
if (target!=null && buff != null)
|
||||
removeBuffFromCreature(target, buff);
|
||||
|
||||
if (target.getWorldPosition().getDistance2D(buffer.getWorldPosition()) > 80) {
|
||||
removeBuffFromCreature(target, buff);
|
||||
if (target!=null && buff != null)
|
||||
removeBuffFromCreature(target, buff);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -388,7 +391,8 @@ public class BuffService implements INetworkDispatch {
|
||||
if(buff.getRemainingDuration() > 0 && buff.getDuration() > 0) {
|
||||
ScheduledFuture<?> task = scheduler.schedule(() -> {
|
||||
try {
|
||||
removeBuffFromCreature(creature, buff);
|
||||
if (creature!=null && buff != null)
|
||||
removeBuffFromCreature(creature, buff);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user