aaronma37 / Deathlog

GNU General Public License v3.0
13 stars 9 forks source link

Instance name not displayed when user dies in instance #77

Closed jhj0517 closed 11 months ago

jhj0517 commented 11 months ago

instance_before It just shows the instance number, like 90 in the log, instead of the name "Gonmeregan".

I also tested with the following fake entry

function Deathlog_DeathAlertFakeDeath()
    local r = math.random(1, 100)
    local s = nil
    for k, _ in pairs(id_to_display_id) do
        if r == 0 then
            s = k
            break
        end
        r = r - 1
    end
    local fake_entry = {
        ["name"] = UnitName("player"),
        ["level"] = UnitLevel("player"),
        ["race_id"] = 3,
        -- ["map_id"] = 1429,
        ["instance_id"] = 90, --34,
        ["class_id"] = 9,
        ["source_id"] = s,
        ["last_words"] = "Sample last words, help!",
    }
    alert_cache[UnitName("player")] = nil
    Deathlog_DeathAlertPlay(fake_entry)
end

instance_before_alert

90 is Gnomeregan's number, but the instance name is not displayed. When user dies in field it displays fine but when user dies in instance ( Deadmines etc ) it does not display.