Exemplo n.º 1
0
        public void Init(BuffData _this)
        {
            var tbBuff = _this.mBuff;

            if (tbBuff.Duration != 0)
            {
                foreach (var i in tbBuff.effectpoint)
                {
                    //Buff不需要心跳
                    if (i == -1)
                    {
                        continue;
                    }
                    if (BitFlag.GetAnd(i, 14336) == 0)
                    {
                        continue;
                    }
                    StarUpdata(_this);
                    return;
                }
                if (tbBuff.Duration > 0)
                {
                    StarTrigger(_this);
                }
            }
        }
Exemplo n.º 2
0
 //获得BUFF中某个效果ID的某个参数进行(与操作)
 public bool GetEffectParam_And(BuffList _this, eEffectType effectid, int paramid, int value)
 {
     foreach (var i in _this.mData)
     {
         if (i.GetActive() == false)
         {
             continue;
         }
         var tbBuff = i.mBuff;
         for (var j = 0; j != tbBuff.effectid.Length; ++j)
         {
             if (tbBuff.effectid[j] == (int)effectid)
             {
                 if (BitFlag.GetAnd(tbBuff.effectparam[j, paramid], value) > 0)
                 {
                     return(true);
                 }
             }
         }
     }
     return(false);
 }
Exemplo n.º 3
0
    public bool CheckControlType(SkillItemDataModel skill, BuffManager buffManager)
    {
        var buffdata    = buffManager.GetBuffData();
        var count       = buffdata.Count;
        var controlType = skill.ControlType;

        for (var i = 0; i < count; i++)
        {
            var buff = buffdata[i];

            var tbBuff = Table.GetBuff(buff.BuffTypeId);
            for (var j = 0; j < tbBuff.effectid.Length; j++)
            {
                if (tbBuff.effectid[j] == 9)
                {
                    if (BitFlag.GetAnd(tbBuff.effectparam[j, 1], controlType) > 0)
                    {
                        return(true);
                    }
                }
            }
        }
        return(false);
    }