back_recharge
xuexinpeng 2021-10-16 18:04:49 +08:00
parent 06c60f4d0a
commit 659a88a932
3 changed files with 32 additions and 2 deletions

View File

@ -87,6 +87,8 @@ public class CrossYuxulundaoGetInfoHandler extends BaseHandler<ArenaInfoProto.Cr
MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.CrossYuXuLunDaoGetInfoResponse.getNumber(), builder.build(), true); MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.CrossYuXuLunDaoGetInfoResponse.getNumber(), builder.build(), true);
return; return;
} }
boolean newSeason = false;//新赛季
int newSeasonBefore = 0;//新赛季重置之前的老积分
if (yuxulundaoTime >= timeControllerOfFunction.getStartTime() && yuxulundaoTime <= timeControllerOfFunction.getEndTime()) { if (yuxulundaoTime >= timeControllerOfFunction.getStartTime() && yuxulundaoTime <= timeControllerOfFunction.getEndTime()) {
builder.setIsFirst(false); builder.setIsFirst(false);
} else { } else {
@ -113,6 +115,8 @@ public class CrossYuxulundaoGetInfoHandler extends BaseHandler<ArenaInfoProto.Cr
builder.setIsFirst(true); builder.setIsFirst(true);
arenaManager.setCrossYuxulundaoFirst(System.currentTimeMillis()); arenaManager.setCrossYuxulundaoFirst(System.currentTimeMillis());
//重置段位发奖 //重置段位发奖
newSeason = true;
newSeasonBefore = csPlayer.getCrossYuxulundaoNewScore();
int id = SMServerRankConfig.getIdByScore(csPlayer.getCrossYuxulundaoNewScore()); int id = SMServerRankConfig.getIdByScore(csPlayer.getCrossYuxulundaoNewScore());
if (SMServerRankConfig.serverRankConfig.containsKey(id)) { if (SMServerRankConfig.serverRankConfig.containsKey(id)) {
SMServerRankConfig serverRankConfig = SMServerRankConfig.serverRankConfig.get(id); SMServerRankConfig serverRankConfig = SMServerRankConfig.serverRankConfig.get(id);
@ -156,7 +160,11 @@ public class CrossYuxulundaoGetInfoHandler extends BaseHandler<ArenaInfoProto.Cr
isNeedUpdate = true; isNeedUpdate = true;
} }
} }
if(newSeason){
builder.setOldMyscore(newSeasonBefore);
}else{
builder.setOldMyscore(oldScore); builder.setOldMyscore(oldScore);
}
builder.setNewMyscore(newScore); builder.setNewMyscore(newScore);
if (oldScore != newScore) { if (oldScore != newScore) {
csPlayer.setCrossYuxulundaoOldScore(newScore); csPlayer.setCrossYuxulundaoOldScore(newScore);

View File

@ -1242,7 +1242,7 @@ public class PlayerLogic {
})); }));
for(String equipId : hero.getJewelInfo()){ for(String equipId : hero.getJewelInfo()){
heroBuilder.addJewels(equipId); heroBuilder.addJewels(equipId);
builder.addEquip(CBean2Proto.getEquipProto(jewels.get(equipId))); builder.addEquip(CBean2Proto.getEquipProtoyx(jewels.get(equipId),user));
} }
// 装备 // 装备
for(int equipId : hero.getEquipByPositionMap().values()){ for(int equipId : hero.getEquipByPositionMap().values()){

View File

@ -460,6 +460,28 @@ public class CBean2Proto {
} }
return equipProto.build(); return equipProto.build();
} }
public static CommonProto.Equip getEquipProtoyx(PropertyItem equip,User user){
//前端读表
// Map<Integer, Integer> propertyValueByIdMap = equip.getPropertyValueByIdMap();
Map<Integer, Long> secondValueByIdMap = equip.getSecondValueByIdMap();
CommonProto.Equip.Builder equipProto =CommonProto.Equip.newBuilder()
.setEquipId(equip.getEquipId())
.setId(equip.getId())
.setCreateTime(equip.getCreateTime())
.setIsLocked(equip.getIsLocked());
if(equip instanceof Equip){
Equip tempEquip =(Equip)equip;
equipProto .addAllSecondAttribute(parseFromMap(secondValueByIdMap))
.setRebuildLevel(tempEquip.getRebuildLevel())
.setSkillId(tempEquip.getSkill());
}
if(equip instanceof Jewel){
Jewel tempEquip =(Jewel)equip;
equipProto.setRebuildLevel(tempEquip.getBuildLevel())
.setExp(tempEquip.getLevel()).setTreeLv(user.getPlayerInfoManager().getTreeLevel());
}
return equipProto.build();
}
//玉虚论道 //玉虚论道
public static CommonProto.Equip getEquipProto(com.ljsd.jieling.thrift.idl.PropertyItem equip,int treeLv){ public static CommonProto.Equip getEquipProto(com.ljsd.jieling.thrift.idl.PropertyItem equip,int treeLv){