This commit is contained in:
aozhiwei 2020-07-24 11:03:23 +08:00
parent 418ef3ca06
commit cb4cc7f77a
5 changed files with 27 additions and 9 deletions

View File

@ -231,7 +231,7 @@ cs::SMUpdate* FrameMaker::MakeUpdateMsg(const Human* hum)
auto p = msg->add_chged_property_list();
p->set_obj_id(hum->GetEntityUniId());
p->set_property_type(kPropZombieId);
p->set_value(hum->zombieid_);
p->set_value(hum->charid_);
}
}
}

View File

@ -196,10 +196,12 @@ void Human::FillMFObjectFull(Room* room, Human* hum, cs::MFObjectFull* full_data
}
}
if (room->GetRoomMode() == kZombieMode) {
#if 0
p->set_level(level_);
p->set_exp(exp_);
p->set_race(race_);
p->set_zombieid(zombieid_);
#endif
p->set_charid(charid_);
}
}

View File

@ -320,7 +320,7 @@ private:
protected:
int level_ = 0;
int exp_ = 0;
int zombieid_ = 0;
int charid_ = 0;
long long last_shot_frameno_ = 0;
long long last_use_skill_frameno_ = 0;
long long hide_frameno_ = 0;

View File

@ -1565,6 +1565,9 @@ void Room::NotifyWxVoip()
void Room::BattleReport()
{
for (auto& pair : accountid_hash_) {
pair.second->SendGameOver();
}
game_over_ = true;
game_over_frameno_ = frameno_;
RoomMgr::Instance()->AddOverRoom(room_uuid_);
@ -1783,6 +1786,22 @@ void Room::SecondRandPoint()
a8::SetBitFlag(tmp_humans[i]->status, HS_LastAndroid);
}
}
#ifdef DEBUG
if (GetRoomMode() == kZombieMode) {
BornPoint* born_point = nullptr;
for (auto& pair : human_hash_) {
if (!born_point) {
born_point = pair.second->born_point;
} else {
pair.second->born_point = born_point;
pair.second->SetPos(pair.second->born_point->RandPoint());
pair.second->FindLocation();
pair.second->RefreshView();
grid_service->MoveHuman(pair.second);
}
}
}
#endif
}
void Room::NotifyGameStart()

View File

@ -124,8 +124,8 @@ message MFVec2
valule:
property_type: 22
valule:
property_type: 23 zombieid
valule: zombieid
property_type: 23 charid
valule: charid
*/
message MFPropertyChg
{
@ -225,10 +225,7 @@ message MFPlayerFull
optional int32 killer_id = 33; //id() id: -1:
//
optional int32 level = 41; //
optional int32 exp = 42; //
optional int32 race = 43; //1: 2:
optional int32 zombieid = 44; //id
optional int32 charid = 44; //id
}
//-