des
parent
29a6ab23a3
commit
03c948bf9a
|
@ -31,6 +31,17 @@ public class SSpecialConfig implements BaseConfig {
|
|||
public static final String Friend_Gift = "Friend_Gift";//好友赠送友情点
|
||||
public static final String Level_RankingShowNum = "Level_RankingShowNum";//关卡排行
|
||||
|
||||
public static final String lamp_lottery_content_parm = "lamp_lottery_content_parm";//资质13及以上——系统消息
|
||||
public static final String lamp_rankup_hero_content_parm = "lamp_rankup_hero_content_parm";//10星及以上——系统消息
|
||||
public static final String lamp_lottery_differ_content_parm = "lamp_lottery_differ_content_parm";//5及以上——系统消息
|
||||
// public static final String lamp_activate_differ_content_parm = "lamp_activate_differ_content_parm";//5及以上——系统消息
|
||||
public static final String lamp_rankup_differ_content_parm = "lamp_rankup_differ_content_parm";//10阶以上——系统消息
|
||||
public static final String lamp_lottery_equip_content_parm = "lamp_lottery_equip_content_parm";//5及以上——系统消息
|
||||
public static final String lamp_lottery_equipsign_content_parm = "lamp_lottery_equipsign_content_parm";//5及以上——系统消息
|
||||
public static final String lamp_lottery_equiptalisman_content_parm = "lamp_lottery_equiptalisman_content_parm";//5及以上——系统消息
|
||||
public static final String lamp_rankup_equipsign_content_parm = "lamp_rankup_equipsign_content_parm";//5级及以上——系统消息
|
||||
public static final String lamp_rankup_equiptalisman_content_parm = "lamp_rankup_equiptalisman_content_parm";//8星及以上——系统消息
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.ljsd.jieling.chat.logic.ChatLogic;
|
|||
import com.ljsd.jieling.config.SEquipSign;
|
||||
import com.ljsd.jieling.config.SErrorCodeEerverConfig;
|
||||
import com.ljsd.jieling.config.SItem;
|
||||
import com.ljsd.jieling.config.SSpecialConfig;
|
||||
import com.ljsd.jieling.globals.Global;
|
||||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
import com.ljsd.jieling.logic.activity.event.EquipEvent;
|
||||
|
@ -95,7 +96,7 @@ public class UpSoulEquipQuiickHandler extends BaseHandler<HeroInfoProto.UpQuickS
|
|||
builder.addAllSoulEquipIds(consumIds);
|
||||
builder.setEquipId(upQuickSoulEquipRequest.getEquipId());
|
||||
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.UP_SOUL_EQUIP_RESPONSE_VALUE, builder.build(), true);
|
||||
if(soulEquip.getLevel()>=10){
|
||||
if(soulEquip.getLevel()>= SSpecialConfig.getIntegerValue(SSpecialConfig.lamp_rankup_equipsign_content_parm)){
|
||||
SItem sItem = SItem.getsItemMap().get(soulEquip.getEquipId());
|
||||
String message = SErrorCodeEerverConfig.getI18NMessage("lamp_rankup_equipsign_content", new Object[]{user.getPlayerInfoManager().getNickName(), sItem.getName(),soulEquip.getLevel()});
|
||||
ChatLogic.getInstance().sendSysChatMessage(message, Global.DILIGENT,sItem.getId(),0,0,0,0,0);
|
||||
|
|
|
@ -698,7 +698,7 @@ public class HeroLogic {
|
|||
targetHero.setStarBreakId(scHeroRankUpConfig.getId());
|
||||
user.getUserMissionManager().onGameEvent(user,GameEvent.HERO_UP,2,targetHero.getTemplateId(),targetHero.getStar());
|
||||
MessageUtil.sendMessage(session,1,MessageTypeProto.MessageType.UP_HERO_STAR_RESPONSE_VALUE,baseBuilder.build(),true);
|
||||
if(targetHero.getStar()>=10){
|
||||
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);
|
||||
}
|
||||
|
@ -1753,7 +1753,7 @@ public class HeroLogic {
|
|||
if(pokemon.getAllStage()==1){
|
||||
message = SErrorCodeEerverConfig.getI18NMessage("lamp_activate_differ_content", new Object[]{user.getPlayerInfoManager().getNickName(),sDifferDemonsConfig.getName() });
|
||||
|
||||
}else if(pokemon.getAllStage()>=10){
|
||||
}else if(pokemon.getAllStage()>=SSpecialConfig.getIntegerValue(SSpecialConfig.lamp_rankup_differ_content_parm)){
|
||||
message = SErrorCodeEerverConfig.getI18NMessage("lamp_rankup_differ_content", new Object[]{user.getPlayerInfoManager().getNickName(), sDifferDemonsConfig.getName(),pokemon.getAllStage()});
|
||||
}
|
||||
ChatLogic.getInstance().sendSysChatMessage(message,Global.DILIGENT,sDifferDemonsConfig.getId(),0,0,0,0,0);
|
||||
|
|
|
@ -498,7 +498,7 @@ public class ItemLogic {
|
|||
Poster.getPoster().dispatchEvent(new EspecialEquipUpEvent(user.getId(),0, user.getEquipManager().getEspecialEquipMap().get(equipId).getStar()));
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.ESPECIAL_EQUIP,especialEquip.getStar()+1);
|
||||
MessageUtil.sendMessage(session,1,MessageTypeProto.MessageType.UP_HERO_STAR_RESPONSE_VALUE,null,true);
|
||||
if(especialEquip.getStar()>=8){
|
||||
if(especialEquip.getStar()>=SSpecialConfig.getIntegerValue(SSpecialConfig.lamp_rankup_equiptalisman_content_parm)){
|
||||
SItem sItem = SItem.getsItemMap().get(especialEquip.getEquipId());
|
||||
String message = SErrorCodeEerverConfig.getI18NMessage("lamp_rankup_equiptalisman_content", new Object[]{user.getPlayerInfoManager().getNickName(), sItem.getName(),especialEquip.getStar()});
|
||||
ChatLogic.getInstance().sendSysChatMessage(message,Global.DILIGENT,sItem.getId(),0,0,0,0,0);
|
||||
|
|
|
@ -398,7 +398,7 @@ public class WorkShopLogic {
|
|||
while (nums-->0){
|
||||
Equip equip = new Equip(uid, equipTid, workShopLevel, runneIdsList);
|
||||
SEquipConfig sEquipConfig = SEquipConfig.getsEquipConfigById(equip.getEquipId());
|
||||
if (sEquipConfig.getQuality() >= 5) {
|
||||
if (sEquipConfig.getQuality() >= SSpecialConfig.getIntegerValue(SSpecialConfig.lamp_lottery_equip_content_parm)) {
|
||||
String nickName = user.getPlayerInfoManager().getNickName();
|
||||
String message = SErrorCodeEerverConfig.getI18NMessage("lamp_lottery_equip_content", new Object[]{
|
||||
nickName, ItemUtil.equipQulityNameMap.get(sEquipConfig.getQuality()),SItem.getsItemMap().get(equip.getEquipId()).getName()});
|
||||
|
|
|
@ -13,15 +13,11 @@ import com.ljsd.jieling.handler.map.TemporaryItems;
|
|||
import com.ljsd.jieling.ktbeans.KtEventUtils;
|
||||
import com.ljsd.jieling.ktbeans.parmsBean.ParamEventBean;
|
||||
import com.ljsd.jieling.logic.OnlineUserManager;
|
||||
import com.ljsd.jieling.logic.activity.event.ArenaChallengeEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
import com.ljsd.jieling.logic.activity.event.UseItemEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.UserLevelEvent;
|
||||
import com.ljsd.jieling.logic.dao.*;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.hero.HeroLogic;
|
||||
import com.ljsd.jieling.logic.item.ItemLog;
|
||||
import com.ljsd.jieling.logic.item.ItemLogic;
|
||||
import com.ljsd.jieling.logic.mail.MailLogic;
|
||||
import com.ljsd.jieling.logic.mission.GameEvent;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
|
@ -504,7 +500,7 @@ public class ItemUtil {
|
|||
eventType = ParamEventBean.UserCurrencyEvent;
|
||||
}
|
||||
KtEventUtils.onKtEvent(user, eventType,reason,GlobalsDef.addReason,entry.getKey(),itemNum,item.getItemNum());
|
||||
if(sItem.getItemType() == GlobalItemType.POKENMON_COMONPENT){
|
||||
if(sItem.getItemType() == GlobalItemType.POKENMON_COMONPENT && sItem.getQuantity()>=SSpecialConfig.getIntegerValue(SSpecialConfig.lamp_lottery_differ_content_parm)){
|
||||
SDifferDemonsConfig sDifferDemonsConfig = SDifferDemonsConfig.sDifferDemonsConfigMapByComId.get(sItem.getId());
|
||||
String nickName = user.getPlayerInfoManager().getNickName();
|
||||
String message = SErrorCodeEerverConfig.getI18NMessage("lamp_lottery_differ_content", new Object[]{nickName,sDifferDemonsConfig.getName(),sItem.getName()});
|
||||
|
@ -892,6 +888,7 @@ public class ItemUtil {
|
|||
String reward = getLimitReward(equipMap,filter);
|
||||
int nowTime =(int) (TimeUtils.now()/1000);
|
||||
MailLogic.getInstance().sendMail(user.getId(),title,content,reward,nowTime,Global.MAIL_EFFECTIVE_TIME);
|
||||
MessageUtil.nofityBagIsFull(user);
|
||||
return;
|
||||
}
|
||||
StringBuilder reward = new StringBuilder();
|
||||
|
@ -920,6 +917,7 @@ public class ItemUtil {
|
|||
if (reward.length() > 0) {
|
||||
int nowTime = (int) (TimeUtils.now() / 1000);
|
||||
MailLogic.getInstance().sendMail(user.getId(), title, content, reward.toString(), nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||
MessageUtil.nofityBagIsFull(user);
|
||||
}
|
||||
dropBuilder.addAllEquipId(equipList);
|
||||
dropBuilder.addAllEspecialEquipId(especialEquip);
|
||||
|
@ -998,7 +996,7 @@ public class ItemUtil {
|
|||
equipList.add(CBean2Proto.getEquipProto(soulEquip));
|
||||
msgTem="lamp_lottery_equipsign_content";
|
||||
}
|
||||
if (item.getQuantity() >= 5) {
|
||||
if (item.getQuantity() >= SSpecialConfig.getIntegerValue(msgTem+"_parm")) {
|
||||
String nickName = user.getPlayerInfoManager().getNickName();
|
||||
String message = SErrorCodeEerverConfig.getI18NMessage(msgTem, new Object[]{nickName, equipQulityNameMap.get(item.getQuantity()), item.getName()});
|
||||
ChatLogic.getInstance().sendSysChatMessage(message,Global.LUCKY_LUCK,equipId,0,0,0,0,0);
|
||||
|
@ -1025,6 +1023,7 @@ public class ItemUtil {
|
|||
String reward = getLimitReward(cardMap,null);
|
||||
int nowTime =(int) (TimeUtils.now()/1000);
|
||||
MailLogic.getInstance().sendMail(user.getId(),title,content,reward,nowTime,Global.MAIL_EFFECTIVE_TIME);
|
||||
MessageUtil.nofityBagIsFull(user);
|
||||
return;
|
||||
}
|
||||
List<CommonProto.Hero> heroList = new CopyOnWriteArrayList<>();
|
||||
|
@ -1046,6 +1045,7 @@ public class ItemUtil {
|
|||
if (reward.length() > 0) {
|
||||
int nowTime = (int) (TimeUtils.now() / 1000);
|
||||
MailLogic.getInstance().sendMail(user.getId(), title, content, reward.toString(), nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||
MessageUtil.nofityBagIsFull(user);
|
||||
}
|
||||
dropBuilder.addAllHero(heroList);
|
||||
}
|
||||
|
@ -1058,7 +1058,7 @@ public class ItemUtil {
|
|||
heroManager.addHero(hero);
|
||||
heroList.add(CBean2Proto.getHero(hero));
|
||||
SCHero scHero = SCHero.getsCHero().get(hero.getTemplateId());
|
||||
if (scHero.getNatural() >= 13) {
|
||||
if (scHero.getNatural() >= SSpecialConfig.getIntegerValue(SSpecialConfig.lamp_lottery_content_parm)) {
|
||||
String message = SErrorCodeEerverConfig.getI18NMessage("lamp_lottery_content", new Object[]{playerInfoManager.getNickName(), scHero.getNatural(), scHero.getReadingName()});
|
||||
if (!message.isEmpty()){
|
||||
ChatLogic.getInstance().sendSysChatMessage(message,Global.LUCKY_LUCK,hero.getTemplateId(),0,0,0,0,0);
|
||||
|
|
|
@ -2,9 +2,11 @@ package com.ljsd.jieling.util;
|
|||
|
||||
import com.google.protobuf.GeneratedMessage;
|
||||
import com.googlecode.protobuf.format.JsonFormat;
|
||||
import com.ljsd.jieling.config.SErrorCodeEerverConfig;
|
||||
import com.ljsd.jieling.core.GlobalsDef;
|
||||
import com.ljsd.jieling.core.HandlerLogicThread;
|
||||
import com.ljsd.jieling.core.SimpleTransaction;
|
||||
import com.ljsd.jieling.globals.Global;
|
||||
import com.ljsd.jieling.logic.OnlineUserManager;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
|
@ -202,6 +204,16 @@ public class MessageUtil {
|
|||
session.writeAndFlush(byteBuf);
|
||||
session.putBackMassageToMap(byteBuf);
|
||||
}
|
||||
|
||||
public static void nofityBagIsFull(User user){
|
||||
ISession session = OnlineUserManager.getSessionByUid(user.getId());
|
||||
if(session!=null){
|
||||
String bag_full_tips = SErrorCodeEerverConfig.getI18NMessage("bag_full_tips");
|
||||
GeneratedMessage generatedMessage = CommonProto.ErrorResponse.newBuilder().setErrCode(Global.SHOW_TIPS_ERROR).setErrMsg(bag_full_tips).build();
|
||||
sendIndicationMessage(session,1, MessageTypeProto.MessageType.ERROR_CODE_INDICATION_VALUE,generatedMessage,true);
|
||||
}
|
||||
|
||||
}
|
||||
//
|
||||
// public static void sendResponse(Msg msg, int msgId, GeneratedMessage generatedMessage) throws Exception {
|
||||
// String protoEntity = Base64.getEncoder().encodeToString(generatedMessage.toByteArray());
|
||||
|
|
Loading…
Reference in New Issue