Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fda04907c2 | |||
| e95e65fca5 | |||
| 044b6593ec | |||
| fbb3e94b93 |
@@ -6,7 +6,7 @@ RelationshipsAttune = RelationshipsAttune or {}
|
|||||||
local RA = RelationshipsAttune
|
local RA = RelationshipsAttune
|
||||||
local L = RelationshipsAttune_L
|
local L = RelationshipsAttune_L
|
||||||
|
|
||||||
RA.VERSION = "1.4.0"
|
RA.VERSION = "1.4.2"
|
||||||
RA.COMM_PREFIX = "RATTUNE"
|
RA.COMM_PREFIX = "RATTUNE"
|
||||||
|
|
||||||
RA.playerName = nil
|
RA.playerName = nil
|
||||||
@@ -329,9 +329,13 @@ function RA:EvaluateStep(step)
|
|||||||
return (UnitLevel("player") or 0) >= (step.level or 0), false
|
return (UnitLevel("player") or 0) >= (step.level or 0), false
|
||||||
elseif step.type == "quest" then
|
elseif step.type == "quest" then
|
||||||
local st = RelationshipsAttuneCharDB.quests[step.id]
|
local st = RelationshipsAttuneCharDB.quests[step.id]
|
||||||
if st == "complete" or st == "turnedin" then
|
if st == "turnedin" then
|
||||||
return true, false
|
return true, false
|
||||||
elseif st == "inlog" then
|
elseif st == "complete" or st == "inlog" then
|
||||||
|
-- Quest is in the log (either accepted or ready to turn in).
|
||||||
|
-- Treat both as "on this step" (orange) until it is actually
|
||||||
|
-- turned in. Retroactive completion will still mark this
|
||||||
|
-- step green once the player advances to a later step.
|
||||||
return false, true
|
return false, true
|
||||||
end
|
end
|
||||||
return false, false
|
return false, false
|
||||||
@@ -398,6 +402,34 @@ function RA:EvaluateAttunement(att)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
-- Retroactive completion: if the player is on a later step (done or in
|
||||||
|
-- progress), any earlier quest/item steps must already be done. Quests
|
||||||
|
-- get turned in and key items get consumed, so their live state can
|
||||||
|
-- flip back to "not done" even though the player clearly finished
|
||||||
|
-- them. Level and reputation steps have their own live truth and are
|
||||||
|
-- left alone.
|
||||||
|
local laterActive = false
|
||||||
|
for i = numSteps, 1, -1 do
|
||||||
|
local step = att.steps[i]
|
||||||
|
if step and self:StepApplies(step) then
|
||||||
|
if laterActive and steps[i] == false then
|
||||||
|
local t = step.type
|
||||||
|
if t == "quest" or t == "item" then
|
||||||
|
steps[i] = true
|
||||||
|
stepsInProgress[i] = false
|
||||||
|
doneCount = doneCount + 1
|
||||||
|
if t == "quest" then
|
||||||
|
RelationshipsAttuneCharDB.quests[step.id] = "turnedin"
|
||||||
|
elseif t == "item" then
|
||||||
|
RelationshipsAttuneCharDB.items[step.id] = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if steps[i] == true or stepsInProgress[i] == true then
|
||||||
|
laterActive = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
local persistedDone = RelationshipsAttuneCharDB.completedAttunements and RelationshipsAttuneCharDB.completedAttunements[att.id]
|
local persistedDone = RelationshipsAttuneCharDB.completedAttunements and RelationshipsAttuneCharDB.completedAttunements[att.id]
|
||||||
if persistedDone or (finalIdx and steps[finalIdx] == true) then
|
if persistedDone or (finalIdx and steps[finalIdx] == true) then
|
||||||
for i = 1, numSteps do
|
for i = 1, numSteps do
|
||||||
|
|||||||
@@ -307,7 +307,7 @@ RelationshipsAttune_Data = {
|
|||||||
-- VANILLA KEYS & DUNGEON ACCESS
|
-- VANILLA KEYS & DUNGEON ACCESS
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
{
|
{
|
||||||
id = "ubrs", name = "Upper Blackrock Spire (Seal of Ascension)", category = "Keys & Access", faction = "Both",
|
id = "ubrs", name = "Upper Blackrock Spire (Seal)", category = "Keys & Access", faction = "Both",
|
||||||
icon = "Interface\\Icons\\INV_Misc_Key_04",
|
icon = "Interface\\Icons\\INV_Misc_Key_04",
|
||||||
steps = {
|
steps = {
|
||||||
{ type = "level", level = 55, name = "Reach Level 55", icon = ICON_LEVEL },
|
{ type = "level", level = 55, name = "Reach Level 55", icon = ICON_LEVEL },
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<img src="https://cdn.discordapp.com/attachments/1510333697277300856/1524819837270884362/kkk.gif?ex=6a5122a2&is=6a4fd122&hm=b82d19b995b2d1f8b252fcbaf44dcaa7b5f30255fb1401f50f931919c980a4ce&"/>
|
<img src="https://cdn.discordapp.com/attachments/1158418666883395656/1526959667941474304/v.png?ex=6a58eb82&is=6a579a02&hm=dbc8525f4040f4cc7d276f22c3a8ecce16a4930bdf168676d7075e116097b8e2&"/>
|
||||||
|
|
||||||
|
|
||||||
# RelationshipsAttune
|
# RelationshipsAttune
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
## Title: Relationships Attune
|
## Title: Relationships Attune
|
||||||
## Notes: Track Vanilla and Turtle/Octo WoW attunement progress
|
## Notes: Track Vanilla and Turtle/Octo WoW attunement progress
|
||||||
## Author: Relationship
|
## Author: Relationship
|
||||||
## Version: 1.4
|
## Version: 1.5
|
||||||
## X-Category: Quest
|
## X-Category: Quest
|
||||||
## SavedVariables: RelationshipsAttuneDB
|
## SavedVariables: RelationshipsAttuneDB
|
||||||
## SavedVariablesPerCharacter: RelationshipsAttuneCharDB
|
## SavedVariablesPerCharacter: RelationshipsAttuneCharDB
|
||||||
|
|||||||
Reference in New Issue
Block a user