聊天:精炼消息添加数据
This commit is contained in:
@@ -94,7 +94,7 @@ export async function pushEquipRefineSucMsg(roleId: string, roleName: string, se
|
|||||||
const { id, lv, refineLv, equip } = eplace;
|
const { id, lv, refineLv, equip } = eplace;
|
||||||
const { id: equipId } = equip as EquipType;
|
const { id: equipId } = equip as EquipType;
|
||||||
const data = { id, lv, refineLv, equipId, quality };
|
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);
|
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);
|
await pushGroupMsgToRoom(msgData);
|
||||||
return msgData;
|
return msgData;
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ export function loadAuctionReward() {
|
|||||||
let basicPoolMap = new Map<number, DicAuctionBasicPool>(); // id => AuctionBasicPool
|
let basicPoolMap = new Map<number, DicAuctionBasicPool>(); // id => AuctionBasicPool
|
||||||
let arr = readFileAndParse(FILENAME.DIC_AUCTION_BASIC_POOL);
|
let arr = readFileAndParse(FILENAME.DIC_AUCTION_BASIC_POOL);
|
||||||
arr.forEach(o => {
|
arr.forEach(o => {
|
||||||
console.log(o)
|
|
||||||
o.rewardBasicPool = parseRewardBasicPool(o.rewardBasicPool);
|
o.rewardBasicPool = parseRewardBasicPool(o.rewardBasicPool);
|
||||||
o.basePrice = parsePrice(o.basePrice);
|
o.basePrice = parsePrice(o.basePrice);
|
||||||
o.maxPrice = parsePrice(o.maxPrice);
|
o.maxPrice = parsePrice(o.maxPrice);
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ export async function getAddEquipInfo(roleId: string, roleName: string, weapon:
|
|||||||
if(attrValue > 0) {
|
if(attrValue > 0) {
|
||||||
let { randMin, randMax } = getQuenchByQualityAndGrade(quality, grade);
|
let { randMin, randMax } = getQuenchByQualityAndGrade(quality, grade);
|
||||||
let rand = getRandValueByMinMax(randMin, randMax, 0);
|
let rand = getRandValueByMinMax(randMin, randMax, 0);
|
||||||
console.log(quality, grade, rand)
|
// console.log(quality, grade, rand)
|
||||||
grade = getQuenchGradeByValue(quality, rand);
|
grade = getQuenchGradeByValue(quality, rand);
|
||||||
randMain.push({
|
randMain.push({
|
||||||
id: attrId,
|
id: attrId,
|
||||||
|
|||||||
@@ -360,7 +360,7 @@ export function calHeroStarIncAttr(originHero: HeroType, update: HeroUpdate, typ
|
|||||||
if (!!dicStar && !!dicStar.ceAttr) {
|
if (!!dicStar && !!dicStar.ceAttr) {
|
||||||
starUp = dicStar.ceAttr.get(stage);
|
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 } });
|
updateHeroAttr(heroAttrs, targetAttrId, { set: { base: newBase } });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user