Browse Source

exclude event thingies from blocks completely

SaltyMonkey 6 years ago
parent
commit
6298643cf2
2 changed files with 3 additions and 2 deletions
  1. 2 0
      lib/unitFps.js
  2. 1 2
      lib/unitTracker.js

+ 2 - 0
lib/unitFps.js

@@ -135,6 +135,8 @@ class unitFps {
 
 		const isNpcBlockable = (event) => {
 			if (data.activeMode.blockNpcs) {
+				if(event.bySpawnEvent) return false;
+				
 				if (utils.arraysHasIntersect(event.templateId, data.activeMode.blockNpcs.templateId))
 					return true;
 				else if (utils.arraysHasIntersect(event.huntingZoneId, data.activeMode.blockNpcs.huntingZoneId))

+ 1 - 2
lib/unitTracker.js

@@ -78,8 +78,7 @@ class unitTracker {
 					this.spawnedSummons.delete(event.gameId);
 					break;
 				case (ENTITY_HOOK_TYPE.SPAWN):
-					// eslint-disable-next-line no-magic-numbers
-					if (event.huntingZoneId === SPECIAL_ZONES.HELPERS && this.spawnedPlayers.has(event.owner)) {
+					if (!event.bySpawnEvent && event.huntingZoneId === SPECIAL_ZONES.HELPERS && this.spawnedPlayers.has(event.owner)) {
 						this.spawnedSummons.set(event.gameId, event);
 					}
 					else {