I am trying to find out why I have this strange behaviour. In my branch I leverage LFG system to enable bots to join Dungeon Finder. Everything works perfectly except that I get one bot in group twice!
The methods I call are:
1. sLFGMgr.Join() supplying LFGPlayerState all the necessary parameters. One call per player.
2. Listen for SMSG_LFG_PROPOSAL_UPDATE and accepting the proposal using sLFGMgr.UpdateProposal(). One call per player.
3. Listen for SMSG_LFG_ROLE_CHECK_UPDATE and setting roles finishing with sLFGMgr.UpdateRoleCheck(). One call per player.
LFGMgr::TryCreateGroup returns the correct group.
The log filtered by double-joined player guid (7326):
2013-01-17 10:53:56 LFGMgr::AddToQueue: player 7326 joined, type 1
2013-01-17 10:53:56 LFGMgr::AddToSearchMatrix 7326 added, dungeons size 17
2013-01-17 10:53:56 SMSG_LFG_UPDATE_PLAYER 7326 updatetype: 5
2013-01-17 10:53:56 SMSG_LFG_UPDATE_SEARCH 7326 update: 1
2013-01-17 10:53:56 SMSG_LFG_UPDATE_SEARCH 7326 update: 1
2013-01-17 10:54:06 SMSG_LFG_QUEUE_STATUS 7326 dungeonEntry: 1
2013-01-17 10:54:42 SMSG_LFG_QUEUE_STATUS 7326 dungeonEntry: 1
2013-01-17 10:54:55 LFGMgr::SetRoles role for player 7326 set to 4
2013-01-17 10:54:55 LFGMgr::RemoveFromSearchMatrix 7326 removed, dungeons size 17
2013-01-17 10:54:55 SMSG_LFG_UPDATE_PLAYER 7326 updatetype: 10
2013-01-17 10:54:55 SMSG_LFG_UPDATE_PLAYER 7326 updatetype: 13
2013-01-17 10:54:55 SMSG_LFG_PROPOSAL_UPDATE proposal 1, player 7326, state: 0
2013-01-17 10:55:00 SMSG_LFG_UPDATE_PLAYER 7326 updatetype: 10
2013-01-17 10:55:00 LFGMgr::RemoveFromQueue: player 7326 removed, type 1
2013-01-17 10:55:00 LFGMgr::RemoveFromSearchMatrix 7326 removed, dungeons size 17
2013-01-17 10:55:00 LFGMgr::RemoveFromSearchMatrix 7326 removed, dungeons size 17
!twice in group!
2013-01-17 10:55:00 ERROR:SQL: INSERT INTO group_member(groupId,memberGuid,memberFlags,subgroup,roles) VALUES('3','7326','0','0','5')
2013-01-17 10:55:00 ERROR:SQL ERROR: Duplicate entry '3-7326' for key 'PRIMARY'
2013-01-17 10:55:01 LFGMgr::AddEvent guid 7326 type 1
2013-01-17 10:55:01 LFGMgr::AddEvent guid 7326 type 1
I don't think this is R2 bug. Likely I am missing some call or calling something twice. What could be the cause of such issue? Did anybody experienced this with non-bot players?
The methods I call are:
1. sLFGMgr.Join() supplying LFGPlayerState all the necessary parameters. One call per player.
2. Listen for SMSG_LFG_PROPOSAL_UPDATE and accepting the proposal using sLFGMgr.UpdateProposal(). One call per player.
3. Listen for SMSG_LFG_ROLE_CHECK_UPDATE and setting roles finishing with sLFGMgr.UpdateRoleCheck(). One call per player.
LFGMgr::TryCreateGroup returns the correct group.
The log filtered by double-joined player guid (7326):
2013-01-17 10:53:56 LFGMgr::AddToQueue: player 7326 joined, type 1
2013-01-17 10:53:56 LFGMgr::AddToSearchMatrix 7326 added, dungeons size 17
2013-01-17 10:53:56 SMSG_LFG_UPDATE_PLAYER 7326 updatetype: 5
2013-01-17 10:53:56 SMSG_LFG_UPDATE_SEARCH 7326 update: 1
2013-01-17 10:53:56 SMSG_LFG_UPDATE_SEARCH 7326 update: 1
2013-01-17 10:54:06 SMSG_LFG_QUEUE_STATUS 7326 dungeonEntry: 1
2013-01-17 10:54:42 SMSG_LFG_QUEUE_STATUS 7326 dungeonEntry: 1
2013-01-17 10:54:55 LFGMgr::SetRoles role for player 7326 set to 4
2013-01-17 10:54:55 LFGMgr::RemoveFromSearchMatrix 7326 removed, dungeons size 17
2013-01-17 10:54:55 SMSG_LFG_UPDATE_PLAYER 7326 updatetype: 10
2013-01-17 10:54:55 SMSG_LFG_UPDATE_PLAYER 7326 updatetype: 13
2013-01-17 10:54:55 SMSG_LFG_PROPOSAL_UPDATE proposal 1, player 7326, state: 0
2013-01-17 10:55:00 SMSG_LFG_UPDATE_PLAYER 7326 updatetype: 10
2013-01-17 10:55:00 LFGMgr::RemoveFromQueue: player 7326 removed, type 1
2013-01-17 10:55:00 LFGMgr::RemoveFromSearchMatrix 7326 removed, dungeons size 17
2013-01-17 10:55:00 LFGMgr::RemoveFromSearchMatrix 7326 removed, dungeons size 17
!twice in group!
2013-01-17 10:55:00 ERROR:SQL: INSERT INTO group_member(groupId,memberGuid,memberFlags,subgroup,roles) VALUES('3','7326','0','0','5')
2013-01-17 10:55:00 ERROR:SQL ERROR: Duplicate entry '3-7326' for key 'PRIMARY'
2013-01-17 10:55:01 LFGMgr::AddEvent guid 7326 type 1
2013-01-17 10:55:01 LFGMgr::AddEvent guid 7326 type 1
I don't think this is R2 bug. Likely I am missing some call or calling something twice. What could be the cause of such issue? Did anybody experienced this with non-bot players?