Exemple #1
0
		/// <summary>
		/// Add Handler which, when used, can proc this Spell 
		/// </summary>
		public void AddCasterProcHandler(ProcHandlerTemplate handler)
		{
			if (CasterProcHandlers == null)
			{
				CasterProcHandlers = new List<ProcHandlerTemplate>();
			}
			handler.IsAttackerTriggerer = true;
			CasterProcHandlers.Add(handler);
		}
Exemple #2
0
		/// <summary>
		/// Add Handler which can proc this Spell on their Target
		/// </summary>
		public void AddTargetProcHandler(ProcHandlerTemplate handler)
		{
			if (TargetProcHandlers == null)
			{
				TargetProcHandlers = new List<ProcHandlerTemplate>();
			}
			handler.IsAttackerTriggerer = false;
			TargetProcHandlers.Add(handler);
		}
Exemple #3
0
 /// <summary>
 /// Add Handler to be enabled when this aura spell is active
 /// </summary>
 public void AddProcHandler(ProcHandlerTemplate handler)
 {
     if (ProcHandlers == null)
     {
         ProcHandlers = new List<ProcHandlerTemplate>();
     }
     ProcHandlers.Add(handler);
     if (Effects.Length == 0)
     {
         // need at least one effect to make this work
         AddAuraEffect(AuraType.Dummy);
     }
 }
Exemple #4
0
		/// <summary>
		/// Removes the first custom ProcHandler that uses the given template.
		/// </summary>
		public void RemoveProcHandler(ProcHandlerTemplate template)
		{
			if (m_procHandlers != null)
			{
				foreach (var handler in m_procHandlers)
				{
					if (handler is ProcHandler && ((ProcHandler)handler).Template == template)
					{
						m_procHandlers.Remove(handler);
						break;
					}
				}
			}
		}
Exemple #5
0
		public void AddProcHandler(ProcHandlerTemplate templ)
		{
			AddProcHandler(new ProcHandler(this, this, templ));
		}
Exemple #6
0
		public ProcHandler(Unit creator, Unit owner, ProcHandlerTemplate template)
		{
			CreatorRef = new WeakRef(creator);
			Owner = owner;
			Template = template;
			m_stackCount = template.StackCount;
		}
Exemple #7
0
		public ProcHandler(Unit owner, ProcHandlerTemplate template)
		{
			Owner = owner;
			Template = template;
			m_stackCount = template.StackCount;
		}