|
@@ -11,9 +11,9 @@ module.exports = {
|
|
|
},
|
|
},
|
|
|
pluginName: 'SWDB',
|
|
pluginName: 'SWDB',
|
|
|
pluginDescription: 'Saves runs to SWDB.',
|
|
pluginDescription: 'Saves runs to SWDB.',
|
|
|
- target_host: 'localhost',
|
|
|
|
|
|
|
+ target_host: 'http://localhost',
|
|
|
target_port: '80',
|
|
target_port: '80',
|
|
|
- target_url: 'upload/run',
|
|
|
|
|
|
|
+ target_url: '/API/v1/log-run',
|
|
|
temp: {},
|
|
temp: {},
|
|
|
proxy: null,
|
|
proxy: null,
|
|
|
config: null,
|
|
config: null,
|
|
@@ -29,32 +29,35 @@ module.exports = {
|
|
|
this.config = config;
|
|
this.config = config;
|
|
|
proxy.on('apiCommand', (req, resp) => {
|
|
proxy.on('apiCommand', (req, resp) => {
|
|
|
try {
|
|
try {
|
|
|
|
|
+ wizardID = '';
|
|
|
|
|
+ command = '';
|
|
|
if (config.Config.Plugins[this.pluginName].enabled) {
|
|
if (config.Config.Plugins[this.pluginName].enabled) {
|
|
|
- const { command, wizard_id: wizardID } = req;
|
|
|
|
|
-
|
|
|
|
|
|
|
+ //const { command, wizard_id: wizardID } = req;
|
|
|
|
|
+ command = req["command"];
|
|
|
|
|
+ wizardID = req["wizard_id"];
|
|
|
|
|
+ }
|
|
|
if (!this.temp[wizardID]) {
|
|
if (!this.temp[wizardID]) {
|
|
|
this.temp[wizardID] = {};
|
|
this.temp[wizardID] = {};
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
if (command === 'BattleScenarioStart') {
|
|
if (command === 'BattleScenarioStart') {
|
|
|
proxy.log({ type: 'info', source: 'plugin', name: this.pluginName, message: `IVV RUN START: ${resp}` })
|
|
proxy.log({ type: 'info', source: 'plugin', name: this.pluginName, message: `IVV RUN START: ${resp}` })
|
|
|
- for (var key in req) {
|
|
|
|
|
- proxy.log({ type: 'info', source: 'plugin', name: this.pluginName, message: `IVV REQ: ${key}: ${req[key]}` })
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ //for (var key in req) {
|
|
|
|
|
+ // proxy.log({ type: 'info', source: 'plugin', name: this.pluginName, message: `IVV REQ: ${key}: ${req[key]}` })
|
|
|
|
|
+ //}
|
|
|
this.temp[wizardID].area = req.region_id;
|
|
this.temp[wizardID].area = req.region_id;
|
|
|
this.temp[wizardID].stage = req.stage_no;
|
|
this.temp[wizardID].stage = req.stage_no;
|
|
|
this.temp[wizardID].difficulty = req.difficulty;
|
|
this.temp[wizardID].difficulty = req.difficulty;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (command === 'BattleScenarioResult' || command === 'BattleDungeonResult' || command === 'BattleDimensionHoleDungeonResult') {
|
|
if (command === 'BattleScenarioResult' || command === 'BattleDungeonResult' || command === 'BattleDimensionHoleDungeonResult') {
|
|
|
- proxy.log({ type: 'info', source: 'plugin', name: this.pluginName, message: `IVV RUN RESULT: ${resp}` })
|
|
|
|
|
|
|
+ //proxy.log({ type: 'info', source: 'plugin', name: this.pluginName, message: `IVV RUN RESULT: ${resp}` })
|
|
|
//for (var key in req) {
|
|
//for (var key in req) {
|
|
|
// this.log("info", `IVV REQ: ${key}: ${req[key]}`);
|
|
// this.log("info", `IVV REQ: ${key}: ${req[key]}`);
|
|
|
//}
|
|
//}
|
|
|
//for (var key in resp) {
|
|
//for (var key in resp) {
|
|
|
// this.log("info", `IVV RES: ${key}: ${resp[key]}`);
|
|
// this.log("info", `IVV RES: ${key}: ${resp[key]}`);
|
|
|
//}
|
|
//}
|
|
|
- this.parse(req, resp);
|
|
|
|
|
|
|
+ this.parse_normal(req, resp);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (command === 'BattleRiftOfWorldsRaidResult') {
|
|
if (command === 'BattleRiftOfWorldsRaidResult') {
|
|
@@ -112,7 +115,7 @@ module.exports = {
|
|
|
item = crate.craft_stuff.item_master_id;
|
|
item = crate.craft_stuff.item_master_id;
|
|
|
quantity = crate.craft_stuff.item_quantity;
|
|
quantity = crate.craft_stuff.item_quantity;
|
|
|
}
|
|
}
|
|
|
- //this.log('debug', `Item: ${item}, ${unit}, ${pieces}, ${quantity}, ${shapeshifting}`);
|
|
|
|
|
|
|
+ //this.log('DEBUG', `Item: ${item}, ${unit}, ${pieces}, ${quantity}, ${shapeshifting}`);
|
|
|
drop = {item, unit, pieces, quantity, shapeshifting}
|
|
drop = {item, unit, pieces, quantity, shapeshifting}
|
|
|
return drop;
|
|
return drop;
|
|
|
},
|
|
},
|
|
@@ -195,10 +198,8 @@ module.exports = {
|
|
|
const run_k_party = {};
|
|
const run_k_party = {};
|
|
|
log = true;
|
|
log = true;
|
|
|
|
|
|
|
|
- run.uid = wizardID;
|
|
|
|
|
-
|
|
|
|
|
if (command === 'BattleDungeonResult') {
|
|
if (command === 'BattleDungeonResult') {
|
|
|
- if (eq.dungeon_id > 10000){
|
|
|
|
|
|
|
+ if (req.dungeon_id > 10000){
|
|
|
// Hall of Heroes or unknown
|
|
// Hall of Heroes or unknown
|
|
|
log = false;
|
|
log = false;
|
|
|
}
|
|
}
|
|
@@ -209,7 +210,7 @@ module.exports = {
|
|
|
|
|
|
|
|
if (command === 'BattleScenarioResult') {
|
|
if (command === 'BattleScenarioResult') {
|
|
|
for (var key in this.temp[wizardID]) {
|
|
for (var key in this.temp[wizardID]) {
|
|
|
- this.log("debug", `IVV TEMP: ${key}: ${this.temp[wizardID][key]}`);
|
|
|
|
|
|
|
+ this.log("DEBUG", `IVV TEMP: ${key}: ${this.temp[wizardID][key]}`);
|
|
|
}
|
|
}
|
|
|
run.area = this.temp[wizardID].area;
|
|
run.area = this.temp[wizardID].area;
|
|
|
run.stage = this.temp[wizardID].stage;
|
|
run.stage = this.temp[wizardID].stage;
|
|
@@ -224,10 +225,10 @@ module.exports = {
|
|
|
run.stage = req.stage_id;
|
|
run.stage = req.stage_id;
|
|
|
run.difficulty = 0
|
|
run.difficulty = 0
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ run.uid = wizardID;
|
|
|
run.win = resp.win_lose; // 1/0 2 is lost in scenario
|
|
run.win = resp.win_lose; // 1/0 2 is lost in scenario
|
|
|
|
|
|
|
|
- run.dtime = dateFormat(new Date(), 'yyyy-mm-dd HH:MM:SS');
|
|
|
|
|
|
|
+ run.dtime = dateFormat(new Date(), 'yyyy-mm-dd HH:MM:ss');
|
|
|
|
|
|
|
|
const reward = resp.reward ? resp.reward : {};
|
|
const reward = resp.reward ? resp.reward : {};
|
|
|
run.time = req.clear_time ? req.clear_time : 0;
|
|
run.time = req.clear_time ? req.clear_time : 0;
|
|
@@ -235,6 +236,9 @@ module.exports = {
|
|
|
run.mana = reward.mana ? reward.mana : 0;
|
|
run.mana = reward.mana ? reward.mana : 0;
|
|
|
run.energy = reward.energy ? reward.energy : 0;
|
|
run.energy = reward.energy ? reward.energy : 0;
|
|
|
run.crystal = reward.crystal ? reward.crystal : 0;
|
|
run.crystal = reward.crystal ? reward.crystal : 0;
|
|
|
|
|
+
|
|
|
|
|
+ // TODO: GET
|
|
|
|
|
+ run.helper = 0;
|
|
|
|
|
|
|
|
run.rune = {};
|
|
run.rune = {};
|
|
|
run.unit = 0;
|
|
run.unit = 0;
|
|
@@ -250,9 +254,9 @@ module.exports = {
|
|
|
|
|
|
|
|
if (reward.crate.rune) {
|
|
if (reward.crate.rune) {
|
|
|
const rune = reward.crate.rune;
|
|
const rune = reward.crate.rune;
|
|
|
- for (var key in rune) {
|
|
|
|
|
- this.proxy.log({ type: 'info', source: 'plugin', name: this.pluginName, message: `IVV RUNE: ${key}: ${rune[key]}` })
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ //for (var key in rune) {
|
|
|
|
|
+ // this.proxy.log({ type: 'info', source: 'plugin', name: this.pluginName, message: `IVV RUNE: ${key}: ${rune[key]}` })
|
|
|
|
|
+ //}
|
|
|
run.rune.id = rune.rune_id;
|
|
run.rune.id = rune.rune_id;
|
|
|
run.rune.grade = rune.class;
|
|
run.rune.grade = rune.class;
|
|
|
run.rune.value = rune.sell_value;
|
|
run.rune.value = rune.sell_value;
|
|
@@ -260,7 +264,6 @@ module.exports = {
|
|
|
run.rune.slot = rune.slot_no;
|
|
run.rune.slot = rune.slot_no;
|
|
|
run.rune.efficiency = gMapping.getRuneEfficiency(rune).current;
|
|
run.rune.efficiency = gMapping.getRuneEfficiency(rune).current;
|
|
|
run.rune.quality = rune.rank;
|
|
run.rune.quality = rune.rank;
|
|
|
- // TODO: Maybe i need to do substrings to get stat and value
|
|
|
|
|
run.rune.main = rune.pri_eff[0];
|
|
run.rune.main = rune.pri_eff[0];
|
|
|
run.rune.main_value = rune.pri_eff[1];
|
|
run.rune.main_value = rune.pri_eff[1];
|
|
|
if (rune.prefix_eff){
|
|
if (rune.prefix_eff){
|
|
@@ -300,7 +303,7 @@ module.exports = {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
json_rune = '[';
|
|
json_rune = '[';
|
|
|
- if (run.rune.length() > 0){
|
|
|
|
|
|
|
+ if (run.rune.length > 0){
|
|
|
json_rune += `"id": "${run.rune.id}", `;
|
|
json_rune += `"id": "${run.rune.id}", `;
|
|
|
json_rune += `"grade": "${run.rune.grade}", `;
|
|
json_rune += `"grade": "${run.rune.grade}", `;
|
|
|
json_rune += `"set": "${run.rune.set}", `;
|
|
json_rune += `"set": "${run.rune.set}", `;
|
|
@@ -319,23 +322,23 @@ module.exports = {
|
|
|
json_rune += `"substat_3": "${run.rune.substat_3}", `;
|
|
json_rune += `"substat_3": "${run.rune.substat_3}", `;
|
|
|
json_rune += `"substat_4_value": "${run.rune.substat_3_value}", `;
|
|
json_rune += `"substat_4_value": "${run.rune.substat_3_value}", `;
|
|
|
json_rune += `"substat_4": "${run.rune.substat_4}", `;
|
|
json_rune += `"substat_4": "${run.rune.substat_4}", `;
|
|
|
- json_rune += `"substat_4_value": "${run.rune.substat_4_value}", `;
|
|
|
|
|
|
|
+ json_rune += `"substat_4_value": "${run.rune.substat_4_value}"`;
|
|
|
}
|
|
}
|
|
|
- json_rune = json_party.slice(0, -1) + "]";
|
|
|
|
|
|
|
+ json_rune = json_rune + "]";
|
|
|
|
|
|
|
|
json_item = '[';
|
|
json_item = '[';
|
|
|
- if (run.item.length() > 0){
|
|
|
|
|
|
|
+ if (run.item.length > 0){
|
|
|
json_item += `"id": "${run.item.id}", `;
|
|
json_item += `"id": "${run.item.id}", `;
|
|
|
- json_item += `"quantity": "${run.item.quantity}", `;
|
|
|
|
|
|
|
+ json_item += `"quantity": "${run.item.quantity}"`;
|
|
|
}
|
|
}
|
|
|
- json_item = json_party.slice(0, -1) + "]";
|
|
|
|
|
|
|
+ json_item = json_item + "]";
|
|
|
|
|
|
|
|
json_unit_pieces = '[';
|
|
json_unit_pieces = '[';
|
|
|
- if (run.unit_pieces.length() > 0){
|
|
|
|
|
|
|
+ if (run.unit_pieces.length > 0){
|
|
|
json_unit_pieces += `"id": "${run.unit_pieces.id}", `;
|
|
json_unit_pieces += `"id": "${run.unit_pieces.id}", `;
|
|
|
- json_unit_pieces += `"quantity": "${run.unit_pieces.quantity}", `;
|
|
|
|
|
|
|
+ json_unit_pieces += `"quantity": "${run.unit_pieces.quantity}" `;
|
|
|
}
|
|
}
|
|
|
- json_unit_pieces = json_party.slice(0, -1) + "]";
|
|
|
|
|
|
|
+ json_unit_pieces = json_unit_pieces + "]";
|
|
|
|
|
|
|
|
json_party = '[';
|
|
json_party = '[';
|
|
|
resp.unit_list.forEach((unit, i) => {
|
|
resp.unit_list.forEach((unit, i) => {
|
|
@@ -343,11 +346,12 @@ module.exports = {
|
|
|
});
|
|
});
|
|
|
json_party = json_party.slice(0, -1) + "]";
|
|
json_party = json_party.slice(0, -1) + "]";
|
|
|
|
|
|
|
|
- //this.log('debug', `IVV json_party: ${json_party}`)
|
|
|
|
|
|
|
+ //this.log('DEBUG', `IVV json_party: ${json_party}`)
|
|
|
|
|
|
|
|
json = `{`;
|
|
json = `{`;
|
|
|
|
|
+ json += `"uid": "${run.uid}", `;
|
|
|
json += `"dtime": "${run.dtime}", `;
|
|
json += `"dtime": "${run.dtime}", `;
|
|
|
- json += `"area": "${run.dungeon}", `;
|
|
|
|
|
|
|
+ json += `"area": "${run.area}", `;
|
|
|
json += `"stage": "${run.stage}", `;
|
|
json += `"stage": "${run.stage}", `;
|
|
|
json += `"difficulty": "${run.difficulty}", `;
|
|
json += `"difficulty": "${run.difficulty}", `;
|
|
|
json += `"win": "${run.win}", `;
|
|
json += `"win": "${run.win}", `;
|
|
@@ -360,13 +364,105 @@ module.exports = {
|
|
|
json += `"item": ${json_item}, `;
|
|
json += `"item": ${json_item}, `;
|
|
|
json += `"unit": ${run.unit}, `;
|
|
json += `"unit": ${run.unit}, `;
|
|
|
json += `"unit_pieces": ${json_unit_pieces}, `;
|
|
json += `"unit_pieces": ${json_unit_pieces}, `;
|
|
|
- json += `"sapeshifting": ${run.sapeshifting}, `;
|
|
|
|
|
- json += `"party": ${json_party}`;
|
|
|
|
|
|
|
+ json += `"shapeshifting": ${run.shapeshifting}, `;
|
|
|
|
|
+ json += `"party": ${json_party}`, ;
|
|
|
|
|
+ json += `"helper": "${run.helper}", `;
|
|
|
json += `}`;
|
|
json += `}`;
|
|
|
- this.log('DEBUG', `json: ${json}` })
|
|
|
|
|
|
|
+ this.log('DEBUG', `json: ${json}`)
|
|
|
//const filename = sanitize(`${wizardName}-${wizardID}-runs.csv`);
|
|
//const filename = sanitize(`${wizardName}-${wizardID}-runs.csv`);
|
|
|
//const filename = sanitize(`IVV-${wizardName}-${wizardID}-runs.csv`);
|
|
//const filename = sanitize(`IVV-${wizardName}-${wizardID}-runs.csv`);
|
|
|
//this.saveToFile(entry, filename, headers, proxy);
|
|
//this.saveToFile(entry, filename, headers, proxy);
|
|
|
|
|
+
|
|
|
|
|
+ // Make the request
|
|
|
|
|
+ //var inspect = require('eyespect').inspector();
|
|
|
|
|
+ var request = require('request')
|
|
|
|
|
+
|
|
|
|
|
+ var postData = {
|
|
|
|
|
+ name: 'data',
|
|
|
|
|
+ value: json
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // npm install -S request eyespect
|
|
|
|
|
+ /*var url = this.target_host + ':' + this.target_port + '/' + this.target_url;
|
|
|
|
|
+ var options = {
|
|
|
|
|
+ method: 'post',
|
|
|
|
|
+ body: postData,
|
|
|
|
|
+ json: false, //json: true,
|
|
|
|
|
+ url: url
|
|
|
|
|
+ }
|
|
|
|
|
+ request(options, function (err, res, body) {
|
|
|
|
|
+ if (err) {
|
|
|
|
|
+ this.log('ERROR', `REQUEST ERROR ${err}, `)
|
|
|
|
|
+ //return
|
|
|
|
|
+ }
|
|
|
|
|
+ //var headers = res.headers
|
|
|
|
|
+ //var statusCode = res.statusCode
|
|
|
|
|
+ //inspect(headers, 'headers')
|
|
|
|
|
+ //inspect(statusCode, 'statusCode')
|
|
|
|
|
+ //inspect(body, 'body')
|
|
|
|
|
+ })*/
|
|
|
|
|
+
|
|
|
|
|
+ /*const req_options = setRequestAuth(
|
|
|
|
|
+ {
|
|
|
|
|
+ json: true,
|
|
|
|
|
+ body: { data: { request: req, response: resp, __version: acceptedCommands.__version } }
|
|
|
|
|
+ },
|
|
|
|
|
+ wizard_id
|
|
|
|
|
+ );*/
|
|
|
|
|
+
|
|
|
|
|
+ // Send it
|
|
|
|
|
+ /*var url = this.target_host + ':' + this.target_port + '/' + this.target_url;
|
|
|
|
|
+ request.post(url, postData, (error, response, body) => {
|
|
|
|
|
+ if (error) {
|
|
|
|
|
+ this.log('error',`Error: ${error.message}`);
|
|
|
|
|
+ //return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // Log message to proxy window
|
|
|
|
|
+ if (response.statusCode === 200) {
|
|
|
|
|
+ this.log('success',`${command} logged successfully`);
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ if (response.statusCode == 401) {
|
|
|
|
|
+ this.log('error',`SWARFARM Authentication failure: ${body.detail}`);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.log('error',`Error ${response.statusCode}: ${body.detail}`);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });*/
|
|
|
|
|
+
|
|
|
|
|
+ var querystring = require('querystring');
|
|
|
|
|
+ var http = require('http');
|
|
|
|
|
+ var fs = require('fs');
|
|
|
|
|
+ var post_data = querystring.stringify({
|
|
|
|
|
+ 'data' : json
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // An object of options to indicate where to post to
|
|
|
|
|
+ var post_options = {
|
|
|
|
|
+ host: '192.168.1.101',//this.target_host,
|
|
|
|
|
+ port: this.target_port,
|
|
|
|
|
+ path: this.target_url,
|
|
|
|
|
+ method: 'POST',
|
|
|
|
|
+ headers: {
|
|
|
|
|
+ 'Content-Type': 'application/x-www-form-urlencoded',
|
|
|
|
|
+ 'Content-Length': Buffer.byteLength(post_data)
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // Set up the request
|
|
|
|
|
+ var post_req = http.request(post_options, function(res) {
|
|
|
|
|
+ res.setEncoding('utf8');
|
|
|
|
|
+ res.on('data', function (chunk) {
|
|
|
|
|
+ this.log("DEBUG", 'Response: ' + chunk);
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // post the data
|
|
|
|
|
+ post_req.write(post_data);
|
|
|
|
|
+ post_req.end();
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -388,7 +484,7 @@ module.exports = {
|
|
|
|
|
|
|
|
//const winLost = resp.win_lose === 1 ? 'Win' : 'Did not kill';
|
|
//const winLost = resp.win_lose === 1 ? 'Win' : 'Did not kill';
|
|
|
|
|
|
|
|
- run.dtime = dateFormat(new Date(), 'yyyy-mm-dd HH:MM:SS');
|
|
|
|
|
|
|
+ run.dtime = dateFormat(new Date(), 'yyyy-mm-dd HH:MM:ss');
|
|
|
//run.result = winLost;
|
|
//run.result = winLost;
|
|
|
|
|
|
|
|
run.win = resp.win_lose;
|
|
run.win = resp.win_lose;
|
|
@@ -422,7 +518,7 @@ module.exports = {
|
|
|
},
|
|
},
|
|
|
sell_value: reward.crate.changestones[0].sell_value
|
|
sell_value: reward.crate.changestones[0].sell_value
|
|
|
};
|
|
};
|
|
|
- run.drop= this.getItemRift(item, run.;
|
|
|
|
|
|
|
+ run.drop= this.getItemRift(item, run);
|
|
|
}
|
|
}
|
|
|
// Rune
|
|
// Rune
|
|
|
else if (reward.crate.rune) {
|
|
else if (reward.crate.rune) {
|
|
@@ -475,7 +571,7 @@ module.exports = {
|
|
|
if (resp.reward.crate.material) {
|
|
if (resp.reward.crate.material) {
|
|
|
item = resp.reward.crate.material.item_master_id;
|
|
item = resp.reward.crate.material.item_master_id;
|
|
|
quantity = resp.reward.crate.material.item_quantity;
|
|
quantity = resp.reward.crate.material.item_quantity;
|
|
|
- //}
|
|
|
|
|
|
|
+ }
|
|
|
//if (resp.reward.crate.summon_pieces) {
|
|
//if (resp.reward.crate.summon_pieces) {
|
|
|
// pieces = resp.reward.crate.summon_pieces.item_master_id;
|
|
// pieces = resp.reward.crate.summon_pieces.item_master_id;
|
|
|
// quantity = resp.reward.crate.summon_pieces.item_quantity;
|
|
// quantity = resp.reward.crate.summon_pieces.item_quantity;
|
|
@@ -594,7 +690,7 @@ module.exports = {
|
|
|
});
|
|
});
|
|
|
json_party = json_party.slice(0, -1) + "]";
|
|
json_party = json_party.slice(0, -1) + "]";
|
|
|
|
|
|
|
|
- //this.log('debug', `IVV json_party: ${json_party}`)
|
|
|
|
|
|
|
+ //this.log('DEBUG', `IVV json_party: ${json_party}`)
|
|
|
|
|
|
|
|
json = `{`;
|
|
json = `{`;
|
|
|
json += `"dtime": "${run.dtime}", `;
|
|
json += `"dtime": "${run.dtime}", `;
|
|
@@ -614,7 +710,7 @@ module.exports = {
|
|
|
json += `"sapeshifting": ${run.sapeshifting}, `;
|
|
json += `"sapeshifting": ${run.sapeshifting}, `;
|
|
|
json += `"party": ${json_party}`;
|
|
json += `"party": ${json_party}`;
|
|
|
json += `}`;
|
|
json += `}`;
|
|
|
- this.log('DEBUG', `json: ${json}` })
|
|
|
|
|
|
|
+ this.log('DEBUG', `json: ${json}`)
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -637,7 +733,7 @@ module.exports = {
|
|
|
map.drop = 'Enchanted Gem';
|
|
map.drop = 'Enchanted Gem';
|
|
|
}
|
|
}
|
|
|
return map;
|
|
return map;
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Prints a messageto the SWEX output.
|
|
* Prints a messageto the SWEX output.
|
|
@@ -646,8 +742,8 @@ module.exports = {
|
|
|
* @param msg The message to log.
|
|
* @param msg The message to log.
|
|
|
*/
|
|
*/
|
|
|
log(type, msg){
|
|
log(type, msg){
|
|
|
- if (type != "debug" || this.config.Config.Plugins[this.pluginName].debug == true){
|
|
|
|
|
- proxy.log({ type: type, source: 'plugin', name: this.pluginName, message: msg });
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ //if (type != "debug" || this.config.Config.Plugins[this.pluginName].debug == true){
|
|
|
|
|
+ this.proxy.log({ type: type, source: 'plugin', name: this.pluginName, message: msg });
|
|
|
|
|
+ //}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|