修行技能相关脚本修改提交
parent
5469ead809
commit
cd8777c449
|
@ -188,6 +188,10 @@ public class CoreService implements RPCRequestIFace.Iface {
|
|||
//坐骑技能
|
||||
rpcArenaManager.setSkill(Arrays.asList(user.getPlayerInfoManager().getUserMountValidTime().keySet().toArray(new Integer[0])));
|
||||
rpcArenaManager.setFourSpirit(user.getPlayerInfoManager().getFourChallengeTotal());
|
||||
///修行技能数据
|
||||
rpcArenaManager.setPracticeSkillMap(user.getHeroManager().getPracticeSkillMap());
|
||||
|
||||
rpcArenaManager.setMaxHistoryForce(user.getPlayerInfoManager().getMaxForce());
|
||||
return rpcArenaManager;
|
||||
}catch (Exception e){
|
||||
|
||||
|
|
|
@ -83,6 +83,7 @@ public class HeroLogic{
|
|||
private static Map<Integer, List<Integer>> transTemplateByHeroPropertyName = new HashMap<>();
|
||||
|
||||
private static List<Integer> pokemonTemplate = new ArrayList<>();
|
||||
|
||||
static {
|
||||
transTemplate.add(HeroAttributeEnum.CurHP.getPropertyId()); // 生命
|
||||
transTemplate.add(HeroAttributeEnum.Hp.getPropertyId()); // 最大生命
|
||||
|
@ -153,6 +154,7 @@ public class HeroLogic{
|
|||
pokemonTemplate.add(HeroAttributeEnum.TreatFacter.getPropertyId()); // 治疗加成系数
|
||||
pokemonTemplate.add(HeroAttributeEnum.CureFacter.getPropertyId()); // 受治疗
|
||||
}
|
||||
|
||||
public static final String VERTICAL = "|";
|
||||
public static final String DIVISION = "#";
|
||||
|
||||
|
@ -161,6 +163,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 获取装备、法宝信息、魂印
|
||||
*
|
||||
* @param iSession
|
||||
* @param index
|
||||
* @param type
|
||||
|
@ -266,7 +269,6 @@ public class HeroLogic{
|
|||
}
|
||||
|
||||
|
||||
|
||||
public void random(ISession session, int type) throws Exception {
|
||||
long time = System.currentTimeMillis();
|
||||
int uid = session.getUid();
|
||||
|
@ -412,6 +414,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 英雄卡池抽卡封装
|
||||
*
|
||||
* @param user
|
||||
* @param sLotteryRewardConfig
|
||||
* @param sLotterySetting
|
||||
|
@ -482,6 +485,7 @@ public class HeroLogic{
|
|||
|
||||
return activity.getType() == ActivityType.BEAUTY_BAG;
|
||||
}
|
||||
|
||||
private boolean isActivityByIdAndType(int activityId, int activityType) {
|
||||
SGlobalActivity activity = SGlobalActivity.getsGlobalActivityMap().get(activityId);
|
||||
if (activity == null) {
|
||||
|
@ -493,6 +497,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 心愿抽卡校验
|
||||
*
|
||||
* @param user
|
||||
* @param item
|
||||
* @return
|
||||
|
@ -581,6 +586,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 推送心愿格子信息到客户端
|
||||
*
|
||||
* @param user
|
||||
*/
|
||||
private void sendWishCardIndication(User user) {
|
||||
|
@ -603,6 +609,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 修改英雄格子
|
||||
*
|
||||
* @param user
|
||||
* @param list
|
||||
* @throws ErrorCodeException
|
||||
|
@ -655,6 +662,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 获取可以加入
|
||||
*
|
||||
* @param user
|
||||
* @return
|
||||
*/
|
||||
|
@ -684,6 +692,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 从抽卡获取服务器开服时间
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public int getServerOpenTimeByWishCard() {
|
||||
|
@ -728,6 +737,7 @@ public class HeroLogic{
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void reportRandom(User user, SLotterySetting sLotterySetting, int[][] resultRandom, int[] costItem) {
|
||||
int lotteryType = sLotterySetting.getLotteryType();
|
||||
ReportEventEnum eventEnum = null;
|
||||
|
@ -805,8 +815,10 @@ public class HeroLogic{
|
|||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改魂印格子
|
||||
*
|
||||
* @param user
|
||||
* @param list
|
||||
* @throws ErrorCodeException
|
||||
|
@ -841,6 +853,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 每次抽取
|
||||
*
|
||||
* @param user
|
||||
* @param type
|
||||
* @return
|
||||
|
@ -1027,7 +1040,6 @@ public class HeroLogic{
|
|||
// }
|
||||
|
||||
|
||||
|
||||
public static SLotteryRewardConfig randomHeroByPoolId(int poolId, User user) {
|
||||
List<SLotteryRewardConfig> sLotteryRewardConfigs = new ArrayList<>();
|
||||
List<SLotteryRewardConfig> sLotteryRewardConfigListByPoolId = SLotteryRewardConfig.getSLotteryRewardConfigListByPoolId(poolId);
|
||||
|
@ -1383,6 +1395,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 妖灵师进阶 升星==进阶==觉醒
|
||||
*
|
||||
* @param session
|
||||
* @param heroId
|
||||
* @param consumeMaterialsList
|
||||
|
@ -1583,6 +1596,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 升星验证同系道具
|
||||
*
|
||||
* @param type
|
||||
* @param itemCamp
|
||||
* @param itemId
|
||||
|
@ -1695,6 +1709,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 根据英雄等级计算出starBreaklId
|
||||
*
|
||||
* @param heroTid
|
||||
* @param heroLevel
|
||||
* @return
|
||||
|
@ -1728,6 +1743,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 根据英雄等级计算出BreaklId
|
||||
*
|
||||
* @param heroTid
|
||||
* @param heroLevel
|
||||
* @return
|
||||
|
@ -1751,6 +1767,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 根据等级计算英雄星级
|
||||
*
|
||||
* @param heroTid
|
||||
* @param heroLevel
|
||||
* @return
|
||||
|
@ -2062,6 +2079,7 @@ public class HeroLogic{
|
|||
|
||||
return sb;
|
||||
}
|
||||
|
||||
public StringBuilder getCrossHeroSkillStr(CrossArenaManager crossArenaManager, com.ljsd.jieling.thrift.idl.ArenaOfHero hero) {
|
||||
|
||||
List<Integer> skillList = new ArrayList<>();
|
||||
|
@ -2181,6 +2199,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 获取紫府神印技能
|
||||
*
|
||||
* @param sealId
|
||||
* @param tempHero
|
||||
* @param skillList
|
||||
|
@ -2351,6 +2370,32 @@ public class HeroLogic{
|
|||
return sb;
|
||||
}
|
||||
|
||||
///获取修行技能数据
|
||||
public void getPracticeSkill(List<CommonProto.FightUnitInfo> infoList, Map<Integer, Integer> practiceSkillMap,long maxForce) {
|
||||
if (practiceSkillMap.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
StringBuilder skillStr = new StringBuilder();
|
||||
for (Map.Entry<Integer, Integer> entry : practiceSkillMap.entrySet()) {
|
||||
int skillId = SPlayerSkill.GetSPlayerSkill(entry.getKey(), entry.getValue()).getId();
|
||||
if (skillStr.toString().isEmpty()) {
|
||||
skillStr.append(skillId);
|
||||
} else {
|
||||
skillStr.append("#").append(skillId);
|
||||
}
|
||||
}
|
||||
CommonProto.FightUnitInfo skillInfo = CommonProto.FightUnitInfo
|
||||
.newBuilder()
|
||||
.setUnitId("0")
|
||||
.setUnitSkillIds(skillStr.toString())
|
||||
.setProperty("0")
|
||||
.setPosition(100)
|
||||
.setSkinId(0)
|
||||
.setForceScore(maxForce)
|
||||
.build();
|
||||
infoList.add(skillInfo);
|
||||
}
|
||||
|
||||
public List<CommonProto.FightUnitInfo> getPokemonSkills(User user) {
|
||||
//todo 灵兽
|
||||
Map<Integer, String> pokemonTeamMap = user.getPokemonManager().getPokemonTeamMap();
|
||||
|
@ -2386,24 +2431,7 @@ public class HeroLogic{
|
|||
.build();
|
||||
pokemonInfos.add(info);
|
||||
}
|
||||
String skillStr="";
|
||||
for (Map.Entry<Integer, Integer> entry : user.getHeroManager().getPracticeSkillMap().entrySet()) {
|
||||
int skillId=SPlayerSkill.GetSPlayerSkill(entry.getKey(),entry.getValue()).getId();
|
||||
if (skillStr.isEmpty()){
|
||||
skillStr+= skillId;
|
||||
}else{
|
||||
skillStr+= "#"+skillId;
|
||||
}
|
||||
}
|
||||
CommonProto.FightUnitInfo skillInfo = CommonProto.FightUnitInfo
|
||||
.newBuilder()
|
||||
.setUnitId("0")
|
||||
.setUnitSkillIds(skillStr)
|
||||
.setProperty("0")
|
||||
.setPosition(100)
|
||||
.setSkinId(0)
|
||||
.build();
|
||||
pokemonInfos.add(skillInfo);
|
||||
getPracticeSkill(pokemonInfos, user.getHeroManager().getPracticeSkillMap(),user.getPlayerInfoManager().getMaxForce());
|
||||
return pokemonInfos;
|
||||
}
|
||||
|
||||
|
@ -2427,6 +2455,7 @@ public class HeroLogic{
|
|||
.setUnitId(String.valueOf(pokemon.getTmpId())).setUnitSkillIds(String.valueOf(sSpiritAnimalSkill.getId())).build();
|
||||
pokemonInfos.add(info);
|
||||
}
|
||||
|
||||
return pokemonInfos;
|
||||
}
|
||||
|
||||
|
@ -2458,6 +2487,7 @@ public class HeroLogic{
|
|||
.setUnitId(String.valueOf(pokemon.getTmpId())).setUnitSkillIds(String.valueOf(sSpiritAnimalSkill.getId())).build();
|
||||
pokemonInfos.add(info);
|
||||
}
|
||||
getPracticeSkill(pokemonInfos,crossArenaManager.getPracticeSkillMap(),crossArenaManager.getMaxHistoryForce());
|
||||
return pokemonInfos;
|
||||
}
|
||||
|
||||
|
@ -2490,6 +2520,7 @@ public class HeroLogic{
|
|||
.setUnitId(String.valueOf(pokemon.getTmpId())).setUnitSkillIds(String.valueOf(sSpiritAnimalSkill.getId())).build();
|
||||
pokemonInfos.add(info);
|
||||
}
|
||||
getPracticeSkill(pokemonInfos,user.getHeroManager().getPracticeSkillMap(),user.getPlayerInfoManager().getMaxForce());
|
||||
return pokemonInfos;
|
||||
}
|
||||
|
||||
|
@ -2560,6 +2591,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 计算队伍战力
|
||||
*
|
||||
* @param user
|
||||
* @param hero
|
||||
* @param isForce
|
||||
|
@ -2999,6 +3031,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 计算机器人英雄熟悉
|
||||
*
|
||||
* @param scHero
|
||||
* @param heroLevel
|
||||
* @param heroBrekId 调用方法calRobotHeroAllAttribute未使用该参数,所以可以传0
|
||||
|
@ -3106,7 +3139,6 @@ public class HeroLogic{
|
|||
}
|
||||
|
||||
|
||||
|
||||
//获取英雄所有属性
|
||||
public Map<Integer, Long> calHeroFinalAttributeWhenInMap(User user, Hero hero, boolean isForce, int teamId) {
|
||||
Map<Integer, Long> heroAllAttribute = user.getMapManager().getHeroAllAttributeByHeroId(hero.getId());
|
||||
|
@ -3238,6 +3270,7 @@ public class HeroLogic{
|
|||
// LOGGER.info("the propertyId={} the propertyValue is ={},",propertyId,propertyValue);
|
||||
}
|
||||
}
|
||||
|
||||
public void combinedAttribute(int[][] otherAttriMap, Map<Integer, Long> heroAttributeMap) {
|
||||
for (int[] item : otherAttriMap) {
|
||||
int propertyId = item[0];
|
||||
|
@ -3280,7 +3313,6 @@ public class HeroLogic{
|
|||
}
|
||||
|
||||
|
||||
|
||||
// equip TODO 装备会导致英雄属性发生变化
|
||||
public void wearEquipOpt(ISession session, String heroId, List<String> equipIds, int type) throws Exception {
|
||||
int uid = session.getUid();
|
||||
|
@ -3366,6 +3398,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 脱装备
|
||||
*
|
||||
* @param session
|
||||
* @param heroId
|
||||
* @param equipIds
|
||||
|
@ -3428,6 +3461,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 英雄,灵兽合成
|
||||
*
|
||||
* @param iSession
|
||||
* @param item
|
||||
*/
|
||||
|
@ -3498,12 +3532,11 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 计算队伍战力
|
||||
*
|
||||
* @param targetUser
|
||||
* @param teamId
|
||||
* @param isMyself
|
||||
* @return
|
||||
*
|
||||
* // TODO isMyself ???
|
||||
* @return // TODO isMyself ???
|
||||
*/
|
||||
public int calTeamTotalForce(User targetUser, int teamId, boolean isMyself) {
|
||||
int totalForce = 0;
|
||||
|
@ -3543,6 +3576,7 @@ public class HeroLogic{
|
|||
|
||||
return totalForce;
|
||||
}
|
||||
|
||||
public int calRobotTotalForce(SArenaRobotConfig sArenaRobotConfig) {
|
||||
int totalForce = 0;
|
||||
List<Integer> heroList = sArenaRobotConfig.getHeroList();
|
||||
|
@ -3556,6 +3590,7 @@ public class HeroLogic{
|
|||
}
|
||||
return totalForce;
|
||||
}
|
||||
|
||||
public int calRobotYxldTotalForce(SArenaRobotConfig sArenaRobotConfig) {
|
||||
int totalForce = 0;
|
||||
List<Integer> heroList = sArenaRobotConfig.getHeroList();
|
||||
|
@ -3647,7 +3682,8 @@ public class HeroLogic{
|
|||
}
|
||||
it.remove();
|
||||
needUpdate = true;
|
||||
};
|
||||
}
|
||||
;
|
||||
if (needUpdate) {
|
||||
user.getTeamPosManager().updateTeamPosByTeamId(entry.getKey(), value);
|
||||
}
|
||||
|
@ -3705,6 +3741,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 计算一个灵兽的属性
|
||||
*
|
||||
* @param pokemonManager
|
||||
* @return
|
||||
*/
|
||||
|
@ -3712,6 +3749,7 @@ public class HeroLogic{
|
|||
Pokemon pokemon = pokemonManager.getPokemonMap().get(pokemonId);
|
||||
return calOnePokemonAttribute(pokemon.getTmpId(), pokemon.getStar(), pokemon.getLevel());
|
||||
}
|
||||
|
||||
public Map<Integer, Integer> calOnePokemonAttribute(int tmpId, int star, int level) {
|
||||
Map<Integer, Integer> pokemonAttributeMap = new HashMap<>();
|
||||
Map<Integer, Integer> oneAttrMap = new HashMap<>();
|
||||
|
@ -3739,6 +3777,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 获取一个灵兽的属性字符串
|
||||
*
|
||||
* @param propertyMap
|
||||
* @param level
|
||||
* @return
|
||||
|
@ -3773,7 +3812,6 @@ public class HeroLogic{
|
|||
}
|
||||
|
||||
|
||||
|
||||
private void combinePokemonAttribute(Map<Integer, Integer> pokemonAttributeMap, Pokemon pokemon, boolean needExtra) {
|
||||
//todo 灵兽
|
||||
// Map<Integer, Integer> comonpentsLevelMap = pokemon.getComonpentsLevelMap();
|
||||
|
@ -3802,6 +3840,7 @@ public class HeroLogic{
|
|||
combinedAttribute(secondValueByIdMap, equipAttributeMap);
|
||||
return calForce(equipAttributeMap) + sEquipConfig.getScore();
|
||||
}
|
||||
|
||||
//获取天赋异妖信息
|
||||
public void getAllRingFire(ISession session) throws Exception {
|
||||
//todo 灵兽
|
||||
|
@ -3818,9 +3857,6 @@ public class HeroLogic{
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String getEcoForce11A(User user) {
|
||||
StringBuilder append = new StringBuilder().append("[");
|
||||
append.append(calAllPokenmonForce(user));
|
||||
|
@ -3856,6 +3892,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 神将归元
|
||||
*
|
||||
* @param session
|
||||
* @param heroId
|
||||
* @throws Exception
|
||||
|
@ -3915,6 +3952,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 法宝归元
|
||||
*
|
||||
* @param session
|
||||
* @param heroIdList
|
||||
* @throws Exception
|
||||
|
@ -3946,6 +3984,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 归元掉落
|
||||
*
|
||||
* @param user
|
||||
* @param heroIds
|
||||
* @param returnPercent
|
||||
|
@ -4029,7 +4068,6 @@ public class HeroLogic{
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* 魂印相关
|
||||
*/
|
||||
public void wearSoulEquip(ISession iSession, HeroInfoProto.OptHeroSoul optHeroSoul, HeroInfoProto.OptHeroSoul unload) throws Exception {
|
||||
|
@ -4265,8 +4303,10 @@ public class HeroLogic{
|
|||
}
|
||||
MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.GET_ALL_PROPERTY_INFO_RESPONSE_VALUE, builder.build(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 激活所有图鉴
|
||||
*
|
||||
* @param session
|
||||
* @param bookId
|
||||
* @param messageType
|
||||
|
@ -4363,8 +4403,10 @@ public class HeroLogic{
|
|||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有异妖
|
||||
*
|
||||
* @param iSession
|
||||
* @throws Exception
|
||||
*/
|
||||
|
@ -4413,6 +4455,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 保存异妖阵容
|
||||
*
|
||||
* @param session
|
||||
* @param teamPokemonInfos
|
||||
*/
|
||||
|
@ -4457,6 +4500,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 灵兽放生
|
||||
*
|
||||
* @param session
|
||||
* @param pokemonIds
|
||||
* @param pieceId
|
||||
|
@ -4536,6 +4580,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 等级和星级返还 不包括本体返还
|
||||
*
|
||||
* @param pokemon
|
||||
* @param returnMap
|
||||
* @throws ErrorCodeException
|
||||
|
@ -4570,6 +4615,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 灵兽升级
|
||||
*
|
||||
* @param session
|
||||
* @param pokemonId
|
||||
* @param level
|
||||
|
@ -4658,6 +4704,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 灵兽升星
|
||||
*
|
||||
* @param session
|
||||
* @param pokemonId
|
||||
* @param consumePokemonIdsList
|
||||
|
@ -4745,6 +4792,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 灵兽涅槃
|
||||
*
|
||||
* @param session
|
||||
* @param pokemonId
|
||||
* @param messageType
|
||||
|
@ -4791,9 +4839,9 @@ public class HeroLogic{
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取所有皮肤信息
|
||||
*
|
||||
* @param session
|
||||
* @param messageType
|
||||
*/
|
||||
|
@ -4821,6 +4869,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 更换皮肤
|
||||
*
|
||||
* @param session
|
||||
* @param messageType
|
||||
*/
|
||||
|
@ -4852,6 +4901,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 推送鸿蒙阵信息
|
||||
*
|
||||
* @param session
|
||||
* @throws Exception
|
||||
*/
|
||||
|
@ -4861,6 +4911,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 添加或更新鸿蒙守卫
|
||||
*
|
||||
* @param session
|
||||
* @param judge true:返回,false:推送
|
||||
*/
|
||||
|
@ -5079,6 +5130,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 鸿蒙阵对神将等级加成
|
||||
*
|
||||
* @param resonanceLevel
|
||||
* @param hero
|
||||
*/
|
||||
|
@ -5091,6 +5143,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 鸿蒙阵对法宝加成
|
||||
*
|
||||
* @param especialEquipLevel
|
||||
* @param hero
|
||||
*/
|
||||
|
@ -5118,6 +5171,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 鸿蒙阵对魂宝灵宝加成
|
||||
*
|
||||
* @param jewelEquip
|
||||
* @param type 1魂宝 2灵宝
|
||||
* @param equipMap
|
||||
|
@ -5149,6 +5203,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 没有宝物时初始化
|
||||
*
|
||||
* @param jewels
|
||||
*/
|
||||
private void notJewelInit(HongMengAddAttribute... jewels) {
|
||||
|
@ -5160,6 +5215,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 鸿蒙阵对装备加成
|
||||
*
|
||||
* @param hongMengAddAttributeEquip
|
||||
* @param hero
|
||||
*/
|
||||
|
@ -5186,6 +5242,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 开启共鸣区域格子
|
||||
*
|
||||
* @param session
|
||||
* @param messageType
|
||||
* @throws Exception
|
||||
|
@ -5230,6 +5287,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 共鸣
|
||||
*
|
||||
* @param session
|
||||
* @param messageType
|
||||
* @param heroId 需要共鸣的神将id
|
||||
|
@ -5288,6 +5346,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 卸下共鸣英雄
|
||||
*
|
||||
* @param session
|
||||
* @param messageType
|
||||
* @param index
|
||||
|
@ -5323,6 +5382,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 花费妖晶清除共鸣冷却时间
|
||||
*
|
||||
* @param session
|
||||
* @param messageType
|
||||
* @param index
|
||||
|
@ -5394,6 +5454,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 升级鸿蒙碑
|
||||
*
|
||||
* @param session
|
||||
* @param messageType
|
||||
* @throws Exception
|
||||
|
@ -5435,6 +5496,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 添加鸿蒙碑神将
|
||||
*
|
||||
* @param session
|
||||
* @param messageType
|
||||
* @param heroId 需要鸿蒙碑的神将id
|
||||
|
@ -5487,6 +5549,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 卸下鸿蒙碑英雄
|
||||
*
|
||||
* @param session
|
||||
* @param messageType
|
||||
* @param index
|
||||
|
@ -5531,6 +5594,7 @@ public class HeroLogic{
|
|||
* 判断功能是否允许使用
|
||||
* 1|2|3|4|5|6|7|8|9
|
||||
* 升级突破|升星觉醒|神将归元|恭送神将|被吞噬|法宝强化|法宝归元|强化宝物|神将置换
|
||||
*
|
||||
* @param uid
|
||||
* @param heroId
|
||||
* @param functionId
|
||||
|
@ -5582,6 +5646,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 获取指定英雄数量的平均等级
|
||||
*
|
||||
* @param user
|
||||
* @param averageNum
|
||||
* @return
|
||||
|
@ -5611,6 +5676,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 获取玩家最大等级的英雄
|
||||
*
|
||||
* @param user
|
||||
* @return
|
||||
*/
|
||||
|
@ -5669,6 +5735,7 @@ public class HeroLogic{
|
|||
|
||||
/**
|
||||
* 推送紫府神印消息
|
||||
*
|
||||
* @param uid
|
||||
* @throws Exception
|
||||
*/
|
||||
|
@ -5682,6 +5749,7 @@ public class HeroLogic{
|
|||
MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.PurpleMansionSealIndication_VALUE, build2, true);
|
||||
|
||||
}
|
||||
|
||||
///0点重置好感度赠送次数
|
||||
public void ResetLikableSendTime(User user, PlayerInfoProto.FivePlayerUpdateIndication.Builder fBuilder) {
|
||||
user.getHeroManager().UpdateLikableSendTime(0);
|
||||
|
|
|
@ -261,10 +261,46 @@ public class FightDataUtil {
|
|||
return teamSkill;
|
||||
}
|
||||
for (int i = 0; i < pokemonUnitList.size(); i++) {
|
||||
String skillId = pokemonUnitList.get(i).getUnitSkillIds();
|
||||
if(skillId.equals("0")){
|
||||
CommonProto.FightUnitInfo unitInfo=pokemonUnitList.get(i);
|
||||
String skillId = unitInfo.getUnitSkillIds();
|
||||
if(skillId.equals("0")||skillId==""){
|
||||
continue;
|
||||
}
|
||||
if (unitInfo.getPosition()==100){
|
||||
SPlayerSkill playerSkillConfig=STableManager.getConfig(SPlayerSkill.class).get(Integer.valueOf(skillId));
|
||||
LuaValue monster = new LuaTable();
|
||||
monster.set("id",0);
|
||||
monster.set("star",0);
|
||||
monster.set("teamDamage",unitInfo.getForceScore());
|
||||
monster.set("camp",camp);
|
||||
monster.set("position",unitInfo.getPosition());
|
||||
LuaValue skill= new LuaTable();
|
||||
int[] skillIDList = playerSkillConfig.getSkillIDList();
|
||||
for(int j = 0 ; j <skillIDList.length;j++){
|
||||
LuaValue oneSkill = new LuaTable();
|
||||
oneSkill.rawset("triggerId",playerSkillConfig.getReleasePoint()[j]);
|
||||
int[][] releaseLimit = playerSkillConfig.getReleaseLimit();
|
||||
LuaValue triggerCondition = new LuaTable();
|
||||
if(releaseLimit!=null&&releaseLimit.length>0&&releaseLimit[0].length>0){
|
||||
for(int l = 0 ; l<releaseLimit[j].length;l++){
|
||||
triggerCondition.rawset(l+1, LuaValue.valueOf(releaseLimit[j][l]));
|
||||
}
|
||||
}else{
|
||||
triggerCondition.rawset(1,LuaValue.valueOf(0));
|
||||
}
|
||||
oneSkill.set("effect",getSkill(String.valueOf(skillIDList[j]),0));
|
||||
oneSkill.set("triggerCondition",triggerCondition);
|
||||
|
||||
oneSkill.set("maxCount",playerSkillConfig.getWarEffectCount()[j]);
|
||||
|
||||
oneSkill.set("maxRoundCount",playerSkillConfig.getTurnEffectCount()[j]);
|
||||
|
||||
skill.rawset(j+1,oneSkill);
|
||||
}
|
||||
monster.set("property",getProperty(pokemonUnitList.get(i).getProperty()));
|
||||
monster.set("skill",skill);
|
||||
teamSkill.rawset(i+1,monster);
|
||||
}else{
|
||||
SSpiritAnimalSkill sSpiritAnimalSkill=STableManager.getConfig(SSpiritAnimalSkill.class).get(Integer.valueOf(skillId));
|
||||
LuaValue monster = new LuaTable();
|
||||
monster.set("id",sSpiritAnimalSkill.getSpiritAnimalMatch());
|
||||
|
@ -302,6 +338,7 @@ public class FightDataUtil {
|
|||
// }
|
||||
teamSkill.rawset(i+1,monster);
|
||||
}
|
||||
}
|
||||
return teamSkill;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,10 @@ public class SPlayerSkill implements BaseConfig {
|
|||
|
||||
private int sort;
|
||||
|
||||
private int[] warEffectCount;
|
||||
|
||||
private int[] turnEffectCount;
|
||||
|
||||
private static Map<Integer, Map<Integer,SPlayerSkill>>mapData;
|
||||
|
||||
public static Map<Integer,SPlayerSkill> sPrivilegeTypeConfigMap;
|
||||
|
@ -87,6 +91,14 @@ public class SPlayerSkill implements BaseConfig {
|
|||
return sort;
|
||||
}
|
||||
|
||||
public int[] getWarEffectCount() {
|
||||
return warEffectCount;
|
||||
}
|
||||
|
||||
public int[] getTurnEffectCount() {
|
||||
return turnEffectCount;
|
||||
}
|
||||
|
||||
public static SPlayerSkill GetSPlayerSkill(int skillId, int skillLv){
|
||||
if (!mapData.containsKey(skillId)||!mapData.get(skillId).containsKey(skillLv))return null;
|
||||
return mapData.get(skillId).get(skillLv);
|
||||
|
|
Loading…
Reference in New Issue