添加gm账号判断
This commit is contained in:
parent
4b332b2057
commit
10a74eb413
@ -31,13 +31,10 @@ static RoomType_e GetHumanRoomType(const cs::CMJoin& msg)
|
|||||||
}
|
}
|
||||||
//游戏次数,吃鸡数,击杀数
|
//游戏次数,吃鸡数,击杀数
|
||||||
int game_times = a8::XValue(tmp_strings[0]);
|
int game_times = a8::XValue(tmp_strings[0]);
|
||||||
if (!f8::IsOnlineEnv()) {
|
if (RoomMgr::Instance()->IsGM(msg)) {
|
||||||
int channel = f8::ExtractChannelIdFromAccountId(msg.account_id());
|
game_times = 0;
|
||||||
if (channel != 6000) {
|
if (!msg.team_uuid().empty()) {
|
||||||
game_times = 0;
|
game_times = 1;
|
||||||
if (!msg.team_uuid().empty()) {
|
|
||||||
game_times = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
@ -55,6 +52,7 @@ static RoomType_e GetHumanRoomType(const cs::CMJoin& msg)
|
|||||||
void RoomMgr::Init()
|
void RoomMgr::Init()
|
||||||
{
|
{
|
||||||
InstallReportStateTimer();
|
InstallReportStateTimer();
|
||||||
|
gm_hash_["6001_2004_oTR6b5d0UzpqJ1w-QbdUawWimgz0"] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RoomMgr::UnInit()
|
void RoomMgr::UnInit()
|
||||||
@ -385,3 +383,19 @@ void RoomMgr::JoinErrorHandle(const cs::CMJoin& msg, int error_code, int socket_
|
|||||||
PlayerMgr::Instance()->OnlineNum(),
|
PlayerMgr::Instance()->OnlineNum(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool RoomMgr::IsGM(const cs::CMJoin& msg)
|
||||||
|
{
|
||||||
|
if (gm_hash_.find(msg.account_id()) == gm_hash_.end()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
for (int equip_id : msg.prepare_items()) {
|
||||||
|
MetaData::Equip* item_meta = MetaMgr::Instance()->GetEquip(equip_id);
|
||||||
|
if (item_meta) {
|
||||||
|
if (item_meta->i->equip_type() == EQUIP_TYPE_CAR) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@ -28,6 +28,7 @@ class RoomMgr : public a8::Singleton<RoomMgr>
|
|||||||
int OverRoomNum();
|
int OverRoomNum();
|
||||||
Room* GetRoomByUuid(long long uuid);
|
Room* GetRoomByUuid(long long uuid);
|
||||||
void AddOverRoom(long long room_uuid);
|
void AddOverRoom(long long room_uuid);
|
||||||
|
bool IsGM(const cs::CMJoin& msg);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void InstallReportStateTimer();
|
void InstallReportStateTimer();
|
||||||
@ -49,4 +50,5 @@ class RoomMgr : public a8::Singleton<RoomMgr>
|
|||||||
std::map<int, Room*> room_idx_hash_;
|
std::map<int, Room*> room_idx_hash_;
|
||||||
std::map<long long, Room*> over_room_hash_;
|
std::map<long long, Room*> over_room_hash_;
|
||||||
a8::TimerAttacher reportstate_timer_attacher_;
|
a8::TimerAttacher reportstate_timer_attacher_;
|
||||||
|
std::map<std::string, int> gm_hash_;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user