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