Merge branch 'master' of http://60.1.1.230/backend/jieling_server
# Conflicts: # serverlogic/src/main/java/com/ljsd/jieling/db/redis/RedisKey.javaback_recharge
commit
734f47cbdb
|
|
@ -10,6 +10,12 @@ public class UserBloodySnpInfo {
|
|||
|
||||
private String name;
|
||||
|
||||
private int head;
|
||||
|
||||
private int headFrame;
|
||||
|
||||
private int level;
|
||||
|
||||
private Map<String, FamilyHeroInfo> heroAllAttributes = new HashMap<>(5);
|
||||
|
||||
private Map<String, String> heroSkills = new HashMap<>();
|
||||
|
|
|
|||
|
|
@ -10,8 +10,11 @@ import com.ljsd.jieling.battle.room.BeanToProto;
|
|||
import com.ljsd.jieling.battle.room.Command;
|
||||
import com.ljsd.jieling.battle.room.SceneManager;
|
||||
import com.ljsd.jieling.battle.statics.AnalysisData;
|
||||
import com.ljsd.jieling.config.SBloodyBattleReward;
|
||||
import com.ljsd.jieling.config.SBloodyBattleSetting;
|
||||
import com.ljsd.jieling.db.mongo.MongoUtil;
|
||||
import com.ljsd.jieling.db.redis.RedisKey;
|
||||
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||
import com.ljsd.jieling.logic.OnlineUserManager;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
|
|
@ -108,6 +111,10 @@ public class Scene implements Runnable{
|
|||
|
||||
private Map<Integer,Integer> monsterRecoryMap = new HashMap<>();
|
||||
|
||||
private int firstBloodyPerson;
|
||||
|
||||
private List<String> cacheMsg = new ArrayList<>(2);
|
||||
|
||||
|
||||
public void monsterReflush(){
|
||||
Iterator<Map.Entry<Integer, Integer>> iterator = monsterRecoryMap.entrySet().iterator();
|
||||
|
|
@ -142,7 +149,7 @@ public class Scene implements Runnable{
|
|||
}
|
||||
|
||||
//消息广播
|
||||
if(msgUpdate){
|
||||
if(msgUpdate || !cacheMsg.isEmpty()){
|
||||
for(Integer removeId : builder.getRemoveActorIdList()){
|
||||
sceneActorMap.remove(removeId);
|
||||
}
|
||||
|
|
@ -153,6 +160,15 @@ public class Scene implements Runnable{
|
|||
}
|
||||
}
|
||||
}
|
||||
if(!cacheMsg.isEmpty()){
|
||||
int now = (int)(System.currentTimeMillis()/1000);
|
||||
for(String msg : cacheMsg){
|
||||
CommonProto.SceneMsg build = CommonProto.SceneMsg.newBuilder().setMsg(msg).setTime(now).build();
|
||||
builder.addSceneMsg(build);
|
||||
}
|
||||
cacheMsg.clear();
|
||||
}
|
||||
|
||||
for(SceneActor sceneActor : sceneActorMap.values()){
|
||||
if(sceneActor.getType() == ActorType.Player){
|
||||
ISession sessionByUid = OnlineUserManager.getSessionByUid(sceneActor.getId());
|
||||
|
|
@ -161,7 +177,9 @@ public class Scene implements Runnable{
|
|||
}
|
||||
}
|
||||
}
|
||||
System.out.println("------------------------");
|
||||
System.out.println(JsonFormat.printToString(builder.build()));
|
||||
System.out.println("------------------------" + msgUpdate);
|
||||
builder.clear();
|
||||
willUpdateActors.clear();
|
||||
msgUpdate = false;
|
||||
|
|
@ -177,6 +195,7 @@ public class Scene implements Runnable{
|
|||
*/
|
||||
public void processEventUpdate(EventType eventType,Object parm){
|
||||
msgUpdate = true;
|
||||
System.out.println("the eventType = "+ eventType);
|
||||
switch (eventType){
|
||||
case SCENEACTORE_UPDATE:
|
||||
willUpdateActors.add((int)parm);
|
||||
|
|
@ -283,20 +302,48 @@ public class Scene implements Runnable{
|
|||
//退出操作
|
||||
public void gameEnd() throws Exception {
|
||||
isEnd = true;
|
||||
for(SceneActor sceneActor : sceneActorMap.values()){
|
||||
if(sceneActor.getType() == ActorType.Player){
|
||||
int id = sceneActor.getId();
|
||||
User user = UserManager.getUser(id);
|
||||
user.getRoomInfo().setRoomId(-1);
|
||||
MatchServerice.clearUidRoomInfo(id);
|
||||
ISession iSession = OnlineUserManager.getSessionByUid(id);
|
||||
if(iSession!=null){
|
||||
MessageUtil.sendIndicationMessage(iSession, 1, MessageTypeProto.MessageType.SCENE_GAME_OVER_INDICATION_VALUE, null, true);
|
||||
}
|
||||
//结算操作
|
||||
List<SortDataBean> sortDataBeans = new ArrayList<>();
|
||||
for(AnalysisData analysisData: analysisDataMap.values()){
|
||||
int playId = analysisData.getId();
|
||||
Creature creature = (Creature)sceneActorMap.get(playId);
|
||||
int mineral = creature.getMineral();
|
||||
int killNums = analysisData.getKillNums();
|
||||
sortDataBeans.add(new SortDataBean(playId,mineral,killNums));
|
||||
}
|
||||
Collections.sort(sortDataBeans);
|
||||
|
||||
int rank=1;
|
||||
int curSeason=1;
|
||||
SceneFight.SceneEndIndication.Builder builder = SceneFight.SceneEndIndication.newBuilder();
|
||||
for(SortDataBean sortDataBean : sortDataBeans){
|
||||
SBloodyBattleReward sBloodyBattleReward = SBloodyBattleReward.sBloodyBattleRewardMap.get(rank);
|
||||
int score = sBloodyBattleReward.getScore();
|
||||
int id = sortDataBean.getUid();
|
||||
int myscore = 0;
|
||||
if(curSeason!=0){
|
||||
RedisUtil.getInstence().incrementZsetScore(RedisKey.BLOODY_RANK,Integer.toString(curSeason),Integer.toString(id),score);
|
||||
myscore = RedisUtil.getInstence().getZSetScore(RedisKey.BLOODY_RANK,Integer.toString(curSeason), Integer.toString(id)).intValue();
|
||||
if(myscore<0){
|
||||
myscore=0;
|
||||
String mineRankKey = RedisKey.getKey(RedisKey.BLOODY_RANK, String.valueOf(id), false);
|
||||
RedisUtil.getInstence().zsetAddOne(mineRankKey,Integer.toString(id),myscore);
|
||||
}
|
||||
}else{
|
||||
score=0;
|
||||
}
|
||||
builder.addSceneSimpleRankInfo(SceneFight.SceneSimpleRankInfo.newBuilder().setScore(myscore).setUpdateScore(score).setUid(id).build());
|
||||
rank++;
|
||||
}
|
||||
|
||||
for(SortDataBean sortDataBean : sortDataBeans){
|
||||
ISession iSession = OnlineUserManager.getSessionByUid(sortDataBean.getUid());
|
||||
if(iSession!=null){
|
||||
MessageUtil.sendIndicationMessage(iSession, 1, MessageTypeProto.MessageType.SCENE_GAME_OVER_INDICATION_VALUE, builder.build(), true);
|
||||
}
|
||||
}
|
||||
SceneManager.clearScene(roomId);
|
||||
|
||||
MongoUtil.getLjsdMongoTemplate().lastUpdate();
|
||||
}
|
||||
|
||||
|
|
@ -398,4 +445,16 @@ public class Scene implements Runnable{
|
|||
public Map<Integer, AnalysisData> getAnalysisDataMap() {
|
||||
return analysisDataMap;
|
||||
}
|
||||
|
||||
public int getFirstBloodyPerson() {
|
||||
return firstBloodyPerson;
|
||||
}
|
||||
|
||||
public void setFirstBloodyPerson(int firstBloodyPerson) {
|
||||
this.firstBloodyPerson = firstBloodyPerson;
|
||||
}
|
||||
|
||||
public void addCahceBroadMsg(String msg){
|
||||
cacheMsg.add(msg);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@ package com.ljsd.jieling.battle.actor;
|
|||
|
||||
import com.ljsd.jieling.battle.BattleManager;
|
||||
import com.ljsd.jieling.battle.room.SceneManager;
|
||||
import com.ljsd.jieling.battle.statics.AnalysisEventType;
|
||||
import com.ljsd.jieling.battle.statics.AnalysisSourceData;
|
||||
import com.ljsd.jieling.battle.statics.MessageBoxUtils;
|
||||
import com.ljsd.jieling.config.SBloodyBattleSetting;
|
||||
|
||||
import java.util.*;
|
||||
|
|
@ -78,6 +81,7 @@ public abstract class SceneActor{
|
|||
scene.processEventUpdate(EventType.SCENEACTORE_UPDATE,mineral.getId());
|
||||
}
|
||||
value.updateEffectValue(0,reallyDigger + value.getValues().get(0));
|
||||
MessageBoxUtils.onGameEvent(AnalysisEventType.DIGGER,scene,new AnalysisSourceData(value.getTarget(),value.getCaster(),reallyDigger));
|
||||
}
|
||||
int[][] debuffs = SBloodyBattleSetting.sBloodyBattleSetting.getDebuff();
|
||||
for(int i=0;i<debuffs.length;i++){
|
||||
|
|
@ -102,7 +106,6 @@ public abstract class SceneActor{
|
|||
}
|
||||
}
|
||||
value.updateEffectValue(i+1,value.getValues().get(i+1) +1);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -120,6 +123,8 @@ public abstract class SceneActor{
|
|||
addOrUpdateBuffer(new EffectBuffer(scene.getBufferId(),BufferType.REMOVEBUFFER.getType(),now,now + duration*1000,id,id,0));
|
||||
}
|
||||
}
|
||||
//清楚挖抗连续事件
|
||||
MessageBoxUtils.onGameEvent(AnalysisEventType.DIGGER,scene,new AnalysisSourceData(value.getTarget(),value.getCaster(),-1));
|
||||
scene.processEventUpdate(EventType.BUFFER_REMOVE,value.getId());
|
||||
}
|
||||
continue;
|
||||
|
|
@ -151,6 +156,7 @@ public abstract class SceneActor{
|
|||
// 定位到出生点位置
|
||||
this.setPos(SceneManager.selectForPlayerRebirth(scene));
|
||||
scene.processEventUpdate(EventType.SCENEACTORE_UPDATE,id);
|
||||
MessageBoxUtils.onGameEvent(AnalysisEventType.BATTLE,scene,new AnalysisSourceData(value.getTarget(),value.getCaster(),effectValue));
|
||||
|
||||
}else{
|
||||
Creature creature = (Creature) scene.getSceneActorMap().get(value.getCaster());
|
||||
|
|
@ -167,9 +173,11 @@ public abstract class SceneActor{
|
|||
}else{
|
||||
scene.randomMineralOfUserDeath(creature,gainMineral);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if(this.getType() == ActorType.Player){
|
||||
MessageBoxUtils.onGameEvent(AnalysisEventType.BATTLE,scene,new AnalysisSourceData(value.getTarget(),value.getCaster(),effectValue));
|
||||
}
|
||||
stateType = StateType.MOVEABLE;
|
||||
((Creature)this).setPreMoveTimestamp(now);
|
||||
scene.processEventUpdate(EventType.SCENEACTORE_UPDATE,this.getId());
|
||||
|
|
|
|||
|
|
@ -0,0 +1,59 @@
|
|||
package com.ljsd.jieling.battle.actor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class SortDataBean implements Comparable<SortDataBean>{
|
||||
private int uid;
|
||||
private int mineral;
|
||||
private int killNums;
|
||||
|
||||
|
||||
public SortDataBean(int uid, int mineral, int killNums) {
|
||||
this.uid = uid;
|
||||
this.mineral = mineral;
|
||||
this.killNums = killNums;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(SortDataBean o) {
|
||||
if(this.mineral>o.mineral){
|
||||
return -1;
|
||||
}
|
||||
if(this.mineral == o.mineral){
|
||||
if(this.killNums>o.killNums){
|
||||
return -1;
|
||||
}
|
||||
if(this.killNums == o.killNums){
|
||||
if(this.uid < o.uid){
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
public int getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public int getMineral() {
|
||||
return mineral;
|
||||
}
|
||||
|
||||
public int getKillNums() {
|
||||
return killNums;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
List<SortDataBean> sortDataBeans = new ArrayList<>();
|
||||
sortDataBeans.add(new SortDataBean(1,2,2));
|
||||
sortDataBeans.add(new SortDataBean(2,2,3));
|
||||
sortDataBeans.add(new SortDataBean(3,3,2));
|
||||
sortDataBeans.add(new SortDataBean(4,4,2));
|
||||
sortDataBeans.add(new SortDataBean(5,4,2));
|
||||
Collections.sort(sortDataBeans);
|
||||
System.out.println(sortDataBeans);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package com.ljsd.jieling.battle.match;
|
||||
|
||||
import com.ljsd.jieling.battle.room.Room;
|
||||
import com.ljsd.jieling.battle.room.WaitingRoom;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
public class BloodyBattleReallyMatchServer implements IMatch{
|
||||
private static WaitingRoom waitingRoom = new WaitingRoom();
|
||||
private static Map<Integer,Integer> roomFull = new HashMap<>();
|
||||
private static Map<Integer,Room> uidToRommMap = new HashMap<>();
|
||||
static {
|
||||
roomFull.put(1,10);
|
||||
}
|
||||
private static AtomicInteger atomicInteger = new AtomicInteger(10000);
|
||||
@Override
|
||||
public void tryMatch(int uid, int type) {
|
||||
Room room = waitingRoom.findRoom(type, new IMatch.IRoomMatchFilter() {
|
||||
@Override
|
||||
public Room filter(List<Room> rooms) {
|
||||
int full = roomFull.get(type);
|
||||
for (Room room : rooms) {
|
||||
if (!room.isFull(full)) {
|
||||
return room;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public MatchType getMatchType() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Room getRoomId(int uid) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearUidRoom(int uid) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -42,10 +42,13 @@ public class BeanToProto {
|
|||
builder.addHeroInfo(CommonProto.BloodyHeroInfo.newBuilder().setHeroId(heroId).setHeroHp(curHp).setHeroMaxHp(hp).setHeroTid(familyHeroInfo.getTempleteId()));
|
||||
}
|
||||
}
|
||||
if(creature.getStateType() != StateType.FROZEN){
|
||||
builder.addAllPath(creature.getPath());
|
||||
}
|
||||
return builder.setCurHp(creature.getLife().getCurHp())
|
||||
.setMaxHp(creature.getLife().getMaxMp())
|
||||
.setSpeed(creature.getSpeed())
|
||||
.addAllPath(creature.getPath())
|
||||
|
||||
.setCamp(creature.getCamp())
|
||||
.setMineral(creature.getMineral())
|
||||
.build();
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.ljsd.jieling.battle.room;
|
|||
import com.ljsd.jieling.battle.BattleManager;
|
||||
import com.ljsd.jieling.battle.UserBloodySnpInfo;
|
||||
import com.ljsd.jieling.battle.actor.*;
|
||||
import com.ljsd.jieling.battle.statics.AnalysisData;
|
||||
import com.ljsd.jieling.config.MapPointConfig;
|
||||
import com.ljsd.jieling.config.SBloodyBattleSetting;
|
||||
import com.ljsd.jieling.config.SCMap;
|
||||
|
|
@ -92,6 +93,7 @@ public class SceneManager {
|
|||
playerA.setPos(userInitBirths.remove(0));
|
||||
playerA.setSpeed(sBloodyBattleSetting.getPlayerSpeed());
|
||||
scene.addScenActor(playerA);
|
||||
scene.getAnalysisDataMap().put(uid,new AnalysisData(uid));
|
||||
}
|
||||
//创建矿点
|
||||
createMinear(scene,-1,1);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ public class AnalysisData {
|
|||
private int deadNums; //死亡次数
|
||||
private int diggerTimes; // 连续挖矿次数
|
||||
private int continuousKillNums;//连续杀敌次数
|
||||
private int continuousKillNumsCache;//连续杀敌次数 CACHE
|
||||
private int continuousDeadNums;//连续死亡次数
|
||||
|
||||
public AnalysisData(int id) {
|
||||
|
|
@ -16,15 +17,53 @@ public class AnalysisData {
|
|||
killNums++;
|
||||
continuousKillNums++;
|
||||
continuousDeadNums=0;
|
||||
continuousKillNumsCache++;
|
||||
}
|
||||
|
||||
public void fail(){
|
||||
deadNums++;
|
||||
continuousKillNums=0;
|
||||
continuousDeadNums=0;
|
||||
continuousDeadNums++;
|
||||
}
|
||||
|
||||
public void digger(){
|
||||
diggerTimes++;
|
||||
}
|
||||
|
||||
public void clearDigger(){
|
||||
diggerTimes=0;
|
||||
}
|
||||
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public int getKillNums() {
|
||||
return killNums;
|
||||
}
|
||||
|
||||
public int getDeadNums() {
|
||||
return deadNums;
|
||||
}
|
||||
|
||||
public int getDiggerTimes() {
|
||||
return diggerTimes;
|
||||
}
|
||||
|
||||
public int getContinuousKillNums() {
|
||||
return continuousKillNums;
|
||||
}
|
||||
|
||||
public int getContinuousDeadNums() {
|
||||
return continuousDeadNums;
|
||||
}
|
||||
|
||||
public int getContinuousKillNumsCache() {
|
||||
return continuousKillNumsCache;
|
||||
}
|
||||
|
||||
public void cleanContinuousKillNumsCache(){
|
||||
continuousKillNumsCache=0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
package com.ljsd.jieling.battle.statics;
|
||||
|
||||
public enum AnalysisDataType {
|
||||
CONTINUOUS_KILL_NUMS(1),//杀敌
|
||||
CONTINUOUS_DIED_NUMS(2),//2被杀
|
||||
DIGGER_NUMS(3),//3挖矿
|
||||
END_CONTINUOUS_KILL_NUMS(4),// 4终结
|
||||
FIRST_BLOODY(5),// 5一血
|
||||
SEND_TO_DEATH(6),// 6狂送
|
||||
;
|
||||
private int type;
|
||||
|
||||
AnalysisDataType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,14 @@
|
|||
package com.ljsd.jieling.battle.statics;
|
||||
|
||||
import com.ljsd.jieling.battle.BattleManager;
|
||||
import com.ljsd.jieling.battle.UserBloodySnpInfo;
|
||||
import com.ljsd.jieling.battle.actor.Scene;
|
||||
|
||||
import com.ljsd.jieling.config.SBloodyMessagesConfig;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.List;
|
||||
|
||||
public class BattleAnalysisProcessor implements AnalysisProcessor{
|
||||
@Override
|
||||
public void process(Scene scene, AnalysisSourceData analysisSourceData){
|
||||
|
|
@ -13,4 +20,70 @@ public class BattleAnalysisProcessor implements AnalysisProcessor{
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
public void analysis(Scene scene,AnalysisData targetAnalysisData,AnalysisSourceData analysisSourceData){
|
||||
List<SBloodyMessagesConfig> sBloodyMessagesConfigs = MessageBoxUtils.analysisEventTypeAnalysisDataTypeMap.get(AnalysisEventType.BATTLE);
|
||||
for(SBloodyMessagesConfig sBloodyMessagesConfig : sBloodyMessagesConfigs){
|
||||
int count = sBloodyMessagesConfig.getCount();
|
||||
if(sBloodyMessagesConfig.getType() == AnalysisDataType.FIRST_BLOODY.getType()){
|
||||
if(targetAnalysisData.getContinuousKillNums() == count){
|
||||
int firstBloodyPerson = scene.getFirstBloodyPerson();
|
||||
if(firstBloodyPerson == 0 && targetAnalysisData.getContinuousKillNums() == 1){
|
||||
scene.setFirstBloodyPerson(targetAnalysisData.getId());
|
||||
int targetId = analysisSourceData.getTargetId();
|
||||
int casterId = analysisSourceData.getCaster();
|
||||
UserBloodySnpInfo targetBloodySnpInfo = BattleManager.bloodMyHeroInfoMap.get(targetId);
|
||||
UserBloodySnpInfo casterBloodySnpInfo = BattleManager.bloodMyHeroInfoMap.get(casterId);
|
||||
String targetName = targetBloodySnpInfo.getName();
|
||||
String casterName = casterBloodySnpInfo.getName();
|
||||
scene.addCahceBroadMsg(MessageFormat.format(sBloodyMessagesConfig.getMessage(),new String[]{targetName,casterName}));
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(sBloodyMessagesConfig.getType() == AnalysisDataType.CONTINUOUS_KILL_NUMS.getType()){
|
||||
if(targetAnalysisData.getContinuousKillNums() == count){
|
||||
int id = targetAnalysisData.getId();
|
||||
UserBloodySnpInfo userBloodySnpInfo = BattleManager.bloodMyHeroInfoMap.get(id);
|
||||
String name = userBloodySnpInfo.getName();
|
||||
scene.addCahceBroadMsg(MessageFormat.format(sBloodyMessagesConfig.getMessage(),new String[]{name}));
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(sBloodyMessagesConfig.getType() == AnalysisDataType.CONTINUOUS_DIED_NUMS.getType()){
|
||||
if(targetAnalysisData.getContinuousDeadNums() == count){
|
||||
int id = targetAnalysisData.getId();
|
||||
UserBloodySnpInfo userBloodySnpInfo = BattleManager.bloodMyHeroInfoMap.get(id);
|
||||
String name = userBloodySnpInfo.getName();
|
||||
scene.addCahceBroadMsg(MessageFormat.format(sBloodyMessagesConfig.getMessage(),new String[]{name}));
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(sBloodyMessagesConfig.getType() == AnalysisDataType.END_CONTINUOUS_KILL_NUMS.getType()){
|
||||
int targetId = analysisSourceData.getTargetId();
|
||||
int casterId = analysisSourceData.getCaster();
|
||||
AnalysisData analysisData = scene.getAnalysisDataMap().get(casterId);
|
||||
if(analysisData.getContinuousKillNumsCache()>=sBloodyMessagesConfig.getType()){
|
||||
analysisData.cleanContinuousKillNumsCache();
|
||||
UserBloodySnpInfo targetBloodySnpInfo = BattleManager.bloodMyHeroInfoMap.get(targetId);
|
||||
UserBloodySnpInfo casterBloodySnpInfo = BattleManager.bloodMyHeroInfoMap.get(casterId);
|
||||
String targetName = targetBloodySnpInfo.getName();
|
||||
String casterName = casterBloodySnpInfo.getName();
|
||||
scene.addCahceBroadMsg(MessageFormat.format(sBloodyMessagesConfig.getMessage(),new String[]{targetName,casterName}));
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(sBloodyMessagesConfig.getType() == AnalysisDataType.SEND_TO_DEATH.getType()){
|
||||
if(targetAnalysisData.getContinuousDeadNums() >= count){
|
||||
int id = targetAnalysisData.getId();
|
||||
UserBloodySnpInfo userBloodySnpInfo = BattleManager.bloodMyHeroInfoMap.get(id);
|
||||
String name = userBloodySnpInfo.getName();
|
||||
scene.addCahceBroadMsg(MessageFormat.format(sBloodyMessagesConfig.getMessage(),new String[]{name}));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,40 @@
|
|||
package com.ljsd.jieling.battle.statics;
|
||||
|
||||
import com.ljsd.jieling.battle.BattleManager;
|
||||
import com.ljsd.jieling.battle.UserBloodySnpInfo;
|
||||
import com.ljsd.jieling.battle.actor.Scene;
|
||||
import com.ljsd.jieling.config.SBloodyMessagesConfig;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.List;
|
||||
|
||||
public class DiggerAnalysisProcessor implements AnalysisProcessor{
|
||||
|
||||
@Override
|
||||
public void process(Scene scene, AnalysisSourceData analysisSourceData) {
|
||||
AnalysisData analysisData = scene.getAnalysisDataMap().get(analysisSourceData.getTargetId());
|
||||
analysisData.digger();
|
||||
int value = analysisSourceData.getValue();
|
||||
if(value == -1){
|
||||
analysisData.clearDigger();
|
||||
}else{
|
||||
analysisData.digger();
|
||||
}
|
||||
analysis(scene,analysisData,analysisSourceData);
|
||||
}
|
||||
|
||||
public void analysis(Scene scene,AnalysisData targetAnalysisData,AnalysisSourceData analysisSourceData){
|
||||
List<SBloodyMessagesConfig> sBloodyMessagesConfigs = MessageBoxUtils.analysisEventTypeAnalysisDataTypeMap.get(AnalysisEventType.DIGGER);
|
||||
for(SBloodyMessagesConfig sBloodyMessagesConfig : sBloodyMessagesConfigs){
|
||||
int count = sBloodyMessagesConfig.getCount();
|
||||
if(sBloodyMessagesConfig.getType() == AnalysisDataType.DIGGER_NUMS.getType()){
|
||||
if(targetAnalysisData.getDiggerTimes() == count){
|
||||
int id = targetAnalysisData.getId();
|
||||
UserBloodySnpInfo userBloodySnpInfo = BattleManager.bloodMyHeroInfoMap.get(id);
|
||||
String name = userBloodySnpInfo.getName();
|
||||
scene.addCahceBroadMsg(MessageFormat.format(sBloodyMessagesConfig.getMessage(),new String[]{name}));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,39 @@
|
|||
package com.ljsd.jieling.battle.statics;
|
||||
|
||||
import com.ljsd.jieling.battle.actor.Scene;
|
||||
import com.ljsd.jieling.config.SBloodyMessagesConfig;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class MessageBoxUtils {
|
||||
private static Map<AnalysisEventType,AnalysisProcessor> analysisEventTypeIntegerMap = new HashMap<>();
|
||||
public static Map<AnalysisEventType, List<SBloodyMessagesConfig>> analysisEventTypeAnalysisDataTypeMap = new HashMap<>();
|
||||
static {
|
||||
//更新统计数据 数据汇总聚合
|
||||
analysisEventTypeIntegerMap.put(AnalysisEventType.BATTLE,new BattleAnalysisProcessor());
|
||||
analysisEventTypeIntegerMap.put(AnalysisEventType.DIGGER,new DiggerAnalysisProcessor());
|
||||
}
|
||||
|
||||
public static void init(){
|
||||
Map<Integer, SBloodyMessagesConfig> sBloodyMessagesConfigMap = SBloodyMessagesConfig.sBloodyMessagesConfigMap;
|
||||
analysisEventTypeAnalysisDataTypeMap.put(AnalysisEventType.BATTLE,new ArrayList<>());
|
||||
analysisEventTypeAnalysisDataTypeMap.put(AnalysisEventType.DIGGER,new ArrayList<>());
|
||||
for(SBloodyMessagesConfig sBloodyMessagesConfig:sBloodyMessagesConfigMap.values()){
|
||||
int type = sBloodyMessagesConfig.getType();
|
||||
if(type == AnalysisDataType.DIGGER_NUMS.getType()){
|
||||
analysisEventTypeAnalysisDataTypeMap.get(AnalysisEventType.DIGGER).add(sBloodyMessagesConfig);
|
||||
continue;
|
||||
}
|
||||
analysisEventTypeAnalysisDataTypeMap.get(AnalysisEventType.BATTLE).add(sBloodyMessagesConfig);
|
||||
}
|
||||
}
|
||||
|
||||
public static void onGameEvent(AnalysisEventType type){
|
||||
|
||||
public static void onGameEvent(AnalysisEventType type, Scene scene,AnalysisSourceData analysisSourceData){
|
||||
AnalysisProcessor analysisProcessor = analysisEventTypeIntegerMap.get(type);
|
||||
analysisProcessor.process(scene,analysisSourceData);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
package com.ljsd.jieling.config;
|
||||
|
||||
import com.ljsd.jieling.logic.STableManager;
|
||||
import com.ljsd.jieling.logic.Table;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Table(name ="BloodyBattleReward")
|
||||
public class SBloodyBattleReward implements BaseConfig {
|
||||
|
||||
private int id;
|
||||
|
||||
private int score;
|
||||
|
||||
public static Map<Integer, SBloodyBattleReward> sBloodyBattleRewardMap;
|
||||
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
sBloodyBattleRewardMap = STableManager.getConfig(SBloodyBattleReward.class);
|
||||
}
|
||||
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public int getScore() {
|
||||
return score;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,8 +1,12 @@
|
|||
package com.ljsd.jieling.config;
|
||||
|
||||
import com.ljsd.jieling.battle.statics.MessageBoxUtils;
|
||||
import com.ljsd.jieling.logic.STableManager;
|
||||
import com.ljsd.jieling.logic.Table;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Table(name ="BloodyMessagesConfig")
|
||||
|
|
@ -18,10 +22,14 @@ public class SBloodyMessagesConfig implements BaseConfig {
|
|||
|
||||
private String message;
|
||||
|
||||
public static Map<Integer, List<SBloodyMessagesConfig>> sBloodyMessagesConfigByTypeMap;
|
||||
public static Map<Integer,SBloodyMessagesConfig> sBloodyMessagesConfigMap;
|
||||
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
|
||||
sBloodyMessagesConfigMap = STableManager.getConfig(SBloodyMessagesConfig.class);
|
||||
MessageBoxUtils.init();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,51 @@
|
|||
package com.ljsd.jieling.config;
|
||||
|
||||
import com.ljsd.jieling.logic.STableManager;
|
||||
import com.ljsd.jieling.logic.Table;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Table(name ="BloodyRankConfig")
|
||||
public class SBloodyRankConfig implements BaseConfig {
|
||||
|
||||
private int id;
|
||||
|
||||
private int rank;
|
||||
|
||||
private int stage;
|
||||
|
||||
private int score;
|
||||
|
||||
private int[][] reward;
|
||||
|
||||
private static Map<Integer, SBloodyRankConfig> sBloodyRankConfigMap;
|
||||
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
sBloodyRankConfigMap = STableManager.getConfig(SBloodyRankConfig.class);
|
||||
}
|
||||
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public int getRank() {
|
||||
return rank;
|
||||
}
|
||||
|
||||
public int getStage() {
|
||||
return stage;
|
||||
}
|
||||
|
||||
public int getScore() {
|
||||
return score;
|
||||
}
|
||||
|
||||
public int[][] getReward() {
|
||||
return reward;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@ package com.ljsd.jieling.config;
|
|||
import com.ljsd.jieling.logic.STableManager;
|
||||
import com.ljsd.jieling.logic.Table;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Table(name ="EquipTalismana")
|
||||
|
|
@ -22,13 +23,26 @@ public class SEquipTalismana implements BaseConfig {
|
|||
|
||||
private int[][] specialProperty;
|
||||
|
||||
private int[][] specialSkill;
|
||||
|
||||
private int[] openSkillRules;
|
||||
|
||||
private int[][] resolve;
|
||||
|
||||
public static Map<Integer,SEquipTalismana> equipTalismanaMap ;
|
||||
|
||||
public static Map<Integer,Map<Integer,SEquipTalismana>> equipTalismanaStarMap;
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
equipTalismanaMap = STableManager.getConfig(SEquipTalismana.class);
|
||||
equipTalismanaStarMap = new HashMap<>();
|
||||
for(Map.Entry<Integer,SEquipTalismana> entry: equipTalismanaMap.entrySet()){
|
||||
if(equipTalismanaStarMap.get(entry.getValue().getTalismanaId())==null){
|
||||
equipTalismanaStarMap.put(entry.getValue().getTalismanaId(),new HashMap<>());
|
||||
}
|
||||
equipTalismanaStarMap.get(entry.getValue().getTalismanaId()).put(entry.getValue().getLevel(),entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -66,5 +80,11 @@ public class SEquipTalismana implements BaseConfig {
|
|||
return openSkillRules;
|
||||
}
|
||||
|
||||
public int[][] getSpecialSkill() {
|
||||
return specialSkill;
|
||||
}
|
||||
|
||||
public int[][] getResolve() {
|
||||
return resolve;
|
||||
}
|
||||
}
|
||||
|
|
@ -36,6 +36,8 @@ public enum FunctionIdEnum {
|
|||
Store(20),
|
||||
|
||||
Endless(46),
|
||||
|
||||
ToBeStronger(48),
|
||||
WorkShopTech(101),
|
||||
WorkShopCreateEquip(102),
|
||||
WorkShopCreateProtectEquip(103),
|
||||
|
|
|
|||
|
|
@ -90,7 +90,6 @@ public class HandlerLogicThread extends Thread{
|
|||
|
||||
|
||||
|
||||
|
||||
}
|
||||
public ConcurrentLinkedQueue<PacketNetData> handlerLinkedQueue = new ConcurrentLinkedQueue();
|
||||
public ConcurrentLinkedQueue<AyyncWorker> ayyncWorkerConcurrentLinkedQueue = new ConcurrentLinkedQueue();
|
||||
|
|
@ -272,6 +271,12 @@ public class HandlerLogicThread extends Thread{
|
|||
return false;
|
||||
}
|
||||
break;
|
||||
case MessageTypeProto.MessageType.TO_BE_STRONGER_REQUEST_VALUE:
|
||||
sGlobalSystemConfig = SGlobalSystemConfig.getsGlobalSystemConfigByFunctionId(FunctionIdEnum.ToBeStronger);
|
||||
if (checkOpen(user,sGlobalSystemConfig)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -156,6 +156,7 @@ public class RedisKey {
|
|||
|
||||
//问卷调查
|
||||
public static final String QUESTION_FROMBACK = "QUESTION_FROMBACK";
|
||||
public static final String BLOODY_RANK = "BLOODY_RANK";
|
||||
|
||||
public static String getKey(String type, String key, boolean withoutServerId) {
|
||||
if (withoutServerId) {
|
||||
|
|
|
|||
|
|
@ -964,6 +964,9 @@ public class RedisUtil {
|
|||
|
||||
|
||||
public String getKey(String type,String key){
|
||||
if(RedisKey.BLOODY_RANK.equals(key)){
|
||||
return type + RedisKey.Delimiter_colon + key;
|
||||
}
|
||||
return GameApplication.serverId + RedisKey.Delimiter_colon + type + RedisKey.Delimiter_colon + key;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -139,4 +139,6 @@ public interface BIReason {
|
|||
|
||||
int CHANGE_NAME = 1034; // 改名消耗
|
||||
|
||||
int ESPECIAL_EQUIP_UP_LEVEL_CONSUME = 1035;//法宝进阶消耗
|
||||
|
||||
}
|
||||
|
|
@ -19,4 +19,5 @@ public interface GlobalGm {
|
|||
|
||||
int MONSTER_JUMP = 16;//跳到兽潮层
|
||||
int OUT_BLOODY_BATTLE = 17;//退出血战
|
||||
int MISSION_LEAD = 18;//任务指引
|
||||
}
|
||||
|
|
|
|||
|
|
@ -233,6 +233,9 @@ public class GMRequestHandler extends BaseHandler{
|
|||
}
|
||||
|
||||
break;
|
||||
case GlobalGm.MISSION_LEAD:
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.ljsd.jieling.handler;
|
||||
|
||||
import com.ljsd.jieling.logic.hero.HeroLogic;
|
||||
import com.ljsd.jieling.logic.item.ItemLogic;
|
||||
import com.ljsd.jieling.netty.cocdex.PacketNetData;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import com.ljsd.jieling.protocols.HeroInfoProto;
|
||||
|
|
@ -22,7 +23,11 @@ public class UpHeroStarHandler extends BaseHandler{
|
|||
HeroInfoProto.UpHeroStarRequest upHeroStarRequest = HeroInfoProto.UpHeroStarRequest.parseFrom(bytes);
|
||||
List<HeroInfoProto.ConsumeMaterial> consumeMaterialsList = upHeroStarRequest.getConsumeMaterialsList();
|
||||
String heroId = upHeroStarRequest.getHeroId();
|
||||
HeroLogic.getInstance().upHeroStar(iSession,heroId,consumeMaterialsList);
|
||||
if(upHeroStarRequest.getType()==1){
|
||||
HeroLogic.getInstance().upHeroStar(iSession,heroId,consumeMaterialsList);
|
||||
}else{
|
||||
ItemLogic.getInstance().especialEquipUpStar(iSession,heroId,consumeMaterialsList);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,10 +36,11 @@ public class UseAndPriceItemHandler extends BaseHandler {
|
|||
ItemLogic.getInstance().priceItem(iSession,itemList);
|
||||
} else if (type == 2){ //分解装备
|
||||
ItemLogic.getInstance().decomposeEquip(iSession,equipIdsList);
|
||||
}else{
|
||||
} else if(type==3){
|
||||
CommonProto.Drop.Builder baseBuilder =ItemLogic.getInstance().decomposeHero(iSession,heroIdsList,null, MessageTypeProto.MessageType.USER_AND_PRICE_ITEM_RESPONSE_VALUE);
|
||||
ItemLogic.sendUseAndPriceItemMessage(iSession, MessageTypeProto.MessageType.USER_AND_PRICE_ITEM_RESPONSE_VALUE, baseBuilder);
|
||||
}else {//分解法宝
|
||||
ItemLogic.getInstance().decomposeEspecialEquip(iSession, equipIdsList);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,20 +2,21 @@ package com.ljsd.jieling.handler.activity;
|
|||
|
||||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
import com.ljsd.jieling.logic.activity.ActivityLogic;
|
||||
import com.ljsd.jieling.netty.cocdex.PacketNetData;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import com.ljsd.jieling.protocols.MessageTypeProto;
|
||||
import com.ljsd.jieling.protocols.PlayerInfoProto;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class ToBeStrongerHandler extends BaseHandler<PlayerInfoProto.GetToBeStrongerRequest>{
|
||||
public class ToBeStrongerHandler extends BaseHandler{
|
||||
@Override
|
||||
public MessageTypeProto.MessageType getMessageCode() {
|
||||
return MessageTypeProto.MessageType.TO_BE_STRONGER_REQUEST;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processWithProto(ISession iSession, PlayerInfoProto.GetToBeStrongerRequest proto){
|
||||
ActivityLogic.getInstance().toBeStronger(iSession,proto.getTempId(),MessageTypeProto.MessageType.TO_BE_STRONGER_RESPONSE);
|
||||
public void process(ISession iSession, PacketNetData netData) throws Exception {
|
||||
ActivityLogic.getInstance().toBeStronger(iSession,MessageTypeProto.MessageType.TO_BE_STRONGER_RESPONSE);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package com.ljsd.jieling.handler.map;
|
||||
|
||||
import com.ljsd.jieling.config.MapPointConfig;
|
||||
import com.ljsd.jieling.util.MonsterUtil;
|
||||
|
||||
public class Cell {
|
||||
|
||||
private int cellId;
|
||||
|
|
@ -18,6 +21,14 @@ public class Cell {
|
|||
this.cellId = cellId;
|
||||
this.pointId = pointId;
|
||||
this.eventId = eventId;
|
||||
MapPointConfig mapPointConfig = MapPointConfig.scMapEventMap.get(pointId);
|
||||
int[] isShowFightAbility = mapPointConfig.getIsShowFightAbility();
|
||||
if(isShowFightAbility !=null&& isShowFightAbility.length>0){
|
||||
if(isShowFightAbility[0]!=0){
|
||||
int force = MonsterUtil.getMonsterForce(isShowFightAbility);
|
||||
this.setForce(force);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int getCellId() {
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ public class EventType {
|
|||
public static final int fourtySix = 46;
|
||||
public static final int fourtySeven = 47;
|
||||
public static final int fourtyEight = 48;
|
||||
|
||||
public static final int fourtyNine = 49;
|
||||
|
||||
public static final int updatePonintEvent = 1;
|
||||
public static final int fightEvent = 2;
|
||||
|
|
|
|||
|
|
@ -421,13 +421,7 @@ public class MapLogic {
|
|||
continue;
|
||||
}
|
||||
Cell cellValue = new Cell(xy, mapPointConfig.getInitialEventId(), mapPointConfig.getId());
|
||||
int[] isShowFightAbility = mapPointConfig.getIsShowFightAbility();
|
||||
if(isShowFightAbility !=null&& isShowFightAbility.length>0){
|
||||
if(isShowFightAbility[0]!=0){
|
||||
int force = MonsterUtil.getMonsterForce(isShowFightAbility);
|
||||
cellValue.setForce(force);
|
||||
}
|
||||
}
|
||||
|
||||
newMap.put(xy, cellValue);
|
||||
}
|
||||
if (user.getPlayerInfoManager().getMapId() == 100) {
|
||||
|
|
@ -1353,7 +1347,7 @@ public class MapLogic {
|
|||
}
|
||||
} else {
|
||||
int[] option = sEventPointConfig.getOption();
|
||||
if (option == null) {
|
||||
if (option == null||option.length<1) {
|
||||
LOGGER.info("option == null sEventPointConfig.getId()=>{}", sEventPointConfig.getId());
|
||||
MessageUtil.sendErrorResponse(session, 0, messageType.getNumber(), "");
|
||||
return;
|
||||
|
|
@ -1514,6 +1508,8 @@ public class MapLogic {
|
|||
if(SChallengeConfig.sChallengeConfigs.get(mapManager.getCurMapId()).getType()==4){
|
||||
Cell cell = mapManager.getMapInfo().get(triggerXY);
|
||||
MapPointConfig mapPointConfig = MapPointConfig.getScMapEventMap().get(cell.getPointId());
|
||||
Map<Integer, SCMap> map= SCMap.sCMap.get(mapManager.getCurMapId());
|
||||
|
||||
if(mapPointConfig.getStyle()==1){
|
||||
BehaviorUtil.destoryApointXY(user, triggerXY);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import com.ljsd.jieling.handler.map.MapLogic;
|
|||
import com.ljsd.jieling.handler.map.MapManager;
|
||||
import com.ljsd.jieling.handler.mission.CheckMissionReturn;
|
||||
import com.ljsd.jieling.handler.mission.Mission;
|
||||
import com.ljsd.jieling.logic.OnlineUserManager;
|
||||
import com.ljsd.jieling.logic.dao.Hero;
|
||||
import com.ljsd.jieling.logic.dao.StoreInfo;
|
||||
import com.ljsd.jieling.logic.dao.StoreManager;
|
||||
|
|
@ -24,8 +25,11 @@ import com.ljsd.jieling.logic.store.StoreLogic;
|
|||
import com.ljsd.jieling.protocols.CommonProto;
|
||||
import com.ljsd.jieling.protocols.FightInfoProto;
|
||||
import com.ljsd.jieling.protocols.MapInfoProto;
|
||||
import com.ljsd.jieling.protocols.MessageTypeProto;
|
||||
import com.ljsd.jieling.util.CellUtil;
|
||||
import com.ljsd.jieling.util.MessageUtil;
|
||||
import com.ljsd.jieling.util.MonsterUtil;
|
||||
import com.ljsd.jieling.util.TimeUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
|
@ -428,4 +432,15 @@ public class BehaviorUtil {
|
|||
}
|
||||
return monsterTeamList;
|
||||
}
|
||||
|
||||
public static void refreshTimeMonster(User user,int[][] behaviorTypeValues){
|
||||
user.getMapManager().updateEndlessCellTime(user.getMapManager().getCurXY(), (int)(TimeUtils.now()/1000)+behaviorTypeValues[0][1]);
|
||||
Map<Integer, Integer> cellRefreshTime = user.getMapManager().getEndlessMapInfo().getCellRefreshTime();
|
||||
MapInfoProto.EndlessTimeIndication.Builder indication = MapInfoProto.EndlessTimeIndication.newBuilder();
|
||||
for(Map.Entry<Integer, Integer> entry:cellRefreshTime.entrySet()){
|
||||
CommonProto.EndlessRefreshInfo info = CommonProto.EndlessRefreshInfo.newBuilder().setCellId(entry.getKey()).setTime(entry.getValue()).build();
|
||||
indication.addInfos(info);
|
||||
}
|
||||
MessageUtil.sendIndicationMessage(OnlineUserManager.getSessionByUid(user.getId()),1, MessageTypeProto.MessageType.ENDLESS_REFRESH_INDICAITON_VALUE,indication.build(),true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,14 +34,7 @@ public class FourtyEightBehavior extends BaseBehavior{
|
|||
|
||||
@Override
|
||||
public boolean afterFight(User user, int[][] behaviorTypeValues, FightInfoProto.FightEndResponse.Builder fightEndResponse){
|
||||
user.getMapManager().updateEndlessCellTime(user.getMapManager().getCurXY(), (int)(TimeUtils.now()/1000)+behaviorTypeValues[0][1]);
|
||||
Map<Integer, Integer> cellRefreshTime = user.getMapManager().getEndlessMapInfo().getCellRefreshTime();
|
||||
MapInfoProto.EndlessTimeIndication.Builder indication = MapInfoProto.EndlessTimeIndication.newBuilder();
|
||||
for(Map.Entry<Integer, Integer> entry:cellRefreshTime.entrySet()){
|
||||
CommonProto.EndlessRefreshInfo info = CommonProto.EndlessRefreshInfo.newBuilder().setCellId(entry.getKey()).setTime(entry.getValue()).build();
|
||||
indication.addInfos(info);
|
||||
}
|
||||
MessageUtil.sendIndicationMessage(OnlineUserManager.getSessionByUid(user.getId()),1, MessageTypeProto.MessageType.ENDLESS_REFRESH_INDICAITON_VALUE,indication.build(),true);
|
||||
BehaviorUtil.refreshTimeMonster(user,behaviorTypeValues);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
package com.ljsd.jieling.handler.map.behavior;
|
||||
|
||||
import com.ljsd.jieling.handler.map.EventType;
|
||||
import com.ljsd.jieling.logic.OnlineUserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.protocols.CommonProto;
|
||||
import com.ljsd.jieling.protocols.MapInfoProto;
|
||||
import com.ljsd.jieling.protocols.MessageTypeProto;
|
||||
import com.ljsd.jieling.util.MessageUtil;
|
||||
import com.ljsd.jieling.util.TimeUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
public class FourtyNineBehavior extends BaseBehavior {
|
||||
@Override
|
||||
public int getBehaviorType() {
|
||||
return EventType.fourtyNine;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean process(int optionId, User user, int[][] behaviorTypeValues, MapInfoProto.EventUpdateResponse.Builder eventUpdateResponse) throws Exception {
|
||||
BehaviorUtil.refreshTimeMonster(user,behaviorTypeValues);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -211,6 +211,11 @@ public class ActivityLogic {
|
|||
if (activityMission != null) {
|
||||
continue;
|
||||
}
|
||||
AbstractActivity abstractActivity = ActivityTypeEnum.getActicityType(activityId);
|
||||
if (null==abstractActivity) {
|
||||
continue;
|
||||
}
|
||||
abstractActivity.initActivity(user);
|
||||
if(!initOtherActivity(user, sGlobalActivity)){
|
||||
activityManager.initAllActivityMission(activityId);
|
||||
}
|
||||
|
|
@ -1053,12 +1058,14 @@ public class ActivityLogic {
|
|||
* @param session
|
||||
* @param messageType
|
||||
*/
|
||||
public void toBeStronger(ISession session, int tempId,MessageTypeProto.MessageType messageType){
|
||||
PlayerInfoProto.GetToBeStrongerResponse.Builder response = PlayerInfoProto.GetToBeStrongerResponse.newBuilder();
|
||||
for(int i = 0 ; i <6;i++){
|
||||
CommonProto.StrongerInfo.Builder info = CommonProto.StrongerInfo.newBuilder().setCurScore(1000).setMaxScore(6000);
|
||||
response.addInfos(info.build());
|
||||
}
|
||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),response.build(),true);
|
||||
public void toBeStronger(ISession session,MessageTypeProto.MessageType messageType) throws Exception {
|
||||
User user = UserManager.getUser(session.getUid());
|
||||
user.getUserMissionManager().onGameEvent(user,GameEvent.TO_BE_STRONGER);
|
||||
// PlayerInfoProto.GetToBeStrongerResponse.Builder response = PlayerInfoProto.GetToBeStrongerResponse.newBuilder();
|
||||
// for(int i = 0 ; i <6;i++){
|
||||
// CommonProto.StrongerInfo.Builder info = CommonProto.StrongerInfo.newBuilder().setCurScore(1000).setMaxScore(6000);
|
||||
// response.addInfos(info.build());
|
||||
// }
|
||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),null,true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ public class CumulationData {
|
|||
public int takeSenvenLoinRewardTimes;// 领取七日登录奖励次数达到
|
||||
public int takeDailyBoxTimes;// 领取日常任务宝箱奖励次数达到
|
||||
public int wearEquipTimes;// 妖灵师穿戴装备件数达到
|
||||
public int toBeStronger;//我要变强
|
||||
public Map<Integer,Integer> synthesisHeroStarTimesMap = new HashMap<>();// 碎片合成%s星妖灵师次数达到
|
||||
|
||||
public Map<Integer,Integer> heroUpStarTimesMap = new HashMap<>();//将妖灵师%s进阶次数达到
|
||||
|
|
@ -156,6 +157,7 @@ public class CumulationData {
|
|||
givePresents=0;
|
||||
friendNums=0;
|
||||
monsterAttackTimes = 0;
|
||||
toBeStronger = 0;
|
||||
}
|
||||
|
||||
private void clearArray(int[] source){
|
||||
|
|
|
|||
|
|
@ -42,6 +42,13 @@ public class EquipManager extends MongoBase {
|
|||
especialEquipMap.put(especialEquip.getId(), especialEquip);
|
||||
}
|
||||
|
||||
public void removeEspecialEquip(String equip){
|
||||
if(especialEquipMap.containsKey(equip)){
|
||||
removeString(getMongoKey()+".especialEquipMap."+equip);
|
||||
especialEquipMap.remove(equip);
|
||||
}
|
||||
|
||||
}
|
||||
public void remove(String equipId){
|
||||
if (equipMap.containsKey(equipId)){
|
||||
removeString(getMongoKey()+".equipMap." + equipId);
|
||||
|
|
@ -76,4 +83,14 @@ public class EquipManager extends MongoBase {
|
|||
public Map<Integer, Integer> getEquipHandBook() {
|
||||
return equipHandBook;
|
||||
}
|
||||
|
||||
public void upStarEspecialEquip(String equipId){
|
||||
EspecialEquip especialEquip = especialEquipMap.get(equipId);
|
||||
if(especialEquip ==null){
|
||||
return;
|
||||
}
|
||||
especialEquip.setStar(especialEquip.getStar()+1);
|
||||
especialEquipMap.put(equipId,especialEquip);
|
||||
updateString("especialEquipMap."+equipId+".star",especialEquip.getStar()+1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ public class EspecialEquip extends PropertyItem {
|
|||
super();
|
||||
super.setId(KeyGenUtils.produceIdByModule(UUIDEnum.ESPECIAL_EQUIP, uid));
|
||||
super.setEquipId(equipTid);
|
||||
this.star = 1;
|
||||
this.star = 8;
|
||||
}
|
||||
public EspecialEquip() {
|
||||
this.setRootCollection(User._COLLECTION_NAME);
|
||||
|
|
|
|||
|
|
@ -208,10 +208,6 @@ public class Hero extends MongoBase {
|
|||
this.especialEquip = especialEquip;
|
||||
updateString("especialEquip",especialEquip);
|
||||
}
|
||||
public void removeEspecial() {
|
||||
removeString(getMongoKey()+".especialEquip");
|
||||
especialEquip="";
|
||||
}
|
||||
|
||||
public String getEspecialEquip() {
|
||||
return especialEquip;
|
||||
|
|
|
|||
|
|
@ -6,10 +6,8 @@ import com.ljsd.jieling.config.*;
|
|||
import com.ljsd.jieling.core.GlobalsDef;
|
||||
import com.ljsd.jieling.core.HandlerLogicThread;
|
||||
import com.ljsd.jieling.core.VipPrivilegeType;
|
||||
import com.ljsd.jieling.db.mongo.MongoUtil;
|
||||
import com.ljsd.jieling.globals.BIReason;
|
||||
import com.ljsd.jieling.globals.Global;
|
||||
import com.ljsd.jieling.logic.OnlineUserManager;
|
||||
import com.ljsd.jieling.logic.activity.event.HeroUpStarEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
import com.ljsd.jieling.logic.dao.*;
|
||||
|
|
@ -17,7 +15,6 @@ import com.ljsd.jieling.logic.dao.root.User;
|
|||
import com.ljsd.jieling.logic.fight.CombatLogic;
|
||||
import com.ljsd.jieling.logic.item.ItemLogic;
|
||||
import com.ljsd.jieling.logic.mission.GameEvent;
|
||||
import com.ljsd.jieling.logic.mission.event.MissionEventDistributor;
|
||||
import com.ljsd.jieling.network.server.ProtocolsManager;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import com.ljsd.jieling.protocols.CommonProto;
|
||||
|
|
@ -843,6 +840,23 @@ public class HeroLogic {
|
|||
}
|
||||
return sb;
|
||||
}
|
||||
//法宝技能
|
||||
String especialEquipId = hero.getEspecialEquip();
|
||||
if(!StringUtil.isEmpty(especialEquipId)){
|
||||
EspecialEquip especialEquip = user.getEquipManager().getEspecialEquipMap().get(especialEquipId);
|
||||
SEquipTalismana sEquipTalismana = SEquipTalismana.equipTalismanaStarMap.get(especialEquip.getEquipId()).get(especialEquip.getStar());
|
||||
for(int skill:sEquipTalismana.getOpenSkillRules()){
|
||||
sb.append(skill).append(DIVISION);
|
||||
}
|
||||
SCHero tempHero = SCHero.getsCHero().get(hero.getTemplateId());
|
||||
int[][] specialSkill = sEquipTalismana.getSpecialSkill();
|
||||
for(int i = 0 ; i < specialSkill.length;i++){
|
||||
if(tempHero.getProfession()==specialSkill[i][0]){
|
||||
sb.append(specialSkill[i][1]).append(DIVISION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return sb;
|
||||
}
|
||||
|
||||
|
|
@ -1110,17 +1124,19 @@ public class HeroLogic {
|
|||
Map<String, EspecialEquip> especialEquipMap = user.getEquipManager().getEspecialEquipMap();
|
||||
int equipTempId = especialEquipMap.get(especialEquip).getEquipId();
|
||||
int tempStar = especialEquipMap.get(especialEquip).getStar();
|
||||
Map<Integer, SEquipTalismana> equipTalismanaMap = SEquipTalismana.equipTalismanaMap;
|
||||
for(Map.Entry<Integer, SEquipTalismana> entry:equipTalismanaMap.entrySet()){
|
||||
SEquipTalismana equipTali = entry.getValue();
|
||||
if(equipTali.getTalismanaId()!=equipTempId){
|
||||
continue;
|
||||
Map<Integer, Map<Integer, SEquipTalismana>> equipTalismanaMap = SEquipTalismana.equipTalismanaStarMap;
|
||||
|
||||
SEquipTalismana equipTali = equipTalismanaMap.get(equipTempId).get(tempStar);
|
||||
combinedAttribute(equipTali.getProperty(),heroAllAttribute);
|
||||
//法宝职业额外加成
|
||||
SCHero tempHero = SCHero.getsCHero().get(hero.getTemplateId());
|
||||
int[][] specialProperty = equipTali.getSpecialProperty();
|
||||
for(int i = 0 ; i < specialProperty.length;i++){
|
||||
if(tempHero.getProfession()==specialProperty[i][0]){
|
||||
int [][] property = new int[1][];
|
||||
property[0] = new int[]{specialProperty[i][1],specialProperty[i][2]};
|
||||
combinedAttribute(property, heroAllAttribute);
|
||||
}
|
||||
if(equipTali.getLevel()!=tempStar){
|
||||
continue;
|
||||
}
|
||||
combinedAttribute(equipTali.getProperty(),heroAllAttribute);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1370,7 +1386,7 @@ public class HeroLogic {
|
|||
hero.removeEquip(position);
|
||||
}
|
||||
}else if(type==2){
|
||||
hero.removeEspecial();
|
||||
hero.updateEspecial("");
|
||||
}
|
||||
|
||||
//发送成功消息
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
package com.ljsd.jieling.logic.item;
|
||||
|
||||
import com.ljsd.jieling.config.SCHeroRankUpConfig;
|
||||
import com.ljsd.jieling.config.SGameSetting;
|
||||
import com.ljsd.jieling.config.SHeroLevlConfig;
|
||||
import com.ljsd.jieling.config.SItem;
|
||||
import com.ljsd.jieling.config.*;
|
||||
import com.ljsd.jieling.globals.BIReason;
|
||||
import com.ljsd.jieling.globals.Global;
|
||||
import com.ljsd.jieling.handler.map.MapManager;
|
||||
|
|
@ -12,6 +9,7 @@ import com.ljsd.jieling.logic.dao.root.User;
|
|||
import com.ljsd.jieling.logic.hero.HeroLogic;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import com.ljsd.jieling.protocols.CommonProto;
|
||||
import com.ljsd.jieling.protocols.HeroInfoProto;
|
||||
import com.ljsd.jieling.protocols.MessageTypeProto;
|
||||
import com.ljsd.jieling.protocols.PlayerInfoProto;
|
||||
import com.ljsd.jieling.util.CBean2Proto;
|
||||
|
|
@ -182,6 +180,34 @@ public class ItemLogic {
|
|||
sendUseAndPriceItemMessage(iSession, msgId, drop);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分解法宝
|
||||
* @param iSession
|
||||
* @param equipIdsList
|
||||
* @throws Exception
|
||||
*/
|
||||
public void decomposeEspecialEquip(ISession iSession, List<String> equipIdsList) throws Exception {
|
||||
int msgId = MessageTypeProto.MessageType.USER_AND_PRICE_ITEM_RESPONSE_VALUE;
|
||||
int uid = iSession.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
EquipManager equipManager = user.getEquipManager();
|
||||
Map<Integer,Integer> reward = new HashMap<>();
|
||||
for (String equipId : equipIdsList) {
|
||||
EspecialEquip equip= equipManager.getEspecialEquipMap().get(equipId);
|
||||
int[][] resolve = SEquipTalismana.equipTalismanaStarMap.get(equip.getEquipId()).get(equip.getStar()).getResolve();
|
||||
for(int i = 0;i<resolve.length;i++){
|
||||
if(reward.get(resolve[i][0])==null){
|
||||
reward.put(resolve[i][0],resolve[i][1]);
|
||||
}else{
|
||||
reward.put(resolve[i][0],reward.get(resolve[i][0])+resolve[i][1]);
|
||||
}
|
||||
}
|
||||
equipManager.removeEspecialEquip(equipId);
|
||||
}
|
||||
CommonProto.Drop.Builder drop = ItemUtil.dropMap(user,reward,BIReason.DECOMPOS_EQUIP_REWARD);
|
||||
sendUseAndPriceItemMessage(iSession, msgId, drop);
|
||||
}
|
||||
|
||||
private String checkEquipResolve(List<String> equipIdsList,EquipManager equipManager) {
|
||||
if (equipIdsList.size() == 0){
|
||||
return "无可分解装备";
|
||||
|
|
@ -351,4 +377,69 @@ public class ItemLogic {
|
|||
}
|
||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),null,true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 法宝进阶
|
||||
* @param session
|
||||
* @param equipId
|
||||
* @param materials
|
||||
*/
|
||||
public void especialEquipUpStar(ISession session, String equipId, List<HeroInfoProto.ConsumeMaterial> materials) throws Exception {
|
||||
User user = UserManager.getUser(session.getUid());
|
||||
EspecialEquip especialEquip = user.getEquipManager().getEspecialEquipMap().get(equipId);
|
||||
SEquipTalismana sEquipTalismana = SEquipTalismana.equipTalismanaStarMap.get(especialEquip.getEquipId()).get(especialEquip.getStar());
|
||||
Map<Integer, SEquipTalismanaRankup> equipTalismanaRankupMap = SEquipTalismanaRankup.equipTalismanaRankupMap;
|
||||
boolean success = true;
|
||||
//按槽位遍历所需材料
|
||||
for(int i = 0 ; i <sEquipTalismana.getRankupConsumeMaterial().length;i++){
|
||||
//遍历前端传进材料
|
||||
for(HeroInfoProto.ConsumeMaterial material:materials){
|
||||
if(material.getPosition()!=sEquipTalismana.getRankupConsumeMaterial()[i][0]){
|
||||
success=false;
|
||||
continue;
|
||||
}
|
||||
SEquipTalismanaRankup sEquipTalismanaRankup = equipTalismanaRankupMap.get(sEquipTalismana.getRankupConsumeMaterial()[i][1]);
|
||||
for(String materEquip:material.getHeroIdsList()){
|
||||
EspecialEquip especialEquip1 = user.getEquipManager().getEspecialEquipMap().get(materEquip);
|
||||
//材料种类判断
|
||||
if(sEquipTalismanaRankup.getIssame()==1){
|
||||
if(especialEquip1.getEquipId()!=especialEquip.getEquipId()){
|
||||
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.UP_HERO_STAR_RESPONSE_VALUE,"材料不足");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(especialEquip1.getStar()!=sEquipTalismanaRankup.getStarLimit()){
|
||||
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.UP_HERO_STAR_RESPONSE_VALUE,"材料不足");
|
||||
return;
|
||||
}
|
||||
if(sEquipTalismanaRankup.getIsId()!=0&&sEquipTalismanaRankup.getIsId()!=especialEquip1.getEquipId()){
|
||||
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.UP_HERO_STAR_RESPONSE_VALUE,"材料不足");
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
//材料数量判断
|
||||
if(material.getHeroIdsList().size()<sEquipTalismana.getRankupConsumeMaterial()[i][2]){
|
||||
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.UP_HERO_STAR_RESPONSE_VALUE,"材料不足");
|
||||
return;
|
||||
}
|
||||
success=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
boolean b = ItemUtil.itemCost(user, sEquipTalismana.getRankupBasicMaterial(), BIReason.ESPECIAL_EQUIP_UP_LEVEL_CONSUME, 1);
|
||||
if(success&&b){
|
||||
for(HeroInfoProto.ConsumeMaterial material:materials){
|
||||
List<String> heroIdsList = material.getHeroIdsList();
|
||||
Iterator<String> iterator = heroIdsList.iterator();
|
||||
while (iterator.hasNext()){
|
||||
user.getEquipManager().removeEspecialEquip(iterator.next());
|
||||
}
|
||||
}
|
||||
MessageUtil.sendMessage(session,1,MessageTypeProto.MessageType.UP_HERO_STAR_RESPONSE_VALUE,null,true);
|
||||
}else{
|
||||
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.UP_HERO_STAR_RESPONSE_VALUE,"材料不足");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,4 +52,6 @@ public enum GameEvent {
|
|||
MONSTER_ATTACK_PLAY,//参与兽潮来袭
|
||||
MONSTER_ATTACK_LEVEL, // 兽潮来袭到达层
|
||||
|
||||
TO_BE_STRONGER,//我要变强
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -584,6 +584,9 @@ public class MissionLoigc {
|
|||
case MONSTER_ATTACK_LEVEL:
|
||||
count = user.getMapManager().getLastMonsterAttack() - 1;
|
||||
break;
|
||||
case TO_BE_STRONGER:
|
||||
count = cumulationData.toBeStronger;
|
||||
break;
|
||||
default:
|
||||
count = 0;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ public enum MissionType {
|
|||
|
||||
JOIN_MONSTER_ATTACK_TIMES(56),//参与兽潮来袭的次数
|
||||
MONSTER_ATTACK_LEVEL(57),//兽潮来袭到达x层
|
||||
|
||||
TO_BE_STRONGER(58)//我要变强点击:%s次
|
||||
|
||||
;
|
||||
|
||||
|
|
@ -206,6 +206,8 @@ public enum MissionType {
|
|||
return JOIN_MONSTER_ATTACK_TIMES;//参与兽潮来袭的次数
|
||||
case 57:
|
||||
return MONSTER_ATTACK_LEVEL;//兽潮来袭到达x层
|
||||
case 58:
|
||||
return TO_BE_STRONGER;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ public class DataManagerDistributor {
|
|||
|
||||
judges.put(MissionType.JOIN_MONSTER_ATTACK_TIMES,new JoinMonsterAttackManager());
|
||||
judges.put(MissionType.MONSTER_ATTACK_LEVEL,new DefaultDataManager());
|
||||
judges.put(MissionType.TO_BE_STRONGER,new StrongerManager());
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
package com.ljsd.jieling.logic.mission.data;
|
||||
|
||||
import com.ljsd.jieling.logic.dao.CumulationData;
|
||||
import com.ljsd.jieling.logic.mission.MissionType;
|
||||
|
||||
public class StrongerManager implements BaseDataManager {
|
||||
@Override
|
||||
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
|
||||
data.toBeStronger++;
|
||||
return new CumulationData.Result(missionType);
|
||||
}
|
||||
}
|
||||
|
|
@ -241,6 +241,11 @@ public class MissionEventDistributor {
|
|||
eventEnumListMap.put(GameEvent.MONSTER_ATTACK_LEVEL,typeList);
|
||||
eventProcessor.put(GameEvent.MONSTER_ATTACK_LEVEL,new CumulationDataEventProcessor());
|
||||
|
||||
typeList = new ArrayList<>();
|
||||
typeList.add(MissionType.TO_BE_STRONGER);
|
||||
eventEnumListMap.put(GameEvent.TO_BE_STRONGER,typeList);
|
||||
eventProcessor.put(GameEvent.TO_BE_STRONGER,new CumulationDataEventProcessor());
|
||||
|
||||
}
|
||||
|
||||
private static final ThreadLocal<Map<GameMisionType, List<MissionStateChangeInfo>>> threadMissionChangeList =
|
||||
|
|
|
|||
|
|
@ -71,10 +71,10 @@ public class BuyGoodsLogic {
|
|||
if(isDiscount!=0){
|
||||
price=(int)(sRechargeCommodityConfig.getPrice() * (10 + isDiscount)/10f);
|
||||
}
|
||||
if(!openId.equals("gm-test")&&price*10!=amount){
|
||||
if(!openId.equals("gm-test")&&price*100!=amount){
|
||||
resultRes.setResultCode(0);
|
||||
resultRes.setResultMsg("amount is wrong");
|
||||
LOGGER.info("the uid={},shuld pay={},amount={}",uid,price,amount);
|
||||
LOGGER.info("the uid={},should pay={},amount={}",uid,price*100,amount);
|
||||
return resultRes;
|
||||
}
|
||||
buyCount=buyCount+1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue