Merge branch 'master_test_gn_ys' into master_test_gn
# Conflicts: # serverlogic/src/main/java/com/ljsd/jieling/globals/BIReason.java # serverlogic/src/main/java/com/ljsd/jieling/logic/store/newRechargeInfo/bean/AbstractWelfareBag.javaback_recharge
commit
db8504e51f
|
@ -343,6 +343,9 @@ public interface BIReason {
|
|||
|
||||
int QIMENDUNJIA_DRAW = 1103;//奇门遁甲
|
||||
int QIMENDUNJIA_DRAW_CONSUME = 1104;//奇门遁甲消耗
|
||||
int SIXIANG_UP_COST=1105;//四象心法强化消耗
|
||||
|
||||
int SIXIANG_UP_STAR_COST=1106;//四象心法进阶消耗
|
||||
|
||||
int FOUR_CHALLENGE_FIRST = 1201;//四灵试炼首通
|
||||
int FOUR_CHALLENGE_SWEEP = 1202;//四灵试炼扫荡
|
||||
|
@ -354,4 +357,5 @@ public interface BIReason {
|
|||
|
||||
int SEVEN_WORLD_TREASURE = 1214;//七界秘宝
|
||||
|
||||
|
||||
}
|
|
@ -10,7 +10,10 @@ import com.ljsd.jieling.ktbeans.ReportUtil;
|
|||
import com.ljsd.jieling.logic.GlobalDataManaager;
|
||||
import com.ljsd.jieling.logic.GlobleSystemLogic;
|
||||
import com.ljsd.jieling.logic.activity.ActivityLogic;
|
||||
import com.ljsd.jieling.logic.activity.event.*;
|
||||
import com.ljsd.jieling.logic.activity.event.NewWelfareEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.NewWelfareTypeEnum;
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
import com.ljsd.jieling.logic.activity.event.SuperBoxEvent;
|
||||
import com.ljsd.jieling.logic.activity.fourChallenge.FourChallengeLogic;
|
||||
import com.ljsd.jieling.logic.dao.*;
|
||||
import com.ljsd.jieling.logic.dao.root.GlobalSystemControl;
|
||||
|
@ -175,7 +178,7 @@ public class GetPlayerInfoHandler extends BaseHandler{
|
|||
|
||||
// 四灵试炼初始化
|
||||
FourChallengeLogic.getInstance().firstGetTimes(user);
|
||||
|
||||
List<CommonProto.SixiangxinfaInfo> sixiangxinfaInfos = getSixiangxinfaInfos(heroManager);
|
||||
int randomCount =SLotterySpecialConfig.getLotteryListByDifferentType(7).iterator().next().getCount()- user.getHeroManager().getRandomPoolByType().getOrDefault(11,new HashMap<>()).getOrDefault(7,0);
|
||||
StoreLogic.reloadStoreInfo(user,7);//重载功能商店
|
||||
|
||||
|
@ -222,6 +225,7 @@ public class GetPlayerInfoHandler extends BaseHandler{
|
|||
.setRandomCount(randomCount)
|
||||
.addAllDrawTimes(CBean2Proto.getRandomTypeNums(user))
|
||||
.addAllHelpFightList(CBean2Proto.getHelpFightList(user))
|
||||
.addAllSixiangInfos(sixiangxinfaInfos)
|
||||
.build();
|
||||
ReportUtil.onReportEvent(user, ReportEventEnum.APP_LOGIN.getType());
|
||||
try {
|
||||
|
@ -229,8 +233,6 @@ public class GetPlayerInfoHandler extends BaseHandler{
|
|||
Poster.getPoster().dispatchEvent(new SuperBoxEvent(user.getId(),SuperBoxEvent.default_id));
|
||||
// 超值基金,老玩家兼容
|
||||
Poster.getPoster().dispatchEvent(new SuperBoxEvent(user.getId(),SuperBoxEvent.fund_old_user));
|
||||
// 登峰造极孙悟空
|
||||
Poster.getPoster().dispatchEvent(new HeroUpStarEvent(user.getId(),10023,0));
|
||||
user.getUserMissionManager().onGameEvent(user,GameEvent.DAILY_TASK_TYPE,0,user);
|
||||
MessageUtil.sendIndicationMessage(iSession, 1, MessageTypeProto.MessageType.WorldLevelIndication_VALUE, PlayerInfoProto.WorldLevelIndication.newBuilder().setWorldLeve(GlobleSystemLogic.getGlobalWorldLevelCache()).build(), true);
|
||||
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.GET_PLAYERINFO_RESPONSE_VALUE, getPlayerInfoResponse, true);
|
||||
|
@ -245,6 +247,31 @@ public class GetPlayerInfoHandler extends BaseHandler{
|
|||
}
|
||||
}
|
||||
|
||||
private List<CommonProto.SixiangxinfaInfo> getSixiangxinfaInfos(HeroManager heroManager) {
|
||||
Map<Integer,SixiangProfessionInfo> sixiangDataMap = heroManager.getSixiangDataMap();
|
||||
List<CommonProto.SixiangxinfaInfo> sixiangxinfaInfos = new ArrayList<>(sixiangDataMap.size());
|
||||
for (Map.Entry<Integer, SixiangProfessionInfo> integerMapEntry : sixiangDataMap.entrySet()) {
|
||||
Integer key = integerMapEntry.getKey();
|
||||
SixiangProfessionInfo value = integerMapEntry.getValue();
|
||||
List<CommonProto.SixiangxinfaPropertyInfo> sixiangxinfaPropertyInfos = new ArrayList<>(value.propertyMap.size());
|
||||
for (Map.Entry<Integer, Integer> integerIntegerEntry : value.propertyMap.entrySet()) {
|
||||
CommonProto.SixiangxinfaPropertyInfo sixiangxinfaPropertyInfo = CommonProto.SixiangxinfaPropertyInfo
|
||||
.newBuilder()
|
||||
.setPropertyId(integerIntegerEntry.getKey())
|
||||
.setPropertyNum(integerIntegerEntry.getValue())
|
||||
.build();
|
||||
sixiangxinfaPropertyInfos.add(sixiangxinfaPropertyInfo);
|
||||
}
|
||||
CommonProto.SixiangxinfaInfo sixiangxinfaInfo = CommonProto.SixiangxinfaInfo.newBuilder()
|
||||
.setProfessionId(key)
|
||||
.setLevel(value.level)
|
||||
.addAllPropertyInfoList(sixiangxinfaPropertyInfos)
|
||||
.build();
|
||||
sixiangxinfaInfos.add(sixiangxinfaInfo);
|
||||
}
|
||||
return sixiangxinfaInfos;
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化英雄星级map(针对老号)
|
||||
* @param user
|
||||
|
|
|
@ -0,0 +1,112 @@
|
|||
package com.ljsd.jieling.handler.hero;
|
||||
|
||||
import com.ljsd.jieling.exception.ErrorCode;
|
||||
import com.ljsd.jieling.exception.ErrorCodeException;
|
||||
import com.ljsd.jieling.globals.BIReason;
|
||||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
import com.ljsd.jieling.logic.dao.SixiangProfessionInfo;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.hero.HeroLogic;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import com.ljsd.jieling.util.ItemUtil;
|
||||
import com.ljsd.jieling.util.MessageUtil;
|
||||
import config.SFourQuadrantConfig;
|
||||
import config.SXiuXian;
|
||||
import manager.STableManager;
|
||||
import org.springframework.stereotype.Component;
|
||||
import rpc.protocols.CommonProto;
|
||||
import rpc.protocols.HeroInfoProto;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@Component
|
||||
public class SixiangUpRequestHandler extends BaseHandler<HeroInfoProto.SixiangUpRequest> {
|
||||
@Override
|
||||
public MessageTypeProto.MessageType getMessageCode() {
|
||||
return MessageTypeProto.MessageType.SIXIANG_UP_REQUEST;
|
||||
}
|
||||
|
||||
//四象心法强化消息
|
||||
@Override
|
||||
public void processWithProto(ISession session, HeroInfoProto.SixiangUpRequest proto) throws Exception {
|
||||
int professionId=proto.getProfessionId();//职业id
|
||||
int uid = session.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
SixiangProfessionInfo professionInfo = user.getHeroManager().getSixiangDataMap().get(professionId);
|
||||
if (CheckCurUpIsLimit(professionInfo)) {
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_DEFINE_SELF);
|
||||
}else{
|
||||
int professionLv=professionInfo==null?0:professionInfo.level;
|
||||
SFourQuadrantConfig fourConfig=SFourQuadrantConfig.configByStrtMap.get(professionLv);
|
||||
int[][]costArr=fourConfig.getLvupCost();
|
||||
boolean costResult = ItemUtil.itemCost(user,costArr, BIReason.SIXIANG_UP_COST,professionId);
|
||||
if (costResult) {
|
||||
if (professionInfo==null) {
|
||||
professionInfo=new SixiangProfessionInfo();
|
||||
professionInfo.level=0;
|
||||
professionInfo.propertyMap = new HashMap<>();
|
||||
for (int i=0;i<fourConfig.getPropLimit().length;i++){
|
||||
int[]limit=fourConfig.getPropLimit()[i];
|
||||
professionInfo.propertyMap.put(limit[0],0);
|
||||
}
|
||||
}
|
||||
ArrayList<Integer>_randomList=new ArrayList<>();
|
||||
for (int i=0;i<fourConfig.getPropLimit().length;i++){
|
||||
int[]limit=fourConfig.getPropLimit()[i];
|
||||
if (professionInfo.propertyMap.get(limit[0])<limit[1]){
|
||||
_randomList.add(limit[0]);
|
||||
}
|
||||
}
|
||||
int[][]propLvup=fourConfig.getPropLvup();
|
||||
Random random=new Random();
|
||||
for (int i=0;i<10;i++){
|
||||
int index=random.nextInt(_randomList.size());
|
||||
int propId=_randomList.get(index);
|
||||
int addPropNum=propLvup[propId-1][1];
|
||||
int curPropNum= professionInfo.propertyMap.get(propId)+addPropNum;
|
||||
professionInfo.propertyMap.put(propId,curPropNum);
|
||||
}
|
||||
|
||||
for (int i=0;i<fourConfig.getPropLimit().length;i++){
|
||||
int[]limit=fourConfig.getPropLimit()[i];//当前等级属性加成上限信息
|
||||
if (professionInfo.propertyMap.get(limit[0])>limit[1]){
|
||||
professionInfo.propertyMap.put(limit[0],limit[1]);
|
||||
}
|
||||
}
|
||||
user.getHeroManager().putSixiangDataMap(professionId,professionInfo);
|
||||
List<CommonProto.SixiangxinfaPropertyInfo> _list=new ArrayList<>();
|
||||
for (Map.Entry<Integer, Integer> dic : professionInfo.propertyMap.entrySet()) {
|
||||
CommonProto.SixiangxinfaPropertyInfo propertyInfo= CommonProto.SixiangxinfaPropertyInfo.newBuilder()
|
||||
.setPropertyId(dic.getKey())
|
||||
.setPropertyNum(dic.getValue())
|
||||
.build();
|
||||
_list.add(propertyInfo);
|
||||
}
|
||||
LOGGER.info("属性值:{}",professionInfo.propertyMap.get(1));
|
||||
HeroInfoProto.SixiangUpResponse response=HeroInfoProto.SixiangUpResponse.newBuilder()
|
||||
.addAllInfoList(_list)
|
||||
.build();
|
||||
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.SIXIANG_UP_RESPONSE_VALUE,response,true);
|
||||
}else{
|
||||
LOGGER.error("四象心法强化材料不足");
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_DEFINE_SELF);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///检测当前强化是否已达上限
|
||||
private boolean CheckCurUpIsLimit(SixiangProfessionInfo professionInfo){
|
||||
if (professionInfo==null){
|
||||
return false;
|
||||
}
|
||||
SFourQuadrantConfig fourConfig=SFourQuadrantConfig.configByStrtMap.get(professionInfo.level);
|
||||
for (int[] ints : fourConfig.getPropLimit()) {
|
||||
if (professionInfo.propertyMap.get(ints[0])<ints[1]){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
package com.ljsd.jieling.handler.hero;
|
||||
|
||||
import com.ljsd.jieling.chat.logic.ChatLogic;
|
||||
import com.ljsd.jieling.exception.ErrorCode;
|
||||
import com.ljsd.jieling.exception.ErrorCodeException;
|
||||
import com.ljsd.jieling.globals.BIReason;
|
||||
import com.ljsd.jieling.globals.Global;
|
||||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
import com.ljsd.jieling.logic.dao.SixiangProfessionInfo;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.fight.eventhandler.IFightEventProcesor;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import com.ljsd.jieling.util.ItemUtil;
|
||||
import com.ljsd.jieling.util.MessageUtil;
|
||||
import config.SErrorCodeEerverConfig;
|
||||
import config.SFourQuadrantConfig;
|
||||
import config.SXiuXian;
|
||||
import manager.STableManager;
|
||||
import org.springframework.stereotype.Component;
|
||||
import rpc.protocols.CommonProto;
|
||||
import rpc.protocols.HeroInfoProto;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@Component
|
||||
public class SixiangUpStarRequestHandler extends BaseHandler<HeroInfoProto.SixiangUpRequest> {
|
||||
@Override
|
||||
public MessageTypeProto.MessageType getMessageCode() {
|
||||
return MessageTypeProto.MessageType.SIXIANG_UP_STAR_REQUEST;
|
||||
}
|
||||
|
||||
//四象心法进阶消息
|
||||
@Override
|
||||
public void processWithProto(ISession session, HeroInfoProto.SixiangUpRequest proto) throws Exception {
|
||||
int professionId=proto.getProfessionId();//职业id
|
||||
int uid = session.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
SixiangProfessionInfo professionInfo = user.getHeroManager().getSixiangDataMap().get(professionId);
|
||||
SFourQuadrantConfig fourConfig=SFourQuadrantConfig.configByStrtMap.get(professionInfo.level);
|
||||
if (CheckUpStar(user,professionInfo)) {
|
||||
int[][]costArr=fourConfig.getRankupCost();
|
||||
boolean costResult = ItemUtil.itemCost(user,costArr, BIReason.SIXIANG_UP_STAR_COST,professionId);
|
||||
if (costResult) {
|
||||
professionInfo.level++;
|
||||
user.getHeroManager().putSixiangDataMap(professionId,professionInfo);
|
||||
///进阶成功刷进阶额外加成属性
|
||||
user.getHeroManager().putSixiangPropUpMap(professionId,CalUpStarPropAdd( professionInfo.level));
|
||||
List<CommonProto.SixiangxinfaPropertyInfo> _list=new ArrayList<>();
|
||||
for (Map.Entry<Integer, Integer> dic : professionInfo.propertyMap.entrySet()) {
|
||||
CommonProto.SixiangxinfaPropertyInfo propertyInfo= CommonProto.SixiangxinfaPropertyInfo.newBuilder()
|
||||
.setPropertyId(dic.getKey())
|
||||
.setPropertyNum(dic.getValue())
|
||||
.build();
|
||||
_list.add(propertyInfo);
|
||||
}
|
||||
HeroInfoProto.SixiangUpStarResponse response=HeroInfoProto.SixiangUpStarResponse.newBuilder()
|
||||
.setStarLv(professionInfo.level)
|
||||
.addAllInfoList(_list)
|
||||
.build();
|
||||
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.SIXIANG_UP_STAR_RESPONSE_VALUE,response,true);
|
||||
String message = SErrorCodeEerverConfig.getI18NMessageNeedConvert("Sixiangjinjie_Hint",
|
||||
new Object[]{user.getPlayerInfoManager().getNameColor(), user.getPlayerInfoManager().getNickName(), GetProfessionName(professionId),professionInfo.level},
|
||||
new int[]{0,0,1});
|
||||
ChatLogic.getInstance().sendSysChatMessage(message, Global.DILIGENT_NOTICE, "0", 0, 0, 0, 0, 1);
|
||||
}else {
|
||||
LOGGER.error("四象心法进阶材料不足");
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_DEFINE_SELF);
|
||||
}
|
||||
}else{
|
||||
LOGGER.error("四象心法进阶条件不满足");
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_DEFINE_SELF);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//检测当前职业是否可以进阶
|
||||
public boolean CheckUpStar(User user,SixiangProfessionInfo _professionInfo){
|
||||
if (_professionInfo==null)return false;
|
||||
SFourQuadrantConfig nextFourConfig=SFourQuadrantConfig.configByStrtMap.get(_professionInfo.level+1);
|
||||
if (nextFourConfig==null)return false;
|
||||
int xiuxianLv=user.getHeroManager().getPracticeLevel();//当前修仙等级
|
||||
SXiuXian xiuXian = STableManager.getConfig(SXiuXian.class).get(nextFourConfig.getXiuxianLimit());
|
||||
if (xiuxianLv<xiuXian.getRealmId())return false;
|
||||
SFourQuadrantConfig fourConfig=SFourQuadrantConfig.configByStrtMap.get(_professionInfo.level);
|
||||
for (int i=0;i<fourConfig.getPropLimit().length;i++){
|
||||
int[]limit=fourConfig.getPropLimit()[i];//当前等级属性加成上限信息
|
||||
if (_professionInfo.propertyMap.get(limit[0])<limit[1]){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//计算当前星级的额外属性加成
|
||||
private Map<Integer,Integer> CalUpStarPropAdd(int _level){
|
||||
Map<Integer,Integer>propMap=new HashMap<>();
|
||||
for (int i=0;i<_level;i++){
|
||||
SFourQuadrantConfig fourConfig=SFourQuadrantConfig.configByStrtMap.get(i);
|
||||
int[][]propAddArr=fourConfig.getPropStar();
|
||||
for (int[] ints : propAddArr) {
|
||||
if (propMap.containsKey(ints[0])){
|
||||
int addPropVle=propMap.get(ints[0])+ints[1];
|
||||
propMap.put(ints[0],addPropVle);
|
||||
}else {
|
||||
propMap.put(ints[0],ints[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return propMap;
|
||||
}
|
||||
private String GetProfessionName(int _professionId){
|
||||
String professionName="";
|
||||
switch (_professionId){
|
||||
case 1:professionName="肉盾";break;
|
||||
case 2:professionName="输出";break;
|
||||
case 3:professionName="控制";break;
|
||||
case 4:professionName="辅助";break;
|
||||
}
|
||||
return professionName;
|
||||
}
|
||||
}
|
|
@ -291,6 +291,7 @@ public class SituationLogic {
|
|||
}
|
||||
// 埋点报送
|
||||
ReportUtil.onReportEvent(user, ReportEventEnum.START_SKY_REALM.getType(), sRaceTowerConfig.getType(),id,combat_results,dropResult);
|
||||
BuyGoodsNewLogic.openPush(session, user, PushRechargeType.XIANYUAN_BAOJING.getType(), sRaceTowerConfig.getQuality(), 1);
|
||||
// BuyGoodsNewLogic.openPush(session, user, PushRechargeType.XIANYUAN_BAOJING.getType(), sRaceTowerConfig.getQuality(), 1);
|
||||
// user.getUserMissionManager().onGameEvent(user, GameEvent.DAILY_CHALLENGE,sDailyChallengeConfig.getType());
|
||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),builder.build());
|
||||
|
|
|
@ -34,19 +34,13 @@ public class HeroStarActivity extends AbstractActivity {
|
|||
@Override
|
||||
public void onEvent(IEvent event) throws Exception {
|
||||
|
||||
int uid = 0;
|
||||
int heroTid = 0;
|
||||
if (event instanceof HeroUpStarEvent) {
|
||||
heroTid = ((HeroUpStarEvent) event).getHeroTid();
|
||||
uid = ((HeroUpStarEvent) event).getUid();
|
||||
}
|
||||
else if (event instanceof FiveStarGetEvent){
|
||||
heroTid = ((FiveStarGetEvent) event).getHeroid();
|
||||
uid = ((FiveStarGetEvent) event).getUid();
|
||||
}else {
|
||||
HeroUpStarEvent heroUpStarEvent = (HeroUpStarEvent) event;
|
||||
if (!(event instanceof HeroUpStarEvent)) {
|
||||
return;
|
||||
}
|
||||
User user = UserManager.getUser(uid);
|
||||
User user = UserManager.getUser(heroUpStarEvent.getUid());
|
||||
|
||||
int heroTid = ((HeroUpStarEvent) event).getHeroTid();
|
||||
|
||||
ActivityMission activityMission = user.getActivityManager().getActivityMissionMap().get(id);
|
||||
if( null == activityMission){
|
||||
|
|
|
@ -91,6 +91,26 @@ public class HeroManager extends MongoBase {
|
|||
*/
|
||||
private Map<Integer, Map<Integer,Integer>> wishCountByStar = new HashMap<>();
|
||||
|
||||
/**
|
||||
* 四象心法数据
|
||||
* key: 职业类型 value:职业相关数据
|
||||
*/
|
||||
private Map<Integer, SixiangProfessionInfo> sixiangDataMap = new HashMap<>();
|
||||
|
||||
public Map<Integer, SixiangProfessionInfo> getSixiangDataMap() {
|
||||
return sixiangDataMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 四象心法进阶额外属性加成
|
||||
* key: 职业类型 value:< key: 属性类型 value: 属性加成值 >
|
||||
*/
|
||||
private Map<Integer, Map<Integer,Integer>> sixiangPropUpMap = new HashMap<>();
|
||||
|
||||
public Map<Integer, Map<Integer,Integer>> getSixiangPropUpMap() {
|
||||
return sixiangPropUpMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 心愿可以选择的英雄列表
|
||||
*/
|
||||
|
@ -128,6 +148,17 @@ public class HeroManager extends MongoBase {
|
|||
updateString("wishCountByStar."+type, starMap);
|
||||
}
|
||||
|
||||
public void putSixiangDataMap(int type,SixiangProfessionInfo professionData) {
|
||||
sixiangDataMap.put(type,professionData);
|
||||
updateString("sixiangDataMap."+type, professionData);
|
||||
}
|
||||
|
||||
public void putSixiangPropUpMap(int professionId,Map<Integer,Integer> _propMap) {
|
||||
sixiangPropUpMap.put(professionId,_propMap);
|
||||
updateString("sixiangPropUpMap."+professionId, _propMap);
|
||||
}
|
||||
|
||||
|
||||
public void updateRandCount(int type, int count){
|
||||
updateString("totalCount." + type, count);
|
||||
totalCount.put(type,count);
|
||||
|
@ -461,5 +492,19 @@ public class HeroManager extends MongoBase {
|
|||
wishOpenHeroList.add(heroTid);
|
||||
updateString("wishOpenHeroList", wishOpenHeroList);
|
||||
}
|
||||
|
||||
public int GetSiXiangGongMingLv(){
|
||||
int gongmingLv=0;
|
||||
if (this.sixiangDataMap.size()<4){
|
||||
return gongmingLv;
|
||||
}
|
||||
gongmingLv=this.sixiangDataMap.get(1).level;
|
||||
for (Map.Entry<Integer, SixiangProfessionInfo> infoEntry : this.sixiangDataMap.entrySet()) {
|
||||
if (infoEntry.getValue().level<gongmingLv){
|
||||
gongmingLv=infoEntry.getValue().level;
|
||||
}
|
||||
}
|
||||
return gongmingLv;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
package com.ljsd.jieling.logic.dao;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class SixiangProfessionInfo {
|
||||
public int level;//四象心法职业进阶等级
|
||||
public Map<Integer,Integer>propertyMap;//四象心法属性数据
|
||||
|
||||
}
|
|
@ -93,7 +93,6 @@ public enum TeamEnum {
|
|||
this.teamId = teamId;
|
||||
this.isCross = isCross;
|
||||
this.remarks = remarks;
|
||||
this.isPvp = isPvp;
|
||||
}
|
||||
|
||||
public int getTeamId() {
|
||||
|
|
|
@ -32,6 +32,7 @@ import com.ljsd.jieling.logic.dao.gm.ArenaOfUser;
|
|||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.expedition.ExpeditionLogic;
|
||||
import com.ljsd.jieling.logic.fight.CombatLogic;
|
||||
import com.ljsd.jieling.logic.fight.eventhandler.IFightEventProcesor;
|
||||
import com.ljsd.jieling.logic.fight.passiveSkillCal.PassiveskillCalEnum;
|
||||
import com.ljsd.jieling.logic.help.HelpHero;
|
||||
import com.ljsd.jieling.logic.help.HelpHeroLogic;
|
||||
|
@ -53,10 +54,12 @@ import manager.STableManager;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import rpc.protocols.*;
|
||||
import sun.security.ssl.Debug;
|
||||
import util.MathUtils;
|
||||
import util.StringUtil;
|
||||
import util.TimeUtils;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
@ -2293,6 +2296,39 @@ public class HeroLogic{
|
|||
}
|
||||
combinedAttribute(SPlayerHeadIcon.getHeadIconMap().get(entry.getKey()).getUnlockProperty(),heroAllAttribute);
|
||||
}
|
||||
//四象心法加成
|
||||
for(Map.Entry<Integer, SixiangProfessionInfo> entry : user.getHeroManager().getSixiangDataMap().entrySet()){
|
||||
if (scHero.getProfession()!=entry.getKey()) {
|
||||
continue;
|
||||
}
|
||||
//强化属性
|
||||
Map<Integer,Integer>propertyMap=entry.getValue().propertyMap;
|
||||
int[][] propArr = ItemUtil.mapToArray(propertyMap);
|
||||
combinedAttribute(propArr,heroAllAttribute);
|
||||
if (user.getHeroManager().getSixiangPropUpMap().containsKey(entry.getKey())) {
|
||||
//进阶属性
|
||||
Map<Integer,Integer>upStarPropertyMap=user.getHeroManager().getSixiangPropUpMap().get(entry.getKey());
|
||||
int[][]upStarProp=ItemUtil.mapToArray(upStarPropertyMap);
|
||||
combinedAttribute(upStarProp,heroAllAttribute);
|
||||
}
|
||||
}
|
||||
///四象心法共鸣属性加成
|
||||
if (user.getHeroManager().GetSiXiangGongMingLv()>0){
|
||||
SFourQuadrantConfig fourConfig=SFourQuadrantConfig.configByStrtMap.get(user.getHeroManager().GetSiXiangGongMingLv());
|
||||
combinedAttribute(fourConfig.getPropResonance(),heroAllAttribute);
|
||||
}
|
||||
|
||||
///四象心法技能属性加成
|
||||
Map<Integer,Integer>skillPropertyMap=new HashMap<>();
|
||||
for(Map.Entry<Integer, SixiangProfessionInfo> entry : user.getHeroManager().getSixiangDataMap().entrySet()){
|
||||
if (entry.getValue().level>0) {
|
||||
SFourQuadrantConfig fourConfig=SFourQuadrantConfig.configByStrtMap.get(entry.getValue().level);
|
||||
int[]skillAddProp=fourConfig.getSkill()[entry.getKey()-1];
|
||||
skillPropertyMap.put(skillAddProp[0],skillAddProp[1]);
|
||||
}
|
||||
}
|
||||
int[][]skillProp=ItemUtil.mapToArray(skillPropertyMap);
|
||||
combinedAttribute(skillProp,heroAllAttribute);
|
||||
|
||||
//装备总战力评分
|
||||
int equipForce=0;
|
||||
|
@ -2740,7 +2776,9 @@ public class HeroLogic{
|
|||
}
|
||||
force+=sEquipConfig.getScore();
|
||||
}
|
||||
return force + heroAllAttribute.get(HeroAttributeEnum.EquipForce.getPropertyId());
|
||||
long l = force + heroAllAttribute.get(HeroAttributeEnum.EquipForce.getPropertyId());
|
||||
LOGGER.info("战力::::::{}",l);
|
||||
return l;
|
||||
}
|
||||
|
||||
|
||||
|
@ -3116,6 +3154,7 @@ public class HeroLogic{
|
|||
}
|
||||
totalForce +=force;
|
||||
}
|
||||
LOGGER.info("总战力:::::::::::{}",totalForce);
|
||||
//TODO
|
||||
// if(SimpleTransaction.current()!=null&&SimpleTransaction.current().getSession().getId().equals(heroid)){
|
||||
targetUser.getPlayerInfoManager().setMaxforceHero(heroid);
|
||||
|
@ -5194,4 +5233,5 @@ public class HeroLogic{
|
|||
MessageUtil.sendIndicationMessage(session,1, MessageTypeProto.MessageType.PurpleMansionSealIndication_VALUE,build2,true);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,16 +10,15 @@ import com.ljsd.jieling.logic.dao.root.GuildCache;
|
|||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.family.CrossDeathPathLogic;
|
||||
import com.ljsd.jieling.logic.rank.IRank;
|
||||
import config.SGuildCheckpointConfig;
|
||||
import manager.STableManager;
|
||||
import org.luaj.vm2.ast.Str;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.data.redis.core.ZSetOperations;
|
||||
import rpc.protocols.CommonProto;
|
||||
import rpc.protocols.PlayerInfoProto;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
/**
|
||||
|
@ -370,18 +369,9 @@ public abstract class AbstractRank implements IRank {
|
|||
RedisUtil.getInstence().zsetRemoveOne(RedisKey.getKey(redisKey,rkey,false),value);
|
||||
}
|
||||
public void removeAllRank(String rkey){
|
||||
Map<Integer, SGuildCheckpointConfig> configMap = STableManager.getConfig(SGuildCheckpointConfig.class);
|
||||
if (configMap == null || configMap.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
// Set<String> dimKey = RedisUtil.getInstence().getDimKey(RedisKey.getKey(redisKey, rkey, false) + "*", 200);
|
||||
String[] dimKey = new String[configMap.size()];
|
||||
int index = 0;
|
||||
for (Integer integer : configMap.keySet()) {
|
||||
dimKey[index] = RedisKey.getKey(redisKey, rkey, false) + integer;
|
||||
}
|
||||
RedisUtil.getInstence().del(dimKey);
|
||||
Set<String> dimKey = RedisUtil.getInstence().getDimKey(RedisKey.getKey(redisKey, rkey, false) + "*", 200);
|
||||
dimKey.forEach(item->RedisUtil.getInstence().del(item));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
@ -644,6 +644,7 @@ public class BuyGoodsNewLogic {
|
|||
ArrayList<AbstractWelfareBag> welfareBags = new ArrayList<>(rechargeInfo.getPerpetualMap().values());
|
||||
welfareBags.addAll(rechargeInfo.getTimeLimitMap().values());
|
||||
welfareBags.addAll(rechargeInfo.getReceiveMap().values());
|
||||
welfareBags.addAll(rechargeInfo.getPushMap().values());
|
||||
for (AbstractWelfareBag bag : welfareBags) {
|
||||
if(bag.isOpen()){
|
||||
if (bag.getLimit() == 0 || bag.getLimit() > bag.getBuyTimes()){
|
||||
|
@ -652,15 +653,6 @@ public class BuyGoodsNewLogic {
|
|||
}
|
||||
}
|
||||
|
||||
for (AbstractWelfareBag bag : rechargeInfo.getPushMap().values()) {
|
||||
PushWelfareBag bag1 = (PushWelfareBag)bag;
|
||||
if(bag1.isOpen()){
|
||||
if (bag1.getLimit() == 0 || bag1.getLimit() > bag1.getBuyTimes()){
|
||||
list.add(bag1.getModId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 走表判断开启的礼包
|
||||
Map<Integer, SGlobalActivity> activityMap = SGlobalActivity.getsGlobalActivityMap();
|
||||
Map<Integer, ActivityMission> missionMap = user.getActivityManager().getActivityMissionMap();
|
||||
|
@ -880,15 +872,18 @@ public class BuyGoodsNewLogic {
|
|||
if(id >= 7300 && id <= 7304){
|
||||
return true;
|
||||
}
|
||||
return id >= 1100 && id <= 1104;
|
||||
if(id >= 1100 && id <= 1104){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static boolean createPushBag(int bagId, User user, int num){
|
||||
public static boolean createPushBag(int bagId,User user,int num){
|
||||
NewRechargeInfo info = user.getPlayerInfoManager().getNewRechargeInfo();
|
||||
int hasOpen = 0;
|
||||
if(info.getTempLimitMap().containsKey(bagId)){
|
||||
hasOpen = info.getTempLimitMap().get(bagId);
|
||||
if(hasOpen >= NewRechargeInfo.FIVESTARLIMIT){
|
||||
if(hasOpen >= info.FIVESTARLIMIT){
|
||||
return false;
|
||||
}else{
|
||||
info.getTempLimitMap().put(bagId,hasOpen+num);
|
||||
|
@ -898,14 +893,14 @@ public class BuyGoodsNewLogic {
|
|||
}
|
||||
if(isFiveStarBag(bagId) && info.getPushMap().get(bagId) != null){
|
||||
AbstractWelfareBag bag = info.getPushMap().get(bagId);
|
||||
bag.setLimit((bag.getLimit()+num)> NewRechargeInfo.FIVESTARLIMIT ? NewRechargeInfo.FIVESTARLIMIT :(bag.getLimit()+num));
|
||||
bag.setLimit((bag.getLimit()+num)>info.FIVESTARLIMIT?info.FIVESTARLIMIT:(bag.getLimit()+num));
|
||||
bag.setStartTime(System.currentTimeMillis());
|
||||
bag.setEndTime(bag.getStartTime() + getTime(bag) * TimeUtils.HOUR);
|
||||
}else{
|
||||
SRechargeCommodityNewConfig config = SRechargeCommodityNewConfig.getConfigById(bagId);
|
||||
AbstractWelfareBag bag = initUnitWF(user,config);
|
||||
if(num != 0 && num+hasOpen > NewRechargeInfo.FIVESTARLIMIT){
|
||||
bag.setLimit(NewRechargeInfo.FIVESTARLIMIT -hasOpen);
|
||||
if(num != 0 && num+hasOpen > info.FIVESTARLIMIT){
|
||||
bag.setLimit(info.FIVESTARLIMIT-hasOpen);
|
||||
}else{
|
||||
bag.setLimit(num);
|
||||
}
|
||||
|
|
|
@ -202,6 +202,7 @@ public class AbstractWelfareBag extends MongoBase{
|
|||
return config.getLimit();
|
||||
}
|
||||
|
||||
|
||||
public void setLimit(int limit) {
|
||||
this.limit = limit;
|
||||
updateString("limit",limit);
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.ljsd.jieling.logic.store.newRechargeInfo.bean;
|
||||
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.util.KeyGenUtils;
|
||||
import com.ljsd.jieling.util.UUIDEnum;
|
||||
import config.SRechargeCommodityNewConfig;
|
||||
import util.TimeUtils;
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ public class DataReportTask extends Thread {
|
|||
|
||||
public DataReportTask(){
|
||||
setName("DataReportTask");
|
||||
setPriority(2);//优先级设置低点
|
||||
}
|
||||
@Override
|
||||
public void run() {
|
||||
|
@ -16,15 +15,9 @@ public class DataReportTask extends Thread {
|
|||
// return;
|
||||
// }
|
||||
try {
|
||||
int i = 0;
|
||||
while(true){
|
||||
ReportUserEvent event = ReportUtil.queue.take();
|
||||
ReportUtil.doReport(event);
|
||||
i++;
|
||||
if (i >= 1000) {
|
||||
i = 0;
|
||||
Thread.sleep(100);
|
||||
}
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
|
|
|
@ -222,6 +222,7 @@ public class MinuteTask extends Thread {
|
|||
int hour = calendar.get(Calendar.HOUR_OF_DAY);
|
||||
int minute = calendar.get(Calendar.MINUTE);
|
||||
if(hour == 0 && minute ==0){
|
||||
|
||||
//保证每分钟线程
|
||||
try {
|
||||
GlobleSystemLogic.getInstence().calCulRank();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#server info
|
||||
server.id = 10161
|
||||
server.id = 10050
|
||||
server.openTime = 20190101000101
|
||||
server.num = 1
|
||||
server.debug = true
|
||||
|
@ -9,24 +9,24 @@ server.sendlog37 = true
|
|||
server.channel = test
|
||||
server.threads = 8
|
||||
# redis config
|
||||
# Redis数据库索引(默认为0)
|
||||
# Redis<EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĭ<EFBFBD><EFBFBD>Ϊ0<EFBFBD><EFBFBD>
|
||||
spring.redis.database=0
|
||||
#spring.redis.database=2
|
||||
# Redis服务器地址
|
||||
# Redis<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ
|
||||
spring.redis.host=60.1.1.21
|
||||
# Redis服务器连接端口
|
||||
# Redis<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӷ˿<EFBFBD>
|
||||
spring.redis.port=6379
|
||||
# Redis服务器连接密码(默认为空)
|
||||
# Redis<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루Ĭ<EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>
|
||||
spring.redis.password=
|
||||
# 连接池最大连接数(使用负值表示没有限制)
|
||||
# <EFBFBD><EFBFBD><EFBFBD>ӳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD>ø<EFBFBD>ֵ<EFBFBD><EFBFBD>ʾû<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>
|
||||
spring.redis.pool.max-active=8
|
||||
# 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
# <EFBFBD><EFBFBD><EFBFBD>ӳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȴ<EFBFBD>ʱ<EFBFBD>䣨ʹ<EFBFBD>ø<EFBFBD>ֵ<EFBFBD><EFBFBD>ʾû<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>
|
||||
spring.redis.pool.max-wait=-1
|
||||
# 连接池中的最大空闲连接
|
||||
# <EFBFBD><EFBFBD><EFBFBD>ӳ<EFBFBD><EFBFBD>е<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
spring.redis.pool.max-idle=8
|
||||
# 连接池中的最小空闲连接
|
||||
# <EFBFBD><EFBFBD><EFBFBD>ӳ<EFBFBD><EFBFBD>е<EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
spring.redis.pool.min-idle=0
|
||||
# 连接超时时间(毫秒)
|
||||
# <EFBFBD><EFBFBD><EFBFBD>ӳ<EFBFBD>ʱʱ<EFBFBD>䣨<EFBFBD><EFBFBD><EFBFBD>룩
|
||||
spring.redis.timeout=0
|
||||
|
||||
spring.redis.expireTime = -1
|
||||
|
@ -35,7 +35,7 @@ spring.redis.expireTime = -1
|
|||
#spring.data.mongodb.uri = mongodb://mongouser:ysj#2017#ljsd@111.231.54.96:27017/ysj_wx_1
|
||||
#spring.data.mongodb2.uri = mongodb://mongouser:ysj#2017#ljsd@111.231.54.96:27017/develop_ysj_wx_1
|
||||
#mongodb2 develop
|
||||
spring.data.mongodb.uri = mongodb://60.1.1.14:27017/jieling_10161
|
||||
spring.data.mongodb.uri = mongodb://60.1.1.14:27017/jieling_10050
|
||||
spring.data.mongodbcore.uri = mongodb://60.1.1.14:27017/jl_core
|
||||
#spring.data.mongodb.uri = mongodb://60.1.1.14:27017/jieling_10212
|
||||
mongodb.options.maxWaitTime = 120000
|
||||
|
@ -64,7 +64,7 @@ netty.allTimeout=35
|
|||
|
||||
|
||||
#core
|
||||
services.core.ip=60.1.1.163
|
||||
services.core.ip=60.1.1.50
|
||||
services.core.port=7900
|
||||
services.core.area=1000
|
||||
services.core.id=1
|
||||
|
|
|
@ -21,8 +21,16 @@ public class SArenaRobotConfig implements BaseConfig {
|
|||
|
||||
private int[] roleId;
|
||||
|
||||
private int[] roleId2;
|
||||
|
||||
private int[] roleId3;
|
||||
|
||||
private List<Integer> heroList;
|
||||
|
||||
private List<Integer> heroList2;
|
||||
|
||||
private List<Integer> heroList3;
|
||||
|
||||
private int roleLv;
|
||||
|
||||
private int[] differDemonsId;
|
||||
|
@ -33,6 +41,8 @@ public class SArenaRobotConfig implements BaseConfig {
|
|||
|
||||
private int totalForce;
|
||||
|
||||
private int yxldTotalForce;
|
||||
|
||||
private int breakId;
|
||||
|
||||
private int starBreakId;
|
||||
|
@ -41,10 +51,16 @@ public class SArenaRobotConfig implements BaseConfig {
|
|||
|
||||
private Map<Integer, CommonProto.Hero> heroMapList;
|
||||
|
||||
private Map<Integer, CommonProto.Hero> heroMapList2;
|
||||
private Map<Integer, CommonProto.Hero> heroMapList3;
|
||||
|
||||
private static Map<Integer, List<SArenaRobotConfig>> sArenaRobotConfigByPoolMap;
|
||||
|
||||
private static Map<Integer, SArenaRobotConfig> sArenaRobotConfigMap;
|
||||
|
||||
private int msScroe;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
|
@ -60,7 +76,21 @@ public class SArenaRobotConfig implements BaseConfig {
|
|||
for(int heroId : roleId){
|
||||
heroListTmp.add(heroId);
|
||||
}
|
||||
//玉虚论道第二个队伍
|
||||
int[] roleId2 = sArenaRobotConfig.getRoleId2();
|
||||
List<Integer> heroListTmp2 = new ArrayList<>(roleId.length);
|
||||
for(int heroId : roleId2){
|
||||
heroListTmp2.add(heroId);
|
||||
}
|
||||
//第三个队伍
|
||||
int[] roleId3 = sArenaRobotConfig.getRoleId2();
|
||||
List<Integer> heroListTmp3 = new ArrayList<>(roleId.length);
|
||||
for(int heroId : roleId3){
|
||||
heroListTmp3.add(heroId);
|
||||
}
|
||||
sArenaRobotConfig.setHeroList(heroListTmp);
|
||||
sArenaRobotConfig.setHeroList2(heroListTmp2);
|
||||
sArenaRobotConfig.setHeroList3(heroListTmp3);
|
||||
result.get(poolId).add(sArenaRobotConfig);
|
||||
}
|
||||
sArenaRobotConfigByPoolMap = result;
|
||||
|
@ -96,7 +126,15 @@ public class SArenaRobotConfig implements BaseConfig {
|
|||
return roleId;
|
||||
}
|
||||
|
||||
public int getRoleLv() {
|
||||
public int[] getRoleId2() {
|
||||
return roleId2;
|
||||
}
|
||||
|
||||
public int[] getRoleId3() {
|
||||
return roleId3;
|
||||
}
|
||||
|
||||
public int getRoleLv() {
|
||||
return roleLv;
|
||||
}
|
||||
|
||||
|
@ -139,4 +177,48 @@ public class SArenaRobotConfig implements BaseConfig {
|
|||
public void setHeroMapList(Map<Integer, CommonProto.Hero> heroMapList) {
|
||||
this.heroMapList = heroMapList;
|
||||
}
|
||||
|
||||
public Map<Integer, CommonProto.Hero> getHeroMapList2() {
|
||||
return heroMapList2;
|
||||
}
|
||||
|
||||
public void setHeroMapList2(Map<Integer, CommonProto.Hero> heroMapList2) {
|
||||
this.heroMapList2 = heroMapList2;
|
||||
}
|
||||
|
||||
public Map<Integer, CommonProto.Hero> getHeroMapList3() {
|
||||
return heroMapList3;
|
||||
}
|
||||
|
||||
public void setHeroMapList3(Map<Integer, CommonProto.Hero> heroMapList3) {
|
||||
this.heroMapList3 = heroMapList3;
|
||||
}
|
||||
|
||||
public List<Integer> getHeroList2() {
|
||||
return heroList2;
|
||||
}
|
||||
|
||||
public void setHeroList2(List<Integer> heroList2) {
|
||||
this.heroList2 = heroList2;
|
||||
}
|
||||
|
||||
public List<Integer> getHeroList3() {
|
||||
return heroList3;
|
||||
}
|
||||
|
||||
public void setHeroList3(List<Integer> heroList3) {
|
||||
this.heroList3 = heroList3;
|
||||
}
|
||||
|
||||
public int getMsScroe() {
|
||||
return msScroe;
|
||||
}
|
||||
|
||||
public int getYxldTotalForce() {
|
||||
return yxldTotalForce;
|
||||
}
|
||||
|
||||
public void setYxldTotalForce(int yxldTotalForce) {
|
||||
this.yxldTotalForce = yxldTotalForce;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
package config;
|
||||
|
||||
import manager.STableManager;
|
||||
import manager.Table;
|
||||
import rpc.protocols.CommonProto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Table(name ="FourQuadrantConfig")
|
||||
public class SFourQuadrantConfig implements BaseConfig {
|
||||
|
||||
private int id;
|
||||
|
||||
private int star;
|
||||
|
||||
private int[][] propLimit;
|
||||
private int[][] propLvup;
|
||||
|
||||
private int[][] lvupCost;
|
||||
|
||||
private int[][] rankupCost;
|
||||
|
||||
private int[][] propStar;
|
||||
|
||||
private int[][] propResonance;
|
||||
|
||||
private int[][] skill;
|
||||
|
||||
private int randomTimes;
|
||||
|
||||
private int rankupPercent;
|
||||
|
||||
private int xiuxianLimit;
|
||||
|
||||
public static Map<Integer, SFourQuadrantConfig> sFourQuadrantConfigMap;
|
||||
|
||||
public static Map<Integer, SFourQuadrantConfig> configByStrtMap;
|
||||
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
configByStrtMap=new HashMap<>();
|
||||
sFourQuadrantConfigMap = STableManager.getConfig(SFourQuadrantConfig.class);
|
||||
for (SFourQuadrantConfig value : sFourQuadrantConfigMap.values()) {
|
||||
configByStrtMap.put(value.star,value);
|
||||
}
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public int getStar() {
|
||||
return star;
|
||||
}
|
||||
|
||||
public int[][] getPropLimit() {
|
||||
return propLimit;
|
||||
}
|
||||
|
||||
public int[][] getPropLvup() {
|
||||
return propLvup;
|
||||
}
|
||||
|
||||
public int[][] getLvupCost() {
|
||||
return lvupCost;
|
||||
}
|
||||
|
||||
public int[][] getRankupCost() {
|
||||
return rankupCost;
|
||||
}
|
||||
|
||||
public int[][] getPropStar() {
|
||||
return propStar;
|
||||
}
|
||||
|
||||
public int[][] getPropResonance() {
|
||||
return propResonance;
|
||||
}
|
||||
|
||||
public int[][] getSkill() {
|
||||
return skill;
|
||||
}
|
||||
|
||||
public int getRandomTimes() {
|
||||
return randomTimes;
|
||||
}
|
||||
|
||||
public int getRankupPercent() {
|
||||
return rankupPercent;
|
||||
}
|
||||
|
||||
public int getXiuxianLimit() {
|
||||
return xiuxianLimit;
|
||||
}
|
||||
}
|
||||
|
|
@ -44,6 +44,8 @@ public class SMServerArenaSetting implements BaseConfig {
|
|||
|
||||
private int worldLevLimit;
|
||||
|
||||
private int[] privId;
|
||||
private int treasureOpen;
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
|
@ -122,4 +124,12 @@ public class SMServerArenaSetting implements BaseConfig {
|
|||
public int getWorldLevLimit() {
|
||||
return worldLevLimit;
|
||||
}
|
||||
|
||||
public int[] getPrivId() {
|
||||
return privId;
|
||||
}
|
||||
|
||||
public int getTreasureOpen() {
|
||||
return treasureOpen;
|
||||
}
|
||||
}
|
|
@ -8,7 +8,7 @@ import java.util.*;
|
|||
|
||||
public class ExcelUtils {
|
||||
private static boolean isWrite = true;
|
||||
private static String excelPath ="E:\\work\\data_execl\\master_en\\base_data\\"; //excel 文件
|
||||
private static String excelPath ="D:\\jieling_data\\master_zh_c\\base_data\\"; //excel 文件
|
||||
// private static String excelPath ="D:/excel/0.94/data_execl/Map_data/"; //excel 文件
|
||||
private static String path = "conf/server/";
|
||||
private static Set<String> oldFileNames = new HashSet<>();
|
||||
|
|
Loading…
Reference in New Issue