Scan on "PLAYER_ALIVE" Event changed to only execute when player releases spirit (not on "Feign Death" or resurrect by player)
This commit is contained in:
@@ -250,6 +250,9 @@ end
|
|||||||
|
|
||||||
-- *** Event Handlers ***
|
-- *** Event Handlers ***
|
||||||
local function OnPlayerAlive()
|
local function OnPlayerAlive()
|
||||||
|
-- print("Altoholic.lua") -- DEBUG 2025 07 21
|
||||||
|
if not UnitIsGhost("player") then return end -- only scan if player released spirit and went to graveyard
|
||||||
|
|
||||||
ScanFriends()
|
ScanFriends()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -176,6 +176,9 @@ local function OnPlayerGuildUpdate()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function OnPlayerAlive()
|
local function OnPlayerAlive()
|
||||||
|
-- print("DataStore.lua") -- DEBUG 2025 07 21
|
||||||
|
if not UnitIsGhost("player") then return end -- only scan if player released spirit and went to graveyard
|
||||||
|
|
||||||
Characters[GetKey()].faction = UnitFactionGroup("player")
|
Characters[GetKey()].faction = UnitFactionGroup("player")
|
||||||
OnPlayerGuildUpdate()
|
OnPlayerGuildUpdate()
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -234,6 +234,9 @@ end
|
|||||||
|
|
||||||
-- *** EVENT HANDLERS ***
|
-- *** EVENT HANDLERS ***
|
||||||
function addon:PLAYER_ALIVE()
|
function addon:PLAYER_ALIVE()
|
||||||
|
-- print("DataStore_Achievements.lua") -- DEBUG 2025 07 21
|
||||||
|
if not UnitIsGhost("player") then return end -- only scan if player released spirit and went to graveyard
|
||||||
|
|
||||||
ScanAllAchievements()
|
ScanAllAchievements()
|
||||||
ScanProgress()
|
ScanProgress()
|
||||||
addon.ThisCharacter.guid = strsub(UnitGUID("player"), 3) -- get rid at the 0x at the beginning of the string
|
addon.ThisCharacter.guid = strsub(UnitGUID("player"), 3) -- get rid at the 0x at the beginning of the string
|
||||||
|
|||||||
@@ -87,6 +87,9 @@ local function OnPlayerMoney()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function OnPlayerAlive()
|
local function OnPlayerAlive()
|
||||||
|
-- print("DataStore_Characters.lua") -- DEBUG 2025 07 21
|
||||||
|
if not UnitIsGhost("player") then return end -- only scan if player released spirit and went to graveyard
|
||||||
|
|
||||||
local character = addon.ThisCharacter
|
local character = addon.ThisCharacter
|
||||||
|
|
||||||
character.name = UnitName("player") -- to simplify processing a bit, the name is saved in the table too, in addition to being part of the key
|
character.name = UnitName("player") -- to simplify processing a bit, the name is saved in the table too, in addition to being part of the key
|
||||||
|
|||||||
@@ -533,6 +533,9 @@ end
|
|||||||
|
|
||||||
-- *** Event Handlers ***
|
-- *** Event Handlers ***
|
||||||
local function OnPlayerAlive()
|
local function OnPlayerAlive()
|
||||||
|
-- print("DataStore_Crafts.lua") -- DEBUG 2025 07 21
|
||||||
|
if not UnitIsGhost("player") then return end -- only scan if player released spirit and went to graveyard
|
||||||
|
|
||||||
ScanProfessionLinks()
|
ScanProfessionLinks()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -168,6 +168,9 @@ end
|
|||||||
|
|
||||||
-- *** Event Handlers ***
|
-- *** Event Handlers ***
|
||||||
local function OnPlayerAlive()
|
local function OnPlayerAlive()
|
||||||
|
-- print("DataStore_Inventory.lua") -- DEBUG 2025 07 21
|
||||||
|
if not UnitIsGhost("player") then return end -- only scan if player released spirit and went to graveyard
|
||||||
|
|
||||||
ScanInventory()
|
ScanInventory()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,9 @@ end
|
|||||||
|
|
||||||
-- *** Event Handlers ***
|
-- *** Event Handlers ***
|
||||||
local function OnPlayerAlive()
|
local function OnPlayerAlive()
|
||||||
|
-- print("DataStore_Pets.lua") -- DEBUG 2025 07 21
|
||||||
|
if not UnitIsGhost("player") then return end -- only scan if player released spirit and went to graveyard
|
||||||
|
|
||||||
ScanCompanions("CRITTER")
|
ScanCompanions("CRITTER")
|
||||||
ScanCompanions("MOUNT")
|
ScanCompanions("MOUNT")
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -176,6 +176,9 @@ end
|
|||||||
|
|
||||||
-- *** Event Handlers ***
|
-- *** Event Handlers ***
|
||||||
local function OnPlayerAlive()
|
local function OnPlayerAlive()
|
||||||
|
-- print("DataStore_Quests.lua") -- DEBUG 2025 07 21
|
||||||
|
if not UnitIsGhost("player") then return end -- only scan if player released spirit and went to graveyard
|
||||||
|
|
||||||
ScanQuests()
|
ScanQuests()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -157,6 +157,9 @@ end
|
|||||||
|
|
||||||
-- *** EVENT HANDLERS ***
|
-- *** EVENT HANDLERS ***
|
||||||
function addon:PLAYER_ALIVE()
|
function addon:PLAYER_ALIVE()
|
||||||
|
-- print("DataStore_Reputations.lua") -- DEBUG 2025 07 21
|
||||||
|
if not UnitIsGhost("player") then return end -- only scan if player released spirit and went to graveyard
|
||||||
|
|
||||||
ScanReputations()
|
ScanReputations()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -170,6 +170,9 @@ end
|
|||||||
|
|
||||||
-- *** EVENT HANDLERS ***
|
-- *** EVENT HANDLERS ***
|
||||||
function addon:PLAYER_ALIVE()
|
function addon:PLAYER_ALIVE()
|
||||||
|
-- print("DataStore_Skills.lua") -- DEBUG 2025 07 21
|
||||||
|
if not UnitIsGhost("player") then return end -- only scan if player released spirit and went to graveyard
|
||||||
|
|
||||||
ScanSkills()
|
ScanSkills()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -104,6 +104,9 @@ end
|
|||||||
|
|
||||||
-- *** EVENT HANDLERS ***
|
-- *** EVENT HANDLERS ***
|
||||||
function addon:PLAYER_ALIVE()
|
function addon:PLAYER_ALIVE()
|
||||||
|
-- print("DataStore_Spells.lua") -- DEBUG 2025 07 21
|
||||||
|
if not UnitIsGhost("player") then return end -- only scan if player released spirit and went to graveyard
|
||||||
|
|
||||||
ScanSpells()
|
ScanSpells()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -147,5 +147,8 @@ end
|
|||||||
|
|
||||||
-- *** EVENT HANDLERS ***
|
-- *** EVENT HANDLERS ***
|
||||||
function addon:PLAYER_ALIVE()
|
function addon:PLAYER_ALIVE()
|
||||||
|
-- print("DataStore_Stats.lua") -- DEBUG 2025 07 21
|
||||||
|
if not UnitIsGhost("player") then return end -- only scan if player released spirit and went to graveyard
|
||||||
|
|
||||||
ScanStats()
|
ScanStats()
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -413,6 +413,9 @@ end
|
|||||||
|
|
||||||
-- *** EVENT HANDLERS ***
|
-- *** EVENT HANDLERS ***
|
||||||
function addon:PLAYER_ALIVE()
|
function addon:PLAYER_ALIVE()
|
||||||
|
-- print("DataStore_Talents.lua") -- DEBUG 2025 07 21
|
||||||
|
if not UnitIsGhost("player") then return end -- only scan if player released spirit and went to graveyard
|
||||||
|
|
||||||
ScanTalents()
|
ScanTalents()
|
||||||
ScanTalentReference()
|
ScanTalentReference()
|
||||||
ScanGlyphs()
|
ScanGlyphs()
|
||||||
|
|||||||
Reference in New Issue
Block a user