Merge branch 'master_prb_gn' into master_test_gn
# Conflicts: # serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.javaback_recharge
commit
b58f222669
|
@ -9,6 +9,8 @@ import com.ljsd.jieling.logic.dao.ServerConfig;
|
|||
import com.ljsd.jieling.logic.dao.root.GlobalSystemControl;
|
||||
import com.ljsd.jieling.logic.dao.root.GuildInfo;
|
||||
import com.mongodb.*;
|
||||
import config.SMServerArenaSetting;
|
||||
import manager.STableManager;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
|
@ -66,10 +68,16 @@ public class LjsdMongoTemplate implements MongoUpdateImp {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
for (MongoTemplate mongoTemplate : MongoUtil.mongoTemplateMap.values()) {
|
||||
MongoTemplate mongoTemplate = MongoUtil.mongoTemplateMap.get(GameApplication.serverId);
|
||||
if (mongoTemplate != null) {
|
||||
List<T> all = mongoTemplate.findAll(clazz);
|
||||
list.addAll(all);
|
||||
return all;
|
||||
}
|
||||
|
||||
// for (MongoTemplate mongoTemplate : MongoUtil.mongoTemplateMap.values()) {
|
||||
// List<T> all = mongoTemplate.findAll(clazz);
|
||||
// list.addAll(all);
|
||||
// }
|
||||
}
|
||||
return list;
|
||||
//return mongoTemplate.findAll(clazz,collectionName);
|
||||
|
@ -93,6 +101,14 @@ public class LjsdMongoTemplate implements MongoUpdateImp {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
SMServerArenaSetting setting = STableManager.getConfig(SMServerArenaSetting.class).get(1);
|
||||
int rankEndLine = setting.getWorldLevLimit();
|
||||
if (query.getLimit() == rankEndLine) {
|
||||
MongoTemplate mongoTemplate = MongoUtil.mongoTemplateMap.get(GameApplication.serverId);
|
||||
List<T> all = mongoTemplate.find(query, entityClass);
|
||||
list.addAll(all);
|
||||
return list;
|
||||
}
|
||||
for (MongoTemplate mongoTemplate : MongoUtil.mongoTemplateMap.values()) {
|
||||
List<T> all = mongoTemplate.find(query, entityClass);
|
||||
list.addAll(all);
|
||||
|
|
|
@ -24,7 +24,6 @@ public class TakeMissionRewardHandler extends BaseHandler<PlayerInfoProto.TakeMi
|
|||
|
||||
@Override
|
||||
public void processWithProto(ISession iSession, PlayerInfoProto.TakeMissionRewardRequest proto) throws Exception {
|
||||
|
||||
MissionLoigc.takeMissionReward(iSession,proto.getType(),proto.getMissionId());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -205,13 +205,14 @@ public class GlobleSystemLogic implements IEventHandler {
|
|||
}
|
||||
|
||||
private static void setGlobalWorldLevelCache(int globalWorldLevelCache) {
|
||||
if(globalWorldLevelCache>getGlobalWorldLevelCache()){
|
||||
// TODO 下次更新前删除 强制设置一次世界等级
|
||||
// if(globalWorldLevelCache>getGlobalWorldLevelCache()){
|
||||
GLOABLE_WORLD_LEVE_CACHE = globalWorldLevelCache;
|
||||
RedisUtil.getInstence().putMapEntry(RedisKey.SERVER_WORLDLEVE_INFO,"",String.valueOf(GameApplication.serverId),globalWorldLevelCache);
|
||||
InnerMessageUtil.broadcastWithRandom(user->{
|
||||
MessageUtil.sendIndicationMessage(OnlineUserManager.getSessionByUid(user.getId()), 1, MessageTypeProto.MessageType.WorldLevelIndication_VALUE, PlayerInfoProto.WorldLevelIndication.newBuilder().setWorldLeve(GlobleSystemLogic.getGlobalWorldLevelCache()).build(), true);
|
||||
}, new LinkedList<>(OnlineUserManager.sessionMap.keySet()),10);
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -400,6 +400,23 @@ public class ActivityLogic implements IEventHandler{
|
|||
}
|
||||
}
|
||||
}
|
||||
// TODO 修复每周任务和万象活动 11月3日删除
|
||||
// 1635696000000L = 2021-11-01 00:00:00
|
||||
if (now < 1635696000000L) {
|
||||
if(sGlobalActivity.getId() == 40000 && !TimeUtils.isSameWeek(now, user.getUserMissionManager().getJadeDynastyMissionType().getWeekRefresh())) {
|
||||
LOGGER.info("checkActivityOfUser uid={} fix JADE_DYNASTY_WEEK_REFRESH", user.getId());
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.JADE_DYNASTY_WEEK_REFRESH, sGlobalActivity.getId());
|
||||
}
|
||||
if (sGlobalActivity.getShopId() != null && sGlobalActivity.getShopId().length > 0) {
|
||||
for (int shopId : sGlobalActivity.getShopId()) {
|
||||
if (shopId != 0 && !user.getStoreManager().getStoreInfoMap().containsKey(shopId)) {
|
||||
LOGGER.info("checkActivityOfUser uid={} fix sGlobalActivity shop", user.getId());
|
||||
Poster.getPoster().dispatchEvent(new ActivityStateChangeEvent(user.getId(), sGlobalActivity.getId(), 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
initAllActivityMission(activityManager.getActivityMissionMap(),openActivityId);
|
||||
|
|
|
@ -753,7 +753,7 @@ public class FightUtil {
|
|||
return CommonProto.FightTeamInfo.
|
||||
newBuilder()
|
||||
.addAllFightUnitList(heroFightInfos)
|
||||
.addAllPokemonUnitList(HeroLogic.getInstance().getCrossPokemon(crossArenaManager,csPlayer))
|
||||
.addAllPokemonUnitList(HeroLogic.getInstance().getCrossPokemon(crossArenaManager))
|
||||
.setTeamPassiveList("")
|
||||
.setForceScore(crossArenaManager.getMaxHistoryForce())
|
||||
.build();
|
||||
|
|
|
@ -27,7 +27,6 @@ import com.ljsd.jieling.logic.activity.eventhandler.HeroFiveStarGetEventHandler;
|
|||
import com.ljsd.jieling.logic.activity.eventhandler.PokemonFiveStarGetEventHandler;
|
||||
import com.ljsd.jieling.logic.activity.fourChallenge.FourChallengeLogic;
|
||||
import com.ljsd.jieling.logic.dao.*;
|
||||
import com.ljsd.jieling.logic.dao.cross.CSPlayer;
|
||||
import com.ljsd.jieling.logic.dao.gm.ArenaOfHero;
|
||||
import com.ljsd.jieling.logic.dao.gm.ArenaOfUser;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
|
@ -2372,7 +2371,7 @@ public class HeroLogic {
|
|||
}
|
||||
|
||||
///获取修行技能数据
|
||||
public void getPracticeSkill(List<CommonProto.FightUnitInfo> infoList, Map<Integer, Integer> practiceSkillMap,long maxForce,int sex,int userLv) {
|
||||
public void getPracticeSkill(List<CommonProto.FightUnitInfo> infoList, Map<Integer, Integer> practiceSkillMap,long maxForce) {
|
||||
if (practiceSkillMap.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
@ -2391,10 +2390,8 @@ public class HeroLogic {
|
|||
.setUnitSkillIds(skillStr.toString())
|
||||
.setProperty("0")
|
||||
.setPosition(100)
|
||||
.setStar(userLv)
|
||||
.setSkinId(0)
|
||||
.setForceScore(maxForce)
|
||||
.setPlayerSex(sex)
|
||||
.build();
|
||||
infoList.add(skillInfo);
|
||||
}
|
||||
|
@ -2434,7 +2431,7 @@ public class HeroLogic {
|
|||
.build();
|
||||
pokemonInfos.add(info);
|
||||
}
|
||||
getPracticeSkill(pokemonInfos, user.getHeroManager().getPracticeSkillMap(),user.getPlayerInfoManager().getMaxForce(),user.getPlayerInfoManager().getSex(),user.getPlayerInfoManager().getLevel());
|
||||
getPracticeSkill(pokemonInfos, user.getHeroManager().getPracticeSkillMap(),user.getPlayerInfoManager().getMaxForce());
|
||||
return pokemonInfos;
|
||||
}
|
||||
|
||||
|
@ -2462,10 +2459,11 @@ public class HeroLogic {
|
|||
return pokemonInfos;
|
||||
}
|
||||
|
||||
public List<CommonProto.FightUnitInfo> getCrossPokemon(CrossArenaManager crossArenaManager, CSPlayer csPlayer) {
|
||||
public List<CommonProto.FightUnitInfo> getCrossPokemon(CrossArenaManager crossArenaManager) {
|
||||
//todo 灵兽
|
||||
Map<String, com.ljsd.jieling.thrift.idl.Pokemon> pokemonMap = crossArenaManager.getPokemons();
|
||||
Map<Integer, String> teamMap = crossArenaManager.getPokemonTeamMap();
|
||||
|
||||
Map<Integer, com.ljsd.jieling.thrift.idl.Pokemon> pokemons = new HashMap<>();
|
||||
List<CommonProto.FightUnitInfo> pokemonInfos = new ArrayList<>();
|
||||
|
||||
|
@ -2489,7 +2487,7 @@ public class HeroLogic {
|
|||
.setUnitId(String.valueOf(pokemon.getTmpId())).setUnitSkillIds(String.valueOf(sSpiritAnimalSkill.getId())).build();
|
||||
pokemonInfos.add(info);
|
||||
}
|
||||
getPracticeSkill(pokemonInfos,crossArenaManager.getPracticeSkillMap(),crossArenaManager.getMaxHistoryForce(),csPlayer.getSex(),csPlayer.getLevel());
|
||||
getPracticeSkill(pokemonInfos,crossArenaManager.getPracticeSkillMap(),crossArenaManager.getMaxHistoryForce());
|
||||
return pokemonInfos;
|
||||
}
|
||||
|
||||
|
@ -2522,7 +2520,7 @@ public class HeroLogic {
|
|||
.setUnitId(String.valueOf(pokemon.getTmpId())).setUnitSkillIds(String.valueOf(sSpiritAnimalSkill.getId())).build();
|
||||
pokemonInfos.add(info);
|
||||
}
|
||||
getPracticeSkill(pokemonInfos,user.getHeroManager().getPracticeSkillMap(),user.getPlayerInfoManager().getMaxForce(),user.getPlayerInfoManager().getSex(),user.getPlayerInfoManager().getLevel());
|
||||
getPracticeSkill(pokemonInfos,user.getHeroManager().getPracticeSkillMap(),user.getPlayerInfoManager().getMaxForce());
|
||||
return pokemonInfos;
|
||||
}
|
||||
|
||||
|
|
|
@ -603,7 +603,8 @@ public class ItemUtil {
|
|||
if (sItem.getItemBaseType()==6){
|
||||
equipManager.addEquipList(entry.getKey());
|
||||
}
|
||||
if (sItem.getItemType()==3){
|
||||
if (sItem.getItemType()==3 && reason != BIReason.EQUIP_UNLOAD_REWARD
|
||||
&& reason != BIReason.UPHERO_DECOMPOS_HERO_REWARD && reason != BIReason.DECOMPOS_HERO_REWARD){
|
||||
if (changeEquipList==null) {
|
||||
changeEquipList=new ArrayList<>();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue