Add UserGroupStatus (untested).

This commit is contained in:
Kyle Sanderson
2015-02-25 20:44:07 -08:00
parent 6558e1b71f
commit 9a6fd52be8
4 changed files with 55 additions and 1 deletions
+16 -1
View File
@@ -23,13 +23,15 @@ SteamWorksForwards::SteamWorksForwards() :
m_CallbackValidateTicket(this, &SteamWorksForwards::OnValidateTicket),
m_CallbackSteamConnected(this, &SteamWorksForwards::OnSteamServersConnected),
m_CallbackSteamConnectFailure(this, &SteamWorksForwards::OnSteamServersConnectFailure),
m_CallbackSteamDisconnected(this, &SteamWorksForwards::OnSteamServersDisconnected)
m_CallbackSteamDisconnected(this, &SteamWorksForwards::OnSteamServersDisconnected),
m_CallbackGroupStatus(this, &SteamWorksForwards::OnGroupStatusResult)
{
this->pFOVC_Old = forwards->CreateForward("SW_OnValidateClient", ET_Ignore, 2, NULL, Param_Cell, Param_Cell);
this->pFOVC = forwards->CreateForward("SteamWorks_OnValidateClient", ET_Ignore, 2, NULL, Param_Cell, Param_Cell);
this->pFOSSC = forwards->CreateForward("SteamWorks_SteamServersConnected", ET_Ignore, 0, NULL);
this->pFOSSCF = forwards->CreateForward("SteamWorks_SteamServersConnectFailure", ET_Ignore, 1, NULL, Param_Cell);
this->pFOSSD = forwards->CreateForward("SteamWorks_SteamServersDisconnected", ET_Ignore, 1, NULL, Param_Cell);
this->pFOCGS = forwards->CreateForward("SteamWorks_OnClientGroupStatus", ET_Ignore, 4, NULL, Param_Cell, Param_Cell, Param_Cell, Param_Cell);
}
SteamWorksForwards::~SteamWorksForwards()
@@ -100,3 +102,16 @@ void SteamWorksForwards::OnSteamServersDisconnected(SteamServersDisconnected_t *
this->pFOSSD->Execute(NULL);
}
void SteamWorksForwards::OnGroupStatusResult(GSClientGroupStatus_t *pResponse)
{
if (this->pFOCGS->GetFunctionCount() == 0)
{
return;
}
this->pFOCGS->PushCell(pResonse->m_SteamIDUser.GetAccountID());
this->pFOCGS->PushCell(pResonse->m_SteamIDGroup.GetAccountID());
this->pFOCGS->PushCell(pResonse->m_bMember);
this->pFOCGS->PushCell(pResonse->m_bOfficer);
this->pFOCGS->Execute(NULL);
}