Merge branch 'master_test_gn' of http://60.1.1.230/backend/jieling_server into master_test_gn
commit
f2156b6f95
|
@ -123,6 +123,8 @@ public class EventType {
|
||||||
public static final int fiftytwo = 52;
|
public static final int fiftytwo = 52;
|
||||||
public static final int fiftythree = 53;
|
public static final int fiftythree = 53;
|
||||||
public static final int fiftyFour = 54;
|
public static final int fiftyFour = 54;
|
||||||
|
public static final int fiftyFive = 55;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static final int updatePonintEvent = 1;
|
public static final int updatePonintEvent = 1;
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
package com.ljsd.jieling.handler.map.behavior;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.handler.map.EventType;
|
||||||
|
import com.ljsd.jieling.logic.dao.root.User;
|
||||||
|
import com.ljsd.jieling.logic.mission.GameEvent;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import rpc.protocols.MapInfoProto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lvxinran
|
||||||
|
* @date 2021/6/8
|
||||||
|
* @discribe
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class FiftyFiveBehavior extends BaseBehavior {
|
||||||
|
@Override
|
||||||
|
public int getBehaviorType() {
|
||||||
|
return EventType.fiftyFive;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean process(int optionId, User user, int[][] behaviorTypeValues, MapInfoProto.EventUpdateResponse.Builder eventUpdateResponse) throws Exception {
|
||||||
|
BehaviorUtil.destoryApointXY(user,user.getMapManager().getCurXY());
|
||||||
|
user.getUserMissionManager().onGameEvent(user, GameEvent.ENDLESS_SMALL_REWARD);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,6 +2,7 @@ package com.ljsd.jieling.handler.map.behavior;
|
||||||
|
|
||||||
import com.ljsd.jieling.handler.map.EventType;
|
import com.ljsd.jieling.handler.map.EventType;
|
||||||
import com.ljsd.jieling.logic.dao.root.User;
|
import com.ljsd.jieling.logic.dao.root.User;
|
||||||
|
import com.ljsd.jieling.logic.mission.GameEvent;
|
||||||
import rpc.protocols.MapInfoProto;
|
import rpc.protocols.MapInfoProto;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@ -16,7 +17,7 @@ public class FourtySixBehavior extends BaseBehavior {
|
||||||
public boolean process(int optionId, User user, int[][] behaviorTypeValues, MapInfoProto.EventUpdateResponse.Builder eventUpdateResponse) throws Exception {
|
public boolean process(int optionId, User user, int[][] behaviorTypeValues, MapInfoProto.EventUpdateResponse.Builder eventUpdateResponse) throws Exception {
|
||||||
|
|
||||||
BehaviorUtil.destoryApointXY(user,user.getMapManager().getCurXY());
|
BehaviorUtil.destoryApointXY(user,user.getMapManager().getCurXY());
|
||||||
|
user.getUserMissionManager().onGameEvent(user, GameEvent.ENDLESS_BIG_REWARD);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,6 +184,10 @@ public class CumulationData {
|
||||||
public int energyBuyTimes;
|
public int energyBuyTimes;
|
||||||
//地图探索度达到
|
//地图探索度达到
|
||||||
public int mapOpenPercent;
|
public int mapOpenPercent;
|
||||||
|
//小宝箱
|
||||||
|
public int endlessSmallReward;
|
||||||
|
//大宝箱
|
||||||
|
public int endlessBigReward;
|
||||||
|
|
||||||
//山河社稷星星数
|
//山河社稷星星数
|
||||||
public int hardstage_stars;
|
public int hardstage_stars;
|
||||||
|
|
|
@ -118,6 +118,8 @@ public enum GameEvent {
|
||||||
ENDLESS_KILL_SMALL_BOSS,//无尽杀小boss
|
ENDLESS_KILL_SMALL_BOSS,//无尽杀小boss
|
||||||
ENDLESS_KILL_LAST_BOSS,//无尽击杀最终boss
|
ENDLESS_KILL_LAST_BOSS,//无尽击杀最终boss
|
||||||
ENDLESS_OPEN_MAP,//无尽提升探索度
|
ENDLESS_OPEN_MAP,//无尽提升探索度
|
||||||
|
ENDLESS_SMALL_REWARD,
|
||||||
|
ENDLESS_BIG_REWARD,
|
||||||
|
|
||||||
HARSTAGE_STARS,//山河社稷图星数
|
HARSTAGE_STARS,//山河社稷图星数
|
||||||
HARSTAGE_NODE,//山河社稷图通关章节
|
HARSTAGE_NODE,//山河社稷图通关章节
|
||||||
|
|
|
@ -133,7 +133,9 @@ public enum MissionType {
|
||||||
ENDLESS_BOSS_KILL(125),
|
ENDLESS_BOSS_KILL(125),
|
||||||
ENDLESS_LAST_BOSS(126),
|
ENDLESS_LAST_BOSS(126),
|
||||||
ENDLESS_BUY_ENERGY(127),
|
ENDLESS_BUY_ENERGY(127),
|
||||||
ENDLESS_OPEN_PERCENT(128)
|
ENDLESS_OPEN_PERCENT(128),
|
||||||
|
ENDLESS_SMALL_REWARD(129),
|
||||||
|
ENDLESS_BIG_REWARD(130),
|
||||||
;
|
;
|
||||||
|
|
||||||
private int missionType;
|
private int missionType;
|
||||||
|
|
|
@ -151,6 +151,8 @@ public class DataManagerDistributor {
|
||||||
judges.put(MissionType.ENDLESS_BOSS_KILL,new EndlessBossKillManager());
|
judges.put(MissionType.ENDLESS_BOSS_KILL,new EndlessBossKillManager());
|
||||||
judges.put(MissionType.ENDLESS_LAST_BOSS,new EndlessLastBossKillManager());
|
judges.put(MissionType.ENDLESS_LAST_BOSS,new EndlessLastBossKillManager());
|
||||||
judges.put(MissionType.ENDLESS_OPEN_PERCENT,new EndlessOpenPercentManager());
|
judges.put(MissionType.ENDLESS_OPEN_PERCENT,new EndlessOpenPercentManager());
|
||||||
|
judges.put(MissionType.ENDLESS_SMALL_REWARD,new EndlessSmallRewardManager());
|
||||||
|
judges.put(MissionType.ENDLESS_BIG_REWARD,new EndlessBigRewardManager());
|
||||||
|
|
||||||
//山河社稷图
|
//山河社稷图
|
||||||
judges.put(MissionType.HARSTAGE_STARS, new HardStageStarsDataManager());
|
judges.put(MissionType.HARSTAGE_STARS, new HardStageStarsDataManager());
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.ljsd.jieling.logic.mission.data;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.logic.dao.CumulationData;
|
||||||
|
import com.ljsd.jieling.logic.dao.root.User;
|
||||||
|
import com.ljsd.jieling.logic.mission.MissionType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lvxinran
|
||||||
|
* @date 2021/6/8
|
||||||
|
* @discribe
|
||||||
|
*/
|
||||||
|
public class EndlessBigRewardManager extends AbstractDataManager {
|
||||||
|
@Override
|
||||||
|
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
|
||||||
|
data.endlessBigReward++;
|
||||||
|
return new CumulationData.Result(missionType);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getProcess(User user, CumulationData data, int[] missionSubType) {
|
||||||
|
return data.endlessBigReward;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.ljsd.jieling.logic.mission.data;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.logic.dao.CumulationData;
|
||||||
|
import com.ljsd.jieling.logic.dao.root.User;
|
||||||
|
import com.ljsd.jieling.logic.mission.MissionType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lvxinran
|
||||||
|
* @date 2021/6/8
|
||||||
|
* @discribe
|
||||||
|
*/
|
||||||
|
public class EndlessSmallRewardManager extends AbstractDataManager{
|
||||||
|
@Override
|
||||||
|
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
|
||||||
|
data.endlessSmallReward++;
|
||||||
|
return new CumulationData.Result(missionType);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getProcess(User user, CumulationData data, int[] missionSubType) {
|
||||||
|
return data.endlessSmallReward;
|
||||||
|
}
|
||||||
|
}
|
|
@ -462,6 +462,15 @@ public class MissionEventDistributor {
|
||||||
eventEnumListMap.put(GameEvent.ENDLESS_OPEN_MAP, typeList);
|
eventEnumListMap.put(GameEvent.ENDLESS_OPEN_MAP, typeList);
|
||||||
eventProcessor.put(GameEvent.ENDLESS_OPEN_MAP, new CumulationDataEventProcessor());
|
eventProcessor.put(GameEvent.ENDLESS_OPEN_MAP, new CumulationDataEventProcessor());
|
||||||
|
|
||||||
|
typeList = new ArrayList<>();
|
||||||
|
typeList.add(MissionType.ENDLESS_SMALL_REWARD);
|
||||||
|
eventEnumListMap.put(GameEvent.ENDLESS_SMALL_REWARD, typeList);
|
||||||
|
eventProcessor.put(GameEvent.ENDLESS_SMALL_REWARD, new CumulationDataEventProcessor());
|
||||||
|
|
||||||
|
typeList = new ArrayList<>();
|
||||||
|
typeList.add(MissionType.ENDLESS_BIG_REWARD);
|
||||||
|
eventEnumListMap.put(GameEvent.ENDLESS_BIG_REWARD, typeList);
|
||||||
|
eventProcessor.put(GameEvent.ENDLESS_BIG_REWARD, new CumulationDataEventProcessor());
|
||||||
|
|
||||||
//山河社稷图
|
//山河社稷图
|
||||||
typeList = new ArrayList<>();
|
typeList = new ArrayList<>();
|
||||||
|
|
|
@ -841,7 +841,7 @@ public class BuyGoodsNewLogic {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void dailyRefresh(User user){
|
private static void dailyRefresh(User user){
|
||||||
NewRechargeInfo info = user.getPlayerInfoManager().getNewRechargeInfo();
|
NewRechargeInfo info = user.getPlayerInfoManager().getNewRechargeInfo();
|
||||||
if(TimeUtils.differentDays(info.getLastRefreshTime(),System.currentTimeMillis())<1){
|
if(TimeUtils.differentDays(info.getLastRefreshTime(),System.currentTimeMillis())<1){
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue