建木神树二版,bug修改,添加注释
parent
ad8641f96c
commit
fe8bc9ec57
|
@ -5,6 +5,8 @@ import com.ljsd.jieling.exception.ErrorCode;
|
|||
import com.ljsd.jieling.exception.ErrorCodeException;
|
||||
import com.ljsd.jieling.globals.BIReason;
|
||||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||
import com.ljsd.jieling.logic.activity.event.UserMainTeamForceEvent;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.item.ItemLogic;
|
||||
|
@ -15,6 +17,11 @@ import config.SGodHoodTreeLevel;
|
|||
import manager.STableManager;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/***
|
||||
* 升级建木神树
|
||||
* @author hj
|
||||
* @date 2020-12-14
|
||||
*/
|
||||
@Component
|
||||
public class UpgradeGodTreeHandler extends BaseHandler<ActivityProto.UpgradeGodTreeRequest> {
|
||||
@Override
|
||||
|
@ -59,6 +66,9 @@ public class UpgradeGodTreeHandler extends BaseHandler<ActivityProto.UpgradeGodT
|
|||
// 神树升级
|
||||
user.getPlayerInfoManager().addTreeLevel(1);
|
||||
|
||||
// 阵容战力改变
|
||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(uid));
|
||||
|
||||
return ActivityProto.UpgradeGodTreeResponse.newBuilder().build();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1671,7 +1671,7 @@ public class HeroLogic{
|
|||
if (openGodTree) {
|
||||
// 获取神应等级
|
||||
int level = user.getPlayerInfoManager().getTreeLevel() >= config.getGodHoodMaxlv() ? config.getGodHoodMaxlv() : user.getPlayerInfoManager().getTreeLevel();
|
||||
|
||||
// 获取加成属性
|
||||
property = ItemLogic.getInstance().godTreeAdditon(user, godTreePoolMap, level);
|
||||
combinedAttribute(property, heroAllAttribute);
|
||||
}
|
||||
|
|
|
@ -903,11 +903,11 @@ public class ItemLogic {
|
|||
//人族层数
|
||||
int people = 10;
|
||||
//妖族层数
|
||||
int monster = 20;
|
||||
int monster = 0;
|
||||
//佛教层数
|
||||
int monk = 31;
|
||||
int monk = 0;
|
||||
//道教层数
|
||||
int mage = 8;
|
||||
int mage = 0;
|
||||
// 总层数
|
||||
int count = people + monster + monk + mage;
|
||||
// 解锁条数
|
||||
|
@ -926,7 +926,7 @@ public class ItemLogic {
|
|||
// 读取配置表获取属性
|
||||
int[][] property = godTreePoolMap.get(3).get(level).getProperty();
|
||||
// 初始化数组,长度为上面循环获得
|
||||
int[][] result = new int[tier][];
|
||||
int[][] result = new int[tier][2];
|
||||
// 两层循环,根据解锁的条数重新赋值到新的二维数组
|
||||
for (int i = 0; i < tier; i++) {
|
||||
for (int j = 0; j < property[i].length; j++) {
|
||||
|
|
Loading…
Reference in New Issue