1
This commit is contained in:
parent
c987d4efd3
commit
13bad22749
@ -66,7 +66,7 @@ void CustomBattle::ParseResult(a8::XObject& obj)
|
||||
auto member = std::make_shared<CustomMember>();
|
||||
member->team_ = team.get();
|
||||
member->account_id_ = member_obj->Get("account_id").GetString();
|
||||
#ifdef MYDEBUG1
|
||||
#ifdef MYDEBUG
|
||||
if (IsMoba()) {
|
||||
member->account_id_ = member->account_id_ + "$$$$";
|
||||
}
|
||||
@ -83,7 +83,7 @@ void CustomBattle::ParseResult(a8::XObject& obj)
|
||||
member_id_hash_[member->account_id_] = member;
|
||||
team->member_hash_[member->account_id_] = member;
|
||||
account_hash_[member->account_id_] = team;
|
||||
#ifdef MYDEBUG1
|
||||
#ifdef MYDEBUG
|
||||
if (IsMoba()) {
|
||||
auto member = std::make_shared<CustomMember>();
|
||||
member->team_ = ob_team_.get();
|
||||
|
@ -213,6 +213,20 @@ class Human : public Creature
|
||||
GGListener::Instance()->SendToClient(socket_handle, 0, msg);
|
||||
}
|
||||
}
|
||||
template <typename T>
|
||||
void SendMsgSelfAndOb(T& msg)
|
||||
{
|
||||
TraverseObservers
|
||||
(
|
||||
[this, &msg] (Human* ele_hum, bool& stop)
|
||||
{
|
||||
if (ele_hum == this || ele_hum->IsOb()) {
|
||||
if (ele_hum->socket_handle != 0) {
|
||||
GGListener::Instance()->SendToClient(ele_hum->socket_handle, 0, msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
void SendGameOver();
|
||||
void FollowTarget(Human* target);
|
||||
virtual void SendDebugMsg(const std::string& debug_msg) override;
|
||||
|
Loading…
x
Reference in New Issue
Block a user