战报功能和法宝公告,初版未测试
parent
3cf66b94fe
commit
9ea1ceec59
|
@ -16,6 +16,8 @@ import com.ljsd.jieling.logic.activity.eventhandler.UserForceUpEventHandler;
|
|||
import com.ljsd.jieling.logic.dao.RechargeInfo;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.fight.FightRecordLogic;
|
||||
import com.ljsd.jieling.logic.fight.FightUtil;
|
||||
import com.ljsd.jieling.logic.hero.HeroLogic;
|
||||
import com.ljsd.jieling.network.server.ProtocolsManager;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
|
@ -68,8 +70,6 @@ public class GmService implements RPCRequestGMIFace.Iface {
|
|||
try {
|
||||
String[] parameters = java.util.Arrays.copyOfRange(arg, 1, arg.length);
|
||||
|
||||
|
||||
|
||||
if (obj instanceof GmRoleAbstract) {
|
||||
//todo
|
||||
Map<Integer, String> rechargeInfoMap = new HashMap<>();
|
||||
|
@ -109,7 +109,7 @@ public class GmService implements RPCRequestGMIFace.Iface {
|
|||
int uid = Integer.parseInt(value);
|
||||
sendIds.add(uid);
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
String[] ids = parameters[0].split("#");
|
||||
for (String id : ids) {
|
||||
sendIds.add(Integer.valueOf(id));
|
||||
|
@ -135,6 +135,15 @@ public class GmService implements RPCRequestGMIFace.Iface {
|
|||
} else {
|
||||
LOGGER.info("gm________________________start:"+cmd);
|
||||
obj.exec(parameters);
|
||||
|
||||
if (cmd.contains("fightrecord")){
|
||||
if (cmd.contains("delete")){
|
||||
FightRecordLogic.getInstance().delete();
|
||||
}else {
|
||||
String oneRecord = FightRecordLogic.getInstance().getOneRecord(parameters[0]);
|
||||
result.setResultMsg(oneRecord);
|
||||
}
|
||||
}
|
||||
LOGGER.info("gm________________________end:"+cmd);
|
||||
}
|
||||
|
||||
|
|
|
@ -232,7 +232,7 @@ public class ChatLogic {
|
|||
* 系统消息
|
||||
* @param multiple 跑马灯次数 0 不显示
|
||||
*/
|
||||
public void sendSysChatMessage(String message,int messageType ,int itemId, int type,int startTime, int endTime, int priorityLevel, int multiple) {
|
||||
public void sendSysChatMessage(String message,int messageType ,String 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,multiple,messageId);
|
||||
MessageCache.addSystemMsg(chatInfo,messageId);
|
||||
|
|
|
@ -119,7 +119,7 @@ public class GetLuckWheelRandHandler extends BaseHandler<PlayerInfoProto.GetLuck
|
|||
String nickName = user.getPlayerInfoManager().getNickName();
|
||||
String message = SErrorCodeEerverConfig.getI18NMessage("Dial_Reward_txt", new Object[]{nickName, sItem.getName()});
|
||||
int sysType = sGlobalActivity.getType() == 30 ? Global.LUCKWHEEL : Global.LUCKWHEEL_ADVANCE;
|
||||
ChatLogic.getInstance().sendSysChatMessage(message, sysType, 0, 0, 0, 0, 0, 0);
|
||||
ChatLogic.getInstance().sendSysChatMessage(message, sysType, "0", 0, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ import com.ljsd.jieling.handler.BaseHandler;
|
|||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.fight.FightDispatcher;
|
||||
import com.ljsd.jieling.logic.fight.FightUtil;
|
||||
import com.ljsd.jieling.logic.fight.GameFightType;
|
||||
import com.ljsd.jieling.logic.fight.PVEFightEvent;
|
||||
import com.ljsd.jieling.logic.fight.result.FightResult;
|
||||
|
@ -90,6 +91,7 @@ public class NewGeneralAttackHandler extends BaseHandler<ActivityProto.NewGenera
|
|||
.setHeroFightInfos(fightResult.getFightTeamInfo())
|
||||
.addAllMonsterList(fightResult.getMonsterTeamList())
|
||||
.setFightType(GameFightType.DailyChallenge.getFightType().getType())
|
||||
.setFightId(FightUtil.getFightId(user.getId(),GameFightType.DailyChallenge))
|
||||
.build();
|
||||
|
||||
// 战斗结果,第二位是伤害
|
||||
|
|
|
@ -3149,6 +3149,7 @@ public class MapLogic {
|
|||
.setHeroFightInfos(fightResult.getFightTeamInfo())
|
||||
.addAllMonsterList(fightResult.getMonsterTeamList())
|
||||
.setFightType(GameFightType.DailyChallenge.getFightType().getType())
|
||||
.setFightId(FightUtil.getFightId(user.getId(),GameFightType.DailyChallenge))
|
||||
.build();
|
||||
int[] checkResult = fightResult.getCheckResult();
|
||||
builder.setFightData(fightData);
|
||||
|
|
|
@ -192,6 +192,7 @@ public class BehaviorUtil {
|
|||
fightData.setFightSeed(seed);
|
||||
fightData.setFightMaxTime(maxTime);
|
||||
fightData.setFightType(FightType.MapExploreFight.getType());
|
||||
fightData.setFightId(FightUtil.getFightId(user.getId(),FightType.MapExploreFight.getType()));
|
||||
fightStartRespons.setFightData(fightData);
|
||||
|
||||
|
||||
|
@ -357,6 +358,7 @@ public class BehaviorUtil {
|
|||
fightData.setFightSeed(seed);
|
||||
fightData.setFightType(fightType.getType());
|
||||
fightData.setFightMaxTime(maxTime);
|
||||
fightData.setFightId(FightUtil.getFightId(user.getId(),fightType.getType()));
|
||||
fightStartRespons.setFightData(fightData);
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
package com.ljsd.jieling.kefu;
|
||||
|
||||
public class Cmd_fightrecord extends GmAbstract {
|
||||
|
||||
@Override
|
||||
public boolean exec(String[] args) throws Exception {
|
||||
if (args.length < 2) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -34,7 +34,7 @@ public class Cmd_sendmsg extends GmAbstract {
|
|||
String content = stringBuilder.toString();
|
||||
Gson gson = new Gson();
|
||||
ChatProto.ChatInfo.Builder chatInfo = ChatProto.ChatInfo.newBuilder();
|
||||
chatInfo.setItemId(0);
|
||||
chatInfo.setItemId("0");
|
||||
chatInfo.setMessageId(0);
|
||||
chatInfo.setTimes(System.currentTimeMillis());
|
||||
chatInfo.setMsg(content);
|
||||
|
|
|
@ -257,6 +257,7 @@ public class SituationLogic {
|
|||
.setHeroFightInfos(fightResult.getFightTeamInfo())
|
||||
.addAllMonsterList(fightResult.getMonsterTeamList())
|
||||
.setFightType(GameFightType.DailyChallenge.getFightType().getType())
|
||||
.setFightId(FightUtil.getFightId(user.getId(),GameFightType.DailyChallenge))
|
||||
.build();
|
||||
int[] checkResult = fightResult.getCheckResult();
|
||||
builder.setFightData(fightData);
|
||||
|
@ -299,7 +300,14 @@ public class SituationLogic {
|
|||
builder.setSeed(fightSeed);
|
||||
builder.setFightTeamInfo(fightTeamInfo);
|
||||
builder.setMonsterTeamList(monsterfightTeamInfos);
|
||||
CommonProto.FightData fightData = CommonProto.FightData.newBuilder().setFightType(fightEvent.getFightType().getFightType().getType()).setHeroFightInfos(fightTeamInfo).addAllMonsterList(monsterfightTeamInfos).setFightSeed(fightSeed).setFightMaxTime(fightEvent.getMostTime()).build();
|
||||
CommonProto.FightData fightData = CommonProto.FightData.newBuilder()
|
||||
.setFightType(fightEvent.getFightType().getFightType().getType())
|
||||
.setHeroFightInfos(fightTeamInfo)
|
||||
.addAllMonsterList(monsterfightTeamInfos)
|
||||
.setFightSeed(fightSeed)
|
||||
.setFightMaxTime(fightEvent.getMostTime())
|
||||
.setFightId(FightUtil.getFightId(fightEvent.getAttackUid(),fightEvent.getFightType()))
|
||||
.build();
|
||||
builder.setFightData(fightData);
|
||||
return builder.build();
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ public class LuckyCatActivity extends AbstractActivity {
|
|||
SItem sItem = SItem.getsItemMap().get(temp2[0]);
|
||||
|
||||
String message = SErrorCodeEerverConfig.getI18NMessage("luck_cat_take_reward_content", new Object[]{nickName, sItem.getName(), temp2[1]});
|
||||
ChatLogic.getInstance().sendSysChatMessage(message, Global.LUCKCAT, 0, 0, 0, 0, 0, 0);
|
||||
ChatLogic.getInstance().sendSysChatMessage(message, Global.LUCKCAT, "0", 0, 0, 0, 0, 0);
|
||||
reportTakeActivityReward(user,reward,missionId);
|
||||
|
||||
PlayerInfoProto.TakeActivityRewardResponse build = PlayerInfoProto.TakeActivityRewardResponse.newBuilder().setDrop(drop).build();
|
||||
|
|
|
@ -230,7 +230,7 @@ public class DeathPathLogic {
|
|||
String gid = firstGuild.iterator().next().getValue();
|
||||
GuildInfo guildInfo = GuilidManager.guildInfoMap.get(Integer.parseInt(gid));
|
||||
String message = SErrorCodeEerverConfig.getI18NMessage("guildwar_content", new Object[]{guildInfo.getName()});
|
||||
ChatLogic.getInstance().sendSysChatMessage(message, Global.DEATH_PATH_FIRST, 0, 0, 0, 0, 0, 0);
|
||||
ChatLogic.getInstance().sendSysChatMessage(message, Global.DEATH_PATH_FIRST, "0", 0, 0, 0, 0, 0);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -8,6 +8,7 @@ import com.ljsd.jieling.logic.dao.ArenaRecord;
|
|||
import com.ljsd.jieling.logic.fight.result.FightResult;
|
||||
import com.ljsd.jieling.protocols.CommonProto;
|
||||
import manager.STableManager;
|
||||
import org.luaj.vm2.ast.Str;
|
||||
|
||||
public class AreFightPro implements EndFightProcessor {
|
||||
ArenaRecord arenaRecord;
|
||||
|
@ -54,12 +55,15 @@ public class AreFightPro implements EndFightProcessor {
|
|||
|
||||
|
||||
int warTime = STableManager.getFigureConfig(CommonStaticConfig.class).getsChampionshipSetting().getWarTime();
|
||||
|
||||
CommonProto.FightData build = CommonProto.FightData.newBuilder()
|
||||
.setFightType(9)
|
||||
.setHeroFightInfos(fightResult.getFightTeamInfo())
|
||||
.addMonsterList(fightResult.getDefFightTeamInfo())
|
||||
.setFightSeed(fightResult.getSeed())
|
||||
.setFightMaxTime(warTime).build();
|
||||
.setFightMaxTime(warTime)
|
||||
.setFightId(fightResult.getFightData().getFightId())
|
||||
.build();
|
||||
arenaRecord.setFightData(build.toByteArray());
|
||||
RedisUtil.getInstence().putMapEntry(RedisKey.CHAMPION_ARENA_RECORD,"",arenaRecord.getId(),arenaRecord);
|
||||
|
||||
|
|
|
@ -14,8 +14,13 @@ public class FightDispatcher {
|
|||
|
||||
|
||||
public static FightResult dispatcher(FightEvent fightEvent) throws Exception {
|
||||
// 获取类型
|
||||
GameFightType fightType = fightEvent.getFightType();
|
||||
return fightType.getFightEventProcesor().process(fightEvent);
|
||||
// 战斗逻辑
|
||||
FightResult fightResult = fightType.getFightEventProcesor().process(fightEvent);
|
||||
// 记录战报
|
||||
FightRecordLogic.getInstance().addRecordMap(fightEvent,fightResult);
|
||||
return fightResult;
|
||||
}
|
||||
|
||||
//gs-fight
|
||||
|
|
|
@ -0,0 +1,113 @@
|
|||
package com.ljsd.jieling.logic.fight;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.googlecode.protobuf.format.JsonFormat;
|
||||
import com.ljsd.jieling.logic.fight.result.FightResult;
|
||||
import com.ljsd.jieling.protocols.CommonProto;
|
||||
import org.springframework.util.LinkedMultiValueMap;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public class FightRecordLogic {
|
||||
//私有构造方法
|
||||
private FightRecordLogic (){
|
||||
|
||||
}
|
||||
//声明成员变量
|
||||
private static FightRecordLogic instance ;
|
||||
//对外提供接口获取该实例
|
||||
public static FightRecordLogic getInstance(){
|
||||
if(instance == null){
|
||||
synchronized (FightRecordLogic.class){
|
||||
//两次判断是否为null
|
||||
if(instance==null){
|
||||
instance = new FightRecordLogic();
|
||||
}
|
||||
}
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
ConcurrentHashMap<Integer,MultiValueMap<Integer,String>> recordMap = new ConcurrentHashMap<>();
|
||||
|
||||
public ConcurrentHashMap<Integer, MultiValueMap<Integer, String>> getRecordMap() {
|
||||
return recordMap;
|
||||
}
|
||||
|
||||
public void setRecordMap(ConcurrentHashMap<Integer, MultiValueMap<Integer, String>> recordMap) {
|
||||
this.recordMap = recordMap;
|
||||
}
|
||||
|
||||
public void addRecordMap(FightEvent fightEvent, FightResult fightResult) throws JsonProcessingException {
|
||||
// 玩家id
|
||||
int uid = fightEvent.getAttackUid();
|
||||
// 战斗类型
|
||||
int multiKey = fightEvent.getFightType().getFightType().getType();
|
||||
// 获取玩家的战斗数据
|
||||
MultiValueMap<Integer, String> multiValueMap = recordMap.getOrDefault(uid, new LinkedMultiValueMap<Integer, String>());
|
||||
// 根据类型获取战斗数据
|
||||
List<String> strings = multiValueMap.getOrDefault(multiKey,new ArrayList<>());
|
||||
// 类型大于十条删除最早的一条
|
||||
if (strings.size() >= 10){
|
||||
strings.remove(0);
|
||||
}
|
||||
// protobuf转字符串
|
||||
String str = JsonFormat.printToString(fightResult.getFightData());
|
||||
strings.add(str);
|
||||
// 重新赋值
|
||||
multiValueMap.put(multiKey,strings);
|
||||
System.out.println("fightId======================="+fightResult.getFightData().getFightId());
|
||||
recordMap.put(uid,multiValueMap);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取一条记录
|
||||
* @param fightId 玩家id_服务器id_战斗类型id_时间戳
|
||||
* @return
|
||||
* @throws JsonProcessingException
|
||||
*/
|
||||
public String getOneRecord(String fightId){
|
||||
String[] split = fightId.split("_");
|
||||
// 玩家id
|
||||
int uid = Integer.parseInt(split[0]);
|
||||
// 战斗类型,key
|
||||
int multiKey = Integer.parseInt(split[2]);
|
||||
// 获取玩家的全部战斗数据
|
||||
MultiValueMap<Integer, String> valueMap = recordMap.get(uid);
|
||||
if (valueMap == null){
|
||||
return null;
|
||||
}
|
||||
// 获取类型数据
|
||||
List<String> strings = valueMap.get(multiKey);
|
||||
if (strings.isEmpty()){
|
||||
return null;
|
||||
}
|
||||
// 遍历
|
||||
for (int i = 0; i < strings.size(); i++) {
|
||||
String item = strings.get(i);
|
||||
// 初始化
|
||||
CommonProto.FightData.Builder data = CommonProto.FightData.newBuilder();
|
||||
try {
|
||||
// json转protobuf
|
||||
JsonFormat.merge(item,data);
|
||||
} catch (JsonFormat.ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// 找到该战斗id,直接返回
|
||||
if (fightId.equals(data.getFightId())){
|
||||
// 返回结果
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public void delete(){
|
||||
recordMap.clear();
|
||||
}
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
package com.ljsd.jieling.logic.fight;
|
||||
|
||||
import com.googlecode.protobuf.format.JsonFormat;
|
||||
import com.ljsd.GameApplication;
|
||||
import com.ljsd.fight.CheckFight;
|
||||
import com.ljsd.jieling.core.GlobalsDef;
|
||||
import com.ljsd.jieling.db.redis.RedisKey;
|
||||
|
@ -24,6 +25,7 @@ import com.ljsd.jieling.util.MonsterUtil;
|
|||
import config.SArenaRobotConfig;
|
||||
import config.SCHero;
|
||||
import org.luaj.vm2.LuaValue;
|
||||
import org.luaj.vm2.ast.Str;
|
||||
import util.TimeUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -116,7 +118,15 @@ public class FightUtil {
|
|||
builder.setSeed(fightSeed);
|
||||
builder.setFightTeamInfo(fightTeamInfo);
|
||||
builder.setMonsterTeamList(monsterfightTeamInfos);
|
||||
CommonProto.FightData fightData = CommonProto.FightData.newBuilder().setFightType(fightEvent.getFightType().getFightType().getType()).setHeroFightInfos(fightTeamInfo).addAllMonsterList(monsterfightTeamInfos).setFightSeed(fightSeed).setFightMaxTime(fightEvent.getMostTime()).build();
|
||||
String fightId = getFightId(fightEvent.getAttackUid(),fightEvent.getFightType());
|
||||
CommonProto.FightData fightData = CommonProto.FightData.newBuilder()
|
||||
.setFightType(fightEvent.getFightType().getFightType().getType())
|
||||
.setHeroFightInfos(fightTeamInfo)
|
||||
.addAllMonsterList(monsterfightTeamInfos)
|
||||
.setFightSeed(fightSeed)
|
||||
.setFightMaxTime(fightEvent.getMostTime())
|
||||
.setFightId(fightId)
|
||||
.build();
|
||||
builder.setFightData(fightData);
|
||||
return builder.build();
|
||||
}
|
||||
|
@ -170,7 +180,15 @@ public class FightUtil {
|
|||
builder.setSeed(fightSeed);
|
||||
builder.setFightTeamInfo(fightTeamInfo);
|
||||
builder.setDefFightTeamInfo(deffightTeamInfo);
|
||||
CommonProto.FightData fightData = CommonProto.FightData.newBuilder().setFightType(fightEvent.getFightType().getFightType().getType()).setHeroFightInfos(fightTeamInfo).addMonsterList(deffightTeamInfo).setFightSeed(fightSeed).setFightMaxTime(fightEvent.getMostTime()).build();
|
||||
String fightId = getFightId(fightEvent.getAttackUid(),fightEvent.getFightType());
|
||||
CommonProto.FightData fightData = CommonProto.FightData.newBuilder()
|
||||
.setFightType(fightEvent.getFightType().getFightType().getType())
|
||||
.setHeroFightInfos(fightTeamInfo)
|
||||
.addMonsterList(deffightTeamInfo)
|
||||
.setFightSeed(fightSeed)
|
||||
.setFightMaxTime(fightEvent.getMostTime())
|
||||
.setFightId(fightId)
|
||||
.build();
|
||||
builder.setFightData(fightData);
|
||||
return builder.build();
|
||||
}
|
||||
|
@ -205,7 +223,15 @@ public class FightUtil {
|
|||
FightResult.Builder fightResult = FightResult.newBuilder();
|
||||
int[] fightResultInfo = CheckFight.getInstance().checkFight(seed, fightTime, getFightData, getOptionData, fightType.getFightType());
|
||||
fightResult.setCheckResult(fightResultInfo);
|
||||
CommonProto.FightData fightData = CommonProto.FightData.newBuilder().setFightType(fightType.getFightType().getType()).setHeroFightInfos(fightTeamInfo).addAllMonsterList(monsterTeamList).setFightSeed(seed).setFightMaxTime(fightTime).build();
|
||||
String fightId = getFightId(playerId,fightType);
|
||||
CommonProto.FightData fightData = CommonProto.FightData.newBuilder()
|
||||
.setFightType(fightType.getFightType().getType())
|
||||
.setHeroFightInfos(fightTeamInfo)
|
||||
.addAllMonsterList(monsterTeamList)
|
||||
.setFightSeed(seed)
|
||||
.setFightMaxTime(fightTime)
|
||||
.setFightId(fightId)
|
||||
.build();
|
||||
fightResult.setFightData(fightData);
|
||||
return fightResult.build();
|
||||
}
|
||||
|
@ -431,5 +457,24 @@ public class FightUtil {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取战斗唯一id
|
||||
* @param uid
|
||||
* @param fightType
|
||||
* @return
|
||||
*/
|
||||
public static String getFightId(int uid,GameFightType fightType){
|
||||
return uid + "_"
|
||||
+ GameApplication.serverId + "_"
|
||||
+ fightType.getFightType().getType() + "_"
|
||||
+ System.currentTimeMillis();
|
||||
}
|
||||
|
||||
public static String getFightId(int uid,int fightType){
|
||||
return uid + "_"
|
||||
+ GameApplication.serverId + "_"
|
||||
+ fightType + "_"
|
||||
+ System.currentTimeMillis();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
package com.ljsd.jieling.logic.fight.result;
|
||||
|
||||
import com.googlecode.protobuf.format.JsonFormat;
|
||||
import com.ljsd.jieling.protocols.CommonProto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class FightResult {
|
||||
|
@ -14,7 +16,7 @@ public class FightResult {
|
|||
private CommonProto.FightData fightData;
|
||||
List<CommonProto.FightTeamInfo> monsterTeamList;
|
||||
|
||||
private FightResult(){
|
||||
public FightResult(){
|
||||
|
||||
}
|
||||
|
||||
|
@ -148,4 +150,38 @@ public class FightResult {
|
|||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
ArrayList<String> list = new ArrayList<>();
|
||||
if (null != monsterTeamList && !monsterTeamList.isEmpty()){
|
||||
monsterTeamList.forEach((item)->{
|
||||
list.add(JsonFormat.printToString(item.toBuilder().build()));
|
||||
});
|
||||
}
|
||||
|
||||
String fightTeam = null;
|
||||
if (fightTeamInfo != null){
|
||||
fightTeam = JsonFormat.printToString(fightTeamInfo.toBuilder().build());
|
||||
}
|
||||
|
||||
String defFightTeam = null;
|
||||
if (defFightTeamInfo != null){
|
||||
defFightTeam = JsonFormat.printToString(defFightTeamInfo.toBuilder().build());
|
||||
}
|
||||
|
||||
String fightDataS = null;
|
||||
if (fightData != null){
|
||||
fightDataS = JsonFormat.printToString(fightData.toBuilder().build());
|
||||
}
|
||||
|
||||
return "FightResult{" +
|
||||
"checkResult=" + Arrays.toString(checkResult) +
|
||||
", seed=" + seed +
|
||||
", fightTeamInfo=" + fightTeam +
|
||||
", defFightTeamInfo=" + defFightTeam +
|
||||
", fightData=" + fightDataS +
|
||||
", monsterTeamList=" + list.toString() +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1081,10 +1081,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"}),
|
||||
|
@ -3283,7 +3283,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);
|
||||
|
|
|
@ -717,7 +717,7 @@ public class ItemLogic {
|
|||
return;
|
||||
}
|
||||
String message = SErrorCodeEerverConfig.getI18NMessage("lamp_rankup_equiptalisman_content", new Object[]{user.getPlayerInfoManager().getNickName(), sItem.getName(), hero.getEspecialEquipLevel()});
|
||||
ChatLogic.getInstance().sendSysChatMessage(message, Global.DILIGENT, sItem.getId(), 0, 0, 0, 0, 0);
|
||||
ChatLogic.getInstance().sendSysChatMessage(message, Global.DILIGENT, sItem.getId()+"#"+hero.getEspecialEquipLevel(), 0, 0, 0, 0, 0);
|
||||
}
|
||||
if (HeroLogic.getInstance().isInTeam(user, heroId, 1)) {
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(session.getUid()));
|
||||
|
|
|
@ -317,7 +317,7 @@ public class WorkShopLogic {
|
|||
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()});
|
||||
ChatLogic.getInstance().sendSysChatMessage(message, Global.LUCKY_LUCK,equip.getEquipId(),0,0,0,0,0);
|
||||
ChatLogic.getInstance().sendSysChatMessage(message, Global.LUCKY_LUCK,String.valueOf(equip.getEquipId()),0,0,0,0,0);
|
||||
}
|
||||
user.getEquipManager().addEquip(user,equip);
|
||||
dropBuilder.addEquipId(CBean2Proto.getEquipProto(equip));
|
||||
|
|
|
@ -298,7 +298,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 multiple,long messageId) {
|
||||
public static ChatProto.ChatInfo getSysChatInfoBuilder(String message,int messageType,String 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);
|
||||
|
|
|
@ -1199,7 +1199,7 @@ public class ItemUtil {
|
|||
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);
|
||||
ChatLogic.getInstance().sendSysChatMessage(message,Global.LUCKY_LUCK,String.valueOf(equipId),0,0,0,0,0);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1280,7 +1280,7 @@ public class ItemUtil {
|
|||
if (scHero.getStar() >= SSpecialConfig.getIntegerValue(SSpecialConfig.lamp_lottery_content_parm)) { //策划资质改成星级
|
||||
String message = SErrorCodeEerverConfig.getI18NMessage("lamp_lottery_content", new Object[]{playerInfoManager.getNickName(), scHero.getStar(), scHero.getReadingName()});
|
||||
if (!message.isEmpty()){
|
||||
ChatLogic.getInstance().sendSysChatMessage(message,Global.LUCKY_LUCK,hero.getTemplateId(),0,0,0,0,0);
|
||||
ChatLogic.getInstance().sendSysChatMessage(message,Global.LUCKY_LUCK,String.valueOf(hero.getTemplateId()),0,0,0,0,0);
|
||||
}
|
||||
}
|
||||
user.getUserMissionManager().onGameEvent(user,GameEvent.GET_HERO,heroStar[0],heroStar[1]);
|
||||
|
@ -1647,7 +1647,7 @@ public class ItemUtil {
|
|||
if (animal.getQuality() >= SSpecialConfig.getIntegerValue(SSpecialConfig.ANIMAL_BROADCAST_QUALITY)&&reason!=BIReason.COMPOS_HERO_REWARD) { //策划资质改成星级
|
||||
String message = SErrorCodeEerverConfig.getI18NMessage("animal_get_broadcast_content", new Object[]{user.getPlayerInfoManager().getNickName(), animal.getName()});
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,8 +24,11 @@ public class SJewelConfig implements BaseConfig {
|
|||
|
||||
private int[][] rankupResources;
|
||||
|
||||
|
||||
@Override
|
||||
private int godHoodPool;
|
||||
|
||||
private int godHoodMaxlv;
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
|
||||
}
|
||||
|
@ -67,5 +70,12 @@ public class SJewelConfig implements BaseConfig {
|
|||
return rankupResources;
|
||||
}
|
||||
|
||||
public int getGodHoodPool() {
|
||||
return godHoodPool;
|
||||
}
|
||||
|
||||
public int getGodHoodMaxlv() {
|
||||
return godHoodMaxlv;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue