修复龙卷风没法正常显示的问题
This commit is contained in:
parent
0046012bdb
commit
ca4d427906
Binary file not shown.
Binary file not shown.
@ -198,6 +198,45 @@ namespace GameLogic
|
||||
|
||||
if (m_Buffs.ContainsKey(unitPlayerData.protCustMessageData.openId))
|
||||
{
|
||||
|
||||
// 如果是负面Buff
|
||||
if (buff.addPower < 0)
|
||||
{
|
||||
|
||||
Buff godBuff = null;
|
||||
|
||||
// 先检查自身身上有没有无敌Buff ,Value == 0的
|
||||
foreach (var item in m_Buffs[unitPlayerData.protCustMessageData.openId])
|
||||
{
|
||||
// 无敌
|
||||
if (item.addPower == 0)
|
||||
{
|
||||
|
||||
if (godBuff == null)
|
||||
{
|
||||
godBuff = item;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 比较,看谁时间最短
|
||||
if (godBuff.m_CraeteTimer < item.m_CraeteTimer)
|
||||
{
|
||||
godBuff = item;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 抵消
|
||||
if (godBuff != null)
|
||||
{
|
||||
// 有效时间置空
|
||||
godBuff.m_CraeteTimer = godBuff.m_AllTimer;
|
||||
Log.Debug("触发抵消机制");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 累加设计
|
||||
// 没有该Buff,则新增这个Buff
|
||||
m_Buffs[unitPlayerData.protCustMessageData.openId].Add(buff);
|
||||
|
@ -17,10 +17,7 @@ public class Buff
|
||||
public void OnInit(int id, float value, int timerLen, int addScale, int num)
|
||||
{
|
||||
m_Id = id;
|
||||
// 记录一下,特殊Buff,正常计时。非特殊Buff,在Actor中计时
|
||||
m_CraeteTimer = id == EventConts.isZoneTimerBuffId ? Time.time : 0;
|
||||
//isZoneTimer = id == EventConts.isZoneTimerBuffId;
|
||||
//isAllPower = id == EventConts.isAllPowerBuffId;
|
||||
//m_CraeteTimer = timerLen;
|
||||
addPower = value;
|
||||
if (isZoneTimer)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user