コード例 #1
0
        public Buff AddBuffStack(BuffTypeVO buffType, ArmorType armorType, BuffVisualPriority visualPriority)
        {
            int  num = this.FindBuff(buffType.BuffID);
            Buff buff;

            if (num < 0)
            {
                buff = new Buff(buffType, armorType, visualPriority);
                buff.AddStack();
                this.Buffs.Add(buff);
                if (this.sleepState == BuffSleepState.Sleeping)
                {
                    this.sleepState = BuffSleepState.Awake;
                }
                this.SendBuffEvent(EventId.AddedBuff, buff);
            }
            else
            {
                buff = this.Buffs[num];
                if (buffType.Lvl > buff.BuffType.Lvl)
                {
                    buff.UpgradeBuff(buffType);
                }
                buff.AddStack();
            }
            this.OnBuffStackAdded();
            return(buff);
        }
コード例 #2
0
        public void AddAppliedBuff(BuffTypeVO buffVO, BuffVisualPriority visualPriority)
        {
            int  num = this.FindSpecialAttackBuff(buffVO.BuffID);
            Buff buff;

            if (num < 0)
            {
                buff = new Buff(buffVO, ArmorType.FlierVehicle, visualPriority);
                buff.AddStack();
                this.SpecialAttackBuffs.Add(buff);
                return;
            }
            buff = this.SpecialAttackBuffs[num];
            if (buffVO.Lvl > buff.BuffType.Lvl)
            {
                buff.UpgradeBuff(buffVO);
            }
            buff.AddStack();
        }
コード例 #3
0
        public Buff AddBuffStack(BuffTypeVO buffType, ArmorType armorType, BuffVisualPriority visualPriority, SmartEntity originator)
        {
            int  num = this.FindBuff(buffType.BuffID);
            Buff buff;

            if (num < 0)
            {
                buff = new Buff(buffType, armorType, visualPriority);
                buff.AddStack();
                this.Buffs.Add(buff);
                if (this.sleepState == BuffSleepState.Sleeping)
                {
                    this.sleepState = BuffSleepState.Awake;
                }
                if (!buff.BuffData.ContainsKey("originator"))
                {
                    buff.BuffData.Add("originator", originator);
                }
                else
                {
                    buff.BuffData["originator"] = originator;
                }
                this.SendBuffEvent(EventId.AddedBuff, buff);
            }
            else
            {
                buff = this.Buffs[num];
                if (buffType.Lvl > buff.BuffType.Lvl)
                {
                    buff.UpgradeBuff(buffType);
                }
                buff.BuffData["originator"] = originator;
                buff.AddStack();
            }
            this.OnBuffStackAdded();
            return(buff);
        }