挑战副本 幻境达人 计数
parent
ea6899e50b
commit
b64879f4b2
|
@ -6,6 +6,8 @@ import com.ljsd.jieling.handler.map.MapManager;
|
|||
import com.ljsd.jieling.handler.map.TrialInfo;
|
||||
import com.ljsd.jieling.jbean.ActivityMission;
|
||||
import com.ljsd.jieling.jbean.ActivityProgressInfo;
|
||||
import com.ljsd.jieling.logic.OnlineUserManager;
|
||||
import com.ljsd.jieling.logic.dao.PlayerManager;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.mail.MailLogic;
|
||||
|
@ -35,6 +37,42 @@ class ExpectRankActivity extends AbstractActivity {
|
|||
super(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onActivityStart() throws Exception {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initActivity(User user) throws Exception {
|
||||
//PlayerManager player = user.getPlayerInfoManager();
|
||||
if (SGlobalActivity.getsGlobalActivityMap().get(id).getType() != 70){
|
||||
return;
|
||||
}
|
||||
ActivityMission activityMission = user.getActivityManager().getActivityMissionMap().get(id);
|
||||
if (null == activityMission) {
|
||||
return;
|
||||
}
|
||||
Map<Integer, ActivityProgressInfo> activityProgressInfoMap = activityMission.getActivityMissionMap();
|
||||
|
||||
MapManager mapManager = user.getMapManager();
|
||||
TrialInfo trialInfo = mapManager.getTrialInfo();
|
||||
SActivityRewardConfig.getsActivityRewardConfigByActivityId(id).stream().forEach(n ->
|
||||
{
|
||||
if (trialInfo.getFloor() >= n.getValues()[1][0]) {
|
||||
ActivityProgressInfo activityProgressInfo = activityProgressInfoMap.getOrDefault(n.getId(), null);
|
||||
if (null == activityProgressInfo)
|
||||
return;
|
||||
activityProgressInfo.setState(1);
|
||||
}
|
||||
}
|
||||
);
|
||||
//更新进度
|
||||
ISession sessionByUid = OnlineUserManager.getSessionByUid(user.getId());
|
||||
sendActivityProgress(sessionByUid, activityMission, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
void updateProgressWithUser(User user, ActivityMission activityMission, int count) {
|
||||
|
||||
|
@ -132,8 +170,7 @@ class ExpectRankActivity extends AbstractActivity {
|
|||
continue;
|
||||
}
|
||||
|
||||
if(maxRank!=-1)
|
||||
{
|
||||
if (maxRank != -1) {
|
||||
maxRank = Math.max(maxRank, sActivityRankingReward1.getMaxRank());
|
||||
}
|
||||
|
||||
|
|
|
@ -121,7 +121,8 @@ public class ChallengeLogic {
|
|||
}
|
||||
ratio = percent[1];
|
||||
}
|
||||
builder.setLossBlood((long)lossBlood);
|
||||
LOGGER.info("输了 lossBlood:"+lossBlood);
|
||||
builder.setLossBloodOrTimes((long)lossBlood);
|
||||
} else if (type == 2) {//回合数
|
||||
long times = result[1];//回合数
|
||||
for (int[] percent : reward1) {
|
||||
|
@ -130,6 +131,8 @@ public class ChallengeLogic {
|
|||
}
|
||||
ratio = percent[1];
|
||||
}
|
||||
builder.setLossBloodOrTimes(times);
|
||||
LOGGER.info("输了 回合数 times :"+times);
|
||||
}
|
||||
LOGGER.info("challengeHandler ====>id:{},ratio:{}", sChallengeConfig.getId(), ratio);
|
||||
for (int[] fix : sChallengeConfig.getPassReward()) {
|
||||
|
@ -198,10 +201,10 @@ public class ChallengeLogic {
|
|||
int endlessNewReplicaLexel = user.getPlayerInfoManager().getEndlessNewReplica();
|
||||
int treasureReplicaLexel = user.getPlayerInfoManager().getTreasureReplica();
|
||||
//限制
|
||||
boolean consume = PlayerLogic.getInstance().checkAndUpdate(user, sChallengeConfig.getPivilegeID()[1], 1);
|
||||
/* boolean consume = PlayerLogic.getInstance().checkAndUpdate(user, sChallengeConfig.getPivilegeID()[1], 1);
|
||||
if (!consume) {
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
}*/
|
||||
Map<Integer, Integer> comDropMap = new HashMap<>();
|
||||
if (model == 2) {
|
||||
//扫荡
|
||||
|
|
Loading…
Reference in New Issue