This commit is contained in:
aozhiwei 2021-12-13 11:27:13 +08:00
parent 057a191b9a
commit a7a66aab6f
10 changed files with 32 additions and 15 deletions

View File

@ -270,8 +270,8 @@ void Human::FillMFObjectFull(Room* room, Human* hum, cs::MFObjectFull* full_data
if (vip_lv != 0) { if (vip_lv != 0) {
p->set_vip_lv(vip_lv); p->set_vip_lv(vip_lv);
} }
if (head != 0) { if (head_frame != 0) {
p->set_head(head); p->set_head_frame(head_frame);
} }
if (sex != 0) { if (sex != 0) {
p->set_sex(sex); p->set_sex(sex);
@ -400,8 +400,8 @@ void Human::FillMFPlayerStats(cs::MFPlayerStats* stats_pb)
if (vip_lv != 0) { if (vip_lv != 0) {
stats_pb->set_vip_lv(vip_lv); stats_pb->set_vip_lv(vip_lv);
} }
if (head != 0) { if (head_frame != 0) {
stats_pb->set_head(head); stats_pb->set_head_frame(head_frame);
} }
if (sex != 0) { if (sex != 0) {
stats_pb->set_sex(sex); stats_pb->set_sex(sex);
@ -500,8 +500,8 @@ void Human::FillMFTeamData(Human* hum, cs::MFTeamData* team_data, bool is_game_o
if (vip_lv != 0) { if (vip_lv != 0) {
team_data->set_vip_lv(vip_lv); team_data->set_vip_lv(vip_lv);
} }
if (head != 0) { if (head_frame != 0) {
team_data->set_head(head); team_data->set_head_frame(head_frame);
} }
if (sex != 0) { if (sex != 0) {
team_data->set_sex(sex); team_data->set_sex(sex);

View File

@ -128,7 +128,7 @@ class Human : public Creature
long long user_value3 = 0; long long user_value3 = 0;
long long guild_id = 0; long long guild_id = 0;
int vip_lv = 0; int vip_lv = 0;
int head = 0; int head_frame = 0;
int sex = 0; int sex = 0;
std::string user_data; std::string user_data;
long long last_cmmove_frameno = 0; long long last_cmmove_frameno = 0;

View File

@ -24,7 +24,7 @@ void RawTeamMember::FillMFMatchTeamMember(cs::MFMatchTeamMember* p)
} }
p->set_is_leader(is_leader); p->set_is_leader(is_leader);
p->set_state(state); p->set_state(state);
p->set_head(msg.head()); p->set_head_frame(msg.head_frame());
p->set_hero_skin(msg.hero_skin()); p->set_hero_skin(msg.hero_skin());
} }
@ -51,10 +51,12 @@ void RawTeamMember::InitRobot()
{ {
MetaData::Player* hero_meta = MetaMgr::Instance()->GetPlayer(msg.hero_id()); MetaData::Player* hero_meta = MetaMgr::Instance()->GetPlayer(msg.hero_id());
if (hero_meta) { if (hero_meta) {
#if 0
MetaData::PlayerSkin* skin_meta = MetaMgr::Instance()->GetPlayerSkin(hero_meta->i->skinlist()); MetaData::PlayerSkin* skin_meta = MetaMgr::Instance()->GetPlayerSkin(hero_meta->i->skinlist());
if (skin_meta) { if (skin_meta) {
msg.set_hero_skin(skin_meta->i->id()); msg.set_hero_skin(skin_meta->i->id());
} }
#endif
} }
} }
} else { } else {

View File

@ -642,11 +642,6 @@ namespace MetaData
return 0; return 0;
} }
void PlayerSkin::Init()
{
}
void Robot::Init() void Robot::Init()
{ {
{ {
@ -1535,4 +1530,9 @@ namespace MetaData
} }
void Item::Init()
{
}
} }

View File

@ -84,6 +84,8 @@ namespace MetaData
struct Item struct Item
{ {
const metatable::Item* i = nullptr; const metatable::Item* i = nullptr;
void Init();
}; };
struct Buff; struct Buff;

View File

@ -1201,3 +1201,13 @@ std::vector<std::tuple<int, std::string>>* MetaMgr::GetTextElements(const std::s
auto itr = loader_->text_element_hash.find(textid); auto itr = loader_->text_element_hash.find(textid);
return itr != loader_->text_element_hash.end() ? &itr->second : nullptr; return itr != loader_->text_element_hash.end() ? &itr->second : nullptr;
} }
MetaData::Item* MetaMgr::GetItem(int id)
{
return nullptr;
}
MetaData::Item* MetaMgr::GetHeroSkin(int hero_id)
{
return nullptr;
}

View File

@ -28,6 +28,8 @@ class MetaMgr : public a8::Singleton<MetaMgr>
MetaData::Equip* GetEquip(int id); MetaData::Equip* GetEquip(int id);
MetaData::Equip* GetEquipBySlotId(int slot_id); MetaData::Equip* GetEquipBySlotId(int slot_id);
MetaData::EquipUpgrade* GetEquipUpgrade(int equip_id); MetaData::EquipUpgrade* GetEquipUpgrade(int equip_id);
MetaData::Item* GetItem(int id);
MetaData::Item* GetHeroSkin(int id);
MetaData::Building* GetBuilding(int building_id); MetaData::Building* GetBuilding(int building_id);
MetaData::Drop* GetDrop(int drop_id); MetaData::Drop* GetDrop(int drop_id);
MetaData::SafeArea* GetSafeArea(int area_id); MetaData::SafeArea* GetSafeArea(int area_id);

View File

@ -83,7 +83,7 @@ Player* PlayerMgr::CreatePlayerByCMJoin(Player* hum,
hum->user_value3 = msg.user_value3(); hum->user_value3 = msg.user_value3();
hum->guild_id = msg.guild_id(); hum->guild_id = msg.guild_id();
hum->vip_lv = msg.vip_lv(); hum->vip_lv = msg.vip_lv();
hum->head = msg.head(); hum->head_frame = msg.head_frame();
hum->sex = msg.sex(); hum->sex = msg.sex();
hum->user_data = msg.user_data(); hum->user_data = msg.user_data();
for (auto& weapon : msg.weapons()) { for (auto& weapon : msg.weapons()) {

View File

@ -265,7 +265,7 @@ message MFPlayerFull
optional int32 killer_id = 33; //id() id: -1: optional int32 killer_id = 33; //id() id: -1:
optional int32 vip_lv = 35 [default = 0]; //vip等级 optional int32 vip_lv = 35 [default = 0]; //vip等级
optional int32 head = 36 [default = 0]; // optional int32 head_frame = 36 [default = 0]; //
optional int32 sex = 37 [default = 0]; // optional int32 sex = 37 [default = 0]; //
repeated MFSkill skill_list = 38; // repeated MFSkill skill_list = 38; //

View File

@ -125,6 +125,7 @@ message Item
optional int32 use = 5; optional int32 use = 5;
optional int32 skinid = 6; optional int32 skinid = 6;
optional int32 isdefaultskin = 7; optional int32 isdefaultskin = 7;
optional int32 playerid = 8;
} }
message Equip message Equip