福利红包
parent
cf5f93ec7d
commit
5a88bd3ebb
|
@ -1185,7 +1185,7 @@ public class GuildLogic {
|
|||
if(redPacket.getRuleType() != 1){
|
||||
map.put(redId,-1);
|
||||
if(redPacket.getRuleType() == 3){
|
||||
openNext(map,redPacket.getGroupId(),redId);
|
||||
openNext(map,redPacket.getRuleId()[0],redId);
|
||||
}
|
||||
}else{
|
||||
map.put(redId,old-1);
|
||||
|
@ -1247,7 +1247,7 @@ public class GuildLogic {
|
|||
}
|
||||
break;
|
||||
case 3:
|
||||
List<SGuildRedPackConfig> serise = SGuildRedPackConfig.welfareRedPackBySerise.get(config.getGroupId());
|
||||
List<SGuildRedPackConfig> serise = SGuildRedPackConfig.welfareRedPackBySerise.get(config.getRuleId()[0]);
|
||||
serise.stream().sorted((v1,v2)->{
|
||||
if(v1.getId()>v2.getId()){
|
||||
return -1;
|
||||
|
@ -1315,7 +1315,7 @@ public class GuildLogic {
|
|||
if(config.getRuleType() == 3){
|
||||
if(config.getGroupId() == 2){
|
||||
int num = user.getMapManager().getLastMonsterAttack();
|
||||
for(SGuildRedPackConfig config1 : SGuildRedPackConfig.welfareRedPackBySerise.get(config.getGroupId())){
|
||||
for(SGuildRedPackConfig config1 : SGuildRedPackConfig.welfareRedPackBySerise.get(config.getRuleId()[0])){
|
||||
if(num >= config1.getRuleId()[1]){
|
||||
redPacketsMap.put(config.getId(),1);
|
||||
}else{
|
||||
|
@ -1324,7 +1324,7 @@ public class GuildLogic {
|
|||
}
|
||||
}
|
||||
}else{
|
||||
if(config.getId()==SGuildRedPackConfig.welfareRedPackBySerise.get(config.getGroupId()).get(0).getId())
|
||||
if(config.getId()==SGuildRedPackConfig.welfareRedPackBySerise.get(config.getRuleId()[0]).get(0).getId())
|
||||
redPacketsMap.put(config.getId(),0);
|
||||
}
|
||||
}else{
|
||||
|
|
|
@ -23,7 +23,7 @@ public class WelfareRedPackSendHandler implements IEventHandler {
|
|||
SGuildRedPackConfig sGuildRedPackConfig = SGuildRedPackConfig.sWelfareRedPackByRule.get(directEvent.getType());
|
||||
if(sGuildRedPackConfig.getRuleType() == 3){
|
||||
boolean f = false;
|
||||
for(SGuildRedPackConfig config : SGuildRedPackConfig.welfareRedPackBySerise.get(sGuildRedPackConfig.getGroupId())){
|
||||
for(SGuildRedPackConfig config : SGuildRedPackConfig.welfareRedPackBySerise.get(sGuildRedPackConfig.getRuleId()[0])){
|
||||
if(config.getRuleId()[1] == directEvent.getNum()){
|
||||
sGuildRedPackConfig = config;
|
||||
f=true;
|
||||
|
|
|
@ -70,12 +70,12 @@ public class SGuildRedPackConfig implements BaseConfig {
|
|||
sWelfareRedPackByRule.put(entry.getValue().getRuleId()[0],entry.getValue());
|
||||
}
|
||||
if(entry.getValue().getRuleType() == 3){
|
||||
if(welfareRedPackBySerise.containsKey(entry.getValue().getGroupId())){
|
||||
welfareRedPackBySerise.get(entry.getValue().getGroupId()).add(entry.getValue());
|
||||
if(welfareRedPackBySerise.containsKey(entry.getValue().getRuleId()[0])){
|
||||
welfareRedPackBySerise.get(entry.getValue().getRuleId()[0]).add(entry.getValue());
|
||||
}else{
|
||||
List<SGuildRedPackConfig> list = new ArrayList<>();
|
||||
list.add(entry.getValue());
|
||||
welfareRedPackBySerise.put(entry.getValue().getGroupId(),list);
|
||||
welfareRedPackBySerise.put(entry.getValue().getRuleId()[0],list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue