暂时提交vip相关
parent
5d0c9224b8
commit
21b245ed82
|
@ -0,0 +1,43 @@
|
|||
package com.ljsd.jieling.config;
|
||||
|
||||
import com.ljsd.jieling.logic.STableManager;
|
||||
import com.ljsd.jieling.logic.Table;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Table(name ="PrivilegeTypeConfig")
|
||||
public class SPrivilegeTypeConfig implements BaseConfig {
|
||||
|
||||
private int id;
|
||||
|
||||
private int type;
|
||||
|
||||
private int[] refreshType;
|
||||
|
||||
private static Map<Integer,SPrivilegeTypeConfig> sPrivilegeTypeConfigMap;
|
||||
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
sPrivilegeTypeConfigMap = STableManager.getConfig(SPrivilegeTypeConfig.class);
|
||||
}
|
||||
|
||||
|
||||
public static Map<Integer, SPrivilegeTypeConfig> getsPrivilegeTypeConfigMap() {
|
||||
return sPrivilegeTypeConfigMap;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public int[] getRefreshType() {
|
||||
return refreshType;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
package com.ljsd.jieling.config;
|
||||
|
||||
import com.ljsd.jieling.logic.STableManager;
|
||||
import com.ljsd.jieling.logic.Table;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Table(name ="TaskConfig")
|
||||
public class STaskConfig implements BaseConfig {
|
||||
|
||||
private int id;
|
||||
|
||||
private int taskType;
|
||||
|
||||
private int taskValue;
|
||||
|
||||
private int[] reward;
|
||||
|
||||
private int[] jump;
|
||||
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public int getTaskType() {
|
||||
return taskType;
|
||||
}
|
||||
|
||||
public int getTaskValue() {
|
||||
return taskValue;
|
||||
}
|
||||
|
||||
public int[] getReward() {
|
||||
return reward;
|
||||
}
|
||||
|
||||
public int[] getJump() {
|
||||
return jump;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -12,10 +12,10 @@ public class SVipLevelConfig implements BaseConfig {
|
|||
private static Map<Integer, SVipLevelConfig> sVipLevelConfigMap;
|
||||
private int vipLevel;
|
||||
|
||||
private int needRMB;
|
||||
|
||||
private int[][] privileges;
|
||||
|
||||
private int[][] vipBoxDailyReward;
|
||||
|
||||
private int[][] vipBoxReward;
|
||||
|
||||
private int[] vipBoxCost;
|
||||
|
@ -48,10 +48,6 @@ public class SVipLevelConfig implements BaseConfig {
|
|||
return vipLevel;
|
||||
}
|
||||
|
||||
public int getNeedRMB() {
|
||||
return needRMB;
|
||||
}
|
||||
|
||||
public int[][] getPrivileges() {
|
||||
return privileges;
|
||||
}
|
||||
|
@ -71,4 +67,8 @@ public class SVipLevelConfig implements BaseConfig {
|
|||
public void setPrivilegeMap(Map<Integer, Integer> privilegeMap) {
|
||||
this.privilegeMap = privilegeMap;
|
||||
}
|
||||
|
||||
public int[][] getVipBoxDailyReward() {
|
||||
return vipBoxDailyReward;
|
||||
}
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
package com.ljsd.jieling.globals;
|
||||
|
||||
public class GlobalPrivilegeType {
|
||||
public interface GlobalPrivilegeType {
|
||||
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.ljsd.jieling.logic.dao;
|
|||
|
||||
import com.ljsd.common.mogodb.MongoBase;
|
||||
import com.ljsd.jieling.config.SGameSetting;
|
||||
import com.ljsd.jieling.config.SVipLevelConfig;
|
||||
import com.ljsd.jieling.core.GlobalsDef;
|
||||
import com.ljsd.jieling.db.mongo.MongoKey;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
|
@ -210,6 +211,13 @@ public class PlayerManager extends MongoBase {
|
|||
}
|
||||
|
||||
public void updateVipInfo(int vipLevel){
|
||||
|
||||
SVipLevelConfig sVipLevelConfig = SVipLevelConfig.getsVipLevelConfigMap().get(vipLevel);
|
||||
Map<Integer, Integer> vip = new HashMap<>(sVipLevelConfig.getPrivilegeMap());
|
||||
for(Integer privilageId : vip.keySet()){
|
||||
if(!vipInfo.containsKey(privilageId)){
|
||||
vipInfo.put(privilageId,0);
|
||||
}
|
||||
}
|
||||
updateString("vipInfo", vipInfo);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,6 +79,7 @@ public class UserManager {
|
|||
playerManager.updateGuidePoint(1,1);
|
||||
playerManager.setCreateTime(now);
|
||||
playerManager.setLoginTime(now);
|
||||
playerManager.updateVipInfo(0);
|
||||
SPlayerLevelConfig sPlayerLevelConfig = SPlayerLevelConfig.getsPlayerLevelConfigMap().get(1);
|
||||
playerManager.setMaxStamina(sPlayerLevelConfig.getMaxEnergy());
|
||||
ItemUtil.drop(user,gameSetting.getBornItem());
|
||||
|
|
Loading…
Reference in New Issue