오윤석

Merge branch 'master' into release

axios = require('axios');
const crwalCharacterCode = async function(nickname) {
const crwalCharacterCode = async function(nickname, isReboot = false) {
try {
const resp = await axios.get("https://maplestory.nexon.com/Ranking/World/Total?c=" + encodeURI(nickname));
const resp = await axios.get("https://maplestory.nexon.com/Ranking/World/Total?c=" + encodeURI(nickname) + "&w=" + (isReboot ? "0" : "254"));
const regex = new RegExp(`<dt><a href=\\"\\/Common\\/Character\\/Detail\\/[^\\?]+?\\?p=(.+?)\\"\\s+target=.+?\\/>${nickname}<\\/a><\\/dt>`);
const regexResult = regex.exec(resp.data);
if (!regexResult)
return -2;
if (!regexResult) {
if (isReboot)
return -2;
else
return await crwalCharacterCode(nickname, true);
}
return regexResult[1];
} catch (error) {
......@@ -245,6 +249,13 @@ const analyzeStats = function(characterInfo, analysisEquipment) {
const job = jobModel[characterInfo.character.job];
const jobDefault = jobModel.default;
const weaponConst = require('../model/weapon')[analysisEquipment.weapon] || 1;
let rebootDamage = 0;
if (characterInfo.character.server.name.indexOf("리부트") == 0) {
// 리부트, 리부트2 월드 반영
rebootDamage = parseInt(characterInfo.character.level / 2);
}
const stats = {
major: {
pure: 0,
......@@ -258,7 +269,8 @@ const analyzeStats = function(characterInfo, analysisEquipment) {
all: characterInfo.stats.damageHyper +
analysisEquipment.damagePercent +
job.stats.passive.damage.all +
jobDefault.stats.passive.damage.all,
jobDefault.stats.passive.damage.all +
rebootDamage,
boss: characterInfo.stats.bossAttackDamage
},
finalDamage: job.stats.passive.finalDamage,
......