热更bug修复
parent
ba78a6c201
commit
bca7dc18de
|
|
@ -155,7 +155,7 @@ public class GuilidManager {
|
|||
|
||||
String key = RedisUtil.getInstence().getKey(RedisKey.GUILD_RELEASE, "");
|
||||
while (needContinue){
|
||||
Set<ZSetOperations.TypedTuple<String>> zsetreverseRangeWithScores = RedisUtil.getInstence().getZsetRangeWithScores(RedisKey.GUILD_RELEASE, "", round*5, (round+1)*5);
|
||||
Set<ZSetOperations.TypedTuple<String>> zsetreverseRangeWithScores = RedisUtil.getInstence().getZsetRangeWithScores(RedisKey.GUILD_RELEASE, "", round* 5L, (round+1)* 5L);
|
||||
if(zsetreverseRangeWithScores == null || zsetreverseRangeWithScores.isEmpty()){
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public class UpdateYuanZhuHandler extends BaseCrossHandler {
|
|||
AyyncWorker ayyncWorker = new AyyncWorker(thisUser, true, new AyncWorkerRunnable() {
|
||||
@Override
|
||||
public void work(User user) throws Exception {
|
||||
GuildLogic.getInstance().OnUserLeveFamily(user);
|
||||
GuildLogic.OnUserLeveFamily(user);
|
||||
int guildId = user.getPlayerInfoManager().getGuildId();
|
||||
GuildInfo guildInfo = GuilidManager.getGuildInfo(guildId);
|
||||
user.getPlayerInfoManager().setGuildId(0);
|
||||
|
|
@ -48,9 +48,7 @@ public class UpdateYuanZhuHandler extends BaseCrossHandler {
|
|||
private Map<Integer,Integer> clearRedPacketMap(User user){
|
||||
Map<Integer,Integer> map = user.getPlayerInfoManager().getWelfareRedPackets();
|
||||
for(Map.Entry<Integer,Integer> entry : map.entrySet()){
|
||||
if(entry.getValue().intValue() == -1){
|
||||
continue;
|
||||
}else{
|
||||
if(entry.getValue() != -1){
|
||||
entry.setValue(0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -332,10 +332,7 @@ public class GuildLogic {
|
|||
}
|
||||
for(Integer applyGuildId : applyGuilds){
|
||||
if(GuilidManager.getGuildInfo(applyGuildId).getJoinType()!=0&&applyGuilds.size()==0){
|
||||
if(applyGuilds.size()>1){
|
||||
throw new ErrorCodeException(ErrorCode.FAMILY_LIMIT_CHANGED);
|
||||
}
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
GuildApply guildApply = new GuildApply(uid,applyGuildId);
|
||||
Map<Integer, GuildApply> applyGuildFamilyInfos = GuilidManager.getApplyGuildInfos(applyGuildId, 0);
|
||||
|
|
@ -422,20 +419,13 @@ public class GuildLogic {
|
|||
}
|
||||
Family.GetFamilyLogResponse.Builder builder = Family.GetFamilyLogResponse.newBuilder();
|
||||
List<GuildLog> guildLogs = GuilidManager.getGuilidLog(user.getPlayerInfoManager().getGuildId());
|
||||
Collections.sort(guildLogs, new Comparator<GuildLog>(){
|
||||
@Override
|
||||
public int compare(GuildLog o1, GuildLog o2) {
|
||||
return Integer.compare(o2.getLogTime(), o1.getLogTime());
|
||||
}
|
||||
});
|
||||
if(guildLogs!=null){
|
||||
for(GuildLog guildLog : guildLogs){
|
||||
builder.addFamilyLogInfo(Family.FamilyLogInfo.newBuilder()
|
||||
.setInfo(guildLog.getInfo())
|
||||
.setName(guildLog.getName())
|
||||
.setTime(guildLog.getLogTime())
|
||||
.build());
|
||||
}
|
||||
guildLogs.sort((o1, o2) -> Integer.compare(o2.getLogTime(), o1.getLogTime()));
|
||||
for(GuildLog guildLog : guildLogs){
|
||||
builder.addFamilyLogInfo(Family.FamilyLogInfo.newBuilder()
|
||||
.setInfo(guildLog.getInfo())
|
||||
.setName(guildLog.getName())
|
||||
.setTime(guildLog.getLogTime())
|
||||
.build());
|
||||
}
|
||||
MessageUtil.sendMessage(session,1,msgId,builder.build(),true);
|
||||
|
||||
|
|
@ -905,11 +895,18 @@ public class GuildLogic {
|
|||
MessageUtil.sendIndicationMessage(session,1, MessageTypeProto.MessageType.FAMILY_KICK_INDICATION_VALUE,build,true);
|
||||
}
|
||||
|
||||
User user = UserManager.getUser(sendUid);
|
||||
//TODO lock check
|
||||
OnUserLeveFamily(user);
|
||||
user.getPlayerInfoManager().setGuildId(0);
|
||||
MailLogic.getInstance().sendMail(user.getId(),title,content,"",(int)(System.currentTimeMillis()/1000), Global.MAIL_EFFECTIVE_TIME);
|
||||
int serverId = AreaManager.getInstance().getServerIdByUid(sendUid, GameApplication.serverId);
|
||||
if (serverId != GameApplication.serverId) {
|
||||
User userByRpc = PlayerLogic.getInstance().getUserByRpc(sendUid);
|
||||
String userStr = RedisUtil.getInstence().getGson().toJson(userByRpc);
|
||||
updateUserInfo(serverId, sendUid, userStr, GuildDef.UPDATE_KICK_OUT);
|
||||
}else {
|
||||
User user = UserManager.getUser(sendUid);
|
||||
OnUserLeveFamily(user);
|
||||
user.getPlayerInfoManager().setGuildId(0);
|
||||
MailLogic.getInstance().sendMail(user.getId(),title,content,"",TimeUtils.nowInt(), Global.MAIL_EFFECTIVE_TIME);
|
||||
}
|
||||
}
|
||||
}
|
||||
for(int i = 1;i<=10;i++){
|
||||
|
|
@ -1610,8 +1607,7 @@ public class GuildLogic {
|
|||
long[][] dropArrayReally =new long[reward.size()][];
|
||||
int index = 0;
|
||||
for(Map.Entry<Integer,Integer> entry:reward.entrySet()){
|
||||
double doublePercent = (double) percent;
|
||||
dropArrayReally[index] = new long[]{entry.getKey(),(long)(entry.getValue()*doublePercent/10000)};
|
||||
dropArrayReally[index] = new long[]{entry.getKey(),(long)(entry.getValue()* (double) percent /10000)};
|
||||
index++;
|
||||
}
|
||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, dropArrayReally, BIReason.RESET_GUILD_SKILL);
|
||||
|
|
@ -1660,7 +1656,7 @@ public class GuildLogic {
|
|||
// 十绝阵
|
||||
RedisUtil.getInstence().zsetRemoveOne(RedisUtil.getInstence().getKey(RedisKey.DEATH_PATH_TOTAL_PERSON_RANK,""),String.valueOf(user.getId()));
|
||||
//删除战力
|
||||
Poster.getPoster().dispatchEvent(new GuildForceChangeEvent(user.getId(),user.getPlayerInfoManager().getGuildId(),3,0-user.getPlayerInfoManager().getMaxForce()));
|
||||
Poster.getPoster().dispatchEvent(new GuildForceChangeEvent(user.getId(),user.getPlayerInfoManager().getGuildId(),3, -user.getPlayerInfoManager().getMaxForce()));
|
||||
//notify ALL
|
||||
Family.GuildHelpInfoIndication.Builder build = Family.GuildHelpInfoIndication.newBuilder();
|
||||
for (Map.Entry<Integer, Integer> entry : user.getGuildMyInfo().getGuidHelpInfo().entrySet()) {
|
||||
|
|
@ -1757,9 +1753,7 @@ public class GuildLogic {
|
|||
private static Map<Integer,Integer> clearRedPacketMap(User user){
|
||||
Map<Integer,Integer> map = user.getPlayerInfoManager().getWelfareRedPackets();
|
||||
for(Map.Entry<Integer,Integer> entry : map.entrySet()){
|
||||
if(entry.getValue().intValue() == -1){
|
||||
continue;
|
||||
}else{
|
||||
if(entry.getValue() != -1){
|
||||
entry.setValue(0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,8 +32,7 @@ public class ForceCurrRank extends AbstractRank implements IEventHandler{
|
|||
|
||||
@Override
|
||||
public long[] getDataByScore(Double score) {
|
||||
int i = score.intValue();
|
||||
return new long[]{i%10_000_000};
|
||||
return new long[]{score.longValue()};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in New Issue