Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
dd3ca2829c
|
@ -148,7 +148,8 @@ function BuffManager:Update()
|
|||
local oldBuff = buffList.buffer[i]
|
||||
if oldBuff.target == buff.target and oldBuff:OnCover(buff) then --判定该效果能否被覆盖
|
||||
oldBuff:OnEnd()
|
||||
buff.target.Event:DispatchEvent(BattleEventName.BuffEnd, buffList.buffer[i])
|
||||
oldBuff.target.Event:DispatchEvent(BattleEventName.BuffEnd, oldBuff)
|
||||
putBuff(oldBuff)
|
||||
buffList.buffer[i] = buff
|
||||
buff:OnStart()
|
||||
buff.target.Event:DispatchEvent(BattleEventName.BuffStart, buff)
|
||||
|
@ -157,7 +158,7 @@ function BuffManager:Update()
|
|||
break
|
||||
end
|
||||
end
|
||||
if not isCovered then
|
||||
if not isCovered and (buff.maxCount == 0 or buffList.size < buff.maxCount) then
|
||||
buffList:Add(buff)
|
||||
buff:OnStart()
|
||||
buff.target.Event:DispatchEvent(BattleEventName.BuffStart, buff)
|
||||
|
|
|
@ -251,6 +251,10 @@ end
|
|||
function BattleLogic.WaitForTrigger(delayTime, action)
|
||||
delayTime = floor(delayTime * 100000 + 0.5) / 100000 --进行精度处理,避免前后端计算不一致
|
||||
local delayFrame = floor(delayTime * BattleLogic.GameFrameRate + 0.5)
|
||||
if delayFrame == 0 then --0延迟的回调直接调用
|
||||
action()
|
||||
return
|
||||
end
|
||||
local item = actionPool:Get()
|
||||
item[1] = curFrame + delayFrame
|
||||
item[2] = action
|
||||
|
@ -304,7 +308,6 @@ function BattleLogic.Clear()
|
|||
objList:Remove(objList.vList[objList.size].uid)
|
||||
end
|
||||
while removeObjList.size > 0 do
|
||||
removeObjList.buffer[removeObjList.size]:Dispose()
|
||||
rolePool:Put(removeObjList.buffer[removeObjList.size])
|
||||
removeObjList:Remove(removeObjList.size)
|
||||
end
|
||||
|
|
|
@ -727,7 +727,7 @@ public class MapLogic {
|
|||
|
||||
public void resetMapInfo(User user, boolean needTemporaryItem) throws Exception {
|
||||
MapManager mapManager = user.getMapManager();
|
||||
|
||||
mapManager.setFoodBufferMap(new HashMap<>());
|
||||
int teamId = mapManager.getTeamId();
|
||||
List<TeamPosHeroInfo> team = user.getTeamPosManager().getTeamPosForHero().get(teamId);
|
||||
for (TeamPosHeroInfo teamPosHeroInfo : team){
|
||||
|
@ -747,7 +747,6 @@ public class MapLogic {
|
|||
mapManager.setTriggerXY(0);
|
||||
mapManager.setDieCount(0);
|
||||
mapManager.setCanMoveTime(0);
|
||||
mapManager.setFoodBufferMap(new HashMap<>());
|
||||
TemporaryItems temporaryItems = mapManager.getTemporaryItems();
|
||||
mapManager.setMission(null);
|
||||
if (temporaryItems != null) {
|
||||
|
|
|
@ -285,14 +285,14 @@ public class BehaviorUtil {
|
|||
if (info !=null){
|
||||
CommonProto.FightTeamInfo.Builder monsterBuilder1 = CommonProto.FightTeamInfo.newBuilder();
|
||||
JsonFormat.merge(info, monsterBuilder1);
|
||||
CommonProto.FightTeamInfo monsterTeam1 = monsterBuilder.build();
|
||||
CommonProto.FightTeamInfo monsterTeam1 = monsterBuilder1.build();
|
||||
monsterTeamList.add(monsterTeam1);
|
||||
}
|
||||
String info1 = (String)valueMap.get(RedisKey.FIGHT_MONSTERS_3);
|
||||
if (info1!= null){
|
||||
CommonProto.FightTeamInfo.Builder monsterBuilder2 = CommonProto.FightTeamInfo.newBuilder();
|
||||
JsonFormat.merge(info1, monsterBuilder2);
|
||||
CommonProto.FightTeamInfo monsterTeam2 = monsterBuilder.build();
|
||||
CommonProto.FightTeamInfo monsterTeam2 = monsterBuilder2.build();
|
||||
monsterTeamList.add(monsterTeam2);
|
||||
}
|
||||
return monsterTeamList;
|
||||
|
|
Loading…
Reference in New Issue