Merge branch 'master_test_hw' of http://60.1.1.230/backend/jieling_server into master_test_hw

back_recharge
duhui 2021-01-14 14:11:37 +08:00
commit 53970cef1a
3 changed files with 24 additions and 26 deletions

View File

@ -104,7 +104,7 @@ public class ExpeditionLogic {
manager.clearHeroToTemp(); manager.clearHeroToTemp();
manager.getHeroMap().clear(); manager.getHeroMap().clear();
manager.clearEquipToTemp(); manager.clearEquipToTemp();
// manager.clearEquip(); manager.clearEquip();//删除多余装备
manager.getEffectItems().clear(); manager.getEffectItems().clear();
manager.setFreshTime((int)(openTimeOfFuntionCacheByType.getStartTime()/1000)); manager.setFreshTime((int)(openTimeOfFuntionCacheByType.getStartTime()/1000));
SGlobalSystemConfig sGlobalSystemConfig = STableManager.getConfig(SGlobalSystemConfig.class).get(FunctionIdEnum.Expedition.getFunctionType()); SGlobalSystemConfig sGlobalSystemConfig = STableManager.getConfig(SGlobalSystemConfig.class).get(FunctionIdEnum.Expedition.getFunctionType());

View File

@ -454,12 +454,12 @@ public class GuildLogic {
GuilidManager.removeOneApplyGuildInfos(guildApply.getGuildId(),guildApply.getId()); GuilidManager.removeOneApplyGuildInfos(guildApply.getGuildId(),guildApply.getId());
continue; continue;
} }
int id = guildApply.getId(); // int id = guildApply.getId();
User userApply = UserManager.getUser(id); // User userApply = UserManager.getUser(id);
if(userApply.getPlayerInfoManager().getGuildId()!=0){ // if(userApply.getPlayerInfoManager().getGuildId()!=0){
GuilidManager.removeOneApplyGuildInfos(guildId,id); // GuilidManager.removeOneApplyGuildInfos(guildId,id);
continue; // continue;
} // }
guildApplies.add(guildApply); guildApplies.add(guildApply);
} }
@ -513,27 +513,25 @@ public class GuildLogic {
throw new ErrorCodeException(ErrorCode.FAMILY_MAXFULL); throw new ErrorCodeException(ErrorCode.FAMILY_MAXFULL);
} }
boolean memberGuild = false; boolean memberGuild = false;
for(Integer addUid : applyGuild.keySet()){ for(Map.Entry<Integer, GuildApply> entry:applyGuild.entrySet()){
if(UserManager.getUser(addUid).getPlayerInfoManager().getGuildId()!=0){ if(UserManager.getUser(entry.getKey()).getPlayerInfoManager().getGuildId()!=0){
memberGuild = true; memberGuild = true;
continue; continue;
} }
if(30-count<=0){ if(30-count<=0){
break; break;
} }
applyToJoin(guildInfo,addUid,true); applyToJoin(guildInfo,entry.getKey(),true);
GuilidManager.removeOneApplyGuildInfos(entry.getValue().getGuildId(),entry.getValue().getId());
// Map<Integer, GuildApply> applyPersonal = GuilidManager.getApplyGuildInfos(entry.getValue().getId(), 1);
// for(Map.Entry<Integer, GuildApply> personalEntry:applyPersonal.entrySet()) {
// GuilidManager.removeOneApplyGuildInfos(personalEntry.getValue().getGuildId(),personalEntry.getValue().getId());
// }
count++; count++;
} }
if(memberGuild){ if(memberGuild){
throw new ErrorCodeException(ErrorCode.FAMILY_SOMEONE_QUIT); throw new ErrorCodeException(ErrorCode.FAMILY_SOMEONE_QUIT);
} }
for(Map.Entry<Integer, GuildApply> entry:applyGuild.entrySet()){
GuilidManager.removeOneApplyGuildInfos(entry.getValue().getGuildId(),entry.getValue().getId());
Map<Integer, GuildApply> applyPersonal = GuilidManager.getApplyGuildInfos(entry.getValue().getId(), 1);
for(Map.Entry<Integer, GuildApply> personalEntry:applyPersonal.entrySet()) {
GuilidManager.removeOneApplyGuildInfos(personalEntry.getValue().getGuildId(),personalEntry.getValue().getId());
}
}
break; break;
case 2: //全部拒绝 case 2: //全部拒绝
Family.RefuseJoinFamily refuse = Family.RefuseJoinFamily.newBuilder().setName(guildInfo.getName()).build(); Family.RefuseJoinFamily refuse = Family.RefuseJoinFamily.newBuilder().setName(guildInfo.getName()).build();
@ -546,16 +544,16 @@ public class GuildLogic {
break; break;
case 3: //同意一个 case 3: //同意一个
if(UserManager.getUser(applyId).getPlayerInfoManager().getGuildId()!=0){ if(UserManager.getUser(applyId).getPlayerInfoManager().getGuildId()!=0){
throw new ErrorCodeException(ErrorCode.FAMILY_SOMEONE_QUIT); throw new ErrorCodeException(ErrorCode.FAMILY_IN_OTHER);
} }
if(guildInfo.getTotalMembers()>=STableManager.getConfig(SGuildLevelConfig.class).get(guildInfo.getLevel()).getNum()){ if(guildInfo.getTotalMembers()>=STableManager.getConfig(SGuildLevelConfig.class).get(guildInfo.getLevel()).getNum()){
throw new ErrorCodeException(ErrorCode.FAMILY_MAX); throw new ErrorCodeException(ErrorCode.FAMILY_MAX);
} }
applyToJoin(guildInfo,applyId,true); applyToJoin(guildInfo,applyId,true);
Map<Integer, GuildApply> applyPersonal = GuilidManager.getApplyGuildInfos(applyId, 1); GuilidManager.removeOneApplyGuildInfos(guildInfo.getId(),user.getId());
for(Map.Entry<Integer, GuildApply> personalEntry:applyPersonal.entrySet()) { // Map<Integer, GuildApply> applyPersonal = GuilidManager.getApplyGuildInfos(applyId, 1);
GuilidManager.removeOneApplyGuildInfos(personalEntry.getValue().getGuildId(),personalEntry.getValue().getId()); // for(Map.Entry<Integer, GuildApply> personalEntry:applyPersonal.entrySet()) {
} // }
break; break;
case 4: //拒绝一个 case 4: //拒绝一个
GuilidManager.removeOneApplyGuildInfos(guildId,applyId); GuilidManager.removeOneApplyGuildInfos(guildId,applyId);

View File

@ -267,15 +267,15 @@ public class ItemLogic {
} }
int[][] costItemArr = StringUtil.parseFiledInt2(cost.toString()); int[][] costItemArr = StringUtil.parseFiledInt2(cost.toString());
boolean result = ItemUtil.itemCost(user, costItemArr, BIReason.USER_ITEM, 0);
if (!result) {
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
}
Map<Integer, Integer> mapRe = ItemUtil.getMapRe(itemId, itemMap, cardMap, equipMap, randomMap, itemObj); Map<Integer, Integer> mapRe = ItemUtil.getMapRe(itemId, itemMap, cardMap, equipMap, randomMap, itemObj);
if (!mapRe.containsKey(itemId)) { if (!mapRe.containsKey(itemId)) {
throw new ErrorCodeException(ErrorCode.SERVER_DEFINE); throw new ErrorCodeException(ErrorCode.SERVER_DEFINE);
} }
boolean result = ItemUtil.itemCost(user, costItemArr, BIReason.USER_ITEM, 0);
if (!result) {
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
}
//drop //drop
int[][] dropItems = new int[1][]; int[][] dropItems = new int[1][];