parent
8d7b7bdeb3
commit
0d50b13db8
|
@ -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];
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue