示例#1
0
        public void AddOpenClip()
        {
            if (_skillList.Count == 0)
            {
                return;
            }
            short           round  = _context.MatchRunRound;
            ushort          clipId = 0;
            int             key    = 0;
            SkillClipResult rst    = null;

            foreach (var skill in _skillList)
            {
                if (skill.InvalidFlag)
                {
                    continue;
                }
                clipId = (ushort)skill.RawSkill.OpenClipId;
                if (clipId <= 0)
                {
                    continue;
                }
                key = clipId * 10000 + round;
                if (!this._clipDic.TryGetValue(key, out rst))
                {
                    rst = new SkillClipResult()
                    {
                        Round   = round,
                        ClipId  = clipId,
                        Targets = s_dicNullTargets,
                    };
                    this._clipDic[key] = rst;
                }
            }
        }
示例#2
0
        public void AddOpenClip(ISkill srcSkill)
        {
            ushort clipId = (ushort)srcSkill.RawSkill.OpenClipId;

            if (clipId <= 0)
            {
                return;
            }
            short           round = _context.MatchRunRound;
            int             key   = clipId * 10000 + round;
            SkillClipResult rst   = null;

            if (!this._clipDic.TryGetValue(key, out rst))
            {
                rst = new SkillClipResult()
                {
                    Round   = round,
                    ClipId  = clipId,
                    Targets = s_dicNullTargets,
                };
                this._clipDic[key] = rst;
            }
        }
示例#3
0
        public void AddShowClip(ISkill srcSkill, SkillClipSetting clip, byte[] targets)
        {
            if (clip.ClipId <= 0)
            {
                return;
            }
            short clipLast = clip.ClipLast;

            if (clipLast > 0)
            {
                clipLast += _context.MatchRound;
                this._invokeState.SetExcluFlag(clipLast);
            }
            short           round  = _context.MatchRunRound;
            ushort          clipId = clip.ClipId;
            int             key    = clipId * 10000 + round;
            SkillClipResult rst    = null;

            if (!this._clipDic.TryGetValue(key, out rst))
            {
                rst = new SkillClipResult()
                {
                    Round   = round,
                    ClipId  = clipId,
                    Targets = new Dictionary <byte, byte>(),
                };
                this._clipDic[key] = rst;
            }
            if (null == targets)
            {
                return;
            }
            foreach (var target in targets)
            {
                rst.Targets[target] = target;
            }
        }