Skip to content

Commit 6607ae6

Browse files
committed
the player should get the player list which in the same group
1 parent b8a27dc commit 6607ae6

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

NFComm/NFKernelPlugin/NFCKernelModule.cpp

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,21 +1057,25 @@ bool NFCKernelModule::GetGroupObjectList(const int nSceneID, const int nGroupID,
10571057
{
10581058
NFGUID ident = NFGUID();
10591059
NF_SHARE_PTR<int> pRet = pGroupInfo->mxPlayerList.First(ident);
1060-
while (!ident.IsNull() && noSelf != ident)
1060+
for (; pRet; pRet = pGroupInfo->mxPlayerList.Next(ident))
10611061
{
1062-
list.Add(ident);
1062+
if (!ident.IsNull() && ident != noSelf)
1063+
{
1064+
list.Add(ident);
1065+
}
10631066

10641067
ident = NFGUID();
1065-
pRet = pGroupInfo->mxPlayerList.Next(ident);
10661068
}
10671069

10681070
pRet = pGroupInfo->mxOtherList.First(ident);
1069-
while (!ident.IsNull() && noSelf != ident)
1071+
for (; pRet; pRet = pGroupInfo->mxOtherList.Next(ident))
10701072
{
1071-
list.Add(ident);
1073+
if (!ident.IsNull() && ident != noSelf)
1074+
{
1075+
list.Add(ident);
1076+
}
10721077

10731078
ident = NFGUID();
1074-
pRet = pGroupInfo->mxOtherList.Next(ident);
10751079
}
10761080

10771081
return true;
@@ -1169,24 +1173,28 @@ bool NFCKernelModule::GetGroupObjectList(const int nSceneID, const int nGroupID,
11691173
{
11701174
NFGUID ident = NFGUID();
11711175
NF_SHARE_PTR<int> pRet = pGroupInfo->mxPlayerList.First(ident);
1172-
while (!ident.IsNull() && ident != noSelf)
1176+
for (; pRet; pRet = pGroupInfo->mxPlayerList.Next(ident))
11731177
{
1174-
list.Add(ident);
1178+
if (!ident.IsNull() && ident != noSelf)
1179+
{
1180+
list.Add(ident);
1181+
}
11751182

11761183
ident = NFGUID();
1177-
pRet = pGroupInfo->mxPlayerList.Next(ident);
11781184
}
11791185
}
11801186
else
11811187
{
11821188
NFGUID ident = NFGUID();
11831189
NF_SHARE_PTR<int> pRet = pGroupInfo->mxOtherList.First(ident);
1184-
while (!ident.IsNull() && ident != noSelf)
1190+
for (; pRet; pRet = pGroupInfo->mxOtherList.Next(ident))
11851191
{
1186-
list.Add(ident);
1192+
if (!ident.IsNull() && ident != noSelf)
1193+
{
1194+
list.Add(ident);
1195+
}
11871196

11881197
ident = NFGUID();
1189-
pRet = pGroupInfo->mxOtherList.Next(ident);
11901198
}
11911199
}
11921200

0 commit comments

Comments
 (0)