This commit is contained in:
aozhiwei 2024-08-02 11:37:47 +08:00
parent 6acf456b7a
commit 03f450866d
5 changed files with 20 additions and 2 deletions

View File

@ -45,7 +45,7 @@ void Android::Initialize()
{
Human::Initialize();
account_id = a8::Format("0000_2006_%d", {robot_meta->id()});
RandSkin();
//RandSkin();
GiveEquip();
RecalcBaseAttr();
SetInfiniteBulletMode();
@ -63,6 +63,7 @@ void Android::Initialize()
);
GetNetData()->Init(this);
}
RandSkin();
SetHP(GetNetData()->GetMaxHP());
SetMaxHP(GetHP());
{
@ -176,6 +177,13 @@ void Android::GiveEquip()
void Android::RandSkin()
{
#ifdef MYDEBUG
{
Skin& skin = skins[0];
skin.skin_id = 1 + meta->skinlist();
skin.skin_lv = 1;
}
#endif
#if 0
if (!robot_meta->_skin_id.empty()) {
Skin& skin = skins[0];

View File

@ -15,6 +15,7 @@
#include "sandtable.h"
#include "stats.h"
#include "ingamevoice.h"
#include "netdata.h"
#include "mt/AirLine.h"
#include "mt/Hero.h"
@ -636,7 +637,7 @@ void FrameMaker::SerializeVoices(cs::SMUpdate* msg, Room* room, Human* hum, Fram
p->mutable_kill_info()->set_dead_uniid(hum->GetUniId());
p->mutable_kill_info()->set_dead_name(hum->GetName());
p->mutable_kill_info()->set_dead_hero_id(hum->GetHeroMeta()->id());
p->mutable_skin_id()->set_dead_hero_id(hum->GetNetData()->GetSkinId());
p->mutable_kill_info()->set_dead_skin_id(hum->GetNetData()->GetSkinId());
}
}
#ifdef MYDEBUG

View File

@ -1076,6 +1076,13 @@ void BattleDataContext::Init(Creature* c)
if (weapon2_ability_) {
weapon2_ability_->Init(c);
}
#ifdef MYDEBUG
{
if (c->IsAndroid()) {
skin_id_ = 1 + c->GetHeroMeta()->skinlist();
}
}
#endif
if (skin_id_ && c->IsHuman()) {
const mt::Item* item_meta = mt::Item::GetById(skin_id_);
if (item_meta) {

View File

@ -1094,6 +1094,7 @@ void Human::FillMFTeamMemberNew(cs::MFTeamMemberNew* p)
p->set_hero_max_exp(GetHeroMaxExp());
p->set_main_skill_cd(GetMainSkill()->GetLeftTime());
p->set_main_skill_max_cd(GetMainSkill()->GetCd());
p->set_skin_id(GetNetData()->GetSkinId());
}
void Human::FillSMGameOver(cs::SMGameOver& msg)

View File

@ -765,6 +765,7 @@ message MFTeamMemberNew
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上限时间
optional int32 skin_id = 27 [default = 0]; //
}
//-