Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
fee1e82d74
|
|
@ -0,0 +1,56 @@
|
||||||
|
require("Modules/Battle/Logic/Base/Buff")
|
||||||
|
Immune = Buff:New()
|
||||||
|
|
||||||
|
local immune1 = function(buff)
|
||||||
|
return buff.type == BuffName.Control
|
||||||
|
end
|
||||||
|
local immune2 = function(buff)
|
||||||
|
return buff.type == BuffName.DOT
|
||||||
|
end
|
||||||
|
|
||||||
|
--初始化Buff,通过传入一些自定义参数控制成长相关的数值
|
||||||
|
function Immune:SetData(...)
|
||||||
|
--log("Immune:SetData")
|
||||||
|
self.immuneType = ...
|
||||||
|
end
|
||||||
|
|
||||||
|
--初始化后调用一次
|
||||||
|
function Immune:OnStart()
|
||||||
|
--log("Immune:OnStart")
|
||||||
|
if self.immuneType == 1 then --免疫控制状态
|
||||||
|
self.target.buffFilter:Add(immune1)
|
||||||
|
elseif self.immuneType == 2 then --免疫dot
|
||||||
|
self.target.buffFilter:Add(immune2)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--间隔N帧触发,返回true时表示继续触发,返回false立刻触发OnEnd
|
||||||
|
function Immune:OnTrigger()
|
||||||
|
--log("Immune:OnTrigger")
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--效果结束时调用一次
|
||||||
|
function Immune:OnEnd()
|
||||||
|
--log("Immune:OnEnd")
|
||||||
|
local immune
|
||||||
|
if self.immuneType == 1 then --免疫控制状态
|
||||||
|
immune = immune1
|
||||||
|
elseif self.immuneType == 2 then --免疫dot
|
||||||
|
immune = immune2
|
||||||
|
end
|
||||||
|
for i = 1, self.target.buffFilter.size do
|
||||||
|
if self.target.buffFilter.buffer[i] == immune then
|
||||||
|
self.target.buffFilter:Remove(i)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--只有当cover字段为true时触发,返回true则被新效果覆盖
|
||||||
|
function Immune:OnCover(newBuff)
|
||||||
|
--log("Immune:OnCover")
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
return Immune
|
||||||
|
|
@ -650,7 +650,7 @@ public class MapLogic {
|
||||||
resetMapInfo(user, true);
|
resetMapInfo(user, true);
|
||||||
MapMission mapMission = mapManager.getAllMissionProgress().get(mapId);
|
MapMission mapMission = mapManager.getAllMissionProgress().get(mapId);
|
||||||
if(mapMission!=null){
|
if(mapMission!=null){
|
||||||
MapInfoProto.MapOutResponse build = MapInfoProto.MapOutResponse.newBuilder().setMapAccomplishInfo(CBean2Proto.getMapAccomplishInfo(mapManager.getAllMissionProgress().get(mapManager.getCurMapId()))).build();
|
MapInfoProto.MapOutResponse build = MapInfoProto.MapOutResponse.newBuilder().setMapAccomplishInfo(CBean2Proto.getMapAccomplishInfo(mapMission)).build();
|
||||||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), build, true);
|
MessageUtil.sendMessage(session, 1, messageType.getNumber(), build, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,7 @@ public class CBean2Proto {
|
||||||
|
|
||||||
if (sMonsterConfig.getSkillList()!=null){
|
if (sMonsterConfig.getSkillList()!=null){
|
||||||
for (Integer i : sMonsterConfig.getSkillList()){
|
for (Integer i : sMonsterConfig.getSkillList()){
|
||||||
monsterSkillList.append(i);
|
monsterSkillList.append(i).append("#");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue