特训功能补充
parent
980635e41a
commit
0d7d840f20
|
@ -0,0 +1,23 @@
|
||||||
|
package com.ljsd.jieling.kefu;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.logic.dao.Hero;
|
||||||
|
import com.ljsd.jieling.logic.dao.Training;
|
||||||
|
import com.ljsd.jieling.logic.dao.root.User;
|
||||||
|
|
||||||
|
//training uid heroId lv
|
||||||
|
public class Cmd_training extends GmRoleAbstract {
|
||||||
|
@Override
|
||||||
|
public boolean exec(String[] args) throws Exception {
|
||||||
|
|
||||||
|
String heroId = args[0];
|
||||||
|
int lv = Integer.parseInt(args[1]);
|
||||||
|
|
||||||
|
User user = getUser();
|
||||||
|
Hero hero = user.getHeroManager().getHero(heroId);
|
||||||
|
Training training = hero.getTraining();
|
||||||
|
training.setLv(lv);
|
||||||
|
hero.setTraining(training);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
|
@ -656,6 +656,11 @@ public class EquipLogic {
|
||||||
}
|
}
|
||||||
num += config.getGift();
|
num += config.getGift();
|
||||||
}
|
}
|
||||||
|
// 特训增加的额外收集值
|
||||||
|
int maxHeroNum = TrainingLogic.getInstance().getTrainingMaxHeroNum(user);
|
||||||
|
int value = SSpecialConfig.getIntegerValue("Train_Gift_shouji");
|
||||||
|
num += (maxHeroNum * value);
|
||||||
|
|
||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -676,11 +681,6 @@ public class EquipLogic {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 特训额外增加的格子
|
|
||||||
int maxHeroNum = TrainingLogic.getInstance().getTrainingMaxHeroNum(user);
|
|
||||||
resultBox+=maxHeroNum;
|
|
||||||
|
|
||||||
return resultBox;
|
return resultBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -481,6 +481,15 @@ public class ItemLogic {
|
||||||
if (null != errorMags) {
|
if (null != errorMags) {
|
||||||
throw new ErrorCodeException(errorMags);
|
throw new ErrorCodeException(errorMags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (String id : heroIdsList) {
|
||||||
|
Hero hero = user.getHeroManager().getHero(id);
|
||||||
|
int maxLv = STrain.getMaxLv(hero.getTemplateId());
|
||||||
|
if (hero.getTraining().getLv() == maxLv){
|
||||||
|
throw new ErrorCodeException(ErrorCode.SERVER_DEFINE, "特训满级英雄无法分解");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CommonProto.Drop.Builder drop = HeroLogic.getInstance().disbandHeroDrop(user, heroIdsList, BIReason.DECOMPOS_HERO_REWARD);
|
CommonProto.Drop.Builder drop = HeroLogic.getInstance().disbandHeroDrop(user, heroIdsList, BIReason.DECOMPOS_HERO_REWARD);
|
||||||
for (String id : heroIdsList) {
|
for (String id : heroIdsList) {
|
||||||
// 删除英雄
|
// 删除英雄
|
||||||
|
|
Loading…
Reference in New Issue