商店增益
parent
957664c498
commit
01c7ac7c8d
|
|
@ -17,6 +17,8 @@ public class SPlayerLevelConfig implements BaseConfig {
|
|||
|
||||
private int addEnergy;
|
||||
|
||||
private int extraAdd;
|
||||
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
|
|
@ -40,6 +42,10 @@ public class SPlayerLevelConfig implements BaseConfig {
|
|||
return addEnergy;
|
||||
}
|
||||
|
||||
public int getExtraAdd() {
|
||||
return extraAdd;
|
||||
}
|
||||
|
||||
public static Map<Integer, SPlayerLevelConfig> getsPlayerLevelConfigMap() {
|
||||
return sPlayerLevelConfigMap;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@ public class SStoreConfig implements BaseConfig {
|
|||
|
||||
private int relatedtoVIP;
|
||||
|
||||
private int[][] extraAdd;
|
||||
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
|
|
@ -114,4 +116,8 @@ public class SStoreConfig implements BaseConfig {
|
|||
public int getRelatedtoVIP() {
|
||||
return relatedtoVIP;
|
||||
}
|
||||
|
||||
public int[][] getExtraAdd() {
|
||||
return extraAdd;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package com.ljsd.jieling.logic.store;
|
||||
|
||||
import com.ljsd.jieling.config.SGameSetting;
|
||||
import com.ljsd.jieling.config.SPlayerLevelConfig;
|
||||
import com.ljsd.jieling.config.SStoreConfig;
|
||||
import com.ljsd.jieling.config.SStoreTypeConfig;
|
||||
import com.ljsd.jieling.globals.BIReason;
|
||||
|
|
@ -272,11 +273,25 @@ public class StoreLogic {
|
|||
}
|
||||
int[][] goods = sStoreConfig.getGoods();
|
||||
int length = goods.length;
|
||||
int[][] extraAdd = sStoreConfig.getExtraAdd();
|
||||
int add = 10000;
|
||||
if(extraAdd!=null && extraAdd.length>0){
|
||||
for(int[] extra : extraAdd){
|
||||
int type = extra[0];
|
||||
if(type == 1){
|
||||
SPlayerLevelConfig sPlayerLevelConfig = SPlayerLevelConfig.sPlayerLevelConfigMap.get(user.getPlayerInfoManager().getLevel());
|
||||
add += sPlayerLevelConfig.getExtraAdd();
|
||||
}else if(type == 2){
|
||||
int addPrivageId = extra[0];
|
||||
add += user.getPlayerInfoManager().getVipPrivilageValue(addPrivageId);
|
||||
}
|
||||
}
|
||||
}
|
||||
int[][] dropItems = new int[length][];
|
||||
for(int i=0;i<length;i++){
|
||||
dropItems[i] = new int[2];
|
||||
dropItems[i][0]= goods[i][0];
|
||||
dropItems[i][1]= goods[i][1]*itemNum;
|
||||
dropItems[i][1]= (int)(goods[i][1]*itemNum * (add /10000f));
|
||||
}
|
||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, dropItems, BIReason.STORE_BUY_ITEM);
|
||||
if(SStoreTypeConfig.getsStoreTypeConfigMap().get(storeId).getStoreType() != StoreType.GIFT_STORE.getType()){
|
||||
|
|
|
|||
Loading…
Reference in New Issue