Ejemplo n.º 1
0
        public override void Tick(SkillObj self, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
        {
            Dictionary <int, int> keyValues = new Dictionary <int, int>();

            foreach (var buff in self.GetBuffIntParams(buffConfig).Skip(Key_Int_SummonId_BuffConfig + 1))
            {
                keyValues.Add(buff, buff);
            }
            bool bAddTime = false;

            foreach (var buff in self.GetBuffList(true))
            {
                int buffId = self.GetBuffID(buff);
                if (keyValues.ContainsKey(buffId))
                {
                    bAddTime = true;
                    break;
                }
            }
            if (bAddTime)
            {
                self.SetBuffTime(buffInfo, self.GetBuffTime(buffInfo) + self.GetDeltaTime());
                self.SetBuffStateTime(buffInfo, self.GetBuffStateTime(buffInfo) + self.GetDeltaTime());
                self.NotifyBuffInfo(buffInfo, BattleInfoNotifyType.Time_Buff, BattleNotifyTime.TickEnd);
            }
            base.Tick(self, buffInfo, buffConfig);
        }
Ejemplo n.º 2
0
		public override void Tick(SkillObj self, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
		{
			Dictionary<int, int> keyValues = new Dictionary<int, int>();
			foreach(var buff in self.GetBuffIntParams(buffConfig).Skip(Key_Int_SummonId_BuffConfig+1))
			{
				keyValues.Add(buff, buff);
			}
			bool bAddTime = false;
			foreach (var buff in self.GetBuffList(true))
			{
				int buffId = self.GetBuffID(buff);
				if(keyValues.ContainsKey(buffId))
				{
					bAddTime = true;
					break;
				}
			}
			if (bAddTime)
			{
				self.SetBuffTime(buffInfo, self.GetBuffTime(buffInfo) + self.GetDeltaTime());
				self.SetBuffStateTime(buffInfo, self.GetBuffStateTime(buffInfo) + self.GetDeltaTime());
				self.NotifyBuffInfo(buffInfo, BattleInfoNotifyType.Time_Buff, BattleNotifyTime.TickEnd);
			}
			base.Tick(self, buffInfo, buffConfig);

		}
Ejemplo n.º 3
0
 public override void OnDamageTarget(SkillObj self, SkillObj target, Damage damage, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
 {
     var buffIds = self.GetBuffIntParams(buffConfig).Skip(Key_Int_SummonObjBuffId_BuffConfig+1);
     foreach (var buffId in buffIds.Where(b=>b>0))
     {
         BattleModule.AddBuff(target, self, buffId, BattleReason.Buff);
     }
     return ;
 }
Ejemplo n.º 4
0
 // 		private const int key_BuffId1_SkillConfig = 0;
 // 		private const int key_BuffId2_SkillConfig = 1;
 // 		private const int key_BuffId3_SkillConfig = 2;
 public override void OnEffect(SkillObj self, SkillObj tarObj, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
 {
     var buffIds = self.GetBuffIntParams(buffConfig);
     foreach(var buffId in buffIds)
     {
         BattleModule.AddBuff(tarObj, self, buffId, BattleReason.Skill);
     }
     return ;
 }
Ejemplo n.º 5
0
        public override void OnDamageTarget(SkillObj self, SkillObj target, Damage damage, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
        {
            var buffIds = self.GetBuffIntParams(buffConfig).Skip(Key_Int_SummonObjBuffId_BuffConfig + 1);

            foreach (var buffId in buffIds.Where(b => b > 0))
            {
                BattleModule.AddBuff(target, self, buffId, BattleReason.Buff);
            }
            return;
        }
Ejemplo n.º 6
0
        //      private const int key_BuffId1_SkillConfig = 0;
        //      private const int key_BuffId2_SkillConfig = 1;
        //      private const int key_BuffId3_SkillConfig = 2;
        public override void OnEffect(SkillObj self, SkillObj tarObj, BuffInfo_New buffInfo, BuffConfig_New buffConfig)
        {
            var buffIds = self.GetBuffIntParams(buffConfig);

            foreach (var buffId in buffIds)
            {
                BattleModule.AddBuff(tarObj, self, buffId, BattleReason.Skill);
            }
            return;
        }