1.修复活动关闭没有推送新活动开始
parent
cfb504dfe8
commit
f48920d5bc
|
@ -88,6 +88,7 @@ public interface GlobalsDef {
|
|||
int ENDLESS_TEAM = 401;//无尽编队
|
||||
int BLOODY_TEAM =701; //血战队伍
|
||||
int CHAMPION_ATTACK_TEAM =801; //
|
||||
int EXPEDITION_TEAM =1001; //
|
||||
int CAR_DELAY_TEAM =1101; //车迟斗法
|
||||
int DEATH_PATH_TEAM = 1201;//十绝阵
|
||||
|
||||
|
|
|
@ -248,5 +248,7 @@ public interface BIReason {
|
|||
int COMPLEX_JEVEL_EQUIP_CONSUME = 1058; //合成宝器
|
||||
int GUILD_HELP_CONSUME = 1059;//公会援助
|
||||
|
||||
int RANDOM_COST_BOX_CONSUME = 1060;//抽取宝箱奖励消耗
|
||||
|
||||
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
package com.ljsd.jieling.handler;
|
||||
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.netty.cocdex.PacketNetData;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import com.ljsd.jieling.protocols.MessageTypeProto;
|
||||
|
||||
public class TakeRandomHeroBoxHandler extends BaseHandler{
|
||||
@Override
|
||||
public MessageTypeProto.MessageType getMessageCode() {
|
||||
return MessageTypeProto.MessageType.TAKE_RANDOM_HERO_BOX_REQUEST;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process(ISession iSession, PacketNetData netData) throws Exception {
|
||||
User user = UserManager.getUser(iSession.getUid());
|
||||
|
||||
}
|
||||
}
|
|
@ -147,7 +147,7 @@ public abstract class AbstractActivity implements IActivity, IEventHandler {
|
|||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, reward, BIReason.TAKE_ACTIVITY_REWARD);
|
||||
checkAndSetProgress(activityMission, activityProgressInfo, missionId);
|
||||
SGlobalActivity sGlobalActivity = SGlobalActivity.getsGlobalActivityMap().get(id);
|
||||
if (null != sGlobalActivity && ActivityLogic.getInstance().checkActivityMissionFinishAndTaked(id, activityMission) && sGlobalActivity.getResetGrade() == 1) {
|
||||
if (null != sGlobalActivity && ActivityLogic.getInstance().checkActivityMissionFinishAndTaked(session.getUid(),id, activityMission) && sGlobalActivity.getResetGrade() == 1) {
|
||||
reSetValue(user);
|
||||
if(sGlobalActivity.getType() != ActivityType.OnlineReward) {
|
||||
ActivityMission newmiss = user.getActivityManager().getActivityMissionMap().get(id);
|
||||
|
|
|
@ -632,11 +632,11 @@ public class ActivityLogic implements IEventHandler{
|
|||
if (activityMission.getActivityState() != ActivityType.OPEN_STATE) {
|
||||
continue;
|
||||
}
|
||||
checkActivityMissionFinishAndTaked(item.getKey(), activityMission);
|
||||
checkActivityMissionFinishAndTaked(user.getId(),item.getKey(), activityMission);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean checkActivityMissionFinishAndTaked(int activityId, ActivityMission activityMission) {
|
||||
public boolean checkActivityMissionFinishAndTaked(int uid,int activityId, ActivityMission activityMission) {
|
||||
Map<Integer, ActivityProgressInfo> activityProgressInfoMap = activityMission.getActivityMissionMap();
|
||||
for (Map.Entry<Integer, ActivityProgressInfo> item : activityProgressInfoMap.entrySet()) {
|
||||
ActivityProgressInfo activityProgressInfo = item.getValue();
|
||||
|
@ -655,7 +655,8 @@ public class ActivityLogic implements IEventHandler{
|
|||
}
|
||||
SGlobalActivity sGlobalActivity = SGlobalActivity.getsGlobalActivityMap().get(activityId);
|
||||
if(sGlobalActivity.getResetGrade()==0){
|
||||
activityMission.setActivityState(ActivityType.FINISH_STATE);
|
||||
activityMission.setActivityState(ActivityType.CLOSE_STATE);
|
||||
Poster.getPoster().dispatchEvent(new ActivityStateChangeEvent(uid,activityId,ActivityType.CLOSE_STATE));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -8,6 +8,7 @@ import com.ljsd.jieling.logic.activity.event.IEvent;
|
|||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.store.BuyGoodsLogic;
|
||||
import com.ljsd.jieling.util.ToolsUtil;
|
||||
import config.SGlobalActivity;
|
||||
|
||||
|
@ -39,14 +40,16 @@ public class ActivityStateChangeHandler implements IEventHandler {
|
|||
}
|
||||
if(sGlobalActivity.getCanBuyRechargeId()!=0){
|
||||
user.getPlayerInfoManager().getRechargeInfo().putDyGoodsCanBuyTimes(sGlobalActivity.getCanBuyRechargeId(),1);
|
||||
BuyGoodsLogic.sendGiftGooodsIndication(uid);
|
||||
}
|
||||
}else if(state == ActivityType.CLOSE_STATE){
|
||||
List<SGlobalActivity> sGlobalActivities = SGlobalActivity.sGlobalActivityMapByType.getOrDefault(3, new ArrayList<>(0));
|
||||
List<SGlobalActivity> sGlobalActivities = SGlobalActivity.sGlobalActivityMapByOpenRules.getOrDefault(3, new ArrayList<>(0));
|
||||
sGlobalActivities.stream().filter(s->s.getOpenRules()[1] == activityId).forEach(s->{
|
||||
ActivityMission activityMissionWillOpen = user.getActivityManager().getActivityMissionMap().get(s.getId());
|
||||
if(activityMissionWillOpen!=null && activityMissionWillOpen.getActivityState() == ActivityType.UNOPEN_STATE){
|
||||
AbstractActivity abstractActivity = ActivityTypeEnum.getActicityType(s.getId());
|
||||
abstractActivity.setOpenState(user,ActivityType.OPEN_STATE);
|
||||
Poster.getPoster().dispatchEvent(new ActivityStateChangeEvent(uid,s.getId(),ActivityType.OPEN_STATE));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -764,6 +764,13 @@ public class CombatLogic {
|
|||
}
|
||||
});
|
||||
}
|
||||
if(teamId == GlobalsDef.EXPEDITION_TEAM){
|
||||
user.getPlayerInfoManager().getRechargeInfo().getBuyGoodsTimes().keySet().forEach(id->{
|
||||
for(int passId : SRechargeCommodityConfig.rechargeCommodityConfigMap.get(id).getPassiveSkill()) {
|
||||
passiveTeamskillEffect.add(passId);
|
||||
}
|
||||
});
|
||||
}
|
||||
user.getTeamPosManager().updatePassSkillTeamPos(teamId,passiveTeamskillEffect);
|
||||
passiveskillEffect.addAll(passiveTeamskillEffect);
|
||||
}else{
|
||||
|
|
|
@ -46,7 +46,7 @@ mongodb.options.maxConnectionIdleTime = 1000
|
|||
|
||||
|
||||
# netty config
|
||||
netty.tcpPort = 16080
|
||||
netty.tcpPort = 26080
|
||||
netty.chatTcpPort = 20001
|
||||
netty.logintcpPort = 18091
|
||||
netty.udpPort = 18092
|
||||
|
@ -55,14 +55,15 @@ netty.udpTargetPort=10001
|
|||
netty.reconnectDelay=3000
|
||||
netty.bossThreadCount=1
|
||||
netty.workerThreadCount=10
|
||||
netty.readTimeout=32
|
||||
netty.writeTimeout=32
|
||||
netty.allTimeout=35
|
||||
netty.readTimeout=10
|
||||
netty.writeTimeout=10
|
||||
netty.allTimeout=10
|
||||
|
||||
|
||||
|
||||
#core
|
||||
services.core.ip=60.1.1.153
|
||||
services.core.ip=127.0.0.1
|
||||
services.core.gmport=12345
|
||||
services.core.port=7900
|
||||
services.core.area=1000
|
||||
services.core.id=1
|
||||
|
|
|
@ -61,6 +61,7 @@ public class SSpecialConfig implements BaseConfig {
|
|||
public static final String Gold_touch = "Gold_touch";//三个点金对应vip
|
||||
public static final String Gold_touch_refresh = "Gold_touch_refresh";//点金刷新时间
|
||||
public static final String GUILD_TECHNOLOGY_RETURN_PERCENT = "guild_technology_return_percent";//公会技能重置返还材料比例 实际百分比为填写数值/10000
|
||||
public static final String LOTTERY_ENERGY_COST = "lottery_energy_cost";//钻石抽积攒仙缘能量(原非酋气息)抽奖消耗
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
|
||||
|
|
Loading…
Reference in New Issue