From e2041ec6ebac38d4da5c47b94a819149ed058a4c Mon Sep 17 00:00:00 2001 From: Slivo-fr Date: Sun, 6 Sep 2020 16:44:42 +0200 Subject: [PATCH] Fix lua error with non hunter users --- src/rotation.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/rotation.lua b/src/rotation.lua index 831b74c..668c62f 100644 --- a/src/rotation.lua +++ b/src/rotation.lua @@ -134,6 +134,11 @@ function TranqRotate:isPlayerNextTranq() local player = TranqRotate:getHunter(nil, UnitGUID("player")) + -- Non hunter user + if (player == nil) then + return false + end + if (not player.nextTranq) then local isRotationInitialized = false;