Browse Source

split ccb from effects

SaltyMonkey 6 years ago
parent
commit
3fd9c6a6af
2 changed files with 6 additions and 1 deletions
  1. 1 0
      lib/unitFps.js
  2. 5 1
      lib/unitState.js

+ 1 - 0
lib/unitFps.js

@@ -215,6 +215,7 @@ class unitFps {
 			if (data.activeMode.blockBuffs) {
 				if (data.whitelistAbnormals.has(event.id)) return false;
 
+				if (data.activeMode.blockBuffs.ccb && data.ccbBuffs.has(event.id)) return true;
 				if (data.activeMode.blockBuffs.area && !isMe(event.target) && tracker.spawnedPlayers.has(event.target)) return true;
 				if (data.activeMode.blockBuffs.shapeChange && data.shapeChangersBuffs.has(event.id)) return true;
 				if (data.activeMode.blockBuffs.effects && data.onScreenEffectsBuffs.has(event.id)) return true;

+ 5 - 1
lib/unitState.js

@@ -22,7 +22,8 @@ const { RAW_HOOK_MODE, HOOK_SETTINGS, ABN, EVENTS } = require("./helpers/enums")
 
 //types for abnormals to find in client data
 const shapeChangers = [ABN.BigHead, ABN.ShapeChanger];
-const onScreenEffects = [ABN.FX, ABN.PostProcessingEffect, ABN.CCB];
+const onScreenEffects = [ABN.FX, ABN.PostProcessingEffect];
+const ccbEffects = [ABN.CCB];
 
 class unitState extends EventEmitter {
 	/**
@@ -51,6 +52,7 @@ class unitState extends EventEmitter {
 			//lookup structures 
 			"shapeChangersBuffs": new Set(),
 			"onScreenEffectsBuffs": new Set(),
+			"ccbBuffs": new Set(),
 			"smtData": new Set(),
 			"specialAs": new Set(),
 			"whitelistAbnormals": new Set(),
@@ -63,6 +65,8 @@ class unitState extends EventEmitter {
 				this.shapeChangersBuffs.add(abnormality.id);
 			if (utils.arraysHasIntersect(types, onScreenEffects))
 				this.onScreenEffectsBuffs.add(abnormality.id);
+			if (utils.arraysHasIntersect(types, ccbEffects))
+				this.ccbBuffs.add(abnormality.id);
 		});
 
 		this.__mod.queryData("/S1ActionScripts@type=?/Script/", ["Teleport"], true, false, ["id"]).then(result => {