数数打点修改

back_recharge
lvxinran 2020-11-20 15:26:40 +08:00
parent 3d6da1905c
commit 1cd25bedf6
4 changed files with 31 additions and 10 deletions

View File

@ -98,7 +98,7 @@ public class ComplexEquipHandler extends BaseHandler<HeroInfoProto.ComplexEquipR
HeroInfoProto.ComplexEquipResponse.Builder response = HeroInfoProto.ComplexEquipResponse.newBuilder();
response.setDrop(drop);
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.EQUIP_COMPLEX_RESPONSE_VALUE, response.build(), true);
ReportUtil.onReportEvent(user, ReportEventEnum.EQUIP_SYNTHESIS.getType(),targetEquip,proto.getNum(),new ArrayList<>(consumeMap.keySet()),new ArrayList<>(consumeMap.values()));
ReportUtil.onReportEvent(user, ReportEventEnum.EQUIP_SYNTHESIS.getType(),targetEquip+"-"+proto.getNum(),new ArrayList<>(consumeMap.keySet()),new ArrayList<>(consumeMap.values()));
} else {
@ -185,18 +185,24 @@ public class ComplexEquipHandler extends BaseHandler<HeroInfoProto.ComplexEquipR
int[][] createArray = new int[countMap.size()][];
int index = 0 ;
int totalCreate = 0;
StringBuilder builder = new StringBuilder();
for(Map.Entry<Integer, Integer> createEntry:countMap.entrySet()){
createArray[index] = new int[]{createEntry.getKey(),createEntry.getValue()};
index++;
totalCreate += createEntry.getValue();
if(builder.length()>1){
builder.append("|");
}
builder.append(createEntry.getKey()).append("-").append(createEntry.getValue());
}
ItemUtil.itemCost(user, consumeMap, BIReason.COMPLEX_EQUIP_CONSUME, 0);
CommonProto.Drop.Builder drop = ItemUtil.drop(user,createArray,BIReason.COMPLEX_EQUIP);
user.getUserMissionManager().onGameEvent(user, GameEvent.WORKSHOP_CREATE_EQUIP, totalCreate);
HeroInfoProto.ComplexEquipResponse.Builder response = HeroInfoProto.ComplexEquipResponse.newBuilder();
response.setDrop(drop);
ReportUtil.onReportEvent(user, ReportEventEnum.EQUIP_SYNTHESIS.getType(),new ArrayList<>(countMap.keySet()),"",new ArrayList<>(consumeMap.keySet()),new ArrayList<>(consumeMap.values()));
ReportUtil.onReportEvent(user, ReportEventEnum.EQUIP_SYNTHESIS.getType(),builder.toString(),new ArrayList<>(consumeMap.keySet()),new ArrayList<>(consumeMap.values()));
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.EQUIP_COMPLEX_RESPONSE_VALUE, response.build(), true);
}
}

View File

@ -8,7 +8,9 @@ import com.ljsd.jieling.globals.BIReason;
import com.ljsd.jieling.handler.BaseHandler;
import com.ljsd.jieling.ktbeans.ReportEventEnum;
import com.ljsd.jieling.ktbeans.ReportUtil;
import com.ljsd.jieling.logic.dao.EquipManager;
import com.ljsd.jieling.logic.dao.Jewel;
import com.ljsd.jieling.logic.dao.PropertyItem;
import com.ljsd.jieling.logic.dao.UserManager;
import com.ljsd.jieling.logic.dao.root.User;
import com.ljsd.jieling.logic.hero.HeroLogic;
@ -111,12 +113,15 @@ public class ComplexJewelEquipRequestHandler extends BaseHandler<HeroInfoProto.C
break;
}
response.addEquipIds(id);
user.getEquipManager().remove(id);
EquipManager equipManager = user.getEquipManager();
PropertyItem propertyItem = equipManager.getEquipMap().get(id);
consumeMap.put(propertyItem.getEquipId(),consumeMap.getOrDefault(propertyItem.getEquipId(),0)+1);
equipManager.remove(id);
i++;
}
response.setDrop(drop);
MessageUtil.sendIndicationMessage(user.getId(), response.build());
ReportUtil.onReportEvent(user, ReportEventEnum.TREASURE_SYNTHESIS.getType(),targetEquip,proto.getNum(),new ArrayList<>(consumeMap.keySet()),new ArrayList<>(consumeMap.values()));
ReportUtil.onReportEvent(user, ReportEventEnum.TREASURE_SYNTHESIS.getType(),targetEquip+"-"+proto.getNum(),new ArrayList<>(consumeMap.keySet()),new ArrayList<>(consumeMap.values()));
} else {
@ -205,10 +210,20 @@ public class ComplexJewelEquipRequestHandler extends BaseHandler<HeroInfoProto.C
i++;
}
}
Map<Integer,Integer> reward = new HashMap<>();
for (String id:newids) {
equips.add(CBean2Proto.getEquipProto( user.getEquipManager().getEquipMap().get(id)));
CommonProto.Equip equipProto = CBean2Proto.getEquipProto(user.getEquipManager().getEquipMap().get(id));
reward.put(equipProto.getEquipId(),reward.getOrDefault(equipProto.getEquipId(),0)+1);
equips.add(equipProto);
}
ReportUtil.onReportEvent(user, ReportEventEnum.TREASURE_SYNTHESIS.getType(),new ArrayList<>(consumeMap.keySet()),new ArrayList<>(consumeMap.values()),new ArrayList<>(consumeMap.keySet()),new ArrayList<>(consumeMap.values()));
StringBuilder builder = new StringBuilder();
for(Map.Entry<Integer,Integer> entry:reward.entrySet()){
if(builder.length()>0){
builder.append("|");
}
builder.append(entry.getKey()).append("-").append(entry.getValue());
}
ReportUtil.onReportEvent(user, ReportEventEnum.TREASURE_SYNTHESIS.getType(),builder.toString(),new ArrayList<>(consumeMap.values()),new ArrayList<>(consumeMap.keySet()),new ArrayList<>(consumeMap.values()));
ItemUtil.itemCost(user, consumeMap, BIReason.COMPLEX_EQUIP_CONSUME, 0);
}

View File

@ -58,9 +58,9 @@ public enum ReportEventEnum {
COMPLETE_PANOPTIC_MIRROR(42,"complete_panoptic_mirror", new CommonEventHandler(),new String[]{"Panoptic_Mirror_id"}),
EQUIP_SYNTHESIS(43,"equip_synthesis", new CommonEventHandler(),new String[]{"item_id","item_name","cost_item_id","cost_amount"}),
EQUIP_SYNTHESIS(43,"equip_synthesis", new CommonEventHandler(),new String[]{"item_id_num","cost_item_id","cost_items_amount"}),
TREASURE_SYNTHESIS(44,"treasure_synthesis", new CommonEventHandler(),new String[]{"item_id","item_name","cost_item_id","cost_amount"}),
TREASURE_SYNTHESIS(44,"treasure_synthesis", new CommonEventHandler(),new String[]{"item_id_num","cost_item_id","cost_amount"}),
FATALITY_SYNTHESIS(45,"fatality_synthesis", new CommonEventHandler(),new String[]{"item_id","item_name","cost_item_id"}),
NORMAL_SUMMON(46,"Normal_summon", new CommonEventHandler(),new String[]{"hero_id","summon_type","cost_item_id","cost_amount","hero_id_quality_list"}),
@ -83,7 +83,7 @@ public enum ReportEventEnum {
TIME_SUMMON(56,"Time_summon",new CommonEventHandler(),new String[]{"hero_id","summon_type","cost_item_id","cost_amount","hero_id_quality_list"}),
FATALITY_SUMMON(57,"fatality_summon",new CommonEventHandler(),new String[]{"hero_id","summon_type","cost_item_id","cost_amount","hero_id_quality_list"}),
GET_BEAST(58,"get_beast",new CommonEventHandler(),new String[]{"beast_id","quality","get_type"}),
BEAST_LEVEL(59,"beast_level",new CommonEventHandler(),new String[]{"beast_id","old_level","new_level","cost_item_list"}),
BEAST_LEVEL(59,"beast_level",new CommonEventHandler(),new String[]{"beast_id","old_level","new_level","cost_item_list_info"}),
BEAST_STAR(60,"beast_star",new CommonEventHandler(),new String[]{"beast_id","old_star","new_star","cost_item_list","cost_beast_list"}),
BEAST_SUMMON(61,"beast_summon",new CommonEventHandler(),new String[]{"beast_id","summon_type","new_star","cost_item_id","reward_nums_list"}),

View File

@ -3224,7 +3224,7 @@ public class HeroLogic{
if(consumeBuilder.length()>0){
consumeBuilder.append("|");
}
consumeBuilder.append(pokemon.getTmpId()).append("-").append(pokemon.getLevel());
consumeBuilder.append(consumePokemon.getTmpId()).append("-").append(1);
}
int[][] consumeRes = config.getConsumeRes();