Merge branch 'master_test_gn' into master_test_gn_mcz
# Conflicts: # serverlogic/src/main/java/com/ljsd/jieling/logic/activity/ActivityType.java # serverlogic/src/main/java/com/ljsd/jieling/logic/activity/ActivityTypeEnum.javaback_recharge
commit
f07c099715
|
@ -66,6 +66,13 @@ public class ChatLogic {
|
|||
case 1: //世界
|
||||
chatInfoList = MessageCache.worldMsg.getObjs(messageId);
|
||||
break;
|
||||
case 2://公会
|
||||
int guildId = UserManager.getUser(uid).getPlayerInfoManager().getGuildId();
|
||||
if(guildId!=0&&MessageCache.guildMsg.containsKey(guildId)){
|
||||
chatInfoList = MessageCache.guildMsg.get(guildId).getObjs(messageId);
|
||||
}
|
||||
break;
|
||||
|
||||
case 3: //好友
|
||||
Map<Object, Object> hmget = RedisUtil.getInstence().hmget(GameApplication.serverId + RedisKey.CUser_Chat + uid);
|
||||
if (hmget != null && hmget.size() != 0){
|
||||
|
@ -183,17 +190,21 @@ public class ChatLogic {
|
|||
break;
|
||||
case 2: //公会
|
||||
int guildId = user.getPlayerInfoManager().getGuildId();
|
||||
messageId = RedisUtil.getInstence().increment(GameApplication.serverId + RedisKey.CHAT_GUILD_MSG_ID +guildId);
|
||||
if(guildId==0){
|
||||
throw new ErrorCodeException(ErrorCode.CHAT_NO_FAMILY);
|
||||
}
|
||||
chatInfo = CBean2Proto.getChatInfoBuilder(user,message,nowTime,0);
|
||||
ChatProto.SendChatInfoIndication sendChatInfoIndication = ChatProto.SendChatInfoIndication.newBuilder()
|
||||
.setChatInfo(chatInfo)
|
||||
.setType(2)
|
||||
.build();
|
||||
GuildLogic.sendIndicationToMember(GuilidManager.guildInfoMap.get(guildId),MessageTypeProto.MessageType.SEND_CHAT_INFO_INDICATION,sendChatInfoIndication);
|
||||
chatInfo = CBean2Proto.getChatInfoBuilder(user,message,nowTime,messageId);
|
||||
// = ChatProto.SendChatInfoIndication.newBuilder()
|
||||
// .setChatInfo(chatInfo)
|
||||
// .setType(2)
|
||||
// .build();
|
||||
MessageCache.addGuildMsg(chatInfo,messageId,guildId);
|
||||
|
||||
// GuildLogic.sendIndicationToMember(GuilidManager.guildInfoMap.get(guildId),MessageTypeProto.MessageType.SEND_CHAT_INFO_INDICATION,sendChatInfoIndication);
|
||||
break;
|
||||
case 3: //好友
|
||||
ChatProto.SendChatInfoIndication sendChatInfoIndication = null;
|
||||
List<Integer> friends = friendManager.getFriends();
|
||||
if (!friends.contains(friendId)) {
|
||||
throw new ErrorCodeException(ErrorCode.CHAT_NOT_FRIENDS);
|
||||
|
|
|
@ -71,7 +71,7 @@ public class LoopQueue<T> {
|
|||
}
|
||||
|
||||
if(needCompareTime){
|
||||
if( (curTime - queueList[nextIndex].timestamp) >= diffTime){
|
||||
if(diffTime!=-1&& (curTime - queueList[nextIndex].timestamp) >= diffTime){
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,13 +2,17 @@ package com.ljsd.jieling.chat.messge;
|
|||
|
||||
import rpc.protocols.ChatProto;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public class MessageCache {
|
||||
private static final int capuatiy =200;
|
||||
private static final int msgInterval = 24*3600*1000;
|
||||
private static final int perCaught= 20;
|
||||
private static final int perCaught= 30;
|
||||
|
||||
public static LoopQueue worldMsg = new LoopQueue(capuatiy,perCaught,msgInterval);
|
||||
public static LoopQueue worldMsg = new LoopQueue(capuatiy,perCaught,-1);
|
||||
public static LoopQueue sysMsg = new LoopQueue(capuatiy,perCaught,msgInterval);
|
||||
public static Map<Integer,LoopQueue> guildMsg = new ConcurrentHashMap();
|
||||
|
||||
|
||||
public static void addWordMsg(ChatProto.ChatInfo chatInfo,long messageId){
|
||||
|
@ -18,5 +22,11 @@ public class MessageCache {
|
|||
public static void addSystemMsg(ChatProto.ChatInfo chatInfo,long messageId ){
|
||||
sysMsg.push(chatInfo,messageId);
|
||||
}
|
||||
public static void addGuildMsg(ChatProto.ChatInfo chatInfo,long messageId,int guildId){
|
||||
if(!guildMsg.containsKey(guildId)){
|
||||
guildMsg.put(guildId,new LoopQueue(capuatiy,perCaught,-1));
|
||||
}
|
||||
guildMsg.get(guildId).push(chatInfo,messageId);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -168,6 +168,11 @@ public interface BIReason {
|
|||
|
||||
int GOOD_LUCK_DROP = 96;//扭转乾坤获得
|
||||
|
||||
int ACTIVATION_HERO_FETTER = 97; //激活神将羁绊获得
|
||||
int ACTIVATION_EQUIP_FETTER = 98; //激活魂印羁绊获得
|
||||
int ACTIVATION_POKEMON_FETTER = 99; //激活灵兽羁绊获得
|
||||
|
||||
|
||||
int ADVENTURE_UPLEVEL_CONSUME = 1000;//秘境升级
|
||||
int SECRETBOX_CONSUME = 1001;//秘盒抽卡
|
||||
int DECOMPOSE_ITEM_CONSUME = 1002;//分解道具消耗
|
||||
|
|
|
@ -70,6 +70,7 @@ public interface Global {
|
|||
|
||||
int VIPSTORID = 20; //vip商店id
|
||||
int GODSTORID = 57; //vip商店id
|
||||
int LUCKY_GET= 70;//5000储值
|
||||
int LUXURYMONTHCARDID =11;//6豪华月卡 废弃 改版
|
||||
int WEEKCARDID = 10; //月卡
|
||||
|
||||
|
|
|
@ -79,7 +79,6 @@ public class HeroNodeGetInfoRequestHandler extends BaseHandler<Expedition.HeroNo
|
|||
if (hero == null) {
|
||||
throw new ErrorCodeException("招募节点英雄掉落失败");
|
||||
}
|
||||
// 等级
|
||||
int level = HeroLogic.getInstance().getAverageLevel(user,6);
|
||||
|
||||
for (Integer integer:randomTid) {
|
||||
|
|
|
@ -144,6 +144,10 @@ public class GetPlayerInfoHandler extends BaseHandler{
|
|||
}
|
||||
//图鉴信息
|
||||
Map<Integer, Integer> heroHandBook = heroManager.getHeroHandBook();
|
||||
for (Map.Entry<Integer, Integer> entry:heroHandBook.entrySet()){
|
||||
System.out.println(entry.getKey()+":"+entry.getValue()+"神将图鉴");
|
||||
|
||||
}
|
||||
List<CommonProto.EveryHeroHandBook> heroHandBookList = new ArrayList<>();
|
||||
heroHandBook.forEach((k,v)->heroHandBookList.add(CommonProto.EveryHeroHandBook.newBuilder().setHeroId(k).setMaxStar(v).build()));
|
||||
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
package com.ljsd.jieling.handler.activity;
|
||||
|
||||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
import com.ljsd.jieling.logic.activity.ActivityLogic;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import org.springframework.stereotype.Component;
|
||||
import rpc.protocols.ActivityProto;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
|
||||
/**
|
||||
* @author lvxinran
|
||||
* @date 2021/4/19
|
||||
* @discribe
|
||||
*/
|
||||
@Component
|
||||
public class FuxingStoreBuyHandler extends BaseHandler<ActivityProto.FuXingStoreBuyRequest> {
|
||||
@Override
|
||||
public MessageTypeProto.MessageType getMessageCode() {
|
||||
return MessageTypeProto.MessageType.FU_XING_STORE_BUY_REQUEST;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processWithProto(ISession iSession, ActivityProto.FuXingStoreBuyRequest proto) throws Exception {
|
||||
ActivityLogic.getInstance().fuxingStoreBuy(iSession,proto.getActivityId());
|
||||
}
|
||||
}
|
|
@ -13,14 +13,14 @@ import org.springframework.stereotype.Component;
|
|||
* @discribe
|
||||
*/
|
||||
@Component
|
||||
public class PokemonBookEnableHandler extends BaseHandler<HeroInfoProto.PokemonBookEnableRequest> {
|
||||
public class AllBookEnableHandler extends BaseHandler<HeroInfoProto.AllBookEnableRequest> {
|
||||
@Override
|
||||
public MessageTypeProto.MessageType getMessageCode() {
|
||||
return MessageTypeProto.MessageType.POKEMON_BOOK_ENABLE_REQUEST;
|
||||
return MessageTypeProto.MessageType.ALL_BOOK_ENABLE_REQUEST;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processWithProto(ISession iSession, HeroInfoProto.PokemonBookEnableRequest proto) throws Exception {
|
||||
HeroLogic.getInstance().pokemonBookEnable(iSession,proto.getBookId(),MessageTypeProto.MessageType.POKEMON_BOOK_ENABLE_REPONSE);
|
||||
public void processWithProto(ISession iSession, HeroInfoProto.AllBookEnableRequest proto) throws Exception {
|
||||
HeroLogic.getInstance().AllBookEnable(iSession,proto.getBookId(),MessageTypeProto.MessageType.ALL_BOOK_ENABLE_REPONSE);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package com.ljsd.jieling.handler.pokemon;
|
||||
|
||||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
import com.ljsd.jieling.logic.hero.HeroLogic;
|
||||
import com.ljsd.jieling.netty.cocdex.PacketNetData;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
|
||||
/**
|
||||
* Description: des
|
||||
* Author: zsx
|
||||
* CreateDate: 2021/3/19 16:40
|
||||
*/
|
||||
public class GetAllPropertyInfoHandler extends BaseHandler {
|
||||
@Override
|
||||
public MessageTypeProto.MessageType getMessageCode() {
|
||||
return MessageTypeProto.MessageType.GET_ALL_PROPERTY_INFO_REQUEST;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process(ISession iSession, PacketNetData netData) throws Exception {
|
||||
HeroLogic.getInstance().allBookFetter(iSession,MessageTypeProto.MessageType.GET_ALL_PROPERTY_INFO_RESPONSE);
|
||||
}
|
||||
}
|
|
@ -1454,4 +1454,43 @@ public class ActivityLogic implements IEventHandler{
|
|||
|
||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),response.build(),true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 福星高照储值
|
||||
*/
|
||||
public void fuxingStoreBuy(ISession session,int activityId) throws Exception {
|
||||
int uid = session.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
ActivityMission activityMission = user.getActivityManager().getActivityMissionMap().get(activityId);
|
||||
SGlobalActivity activity = SGlobalActivity.getsGlobalActivityMap().get(activityId);
|
||||
if(activity.getType()!=ActivityType.LUCKY_GET){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
if(activityMission==null||activityMission.getV()!=0||TimeUtils.now()>activityMission.getCreatTime()){//此活动2为已不可购买状态,1为已购买
|
||||
throw new ErrorCodeException(ErrorCode.ACTIVITY_NOT_OPEN);
|
||||
}
|
||||
|
||||
boolean itemCost = ItemUtil.itemCost(user, SSpecialConfig.getTwiceArrayValue(SSpecialConfig.FU_XING_STORE), 1, 1);
|
||||
if(!itemCost){
|
||||
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
||||
}
|
||||
|
||||
List<SActivityRewardConfig> sActivityRewardConfigs = SActivityRewardConfig.getsActivityRewardConfigByActivityId(activityId);
|
||||
if(sActivityRewardConfigs == null){return;}
|
||||
//已经激活购买的商品
|
||||
//拿到激活当天0点
|
||||
long beginOfDay = TimeUtils.getBeginOfDay(TimeUtils.now());
|
||||
for(SActivityRewardConfig sActivityRewardConfig : sActivityRewardConfigs){
|
||||
ActivityProgressInfo activityProgressInfo = new ActivityProgressInfo();
|
||||
activityProgressInfo.setProgrss((int)(beginOfDay/1000)+(sActivityRewardConfig.getValues()[1][0]-1)*(int)(TimeUtils.ONE_DAY/1000));
|
||||
activityMission.getActivityMissionMap().put(sActivityRewardConfig.getId(), activityProgressInfo);
|
||||
}
|
||||
activityMission.setV(1);
|
||||
//发推送
|
||||
AbstractActivity acticityType = ActivityTypeEnum.getActicityType(activityId);
|
||||
if(acticityType!=null){
|
||||
acticityType.sendActivityProgress(session, activityMission, null);
|
||||
}
|
||||
MessageUtil.sendMessage(session,1,MessageTypeProto.MessageType.FU_XING_STORE_BUY_RESPONSE_VALUE,null,true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,7 +80,8 @@ public interface ActivityType {
|
|||
int SHEJI_ACTIVITY = 60;//社稷大典
|
||||
int GOOD_LUCK= 61;//扭转乾坤
|
||||
int COW_FLY_SKY = 62;//牛气冲天
|
||||
int FIFTEEN_LOGIN = 63;//十五日签到
|
||||
int LUCKY_GET = 63;//福星高照
|
||||
int FIFTEEN_LOGIN = 64;//十五日签到
|
||||
|
||||
int SUB_ACTIVITY = 8000;//易经宝库
|
||||
int SKIN_RECHARGE_ACTIVITY = 71;
|
||||
|
|
|
@ -68,6 +68,7 @@ public enum ActivityTypeEnum {
|
|||
GOOD_LUCK(ActivityType.GOOD_LUCK,DefaultEmptyActivity::new),
|
||||
COW_FLY_SKY(ActivityType.COW_FLY_SKY,CowFlySkyActivity::new),
|
||||
FIFTEEN_LOGIN(ActivityType.FIFTEEN_LOGIN,FifteenActivity::new),
|
||||
LUCKY_GET(ActivityType.LUCKY_GET,LuckyGetActivity::new),
|
||||
|
||||
;
|
||||
private int type;
|
||||
|
|
|
@ -0,0 +1,103 @@
|
|||
package com.ljsd.jieling.logic.activity;
|
||||
|
||||
import com.ljsd.jieling.globals.BIReason;
|
||||
import com.ljsd.jieling.jbean.ActivityMission;
|
||||
import com.ljsd.jieling.jbean.ActivityProgressInfo;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import com.ljsd.jieling.util.ItemUtil;
|
||||
import com.ljsd.jieling.util.MessageUtil;
|
||||
import com.ljsd.jieling.util.ToolsUtil;
|
||||
import config.SActivityRewardConfig;
|
||||
import config.SGlobalActivity;
|
||||
import config.SSpecialConfig;
|
||||
import rpc.protocols.CommonProto;
|
||||
import rpc.protocols.PlayerInfoProto;
|
||||
import util.TimeUtils;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author lvxinran
|
||||
* @date 2021/3/30
|
||||
* @discribe
|
||||
*/
|
||||
public class LuckyGetActivity extends AbstractActivity{
|
||||
|
||||
|
||||
public LuckyGetActivity(int id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initActivity(User user) {
|
||||
SGlobalActivity activity = SGlobalActivity.getsGlobalActivityMap().get(id);
|
||||
|
||||
ActivityLogic.getInstance().initAllActivityMission(user.getActivityManager().getActivityMissionMap(),id);
|
||||
|
||||
long startTime = ToolsUtil.getTimeLong(activity.getStartTimeLong(),activity.getEndTimeLong(),activity.getTime(),user.getPlayerInfoManager().getCreateTime(), 1);
|
||||
long zeroTime = TimeUtils.getBeginOfDay(startTime);
|
||||
int[] onceArrayValue = SSpecialConfig.getOnceArrayValue(SSpecialConfig.FU_XING);
|
||||
long buyTimeDeadLine = zeroTime + TimeUtils.DAY * onceArrayValue[0];//截止购买的时间
|
||||
user.getActivityManager().getActivityMissionMap().get(id).setCreatTime(buyTimeDeadLine);
|
||||
if(buyTimeDeadLine<TimeUtils.now()){
|
||||
//已经结束
|
||||
user.getActivityManager().getActivityMissionMap().get(id).setV(2);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume(User user) throws Exception {
|
||||
ActivityMission activityMission = user.getActivityManager().getActivityMissionMap().get(id);
|
||||
if(activityMission.getV()!=1&&TimeUtils.now()>=activityMission.getCreatTime()){
|
||||
activityMission.setV(2);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean takeReward(ISession session, int missionId) throws Exception {
|
||||
if(missionId!=-1){
|
||||
return super.takeReward(session, missionId);
|
||||
}
|
||||
User user = UserManager.getUser(session.getUid());
|
||||
List<int[][]> reward = new ArrayList<>();
|
||||
getAllMissRewards(user,session,reward);
|
||||
Map<Integer,Integer> itemMap = new HashMap<>();
|
||||
reward.forEach(n-> Arrays.stream(n).forEach(m->itemMap.put(m[0],itemMap.getOrDefault(m[0], 0)+m[1])));
|
||||
|
||||
int[][] rewardArray = ItemUtil.mapToArray(itemMap);
|
||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, rewardArray, BIReason.TAKE_ACTIVITY_REWARD);
|
||||
|
||||
PlayerInfoProto.TakeActivityRewardResponse build = PlayerInfoProto.TakeActivityRewardResponse.newBuilder().setDrop(drop).build();
|
||||
|
||||
reportTakeActivityReward(user,rewardArray,missionId);
|
||||
|
||||
MessageUtil.sendMessage(session, 1, rewardResponseValue, build, true);
|
||||
|
||||
ActivityMission activityMission = user.getActivityManager().getActivityMissionMap().get(id);
|
||||
boolean isAll = true;
|
||||
for(Map.Entry<Integer,ActivityProgressInfo> entry:activityMission.getActivityMissionMap().entrySet()){
|
||||
if(entry.getValue().getState()==0){
|
||||
isAll=false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(isAll){
|
||||
activityMission.setV(2);
|
||||
}
|
||||
|
||||
sendActivityProgress(session,activityMission , null);
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean takeRewardsProcess(ISession session, SActivityRewardConfig sActivityRewardConfig, ActivityProgressInfo activityProgressInfo) throws Exception {
|
||||
if(activityProgressInfo.getProgrss()==0||TimeUtils.nowInt()<activityProgressInfo.getProgrss()){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -1,18 +1,19 @@
|
|||
package com.ljsd.jieling.logic.dao;
|
||||
|
||||
import com.ljsd.common.mogodb.MongoBase;
|
||||
import com.ljsd.jieling.logic.activity.event.EquipEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.mission.GameEvent;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class EquipManager extends MongoBase {
|
||||
|
||||
private Map<String,PropertyItem> equipMap;
|
||||
|
||||
private Set<Integer> equipBookEnabled = new HashSet<>();
|
||||
private Set<Integer> equipList = new HashSet<>();
|
||||
|
||||
private Equip unDetermined;
|
||||
|
||||
|
@ -81,4 +82,22 @@ public class EquipManager extends MongoBase {
|
|||
return equipHandBook;
|
||||
}
|
||||
|
||||
|
||||
public Set<Integer> getEquipBookEnabled() {
|
||||
return equipBookEnabled;
|
||||
}
|
||||
|
||||
public void addEquipBookEnabled(int bookId) {
|
||||
equipBookEnabled.add(bookId);
|
||||
updateString("equipBookEnabled", equipBookEnabled);
|
||||
|
||||
}
|
||||
|
||||
public Set<Integer> getEquipList() {
|
||||
return equipList;
|
||||
}
|
||||
public void addEquipList(int equipId){
|
||||
equipList.add(equipId);
|
||||
updateString("equipList",equipList);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,9 +6,11 @@ import com.ljsd.jieling.logic.activity.event.RemoveHeroEvent;
|
|||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.hero.HongMengAttributeEnum;
|
||||
import config.SSpecialConfig;
|
||||
import org.luaj.vm2.ast.Str;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class HeroManager extends MongoBase {
|
||||
|
||||
|
@ -21,6 +23,7 @@ public class HeroManager extends MongoBase {
|
|||
private Map<Integer,Integer> mustRandomCount= new HashMap<>();
|
||||
|
||||
private Map<Integer,Integer> heroHandBook = new HashMap<>();
|
||||
private Set<Integer> heroHandBookEnabled = new HashSet<>();
|
||||
|
||||
private Map<Integer,Integer> skinInfo = new HashMap<>();
|
||||
|
||||
|
@ -240,5 +243,15 @@ public class HeroManager extends MongoBase {
|
|||
}
|
||||
}
|
||||
|
||||
public Set<Integer> getHeroHandBookEnabled() {
|
||||
return heroHandBookEnabled;
|
||||
}
|
||||
|
||||
public void addHeroHandBookEnabled(int bookId) {
|
||||
heroHandBookEnabled.add(bookId);
|
||||
updateString("heroHandBookEnabled", heroHandBookEnabled);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
package com.ljsd.jieling.logic.dao;
|
||||
|
||||
import com.ljsd.common.mogodb.MongoBase;
|
||||
import com.ljsd.jieling.db.mongo.MongoKey;
|
||||
import com.ljsd.jieling.globals.Global;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public class ItemManager extends MongoBase {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.ljsd.jieling.logic.dao;
|
||||
|
||||
import com.ljsd.common.mogodb.MongoBase;
|
||||
import com.ljsd.jieling.db.mongo.MongoKey;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
|
|
@ -1,50 +1,40 @@
|
|||
package com.ljsd.jieling.logic.expedition;
|
||||
|
||||
import com.ljsd.fight.FamilyHeroInfo;
|
||||
import com.ljsd.jieling.config.clazzStaticCfg.*;
|
||||
import com.ljsd.jieling.config.clazzStaticCfg.CommonStaticConfig;
|
||||
import com.ljsd.jieling.config.clazzStaticCfg.PlayStaticConfig;
|
||||
import com.ljsd.jieling.config.clazzStaticCfg.WorldBossTreasureStaticConfig;
|
||||
import com.ljsd.jieling.core.FunctionIdEnum;
|
||||
import com.ljsd.jieling.core.GlobalsDef;
|
||||
import com.ljsd.jieling.core.HandlerLogicThread;
|
||||
import com.ljsd.jieling.db.redis.RedisKey;
|
||||
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||
import com.ljsd.jieling.exception.ErrorCode;
|
||||
import com.ljsd.jieling.exception.ErrorCodeException;
|
||||
import com.ljsd.jieling.globals.Global;
|
||||
import com.ljsd.jieling.handler.map.behavior.BehaviorUtil;
|
||||
import com.ljsd.jieling.logic.GlobalDataManaager;
|
||||
import com.ljsd.jieling.logic.OnlineUserManager;
|
||||
import com.ljsd.jieling.logic.blood.BloodLogic;
|
||||
import com.ljsd.jieling.logic.dao.*;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.fight.FightUtil;
|
||||
import com.ljsd.jieling.logic.fight.robot.RobotInfo;
|
||||
import com.ljsd.jieling.logic.fight.specialparm.SpecialForTeamBuildEnum;
|
||||
import com.ljsd.jieling.logic.hero.HeroAttributeEnum;
|
||||
import com.ljsd.jieling.logic.hero.HeroLogic;
|
||||
import com.ljsd.jieling.logic.mail.MailLogic;
|
||||
import com.ljsd.jieling.logic.mission.GameEvent;
|
||||
import com.ljsd.jieling.logic.rank.RankContext;
|
||||
import com.ljsd.jieling.logic.rank.RankEnum;
|
||||
import com.ljsd.jieling.logic.rank.RankLogic;
|
||||
import com.ljsd.jieling.logic.rank.rankImpl.AbstractRank;
|
||||
import com.ljsd.jieling.logic.store.BuyGoodsLogic;
|
||||
import com.ljsd.jieling.logic.store.StoreLogic;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import rpc.protocols.CommonProto;
|
||||
import rpc.protocols.Expedition;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
import com.ljsd.jieling.util.*;
|
||||
import com.ljsd.jieling.util.ItemUtil;
|
||||
import com.ljsd.jieling.util.MessageUtil;
|
||||
import com.ljsd.jieling.util.MonsterUtil;
|
||||
import config.*;
|
||||
import manager.STableManager;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.data.redis.core.ZSetOperations;
|
||||
import rpc.protocols.PlayerInfoProto;
|
||||
import rpc.protocols.CommonProto;
|
||||
import rpc.protocols.Expedition;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
import util.MathUtils;
|
||||
import util.StringUtil;
|
||||
import util.TimeUtils;
|
||||
|
||||
import java.rmi.server.UID;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
|
@ -37,10 +37,7 @@ import config.*;
|
|||
import manager.STableManager;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import rpc.protocols.CommonProto;
|
||||
import rpc.protocols.HeroInfoProto;
|
||||
import rpc.protocols.MapInfoProto;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
import rpc.protocols.*;
|
||||
import util.MathUtils;
|
||||
import util.StringUtil;
|
||||
import util.TimeUtils;
|
||||
|
@ -61,7 +58,6 @@ public class HeroLogic{
|
|||
Poster.getPoster().listenEvent(new LeveGiftEventHander(), UserLevelEvent.class);
|
||||
}
|
||||
|
||||
|
||||
public static List<Integer> transTemplate = new ArrayList<>();
|
||||
public static List<Integer> equipSkillPositionTemaplge = new ArrayList<>(6);
|
||||
private static Map<Integer,List<Integer>> transTemplateByHeroPropertyName = new HashMap<>();
|
||||
|
@ -1623,6 +1619,16 @@ public class HeroLogic{
|
|||
return pokenSkillPassiveResult.toString();
|
||||
}
|
||||
|
||||
//图鉴属性加成
|
||||
public void bonuses(Set<Integer> bookEnabled,Map<Integer, Long> heroAllAttribute){
|
||||
if (!bookEnabled.isEmpty()){
|
||||
Map<Integer, SSpiritAnimalBook> config = STableManager.getConfig(SSpiritAnimalBook.class);
|
||||
for(int bootId:bookEnabled){
|
||||
int[][] activePara = config.get(bootId).getActivePara();
|
||||
combinedAttribute(activePara,heroAllAttribute);
|
||||
}
|
||||
}
|
||||
}
|
||||
public Map<Integer,Long> calHeroNotBufferAttribute(User user, Hero hero,boolean isForce,int teamId){
|
||||
Map<Integer, Long> heroAllAttribute = calHeroAllAttribute(user, hero,isForce);
|
||||
heroAllAttribute.put(HeroAttributeEnum.CurHP.getPropertyId(),heroAllAttribute.get(GlobalsDef.HP_TYPE));
|
||||
|
@ -1630,6 +1636,9 @@ public class HeroLogic{
|
|||
Map<String, PropertyItem> equipMap = hero.getCreateType()==1?user.getExpeditionManager().getEquipMap():user.getEquipManager().getEquipMap();
|
||||
|
||||
PokemonManager pokemonManager = user.getPokemonManager();
|
||||
HeroManager heroManager=user.getHeroManager();
|
||||
EquipManager equipManager=user.getEquipManager();
|
||||
|
||||
SCHero scHero = SCHero.getsCHero().get(hero.getTemplateId());
|
||||
if(teamId!=0){
|
||||
int heroNum = user.getTeamPosManager().getTeamPosForHero().get(teamId).size();
|
||||
|
@ -1644,13 +1653,13 @@ public class HeroLogic{
|
|||
}
|
||||
//灵兽图鉴加成
|
||||
Set<Integer> pokemonBookEnabled = pokemonManager.getPokemonBookEnabled();
|
||||
if(!pokemonBookEnabled.isEmpty()){
|
||||
Map<Integer, SSpiritAnimalBook> config = STableManager.getConfig(SSpiritAnimalBook.class);
|
||||
for(int bootId:pokemonBookEnabled){
|
||||
int[][] activePara = config.get(bootId).getActivePara();
|
||||
combinedAttribute(activePara,heroAllAttribute);
|
||||
}
|
||||
}
|
||||
bonuses(pokemonBookEnabled,heroAllAttribute);
|
||||
//神将羁绊加成
|
||||
Set<Integer> heroBookEnabled = heroManager.getHeroHandBookEnabled();
|
||||
bonuses(heroBookEnabled,heroAllAttribute);
|
||||
//魂印图鉴加成
|
||||
Set<Integer> equipBookEnabled = equipManager.getEquipBookEnabled();
|
||||
bonuses(equipBookEnabled,heroAllAttribute);
|
||||
//英雄皮肤加成 记得判断皮肤过期
|
||||
int skin = hero.getSkin();
|
||||
if(skin!=0){
|
||||
|
@ -2745,7 +2754,8 @@ public class HeroLogic{
|
|||
User user = UserManager.getUser(uid);
|
||||
List<String> heroList = new ArrayList<>(1);
|
||||
heroList.add(heroId);
|
||||
ErrorCode err = ItemLogic.getInstance().checkHeroResolve(heroList, user);
|
||||
boolean teamCheck = false;
|
||||
ErrorCode err = ItemLogic.getInstance().checkHeroResolve(heroList, user,teamCheck);
|
||||
if(null!=err){
|
||||
throw new ErrorCodeException(err);
|
||||
}
|
||||
|
@ -3094,7 +3104,116 @@ public class HeroLogic{
|
|||
}
|
||||
|
||||
//============= 灵兽(异妖)系统 ========================
|
||||
public void allBookFetter(ISession session,MessageTypeProto.MessageType messageType) throws Exception {
|
||||
int uid = session.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
EquipManager equipManager = user.getEquipManager();
|
||||
Map<Integer, Integer> equipHandBook = equipManager.getEquipHandBook();
|
||||
HeroInfoProto.GetAllPropertyInfoResponse.Builder builder = HeroInfoProto.GetAllPropertyInfoResponse.newBuilder();
|
||||
//添加灵兽羁绊
|
||||
for(int enabled:user.getPokemonManager().getPokemonBookEnabled()){
|
||||
builder.addAllBookEnabled(enabled);
|
||||
}
|
||||
//添加英雄羁绊
|
||||
for (int enabled:user.getHeroManager().getHeroHandBookEnabled()){
|
||||
builder.addAllBookEnabled(enabled);
|
||||
}
|
||||
|
||||
//添加魂印羁绊
|
||||
for (int enabled:user.getEquipManager().getEquipBookEnabled()){
|
||||
builder.addAllBookEnabled(enabled);
|
||||
}
|
||||
for (Integer equip:equipManager.getEquipList()) {
|
||||
builder.addEquipGot(equip);
|
||||
|
||||
}
|
||||
System.out.println(builder.getAllBookEnabledList()+"羁绊");
|
||||
MessageUtil.sendMessage(session,1,MessageTypeProto.MessageType.GET_ALL_PROPERTY_INFO_RESPONSE_VALUE,builder.build(),true);
|
||||
}
|
||||
/**
|
||||
* 激活所有图鉴
|
||||
* @param session
|
||||
* @param bookId
|
||||
* @param messageType
|
||||
*/
|
||||
public void AllBookEnable(ISession session, int bookId, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
int uid = session.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
SSpiritAnimalBook bookConfig = STableManager.getConfig(SSpiritAnimalBook.class).get(bookId);
|
||||
if(bookConfig==null){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
System.out.println(user.getPlayerInfoManager().getLevel()+":"+bookConfig.getOpenLevel());
|
||||
if(user.getPlayerInfoManager().getLevel()<bookConfig.getOpenLevel()){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
int[] teamers = bookConfig.getTeamers();
|
||||
int[][] reward = bookConfig.getReward();
|
||||
CommonProto.Drop.Builder drop = null;
|
||||
//神将激活
|
||||
if (bookConfig.getFetterType()==1){
|
||||
HeroManager heroManager=user.getHeroManager();
|
||||
if (heroManager.getHeroHandBookEnabled().contains(bookId)){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
Map<Integer, Integer> heroHandBook = heroManager.getHeroHandBook();
|
||||
Set<Integer> hero=new HashSet<>();
|
||||
//将拥有的神将放到set集和中
|
||||
for(Map.Entry<Integer, Integer> entry:heroHandBook.entrySet()){
|
||||
if (entry.getValue()!=0){
|
||||
hero.add(entry.getKey());
|
||||
}
|
||||
}
|
||||
//判断羁绊神将是否在集合
|
||||
for(int tmp:teamers){
|
||||
if(!hero.contains(tmp)){
|
||||
System.out.println(tmp);
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
}
|
||||
//将羁绊加入神将羁绊集合
|
||||
heroManager.addHeroHandBookEnabled(bookId);
|
||||
drop = ItemUtil.drop(user,reward , BIReason.ACTIVATION_HERO_FETTER);
|
||||
|
||||
}
|
||||
//魂印激活
|
||||
if(bookConfig.getFetterType()==2){
|
||||
EquipManager equipManager = user.getEquipManager();
|
||||
if(equipManager.getEquipBookEnabled().contains(bookId)){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
for (int equip:teamers){
|
||||
if (!equipManager.getEquipList().contains(equip)){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
}
|
||||
equipManager.addEquipBookEnabled(bookId);
|
||||
drop = ItemUtil.drop(user,reward , BIReason.ACTIVATION_HERO_FETTER);
|
||||
|
||||
}
|
||||
//灵兽激活
|
||||
if(bookConfig.getFetterType()==3){
|
||||
PokemonManager pokemonManager = user.getPokemonManager();
|
||||
if(pokemonManager.getPokemonBookEnabled().contains(bookId)){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
for(int pokemon:teamers){
|
||||
if(!pokemonManager.getPokemonGot().contains(pokemon)){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
}
|
||||
pokemonManager.addPokemonBookEnabled(bookId);
|
||||
drop = ItemUtil.drop(user,reward , BIReason.ACTIVATION_HERO_FETTER);
|
||||
}
|
||||
PlayerInfoProto.UseAndPriceItemResponse.Builder useAndPriceItemResponse = PlayerInfoProto.UseAndPriceItemResponse.newBuilder();
|
||||
if (drop != null) {
|
||||
useAndPriceItemResponse.setDrop(drop);
|
||||
}
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(session.getUid()));
|
||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),useAndPriceItemResponse.build(),true);
|
||||
|
||||
|
||||
}
|
||||
/**
|
||||
* 获取所有异妖
|
||||
* @param iSession
|
||||
|
@ -3138,8 +3257,7 @@ public class HeroLogic{
|
|||
teamPokemonInfos.add(teamPokemonInfo);
|
||||
}
|
||||
builder.addAllTeamPokemonInfos(teamPokemonInfos)
|
||||
.addAllPokemonGot(pokemonManager.getPokemonGot())
|
||||
.addAllPokemonBookEnabled(pokemonManager.getPokemonBookEnabled());
|
||||
.addAllPokemonGot(pokemonManager.getPokemonGot());
|
||||
}
|
||||
MessageUtil.sendMessage(iSession,1,MessageTypeProto.MessageType.GET_ALL_POKEMON_RESPONSE_VALUE,builder.build(),true);
|
||||
}
|
||||
|
@ -3521,38 +3639,6 @@ public class HeroLogic{
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 激活灵兽图鉴
|
||||
* @param session
|
||||
* @param bookId
|
||||
* @param messageType
|
||||
*/
|
||||
public void pokemonBookEnable(ISession session, int bookId, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
int uid = session.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
PokemonManager pokemonManager = user.getPokemonManager();
|
||||
if(pokemonManager.getPokemonBookEnabled().contains(bookId)){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
SSpiritAnimalBook bookConfig = STableManager.getConfig(SSpiritAnimalBook.class).get(bookId);
|
||||
if(bookConfig==null){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
|
||||
int[] teamers = bookConfig.getTeamers();
|
||||
|
||||
for(int pokemon:teamers){
|
||||
if(!pokemonManager.getPokemonGot().contains(pokemon)){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
}
|
||||
|
||||
pokemonManager.addPokemonBookEnabled(bookId);
|
||||
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(session.getUid()));
|
||||
|
||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),null,true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有皮肤信息
|
||||
|
|
|
@ -141,6 +141,7 @@ public class ItemLogic {
|
|||
int msgId = MessageTypeProto.MessageType.USER_AND_PRICE_ITEM_RESPONSE_VALUE;
|
||||
int uid = iSession.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
EquipManager equipManager=user.getEquipManager();
|
||||
if (itemList.size() == 0) {
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
|
@ -578,7 +579,7 @@ public class ItemLogic {
|
|||
return tempReturn;
|
||||
}
|
||||
|
||||
public ErrorCode checkHeroResolve(List<String> heroIdsList, User user) {
|
||||
public ErrorCode checkHeroResolve(List<String> heroIdsList, User user,boolean teamCheck) {
|
||||
HeroManager heroManager = user.getHeroManager();
|
||||
if (heroIdsList.size() == 0) {
|
||||
return ErrorCode.ITEM_DECOMPOSE_HERO_NO;
|
||||
|
@ -591,11 +592,13 @@ public class ItemLogic {
|
|||
if (hero.getIsLock() == 1) {
|
||||
return ErrorCode.ITEM_DECOMPOSE_HERO_LOCK;
|
||||
}
|
||||
if(teamCheck){
|
||||
int[] teamId = SSpecialConfig.getOnceArrayValue(SSpecialConfig.HERO_RESOLVE_LICENCE);
|
||||
boolean battleArray = HeroLogic.getInstance().isBattleArray(user, heroId, teamId);
|
||||
if (!battleArray) {
|
||||
return ErrorCode.ITEM_DECOMPOSE_HERO_TEAM;
|
||||
}
|
||||
}
|
||||
SItem sItem = SItem.getsItemMap().get(hero.getTemplateId());
|
||||
if (sItem.getIfResolve() == 0) {
|
||||
return ErrorCode.ITEM_DECOMPOSE_HERO_CANT;
|
||||
|
@ -604,6 +607,9 @@ public class ItemLogic {
|
|||
return null;
|
||||
|
||||
}
|
||||
public ErrorCode checkHeroResolve(List<String> heroIdsList, User user) {
|
||||
return checkHeroResolve(heroIdsList,user,true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 同步刷新道具数量
|
||||
|
|
|
@ -108,8 +108,8 @@ public class StoreLogic implements IEventHandler {
|
|||
}
|
||||
}
|
||||
} else if (sStoreTypeConfig.getStoreOpenRule() == 7) {
|
||||
long startTime = ToolsUtil.getTimeLong(sStoreTypeConfig.getStartTimeLong(), sStoreTypeConfig.getEndTimeLong(), ActivityType.OPEN_TYPE_ROLE, 0, 1);
|
||||
long endTime = ToolsUtil.getTimeLong(sStoreTypeConfig.getStartTimeLong(), sStoreTypeConfig.getEndTimeLong(), ActivityType.OPEN_TYPE_ROLE, 0, 2);
|
||||
long startTime = ToolsUtil.getTimeLong(sStoreTypeConfig.getStartTimeLong(), sStoreTypeConfig.getEndTimeLong(), ActivityType.OPEN_TYPE_SERVER, 0, 1);
|
||||
long endTime = ToolsUtil.getTimeLong(sStoreTypeConfig.getStartTimeLong(), sStoreTypeConfig.getEndTimeLong(), ActivityType.OPEN_TYPE_SERVER, 0, 2);
|
||||
if (now < startTime || now > endTime) {
|
||||
continue;
|
||||
}
|
||||
|
@ -376,6 +376,17 @@ public class StoreLogic implements IEventHandler {
|
|||
if(storeManager.getStoreInfoMap().containsKey(sStoreTypeConfig.getId())){
|
||||
continue;
|
||||
}
|
||||
if(sStoreTypeConfig.getStoreOpenRule() == 7){
|
||||
|
||||
long startTime = ToolsUtil.getTimeLong(sStoreTypeConfig.getStartTimeLong(), sStoreTypeConfig.getEndTimeLong(),ActivityType.OPEN_TYPE_SERVER,0, 1);
|
||||
long endTime = ToolsUtil.getTimeLong(sStoreTypeConfig.getStartTimeLong(),sStoreTypeConfig.getEndTimeLong(), ActivityType.OPEN_TYPE_SERVER,0, 2);
|
||||
long now = TimeUtils.now();
|
||||
if(now>startTime&&now<endTime){
|
||||
Map<Integer, Integer> itemNumMap = getStoreItem(sStoreTypeConfig.getId(),sStoreTypeConfig,user);
|
||||
storeManager.newStoreInfo(sStoreTypeConfig.getId(),refreshTimeDelay,startTime,endTime,itemNumMap);
|
||||
}
|
||||
|
||||
}
|
||||
if (sStoreTypeConfig.getStoreOpenRule() == 1 && sStoreTypeConfig.getId() !=8){ //固定商店
|
||||
Map<Integer, Integer> itemNumMap = getStoreItem(sStoreTypeConfig.getId(),sStoreTypeConfig,user);
|
||||
long startTime = 0;
|
||||
|
|
|
@ -568,6 +568,7 @@ public class ItemUtil {
|
|||
if (itemMap.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
EquipManager equipManager=user.getEquipManager();
|
||||
List<CommonProto.Item> itemProtoList = new CopyOnWriteArrayList<>();
|
||||
ItemManager itemManager = user.getItemManager();
|
||||
List<CommonProto.Item> sendToFront = new CopyOnWriteArrayList<>();
|
||||
|
@ -575,6 +576,12 @@ public class ItemUtil {
|
|||
Map<Integer,Integer> extraItem = new HashMap<>(itemMap.size());
|
||||
|
||||
for (Map.Entry<Integer, Long> entry : itemMap.entrySet()) {
|
||||
SItem itemConfig = STableManager.getConfig(SItem.class).get(entry.getKey());
|
||||
if (itemConfig.getItemBaseType()==6){
|
||||
equipManager.addEquipList(entry.getKey());
|
||||
System.out.println(entry.getKey() + "魂印id");
|
||||
}
|
||||
|
||||
SItem sItem = SItem.getsItemMap().get (entry.getKey());
|
||||
long itemNumlimit = sItem.getItemNumlimit();
|
||||
long itemNum = entry.getValue().intValue();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#server info
|
||||
server.id = 10153
|
||||
server.id = 10161
|
||||
server.openTime = 20190101000101
|
||||
server.num = 1
|
||||
server.debug = true
|
||||
|
@ -33,7 +33,7 @@ spring.redis.expireTime = -1
|
|||
#spring.data.mongodb.uri = mongodb://mongouser:ysj#2017#ljsd@111.231.54.96:27017/ysj_wx_1
|
||||
#spring.data.mongodb2.uri = mongodb://mongouser:ysj#2017#ljsd@111.231.54.96:27017/develop_ysj_wx_1
|
||||
#mongodb2 develop
|
||||
spring.data.mongodb.uri = mongodb://60.1.1.14:27017/jieling_10153
|
||||
spring.data.mongodb.uri = mongodb://60.1.1.14:27017/jieling_10161
|
||||
spring.data.mongodbcore.uri = mongodb://60.1.1.14:27017/jl_core
|
||||
#spring.data.mongodb.uri = mongodb://60.1.1.14:27017/jieling_10212
|
||||
mongodb.options.maxWaitTime = 120000
|
||||
|
@ -62,7 +62,7 @@ netty.allTimeout=35
|
|||
|
||||
|
||||
#core
|
||||
services.core.ip=60.1.1.153
|
||||
services.core.ip=60.1.1.161
|
||||
services.core.port=7900
|
||||
services.core.area=1000
|
||||
services.core.id=1
|
||||
|
|
|
@ -97,6 +97,8 @@ public class SSpecialConfig implements BaseConfig {
|
|||
public static final String GUILD_LEADER_PASS_TIME = "GuildLeaderPassTime";//会长不上线移交时长
|
||||
public static final String GUILD_DISMISS_TIME ="GuildDismissTime";//公会全员不上线解散时长
|
||||
public static final String SHEN_ZHUANG = "ShenZhuang";//神装礼包推送等级
|
||||
public static final String FU_XING = "FuXing";//福星高照可购买天数和可领取天数
|
||||
public static final String FU_XING_STORE = "FuXingStore";//福星高照购买解锁奖励
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
|
||||
|
|
|
@ -16,6 +16,12 @@ public class SSpiritAnimalBook implements BaseConfig {
|
|||
|
||||
private int activeForce;
|
||||
|
||||
private int fetterType;
|
||||
|
||||
private int[][] reward;
|
||||
|
||||
private int openLevel;
|
||||
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
|
@ -39,5 +45,17 @@ public class SSpiritAnimalBook implements BaseConfig {
|
|||
return activeForce;
|
||||
}
|
||||
|
||||
public int getFetterType() {
|
||||
return fetterType;
|
||||
}
|
||||
|
||||
public int[][] getReward() {
|
||||
return reward;
|
||||
}
|
||||
|
||||
public int getOpenLevel() {
|
||||
return openLevel;
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue