Browse Source

some smol fix

SaltyMonkey 6 years ago
parent
commit
7bcbc3ab9f
1 changed files with 7 additions and 0 deletions
  1. 7 0
      lib/unitTracker.js

+ 7 - 0
lib/unitTracker.js

@@ -79,6 +79,13 @@ class unitTracker {
 					else {
 						this.spawnedNPCS.set(event.gameId, event);
 					}
+
+					// eslint-disable-next-line no-magic-numbers
+					if (event.replaceId !== BigInt(0)) {
+						this.spawnedNPCS.delete(event.gameId);
+						this.spawnedSummons.delete(event.gameId);
+					}
+
 					break;
 			}
 		};