back_recharge
gaojie 2019-03-05 15:23:45 +08:00
commit ca5b16163b
12 changed files with 133 additions and 108 deletions

View File

@ -1,3 +1,3 @@
Id BornItem SpeedFormula InitialEnergy EnergyRecoverSpeed ActionPowerRormula Speed HeroNumlimit EquipNumlimit
int mut,int#int,2 mut,float#float,1 int int mut,int#int,1 mut,int#int,1 int int
1 4#100|14#100|10001#1 0#0#0.3164#0 100 2 0#0#10#1 70#100 999 9999
Id BornItem SpeedFormula InitialEnergy EnergyRecoverSpeed ActionPowerRormula Speed HeroNumlimit EquipNumlimit WorldTalking BornPosition
int mut,int#int,2 mut,float#float,1 int int mut,int#int,1 mut,int#int,1 int int int mut,int#int,1
1 4#100|14#100|10001#1|10002#1|10004#1|10007#1|10008#1|10012#1|10013#1|10019#1 0#0#0.3164#0 100 2 0#0#1#0 70#100 999 9999 1 05#09

View File

@ -1,5 +1,6 @@
Id Info Size MoveConfused EnergyConfused OpenRule
int string mut,int#int,1 int int string
100 序章 10#10 1 0
101 战乱荒林 15#20 1 10
102 三途津 15#20 2 10
103 风见原野 40#20 2 20

View File

@ -1,5 +1,8 @@
Id Style Refresh TriggerRules ExploreValues InitialEventId
int int int int int int
100001 3 3 2 0 100001
100002 5 3 2 0 100002
0 0 0 0 0 0
101001 1 2 1 0 101001
101002 1 2 1 0 101002
101026 1 2 1 0 101150
@ -12,11 +15,11 @@ int int int int int int
101019 2 2 2 0 101127
101020 2 2 2 0 101128
101022 2 2 2 0 101130
101015 2 3 2 0 101135
101015 2 3 2 0 101134
101021 2 3 2 0 101129
101005 3 2 2 0 101005
101006 0 0 0 0 0
101007 5 3 2 0 101153
101006 4 2 2 0 101153
0 0 0 0 0 0
101008 5 4 2 0 101006
101009 5 3 2 0 101031
101010 5 3 2 0 101050

View File

@ -0,0 +1,3 @@
id Event Groups isMustAppear
int int mut,int#int,2 int
1 100002 5#4 0

View File

@ -2,37 +2,36 @@ id Event Groups isMustAppear
int int mut,int#int,2 int
1 101009 15#9 0
2 101008 6#12 0
3 101007 7#15 0
4 101028 8#16|8#17|9#17|8#18 0
5 101027 4#7|4#8|5#8|4#9 0
6 101005 15#20 0
7 101026 2#6|2#7|3#7|2#8|2#9 0
8 101003 7#13 0
9 101004 8#2|9#2|10#2 0
10 101025 12#10|11#11|12#11|11#12 0
11 101020 6#7|7#7|6#8 0
12 101001 13#16|12#17|14#17|12#18|14#18 0
13 101002 5#12|5#13|5#14|5#15|4#16 0
14 101019 3#2|2#3|3#3 0
15 101010 2#20 0
16 101019 13#6|14#7|13#8|9#14|10#14|9#15 0
17 101018 9#7 0
18 101017 1#1 0
19 101002 4#2|5#2|4#3|5#3|4#4 0
20 101016 6#1 0
21 101026 14#10|13#11|13#12|14#12 0
22 101001 7#16|6#17|7#18|7#19 0
23 101015 13#14|14#15|15#15 0
24 101014 10#3|10#4|9#5|11#5 0
25 101014 11#15|12#15|11#16|11#17 0
26 101026 7#2|7#3|7#4|8#4|8#5 0
27 101001 13#2|14#2|13#3|14#3|14#4 0
28 101024 3#5 0
29 101001 10#16|10#17|9#18|9#19 0
30 101023 12#3 0
31 101002 3#17|2#18|2#19|3#19|4#19 0
32 101026 10#7|10#8|10#9|11#9 0
33 101022 5#18|6#18|6#19 0
34 101021 1#14|1#15|2#15|1#16|2#16|1#17|2#17|1#18 0
35 101020 2#11|3#11|3#12 0
36 101002 8#10|7#11|8#11|9#12 0
3 101028 8#16|8#17|9#17|8#18 0
4 101027 4#7|4#8|5#8|4#9 0
5 101005 15#20 0
6 101026 2#6|2#7|3#7|2#8|2#9 0
7 101003 7#13 0
8 101004 8#2|9#2|10#2 0
9 101025 12#10|11#11|12#11|11#12 0
10 101020 6#7|7#7|6#8 0
11 101001 13#16|12#17|14#17|12#18|14#18 0
12 101002 5#12|5#13|5#14|5#15|4#16 0
13 101019 3#2|2#3|3#3 0
14 101010 2#20 0
15 101019 13#6|14#7|13#8|9#14|10#14|9#15 0
16 101018 9#7 0
17 101017 1#1 0
18 101002 4#2|5#2|4#3|5#3|4#4 0
19 101016 6#1 0
20 101026 14#10|13#11|13#12|14#12 0
21 101001 7#16|6#17|7#18|7#19 0
22 101015 13#14|14#15|15#15 0
23 101014 10#3|10#4|9#5|11#5 0
24 101014 11#15|12#15|11#16|11#17 0
25 101026 7#2|7#3|7#4|8#4|8#5 0
26 101001 13#2|14#2|13#3|14#3|14#4 0
27 101024 3#5 0
28 101001 10#16|10#17|9#18|9#19 0
29 101023 12#3 0
30 101002 3#17|2#18|2#19|3#19|4#19 0
31 101026 10#7|10#8|10#9|11#9 0
32 101022 5#18|6#18|6#19 0
33 101021 1#14|1#15|2#15|1#16|2#16|1#17|2#17|1#18 0
34 101020 2#11|3#11|3#12 0
35 101002 8#10|7#11|8#11|9#12 0

View File

@ -3,9 +3,10 @@ int int mut,int#int,2
1 2 1503#1
2 3 1#5#3
3 3 1#2#3
4 1 1
4 1 1#101016#101112
5 1 102022
6 2 1503#1
7 3 1#3#3
8 3 1#4#3
9 3 1#2#3
10 4 2#2

View File

@ -1,8 +1,28 @@
Id AddConditionID BehaviorType BehaviorTypeValues Reward JumpType JumpTypeValues
int int int mut,int#int,2 int int mut,int#int,2
100001 0 13 1 0 4 null
100002 0 0 null 0 4 null
100003 0 11 1#100#0804#100001 0 5 100003
100004 0 0 null 0 4 null
100005 0 0 null 0 5 100004
100006 0 0 null 0 5 100005
100007 0 0 null 0 5 100006
100008 0 0 null 0 5 100007
100009 0 0 null 0 1 100008
100010 0 0 null 0 1 100009
100011 0 0 null 0 1 100010
100012 0 0 null 0 1 100011
100013 0 0 null 0 1 100012
100014 0 0 null 0 1 100013
100015 0 1 10101 0 1 100014
100016 0 0 null 0 5 100015
100017 0 0 null 0 5 100016
100018 0 0 null 0 5 100017
100019 0 0 null 0 5 100018
100020 0 15 100002 0 4 null
101001 1 2 1503#1 10102 4 null
101002 0 0 null 0 4 null
101003 0 5 0 0 8 101145#101150|1#4
101003 0 5 0 0 4 null
101004 0 0 null 0 4 null
101005 0 0 null 0 5 101007
101006 0 0 null 0 4 null
@ -67,7 +87,7 @@ int int int mut,int#int,2 int int mut,int#int,2
101065 0 0 null 0 5 101047
101066 0 0 null 0 5 101048
101067 0 0 null 0 1 101049
101068 0 11 1#101#1318#101011#101#1213#101012 0 4 null
101068 0 17 1#101009#101#1318#101011#101#1213#101012 0 4 null
101069 0 0 null 0 1 101051
101070 0 0 null 0 4 null
101071 0 1 10101 0 1 101052
@ -95,9 +115,9 @@ int int int mut,int#int,2 int int mut,int#int,2
101093 0 1 10104 0 1 101063
101094 0 0 null 0 4 null
101095 0 0 null 0 4 null
101096 0 1 10104 0 4 null
101096 0 18 10104#101011 0 4 null
101097 0 0 null 0 4 null
101098 0 1 10105 0 5 101137
101098 0 1 10105 0 5 101135
101099 0 0 null 0 4 null
101100 0 0 null 0 5 101068
101101 0 0 null 0 4 null
@ -149,30 +169,30 @@ int int int mut,int#int,2 int int mut,int#int,2
101147 0 0 null 0 1 101110
101148 0 0 null 0 1 101111
101149 0 0 null 0 1 101112
101150 0 0 null 0 4 null
101150 0 11 2#101#0104#101 0 4 null
101151 0 0 null 0 4 null
101152 0 0 null 0 1 101116
101152 0 0 null 0 1 101115
101153 0 0 null 0 4 null
101154 0 1 10102 0 1 101117
101154 0 1 10102 0 1 101116
101155 0 0 null 0 4 null
101156 0 1 10102 0 1 101118
101156 0 1 10102 0 1 101117
101157 0 0 null 0 4 null
101158 0 0 null 10102 1 101119
101158 0 0 null 10102 1 101118
101159 0 0 null 0 4 null
101160 0 1 10105 0 1 101120
101160 0 1 10105 0 1 101119
101161 0 0 null 0 4 null
101162 0 0 null 0 1 101121
101163 0 1 10101 0 1 101122
101162 0 0 null 0 1 101120
101163 0 1 10101 0 1 101121
101164 0 0 null 0 4 null
101165 0 0 null 0 1 101123
101165 0 0 null 0 1 101122
101166 0 0 null 0 4 null
101167 0 1 10101 0 1 101124
101167 0 1 10101 0 1 101123
101168 0 0 null 0 4 null
101169 0 1 10102 0 1 101125
101169 0 1 10102 0 1 101124
101170 0 0 null 0 4 null
101171 0 1 10103 0 1 101126
101171 0 1 10103 0 1 101125
101172 0 0 null 0 4 null
101173 0 1 10103 0 1 101127
101173 0 1 10103 0 1 101126
101174 0 0 null 0 4 null
101175 0 0 null 0 4 null
101176 1 2 1503#1 10102 4 null
@ -187,35 +207,24 @@ int int int mut,int#int,2 int int mut,int#int,2
101185 0 0 null 0 4 null
101186 1 2 1503#1 10102 4 null
101187 0 0 null 0 4 null
101188 0 0 null 0 1 101138
101189 0 0 null 0 1 101139
101190 0 0 null 0 1 101140
101191 0 0 null 0 1 101141
101192 0 0 null 0 1 101142
101193 0 0 null 0 1 101143
101194 0 0 null 0 1 101144
101195 0 9 1 0 4 null
101196 0 0 null 0 5 101146
101197 0 0 null 0 5 101147
101198 0 0 null 0 1 101148
101199 0 0 null 0 1 101149
101188 0 0 null 0 1 101136
101189 0 0 null 0 1 101137
101190 0 0 null 0 1 101138
101191 0 0 null 0 1 101139
101192 0 0 null 0 1 101140
101193 0 0 null 0 1 101141
101194 0 0 null 0 1 101142
101195 0 15 101012 0 4 null
101196 0 0 null 0 5 101144
101197 0 0 null 0 5 101146
101198 0 0 null 0 1 101147
101199 0 0 null 0 1 101148
101200 0 0 null 0 4 null
101201 0 0 null 0 4 null
101202 0 0 null 0 5 101067
101202 10 0 null 0 5 101067
101203 0 0 null 0 4 null
101204 0 0 null 0 5 101155
101204 0 19 2#102#0205 0 4 null
101205 0 0 null 0 4 null
101206 0 0 null 0 5 101156
101207 0 0 null 0 5 101157
101208 0 0 null 0 5 101158
101209 0 0 null 0 5 101159
101210 0 0 null 0 1 101160
101211 0 0 null 0 1 101161
101212 0 0 null 0 1 101162
101213 0 0 null 0 1 101163
101214 0 0 null 0 1 101164
101215 0 0 null 0 1 101165
101216 0 0 null 0 4 null
102001 1 2 1503#1 10102 4 null
102002 0 0 null 0 4 null
102003 1 2 1503#1 10102 4 null

View File

@ -28,13 +28,11 @@ public class SGameSetting implements BaseConfig {
private int worldTalking;
private static SGameSetting gameSetting;
private int[] bornPosition;
private static SGameSetting gameSetting;
@Override
public void init() throws Exception {
Map<Integer, SGameSetting> config = STableManager.getConfig(SGameSetting.class);
@ -81,6 +79,10 @@ public class SGameSetting implements BaseConfig {
return equipNumlimit;
}
public int[] getBornPosition() {
return bornPosition;
}
public float calSpeed(float speed, int breakId){
if(breakId == 0){
return 0;

View File

@ -39,7 +39,7 @@ public class GetPlayerInfoHandler extends BaseHandler{
User user = UserManager.getUserForLogin(userId);
CommonProto.Player player = CBean2Proto.getPlayer(userId, user.getPlayerInfoManager(), user.getMapManager().getCurMapId());
CommonProto.Player player = CBean2Proto.getPlayer(userId, user.getPlayerInfoManager(), user.getMapManager().getMaxMapId(), user.getMapManager().getCurMapId());
PlayerInfoProto.GetPlayerInfoResponse getPlayerInfoResponse
= PlayerInfoProto.GetPlayerInfoResponse.newBuilder()

View File

@ -60,25 +60,27 @@ public class MapLogic {
public void enterMap(ISession iSession, int mapId, int teamId, MessageTypeProto.MessageType messageType) throws Exception {
int uid = iSession.getUid();
User user = UserManager.getUser(uid);
List<TeamPosHeroInfo> teamPosHeroInfos = user.getTeamPosManager().getTeamPosForHero().get(teamId);
if (teamPosHeroInfos == null || teamPosHeroInfos.isEmpty()) {
MessageUtil.sendErrorResponse(iSession, 0, messageType.getNumber(), "阵容不存在");
return;
}
Set<String> heroes = new HashSet<>(teamPosHeroInfos.size());
for (TeamPosHeroInfo heroInfo : teamPosHeroInfos) {
Hero hero = user.getHeroManager().getHero(heroInfo.getHeroId());
if (hero == null) {
MapManager mapManager = user.getMapManager();
if (teamId != 0) {
List<TeamPosHeroInfo> teamPosHeroInfos = user.getTeamPosManager().getTeamPosForHero().get(teamId);
if (teamPosHeroInfos == null || teamPosHeroInfos.isEmpty()) {
MessageUtil.sendErrorResponse(iSession, 0, messageType.getNumber(), "阵容不存在");
return;
}
hero.setCurHp(HeroLogic.getInstance().calHeroAttribute(hero, GlobalsDef.HP_TYPE));
heroes.add(heroInfo.getHeroId());
Set<String> heroes = new HashSet<>(teamPosHeroInfos.size());
for (TeamPosHeroInfo heroInfo : teamPosHeroInfos) {
Hero hero = user.getHeroManager().getHero(heroInfo.getHeroId());
if (hero == null) {
return;
}
hero.setCurHp(HeroLogic.getInstance().calHeroAttribute(hero, GlobalsDef.HP_TYPE));
heroes.add(heroInfo.getHeroId());
}
if (heroes.size() != teamPosHeroInfos.size()) {
return;
}
mapManager.setHeroes(heroes);
}
if (heroes.size() != teamPosHeroInfos.size()) {
return;
}
MapManager mapManager = user.getMapManager();
mapManager.setHeroes(heroes);
if (mapManager.getCurMapId() == 0) {
user.getPlayerInfoManager().setMapId(mapId);
mapManager.setCurMapId(mapId);
@ -187,6 +189,11 @@ public class MapLogic {
if (mapManager.getCurMapId() > mapManager.getMaxMapId()) {
mapManager.setMaxMapId(mapManager.getCurMapId());
}
if (mapManager.getMaxMapId() == 100) {
SGameSetting sGameSetting = SGameSetting.getGameSetting();
int xy = CellUtil.xy2Pos(sGameSetting.getBornPosition()[0], sGameSetting.getBornPosition()[1]);
mapManager.setCurXY(xy);
}
mapManager.setMapInfo(newMap);
mapManager.setTypeEight(spicelMap);
}

View File

@ -125,8 +125,8 @@ public class STableManager {
public static <T> Map<Integer, Map<Integer, T>> getMapConfig(Class<T> clazz) throws Exception {
Map<Integer, Map<Integer, T>> map = new HashMap<>();
String tableName = clazz.getAnnotation(Table.class).name();
int mapType = 101;
for (int i = 101; i < 1000; i++) {
int mapType = 100;
for (int i = 100; i < 1000; i++) {
Map<Integer, T> mapConf = new HashMap<>();
tableName = tableName + "_"+ i;
String path = SysUtil.getPath("conf", "server", tableName + ".txt");

View File

@ -18,7 +18,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
public class CBean2Proto {
public static CommonProto.Player getPlayer(int uid, PlayerManager playerManager, int mapId) {
public static CommonProto.Player getPlayer(int uid, PlayerManager playerManager, int maxMapId, int mapId) {
CommonProto.Player player = CommonProto.Player
.newBuilder()
.setUid(uid)
@ -28,7 +28,7 @@ public class CBean2Proto {
.setVipLevel(playerManager.getVipLevel())
.setFamilyId(playerManager.getFamilyId())
.setHead(playerManager.getHead())
.setCurMapId(mapId == 0 ? 101 : mapId)
.setCurMapId((maxMapId == 0 && mapId == 0) ? 100 : mapId)
.build();
return player;
}