public void RemoveBuff(Objects.Unit unit, int handle) { if (unit == null) lua.ArgumentError(2, "Unit cannot be null"); unit.RemoveBuff(handle); }
public void RemoveAllDebuffs(Objects.Unit unit) { if (unit == null) lua.ArgumentError(1, "Unit cannot be null"); List<int> forRemoval = new List<int>(); foreach (int handle in unit.ActiveBuffs.Keys) { if (unit.ActiveBuffs[handle].IsDebuff) { forRemoval.Add(handle); } } foreach (int v in forRemoval) unit.RemoveBuff(v); }