1、时空英雄
parent
db8974a8c8
commit
a06538a6ba
|
@ -336,7 +336,6 @@ public class CoreService implements RPCRequestIFace.Iface {
|
|||
}
|
||||
arenaOfHero.getAttributeMapByTeam().put(teamId,attributeShow);
|
||||
|
||||
|
||||
Map<Integer, Long> attributeBattle;
|
||||
attributeBattle = HeroLogic.getInstance().calHeroNotBufferAttribute(user, hero, false, teamId);
|
||||
if(arenaOfHero.getAttributeMapByTeamBattle() == null){
|
||||
|
|
|
@ -62,7 +62,6 @@ public class ItemStaticConfig extends AbstractClassStaticConfig {
|
|||
int type = v.getLocation();
|
||||
int race = v.getRace();
|
||||
if(type==1){
|
||||
|
||||
Map<Integer, Integer> orDefault = race2quality2soulid.getOrDefault(race, new HashMap<>());
|
||||
orDefault.putIfAbsent(v.getLevel(),k);
|
||||
race2quality2soulid.putIfAbsent(race,orDefault);
|
||||
|
|
|
@ -1158,16 +1158,16 @@ public class HeroLogic {
|
|||
User user = UserManager.getUser(iSession.getUid());
|
||||
HeroManager heroManager = user.getHeroManager();
|
||||
///避免玩家上阵神 魔职业英雄
|
||||
for (CommonProto.TeamHeroInfo teamHeroInfo : heroIds) {
|
||||
Hero hero = heroManager.getHero(teamHeroInfo.getHeroId());
|
||||
if (hero == null){
|
||||
continue;
|
||||
}
|
||||
if (hero.getPropertyId()>4){
|
||||
LOGGER.error("英雄{}未选择职业",hero.getTemplateId());
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
}
|
||||
// for (CommonProto.TeamHeroInfo teamHeroInfo : heroIds) {
|
||||
// Hero hero = heroManager.getHero(teamHeroInfo.getHeroId());
|
||||
// if (hero == null){
|
||||
// continue;
|
||||
// }
|
||||
// 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()) {
|
||||
|
@ -3689,6 +3689,14 @@ public class HeroLogic {
|
|||
MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.EQUIP_WEAR_RESPONSE_VALUE, null, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 装备魂灵宝
|
||||
* @param heroManager
|
||||
* @param hero
|
||||
* @param equipManager
|
||||
* @param equipId
|
||||
* @throws Exception
|
||||
*/
|
||||
private void wearJewel(HeroManager heroManager, Hero hero, EquipManager equipManager, String equipId) throws Exception {
|
||||
Jewel equip = (Jewel) equipManager.getEquipMap().get(equipId);
|
||||
|
||||
|
@ -5505,23 +5513,23 @@ public class HeroLogic {
|
|||
// 英雄装备
|
||||
Map<String, PropertyItem> equipMap = user.getEquipManager().getEquipMap();
|
||||
|
||||
if (guards.size() >= Integer.parseInt(openLevel[0])) {
|
||||
for (int i = 0; i < guards.size(); i++) {
|
||||
Hero hero = user.getHeroManager().getHero(guards.get(i + 1));
|
||||
if (hero == null) {
|
||||
// 找不到英雄,不存在这些共鸣属性
|
||||
hongMengAddAttributeEquip = new HongMengAddAttribute(0, defaultValue);
|
||||
soulEquip = new HongMengAddAttribute(0, defaultValue);
|
||||
spiritEquip = new HongMengAddAttribute(0, defaultValue);
|
||||
break;
|
||||
}
|
||||
// 装备
|
||||
hongmengEquip(hongMengAddAttributeEquip, hero);
|
||||
// 魂宝 灵宝
|
||||
soulOrSpirit(soulEquip, 1, equipMap, hero);
|
||||
soulOrSpirit(spiritEquip, 2, equipMap, hero);
|
||||
}
|
||||
}
|
||||
// if (guards.size() >= Integer.parseInt(openLevel[0])) {
|
||||
// for (int i = 0; i < guards.size(); i++) {
|
||||
// Hero hero = user.getHeroManager().getHero(guards.get(i + 1));
|
||||
// if (hero == null) {
|
||||
// // 找不到英雄,不存在这些共鸣属性
|
||||
// hongMengAddAttributeEquip = new HongMengAddAttribute(0, defaultValue);
|
||||
// soulEquip = new HongMengAddAttribute(0, defaultValue);
|
||||
// spiritEquip = new HongMengAddAttribute(0, defaultValue);
|
||||
// break;
|
||||
// }
|
||||
// // 装备
|
||||
// hongmengEquip(hongMengAddAttributeEquip, hero);
|
||||
// // 魂宝 灵宝
|
||||
// soulOrSpirit(soulEquip, 1, equipMap, hero);
|
||||
// soulOrSpirit(spiritEquip, 2, equipMap, hero);
|
||||
// }
|
||||
// }
|
||||
|
||||
/*** ============================= 计算共鸣信息 ==================================== **/
|
||||
Map<HongMengAttributeEnum, HongMengAddAttribute> resonanceAddition = heroManager.getResonanceAddition();
|
||||
|
@ -5529,18 +5537,18 @@ public class HeroLogic {
|
|||
if (resonanceLevel.value == defaultValue) {
|
||||
resonanceLevel.value = -1;
|
||||
}
|
||||
if (hongMengAddAttributeEquip.value == defaultValue) {
|
||||
hongMengAddAttributeEquip.value = -1;
|
||||
}
|
||||
if (soulEquip.value == defaultValue) {
|
||||
soulEquip.value = -1;
|
||||
}
|
||||
if (spiritEquip.value == defaultValue) {
|
||||
spiritEquip.value = -1;
|
||||
}
|
||||
if (especialEquipLevel.value == defaultValue) {
|
||||
especialEquipLevel.value = -1;
|
||||
}
|
||||
// if (hongMengAddAttributeEquip.value == defaultValue) {
|
||||
// hongMengAddAttributeEquip.value = -1;
|
||||
// }
|
||||
// if (soulEquip.value == defaultValue) {
|
||||
// soulEquip.value = -1;
|
||||
// }
|
||||
// if (spiritEquip.value == defaultValue) {
|
||||
// spiritEquip.value = -1;
|
||||
// }
|
||||
// if (especialEquipLevel.value == defaultValue) {
|
||||
// especialEquipLevel.value = -1;
|
||||
// }
|
||||
resonanceAddition.put(HongMengAttributeEnum.LEVEL, resonanceLevel);
|
||||
// resonanceAddition.put(HongMengAttributeEnum.EQUIP, hongMengAddAttributeEquip);
|
||||
// resonanceAddition.put(HongMengAttributeEnum.SOUL_EQUIP, soulEquip);
|
||||
|
|
|
@ -835,17 +835,17 @@ public class ItemLogic {
|
|||
/**
|
||||
* 获取 指定类型和属性的宝器
|
||||
*/
|
||||
public static TreeSet<String> getJewelEquip(User user, int type, int rance) {
|
||||
return user.getEquipManager().getEquipMap().entrySet().stream().filter(stringEquipEntry ->
|
||||
StringUtil.isEmpty(stringEquipEntry.getValue().getHeroId())
|
||||
).filter(stringPropertyItemEntry -> stringPropertyItemEntry.getValue() instanceof Jewel).filter(stringPropertyItemEntry -> {
|
||||
SJewelConfig config = STableManager.getConfig(SJewelConfig.class).get(stringPropertyItemEntry.getValue().getEquipId());
|
||||
if (config == null) {
|
||||
return false;
|
||||
}
|
||||
return config.getLocation() == type && config.getRace() == rance;
|
||||
}).map(Map.Entry::getKey).collect(Collectors.toCollection(TreeSet::new));
|
||||
}
|
||||
// public static TreeSet<String> getJewelEquip(User user, int type, int rance) {
|
||||
// return user.getEquipManager().getEquipMap().entrySet().stream().filter(stringEquipEntry ->
|
||||
// StringUtil.isEmpty(stringEquipEntry.getValue().getHeroId())
|
||||
// ).filter(stringPropertyItemEntry -> stringPropertyItemEntry.getValue() instanceof Jewel).filter(stringPropertyItemEntry -> {
|
||||
// SJewelConfig config = STableManager.getConfig(SJewelConfig.class).get(stringPropertyItemEntry.getValue().getEquipId());
|
||||
// if (config == null) {
|
||||
// return false;
|
||||
// }
|
||||
// return config.getLocation() == type && config.getRace() == rance;
|
||||
// }).map(Map.Entry::getKey).collect(Collectors.toCollection(TreeSet::new));
|
||||
// }
|
||||
|
||||
public static TreeSet<String> getJewelEquipWithLeve(User user, int type, int rance, int leve) {
|
||||
TreeSet<String> strings = new TreeSet<>();
|
||||
|
|
Loading…
Reference in New Issue