Example #1
0
 public ProcHandler(Unit creator, Unit owner, ProcHandlerTemplate template)
 {
     CreatorRef   = new WeakRef(creator);
     Owner        = owner;
     Template     = template;
     m_stackCount = template.StackCount;
 }
Example #2
0
 public ProcHandler(Unit creator, Unit owner, ProcHandlerTemplate template)
 {
     this.CreatorRef   = new WeakReference <Unit>(creator);
     this.Owner        = owner;
     this.Template     = template;
     this.m_stackCount = template.StackCount;
 }
Example #3
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);
		}
Example #4
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);
		}
Example #5
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);
     }
 }
Example #6
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;
					}
				}
			}
		}
Example #7
0
		public void AddProcHandler(ProcHandlerTemplate templ)
		{
			AddProcHandler(new ProcHandler(this, this, templ));
		}
Example #8
0
		public ProcHandler(Unit creator, Unit owner, ProcHandlerTemplate template)
		{
			CreatorRef = new WeakRef(creator);
			Owner = owner;
			Template = template;
			m_stackCount = template.StackCount;
		}
Example #9
0
		public ProcHandler(Unit owner, ProcHandlerTemplate template)
		{
			Owner = owner;
			Template = template;
			m_stackCount = template.StackCount;
		}