time control
parent
dba44383fe
commit
b25d7067ba
|
@ -1,4 +1,3 @@
|
|||
Id ColdTime Interval K Score BattleFree Cost Item Price MaxPrice PveNum MostTime
|
||||
int int mut,int#int,2 int int int mut,int#int,1 int mut,int#int,1 int int int
|
||||
1 3 111#120|101#110|81#100|60#80|45#59 32 1000 3 14#100 14 0#0#50#50 300 2 300
|
||||
0 0 null 0 0 null 0 null 0 0 0
|
||||
1 3 111#120|101#110|81#100|60#80|45#59 32 1000 3 14#100 14 0#0#50#50 300 2 300
|
|
@ -1,3 +1,3 @@
|
|||
Id BornItem SpeedFormula InitialEnergy EnergyRecoverSpeed ActionPowerRormula Speed HeroNumlimit EquipNumlimit WorldTalking BornPosition AdventureRefresh NatureName ItemCompoundLimit HeroCompoundLimit
|
||||
int mut,int#int,2 mut,float#float,1 int mut,int#int,1 mut,int#int,1 mut,int#int,1 int int int mut,int#int,1 int string int int
|
||||
1 10046#1|2#80 0#0#0.3164#0 80 1#6 0#0#1#0 70#100 999 999 1 08#19 60 数值策划专场 99 20
|
||||
Id BornItem SpeedFormula InitialEnergy EnergyRecoverSpeed ActionPowerRormula Speed HeroNumlimit EquipNumlimit WorldTalking BornPosition AdventureRefresh AdventureInvasionBoss InvasionBossTimesAdd AdventureOffline AdventureFastBattle NatureName ItemCompoundLimit HeroCompoundLimit
|
||||
int mut,int#int,2 mut,float#float,1 int mut,int#int,1 mut,int#int,1 mut,int#int,1 int int int mut,int#int,1 int int int int int string int int
|
||||
1 10046#1|2#80 0#0#0.3164#0 80 1#6 0#0#1#0 70#100 999 999 1 08#19 60 10 1800 10 28800 数值策划专场 99 20
|
||||
|
|
|
@ -6,19 +6,19 @@ int int float int int int int mut,int#int,2 int int
|
|||
104 1 14000.0 60 80 5 5 14#30000|4#300 5 1
|
||||
105 1 20000.0 80 100 5 5 14#70000|4#1000 5 1
|
||||
106 1 60000.0 100 140 5 6 14#120000|4#0 5 2
|
||||
107 2 2000.0 140 160 6 7 14#0|4#2000 5 2
|
||||
108 2 4000.0 160 180 7 8 14#0|4#3000 5 2
|
||||
109 2 7000.0 180 200 8 9 14#0|4#4000 5 2
|
||||
110 2 10000.0 200 250 9 10 14#0|4#10000 5 2
|
||||
107 2 2000.0 100 160 6 7 14#0|4#2000 5 2
|
||||
108 2 4000.0 100 180 7 8 14#0|4#3000 5 2
|
||||
109 2 7000.0 100 200 8 9 14#0|4#4000 5 2
|
||||
110 2 10000.0 100 250 9 10 14#0|4#10000 5 2
|
||||
201 1 2000.0 30 40 4 4 14#10000|4#20 4 1
|
||||
202 1 5000.0 40 50 4 4 14#20000|4#40 4 1
|
||||
203 1 9000.0 50 60 4 4 14#30000|4#100 4 1
|
||||
204 1 14000.0 60 80 4 4 14#30000|4#300 4 1
|
||||
205 1 20000.0 80 100 4 5 14#70000|4#1000 4 2
|
||||
206 1 60000.0 100 140 5 6 14#120000|4#0 4 2
|
||||
207 2 2000.0 140 160 6 7 14#0|4#2000 4 2
|
||||
208 2 4000.0 160 180 7 8 14#0|4#3000 4 2
|
||||
209 2 7000.0 180 200 8 9 14#0|4#4000 4 2
|
||||
207 2 2000.0 100 160 6 7 14#0|4#2000 4 2
|
||||
208 2 4000.0 100 180 7 8 14#0|4#3000 4 2
|
||||
209 2 7000.0 100 200 8 9 14#0|4#4000 4 2
|
||||
301 1 2000.0 30 40 3 3 14#10000|4#20 3 1
|
||||
302 1 5000.0 40 50 3 3 14#20000|4#40 3 1
|
||||
303 1 9000.0 50 60 3 3 14#30000|4#100 3 1
|
||||
|
|
|
@ -30,8 +30,6 @@ public class SGameSetting implements BaseConfig {
|
|||
|
||||
private int[] bornPosition;
|
||||
|
||||
private int adventureRefresh;
|
||||
|
||||
private String natureName;
|
||||
|
||||
private int itemCompoundLimit;
|
||||
|
@ -39,6 +37,17 @@ public class SGameSetting implements BaseConfig {
|
|||
private int heroCompoundLimit;
|
||||
|
||||
|
||||
private int adventureRefresh;
|
||||
|
||||
private int adventureInvasionBoss;
|
||||
|
||||
private int invasionBossTimesAdd;
|
||||
|
||||
private int adventureFastBattle;
|
||||
|
||||
private int adventureOffline;
|
||||
|
||||
|
||||
private static SGameSetting gameSetting;
|
||||
|
||||
@Override
|
||||
|
@ -124,4 +133,20 @@ public class SGameSetting implements BaseConfig {
|
|||
public String getNatureName() {
|
||||
return natureName;
|
||||
}
|
||||
|
||||
public int getAdventureInvasionBoss() {
|
||||
return adventureInvasionBoss;
|
||||
}
|
||||
|
||||
public int getInvasionBossTimesAdd() {
|
||||
return invasionBossTimesAdd;
|
||||
}
|
||||
|
||||
public int getAdventureFastBattle() {
|
||||
return adventureFastBattle;
|
||||
}
|
||||
|
||||
public int getAdventureOffline() {
|
||||
return adventureOffline;
|
||||
}
|
||||
}
|
|
@ -169,12 +169,44 @@ public class GlobalDataManaager {
|
|||
}
|
||||
|
||||
private void updateGetFunctionOfTimeResponse(){
|
||||
long now = TimeUtils.now();
|
||||
Map<Integer, SGlobalSystemConfig> sGlobalSystemConfigMap = SGlobalSystemConfig.getsGlobalSystemConfigMap();
|
||||
PlayerInfoProto.GetFunctionOfTimeResponse.Builder builder = PlayerInfoProto.GetFunctionOfTimeResponse.newBuilder();
|
||||
for(TimeControllerOfFunction timeControllerOfFunction :openTimeOfFuntionCache.values()){
|
||||
builder.addFunctionOfTime(CommonProto.functionOfTime.newBuilder()
|
||||
.setFunctionId(timeControllerOfFunction.getId())
|
||||
.setStartTime((int)(timeControllerOfFunction.getStartTime()/1000))
|
||||
.setEndTime((int)(timeControllerOfFunction.getEndTime()/1000))
|
||||
for(SGlobalSystemConfig sGlobalSystemConfig : sGlobalSystemConfigMap.values()){
|
||||
int id = sGlobalSystemConfig.getId();
|
||||
long systemOpenLong = sGlobalSystemConfig.getSystemOpenLong();
|
||||
long systemEndLong = sGlobalSystemConfig.getSystemEndLong();
|
||||
long seasonOpenLong = sGlobalSystemConfig.getSeasonOpenLong();
|
||||
long seasonEndLong = sGlobalSystemConfig.getSeasonEndLong();
|
||||
int seasonInterval = sGlobalSystemConfig.getSeasonInterval() * 3600;
|
||||
long timeOpenOfThis =0;
|
||||
long timeCloseOfThis =0;
|
||||
if(seasonInterval == 0){
|
||||
timeOpenOfThis = systemOpenLong;
|
||||
timeCloseOfThis = systemEndLong;
|
||||
}else{
|
||||
long diffTime = seasonEndLong - seasonOpenLong;
|
||||
long passTims = now - seasonOpenLong;
|
||||
if(passTims>0){
|
||||
long mod = passTims % (diffTime + seasonInterval);
|
||||
if(mod < diffTime ){//新的周期开启
|
||||
//计算开启时间、关闭时间
|
||||
long turns = passTims / ((diffTime + seasonInterval));
|
||||
long addTim = turns * diffTime;
|
||||
timeOpenOfThis =seasonOpenLong+addTim;
|
||||
timeCloseOfThis =seasonEndLong+addTim;
|
||||
}
|
||||
}else{
|
||||
timeOpenOfThis =seasonOpenLong;
|
||||
timeCloseOfThis =seasonEndLong;
|
||||
}
|
||||
}
|
||||
|
||||
builder.addFunctionOfTime(CommonProto.FunctionOfTime.newBuilder()
|
||||
.setFunctionId(id)
|
||||
.setStartTime((int)(timeOpenOfThis/1000))
|
||||
.setEndTime((int)(timeCloseOfThis/1000))
|
||||
.setInterval(seasonInterval)
|
||||
.build());
|
||||
}
|
||||
getFunctionOfTimeResponse=builder.build();
|
||||
|
|
|
@ -217,13 +217,14 @@ public class ArenaLogic {
|
|||
CommonProto.FightTeamInfo deffightTeamInfo = BehaviorUtil.getFightTeamInfo(defUser,defTeamId);
|
||||
//设置战斗随机种子
|
||||
int seed = (int)(System.currentTimeMillis()/1000);
|
||||
CommonProto.FightData build = CommonProto.FightData.newBuilder()
|
||||
.setFightMaxTime(SArenaSetting.getSArenaSetting().getMostTime())
|
||||
.setFightSeed(seed)
|
||||
.setHeroFightInfos(fightTeamInfo)
|
||||
.addMonsterList(deffightTeamInfo)
|
||||
.build();
|
||||
|
||||
if(skipFight == 0){
|
||||
CommonProto.FightData build = CommonProto.FightData.newBuilder()
|
||||
.setFightMaxTime(SArenaSetting.getSArenaSetting().getMostTime())
|
||||
.setFightSeed(seed)
|
||||
.setHeroFightInfos(fightTeamInfo)
|
||||
.addMonsterList(deffightTeamInfo)
|
||||
.build();
|
||||
builder.setFightData(build);
|
||||
}
|
||||
//数据互换
|
||||
|
|
Loading…
Reference in New Issue