Merge branch 'master_test_hw' of http://60.1.1.230/backend/jieling_server into master_test_hw
commit
53970cef1a
|
@ -104,7 +104,7 @@ public class ExpeditionLogic {
|
|||
manager.clearHeroToTemp();
|
||||
manager.getHeroMap().clear();
|
||||
manager.clearEquipToTemp();
|
||||
// manager.clearEquip();
|
||||
manager.clearEquip();//删除多余装备
|
||||
manager.getEffectItems().clear();
|
||||
manager.setFreshTime((int)(openTimeOfFuntionCacheByType.getStartTime()/1000));
|
||||
SGlobalSystemConfig sGlobalSystemConfig = STableManager.getConfig(SGlobalSystemConfig.class).get(FunctionIdEnum.Expedition.getFunctionType());
|
||||
|
|
|
@ -454,12 +454,12 @@ public class GuildLogic {
|
|||
GuilidManager.removeOneApplyGuildInfos(guildApply.getGuildId(),guildApply.getId());
|
||||
continue;
|
||||
}
|
||||
int id = guildApply.getId();
|
||||
User userApply = UserManager.getUser(id);
|
||||
if(userApply.getPlayerInfoManager().getGuildId()!=0){
|
||||
GuilidManager.removeOneApplyGuildInfos(guildId,id);
|
||||
continue;
|
||||
}
|
||||
// int id = guildApply.getId();
|
||||
// User userApply = UserManager.getUser(id);
|
||||
// if(userApply.getPlayerInfoManager().getGuildId()!=0){
|
||||
// GuilidManager.removeOneApplyGuildInfos(guildId,id);
|
||||
// continue;
|
||||
// }
|
||||
|
||||
guildApplies.add(guildApply);
|
||||
}
|
||||
|
@ -513,27 +513,25 @@ public class GuildLogic {
|
|||
throw new ErrorCodeException(ErrorCode.FAMILY_MAXFULL);
|
||||
}
|
||||
boolean memberGuild = false;
|
||||
for(Integer addUid : applyGuild.keySet()){
|
||||
if(UserManager.getUser(addUid).getPlayerInfoManager().getGuildId()!=0){
|
||||
for(Map.Entry<Integer, GuildApply> entry:applyGuild.entrySet()){
|
||||
if(UserManager.getUser(entry.getKey()).getPlayerInfoManager().getGuildId()!=0){
|
||||
memberGuild = true;
|
||||
continue;
|
||||
}
|
||||
if(30-count<=0){
|
||||
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++;
|
||||
}
|
||||
if(memberGuild){
|
||||
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;
|
||||
case 2: //全部拒绝
|
||||
Family.RefuseJoinFamily refuse = Family.RefuseJoinFamily.newBuilder().setName(guildInfo.getName()).build();
|
||||
|
@ -546,16 +544,16 @@ public class GuildLogic {
|
|||
break;
|
||||
case 3: //同意一个
|
||||
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()){
|
||||
throw new ErrorCodeException(ErrorCode.FAMILY_MAX);
|
||||
}
|
||||
applyToJoin(guildInfo,applyId,true);
|
||||
Map<Integer, GuildApply> applyPersonal = GuilidManager.getApplyGuildInfos(applyId, 1);
|
||||
for(Map.Entry<Integer, GuildApply> personalEntry:applyPersonal.entrySet()) {
|
||||
GuilidManager.removeOneApplyGuildInfos(personalEntry.getValue().getGuildId(),personalEntry.getValue().getId());
|
||||
}
|
||||
GuilidManager.removeOneApplyGuildInfos(guildInfo.getId(),user.getId());
|
||||
// Map<Integer, GuildApply> applyPersonal = GuilidManager.getApplyGuildInfos(applyId, 1);
|
||||
// for(Map.Entry<Integer, GuildApply> personalEntry:applyPersonal.entrySet()) {
|
||||
// }
|
||||
break;
|
||||
case 4: //拒绝一个
|
||||
GuilidManager.removeOneApplyGuildInfos(guildId,applyId);
|
||||
|
|
|
@ -267,15 +267,15 @@ public class ItemLogic {
|
|||
}
|
||||
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);
|
||||
if (!mapRe.containsKey(itemId)) {
|
||||
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
|
||||
int[][] dropItems = new int[1][];
|
||||
|
|
Loading…
Reference in New Issue