活动:弹窗活动新类型
This commit is contained in:
@@ -276,7 +276,7 @@ export class PvpHandler {
|
||||
let myRank = await r.getMyRank({ roleId });
|
||||
result.setMyRank(myRank);
|
||||
|
||||
await checkTaskInPvpEnd(serverId, roleId, sid, isSuccess, pvpDefense.heroScores);
|
||||
await checkTaskInPvpEnd(serverId, roleId, sid, isSuccess, pvpDefense.heroScores, myRank);
|
||||
if(hisWinStreakNum < pvpDefense.hisWinStreakNum) {
|
||||
await unlockFigure(sid, roleId, [{ type: FIGURE_UNLOCK_CONDITION.PVP_WIN_SERIES, paramWinStreakNum: pvpDefense.hisWinStreakNum }]);
|
||||
}
|
||||
|
||||
@@ -20,11 +20,6 @@ import Counter from '../../../db/Counter';
|
||||
import { getExpByLv } from '../../../pubUtils/data';
|
||||
import { reportTAUserSet } from '../../../services/sdkService';
|
||||
import { saveLoginAndOutLog } from '../../../pubUtils/logUtil';
|
||||
import { JewelModel } from '../../../db/Jewel';
|
||||
import { ItemModel } from '../../../db/Item';
|
||||
import { SkinModel } from '../../../db/Skin';
|
||||
import { HeroParam } from '../../../domain/roleField/hero';
|
||||
import { getAp } from '../../../services/actionPointService';
|
||||
import { sendMessageToAllWithSuc } from '../../../services/pushService';
|
||||
|
||||
export default function (app: Application) {
|
||||
@@ -68,7 +63,7 @@ export class EntryHandler {
|
||||
}
|
||||
}
|
||||
let serverName = this.app.getServerId();
|
||||
await roleLogin(role.roleId, user.userCode, serverName, user.pkgName, role.createTime); // 保存在线用户
|
||||
await roleLogin(role.roleId, user.userCode, serverName, user.pkgName, role.createTime, role.serverId); // 保存在线用户
|
||||
await this.addSession(user, role, session);
|
||||
saveLoginAndOutLog(LOG_TYPE.LOGIN, session);
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ export class GuildActivityRemote {
|
||||
|
||||
private currentTime: number = Date.now();
|
||||
private setTime: number = Date.now();
|
||||
private isAuctionPopUp: boolean = false;
|
||||
|
||||
/**
|
||||
* 从systimer服分发到guild各个服,发送排行榜数据
|
||||
@@ -36,6 +37,10 @@ export class GuildActivityRemote {
|
||||
public async guildActivityEnd(aid: number) {
|
||||
try {
|
||||
await settleGuildActivityReward(aid);
|
||||
this.isAuctionPopUp = true;
|
||||
setTimeout(() => { // 军团活动结束的15分钟内就不会再弹出了
|
||||
this.isAuctionPopUp = false;
|
||||
}, 15 * 60 * 1000);
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
@@ -147,4 +152,12 @@ export class GuildActivityRemote {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public getAuctionPopUpShow() {
|
||||
try {
|
||||
return this.isAuctionPopUp;
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -250,7 +250,7 @@ export class EquipHandler {
|
||||
let oldEplace = hero.ePlace||[];
|
||||
let curEquip = oldEplace.find(cur => cur.id == ePlaceId);
|
||||
if(!curEquip) return resResult(STATUS.EQUIP_NOT_FIND);
|
||||
|
||||
let incEquipStarSum = 0;
|
||||
let equipUpdate = {
|
||||
star: curEquip.star,
|
||||
starStage: curEquip.starStage,
|
||||
@@ -275,6 +275,7 @@ export class EquipHandler {
|
||||
if(isEnough) {
|
||||
equipUpdate.star = nextEquipStar.star;
|
||||
equipUpdate.starStage = 0;
|
||||
incEquipStarSum += equipUpdate.star - curEquip.star;
|
||||
}
|
||||
}
|
||||
} else { // 升小点,包括一键升到满小点和升一个小点
|
||||
@@ -298,9 +299,11 @@ export class EquipHandler {
|
||||
ePlace: newEplace,
|
||||
consumes: addConsumeToHero(hero.consumes, consumes)
|
||||
}
|
||||
await calculateCeWithHero(HERO_SYSTEM_TYPE.EQUIP_STAR, roleId, serverId, sid, hid, update, { ePlaceId });
|
||||
|
||||
await checkTaskInEquipStarUp(serverId, roleId, sid, oldEplace, newEplace, ePlaceId, hid, isUpStar);
|
||||
console.log('### incEquipStarSum', incEquipStarSum)
|
||||
let { curRole } = await calculateCeWithHero(HERO_SYSTEM_TYPE.EQUIP_STAR, roleId, serverId, sid, hid, update, { ePlaceId, roleIncUpdate: { equipStarSum: incEquipStarSum } });
|
||||
|
||||
await checkTaskInEquipStarUp(serverId, roleId, sid, oldEplace, newEplace, ePlaceId, hid, isUpStar, curRole.equipStarSum);
|
||||
pushEquipStarMax(roleId, roleName, serverId, hid, newEquip, isUpStar);
|
||||
|
||||
const curHero = {
|
||||
|
||||
Reference in New Issue
Block a user