Beispiel #1
0
CPartyDef::CPartyDef( CChar *pCharInvite, CChar *pCharAccept )
{
	// pCharInviter = the master.
	AcceptMember(pCharInvite);
	AcceptMember(pCharAccept);
	SendAddList(NULL);		// send full list to all
	UpdateWaypointAll(pCharInvite, PartyMember);
	m_sName.Format("Party_0%lx", static_cast<DWORD>(pCharInvite->GetUID()));
}
Beispiel #2
0
void CPartyDef::AcceptMember( CChar *pChar )
{
	ADDTOCALLSTACK("CPartyDef::AcceptMember");
	// This person has accepted to be part of the party.
	ASSERT(pChar);

	pChar->m_pParty = this;
	AttachChar(pChar);
	SendAddList(NULL);
}
Beispiel #3
0
bool CPartyDef::SetMaster( CChar *pNewMaster )
{
	if ( !pNewMaster )
		return false;
	else if ( !IsInParty(pNewMaster) || IsPartyMaster(pNewMaster) )
		return false;

	size_t i = m_Chars.InsertChar(pNewMaster, 0);
	SendAddList(NULL);
	return (i == 0);
}
Beispiel #4
0
CPartyDef::CPartyDef( CChar * pChar1, CChar *pChar2 )
{
	// pChar1 = the master.
	ASSERT(pChar1);
	ASSERT(pChar2);
	pChar1->m_pParty = this;
	pChar2->m_pParty = this;
	AttachChar(pChar1);
	AttachChar(pChar2);
	SendAddList( NULL );	// send full list to all.
	m_sName.Format("Party_0%lx", (DWORD)pChar1->GetUID());
}