寻宝:修改情谊寻宝奖励
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user