1
This commit is contained in:
commit
63e018441a
@ -135,6 +135,7 @@ void HandlerMgr::RegisterNetMsgHandlers()
|
|||||||
RegisterNetMsgHandler(&ggmsghandler, &Player::_CMReportSpecShotHitPos);
|
RegisterNetMsgHandler(&ggmsghandler, &Player::_CMReportSpecShotHitPos);
|
||||||
RegisterNetMsgHandler(&ggmsghandler, &Player::_CMWatchTarget);
|
RegisterNetMsgHandler(&ggmsghandler, &Player::_CMWatchTarget);
|
||||||
RegisterNetMsgHandler(&ggmsghandler, &Player::_CMTeamCommand);
|
RegisterNetMsgHandler(&ggmsghandler, &Player::_CMTeamCommand);
|
||||||
|
RegisterNetMsgHandler(&ggmsghandler, &Player::_CMMobaBattleData);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandlerMgr::ProcGMMsg(unsigned long saddr, int sockhandle,
|
void HandlerMgr::ProcGMMsg(unsigned long saddr, int sockhandle,
|
||||||
|
@ -432,6 +432,7 @@ void Human::DecHP(float dec_hp, int killer_id, const std::string killer_name, in
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
GetTrigger()->HpChg();
|
GetTrigger()->HpChg();
|
||||||
|
room->OnTeamPartChg(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Human::AddToNewObjects(Entity* entity)
|
void Human::AddToNewObjects(Entity* entity)
|
||||||
@ -3553,6 +3554,7 @@ void Human::InternalBeKill(int killer_id, const std::string& killer_name, int we
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
SendViewerUiMemberUpdate({GetUniId(), killer_id, real_killer_id});
|
SendViewerUiMemberUpdate({GetUniId(), killer_id, real_killer_id});
|
||||||
|
room->NotifyUiUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
int Human::GetTeamMode()
|
int Human::GetTeamMode()
|
||||||
@ -3576,6 +3578,7 @@ void Human::CalcAssists(Human* target)
|
|||||||
if (hum->room->GetFrameNo() - itr->second <
|
if (hum->room->GetFrameNo() - itr->second <
|
||||||
SERVER_FRAME_RATE * assist_time) {
|
SERVER_FRAME_RATE * assist_time) {
|
||||||
++hum->stats->assist;
|
++hum->stats->assist;
|
||||||
|
room->NotifyUiUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -17,6 +17,9 @@ namespace cs
|
|||||||
class MFThrow;
|
class MFThrow;
|
||||||
class MFSandTableFullMsg;
|
class MFSandTableFullMsg;
|
||||||
class MFSandTablePartMsg;
|
class MFSandTablePartMsg;
|
||||||
|
class MFMobaBattleDataMember;
|
||||||
|
class MFTeamPart;
|
||||||
|
class MFTeamMemberNew;
|
||||||
class SMGameOver;
|
class SMGameOver;
|
||||||
class SMUpdate;
|
class SMUpdate;
|
||||||
}
|
}
|
||||||
@ -162,6 +165,9 @@ class Human : public Creature
|
|||||||
virtual void OnExplosionHit(Explosion* explosion) override;
|
virtual void OnExplosionHit(Explosion* explosion) override;
|
||||||
long long GetRealDeadFrameNo(Room* room);
|
long long GetRealDeadFrameNo(Room* room);
|
||||||
void FillMFTeamData(Human* hum, cs::MFTeamData* team_data, bool is_game_over);
|
void FillMFTeamData(Human* hum, cs::MFTeamData* team_data, bool is_game_over);
|
||||||
|
void FillMFMobaBattleDataMember(cs::MFMobaBattleDataMember* p);
|
||||||
|
void FillMFTeamPart(cs::MFTeamPart* p);
|
||||||
|
void FillMFTeamMemberNew(cs::MFTeamMemberNew* p);
|
||||||
void CarShot(const glm::vec3& target_dir);
|
void CarShot(const glm::vec3& target_dir);
|
||||||
void BeKill(int killer_id, const std::string& killer_name, int weapon_id,
|
void BeKill(int killer_id, const std::string& killer_name, int weapon_id,
|
||||||
int real_killer_id, const std::string& real_killer_name);
|
int real_killer_id, const std::string& real_killer_name);
|
||||||
|
@ -1014,6 +1014,63 @@ void Human::FillMFTeamData(Human* hum, cs::MFTeamData* team_data, bool is_game_o
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Human::FillMFMobaBattleDataMember(cs::MFMobaBattleDataMember* p)
|
||||||
|
{
|
||||||
|
p->set_team_id(GetTeam()->GetTeamId());
|
||||||
|
p->set_member_uniid(GetUniId());
|
||||||
|
p->set_name(name);
|
||||||
|
p->set_avatar_url(avatar_url);
|
||||||
|
p->set_hero_id(GetNetData()->GetHeroId());
|
||||||
|
p->set_head_frame(head_frame);
|
||||||
|
|
||||||
|
for (auto& inv : GetInventoryData()) {
|
||||||
|
p->add_inventory(inv.num);
|
||||||
|
}
|
||||||
|
p->set_kill_count(stats->kills);
|
||||||
|
p->set_dead_count(stats->dead_times);
|
||||||
|
p->set_assist_count(stats->assist);
|
||||||
|
|
||||||
|
p->set_main_skill_id(GetMainSkill()->GetSkillId());
|
||||||
|
p->set_main_skill_cd(GetMainSkill()->GetLeftTime());
|
||||||
|
p->set_main_skill_max_cd(GetMainSkill()->GetCd());
|
||||||
|
}
|
||||||
|
|
||||||
|
void Human::FillMFTeamPart(cs::MFTeamPart* p)
|
||||||
|
{
|
||||||
|
p->set_team_id(GetTeam()->GetTeamId());
|
||||||
|
p->set_obj_uniid(GetUniId());
|
||||||
|
TypeConvert::ToPb(GetPos(), p->mutable_pos());
|
||||||
|
TypeConvert::ToPb(GetAttackDir(), p->mutable_dir());
|
||||||
|
|
||||||
|
p->set_health(GetHP());
|
||||||
|
p->set_max_health(GetMaxHP());
|
||||||
|
p->set_disconnected(disconnected);
|
||||||
|
p->set_dead(dead);
|
||||||
|
p->set_downed(downed);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Human::FillMFTeamMemberNew(cs::MFTeamMemberNew* p)
|
||||||
|
{
|
||||||
|
p->set_team_id(GetTeam()->GetTeamId());
|
||||||
|
p->set_obj_uniid(GetUniId());
|
||||||
|
TypeConvert::ToPb(GetPos(), p->mutable_pos());
|
||||||
|
TypeConvert::ToPb(GetAttackDir(), p->mutable_dir());
|
||||||
|
|
||||||
|
p->set_health(GetHP());
|
||||||
|
p->set_disconnected(disconnected);
|
||||||
|
p->set_dead(dead);
|
||||||
|
p->set_downed(downed);
|
||||||
|
p->set_name(name);
|
||||||
|
p->set_max_health(GetMaxHP());
|
||||||
|
p->set_hero_id(GetNetData()->GetHeroId());
|
||||||
|
p->set_level(GetNetData()->GetLevel());
|
||||||
|
p->set_hero_level(GetHeroLevel());
|
||||||
|
p->set_hero_exp(GetHeroExp());
|
||||||
|
p->set_hero_max_exp(GetHeroMaxExp());
|
||||||
|
p->set_main_skill_cd(GetMainSkill()->GetLeftTime());
|
||||||
|
p->set_main_skill_max_cd(GetMainSkill()->GetCd());
|
||||||
|
}
|
||||||
|
|
||||||
void Human::FillSMGameOver(cs::SMGameOver& msg)
|
void Human::FillSMGameOver(cs::SMGameOver& msg)
|
||||||
{
|
{
|
||||||
if (room->GetVictoryTeam()) {
|
if (room->GetVictoryTeam()) {
|
||||||
@ -1724,6 +1781,8 @@ void Human::SendUIUpdate()
|
|||||||
cs::SMUiUpdate notifymsg;
|
cs::SMUiUpdate notifymsg;
|
||||||
notifymsg.set_alive_count(room->AliveCount());
|
notifymsg.set_alive_count(room->AliveCount());
|
||||||
notifymsg.set_kill_count(stats->kills);
|
notifymsg.set_kill_count(stats->kills);
|
||||||
|
notifymsg.set_dead_count(stats->dead_times);
|
||||||
|
notifymsg.set_assist_count(stats->assist);
|
||||||
room->FillSMUiUpdate(notifymsg);
|
room->FillSMUiUpdate(notifymsg);
|
||||||
if (room->IsPveRoom()) {
|
if (room->IsPveRoom()) {
|
||||||
notifymsg.set_score(stats->pve_rank_score);
|
notifymsg.set_score(stats->pve_rank_score);
|
||||||
@ -2471,6 +2530,30 @@ void Team::FillSMGameOver(cs::SMGameOver& msg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Team::FillMFMobaBattleDataTeam(cs::MFMobaBattleDataTeam* p)
|
||||||
|
{
|
||||||
|
p->set_team_id(GetTeamId());
|
||||||
|
TraverseMembers
|
||||||
|
(
|
||||||
|
[p] (Human* hum) -> bool
|
||||||
|
{
|
||||||
|
hum->FillMFMobaBattleDataMember(p->add_members());
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void Team::FillMFTeamFull(cs::MFTeamFull* p)
|
||||||
|
{
|
||||||
|
p->set_team_id(GetTeamId());
|
||||||
|
TraverseMembers
|
||||||
|
(
|
||||||
|
[p] (Human* hum) -> bool
|
||||||
|
{
|
||||||
|
hum->FillMFTeamMemberNew(p->add_members());
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
bool PBUtils::SupportSandTable(int proto_version)
|
bool PBUtils::SupportSandTable(int proto_version)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
@ -2557,6 +2640,63 @@ void Room::NotifyKillList(const std::vector<int>& uniid_list)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Room::SendSMTeamFull(Human* hum)
|
||||||
|
{
|
||||||
|
if (!IsMobaModeRoom()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
cs::SMTeamFullNotify notify_msg;
|
||||||
|
std::vector<Team*> team_list = {GetMobaTeamA(), GetMobaTeamB()};
|
||||||
|
for (Team* team : team_list) {
|
||||||
|
team->FillMFTeamFull(notify_msg.add_team_list());
|
||||||
|
}
|
||||||
|
TraversePlayerList
|
||||||
|
(
|
||||||
|
[¬ify_msg] (Player* hum) -> bool
|
||||||
|
{
|
||||||
|
#ifdef MYDEBUG1
|
||||||
|
a8::XPrintf("SMTeamFull:%s\n", {f8::PbToJson(¬ify_msg)});
|
||||||
|
#endif
|
||||||
|
hum->SendNotifyMsg(notify_msg);
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void Room::OnTeamPartChg(Human* hum)
|
||||||
|
{
|
||||||
|
if (!IsMobaModeRoom()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (team_part_chg_human_hash_.empty()) {
|
||||||
|
team_part_chg_human_hash_[hum->GetUniId()] = hum;
|
||||||
|
xtimer.SetTimeoutWpEx
|
||||||
|
(SERVER_FRAME_RATE * 0.5,
|
||||||
|
[this] (int event, const a8::Args* args)
|
||||||
|
{
|
||||||
|
if (a8::TIMER_EXEC_EVENT == event) {
|
||||||
|
cs::SMTeamPartNotify notify_msg;
|
||||||
|
for (auto& pair : team_part_chg_human_hash_) {
|
||||||
|
pair.second->FillMFTeamPart(notify_msg.add_members());
|
||||||
|
}
|
||||||
|
TraversePlayerList
|
||||||
|
(
|
||||||
|
[¬ify_msg] (Player* hum) -> bool
|
||||||
|
{
|
||||||
|
#ifdef MYDEBUG1
|
||||||
|
a8::XPrintf("SMTeamPart:%s\n", {f8::PbToJson(¬ify_msg)});
|
||||||
|
#endif
|
||||||
|
hum->SendNotifyMsg(notify_msg);
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
team_part_chg_human_hash_.clear();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
&xtimer_attacher_);
|
||||||
|
} else {
|
||||||
|
team_part_chg_human_hash_[hum->GetUniId()] = hum;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int Room::InitWithCustomBattle(long ip_saddr, int socket_handle, std::shared_ptr<cs::CMJoin> msg,
|
int Room::InitWithCustomBattle(long ip_saddr, int socket_handle, std::shared_ptr<cs::CMJoin> msg,
|
||||||
std::shared_ptr<CustomBattle> p)
|
std::shared_ptr<CustomBattle> p)
|
||||||
{
|
{
|
||||||
|
@ -1876,6 +1876,18 @@ void Player::_CMTeamCommand(f8::MsgHdr* hdr, const cs::CMTeamCommand& msg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Player::_CMMobaBattleData(f8::MsgHdr* hdr, const cs::CMMobaBattleData& msg)
|
||||||
|
{
|
||||||
|
if (room->IsMobaModeRoom()) {
|
||||||
|
cs::SMMobaBattleData rsp_msg;
|
||||||
|
std::vector<Team*> team_list = {room->GetMobaTeamA(), room->GetMobaTeamB()};
|
||||||
|
for (Team* team : team_list) {
|
||||||
|
team->FillMFMobaBattleDataTeam(rsp_msg.add_team_list());
|
||||||
|
}
|
||||||
|
SendNotifyMsg(rsp_msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Player::SetShotHold(bool hold)
|
void Player::SetShotHold(bool hold)
|
||||||
{
|
{
|
||||||
if (!hold && shot_hold) {
|
if (!hold && shot_hold) {
|
||||||
|
@ -30,6 +30,7 @@ namespace cs
|
|||||||
class CMReportSpecShotHitPos;
|
class CMReportSpecShotHitPos;
|
||||||
class CMWatchTarget;
|
class CMWatchTarget;
|
||||||
class CMTeamCommand;
|
class CMTeamCommand;
|
||||||
|
class CMMobaBattleData;
|
||||||
}
|
}
|
||||||
|
|
||||||
class Room;
|
class Room;
|
||||||
@ -147,6 +148,7 @@ class Player : public Human
|
|||||||
void _CMReportSpecShotHitPos(f8::MsgHdr* hdr, const cs::CMReportSpecShotHitPos& msg);
|
void _CMReportSpecShotHitPos(f8::MsgHdr* hdr, const cs::CMReportSpecShotHitPos& msg);
|
||||||
void _CMWatchTarget(f8::MsgHdr* hdr, const cs::CMWatchTarget& msg);
|
void _CMWatchTarget(f8::MsgHdr* hdr, const cs::CMWatchTarget& msg);
|
||||||
void _CMTeamCommand(f8::MsgHdr* hdr, const cs::CMTeamCommand& msg);
|
void _CMTeamCommand(f8::MsgHdr* hdr, const cs::CMTeamCommand& msg);
|
||||||
|
void _CMMobaBattleData(f8::MsgHdr* hdr, const cs::CMMobaBattleData& msg);
|
||||||
virtual void SetAttackDir(const glm::vec3& attack_dir) override;
|
virtual void SetAttackDir(const glm::vec3& attack_dir) override;
|
||||||
void AsyncRequestWatchWar(bool send_rsp_msg);
|
void AsyncRequestWatchWar(bool send_rsp_msg);
|
||||||
|
|
||||||
|
@ -2997,6 +2997,7 @@ void Room::OnBattleStart()
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
battle_starting_ = false;
|
battle_starting_ = false;
|
||||||
|
SendSMTeamFull(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Room::CanAddObstacle(const glm::vec3& pos, int obstacle_id)
|
bool Room::CanAddObstacle(const glm::vec3& pos, int obstacle_id)
|
||||||
|
@ -288,6 +288,8 @@ public:
|
|||||||
void CreateAndroid(int android_num, std::shared_ptr<Team> team = nullptr);
|
void CreateAndroid(int android_num, std::shared_ptr<Team> team = nullptr);
|
||||||
int GetFullLevelIdx() { return ++curr_full_level_idx_;}
|
int GetFullLevelIdx() { return ++curr_full_level_idx_;}
|
||||||
std::shared_ptr<RoomOb> GetRoomOb();
|
std::shared_ptr<RoomOb> GetRoomOb();
|
||||||
|
void SendSMTeamFull(Human* hum);
|
||||||
|
void OnTeamPartChg(Human* hum);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void ShuaAndroid();
|
void ShuaAndroid();
|
||||||
@ -400,6 +402,7 @@ private:
|
|||||||
std::map<int, Human*> alive_human_hash_;
|
std::map<int, Human*> alive_human_hash_;
|
||||||
std::map<int, Human*> alive_player_hash_;
|
std::map<int, Human*> alive_player_hash_;
|
||||||
std::map<int, Human*> last_human_hash_;
|
std::map<int, Human*> last_human_hash_;
|
||||||
|
std::map<int, Human*> team_part_chg_human_hash_;
|
||||||
std::map<int, std::shared_ptr<BornPoint>> born_point_hash_;
|
std::map<int, std::shared_ptr<BornPoint>> born_point_hash_;
|
||||||
std::map<int, std::shared_ptr<a8::CommonCbProcEx>> task_hash_;
|
std::map<int, std::shared_ptr<a8::CommonCbProcEx>> task_hash_;
|
||||||
|
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
namespace cs
|
namespace cs
|
||||||
{
|
{
|
||||||
|
class MFMobaBattleDataTeam;
|
||||||
|
class MFTeamFull;
|
||||||
class SMGameOver;
|
class SMGameOver;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,6 +63,8 @@ class Team : public std::enable_shared_from_this<Team>
|
|||||||
int GetKillCount();
|
int GetKillCount();
|
||||||
long long GetLastKillFrameNo() { return last_kill_frameno_; }
|
long long GetLastKillFrameNo() { return last_kill_frameno_; }
|
||||||
bool MemberHasOb();
|
bool MemberHasOb();
|
||||||
|
void FillMFMobaBattleDataTeam(cs::MFMobaBattleDataTeam* p);
|
||||||
|
void FillMFTeamFull(cs::MFTeamFull* p);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int team_id_ = 0;
|
int team_id_ = 0;
|
||||||
|
@ -34,6 +34,7 @@ enum CMMessageId_e
|
|||||||
_CMReportSpecShotHitPos = 240;
|
_CMReportSpecShotHitPos = 240;
|
||||||
_CMWatchTarget = 241;
|
_CMWatchTarget = 241;
|
||||||
_CMTeamCommand = 242;
|
_CMTeamCommand = 242;
|
||||||
|
_CMMobaBattleData = 243;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum SMMessageId_e
|
enum SMMessageId_e
|
||||||
@ -49,6 +50,7 @@ enum SMMessageId_e
|
|||||||
_SMGetSettlementTeamList = 238;
|
_SMGetSettlementTeamList = 238;
|
||||||
_SMWatchTarget = 241;
|
_SMWatchTarget = 241;
|
||||||
_SMTeamComamnd = 242;
|
_SMTeamComamnd = 242;
|
||||||
|
_SMMobaBattleData = 243;
|
||||||
|
|
||||||
_SMJoinedNotify = 103;
|
_SMJoinedNotify = 103;
|
||||||
_SMMapInfo = 1002;
|
_SMMapInfo = 1002;
|
||||||
@ -78,4 +80,6 @@ enum SMMessageId_e
|
|||||||
_SMViewerUiNotify = 1029;
|
_SMViewerUiNotify = 1029;
|
||||||
_SMViewerUiMemberUpdate = 1030;
|
_SMViewerUiMemberUpdate = 1030;
|
||||||
_SMTeamCommandNotify = 1031;
|
_SMTeamCommandNotify = 1031;
|
||||||
|
_SMTeamFullNotify = 1032;
|
||||||
|
_SMTeamPartNotify = 1033;
|
||||||
}
|
}
|
||||||
|
@ -739,6 +739,49 @@ message MFTeamData
|
|||||||
repeated MFSkin skin = 39; //皮肤id
|
repeated MFSkin skin = 39; //皮肤id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//队伍数据-全量
|
||||||
|
message MFTeamMemberNew
|
||||||
|
{
|
||||||
|
optional int32 team_id = 1; //队伍Id
|
||||||
|
optional int32 obj_uniid = 2; //玩家id
|
||||||
|
optional MFVec3 pos = 3; //位置
|
||||||
|
optional MFVec3 dir = 4; //方向
|
||||||
|
optional float health = 5; //血量
|
||||||
|
optional bool disconnected = 6 [default = false]; //是否短线
|
||||||
|
optional bool dead = 7 [default = false]; //是否死亡
|
||||||
|
optional bool downed = 8 [default = false]; //是否倒下
|
||||||
|
optional string name = 9; //名字
|
||||||
|
optional float max_health = 10; //最大血量
|
||||||
|
optional int32 hero_id = 20 [default = 0]; //英雄id
|
||||||
|
optional int32 level = 21 [default = 0]; //等级
|
||||||
|
optional int32 hero_level = 22; //hero等级
|
||||||
|
optional int32 hero_exp = 23; //hero经验
|
||||||
|
optional int32 hero_max_exp = 24; //hero max经验
|
||||||
|
optional int32 main_skill_cd = 25 [default = 0]; //技能cd时间
|
||||||
|
optional int32 main_skill_max_cd = 26 [default = 0]; //技能cd上限时间
|
||||||
|
}
|
||||||
|
|
||||||
|
//队伍数据-全量
|
||||||
|
message MFTeamFull
|
||||||
|
{
|
||||||
|
optional int32 team_id = 1; //队伍Id
|
||||||
|
repeated MFTeamMemberNew members = 2; //队伍成员
|
||||||
|
}
|
||||||
|
|
||||||
|
//队伍数据-部分
|
||||||
|
message MFTeamPart
|
||||||
|
{
|
||||||
|
optional int32 team_id = 1; //队伍Id
|
||||||
|
optional int32 obj_uniid = 2; //玩家id
|
||||||
|
optional MFVec3 pos = 3; //位置
|
||||||
|
optional MFVec3 dir = 4; //方向
|
||||||
|
optional float health = 5; //血量
|
||||||
|
optional float max_health = 6; //最大血量
|
||||||
|
optional bool disconnected = 7 [default = false]; //是否短线
|
||||||
|
optional bool dead = 8 [default = false]; //是否死亡
|
||||||
|
optional bool downed = 9 [default = false]; //是否倒下
|
||||||
|
}
|
||||||
|
|
||||||
//队伍数据
|
//队伍数据
|
||||||
message MFTeamDataNew
|
message MFTeamDataNew
|
||||||
{
|
{
|
||||||
@ -1403,7 +1446,6 @@ message MFMobaTeamMember
|
|||||||
optional int32 head_frame = 10; //头像框
|
optional int32 head_frame = 10; //头像框
|
||||||
optional int32 obj_uniid = 11; //对象唯一id
|
optional int32 obj_uniid = 11; //对象唯一id
|
||||||
}
|
}
|
||||||
|
|
||||||
//moba队伍
|
//moba队伍
|
||||||
message MFMobaTeam
|
message MFMobaTeam
|
||||||
{
|
{
|
||||||
@ -1432,6 +1474,33 @@ message MFViewerTeam
|
|||||||
repeated MFViewTeamMember members = 2; //成员列表
|
repeated MFViewTeamMember members = 2; //成员列表
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//moba战斗数据-队伍
|
||||||
|
message MFMobaBattleDataMember
|
||||||
|
{
|
||||||
|
optional int32 team_id = 1; //队伍id
|
||||||
|
optional int32 member_uniid = 2; //uniid
|
||||||
|
optional string name = 3; //名字
|
||||||
|
optional string avatar_url = 4; //头像
|
||||||
|
optional int32 hero_id = 5; //英雄id
|
||||||
|
optional int32 head_frame = 6; //头像框
|
||||||
|
|
||||||
|
repeated int32 inventory = 11; //库存(相当于其他游戏里的背包)
|
||||||
|
optional int32 kill_count = 12; //击杀数
|
||||||
|
optional int32 dead_count = 13; //死亡次数(被杀数)
|
||||||
|
optional int32 assist_count = 14; //助攻次数
|
||||||
|
|
||||||
|
optional int32 main_skill_id = 30; //主技能id
|
||||||
|
optional int32 main_skill_cd = 31; //主技能cd(单位毫秒)
|
||||||
|
optional int32 main_skill_max_cd = 32 [default = 0]; //技能cd上限时间
|
||||||
|
}
|
||||||
|
|
||||||
|
//moba战斗数据-队伍
|
||||||
|
message MFMobaBattleDataTeam
|
||||||
|
{
|
||||||
|
optional int32 team_id = 1; //队伍id
|
||||||
|
repeated MFMobaBattleDataMember members = 2; //成员列表
|
||||||
|
}
|
||||||
|
|
||||||
//end mfmsg
|
//end mfmsg
|
||||||
|
|
||||||
//加入
|
//加入
|
||||||
@ -1736,6 +1805,16 @@ message CMTeamCommand
|
|||||||
optional string custom_command = 2; //指令(json格式,客户端自定义)
|
optional string custom_command = 2; //指令(json格式,客户端自定义)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//请求moba战斗数据
|
||||||
|
message CMMobaBattleData
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
message SMMobaBattleData
|
||||||
|
{
|
||||||
|
repeated MFMobaBattleDataTeam team_list = 1; //队伍列表(客户端通过判断team_id是否等于自己队伍)
|
||||||
|
}
|
||||||
|
|
||||||
//加入成功
|
//加入成功
|
||||||
message SMJoinedNotify
|
message SMJoinedNotify
|
||||||
{
|
{
|
||||||
@ -1928,6 +2007,8 @@ message SMUiUpdate
|
|||||||
optional int32 alive_count = 1; //存活数量
|
optional int32 alive_count = 1; //存活数量
|
||||||
optional int32 kill_count = 2; //击杀数
|
optional int32 kill_count = 2; //击杀数
|
||||||
repeated MFMapCarInfo car_list = 3; //载具列表
|
repeated MFMapCarInfo car_list = 3; //载具列表
|
||||||
|
optional int32 dead_count = 4; //死亡次数(被杀数)
|
||||||
|
optional int32 assist_count = 5; //助攻次数
|
||||||
|
|
||||||
//一下只有pve模式有意义
|
//一下只有pve模式有意义
|
||||||
optional int32 score = 10; //积分
|
optional int32 score = 10; //积分
|
||||||
@ -2034,3 +2115,19 @@ message SMTeamCommandNotify
|
|||||||
optional int32 sender_id = 1; //指令发起者
|
optional int32 sender_id = 1; //指令发起者
|
||||||
optional string custom_command = 2; //指令(json格式客户端自定义)
|
optional string custom_command = 2; //指令(json格式客户端自定义)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//队伍信息通知-全量
|
||||||
|
/*
|
||||||
|
该消息在进入战斗开始后发(注意战前准备阶段不发因为那时可能会发生队伍合并)后续如果断线重连也会补发客户端需要处理多次的问题
|
||||||
|
不同于SMUpdate.team_data该队伍关系不会在发生改变(由于战前准备阶段会有合并队伍的情况所欲SMUpdate.team_data是会发生队伍的变更)
|
||||||
|
*/
|
||||||
|
message SMTeamFullNotify
|
||||||
|
{
|
||||||
|
repeated MFTeamFull team_list = 1; //队伍列表
|
||||||
|
}
|
||||||
|
|
||||||
|
//队伍信息通知-部分
|
||||||
|
message SMTeamPartNotify
|
||||||
|
{
|
||||||
|
repeated MFTeamPart members = 1; //待更新成员列表
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user