商店修改、表格结构修改
parent
bbf6b94cba
commit
195535617e
|
|
@ -21,6 +21,8 @@ public class SChallengeStarBox implements BaseConfig{
|
|||
|
||||
private int[][] reward;
|
||||
|
||||
private int[][] extraReward;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
|
@ -32,4 +34,8 @@ public class SChallengeStarBox implements BaseConfig{
|
|||
public int[][] getReward() {
|
||||
return reward;
|
||||
}
|
||||
|
||||
public int[][] getExtraReward() {
|
||||
return extraReward;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public class SRechargeCommodityConfig implements BaseConfig {
|
|||
|
||||
private int[][] baseReward;
|
||||
|
||||
private int[][] extraReward;
|
||||
private int[][][] extraReward;
|
||||
|
||||
private int limit;
|
||||
|
||||
|
|
@ -32,6 +32,11 @@ public class SRechargeCommodityConfig implements BaseConfig {
|
|||
private int order;
|
||||
|
||||
private int accumulativeRecharge;
|
||||
|
||||
private int[][] playerLevel;
|
||||
|
||||
private int[] openPrivilege;
|
||||
|
||||
public static Map<Integer, SRechargeCommodityConfig> rechargeCommodityConfigMap;
|
||||
public static Map<Integer, SRechargeCommodityConfig> rechargeLevelMap;
|
||||
|
||||
|
|
@ -73,7 +78,7 @@ public class SRechargeCommodityConfig implements BaseConfig {
|
|||
return baseReward;
|
||||
}
|
||||
|
||||
public int[][] getExtraReward() {
|
||||
public int[][][] getExtraReward() {
|
||||
return extraReward;
|
||||
}
|
||||
|
||||
|
|
@ -100,4 +105,12 @@ public class SRechargeCommodityConfig implements BaseConfig {
|
|||
public int getAccumulativeRecharge() {
|
||||
return accumulativeRecharge;
|
||||
}
|
||||
|
||||
public int[][] getPlayerLevel() {
|
||||
return playerLevel;
|
||||
}
|
||||
|
||||
public int[] getOpenPrivilege() {
|
||||
return openPrivilege;
|
||||
}
|
||||
}
|
||||
|
|
@ -24,7 +24,7 @@ public class SStoreConfig implements BaseConfig {
|
|||
|
||||
private int[] openLv;
|
||||
|
||||
private int[] goods;
|
||||
private int[][] goods;
|
||||
|
||||
private int weight;
|
||||
|
||||
|
|
@ -83,7 +83,7 @@ public class SStoreConfig implements BaseConfig {
|
|||
return openLv;
|
||||
}
|
||||
|
||||
public int[] getGoods() {
|
||||
public int[][] getGoods() {
|
||||
return goods;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,6 +72,8 @@ public class STrialConfig implements BaseConfig {
|
|||
*/
|
||||
private static int highestTower;
|
||||
|
||||
private int[][] floorReward;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
|
@ -117,4 +119,8 @@ public class STrialConfig implements BaseConfig {
|
|||
public static int getHighestTower() {
|
||||
return highestTower;
|
||||
}
|
||||
|
||||
public int[][] getFloorReward() {
|
||||
return floorReward;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ public class STrialSetting implements BaseConfig{
|
|||
|
||||
private int limitTime;
|
||||
|
||||
private int[] privilegeReward;
|
||||
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
|
|
@ -54,4 +56,8 @@ public class STrialSetting implements BaseConfig{
|
|||
public int getLimitTime() {
|
||||
return limitTime;
|
||||
}
|
||||
|
||||
public int[] getPrivilegeReward() {
|
||||
return privilegeReward;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -218,11 +218,12 @@ public class StoreLogic {
|
|||
MessageUtil.sendErrorResponse(iSession,0,msgId,err);
|
||||
return;
|
||||
}
|
||||
int goodsId = sStoreConfig.getGoods()[0];
|
||||
int goodsNum = sStoreConfig.getGoods()[1]*itemNum;
|
||||
String reward = goodsId +"#"+goodsNum;
|
||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, StringUtil.parseFiledInt2(reward), BIReason.STORE_BUY_ITEM);
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.BUY_MATERIAL,goodsId,itemNum);
|
||||
|
||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, sStoreConfig.getGoods(), BIReason.STORE_BUY_ITEM);
|
||||
if(SStoreTypeConfig.getsStoreTypeConfigMap().get(storeId).getStoreType() != StoreType.GIFT_STORE.getType()){
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.BUY_MATERIAL,sStoreConfig.getGoods()[0][0],itemNum);
|
||||
}
|
||||
|
||||
PlayerInfoProto.BuyStoreItemResponse builder = PlayerInfoProto.BuyStoreItemResponse.newBuilder().setDrop(drop).build();
|
||||
MessageUtil.sendMessage(iSession, 1,msgId, builder, true);
|
||||
}
|
||||
|
|
@ -248,7 +249,7 @@ public class StoreLogic {
|
|||
boolean check =true;
|
||||
if(relatedtoVIP == 1){
|
||||
if(limit == 6){
|
||||
int goodsNum = sStoreConfig.getGoods()[1]*itemNum;
|
||||
int goodsNum = sStoreConfig.getGoods()[0][1]*itemNum;
|
||||
check = playerInfoManager.check(limit, goodsNum);
|
||||
}else{
|
||||
check = playerInfoManager.check(limit, itemNum);
|
||||
|
|
@ -268,7 +269,7 @@ public class StoreLogic {
|
|||
if(relatedtoVIP == 1 && limit!=0){
|
||||
int updateValue = itemNum;
|
||||
if(limit == 6){
|
||||
updateValue= sStoreConfig.getGoods()[1]*itemNum;
|
||||
updateValue= sStoreConfig.getGoods()[0][1]*itemNum;
|
||||
}
|
||||
playerInfoManager.updateVipPrivilage(limit,updateValue);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,11 @@ public enum StoreType {
|
|||
SOUL_CRYSTAL_STORE(5),
|
||||
SECRET_STORE(6),
|
||||
FUNCTION_STORE(7),
|
||||
TRIAL_STORE(8)
|
||||
TRIAL_STORE(8),
|
||||
GIFT_STORE(9),
|
||||
|
||||
|
||||
|
||||
;
|
||||
private int type;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue