队伍战力存储到mongo
parent
37756ee26c
commit
9a8bfa15ed
|
@ -9,7 +9,7 @@ import com.ljsd.jieling.globals.Global;
|
|||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
import com.ljsd.jieling.logic.OnlineUserManager;
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
import com.ljsd.jieling.logic.activity.event.UserMainTeamForceEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.SaveHeroForceEvent;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.item.ItemLogic;
|
||||
|
@ -98,8 +98,8 @@ public class UpgradeGodTreeHandler extends BaseHandler<ActivityProto.UpgradeGodT
|
|||
}
|
||||
}
|
||||
|
||||
// 阵容战力改变
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(uid));
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),""));
|
||||
return ActivityProto.UpgradeGodTreeResponse.newBuilder().build();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,9 +5,7 @@ import com.ljsd.jieling.exception.ErrorCodeException;
|
|||
import com.ljsd.jieling.globals.BIReason;
|
||||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
import com.ljsd.jieling.logic.activity.event.UserMainTeamForceEvent;
|
||||
import com.ljsd.jieling.logic.dao.HeroManager;
|
||||
import com.ljsd.jieling.logic.dao.SixiangProfessionInfo;
|
||||
import com.ljsd.jieling.logic.activity.event.SaveHeroForceEvent;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.mission.GameEvent;
|
||||
|
@ -15,18 +13,13 @@ import com.ljsd.jieling.logic.mission.MissionType;
|
|||
import com.ljsd.jieling.network.session.ISession;
|
||||
import com.ljsd.jieling.util.ItemUtil;
|
||||
import com.ljsd.jieling.util.MessageUtil;
|
||||
import config.SFourQuadrantConfig;
|
||||
import config.STrump;
|
||||
import config.STrumpBook;
|
||||
import config.STrumpLevelupPool;
|
||||
import org.springframework.stereotype.Component;
|
||||
import rpc.protocols.CommonProto;
|
||||
import rpc.protocols.HeroInfoProto;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.*;
|
||||
|
||||
@Component
|
||||
public class FaBaoSoulUpLvRequestHandler extends BaseHandler<HeroInfoProto.FaBaoSoulUpLvRequest> {
|
||||
@Override
|
||||
|
@ -57,7 +50,8 @@ public class FaBaoSoulUpLvRequestHandler extends BaseHandler<HeroInfoProto.FaBao
|
|||
}
|
||||
user.getHeroManager().putFaBaoSoulMap(faBaoId,faBaoLv);
|
||||
this.updateFaBaoGongMingLv(user,trumpConfig.getBookId());
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(session.getUid()));
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),""));
|
||||
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.FA_BAO_SOUL_UPLV_RESPONSE_VALUE,null,true);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
package com.ljsd.jieling.handler.hero;
|
||||
|
||||
import com.ljsd.jieling.core.FunctionIdEnum;
|
||||
import com.ljsd.jieling.core.HandlerLogicThread;
|
||||
import com.ljsd.jieling.exception.ErrorCode;
|
||||
import com.ljsd.jieling.exception.ErrorCodeException;
|
||||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
import com.ljsd.jieling.logic.activity.event.UserMainTeamForceEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.SaveHeroForceEvent;
|
||||
import com.ljsd.jieling.logic.dao.Hero;
|
||||
import com.ljsd.jieling.logic.dao.HeroManager;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
|
@ -20,7 +21,7 @@ import org.springframework.stereotype.Component;
|
|||
import rpc.protocols.HeroInfoProto;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class HeroGodSoulBindRequestHandler extends BaseHandler<HeroInfoProto.HeroGodSoulBindRequest> {
|
||||
|
@ -71,7 +72,8 @@ public class HeroGodSoulBindRequestHandler extends BaseHandler<HeroInfoProto.Her
|
|||
Hero bindHero=heroManager.getHero(_bindHeroId);
|
||||
bindHero.setGodSoulBeBindMap(1,heroId,godSoulLv);
|
||||
}
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(session.getUid()));
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),heroId));
|
||||
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.HERO_GOD_SOUL_BIND_RESPONSE_VALUE, null,true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ import com.ljsd.jieling.exception.ErrorCodeException;
|
|||
import com.ljsd.jieling.globals.BIReason;
|
||||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
import com.ljsd.jieling.logic.activity.event.UserMainTeamForceEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.SaveHeroForceEvent;
|
||||
import com.ljsd.jieling.logic.dao.HeroManager;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
|
@ -86,7 +86,8 @@ public class LifeGridChangeRequestHandler extends BaseHandler<HeroInfoProto.Life
|
|||
.build();
|
||||
response=HeroInfoProto.LifeGridChangeResponse.newBuilder().setLifeGridInfo(lifeGridInfo).build();
|
||||
}
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(session.getUid()));
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),""));
|
||||
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.LIFE_GRID_CHANGE_RESPONSE_VALUE,response,true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import com.ljsd.jieling.exception.ErrorCodeException;
|
|||
import com.ljsd.jieling.globals.BIReason;
|
||||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
import com.ljsd.jieling.logic.activity.event.UserMainTeamForceEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.SaveHeroForceEvent;
|
||||
import com.ljsd.jieling.logic.dao.Item;
|
||||
import com.ljsd.jieling.logic.dao.ItemManager;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
|
@ -20,7 +20,9 @@ import rpc.protocols.CommonProto;
|
|||
import rpc.protocols.HeroInfoProto;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
/**
|
||||
* 命石合成协议
|
||||
|
@ -127,7 +129,8 @@ public class LifeStoneUpRequestHandler extends BaseHandler<HeroInfoProto.LifeSto
|
|||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, addItem, BIReason.LIFE_STONE_UP);
|
||||
response.setDrop(drop.build());
|
||||
}
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(session.getUid()));
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),""));
|
||||
MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.LIFE_STONE_UP_RESPONSE_VALUE, response.build(), true);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import com.ljsd.jieling.exception.ErrorCodeException;
|
|||
import com.ljsd.jieling.globals.BIReason;
|
||||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
import com.ljsd.jieling.logic.activity.event.UserMainTeamForceEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.SaveHeroForceEvent;
|
||||
import com.ljsd.jieling.logic.dao.SixiangProfessionInfo;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
|
@ -97,7 +97,8 @@ public class SixiangUpRequestHandler extends BaseHandler<HeroInfoProto.SixiangUp
|
|||
HeroInfoProto.SixiangUpResponse response=HeroInfoProto.SixiangUpResponse.newBuilder()
|
||||
.addAllInfoList(_list)
|
||||
.build();
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(session.getUid()));
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),""));
|
||||
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.SIXIANG_UP_RESPONSE_VALUE,response,true);
|
||||
}else{
|
||||
LOGGER.error("四象心法强化材料不足");
|
||||
|
|
|
@ -7,7 +7,7 @@ import com.ljsd.jieling.globals.BIReason;
|
|||
import com.ljsd.jieling.globals.Global;
|
||||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
import com.ljsd.jieling.logic.activity.event.UserMainTeamForceEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.SaveHeroForceEvent;
|
||||
import com.ljsd.jieling.logic.dao.SixiangProfessionInfo;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
|
@ -23,7 +23,10 @@ import rpc.protocols.CommonProto;
|
|||
import rpc.protocols.HeroInfoProto;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
public class SixiangUpStarRequestHandler extends BaseHandler<HeroInfoProto.SixiangUpRequest> {
|
||||
|
@ -64,7 +67,8 @@ public class SixiangUpStarRequestHandler extends BaseHandler<HeroInfoProto.Sixia
|
|||
String message = SErrorCodeEerverConfig.getI18NMessageNeedConvert("Sixiangjinjie_Hint",
|
||||
new Object[]{user.getPlayerInfoManager().getNameColor(), user.getPlayerInfoManager().getNickName(), GetProfessionName(professionId),professionInfo.level},
|
||||
new int[]{0,0,1});
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(session.getUid()));
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),""));
|
||||
ChatLogic.getInstance().sendSysChatMessage(message, Global.DILIGENT_NOTICE, "0", 0, 0, 0, 0, 1);
|
||||
}else {
|
||||
LOGGER.error("四象心法进阶材料不足");
|
||||
|
|
|
@ -6,7 +6,7 @@ import com.ljsd.jieling.globals.BIReason;
|
|||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
import com.ljsd.jieling.logic.activity.crossService.CrossServiceLogic;
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
import com.ljsd.jieling.logic.activity.event.UserMainTeamForceEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.SaveHeroForceEvent;
|
||||
import com.ljsd.jieling.logic.dao.PurpleMansionSeal;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
|
@ -93,7 +93,8 @@ public class UpPracticeLevelHandler extends BaseHandler<HeroInfoProto.UpPractice
|
|||
user.getHeroManager().setPracticeSkillMap(practiceSkillId,1);
|
||||
}
|
||||
}
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(iSession.getUid()));
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),""));
|
||||
// 升级返回
|
||||
HeroInfoProto.UpPracticeLevelResponse build = HeroInfoProto.UpPracticeLevelResponse.newBuilder().setPracticeLevel(xiuXian2.getId()).build();
|
||||
MessageUtil.sendMessage(iSession,1, MessageTypeProto.MessageType.UpPracticeLevelResponse_VALUE,build,true);
|
||||
|
|
|
@ -15,6 +15,7 @@ import com.ljsd.jieling.logic.activity.RemoveEventHeroHandler;
|
|||
import com.ljsd.jieling.logic.activity.UserLevelEventHandler;
|
||||
import com.ljsd.jieling.logic.activity.activityLogic.WeekCardLogic;
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
import com.ljsd.jieling.logic.activity.event.SaveHeroForceEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.SuperBoxEvent;
|
||||
import com.ljsd.jieling.logic.activity.eventhandler.*;
|
||||
import com.ljsd.jieling.logic.activity.fourChallenge.FourChallengeLogic;
|
||||
|
@ -310,8 +311,9 @@ public class GlobalDataManaager implements IManager {
|
|||
new ShanHeSheJiTuEventHandler();
|
||||
new SummonTreasureHandler();
|
||||
new ArchitectureUnLockHandler();
|
||||
new SaveHeroForceEvent();
|
||||
// 四灵试炼转移数据,只执行一次
|
||||
FourChallengeLogic.getInstance().redisToMongoDB();
|
||||
// FourChallengeLogic.getInstance().redisToMongoDB();
|
||||
ChampionshipLogic.minuteCheck(true);
|
||||
GuildFightLogic.minuteCheckForCarFight();
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -133,15 +133,15 @@ public class CrossServiceLogic {
|
|||
csPlayer.setGuildId(p.getGuildId());
|
||||
csPlayer.setCrossYxldMaxLevel(crossYxldMaxLevel);
|
||||
//玉虚三个队伍总战力
|
||||
int force1 = HeroLogic.getInstance().calTeamTotalForce(user, TeamEnum.CROSS_YU_XU_LUN_DAO_ONE.getTeamId(), false);
|
||||
int force2 = HeroLogic.getInstance().calTeamTotalForce(user, TeamEnum.CROSS_YU_XU_LUN_DAO_TWO.getTeamId(), false);
|
||||
int force3 = HeroLogic.getInstance().calTeamTotalForce(user, TeamEnum.CROSS_YU_XU_LUN_DAO_THREE.getTeamId(), false);
|
||||
int force1 = user.getTeamPosManager().getTeamForceMap().getOrDefault(TeamEnum.CROSS_YU_XU_LUN_DAO_ONE.getTeamId(),0L).intValue();
|
||||
int force2 = user.getTeamPosManager().getTeamForceMap().getOrDefault(TeamEnum.CROSS_YU_XU_LUN_DAO_TWO.getTeamId(),0L).intValue();
|
||||
int force3 = user.getTeamPosManager().getTeamForceMap().getOrDefault(TeamEnum.CROSS_YU_XU_LUN_DAO_THREE.getTeamId(),0L).intValue();
|
||||
csPlayer.setMaxFore(force1+force2+force3);
|
||||
// 主线编队战力
|
||||
int mainLine = HeroLogic.getInstance().calTeamTotalForce(user, TeamEnum.FORMATION_NORMAL.getTeamId(), false);
|
||||
int mainLine = user.getTeamPosManager().getTeamForceMap().getOrDefault(TeamEnum.FORMATION_NORMAL.getTeamId(),0L).intValue();
|
||||
csPlayer.setMainLineForce(mainLine);
|
||||
// 罗浮编队战力
|
||||
int luoFu = HeroLogic.getInstance().calTeamTotalForce(user, TeamEnum.FORMATION_NORMAL.getTeamId(), false);
|
||||
int luoFu = user.getTeamPosManager().getTeamForceMap().getOrDefault(TeamEnum.FORMATION_NORMAL.getTeamId(),0L).intValue();
|
||||
csPlayer.setLuoFuForce(luoFu);
|
||||
return csPlayer;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
package com.ljsd.jieling.logic.activity.event;
|
||||
|
||||
import com.ljsd.jieling.logic.activity.IEventHandler;
|
||||
import com.ljsd.jieling.logic.dao.TeamEnum;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.hero.HeroLogic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:英雄战力存储
|
||||
*
|
||||
* @author ascend
|
||||
* 2022/4/26 10:29:18
|
||||
*/
|
||||
public class SaveHeroForceEvent implements IEvent, IEventHandler {
|
||||
|
||||
private int uid;
|
||||
|
||||
private String heroId;
|
||||
|
||||
public SaveHeroForceEvent(int uid, String heroId) {
|
||||
this.uid = uid;
|
||||
this.heroId = heroId;
|
||||
}
|
||||
|
||||
public SaveHeroForceEvent() {
|
||||
Poster.getPoster().listenEvent(this, SaveHeroForceEvent.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEvent(IEvent event) throws Exception {
|
||||
if(!(event instanceof SaveHeroForceEvent)){
|
||||
return;
|
||||
}
|
||||
// 参数获取
|
||||
int uid = ((SaveHeroForceEvent) event).getUid();
|
||||
String heroId = ((SaveHeroForceEvent) event).getHeroId();
|
||||
// user
|
||||
User user = UserManager.getUser(uid);
|
||||
// 需要存储战力的编队
|
||||
List<Integer> saveForceTeamList = TeamEnum.getSaveForceTeamList();
|
||||
for (Integer teamId : saveForceTeamList) {
|
||||
// 英雄是否存在该编队中
|
||||
if (!HeroLogic.getInstance().isInTeam(user,heroId,teamId) && !"".equals(heroId)){
|
||||
continue;
|
||||
}
|
||||
// 主线标对需要更新排行榜信息
|
||||
if (teamId == TeamEnum.FORMATION_NORMAL.getTeamId()){
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(uid));
|
||||
}
|
||||
// 重新计算战力,并更新
|
||||
int force = HeroLogic.getInstance().calTeamTotalForce(user, TeamEnum.FORMATION_NORMAL.getTeamId(), false);
|
||||
user.getTeamPosManager().putTeamForceMap(teamId,force);
|
||||
}
|
||||
}
|
||||
|
||||
public int getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(int uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getHeroId() {
|
||||
return heroId;
|
||||
}
|
||||
|
||||
public void setHeroId(String heroId) {
|
||||
this.heroId = heroId;
|
||||
}
|
||||
}
|
|
@ -3,7 +3,7 @@ package com.ljsd.jieling.logic.dao;
|
|||
import com.ljsd.common.mogodb.MongoBase;
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
import com.ljsd.jieling.logic.activity.event.RemoveHeroEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.UserMainTeamForceEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.SaveHeroForceEvent;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.hero.HongMengAttributeEnum;
|
||||
import config.SLikeAbilityConfig;
|
||||
|
@ -355,7 +355,8 @@ public class HeroManager extends MongoBase {
|
|||
Hero bingHero= heroMap.get(stringIntegerEntry.getKey());
|
||||
bingHero.setGodSoulBindMap(2,stringIntegerEntry.getValue(),null);
|
||||
}
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(uid));
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(uid,heroId));
|
||||
}
|
||||
|
||||
public Map<String, Hero> getHeroMap() {
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
package com.ljsd.jieling.logic.dao;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author hj
|
||||
|
@ -12,7 +11,7 @@ import java.util.TreeMap;
|
|||
*/
|
||||
@SuppressWarnings("AlibabaEnumConstantsMustHaveComment")
|
||||
public enum TeamEnum {
|
||||
FORMATION_NORMAL(1,"主线编队",1,1),
|
||||
FORMATION_NORMAL(1,"主线编队",1,1,1),
|
||||
TEAM_ARENA_DEFENSE(101,"竞技场防御编队",0,1),
|
||||
TEAM_ARENA_ATTACH(201,"竞技场进攻编队(暂时不用)"),
|
||||
TRIAL_TEAM(301,"森罗环境编队"),
|
||||
|
@ -29,9 +28,9 @@ public enum TeamEnum {
|
|||
HARD_STAGE_TEAM(1701,"山河社稷图队伍"),
|
||||
VICE_HARD_STAGE_TEAM(1801,"山河社稷图副关卡队伍"),
|
||||
TASUILINGXIAO_CHALLENGE(1901,"踏碎凌霄挑战队伍"),
|
||||
CROSS_YU_XU_LUN_DAO_ONE(2001,"玉虚论道第一编队",1,1),
|
||||
CROSS_YU_XU_LUN_DAO_TWO(2002,"玉虚论道第二编队",1,1),
|
||||
CROSS_YU_XU_LUN_DAO_THREE(2003,"玉虚论道第三编队",1,1),
|
||||
CROSS_YU_XU_LUN_DAO_ONE(2001,"玉虚论道第一编队",1,1,1),
|
||||
CROSS_YU_XU_LUN_DAO_TWO(2002,"玉虚论道第二编队",1,1,1),
|
||||
CROSS_YU_XU_LUN_DAO_THREE(2003,"玉虚论道第三编队",1,1,1),
|
||||
CROSS_LING_MAI_SECRET_AREA(2004,"灵脉秘境编队",1,1),
|
||||
|
||||
|
||||
|
@ -70,6 +69,10 @@ public enum TeamEnum {
|
|||
* 是否是pvp,0:否,1:是
|
||||
*/
|
||||
private int isPvp;
|
||||
/**
|
||||
* 是否存储战力,0:否,1:是
|
||||
*/
|
||||
private int isSaveForce;
|
||||
|
||||
private static Map<Integer,TeamEnum> enumMap = new TreeMap<>();
|
||||
|
||||
|
@ -115,6 +118,14 @@ public enum TeamEnum {
|
|||
return anEnum.getIsPvp() == 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取需要保存战力的编队id
|
||||
* @return
|
||||
*/
|
||||
public static List<Integer> getSaveForceTeamList(){
|
||||
return enumMap.values().stream().filter(v -> v.getIsSaveForce() == 1).mapToInt(TeamEnum::getTeamId).boxed().collect(Collectors.toList());
|
||||
}
|
||||
|
||||
TeamEnum(int teamId, String remarks) {
|
||||
this.teamId = teamId;
|
||||
this.remarks = remarks;
|
||||
|
@ -127,6 +138,14 @@ public enum TeamEnum {
|
|||
this.isPvp = isPvp;
|
||||
}
|
||||
|
||||
TeamEnum(int teamId, String remarks, int isCross, int isPvp, int isSaveForce) {
|
||||
this.teamId = teamId;
|
||||
this.isCross = isCross;
|
||||
this.remarks = remarks;
|
||||
this.isPvp = isPvp;
|
||||
this.isSaveForce = isSaveForce;
|
||||
}
|
||||
|
||||
public int getTeamId() {
|
||||
return teamId;
|
||||
}
|
||||
|
@ -158,4 +177,12 @@ public enum TeamEnum {
|
|||
public void setIsPvp(int isPvp) {
|
||||
this.isPvp = isPvp;
|
||||
}
|
||||
|
||||
public int getIsSaveForce() {
|
||||
return isSaveForce;
|
||||
}
|
||||
|
||||
public void setIsSaveForce(int isSaveForce) {
|
||||
this.isSaveForce = isSaveForce;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,10 @@ public class TeamPosManager extends MongoBase {
|
|||
|
||||
private Map<Integer, List<TeamPosHeroInfo>> teamPosForHero;
|
||||
private Map<Integer,String> teamNames;
|
||||
/**
|
||||
* 队伍战力存储
|
||||
*/
|
||||
private Map<Integer,Long> teamForceMap = new HashMap<>();
|
||||
@Transient
|
||||
private int curTeamPosId;
|
||||
@Transient
|
||||
|
@ -80,6 +84,18 @@ public class TeamPosManager extends MongoBase {
|
|||
cacheTeamPro.put(curTeamPosId,null);
|
||||
}
|
||||
|
||||
public Map<Integer, Long> getTeamForceMap() {
|
||||
return teamForceMap;
|
||||
}
|
||||
public void setTeamForceMap(Map<Integer, Long> teamForceMap) {
|
||||
this.teamForceMap = teamForceMap;
|
||||
updateString("teamForceMap", teamForceMap);
|
||||
}
|
||||
public void putTeamForceMap(int teamId,long force) {
|
||||
teamForceMap.put(teamId,force);
|
||||
updateString("teamForceMap", teamForceMap);
|
||||
}
|
||||
|
||||
public Map<Integer, int[][]> getCacheTeamPro() {
|
||||
return cacheTeamPro;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ import com.ljsd.jieling.logic.activity.crossService.CrossServiceLogic;
|
|||
import com.ljsd.jieling.logic.activity.event.CommitSheJiEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.GuildForceChangeEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
import com.ljsd.jieling.logic.activity.event.UserMainTeamForceEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.SaveHeroForceEvent;
|
||||
import com.ljsd.jieling.logic.dao.*;
|
||||
import com.ljsd.jieling.logic.dao.root.*;
|
||||
import com.ljsd.jieling.logic.mail.MailLogic;
|
||||
|
@ -1551,7 +1551,8 @@ public class GuildLogic {
|
|||
|
||||
int count = baseLevel * size + nextIndex;
|
||||
user.getGuildMyInfo().setGuildSkillByType(type,count);
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(session.getUid()));
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),""));
|
||||
|
||||
Family.GuildSkillLevelUpResponse response = Family.GuildSkillLevelUpResponse.newBuilder().setType(type).setCurlevel(count).build();
|
||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),response,true);
|
||||
|
@ -1613,7 +1614,8 @@ public class GuildLogic {
|
|||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, dropArrayReally, BIReason.RESET_GUILD_SKILL);
|
||||
guildMyInfo.removeGuildSkillByType(type);
|
||||
Family.ResetGuildSkillResponse response = Family.ResetGuildSkillResponse.newBuilder().setDrop(drop).build();
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(session.getUid()));
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),""));
|
||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),response,true);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ public enum PassiveskillCalEnum {
|
|||
}
|
||||
parm = value[1]*10000;
|
||||
}
|
||||
if( sPropertyConfig.getStyle()== GlobalsDef.PERCENT_TYPE){
|
||||
if(sPropertyConfig.getStyle()== GlobalsDef.PERCENT_TYPE){
|
||||
parm = value[1]*10000;
|
||||
}
|
||||
|
||||
|
|
|
@ -1278,11 +1278,9 @@ public class HeroLogic {
|
|||
//更新竞技场防御编队战力
|
||||
String key = RedisKey.getKey(RedisKey.AREDEF_TEAM_FORCE_RANK, "", false);
|
||||
RedisUtil.getInstence().zsetAddOne(key, String.valueOf(user.getId()), teamForce);
|
||||
|
||||
}
|
||||
if (teamId == TeamEnum.FORMATION_NORMAL.getTeamId()) {
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(iSession.getUid()));
|
||||
}
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),""));
|
||||
//跨服编队
|
||||
if (TeamEnum.isCrossTeam(teamId)) {
|
||||
CrossServiceLogic.getInstance().saveBasicPlayerToRedis(user);
|
||||
|
@ -1435,13 +1433,12 @@ public class HeroLogic {
|
|||
hero.setBreakId(breakId);
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.HERO_UP, 1);
|
||||
}
|
||||
if (isInTeam(user, heroId, 1)) {
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(session.getUid()));
|
||||
}
|
||||
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),heroId));
|
||||
|
||||
// 鸿蒙阵
|
||||
addOrUpdateHongmeng(session);
|
||||
|
||||
HeroInfoProto.UpHeroLevelResponse build = HeroInfoProto.UpHeroLevelResponse.newBuilder().setHeroId(heroId).setTargetLevel(hero.getOriginalLevel()).build();
|
||||
//发送成功消息
|
||||
MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.UP_HERO_LEVEL_RESPONSE_VALUE, build);
|
||||
|
@ -1629,9 +1626,8 @@ public class HeroLogic {
|
|||
targetHero.setStarBreakId(scHeroRankUpConfig.getId());
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.HERO_UP, 2, targetHero.getTemplateId(), targetHero.getStar());
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.GET_HERO, targetHero.getTemplateId(), targetHero.getStar());
|
||||
if (isInTeam(user, heroId, 1)) {
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(session.getUid()));
|
||||
}
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),heroId));
|
||||
|
||||
if (targetHero.getStar() >= SSpecialConfig.getIntegerValue(SSpecialConfig.lamp_awaken_hero_content_parm)) {
|
||||
Set<Integer> hongmengMaxLevel = heroManager.getHongmengMaxLevel();
|
||||
|
@ -3146,13 +3142,13 @@ public class HeroLogic {
|
|||
|
||||
//神印
|
||||
Map<Integer, Integer> godSealByPositionMap = hero.getGodSealByPositionMap();
|
||||
godSealByPositionMap.forEach((k, v) -> {
|
||||
SEquipConfig sEquipConfig = equipConfigMap.get(v);
|
||||
for (Map.Entry<Integer, Integer> entry : godSealByPositionMap.entrySet()) {
|
||||
SEquipConfig sEquipConfig = equipConfigMap.get(entry.getValue());
|
||||
int[][] property = sEquipConfig.getProperty();
|
||||
if (property != null && property.length > 0 && property[0].length > 0) {
|
||||
combinedAttribute(property, heroAllAttribute);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 修行等级属性加成
|
||||
Map<Integer, SXiuXian> xiuXianMap = STableManager.getConfig(SXiuXian.class);
|
||||
|
@ -3439,9 +3435,20 @@ public class HeroLogic {
|
|||
heroAllAttribute = calHeroNotBufferAttribute(user, hero, true, teamId);
|
||||
//战力保存
|
||||
int force = calForce(heroAllAttribute);
|
||||
Map<Integer, SEquipConfig> config = STableManager.getConfig(SEquipConfig.class);
|
||||
// 魂印装备战力评分
|
||||
Map<Integer, Integer> soulEquipByPositionMap = hero.getSoulEquipByPositionMap();
|
||||
for (int sign : soulEquipByPositionMap.values()) {
|
||||
SEquipConfig sEquipConfig = STableManager.getConfig(SEquipConfig.class).get(sign);
|
||||
SEquipConfig sEquipConfig = config.get(sign);
|
||||
if (sEquipConfig == null) {
|
||||
continue;
|
||||
}
|
||||
force += sEquipConfig.getScore();
|
||||
}
|
||||
// 神印装备战力评分
|
||||
Map<Integer, Integer> godSealByPositionMap = hero.getGodSealByPositionMap();
|
||||
for (int sign : godSealByPositionMap.values()) {
|
||||
SEquipConfig sEquipConfig = config.get(sign);
|
||||
if (sEquipConfig == null) {
|
||||
continue;
|
||||
}
|
||||
|
@ -3638,9 +3645,8 @@ public class HeroLogic {
|
|||
// int force = calForce(heroNotBufferAttribute) + heroNotBufferAttribute.get(HeroAttributeEnum.EquipForce.getPropertyId());
|
||||
// LOGGER.info("the heroTid={},the force={}",hero.getTemplateId(),force);
|
||||
|
||||
if (isInTeam(user, heroId, 1)) {
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(uid));
|
||||
}
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),heroId));
|
||||
// 鸿蒙阵,穿装备
|
||||
addOrUpdateHongmeng(session);
|
||||
|
||||
|
@ -3736,9 +3742,8 @@ public class HeroLogic {
|
|||
}
|
||||
}
|
||||
|
||||
if (isInTeam(user, heroId, 1)) {
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(uid));
|
||||
}
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),heroId));
|
||||
// 鸿蒙阵,脱装备
|
||||
addOrUpdateHongmeng(session);
|
||||
|
||||
|
@ -4339,7 +4344,8 @@ public class HeroLogic {
|
|||
addOrUpdateHongmeng(session);
|
||||
HeroInfoProto.HeroReturnResponse build = HeroInfoProto.HeroReturnResponse.newBuilder().setDrop(drop).build();
|
||||
MessageUtil.sendMessage(session, 1, responseMsgId, build, true);
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(uid));
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),heroId));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4478,9 +4484,8 @@ public class HeroLogic {
|
|||
|
||||
});
|
||||
ItemUtil.drop(user, ItemUtil.mapToArray(returnItems), BIReason.REPLACE_SOUL_REWARD);
|
||||
if (isInTeam(user, heroId, 1)) {
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(uid));
|
||||
}
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),heroId));
|
||||
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.SOUL_EQUIP_WEAR_RESPONSE_VALUE, null, true);
|
||||
}
|
||||
|
||||
|
@ -4634,7 +4639,8 @@ public class HeroLogic {
|
|||
hero.removeSoulEquip(e.getPosition());
|
||||
returnItems.put(e.getEquipId(), 1);
|
||||
});
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(iSession.getUid()));
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),heroId));
|
||||
ItemUtil.drop(user, ItemUtil.mapToArray(returnItems), BIReason.UNLOAD_SOUL_REWARD);
|
||||
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.SOUL_EQUIP_UNLOAD_OPT_RESPONSE_VALUE, null, true);
|
||||
}
|
||||
|
@ -4806,7 +4812,8 @@ public class HeroLogic {
|
|||
if (drop != null) {
|
||||
useAndPriceItemResponse.setDrop(drop);
|
||||
}
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(session.getUid()));
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),""));
|
||||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), useAndPriceItemResponse.build(), true);
|
||||
|
||||
|
||||
|
@ -4901,7 +4908,8 @@ public class HeroLogic {
|
|||
}
|
||||
user.getPokemonManager().updatePokemonTeamMap(pokemonTeamMap);
|
||||
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(session.getUid()));
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),""));
|
||||
|
||||
MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.POKEMON_REPLACE_RESPONSE.getNumber(), null);
|
||||
}
|
||||
|
@ -5093,7 +5101,8 @@ public class HeroLogic {
|
|||
user.getUserMissionManager().onGameEvent(user,GameEvent.DONGHAIXUNXIAN_UPDATE,MissionType.HAVE_ID_STAR_LV_POKEMON_NUM);
|
||||
|
||||
if (pokemonManager.getPokemonTeamMap().containsValue(pokemonId)) {
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(session.getUid()));
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),""));
|
||||
}
|
||||
|
||||
HeroInfoProto.PokenmonUpLevelResponse response = HeroInfoProto.PokenmonUpLevelResponse.newBuilder().setLevel(finalLevel).build();
|
||||
|
@ -5179,7 +5188,8 @@ public class HeroLogic {
|
|||
user.getUserMissionManager().onGameEvent(user,GameEvent.DONGHAIXUNXIAN_UPDATE,MissionType.HAVE_ID_STAR_LV_POKEMON_NUM);
|
||||
|
||||
if (pokemonManager.getPokemonTeamMap().containsValue(pokemonId)) {
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(session.getUid()));
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),""));
|
||||
}
|
||||
if (animal.getQuality() >= SSpecialConfig.getIntegerValue(SSpecialConfig.ANIMAL_BROADCAST_QUALITY)) { //策划资质改成星级
|
||||
String nameColor = user.getPlayerInfoManager().getNameColor();
|
||||
|
@ -5304,11 +5314,9 @@ public class HeroLogic {
|
|||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
}
|
||||
|
||||
hero.setSkin(skinId);
|
||||
if (isInTeam(user, heroId, 1)) {
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(session.getUid()));
|
||||
}
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),heroId));
|
||||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), null, true);
|
||||
}
|
||||
|
||||
|
@ -5768,11 +5776,8 @@ public class HeroLogic {
|
|||
hero.setEquipByPositionMap(equipByPositionMap);
|
||||
}
|
||||
|
||||
// 战力改变
|
||||
if (isInTeam(user, heroId, 1)) {
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(user.getId()));
|
||||
}
|
||||
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),heroId));
|
||||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), null);
|
||||
}
|
||||
|
||||
|
@ -5804,10 +5809,8 @@ public class HeroLogic {
|
|||
heroManager.updateResonances(index, "");
|
||||
heroManager.updateResonancesTime(index, TimeUtils.now() / 1000 + time);
|
||||
|
||||
// 战力改变
|
||||
if (isInTeam(user, heroId, 1)) {
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(user.getId()));
|
||||
}
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),heroId));
|
||||
|
||||
HeroInfoProto.ResonanceResponse resonanceResponse = HeroInfoProto.ResonanceResponse.newBuilder().setLeftTime(time).build();
|
||||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), resonanceResponse);
|
||||
|
@ -5918,8 +5921,8 @@ public class HeroLogic {
|
|||
}
|
||||
heroManager.setHongmengTablet(nextLevel);
|
||||
|
||||
// 战力改变
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(user.getId()));
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),""));
|
||||
// 成就任务
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.HONGMENG_TABLET_LEVEL, heroManager.getHongmengTablet());
|
||||
|
||||
|
@ -5969,10 +5972,8 @@ public class HeroLogic {
|
|||
// 添加鸿蒙碑
|
||||
heroManager.updateHongmengGuards(index, heroId);
|
||||
|
||||
// 战力改变
|
||||
if (isInTeam(user, heroId, 1)) {
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(user.getId()));
|
||||
}
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),heroId));
|
||||
|
||||
addOrUpdateHongmeng(session);
|
||||
|
||||
|
@ -6013,10 +6014,8 @@ public class HeroLogic {
|
|||
.setLeftTime(SSpecialConfig.getIntegerValue(SSpecialConfig.HONGMENG_LATTICE_WAIT_TIME))
|
||||
.build();
|
||||
|
||||
// 战力改变
|
||||
if (isInTeam(user, heroId, 1)) {
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(user.getId()));
|
||||
}
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),heroId));
|
||||
|
||||
addOrUpdateHongmeng(session);
|
||||
|
||||
|
@ -6341,9 +6340,8 @@ public class HeroLogic {
|
|||
drop = ItemUtil.drop(user, list, BIReason.UP_GOD_SEAL);
|
||||
}
|
||||
|
||||
if (isInTeam(user, heroId, 1)) {
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(user.getId()));
|
||||
}
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),heroId));
|
||||
|
||||
HeroInfoProto.WearGodSealResponse.Builder builder = HeroInfoProto.WearGodSealResponse.newBuilder().setDrop(drop);
|
||||
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.WearGodSealResponse_VALUE, builder.build());
|
||||
|
@ -6407,9 +6405,8 @@ public class HeroLogic {
|
|||
ItemUtil.itemCost(user, sEquipConfig.getFormula(), BIReason.MARGE_GOD_SEAL,0);
|
||||
}
|
||||
|
||||
if (isInTeam(user, heroId, 1)) {
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(user.getId()));
|
||||
}
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),heroId));
|
||||
|
||||
HeroInfoProto.UpGodSealResponse.Builder builder = HeroInfoProto.UpGodSealResponse.newBuilder().setDrop(drop);
|
||||
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.UpGodSealResponse_VALUE, builder.build());
|
||||
|
|
|
@ -19,6 +19,7 @@ import com.ljsd.jieling.logic.activity.AbstractActivity;
|
|||
import com.ljsd.jieling.logic.activity.ActivityTypeEnum;
|
||||
import com.ljsd.jieling.logic.activity.event.EspecialEquipUpEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
import com.ljsd.jieling.logic.activity.event.SaveHeroForceEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.UserMainTeamForceEvent;
|
||||
import com.ljsd.jieling.logic.dao.*;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
|
@ -728,15 +729,11 @@ public class ItemLogic {
|
|||
new Object[]{nameColor, user.getPlayerInfoManager().getNickName(), sItem.getName(), hero.getEspecialEquipLevel()},
|
||||
new int[]{0,0,1,0});
|
||||
ChatLogic.getInstance().sendSysChatMessage(message, Global.DILIGENT, String.valueOf(sItem.getId()), 0, 0, 0, 0, 0);
|
||||
|
||||
}
|
||||
if (HeroLogic.getInstance().isInTeam(user, heroId, 1)) {
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(session.getUid()));
|
||||
}
|
||||
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),heroId));
|
||||
//鸿蒙阵
|
||||
HeroLogic.getInstance().addOrUpdateHongmeng(session);
|
||||
|
||||
} else {
|
||||
throw new ErrorCodeException(ErrorCode.ITEM_ESPECIAL_EQUIP_UP_ITEM_NOT);
|
||||
}
|
||||
|
@ -906,9 +903,8 @@ public class ItemLogic {
|
|||
|
||||
BuyGoodsNewLogic.openPush(iSession, user, PushRechargeType.BAOWU_JINGLIAN.getType(), jewel.getBuildLevel(), 1);
|
||||
}
|
||||
if (HeroLogic.getInstance().isInTeam(user, jewel.getHeroId(), 1)) {
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(user.getId()));
|
||||
}
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),propertyItem.getHeroId()));
|
||||
//鸿蒙阵
|
||||
HeroLogic.getInstance().addOrUpdateHongmeng(iSession);
|
||||
|
||||
|
|
|
@ -22,10 +22,7 @@ import com.ljsd.jieling.logic.GlobleSystemLogic;
|
|||
import com.ljsd.jieling.logic.activity.ActivityLogic;
|
||||
import com.ljsd.jieling.logic.activity.ActivityType;
|
||||
import com.ljsd.jieling.logic.activity.crossService.CrossServiceLogic;
|
||||
import com.ljsd.jieling.logic.activity.event.GuildForceChangeEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
import com.ljsd.jieling.logic.activity.event.UserForceChangeEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.UserMainTeamForceEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.*;
|
||||
import com.ljsd.jieling.logic.activity.eventhandler.UserForceUpEventHandler;
|
||||
import com.ljsd.jieling.logic.dao.Pokemon;
|
||||
import com.ljsd.jieling.logic.dao.PropertyItem;
|
||||
|
@ -295,8 +292,6 @@ public class PlayerLogic {
|
|||
rewardMap.put(i,1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*if(!rewardMap.containsKey(playerInfoManager.getVipLevel())){
|
||||
rewardMap.put(playerInfoManager.getVipLevel(),0);
|
||||
}
|
||||
|
@ -323,7 +318,8 @@ public class PlayerLogic {
|
|||
.setVipLevel(playerInfoManager.getVipLevel()).build();
|
||||
PlayerInfoProto.VipLevelUpResponse.Builder builder = PlayerInfoProto.VipLevelUpResponse.newBuilder().addAllUserMissionInfo(missionList);
|
||||
builder.setVipBaseInfo(vipInfoProto);
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(session.getUid()));
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),""));
|
||||
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.VIP_LEVELUP_RESPONSE_VALUE,builder.build(),true);
|
||||
ReportUtil.onReportEvent(user, ReportEventEnum.VIP_LEVEL_UP.getType());
|
||||
//特权等级奖励
|
||||
|
@ -345,23 +341,20 @@ public class PlayerLogic {
|
|||
user.getPlayerInfoManager().setMaxForce(teamForce);
|
||||
//跨服redis存储最大战力
|
||||
CrossServiceLogic.getInstance().saveBasicPlayerToRedis(user);
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(iSession.getUid()));
|
||||
// 更新战力
|
||||
Poster.getPoster().dispatchEvent(new SaveHeroForceEvent(user.getId(),""));
|
||||
Poster.getPoster().dispatchEvent(new UserForceChangeEvent(uid,teamForce));
|
||||
user.getUserMissionManager().onGameEvent(user,GameEvent.USER_FORCE_CHANGE);
|
||||
user.getUserMissionManager().onGameEvent(user,GameEvent.MISTY_TRIP);
|
||||
ActivityLogic.getInstance().updateActivityMissionProgress(user, ActivityType.FORCERANK,teamForce);
|
||||
ActivityLogic.getInstance().updateActivityMissionProgress(user, ActivityType.FORCESTANDARD,teamForce);
|
||||
}
|
||||
|
||||
if(teamId == TeamEnum.TEAM_ARENA_DEFENSE.getTeamId()){
|
||||
//更新竞技场防御编队战力
|
||||
String key = RedisKey.getKey(RedisKey.AREDEF_TEAM_FORCE_RANK, "", false);
|
||||
RedisUtil.getInstence().zsetAddOne(key, String.valueOf(user.getId()), teamForce);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
MessageUtil.sendMessage(iSession,1, MessageTypeProto.MessageType.USER_FORCE_CHANGE_RESPONSE_VALUE,null,true);
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ public class SPropertyConfig implements BaseConfig {
|
|||
}
|
||||
|
||||
public static SPropertyConfig getsPropertyConfigByBattlePID(int battlePropertyId) {
|
||||
return sPropertyIConfigByInBattleMap .get(battlePropertyId);
|
||||
return sPropertyIConfigByInBattleMap.get(battlePropertyId);
|
||||
}
|
||||
|
||||
public static SPropertyConfig getsPropertyConfigByTargetPropertyId(int targetPropertyId) {
|
||||
|
|
Loading…
Reference in New Issue