Added actor:IsFriendlyNpc()

This commit is contained in:
Tercio Jose
2021-03-01 16:19:00 -03:00
parent 2daf700d02
commit b1dd10f166
8 changed files with 97 additions and 8 deletions
+16
View File
@@ -91,6 +91,8 @@
local tooltip_temp_table = {}
local OBJECT_TYPE_FRIENDLY_NPC = 0x00000A18
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> exported functions
@@ -205,6 +207,20 @@
end
return false
end
function Details:IsFriendlyNpc()
local flag = self.flag_original
if (flag) then
if (bit.band(flag, 0x00000008) ~= 0) then
if (bit.band(flag, 0x00000010) ~= 0) then
if (bit.band(flag, 0x00000800) ~= 0) then
return true
end
end
end
end
return false
end
--[[ exported]] function Details:IsEnemy()
if (self.flag_original) then