Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
27a48fac95
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -3028,6 +3028,90 @@ public final class MessageTypeProto {
|
|||
* <code>WORKSHOP_TECHNOLOGY_RESET_RESPONSE = 12213;</code>
|
||||
*/
|
||||
WORKSHOP_TECHNOLOGY_RESET_RESPONSE(482, 12213),
|
||||
/**
|
||||
* <code>EXPEDITION_GET_EXPEDITION_REQUEST = 20002;</code>
|
||||
*
|
||||
* <pre>
|
||||
*获取节点信息
|
||||
* </pre>
|
||||
*/
|
||||
EXPEDITION_GET_EXPEDITION_REQUEST(483, 20002),
|
||||
/**
|
||||
* <code>EXPEDITION_GET_EXPEDITION_RESONSE = 20003;</code>
|
||||
*/
|
||||
EXPEDITION_GET_EXPEDITION_RESONSE(484, 20003),
|
||||
/**
|
||||
* <code>EXPEDITION_TAKE_BOXREWARD_REQUEST = 20004;</code>
|
||||
*
|
||||
* <pre>
|
||||
*获取层级奖励
|
||||
* </pre>
|
||||
*/
|
||||
EXPEDITION_TAKE_BOXREWARD_REQUEST(485, 20004),
|
||||
/**
|
||||
* <code>EXPEDITION_TAKE_BOXREWARD_RESONSE = 20005;</code>
|
||||
*/
|
||||
EXPEDITION_TAKE_BOXREWARD_RESONSE(486, 20005),
|
||||
/**
|
||||
* <code>EXPEDITION_RELIVE_HERO_REQUEST = 20006;</code>
|
||||
*
|
||||
* <pre>
|
||||
*复活英雄
|
||||
* </pre>
|
||||
*/
|
||||
EXPEDITION_RELIVE_HERO_REQUEST(487, 20006),
|
||||
/**
|
||||
* <code>EXPEDITION_RELIVE_HERO_RESONSE = 20007;</code>
|
||||
*/
|
||||
EXPEDITION_RELIVE_HERO_RESONSE(488, 20007),
|
||||
/**
|
||||
* <code>EXPEDITION_START_BATTLE_REQUEST = 20008;</code>
|
||||
*
|
||||
* <pre>
|
||||
*开始节点战斗操作
|
||||
* </pre>
|
||||
*/
|
||||
EXPEDITION_START_BATTLE_REQUEST(489, 20008),
|
||||
/**
|
||||
* <code>EXPEDITION_START_BATTLE_RESONSE = 20009;</code>
|
||||
*/
|
||||
EXPEDITION_START_BATTLE_RESONSE(490, 20009),
|
||||
/**
|
||||
* <code>EXPEDITION_END_BATTLE_REQUEST = 20010;</code>
|
||||
*
|
||||
* <pre>
|
||||
*结束节点战斗操作
|
||||
* </pre>
|
||||
*/
|
||||
EXPEDITION_END_BATTLE_REQUEST(491, 20010),
|
||||
/**
|
||||
* <code>EXPEDITION_END_BATTLE_RESONSE = 20011;</code>
|
||||
*/
|
||||
EXPEDITION_END_BATTLE_RESONSE(492, 20011),
|
||||
/**
|
||||
* <code>EXPEDITION_TAKE_HOLY_EQUIP_REQUEST = 20012;</code>
|
||||
*
|
||||
* <pre>
|
||||
*领取圣物
|
||||
* </pre>
|
||||
*/
|
||||
EXPEDITION_TAKE_HOLY_EQUIP_REQUEST(493, 20012),
|
||||
/**
|
||||
* <code>EXPEDITION_TAKE_HOLY_EQUIP_RESONSE = 20013;</code>
|
||||
*/
|
||||
EXPEDITION_TAKE_HOLY_EQUIP_RESONSE(494, 20013),
|
||||
/**
|
||||
* <code>EXPEDITION_RECOVER_HERO_REQUEST = 20014;</code>
|
||||
*
|
||||
* <pre>
|
||||
*恢复英雄
|
||||
* </pre>
|
||||
*/
|
||||
EXPEDITION_RECOVER_HERO_REQUEST(495, 20014),
|
||||
/**
|
||||
* <code>EXPEDITION_RECOVER_HERO_RESONSE = 20015;</code>
|
||||
*/
|
||||
EXPEDITION_RECOVER_HERO_RESONSE(496, 20015),
|
||||
;
|
||||
|
||||
/**
|
||||
|
@ -6045,6 +6129,90 @@ public final class MessageTypeProto {
|
|||
* <code>WORKSHOP_TECHNOLOGY_RESET_RESPONSE = 12213;</code>
|
||||
*/
|
||||
public static final int WORKSHOP_TECHNOLOGY_RESET_RESPONSE_VALUE = 12213;
|
||||
/**
|
||||
* <code>EXPEDITION_GET_EXPEDITION_REQUEST = 20002;</code>
|
||||
*
|
||||
* <pre>
|
||||
*获取节点信息
|
||||
* </pre>
|
||||
*/
|
||||
public static final int EXPEDITION_GET_EXPEDITION_REQUEST_VALUE = 20002;
|
||||
/**
|
||||
* <code>EXPEDITION_GET_EXPEDITION_RESONSE = 20003;</code>
|
||||
*/
|
||||
public static final int EXPEDITION_GET_EXPEDITION_RESONSE_VALUE = 20003;
|
||||
/**
|
||||
* <code>EXPEDITION_TAKE_BOXREWARD_REQUEST = 20004;</code>
|
||||
*
|
||||
* <pre>
|
||||
*获取层级奖励
|
||||
* </pre>
|
||||
*/
|
||||
public static final int EXPEDITION_TAKE_BOXREWARD_REQUEST_VALUE = 20004;
|
||||
/**
|
||||
* <code>EXPEDITION_TAKE_BOXREWARD_RESONSE = 20005;</code>
|
||||
*/
|
||||
public static final int EXPEDITION_TAKE_BOXREWARD_RESONSE_VALUE = 20005;
|
||||
/**
|
||||
* <code>EXPEDITION_RELIVE_HERO_REQUEST = 20006;</code>
|
||||
*
|
||||
* <pre>
|
||||
*复活英雄
|
||||
* </pre>
|
||||
*/
|
||||
public static final int EXPEDITION_RELIVE_HERO_REQUEST_VALUE = 20006;
|
||||
/**
|
||||
* <code>EXPEDITION_RELIVE_HERO_RESONSE = 20007;</code>
|
||||
*/
|
||||
public static final int EXPEDITION_RELIVE_HERO_RESONSE_VALUE = 20007;
|
||||
/**
|
||||
* <code>EXPEDITION_START_BATTLE_REQUEST = 20008;</code>
|
||||
*
|
||||
* <pre>
|
||||
*开始节点战斗操作
|
||||
* </pre>
|
||||
*/
|
||||
public static final int EXPEDITION_START_BATTLE_REQUEST_VALUE = 20008;
|
||||
/**
|
||||
* <code>EXPEDITION_START_BATTLE_RESONSE = 20009;</code>
|
||||
*/
|
||||
public static final int EXPEDITION_START_BATTLE_RESONSE_VALUE = 20009;
|
||||
/**
|
||||
* <code>EXPEDITION_END_BATTLE_REQUEST = 20010;</code>
|
||||
*
|
||||
* <pre>
|
||||
*结束节点战斗操作
|
||||
* </pre>
|
||||
*/
|
||||
public static final int EXPEDITION_END_BATTLE_REQUEST_VALUE = 20010;
|
||||
/**
|
||||
* <code>EXPEDITION_END_BATTLE_RESONSE = 20011;</code>
|
||||
*/
|
||||
public static final int EXPEDITION_END_BATTLE_RESONSE_VALUE = 20011;
|
||||
/**
|
||||
* <code>EXPEDITION_TAKE_HOLY_EQUIP_REQUEST = 20012;</code>
|
||||
*
|
||||
* <pre>
|
||||
*领取圣物
|
||||
* </pre>
|
||||
*/
|
||||
public static final int EXPEDITION_TAKE_HOLY_EQUIP_REQUEST_VALUE = 20012;
|
||||
/**
|
||||
* <code>EXPEDITION_TAKE_HOLY_EQUIP_RESONSE = 20013;</code>
|
||||
*/
|
||||
public static final int EXPEDITION_TAKE_HOLY_EQUIP_RESONSE_VALUE = 20013;
|
||||
/**
|
||||
* <code>EXPEDITION_RECOVER_HERO_REQUEST = 20014;</code>
|
||||
*
|
||||
* <pre>
|
||||
*恢复英雄
|
||||
* </pre>
|
||||
*/
|
||||
public static final int EXPEDITION_RECOVER_HERO_REQUEST_VALUE = 20014;
|
||||
/**
|
||||
* <code>EXPEDITION_RECOVER_HERO_RESONSE = 20015;</code>
|
||||
*/
|
||||
public static final int EXPEDITION_RECOVER_HERO_RESONSE_VALUE = 20015;
|
||||
|
||||
|
||||
public final int getNumber() { return value; }
|
||||
|
@ -6534,6 +6702,20 @@ public final class MessageTypeProto {
|
|||
case 12211: return WORKSHOP_TECHNOLOGY_RESPONSE;
|
||||
case 12212: return WORKSHOP_TECHNOLOGY_RESET_REQUEST;
|
||||
case 12213: return WORKSHOP_TECHNOLOGY_RESET_RESPONSE;
|
||||
case 20002: return EXPEDITION_GET_EXPEDITION_REQUEST;
|
||||
case 20003: return EXPEDITION_GET_EXPEDITION_RESONSE;
|
||||
case 20004: return EXPEDITION_TAKE_BOXREWARD_REQUEST;
|
||||
case 20005: return EXPEDITION_TAKE_BOXREWARD_RESONSE;
|
||||
case 20006: return EXPEDITION_RELIVE_HERO_REQUEST;
|
||||
case 20007: return EXPEDITION_RELIVE_HERO_RESONSE;
|
||||
case 20008: return EXPEDITION_START_BATTLE_REQUEST;
|
||||
case 20009: return EXPEDITION_START_BATTLE_RESONSE;
|
||||
case 20010: return EXPEDITION_END_BATTLE_REQUEST;
|
||||
case 20011: return EXPEDITION_END_BATTLE_RESONSE;
|
||||
case 20012: return EXPEDITION_TAKE_HOLY_EQUIP_REQUEST;
|
||||
case 20013: return EXPEDITION_TAKE_HOLY_EQUIP_RESONSE;
|
||||
case 20014: return EXPEDITION_RECOVER_HERO_REQUEST;
|
||||
case 20015: return EXPEDITION_RECOVER_HERO_RESONSE;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
@ -6595,7 +6777,7 @@ public final class MessageTypeProto {
|
|||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n\026MessageTypeProto.proto\022\032com.ljsd.jieli" +
|
||||
"ng.protocols*\334y\n\013MessageType\022\027\n\022HEART_BE" +
|
||||
"ng.protocols*\206~\n\013MessageType\022\027\n\022HEART_BE" +
|
||||
"AT_REQUEST\020\350\007\022\030\n\023HEART_BEAT_RESPONSE\020\351\007\022" +
|
||||
"\036\n\031ACTIVITE_WORKSHOP_REQUEST\020\224N\022\037\n\032ACTIV" +
|
||||
"ITE_WORKSHOP_RESPONSE\020\225N\022\027\n\022ARENA_INFO_R" +
|
||||
|
@ -6984,7 +7166,21 @@ public final class MessageTypeProto {
|
|||
"&\n!WORKSHOP_TECHNOLOGY_LEVEL_REQUEST\020\262_\022" +
|
||||
"!\n\034WORKSHOP_TECHNOLOGY_RESPONSE\020\263_\022&\n!WO" +
|
||||
"RKSHOP_TECHNOLOGY_RESET_REQUEST\020\264_\022\'\n\"WO",
|
||||
"RKSHOP_TECHNOLOGY_RESET_RESPONSE\020\265_B\002H\001"
|
||||
"RKSHOP_TECHNOLOGY_RESET_RESPONSE\020\265_\022\'\n!E" +
|
||||
"XPEDITION_GET_EXPEDITION_REQUEST\020\242\234\001\022\'\n!" +
|
||||
"EXPEDITION_GET_EXPEDITION_RESONSE\020\243\234\001\022\'\n" +
|
||||
"!EXPEDITION_TAKE_BOXREWARD_REQUEST\020\244\234\001\022\'" +
|
||||
"\n!EXPEDITION_TAKE_BOXREWARD_RESONSE\020\245\234\001\022" +
|
||||
"$\n\036EXPEDITION_RELIVE_HERO_REQUEST\020\246\234\001\022$\n" +
|
||||
"\036EXPEDITION_RELIVE_HERO_RESONSE\020\247\234\001\022%\n\037E" +
|
||||
"XPEDITION_START_BATTLE_REQUEST\020\250\234\001\022%\n\037EX" +
|
||||
"PEDITION_START_BATTLE_RESONSE\020\251\234\001\022#\n\035EXP" +
|
||||
"EDITION_END_BATTLE_REQUEST\020\252\234\001\022#\n\035EXPEDI",
|
||||
"TION_END_BATTLE_RESONSE\020\253\234\001\022(\n\"EXPEDITIO" +
|
||||
"N_TAKE_HOLY_EQUIP_REQUEST\020\254\234\001\022(\n\"EXPEDIT" +
|
||||
"ION_TAKE_HOLY_EQUIP_RESONSE\020\255\234\001\022%\n\037EXPED" +
|
||||
"ITION_RECOVER_HERO_REQUEST\020\256\234\001\022%\n\037EXPEDI" +
|
||||
"TION_RECOVER_HERO_RESONSE\020\257\234\001B\002H\001"
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
|
||||
|
|
|
@ -232,6 +232,7 @@ public class RedisKey {
|
|||
public final static String PIDGIDTEMP = "PIDGIDTEMP";
|
||||
|
||||
public final static String GUILDBOSS_ARENA_RECORD = "GUILDBOSS_ARENA_RECORD";
|
||||
public final static String GUILDBOSS_PER_ARENA_RECORD = "GUILDBOSS_PER_ARENA_RECORD";
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ public enum ErrorCode implements IErrorCode {
|
|||
ITEM_DECOMPOSE_SOULE_IN(92,"已穿戴"),
|
||||
ITEM_DECOMPOSE_SOULE_CANT(93,"不可分解"),
|
||||
MAP_SWEEP_CANT(94,"该副本不可扫荡"),
|
||||
MAP_SWEEP_START_NOT(95,"sweep 未三星通关"),
|
||||
MAP_SWEEP_START_NOT(95,"sweepBossFight 未三星通关"),
|
||||
MAP_SWEEP_NO(96,"未通关"),
|
||||
MAP_SWEEP_OPENRULE_NULL(97,"功绩不足"),
|
||||
BLOOD_BUY_SCORE_YET(98,"已购买"),
|
||||
|
|
|
@ -101,7 +101,8 @@ public interface BIReason {
|
|||
|
||||
int CHAMPIION_BET_WIN_REWARD = 60 ; // 巅峰赛竞猜赢取
|
||||
|
||||
int GUILD_BOSS_FIGHT_REWARD = 61;//工会boss奖励
|
||||
int GUILD_BOSS_FIGHT_BASE_REWARD = 61;//工会boss基础奖励
|
||||
int GUILD_BOSS_FIGHT_RANDOM_REWARD = 61;//工会boss随机奖励
|
||||
|
||||
int CHAMPIONM_EXCHANGE_REWARD = 62;//巅峰赛兑换奖励
|
||||
|
||||
|
|
|
@ -1870,7 +1870,7 @@ public class MapLogic {
|
|||
if(sChallengeConfig.getSweepingOpenRule()[0]==1){
|
||||
CrossInfo crossInfo = mapManager.getCrossInfoMap().get(mapId);
|
||||
if (null == crossInfo||crossInfo.getStars().size() < sChallengeConfig.getSweepingOpenRule()[1]) {
|
||||
throw new ErrorCodeException(ErrorCode.newDefineCode("sweep 未三星通关"));
|
||||
throw new ErrorCodeException(ErrorCode.newDefineCode("sweepBossFight 未三星通关"));
|
||||
}
|
||||
}else if(sChallengeConfig.getSweepingOpenRule()[0]==2){
|
||||
CrossInfo crossInfo = mapManager.getCrossInfoMap().get(mapId);
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.ljsd.jieling.handler.map.mapHandler;
|
|||
|
||||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
import com.ljsd.jieling.handler.map.SweepLogic;
|
||||
import com.ljsd.jieling.logic.family.GuildFightLogic;
|
||||
import com.ljsd.jieling.netty.cocdex.PacketNetData;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import com.ljsd.jieling.protocols.FightInfoProto;
|
||||
|
@ -27,6 +28,7 @@ public class SweepRightRequestHandler extends BaseHandler{
|
|||
if (type == 1){ //关卡扫荡
|
||||
SweepLogic.getInstance().sweepFight(iSession,fightId,sweepTimes,targetItemId,targetItemNum, MessageTypeProto.MessageType.SWEEP_RIGHT_RESPONSE);
|
||||
}else if(type == 2){ // 工会boss扫荡
|
||||
GuildFightLogic.sweepBossFight(iSession);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ import com.ljsd.jieling.util.MessageUtil;
|
|||
import config.SDailyTasksConfig;
|
||||
import config.SEndlessDifficulty;
|
||||
import config.SGlobalSystemConfig;
|
||||
import config.SRechargeCommodityConfig;
|
||||
import manager.STableManager;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -326,7 +327,7 @@ public class GlobalDataManaager implements IManager {
|
|||
user.getUserMissionManager().onGameEvent(user, GameEvent.DAILY_REFRESH,0);
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.BLOODY_REFRESH,0);
|
||||
FriendLogic.getInstance().refreshState(session);
|
||||
|
||||
flushGoodsTimes(user);
|
||||
PlayerLogic.getInstance().sendTimingMail(user);
|
||||
user.getGuildMyInfo().setLastHurt(0);
|
||||
|
||||
|
@ -351,6 +352,24 @@ public class GlobalDataManaager implements IManager {
|
|||
}
|
||||
}
|
||||
|
||||
public static void flushGoodsTimes(User user){
|
||||
Map<Integer, Integer> buyGoodsTimes = user.getPlayerInfoManager().getRechargeInfo().getBuyGoodsTimes();
|
||||
if(buyGoodsTimes!=null && buyGoodsTimes.isEmpty()){
|
||||
Iterator<Integer> iterator = buyGoodsTimes.keySet().iterator();
|
||||
boolean update = false;
|
||||
while (iterator.hasNext()){
|
||||
Integer goodsId = iterator.next();
|
||||
if(SRechargeCommodityConfig.rechargeCommodityConfigMap.get(goodsId).getDailyUpdate() == 1){
|
||||
buyGoodsTimes.put(goodsId,0);
|
||||
update =true;
|
||||
}
|
||||
}
|
||||
if(update){
|
||||
user.getPlayerInfoManager().getRechargeInfo().setBuyGoodsTimes(buyGoodsTimes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void everTask(int hour){
|
||||
Map<Integer, ISession> sessionMap = OnlineUserManager.sessionMap;
|
||||
int number = 0;
|
||||
|
|
|
@ -1090,29 +1090,56 @@ public class GuildFightLogic {
|
|||
if(myHurt>user.getGuildMyInfo().getMaxBossHurt()){
|
||||
user.getGuildMyInfo().setMaxBossHurt(myHurt);
|
||||
}
|
||||
ArenaRecord arenaRecord = new ArenaRecord();
|
||||
arenaRecord.setFightData(fightResult.getFightData().toByteArray());
|
||||
RedisUtil.getInstence().set(RedisKey.GUILDBOSS_PER_ARENA_RECORD, Integer.toString(uid),arenaRecord);
|
||||
if(myHurt>user.getGuildMyInfo().getLastHurt()){
|
||||
//排行榜更新
|
||||
String rkey = user.getPlayerInfoManager().getGuildId() + RedisKey.Delimiter_colon + bossSeason;
|
||||
double scoreById = RankEnum.toRank(RankEnum.GUILD_BOSS_RANK.getType()).getScoreById(uid, rkey);
|
||||
if(myHurt>scoreById){
|
||||
RankEnum.toRank(RankEnum.GUILD_BOSS_RANK.getType()).addRank(uid,rkey,myHurt);
|
||||
ArenaRecord arenaRecord = new ArenaRecord();
|
||||
arenaRecord.setFightData(fightResult.getFightData().toByteArray());
|
||||
RedisUtil.getInstence().set(RedisKey.GUILDBOSS_ARENA_RECORD, Integer.toString(uid),arenaRecord);
|
||||
}
|
||||
}
|
||||
user.getGuildMyInfo().setLastHurt(myHurt);
|
||||
SGuildBossRewardConfig sGuildBossRewardConfig = SGuildBossRewardConfig.getIndexByHurt(myHurt);
|
||||
|
||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, sGuildBossRewardConfig.getReward(), 1, 0, BIReason.GUILD_BOSS_FIGHT_REWARD);
|
||||
int randomGroupId = MathUtils.randomFromWeight(sGuildBossRewardConfig.getRandomReward());
|
||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, sGuildBossRewardConfig.getReward(), 1, 0, BIReason.GUILD_BOSS_FIGHT_BASE_REWARD);
|
||||
CommonProto.Drop.Builder raadomDrop = ItemUtil.drop(user, new int[]{randomGroupId}, 1, 0, BIReason.GUILD_BOSS_FIGHT_RANDOM_REWARD);
|
||||
|
||||
FightInfoProto.FightEndResponse.Builder fightEndResponse = FightInfoProto.FightEndResponse.newBuilder();
|
||||
fightEndResponse.setEnventDrop(drop);
|
||||
fightEndResponse.setMissionDrop(raadomDrop);
|
||||
fightEndResponse.setEssenceValue(myHurt);
|
||||
fightEndResponse.build();
|
||||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), fightEndResponse.build(), true);
|
||||
}
|
||||
|
||||
public static void sweepBossFight(ISession session) throws Exception {
|
||||
int uid = session.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
int lastHurt = user.getGuildMyInfo().getLastHurt();
|
||||
boolean allow = PlayerLogic.getInstance().checkAndUpdate(user, VipPrivilegeType.UNLOCK_GUILD_BOSS_SWEEP, 1);
|
||||
if(!allow){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
allow = PlayerLogic.getInstance().checkAndUpdate(user, VipPrivilegeType.GUILD_BOSS_CHALLENGE_TIMES, 1);
|
||||
if(!allow){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
ArenaRecord arenaRecord = RedisUtil.getInstence().get(RedisKey.GUILDBOSS_ARENA_RECORD, String.valueOf(uid), ArenaRecord.class);
|
||||
byte[] fightData = arenaRecord.getFightData();
|
||||
CommonProto.FightData fightDataProto = CommonProto.FightData.parseFrom(fightData);
|
||||
SGuildBossRewardConfig sGuildBossRewardConfig = SGuildBossRewardConfig.getIndexByHurt(lastHurt);
|
||||
int randomGroupId = MathUtils.randomFromWeight(sGuildBossRewardConfig.getRandomReward());
|
||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, sGuildBossRewardConfig.getReward(), 1, 0, BIReason.GUILD_BOSS_FIGHT_BASE_REWARD);
|
||||
CommonProto.Drop.Builder raadomDrop = ItemUtil.drop(user, new int[]{randomGroupId}, 1, 0, BIReason.GUILD_BOSS_FIGHT_RANDOM_REWARD);
|
||||
FightInfoProto.SweepRightResponse build = FightInfoProto.SweepRightResponse.newBuilder().setDrop(drop).setRandomDrop(raadomDrop).setFightData(fightDataProto).setHurt(lastHurt).build();
|
||||
MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.SWEEP_RIGHT_RESPONSE_VALUE,build, true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void updateGuildBossInfoByTimes(int times) {
|
||||
|
|
|
@ -85,11 +85,7 @@ public class BuyGoodsLogic {
|
|||
if(buyCount ==null){
|
||||
buyCount = 0;
|
||||
}
|
||||
int isDiscount = sRechargeCommodityConfig.getIsDiscount();
|
||||
int price =sRechargeCommodityConfig.getPrice();
|
||||
if(isDiscount!=0){
|
||||
price=(int)(sRechargeCommodityConfig.getPrice() * (10 + isDiscount)/10f);
|
||||
}
|
||||
buyCount=buyCount+1;
|
||||
int limit = sRechargeCommodityConfig.getLimit();
|
||||
int type = sRechargeCommodityConfig.getType();
|
||||
|
|
|
@ -129,7 +129,7 @@ public class HttpPool {
|
|||
|
||||
public static void main (String [] args){
|
||||
Gson gson = new Gson();
|
||||
String send ="{\"gid\":\"jl_test\",\"time\":1562317800,\"sign\":\"cc4c130e9c6ee66a54ed7cc380a9abbd\",\"jsonStrs\":\"[{\\\"param_data\\\":{\\\"app_id_s\\\":\\\"jl_test\\\",\\\"category_s\\\":\\\"event_app\\\",\\\"platform_s\\\":\\\"ADR\\\",\\\"region_s\\\":\\\"4\\\",\\\"server_s\\\":\\\"50215\\\",\\\"channel_s\\\":\\\"pc\\\",\\\"data_unix\\\":1562317800},\\\"param_event\\\":{\\\"event_s\\\":[\\\"online_0_unix_l\\\",\\\"1562317800\\\",\\\"0\\\"]}}]\"}";
|
||||
String send ="{\"param_data\":{\"app_id_s\":\"jl_test\",\"category_s\":\"event_role\",\"platform_s\":\"ADR\",\"region_s\":\"60215\",\"server_s\":\"60215\",\"channel_s\":\"#\",\"data_unix\":1578542089},\"param_environment\":{\"idfa_s\":\"\",\"imei_s\":\"\",\"app_device_id_s\":\"\",\"brand_s\":\"\",\"dpi_s\":\"\",\"operator_s\":\"\",\"os_version_s\":\"\",\"wifi_b\":false},\"param_user\":{\"user_id_s\":\"w7ww\",\"account_id_s\":\"10040506\"},\"param_role\":{\"role_id_s\":\"10040506\",\"role_name_s\":\"10040506\",\"level_i\":\"100\",\"vip_level_i\":0,\"currency_1_d\":\"9899\",\"currency_2_d\":\"41464\",\"eco_force_11_a\":\"[315870,250891,0,0,0,0,0,0,0,0,0]\"},\"param_event\":{\"event_s\":[\"login_1\",\"LOGOUT\"]}}";
|
||||
init();
|
||||
KTSendBody sendBody = gson.fromJson(send, KTSendBody.class);
|
||||
sendPost("https://gskuld.receiver.extranet.kt007.com:8081/skuld/game/common/",send);
|
||||
|
|
|
@ -15,6 +15,8 @@ public class SGuildBossRewardConfig implements BaseConfig {
|
|||
|
||||
private int[] reward;
|
||||
|
||||
private int[][] randomReward;
|
||||
|
||||
private static TreeMap<Integer, SGuildBossRewardConfig> sGuildBossHurtRewardConfig;
|
||||
|
||||
|
||||
|
@ -43,5 +45,7 @@ public class SGuildBossRewardConfig implements BaseConfig {
|
|||
return reward;
|
||||
}
|
||||
|
||||
|
||||
public int[][] getRandomReward() {
|
||||
return randomReward;
|
||||
}
|
||||
}
|
|
@ -53,6 +53,10 @@ public class SRechargeCommodityConfig implements BaseConfig {
|
|||
|
||||
private int limitShow;
|
||||
|
||||
private int dailyUpdate;
|
||||
|
||||
|
||||
|
||||
public static Map<Integer, SRechargeCommodityConfig> rechargeCommodityConfigMap;
|
||||
public static Map<Integer, SRechargeCommodityConfig> rechargeLevelMap;
|
||||
private static Set<Integer> rchargeHeroGet;
|
||||
|
@ -200,6 +204,10 @@ public class SRechargeCommodityConfig implements BaseConfig {
|
|||
return limitShow;
|
||||
}
|
||||
|
||||
public int getDailyUpdate() {
|
||||
return dailyUpdate;
|
||||
}
|
||||
|
||||
public static Set<Integer> getRchargeHeroGet() {
|
||||
return rchargeHeroGet;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue