寻宝:修改情谊寻宝奖励
This commit is contained in:
@@ -161,7 +161,7 @@ export async function getRealReward(blueprtId: number, roleSts: RoleStatus[], ro
|
||||
let dicReward = getRewardByBlueprtId(blueprtId);
|
||||
if(!dicReward) return [];
|
||||
|
||||
let fixRewards: RewardInter[] = [], extraRewards: RewardInter[] = [];
|
||||
let fixRewards: RewardInter[] = [], extraRewards: RewardInter[] = [], hasExtraReward = true;
|
||||
if (roleSt.isCap) {
|
||||
fixRewards.push(...dicReward.captainReward);
|
||||
} else {
|
||||
@@ -173,13 +173,13 @@ export async function getRealReward(blueprtId: number, roleSts: RoleStatus[], ro
|
||||
let count = FRIEND.FRIEND_FRIENDPOINT_MAX - comBattleCnt > TREASURE.REWARD_FRIENDPOINT? TREASURE.REWARD_FRIENDPOINT: FRIEND.FRIEND_FRIENDPOINT_MAX - comBattleCnt;
|
||||
fixRewards.push(getFriendPointObject(count));
|
||||
await FriendPointModel.updateComBattleCntToday(roleSt.roleId, roleSt.roleName, count, FRIEND.FRIEND_FRIENDPOINT_MAX, FRIEND_DROP_TYPE.COM_BATTLE);
|
||||
}
|
||||
|
||||
}
|
||||
hasExtraReward = false;
|
||||
} else {
|
||||
fixRewards.push(...dicReward.teammateReward)
|
||||
}
|
||||
}
|
||||
if(hasTimeExtraReward) {
|
||||
if(hasTimeExtraReward && hasExtraReward) {
|
||||
let sameGuildCnt = roleSts.filter(cur => cur.guildCode == roleSt.guildCode && cur.roleId != roleSt.roleId).length;
|
||||
if(sameGuildCnt > 0) {
|
||||
let dicGuildReward = roleSt.isCap? dicReward.captainTimeGuildReward: dicReward.teammateTimeGuildReward;
|
||||
|
||||
Reference in New Issue
Block a user