P2PJoin: member is not in same channel PID: 2553 channel 4, this channel 1
Any fix?
Code
- void CParty::P2PJoin(DWORD dwPID)
- {
- TMemberMap::iterator it = m_memberMap.find(dwPID);
- if (it == m_memberMap.end())
- {
- TMember Member;
- Member.pCharacter = NULL;
- Member.bNear = false;
- if (m_memberMap.empty())
- {
- Member.bRole = PARTY_ROLE_LEADER;
- m_dwLeaderPID = dwPID;
- }
- else
- Member.bRole = PARTY_ROLE_NORMAL;
- if (m_bPCParty)
- {
- LPCHARACTER ch = CHARACTER_MANAGER::instance().FindByPID(dwPID);
- if (ch)
- {
- sys_log(0, "PARTY: Join %s pid %u leader %u", ch->GetName(), dwPID, m_dwLeaderPID);
- Member.strName = ch->GetName();
- if (Member.bRole == PARTY_ROLE_LEADER)
- m_iLeadership = ch->GetLeadershipSkillLevel();
- }
- else
- {
- CCI * pcci = P2P_MANAGER::instance().FindByPID(dwPID);
- if (!pcci);
- else if (pcci->bChannel == g_bChannel)
- Member.strName = pcci->szName;
- else
- sys_err("member is not in same channel PID: %u channel %d, this channel %d", dwPID, pcci->bChannel, g_bChannel);
- }
- }
- sys_log(2, "PARTY[%d] MemberCountChange %d -> %d", GetLeaderPID(), GetMemberCount(), GetMemberCount()+1);
- m_memberMap.insert(TMemberMap::value_type(dwPID, Member));
- if (m_memberMap.size() == 1)
- m_itNextOwner = m_memberMap.begin();
- if (m_bPCParty)
- {
- CPartyManager::instance().SetPartyMember(dwPID, this);
- SendPartyJoinOneToAll(dwPID);
- LPCHARACTER ch = CHARACTER_MANAGER::instance().FindByPID(dwPID);
- if (ch)
- SendParameter(ch);
- }
- }
- if (m_pkDungeon)
- {
- m_pkDungeon->QuitParty(this);
- }
- }