十绝阵加入公会本次校验
parent
7c19553f53
commit
044e43c4ce
|
@ -38,6 +38,8 @@ public class GuildMyInfo extends MongoBase {
|
|||
private int carPlayTime; //车迟上次玩的时间
|
||||
private int carPlayProgress; // 车迟玩的阶段
|
||||
|
||||
private int joinTime;//加入公会时间
|
||||
|
||||
|
||||
|
||||
public void clearOfLevelGuild(){
|
||||
|
@ -282,4 +284,14 @@ public class GuildMyInfo extends MongoBase {
|
|||
this.carPlayProgress = carPlayProgress;
|
||||
updateString("carPlayProgress",carPlayProgress);
|
||||
}
|
||||
|
||||
public int getJoinTime() {
|
||||
return joinTime;
|
||||
}
|
||||
|
||||
public void setJoinTime(int joinTime) {
|
||||
this.joinTime = joinTime;
|
||||
updateString("joinTime",joinTime);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import com.ljsd.jieling.globals.BIReason;
|
|||
import com.ljsd.jieling.globals.Global;
|
||||
import com.ljsd.jieling.logic.GlobalDataManaager;
|
||||
import com.ljsd.jieling.logic.OnlineUserManager;
|
||||
import com.ljsd.jieling.logic.dao.GuildMyInfo;
|
||||
import com.ljsd.jieling.logic.dao.GuilidManager;
|
||||
import com.ljsd.jieling.logic.dao.TimeControllerOfFunction;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
|
@ -62,6 +63,8 @@ public class DeathPathLogic {
|
|||
|
||||
private int overTime;
|
||||
|
||||
private int startTime;
|
||||
|
||||
//第一次开启时间
|
||||
private long firstStartTime;
|
||||
|
||||
|
@ -199,6 +202,7 @@ public class DeathPathLogic {
|
|||
}
|
||||
break;
|
||||
case 1:
|
||||
startTime = (int)(TimeUtils.getAppointTime(guildWarTime[status-1][0],guildWarTime[status-1][1])/1000);
|
||||
overTime = (int)(TimeUtils.getAppointTime(guildWarTime[status][0],guildWarTime[status][1])/1000);
|
||||
if (taskExecutor == null) {
|
||||
taskExecutor = new DeathPathExecutor(tasks);
|
||||
|
@ -240,8 +244,14 @@ public class DeathPathLogic {
|
|||
* @param session
|
||||
* @param messageType
|
||||
*/
|
||||
public void getStatus(ISession session, MessageTypeProto.MessageType messageType){
|
||||
Family.GetDeathPathStatusResponse response = Family.GetDeathPathStatusResponse.newBuilder().setStatus(status).build();
|
||||
public void getStatus(ISession session, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
GuildMyInfo info = UserManager.getUser(session.getUid()).getGuildMyInfo();
|
||||
int joinType =0;
|
||||
if(info.getJoinTime()<startTime||info.getJoinTime()>overTime) {
|
||||
joinType = 1;
|
||||
}
|
||||
Family.GetDeathPathStatusResponse response = Family.GetDeathPathStatusResponse.newBuilder().setStatus(status).setAllowChallange(joinType).build();
|
||||
|
||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),response,true);
|
||||
}
|
||||
|
||||
|
|
|
@ -617,6 +617,7 @@ public class GuildLogic {
|
|||
Family.FamilyJoinIndicaion build = builder.setFamilyBaseInfo(CBean2Proto.getFamilyBaseInfo(guildInfo)).setFamilyUserInfo(CBean2Proto.getFamilyUserInfo(targetUser, GlobalsDef.MEMBER)).build();
|
||||
sendIndicationToMember(guildInfo, MessageTypeProto.MessageType.FAMILY_JOIN_INDICATION,build);
|
||||
}
|
||||
targetUser.getGuildMyInfo().setJoinTime(TimeUtils.nowInt());
|
||||
ReportUtil.onReportEvent(targetUser, ReportEventEnum.JOIN_GUILD.getType(),String.valueOf(guildInfo.getId()),guildInfo.getName(),guildInfo.getLevel(),guildInfo.getTotalMembers());
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue