public void NotifyOfEvent(RegenerationType regenerationType) { if (GeneratorId != null) { Generator.NotifyGenerator(Guid, regenerationType); GeneratorId = null; Generator = null; } }
public void NotifyGenerator(ObjectGuid target, RegenerationType eventType) { if (GeneratorDisabled ?? false) { return; } if (GeneratorRegistry.ContainsKey(target.Full)) { int slot = (int)GeneratorRegistry[target.Full].Slot; if (GeneratorProfiles[slot].WhenCreate == (uint)eventType) { GeneratorRegistry.Remove(target.Full); GeneratorCache.Remove(target.Full); QueueGenerator(); } } }
public static RegenerationType ConvertRegenType(int i) { return(RegenerationType.GetRegenerationType(i)); }
/// <summary> /// Constructor for Regeneration Effect /// </summary> /// <param name="regeneration">what do you want regenerate?</param> public RegenerationEffect(RegenerationType regenerationType, int valueToGive, int seconds = 1) { _regenerationType = regenerationType; _valueToGive = valueToGive; _time = seconds; }