战力:初步
This commit is contained in:
@@ -29,8 +29,7 @@ interface Param {
|
||||
isFavourLvUp?: boolean,
|
||||
ePlaceId?: number,
|
||||
ePlaceIds?: number[],
|
||||
oldJewel?: JewelType,
|
||||
newJewel?: JewelType,
|
||||
jewels?: JewelType[],
|
||||
jewel?: JewelType,
|
||||
teraphId?: number,
|
||||
schoolId?: number,
|
||||
@@ -113,19 +112,17 @@ export async function calculateCes(type: HERO_SYSTEM_TYPE, roleId: string, serve
|
||||
}
|
||||
case HERO_SYSTEM_TYPE.SKIN: // 7. 穿皮肤
|
||||
{
|
||||
let { hero: { quality, star, starStage, colorStar, colorStarStage } } = param;
|
||||
let { hero: { quality, star, starStage, colorStar, colorStarStage, skins } } = param;
|
||||
for(let [hid, { skinId, job, ePlace }] of heroUpdates) {
|
||||
calCe.setHeroBase(hid, skinId);
|
||||
calCe.setHeroStar(hid, job, quality, star, starStage, colorStar, colorStarStage);
|
||||
|
||||
// let eplaceIds = newEplace.map(cur => cur.id);
|
||||
// calEquipStrengthIncAttr(originHero, update, eplaceIds);
|
||||
// calEquipQualityIncAttr(originHero, update, eplaceIds);
|
||||
// calEquipStarIncAttr(originHero, update, eplaceIds, addSeidList, removeSeidList);
|
||||
// // 天赋点
|
||||
// calHeroTalent(originHero, update, addSeidList, removeSeidList);
|
||||
for(let { id, equipId, quality, qualityStage, lv, star, starStage } of ePlace) {
|
||||
calCe.setEquipQuality(hid, id, equipId, quality, qualityStage);
|
||||
calCe.setEquipStrength(hid, id, equipId, lv);
|
||||
calCe.setEquipStar(hid, id, equipId, star, starStage);
|
||||
}
|
||||
calCe.setTalent(hid, skins);
|
||||
}
|
||||
// TODO 装备
|
||||
break;
|
||||
}
|
||||
case HERO_SYSTEM_TYPE.FAVOUR: // 8. 好感度
|
||||
@@ -184,14 +181,101 @@ export async function calculateCes(type: HERO_SYSTEM_TYPE, roleId: string, serve
|
||||
calCe.setTeraph(teraphs);
|
||||
break;
|
||||
}
|
||||
case HERO_SYSTEM_TYPE.COMPOSE_EQUIP: // 21. 合成装备
|
||||
{
|
||||
let { ePlaceId } = param;
|
||||
for(let [hid, { ePlace = [] }] of heroUpdates) {
|
||||
for(let { id, equipId, quality, qualityStage, lv, star, starStage } of ePlace) {
|
||||
if(ePlaceId == id) {
|
||||
calCe.setEquipQuality(hid, id, equipId, quality, qualityStage);
|
||||
calCe.setEquipStrength(hid, id, equipId, lv);
|
||||
calCe.setEquipStar(hid, id, equipId, star, starStage);
|
||||
}
|
||||
}
|
||||
calCe.setEquipSuit(hid, ePlace);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case HERO_SYSTEM_TYPE.EQUIP_STRENGTH: // 22. 装备强化
|
||||
{
|
||||
let { ePlaceIds } = param;
|
||||
for(let [hid, { ePlace = [] }] of heroUpdates) {
|
||||
for(let { id, equipId, lv } of ePlace) {
|
||||
if(ePlaceIds.indexOf(id) != -1) {
|
||||
calCe.setEquipStrength(hid, id, equipId, lv);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case HERO_SYSTEM_TYPE.EQUIP_QUALITY: // 23. 装备升品
|
||||
{
|
||||
let { ePlaceId } = param;
|
||||
for(let [hid, { ePlace = [] }] of heroUpdates) {
|
||||
for(let { id, equipId, quality, qualityStage } of ePlace) {
|
||||
if(ePlaceId == id) {
|
||||
calCe.setEquipQuality(hid, id, equipId, quality, qualityStage);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case HERO_SYSTEM_TYPE.EQUIP_STAR: // 24. 装备升星
|
||||
{
|
||||
let { ePlaceId } = param;
|
||||
for(let [hid, { ePlace = [] }] of heroUpdates) {
|
||||
for(let { id, equipId, star, starStage } of ePlace) {
|
||||
if(ePlaceId == id) {
|
||||
calCe.setEquipStar(hid, id, equipId, star, starStage);
|
||||
}
|
||||
}
|
||||
calCe.setEquipSuit(hid, ePlace);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case HERO_SYSTEM_TYPE.EQUIP_JEWEL: // 25. 装备天晶
|
||||
case HERO_SYSTEM_TYPE.JEWEL_RESET_RANDSE: // 27. 洗练
|
||||
case HERO_SYSTEM_TYPE.JEWEL_QUENCH: // 28. 淬炼
|
||||
{
|
||||
let { ePlaceId, jewel: curJewel } = param;
|
||||
for(let [hid, { ePlace = [] }] of heroUpdates) {
|
||||
for(let { id, stones } of ePlace) {
|
||||
if(ePlaceId == id) {
|
||||
calCe.setJewel(hid, id, stones, curJewel);
|
||||
}
|
||||
}
|
||||
calCe.setEquipSuit(hid, ePlace);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case HERO_SYSTEM_TYPE.EQUIP_STONE: // 26. 装备地玉
|
||||
{
|
||||
let { ePlaceId, jewel: curJewel } = param;
|
||||
for(let [hid, { ePlace = [] }] of heroUpdates) {
|
||||
for(let { id, stones } of ePlace) {
|
||||
if(ePlaceId == id) {
|
||||
calCe.setJewel(hid, id, stones, curJewel);
|
||||
}
|
||||
}
|
||||
calCe.setEquipSuit(hid, ePlace);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case HERO_SYSTEM_TYPE.REBIRTH: // 29. 重生
|
||||
{
|
||||
for(let [hid, { skinId, lv, quality, star, starStage, colorStar, colorStarStage, job, jobStage, }] of heroUpdates) {
|
||||
for(let [hid, { skinId, lv, quality, star, starStage, colorStar, colorStarStage, job, jobStage, skins, ePlace, scrollStar, scrollQuality, scrollColorStar }] of heroUpdates) {
|
||||
calCe.setHeroBase(hid, skinId);
|
||||
calCe.setHeroLv(hid, lv);
|
||||
calCe.setHeroStar(hid, job, quality, star, starStage, colorStar, colorStarStage);
|
||||
calCe.setJob(hid, job, jobStage);
|
||||
// TODO 装备
|
||||
|
||||
for(let { id, equipId, quality, qualityStage, lv, star, starStage } of ePlace) {
|
||||
calCe.setEquipQuality(hid, id, equipId, quality, qualityStage);
|
||||
calCe.setEquipStrength(hid, id, equipId, lv);
|
||||
calCe.setEquipStar(hid, id, equipId, star, starStage);
|
||||
}
|
||||
calCe.setTalent(hid, skins);
|
||||
calCe.setScroll(hid, scrollStar, scrollQuality, scrollColorStar);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user