特权修改
parent
2f9fb3c349
commit
55091f4bae
|
@ -243,7 +243,8 @@ public class GMRequestHandler extends BaseHandler{
|
|||
VipMissionIdsType vipMissionIdsType = cUser.getUserMissionManager().getVipMissionIdsType();
|
||||
vipMissionIdsType.getFinishMissionIds().clear();
|
||||
vipMissionIdsType.getDoingMissionIds().clear();
|
||||
cUser.getPlayerInfoManager().updateVipInfo(cUser,prarm1);
|
||||
cUser.getPlayerInfoManager().setVipLevel(prarm1);
|
||||
cUser.getPlayerInfoManager().updateVipInfo(GlobalsDef.VIP_UNLOCK_PRIVILEGE,prarm1);
|
||||
vipMissionIdsType.getFinishMissionIds().addAll(vipMissionIdsType.getDoingMissionIds());
|
||||
vipMissionIdsType.getDoingMissionIds().clear();
|
||||
cUser.getUserMissionManager().setVipMissionIdsType(vipMissionIdsType);
|
||||
|
|
|
@ -8,10 +8,7 @@ import com.ljsd.jieling.handler.map.MapLogic;
|
|||
import com.ljsd.jieling.handler.map.MapManager;
|
||||
import com.ljsd.jieling.logic.GlobalDataManaager;
|
||||
import com.ljsd.jieling.logic.activity.ActivityLogic;
|
||||
import com.ljsd.jieling.logic.dao.PlayerManager;
|
||||
import com.ljsd.jieling.logic.dao.RechargeInfo;
|
||||
import com.ljsd.jieling.logic.dao.ServerConfig;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.*;
|
||||
import com.ljsd.jieling.logic.dao.root.GlobalSystemControl;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.player.PlayerLogic;
|
||||
|
@ -70,7 +67,7 @@ public class GetPlayerInfoHandler extends BaseHandler{
|
|||
GlobalDataManaager.checkNeedReFlush(iSession,user,null);
|
||||
playerInfoManager.setLoginTime(TimeUtils.now());
|
||||
Map<Integer, Integer> guidePoints = playerInfoManager.getGuidePoints();
|
||||
Map<Integer, Integer> vipInfo = playerInfoManager.getVipInfo();
|
||||
Map<Integer, VipInfo> vipInfo = playerInfoManager.getVipInfo();
|
||||
List<CommonProto.NewPlayerGuidePoint> list = new ArrayList<>();
|
||||
List<CommonProto.Privilege> privilegeList = new ArrayList<>();
|
||||
for(Map.Entry<Integer,Integer> guideItem : guidePoints.entrySet()){
|
||||
|
@ -79,10 +76,11 @@ public class GetPlayerInfoHandler extends BaseHandler{
|
|||
. setId(guideItem.getValue())
|
||||
.build());
|
||||
}
|
||||
for(Map.Entry<Integer,Integer> vipInfoItem : vipInfo.entrySet()){
|
||||
for(Map.Entry<Integer,VipInfo> vipInfoItem : vipInfo.entrySet()){
|
||||
privilegeList.add(CommonProto.Privilege.newBuilder()
|
||||
.setId(vipInfoItem.getKey())
|
||||
. setUsedTimes(vipInfoItem.getValue())
|
||||
. setUsedTimes(vipInfoItem.getValue().getCount())
|
||||
.setEffectTime(vipInfoItem.getValue().getEffectTime())
|
||||
.build());
|
||||
}
|
||||
MapManager mapManager = user.getMapManager();
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.ljsd.jieling.kefu;
|
|||
|
||||
|
||||
import com.ljsd.jieling.db.mongo.MongoUtil;
|
||||
import com.ljsd.jieling.logic.dao.VipInfo;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import config.SStoreConfig;
|
||||
|
||||
|
@ -41,8 +42,8 @@ public class Cmd_fix_store extends GmAbstract {
|
|||
for (User user :userList){
|
||||
process++;
|
||||
try {
|
||||
for (Map.Entry<Integer, Integer> en:user.getPlayerInfoManager().getVipInfo().entrySet()){
|
||||
if(en.getValue()!=0){
|
||||
for (Map.Entry<Integer, VipInfo> en:user.getPlayerInfoManager().getVipInfo().entrySet()){
|
||||
if(en.getValue().getCount()!=0){
|
||||
Integer itemId = vip2itemid.get(en.getKey());
|
||||
if(itemId == null ){
|
||||
continue;
|
||||
|
@ -50,7 +51,7 @@ public class Cmd_fix_store extends GmAbstract {
|
|||
int storeid = SStoreConfig.getSstoreConfigMap().get(itemId).getStoreId();
|
||||
Map<Integer, Integer> itemNumMap = user.getStoreManager().getStoreInfoMap().get(storeid).getItemNumMap();
|
||||
if(itemNumMap.containsKey(itemId)){
|
||||
itemNumMap.put(itemId,en.getValue());
|
||||
itemNumMap.put(itemId,en.getValue().getCount());
|
||||
}
|
||||
user.getStoreManager().getStoreInfoMap().get(storeid).setItemNumMap(itemNumMap);
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.ljsd.jieling.logic.activity;
|
|||
|
||||
|
||||
import com.ljsd.jieling.config.clazzStaticCfg.CommonStaticConfig;
|
||||
import com.ljsd.jieling.core.GlobalsDef;
|
||||
import com.ljsd.jieling.globals.BIReason;
|
||||
import com.ljsd.jieling.logic.activity.event.FightMainEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.IEvent;
|
||||
|
@ -35,6 +36,8 @@ public class FightMainEventHandler implements IEventHandler{
|
|||
|
||||
int uid = fightMainEvent.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
//检测更新vip是否有新开
|
||||
user.getPlayerInfoManager().updateVipInfo(GlobalsDef.MAIN_LEVEL_UNLOCK_PRIVILEGE,10_000_000 * (fightId % 10) + fightId);
|
||||
for(SGlobalActivity sGlobalActivity : SGlobalActivity.getsGlobalActivityMap().values()){
|
||||
int[] openRules = sGlobalActivity.getOpenRules();
|
||||
if(openRules!=null && openRules.length>0 && openRules[0] == 1){
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.ljsd.jieling.logic.activity;
|
||||
|
||||
import com.ljsd.jieling.core.GlobalsDef;
|
||||
import com.ljsd.jieling.db.redis.RedisKey;
|
||||
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||
import com.ljsd.jieling.logic.activity.event.IEvent;
|
||||
|
@ -15,6 +16,7 @@ import com.ljsd.jieling.logic.rank.rankImpl.AbstractRank;
|
|||
import com.ljsd.jieling.network.session.ISession;
|
||||
import config.SActivityRewardConfig;
|
||||
import config.SCHero;
|
||||
import config.SSpecialConfig;
|
||||
import util.TimeUtils;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
@ -55,6 +57,7 @@ public class LimitRandomCardActivity extends AbstractActivity {
|
|||
Consumer<int[]> consumer = a->RankContext.getRankEnum(RankEnum.RANDOM_CARD_PERFECT_RANK.getType()).addRank(cardEvent.getUid(), TimeUtils.now()/1000,a[0]);
|
||||
Stream.of(cardEvent.getHeros()).filter(pre).forEach(consumer);
|
||||
update(UserManager.getUser(cardEvent.getUid()),cardEvent.getScore());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -65,6 +68,11 @@ public class LimitRandomCardActivity extends AbstractActivity {
|
|||
@Override
|
||||
void updateProgressWithUser(User user, ActivityMission activityMission, int count) {
|
||||
activityMission.setValue(activityMission.getValue()+count);
|
||||
//150分赠一次
|
||||
int[] onceArrayValue = SSpecialConfig.getOnceArrayValue(SSpecialConfig.TIME_LIMIT_RECRUITMENT_FREEINTEGRAL);
|
||||
if((activityMission.getValue()+count)/onceArrayValue[0]-activityMission.getValue()/onceArrayValue[0]>0){
|
||||
user.getPlayerInfoManager().updateVipPrivilage(onceArrayValue[1],-1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.ljsd.jieling.logic.activity;
|
||||
|
||||
import com.ljsd.jieling.config.clazzStaticCfg.CommonStaticConfig;
|
||||
import com.ljsd.jieling.core.GlobalsDef;
|
||||
import com.ljsd.jieling.globals.BIReason;
|
||||
import com.ljsd.jieling.logic.activity.event.IEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
|
@ -13,9 +14,11 @@ import com.ljsd.jieling.util.ToolsUtil;
|
|||
import config.SGlobalActivity;
|
||||
import config.SGlobalSystemConfig;
|
||||
import config.SMainLevelConfig;
|
||||
import config.SPrivilegeTypeConfig;
|
||||
import manager.STableManager;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class UserLevelEventHandler implements IEventHandler{
|
||||
|
||||
|
@ -28,11 +31,11 @@ public class UserLevelEventHandler implements IEventHandler{
|
|||
return;
|
||||
UserLevelEvent userLevelEvent = (UserLevelEvent) event;
|
||||
int level = userLevelEvent.getLevel();
|
||||
|
||||
List<SGlobalSystemConfig> sGlobalSystemConfigs = STableManager.getFigureConfig(CommonStaticConfig.class).getsGlobalSystemConfigMapByTypeAndConditionMap().get(2).get(level);
|
||||
|
||||
int uid = userLevelEvent.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
user.getPlayerInfoManager().updateVipInfo(GlobalsDef.LEVEL_UNLOCK_PRIVILEGE,user.getPlayerInfoManager().getLevel());
|
||||
int state = user.getMainLevelManager().getState();
|
||||
if(state == -1 ){
|
||||
int fightId = user.getMainLevelManager().getFightId();
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.ljsd.jieling.logic.dao;
|
|||
|
||||
|
||||
import com.ljsd.common.mogodb.MongoBase;
|
||||
import com.ljsd.jieling.core.GlobalsDef;
|
||||
import com.ljsd.jieling.core.VipPrivilegeType;
|
||||
import com.ljsd.jieling.globals.BIReason;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
|
@ -9,11 +10,9 @@ import com.ljsd.jieling.logic.mission.GameEvent;
|
|||
import com.ljsd.jieling.logic.player.PlayerLogic;
|
||||
import config.SPrivilegeTypeConfig;
|
||||
import config.SVipLevelConfig;
|
||||
import util.TimeUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CopyOnWriteArraySet;
|
||||
|
||||
|
||||
|
@ -63,7 +62,7 @@ public class PlayerManager extends MongoBase {
|
|||
|
||||
private Map<Integer,Integer> guidePoints = new HashMap<>();
|
||||
|
||||
private Map<Integer,Integer> vipInfo = new HashMap<>();
|
||||
private Map<Integer,VipInfo> vipInfo = new HashMap<>();
|
||||
private Set<Integer> vipGoodInfo = new HashSet<>();// 特权商品礼包
|
||||
|
||||
private Set<Integer> reds = new CopyOnWriteArraySet<>();
|
||||
|
@ -167,6 +166,11 @@ public class PlayerManager extends MongoBase {
|
|||
return vipLevel;
|
||||
}
|
||||
|
||||
public void setVipLevel(int vipLevel) {
|
||||
this.vipLevel = vipLevel;
|
||||
updateString("vipLevel",vipLevel);
|
||||
}
|
||||
|
||||
public int getHead() {
|
||||
return head;
|
||||
}
|
||||
|
@ -239,52 +243,53 @@ public class PlayerManager extends MongoBase {
|
|||
this.loginTime = loginTime;
|
||||
}
|
||||
|
||||
public Map<Integer, Integer> getVipInfo() {
|
||||
public Map<Integer, VipInfo> getVipInfo() {
|
||||
return vipInfo;
|
||||
}
|
||||
|
||||
public void updateVipInfo(User user,int vipLevel) throws Exception {
|
||||
SVipLevelConfig sVipLevelConfig = SVipLevelConfig.getsVipLevelConfigMap().get(vipLevel);
|
||||
if(sVipLevelConfig == null){
|
||||
return;
|
||||
public void updateVipInfo(int unlockType,int condition) {
|
||||
Map<Integer, Map<Integer, Integer>> conditionMap = SPrivilegeTypeConfig.conditionMap.get(unlockType);
|
||||
for(Map.Entry<Integer, Map<Integer, Integer>> entry:conditionMap.entrySet()){
|
||||
if(entry.getValue().containsKey(condition)){
|
||||
if(!vipInfo.containsKey(entry.getKey())) {
|
||||
vipInfo.put(entry.getKey(), new VipInfo());
|
||||
}
|
||||
Map<Integer, Integer> vip = new HashMap<>(sVipLevelConfig.getPrivilegeMap());
|
||||
for(Integer privilageId : vip.keySet()){
|
||||
if(!vipInfo.containsKey(privilageId)){
|
||||
vipInfo.put(privilageId,0);
|
||||
}
|
||||
}
|
||||
updateString("vipInfo", vipInfo);
|
||||
updateString("vipLevel", vipLevel);
|
||||
this.vipLevel = vipLevel;
|
||||
user.getUserMissionManager().onGameEvent(user,GameEvent.VIP_LEVLUP,vipLevel);
|
||||
PlayerLogic.getInstance().sendVipDailyOrLevlUpReward(user, vipLevel, BIReason.VIP_LEVEL_REWARD);
|
||||
|
||||
}
|
||||
|
||||
public boolean check(int privilageId,int updateNum){
|
||||
if(privilageId == 0){
|
||||
return true;
|
||||
}
|
||||
SVipLevelConfig sVipLevelConfig = SVipLevelConfig.getsVipLevelConfigMap().get(vipLevel);
|
||||
if(sVipLevelConfig == null ){
|
||||
return false;
|
||||
}
|
||||
Integer limitNum = sVipLevelConfig.getPrivilegeMap().get(privilageId);
|
||||
if(limitNum == null){
|
||||
return false;
|
||||
}
|
||||
if(limitNum == -1){
|
||||
return true;
|
||||
}
|
||||
|
||||
if(!vipInfo.containsKey(privilageId)){
|
||||
vipInfo.put(privilageId,0);
|
||||
}
|
||||
if(vipInfo.get(privilageId) + updateNum > limitNum){
|
||||
return false;
|
||||
}
|
||||
VipInfo info = vipInfo.get(privilageId);
|
||||
if(info.getEffectTime()!=0&&TimeUtils.now()/1000>info.getEffectTime()){
|
||||
return false;
|
||||
}
|
||||
|
||||
SPrivilegeTypeConfig sPrivilegeTypeConfig = SPrivilegeTypeConfig.getsPrivilegeTypeConfigMap().get(privilageId);
|
||||
Map<Integer, Map<Integer, Integer>> conditionMap = SPrivilegeTypeConfig.conditionMap.get(sPrivilegeTypeConfig.getUnlockType());
|
||||
int maxCount = 0;
|
||||
if(sPrivilegeTypeConfig.getUnlockType()!=GlobalsDef.RECHARGE_UNLOCK_PRIVILEGE){
|
||||
TreeMap<Integer, Integer> condition = (TreeMap)conditionMap.get(privilageId);
|
||||
maxCount = condition.floorEntry(level).getValue();
|
||||
}
|
||||
if(maxCount==-1){
|
||||
return true;
|
||||
}
|
||||
if(info.getCount()+updateNum>maxCount|| (info.getEffectTime()!=0&&TimeUtils.now()/1000>info.getEffectTime())){
|
||||
return false;
|
||||
}
|
||||
updateVipPrivilage(privilageId, updateNum);
|
||||
return true;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public boolean checkFunctionIsAllowed(int privilageId){
|
||||
if(privilageId == VipPrivilegeType.UNLOCK_TRIAL_BOMB_REWARD){
|
||||
|
@ -297,14 +302,16 @@ public class PlayerManager extends MongoBase {
|
|||
if(!vipInfo.containsKey(privilageId)){
|
||||
return 0;
|
||||
}
|
||||
return vipInfo.get(privilageId);
|
||||
return vipInfo.get(privilageId).getCount();
|
||||
}
|
||||
|
||||
public void updateVipPrivilage(int privilageId,int updateNum){
|
||||
if(!vipInfo.containsKey(privilageId)){
|
||||
return;
|
||||
}
|
||||
vipInfo.put(privilageId,vipInfo.get(privilageId)+updateNum);
|
||||
VipInfo info = vipInfo.get(privilageId);
|
||||
info.setCount(info.getCount()+updateNum);
|
||||
vipInfo.put(privilageId, info);
|
||||
updateString("vipInfo", vipInfo);
|
||||
}
|
||||
|
||||
|
@ -328,6 +335,7 @@ public class PlayerManager extends MongoBase {
|
|||
vipGoodInfo.add(vipLevel);
|
||||
}
|
||||
|
||||
|
||||
public int getHadTakeDailyBoxVip() {
|
||||
return hadTakeDailyBoxVip;
|
||||
}
|
||||
|
@ -338,14 +346,17 @@ public class PlayerManager extends MongoBase {
|
|||
}
|
||||
|
||||
public void vipFlush( Set<Integer> removePrivileges) {
|
||||
if (vipInfo.isEmpty()){
|
||||
return;
|
||||
}
|
||||
for(Integer id : vipInfo.keySet()){
|
||||
SPrivilegeTypeConfig sPrivilegeTypeConfig = SPrivilegeTypeConfig.getsPrivilegeTypeConfigMap().get(id);
|
||||
if(null == sPrivilegeTypeConfig){
|
||||
continue;
|
||||
}
|
||||
int refreshType = sPrivilegeTypeConfig.getRefreshType()[0];
|
||||
if(refreshType == 1){
|
||||
vipInfo.put(id,0);
|
||||
if(refreshType == 1&&vipInfo.get(id).getCount()>0){
|
||||
vipInfo.put(id,new VipInfo());
|
||||
}
|
||||
}
|
||||
for(Integer remove : removePrivileges){
|
||||
|
@ -356,8 +367,18 @@ public class PlayerManager extends MongoBase {
|
|||
}
|
||||
|
||||
public void addVipInfo(int privilageId){
|
||||
vipInfo.put(privilageId,0);
|
||||
updateString("vipInfo."+privilageId, 0);
|
||||
SPrivilegeTypeConfig config = SPrivilegeTypeConfig.getsPrivilegeTypeConfigMap().get(privilageId);
|
||||
if (config==null){
|
||||
return;
|
||||
}
|
||||
int maxTime = 0;
|
||||
if(vipInfo.containsKey(privilageId)){
|
||||
maxTime = (int)(TimeUtils.now()/1000>vipInfo.get(privilageId).getEffectTime()?(TimeUtils.now()/1000):vipInfo.get(privilageId).getEffectTime());
|
||||
}else {
|
||||
maxTime = (int)(TimeUtils.now()/1000+config.getContinueTime());
|
||||
}
|
||||
vipInfo.put(privilageId,new VipInfo(0,maxTime+config.getContinueTime()));
|
||||
updateString("vipInfo", vipInfo);
|
||||
}
|
||||
|
||||
public void removeVipPriviliageId(int privilageId){
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.ljsd.jieling.logic.dao;
|
|||
|
||||
|
||||
import com.ljsd.jieling.config.clazzStaticCfg.CommonStaticConfig;
|
||||
import com.ljsd.jieling.core.GlobalsDef;
|
||||
import com.ljsd.jieling.db.mongo.MongoUtil;
|
||||
import com.ljsd.jieling.globals.BIReason;
|
||||
import com.ljsd.jieling.ktbeans.KtEventUtils;
|
||||
|
@ -78,7 +79,8 @@ public class UserManager {
|
|||
playerManager.setCreateTime(now);
|
||||
playerManager.setLoginTime(now);
|
||||
playerManager.setSendDays(1);
|
||||
playerManager.updateVipInfo(user,0);
|
||||
playerManager.updateVipInfo(GlobalsDef.LEVEL_UNLOCK_PRIVILEGE,1);
|
||||
playerManager.updateVipInfo(GlobalsDef.VIP_UNLOCK_PRIVILEGE,0);
|
||||
playerManager.setRechargeInfo(new RechargeInfo());
|
||||
playerManager.setPhoneBindInfo(new PhoneBindInfo(""));
|
||||
playerManager.setChannel(channel);
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
package com.ljsd.jieling.logic.dao;
|
||||
|
||||
/**
|
||||
* @author lvxinran
|
||||
* @date 2019/12/26
|
||||
* @discribe
|
||||
*/
|
||||
public class VipInfo {
|
||||
private int count;
|
||||
private int effectTime;
|
||||
|
||||
public void setCount(int count) {
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
public void setEffectTime(int effectTime) {
|
||||
this.effectTime = effectTime;
|
||||
}
|
||||
|
||||
public int getCount() {
|
||||
return count;
|
||||
}
|
||||
|
||||
public int getEffectTime() {
|
||||
return effectTime;
|
||||
}
|
||||
|
||||
public VipInfo(int count, int effectTime) {
|
||||
this.count = count;
|
||||
this.effectTime = effectTime;
|
||||
}
|
||||
|
||||
public VipInfo() {
|
||||
}
|
||||
}
|
|
@ -252,9 +252,10 @@ public class HeroLogic{
|
|||
if(!enoughCost){
|
||||
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
||||
}
|
||||
}else{
|
||||
user.getPlayerInfoManager().updateVipPrivilage(privilege, 1);
|
||||
}
|
||||
// else{
|
||||
// user.getPlayerInfoManager().updateVipPrivilage(privilege, 1);
|
||||
// }
|
||||
//额外获取
|
||||
int length = perCount;
|
||||
int[][] tenTimesMustGetItem = null;
|
||||
|
|
|
@ -281,11 +281,12 @@ public class PlayerLogic {
|
|||
sendVipDailyOrLevlUpReward(user, vipLevel,BIReason.VIP_DAY_REWARD);
|
||||
if(fBuilder!=null){
|
||||
List<CommonProto.Privilege> privilegeList = new ArrayList<>();
|
||||
Map<Integer, Integer> vipInfo = playerInfoManager.getVipInfo();
|
||||
for(Map.Entry<Integer,Integer> vipInfoItem : vipInfo.entrySet()){
|
||||
Map<Integer, VipInfo> vipInfo = playerInfoManager.getVipInfo();
|
||||
for(Map.Entry<Integer,VipInfo> vipInfoItem : vipInfo.entrySet()){
|
||||
privilegeList.add(CommonProto.Privilege.newBuilder()
|
||||
.setId(vipInfoItem.getKey())
|
||||
. setUsedTimes(vipInfoItem.getValue())
|
||||
. setUsedTimes(vipInfoItem.getValue().getCount())
|
||||
.setEffectTime(vipInfoItem.getValue().getEffectTime())
|
||||
.build());
|
||||
}
|
||||
fBuilder.setHadTakeDailyBox(playerInfoManager.getHadTakeDailyBoxVip()).addAllPrivilege(privilegeList);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.ljsd.jieling.logic.store;
|
||||
|
||||
import com.ljsd.jieling.config.clazzStaticCfg.CommonStaticConfig;
|
||||
import com.ljsd.jieling.core.GlobalsDef;
|
||||
import com.ljsd.jieling.db.mongo.MongoUtil;
|
||||
import com.ljsd.jieling.exception.ErrorCode;
|
||||
import com.ljsd.jieling.exception.ErrorCodeException;
|
||||
|
@ -205,7 +206,9 @@ public class BuyGoodsLogic {
|
|||
//vip 等级更新和推送
|
||||
int newLeve= SVipLevelConfig.getsVipLevel(rechargeInfo.getSaveAmt());
|
||||
if(user.getPlayerInfoManager().getVipLevel()!=newLeve){
|
||||
user.getPlayerInfoManager().updateVipInfo(user,newLeve);
|
||||
// user.getPlayerInfoManager().updateVipInfo(user,newLeve);
|
||||
user.getPlayerInfoManager().setVipLevel(newLeve);
|
||||
user.getPlayerInfoManager().updateVipInfo(GlobalsDef.VIP_UNLOCK_PRIVILEGE,newLeve);
|
||||
CombatLogic.getInstance().getNewAdventureReward(user, true);
|
||||
}
|
||||
PlayerInfoProto.RefreshRechargeIndication.Builder builder = PlayerInfoProto.RefreshRechargeIndication.newBuilder();
|
||||
|
|
|
@ -422,6 +422,9 @@ public class StoreLogic {
|
|||
int vipLeve = user.getPlayerInfoManager().getVipLevel();
|
||||
user.getPlayerInfoManager().setHadTakeLevelBoxVip(vipLeve);
|
||||
}
|
||||
if(sStoreConfig.getOpenPrivilege()!=null){
|
||||
Arrays.stream(sStoreConfig.getOpenPrivilege()).forEach(n->user.getPlayerInfoManager().addVipInfo(n));
|
||||
}
|
||||
|
||||
PlayerInfoProto.BuyStoreItemResponse builder = PlayerInfoProto.BuyStoreItemResponse.newBuilder().setDrop(drop).build();
|
||||
MessageUtil.sendMessage(iSession, 1,msgId, builder, true);
|
||||
|
|
Loading…
Reference in New Issue