Skip to content
This repository was archived by the owner on Sep 13, 2023. It is now read-only.

Commit 7ea7780

Browse files
committed
Loader fix
1 parent 9d763bb commit 7ea7780

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

index.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const sysmsg = require('tera-data-parser').sysmsg,
1717
const isDirectory = source => lstatSync(source).isDirectory();
1818

1919
//filter "module without _" => true
20-
const isActiveModule = source => !source.includes('_');
20+
const isActiveModule = source => !source[0].includes('_');
2121

2222
//function return "c" from "a/b/c"
2323
const getShortDirName = source => (source.slice(source.lastIndexOf(path.sep) + 1, source.length)).toLowerCase();
@@ -33,8 +33,8 @@ const getModules = source =>
3333
let currentDir = getShortDirName(__dirname);
3434
let blockedModules = ['cooldowns', 'lockons', 'lockons-master', 'fastfire', 'fast-fire', 'fast-fire-master', 'fast-block',
3535
'skill-prediction', 'skill-prediction-master', 'skill-prediction-exp', 'skill-prediction-experimental',
36-
'sp', 'cooldowns-master', 'fast-block-master', 'skillprediction', 'pinkie-sp', 'sp-pinkie']
37-
// 'let-me-target', 'let-me-target-master', 'flymore', 'letmetarget', 'fly-more', 'fly-more-master', 'exploit', 'projectile', 'projectileexploit', 'meme', 'c_hit', 'C_HIT'];
36+
'sp', 'cooldowns-master', 'fast-block-master', 'skillprediction', 'pinkie-sp', 'sp-pinkie'];
37+
3838
let errorState = false;
3939
let installedModules = null;
4040

@@ -47,12 +47,12 @@ installedModules = (getModules(path.resolve(__dirname, '../'))).filter(element =
4747

4848
//check for blocked modules
4949
for (item of installedModules) {
50-
for (blk of blockedModules) {
51-
if (item === blk) {
52-
console.log(`[${currentDir}] ERROR! Blocked module ${item} installed.`);
53-
errorState = true
54-
}
55-
}
50+
for (blk of blockedModules) {
51+
if (item === blk) {
52+
console.log(`[${currentDir}] ERROR! Blocked module ${item} installed.`);
53+
errorState = true
54+
}
55+
}
5656
}
5757

5858
//check for "command"

lib/core.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ module.exports = function SkillPrediction(dispatch) {
8686
canChainVB = false,
8787
switchVB = false
8888

89-
dispatch.hook('C_CHECK_VERSION', 'raw', () => {
89+
dispatch.hookOnce('C_CHECK_VERSION', 'raw', () => {
9090
skills = awakeningProtocols.includes(dispatch.base.protocolVersion) ? require('../config/data/awakening') : require('../config/data/skills');
9191
});
9292

0 commit comments

Comments
 (0)