protected virtual void OnBuffUnlocked(BuffEventArgs e) { if (BuffUnlocked != null) { BuffUnlocked.Invoke(this, e); } }
public void UnlockBuff(Buff buff) { if (m_LockedBuffs.Contains(buff)) { m_LockedBuffs.Remove(buff); m_UnlockedBuffs.Add(buff); BuffEventArgs eventArgs = new BuffEventArgs() { buff = buff }; OnBuffUnlocked(eventArgs); } }
private static void Character_OnBuffRemove(BuffEventArgs args) { var target = args.Buff.Target; if (target == null || !(target is Character)) { return; } var targetChar = (Character)target; if (!CharacterBuffStates.ContainsKey(targetChar.Name)) { return; } CharacterBuffStates[targetChar.Name].RemoveBuff(args.Buff); }
private void OnBuffUnlocked(object sender, BuffEventArgs e) { m_BuffMenu.AddBuff(e.buff, InteractionMode.Drag); }