修复:名将谱战力、活动铜币数量、引导抽卡new问题、未初始推送
This commit is contained in:
@@ -78,12 +78,13 @@ export class DailyCoinHandler {
|
||||
}
|
||||
let rate = playerData.getRate()//翻几倍
|
||||
rateArray.push(rate);
|
||||
let rewardItem: CoinRewardFormulaItem = playerData.findCoinRewardFormulaItem(index);
|
||||
let lv = role.lv;//玩家等级
|
||||
let rewardItem: CoinRewardFormulaItem = playerData.findCoinRewardFormulaItem(lv);
|
||||
if (!rewardItem) {
|
||||
return resResult(STATUS.ACTIVITY_DATA_ERROR);
|
||||
}
|
||||
let lv = role.lv;//玩家等级
|
||||
let coinRewardCount = eval(rewardItem.rewardFormula);
|
||||
console.log('******** coinReward', lv, rewardItem.rewardFormula, coinRewardCount)
|
||||
|
||||
let baseRewardParamArr: Array<RewardParam> = [{ id: CURRENCY_BY_TYPE.get(CURRENCY_TYPE.COIN), count: coinRewardCount, type: ACTIVITY_RESOURCES_TYPE.GOODS }];
|
||||
console.log('第几次抽奖:', index, ' 基础奖励翻倍:', rate, JSON.stringify(baseRewardParamArr),)
|
||||
|
||||
@@ -380,7 +380,8 @@ export class GachaHandler {
|
||||
if (!costResult) return resResult(STATUS.GACHA_COST_NOT_ENOUGH);
|
||||
}
|
||||
|
||||
let gachaPull = new GachaPull(gachaId, 0, []);
|
||||
let userHeroes = await HeroModel.findByRole(roleId);
|
||||
let gachaPull = new GachaPull(gachaId, 0, userHeroes);
|
||||
gachaPull.setByUserGacha({...dicGacha, floorReward: 0}, userGacha);
|
||||
let { resultList } = gachaPull.pull(count);
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ export class EntryHandler {
|
||||
checkTaskWithRole(serverId, role.roleId, self.app.get('serverId'), TASK_TYPE.LOGIN_SUM, role);
|
||||
checkTaskWithRole(serverId, role.roleId, self.app.get('serverId'), TASK_TYPE.LOGIN_SERIES, role);
|
||||
// 推送数据
|
||||
if (role.hasInit) pushData(role, session);
|
||||
pushData(role.hasInit, role, session);
|
||||
|
||||
role['heros'] = heros;
|
||||
role['equips'] = equips;
|
||||
@@ -181,7 +181,7 @@ export class EntryHandler {
|
||||
checkTaskWithRole(serverId, role.roleId, self.app.get('serverId'), TASK_TYPE.LOGIN_SUM, role);
|
||||
checkTaskWithRole(serverId, role.roleId, self.app.get('serverId'), TASK_TYPE.LOGIN_SERIES, role);
|
||||
// 推送数据
|
||||
pushData(role, session, 'refresh');
|
||||
pushData(role.hasInit, role, session, 'refresh');
|
||||
|
||||
let todayZeroPoint = getZeroPoint();
|
||||
return resResult(STATUS.SUCCESS, { todayZeroPoint });
|
||||
|
||||
@@ -38,7 +38,7 @@ import { PvpDefenseModel } from '../db/PvpDefense';
|
||||
import { getDonation } from './donateService';
|
||||
import { refChallengeCnt } from './pvpService';
|
||||
|
||||
export async function pushData(role: RoleType, session: FrontendOrBackendSession, pushType: 'entry' | 'refresh' = 'entry') {
|
||||
export async function pushData(hasInit: boolean, role: RoleType, session: FrontendOrBackendSession, pushType: 'entry' | 'refresh' = 'entry') {
|
||||
try {
|
||||
const { roleId } = role;
|
||||
const sid = session.get('sid');
|
||||
@@ -46,11 +46,16 @@ export async function pushData(role: RoleType, session: FrontendOrBackendSession
|
||||
pushEntryStart(roleId, sid);
|
||||
// 军团
|
||||
const guildData = await getGuildEntryData(role, sid, session);
|
||||
let modules = ['lv', 'battle', 'rank', 'mail', 'friend', 'daily', 'expedition', 'tower', 'comBattle', 'dungeon', 'pvp', 'gacha', 'school', 'task', 'chat', 'event', 'guild'];
|
||||
if (guildData.hasGuild) {
|
||||
modules.push('auction', 'train', 'boss', 'wishPool', 'guildActivity', 'donate');
|
||||
let modules = [];
|
||||
if(!hasInit) {
|
||||
modules.push('lv', 'battle');
|
||||
} else {
|
||||
modules.push('lv', 'battle', 'rank', 'mail', 'friend', 'daily', 'expedition', 'tower', 'comBattle', 'dungeon', 'pvp', 'gacha', 'school', 'task', 'chat', 'event', 'guild');
|
||||
if (guildData.hasGuild) {
|
||||
modules.push('auction', 'train', 'boss', 'wishPool', 'guildActivity', 'donate');
|
||||
}
|
||||
modules.push('shop')
|
||||
}
|
||||
modules.push('shop')
|
||||
let notIncludeModule: string[] = [];
|
||||
if (pushType == 'refresh') { // 每天5点刷新的时候不推送
|
||||
notIncludeModule = ['rank', 'mail', 'school', 'auction', 'train', 'chat', 'battle'];
|
||||
|
||||
Reference in New Issue
Block a user