添加bufflist同步
This commit is contained in:
parent
0841282bf7
commit
c36ce53e05
@ -162,6 +162,7 @@ void Human::FillMFObjectFull(cs::MFObjectFull* full_data)
|
||||
p->set_parachute(parachute);
|
||||
}
|
||||
FillBodyState(p->mutable_states());
|
||||
FillBuffList(p->mutable_buff_list());
|
||||
if (dead) {
|
||||
p->set_killer_name(stats.killer_name);
|
||||
p->set_killer_id(stats.killer_id);
|
||||
@ -1464,6 +1465,14 @@ void Human::FillBodyState(::google::protobuf::RepeatedPtrField<::cs::MFBodyState
|
||||
}
|
||||
}
|
||||
|
||||
void Human::FillBuffList(::google::protobuf::RepeatedPtrField<::cs::MFBuff>* pb_buff_list)
|
||||
{
|
||||
for (auto& itr : buff_list_) {
|
||||
auto buff = pb_buff_list->Add();
|
||||
itr.FillMFBuff(buff);
|
||||
}
|
||||
}
|
||||
|
||||
void Human::SummonHero()
|
||||
{
|
||||
#if 0
|
||||
|
@ -195,6 +195,7 @@ class Human : public Entity
|
||||
int GetVolume(int slot_id);
|
||||
void RecoverHp(int inc_hp);
|
||||
void FillBodyState(::google::protobuf::RepeatedPtrField<::cs::MFBodyState>* states);
|
||||
void FillBuffList(::google::protobuf::RepeatedPtrField<::cs::MFBuff>* pb_buff_list);
|
||||
void SummonHero();
|
||||
void AddObserver(Human* observer);
|
||||
void RemoveObserver(Human* observer);
|
||||
|
@ -197,6 +197,7 @@ message MFPlayerFull
|
||||
optional int32 emoji1 = 25; //表情1
|
||||
optional int32 emoji2 = 26; //表情2
|
||||
optional int32 parachute = 27; //降落伞
|
||||
repeated MFBuff buff_list = 28; //buff列表
|
||||
|
||||
optional bool can_revive = 30; //是否可复活
|
||||
optional int32 revive_countdown = 31; //复活倒计时
|
||||
|
Loading…
x
Reference in New Issue
Block a user