商店修改、表格结构修改

back_recharge
lvxinran 2019-07-16 18:07:23 +08:00
parent bbf6b94cba
commit 195535617e
7 changed files with 48 additions and 12 deletions

View File

@ -21,6 +21,8 @@ public class SChallengeStarBox implements BaseConfig{
private int[][] reward; private int[][] reward;
private int[][] extraReward;
public int getId() { public int getId() {
return id; return id;
} }
@ -32,4 +34,8 @@ public class SChallengeStarBox implements BaseConfig{
public int[][] getReward() { public int[][] getReward() {
return reward; return reward;
} }
public int[][] getExtraReward() {
return extraReward;
}
} }

View File

@ -19,7 +19,7 @@ public class SRechargeCommodityConfig implements BaseConfig {
private int[][] baseReward; private int[][] baseReward;
private int[][] extraReward; private int[][][] extraReward;
private int limit; private int limit;
@ -32,6 +32,11 @@ public class SRechargeCommodityConfig implements BaseConfig {
private int order; private int order;
private int accumulativeRecharge; private int accumulativeRecharge;
private int[][] playerLevel;
private int[] openPrivilege;
public static Map<Integer, SRechargeCommodityConfig> rechargeCommodityConfigMap; public static Map<Integer, SRechargeCommodityConfig> rechargeCommodityConfigMap;
public static Map<Integer, SRechargeCommodityConfig> rechargeLevelMap; public static Map<Integer, SRechargeCommodityConfig> rechargeLevelMap;
@ -73,7 +78,7 @@ public class SRechargeCommodityConfig implements BaseConfig {
return baseReward; return baseReward;
} }
public int[][] getExtraReward() { public int[][][] getExtraReward() {
return extraReward; return extraReward;
} }
@ -100,4 +105,12 @@ public class SRechargeCommodityConfig implements BaseConfig {
public int getAccumulativeRecharge() { public int getAccumulativeRecharge() {
return accumulativeRecharge; return accumulativeRecharge;
} }
public int[][] getPlayerLevel() {
return playerLevel;
}
public int[] getOpenPrivilege() {
return openPrivilege;
}
} }

View File

@ -24,7 +24,7 @@ public class SStoreConfig implements BaseConfig {
private int[] openLv; private int[] openLv;
private int[] goods; private int[][] goods;
private int weight; private int weight;
@ -83,7 +83,7 @@ public class SStoreConfig implements BaseConfig {
return openLv; return openLv;
} }
public int[] getGoods() { public int[][] getGoods() {
return goods; return goods;
} }

View File

@ -72,6 +72,8 @@ public class STrialConfig implements BaseConfig {
*/ */
private static int highestTower; private static int highestTower;
private int[][] floorReward;
public int getId() { public int getId() {
return id; return id;
} }
@ -117,4 +119,8 @@ public class STrialConfig implements BaseConfig {
public static int getHighestTower() { public static int getHighestTower() {
return highestTower; return highestTower;
} }
public int[][] getFloorReward() {
return floorReward;
}
} }

View File

@ -34,6 +34,8 @@ public class STrialSetting implements BaseConfig{
private int limitTime; private int limitTime;
private int[] privilegeReward;
public int getId() { public int getId() {
return id; return id;
@ -54,4 +56,8 @@ public class STrialSetting implements BaseConfig{
public int getLimitTime() { public int getLimitTime() {
return limitTime; return limitTime;
} }
public int[] getPrivilegeReward() {
return privilegeReward;
}
} }

View File

@ -218,11 +218,12 @@ public class StoreLogic {
MessageUtil.sendErrorResponse(iSession,0,msgId,err); MessageUtil.sendErrorResponse(iSession,0,msgId,err);
return; return;
} }
int goodsId = sStoreConfig.getGoods()[0];
int goodsNum = sStoreConfig.getGoods()[1]*itemNum; CommonProto.Drop.Builder drop = ItemUtil.drop(user, sStoreConfig.getGoods(), BIReason.STORE_BUY_ITEM);
String reward = goodsId +"#"+goodsNum; if(SStoreTypeConfig.getsStoreTypeConfigMap().get(storeId).getStoreType() != StoreType.GIFT_STORE.getType()){
CommonProto.Drop.Builder drop = ItemUtil.drop(user, StringUtil.parseFiledInt2(reward), BIReason.STORE_BUY_ITEM); user.getUserMissionManager().onGameEvent(user, GameEvent.BUY_MATERIAL,sStoreConfig.getGoods()[0][0],itemNum);
user.getUserMissionManager().onGameEvent(user, GameEvent.BUY_MATERIAL,goodsId,itemNum); }
PlayerInfoProto.BuyStoreItemResponse builder = PlayerInfoProto.BuyStoreItemResponse.newBuilder().setDrop(drop).build(); PlayerInfoProto.BuyStoreItemResponse builder = PlayerInfoProto.BuyStoreItemResponse.newBuilder().setDrop(drop).build();
MessageUtil.sendMessage(iSession, 1,msgId, builder, true); MessageUtil.sendMessage(iSession, 1,msgId, builder, true);
} }
@ -248,7 +249,7 @@ public class StoreLogic {
boolean check =true; boolean check =true;
if(relatedtoVIP == 1){ if(relatedtoVIP == 1){
if(limit == 6){ if(limit == 6){
int goodsNum = sStoreConfig.getGoods()[1]*itemNum; int goodsNum = sStoreConfig.getGoods()[0][1]*itemNum;
check = playerInfoManager.check(limit, goodsNum); check = playerInfoManager.check(limit, goodsNum);
}else{ }else{
check = playerInfoManager.check(limit, itemNum); check = playerInfoManager.check(limit, itemNum);
@ -268,7 +269,7 @@ public class StoreLogic {
if(relatedtoVIP == 1 && limit!=0){ if(relatedtoVIP == 1 && limit!=0){
int updateValue = itemNum; int updateValue = itemNum;
if(limit == 6){ if(limit == 6){
updateValue= sStoreConfig.getGoods()[1]*itemNum; updateValue= sStoreConfig.getGoods()[0][1]*itemNum;
} }
playerInfoManager.updateVipPrivilage(limit,updateValue); playerInfoManager.updateVipPrivilage(limit,updateValue);
} }

View File

@ -8,7 +8,11 @@ public enum StoreType {
SOUL_CRYSTAL_STORE(5), SOUL_CRYSTAL_STORE(5),
SECRET_STORE(6), SECRET_STORE(6),
FUNCTION_STORE(7), FUNCTION_STORE(7),
TRIAL_STORE(8) TRIAL_STORE(8),
GIFT_STORE(9),
; ;
private int type; private int type;