法宝等级限制,46行为修改
parent
7be649a804
commit
52a27ee882
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue