Merge branch 'master_test_gn_godsoul' into master_test_gn
# Conflicts: # serverlogic/src/main/java/com/ljsd/jieling/exception/ErrorCode.java # serverlogic/src/main/java/com/ljsd/jieling/logic/activity/crossService/CrossServiceLogic.java # serverlogic/src/main/java/com/ljsd/jieling/logic/player/PlayerLogic.javaback_recharge
commit
9e22fed4ad
|
|
@ -9,6 +9,7 @@ public class FamilyHeroInfo {
|
|||
private int star;
|
||||
private Map<Integer,Long> attribute;
|
||||
private int position;
|
||||
private int godSoulLv;
|
||||
|
||||
public int getTempleteId() {
|
||||
return templeteId;
|
||||
|
|
@ -22,6 +23,10 @@ public class FamilyHeroInfo {
|
|||
return star;
|
||||
}
|
||||
|
||||
public int getGodSoulLv() {
|
||||
return godSoulLv;
|
||||
}
|
||||
|
||||
public Map<Integer, Long> getAttribute() {
|
||||
return attribute;
|
||||
}
|
||||
|
|
@ -47,12 +52,13 @@ public class FamilyHeroInfo {
|
|||
}
|
||||
|
||||
|
||||
public FamilyHeroInfo(int templeteId, int level, int star, Map<Integer, Long> attribute, int position) {
|
||||
public FamilyHeroInfo(int templeteId, int level, int star, Map<Integer, Long> attribute, int position,int godSoulLv) {
|
||||
this.templeteId = templeteId;
|
||||
this.level = level;
|
||||
this.star = star;
|
||||
this.attribute = attribute;
|
||||
this.position = position;
|
||||
this.godSoulLv=godSoulLv;
|
||||
}
|
||||
|
||||
public FamilyHeroInfo(int templeteId, int level, int star, Map<Integer, Long> attribute) {
|
||||
|
|
|
|||
|
|
@ -237,6 +237,7 @@ public class CoreService implements RPCRequestIFace.Iface {
|
|||
arenaOfHero.setCreateTime(hero.getCreateType());
|
||||
arenaOfHero.setChangeId(hero.getChangeId());
|
||||
arenaOfHero.setSkin(hero.getSkin());
|
||||
arenaOfHero.setGodSoulLv(hero.getGodSoulLv());
|
||||
for (Map.Entry<Integer, List<TeamPosHeroInfo>> entry : teamMap.entrySet()) {
|
||||
Integer teamId = entry.getKey();
|
||||
List<TeamPosHeroInfo> teamList = entry.getValue();
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ public enum FunctionIdEnum {
|
|||
CrossSevenWorld(112,new SevenWorldFunction()),//七界试炼
|
||||
FourQua(113,null),//四象心法
|
||||
Likable(114,null),//好感度
|
||||
GodSoul(116,null),//神魂
|
||||
WeekGood(9091,null),
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -176,11 +176,14 @@ public enum ErrorCode implements IErrorCode {
|
|||
CROSS_YXLD_OVER(145,"赛季结算中"),
|
||||
RIDING_SWARD_BET_TWO(146,"一轮比赛最多押注两次!"),
|
||||
PRACTICE_LEVE_DOWN(147,"修行等级不足"),
|
||||
GOD_SOUL_BIND(148,"选中英雄已被当前神魂绑定,操作失败"),
|
||||
HANDLE_FAILED(149,"操作失败"),
|
||||
SHOP_XIA_JIA(150,"商品已下架"),
|
||||
SHOP_COLSE(151,"商店已关闭"),
|
||||
SHOP_NO_ITEM(152,"商品不存在"),
|
||||
|
||||
GUILD_NOT_AUTHORITY(300,"账号因错误发言导致相关功能封禁中,操作失败"),
|
||||
|
||||
;
|
||||
private static final Set<Integer> CodeSet = new HashSet<>();
|
||||
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ public class TasuilingxiaoHandler extends BaseHandler<ActivityProto.Tasuilingxia
|
|||
Map<Integer, TaSuiHero> heroMap = new HashMap<>();
|
||||
for(TeamPosHeroInfo hero:teamPosForHero){
|
||||
Hero myHero = user.getHeroManager().getHero(hero.getHeroId());
|
||||
TaSuiHero taSuiHero = new TaSuiHero(myHero.getTemplateId(),myHero.getOriginalLevel(),myHero.getStar());
|
||||
TaSuiHero taSuiHero = new TaSuiHero(myHero.getTemplateId(),myHero.getOriginalLevel(),myHero.getStar(),myHero.getGodSoulLv());
|
||||
heroMap.put(hero.getPosition(),taSuiHero);
|
||||
}
|
||||
user.getHeroManager().setTaSuiHeroMap(heroMap);
|
||||
|
|
|
|||
|
|
@ -165,6 +165,7 @@ public class ChampinGetHandler extends BaseHandler {
|
|||
.setStar(familyHeroInfo.getStar())
|
||||
.setLevel(familyHeroInfo.getLevel())
|
||||
.setPosition(familyHeroInfo.getPosition())
|
||||
.setGodSoulLv(familyHeroInfo.getGodSoulLv())
|
||||
.build()
|
||||
);
|
||||
}
|
||||
|
|
@ -201,6 +202,7 @@ public class ChampinGetHandler extends BaseHandler {
|
|||
.setStar(familyHeroInfo.getStar())
|
||||
.setLevel(familyHeroInfo.getLevel())
|
||||
.setPosition(familyHeroInfo.getPosition())
|
||||
.setGodSoulLv(familyHeroInfo.getGodSoulLv())
|
||||
.build()
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -197,6 +197,7 @@ public class ChampionBetInfoHandler extends BaseHandler<ArenaInfoProto.ChampionG
|
|||
.setStar(familyHeroInfo.getStar())
|
||||
.setLevel(familyHeroInfo.getLevel())
|
||||
.setPosition(familyHeroInfo.getPosition())
|
||||
.setGodSoulLv(familyHeroInfo.getGodSoulLv())
|
||||
.build()
|
||||
);
|
||||
}
|
||||
|
|
@ -234,6 +235,7 @@ public class ChampionBetInfoHandler extends BaseHandler<ArenaInfoProto.ChampionG
|
|||
.setStar(familyHeroInfo.getStar())
|
||||
.setLevel(familyHeroInfo.getLevel())
|
||||
.setPosition(familyHeroInfo.getPosition())
|
||||
.setGodSoulLv(familyHeroInfo.getGodSoulLv())
|
||||
.build()
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,65 @@
|
|||
package com.ljsd.jieling.handler.hero;
|
||||
import com.ljsd.jieling.exception.ErrorCode;
|
||||
import com.ljsd.jieling.exception.ErrorCodeException;
|
||||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
import com.ljsd.jieling.logic.dao.Hero;
|
||||
import com.ljsd.jieling.logic.dao.HeroManager;
|
||||
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.MessageUtil;
|
||||
import config.SCHero;
|
||||
import org.springframework.stereotype.Component;
|
||||
import rpc.protocols.HeroInfoProto;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@Component
|
||||
public class HeroGodSoulBindRequestHandler extends BaseHandler<HeroInfoProto.HeroGodSoulBindRequest> {
|
||||
@Override
|
||||
public MessageTypeProto.MessageType getMessageCode() {
|
||||
return MessageTypeProto.MessageType.HERO_GOD_SOUL_BIND_REQUEST;
|
||||
}
|
||||
|
||||
//神魂进阶绑定协议
|
||||
@Override
|
||||
public void processWithProto(ISession session, HeroInfoProto.HeroGodSoulBindRequest proto) throws Exception {
|
||||
String heroId=proto.getHeroId();
|
||||
int godSoulLv=proto.getGodSoulLv();
|
||||
List<String>bindHeroList= proto.getBindHerosList();
|
||||
int uid = session.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
HeroManager heroManager= user.getHeroManager();
|
||||
Hero upHero=heroManager.getHero(heroId);
|
||||
SCHero heroConfig=SCHero.getsCHero().get(upHero.getTemplateId());
|
||||
if (heroConfig.getIsSoulOpen()==0||upHero.getStar()<=10){
|
||||
LOGGER.error("当前神将神魂不能被激活");
|
||||
throw new ErrorCodeException(ErrorCode.HANDLE_FAILED);
|
||||
}
|
||||
int index=0;
|
||||
for (int[] ints : heroConfig.getSoul()) {
|
||||
if (ints[0]==godSoulLv){
|
||||
boolean isCheckCondition=HeroLogic.getInstance().CheckHeroBindCondition(user,heroId,bindHeroList,ints[2],ints[3],index);
|
||||
if (!isCheckCondition){
|
||||
LOGGER.error("选中的英雄不满足激活神魂条件");
|
||||
throw new ErrorCodeException(ErrorCode.HANDLE_FAILED);
|
||||
}
|
||||
index+=ints[3];
|
||||
}
|
||||
}
|
||||
for (String _heroId : bindHeroList) {
|
||||
if (upHero.CheckGodSoulIsBind(godSoulLv,_heroId)) {
|
||||
LOGGER.error("选中的英雄已经被当前升级神魂英雄绑定");
|
||||
throw new ErrorCodeException(ErrorCode.GOD_SOUL_BIND);
|
||||
}
|
||||
}
|
||||
upHero.setGodSoulBindMap(1,godSoulLv,bindHeroList);
|
||||
for (String _bindHeroId : bindHeroList) {
|
||||
Hero bindHero=heroManager.getHero(_bindHeroId);
|
||||
bindHero.setGodSoulBeBindMap(1,heroId,godSoulLv);
|
||||
}
|
||||
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.HERO_GOD_SOUL_BIND_RESPONSE_VALUE, null,true);
|
||||
}
|
||||
}
|
||||
|
|
@ -269,6 +269,7 @@ public class BehaviorUtil {
|
|||
.setPosition(teamPosHeroInfo.getPosition())
|
||||
.setStar(hero.getStar())
|
||||
.setSkinId(hero.getSkin())
|
||||
.setGodSoulLv(hero.getGodSoulLv())
|
||||
.build();
|
||||
heroFightInfos.add(heroFightInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ public class Cmd_role_gm extends GmRoleAbstract {
|
|||
int differDemonsLv = sArenaRobotConfig.getDifferDemonsLv();
|
||||
int robotLevel = sArenaRobotConfig.getRoleLv();
|
||||
Map<Integer, Long> robotHeroAttribute = HeroLogic.getInstance().calRobotHeroAttribute(scHero, robotLevel, 0, differDemonsId, differDemonsLv, false);
|
||||
heroAllAttribute.put(heroTid.toString(), new FamilyHeroInfo(heroTid, robotLevel, heroStar, robotHeroAttribute,inner++));
|
||||
heroAllAttribute.put(heroTid.toString(), new FamilyHeroInfo(heroTid, robotLevel, heroStar, robotHeroAttribute,inner++,0));
|
||||
// String property = HeroLogic.getInstance().getRobotHeroProperty(sArenaRobotConfig,scHero,propertySb,robotHeroAttribute).toString();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,11 +62,11 @@ public class CrossServiceLogic {
|
|||
try {
|
||||
MongoTemplate core = MongoUtil.getCoreMongoTemplate();
|
||||
List<CServerInfo> cServerInfos = core.findAll(CServerInfo.class);
|
||||
Map<Integer,CServerInfo> serverInfoMap = new HashMap<>(cServerInfos.size());
|
||||
cServerInfos.forEach(n->serverInfoMap.put(n.getServerId(),n));
|
||||
Map<Integer, CServerInfo> serverInfoMap = new HashMap<>(cServerInfos.size());
|
||||
cServerInfos.forEach(n -> serverInfoMap.put(n.getServerId(), n));
|
||||
cServerInfoMap = serverInfoMap;
|
||||
} catch (UnknownHostException e) {
|
||||
LOGGER.error("=========跨服服务器列表获取失败=======:{}",e.getMessage());
|
||||
LOGGER.error("=========跨服服务器列表获取失败=======:{}", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ public class BloodLogic {
|
|||
}
|
||||
}
|
||||
int position = heroInfo.getPosition();
|
||||
heroAllAttribute.put(heroInfo.getHeroId(), new FamilyHeroInfo(hero.getTemplateId(), hero.getLevel(user.getHeroManager()),hero.getStar(), heroAttributeMap,position));
|
||||
heroAllAttribute.put(heroInfo.getHeroId(), new FamilyHeroInfo(hero.getTemplateId(), hero.getLevel(user.getHeroManager()),hero.getStar(), heroAttributeMap,position,hero.getGodSoulLv()));
|
||||
}
|
||||
return heroAllAttribute;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,6 +55,14 @@ public class Hero extends MongoBase implements Comparable<Hero>,Cloneable {
|
|||
|
||||
private int skin;
|
||||
|
||||
///神魂绑定英雄 神魂等级:<hero动态id>
|
||||
private Map<Integer,List<String>>godSoulBindMap=new HashMap<>();
|
||||
|
||||
private int godSoulLv;
|
||||
|
||||
//被神魂绑定英雄 英雄动态id:英雄神魂等级(反绑)
|
||||
private Map<String,Integer>godSoulBeBindMap=new HashMap<>();
|
||||
|
||||
public Hero() {
|
||||
//绑定关系
|
||||
this.setRootCollection(User._COLLECTION_NAME);
|
||||
|
|
@ -463,6 +471,57 @@ public class Hero extends MongoBase implements Comparable<Hero>,Cloneable {
|
|||
updateString("skin", skin);
|
||||
}
|
||||
|
||||
public Map<Integer,List<String>> getGodSoulBindMap() {
|
||||
return godSoulBindMap;
|
||||
}
|
||||
|
||||
///神魂绑定 changeType 1:增加或者修改 2:移除
|
||||
public void setGodSoulBindMap(int changeType,int lv,List<String>heroIds) {
|
||||
if (changeType==1){
|
||||
godSoulBindMap.put(lv,heroIds);
|
||||
}else {
|
||||
int curLv= godSoulBindMap.size();
|
||||
for (int i = 1; i < curLv+1; i++) {
|
||||
if (i>=lv){
|
||||
godSoulBindMap.remove(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.godSoulLv=godSoulBindMap.size();
|
||||
updateString("godSoulLv", godSoulLv);
|
||||
updateString("godSoulBindMap", godSoulBindMap);
|
||||
}
|
||||
|
||||
public Map<String,Integer> getGodSoulBeBindMap() {
|
||||
return godSoulBeBindMap;
|
||||
}
|
||||
|
||||
public int getGodSoulLv() {
|
||||
return godSoulLv;
|
||||
}
|
||||
|
||||
///设置被神魂绑定关系 changeType 1:增加 2:移除
|
||||
public void setGodSoulBeBindMap(int changeType,String heroId,int godSoulLv) {
|
||||
if (changeType==1){
|
||||
godSoulBeBindMap.put(heroId,godSoulLv);
|
||||
}else{
|
||||
godSoulBeBindMap.remove(heroId);
|
||||
}
|
||||
updateString("godSoulBeBindMap", godSoulBeBindMap);
|
||||
}
|
||||
|
||||
///检测该英雄是否已经被当前英雄绑定
|
||||
public boolean CheckGodSoulIsBind(int level,String _heroId){
|
||||
for (Map.Entry<Integer, List<String>> listEntry : godSoulBindMap.entrySet()) {
|
||||
if (listEntry.getKey()==level)continue;
|
||||
if (listEntry.getValue().contains(_heroId)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int compareTo(Hero o) {
|
||||
int compareValue = o.getOriginalLevel() - this.getOriginalLevel();
|
||||
|
|
|
|||
|
|
@ -7,12 +7,14 @@ import com.ljsd.jieling.logic.dao.root.User;
|
|||
import com.ljsd.jieling.logic.hero.HongMengAttributeEnum;
|
||||
import config.SLikeAbilityConfig;
|
||||
import config.SSpecialConfig;
|
||||
import org.omg.CORBA.PUBLIC_MEMBER;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class HeroManager extends MongoBase {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(HeroManager.class);
|
||||
/**
|
||||
* 玩家英雄列表
|
||||
*/
|
||||
|
|
@ -252,13 +254,33 @@ public class HeroManager extends MongoBase {
|
|||
if (heroMap.containsKey(heroId)){
|
||||
removeString(getMongoKey()+".heroMap." + heroId);
|
||||
Poster.getPoster().dispatchEvent(new RemoveHeroEvent(uid,heroId));
|
||||
removeHeroGodSoul(heroId);
|
||||
heroMap.remove(heroId);
|
||||
try {
|
||||
if(UserManager.getUser(uid).getPlayerInfoManager().getMaxforceHero().equals(heroId)){
|
||||
UserManager.getUser(uid).getPlayerInfoManager().setMaxforceHero("");
|
||||
}
|
||||
}catch (Exception e){}
|
||||
}catch (Exception e){
|
||||
LOGGER.info("removeHero uid={},heroId={},Exception={}",uid,heroId,e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///移除英雄设置神魂绑定相关信息
|
||||
public void removeHeroGodSoul(String heroId){
|
||||
Hero hero= heroMap.get(heroId);
|
||||
Map<Integer, List<String>>godSoulBindMap=hero.getGodSoulBindMap();
|
||||
for (Map.Entry<Integer, List<String>> integerListEntry : godSoulBindMap.entrySet()) {
|
||||
List<String>heroList=integerListEntry.getValue();
|
||||
for (String bindId : heroList) {
|
||||
Hero bingHero= heroMap.get(bindId);
|
||||
bingHero.setGodSoulBeBindMap(2,heroId,0);
|
||||
}
|
||||
}
|
||||
Map<String,Integer>godSoulBeBindMap=hero.getGodSoulBeBindMap();
|
||||
for (Map.Entry<String, Integer> stringIntegerEntry : godSoulBeBindMap.entrySet()) {
|
||||
Hero bingHero= heroMap.get(stringIntegerEntry.getKey());
|
||||
bingHero.setGodSoulBindMap(2,stringIntegerEntry.getValue(),null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ public class TaSuiHero {
|
|||
|
||||
private int star;
|
||||
|
||||
private int godSoulLv;
|
||||
|
||||
public int getTempId() {
|
||||
return tempId;
|
||||
}
|
||||
|
|
@ -25,9 +27,14 @@ public class TaSuiHero {
|
|||
return star;
|
||||
}
|
||||
|
||||
public TaSuiHero(int tempId, int leve, int star) {
|
||||
public int getGodSoulLv() {
|
||||
return godSoulLv;
|
||||
}
|
||||
|
||||
public TaSuiHero(int tempId, int leve, int star,int godSoulLv) {
|
||||
this.tempId = tempId;
|
||||
this.leve = leve;
|
||||
this.star = star;
|
||||
this.godSoulLv=godSoulLv;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ public class ArenaOfHero {
|
|||
private int createType;
|
||||
private int changeId;
|
||||
private int skin;
|
||||
private int godSoulLv;//神魂等级
|
||||
private Set<String> jewelInfo = new HashSet<>();
|
||||
private Map<Integer,Long> attributeMap = new HashMap<>();
|
||||
private Map<Integer,Map<Integer,Long>> attributeMapByTeam = new HashMap<>();
|
||||
|
|
@ -167,4 +168,12 @@ public class ArenaOfHero {
|
|||
public void setSkin(int skin) {
|
||||
this.skin = skin;
|
||||
}
|
||||
|
||||
public int getGodSoulLv() {
|
||||
return godSoulLv;
|
||||
}
|
||||
|
||||
public void setGodSoulLv(int godSoulLv) {
|
||||
this.godSoulLv = godSoulLv;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ public class BattleNode extends AbstractExpedition {
|
|||
Map<Integer,Long> longAttribute = new HashMap<>();
|
||||
robotHeroAttribute.forEach((k,v)->longAttribute.put(k,(long)v));
|
||||
force+=HeroLogic.getInstance().calForce(longAttribute);
|
||||
heroAllAttribute.put(id.toString(), new FamilyHeroInfo(id, property.getId(), property.getStar(), longAttribute,innerPosition++));
|
||||
heroAllAttribute.put(id.toString(), new FamilyHeroInfo(id, property.getId(), property.getStar(), longAttribute,innerPosition++,0));
|
||||
}
|
||||
|
||||
fightInfo.setForce(force);
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public class SpecialNode extends AbstractExpedition {
|
|||
int force = HeroLogic.getInstance().calForce(longAttribute);
|
||||
fightInfo.setForce(force);
|
||||
//试炼节点 放到第二个位置上
|
||||
heroAllAttribute.put(Integer.toString(heroId), new FamilyHeroInfo(heroId,level,robot.getStar(),longAttribute,2));
|
||||
heroAllAttribute.put(Integer.toString(heroId), new FamilyHeroInfo(heroId,level,robot.getStar(),longAttribute,2,0));
|
||||
fightInfo.updateHeroSkill(String.valueOf(heroId),skills.substring(0,skills.length()-1));
|
||||
// 获取灵兽信息
|
||||
SRobotProperty property = STableManager.getConfig(SRobotProperty.class).get(level);
|
||||
|
|
|
|||
|
|
@ -131,6 +131,7 @@ public class GuildFightLogic {
|
|||
.setHeroTid(familyHeroInfo.getTempleteId())
|
||||
.setStar(familyHeroInfo.getStar())
|
||||
.setLevel(familyHeroInfo.getLevel())
|
||||
.setGodSoulLv(familyHeroInfo.getGodSoulLv())
|
||||
.build()
|
||||
);
|
||||
Map<Integer, Long> attribute = entry.getValue().getAttribute();
|
||||
|
|
|
|||
|
|
@ -331,6 +331,7 @@ public class FightUtil {
|
|||
.setStar(hero.getStar())
|
||||
.setPosition(teamPosHeroInfo.getPosition())
|
||||
.setSkinId(hero.getSkin())
|
||||
.setGodSoulLv(hero.getGodSoulLv())
|
||||
.build();
|
||||
heroFightInfos.add(heroFightInfo);
|
||||
}
|
||||
|
|
@ -398,6 +399,7 @@ public class FightUtil {
|
|||
.setStar(hero.getStar())
|
||||
.setPosition(teamPosHeroInfo.getPosition())
|
||||
.setSkinId(hero.getSkin())
|
||||
.setGodSoulLv(hero.getGodSoulLv())
|
||||
.build();
|
||||
heroFightInfos.add(heroFightInfo);
|
||||
}
|
||||
|
|
@ -438,6 +440,7 @@ public class FightUtil {
|
|||
.setPosition(teamPosHeroInfo.getPosition())
|
||||
.setSkinId(hero.getSkin())
|
||||
.setStar(hero.getStar())
|
||||
.setGodSoulLv(hero.getGodSoulLv())
|
||||
.build();
|
||||
heroFightInfos.add(heroFightInfo);
|
||||
}
|
||||
|
|
@ -661,6 +664,7 @@ public class FightUtil {
|
|||
.setPosition(teamPosHeroInfo.getPosition())
|
||||
.setStar(hero.getStar())
|
||||
.setSkinId(hero.getSkin())
|
||||
.setGodSoulLv(hero.getGodSoulLv())
|
||||
.build();
|
||||
heroFightInfos.add(heroFightInfo);
|
||||
}
|
||||
|
|
@ -707,6 +711,7 @@ public class FightUtil {
|
|||
.setPosition(teamPosHeroInfo.getPosition())
|
||||
.setStar(hero.getStar())
|
||||
.setSkinId(hero.getSkin())
|
||||
.setGodSoulLv((hero.getGodSoulLv()))
|
||||
.build();
|
||||
heroFightInfos.add(heroFightInfo);
|
||||
}
|
||||
|
|
@ -747,6 +752,7 @@ public class FightUtil {
|
|||
.setPosition(teamPosHeroInfo.getPosition())
|
||||
.setStar(hero.getStar())
|
||||
.setSkinId(hero.getSkin())
|
||||
.setGodSoulLv(hero.getGodSoulLv())
|
||||
.build();
|
||||
heroFightInfos.add(heroFightInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ public class SevenWorldFightHandler implements IFightEventProcesor {
|
|||
.setStar(hero.getStar())
|
||||
.setSkinId(hero.getSkin())
|
||||
.setForceScore(HeroLogic.getInstance().calTeamForce(user,teamId))
|
||||
.setGodSoulLv(hero.getGodSoulLv())
|
||||
.build();
|
||||
heroFightInfos.add(heroFightInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ import java.math.BigDecimal;
|
|||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.function.IntToDoubleFunction;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class HeroLogic {
|
||||
|
|
@ -1927,6 +1928,9 @@ public class HeroLogic {
|
|||
}
|
||||
}
|
||||
});
|
||||
if (hero.getGodSoulLv()>0){
|
||||
skillList.addAll(GetGodSoulSkill(hero.getTemplateId(),hero.getGodSoulLv()));
|
||||
}
|
||||
|
||||
return skillList;
|
||||
}
|
||||
|
|
@ -2297,6 +2301,14 @@ public class HeroLogic {
|
|||
}
|
||||
sb.append(sPlayerHeadIcon.getSkill()[0][0]).append(DIVISION);
|
||||
}
|
||||
|
||||
//神魂技能
|
||||
if (hero.getGodSoulLv()>0) {
|
||||
List<Integer>godSoulSkills= HeroLogic.getInstance().GetGodSoulSkill(hero.getTemplateId(),hero.getGodSoulLv());
|
||||
for (Integer godSoulSkill : godSoulSkills) {
|
||||
sb.append(godSoulSkill).append(DIVISION);
|
||||
}
|
||||
}
|
||||
return sb;
|
||||
}
|
||||
|
||||
|
|
@ -5758,4 +5770,64 @@ public class HeroLogic {
|
|||
fBuilder.setLikableRemainTime(remainTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* 检测神魂绑定方法
|
||||
* @param user
|
||||
* @param heroId 当前神将
|
||||
* @param bindHeroList 绑定的神将列表
|
||||
* @param heroRankupId 神将绑定条件id
|
||||
* @param needNum 需要神将数量
|
||||
* @param index 检测开始索引
|
||||
* @return
|
||||
*/
|
||||
public boolean CheckHeroBindCondition(User user,String heroId,List<String>bindHeroList,int heroRankupId,int needNum,int index){
|
||||
if (needNum+index>bindHeroList.size())//首先判断数量是否满足条件
|
||||
{
|
||||
return false;
|
||||
}
|
||||
SHeroRankupGroup heroRankupGroup=STableManager.getConfig(SHeroRankupGroup.class).get(heroRankupId);
|
||||
for (int i = index; i < needNum+index; i++) {
|
||||
Hero bindHero= user.getHeroManager().getHero(bindHeroList.get(i));
|
||||
Hero hero= user.getHeroManager().getHero(heroId);
|
||||
if (bindHero.getStar()<heroRankupGroup.getStarLimit()){//星级要求
|
||||
return false;
|
||||
}
|
||||
if (heroRankupGroup.getIsId()>0){//需要指定神将
|
||||
if (bindHero.getTemplateId()!=heroRankupGroup.getIsId()) {
|
||||
return false;
|
||||
}
|
||||
}else if(heroRankupGroup.getIssame()>0) {//需要相同神将
|
||||
if (bindHero.getTemplateId()!=hero.getTemplateId()) {
|
||||
return false;
|
||||
}
|
||||
}else {
|
||||
SCHero heroConfig=SCHero.getsCHero().get(hero.getTemplateId());
|
||||
SCHero bindHeroConfig=SCHero.getsCHero().get(bindHero.getTemplateId());
|
||||
if (heroRankupGroup.getIsSameClan()>0){//需要同系神将
|
||||
if (heroConfig.getPropertyName()!=bindHeroConfig.getPropertyName()){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (heroRankupGroup.getIsSameJob()>0) {//需要同职业
|
||||
if (heroConfig.getProfession()!=bindHeroConfig.getProfession()){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
///获取英雄神魂技能
|
||||
public List<Integer> GetGodSoulSkill(int heroTId,int godSoulLv){
|
||||
List<Integer>skillList=new ArrayList<>();
|
||||
SCHero tempHero = SCHero.getsCHero().get(heroTId);
|
||||
for (int[] ints : tempHero.getSoulSkill()) {
|
||||
if (ints[0]<=godSoulLv){
|
||||
skillList.add(ints[1]);
|
||||
}
|
||||
}
|
||||
return skillList;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -570,7 +570,13 @@ public class PlayerLogic {
|
|||
Map<Integer, TaSuiHero> taSuiHeroMap = user.getHeroManager().getTaSuiHeroMap();
|
||||
for(Map.Entry<Integer,TaSuiHero> entry:taSuiHeroMap.entrySet()){
|
||||
TaSuiHero hero = entry.getValue();
|
||||
CommonProto.TeamSimpleInfo info = CommonProto.TeamSimpleInfo.newBuilder().setHeroTid(hero.getTempId()).setLevel(hero.getLeve()).setStar(hero.getStar()).setPosition(entry.getKey()).build();
|
||||
CommonProto.TeamSimpleInfo info = CommonProto.TeamSimpleInfo.newBuilder()
|
||||
.setHeroTid(hero.getTempId())
|
||||
.setLevel(hero.getLeve())
|
||||
.setStar(hero.getStar())
|
||||
.setPosition(entry.getKey())
|
||||
.setGodSoulLv(hero.getGodSoulLv())
|
||||
.build();
|
||||
teamInfo.addTeam(info);
|
||||
}
|
||||
teamInfo.setTotalForce(user.getHeroManager().getTaSuiLingXiaoRankForce());
|
||||
|
|
@ -632,7 +638,7 @@ public class PlayerLogic {
|
|||
for(Map.Entry<Integer,CommonProto.Hero> item : sArenaRobotConfig.getHeroMapList().entrySet()){
|
||||
Integer heroTid = item.getKey();
|
||||
Integer heroStar = item.getValue().getStar();
|
||||
teamInfo.addTeam(CommonProto.TeamSimpleInfo.newBuilder().setHeroid(String.valueOf(heroTid)).setHeroTid(heroTid).setLevel(sArenaRobotConfig.getRoleLv()).setStar(heroStar).setPosition(position++).build());
|
||||
teamInfo.addTeam(CommonProto.TeamSimpleInfo.newBuilder().setHeroid(String.valueOf(heroTid)).setHeroTid(heroTid).setLevel(sArenaRobotConfig.getRoleLv()).setStar(heroStar).setPosition(position++).setGodSoulLv( item.getValue().getGodSoulLv()).build());
|
||||
}
|
||||
oneInfo.setTeam(teamInfo);
|
||||
//TODO 玉虚论道三队伍
|
||||
|
|
@ -730,7 +736,7 @@ public class PlayerLogic {
|
|||
for(Map.Entry<Integer,CommonProto.Hero> item : sArenaRobotConfig.getHeroMapList().entrySet()){
|
||||
Integer heroTid = item.getKey();
|
||||
Integer heroStar = item.getValue().getStar();
|
||||
teamInfo.addTeam(CommonProto.TeamSimpleInfo.newBuilder().setHeroid(String.valueOf(heroTid)).setHeroTid(heroTid).setLevel(sArenaRobotConfig.getRoleLv()).setStar(heroStar).setPosition(position++).build());
|
||||
teamInfo.addTeam(CommonProto.TeamSimpleInfo.newBuilder().setHeroid(String.valueOf(heroTid)).setHeroTid(heroTid).setLevel(sArenaRobotConfig.getRoleLv()).setStar(heroStar).setPosition(position++).setGodSoulLv(item.getValue().getGodSoulLv()).build());
|
||||
}
|
||||
teamInfo.setTotalForce(sArenaRobotConfig.getYxldTotalForce1());
|
||||
|
||||
|
|
@ -738,7 +744,7 @@ public class PlayerLogic {
|
|||
for(Map.Entry<Integer,CommonProto.Hero> item : sArenaRobotConfig.getHeroMapList2().entrySet()){
|
||||
Integer heroTid = item.getKey();
|
||||
Integer heroStar = item.getValue().getStar();
|
||||
teamInfo.addTeam(CommonProto.TeamSimpleInfo.newBuilder().setHeroid(String.valueOf(heroTid)).setHeroTid(heroTid).setLevel(sArenaRobotConfig.getRoleLv()).setStar(heroStar).setPosition(position++).build());
|
||||
teamInfo.addTeam(CommonProto.TeamSimpleInfo.newBuilder().setHeroid(String.valueOf(heroTid)).setHeroTid(heroTid).setLevel(sArenaRobotConfig.getRoleLv()).setStar(heroStar).setPosition(position++).setGodSoulLv(item.getValue().getGodSoulLv()).build());
|
||||
}
|
||||
teamInfo.setTotalForce(sArenaRobotConfig.getYxldTotalForce2());
|
||||
|
||||
|
|
@ -746,7 +752,7 @@ public class PlayerLogic {
|
|||
for(Map.Entry<Integer,CommonProto.Hero> item : sArenaRobotConfig.getHeroMapList3().entrySet()){
|
||||
Integer heroTid = item.getKey();
|
||||
Integer heroStar = item.getValue().getStar();
|
||||
teamInfo.addTeam(CommonProto.TeamSimpleInfo.newBuilder().setHeroid(String.valueOf(heroTid)).setHeroTid(heroTid).setLevel(sArenaRobotConfig.getRoleLv()).setStar(heroStar).setPosition(position++).build());
|
||||
teamInfo.addTeam(CommonProto.TeamSimpleInfo.newBuilder().setHeroid(String.valueOf(heroTid)).setHeroTid(heroTid).setLevel(sArenaRobotConfig.getRoleLv()).setStar(heroStar).setPosition(position++).setGodSoulLv(item.getValue().getGodSoulLv()).build());
|
||||
}
|
||||
teamInfo.setTotalForce(sArenaRobotConfig.getYxldTotalForce3());
|
||||
}
|
||||
|
|
@ -756,6 +762,67 @@ public class PlayerLogic {
|
|||
//oneInfo.setTeam(teamInfo);
|
||||
return oneInfo;
|
||||
}
|
||||
//跨服三队伍
|
||||
public CommonProto.TeamOneInfo.Builder getUserTeamOneInfo(int uid,List<Integer> crossTeamId) throws Exception {
|
||||
User user = UserManager.getUser(uid);
|
||||
CommonProto.TeamOneInfo.Builder oneInfo = CBean2Proto.getTeamOneInfo(user);
|
||||
TeamPosManager teamPosManager = user.getTeamPosManager();
|
||||
for(int teamId:crossTeamId){
|
||||
CommonProto.TeamOneTeamInfo.Builder teamInfo = CommonProto.TeamOneTeamInfo.newBuilder();
|
||||
// 总战力
|
||||
teamInfo.setTotalForce(HeroLogic.getInstance().calTeamTotalForce(user,teamId,false));
|
||||
|
||||
if(teamId==GlobalsDef.TASUILINGXIAO_CHALLENGE){
|
||||
Map<Integer, TaSuiHero> taSuiHeroMap = user.getHeroManager().getTaSuiHeroMap();
|
||||
for(Map.Entry<Integer,TaSuiHero> entry:taSuiHeroMap.entrySet()){
|
||||
TaSuiHero hero = entry.getValue();
|
||||
CommonProto.TeamSimpleInfo info = CommonProto.TeamSimpleInfo.newBuilder().setHeroTid(hero.getTempId()).setLevel(hero.getLeve()).setStar(hero.getStar()).setPosition(entry.getKey()).setGodSoulLv(hero.getGodSoulLv()).build();
|
||||
teamInfo.addTeam(info);
|
||||
}
|
||||
teamInfo.setTotalForce(user.getHeroManager().getTaSuiLingXiaoRankForce());
|
||||
|
||||
}else{
|
||||
if(teamPosManager.getTeamPosForHero().containsKey(teamId)){
|
||||
// 添加队伍信息
|
||||
List<TeamPosHeroInfo> heroInfos = teamPosManager.getTeamPosForHero().get(teamId);
|
||||
for (TeamPosHeroInfo heroInfo:heroInfos) {
|
||||
Hero hero = user.getHeroManager().getHero(heroInfo.getHeroId());
|
||||
teamInfo.addTeam(CBean2Proto.getSimpleTeamInfoByHero(user, hero,heroInfo.getPosition()));
|
||||
}
|
||||
// 紫府神印
|
||||
List<String> collect = heroInfos.stream().map(TeamPosHeroInfo::getHeroId).collect(Collectors.toList());
|
||||
teamInfo.addAllSealShow(CBean2Proto.getPurpleSealShow(user,collect));
|
||||
}
|
||||
|
||||
}
|
||||
//加入灵兽信息
|
||||
PokemonManager pokemonManager = user.getPokemonManager();
|
||||
if(!pokemonManager.getPokemonTeamMap().isEmpty()){
|
||||
for(Map.Entry<Integer,String> entry:pokemonManager.getPokemonTeamMap().entrySet()){
|
||||
Pokemon pokemon = pokemonManager.getPokemonMap().get(entry.getValue());
|
||||
if(pokemon==null){
|
||||
continue;
|
||||
}
|
||||
teamInfo.addPokemonInfos(CBean2Proto.getSimpleTeamInfoByPokeMon(pokemon,entry.getKey()));
|
||||
}
|
||||
}
|
||||
int guildId = user.getPlayerInfoManager().getGuildId();
|
||||
if(guildId!=0){
|
||||
if(GuilidManager.guildInfoMap.containsKey(guildId)){
|
||||
String name = GuilidManager.guildInfoMap.get(guildId).getName();
|
||||
oneInfo.setGuildName(name);
|
||||
}
|
||||
|
||||
}
|
||||
if(teamId==GlobalsDef.CROSS_YU_XU_LUN_DAO_ONE ||teamId==GlobalsDef.CROSS_YU_XU_LUN_DAO_TWO || teamId==GlobalsDef.CROSS_YU_XU_LUN_DAO_THREE ){
|
||||
oneInfo.addCrossTeam(teamInfo);
|
||||
}else{
|
||||
oneInfo.setTeam(teamInfo);
|
||||
}
|
||||
}
|
||||
return oneInfo;
|
||||
}
|
||||
|
||||
|
||||
//获取跨服玩家信息
|
||||
public CommonProto.TeamOneInfo getCrossYxldMyTeamInfo(User user,List<Integer> team) throws Exception{
|
||||
|
|
@ -792,6 +859,7 @@ public class PlayerLogic {
|
|||
.setStar(hero.getStar())
|
||||
.setPosition(heroInfo.getPosition())
|
||||
.setSkinId(hero.getSkin())
|
||||
.setGodSoulLv(hero.getGodSoulLv())
|
||||
.build());
|
||||
}
|
||||
}
|
||||
|
|
@ -862,6 +930,7 @@ public class PlayerLogic {
|
|||
.setStar(hero.getStar())
|
||||
.setPosition(heroInfo.getPosition())
|
||||
.setSkinId(hero.getSkin())
|
||||
.setGodSoulLv(hero.getGodSoulLv())
|
||||
.build());
|
||||
}
|
||||
}
|
||||
|
|
@ -968,6 +1037,7 @@ public class PlayerLogic {
|
|||
.setStar(hero.getStar())
|
||||
.setPosition(heroInfo.getPosition())
|
||||
.setSkinId(hero.getSkin())
|
||||
.setGodSoulLv(hero.getGodSoulLv())
|
||||
.build());
|
||||
}
|
||||
}
|
||||
|
|
@ -1050,6 +1120,7 @@ public class PlayerLogic {
|
|||
.setStar(hero.getStar())
|
||||
.setPosition(heroInfo.getPosition())
|
||||
.setSkinId(hero.getSkin())
|
||||
.setGodSoulLv(hero.getGodSoulLv())
|
||||
.build());
|
||||
}
|
||||
}
|
||||
|
|
@ -1226,7 +1297,7 @@ public class PlayerLogic {
|
|||
CommonProto.Hero.Builder heroBuilder = CommonProto.Hero.newBuilder().
|
||||
setLevel(hero.getLevel(user.getHeroManager()))
|
||||
.setEspecialEquipLevel(hero.getEspecialEquipLevel())
|
||||
.setStar(hero.getStar()).setId(hero.getId())
|
||||
.setStar(hero.getStar()).setId(hero.getId()).setGodSoulLv(hero.getGodSoulLv())
|
||||
.setHeroId(hero.getTemplateId())
|
||||
.setBreakId(hero.getBreakIdByHongMeng(user.getHeroManager()))
|
||||
.setStarBreakId(hero.getStarBreakId());
|
||||
|
|
@ -1271,6 +1342,7 @@ public class PlayerLogic {
|
|||
}
|
||||
// 皮肤
|
||||
heroBuilder.setSkinId(hero.getSkin());
|
||||
heroBuilder.setGodSoulLv(hero.getGodSoulLv());
|
||||
// 英雄技能
|
||||
int profession = SCHero.getsCHero().get(hero.getTemplateId()).getProfession();
|
||||
int skill = user.getGuildMyInfo().getGuildSkill().getOrDefault(profession, 0);
|
||||
|
|
@ -1282,6 +1354,20 @@ public class PlayerLogic {
|
|||
return builder.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 跨服英雄属性展示特殊处理
|
||||
* @param id
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
private CommonProto.SpecialEffects crossPropertyHandle(int id,int value){
|
||||
int values = value;
|
||||
if (id == 53 || id == 57 || id == 58){
|
||||
values = value-10000;
|
||||
}
|
||||
return CommonProto.SpecialEffects.newBuilder().setPropertyId(id).setPropertyValue(values).build();
|
||||
}
|
||||
|
||||
public void takeSevenScoreReward(ISession iSession) throws Exception {
|
||||
User user = UserManager.getUser(iSession.getUid());
|
||||
int msgId = MessageTypeProto.MessageType.TAKE_SEVEN_HAPPY_REWARD_RESPONSE_VALUE;
|
||||
|
|
@ -1503,41 +1589,6 @@ public class PlayerLogic {
|
|||
}
|
||||
return levelUpdateCount;
|
||||
}
|
||||
// private boolean priviliageCheck(User user, int privilageTypeId, int checkNum,boolean isUpdate){
|
||||
// Map<Integer, VipInfo> vipInfo = user.getPlayerInfoManager().getVipInfo();
|
||||
// if(privilageTypeId == 0){
|
||||
// return true;
|
||||
// }
|
||||
// List<SPrivilegeTypeConfig> sPrivilegeTypeConfigs = SPrivilegeTypeConfig.privilegeByType.get(privilageTypeId);
|
||||
// List<Integer> typePrivileges = new ArrayList<>();
|
||||
// for(SPrivilegeTypeConfig config:sPrivilegeTypeConfigs){
|
||||
// if(!vipInfo.containsKey(config.getId())){
|
||||
// continue;
|
||||
// }
|
||||
// typePrivileges.add(config.getId());
|
||||
// }
|
||||
// if(typePrivileges.isEmpty()){
|
||||
// return false;
|
||||
// }
|
||||
// for(Integer privilageId:typePrivileges){
|
||||
// VipInfo info = vipInfo.get(privilageId);
|
||||
// if(info.getEffectTime()!=0&&TimeUtils.now()/1000>info.getEffectTime()){
|
||||
// continue;
|
||||
// }
|
||||
// int mCount = getMaxCountByPrivilege(user,privilageId);
|
||||
// if(mCount==-1){
|
||||
// return true;
|
||||
// }
|
||||
// if((info.getCount()+checkNum>mCount)|| (info.getEffectTime()!=0&&TimeUtils.now()/1000>info.getEffectTime())){
|
||||
// continue;
|
||||
// }
|
||||
// if (isUpdate){
|
||||
// user.getPlayerInfoManager().updateVipPrivilage(privilageId, checkNum);
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
private int getMaxCountByPrivilege(User user,int privilegeId){
|
||||
SPrivilegeTypeConfig sPrivilegeTypeConfig = SPrivilegeTypeConfig.getsPrivilegeTypeConfigMap().get(privilegeId);
|
||||
Map<Integer, Map<Integer, Integer>> conditionMap = SPrivilegeTypeConfig.conditionMap.get(sPrivilegeTypeConfig.getUnlockType());
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2021-10-21")
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2021-10-28")
|
||||
public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOfHero._Fields>, java.io.Serializable, Cloneable, Comparable<ArenaOfHero> {
|
||||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ArenaOfHero");
|
||||
|
||||
|
|
@ -55,6 +55,7 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
private static final org.apache.thrift.protocol.TField ATTRIBUTE_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("attributeMap", org.apache.thrift.protocol.TType.MAP, (short)15);
|
||||
private static final org.apache.thrift.protocol.TField ATTRIBUTE_MAP_BY_TEAM_FIELD_DESC = new org.apache.thrift.protocol.TField("attributeMapByTeam", org.apache.thrift.protocol.TType.MAP, (short)16);
|
||||
private static final org.apache.thrift.protocol.TField ATTRIBUTE_MAP_BY_TEAM_BATTLE_FIELD_DESC = new org.apache.thrift.protocol.TField("attributeMapByTeamBattle", org.apache.thrift.protocol.TType.MAP, (short)17);
|
||||
private static final org.apache.thrift.protocol.TField GOD_SOUL_LV_FIELD_DESC = new org.apache.thrift.protocol.TField("godSoulLv", org.apache.thrift.protocol.TType.I32, (short)18);
|
||||
|
||||
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
|
||||
static {
|
||||
|
|
@ -79,6 +80,7 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
public Map<Integer,Long> attributeMap; // optional
|
||||
public Map<Integer,Map<Integer,Long>> attributeMapByTeam; // optional
|
||||
public Map<Integer,Map<Integer,Long>> attributeMapByTeamBattle; // optional
|
||||
public int godSoulLv; // optional
|
||||
|
||||
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
||||
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
||||
|
|
@ -98,7 +100,8 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
JEWEL_INFO((short)14, "jewelInfo"),
|
||||
ATTRIBUTE_MAP((short)15, "attributeMap"),
|
||||
ATTRIBUTE_MAP_BY_TEAM((short)16, "attributeMapByTeam"),
|
||||
ATTRIBUTE_MAP_BY_TEAM_BATTLE((short)17, "attributeMapByTeamBattle");
|
||||
ATTRIBUTE_MAP_BY_TEAM_BATTLE((short)17, "attributeMapByTeamBattle"),
|
||||
GOD_SOUL_LV((short)18, "godSoulLv");
|
||||
|
||||
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
||||
|
||||
|
|
@ -147,6 +150,8 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
return ATTRIBUTE_MAP_BY_TEAM;
|
||||
case 17: // ATTRIBUTE_MAP_BY_TEAM_BATTLE
|
||||
return ATTRIBUTE_MAP_BY_TEAM_BATTLE;
|
||||
case 18: // GOD_SOUL_LV
|
||||
return GOD_SOUL_LV;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
@ -197,8 +202,9 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
private static final int __CREATETYPE_ISSET_ID = 7;
|
||||
private static final int __CHANGEID_ISSET_ID = 8;
|
||||
private static final int __SKIN_ISSET_ID = 9;
|
||||
private static final int __GODSOULLV_ISSET_ID = 10;
|
||||
private short __isset_bitfield = 0;
|
||||
private static final _Fields optionals[] = {_Fields.ID,_Fields.TEMPLATE_ID,_Fields.LEVEL,_Fields.STAR,_Fields.EQUIP_BY_POSITION_MAP,_Fields.SOUL_EQUIP_BY_POSITION_MAP,_Fields.BREAK_ID,_Fields.STAR_BREAK_ID,_Fields.CREATE_TIME,_Fields.ESPECIAL_EQUIP_LEVEL,_Fields.CREATE_TYPE,_Fields.CHANGE_ID,_Fields.SKIN,_Fields.JEWEL_INFO,_Fields.ATTRIBUTE_MAP,_Fields.ATTRIBUTE_MAP_BY_TEAM,_Fields.ATTRIBUTE_MAP_BY_TEAM_BATTLE};
|
||||
private static final _Fields optionals[] = {_Fields.ID,_Fields.TEMPLATE_ID,_Fields.LEVEL,_Fields.STAR,_Fields.EQUIP_BY_POSITION_MAP,_Fields.SOUL_EQUIP_BY_POSITION_MAP,_Fields.BREAK_ID,_Fields.STAR_BREAK_ID,_Fields.CREATE_TIME,_Fields.ESPECIAL_EQUIP_LEVEL,_Fields.CREATE_TYPE,_Fields.CHANGE_ID,_Fields.SKIN,_Fields.JEWEL_INFO,_Fields.ATTRIBUTE_MAP,_Fields.ATTRIBUTE_MAP_BY_TEAM,_Fields.ATTRIBUTE_MAP_BY_TEAM_BATTLE,_Fields.GOD_SOUL_LV};
|
||||
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
||||
static {
|
||||
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
||||
|
|
@ -251,6 +257,8 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32),
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))));
|
||||
tmpMap.put(_Fields.GOD_SOUL_LV, new org.apache.thrift.meta_data.FieldMetaData("godSoulLv", org.apache.thrift.TFieldRequirementType.OPTIONAL,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
|
||||
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
||||
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ArenaOfHero.class, metaDataMap);
|
||||
}
|
||||
|
|
@ -322,6 +330,7 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
}
|
||||
this.attributeMapByTeamBattle = __this__attributeMapByTeamBattle;
|
||||
}
|
||||
this.godSoulLv = other.godSoulLv;
|
||||
}
|
||||
|
||||
public ArenaOfHero deepCopy() {
|
||||
|
|
@ -357,6 +366,8 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
this.attributeMap = null;
|
||||
this.attributeMapByTeam = null;
|
||||
this.attributeMapByTeamBattle = null;
|
||||
setGodSoulLvIsSet(false);
|
||||
this.godSoulLv = 0;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
|
|
@ -827,6 +838,29 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
}
|
||||
}
|
||||
|
||||
public int getGodSoulLv() {
|
||||
return this.godSoulLv;
|
||||
}
|
||||
|
||||
public ArenaOfHero setGodSoulLv(int godSoulLv) {
|
||||
this.godSoulLv = godSoulLv;
|
||||
setGodSoulLvIsSet(true);
|
||||
return this;
|
||||
}
|
||||
|
||||
public void unsetGodSoulLv() {
|
||||
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __GODSOULLV_ISSET_ID);
|
||||
}
|
||||
|
||||
/** Returns true if field godSoulLv is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetGodSoulLv() {
|
||||
return EncodingUtils.testBit(__isset_bitfield, __GODSOULLV_ISSET_ID);
|
||||
}
|
||||
|
||||
public void setGodSoulLvIsSet(boolean value) {
|
||||
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GODSOULLV_ISSET_ID, value);
|
||||
}
|
||||
|
||||
public void setFieldValue(_Fields field, Object value) {
|
||||
switch (field) {
|
||||
case ID:
|
||||
|
|
@ -965,6 +999,14 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
}
|
||||
break;
|
||||
|
||||
case GOD_SOUL_LV:
|
||||
if (value == null) {
|
||||
unsetGodSoulLv();
|
||||
} else {
|
||||
setGodSoulLv((Integer)value);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1021,6 +1063,9 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
case ATTRIBUTE_MAP_BY_TEAM_BATTLE:
|
||||
return getAttributeMapByTeamBattle();
|
||||
|
||||
case GOD_SOUL_LV:
|
||||
return Integer.valueOf(getGodSoulLv());
|
||||
|
||||
}
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
|
@ -1066,6 +1111,8 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
return isSetAttributeMapByTeam();
|
||||
case ATTRIBUTE_MAP_BY_TEAM_BATTLE:
|
||||
return isSetAttributeMapByTeamBattle();
|
||||
case GOD_SOUL_LV:
|
||||
return isSetGodSoulLv();
|
||||
}
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
|
@ -1236,6 +1283,15 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
return false;
|
||||
}
|
||||
|
||||
boolean this_present_godSoulLv = true && this.isSetGodSoulLv();
|
||||
boolean that_present_godSoulLv = true && that.isSetGodSoulLv();
|
||||
if (this_present_godSoulLv || that_present_godSoulLv) {
|
||||
if (!(this_present_godSoulLv && that_present_godSoulLv))
|
||||
return false;
|
||||
if (this.godSoulLv != that.godSoulLv)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -1328,6 +1384,11 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
if (present_attributeMapByTeamBattle)
|
||||
list.add(attributeMapByTeamBattle);
|
||||
|
||||
boolean present_godSoulLv = true && (isSetGodSoulLv());
|
||||
list.add(present_godSoulLv);
|
||||
if (present_godSoulLv)
|
||||
list.add(godSoulLv);
|
||||
|
||||
return list.hashCode();
|
||||
}
|
||||
|
||||
|
|
@ -1509,6 +1570,16 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
return lastComparison;
|
||||
}
|
||||
}
|
||||
lastComparison = Boolean.valueOf(isSetGodSoulLv()).compareTo(other.isSetGodSoulLv());
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
if (isSetGodSoulLv()) {
|
||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.godSoulLv, other.godSoulLv);
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1658,6 +1729,12 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
}
|
||||
first = false;
|
||||
}
|
||||
if (isSetGodSoulLv()) {
|
||||
if (!first) sb.append(", ");
|
||||
sb.append("godSoulLv:");
|
||||
sb.append(this.godSoulLv);
|
||||
first = false;
|
||||
}
|
||||
sb.append(")");
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
@ -1933,6 +2010,14 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 18: // GOD_SOUL_LV
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
|
||||
struct.godSoulLv = iprot.readI32();
|
||||
struct.setGodSoulLvIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
|
|
@ -2110,6 +2195,11 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (struct.isSetGodSoulLv()) {
|
||||
oprot.writeFieldBegin(GOD_SOUL_LV_FIELD_DESC);
|
||||
oprot.writeI32(struct.godSoulLv);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
|
@ -2179,7 +2269,10 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
if (struct.isSetAttributeMapByTeamBattle()) {
|
||||
optionals.set(16);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 17);
|
||||
if (struct.isSetGodSoulLv()) {
|
||||
optionals.set(17);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 18);
|
||||
if (struct.isSetId()) {
|
||||
oprot.writeString(struct.id);
|
||||
}
|
||||
|
|
@ -2286,12 +2379,15 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
}
|
||||
}
|
||||
}
|
||||
if (struct.isSetGodSoulLv()) {
|
||||
oprot.writeI32(struct.godSoulLv);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(org.apache.thrift.protocol.TProtocol prot, ArenaOfHero struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol iprot = (TTupleProtocol) prot;
|
||||
BitSet incoming = iprot.readBitSet(17);
|
||||
BitSet incoming = iprot.readBitSet(18);
|
||||
if (incoming.get(0)) {
|
||||
struct.id = iprot.readString();
|
||||
struct.setIdIsSet(true);
|
||||
|
|
@ -2446,6 +2542,10 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
}
|
||||
struct.setAttributeMapByTeamBattleIsSet(true);
|
||||
}
|
||||
if (incoming.get(17)) {
|
||||
struct.godSoulLv = iprot.readI32();
|
||||
struct.setGodSoulLvIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -389,6 +389,7 @@ public class CBean2Proto {
|
|||
.setCreatetype(hero.getCreateType())
|
||||
.setChangeId(hero.getChangeId())
|
||||
.setSkinId(hero.getSkin())
|
||||
.setGodSoulLv(hero.getGodSoulLv())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
@ -403,7 +404,14 @@ public class CBean2Proto {
|
|||
soulPoss.add(builder.build());
|
||||
}
|
||||
}
|
||||
|
||||
List<CommonProto.HeroGodSoulInfo>godSoulList=new ArrayList<>();
|
||||
for (Map.Entry<Integer, List<String>> godSoul : hero.getGodSoulBindMap().entrySet()) {
|
||||
CommonProto.HeroGodSoulInfo godSoulInfo=CommonProto.HeroGodSoulInfo.newBuilder()
|
||||
.setLevel(godSoul.getKey())
|
||||
.addAllHeros(godSoul.getValue())
|
||||
.build();
|
||||
godSoulList.add(godSoulInfo);
|
||||
}
|
||||
return CommonProto.Hero
|
||||
.newBuilder()
|
||||
.setId(hero.getId())
|
||||
|
|
@ -421,6 +429,8 @@ public class CBean2Proto {
|
|||
.setCreatetype(hero.getCreateType())
|
||||
.setChangeId(hero.getChangeId())
|
||||
.setSkinId(hero.getSkin())
|
||||
.addAllGodSoulList(godSoulList)
|
||||
.setGodSoulLv(hero.getGodSoulLv())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
@ -1073,7 +1083,7 @@ public class CBean2Proto {
|
|||
}
|
||||
|
||||
public static CommonProto.TeamSimpleInfo getSimpleTeamInfoByHero(User user, Hero hero,int position){
|
||||
return CommonProto.TeamSimpleInfo.newBuilder().setHeroid(hero.getId()).setHeroTid(hero.getTemplateId()).setLevel(hero.getLevel(user.getHeroManager())).setStar(hero.getStar()).setPosition(position).setSkinId(hero.getSkin()).build();
|
||||
return CommonProto.TeamSimpleInfo.newBuilder().setHeroid(hero.getId()).setHeroTid(hero.getTemplateId()).setLevel(hero.getLevel(user.getHeroManager())).setStar(hero.getStar()).setPosition(position).setSkinId(hero.getSkin()).setGodSoulLv(hero.getGodSoulLv()).build();
|
||||
}
|
||||
public static CommonProto.TeamSimpleInfo getSimpleTeamInfoByPokeMon(Pokemon pokemon,int position){
|
||||
return CommonProto.TeamSimpleInfo.newBuilder().setHeroid(pokemon.getId()).setHeroTid(pokemon.getTmpId()).setLevel(pokemon.getLevel()).setStar(pokemon.getStar()).setPosition(position).build();
|
||||
|
|
@ -1150,6 +1160,7 @@ public class CBean2Proto {
|
|||
.setStar(hero.getStar())
|
||||
.setPosition(position)
|
||||
.setSkinId(hero.getSkin())
|
||||
.setGodSoulLv(hero.getGodSoulLv())
|
||||
.build();
|
||||
}
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ struct ArenaOfHero {
|
|||
15:optional map<i32,i64> attributeMap;
|
||||
16:optional map<i32,map<i32,i64>> attributeMapByTeam ;
|
||||
17:optional map<i32,map<i32,i64>> attributeMapByTeamBattle ;
|
||||
18:optional i32 godSoulLv;//神魂等级
|
||||
}
|
||||
|
||||
struct PropertyItem {
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2021-10-21")
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2021-10-28")
|
||||
public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOfHero._Fields>, java.io.Serializable, Cloneable, Comparable<ArenaOfHero> {
|
||||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ArenaOfHero");
|
||||
|
||||
|
|
@ -55,6 +55,7 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
private static final org.apache.thrift.protocol.TField ATTRIBUTE_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("attributeMap", org.apache.thrift.protocol.TType.MAP, (short)15);
|
||||
private static final org.apache.thrift.protocol.TField ATTRIBUTE_MAP_BY_TEAM_FIELD_DESC = new org.apache.thrift.protocol.TField("attributeMapByTeam", org.apache.thrift.protocol.TType.MAP, (short)16);
|
||||
private static final org.apache.thrift.protocol.TField ATTRIBUTE_MAP_BY_TEAM_BATTLE_FIELD_DESC = new org.apache.thrift.protocol.TField("attributeMapByTeamBattle", org.apache.thrift.protocol.TType.MAP, (short)17);
|
||||
private static final org.apache.thrift.protocol.TField GOD_SOUL_LV_FIELD_DESC = new org.apache.thrift.protocol.TField("godSoulLv", org.apache.thrift.protocol.TType.I32, (short)18);
|
||||
|
||||
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
|
||||
static {
|
||||
|
|
@ -79,6 +80,7 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
public Map<Integer,Long> attributeMap; // optional
|
||||
public Map<Integer,Map<Integer,Long>> attributeMapByTeam; // optional
|
||||
public Map<Integer,Map<Integer,Long>> attributeMapByTeamBattle; // optional
|
||||
public int godSoulLv; // optional
|
||||
|
||||
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
||||
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
||||
|
|
@ -98,7 +100,8 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
JEWEL_INFO((short)14, "jewelInfo"),
|
||||
ATTRIBUTE_MAP((short)15, "attributeMap"),
|
||||
ATTRIBUTE_MAP_BY_TEAM((short)16, "attributeMapByTeam"),
|
||||
ATTRIBUTE_MAP_BY_TEAM_BATTLE((short)17, "attributeMapByTeamBattle");
|
||||
ATTRIBUTE_MAP_BY_TEAM_BATTLE((short)17, "attributeMapByTeamBattle"),
|
||||
GOD_SOUL_LV((short)18, "godSoulLv");
|
||||
|
||||
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
||||
|
||||
|
|
@ -147,6 +150,8 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
return ATTRIBUTE_MAP_BY_TEAM;
|
||||
case 17: // ATTRIBUTE_MAP_BY_TEAM_BATTLE
|
||||
return ATTRIBUTE_MAP_BY_TEAM_BATTLE;
|
||||
case 18: // GOD_SOUL_LV
|
||||
return GOD_SOUL_LV;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
@ -197,8 +202,9 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
private static final int __CREATETYPE_ISSET_ID = 7;
|
||||
private static final int __CHANGEID_ISSET_ID = 8;
|
||||
private static final int __SKIN_ISSET_ID = 9;
|
||||
private static final int __GODSOULLV_ISSET_ID = 10;
|
||||
private short __isset_bitfield = 0;
|
||||
private static final _Fields optionals[] = {_Fields.ID,_Fields.TEMPLATE_ID,_Fields.LEVEL,_Fields.STAR,_Fields.EQUIP_BY_POSITION_MAP,_Fields.SOUL_EQUIP_BY_POSITION_MAP,_Fields.BREAK_ID,_Fields.STAR_BREAK_ID,_Fields.CREATE_TIME,_Fields.ESPECIAL_EQUIP_LEVEL,_Fields.CREATE_TYPE,_Fields.CHANGE_ID,_Fields.SKIN,_Fields.JEWEL_INFO,_Fields.ATTRIBUTE_MAP,_Fields.ATTRIBUTE_MAP_BY_TEAM,_Fields.ATTRIBUTE_MAP_BY_TEAM_BATTLE};
|
||||
private static final _Fields optionals[] = {_Fields.ID,_Fields.TEMPLATE_ID,_Fields.LEVEL,_Fields.STAR,_Fields.EQUIP_BY_POSITION_MAP,_Fields.SOUL_EQUIP_BY_POSITION_MAP,_Fields.BREAK_ID,_Fields.STAR_BREAK_ID,_Fields.CREATE_TIME,_Fields.ESPECIAL_EQUIP_LEVEL,_Fields.CREATE_TYPE,_Fields.CHANGE_ID,_Fields.SKIN,_Fields.JEWEL_INFO,_Fields.ATTRIBUTE_MAP,_Fields.ATTRIBUTE_MAP_BY_TEAM,_Fields.ATTRIBUTE_MAP_BY_TEAM_BATTLE,_Fields.GOD_SOUL_LV};
|
||||
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
||||
static {
|
||||
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
||||
|
|
@ -251,6 +257,8 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32),
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))));
|
||||
tmpMap.put(_Fields.GOD_SOUL_LV, new org.apache.thrift.meta_data.FieldMetaData("godSoulLv", org.apache.thrift.TFieldRequirementType.OPTIONAL,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
|
||||
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
||||
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ArenaOfHero.class, metaDataMap);
|
||||
}
|
||||
|
|
@ -322,6 +330,7 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
}
|
||||
this.attributeMapByTeamBattle = __this__attributeMapByTeamBattle;
|
||||
}
|
||||
this.godSoulLv = other.godSoulLv;
|
||||
}
|
||||
|
||||
public ArenaOfHero deepCopy() {
|
||||
|
|
@ -357,6 +366,8 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
this.attributeMap = null;
|
||||
this.attributeMapByTeam = null;
|
||||
this.attributeMapByTeamBattle = null;
|
||||
setGodSoulLvIsSet(false);
|
||||
this.godSoulLv = 0;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
|
|
@ -827,6 +838,29 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
}
|
||||
}
|
||||
|
||||
public int getGodSoulLv() {
|
||||
return this.godSoulLv;
|
||||
}
|
||||
|
||||
public ArenaOfHero setGodSoulLv(int godSoulLv) {
|
||||
this.godSoulLv = godSoulLv;
|
||||
setGodSoulLvIsSet(true);
|
||||
return this;
|
||||
}
|
||||
|
||||
public void unsetGodSoulLv() {
|
||||
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __GODSOULLV_ISSET_ID);
|
||||
}
|
||||
|
||||
/** Returns true if field godSoulLv is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetGodSoulLv() {
|
||||
return EncodingUtils.testBit(__isset_bitfield, __GODSOULLV_ISSET_ID);
|
||||
}
|
||||
|
||||
public void setGodSoulLvIsSet(boolean value) {
|
||||
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GODSOULLV_ISSET_ID, value);
|
||||
}
|
||||
|
||||
public void setFieldValue(_Fields field, Object value) {
|
||||
switch (field) {
|
||||
case ID:
|
||||
|
|
@ -965,6 +999,14 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
}
|
||||
break;
|
||||
|
||||
case GOD_SOUL_LV:
|
||||
if (value == null) {
|
||||
unsetGodSoulLv();
|
||||
} else {
|
||||
setGodSoulLv((Integer)value);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1021,6 +1063,9 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
case ATTRIBUTE_MAP_BY_TEAM_BATTLE:
|
||||
return getAttributeMapByTeamBattle();
|
||||
|
||||
case GOD_SOUL_LV:
|
||||
return Integer.valueOf(getGodSoulLv());
|
||||
|
||||
}
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
|
@ -1066,6 +1111,8 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
return isSetAttributeMapByTeam();
|
||||
case ATTRIBUTE_MAP_BY_TEAM_BATTLE:
|
||||
return isSetAttributeMapByTeamBattle();
|
||||
case GOD_SOUL_LV:
|
||||
return isSetGodSoulLv();
|
||||
}
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
|
@ -1236,6 +1283,15 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
return false;
|
||||
}
|
||||
|
||||
boolean this_present_godSoulLv = true && this.isSetGodSoulLv();
|
||||
boolean that_present_godSoulLv = true && that.isSetGodSoulLv();
|
||||
if (this_present_godSoulLv || that_present_godSoulLv) {
|
||||
if (!(this_present_godSoulLv && that_present_godSoulLv))
|
||||
return false;
|
||||
if (this.godSoulLv != that.godSoulLv)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -1328,6 +1384,11 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
if (present_attributeMapByTeamBattle)
|
||||
list.add(attributeMapByTeamBattle);
|
||||
|
||||
boolean present_godSoulLv = true && (isSetGodSoulLv());
|
||||
list.add(present_godSoulLv);
|
||||
if (present_godSoulLv)
|
||||
list.add(godSoulLv);
|
||||
|
||||
return list.hashCode();
|
||||
}
|
||||
|
||||
|
|
@ -1509,6 +1570,16 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
return lastComparison;
|
||||
}
|
||||
}
|
||||
lastComparison = Boolean.valueOf(isSetGodSoulLv()).compareTo(other.isSetGodSoulLv());
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
if (isSetGodSoulLv()) {
|
||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.godSoulLv, other.godSoulLv);
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1658,6 +1729,12 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
}
|
||||
first = false;
|
||||
}
|
||||
if (isSetGodSoulLv()) {
|
||||
if (!first) sb.append(", ");
|
||||
sb.append("godSoulLv:");
|
||||
sb.append(this.godSoulLv);
|
||||
first = false;
|
||||
}
|
||||
sb.append(")");
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
@ -1933,6 +2010,14 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 18: // GOD_SOUL_LV
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
|
||||
struct.godSoulLv = iprot.readI32();
|
||||
struct.setGodSoulLvIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
|
|
@ -2110,6 +2195,11 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (struct.isSetGodSoulLv()) {
|
||||
oprot.writeFieldBegin(GOD_SOUL_LV_FIELD_DESC);
|
||||
oprot.writeI32(struct.godSoulLv);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
|
@ -2179,7 +2269,10 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
if (struct.isSetAttributeMapByTeamBattle()) {
|
||||
optionals.set(16);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 17);
|
||||
if (struct.isSetGodSoulLv()) {
|
||||
optionals.set(17);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 18);
|
||||
if (struct.isSetId()) {
|
||||
oprot.writeString(struct.id);
|
||||
}
|
||||
|
|
@ -2286,12 +2379,15 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
}
|
||||
}
|
||||
}
|
||||
if (struct.isSetGodSoulLv()) {
|
||||
oprot.writeI32(struct.godSoulLv);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(org.apache.thrift.protocol.TProtocol prot, ArenaOfHero struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol iprot = (TTupleProtocol) prot;
|
||||
BitSet incoming = iprot.readBitSet(17);
|
||||
BitSet incoming = iprot.readBitSet(18);
|
||||
if (incoming.get(0)) {
|
||||
struct.id = iprot.readString();
|
||||
struct.setIdIsSet(true);
|
||||
|
|
@ -2446,6 +2542,10 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
|
|||
}
|
||||
struct.setAttributeMapByTeamBattleIsSet(true);
|
||||
}
|
||||
if (incoming.get(17)) {
|
||||
struct.godSoulLv = iprot.readI32();
|
||||
struct.setGodSoulLvIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,6 +64,12 @@ public class SCHero implements BaseConfig{
|
|||
|
||||
private int joinWishDay;
|
||||
|
||||
private int[][] soul;
|
||||
|
||||
private int[][] soulSkill;
|
||||
|
||||
private int isSoulOpen;
|
||||
|
||||
private Map<Integer,Integer> secondaryFactorMap;
|
||||
|
||||
private Map<Integer, List<Integer>> skillListByStar;
|
||||
|
|
@ -360,4 +366,16 @@ public class SCHero implements BaseConfig{
|
|||
public int getJoinWishDay() {
|
||||
return joinWishDay;
|
||||
}
|
||||
|
||||
public int[][] getSoul() {
|
||||
return soul;
|
||||
}
|
||||
|
||||
public int[][] getSoulSkill() {
|
||||
return soulSkill;
|
||||
}
|
||||
|
||||
public int getIsSoulOpen() {
|
||||
return isSoulOpen;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ public class SHeroRankupGroup implements BaseConfig {
|
|||
private int[] items;
|
||||
|
||||
private int[][] itemCamp;
|
||||
|
||||
private int isSameJob;
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
|
|
@ -50,4 +52,8 @@ public class SHeroRankupGroup implements BaseConfig {
|
|||
public int[][] getItemCamp() {
|
||||
return itemCamp;
|
||||
}
|
||||
|
||||
public int getIsSameJob() {
|
||||
return isSameJob;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue