Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
62e5c9314c
|
@ -181,7 +181,7 @@ local effectList = {
|
|||
caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, interval, target)
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
if target.roleData.professionId == i1 then
|
||||
f1 = f1 + f2
|
||||
f1 = f1*(1+f2)
|
||||
end
|
||||
BattleUtil.CalDamage(caster, target, dt, f1)
|
||||
end)
|
||||
|
@ -304,7 +304,7 @@ local effectList = {
|
|||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
local d, crit = BattleUtil.CalDamage(caster, target, dt, f1)
|
||||
if crit then
|
||||
target.sp = target.sp + floor(f2 * BattleLogic.GameFrameRate)
|
||||
caster:AddSkillCD(f2, 3)
|
||||
end
|
||||
end)
|
||||
end,
|
||||
|
@ -343,7 +343,7 @@ local effectList = {
|
|||
caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, interval, target)
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
if BattleLogic.BuffMgr:HasBuff(target, BuffName.Control, function (buff) return i1 == 0 or buff.ctrlType == i1 end) then
|
||||
f1 = f1 + f2
|
||||
f1 = f1*(1+f2)
|
||||
end
|
||||
BattleUtil.CalDamage(caster, target, dt, f1)
|
||||
end)
|
||||
|
@ -373,7 +373,7 @@ local effectList = {
|
|||
local f2 = args[4]
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff) return dot == 0 or buff.damageType == dot end) then
|
||||
f1 = f1 + f2
|
||||
f1 = f1*(1+f2)
|
||||
end
|
||||
BattleUtil.CalDamage(caster, target, dt, f1)
|
||||
end)
|
||||
|
@ -388,7 +388,7 @@ local effectList = {
|
|||
caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, interval, target)
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
if BattleLogic.BuffMgr:HasBuff(target, BuffName.HOT, function (buff) return true end) then
|
||||
f1 = f1 + f2
|
||||
f1 = f1*(1+f2)
|
||||
end
|
||||
BattleUtil.CalDamage(caster, target, dt, f1)
|
||||
end)
|
||||
|
@ -457,7 +457,7 @@ local effectList = {
|
|||
caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, interval, target)
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff) return dot == 0 or buff.damageType == dot end) then
|
||||
f1 = f1 + f2
|
||||
f1 = f1*(1+f2)
|
||||
end
|
||||
BattleUtil.CalDamage(caster, target, dt, f1)
|
||||
end)
|
||||
|
@ -479,7 +479,7 @@ local effectList = {
|
|||
caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, d, target)
|
||||
BattleLogic.WaitForTrigger(d, function ()
|
||||
if target.roleData.professionId == pt then
|
||||
f1 = f1 + f2
|
||||
f1 = f1*(1+f2)
|
||||
end
|
||||
BattleUtil.CalDamage(caster, target, dt, f1)
|
||||
end)
|
||||
|
@ -785,7 +785,7 @@ local effectList = {
|
|||
caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, interval, target)
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
if target.roleData.professionId == pt then
|
||||
BattleUtil.CalDamage(caster, target, dt, f1+f3, f2)
|
||||
BattleUtil.CalDamage(caster, target, dt, f1*(1+f3), f2)
|
||||
else
|
||||
BattleUtil.CalDamage(caster, target, dt, f1)
|
||||
end
|
||||
|
@ -1131,7 +1131,7 @@ local effectList = {
|
|||
end)
|
||||
|
||||
local OnPassiveDamaging = function(damagingFunc, defRole, damage)
|
||||
damagingFunc(-floor((1 + f2 * factor) * damage))
|
||||
damagingFunc(-floor(f2*factor*damage))
|
||||
end
|
||||
caster.Event:AddEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging)
|
||||
BattleUtil.CalDamage(caster, target, dt, f1)
|
||||
|
@ -1186,7 +1186,12 @@ local effectList = {
|
|||
end
|
||||
return b
|
||||
end) then
|
||||
BattleUtil.CalDamage(caster, target, dt,f1 + (1+layer)*f3)
|
||||
local OnPassiveDamaging = function(damagingFunc, defRole, damage)
|
||||
damagingFunc(-floor(f3*layer*damage))
|
||||
end
|
||||
caster.Event:AddEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging)
|
||||
BattleUtil.CalDamage(caster, target, dt, f1)
|
||||
caster.Event:RemoveEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging)
|
||||
else
|
||||
BattleUtil.CalDamage(caster, target, dt, f1)
|
||||
end
|
||||
|
@ -1252,7 +1257,7 @@ local effectList = {
|
|||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
local factor = 1 - BattleUtil.GetHPPencent(caster)
|
||||
local OnPassiveDamaging = function(damagingFunc, defRole, damage)
|
||||
damagingFunc(-floor((1 + f2 * factor) * damage))
|
||||
damagingFunc(-floor(f2*factor*damage))
|
||||
end
|
||||
caster.Event:AddEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging)
|
||||
BattleUtil.CalDamage(caster, target, dt, f1)
|
||||
|
@ -1312,11 +1317,13 @@ local effectList = {
|
|||
BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff)
|
||||
if buff.duration > 0 and buff.frameInterval > 0 then
|
||||
local remainFrame = buff.frameDuration - buff.framePass
|
||||
local remainCount = floor(remainFrame / buff.frameInterval)
|
||||
local remainCount = floor(remainFrame / buff.frameInterval)+1
|
||||
buff.disperse = true
|
||||
target.exCalDmgList:Add(function(damage) return damage * remainCount end)
|
||||
BattleUtil.CalDamage(buff.caster, buff.target, buff.damagePro, buff.damageFactor,0, true)
|
||||
target.exCalDmgList:Remove(target.exCalDmgList.size)
|
||||
if buff.caster and not buff.caster.isTeam then
|
||||
buff.caster.exCalDmgList:Add(function(damage) return damage * remainCount end)
|
||||
BattleUtil.CalDamage(buff.caster, buff.target, buff.damagePro, buff.damageFactor,0, true)
|
||||
buff.caster.exCalDmgList:Remove(buff.caster.exCalDmgList.size)
|
||||
end
|
||||
end
|
||||
return true
|
||||
end)
|
||||
|
@ -1365,7 +1372,7 @@ local effectList = {
|
|||
caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, interval, target)
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
if BattleLogic.BuffMgr:HasBuff(target, BuffName.Shield, function (buff) return true end) then
|
||||
f1 = f1 + f2
|
||||
f1 = f1*(1+f2)
|
||||
end
|
||||
BattleUtil.CalDamage(caster, target, dt, f1)
|
||||
end)
|
||||
|
@ -1736,7 +1743,12 @@ local effectList = {
|
|||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
local dmg, crit = BattleUtil.CalDamage(caster, target, dt, f4)
|
||||
if crit then
|
||||
buffRandomAction(f3, target, Buff.Create(caster, BuffName.PropertyChange, f2, propertyList[pro1], f1, ct))
|
||||
BattleUtil.RandomAction(f3, function ()
|
||||
local arr = BattleUtil.ChooseTarget(caster, 10001)
|
||||
for i=1, #arr do
|
||||
arr[i]:AddBuff(Buff.Create(caster, BuffName.PropertyChange, f2, propertyList[pro1], f1, ct))
|
||||
end
|
||||
end)
|
||||
end
|
||||
end)
|
||||
end,
|
||||
|
|
|
@ -965,10 +965,10 @@ local passivityList = {
|
|||
local f1 = args[1]
|
||||
local f2 = args[2]
|
||||
local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType)
|
||||
if atkRole.isTeam then
|
||||
return
|
||||
end
|
||||
BattleUtil.RandomAction(f1, function ()
|
||||
if atkRole.isTeam then
|
||||
return
|
||||
end
|
||||
atkRole:AddBuff(Buff.Create(role, BuffName.Control, f2, 1))
|
||||
end)
|
||||
end
|
||||
|
@ -991,7 +991,7 @@ local passivityList = {
|
|||
end)
|
||||
lastTrigger = 0
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.RoleDamage, OnDamage)
|
||||
role.Event:AddEvent(BattleEventName.RoleHit, OnDamage)
|
||||
end,
|
||||
--造成暴击时,额外造成目标最大生命值[a]%的伤害。(目标最大生命值伤害总上限为施法者5倍攻击)
|
||||
--a[float]
|
||||
|
@ -1069,14 +1069,15 @@ local passivityList = {
|
|||
auraBuff.interval = f1
|
||||
BattleLogic.BuffMgr:AddBuff(role, auraBuff)
|
||||
end,
|
||||
--我方生命最低的其他角色受到技能攻击后,自身[a]的概率对攻击者造成攻击[b]%的伤害,并造成[c],持续[d]秒。若自身处于沉默或眩晕状态,则不会触发。播放攻击特效,特效时间[e]秒。
|
||||
--a[float],b[float],c[控制状态],d[int],e[float]
|
||||
--我方生命最低的其他角色受到技能攻击后,自身[a]的概率对攻击者造成攻击[b]%的[c]伤害,并造成[d],持续[e]秒。若自身处于沉默或眩晕状态,则不会触发。播放攻击特效,特效时间[f]秒。
|
||||
--a[float],b[float],c[伤害类型],d[控制状态],e[int],f[float]
|
||||
[60] = function(role, args)
|
||||
local f1 = args[1]
|
||||
local f2 = args[2]
|
||||
local ct = args[3]
|
||||
local f3 = args[4]
|
||||
local f4 = args[5]
|
||||
local dt = args[3]
|
||||
local ct = args[4]
|
||||
local f3 = args[5]
|
||||
local f4 = args[6]
|
||||
|
||||
local triggerUid = {}
|
||||
BattleLogic.Event:AddEvent(BattleEventName.RoleBeDamaged, function (defRole, atkRole, damage, bCrit, finalDmg, damageType, isDot)
|
||||
|
@ -1101,7 +1102,7 @@ local passivityList = {
|
|||
role.Event:DispatchEvent(BattleEventName.RoleViewBullet, f4, atkRole)
|
||||
BattleLogic.WaitForTrigger(f4, function ()
|
||||
triggerUid[atkRole.uid] = atkRole.uid
|
||||
BattleUtil.ApplyDamage(role, atkRole, floor(role:GetRoleData(RoleDataName.Attack) * f2))
|
||||
BattleUtil.CalDamage(role, atkRole, dt, f2)
|
||||
atkRole:AddBuff(Buff.Create(role, BuffName.Control, f3, ct))
|
||||
triggerUid[atkRole.uid] = nil
|
||||
end)
|
||||
|
@ -1265,5 +1266,44 @@ local passivityList = {
|
|||
end
|
||||
role.Event:AddEvent(BattleEventName.RoleDamage, OnDamage)
|
||||
end,
|
||||
--击杀每个敌人会永久增加[a]%的[b],持续[c]秒。(0表示永久)(不可驱散)
|
||||
--a[float],b[属性],c[int]
|
||||
[70] = function(role, args)
|
||||
local f1 = args[1]
|
||||
local pro = args[2]
|
||||
local f2 = args[3]
|
||||
|
||||
local OnKill = function(defRole)
|
||||
local buff = Buff.Create(role, BuffName.PropertyChange, f2, propertyList[pro], f1, 2)
|
||||
buff.cover = true
|
||||
buff.clear = false
|
||||
role:AddBuff(buff)
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.RoleKill, OnKill)
|
||||
end,
|
||||
|
||||
--受击后,[a]对攻击者造成自身[c]%的[d]伤害。
|
||||
--a[float],c[float],d[伤害类型]
|
||||
[71] = function(role, args)
|
||||
local f1 = args[1]
|
||||
local f2 = args[2]
|
||||
local dt = args[3]
|
||||
|
||||
local lastTrigger = 0
|
||||
local OnBeHit = function(atkRole, damage, bCrit, finalDmg, damageType)
|
||||
if atkRole.isTeam then
|
||||
return
|
||||
end
|
||||
lastTrigger = lastTrigger + 1
|
||||
if lastTrigger > 1 then --加入限定避免循环触发
|
||||
return
|
||||
end
|
||||
BattleUtil.RandomAction(f1, function ()
|
||||
BattleUtil.CalDamage(role, atkRole, dt, f2)
|
||||
end)
|
||||
lastTrigger = 0
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.RoleBeHit, OnBeHit)
|
||||
end,
|
||||
}
|
||||
return passivityList
|
|
@ -43,8 +43,8 @@ local stageFrame2 = 30 * BattleLogic.GameFrameRate --中期转后期的时间点
|
|||
local curStageFrame
|
||||
|
||||
local teamSkillCastTime = {7 * BattleLogic.GameFrameRate,
|
||||
25 * BattleLogic.GameFrameRate,
|
||||
55 * BattleLogic.GameFrameRate}
|
||||
22 * BattleLogic.GameFrameRate,
|
||||
45 * BattleLogic.GameFrameRate}
|
||||
local teamSkillCastIndex
|
||||
|
||||
local maxFrame --战斗最大用时,超时判负
|
||||
|
@ -453,10 +453,12 @@ end
|
|||
function BattleLogic.GetNeighbor(role, chooseType)
|
||||
local posList = {}
|
||||
local target = chooseType == 1 and role or BattleLogic.GetAggro(role)
|
||||
local list = BattleUtil.ChooseTarget(target, 10000)
|
||||
for i=1, #list do
|
||||
if not list[i].isDead and math.abs(posDic[target.position] - posDic[list[i].position]) <= 1 then
|
||||
table.insert(posList, list[i])
|
||||
if target then
|
||||
local list = BattleLogic.Query(function (r) return r.camp == target.camp end)
|
||||
for i=1, #list do
|
||||
if not list[i].isDead and math.abs(posDic[target.position] - posDic[list[i].position]) <= 1 then
|
||||
table.insert(posList, list[i])
|
||||
end
|
||||
end
|
||||
end
|
||||
return posList
|
||||
|
|
|
@ -30,6 +30,7 @@ BattleEventName = {
|
|||
RoleBeDodge = indexAdd(),
|
||||
RoleDodge = indexAdd(),
|
||||
RoleDead = indexAdd(),
|
||||
RoleKill = indexAdd(),
|
||||
RoleRevive = indexAdd(),
|
||||
RolePropertyChanged = indexAdd(),
|
||||
RoleCDChanged = indexAdd(),
|
||||
|
|
|
@ -193,6 +193,7 @@ function BattleUtil.ApplyDamage(atkRole, defRole, damage, bCrit, damageType, isD
|
|||
defRole.isDead = true
|
||||
BattleLogic.BuffMgr:ClearBuff(defRole)
|
||||
defRole.Event:DispatchEvent(BattleEventName.RoleDead, atkRole)
|
||||
atkRole.Event:DispatchEvent(BattleEventName.RoleKill, defRole)
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.BattleRoleDead, defRole, atkRole)
|
||||
end
|
||||
|
||||
|
|
|
@ -38,11 +38,11 @@ public class CommonStaticConfig extends AbstractClassStaticConfig {
|
|||
registConfigs.add(SGlobalSystemConfig.class.getAnnotation(Table.class).name());
|
||||
registConfigs.add(SGuildSetting.class.getAnnotation(Table.class).name());
|
||||
registConfigs.add(SWorkShopSetting.class.getAnnotation(Table.class).name());
|
||||
registConfigs.add(SWorkShopSetting.class.getAnnotation(Table.class).name());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void figureConfigs() {
|
||||
|
||||
gameSetting = new SGameSetting();
|
||||
try {
|
||||
Map<Integer, SGameSetting> config = STableManager.getConfig(SGameSetting.class);
|
||||
|
@ -59,14 +59,14 @@ public class CommonStaticConfig extends AbstractClassStaticConfig {
|
|||
notDelete.add(Global.STAMINA);
|
||||
notDelete.addAll(gameSetting.getItemRecoveryMap().keySet());
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("gamesetting init fail");
|
||||
LOGGER.error("gamesetting init fail",e);
|
||||
}
|
||||
|
||||
try {
|
||||
SChallengeMapConfig sChallengeMapConfig = STableManager.getConfig(SChallengeMapConfig.class).get(11);
|
||||
initPos = CellUtil.xy2Pos(sChallengeMapConfig.getPosition()[0], sChallengeMapConfig.getPosition()[1]);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("sChallengeMapConfig init fail");
|
||||
LOGGER.error("sChallengeMapConfig init fail",e);
|
||||
}
|
||||
try {
|
||||
|
||||
|
@ -108,7 +108,7 @@ public class CommonStaticConfig extends AbstractClassStaticConfig {
|
|||
|
||||
sGlobalSystemConfigMapByTypeAndConditionMap = sGlobalSystemConfigMapByTypeAndConditionMapTmp;
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("SGlobalSystemConfig init fail");
|
||||
LOGGER.error("SGlobalSystemConfig init fail",e);
|
||||
}
|
||||
try {
|
||||
|
||||
|
@ -167,7 +167,7 @@ public class CommonStaticConfig extends AbstractClassStaticConfig {
|
|||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("SWorkShopTechnology init fail");
|
||||
LOGGER.error("SWorkShopTechnology init fail",e);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ public class HandlerLogicThread extends Thread{
|
|||
transaction.commit();
|
||||
if (msgId != MessageTypeProto.MessageType.GET_CHAT_MESSAGE_REQUEST_VALUE) {
|
||||
long useTime = System.nanoTime() - curTimeMillis;
|
||||
LOGGER.info("doWork->uid={},mType={},useTime={},;end", userId, MessageTypeProto.MessageType.valueOf(msgId), useTime);
|
||||
LOGGER.info("doWork->uid={},mType={},useTime={},;end", userId, MessageTypeProto.MessageType.valueOf(msgId), useTime/1000_000);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -227,13 +227,12 @@ public class BehaviorUtil {
|
|||
.build();
|
||||
heroFightInfos.add(heroFightInfo);
|
||||
}
|
||||
CommonProto.FightTeamInfo fightTeamInfo = CommonProto.FightTeamInfo.
|
||||
return CommonProto.FightTeamInfo.
|
||||
newBuilder()
|
||||
.addAllFightUnitList(heroFightInfos)
|
||||
.setTeamSkillList(HeroLogic.getInstance().getPokenmonSkills(user,teamId))
|
||||
.setTeamPassiveList(HeroLogic.getInstance().getPokenmonPassiveSkills(user,teamId))
|
||||
.build();
|
||||
return fightTeamInfo;
|
||||
}
|
||||
|
||||
public static CommonProto.FightTeamInfo getRobotFightTeamInfo(SArenaRobotConfig sArenaRobotConfig) {
|
||||
|
@ -245,7 +244,7 @@ public class BehaviorUtil {
|
|||
Integer heroTid = item.getKey();
|
||||
Integer heroStar = item.getValue();
|
||||
SCHero scHero = SCHero.getsCHero().get(heroTid);
|
||||
List<Integer> skillIds = scHero.getSkillListByStar().get(heroStar);
|
||||
List<Integer> skillIds = scHero.getSkillListByStar(heroStar);
|
||||
String heroSkill = HeroLogic.getInstance().getRobotHeroSkills(skillIds,skillSb).toString();
|
||||
String property = HeroLogic.getInstance().getRobotHeroProperty(sArenaRobotConfig,scHero,propertySb).toString();
|
||||
CommonProto.FightUnitInfo heroFightInfo = CommonProto.FightUnitInfo
|
||||
|
@ -257,12 +256,12 @@ public class BehaviorUtil {
|
|||
heroFightInfos.add(heroFightInfo);
|
||||
}
|
||||
|
||||
CommonProto.FightTeamInfo fightTeamInfo = CommonProto.FightTeamInfo.
|
||||
return CommonProto.FightTeamInfo.
|
||||
newBuilder()
|
||||
.addAllFightUnitList(heroFightInfos)
|
||||
.setTeamSkillList(HeroLogic.getInstance().getRobotPokenmonSkills(sArenaRobotConfig))
|
||||
.build();
|
||||
return fightTeamInfo;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,9 +13,7 @@ import manager.STableManager;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class Hero extends MongoBase {
|
||||
|
@ -30,8 +28,6 @@ public class Hero extends MongoBase {
|
|||
|
||||
private int star;
|
||||
|
||||
private List<Integer> skillList;
|
||||
|
||||
private Map<Integer,String> equipByPositionMap;
|
||||
|
||||
private Map<Integer,String> soulEquipByPositionMap;
|
||||
|
@ -63,14 +59,9 @@ public class Hero extends MongoBase {
|
|||
this.templateId = scHero.getId();
|
||||
this.level = 1;
|
||||
this.star = initStar;
|
||||
this.skillList = new ArrayList<>();
|
||||
this.equipByPositionMap = new HashMap<>();
|
||||
this.soulEquipByPositionMap = new HashMap<>();
|
||||
this.especialEquip = "";
|
||||
List<Integer> skillIds = scHero.getSkillListByStar().get(star);
|
||||
if(skillIds!=null && !skillIds.isEmpty()){
|
||||
this.skillList.addAll(skillIds);
|
||||
}
|
||||
|
||||
if(initStar!=scHero.getStar()){
|
||||
Map<Integer, SCHeroRankUpConfig> scHeroRankUpConfigByType = STableManager.getFigureConfig(HeroStaticConfig.class).getScHeroRankUpConfigByShow(GlobalsDef.UP_STAR_TYPE,scHero.getStar());
|
||||
|
@ -89,17 +80,7 @@ public class Hero extends MongoBase {
|
|||
public void upStar(int upStar) throws Exception {
|
||||
SCHero scHero = SCHero.getsCHero().get(templateId);
|
||||
this.star += upStar;
|
||||
List<Integer> skillIds = scHero.getSkillListByStar().get(star);
|
||||
if(skillIds!=null && !skillIds.isEmpty()){
|
||||
if(this.skillList!=null){
|
||||
skillList.clear();
|
||||
}else{
|
||||
this.skillList = new ArrayList<>();
|
||||
}
|
||||
this.skillList.addAll(skillIds);
|
||||
}
|
||||
updateString("star",star);
|
||||
updateString("skillList",skillList);
|
||||
}
|
||||
|
||||
|
||||
|
@ -143,10 +124,6 @@ public class Hero extends MongoBase {
|
|||
return star;
|
||||
}
|
||||
|
||||
public List<Integer> getSkillList() {
|
||||
return skillList;
|
||||
}
|
||||
|
||||
public Map<Integer, String> getEquipByPositionMap() {
|
||||
return equipByPositionMap;
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ public class MainLevelManager extends MongoBase {
|
|||
updateString("lastTime",lastTime);
|
||||
}
|
||||
|
||||
public void afterTakeStateReward(int hadTakeTimes,boolean needReset,int lastTakes){
|
||||
public void afterTakeStateReward(boolean needReset,int lastTakes){
|
||||
fightStateInfo.clear();
|
||||
int now = (int)(System.currentTimeMillis()/1000);
|
||||
SGameSetting gameSetting = STableManager.getFigureConfig(CommonStaticConfig.class).getGameSetting();
|
||||
|
|
|
@ -257,9 +257,9 @@ public class CombatLogic {
|
|||
int times = (now - lastTime)/STableManager.getFigureConfig(CommonStaticConfig.class).getGameSetting().getAdventureRefresh();
|
||||
int maxTimes = adventureOffline - takeTimes;
|
||||
int lastTimeTakes=0;
|
||||
boolean reset = maxTimes<times;
|
||||
if(maxTimes>0){
|
||||
times = times > maxTimes?maxTimes:times;
|
||||
takeTimes+=times;
|
||||
int[] randomRewardMin = targetMainLevelConfig.getRandomRewardMin();
|
||||
ItemUtil.combineReward(user,randomRewardMin, times,baseItemMap,baseCardMap,baseEquipMap,baseRandomMap);
|
||||
int timesTemp =times;
|
||||
|
@ -280,10 +280,10 @@ public class CombatLogic {
|
|||
}
|
||||
MailLogic.getInstance().sendMail(user.getId(),title,content,reward,now,Global.MAIL_EFFECTIVE_TIME);
|
||||
}
|
||||
mainLevelManager.afterTakeStateReward(takeTimes,true,0);
|
||||
mainLevelManager.afterTakeStateReward(true,0);
|
||||
return null;
|
||||
}
|
||||
mainLevelManager.afterTakeStateReward(takeTimes,maxTimes<=0,lastTimeTakes);
|
||||
mainLevelManager.afterTakeStateReward(reset,lastTimeTakes);
|
||||
ItemUtil.drop(user,baseBuilder,baseItemMap,baseCardMap,baseEquipMap,baseRandomMap,BIReason.ADVENTURE_BASE_REWARD);
|
||||
ItemUtil.drop(user,randomBuilder,randomItemMap,randomCardMap,randomEquipMap,randomRandomMap,BIReason.ADVENTURE_RANDOM_REWARDD);
|
||||
Map<Integer, CommonProto.Drop> result = new HashMap<>(2);
|
||||
|
|
|
@ -862,7 +862,8 @@ public class HeroLogic {
|
|||
|
||||
public StringBuilder getHeroSkills(User user,Hero hero, StringBuilder sb){
|
||||
|
||||
for (Integer skillId : hero.getSkillList()) {
|
||||
SCHero tempHero = SCHero.getsCHero().get(hero.getTemplateId());
|
||||
for (Integer skillId : tempHero.getSkillListByStar(hero.getStar())) {
|
||||
sb.append(skillId).append(DIVISION);
|
||||
}
|
||||
Map<Integer, String> equipByPositionMap = hero.getEquipByPositionMap();
|
||||
|
@ -878,7 +879,6 @@ public class HeroLogic {
|
|||
sb.append(skillId).append(DIVISION);
|
||||
}
|
||||
}
|
||||
return sb;
|
||||
}
|
||||
//法宝技能
|
||||
String especialEquipId = hero.getEspecialEquip();
|
||||
|
@ -888,7 +888,7 @@ public class HeroLogic {
|
|||
for(int skill:sEquipTalismana.getOpenSkillRules()){
|
||||
sb.append(skill).append(DIVISION);
|
||||
}
|
||||
SCHero tempHero = SCHero.getsCHero().get(hero.getTemplateId());
|
||||
|
||||
int[][] specialSkill = sEquipTalismana.getSpecialSkill();
|
||||
for(int i = 0 ; i < specialSkill.length;i++){
|
||||
if(tempHero.getProfession()==specialSkill[i][0]){
|
||||
|
@ -897,6 +897,8 @@ public class HeroLogic {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return sb;
|
||||
}
|
||||
|
||||
|
|
|
@ -99,7 +99,6 @@ public class CBean2Proto {
|
|||
.setBreakId(hero.getBreakId())
|
||||
.setStarBreakId(hero.getStarBreakId())
|
||||
.setCreateTime(hero.getCreateTime())
|
||||
.addAllSkillIdList(hero.getSkillList())
|
||||
.addAllEquipIdList(equipList)
|
||||
.addEspecialEquip(hero.getEspecialEquip())
|
||||
.addAllSoulPos(soulPoss)
|
||||
|
|
|
@ -273,7 +273,7 @@ public class FightDataUtil {
|
|||
|
||||
private static LuaValue getSkill(String skillId,String...args) {
|
||||
LuaValue skill = new LuaTable();
|
||||
if (skillId==null || skillId.equals("") ){
|
||||
if (StringUtil.isEmpty(skillId)){
|
||||
return skill;
|
||||
}
|
||||
SSkillLogicVo sSkillLogicVo = SSkillLogicConfig.getsSkillLogicVo(Integer.valueOf(skillId));
|
||||
|
|
|
@ -104,8 +104,8 @@ public class SCHero implements BaseConfig{
|
|||
}
|
||||
Map<Integer, Map<Integer, ConsumeMaterialInfo>> consumeMaterialInfoByStarTmp = new HashMap<>();
|
||||
int[][] openSkillRules = scHero.getOpenSkillRules();
|
||||
Map<Integer, List<Integer>> skillListByStarTmp = new HashMap<>();
|
||||
scHero.setSkillListByStar(skillListByStarTmp);
|
||||
|
||||
|
||||
int[][] rankupConsumeMaterial = scHero.getRankupConsumeMaterial();
|
||||
|
||||
for(int j=0;j<rankupConsumeMaterial.length;j++){
|
||||
|
@ -121,24 +121,32 @@ public class SCHero implements BaseConfig{
|
|||
}
|
||||
scHero.setConsumeMaterialInfoOfPositionByStar(consumeMaterialInfoByStarTmp);
|
||||
|
||||
|
||||
Map<Integer, List<Integer>> skillTmp = new HashMap<>();
|
||||
for(int i=0;i<openSkillRules.length;i++){
|
||||
int[] openSkillRule = openSkillRules[i];
|
||||
int star = openSkillRule[0];
|
||||
int skillId = openSkillRule[1];
|
||||
if(!skillListByStarTmp.containsKey(star)){
|
||||
skillListByStarTmp.put(star,new ArrayList<>());
|
||||
if(!skillTmp.containsKey(star)){
|
||||
skillTmp.put(star,new ArrayList<>());
|
||||
}
|
||||
skillTmp.get(star).add(skillId);
|
||||
}
|
||||
for(List<Integer> items : skillTmp.values()){
|
||||
if(items.size() <2){
|
||||
items.add(0);
|
||||
}
|
||||
skillListByStarTmp.get(star).add(skillId);
|
||||
}
|
||||
|
||||
for(int[] openSkillRule : scHero.getOpenPassiveSkillRules()){
|
||||
int star = openSkillRule[0];
|
||||
int skillId = openSkillRule[1];
|
||||
if(!skillListByStarTmp.containsKey(star)){
|
||||
skillListByStarTmp.put(star,new ArrayList<>());
|
||||
if(!skillTmp.containsKey(star)){
|
||||
skillTmp.put(star,new ArrayList<>());
|
||||
}
|
||||
skillListByStarTmp.get(star).add(skillId);
|
||||
skillTmp.get(star).add(skillId);
|
||||
}
|
||||
scHero.setSkillListByStar(skillTmp);
|
||||
|
||||
}
|
||||
sCHero = integerSCHeroMap;
|
||||
|
@ -217,14 +225,6 @@ public class SCHero implements BaseConfig{
|
|||
return star;
|
||||
}
|
||||
|
||||
public void setSkillListByStar(Map<Integer, List<Integer>> skillListByStar) {
|
||||
this.skillListByStar = skillListByStar;
|
||||
}
|
||||
|
||||
public Map<Integer, List<Integer>> getSkillListByStar() {
|
||||
return skillListByStar;
|
||||
}
|
||||
|
||||
public int[][] getSecondaryFactor() {
|
||||
return secondaryFactor;
|
||||
}
|
||||
|
@ -252,4 +252,12 @@ public class SCHero implements BaseConfig{
|
|||
public int[][] getOpenPassiveSkillRules() {
|
||||
return openPassiveSkillRules;
|
||||
}
|
||||
|
||||
public List<Integer> getSkillListByStar(int star) {
|
||||
return skillListByStar.get(star);
|
||||
}
|
||||
|
||||
public void setSkillListByStar(Map<Integer, List<Integer>> skillListByStar) {
|
||||
this.skillListByStar = skillListByStar;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue