Exemplo n.º 1
0
    void    DoEndEffect(HeaderProto.EBuffEndType endTpye)
    {
        for (int i = 0; i < 8; i++)
        {
            if (effects[i] == null)
            {
                continue;
            }
            int iType = (int)effects[i]["byEffectType"];
            //int id		=	(int)effects[i]["dwOperationID"];
            HeaderProto.EBuffEndType et = (HeaderProto.EBuffEndType)effects[i]["byEffectExplain"];
            if (et != HeaderProto.EBuffEndType.BUFF_END_NONE)
            {
                if (et != endTpye)
                {
                    continue;
                }
                int dwPeriodicData = (int)effects[i]["dwPeriodicData"];
                switch (dwPeriodicData)
                {
                case 0: {
                    sdBuffEffect.Add(m_CasterActor, GetActor(), effects[i], HeaderProto.EDoOperationType.DO_OPERATION_TYPE_REMOVE, m_Layer);
                    break;
                }

                case 1: {
                    sdBuffEffect.Add(m_CasterActor, m_CasterActor, effects[i], HeaderProto.EDoOperationType.DO_OPERATION_TYPE_REMOVE, m_Layer);
                    break;
                }

                case 2: {
                    //获取AOE范围内的所有目标.
                    List <sdActorInterface> lstAoe = GetEffectedActors();
                    foreach (sdActorInterface a in lstAoe)
                    {
                        sdBuffEffect.Add(m_CasterActor, a, effects[i], HeaderProto.EDoOperationType.DO_OPERATION_TYPE_REMOVE, m_Layer);
                    }
                    break;
                }
                }
            }
        }
    }
Exemplo n.º 2
0
 public void    Stop(HeaderProto.EBuffEndType endType)
 {
     EndType = endType;
     OnDead();
 }