寻宝:修改情谊寻宝奖励

This commit is contained in:
luying
2022-08-31 19:18:01 +08:00
parent 59c009c995
commit e24f12131e
+3 -3
View File
@@ -161,7 +161,7 @@ export async function getRealReward(blueprtId: number, roleSts: RoleStatus[], ro
let dicReward = getRewardByBlueprtId(blueprtId); let dicReward = getRewardByBlueprtId(blueprtId);
if(!dicReward) return []; if(!dicReward) return [];
let fixRewards: RewardInter[] = [], extraRewards: RewardInter[] = []; let fixRewards: RewardInter[] = [], extraRewards: RewardInter[] = [], hasExtraReward = true;
if (roleSt.isCap) { if (roleSt.isCap) {
fixRewards.push(...dicReward.captainReward); fixRewards.push(...dicReward.captainReward);
} else { } else {
@@ -174,12 +174,12 @@ export async function getRealReward(blueprtId: number, roleSts: RoleStatus[], ro
fixRewards.push(getFriendPointObject(count)); fixRewards.push(getFriendPointObject(count));
await FriendPointModel.updateComBattleCntToday(roleSt.roleId, roleSt.roleName, count, FRIEND.FRIEND_FRIENDPOINT_MAX, FRIEND_DROP_TYPE.COM_BATTLE); await FriendPointModel.updateComBattleCntToday(roleSt.roleId, roleSt.roleName, count, FRIEND.FRIEND_FRIENDPOINT_MAX, FRIEND_DROP_TYPE.COM_BATTLE);
} }
hasExtraReward = false;
} else { } else {
fixRewards.push(...dicReward.teammateReward) fixRewards.push(...dicReward.teammateReward)
} }
} }
if(hasTimeExtraReward) { if(hasTimeExtraReward && hasExtraReward) {
let sameGuildCnt = roleSts.filter(cur => cur.guildCode == roleSt.guildCode && cur.roleId != roleSt.roleId).length; let sameGuildCnt = roleSts.filter(cur => cur.guildCode == roleSt.guildCode && cur.roleId != roleSt.roleId).length;
if(sameGuildCnt > 0) { if(sameGuildCnt > 0) {
let dicGuildReward = roleSt.isCap? dicReward.captainTimeGuildReward: dicReward.teammateTimeGuildReward; let dicGuildReward = roleSt.isCap? dicReward.captainTimeGuildReward: dicReward.teammateTimeGuildReward;