autoshift: disable autoshifting in some cases

Don't cancel druid form when clicking on npcs while in combat.
The "Can't speak while shapeshifted" will no longer put you out
of your druid forms while being in combat. This is especially
for bear tanks who better not lose their form while friendly NPCs
are nearby.
This commit is contained in:
shagu
2023-05-18 14:09:42 +02:00
parent f1d709a466
commit cfbea5eea8
+5
View File
@@ -91,6 +91,11 @@ pfUI:RegisterModule("autoshift", "vanilla", function ()
-- scan through buffs and cancel shapeshift/mount
for id, errorstring in pairs(pfUI.autoshift.errors) do
if arg1 == errorstring then
-- dont's cancel form when clicking on npcs while in combat
if arg1 == ERR_CANT_INTERACT_SHAPESHIFTED and UnitAffectingCombat("player") then
return
end
for i=0,31,1 do
-- detect mounts based on tooltip text
pfUI.autoshift.scanner:SetPlayerBuff(i)