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; }
public UseActionImpl(Vector3Int absolutePosition, Appearances.ObjectInstance objectInstance, int positionOrData, UseActionTarget useTarget) { Init(absolutePosition, objectInstance?.Type, positionOrData, useTarget); }
public HotkeyObjectAction(Core.Appearances.ObjectInstance @object, UseActionTarget actionTarget) : this(@object?.Type, actionTarget) { }
public HotkeyObjectAction(ushort objectId, UseActionTarget actionTarget) : this(OpenTibiaUnity.AppearanceStorage.GetObjectType(objectId), actionTarget) { }
internal static UseActionImpl CreateUseAction(Vector3Int absolutePosition, ObjectInstance objectInstance, int stackPosOrData, Vector3Int targetAbsolute, ObjectInstance targetObject, int targetStackPosOrData, UseActionTarget useTarget) { return(new UseActionImpl(absolutePosition, objectInstance, stackPosOrData, targetAbsolute, targetObject, targetStackPosOrData, useTarget)); }
public static UseActionImpl CreateUseAction(Vector3Int absolutePosition, AppearanceType appearanceType, int stackPosOrData, Vector3Int targetAbsolute, ObjectInstance targetObject, int targetStackPosOrData, UseActionTarget useTarget) { return(new UseActionImpl(absolutePosition, appearanceType, stackPosOrData, targetAbsolute, targetObject, targetStackPosOrData, useTarget)); }