1
This commit is contained in:
parent
4029b36c59
commit
35a4907918
@ -21,3 +21,8 @@ bool CustomBattle::CanAdd(const std::string& account_id, const std::string& sess
|
|||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::shared_ptr<CustomTeam> CustomBattle::GetTeamByAccountId(const std::string& account_id)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -20,6 +20,7 @@ class CustomBattle
|
|||||||
int GetStartTime() { return start_time_; }
|
int GetStartTime() { return start_time_; }
|
||||||
void ParseResult(a8::XObject& obj);
|
void ParseResult(a8::XObject& obj);
|
||||||
bool CanAdd(const std::string& account_id, const std::string& session_id);
|
bool CanAdd(const std::string& account_id, const std::string& session_id);
|
||||||
|
std::shared_ptr<CustomTeam> GetTeamByAccountId(const std::string& account_id);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool parse_ok_ = false;
|
bool parse_ok_ = false;
|
||||||
|
9
server/gameserver/custom_team.cc
Normal file
9
server/gameserver/custom_team.cc
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#include "precompile.h"
|
||||||
|
|
||||||
|
#include "custom_team.h"
|
||||||
|
|
||||||
|
std::shared_ptr<CustomMember> CustomTeam::GetMember(const std::string& account_id)
|
||||||
|
{
|
||||||
|
auto itr = member_hash_.find(account_id);
|
||||||
|
return itr != member_hash_.end() ? itr->second : nullptr;
|
||||||
|
}
|
@ -6,6 +6,7 @@ class CustomTeam
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
const std::string& GetTeamUuid() { return team_uuid_; }
|
const std::string& GetTeamUuid() { return team_uuid_; }
|
||||||
|
std::shared_ptr<CustomMember> GetMember(const std::string& account_id);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string team_uuid_;
|
std::string team_uuid_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user