back_recharge
lvxinran 2019-09-27 15:02:56 +08:00
commit 162b0880b7
6 changed files with 26 additions and 26 deletions

View File

@ -50,21 +50,6 @@ public class DataMessageUtils {
logQueue_37.drainTo(sendData37List, 10); logQueue_37.drainTo(sendData37List, 10);
if (!sendDataList.isEmpty()) { if (!sendDataList.isEmpty()) {
class ExclusionStrategy implements com.google.gson.ExclusionStrategy{
@Override
public boolean shouldSkipField(FieldAttributes fieldAttributes) {
return "device_id_s".equals(fieldAttributes.getName()) && "ParamEnvironmentBean".equals(fieldAttributes.getDeclaringClass().getSimpleName());
}
@Override
public boolean shouldSkipClass(Class<?> aClass) {
return false;
}
}
Gson gson = new GsonBuilder()
.setExclusionStrategies(new ExclusionStrategy()) // <---
.create();
KTSendBody sendBody = new KTSendBody(sendDataList); KTSendBody sendBody = new KTSendBody(sendDataList);
HttpPool.sendPost(sendUrl, gson.toJson(sendBody)); HttpPool.sendPost(sendUrl, gson.toJson(sendBody));
} }

View File

@ -133,7 +133,6 @@ public class GMRequestHandler extends BaseHandler{
case GlobalGm.ADOPT_ALL_DIFFICULTY: case GlobalGm.ADOPT_ALL_DIFFICULTY:
while (true){ while (true){
int fightId = cUser.getMainLevelManager().getFightId(); int fightId = cUser.getMainLevelManager().getFightId();
SMainLevelConfig sMainLevelConfig = SMainLevelConfig.config.get(fightId); SMainLevelConfig sMainLevelConfig = SMainLevelConfig.config.get(fightId);
if(sMainLevelConfig.getNextLevel() != -1){ if(sMainLevelConfig.getNextLevel() != -1){
MapLogic.getInstance().openNextMainLevel(cUser,fightId); MapLogic.getInstance().openNextMainLevel(cUser,fightId);
@ -143,15 +142,30 @@ public class GMRequestHandler extends BaseHandler{
} }
case GlobalGm.ADOPT_FIGHT_BY_VALUE: case GlobalGm.ADOPT_FIGHT_BY_VALUE:
int fightId = cUser.getMainLevelManager().getFightId(); int fightId = cUser.getMainLevelManager().getFightId();
while (fightId>prarm1){ if(fightId>prarm1){
break;
}
SMainLevelConfig sMainLevelConfigMain = SMainLevelConfig.config.get(prarm1);
if(cUser.getPlayerInfoManager().getLevel()>sMainLevelConfigMain.getLevelLimit()){
exp = 0;
Map<Integer, SPlayerLevelConfig> sPlayerLevelConfigMapTmp = SPlayerLevelConfig.getsPlayerLevelConfigMap();
for (Map.Entry<Integer, SPlayerLevelConfig> entry :sPlayerLevelConfigMapTmp.entrySet()){
int level = entry.getKey();
SPlayerLevelConfig value = entry.getValue();
if (sMainLevelConfigMain.getLevelLimit() > level){
exp += value.getExp();
}
}
ItemUtil.userLevelUp(cUser,exp);
}
while (fightId<prarm1){
SMainLevelConfig sMainLevelConfig = SMainLevelConfig.config.get(fightId); SMainLevelConfig sMainLevelConfig = SMainLevelConfig.config.get(fightId);
if(sMainLevelConfig.getNextLevel() != -1){ if(sMainLevelConfig.getNextLevel() != -1){
MapLogic.getInstance().openNextMainLevel(cUser,fightId); MapLogic.getInstance().openNextMainLevel(cUser,fightId);
} }
fightId = sMainLevelConfig.getId(); fightId = sMainLevelConfig.getNextLevel();
} }
break; break;
case GlobalGm.ONE_KEY_ITEM_OR_HERO:{ case GlobalGm.ONE_KEY_ITEM_OR_HERO:{
//道具 //道具

View File

@ -2192,7 +2192,8 @@ public class MapLogic {
int state = 1; int state = 1;
SMainLevelConfig sMainLevelConfig = SMainLevelConfig.config.get(fightId); SMainLevelConfig sMainLevelConfig = SMainLevelConfig.config.get(fightId);
if(sMainLevelConfig.getNextLevel()!=-1){ if(sMainLevelConfig.getNextLevel()!=-1){
if(sMainLevelConfig.getLevelLimit()>level){ SMainLevelConfig sMainLevelConfigNext = SMainLevelConfig.config.get(sMainLevelConfig.getNextLevel());
if(sMainLevelConfigNext.getLevelLimit()>level){
state =-1; state =-1;
} }
}else{ }else{

View File

@ -4,7 +4,7 @@ public class ParamEnvironmentSimpleBean extends ParamEnvironmentBean{
private String idfa_s; // ios设备唯一标识必须添加该字段 private String idfa_s; // ios设备唯一标识必须添加该字段
private String imei_s;// 安卓设备唯一标识,必须添加该字段 private String imei_s;// 安卓设备唯一标识,必须添加该字段
private String device_id_s; private String app_device_id_s;
private String brand_s; private String brand_s;
private String dpi_s; private String dpi_s;
private String operator_s; private String operator_s;
@ -20,7 +20,7 @@ public class ParamEnvironmentSimpleBean extends ParamEnvironmentBean{
} }
public String getApp_device_id_s() { public String getApp_device_id_s() {
return device_id_s; return app_device_id_s;
} }
public String getBrand_s() { public String getBrand_s() {
@ -52,7 +52,7 @@ public class ParamEnvironmentSimpleBean extends ParamEnvironmentBean{
} }
public void setApp_device_id_s(String app_device_id_s) { public void setApp_device_id_s(String app_device_id_s) {
this.device_id_s = app_device_id_s; this.app_device_id_s = app_device_id_s;
} }
public void setBrand_s(String brand_s) { public void setBrand_s(String brand_s) {
@ -78,7 +78,7 @@ public class ParamEnvironmentSimpleBean extends ParamEnvironmentBean{
public ParamEnvironmentSimpleBean(String idfa_s, String imei_s, String app_device_id_s, String brand_s, String dpi_s, String operator_s, String os_version_s, boolean wifi_b) { public ParamEnvironmentSimpleBean(String idfa_s, String imei_s, String app_device_id_s, String brand_s, String dpi_s, String operator_s, String os_version_s, boolean wifi_b) {
this.idfa_s = idfa_s; this.idfa_s = idfa_s;
this.imei_s = imei_s; this.imei_s = imei_s;
this.device_id_s = app_device_id_s; this.app_device_id_s = app_device_id_s;
this.brand_s = brand_s; this.brand_s = brand_s;
this.dpi_s = dpi_s; this.dpi_s = dpi_s;
this.operator_s = operator_s; this.operator_s = operator_s;

View File

@ -16,6 +16,6 @@ class ChapterRewardActivity extends AbstractActivity {
boolean takeRewardsProcess(ISession session, SActivityRewardConfig sActivityRewardConfig, ActivityProgressInfo activityProgressInfo) throws Exception { boolean takeRewardsProcess(ISession session, SActivityRewardConfig sActivityRewardConfig, ActivityProgressInfo activityProgressInfo) throws Exception {
int[][] values = sActivityRewardConfig.getValues(); int[][] values = sActivityRewardConfig.getValues();
User user = UserManager.getUser(session.getUid()); User user = UserManager.getUser(session.getUid());
return user.getMainLevelManager().getFightId()>values[0][0]; return user.getMainLevelManager().getFightId()>=values[0][0];
} }
} }

View File

@ -160,7 +160,7 @@ public class ItemUtil {
if (sRewardGroupExtra == null) { if (sRewardGroupExtra == null) {
continue; continue;
} }
selectDrop(sRewardGroup, itemMap, cardMap, equipMap, randomMap, dropRatio); selectDrop(sRewardGroupExtra, itemMap, cardMap, equipMap, randomMap, dropRatio);
} }
} }
} }