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