public HotkeyObjectAction(Core.Appearances.AppearanceType appearanceType, UseActionTarget actionTarget) { if (!appearanceType) { throw new System.ArgumentNullException("HotkeyObjectAction.HotkeyObjectAction: invalid appearance type"); } if (appearanceType.Category != AppearanceCategory.Object) { throw new System.Exception("HotkeyObjectAction.HotkeyObjectAction: invalid appearance type."); } AppearanceType = appearanceType; ActionTarget = actionTarget; }
public HotkeyObjectAction(Core.Appearances.AppearanceType appearanceType, UseActionTarget actionTarget) { if (!appearanceType) { throw new System.ArgumentNullException("HotkeyObjectAction.HotkeyObjectAction: invalid appearance type"); } if (appearanceType.Category != AppearanceCategory.Object) { throw new System.Exception("HotkeyObjectAction.HotkeyObjectAction: invalid appearance type."); } AppearanceType = appearanceType; if (AppearanceType.IsMultiUse && actionTarget == UseActionTarget.Auto) { actionTarget = UseActionTarget.CrossHair; } else if (!AppearanceType.IsMultiUse && actionTarget != UseActionTarget.Auto) { actionTarget = UseActionTarget.Auto; } ActionTarget = actionTarget; }