fix adventure left

back_recharge
wangyuan 2019-07-04 23:05:37 +08:00
parent 4c799d300a
commit b4828b943c
2 changed files with 10 additions and 3 deletions

View File

@ -4,6 +4,7 @@ import com.ljsd.jieling.handler.BaseHandler;
import com.ljsd.jieling.logic.fight.CombatLogic;
import com.ljsd.jieling.netty.cocdex.PacketNetData;
import com.ljsd.jieling.network.session.ISession;
import com.ljsd.jieling.protocols.FightInfoProto;
import com.ljsd.jieling.protocols.MessageTypeProto;
import org.springframework.stereotype.Component;
@ -16,6 +17,7 @@ public class AdventureLeftHandler extends BaseHandler {
@Override
public void process(ISession iSession, PacketNetData netData) throws Exception {
CombatLogic.getInstance().leftAdventurePos(iSession);
FightInfoProto.AdventureLeftRequest adventureLeftRequest = FightInfoProto.AdventureLeftRequest.parseFrom(netData.parseClientProtoNetData());
CombatLogic.getInstance().leftAdventurePos(iSession,adventureLeftRequest.getType());
}
}

View File

@ -584,8 +584,13 @@ public class CombatLogic {
return bossGroupID;
}
public void leftAdventurePos(ISession session){
public void leftAdventurePos(ISession session,int type){
if(type == 0){
OnlineUserManager.orderAdventureUids.remove(session.getUid());
}else{
OnlineUserManager.orderAdventureUids.add(session.getUid());
}
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.ADVENTURE_LEFT_RESPONSE_VALUE,null,true);
}