aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/SmartScripts
diff options
context:
space:
mode:
authorTeleqraph <nyrdeveloper@gmail.com>2023-07-20 19:09:27 +0200
committerGitHub <noreply@github.com>2023-07-20 19:09:27 +0200
commit88ff97c1f96381565c47f8ca1993bdc7fce19fd6 (patch)
treee2b89eb2da0a1a01e8f4eef0a37328e997cb344c /src/server/game/AI/SmartScripts
parentd4112334142f85addcf784bf3b4fb3b04773f1cd (diff)
Core/Units: Added helper functions to modify UNIT_FLAG_UNINTERACTIBLE (#29159)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
Diffstat (limited to 'src/server/game/AI/SmartScripts')
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index b27e0847c3f..561ec21655f 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -2438,10 +2438,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
if (IsUnit(target))
{
- if (e.action.setUninteractible.uninteractible)
- target->ToUnit()->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
- else
- target->ToUnit()->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
+ target->ToUnit()->SetUninteractible(e.action.setUninteractible.uninteractible != 0);
}
}
break;