跑马灯

back_recharge
zhangshanxue 2019-10-16 11:25:03 +08:00
parent 146444119f
commit a2ac1eaf28
3 changed files with 18 additions and 7 deletions

View File

@ -180,11 +180,13 @@ public class ChatLogic {
/**
*
*
* @param multiple 0
*/
public void sendSysChatMessage(String message,int messageType ,int itemId, int type,int startTime, int endTime, int priorityLevel, int frequency) {
public void sendSysChatMessage(String message,int messageType ,int itemId, int type,int startTime, int endTime, int priorityLevel, int multiple) {
long messageId = RedisUtil.getInstence().increment(GameApplication.serverId + RedisKey.CHAT_SYS_MSG_ID+ GameApplication.serverId);
ChatProto.ChatInfo chatInfo = CBean2Proto.getSysChatInfoBuilder(message,messageType,itemId ,type,startTime,endTime,priorityLevel,frequency,messageId);
ChatProto.ChatInfo chatInfo = CBean2Proto.getSysChatInfoBuilder(message,messageType,itemId ,type,startTime,endTime,priorityLevel,multiple,messageId);
MessageCache.addSystemMsg(chatInfo,messageId);
}
}

View File

@ -15,6 +15,7 @@ import com.ljsd.jieling.logic.dao.root.User;
import com.ljsd.jieling.protocols.*;
import config.SMainLevelConfig;
import config.SMonsterConfig;
import config.SSpecialConfig;
import manager.STableManager;
import util.StringUtil;
import util.TimeUtils;
@ -279,7 +280,7 @@ public class CBean2Proto {
return chatInfo.build();
}
public static ChatProto.ChatInfo getSysChatInfoBuilder(String message,int messageType,int itemId,int type,int startTime, int endTime, int priorityLevel, int frequency,long messageId) {
public static ChatProto.ChatInfo getSysChatInfoBuilder(String message,int messageType,int itemId,int type,int startTime, int endTime, int priorityLevel, int multiple,long messageId) {
ChatProto.ChatInfo.Builder chatInfo = ChatProto.ChatInfo.newBuilder();
chatInfo.setItemId(itemId);
chatInfo.setMessageId(messageId);
@ -287,14 +288,18 @@ public class CBean2Proto {
chatInfo.setMsg(message);
chatInfo.setType(type);
chatInfo.setMessageType(messageType);
if (type == 1){
if (multiple > 0 ){
chatInfo.setStartTime(startTime);
chatInfo.setEndTime(endTime);
chatInfo.setPriorityLevel(priorityLevel);
chatInfo.setFrequency(frequency);
chatInfo.setFrequency(0);
chatInfo.setSpeed(SSpecialConfig.getIntegerValue(SSpecialConfig.LAMP_TEXT_SPEED));
chatInfo.setMultiple(multiple);
}
return chatInfo.build();
}
public static CommonProto.Friend getFriendInfo(int friendId, FriendManager friendManager) throws Exception {
User user = UserManager.getUser(friendId);
PlayerManager playerInfoManager = user.getPlayerInfoManager();

View File

@ -7,6 +7,9 @@ import util.StringUtil;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
*
*/
@Table(name = "SpecialConfig")
public class SSpecialConfig implements BaseConfig {
private static Map<String, String> enumers;
@ -45,7 +48,8 @@ public class SSpecialConfig implements BaseConfig {
public static final String SUNLONG_DAILYTASKS = "Sunlong_DailyTasks";//孙龙的宝藏每日、每周、每月任务个数
public static final String SUNLONG_COST = "Sunlong_Cost";//孙龙的宝藏购买等级
public static final String SUNLONG_INTEGRAL = "Sunlong_Integral";//孙龙的宝藏每日积分礼包
public static final String SUNLONG_REWARD = "Sunlong_Reward";//孙龙的宝藏礼包
public static final String SUNLONG_REWARD = "Sunlong_Reward";//孙龙的宝藏礼包\
public static final String LAMP_TEXT_SPEED = "lamp_text_speed";//跑马灯速度
@Override
public void init() throws Exception {