神魔阵营功能脚本提交

back_recharge
yuanshuai 2022-03-18 16:45:25 +08:00
parent 738ef9c1e2
commit dc0c9819bd
22 changed files with 320 additions and 18 deletions

View File

@ -318,6 +318,7 @@ public class CoreService implements RPCRequestIFace.Iface {
arenaOfHero.setChangeId(hero.getChangeId());
arenaOfHero.setSkin(hero.getSkin());
arenaOfHero.setGodSoulLv(hero.getGodSoulLv());
arenaOfHero.setPropertyId(hero.getPropertyId());
for (Map.Entry<Integer, List<TeamPosHeroInfo>> entry : teamMap.entrySet()) {
Integer teamId = entry.getKey();
List<TeamPosHeroInfo> teamList = entry.getValue();

View File

@ -1,5 +1,6 @@
package com.ljsd.jieling.handler;
import com.ljsd.jieling.logic.dao.HeroManager;
import com.ljsd.jieling.logic.hero.HeroLogic;
import com.ljsd.jieling.netty.cocdex.PacketNetData;
import com.ljsd.jieling.network.session.ISession;

View File

@ -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(),myHero.getGodSoulLv());
TaSuiHero taSuiHero = new TaSuiHero(myHero.getTemplateId(),myHero.getOriginalLevel(),myHero.getStar(),myHero.getGodSoulLv(),myHero.getPropertyId());
heroMap.put(hero.getPosition(),taSuiHero);
}
user.getHeroManager().setTaSuiHeroMap(heroMap);

View File

@ -0,0 +1,46 @@
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.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.network.session.ISession;
import com.ljsd.jieling.util.ItemUtil;
import com.ljsd.jieling.util.MessageUtil;
import config.*;
import org.springframework.stereotype.Component;
import rpc.protocols.HeroInfoProto;
import rpc.protocols.MessageTypeProto;
//神魔阵营英雄转职协议
@Component
public class GodDevilHeroSelectPropRequestHandler extends BaseHandler<HeroInfoProto.GodDevilHeroSelectPropRequest> {
@Override
public MessageTypeProto.MessageType getMessageCode() {
return MessageTypeProto.MessageType.GOD_DEVIL_HERO_SELECT_PROP_REQUEST;
}
@Override
public void processWithProto(ISession session, HeroInfoProto.GodDevilHeroSelectPropRequest proto) throws Exception {
String heroId=proto.getHeroId();//英雄动态id
int propId=proto.getPropId();//属性id
int uid = session.getUid();
User user = UserManager.getUser(uid);
HeroManager heroManager=user.getHeroManager();
int[][]costArr=SSpecialConfig.getTwiceArrayValue(SSpecialConfig.CHANGE_CAMP_COST);
boolean costResult = ItemUtil.itemCost(user,costArr, BIReason.SIXIANG_UP_COST,propId);
if (!costResult){
LOGGER.error("神魔英雄转职消耗材料不足");
throw new ErrorCodeException(ErrorCode.HANDLE_FAILED);
}
Hero hero= heroManager.getHero(heroId);
hero.setPropertyId(propId);
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.GOD_DEVIL_HERO_SELECT_PROP_RESPONSE_VALUE, null,true);
}
}

View File

@ -3284,7 +3284,7 @@ public class MapLogic {
skinId = 0;
skinTime = 0;
}
TrailHero trailHero = new TrailHero(hero.getTemplateId(), HeroLogic.getInstance().calHeroNotBufferAttribute(user, hero, false, 0), hero.getStar(), heroSkill, hero.getLevel(user.getHeroManager()), hero.getGodSoulLv());
TrailHero trailHero = new TrailHero(hero.getTemplateId(), HeroLogic.getInstance().calHeroNotBufferAttribute(user, hero, false, 0), hero.getStar(), heroSkill, hero.getLevel(user.getHeroManager()), hero.getGodSoulLv(),hero.getPropertyId());
trailHero.setSkinId(skinId);
trailHero.setSkinTime(skinTime);
trailHero.setPosition(saveHero.getPosition());
@ -3306,6 +3306,7 @@ public class MapLogic {
.setSkinId(trailHero.getSkinId())
.setPosition(trailHero.getPosition())
.setGodSoulLv(trailHero.getGodSoulLv())
.setPropertyId(trailHero.getPropertyId())
.build();
response.addHeroes(info);
}

View File

@ -29,6 +29,8 @@ public class TrailHero extends MongoBase {
private int godSoulLv;
private int propertyId;
public int getTmpId() {
return tmpId;
}
@ -57,16 +59,22 @@ public class TrailHero extends MongoBase {
return godSoulLv;
}
public int getPropertyId() {
return propertyId;
}
public TrailHero(){
}
public TrailHero(int tmpId, Map<Integer, Long> property, int star, String heroSkills, int level,int godSoulLv) {
public TrailHero(int tmpId, Map<Integer, Long> property, int star, String heroSkills, int level,int godSoulLv,int propertyId) {
this.tmpId = tmpId;
this.property = property;
this.star = star;
this.heroSkills = heroSkills;
this.level = level;
this.godSoulLv=godSoulLv;
this.propertyId=propertyId;
}
public int getSkinId() {

View File

@ -271,6 +271,7 @@ public class BehaviorUtil {
.setStar(hero.getStar())
.setSkinId(hero.getSkin())
.setGodSoulLv(hero.getGodSoulLv())
.setPropertyId(hero.getPropertyId())
.build();
heroFightInfos.add(heroFightInfo);
}

View File

@ -108,6 +108,7 @@ public class TowerMap extends AbstractMap {
.setSkinId(trailHero.getSkinId())
.setPosition(trailHero.getPosition())
.setGodSoulLv(trailHero.getGodSoulLv())
.setPropertyId(trailHero.getPropertyId())
.build();
mapEnterResponse.addInfos(info);
}

View File

@ -2008,7 +2008,7 @@ public class ActivityLogic implements IEventHandler{
*/
public int getActivityByTypeToFirst(User user, int type){
List<SGlobalActivity> activities = SGlobalActivity.getsGlobalActivityMapByType(type);
if (activities.isEmpty() || activities == null){
if (activities == null||activities.isEmpty()){
return 0;
}
Map<Integer, ActivityMission> map = user.getActivityManager().getActivityMissionMap();

View File

@ -23,7 +23,6 @@ public class Hero extends MongoBase implements Comparable<Hero>,Cloneable {
private int templateId; //模板ID
private int level;//等级
private int star;
@ -57,6 +56,8 @@ public class Hero extends MongoBase implements Comparable<Hero>,Cloneable {
private int godSoulLv;
private int propertyId;
//被神魂绑定英雄 英雄动态id:英雄神魂等级(反绑)
private Map<String,Integer>godSoulBeBindMap=new HashMap<>();
@ -71,6 +72,7 @@ public class Hero extends MongoBase implements Comparable<Hero>,Cloneable {
this.templateId = heroTid;
this.level = initStar;//
SCHero hero1 = SCHero.getsCHero().get(heroTid);
this.setPropertyId(hero1.getPropertyName());
int initCfgStar = hero1.getStar();
int maxStar = hero1.getMaxRank(); //最高星级
@ -110,6 +112,8 @@ public class Hero extends MongoBase implements Comparable<Hero>,Cloneable {
public Hero(Hero hero,int uid,int heroTid,int level) {
this.setRootCollection(User._COLLECTION_NAME);
this.id = KeyGenUtils.produceIdByModule(UUIDEnum.HERO, uid);
SCHero scHero = SCHero.getsCHero().get(heroTid);
this.setPropertyId(scHero.getPropertyName());
this.templateId = heroTid;
this.level = level;
this.star = HeroLogic.getInstance().calRobotStarByLevel(heroTid,level);
@ -132,6 +136,7 @@ public class Hero extends MongoBase implements Comparable<Hero>,Cloneable {
SCHero scHero = SCHero.getsCHero().get(heroTid);
this.templateId = scHero.getId();
this.setPropertyId(scHero.getPropertyName());
this.level = 1;
this.star = initStar;
this.equipByPositionMap = new HashMap<>();
@ -149,7 +154,6 @@ public class Hero extends MongoBase implements Comparable<Hero>,Cloneable {
lastUpdateEnergyTime = createTime;
breakId = 0;
jewelInfo = new HashSet<>(2);
}
//无尽使用固定配置英雄
@ -166,7 +170,7 @@ public class Hero extends MongoBase implements Comparable<Hero>,Cloneable {
this.star = propConfig.getStar();
this.starBreakId=propConfig.getHeroStarId() ;
this.breakId=propConfig.getRank();
this.breakId=propConfig.getRank();
this.especialEquipLevel = propConfig.getEquipTalismanaLevel();
soulEquipByPositionMap = new HashMap<>();
int[] equipSign = propConfig.getEquipSign();
@ -473,6 +477,14 @@ public class Hero extends MongoBase implements Comparable<Hero>,Cloneable {
return godSoulLv;
}
public int getPropertyId() {
return propertyId;
}
public void setPropertyId(int _propId) {
propertyId=_propId;
}
public Map<Integer,List<String>> getGodSoulBindMap() {
return godSoulBindMap;
}

View File

@ -15,6 +15,8 @@ public class TaSuiHero {
private int godSoulLv;
private int propertyId;
public int getTempId() {
return tempId;
}
@ -31,13 +33,18 @@ public class TaSuiHero {
return godSoulLv;
}
public int getPropertyId() {
return propertyId;
}
public TaSuiHero() {
}
public TaSuiHero(int tempId, int leve, int star, int godSoulLv) {
public TaSuiHero(int tempId, int leve, int star, int godSoulLv,int propertyId) {
this.tempId = tempId;
this.leve = leve;
this.star = star;
this.godSoulLv=godSoulLv;
this.propertyId=propertyId;
}
}

View File

@ -789,6 +789,7 @@ public class ExpeditionLogic {
.setSkinId(hero.getSkin())
.setForceScore(HeroLogic.getInstance().calTeamForce(user,teamId))
.setGodSoulLv(hero.getGodSoulLv())
.setPropertyId(hero.getPropertyId())
.build();
heroFightInfos.add(heroFightInfo);
}

View File

@ -336,6 +336,7 @@ public class FightUtil {
.setStar(trailHero.getStar())
.setSkinId(trailHero.getSkinId() == 0 ? 0 : (trailHero.getSkinTime() == -1 || trailHero.getSkinTime() > TimeUtils.nowInt() ? trailHero.getSkinId() : 0))
.setGodSoulLv(trailHero.getGodSoulLv())
.setPropertyId(trailHero.getPropertyId())
.build();
heroFightInfos.add(heroFightInfo);
}
@ -382,6 +383,7 @@ public class FightUtil {
.setPosition(teamPosHeroInfo.getPosition())
.setSkinId(hero.getSkin())
.setGodSoulLv(hero.getGodSoulLv())
.setPropertyId(hero.getPropertyId())
.build();
heroFightInfos.add(heroFightInfo);
}
@ -450,6 +452,7 @@ public class FightUtil {
.setPosition(teamPosHeroInfo.getPosition())
.setSkinId(hero.getSkin())
.setGodSoulLv(hero.getGodSoulLv())
.setPropertyId(hero.getPropertyId())
.build();
heroFightInfos.add(heroFightInfo);
}
@ -491,6 +494,7 @@ public class FightUtil {
.setSkinId(hero.getSkin())
.setStar(hero.getStar())
.setGodSoulLv(hero.getGodSoulLv())
.setPropertyId(hero.getPropertyId())
.build();
heroFightInfos.add(heroFightInfo);
}
@ -729,6 +733,7 @@ public class FightUtil {
.setStar(hero.getStar())
.setSkinId(hero.getSkin())
.setGodSoulLv((hero.getGodSoulLv()))
.setPropertyId(hero.getPropertyId())
.build();
heroFightInfos.add(heroFightInfo);
}
@ -770,6 +775,7 @@ public class FightUtil {
.setStar(hero.getStar())
.setSkinId(hero.getSkin())
.setGodSoulLv(hero.getGodSoulLv())
.setPropertyId(hero.getPropertyId())
.build();
heroFightInfos.add(heroFightInfo);
}

View File

@ -111,6 +111,7 @@ public class SevenWorldFightHandler implements IFightEventProcesor {
.setSkinId(hero.getSkin())
.setForceScore(HeroLogic.getInstance().calTeamForce(user,teamId))
.setGodSoulLv(hero.getGodSoulLv())
.setPropertyId(hero.getPropertyId())
.build();
heroFightInfos.add(heroFightInfo);
}

View File

@ -248,6 +248,7 @@ public class HardStageLogic {
.setSkinId(hero.getSkin())
.setForceScore(HeroLogic.getInstance().calTeamForce(user,teamId))
.setGodSoulLv(hero.getGodSoulLv())
.setPropertyId(hero.getPropertyId())
.build();
heroFightInfos.add(heroFightInfo);
}

View File

@ -30,6 +30,7 @@ import com.ljsd.jieling.logic.dao.*;
import com.ljsd.jieling.logic.dao.cross.CSPlayer;
import com.ljsd.jieling.logic.dao.root.User;
import com.ljsd.jieling.logic.expedition.ExpeditionLogic;
import com.ljsd.jieling.logic.family.GuildDef;
import com.ljsd.jieling.logic.fight.CombatLogic;
import com.ljsd.jieling.logic.fight.passiveSkillCal.PassiveskillCalEnum;
import com.ljsd.jieling.logic.help.HelpHero;
@ -1168,6 +1169,13 @@ public class HeroLogic {
public void saveTeamPos(ISession iSession, int teamId, List<CommonProto.TeamHeroInfo> heroIds) throws Exception {
User user = UserManager.getUser(iSession.getUid());
HeroManager heroManager = user.getHeroManager();
for (CommonProto.TeamHeroInfo teamHeroInfo : heroIds) {
Hero hero= heroManager.getHero(teamHeroInfo.getHeroId());
if (hero.getPropertyId()>4){
LOGGER.error("英雄{}未选择职业",hero.getTemplateId());
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
}
}
Set<Integer> set = new HashSet<>();
if (teamId == TeamEnum.EXPEDITION_TEAM.getTeamId()) {

View File

@ -585,6 +585,7 @@ public class PlayerLogic {
.setStar(hero.getStar())
.setPosition(entry.getKey())
.setGodSoulLv(hero.getGodSoulLv())
.setPropertyId(hero.getPropertyId())
.build();
teamInfo.addTeam(info);
}
@ -817,6 +818,7 @@ public class PlayerLogic {
.setPosition(heroInfo.getPosition())
.setSkinId(hero.getSkin())
.setGodSoulLv(hero.getGodSoulLv())
.setPropertyId(hero.getPropertyId())
.build());
}
}
@ -888,6 +890,7 @@ public class PlayerLogic {
.setPosition(heroInfo.getPosition())
.setSkinId(hero.getSkin())
.setGodSoulLv(hero.getGodSoulLv())
.setPropertyId(hero.getPropertyId())
.build());
}
}

View File

@ -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 = "2022-1-15")
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2022-3-18")
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");
@ -56,6 +56,7 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
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 org.apache.thrift.protocol.TField PROPERTY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("propertyId", org.apache.thrift.protocol.TType.I32, (short)19);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@ -81,6 +82,7 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
public Map<Integer,Map<Integer,Long>> attributeMapByTeam; // optional
public Map<Integer,Map<Integer,Long>> attributeMapByTeamBattle; // optional
public int godSoulLv; // optional
public int propertyId; // 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 {
@ -101,7 +103,8 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
ATTRIBUTE_MAP((short)15, "attributeMap"),
ATTRIBUTE_MAP_BY_TEAM((short)16, "attributeMapByTeam"),
ATTRIBUTE_MAP_BY_TEAM_BATTLE((short)17, "attributeMapByTeamBattle"),
GOD_SOUL_LV((short)18, "godSoulLv");
GOD_SOUL_LV((short)18, "godSoulLv"),
PROPERTY_ID((short)19, "propertyId");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@ -152,6 +155,8 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
return ATTRIBUTE_MAP_BY_TEAM_BATTLE;
case 18: // GOD_SOUL_LV
return GOD_SOUL_LV;
case 19: // PROPERTY_ID
return PROPERTY_ID;
default:
return null;
}
@ -203,8 +208,9 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
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 static final int __PROPERTYID_ISSET_ID = 11;
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,_Fields.GOD_SOUL_LV};
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,_Fields.PROPERTY_ID};
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);
@ -259,6 +265,8 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
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)));
tmpMap.put(_Fields.PROPERTY_ID, new org.apache.thrift.meta_data.FieldMetaData("propertyId", 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);
}
@ -331,6 +339,7 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
this.attributeMapByTeamBattle = __this__attributeMapByTeamBattle;
}
this.godSoulLv = other.godSoulLv;
this.propertyId = other.propertyId;
}
public ArenaOfHero deepCopy() {
@ -368,6 +377,8 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
this.attributeMapByTeamBattle = null;
setGodSoulLvIsSet(false);
this.godSoulLv = 0;
setPropertyIdIsSet(false);
this.propertyId = 0;
}
public String getId() {
@ -861,6 +872,29 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GODSOULLV_ISSET_ID, value);
}
public int getPropertyId() {
return this.propertyId;
}
public ArenaOfHero setPropertyId(int propertyId) {
this.propertyId = propertyId;
setPropertyIdIsSet(true);
return this;
}
public void unsetPropertyId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PROPERTYID_ISSET_ID);
}
/** Returns true if field propertyId is set (has been assigned a value) and false otherwise */
public boolean isSetPropertyId() {
return EncodingUtils.testBit(__isset_bitfield, __PROPERTYID_ISSET_ID);
}
public void setPropertyIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PROPERTYID_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case ID:
@ -1007,6 +1041,14 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
}
break;
case PROPERTY_ID:
if (value == null) {
unsetPropertyId();
} else {
setPropertyId((Integer)value);
}
break;
}
}
@ -1066,6 +1108,9 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
case GOD_SOUL_LV:
return Integer.valueOf(getGodSoulLv());
case PROPERTY_ID:
return Integer.valueOf(getPropertyId());
}
throw new IllegalStateException();
}
@ -1113,6 +1158,8 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
return isSetAttributeMapByTeamBattle();
case GOD_SOUL_LV:
return isSetGodSoulLv();
case PROPERTY_ID:
return isSetPropertyId();
}
throw new IllegalStateException();
}
@ -1292,6 +1339,15 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
return false;
}
boolean this_present_propertyId = true && this.isSetPropertyId();
boolean that_present_propertyId = true && that.isSetPropertyId();
if (this_present_propertyId || that_present_propertyId) {
if (!(this_present_propertyId && that_present_propertyId))
return false;
if (this.propertyId != that.propertyId)
return false;
}
return true;
}
@ -1389,6 +1445,11 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
if (present_godSoulLv)
list.add(godSoulLv);
boolean present_propertyId = true && (isSetPropertyId());
list.add(present_propertyId);
if (present_propertyId)
list.add(propertyId);
return list.hashCode();
}
@ -1580,6 +1641,16 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetPropertyId()).compareTo(other.isSetPropertyId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPropertyId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.propertyId, other.propertyId);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@ -1735,6 +1806,12 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
sb.append(this.godSoulLv);
first = false;
}
if (isSetPropertyId()) {
if (!first) sb.append(", ");
sb.append("propertyId:");
sb.append(this.propertyId);
first = false;
}
sb.append(")");
return sb.toString();
}
@ -2018,6 +2095,14 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 19: // PROPERTY_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.propertyId = iprot.readI32();
struct.setPropertyIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@ -2200,6 +2285,11 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
oprot.writeI32(struct.godSoulLv);
oprot.writeFieldEnd();
}
if (struct.isSetPropertyId()) {
oprot.writeFieldBegin(PROPERTY_ID_FIELD_DESC);
oprot.writeI32(struct.propertyId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@ -2272,7 +2362,10 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
if (struct.isSetGodSoulLv()) {
optionals.set(17);
}
oprot.writeBitSet(optionals, 18);
if (struct.isSetPropertyId()) {
optionals.set(18);
}
oprot.writeBitSet(optionals, 19);
if (struct.isSetId()) {
oprot.writeString(struct.id);
}
@ -2382,12 +2475,15 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
if (struct.isSetGodSoulLv()) {
oprot.writeI32(struct.godSoulLv);
}
if (struct.isSetPropertyId()) {
oprot.writeI32(struct.propertyId);
}
}
@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(18);
BitSet incoming = iprot.readBitSet(19);
if (incoming.get(0)) {
struct.id = iprot.readString();
struct.setIdIsSet(true);
@ -2546,6 +2642,10 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
struct.godSoulLv = iprot.readI32();
struct.setGodSoulLvIsSet(true);
}
if (incoming.get(18)) {
struct.propertyId = iprot.readI32();
struct.setPropertyIdIsSet(true);
}
}
}

View File

@ -411,6 +411,7 @@ public class CBean2Proto {
.setChangeId(hero.getChangeId())
.setSkinId(hero.getSkin())
.setGodSoulLv(hero.getGodSoulLv())
.setPropertyId(hero.getPropertyId())
.build();
}
@ -452,6 +453,7 @@ public class CBean2Proto {
.setSkinId(hero.getSkin())
.addAllGodSoulList(godSoulList)
.setGodSoulLv(hero.getGodSoulLv())
.setPropertyId(hero.getPropertyId())
.build();
}

View File

@ -45,6 +45,7 @@ struct ArenaOfHero {
16:optional map<i32,map<i32,i64>> attributeMapByTeam ;
17:optional map<i32,map<i32,i64>> attributeMapByTeamBattle ;
18:optional i32 godSoulLv;//
19:optional i32 propertyId;//id
}
struct PropertyItem {

View File

@ -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 = "2022-1-15")
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2022-3-18")
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");
@ -56,6 +56,7 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
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 org.apache.thrift.protocol.TField PROPERTY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("propertyId", org.apache.thrift.protocol.TType.I32, (short)19);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@ -81,6 +82,7 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
public Map<Integer,Map<Integer,Long>> attributeMapByTeam; // optional
public Map<Integer,Map<Integer,Long>> attributeMapByTeamBattle; // optional
public int godSoulLv; // optional
public int propertyId; // 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 {
@ -101,7 +103,8 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
ATTRIBUTE_MAP((short)15, "attributeMap"),
ATTRIBUTE_MAP_BY_TEAM((short)16, "attributeMapByTeam"),
ATTRIBUTE_MAP_BY_TEAM_BATTLE((short)17, "attributeMapByTeamBattle"),
GOD_SOUL_LV((short)18, "godSoulLv");
GOD_SOUL_LV((short)18, "godSoulLv"),
PROPERTY_ID((short)19, "propertyId");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@ -152,6 +155,8 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
return ATTRIBUTE_MAP_BY_TEAM_BATTLE;
case 18: // GOD_SOUL_LV
return GOD_SOUL_LV;
case 19: // PROPERTY_ID
return PROPERTY_ID;
default:
return null;
}
@ -203,8 +208,9 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
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 static final int __PROPERTYID_ISSET_ID = 11;
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,_Fields.GOD_SOUL_LV};
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,_Fields.PROPERTY_ID};
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);
@ -259,6 +265,8 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
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)));
tmpMap.put(_Fields.PROPERTY_ID, new org.apache.thrift.meta_data.FieldMetaData("propertyId", 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);
}
@ -331,6 +339,7 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
this.attributeMapByTeamBattle = __this__attributeMapByTeamBattle;
}
this.godSoulLv = other.godSoulLv;
this.propertyId = other.propertyId;
}
public ArenaOfHero deepCopy() {
@ -368,6 +377,8 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
this.attributeMapByTeamBattle = null;
setGodSoulLvIsSet(false);
this.godSoulLv = 0;
setPropertyIdIsSet(false);
this.propertyId = 0;
}
public String getId() {
@ -861,6 +872,29 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GODSOULLV_ISSET_ID, value);
}
public int getPropertyId() {
return this.propertyId;
}
public ArenaOfHero setPropertyId(int propertyId) {
this.propertyId = propertyId;
setPropertyIdIsSet(true);
return this;
}
public void unsetPropertyId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PROPERTYID_ISSET_ID);
}
/** Returns true if field propertyId is set (has been assigned a value) and false otherwise */
public boolean isSetPropertyId() {
return EncodingUtils.testBit(__isset_bitfield, __PROPERTYID_ISSET_ID);
}
public void setPropertyIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PROPERTYID_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case ID:
@ -1007,6 +1041,14 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
}
break;
case PROPERTY_ID:
if (value == null) {
unsetPropertyId();
} else {
setPropertyId((Integer)value);
}
break;
}
}
@ -1066,6 +1108,9 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
case GOD_SOUL_LV:
return Integer.valueOf(getGodSoulLv());
case PROPERTY_ID:
return Integer.valueOf(getPropertyId());
}
throw new IllegalStateException();
}
@ -1113,6 +1158,8 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
return isSetAttributeMapByTeamBattle();
case GOD_SOUL_LV:
return isSetGodSoulLv();
case PROPERTY_ID:
return isSetPropertyId();
}
throw new IllegalStateException();
}
@ -1292,6 +1339,15 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
return false;
}
boolean this_present_propertyId = true && this.isSetPropertyId();
boolean that_present_propertyId = true && that.isSetPropertyId();
if (this_present_propertyId || that_present_propertyId) {
if (!(this_present_propertyId && that_present_propertyId))
return false;
if (this.propertyId != that.propertyId)
return false;
}
return true;
}
@ -1389,6 +1445,11 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
if (present_godSoulLv)
list.add(godSoulLv);
boolean present_propertyId = true && (isSetPropertyId());
list.add(present_propertyId);
if (present_propertyId)
list.add(propertyId);
return list.hashCode();
}
@ -1580,6 +1641,16 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetPropertyId()).compareTo(other.isSetPropertyId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPropertyId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.propertyId, other.propertyId);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@ -1735,6 +1806,12 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
sb.append(this.godSoulLv);
first = false;
}
if (isSetPropertyId()) {
if (!first) sb.append(", ");
sb.append("propertyId:");
sb.append(this.propertyId);
first = false;
}
sb.append(")");
return sb.toString();
}
@ -2018,6 +2095,14 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 19: // PROPERTY_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.propertyId = iprot.readI32();
struct.setPropertyIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@ -2200,6 +2285,11 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
oprot.writeI32(struct.godSoulLv);
oprot.writeFieldEnd();
}
if (struct.isSetPropertyId()) {
oprot.writeFieldBegin(PROPERTY_ID_FIELD_DESC);
oprot.writeI32(struct.propertyId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@ -2272,7 +2362,10 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
if (struct.isSetGodSoulLv()) {
optionals.set(17);
}
oprot.writeBitSet(optionals, 18);
if (struct.isSetPropertyId()) {
optionals.set(18);
}
oprot.writeBitSet(optionals, 19);
if (struct.isSetId()) {
oprot.writeString(struct.id);
}
@ -2382,12 +2475,15 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
if (struct.isSetGodSoulLv()) {
oprot.writeI32(struct.godSoulLv);
}
if (struct.isSetPropertyId()) {
oprot.writeI32(struct.propertyId);
}
}
@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(18);
BitSet incoming = iprot.readBitSet(19);
if (incoming.get(0)) {
struct.id = iprot.readString();
struct.setIdIsSet(true);
@ -2546,6 +2642,10 @@ public class ArenaOfHero implements org.apache.thrift.TBase<ArenaOfHero, ArenaOf
struct.godSoulLv = iprot.readI32();
struct.setGodSoulLvIsSet(true);
}
if (incoming.get(18)) {
struct.propertyId = iprot.readI32();
struct.setPropertyIdIsSet(true);
}
}
}

View File

@ -129,6 +129,7 @@ public class SSpecialConfig implements BaseConfig {
public static final String ChangeGodHeroContentParm = "ChangeGodHeroContentParm";//英雄飞升星级 12以上
public static final String EXPLORERE_LIVETIME = "ExploreReliveTime";//探索时我方阵亡后复活时长
public static final String BUILDING_TIME_REDUCE = "BuildingTimeReduce";//浮生特权每日每次减少建筑升级时间:秒
public static final String CHANGE_CAMP_COST = "ChangeCampCost";//神转换阵营消耗
@Override
public void init() throws Exception {