Skip to content
This repository was archived by the owner on Feb 3, 2026. It is now read-only.

Commit 4e10b2c

Browse files
committed
fix: 修复子插件逻辑中 bOnline 兼容性问题
1 parent 0b2e615 commit 4e10b2c

File tree

8 files changed

+46
-47
lines changed

8 files changed

+46
-47
lines changed

MY_Cataclysm/src/MY_CataclysmParty.lua

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ end
181181

182182
local function OpenRaidDragPanel(dwMemberID)
183183
local hTeam = GetClientTeam()
184-
local tMemberInfo = hTeam.GetMemberInfo(dwMemberID)
184+
local tMemberInfo = X.GetTeamMemberInfo(dwMemberID)
185185
if not tMemberInfo then
186186
return
187187
end
@@ -202,7 +202,7 @@ local function OpenRaidDragPanel(dwMemberID)
202202

203203
local hImageLife = hMember:Lookup('Image_Health')
204204
local hImageMana = hMember:Lookup('Image_Mana')
205-
if tMemberInfo.bIsOnLine then
205+
if tMemberInfo.bOnline then
206206
local fCurrentLife, fMaxLife = X.GetCharacterLife(tMemberInfo)
207207
if fMaxLife > 0 then
208208
hImageLife:SetPercentage(fCurrentLife / fMaxLife)
@@ -330,7 +330,7 @@ end
330330
function D.SetTargetTeammate(dwID, info)
331331
if X.IsInPubgMap() and X.GetClientPlayer().nMoveState == MOVE_STATE.ON_DEATH then
332332
BattleField_MatchPlayer(dwID)
333-
elseif info.bIsOnLine and CanTarget(dwID) then -- 有待考证
333+
elseif info.bOnline and CanTarget(dwID) then -- 有待考证
334334
if CFG.bTempTargetEnable then
335335
X.DelayCall('MY_Cataclysm_TempTarget', false)
336336
CTM_TEMP_TARGET_TYPE, CTM_TEMP_TARGET_ID = nil
@@ -436,7 +436,7 @@ function MY_CataclysmParty_Base.OnItemMouseEnter()
436436
OnItemRefreshTip()
437437
local dwID = (this.bBuff and this:GetParent():GetParent().dwID) or (this.bRole and this.dwID)
438438
local info = dwID ~= CTM_TEMP_TARGET_ID and CTM:GetMemberInfo(dwID) or nil
439-
if info and info.bIsOnLine and CanTarget(dwID) and CFG.bTempTargetEnable then
439+
if info and info.bOnline and CanTarget(dwID) and CFG.bTempTargetEnable then
440440
X.DelayCall('MY_Cataclysm_TempTarget', false)
441441
local function fnAction()
442442
if not CTM_TEMP_TARGET_TYPE then
@@ -534,12 +534,12 @@ function MY_CataclysmParty_Base.OnItemRButtonClick()
534534
table.insert(menu, v)
535535
end
536536
end
537-
table.insert(menu, { szOption = g_tStrings.STR_LOOKUP, bDisable = not info.bIsOnLine, fnAction = function()
537+
table.insert(menu, { szOption = g_tStrings.STR_LOOKUP, bDisable = not info.bOnline, fnAction = function()
538538
X.ViewOtherPlayerByID(dwID)
539539
end })
540540
if MY_CharInfo and MY_CharInfo.ViewCharInfoToPlayer then
541541
table.insert(menu, {
542-
szOption = g_tStrings.STR_LOOK .. g_tStrings.STR_EQUIP_ATTR, bDisable = not info.bIsOnLine, fnAction = function()
542+
szOption = g_tStrings.STR_LOOK .. g_tStrings.STR_EQUIP_ATTR, bDisable = not info.bOnline, fnAction = function()
543543
MY_CharInfo.ViewCharInfoToPlayer(dwID)
544544
end
545545
})
@@ -1963,7 +1963,7 @@ function CTM:DrawHPMP(h, dwID, info, bRefresh)
19631963
if CFG.nBGColorMode ~= CTM_BG_COLOR_MODE.BY_DISTANCE then
19641964
if h.nDistanceLevel then
19651965
nAlpha = CFG.tDistanceAlpha[h.nDistanceLevel]
1966-
elseif info.bIsOnLine then
1966+
elseif info.bOnline then
19671967
nAlpha = CFG.tOtherAlpha[3]
19681968
else
19691969
nAlpha = CFG.tOtherAlpha[2]
@@ -1991,13 +1991,13 @@ function CTM:DrawHPMP(h, dwID, info, bRefresh)
19911991
end
19921992
if bSha then
19931993
local r, g, b = unpack(CFG.tManaColor)
1994-
if not info.bIsOnLine then
1994+
if not info.bOnline then
19951995
r, g, b = unpack(CFG.tOtherCol[2]) -- 不在线就灰色了
19961996
end
19971997
self:DrawShadow(Msha, hMana:GetW() * nPercentage, Msha:GetH(), r, g, b, nAlpha, CFG.bManaGradient)
19981998
Msha:Show()
19991999
else
2000-
if info.bIsOnLine then
2000+
if info.bOnline then
20012001
Mimg:ToNormal()
20022002
else
20032003
Mimg:ToGray()
@@ -2048,7 +2048,7 @@ function CTM:DrawHPMP(h, dwID, info, bRefresh)
20482048
-- 颜色计算
20492049
local nNewW = hLife:GetW() * fLifePercentage
20502050
local r, g, b = unpack(CFG.tOtherCol[2]) -- 不在线就灰色了
2051-
if info.bIsOnLine then
2051+
if info.bOnline then
20522052
if CFG.nBGColorMode == CTM_BG_COLOR_MODE.BY_DISTANCE then
20532053
if player or X.GetPlayer(dwID) then
20542054
if h.nDistanceLevel then
@@ -2073,7 +2073,7 @@ function CTM:DrawHPMP(h, dwID, info, bRefresh)
20732073
Ledg:SetAlpha(nAlpha)
20742074
Ledg:SetRelX(nRelX)
20752075
Ledg:SetAbsX(hLife:GetAbsX() + nRelX)
2076-
if info.bIsOnLine then
2076+
if info.bOnline then
20772077
Limg:ToNormal()
20782078
else
20792079
Limg:ToGray()
@@ -2091,15 +2091,15 @@ function CTM:DrawHPMP(h, dwID, info, bRefresh)
20912091
-- 数值绘制
20922092
local life = h:Lookup('Text_Life')
20932093
local nFontAlpha = math.min(nAlpha * 0.4 + 255 * 0.6, 255)
2094-
if not info.bIsOnLine then
2094+
if not info.bOnline then
20952095
nFontAlpha = nFontAlpha * 0.8
20962096
end
20972097
life:SetAlpha(nAlpha == 0 and 0 or nFontAlpha)
20982098
life:SetFontScheme(CFG.nLifeFont)
20992099
life:SetFontScale(CFG.fLifeFontScale)
21002100
h:Lookup('Text_Name'):SetAlpha(nFontAlpha)
21012101

2102-
if not bDeathFlag and info.bIsOnLine then
2102+
if not bDeathFlag and info.bOnline then
21032103
life:SetFontColor(255, 255, 255)
21042104
if CFG.nHPShownMode2 == 0 then
21052105
life:SetText('')
@@ -2125,7 +2125,7 @@ function CTM:DrawHPMP(h, dwID, info, bRefresh)
21252125
end
21262126
end
21272127
end
2128-
elseif not info.bIsOnLine then
2128+
elseif not info.bOnline then
21292129
life:SetText('')
21302130
elseif bDeathFlag then
21312131
life:SetText('')
@@ -2137,10 +2137,10 @@ function CTM:DrawHPMP(h, dwID, info, bRefresh)
21372137
-- life:SetText('sync ...')
21382138
-- end
21392139
h:Lookup('Text_Death'):SetVisible(bDeathFlag)
2140-
h:Lookup('Text_OffLine'):SetVisible(not info.bIsOnLine)
2140+
h:Lookup('Text_OffLine'):SetVisible(not info.bOnline)
21412141
h:Lookup('Text_Death'):SetFontScale(CFG.fLifeFontScale)
21422142
h:Lookup('Text_OffLine'):SetFontScale(CFG.fLifeFontScale)
2143-
h:Lookup('Image_PlayerBg'):SetVisible(info.bIsOnLine)
2143+
h:Lookup('Image_PlayerBg'):SetVisible(info.bOnline)
21442144
end
21452145
end
21462146

@@ -2157,11 +2157,11 @@ function CTM:RefreshSputtering()
21572157
for _, dwID in pairs(tGroupInfo.MemberList) do
21582158
local info, nCount = team.GetMemberInfo(dwID), 0
21592159
local player = X.GetPlayer(dwID)
2160-
if player and not info.bDeathFlag and info.bIsOnLine then
2160+
if player and not info.bDeathFlag and info.bOnline then
21612161
for _, dwID2 in pairs(tGroupInfo.MemberList) do
21622162
local info2 = team.GetMemberInfo(dwID2)
21632163
local player2 = X.GetPlayer(dwID2)
2164-
if player2 and not info2.bDeathFlag and info2.bIsOnLine
2164+
if player2 and not info2.bDeathFlag and info2.bOnline
21652165
and X.GetCharacterDistance(player, player2, 'gwwean') <= CFG.nSputteringDistance then
21662166
nCount = nCount + 1
21672167
end
@@ -2227,7 +2227,7 @@ function CTM:StartTeamVote(eType)
22272227
for k, v in pairs(CTM_CACHE) do
22282228
if v:IsValid() then
22292229
local info = self:GetMemberInfo(k)
2230-
local bAwait = info.bIsOnLine
2230+
local bAwait = info.bOnline
22312231
if k == X.GetClientPlayerID() then
22322232
if eType == 'raid_ready' then
22332233
bAwait = false

MY_GKP/src/MY_GKP.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,8 @@ end
277277
function D.GetTeamMemberMenu(fnAction, bDisable, bSelf)
278278
local tTeam, menu = {}, {}
279279
for _, v in ipairs(GetClientTeam().GetTeamMemberList()) do
280-
local info = GetClientTeam().GetMemberInfo(v)
281-
table.insert(tTeam, { szName = info.szName, dwID = v, dwForce = info.dwForceID, bIsOnLine = info.bIsOnLine})
280+
local info = X.GetTeamMemberInfo(v)
281+
table.insert(tTeam, { szName = info.szName, dwID = v, dwForce = info.dwForceID, bOnline = info.bOnline})
282282
end
283283
local dwID = X.GetClientPlayerID()
284284
table.sort(tTeam, function(a, b) return a.dwForce < b.dwForce end)
@@ -288,7 +288,7 @@ function D.GetTeamMemberMenu(fnAction, bDisable, bSelf)
288288
table.insert(menu, {
289289
szOption = v.szName,
290290
szLayer = 'ICON_RIGHTMOST',
291-
bDisable = bDisable and not v.bIsOnLine,
291+
bDisable = bDisable and not v.bOnline,
292292
szIcon = szIcon,
293293
nFrame = nFrame,
294294
rgb = { X.GetForceColor(v.dwForce) },

MY_GKP/src/MY_GKPLoot.lua

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,21 +1382,20 @@ function D.DistributeItem(dwID, info, szAutoDistType, bSkipRecordPanel)
13821382
end
13831383
end
13841384
local item = GetItem(info.dwID)
1385-
local team = GetClientTeam()
1386-
local player = team.GetMemberInfo(dwID)
1385+
local playerInfo = X.GetTeamMemberInfo(dwID)
13871386
local aPartyMember = D.GetaPartyMember(info.dwDoodadID)
13881387
if item then
1389-
if not player or (player and not player.bIsOnLine) then -- 不在线
1388+
if not playerInfo or (playerInfo and not playerInfo.bOnline) then -- 不在线
13901389
return X.Alert(_L['No Pick up Object, may due to Network off - line'])
13911390
end
13921391
if not aPartyMember(dwID) then -- 给不了
13931392
return X.Alert(_L['No Pick up Object, may due to Network off - line'])
13941393
end
1395-
if player.dwMapID ~= me.GetMapID() then -- 不在同一地图
1394+
if playerInfo.dwMapID ~= me.GetMapID() then -- 不在同一地图
13961395
return X.Alert(_L['No Pick up Object, Please confirm that in the Dungeon.'])
13971396
end
13981397
local tab = {
1399-
szPlayer = player.szName,
1398+
szPlayer = playerInfo.szName,
14001399
dwID = item.dwID,
14011400
nUiId = item.nUiId,
14021401
szNpcName = info.szDoodadName,
@@ -1406,7 +1405,7 @@ function D.DistributeItem(dwID, info, szAutoDistType, bSkipRecordPanel)
14061405
nVersion = item.nVersion,
14071406
nTime = GetCurrentTime(),
14081407
nQuality = item.nQuality,
1409-
dwForceID = player.dwForceID,
1408+
dwForceID = playerInfo.dwForceID,
14101409
szName = X.GetItemNameByItem(item),
14111410
nGenre = item.nGenre,
14121411
}

MY_Recount/src/MY_Recount_DS.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1724,9 +1724,9 @@ X.RegisterEvent('MY_RECOUNT_NEW_FIGHT', function() --
17241724
local me = X.GetClientPlayer()
17251725
if team and me and (me.IsInParty() or me.IsInRaid()) then
17261726
for _, dwID in ipairs(team.GetTeamMemberList()) do
1727-
local info = team.GetMemberInfo(dwID)
1727+
local info = X.GetTeamMemberInfo(dwID)
17281728
if info then
1729-
if not info.bIsOnLine then
1729+
if not info.bOnline then
17301730
D.OnTeammateStateChange(dwID, true, AWAYTIME_TYPE.OFFLINE, true)
17311731
elseif info.bDeathFlag then
17321732
D.OnTeammateStateChange(dwID, true, AWAYTIME_TYPE.DEATH, true)

MY_TeamTools/src/MY_CombatLogs.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -797,10 +797,10 @@ X.RegisterEvent('MY_RECOUNT_NEW_FIGHT', function() --
797797
return
798798
end
799799
for _, dwID in ipairs(team.GetTeamMemberList()) do
800-
local info = team.GetMemberInfo(dwID)
800+
local info = X.GetTeamMemberInfo(dwID)
801801
if info and D.WillRecID(dwID) then
802802
D.OnTargetUpdate(dwID)
803-
if not info.bIsOnLine then
803+
if not info.bOnline then
804804
D.InsertLog(LOG_TYPE.PARTY_SET_MEMBER_ONLINE_FLAG, { team.dwTeamID, dwID, 0 })
805805
elseif info.bDeathFlag then
806806
D.InsertLog(LOG_TYPE.SYS_MSG_UI_OME_DEATH_NOTIFY, { dwID, nil })

MY_TeamTools/src/MY_TeamTools_Achievement.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,12 @@ X.RegisterEvent('LOADING_ENDING', function()
223223
end)
224224

225225
-- 获取成员列表
226-
function D.GetMemberList(bIsOnLine)
226+
function D.GetMemberList(bOnline)
227227
local aList = {}
228228
if MY_TeamTools.szStatRange == 'RAID' then
229229
for _, dwID in ipairs(X.GetTeamMemberList()) do
230230
local tMember = X.GetTeamMemberInfo(dwID)
231-
if tMember and (not bIsOnLine or tMember.bOnline) then
231+
if tMember and (not bOnline or tMember.bOnline) then
232232
table.insert(aList, {
233233
dwID = tMember.dwID,
234234
szGlobalID = tMember.szGlobalID,

MY_TeamTools/src/MY_TeamTools_Summary.lua

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ function D.CalculateSort(tInfo)
198198
nCount = tInfo[RT_SORT_FIELD]
199199
end
200200
end
201-
if nCount == 0 and not tInfo.bIsOnLine then
201+
if nCount == 0 and not tInfo.bOnline then
202202
nCount = -2
203203
end
204204
return nCount
@@ -269,7 +269,7 @@ function D.UpdateList(page)
269269
end
270270
local hBuff = h:Lookup('Box_Buff')
271271
local hBox = h:Lookup('Box_Grandpa')
272-
if not v.bIsOnLine then
272+
if not v.bOnline then
273273
h.hHandle_Equip.Pool:Clear()
274274
h:Lookup('Text_Toofar1'):Show()
275275
h:Lookup('Text_Toofar1'):SetText(g_tStrings.STR_GUILD_OFFLINE)
@@ -279,7 +279,7 @@ function D.UpdateList(page)
279279
h:Lookup('Text_Toofar1'):Show()
280280
if MY_TeamTools.szStatRange == 'ROOM' then
281281
h:Lookup('Text_Toofar1'):SetText('-')
282-
elseif v.bIsOnLine then
282+
elseif v.bOnline then
283283
h:Lookup('Text_Toofar1'):SetText(_L['Too far'])
284284
end
285285
hBuff:Hide()
@@ -476,7 +476,7 @@ function D.UpdateList(page)
476476
else
477477
if MY_TeamTools.szStatRange == 'ROOM' then
478478
hScore:SetText('-')
479-
elseif v.bIsOnLine then
479+
elseif v.bOnline then
480480
hScore:SetText(_L['Loading'])
481481
else
482482
hScore:SetText(g_tStrings.STR_GUILD_OFFLINE)
@@ -841,11 +841,11 @@ function D.GetTeamData(page)
841841
nCopyID = nil, -- 秘境ID
842842
tBossKill = {}, -- 秘境进度
843843
nFightState = KPlayer and KPlayer.bFightState and 1 or 0, -- 战斗状态
844-
bIsOnLine = true,
844+
bOnline = true,
845845
bGrandpa = false, -- 大爷
846846
}
847847
if tMember.bOnline ~= nil then
848-
tInfo.bIsOnLine = tMember.bOnline
848+
tInfo.bOnline = tMember.bOnline
849849
end
850850
if KPlayer then
851851
-- 小吃和buff
@@ -868,7 +868,7 @@ function D.GetTeamData(page)
868868
end
869869
-- 秘境进度
870870
if MY_TeamTools.szStatRange == 'RAID' then
871-
if tInfo.bIsOnLine and bCDProgressMap then
871+
if tInfo.bOnline and bCDProgressMap then
872872
for i, boss in ipairs(aProgressMapBoss) do
873873
tInfo.tBossKill[i] = GetDungeonRoleProgress(RT_MAP_ID, tMember.dwID, boss.dwProgressID)
874874
end
@@ -897,8 +897,8 @@ function D.ApplyTeamEquip(page)
897897
local team = GetClientTeam()
898898
for _, tMember in ipairs(D.GetMemberList()) do
899899
if tMember.dwID ~= X.GetClientPlayerID() then
900-
local info = team.GetMemberInfo(tMember.dwID)
901-
if info.bIsOnLine then
900+
local info = X.GetTeamMemberInfo(tMember.dwID)
901+
if info.bOnline then
902902
D.ApplyRemotePlayerView(page, tMember.dwID, tMember.dwServerID, tMember.szGlobalID)
903903
end
904904
end
@@ -907,12 +907,12 @@ function D.ApplyTeamEquip(page)
907907
end
908908

909909
-- 获取团队成员列表
910-
function D.GetMemberList(bIsOnLine)
910+
function D.GetMemberList(bOnline)
911911
local aList = {}
912912
if MY_TeamTools.szStatRange == 'RAID' then
913913
for _, dwID in ipairs(X.GetTeamMemberList()) do
914914
local tMember = X.GetTeamMemberInfo(dwID)
915-
if tMember and (not bIsOnLine or tMember.bOnline) then
915+
if tMember and (not bOnline or tMember.bOnline) then
916916
table.insert(aList, {
917917
dwID = tMember.dwID,
918918
szGlobalID = tMember.szGlobalID,

MY_Toolbox/src/MY_Love.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -932,8 +932,8 @@ function D.RequestBackupLover()
932932
local lover = X.Clone(D.lover)
933933
if lover.nLoverType == 1 then -- 双向
934934
local kTarget = D.GetNearbyPlayerByXID(lover.xID)
935-
local info = kTarget and GetClientTeam().GetMemberInfo(kTarget.dwID)
936-
if not info or not info.bIsOnLine then
935+
local info = kTarget and X.GetTeamMemberInfo(kTarget.dwID)
936+
if not info or not info.bOnline then
937937
X.OutputSystemAnnounceMessage(_L['Lover must in your team and online to do backup.'])
938938
else
939939
X.SendBgMsg(lover.szName, 'MY_LOVE', {'BACKUP'})

0 commit comments

Comments
 (0)