logic提交
parent
fea1806186
commit
07cfe90a46
|
@ -0,0 +1,38 @@
|
|||
package com.ljsd.jieling.logic.rank;
|
||||
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import com.ljsd.jieling.protocols.MessageTypeProto;
|
||||
import com.ljsd.jieling.protocols.PlayerInfoProto;
|
||||
import com.ljsd.jieling.util.MessageUtil;
|
||||
import config.SSpecialConfig;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* @author lvxinran
|
||||
* @date 2019/11/28
|
||||
* @discribe
|
||||
*/
|
||||
public class RankLogic {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(RankLogic.class);
|
||||
private RankLogic() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单例
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static RankLogic getInstance() {
|
||||
return Instance.instance;
|
||||
}
|
||||
|
||||
public static class Instance {
|
||||
public final static RankLogic instance = new RankLogic();
|
||||
}
|
||||
public void getRank(ISession session, int type, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
PlayerInfoProto.RankResponse rankResponse= RankContext.getRankEnum(type).getRank(session.getUid(), -1);
|
||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),rankResponse,true);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue