back_recharge
zhangshanxue 2019-09-09 12:00:11 +08:00
commit 9e8cec3727
4 changed files with 14 additions and 3 deletions

View File

@ -106,6 +106,8 @@ public class SGameSetting implements BaseConfig {
private int adventureItem;
private int[] equipTalismanaUnlock;
private static SGameSetting gameSetting;
@ -313,4 +315,8 @@ public class SGameSetting implements BaseConfig {
public int getAdventureItem() {
return adventureItem;
}
public int[] getEquipTalismanaUnlock() {
return equipTalismanaUnlock;
}
}

View File

@ -1293,7 +1293,7 @@ public class MapLogic {
Map<Integer, Integer> heroAllAttribute = HeroLogic.getInstance().calHeroNotBufferAttribute(user, hero,false,teamId);
int per = (int)(checkResult[i+2] / (double) heroAllAttribute.get(HeroAttributeEnum.Hp.getPropertyId())*10000);
mapManager.updateEndlessHeroHp(team.get(i).getHeroId(),per);
if(heroAllAttribute.get(HeroAttributeEnum.CurHP.getPropertyId())==0){
if(mapManager.getHeroAllAttributeMap().get(hero.getId()).get(HeroAttributeEnum.CurHP.getPropertyId())==0){
mapManager.removeOneHeroAttribute(hero.getId());
}else{
mapManager.updateHeroOneAttribute(team.get(i).getHeroId(), HeroAttributeEnum.CurHP.getPropertyId(), checkResult[i+2]);
@ -1543,7 +1543,7 @@ public class MapLogic {
Map<Integer, Integer> heroAllAttribute = HeroLogic.getInstance().calHeroNotBufferAttribute(user, hero,false,teamId);
int per =(int) (checkResult[i+2] / (double) heroAllAttribute.get(HeroAttributeEnum.Hp.getPropertyId())*10000);
mapManager.updateEndlessHeroHp(team.get(i).getHeroId(),per);
if(heroAllAttribute.get(HeroAttributeEnum.CurHP.getPropertyId())==0){
if(mapManager.getHeroAllAttributeMap().get(hero.getId()).get(HeroAttributeEnum.CurHP.getPropertyId())==0){
mapManager.removeOneHeroAttribute(hero.getId());
}else{
mapManager.updateHeroOneAttribute(team.get(i).getHeroId(), HeroAttributeEnum.CurHP.getPropertyId(), checkResult[i+2]);

View File

@ -15,7 +15,7 @@ public class FourtySixBehavior extends BaseBehavior {
@Override
public boolean process(int optionId, User user, int[][] behaviorTypeValues, MapInfoProto.EventUpdateResponse.Builder eventUpdateResponse) throws Exception {
BehaviorUtil.destoryPoints(user,new int[]{user.getMapManager().getCurXY()});
BehaviorUtil.destoryApointXY(user,user.getMapManager().getCurXY());
return true;
}

View File

@ -1367,6 +1367,11 @@ public class HeroLogic {
if(equipIds.size()!=1){
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.EQUIP_WEAR_RESPONSE.getNumber(),"法宝智能穿戴一个");
}else{
int[] equipTalismanaUnlock = SGameSetting.getGameSetting().getEquipTalismanaUnlock();
if(user.getPlayerInfoManager().getLevel()<equipTalismanaUnlock[0]||hero.getLevel()<equipTalismanaUnlock[1]){
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.EQUIP_WEAR_RESPONSE.getNumber(),"玩家等级或妖灵师等级不够,无法装备!");
return;
}
hero.updateEspecial(equipIds.get(0));
}
}