public ProcHandler(Unit creator, Unit owner, ProcHandlerTemplate template) { CreatorRef = new WeakRef(creator); Owner = owner; Template = template; m_stackCount = template.StackCount; }
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; }
/// <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); }
/// <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); }
/// <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); } }
/// <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; } } } }
public void AddProcHandler(ProcHandlerTemplate templ) { AddProcHandler(new ProcHandler(this, this, templ)); }
public ProcHandler(Unit owner, ProcHandlerTemplate template) { Owner = owner; Template = template; m_stackCount = template.StackCount; }