小兵关卡相关活动和排行榜修改
parent
2d76709b52
commit
37d70b70fa
|
@ -1749,13 +1749,12 @@ public class MapLogic {
|
||||||
// 关卡信息
|
// 关卡信息
|
||||||
openNextMainLevel(session, user, fightId);
|
openNextMainLevel(session, user, fightId);
|
||||||
// 排行榜
|
// 排行榜
|
||||||
SMainLevelConfig sMainLevelConfig = SMainLevelConfig.config.get(fightId);
|
|
||||||
RankContext.getRankEnum(RankEnum.MAIN_LEVEL_RANK.getType()).addRank(user.getId(), "", sMainLevelConfig.getVirtureId(), user.getPlayerInfoManager().getMaxForce());
|
|
||||||
// 推送
|
// 推送
|
||||||
MainLevelManager mainLevelManager = user.getMainLevelManager();
|
MainLevelManager mainLevelManager = user.getMainLevelManager();
|
||||||
FightInfoProto.MainLevelFightUpdateIndication build = FightInfoProto.MainLevelFightUpdateIndication.newBuilder().setState(mainLevelManager.getState()).setFightId(mainLevelManager.getFightId()).build();
|
FightInfoProto.MainLevelFightUpdateIndication build = FightInfoProto.MainLevelFightUpdateIndication.newBuilder().setState(mainLevelManager.getState()).setFightId(mainLevelManager.getFightId()).build();
|
||||||
MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.MAIN_LEVEL_FIGHT_UPDATE_INDICATION_VALUE, build, true);
|
MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.MAIN_LEVEL_FIGHT_UPDATE_INDICATION_VALUE, build, true);
|
||||||
// 打点,现在不用
|
// 打点,现在不用
|
||||||
|
SMainLevelConfig sMainLevelConfig = SMainLevelConfig.config.get(fightId);
|
||||||
ReportUtil.onReportEvent(user, ReportEventEnum.PASS_STAGE.getType(), String.valueOf(fightId), "", sMainLevelConfig.getReward(), new Date());
|
ReportUtil.onReportEvent(user, ReportEventEnum.PASS_STAGE.getType(), String.valueOf(fightId), "", sMainLevelConfig.getReward(), new Date());
|
||||||
// 奖励道具
|
// 奖励道具
|
||||||
return ItemUtil.dropToPrivilege(user, sMainLevelConfig.getReward(), BIReason.LEVELDIFFICULTY_FIGHT_REWARD);
|
return ItemUtil.dropToPrivilege(user, sMainLevelConfig.getReward(), BIReason.LEVELDIFFICULTY_FIGHT_REWARD);
|
||||||
|
|
|
@ -15,7 +15,7 @@ import com.ljsd.jieling.network.session.ISession;
|
||||||
import com.ljsd.jieling.util.ItemUtil;
|
import com.ljsd.jieling.util.ItemUtil;
|
||||||
import com.ljsd.jieling.util.MessageUtil;
|
import com.ljsd.jieling.util.MessageUtil;
|
||||||
import config.SActivityRewardConfig;
|
import config.SActivityRewardConfig;
|
||||||
import config.SMainLevelConfig;
|
import config.SSoldierStageConfig;
|
||||||
import rpc.protocols.CommonProto;
|
import rpc.protocols.CommonProto;
|
||||||
import rpc.protocols.PlayerInfoProto;
|
import rpc.protocols.PlayerInfoProto;
|
||||||
import util.TimeUtils;
|
import util.TimeUtils;
|
||||||
|
@ -96,7 +96,7 @@ public class GiveEndlessDrawActivity extends AbstractActivity {
|
||||||
*/
|
*/
|
||||||
private int getState(User user, SActivityRewardConfig reward, ActivityProgressInfo progress){
|
private int getState(User user, SActivityRewardConfig reward, ActivityProgressInfo progress){
|
||||||
// 当前关卡id
|
// 当前关卡id
|
||||||
int mainLvId = user.getMainLevelManager().getFightId();
|
int soldierLayerId = user.getMainLevelManager().getSoldierLayerId();
|
||||||
// 任务类型,0:一次性奖励,1:每日奖励
|
// 任务类型,0:一次性奖励,1:每日奖励
|
||||||
int type = reward.getValues()[0][0];
|
int type = reward.getValues()[0][0];
|
||||||
// 任务条件(关卡id)
|
// 任务条件(关卡id)
|
||||||
|
@ -115,11 +115,11 @@ public class GiveEndlessDrawActivity extends AbstractActivity {
|
||||||
}
|
}
|
||||||
// 首次领取
|
// 首次领取
|
||||||
else {
|
else {
|
||||||
SMainLevelConfig value = SMainLevelConfig.config.get(valueId);
|
SSoldierStageConfig value = SSoldierStageConfig.idMap.get(valueId);
|
||||||
SMainLevelConfig mainLv = SMainLevelConfig.config.get(mainLvId);
|
SSoldierStageConfig layer = SSoldierStageConfig.idMap.get(soldierLayerId);
|
||||||
if (value != null && mainLv != null){
|
if (value != null && layer != null){
|
||||||
//关卡满足
|
//关卡满足
|
||||||
if (mainLv.getVirtureId() > value.getVirtureId()){
|
if (layer.getId() >= value.getId()){
|
||||||
state = 1;
|
state = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -129,10 +129,6 @@ public class GiveEndlessDrawActivity extends AbstractActivity {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 领取奖励
|
* 领取奖励
|
||||||
* @param session
|
|
||||||
* @param missionId
|
|
||||||
* @return
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean takeReward(ISession session, int missionId) throws Exception {
|
public boolean takeReward(ISession session, int missionId) throws Exception {
|
||||||
|
|
|
@ -10,6 +10,9 @@ import com.ljsd.jieling.logic.activity.event.SaveHeroForceEvent;
|
||||||
import com.ljsd.jieling.logic.dao.*;
|
import com.ljsd.jieling.logic.dao.*;
|
||||||
import com.ljsd.jieling.logic.dao.root.User;
|
import com.ljsd.jieling.logic.dao.root.User;
|
||||||
import com.ljsd.jieling.logic.hero.HeroLogic;
|
import com.ljsd.jieling.logic.hero.HeroLogic;
|
||||||
|
import com.ljsd.jieling.logic.rank.RankContext;
|
||||||
|
import com.ljsd.jieling.logic.rank.RankEnum;
|
||||||
|
import com.ljsd.jieling.logic.rank.rankImpl.AbstractRank;
|
||||||
import com.ljsd.jieling.network.session.ISession;
|
import com.ljsd.jieling.network.session.ISession;
|
||||||
import com.ljsd.jieling.util.CBean2Proto;
|
import com.ljsd.jieling.util.CBean2Proto;
|
||||||
import com.ljsd.jieling.util.ItemUtil;
|
import com.ljsd.jieling.util.ItemUtil;
|
||||||
|
@ -294,6 +297,9 @@ public class SoldierLogic {
|
||||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, stageConfig.getReward(), 1, BIReason.SOLDIER_MIAN_LEVEL_REWARD);
|
CommonProto.Drop.Builder drop = ItemUtil.drop(user, stageConfig.getReward(), 1, BIReason.SOLDIER_MIAN_LEVEL_REWARD);
|
||||||
builder.setDrop(drop);
|
builder.setDrop(drop);
|
||||||
builder.setResult(1);
|
builder.setResult(1);
|
||||||
|
// 排行榜
|
||||||
|
AbstractRank rank = RankContext.getRankEnum(RankEnum.MAIN_LEVEL_RANK.getType());
|
||||||
|
rank.addRank(user.getId(), "", stageConfig.getId(), user.getPlayerInfoManager().getMaxForce());
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.SoldierFightCheckResponse_VALUE, builder.build(), true);
|
MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.SoldierFightCheckResponse_VALUE, builder.build(), true);
|
||||||
|
|
Loading…
Reference in New Issue