鸿蒙阵
parent
0ad0e87617
commit
c1bc98d972
|
@ -20,6 +20,7 @@ import com.ljsd.jieling.logic.activity.event.UserOnlineEvent;
|
|||
import com.ljsd.jieling.logic.dao.*;
|
||||
import com.ljsd.jieling.logic.dao.root.GlobalSystemControl;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.hero.HeroLogic;
|
||||
import com.ljsd.jieling.logic.hero.HongMengAttributeEnum;
|
||||
import com.ljsd.jieling.logic.mission.GameEvent;
|
||||
import com.ljsd.jieling.logic.player.PlayerLogic;
|
||||
|
@ -168,7 +169,7 @@ public class GetPlayerInfoHandler extends BaseHandler{
|
|||
remove.removeAll(user.getItemManager().getItemMap().keySet());
|
||||
remove.forEach(n->{
|
||||
try {
|
||||
System.out.println("n = " + n);
|
||||
LOGGER.info("GET_PLAYERINFO_REQUEST uid n = {}", userId, n);
|
||||
user.getItemManager().newItem(n, 0);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
|
@ -189,6 +190,9 @@ public class GetPlayerInfoHandler extends BaseHandler{
|
|||
user.getPlayerInfoManager().getMonthCard().put(Global.LMONTHCARDID, (int) (System.currentTimeMillis() / 1000));
|
||||
Poster.getPoster().dispatchEvent(new NewWelfareEvent(user, NewWelfareTypeEnum.RECHARGE_BUY.getType(),Global.LMONTHCARDID));
|
||||
}
|
||||
// 刷新鸿蒙阵
|
||||
// HeroLogic.getInstance().addOrUpdateHongmeng(user);
|
||||
// 组装鸿蒙阵信息
|
||||
List<PlayerInfoProto.HongmengHeroInfo> hongmengHeroInfos = new ArrayList<>();
|
||||
Map<Integer, String> resonances = heroManager.getResonances();
|
||||
Map<Integer, Long> resonancesTime = heroManager.getResonancesTime();
|
||||
|
|
|
@ -3416,11 +3416,11 @@ public class HeroLogic{
|
|||
Collections.sort(heroes, new Comparator<Hero>() {
|
||||
@Override
|
||||
public int compare(Hero hero1, Hero hero2) {
|
||||
int compareValue = hero1.getLevel() - hero2.getLevel();
|
||||
int compareValue = hero2.getLevel() - hero1.getLevel();
|
||||
if (compareValue != 0) {
|
||||
return compareValue;
|
||||
}
|
||||
return Integer.compare(hero1.getStar(), hero2.getStar());
|
||||
return Integer.compare(hero2.getStar(), hero1.getStar());
|
||||
}
|
||||
});
|
||||
List<String> hongmengs = heroManager.getHongmengGuard();
|
||||
|
@ -3448,7 +3448,7 @@ public class HeroLogic{
|
|||
if (values2.contains(hero.getId())) {
|
||||
continue;
|
||||
}
|
||||
if (hero.getEquipByPositionMap().size() != 4) {
|
||||
if (hero.getEquipByPositionMap().size() != 4 && isUnloadEquip == 1) {
|
||||
isUnloadEquip = 0;
|
||||
}
|
||||
if (hero.getJewelInfo().isEmpty()) {
|
||||
|
@ -3522,7 +3522,7 @@ public class HeroLogic{
|
|||
LOGGER.info("openResonance uid=>{} has open=>{}", user.getId(), graidId);
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_DEFINE_SELF);
|
||||
}
|
||||
Hongmeng hongmeng = Hongmeng.hongmengs.get(graidId);
|
||||
SHongmeng hongmeng = SHongmeng.hongmengs.get(graidId);
|
||||
if (hongmeng == null) {
|
||||
LOGGER.info("openResonance uid=>{} graidId not exist=>{}", user.getId(), graidId);
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_DEFINE_SELF);
|
||||
|
@ -3668,7 +3668,7 @@ public class HeroLogic{
|
|||
throw new ErrorCodeException(ErrorCode.SERVER_DEFINE_SELF);
|
||||
}
|
||||
int nextLevel = heroManager.getHongmengTablet() + 1;
|
||||
HongmengUP hongmengUP = HongmengUP.hongmengUPLevels.get(nextLevel);
|
||||
SHongmengUP hongmengUP = SHongmengUP.hongmengUPLevels.get(nextLevel);
|
||||
if (hongmengUP == null) {
|
||||
LOGGER.info("updateHongmengTablet uid=>{} curLevel={} maxLevel =>{} nextLevel=>{}", user.getId(), heroManager.getHongmengTablet(), maxLevel, nextLevel);
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_DEFINE_SELF);
|
||||
|
|
|
@ -6,9 +6,9 @@ import manager.Table;
|
|||
import java.util.Map;
|
||||
|
||||
@Table(name = "Hongmeng")
|
||||
public class Hongmeng implements BaseConfig{
|
||||
public class SHongmeng implements BaseConfig{
|
||||
|
||||
public static Map<Integer, Hongmeng> hongmengs;
|
||||
public static Map<Integer, SHongmeng> hongmengs;
|
||||
|
||||
private int id;
|
||||
|
||||
|
@ -19,10 +19,10 @@ public class Hongmeng implements BaseConfig{
|
|||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
hongmengs = STableManager.getConfig(Hongmeng.class);
|
||||
hongmengs = STableManager.getConfig(SHongmeng.class);
|
||||
}
|
||||
|
||||
public Hongmeng getHongmengById(int id){
|
||||
public SHongmeng getHongmengById(int id){
|
||||
return hongmengs.get(id);
|
||||
}
|
||||
|
|
@ -7,11 +7,11 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
|
||||
@Table(name = "HongmengUP")
|
||||
public class HongmengUP implements BaseConfig{
|
||||
public class SHongmengUP implements BaseConfig{
|
||||
|
||||
public static Map<Integer, HongmengUP> hongmengUPs;
|
||||
public static Map<Integer, SHongmengUP> hongmengUPs;
|
||||
|
||||
public static Map<Integer, HongmengUP> hongmengUPLevels;
|
||||
public static Map<Integer, SHongmengUP> hongmengUPLevels;
|
||||
|
||||
private int id;
|
||||
|
||||
|
@ -22,9 +22,9 @@ public class HongmengUP implements BaseConfig{
|
|||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
hongmengUPs = STableManager.getConfig(HongmengUP.class);
|
||||
hongmengUPs = STableManager.getConfig(SHongmengUP.class);
|
||||
hongmengUPLevels = new HashMap<>();
|
||||
for (HongmengUP hongmengUP : hongmengUPs.values()) {
|
||||
for (SHongmengUP hongmengUP : hongmengUPs.values()) {
|
||||
hongmengUPLevels.put(hongmengUP.getHongmengLevel(), hongmengUP);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue