【探索玩法增加探索商店】
parent
9e3f87cbd0
commit
e26b1e18ae
|
@ -229,6 +229,17 @@ public class PlayerManager extends MongoBase {
|
|||
private int endlessNewReplica; //无尽副本
|
||||
private int treasureReplica; //宝物副本
|
||||
|
||||
private int exploreKillTotalNum; //探索杀敌总数
|
||||
|
||||
public int getExploreKillTotalNum() {
|
||||
return exploreKillTotalNum;
|
||||
}
|
||||
|
||||
public void addExploreKillTotalNum(int count) {
|
||||
this.exploreKillTotalNum += count;
|
||||
updateString("exploreKillTotalNum", exploreKillTotalNum);
|
||||
}
|
||||
|
||||
public void putArchitectureInfo(int key, ArchitectureInfo info) {
|
||||
this.architectureInfoMap.put(key,info);
|
||||
updateString("architectureInfoMap", architectureInfoMap);
|
||||
|
|
|
@ -171,6 +171,7 @@ public class ExplorerMapLogic {
|
|||
//怪物死亡 设置重生时间
|
||||
if (explorerInfo.getEnemyHp() == 0) {
|
||||
explorerInfo.setKillNum(explorerInfo.getKillNum() + 1);
|
||||
user.getPlayerInfoManager().addExploreKillTotalNum(1);
|
||||
if (time == 0) {
|
||||
explorerInfo.setEnemyReliveTime(TimeUtils.nowInt() + exploreConfig.getBattleInterval());
|
||||
} else {
|
||||
|
|
|
@ -20,6 +20,7 @@ import com.ljsd.jieling.logic.player.PlayerLogic;
|
|||
import com.ljsd.jieling.network.server.ProtocolsManager;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import com.ljsd.jieling.util.*;
|
||||
import com.sun.tools.javac.comp.Todo;
|
||||
import config.SPlayerLevelConfig;
|
||||
import config.SStoreConfig;
|
||||
import config.SStoreTypeConfig;
|
||||
|
@ -431,12 +432,28 @@ public class StoreLogic implements IEventHandler {
|
|||
if (sort != sStoreConfig.getSort()){
|
||||
continue;
|
||||
}
|
||||
int minLv = sStoreConfig.getOpenLv()[0];
|
||||
int maxLv = sStoreConfig.getOpenLv()[1];
|
||||
int[] openLv = sStoreConfig.getOpenLv();
|
||||
int minLv = openLv[0];
|
||||
int maxLv = openLv[1];
|
||||
if (minLv <= playerInfoManager.getLevel() && maxLv >= playerInfoManager.getLevel()){
|
||||
totalWeight += sStoreConfig.getWeight();
|
||||
randomSstoreConfigList.add(sStoreConfig);
|
||||
}
|
||||
// 额外开启条件
|
||||
int[] openRule = sStoreConfig.getOpenRule();
|
||||
switch (openRule[0]){
|
||||
case 1:
|
||||
// 杀敌数
|
||||
int killNum = playerInfoManager.getExploreKillTotalNum();
|
||||
if (killNum >= openRule[1]){
|
||||
totalWeight += sStoreConfig.getWeight();
|
||||
randomSstoreConfigList.add(sStoreConfig);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
int weight = 0;
|
||||
int rewardId = 0;
|
||||
|
|
|
@ -22,6 +22,8 @@ public class SStoreConfig implements BaseConfig {
|
|||
|
||||
private int storeId;
|
||||
|
||||
private int[] openRule;
|
||||
|
||||
private int[] openLv;
|
||||
|
||||
private int[][] goods;
|
||||
|
@ -132,4 +134,8 @@ public class SStoreConfig implements BaseConfig {
|
|||
public int[] getBuyRule() {
|
||||
return buyRule;
|
||||
}
|
||||
|
||||
public int[] getOpenRule() {
|
||||
return openRule;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue