2025-03-07 12:52:37 +01:00
|
|
|
local _, addon = ...
|
2024-08-21 12:33:41 +02:00
|
|
|
|
2025-03-01 21:46:55 +01:00
|
|
|
local function ResolveGender(maleVersion, femaleVersion)
|
|
|
|
local gender = UnitSex("player")
|
|
|
|
if gender == 2 then
|
2025-03-07 12:52:37 +01:00
|
|
|
return maleVersion
|
2025-03-01 21:46:55 +01:00
|
|
|
else
|
2025-03-07 12:52:37 +01:00
|
|
|
return femaleVersion == nil and maleVersion or femaleVersion
|
2024-08-21 12:33:41 +02:00
|
|
|
end
|
2025-03-01 21:46:55 +01:00
|
|
|
end
|
2025-03-07 12:52:37 +01:00
|
|
|
addon.API.ResolveGender = ResolveGender
|
2025-03-02 13:25:40 +01:00
|
|
|
|
2025-03-01 21:46:55 +01:00
|
|
|
function CzechQuestsAddon:GetData(key, id)
|
2025-03-07 12:52:37 +01:00
|
|
|
if addon.data[key] then
|
2025-03-01 21:46:55 +01:00
|
|
|
if key == "quest" then
|
2025-03-07 12:52:37 +01:00
|
|
|
return addon.API.GetQuest(id)
|
2025-03-02 13:25:40 +01:00
|
|
|
elseif key == "speech" then
|
2025-03-07 12:52:37 +01:00
|
|
|
return addon.API.GetSpeech(id)
|
|
|
|
elseif addon.data[key][id] then
|
|
|
|
return addon.data[key][id]
|
2025-03-01 21:46:55 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
return nil
|
|
|
|
end
|