50 lines
970 B
C++
50 lines
970 B
C++
#include "precompile.h"
|
|
|
|
#include <a8/timer.h>
|
|
|
|
#include "cs_proto.pb.h"
|
|
#include "matchteam.h"
|
|
#include "matchmgr.h"
|
|
|
|
struct RawTeamMember
|
|
{
|
|
int socket_handle = 0;
|
|
std::shared_ptr<cs::CMJoin> msg;
|
|
};
|
|
|
|
void MatchTeam::Init(f8::MsgHdr& hdr, const cs::CMJoin& msg)
|
|
{
|
|
create_tick_ = a8::XGetTickCount();
|
|
a8::Timer::Instance()->AddRepeatTimerAndAttach
|
|
(1000,
|
|
a8::XParams()
|
|
.SetSender(this),
|
|
[] (const a8::XParams& param)
|
|
{
|
|
MatchTeam* team = (MatchTeam*)param.sender.GetUserData();
|
|
team->Update();
|
|
},
|
|
&timer_attacher.timer_list_);
|
|
}
|
|
|
|
void MatchTeam::AddRawMember(f8::MsgHdr& hdr, const cs::CMJoin& msg)
|
|
{
|
|
|
|
}
|
|
|
|
bool MatchTeam::IsRawMember(const std::string &account_id)
|
|
{
|
|
auto itr = raw_member_hash_.find(account_id);
|
|
return itr != raw_member_hash_.end();
|
|
}
|
|
|
|
bool MatchTeam::IsValidMember(const cs::CMJoin& msg)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
void MatchTeam::Update()
|
|
{
|
|
|
|
}
|