剩余时间
parent
bea8a835a3
commit
ab96501d1c
|
@ -1,149 +1,149 @@
|
||||||
Id Contents Rewardgroup Skill OpenEvent EndEvent
|
Id Contents Rewardgroup
|
||||||
int mut,int#int,2 mut,int#int,1 string int int
|
int mut,int#int,2 mut,int#int,1
|
||||||
10001 5001#5002 10001 0 0
|
10001 5001#5002 10001
|
||||||
10101 1#2#3 10101#20101 0 0
|
10101 1#2#3 10101#20101
|
||||||
10102 4#5#6 10102#20102 0 0
|
10102 4#5#6 10102#20102
|
||||||
10103 7#8#9 10103#20103 0 0
|
10103 7#8#9 10103#20103
|
||||||
10104 14#1#3 10104#20104 0 0
|
10104 14#1#3 10104#20104
|
||||||
10105 14#4#6 10105#20105 0 0
|
10105 14#4#6 10105#20105
|
||||||
10106 14#7#9 10106#20106 0 0
|
10106 14#7#9 10106#20106
|
||||||
10107 11#1#3 10107#20107 0 0
|
10107 11#1#3 10107#20107
|
||||||
10108 11#4#6 10108#20108 0 0
|
10108 11#4#6 10108#20108
|
||||||
10109 11#7#9 10109#20109 0 0
|
10109 11#7#9 10109#20109
|
||||||
10110 11 10110#20110 0 0
|
10110 11 10110#20110
|
||||||
10111 136#137#138 10104#20104 0 0
|
10111 136#137#138 10104#20104
|
||||||
10201 16#17#18 10201#20201 0 0
|
10201 16#17#18 10201#20201
|
||||||
10202 20#16#18 10202#20202 0 0
|
10202 20#16#18 10202#20202
|
||||||
10203 23#16#18 10203#20203 0 0
|
10203 23#16#18 10203#20203
|
||||||
10204 23 10204#20204 0 0
|
10204 23 10204#20204
|
||||||
10205 23#19#21 10205#20205 0 0
|
10205 23#19#21 10205#20205
|
||||||
10301 25#26#27 10301#20301 0 0
|
10301 25#26#27 10301#20301
|
||||||
10302 28#29#30 10302#20302 0 0
|
10302 28#29#30 10302#20302
|
||||||
10303 32#25#27 10303#20303 0 0
|
10303 32#25#27 10303#20303
|
||||||
10304 32#28#30 10304#20304 0 0
|
10304 32#28#30 10304#20304
|
||||||
10305 32 10305#20305 0 0
|
10305 32 10305#20305
|
||||||
10401 34#35#36 10401#20401 0 0
|
10401 34#35#36 10401#20401
|
||||||
10402 37#38#39 10402#20402 0 0
|
10402 37#38#39 10402#20402
|
||||||
10403 41#34#36 10403#20403 0 0
|
10403 41#34#36 10403#20403
|
||||||
10404 41#37#39 10404#20404 0 0
|
10404 41#37#39 10404#20404
|
||||||
10405 44#34#36 10405#20405 0 0
|
10405 44#34#36 10405#20405
|
||||||
10406 44#37#39 10406#20406 0 0
|
10406 44#37#39 10406#20406
|
||||||
10407 44 10407#20407 0 0
|
10407 44 10407#20407
|
||||||
10408 43#45 10409#20409 0 0
|
10408 43#45 10409#20409
|
||||||
10409 43#45#40#42 10408#20408 0 0
|
10409 43#45#40#42 10408#20408
|
||||||
10501 46#48 10501#20501 0 0
|
10501 46#48 10501#20501
|
||||||
10502 46#47#48 10502#20502 0 0
|
10502 46#47#48 10502#20502
|
||||||
10503 50#46#48 10503#20503 0 0
|
10503 50#46#48 10503#20503
|
||||||
10504 50 10504#20504 0 0
|
10504 50 10504#20504
|
||||||
10505 49#51 10505#20505 0 0
|
10505 49#51 10505#20505
|
||||||
10601 55#56#57 10601#20601 0 0
|
10601 55#56#57 10601#20601
|
||||||
10602 53#55#57 10602#20602 0 0
|
10602 53#55#57 10602#20602
|
||||||
10603 59#55#57 10603#20603 0 0
|
10603 59#55#57 10603#20603
|
||||||
10604 59 10604#20604 0 0
|
10604 59 10604#20604
|
||||||
10605 59#52#54 10605#20605 0 0
|
10605 59#52#54 10605#20605
|
||||||
10701 70#71#72 10701#20701 0 0
|
10701 70#71#72 10701#20701
|
||||||
10702 79#80#81 10702#20702 0 0
|
10702 79#80#81 10702#20702
|
||||||
10703 65#71#80 10703#20703 0 0
|
10703 65#71#80 10703#20703
|
||||||
10704 62#71#80 10704#20704 0 0
|
10704 62#71#80 10704#20704
|
||||||
10705 77#71#80 10705#20705 0 0
|
10705 77#71#80 10705#20705
|
||||||
10706 68 10706#20706 0 0
|
10706 68 10706#20706
|
||||||
10707 77#62#65 10707#20707 0 0
|
10707 77#62#65 10707#20707
|
||||||
10708 77 10708#20708 0 0
|
10708 77 10708#20708
|
||||||
10709 74 10709#20709 0 0
|
10709 74 10709#20709
|
||||||
10801 82#83#84 10801#20801 0 0
|
10801 82#83#84 10801#20801
|
||||||
10802 88#89#90 10802#20802 0 0
|
10802 88#89#90 10802#20802
|
||||||
10803 94#95#96 10803#20803 0 0
|
10803 94#95#96 10803#20803
|
||||||
10804 86#89#95 10804#20804 0 0
|
10804 86#89#95 10804#20804
|
||||||
10805 97#99 10805#20805 0 0
|
10805 97#99 10805#20805
|
||||||
10806 92#85#87 10806#20806 0 0
|
10806 92#85#87 10806#20806
|
||||||
10807 97#98#99 10807#20807 0 0
|
10807 97#98#99 10807#20807
|
||||||
10808 92 10808#20808 0 0
|
10808 92 10808#20808
|
||||||
10809 91#93#85#87 10809#20809 0 0
|
10809 91#93#85#87 10809#20809
|
||||||
10901 106#107#108 10901#20901 0 0
|
10901 106#107#108 10901#20901
|
||||||
10902 109#110#111 10902#20902 0 0
|
10902 109#110#111 10902#20902
|
||||||
10903 104#109#111 10903#20903 0 0
|
10903 104#109#111 10903#20903
|
||||||
10904 101#106#108 10904#20904 0 0
|
10904 101#106#108 10904#20904
|
||||||
10905 113#101#104 10905#20905 0 0
|
10905 113#101#104 10905#20905
|
||||||
10906 113 10906#20906 0 0
|
10906 113 10906#20906
|
||||||
10907 116 10907#20907 0 0
|
10907 116 10907#20907
|
||||||
11001 124#125#126 11001#21001 0 0
|
11001 124#125#126 11001#21001
|
||||||
11002 127#128#129 11002#21002 0 0
|
11002 127#128#129 11002#21002
|
||||||
11003 119#125#128 11003#21003 0 0
|
11003 119#125#128 11003#21003
|
||||||
11004 122#125#128 11004#21004 0 0
|
11004 122#125#128 11004#21004
|
||||||
11005 122 11005#21005 0 0
|
11005 122 11005#21005
|
||||||
11006 131 11006#21006 0 0
|
11006 131 11006#21006
|
||||||
101011 1#2#3 100002#100003#102005#102002 0 0
|
101011 1#2#3 100002#100003#102005#102002
|
||||||
101021 4#5#6 100004#100002#102002#102003#102004#102005 0 0
|
101021 4#5#6 100004#100002#102002#102003#102004#102005
|
||||||
101071 11#1#3 100006#102003#102004#102005#102006 0 0
|
101071 11#1#3 100006#102003#102004#102005#102006
|
||||||
101012 1#2#3 100005#102002#102003#102004#102005 0 0
|
101012 1#2#3 100005#102002#102003#102004#102005
|
||||||
101022 4#5#6 100004#100005#102002#102003#102006#102005 0 0
|
101022 4#5#6 100004#100005#102002#102003#102006#102005
|
||||||
102011 16#17#18 100008#102006#102004#101006#101005#101002 0 0
|
102011 16#17#18 100008#102006#102004#101006#101005#101002
|
||||||
102012 16#17#18 100005#102003#102001 0 0
|
102012 16#17#18 100005#102003#102001
|
||||||
102013 16#17#18 100005#100003#100001#102004#102003#102002#102001#101003 0 0
|
102013 16#17#18 100005#100003#100001#102004#102003#102002#102001#101003
|
||||||
102014 16#17#18 100006#100005#102005#102004#102003#102002#101004#101003 0 0
|
102014 16#17#18 100006#100005#102005#102004#102003#102002#101004#101003
|
||||||
102021 20#16#18 100006#102004#102002#101006#101001 0 0
|
102021 20#16#18 100006#102004#102002#101006#101001
|
||||||
102031 23#16#18 100006#100005#102004#102003#102002#102001#101004#101003#101002#101001 0 0
|
102031 23#16#18 100006#100005#102004#102003#102002#102001#101004#101003#101002#101001
|
||||||
103011 25#26#27 100005#102002#102004 0 0
|
103011 25#26#27 100005#102002#102004
|
||||||
103012 25#26#27 100004#102004 0 0
|
103012 25#26#27 100004#102004
|
||||||
103031 32#25#27 100005#102004#102002 0 0
|
103031 32#25#27 100005#102004#102002
|
||||||
103032 32#25#27 100003#100001#102002#102004 0 0
|
103032 32#25#27 100003#100001#102002#102004
|
||||||
103041 32#28#30 100003#100001#101001#101001#102003 0 0
|
103041 32#28#30 100003#100001#101001#101001#102003
|
||||||
103042 32#28#30 100005#100003#102004#104003#104002 0 0
|
103042 32#28#30 100005#100003#102004#104003#104002
|
||||||
103051 32 100003#100001#101001#101001#102003 0 0
|
103051 32 100003#100001#101001#101001#102003
|
||||||
103052 32 100001#100003 0 0
|
103052 32 100001#100003
|
||||||
103053 32 100005 0 0
|
103053 32 100005
|
||||||
103054 32 100005#100003#100001 0 0
|
103054 32 100005#100003#100001
|
||||||
1010001 1002#1003 100004#102005#102004 0 0
|
1010001 1002#1003 100004#102005#102004
|
||||||
1010002 1005#1006 100004#102002#102005 0 0
|
1010002 1005#1006 100004#102002#102005
|
||||||
1010003 1008#1009 100004#100003#102005#102004#102002#102001 0 0
|
1010003 1008#1009 100004#100003#102005#102004#102002#102001
|
||||||
1010004 1011#1012 100004#102002#102005 0 0
|
1010004 1011#1012 100004#102002#102005
|
||||||
1010005 1014#1016 100004#102002#102005 0 0
|
1010005 1014#1016 100004#102002#102005
|
||||||
1010006 1014#1015 100005#100003#100002#102003#102006 0 0
|
1010006 1014#1015 100005#100003#100002#102003#102006
|
||||||
1010007 1017 100003#100006#102002#102003#102005#102006 0 0
|
1010007 1017 100003#100006#102002#102003#102005#102006
|
||||||
1020001 1018#1019#1020 100006#102005#102003 0 0
|
1020001 1018#1019#1020 100006#102005#102003
|
||||||
1020002 1021#1022#1023 100005#102002#102001#101001#101003 0 0
|
1020002 1021#1022#1023 100005#102002#102001#101001#101003
|
||||||
1020003 1024#1025#1026 100005#100003#100001#102004#102002#101003#101002#101001 0 0
|
1020003 1024#1025#1026 100005#100003#100001#102004#102002#101003#101002#101001
|
||||||
1020004 1027#1028#1029 100006#100003#100001#102005#102002#101004#101003#101001 0 0
|
1020004 1027#1028#1029 100006#100003#100001#102005#102002#101004#101003#101001
|
||||||
1020005 1030#1031#1032 100005#102003#102001 0 0
|
1020005 1030#1031#1032 100005#102003#102001
|
||||||
1020006 1033#1034#1035 100006#100003#100001#102004#102003#102001#101003#101001 0 0
|
1020006 1033#1034#1035 100006#100003#100001#102004#102003#102001#101003#101001
|
||||||
1020007 1036#1037#1038 100005#102003#102001 0 0
|
1020007 1036#1037#1038 100005#102003#102001
|
||||||
1020008 1039#1040#1041 100006#102004#102002#101002 0 0
|
1020008 1039#1040#1041 100006#102004#102002#101002
|
||||||
1020009 1042 100007#102005#102003#101004 0 0
|
1020009 1042 100007#102005#102003#101004
|
||||||
1030001 1043#1044#1045 100003#102004 0 0
|
1030001 1043#1044#1045 100003#102004
|
||||||
1030002 1046#1047#1048 100004#102005 0 0
|
1030002 1046#1047#1048 100004#102005
|
||||||
1030003 1052#1049#1051 100004#100004#102006 0 0
|
1030003 1052#1049#1051 100004#100004#102006
|
||||||
1030004 1053 100007#102007#102005#101004#101002 0 0
|
1030004 1053 100007#102007#102005#101004#101002
|
||||||
1040001 1054#1055#1056 10404#20404 0 0
|
1040001 1054#1055#1056 10404#20404
|
||||||
1040002 1057#1058#1059 10404#20404 0 0
|
1040002 1057#1058#1059 10404#20404
|
||||||
1040003 1060#1061#1062 10405#20405 0 0
|
1040003 1060#1061#1062 10405#20405
|
||||||
1040004 1063 10406#20406 0 0
|
1040004 1063 10406#20406
|
||||||
1040005 1063#1064#1060#1062 10407#20407 0 0
|
1040005 1063#1064#1060#1062 10407#20407
|
||||||
1040006 1065#1066#1067 10409#20409 0 0
|
1040006 1065#1066#1067 10409#20409
|
||||||
1050001 1069 10501#20501 0 0
|
1050001 1069 10501#20501
|
||||||
1050002 1071#1072#1073 10502#20502 0 0
|
1050002 1071#1072#1073 10502#20502
|
||||||
1050003 1075#1071#1073 10503#20503 0 0
|
1050003 1075#1071#1073 10503#20503
|
||||||
1050004 1078 10504#20504 0 0
|
1050004 1078 10504#20504
|
||||||
1050005 1080 10504#20504 0 0
|
1050005 1080 10504#20504
|
||||||
1050006 1081#1082 10504#20504 0 0
|
1050006 1081#1082 10504#20504
|
||||||
1060001 1083#1084#1085 10601#20601 0 0
|
1060001 1083#1084#1085 10601#20601
|
||||||
1060002 1086#1087#1088 10601#20601 0 0
|
1060002 1086#1087#1088 10601#20601
|
||||||
1060003 1089#1090#1091 10601#20601 0 0
|
1060003 1089#1090#1091 10601#20601
|
||||||
1060004 1092 10602#20602 0 0
|
1060004 1092 10602#20602
|
||||||
1060005 1093#1094#1095 10603#20603 0 0
|
1060005 1093#1094#1095 10603#20603
|
||||||
1060006 1096#1097#1098 10604#20604 0 0
|
1060006 1096#1097#1098 10604#20604
|
||||||
1060007 1099#1101#1102#1104 10605#20605 0 0
|
1060007 1099#1101#1102#1104 10605#20605
|
||||||
1070001 1108#1110#1105#1107 10708#20708 0 0
|
1070001 1108#1110#1105#1107 10708#20708
|
||||||
1070002 1111 10709#20709 0 0
|
1070002 1111 10709#20709
|
||||||
1080001 1112#1114 10808#20808 0 0
|
1080001 1112#1114 10808#20808
|
||||||
1080002 1115#1117 10808#20808 0 0
|
1080002 1115#1117 10808#20808
|
||||||
1080003 1118#1120 10808#20808 0 0
|
1080003 1118#1120 10808#20808
|
||||||
1080004 1121#1123 10808#20808 0 0
|
1080004 1121#1123 10808#20808
|
||||||
1080005 1124#1126 10808#20808 0 0
|
1080005 1124#1126 10808#20808
|
||||||
1080006 1127#1129 10808#20808 0 0
|
1080006 1127#1129 10808#20808
|
||||||
1080007 1130#1131 10809#20809 0 0
|
1080007 1130#1131 10809#20809
|
||||||
1080008 1132 10809#20809 0 0
|
1080008 1132 10809#20809
|
||||||
1080009 1133 10809#20809 0 0
|
1080009 1133 10809#20809
|
||||||
1090001 1134#1135#1136 10906#20906 0 0
|
1090001 1134#1135#1136 10906#20906
|
||||||
1090002 1137#1138#1139 10906#20906 0 0
|
1090002 1137#1138#1139 10906#20906
|
||||||
1090003 1140 10907#20907 0 0
|
1090003 1140 10907#20907
|
||||||
111111 1002#1003|1003#1004|1004#1002 10104#20104 0 0
|
111111 1002#1003|1003#1004|1004#1002 10104#20104
|
||||||
|
|
|
@ -8,7 +8,6 @@ import com.ljsd.jieling.handler.map.behavior.BaseBehavior;
|
||||||
import com.ljsd.jieling.handler.map.behavior.BehaviorUtil;
|
import com.ljsd.jieling.handler.map.behavior.BehaviorUtil;
|
||||||
import com.ljsd.jieling.handler.mission.CheckMissionReturn;
|
import com.ljsd.jieling.handler.mission.CheckMissionReturn;
|
||||||
import com.ljsd.jieling.handler.mission.Mission;
|
import com.ljsd.jieling.handler.mission.Mission;
|
||||||
import com.ljsd.jieling.logic.STableManager;
|
|
||||||
import com.ljsd.jieling.logic.dao.*;
|
import com.ljsd.jieling.logic.dao.*;
|
||||||
import com.ljsd.jieling.logic.dao.root.User;
|
import com.ljsd.jieling.logic.dao.root.User;
|
||||||
import com.ljsd.jieling.logic.fight.CheckFight;
|
import com.ljsd.jieling.logic.fight.CheckFight;
|
||||||
|
@ -143,12 +142,12 @@ public class MapLogic {
|
||||||
}
|
}
|
||||||
mapEnterResponse.setMissions(getMission(mapManager.getMission()));
|
mapEnterResponse.setMissions(getMission(mapManager.getMission()));
|
||||||
mapEnterResponse.addAllMapList(cells);
|
mapEnterResponse.addAllMapList(cells);
|
||||||
mapEnterResponse.setLeftTime(getLeftTime(mapManager));
|
|
||||||
mapEnterResponse.setCurXY(mapManager.getCurXY());
|
mapEnterResponse.setCurXY(mapManager.getCurXY());
|
||||||
mapEnterResponse.addAllWakeCells(mapManager.getWalkCells() == null ? new ArrayList<>() : mapManager.getWalkCells());
|
mapEnterResponse.addAllWakeCells(mapManager.getWalkCells() == null ? new ArrayList<>() : mapManager.getWalkCells());
|
||||||
if (mapManager.getTemporaryItems() != null) {
|
if (mapManager.getTemporaryItems() != null) {
|
||||||
mapEnterResponse.setTemporaryItems(CBean2Proto.getDrop(mapManager.getTemporaryItems()));
|
mapEnterResponse.setTemporaryItems(CBean2Proto.getDrop(mapManager.getTemporaryItems()));
|
||||||
}
|
}
|
||||||
|
mapEnterResponse.setLeftTime(getLeftTime(user));
|
||||||
MessageUtil.sendMessage(iSession, 1, messageType.getNumber(), mapEnterResponse.build(), true);
|
MessageUtil.sendMessage(iSession, 1, messageType.getNumber(), mapEnterResponse.build(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,7 +251,7 @@ public class MapLogic {
|
||||||
mapManager.addWalkCells(new HashSet<>(cells));
|
mapManager.addWalkCells(new HashSet<>(cells));
|
||||||
mapManager.setCurXY(curXY);
|
mapManager.setCurXY(curXY);
|
||||||
MapInfoProto.MapUpdateResponse mapUpdateResponse = MapInfoProto.MapUpdateResponse.newBuilder()
|
MapInfoProto.MapUpdateResponse mapUpdateResponse = MapInfoProto.MapUpdateResponse.newBuilder()
|
||||||
.setLeftTime(getLeftTime(mapManager))
|
.setLeftTime(getLeftTime(user))
|
||||||
.build();
|
.build();
|
||||||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), mapUpdateResponse, true);
|
MessageUtil.sendMessage(session, 1, messageType.getNumber(), mapUpdateResponse, true);
|
||||||
return true;
|
return true;
|
||||||
|
@ -282,8 +281,8 @@ public class MapLogic {
|
||||||
MessageUtil.sendErrorResponse(session,0, messageType.getNumber(), "");
|
MessageUtil.sendErrorResponse(session,0, messageType.getNumber(), "");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (getLeftTime(mapManager) <= 0) {
|
if (getLeftTime(user) <= 0) {
|
||||||
LOGGER.info("updateMap() uid=>{}, no step=>{}", uid, getLeftTime(mapManager));
|
LOGGER.info("updateMap() uid=>{}, no step=>{}", uid, getLeftTime(user));
|
||||||
MessageUtil.sendErrorResponse(session,0, messageType.getNumber(), "");
|
MessageUtil.sendErrorResponse(session,0, messageType.getNumber(), "");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -306,7 +305,7 @@ public class MapLogic {
|
||||||
mapManager.setCurXY(curXY);
|
mapManager.setCurXY(curXY);
|
||||||
MapInfoProto.MapUpdateResponse mapUpdateResponse = MapInfoProto.MapUpdateResponse.newBuilder()
|
MapInfoProto.MapUpdateResponse mapUpdateResponse = MapInfoProto.MapUpdateResponse.newBuilder()
|
||||||
.setEventId(cell.getEventId())
|
.setEventId(cell.getEventId())
|
||||||
.setLeftTime(getLeftTime(mapManager))
|
.setLeftTime(getLeftTime(user))
|
||||||
.build();
|
.build();
|
||||||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), mapUpdateResponse, true);
|
MessageUtil.sendMessage(session, 1, messageType.getNumber(), mapUpdateResponse, true);
|
||||||
}
|
}
|
||||||
|
@ -376,8 +375,8 @@ public class MapLogic {
|
||||||
MessageUtil.sendErrorResponse(session,0, messageType.getNumber(), "");
|
MessageUtil.sendErrorResponse(session,0, messageType.getNumber(), "");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (getLeftTime(mapManager) <= 0) {
|
if (getLeftTime(user) <= 0) {
|
||||||
LOGGER.info("mapManager.getLeftTime() <= 0 =>{}", getLeftTime(mapManager));
|
LOGGER.info("mapManager.getLeftTime() <= 0 =>{}", getLeftTime(user));
|
||||||
MessageUtil.sendErrorResponse(session,0, messageType.getNumber(), "");
|
MessageUtil.sendErrorResponse(session,0, messageType.getNumber(), "");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -479,7 +478,7 @@ public class MapLogic {
|
||||||
.build();
|
.build();
|
||||||
eventUpdateResponse.setEventBehaviorCommon(eventBehaviorCommon);
|
eventUpdateResponse.setEventBehaviorCommon(eventBehaviorCommon);
|
||||||
eventUpdateResponse.setEventId(nextEventId);
|
eventUpdateResponse.setEventId(nextEventId);
|
||||||
eventUpdateResponse.setLeftTime(getLeftTime(mapManager));
|
eventUpdateResponse.setLeftTime(getLeftTime(user));
|
||||||
if (dropBuilder != null) {
|
if (dropBuilder != null) {
|
||||||
eventUpdateResponse.setDrop(dropBuilder);
|
eventUpdateResponse.setDrop(dropBuilder);
|
||||||
}
|
}
|
||||||
|
@ -1030,11 +1029,15 @@ public class MapLogic {
|
||||||
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.TAKE_MAP_MISSION_BOX_RESPONSE_VALUE,build,true);
|
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.TAKE_MAP_MISSION_BOX_RESPONSE_VALUE,build,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getLeftTime(MapManager mapManager) {
|
public int getLeftTime(User user) throws Exception {
|
||||||
SChallengeConfig sChallengeConfig = SChallengeConfig.sChallengeConfigs.get(mapManager.getCurMapId());
|
SChallengeConfig sChallengeConfig = SChallengeConfig.sChallengeConfigs.get(user.getMapManager().getCurMapId());
|
||||||
int useTime = (int) ((TimeUtils.now() - mapManager.getStartExporeTime()) / 1000);
|
long startExporeTime = user.getMapManager().getStartExporeTime();
|
||||||
|
if (startExporeTime == 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
int useTime = (int) ((TimeUtils.now() - startExporeTime) / 1000);
|
||||||
if (useTime >= sChallengeConfig.getMapTime()) {
|
if (useTime >= sChallengeConfig.getMapTime()) {
|
||||||
// resetMapInfo();
|
resetMapInfo(user, false);
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
return sChallengeConfig.getMapTime() - useTime;
|
return sChallengeConfig.getMapTime() - useTime;
|
||||||
|
@ -1075,7 +1078,7 @@ public class MapLogic {
|
||||||
}
|
}
|
||||||
mapManager.setStartExporeTime(TimeUtils.now());
|
mapManager.setStartExporeTime(TimeUtils.now());
|
||||||
MapInfoProto.MapStartExploreResponse mapStartExploreResponse = MapInfoProto.MapStartExploreResponse.newBuilder()
|
MapInfoProto.MapStartExploreResponse mapStartExploreResponse = MapInfoProto.MapStartExploreResponse.newBuilder()
|
||||||
.setLeftTime(getLeftTime(mapManager))
|
.setLeftTime(getLeftTime(user))
|
||||||
.build();
|
.build();
|
||||||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), mapStartExploreResponse, true);
|
MessageUtil.sendMessage(session, 1, messageType.getNumber(), mapStartExploreResponse, true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue