yxbug
parent
06c60f4d0a
commit
659a88a932
|
@ -87,6 +87,8 @@ public class CrossYuxulundaoGetInfoHandler extends BaseHandler<ArenaInfoProto.Cr
|
|||
MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.CrossYuXuLunDaoGetInfoResponse.getNumber(), builder.build(), true);
|
||||
return;
|
||||
}
|
||||
boolean newSeason = false;//新赛季
|
||||
int newSeasonBefore = 0;//新赛季重置之前的老积分
|
||||
if (yuxulundaoTime >= timeControllerOfFunction.getStartTime() && yuxulundaoTime <= timeControllerOfFunction.getEndTime()) {
|
||||
builder.setIsFirst(false);
|
||||
} else {
|
||||
|
@ -113,6 +115,8 @@ public class CrossYuxulundaoGetInfoHandler extends BaseHandler<ArenaInfoProto.Cr
|
|||
builder.setIsFirst(true);
|
||||
arenaManager.setCrossYuxulundaoFirst(System.currentTimeMillis());
|
||||
//重置段位发奖
|
||||
newSeason = true;
|
||||
newSeasonBefore = csPlayer.getCrossYuxulundaoNewScore();
|
||||
int id = SMServerRankConfig.getIdByScore(csPlayer.getCrossYuxulundaoNewScore());
|
||||
if (SMServerRankConfig.serverRankConfig.containsKey(id)) {
|
||||
SMServerRankConfig serverRankConfig = SMServerRankConfig.serverRankConfig.get(id);
|
||||
|
@ -156,7 +160,11 @@ public class CrossYuxulundaoGetInfoHandler extends BaseHandler<ArenaInfoProto.Cr
|
|||
isNeedUpdate = true;
|
||||
}
|
||||
}
|
||||
builder.setOldMyscore(oldScore);
|
||||
if(newSeason){
|
||||
builder.setOldMyscore(newSeasonBefore);
|
||||
}else{
|
||||
builder.setOldMyscore(oldScore);
|
||||
}
|
||||
builder.setNewMyscore(newScore);
|
||||
if (oldScore != newScore) {
|
||||
csPlayer.setCrossYuxulundaoOldScore(newScore);
|
||||
|
|
|
@ -1242,7 +1242,7 @@ public class PlayerLogic {
|
|||
}));
|
||||
for(String equipId : hero.getJewelInfo()){
|
||||
heroBuilder.addJewels(equipId);
|
||||
builder.addEquip(CBean2Proto.getEquipProto(jewels.get(equipId)));
|
||||
builder.addEquip(CBean2Proto.getEquipProtoyx(jewels.get(equipId),user));
|
||||
}
|
||||
// 装备
|
||||
for(int equipId : hero.getEquipByPositionMap().values()){
|
||||
|
|
|
@ -460,6 +460,28 @@ public class CBean2Proto {
|
|||
}
|
||||
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){
|
||||
|
|
Loading…
Reference in New Issue