Skip to content

Commit 770e00e

Browse files
committed
feat: 团队监控禁止在副本外监控来自其他玩家的角色战斗事件
1 parent 54a888d commit 770e00e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

MY_TeamMon/src/MY_TeamMon.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,6 +1366,9 @@ end
13661366
function D.OnNpcEvent(npc, bEnter)
13671367
local data = D.GetData('NPC', npc.dwTemplateID)
13681368
local nTime = GetTime()
1369+
if MY_TEAM_MON_SHIELDED_OTHER_PLAYER and X.IsPlayer(npc.dwEmployer) and npc.dwEmployer ~= MY_TEAM_MON_CORE_PLAYERID then
1370+
return
1371+
end
13691372
if bEnter then
13701373
if not CACHE.NPC_LIST[npc.dwTemplateID] then
13711374
CACHE.NPC_LIST[npc.dwTemplateID] = {
@@ -1521,6 +1524,9 @@ end
15211524
function D.OnDoodadEvent(doodad, bEnter)
15221525
local data = D.GetData('DOODAD', doodad.dwTemplateID)
15231526
local nTime = GetTime()
1527+
if MY_TEAM_MON_SHIELDED_OTHER_PLAYER and X.IsPlayer(doodad.dwEmployer) and doodad.dwEmployer ~= MY_TEAM_MON_CORE_PLAYERID then
1528+
return
1529+
end
15241530
if bEnter then
15251531
if not CACHE.DOODAD_LIST[doodad.dwTemplateID] then
15261532
CACHE.DOODAD_LIST[doodad.dwTemplateID] = {

0 commit comments

Comments
 (0)