|
|
@@ -44,11 +44,9 @@ module.exports = {
|
|
|
// this.log('DEBUG', `IVV SCE START: ${key}: ${req[key]}`);
|
|
|
//}
|
|
|
if (req["helper_list"] != null || req["mentor_helper_list"] != null || req["npc_friend_helper_list"] != null ){
|
|
|
- //this.log('DEBUG', `IVV MENTOR 1`);
|
|
|
this.temp[wizardID].helper = 1;
|
|
|
}
|
|
|
else{
|
|
|
- //this.log('DEBUG', `IVV MENTOR 0`);
|
|
|
this.temp[wizardID].helper = 0;
|
|
|
}
|
|
|
this.temp[wizardID].area = req.region_id;
|
|
|
@@ -58,12 +56,12 @@ module.exports = {
|
|
|
|
|
|
if (command === 'BattleScenarioResult' || command === 'BattleDungeonResult' || command === 'BattleDimensionHoleDungeonResult') {
|
|
|
//proxy.log({ type: 'info', source: 'plugin', name: this.pluginName, message: `IVV RUN RESULT: ${resp}` })
|
|
|
- //for (var key in req) {
|
|
|
- // this.log("info", `IVV REQ: ${key}: ${req[key]}`);
|
|
|
- //}
|
|
|
- //for (var key in resp) {
|
|
|
- // this.log("info", `IVV RES: ${key}: ${resp[key]}`);
|
|
|
- //}
|
|
|
+ for (var key in req) {
|
|
|
+ this.log("info", `IVV REQ: ${key}: ${req[key]}`);
|
|
|
+ }
|
|
|
+ for (var key in resp) {
|
|
|
+ this.log("info", `IVV RES: ${key}: ${resp[key]}`);
|
|
|
+ }
|
|
|
this.parse_normal(req, resp);
|
|
|
}
|
|
|
|
|
|
@@ -122,7 +120,6 @@ module.exports = {
|
|
|
item = crate.craft_stuff.item_master_id;
|
|
|
quantity = crate.craft_stuff.item_quantity;
|
|
|
}
|
|
|
- //this.log('DEBUG', `Item: ${item}, ${unit}, ${pieces}, ${quantity}, ${shapeshifting}`);
|
|
|
drop = {item, unit, pieces, quantity, shapeshifting}
|
|
|
return drop;
|
|
|
},
|
|
|
@@ -206,9 +203,9 @@ module.exports = {
|
|
|
log = true;
|
|
|
|
|
|
if (command === 'BattleDungeonResult') {
|
|
|
- for (var key in req) {
|
|
|
- this.log("DEBUG", `IVV DUNGEON REQ: ${key}: ${req[key]}`);
|
|
|
- }
|
|
|
+ //for (var key in req) {
|
|
|
+ // this.log("DEBUG", `IVV DUNGEON REQ: ${key}: ${req[key]}`);
|
|
|
+ //}
|
|
|
if (req.dungeon_id > 10000){
|
|
|
// Hall of Heroes or unknown
|
|
|
log = false;
|
|
|
@@ -237,8 +234,11 @@ module.exports = {
|
|
|
//if (gMapping.dungeon[resp.dungeon_id]) {
|
|
|
// run.dungeon = `${gMapping.dungeon[resp.dungeon_id]} Level ${resp.difficulty}`;
|
|
|
//}
|
|
|
- run.area = req.dungeon_id;
|
|
|
- run.stage = req.stage_id;
|
|
|
+ //for (var key in req) {
|
|
|
+ // this.log("DEBUG", `IVV DIMENSONALE REQ: ${key}: ${req[key]}`);
|
|
|
+ //}
|
|
|
+ run.area = resp.dungeon_id;
|
|
|
+ run.stage = resp.difficulty;
|
|
|
run.difficulty = 0
|
|
|
run.helper = 0;
|
|
|
}
|
|
|
@@ -271,9 +271,9 @@ module.exports = {
|
|
|
|
|
|
if (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.grade = rune.class;
|
|
|
run.rune.value = rune.sell_value;
|
|
|
@@ -301,6 +301,9 @@ module.exports = {
|
|
|
});
|
|
|
}
|
|
|
else {
|
|
|
+ for (var key in reward.crate) {
|
|
|
+ this.proxy.log({ type: 'info', source: 'plugin', name: this.pluginName, message: `IVV ITEM: ${key}: ${reward.crate[key]}` })
|
|
|
+ }
|
|
|
drop = this.getItem(reward.crate);
|
|
|
if (drop.unit){
|
|
|
run.unit.id = drop.unit;
|
|
|
@@ -356,7 +359,7 @@ module.exports = {
|
|
|
json_rune = json_rune + "]";
|
|
|
|
|
|
json_item = '[';
|
|
|
- if (run.item.length > 0){
|
|
|
+ if (run.item.id != undefined){
|
|
|
json_item += '{';
|
|
|
json_item += `"id": "${run.item.id}", `;
|
|
|
json_item += `"quantity": "${run.item.quantity}"`;
|
|
|
@@ -379,8 +382,6 @@ module.exports = {
|
|
|
});
|
|
|
json_party = json_party.slice(0, -1) + "]";
|
|
|
|
|
|
- //this.log('DEBUG', `IVV json_party: ${json_party}`)
|
|
|
-
|
|
|
json = `{`;
|
|
|
json += `"uid": "${run.uid}", `;
|
|
|
json += `"dtime": "${run.dtime}", `;
|