称号修改
parent
44b3b2881f
commit
8987ba9700
|
@ -43,6 +43,7 @@ import com.ljsd.jieling.netty.cocdex.Tea;
|
||||||
import com.ljsd.jieling.network.server.ProtocolsManager;
|
import com.ljsd.jieling.network.server.ProtocolsManager;
|
||||||
import com.ljsd.jieling.network.session.ISession;
|
import com.ljsd.jieling.network.session.ISession;
|
||||||
import com.ljsd.jieling.thread.task.RPCWorldServerTask;
|
import com.ljsd.jieling.thread.task.RPCWorldServerTask;
|
||||||
|
import com.ljsd.jieling.util.CBean2Proto;
|
||||||
import rpc.protocols.CommonProto;
|
import rpc.protocols.CommonProto;
|
||||||
import rpc.protocols.MessageTypeProto;
|
import rpc.protocols.MessageTypeProto;
|
||||||
import rpc.protocols.PlayerInfoProto;
|
import rpc.protocols.PlayerInfoProto;
|
||||||
|
@ -347,7 +348,8 @@ public class GlobalDataManaager implements IManager {
|
||||||
GuildLogic.getInstance().flushEveryDay(user,fBuilder);
|
GuildLogic.getInstance().flushEveryDay(user,fBuilder);
|
||||||
ExpeditionLogic.getInstance().flushUserdataEveryDay(user);
|
ExpeditionLogic.getInstance().flushUserdataEveryDay(user);
|
||||||
MapLogic.getInstance().flushEndlessTreasure(user);
|
MapLogic.getInstance().flushEndlessTreasure(user);
|
||||||
|
//检测下称号
|
||||||
|
CBean2Proto.getUserTitleList(user);
|
||||||
user.getUserMissionManager().onGameEvent(user, GameEvent.DAILY_REFRESH,0);
|
user.getUserMissionManager().onGameEvent(user, GameEvent.DAILY_REFRESH,0);
|
||||||
// user.getUserMissionManager().onGameEvent(user, GameEvent.BLOODY_REFRESH,0);
|
// user.getUserMissionManager().onGameEvent(user, GameEvent.BLOODY_REFRESH,0);
|
||||||
FriendLogic.getInstance().refreshState(session);
|
FriendLogic.getInstance().refreshState(session);
|
||||||
|
|
|
@ -740,9 +740,9 @@ public class ArenaLogic {
|
||||||
int[][] titleReward = value.getTitleReward();
|
int[][] titleReward = value.getTitleReward();
|
||||||
if(titleReward !=null&& titleReward.length>0){
|
if(titleReward !=null&& titleReward.length>0){
|
||||||
for(int[] reward:titleReward){
|
for(int[] reward:titleReward){
|
||||||
int time = TimeUtils.nowInt() + reward[1];
|
long time = TimeUtils.getBeginOfDay(TimeUtils.nowInt() + reward[1])*1000+TimeUtils.DAY;
|
||||||
user.getPlayerInfoManager().putUserTitleValidTime(reward[0],(long)time*1000);
|
user.getPlayerInfoManager().putUserTitleValidTime(reward[0],time);
|
||||||
PlayerInfoProto.UserTitleAddIndication.newBuilder().setDecorationId(reward[0]).setTime(time);
|
PlayerInfoProto.UserTitleAddIndication.newBuilder().setDecorationId(reward[0]).setTime((int)(time/1000));
|
||||||
MessageUtil.sendIndicationMessage(OnlineUserManager.getSessionByUid(user.getId()),1, MessageTypeProto.MessageType.USER_TITLE_ADD_INDICATION_VALUE,null,true);
|
MessageUtil.sendIndicationMessage(OnlineUserManager.getSessionByUid(user.getId()),1, MessageTypeProto.MessageType.USER_TITLE_ADD_INDICATION_VALUE,null,true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,33 +146,6 @@ public class MinuteTask extends Thread {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ArenaLogic.getInstance().worldSendReward();
|
ArenaLogic.getInstance().worldSendReward();
|
||||||
if(STableManager.getConfig(SRechargeCommodityNewConfig.class).size()!= SRechargeCommodityNewConfig.configMap.size()){
|
|
||||||
|
|
||||||
Map<Integer, SRechargeCommodityNewConfig> config = STableManager.getConfig(SRechargeCommodityNewConfig.class);
|
|
||||||
Map<Integer,SRechargeCommodityNewConfig> tempConfigMap = new HashMap<>();
|
|
||||||
Map<String,SRechargeCommodityNewConfig> tempSdkConfigMap = new HashMap<>();
|
|
||||||
Map<Integer, List<Integer>> tempConfigTypeMap = new HashMap<>();
|
|
||||||
for(SRechargeCommodityNewConfig newConfig : config.values()){
|
|
||||||
newConfig.setCondition(newConfig.initConditon(newConfig));
|
|
||||||
tempConfigMap.put(newConfig.getId(),newConfig);
|
|
||||||
tempSdkConfigMap.put(newConfig.getRechargeId(),newConfig);
|
|
||||||
tempSdkConfigMap.put(newConfig.getRechargeId2(),newConfig);
|
|
||||||
tempSdkConfigMap.put(newConfig.getRechargeId3(),newConfig);
|
|
||||||
if(tempConfigTypeMap.containsKey(newConfig.getType())){
|
|
||||||
tempConfigTypeMap.get(newConfig.getType()).add(newConfig.getId());
|
|
||||||
}else{
|
|
||||||
List<Integer> list = new ArrayList<>();
|
|
||||||
list.add(newConfig.getId());
|
|
||||||
tempConfigTypeMap.put(newConfig.getType(),list);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// if(configMap == null){
|
|
||||||
SRechargeCommodityNewConfig.configMap = tempConfigMap;
|
|
||||||
LOGGER.info("修复重新加载Recharge");
|
|
||||||
SRechargeCommodityNewConfig.sdkconfigMap = tempSdkConfigMap;
|
|
||||||
SRechargeCommodityNewConfig.configTypeMap = tempConfigTypeMap;
|
|
||||||
|
|
||||||
}
|
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
LOGGER.error("Exception::=>{}",e.toString());
|
LOGGER.error("Exception::=>{}",e.toString());
|
||||||
|
|
|
@ -149,7 +149,7 @@ public class CBean2Proto {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取玩家皮肤列表
|
* 获取玩家称号列表
|
||||||
* @param user
|
* @param user
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -158,13 +158,15 @@ public class CBean2Proto {
|
||||||
// 获取玩家已使用头像框列表
|
// 获取玩家已使用头像框列表
|
||||||
Map<Integer, Long> validTime = user.getPlayerInfoManager().getUserTitleValidTime();
|
Map<Integer, Long> validTime = user.getPlayerInfoManager().getUserTitleValidTime();
|
||||||
|
|
||||||
long now = TimeUtils.now() / 1000;
|
long now = TimeUtils.now();
|
||||||
|
|
||||||
|
int passId = 0;
|
||||||
Iterator<Map.Entry<Integer, Long>> it = validTime.entrySet().iterator();
|
Iterator<Map.Entry<Integer, Long>> it = validTime.entrySet().iterator();
|
||||||
while (it.hasNext()){
|
while (it.hasNext()){
|
||||||
Map.Entry<Integer, Long> next = it.next();
|
Map.Entry<Integer, Long> next = it.next();
|
||||||
// 过期的删除,其他返回给客户端
|
// 过期的删除,其他返回给客户端
|
||||||
if (next.getValue() != 0 && now >= next.getValue()){
|
if (next.getValue() != 0 && now >= next.getValue()){
|
||||||
|
passId = next.getKey();
|
||||||
it.remove();
|
it.remove();
|
||||||
}else {
|
}else {
|
||||||
CommonProto.UserTitleInfo.Builder build = CommonProto.UserTitleInfo.newBuilder();
|
CommonProto.UserTitleInfo.Builder build = CommonProto.UserTitleInfo.newBuilder();
|
||||||
|
@ -172,6 +174,12 @@ public class CBean2Proto {
|
||||||
userTitleLists.add(build.build());
|
userTitleLists.add(build.build());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(passId!=0){
|
||||||
|
|
||||||
|
PlayerInfoProto.UserTitleAddIndication.Builder builder = PlayerInfoProto.UserTitleAddIndication.newBuilder().setDecorationId(passId).setTime(-1);
|
||||||
|
MessageUtil.sendIndicationMessage(OnlineUserManager.getSessionByUid(user.getId()),1, MessageTypeProto.MessageType.USER_TITLE_ADD_INDICATION_VALUE,builder.build(),true);
|
||||||
|
|
||||||
|
}
|
||||||
// 数据库更新
|
// 数据库更新
|
||||||
user.getPlayerInfoManager().setUserTitleValidTime(validTime);
|
user.getPlayerInfoManager().setUserTitleValidTime(validTime);
|
||||||
return userTitleLists;
|
return userTitleLists;
|
||||||
|
|
Loading…
Reference in New Issue