1
0
Bifurcation 0

First tests failed to add the elders, these fixes SHOULD do the trick.

Cette révision appartient à :
Nathanial.C.Jones 2011-01-23 22:57:08 +00:00
Parent 626a79e0f0
révision 89f5743b84
1 fichiers modifiés avec 7 ajouts et 7 suppressions

Voir le fichier

@ -261,8 +261,8 @@ end
local elders = {
["Alliance"] = {
["Bladeswift"] = "DARNASSUS 39 32",
["Bronzebeard"] = "IRONFORGE 29 16",
["Bladeswift"] = "Darnassus 39 32",
["Bronzebeard"] = "Ironforge 29 16",
["Hammershout"] = "Elwynn Forest 34 50"
},
["Horde"] = {
@ -394,20 +394,20 @@ local function searchElders(input, yield_countdown, yield_countdown_max)
local achievement_match, elder_match = false, false
for achievement, eldrs in pairs(elders) do
if input and input ~= "" then
if input == achievement then achievement_match = true end
if input == string.upper(achievement) then achievement_match = true end
end
for elder, elder_loc in pairs(eldrs) do
if input and input ~= "" then
if achievement_match then -- just add it
yc = searchLoc(elder_loc, yc, yield_countdown_max)
elseif input == elder then -- We have input and it's not an achievement, so it must be an elder.
yc = searchLoc(string.upper(elder_loc), yc, yield_countdown_max)
elseif input == string.upper(elder) then -- We have input and it's not an achievement, so it must be an elder.
elder_match = true
yc = searchLoc(elder_loc, yc, yield_countdown_max)
yc = searchLoc(string.upper(elder_loc), yc, yield_countdown_max)
break -- We've found him or her.
end -- No need for else here. We've got input so we either have an achievement or we have an elder.
else -- We came in without an input, therefore we add all.
yc = searchLoc(elder_loc, yc, yield_countdown_max)
yc = searchLoc(string.upper(elder_loc), yc, yield_countdown_max)
end
end