Merge branch 'master_test_hw' of http://60.1.1.230/backend/jieling_server into master_test_hw
commit
5499d28bf2
|
@ -90,17 +90,17 @@ public class HeroNodeRequestHandler extends BaseHandler<Expedition.HeroNodeReque
|
||||||
// user.getExpeditionManager().addEquip(user, equip);
|
// user.getExpeditionManager().addEquip(user, equip);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
CommonProto.Drop.Builder drop = CommonProto.Drop.newBuilder();
|
||||||
Set<String> jewelInfo = hero.getJewelInfo();
|
Set<String> jewelInfo = hero.getJewelInfo();
|
||||||
for (String jewel : jewelInfo) {
|
for (String jewel : jewelInfo) {
|
||||||
PropertyItem propertyItem = user.getEquipManager().getEquipMap().get(jewel);
|
PropertyItem propertyItem = user.getExpeditionManager().getEquipMap().get(jewel);
|
||||||
if (propertyItem == null)
|
if (propertyItem == null)
|
||||||
continue;
|
continue;
|
||||||
Jewel j = (Jewel) propertyItem;
|
Jewel j = (Jewel) propertyItem;
|
||||||
user.getExpeditionManager().addEquip(user, j);
|
// user.getExpeditionManager().addEquip(user, j);
|
||||||
|
drop.addSoulEquip(CBean2Proto.getEquipProto(j));
|
||||||
}
|
}
|
||||||
|
|
||||||
CommonProto.Drop.Builder drop = CommonProto.Drop.newBuilder();
|
|
||||||
|
|
||||||
drop.addHero(CBean2Proto.getHero(hero));
|
drop.addHero(CBean2Proto.getHero(hero));
|
||||||
|
|
||||||
|
|
|
@ -2630,18 +2630,18 @@ public class MapLogic {
|
||||||
if(trialInfo.getAddHpCount()>=healing[1]){
|
if(trialInfo.getAddHpCount()>=healing[1]){
|
||||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||||
}
|
}
|
||||||
boolean itemCost = ItemUtil.itemCost(user, new int[][]{{healing[0],1}}, BIReason.TRIAL_ADD_HP_CONSUME, 1);
|
|
||||||
if(!itemCost){
|
|
||||||
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
|
||||||
}
|
|
||||||
Map<Integer, Integer> propertyMap = heroInfo.get(heroId).getProperty();
|
Map<Integer, Integer> propertyMap = heroInfo.get(heroId).getProperty();
|
||||||
int curHp = propertyMap.get(HeroAttributeEnum.CurHP.getPropertyId());
|
int curHp = propertyMap.get(HeroAttributeEnum.CurHP.getPropertyId());
|
||||||
if(curHp==0){
|
if(curHp==0){
|
||||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||||
}else{
|
}else{
|
||||||
|
boolean itemCost = ItemUtil.itemCost(user, new int[][]{{healing[0],1}}, BIReason.TRIAL_ADD_HP_CONSUME, 1);
|
||||||
|
if(!itemCost){
|
||||||
|
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
||||||
|
}
|
||||||
//todo 加血逻辑
|
//todo 加血逻辑
|
||||||
int maxHp = propertyMap.get(HeroAttributeEnum.Hp.getPropertyId());
|
int maxHp = propertyMap.get(HeroAttributeEnum.Hp.getPropertyId());
|
||||||
int resultHp = Math.min(curHp+maxHp*5000/10000,maxHp);
|
int resultHp = Math.min(curHp+maxHp/2,maxHp);
|
||||||
propertyMap.put(HeroAttributeEnum.CurHP.getPropertyId(),resultHp);
|
propertyMap.put(HeroAttributeEnum.CurHP.getPropertyId(),resultHp);
|
||||||
trialInfo.getHeroInfo().get(heroId).setProperty(propertyMap);
|
trialInfo.getHeroInfo().get(heroId).setProperty(propertyMap);
|
||||||
mapManager.updateTrialAddHpCount(1);
|
mapManager.updateTrialAddHpCount(1);
|
||||||
|
|
|
@ -5,6 +5,9 @@ import com.ljsd.jieling.handler.map.mapType.AbstractMap;
|
||||||
import com.ljsd.jieling.handler.map.mapType.TowerMap;
|
import com.ljsd.jieling.handler.map.mapType.TowerMap;
|
||||||
import com.ljsd.jieling.ktbeans.ReportEventEnum;
|
import com.ljsd.jieling.ktbeans.ReportEventEnum;
|
||||||
import com.ljsd.jieling.ktbeans.ReportUtil;
|
import com.ljsd.jieling.ktbeans.ReportUtil;
|
||||||
|
import com.ljsd.jieling.logic.activity.event.LuckWheelEvent;
|
||||||
|
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||||
|
import com.ljsd.jieling.logic.activity.event.TrailCrossEvent;
|
||||||
import com.ljsd.jieling.logic.rank.rankImpl.AbstractRank;
|
import com.ljsd.jieling.logic.rank.rankImpl.AbstractRank;
|
||||||
import com.ljsd.jieling.logic.rank.RankContext;
|
import com.ljsd.jieling.logic.rank.RankContext;
|
||||||
import com.ljsd.jieling.logic.rank.RankEnum;
|
import com.ljsd.jieling.logic.rank.RankEnum;
|
||||||
|
@ -41,6 +44,7 @@ public class FourtyTwoBehavior extends BaseBehavior {
|
||||||
floor = floor%10000;
|
floor = floor%10000;
|
||||||
}
|
}
|
||||||
//----
|
//----
|
||||||
|
Poster.getPoster().dispatchEvent(new TrailCrossEvent(user.getId(),floor));
|
||||||
if (challengeConfig.getType() == 2 && floor >= maxTower) {
|
if (challengeConfig.getType() == 2 && floor >= maxTower) {
|
||||||
mapManager.setTrialFloor(floor + 1);
|
mapManager.setTrialFloor(floor + 1);
|
||||||
LOGGER.info("当前层为{},最大层为{}", floor, maxTower);
|
LOGGER.info("当前层为{},最大层为{}", floor, maxTower);
|
||||||
|
|
|
@ -16,6 +16,7 @@ public class Cmd_kick extends GmGlobleAbstract {
|
||||||
ISession session= OnlineUserManager.getSessionByUid(getUser().getId());
|
ISession session= OnlineUserManager.getSessionByUid(getUser().getId());
|
||||||
if (session != null) {
|
if (session != null) {
|
||||||
MessageUtil.sendErrorCode(session, ErrorCode.kickUserCode, "您已被踢下线!");
|
MessageUtil.sendErrorCode(session, ErrorCode.kickUserCode, "您已被踢下线!");
|
||||||
|
Thread.sleep(100);
|
||||||
instance.kickOldUser(getUser().getId(), "", ErrorCode.kickUserCode, "LOSE HEART PACKET!!!!", 0);
|
instance.kickOldUser(getUser().getId(), "", ErrorCode.kickUserCode, "LOSE HEART PACKET!!!!", 0);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -386,13 +386,27 @@ public class GlobalDataManaager implements IManager {
|
||||||
updateBuyTimesGoodsId.add(next.getKey());
|
updateBuyTimesGoodsId.add(next.getKey());
|
||||||
long endTime = next.getValue();
|
long endTime = next.getValue();
|
||||||
boolean isMiss =false; //移除清除的配置 线上错误避免
|
boolean isMiss =false; //移除清除的配置 线上错误避免
|
||||||
|
int tt =0;
|
||||||
while (endTime<now){
|
while (endTime<now){
|
||||||
|
tt++;
|
||||||
SRechargeCommodityConfig sRechargeCommodityConfig = SRechargeCommodityConfig.rechargeCommodityConfigMap.get(next.getKey());
|
SRechargeCommodityConfig sRechargeCommodityConfig = SRechargeCommodityConfig.rechargeCommodityConfigMap.get(next.getKey());
|
||||||
if(null==sRechargeCommodityConfig){
|
if(null==sRechargeCommodityConfig){
|
||||||
isMiss =true;
|
isMiss =true;
|
||||||
LOGGER.error("Exception:旧配置删除,请检查"+next.getKey());
|
LOGGER.error("Exception:旧配置删除,请检查"+next.getKey());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(sRechargeCommodityConfig.getDailyUpdate()==0){
|
||||||
|
isMiss =true;
|
||||||
|
LOGGER.error("Exception:配置"+next.getKey()+"endTime"+endTime+"sRe"+sRechargeCommodityConfig.getDailyUpdate());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tt>1000){
|
||||||
|
isMiss =true;
|
||||||
|
LOGGER.error("Exception:配置"+next.getKey()+"endTime"+endTime+"sRe"+sRechargeCommodityConfig.getDailyUpdate());
|
||||||
|
break;
|
||||||
|
}
|
||||||
endTime += sRechargeCommodityConfig.getDailyUpdate() * TimeUtils.ONE_DAY ;
|
endTime += sRechargeCommodityConfig.getDailyUpdate() * TimeUtils.ONE_DAY ;
|
||||||
}
|
}
|
||||||
if(isMiss){
|
if(isMiss){
|
||||||
|
|
|
@ -76,5 +76,5 @@ public interface ActivityType {
|
||||||
int JADE_DYNASTY_SHOP = 20001;//破阵诛仙限时商市
|
int JADE_DYNASTY_SHOP = 20001;//破阵诛仙限时商市
|
||||||
int JADE_DYNASTY_RARE_SHOP = 20002;//破阵诛仙珍奇宝阁
|
int JADE_DYNASTY_RARE_SHOP = 20002;//破阵诛仙珍奇宝阁
|
||||||
int ITEMS_STORE= 6000;//百宝商会
|
int ITEMS_STORE= 6000;//百宝商会
|
||||||
|
int TRIAL_EXPERT = 70;//幻境达人
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ public enum ActivityTypeEnum {
|
||||||
JADE_DYNASTY_SHOP(ActivityType.JADE_DYNASTY_SHOP, DefaultEmptyActivity::new),
|
JADE_DYNASTY_SHOP(ActivityType.JADE_DYNASTY_SHOP, DefaultEmptyActivity::new),
|
||||||
JADE_DYNASTY_RARE_SHOP(ActivityType.JADE_DYNASTY_RARE_SHOP, DefaultEmptyActivity::new),
|
JADE_DYNASTY_RARE_SHOP(ActivityType.JADE_DYNASTY_RARE_SHOP, DefaultEmptyActivity::new),
|
||||||
ITEMS_STORE(ActivityType.ITEMS_STORE, DefaultEmptyActivity::new),
|
ITEMS_STORE(ActivityType.ITEMS_STORE, DefaultEmptyActivity::new),
|
||||||
|
TRIAL_EXPERT(ActivityType.TRIAL_EXPERT,TrialExpectRankActivity::new)
|
||||||
|
|
||||||
;
|
;
|
||||||
private int type;
|
private int type;
|
||||||
|
|
|
@ -23,7 +23,7 @@ class GrowthFundActivity extends AbstractActivity {
|
||||||
int[][] values = sActivityRewardConfig.getValues();
|
int[][] values = sActivityRewardConfig.getValues();
|
||||||
User user = UserManager.getUser(session.getUid());
|
User user = UserManager.getUser(session.getUid());
|
||||||
SGlobalActivity sGlobalActivity = SGlobalActivity.getsGlobalActivityMap().get(id);
|
SGlobalActivity sGlobalActivity = SGlobalActivity.getsGlobalActivityMap().get(id);
|
||||||
Integer buyTimes = user.getPlayerInfoManager().getRechargeInfo().getBuyGoodsTimes().getOrDefault(sGlobalActivity.getCanBuyRechargeId(), 0);
|
Integer buyTimes = user.getPlayerInfoManager().getRechargeInfo().getBuyGoodsTimes().getOrDefault(sGlobalActivity.getCanBuyRechargeId()[0], 0);
|
||||||
if(buyTimes == 0){
|
if(buyTimes == 0){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.ljsd.jieling.logic.activity;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ljsd.jieling.jbean.ActivityMission;
|
||||||
|
import com.ljsd.jieling.logic.OnlineUserManager;
|
||||||
|
import com.ljsd.jieling.logic.activity.event.*;
|
||||||
|
import com.ljsd.jieling.logic.dao.UserManager;
|
||||||
|
import com.ljsd.jieling.logic.dao.root.User;
|
||||||
|
import com.ljsd.jieling.logic.rank.RankContext;
|
||||||
|
import com.ljsd.jieling.logic.rank.RankEnum;
|
||||||
|
import com.ljsd.jieling.network.session.ISession;
|
||||||
|
import config.SGlobalActivity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class TrialExpectRankActivity extends ExpectRankActivity {
|
||||||
|
|
||||||
|
public TrialExpectRankActivity(int id) {
|
||||||
|
super(id);
|
||||||
|
Poster.getPoster().listenEvent(this, TrailCrossEvent.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onEvent(IEvent event) throws Exception {
|
||||||
|
if (!(event instanceof TrailCrossEvent))
|
||||||
|
return;
|
||||||
|
update(UserManager.getUser(((TrailCrossEvent) event).getUid()), 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.ljsd.jieling.logic.activity.event;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description: 幸运转盘事件
|
||||||
|
* Author: zsx
|
||||||
|
* CreateDate: 2019/9/23 15:46
|
||||||
|
*/
|
||||||
|
public class TrailCrossEvent implements IEvent{
|
||||||
|
private int uid;
|
||||||
|
private int floor;
|
||||||
|
|
||||||
|
public TrailCrossEvent(int uid, int floor) {
|
||||||
|
this.uid = uid;
|
||||||
|
this.floor = floor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getUid() {
|
||||||
|
return uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUid(int uid) {
|
||||||
|
this.uid = uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getFloor() {
|
||||||
|
return floor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFloor(int floor) {
|
||||||
|
this.floor = floor;
|
||||||
|
}
|
||||||
|
}
|
|
@ -165,6 +165,9 @@ public class CumulationData {
|
||||||
//森罗幻境中参与小游戏次数
|
//森罗幻境中参与小游戏次数
|
||||||
private int playMiniGameTimes;
|
private int playMiniGameTimes;
|
||||||
|
|
||||||
|
//日常任务活跃度达到num
|
||||||
|
private int daily_task_remove_item;
|
||||||
|
|
||||||
public Result updateData(MissionType missionType, Object...parm) throws Exception {
|
public Result updateData(MissionType missionType, Object...parm) throws Exception {
|
||||||
return DataManagerDistributor.updateData(this, missionType,parm);
|
return DataManagerDistributor.updateData(this, missionType,parm);
|
||||||
}
|
}
|
||||||
|
@ -367,4 +370,12 @@ public class CumulationData {
|
||||||
public void setPlayMiniGameTimes(int playMiniGameTimes) {
|
public void setPlayMiniGameTimes(int playMiniGameTimes) {
|
||||||
this.playMiniGameTimes = playMiniGameTimes;
|
this.playMiniGameTimes = playMiniGameTimes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getDaily_task_remove_item() {
|
||||||
|
return daily_task_remove_item;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDaily_task_remove_item(int daily_task_remove_item) {
|
||||||
|
this.daily_task_remove_item = daily_task_remove_item;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1939,9 +1939,13 @@ public class HeroLogic{
|
||||||
|
|
||||||
private void wearJewel(Hero hero,EquipManager equipManager,String equipId)throws Exception{
|
private void wearJewel(Hero hero,EquipManager equipManager,String equipId)throws Exception{
|
||||||
Jewel equip =(Jewel)equipManager.getEquipMap().get(equipId);
|
Jewel equip =(Jewel)equipManager.getEquipMap().get(equipId);
|
||||||
|
|
||||||
if( null == equip || null == hero ){
|
if( null == equip || null == hero ){
|
||||||
throw new ErrorCodeException(ErrorCode.HERO_EQUIP_ERR);
|
throw new ErrorCodeException(ErrorCode.HERO_EQUIP_ERR);
|
||||||
}
|
}
|
||||||
|
if(null!=equip.getHeroId()&&!equip.getHeroId().equals("")){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String remove = "";
|
String remove = "";
|
||||||
for(String jewelId:hero.getJewelInfo()){
|
for(String jewelId:hero.getJewelInfo()){
|
||||||
|
@ -2003,10 +2007,12 @@ public class HeroLogic{
|
||||||
}else if(type==2){
|
}else if(type==2){
|
||||||
Map<String, PropertyItem> equipMap = user.getEquipManager().getEquipMap();
|
Map<String, PropertyItem> equipMap = user.getEquipManager().getEquipMap();
|
||||||
for(String equipId:equipIds){
|
for(String equipId:equipIds){
|
||||||
if(!hero.getJewelInfo().contains(equipId)||equipMap.get(equipId)==null){
|
if(!hero.getJewelInfo().contains(equipId)){
|
||||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||||
}
|
}
|
||||||
equipMap.get(equipId).setHeroId("");
|
if(equipMap.get(equipId)!=null){
|
||||||
|
equipMap.get(equipId).setHeroId("");
|
||||||
|
}
|
||||||
hero.removeJewel(equipId);
|
hero.removeJewel(equipId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2553,7 +2559,8 @@ public class HeroLogic{
|
||||||
if(soulEquipByPositionMap!=null&&soulEquipByPositionMap.size()>0){
|
if(soulEquipByPositionMap!=null&&soulEquipByPositionMap.size()>0){
|
||||||
soulEquipByPositionMap.forEach((k,v)->returnItemMap.put(v,returnItemMap.getOrDefault(v,0)+1));
|
soulEquipByPositionMap.forEach((k,v)->returnItemMap.put(v,returnItemMap.getOrDefault(v,0)+1));
|
||||||
}
|
}
|
||||||
Set<String> jewelInfo = hero.getJewelInfo();
|
|
||||||
|
Set<String> jewelInfo = new HashSet<>(hero.getJewelInfo());
|
||||||
for(String equipId:jewelInfo){
|
for(String equipId:jewelInfo){
|
||||||
if(!equipMap.containsKey(equipId)){
|
if(!equipMap.containsKey(equipId)){
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -285,6 +285,11 @@ public class ItemLogic {
|
||||||
throw new ErrorCodeException(ErrorCode.ITEM_DECOMPOSE_SOULE_CANT);
|
throw new ErrorCodeException(ErrorCode.ITEM_DECOMPOSE_SOULE_CANT);
|
||||||
Jewel jewel = (Jewel)propertyItem;
|
Jewel jewel = (Jewel)propertyItem;
|
||||||
SJewelConfig config = STableManager.getConfig(SJewelConfig.class).get(propertyItem.getEquipId());
|
SJewelConfig config = STableManager.getConfig(SJewelConfig.class).get(propertyItem.getEquipId());
|
||||||
|
if(jewel.getLevel()==0&&jewel.getBuildLevel()==0){
|
||||||
|
SItem sItem = SItem.getsItemMap().get(propertyItem.getEquipId());
|
||||||
|
reward = getStringBuilder(reward, 1, sItem.getResolveReward());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if(jewel.getLevel()!=0){
|
if(jewel.getLevel()!=0){
|
||||||
Map<Integer, SJewelRankupConfig> rankupConfigMap = SJewelRankupConfig.rankupMap.get(config.getLevelupPool()).get(1);
|
Map<Integer, SJewelRankupConfig> rankupConfigMap = SJewelRankupConfig.rankupMap.get(config.getLevelupPool()).get(1);
|
||||||
for(SJewelRankupConfig value:rankupConfigMap.values()){
|
for(SJewelRankupConfig value:rankupConfigMap.values()){
|
||||||
|
@ -321,20 +326,32 @@ public class ItemLogic {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SItem sItem = SItem.getsItemMap().get(propertyItem.getEquipId());
|
items.add(new int[]{propertyItem.getEquipId(),1});
|
||||||
jewelIdReport.add(propertyItem.getEquipId());
|
jewelIdReport.add(propertyItem.getEquipId());
|
||||||
jewelLevelReport.add(propertyItem.getLevel());
|
jewelLevelReport.add(propertyItem.getLevel());
|
||||||
jewelQualityReport.add(((Jewel) propertyItem).getBuildLevel());
|
jewelQualityReport.add(((Jewel) propertyItem).getBuildLevel());
|
||||||
reward = getStringBuilder(reward, 1, sItem.getResolveReward());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for (String jewelId : jewelList) {
|
for (String jewelId : jewelList) {
|
||||||
user.getEquipManager().remove(jewelId);
|
user.getEquipManager().remove(jewelId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, StringUtil.parseFiledInt(reward.toString()), 1, 0,BIReason.JEWEL_DECOMPOSE);
|
CommonProto.Drop.Builder drop = ItemUtil.drop(user, StringUtil.parseFiledInt(reward.toString()), 1, 0,BIReason.JEWEL_DECOMPOSE);
|
||||||
|
|
||||||
|
Map<Integer, Integer> baseItemMap = new HashMap<>();
|
||||||
|
Map<Integer, Integer> baseCardMap = new HashMap<>();
|
||||||
|
Map<Integer, Integer> baseEquipMap = new HashMap<>();
|
||||||
|
Map<Integer,Integer> baseRandomMap = new HashMap<>();
|
||||||
|
|
||||||
|
for (int[] ints:items) {
|
||||||
|
Map<Integer, Integer> mapRe = ItemUtil.getMapRe(ints[0], baseItemMap, baseCardMap, baseEquipMap, baseRandomMap);
|
||||||
|
if(mapRe.containsKey(ints[0])){
|
||||||
|
mapRe.put(ints[0],mapRe.get(ints[0])+ints[1]);
|
||||||
|
}else {
|
||||||
|
mapRe.put(ints[0],ints[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ItemUtil.drop(user,drop,baseItemMap,baseCardMap,baseEquipMap,baseRandomMap,BIReason.JEWEL_DECOMPOSE);
|
||||||
List<CommonProto.Item> reportMap = drop.getItemlistList();
|
List<CommonProto.Item> reportMap = drop.getItemlistList();
|
||||||
List<Integer> itemId = new ArrayList<>(reportMap.size());
|
List<Integer> itemId = new ArrayList<>(reportMap.size());
|
||||||
List<Integer> itemNum = new ArrayList<>(reportMap.size());
|
List<Integer> itemNum = new ArrayList<>(reportMap.size());
|
||||||
|
|
|
@ -488,7 +488,7 @@ public class MissionLoigc {
|
||||||
|
|
||||||
if(missionStateChangeInfos!=null && !missionStateChangeInfos.isEmpty()){
|
if(missionStateChangeInfos!=null && !missionStateChangeInfos.isEmpty()){
|
||||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, missionStateChangeInfos.get(0).getRewwardGroups(), BIReason.TAKE_MISSION_REWARD);
|
CommonProto.Drop.Builder drop = ItemUtil.drop(user, missionStateChangeInfos.get(0).getRewwardGroups(), BIReason.TAKE_MISSION_REWARD);
|
||||||
user.getUserMissionManager().onGameEvent(user,GameEvent.DAILY_TASK_TYPE,missionId);
|
user.getUserMissionManager().onGameEvent(user,GameEvent.DAILY_TASK_TYPE,missionId,user);
|
||||||
ReportUtil.onReportEvent(user, ReportEventEnum.MISSION_COMPLETE.getType(),String.valueOf(missionId),type);
|
ReportUtil.onReportEvent(user, ReportEventEnum.MISSION_COMPLETE.getType(),String.valueOf(missionId),type);
|
||||||
PlayerInfoProto.TakeMissionRewardResponse build = PlayerInfoProto.TakeMissionRewardResponse.newBuilder().setDrop(drop).build();
|
PlayerInfoProto.TakeMissionRewardResponse build = PlayerInfoProto.TakeMissionRewardResponse.newBuilder().setDrop(drop).build();
|
||||||
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.TAKE_MISSION_REWARD_RESPONSE_VALUE,build,true);
|
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.TAKE_MISSION_REWARD_RESPONSE_VALUE,build,true);
|
||||||
|
|
|
@ -17,6 +17,9 @@ public class DailyTaskManager extends AbstractDataManager{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
|
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
|
||||||
|
ItemManager itemManager = ((User)parm[1]).getItemManager();
|
||||||
|
Item item = itemManager.getItem(Global.DAILY_TASK_REMOVE_ITEM);
|
||||||
|
data.setDaily_task_remove_item(Math.max(data.getDaily_task_remove_item(),item.getItemNum()));
|
||||||
return new CumulationData.Result(missionType);
|
return new CumulationData.Result(missionType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,16 +30,20 @@ public class DailyTaskManager extends AbstractDataManager{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isFinish(User user,CumulationData data, int[][] cfgValue, Object... parm) {
|
public boolean isFinish(User user,CumulationData data, int[][] cfgValue, Object... parm) {
|
||||||
ItemManager itemManager = user.getItemManager();
|
// ItemManager itemManager = user.getItemManager();
|
||||||
Item item = itemManager.getItem(Global.DAILY_TASK_REMOVE_ITEM);
|
// Item item = itemManager.getItem(Global.DAILY_TASK_REMOVE_ITEM);
|
||||||
return item!=null&&item.getItemNum()>=cfgValue[1][0];
|
// return item!=null&&item.getItemNum()>=cfgValue[1][0];
|
||||||
|
|
||||||
|
|
||||||
|
return data.getDaily_task_remove_item()>=cfgValue[1][0];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getProcess(User user, CumulationData data, int[] missionSubType) {
|
public int getProcess(User user, CumulationData data, int[] missionSubType) {
|
||||||
ItemManager itemManager = user.getItemManager();
|
// ItemManager itemManager = user.getItemManager();
|
||||||
Item item = itemManager.getItem(Global.DAILY_TASK_REMOVE_ITEM);
|
// Item item = itemManager.getItem(Global.DAILY_TASK_REMOVE_ITEM);
|
||||||
return item==null?0:item.getItemNum();
|
// return item==null?0:item.getItemNum();
|
||||||
|
return data.getDaily_task_remove_item();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ public class ExpeditionPassManger extends AbstractDataManager{
|
||||||
@Override
|
@Override
|
||||||
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
|
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
|
||||||
int type = (int) parm[0];
|
int type = (int) parm[0];
|
||||||
if(type==-1){
|
if(type==-1||type>2){
|
||||||
type=3;
|
type=3;
|
||||||
}
|
}
|
||||||
data.expedition_floor_times.put(type,data.expedition_floor_times.getOrDefault(type, 0)+1);
|
data.expedition_floor_times.put(type,data.expedition_floor_times.getOrDefault(type, 0)+1);
|
||||||
|
|
|
@ -125,9 +125,21 @@ public class MissingRoomMissionType extends AbstractMissionType{
|
||||||
if(star!=0||type!=0){
|
if(star!=0||type!=0){
|
||||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||||
}
|
}
|
||||||
int[][] cost = new int[][]{sMazeTreasure.getTakeItem()};
|
int[] costTemp = new int[sMazeTreasure.getTakeItem().length];
|
||||||
//特权减少消耗
|
for(int i= 0; i <sMazeTreasure.getTakeItem().length;i++){
|
||||||
|
costTemp[i] = sMazeTreasure.getTakeItem()[i];
|
||||||
|
}
|
||||||
|
int[][] cost = new int[][]{costTemp};
|
||||||
|
|
||||||
|
// //特权减少消耗
|
||||||
List<SPrivilegeTypeConfig> missingType = SPrivilegeTypeConfig.privilegeByType.get(VipPrivilegeType.MISSING_ROOM_CONSUME);
|
List<SPrivilegeTypeConfig> missingType = SPrivilegeTypeConfig.privilegeByType.get(VipPrivilegeType.MISSING_ROOM_CONSUME);
|
||||||
|
//
|
||||||
|
// for(SPrivilegeTypeConfig config:missingType){
|
||||||
|
// if(user.getPlayerInfoManager().containPrivilageId(config.getId())){
|
||||||
|
// throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||||
|
// n[1] =(int)(n[1]/10000d*(10000+config.getCondition()[0][1]));
|
||||||
|
// }
|
||||||
|
// }
|
||||||
Arrays.stream(cost).forEach(n->{
|
Arrays.stream(cost).forEach(n->{
|
||||||
for(SPrivilegeTypeConfig config:missingType){
|
for(SPrivilegeTypeConfig config:missingType){
|
||||||
if(user.getPlayerInfoManager().containPrivilageId(config.getId())){
|
if(user.getPlayerInfoManager().containPrivilageId(config.getId())){
|
||||||
|
|
|
@ -309,7 +309,7 @@ public class PlayerLogic {
|
||||||
Set<Integer> fixVipId = new HashSet<>();
|
Set<Integer> fixVipId = new HashSet<>();
|
||||||
for(Map.Entry<Integer,VipInfo> vipInfoItem : vipInfo.entrySet()){
|
for(Map.Entry<Integer,VipInfo> vipInfoItem : vipInfo.entrySet()){
|
||||||
//如果这个权限是活动 且永久了 那么需要修复
|
//如果这个权限是活动 且永久了 那么需要修复
|
||||||
if(vipInfoItem.getValue().getEffectTime()==0&&SPrivilegeTypeConfig.getsPrivilegeTypeConfigMap().get(vipInfoItem.getKey()).getPrivilegeType()==5){
|
if(vipInfoItem.getValue().getEffectTime()==0&&SPrivilegeTypeConfig.getsPrivilegeTypeConfigMap().get(vipInfoItem.getKey()).getUnlockType()==5){
|
||||||
fixVipId.add(vipInfoItem.getKey());
|
fixVipId.add(vipInfoItem.getKey());
|
||||||
}
|
}
|
||||||
if(vipInfoItem.getValue().getEffectTime()!=0 && vipInfoItem.getValue().getEffectTime()<=(TimeUtils.now()/1000)){
|
if(vipInfoItem.getValue().getEffectTime()!=0 && vipInfoItem.getValue().getEffectTime()<=(TimeUtils.now()/1000)){
|
||||||
|
@ -317,11 +317,10 @@ public class PlayerLogic {
|
||||||
CombatLogic.getInstance().getNewAdventureReward(user,true,vipInfoItem.getValue().getEffectTime());
|
CombatLogic.getInstance().getNewAdventureReward(user,true,vipInfoItem.getValue().getEffectTime());
|
||||||
}
|
}
|
||||||
removePrivileges.add(vipInfoItem.getKey());
|
removePrivileges.add(vipInfoItem.getKey());
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!fixVipId.isEmpty()){
|
if(!fixVipId.isEmpty()){
|
||||||
fixVipId.forEach(n->playerInfoManager.addVipByTime(n,(int)((TimeUtils.now()+TimeUtils.WEEK)/1000)));
|
fixVipId.forEach(n->playerInfoManager.addVipByTime(n,(int)(TimeUtils.now()/1000)));
|
||||||
}
|
}
|
||||||
playerInfoManager.vipFlush(removePrivileges);
|
playerInfoManager.vipFlush(removePrivileges);
|
||||||
//vip刷新后才能发给前端
|
//vip刷新后才能发给前端
|
||||||
|
|
Loading…
Reference in New Issue