1
This commit is contained in:
parent
d6849f4536
commit
889e95bf4c
@ -195,6 +195,58 @@ cs::SMUpdate* FrameMaker::MakeUpdateMsg(const Human* hum)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for (size_t idx : hum->chged_level_) {
|
||||||
|
if (idx < room->frame_event.chged_levels_.size()) {
|
||||||
|
{
|
||||||
|
auto p = msg->add_chged_property_list();
|
||||||
|
p->set_obj_id(hum->GetEntityUniId());
|
||||||
|
p->set_property_type(kPropLevel);
|
||||||
|
p->set_value(hum->level_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (size_t idx : hum->chged_exp_) {
|
||||||
|
if (idx < room->frame_event.chged_exps_.size()) {
|
||||||
|
{
|
||||||
|
auto p = msg->add_chged_property_list();
|
||||||
|
p->set_obj_id(hum->GetEntityUniId());
|
||||||
|
p->set_property_type(kPropExp);
|
||||||
|
p->set_value(hum->exp_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (size_t idx : hum->chged_race_) {
|
||||||
|
if (idx < room->frame_event.chged_races_.size()) {
|
||||||
|
{
|
||||||
|
auto p = msg->add_chged_property_list();
|
||||||
|
p->set_obj_id(hum->GetEntityUniId());
|
||||||
|
p->set_property_type(kPropRace);
|
||||||
|
p->set_value(hum->race_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (size_t idx : hum->chged_zombieid_) {
|
||||||
|
if (idx < room->frame_event.chged_zombieids_.size()) {
|
||||||
|
{
|
||||||
|
auto p = msg->add_chged_property_list();
|
||||||
|
p->set_obj_id(hum->GetEntityUniId());
|
||||||
|
p->set_property_type(kPropZombieId);
|
||||||
|
p->set_value(hum->zombieid_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (size_t idx : hum->revive_objs_) {
|
||||||
|
if (idx < room->frame_event.revive_objs_.size()) {
|
||||||
|
msg->add_revive_objids(room->frame_event.revive_objs_[idx]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (size_t idx : hum->dead_objs_) {
|
||||||
|
if (idx < room->frame_event.dead_objs_.size()) {
|
||||||
|
auto p = msg->add_dead_objs();
|
||||||
|
p->add_values(std::get<0>(room->frame_event.dead_objs_[idx]));
|
||||||
|
p->add_values(std::get<1>(room->frame_event.dead_objs_[idx]));
|
||||||
|
}
|
||||||
|
}
|
||||||
if (room->GetRoomMode() == kZombieMode && room->BattleStarted()) {
|
if (room->GetRoomMode() == kZombieMode && room->BattleStarted()) {
|
||||||
room->FillObjectPositions((Human*)hum, *msg);
|
room->FillObjectPositions((Human*)hum, *msg);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user