1.探索结束后得邮件加入你本次队伍一共击杀了多少敌人,死亡多少次

2.战力冲刺任务按钮完成状态按最高战力判断,实际领取按当前战力校验
.
back_recharge
xuexinpeng 2022-03-03 18:33:12 +08:00
parent 8d7b7bdeb3
commit 0d50b13db8
3 changed files with 29 additions and 2 deletions

View File

@ -1,5 +1,6 @@
package com.ljsd.jieling.logic.activity;
import com.ljsd.jieling.db.redis.RedisUtil;
import com.ljsd.jieling.globals.Global;
import com.ljsd.jieling.jbean.ActivityProgressInfo;
import com.ljsd.jieling.logic.activity.event.IEvent;
@ -56,7 +57,8 @@ public class PowerRiceActivity extends AbstractActivity{
@Override
boolean takeRewardsProcess(ISession session, SActivityRewardConfig sActivityRewardConfig, ActivityProgressInfo activityProgressInfo) throws Exception {
User user = UserManager.getUser(session.getUid());
int force = HeroLogic.getInstance().calTeamTotalForce(user, TeamEnum.FORMATION_NORMAL.getTeamId(), false);
//int force = HeroLogic.getInstance().calTeamTotalForce(user, TeamEnum.FORMATION_NORMAL.getTeamId(), false);
double force = RedisUtil.getInstence().getZSetScore(RankEnum.POWER_RICE_RANK.getRedisKey(),"", String.valueOf(user.getId()));
int[][] values = sActivityRewardConfig.getValues();
return force >= values[0][0];
}

View File

@ -17,6 +17,10 @@ public class ExplorerInfo extends MongoBase {
private int enemyHp;//敌人血量
private int enemyReliveTime;//敌人复活时间
private int batteTime;//战斗时间
private int killNum;//击杀人数
private int deathNum;//死亡次数
private Map<Integer,Integer> dropMap = new HashMap<>();//掉落
public ExplorerInfo() {
@ -120,4 +124,22 @@ public class ExplorerInfo extends MongoBase {
updateString("dropMap", dropMap);
this.dropMap = dropMap;
}
public int getKillNum() {
return killNum;
}
public void setKillNum(int killNum) {
updateString("killNum", killNum);
this.killNum = killNum;
}
public int getDeathNum() {
return deathNum;
}
public void setDeathNum(int deathNum) {
updateString("deathNum", deathNum);
this.deathNum = deathNum;
}
}

View File

@ -163,6 +163,7 @@ public class ExplorerMapLogic {
}
//玩家死亡 设置重生时间
if (explorerInfo.getPlayerHp() == 0) {
explorerInfo.setDeathNum(explorerInfo.getDeathNum()+1);
int reliveTime = SSpecialConfig.getIntegerValue(SSpecialConfig.EXPLORERE_LIVETIME);
if (time == 0) {
explorerInfo.setPlayerReliveTime(TimeUtils.nowInt() + reliveTime);
@ -173,6 +174,7 @@ public class ExplorerMapLogic {
}
//怪物死亡 设置重生时间
if (explorerInfo.getEnemyHp() == 0) {
explorerInfo.setKillNum(explorerInfo.getKillNum()+1);
if (time == 0) {
explorerInfo.setEnemyReliveTime(TimeUtils.nowInt() + exploreConfig.getBattleInterval());
} else {
@ -372,7 +374,8 @@ public class ExplorerMapLogic {
} else {
String title = SErrorCodeEerverConfig.getI18NMessage("exploresuccess_mail_title");
String content = SErrorCodeEerverConfig.getFormatMessage("exploresuccess_mail_txt", new Object[]{teamName, mapName, hour});
String content = SErrorCodeEerverConfig.getFormatMessage("exploresuccess_mail_txt", new Object[]{
teamName, mapName, hour,explorer.get(id).getKillNum(),explorer.get(id).getDeathNum()});
//CommonProto.Drop.Builder drop = ItemUtil.drop(user, explorer.get(id).getDropItem().stream().toArray(int[][]::new), BIReason.EXPEDITION_BOX_REWARD);
int[][] dropArray = explorer.get(id).getDropMap().entrySet().stream().map(n -> new int[]{n.getKey(), n.getValue()}).toArray(int[][]::new);
String reward = StringUtil.parseArrayToString(dropArray);