聊天:精炼消息添加数据

This commit is contained in:
luying
2021-09-29 11:08:05 +08:00
parent 6f13e2a8c8
commit aa24d48c7b
4 changed files with 3 additions and 4 deletions

View File

@@ -94,7 +94,7 @@ export async function pushEquipRefineSucMsg(roleId: string, roleName: string, se
const { id, lv, refineLv, equip } = eplace;
const { id: equipId } = equip as EquipType;
const data = { id, lv, refineLv, equipId, quality };
const content = JSON.stringify({ roleId, roleName, eplace: data });
const content = JSON.stringify({ roleId, roleName, eplace: data, equip: pick(equip, ['id', 'name', 'eplaceId', 'quality', 'holes', 'randMain', 'randSe', 'grade', 'hid']) });
const msgData = await createGroupMsg(roleId, roleName, CHANNEL_PREFIX.SYS, `${serverId}`, MSG_TYPE.RICH_TEXT, MSG_SOURCE.EQUIP_REFINE_SUC, content, null, null);
await pushGroupMsgToRoom(msgData);
return msgData;

View File

@@ -34,7 +34,6 @@ export function loadAuctionReward() {
let basicPoolMap = new Map<number, DicAuctionBasicPool>(); // id => AuctionBasicPool
let arr = readFileAndParse(FILENAME.DIC_AUCTION_BASIC_POOL);
arr.forEach(o => {
console.log(o)
o.rewardBasicPool = parseRewardBasicPool(o.rewardBasicPool);
o.basePrice = parsePrice(o.basePrice);
o.maxPrice = parsePrice(o.maxPrice);

View File

@@ -128,7 +128,7 @@ export async function getAddEquipInfo(roleId: string, roleName: string, weapon:
if(attrValue > 0) {
let { randMin, randMax } = getQuenchByQualityAndGrade(quality, grade);
let rand = getRandValueByMinMax(randMin, randMax, 0);
console.log(quality, grade, rand)
// console.log(quality, grade, rand)
grade = getQuenchGradeByValue(quality, rand);
randMain.push({
id: attrId,

View File

@@ -360,7 +360,7 @@ export function calHeroStarIncAttr(originHero: HeroType, update: HeroUpdate, typ
if (!!dicStar && !!dicStar.ceAttr) {
starUp = dicStar.ceAttr.get(stage);
}
let newBase = (heroAttr + (lv - 1) * (heroUpAttr + starUp)) * HERO_CE_RATIO;
let newBase = (heroAttr + lv * (heroUpAttr + starUp)) * HERO_CE_RATIO;
updateHeroAttr(heroAttrs, targetAttrId, { set: { base: newBase } });
}