This commit is contained in:
aozhiwei 2021-04-20 15:26:17 +08:00
parent 573a0d87eb
commit a553d6b0d8
5 changed files with 13 additions and 0 deletions

View File

@ -53,6 +53,7 @@ enum BuffEffectType_e
kBET_SummonObstacle = 36, //召唤物件
kBET_FlashMove = 37, //瞬间移动
kBET_FollowMaster = 49, //跟随主人
kBET_ThroughWall = 50, //穿墙
kBET_Driver = 51, //驾驶中
kBET_Passenger = 52, //乘座中

View File

@ -237,6 +237,13 @@ namespace MetaData
}
}
}
{
std::vector<std::string> strings;
a8::Split(i->init_buffs(), strings, '|');
for (auto& str : strings) {
init_buffs.push_back(a8::XValue(str));
}
}
}
void Robot::Init()

View File

@ -87,6 +87,7 @@ namespace MetaData
const metatable::Player* i = nullptr;
std::array<int, IS_END> volume = {};
std::vector<int> init_buffs;
void Init();
};

View File

@ -616,6 +616,9 @@ Hero* Room::CreateHero(Creature* master,
AddToMoveableHash(hero);
grid_service->AddCreature(hero);
hero->RefreshView();
for (int buff_id : meta->init_buffs) {
hero->MustBeAddBuff(hero, buff_id);
}
return hero;
}

View File

@ -155,6 +155,7 @@ message Player
optional int32 normal_skill = 24;
optional float hit_radius = 25;
optional string ai_script = 26;
optional string init_buffs = 27;
}
message Robot