Merge branch 'master_test_hw' of http://60.1.1.230/backend/jieling_server into master_test_hw
commit
7f991f8045
File diff suppressed because it is too large
Load Diff
|
@ -24,7 +24,6 @@ import org.apache.thrift.TException;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.data.redis.core.ZSetOperations;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class GmService implements RPCRequestGMIFace.Iface {
|
||||
|
|
|
@ -63,6 +63,7 @@ public enum FunctionIdEnum {
|
|||
DeathPath(72,null),
|
||||
Car_Delay(73,new CarDelayFunction()),
|
||||
Situation_challenge(74,null),
|
||||
Pokemon(79,null),
|
||||
World_Arena(82,new WorldArenaFunction()),
|
||||
;
|
||||
|
||||
|
|
|
@ -38,7 +38,8 @@ public class CarDelayFunction implements FunctionManager {
|
|||
}
|
||||
});
|
||||
MongoUtil.getLjsdMongoTemplate().lastUpdate();
|
||||
RedisUtil.getInstence().del(delKeys.toArray(new String[0]));
|
||||
RedisUtil.getInstence().rename(delKeys.toArray(new String[0]));
|
||||
// RedisUtil.getInstence().del(delKeys.toArray(new String[0]));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -134,6 +134,25 @@ public class RedisUtil {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* redis重命名
|
||||
* @param key,数组
|
||||
*/
|
||||
public void rename(String... key) {
|
||||
if (key != null && key.length > 0) {
|
||||
for (int i = 0; i < key.length; i++) {
|
||||
// 旧名字
|
||||
String oldName = key[i];
|
||||
// 新名字
|
||||
String newName = oldName+"BACK:"+System.currentTimeMillis();
|
||||
// 重命名
|
||||
redisTemplate.rename(oldName,newName);
|
||||
// 设置过期时间
|
||||
expire(newName,60*60*24);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ============================String=============================
|
||||
/**
|
||||
* 普通缓存获取
|
||||
|
|
|
@ -50,7 +50,6 @@ public enum ErrorCode implements IErrorCode {
|
|||
ADVENTURE_CALL_BOSS_TIMES(17,"召唤秘境boss 次数不足"),
|
||||
UNLOCK_SKIP_FIGHT(18,"vip跳过战斗功能未解锁"),
|
||||
ADVENTURE_BOSS_CHALLENGE_IN(19,"外地入侵挑战 正在战斗中"),
|
||||
ADVENTURE_BOSS_CHALLENGE_BOSS_KILL(19,"外地入侵挑战 外敌已被击杀"),
|
||||
|
||||
CDK_FAIL(20,"兑换码无效"),
|
||||
CDK_USED(21,"兑换码已使用"),
|
||||
|
@ -163,7 +162,8 @@ public enum ErrorCode implements IErrorCode {
|
|||
|
||||
SERVER_DEFINE_SELF(20000,"操作失败"),
|
||||
|
||||
|
||||
CHALLENGE_MISS(136,"挑战时间已过,请重新进入"),
|
||||
GAIN_MISS(137,"抢夺时间已过,请重新进入"),
|
||||
|
||||
BAG_FULL(135,"背包内存储空间不足,无法领取附件"),
|
||||
|
||||
|
|
|
@ -51,10 +51,10 @@ public class FastChallengeHandler extends BaseHandler<FightInfoProto.FastFightCh
|
|||
throw new ErrorCodeException(ErrorCode.SERVER_DEFINE);
|
||||
}
|
||||
if(type == 2 && GuildFightLogic.carDelayProgressIndication.getProgress()!=3) {
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_DEFINE);
|
||||
throw new ErrorCodeException(ErrorCode.GAIN_MISS);
|
||||
}
|
||||
if(type == 1 && GuildFightLogic.carDelayProgressIndication.getProgress()!=1) {
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_DEFINE);
|
||||
throw new ErrorCodeException(ErrorCode.CHALLENGE_MISS);
|
||||
}
|
||||
if(user.getPlayerInfoManager().getGuildId() == 0){
|
||||
throw new ErrorCodeException(ErrorCode.FAMILY_NO);
|
||||
|
|
|
@ -16,14 +16,14 @@ import config.SGlobalSystemConfig;
|
|||
import config.SMServerArenaSetting;
|
||||
import manager.STableManager;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
import rpc.world.WorldCommonProto;
|
||||
import rpc.world.WorldProto;
|
||||
|
||||
/**
|
||||
* Description: des
|
||||
* Author: zsx
|
||||
* CreateDate: 2020/12/10 19:55
|
||||
*/
|
||||
public class GetWorldArenaProudRequestHandler extends BaseHandler<WorldCommonProto.GetWorldArenaProudRequest> {
|
||||
public class GetWorldArenaProudRequestHandler extends BaseHandler<WorldProto.GetWorldArenaProudRequest> {
|
||||
|
||||
@Override
|
||||
public MessageTypeProto.MessageType getMessageCode() {
|
||||
|
@ -31,7 +31,7 @@ public class GetWorldArenaProudRequestHandler extends BaseHandler<WorldCommonPro
|
|||
}
|
||||
|
||||
@Override
|
||||
public void processWithProto(ISession iSession, WorldCommonProto.GetWorldArenaProudRequest proto) throws Exception {
|
||||
public void processWithProto(ISession iSession, WorldProto.GetWorldArenaProudRequest proto) throws Exception {
|
||||
|
||||
|
||||
GlobalidHelper.WorldInfo worldInfo = GlobalidHelper.getWorldInfo();
|
||||
|
|
|
@ -82,6 +82,7 @@ public interface ActivityType {
|
|||
int SKIN_RECHARGE_ACTIVITY = 71;
|
||||
int SPECIAL_MONSTER_RANDOM_ACTIVITY = 100;//灵兽限时抽卡
|
||||
int SPECIAL_MONSTER_GIFT_ACTIVITY = 101;//灵兽礼包
|
||||
// int NEW_GENERAL_RECRUITING = 102;//新将招募
|
||||
|
||||
int DEMON_TREASURE = 36;//降妖夺宝
|
||||
int NEW_GENERAL_ATTACK = 200;//新将来袭
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ public enum ActivityTypeEnum {
|
|||
SKIN_RECHARGE_ACTIVITY(ActivityType.SKIN_RECHARGE_ACTIVITY, DefaultEmptyActivity::new),
|
||||
SPECIAL_MONSTER_RANDOM_ACTIVITY(ActivityType.SPECIAL_MONSTER_RANDOM_ACTIVITY,LimitRandomSpecialMonsterActivity::new),
|
||||
SPECIAL_MONSTER_GIFT_ACTIVITY(ActivityType.SPECIAL_MONSTER_GIFT_ACTIVITY,DefaultEmptyActivity::new),
|
||||
// NEW_GENERAL_RECRUITING(ActivityType.NEW_GENERAL_RECRUITING,LimitRandomCardActivity::new),
|
||||
DEMON_TREASURE(ActivityType.DEMON_TREASURE,LimitRandomSpecialMonsterActivity::new),
|
||||
NEW_GENERAL_ATTACK(ActivityType.NEW_GENERAL_ATTACK,DefaultEmptyActivity::new),
|
||||
;
|
||||
private int type;
|
||||
|
|
|
@ -523,7 +523,7 @@ public class CombatLogic {
|
|||
try {
|
||||
AdventureBoss adventureBoss = RedisUtil.getInstence().getMapEntry(RedisKey.ADVENTRUEN_BOSS_INFO, "", bossId, AdventureBoss.class);
|
||||
if(adventureBoss == null){
|
||||
throw new ErrorCodeException(ErrorCode.ADVENTURE_BOSS_CHALLENGE_BOSS_KILL);
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
int[][] costs = new int[1][];
|
||||
costs[0] =new int[]{Global.INVASIONBOSS_TICKET,fightTimes};
|
||||
|
|
|
@ -114,7 +114,7 @@ public class FightRecordLogic {
|
|||
}
|
||||
|
||||
public String getAll(int uid){
|
||||
MultiValueMap<Integer, String> valueMap = recordMap.getOrDefault(uid,new LinkedMultiValueMap<>());
|
||||
MultiValueMap<Integer, String> valueMap = recordMap.getOrDefault(uid, new LinkedMultiValueMap<>());
|
||||
return valueMap.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.ljsd.jieling.logic.fight.result;
|
||||
|
||||
import rpc.protocols.CommonProto;
|
||||
import com.googlecode.protobuf.format.JsonFormat;
|
||||
import rpc.protocols.CommonProto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
|
|
@ -259,7 +259,11 @@ public class FriendLogic {
|
|||
continue;
|
||||
}
|
||||
if (friends1.size() >= maxFriends){
|
||||
throw new ErrorCodeException(ErrorCode.FRIENDS_SIDE_MAX);
|
||||
if(inviteUidsList.size()>1){
|
||||
throw new ErrorCodeException(ErrorCode.FRIENDS_SIDE_MAX);
|
||||
}else{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (applyFriends.size()>= maxApplyFriends){
|
||||
applyFriends.remove(0);
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.ljsd.fight.FamilyHeroInfo;
|
|||
import com.ljsd.jieling.chat.logic.ChatLogic;
|
||||
import com.ljsd.jieling.config.clazzStaticCfg.CommonStaticConfig;
|
||||
import com.ljsd.jieling.config.clazzStaticCfg.HeroStaticConfig;
|
||||
import com.ljsd.jieling.core.FunctionIdEnum;
|
||||
import com.ljsd.jieling.core.GlobalsDef;
|
||||
import com.ljsd.jieling.db.redis.RedisKey;
|
||||
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||
|
@ -3026,6 +3027,11 @@ public class HeroLogic{
|
|||
public void pokemonFree(ISession session, List<String> pokemonIds,int pieceId,int pieceAmount, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
int uid = session.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
List<Integer> config = SGlobalSystemConfig.idsByType.get(FunctionIdEnum.Pokemon.getFunctionType());
|
||||
SGlobalSystemConfig sGlobalSystemConfig = STableManager.getConfig(SGlobalSystemConfig.class).get(config.iterator().next());
|
||||
if(user.getPlayerInfoManager().getLevel()<sGlobalSystemConfig.getOpenRules()[1]){
|
||||
throw new ErrorCodeException(ErrorCode.PLAYER_LEVE_NOT);
|
||||
}
|
||||
PokemonManager pokemonManager = user.getPokemonManager();
|
||||
if(!pokemonIds.isEmpty()){
|
||||
if(pieceId!=0||pieceAmount!=0){
|
||||
|
|
|
@ -430,7 +430,8 @@ public class BuyGoodsLogic {
|
|||
ExpeditionLogic.sendTreasureRewardUpdate(OnlineUserManager.getSessionByUid(user.getId()),user.getExpeditionManager().getWorldTreasureReward().getScore(),rewardStatusMap,user.getExpeditionManager().getWorldTreasureReward().getCreateTime(),1);
|
||||
}
|
||||
if(sRechargeCommodityConfig.getTime() ==5){
|
||||
rechargeInfo.updateRefreshMapByKey(sRechargeCommodityConfig.getId(),TimeUtils.now()+sRechargeCommodityConfig.getDailyUpdate()*TimeUtils.DAY);
|
||||
long nextTime = TimeUtils.getLastOrUnderHour(TimeUtils.now() + sRechargeCommodityConfig.getDailyUpdate() * TimeUtils.DAY, 0, 0, true);
|
||||
rechargeInfo.updateRefreshMapByKey(sRechargeCommodityConfig.getId(),nextTime);
|
||||
}
|
||||
resultRes.setResultCode(1);
|
||||
// KtEventUtils.onKtEvent(user, ParamEventBean.UserPayEvent,goodsId,orderId,resultRes.getResultCode(),price);
|
||||
|
|
|
@ -13,7 +13,7 @@ public class SGlobalSystemConfig implements BaseConfig {
|
|||
|
||||
private int id;
|
||||
|
||||
private String name;
|
||||
private String name;
|
||||
|
||||
private int[] openRules;
|
||||
|
||||
|
|
|
@ -1073,10 +1073,10 @@ public class HeroLogic {
|
|||
// 觉醒飘字
|
||||
if (targetHero.getStar() >= SSpecialConfig.getIntegerValue(SSpecialConfig.lamp_awaken_hero_content_parm)) {
|
||||
String message = SErrorCodeEerverConfig.getI18NMessage("animal_awaken_broadcast_content", new Object[]{user.getPlayerInfoManager().getNickName(), scHero.getReadingName()});
|
||||
ChatLogic.getInstance().sendSysChatMessage(message, Global.DILIGENT, targetHero.getTemplateId(), 0, 0, 0, 0, 0);
|
||||
ChatLogic.getInstance().sendSysChatMessage(message, Global.DILIGENT, String.valueOf(targetHero.getTemplateId()), 0, 0, 0, 0, 0);
|
||||
} else if (targetHero.getStar() >= SSpecialConfig.getIntegerValue(SSpecialConfig.lamp_rankup_hero_content_parm)) {
|
||||
String message = SErrorCodeEerverConfig.getI18NMessage("lamp_rankup_hero_content", new Object[]{user.getPlayerInfoManager().getNickName(), scHero.getReadingName(), targetHero.getStar()});
|
||||
ChatLogic.getInstance().sendSysChatMessage(message, Global.DILIGENT, targetHero.getTemplateId(), 0, 0, 0, 0, 0);
|
||||
ChatLogic.getInstance().sendSysChatMessage(message, Global.DILIGENT, String.valueOf(targetHero.getTemplateId()), 0, 0, 0, 0, 0);
|
||||
}
|
||||
String consume = StringUtil.parseArrayToString(consumeMaterial);
|
||||
// HERO_STRENGTHEN(13,"hero_strengthen", new CommonEventHandler(),new String[]{"hero_id","old_quality","new_quality","strengthen_type","cost_item_list","cost_hero_list"}),
|
||||
|
@ -3238,7 +3238,7 @@ public class HeroLogic {
|
|||
if(animal.getQuality() >= SSpecialConfig.getIntegerValue(SSpecialConfig.ANIMAL_BROADCAST_QUALITY)) { //策划资质改成星级
|
||||
String message = SErrorCodeEerverConfig.getI18NMessage("animal_starup_broadcast_content", new Object[]{user.getPlayerInfoManager().getNickName(),animal.getName(),pokemon.getStar()});
|
||||
if (!message.isEmpty()){
|
||||
ChatLogic.getInstance().sendSysChatMessage(message,Global.LUCKY_LUCK,0,0,0,0,0,0);
|
||||
ChatLogic.getInstance().sendSysChatMessage(message,Global.LUCKY_LUCK,"0",0,0,0,0,0);
|
||||
}
|
||||
}
|
||||
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.POKEMON_ADVANCED_RESPONSE_VALUE,null,true);
|
||||
|
|
Loading…
Reference in New Issue