back_recharge
duhui 2023-01-24 13:43:03 +08:00
parent 24d40b5078
commit 04c226bd07
4 changed files with 21 additions and 5 deletions

View File

@ -13,8 +13,6 @@ import com.ljsd.jieling.logic.dao.root.User;
public class Cmd_reload extends GmRoleAbstract {
@Override
public boolean exec(String[] args) throws Exception {
User user = getUser();
if (null == user) {
return true;

View File

@ -11,6 +11,10 @@ import com.ljsd.jieling.logic.activity.event.Poster;
import com.ljsd.jieling.logic.activity.event.SuperBoxEvent;
import com.ljsd.jieling.logic.dao.UserManager;
import com.ljsd.jieling.logic.dao.root.User;
import com.ljsd.jieling.logic.store.BuyGoodsNewLogic;
import com.ljsd.jieling.logic.store.newRechargeInfo.NewRechargeInfo;
import com.ljsd.jieling.logic.store.newRechargeInfo.bean.AbstractWelfareBag;
import com.ljsd.jieling.logic.store.newRechargeInfo.rechargeHandler.RechargeHandler;
import com.ljsd.jieling.network.session.ISession;
import com.ljsd.jieling.util.ItemUtil;
import com.ljsd.jieling.util.MessageUtil;
@ -92,6 +96,7 @@ public class BrushPrivilegeActivity extends AbstractActivity {
}
ActivityProgressInfo info = activityMission.getActivityMissionMap().get(giftId);
if (info == null){
System.out.println("******************刷冲特权,礼包错误:"+giftId+",user,"+user.getId());
continue;
}
info.setState(state);
@ -119,6 +124,15 @@ public class BrushPrivilegeActivity extends AbstractActivity {
continue;
}
ActivityProgressInfo info = progressInfoMap.get(giftId);
if (info == null || info.getState() == 0){
// 支付补偿
RechargeHandler rechargeHandler = BuyGoodsNewLogic.getRechargeHandler(config.getOtype());
AbstractWelfareBag bag = rechargeHandler.getRechargeMap(user).get(giftId);
if(!bag.buy()){
uporsetValue(user,giftId,1);
}
}
int progress = getProgress(info);
int state = getState(info);
// 封装proto并返回

View File

@ -1082,7 +1082,7 @@ public class ItemLogic {
*/
@Deprecated
public void zeroCleanItem(User user){
try {
/*try {
ItemManager itemManager = user.getItemManager();
Map<Integer, Item> itemMap = new HashMap<>(itemManager.getItemMap());
Map<Integer, SItem> sItemMap = SItem.getsItemMap();
@ -1107,7 +1107,7 @@ public class ItemLogic {
}
}catch (Exception e){
LOGGER.error("零点清理玩家当日过期道具报错:{}",e.getMessage());
}
}*/
}
}

View File

@ -1430,7 +1430,11 @@ public class ItemUtil {
* @return
*/
public static boolean rmbItemHandler(User user, SItem sItem) throws ErrorCodeException {
if (!rmbItemSet.contains(sItem.getItemType())){
HashSet<Integer> integers = new HashSet<>();
integers.add(GlobalItemType.TRUE_RECHARGE_JUAN);
integers.add(GlobalItemType.DAY_TRUE_RECHARGE_JUAN);
if (!rmbItemSet.contains(sItem.getItemType()) && !integers.contains(sItem.getItemType())){
return false;
}
NewRechargeInfo info = user.getPlayerInfoManager().getNewRechargeInfo();