Skip to content

Commit

Permalink
Finished Warlock trainers
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudbells committed Aug 25, 2019
1 parent 6d87340 commit 690e3d6
Show file tree
Hide file tree
Showing 4 changed files with 257 additions and 111 deletions.
198 changes: 196 additions & 2 deletions Database/Trainers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,204 @@ FieldGuide.HUNTER_PET_TRAINERS = {

FieldGuide.WARLOCK_PET_TRAINERS = {
["ALLIANCE"] = {

[1] = {
["name"] = "Wren Darkspring",
["rep"] = FieldGuide.factions.gnomeregan_exiles,
["map"] = FieldGuide.maps.dun_morogh,
["x"] = 28.8,
["y"] = 66.2,
["Blood Pact"] = true,
["Fire Shield"] = true,
["Firebolt"] = true,
["Phase Shift"] = true
},
[2] = {
["name"] = "Dane Winslow",
["rep"] = FieldGuide.factions.stormwind,
["map"] = FieldGuide.maps.elwynn_forest,
["x"] = 50.0,
["y"] = 42.6,
["Blood Pact"] = true,
["Fire Shield"] = true,
["Firebolt"] = true,
["Phase Shift"] = true
},
[3] = {
["name"] = "Dannie Fizzwizzle",
["rep"] = FieldGuide.factions.gnomeregan_exiles,
["map"] = FieldGuide.maps.dun_morogh,
["x"] = 47.2,
["y"] = 53.6,
["Blood Pact"] = true,
["Consume Shadows"] = true,
["Fire Shield"] = true,
["Firebolt"] = true,
["Phase Shift"] = true,
["Sacrifice"] = true,
["Suffering"] = true,
["Torment"] = true
},
[4] = {
["name"] = "Dannie Fizzwizzle",
["rep"] = FieldGuide.factions.stormwind,
["map"] = FieldGuide.maps.elwynn_forest,
["x"] = 44.4,
["y"] = 66.0,
["Blood Pact"] = true,
["Consume Shadows"] = true,
["Fire Shield"] = true,
["Firebolt"] = true,
["Phase Shift"] = true,
["Sacrifice"] = true,
["Suffering"] = true,
["Torment"] = true
},
[5] = {
["name"] = "Jubahl Corpseseeker",
["rep"] = FieldGuide.factions.gnomeregan_exiles,
["map"] = FieldGuide.maps.ironforge,
["x"] = 52.7,
["y"] = 6.1,
["Blood Pact"] = true,
["Consume Shadows"] = true,
["Devour Magic"] = true,
["Fire Shield"] = true,
["Firebolt"] = true,
["Lash of Pain"] = true,
["Lesser Invisibility"] = true,
["Paranoia"] = true,
["Phase Shift"] = true,
["Sacrifice"] = true,
["Seduction"] = true,
["Soothing Kiss"] = true,
["Spell Lock"] = true,
["Suffering"] = true,
["Tainted Blood"] = true,
["Torment"] = true
},
[6] = {
["name"] = "Spackle Thornberry",
["rep"] = FieldGuide.factions.gnomeregan_exiles,
["map"] = FieldGuide.maps.stormwind,
["x"] = 25.7,
["y"] = 77.7,
["Blood Pact"] = true,
["Consume Shadows"] = true,
["Devour Magic"] = true,
["Fire Shield"] = true,
["Firebolt"] = true,
["Lash of Pain"] = true,
["Lesser Invisibility"] = true,
["Paranoia"] = true,
["Phase Shift"] = true,
["Sacrifice"] = true,
["Seduction"] = true,
["Soothing Kiss"] = true,
["Spell Lock"] = true,
["Suffering"] = true,
["Tainted Blood"] = true,
["Torment"] = true
}
},
["HORDE"] = {

[1] = {
["name"] = "Kayla Smithe",
["rep"] = FieldGuide.factions.undercity,
["map"] = FieldGuide.maps.tirisfal_glades,
["x"] = 30.8,
["y"] = 66.2,
["Blood Pact"] = true,
["Fire Shield"] = true,
["Firebolt"] = true,
["Phase Shift"] = true
},
[2] = {
["name"] = "Hraug",
["rep"] = FieldGuide.factions.orgrimmar,
["map"] = FieldGuide.maps.durotar,
["x"] = 40.6,
["y"] = 68.4,
["Blood Pact"] = true,
["Fire Shield"] = true,
["Firebolt"] = true,
["Phase Shift"] = true
},
[3] = {
["name"] = "Gina Lang",
["rep"] = FieldGuide.factions.undercity,
["map"] = FieldGuide.maps.tirisfal_glades,
["x"] = 61.6,
["y"] = 52.6,
["Blood Pact"] = true,
["Consume Shadows"] = true,
["Fire Shield"] = true,
["Firebolt"] = true,
["Phase Shift"] = true,
["Sacrifice"] = true,
["Suffering"] = true,
["Torment"] = true
},
[4] = {
["name"] = "Kitha",
["rep"] = FieldGuide.factions.orgrimmar,
["map"] = FieldGuide.maps.durotar,
["x"] = 54.6,
["y"] = 41.4,
["Blood Pact"] = true,
["Consume Shadows"] = true,
["Fire Shield"] = true,
["Firebolt"] = true,
["Phase Shift"] = true,
["Sacrifice"] = true,
["Suffering"] = true,
["Torment"] = true
},
[5] = {
["name"] = "Kurgul",
["rep"] = FieldGuide.factions.orgrimmar,
["map"] = FieldGuide.maps.orgrimmar,
["x"] = 47.6,
["y"] = 47.6,
["Blood Pact"] = true,
["Consume Shadows"] = true,
["Devour Magic"] = true,
["Fire Shield"] = true,
["Firebolt"] = true,
["Lash of Pain"] = true,
["Lesser Invisibility"] = true,
["Paranoia"] = true,
["Phase Shift"] = true,
["Sacrifice"] = true,
["Seduction"] = true,
["Soothing Kiss"] = true,
["Spell Lock"] = true,
["Suffering"] = true,
["Tainted Blood"] = true,
["Torment"] = true
},
[6] = {
["name"] = "Martha Strain",
["rep"] = FieldGuide.factions.undercity,
["map"] = FieldGuide.maps.undercity,
["x"] = 85.6,
["y"] = 15.8,
["Blood Pact"] = true,
["Consume Shadows"] = true,
["Devour Magic"] = true,
["Fire Shield"] = true,
["Firebolt"] = true,
["Lash of Pain"] = true,
["Lesser Invisibility"] = true,
["Paranoia"] = true,
["Phase Shift"] = true,
["Sacrifice"] = true,
["Seduction"] = true,
["Soothing Kiss"] = true,
["Spell Lock"] = true,
["Suffering"] = true,
["Tainted Blood"] = true,
["Torment"] = true
}
}
}

Expand Down
34 changes: 16 additions & 18 deletions FieldGuide.lua
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
--[[
TODO:
---------------------------------------
1. Add price for the pinned vendor in the tooltip.
2. Add Warlock trainers.
3. Add logic for finding closest Warlock pet trainer – refactor so it isn't shit.
4. Add tomes.
5. Add tutorial (shift+scroll for horizontal scroll/shift+right-click for marking all of the same spells etc)
6. (Add racials.)
7. (Add professions.)
8. (Allow player to scroll manually.)
9. (Make it so the scroll doesn't reset back to the top after each filtering option changes.)
10. (Add travel logic.)
11. Add PvP rank and change uimapid's for launch.
12. Update README's.
13. Take a new pic for curseforge/github.
14. Upload to wowinterface.
1. Add tomes.
2. Add tutorial (shift+scroll for horizontal scroll/shift+right-click for marking all of the same spells etc)
3. (Add racials.)
4. (Add professions.)
5. (Allow player to scroll manually.)
6. (Make it so the scroll doesn't reset back to the top after each filtering option changes.)
7. Update README's.
8. Take a new pic for curseforge/github.
9. Upload to wowinterface.
---------------------------------------
]]

Expand Down Expand Up @@ -127,7 +122,9 @@ local function findClosestTrainer(skill)
or (selectedClass == "HUNTER_PETS" and FieldGuide.HUNTER_PET_TRAINERS[tempFaction])
or (selectedClass == "WARLOCK_PETS" and FieldGuide.WARLOCK_PET_TRAINERS[tempFaction])
or FieldGuide.SPELL_TRAINERS[selectedClass][tempFaction]) do
if selectedClass == "WEAPONS" and trainer[skill.spellId] or skill.level ~= nil and not (skill.level > 6 and trainer.noob) then
if selectedClass == "WARLOCK_PETS" and trainer[skill.name]
or selectedClass == "WEAPONS" and trainer[skill.spellId]
or selectedClass ~= "WARLOCK_PETS" and selectedClass ~= "HUNTER_PETS" and skill.level ~= nil and not (skill.level > 6 and trainer.noob) then
local distance = getDistance(trainer.x / 100, trainer.y / 100, trainer.map)
if FieldGuide.getContinent(trainer.map) == instance and distance < sameContinentDistance then
sameContinentDistance = distance
Expand Down Expand Up @@ -210,7 +207,7 @@ end
-- Returns the cost modifier (0.9 if player is honored or rank 3, 0.8 if both, 1 otherwise).
local function getCostModifier()
local honored = false
-- local rankThree = UnitPVPRank("player") > 7
local rankThree = UnitPVPRank("player") > 7
if isAlliance() then
honored = select(3, GetFactionInfoByID(72)) > 5 or select(3, GetFactionInfoByID(69)) > 5 or select(3, GetFactionInfoByID(47)) > 5 or select(3, GetFactionInfoByID(54)) > 5
else
Expand Down Expand Up @@ -745,7 +742,7 @@ function FieldGuideSpellButton_OnClick(self, button)
else
trainer = findClosestTrainer(self)
end
if not doesPinExist(trainer.name) and self.spellCost ~= 0 then
if tomtom and self.spellCost ~= 0 or not doesPinExist(trainer.name) and self.spellCost ~= 0 then
addMapPin(trainer.map, trainer.x, trainer.y, trainer.name)
if not tomtom then
FieldGuideOptions.pins[#FieldGuideOptions.pins + 1] = {
Expand All @@ -755,7 +752,8 @@ function FieldGuideSpellButton_OnClick(self, button)
["name"] = trainer.name
}
end
print("Added a marker to your closest trainer!")
print("|cFFFFFF00[Field Guide]:|r Added a marker to |cFFFF0000" .. trainer.name .. "|r in " .. hbd:GetLocalizedMap(trainer.map) ..
" at |cFF00FF00(" .. trainer.x * 100 .. ", " .. trainer.y * 100 .. ")|r.")
end
end
end
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Best used with [TomTom](https://www.curseforge.com/wow/addons/tomtom).
- Right click to mark spells as unwanted.
- Shift-right click a spell to mark all ranks of that spell as unwanted.

![Current progress](https://i.imgur.com/CIbDcin.png)
![Current progress](https://i.imgur.com/bhADKsT.png)

## Features
- Shows you which spells each class learns every level to plan when you need to go back to town (includes Warlock demon spells and Hunter pet skills).
Expand All @@ -29,3 +29,5 @@ Best used with [TomTom](https://www.curseforge.com/wow/addons/tomtom).

## Bugs
- Some spells and ranks might be wrong, as I've gone off private server and Classic Wowhead (please get an API) data, both of which currently aren't very accurate. For example, on a certain private server (rhymes with Blight's Rope), Shadowburn rank 6 cost 2g 20s while it should have cost 11s only (baseline).

If you notice any inaccuracies or bugs please let me know!
Loading

0 comments on commit 690e3d6

Please sign in to comment.