Skip to content

Commit

Permalink
CourtOfStars/Trash: Non-English clues will also print to chat in Engl…
Browse files Browse the repository at this point in the history
…ish. Maybe fix First Aid check.
  • Loading branch information
funkydude committed Jul 26, 2017
1 parent 5d5c5a1 commit 0d5dc90
Showing 1 changed file with 34 additions and 25 deletions.
59 changes: 34 additions & 25 deletions Legion/CourtOfStars/Trash.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,28 @@ mod:RegisterEnableMob(
108154 -- Arcane Keys
)

--------------------------------------------------------------------------------
-- Locals
--

local englishSpyFound = "I found the spy!"
local englishClueNames = {
"Cape",
"No Cape",
"Pouch",
"Potions",
"Long Sleeves",
"Short Sleeves",
"Gloves",
"No Gloves",
"Male",
"Female",
"Light Vest",
"Dark Vest",
"No Potions",
"Book",
}

--------------------------------------------------------------------------------
-- Localization
--
Expand Down Expand Up @@ -96,25 +118,10 @@ if L then

L.clueFound = "Clue found (%d/5): |cffffffff%s|r"
L.spyFound = "Spy found by %s!"
L.spyFoundChat = "I found the spy!"
L.spyFoundChat = englishSpyFound
L.spyFoundPattern = "Now now, let's not be hasty" -- Now now, let's not be hasty [player]. Why don't you follow me so we can talk about this in a more private setting...

L.hints = {
"Cape",
"No Cape",
"Pouch",
"Potions",
"Long Sleeves",
"Short Sleeves",
"Gloves",
"No Gloves",
"Male",
"Female",
"Light Vest",
"Dark Vest",
"No Potions",
"Book",
}
L.hints = englishClueNames

-- Cape
L["I heard the spy enjoys wearing capes."] = 1
Expand Down Expand Up @@ -420,7 +427,7 @@ do
["Healer"] = true,
},
["professions"] = {
[135966] = 100, -- First Aid
[135966] = 760, -- First Aid -- XXX Guess
[136249] = 100, -- Tailoring
},
},
Expand Down Expand Up @@ -473,9 +480,9 @@ do
wipe(knownClues)
end

local function sendChatMessage(msg)
local function sendChatMessage(msg, english)
if IsInGroup() then
SendChatMessage(("[LittleWigs] %s"):format(msg), IsInGroup(2) and "INSTANCE_CHAT" or "PARTY")
SendChatMessage(english and ("[LittleWigs] %s / %s"):format(msg, english) or ("[LittleWigs] %s"):format(msg), IsInGroup(2) and "INSTANCE_CHAT" or "PARTY")
end
end

Expand Down Expand Up @@ -522,11 +529,13 @@ do
end

local clue = GetGossipText()
if L[clue] then
if not knownClues[L[clue]] then
sendChatMessage(L.hints[L[clue]])
local num = L[clue]
if num then
if not knownClues[num] then
local text = L.hints[num]
sendChatMessage(text, englishClueNames[num] ~= text and englishClueNames[num])
end
mod:Sync("clue", L[clue])
mod:Sync("clue", num)
else
--if spyEventHelper then -- XXX temp until we are more clued up
if not knownClues[clue] then
Expand All @@ -543,7 +552,7 @@ do
self:Message("spy_helper", "Positive", "Info", L.spyFound:format(self:ColorName(target)), false)
self:CloseInfo("spy_helper")
if target == self:UnitName("player") then
sendChatMessage(L.spyFoundChat)
sendChatMessage(L.spyFoundChat, englishSpyFound ~= L.spyFoundChat and englishSpyFound)
SetRaidTarget("target", 8)
else
for unit in self:IterateGroup() do
Expand Down

0 comments on commit 0d5dc90

Please sign in to comment.