kakysha / HonorSpy

World of Warcraft: Classic HonorSpy addon
57 stars 50 forks source link

Add check and timer for ongoing inspection #201

Closed Slivo-fr closed 2 years ago

Slivo-fr commented 2 years ago

In order to try to solve #198

This is a draft to discuss. Please do not merge it needs further testing.

teelolws commented 2 years ago

Nah cause if the inspect fails and inspect data is never received, the addon will be stuck never inspecting anyone else until the next reload.

Slivo-fr commented 2 years ago

Negative, because of the last_inspect_time check, we start again after 1s if the event doesn't fire (It wasn't properly implemented before my last push)

kakysha commented 2 years ago

fix formatting a bit with obsolete newlines etc.

Slivo-fr commented 2 years ago

There, I may have a tab/spacing issue with my IDE

teelolws commented 2 years ago

I think he means make it more like

` if (

        paused or

        (not C_PlayerInfo.UnitIsSameServer(PlayerLocation:CreateFromUnit(unitID))) or

        currentlyInspecting or

                    ((GetTime() - lastInspectTime) < 1)

    ) then

`

Slivo-fr commented 2 years ago

@teelolws this snippets is outdated, I've updated the implementation since then (I forced push, check https://github.com/kakysha/HonorSpy/pull/201/files)

teelolws commented 2 years ago

My post is still relevant to that.

Slivo-fr commented 2 years ago

We discussed it on discord, all good