Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sangheonhan committed Nov 28, 2023
0 parents commit fe4c28d
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 0 deletions.
52 changes: 52 additions & 0 deletions GearSetManager.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
GearSetManagerDB = GearSetManagerDB or {}

local function SaveSet(name)
local gearSet = {}
for i = 1, 19 do
gearSet[i] = GetInventoryItemLink("player", i)
end
GearSetManagerDB[name] = gearSet
print("Gear set '" .. name .. "' saved for " .. UnitName("player") .. ".")
end

local function LoadSet(name)
local gearSet = GearSetManagerDB[name]
if not gearSet then
print("No gear set named '" .. name .. "'.")
return
end
for i = 1, 19 do
if gearSet[i] then
EquipItemByName(gearSet[i], i)
end
end
print("Gear set '" .. name .. "' equipped.")
end

local function RemoveSet(name)
GearSetManagerDB[name] = nil
print("Gear set '" .. name .. "' removed.")
end

local function ListSets()
print("Saved gear sets for " .. UnitName("player") .. ":")
for name, _ in pairs(GearSetManagerDB) do
print("- " .. name)
end
end

SLASH_GSM1 = "/gsm"
SlashCmdList["GSM"] = function(msg)
local command, rest = msg:match("^(%S*)%s*(.-)$")
if command == "save" and rest ~= "" then
SaveSet(rest)
elseif command == "load" and rest ~= "" then
LoadSet(rest)
elseif command == "remove" and rest ~= "" then
RemoveSet(rest)
elseif command == "list" then
ListSets()
else
print("Usage: /gsm save/load/remove/list [set name]")
end
end
6 changes: 6 additions & 0 deletions GearSetManager.toc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## Interface: 11500
## Title: GearSet Manager
## Notes: Manage and switch gear sets easily.
## Author: HELLFIRE
## SavedVariablesPerCharacter: GearSetManagerDB
GearSetManager.lua
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Gear Set Manager for World of Warcraft

## Overview

The Gear Set Manager is an addon for World of Warcraft that allows players to save, load, and manage multiple gear sets. This utility simplifies switching between different sets of equipment for various in-game activities.

## Features

- **Save Gear Sets:** Save the current equipment of your character under a custom name.
- **Load Gear Sets:** Quickly equip a previously saved set of gear.
- **Remove Gear Sets:** Delete saved gear sets that are no longer needed.
- **List Gear Sets:** View a list of all saved gear sets for your character.

## Commands

The addon introduces the following slash commands for easy management of gear sets:

- `/gsm save [set name]`: Saves your current gear under the specified set name.
- `/gsm load [set name]`: Equips the gear set associated with the specified set name.
- `/gsm remove [set name]`: Removes the specified gear set from your saved sets.
- `/gsm list`: Displays a list of all saved gear sets.

## Installation

1. Download the addon file.
2. Extract the contents to your World of Warcraft `Interface/AddOns` directory.
3. Restart World of Warcraft or use the `/reload` command in-game.

## Usage

After installation, you can use the slash commands in the game to manage your gear sets. For example, to save your current gear set as "Raid Gear", type `/gsm save Raid Gear` in the chat. You can then load this set anytime using `/gsm load Raid Gear`.

## Contributing

Contributions to the Gear Set Manager are welcome. Please submit pull requests or issues through the addon's GitHub repository.

## License

This addon is released under the GNU General Public License v3.0 (GPLv3). For more details, see the [GPLv3 License](https://www.gnu.org/licenses/gpl-3.0.en.html).

## Disclaimer

This is a third-party addon for World of Warcraft. It is not affiliated with, endorsed, or sponsored by Blizzard Entertainment, Inc.

---

Enjoy managing your gear sets in World of Warcraft!

0 comments on commit fe4c28d

Please sign in to comment.