1
This commit is contained in:
parent
8e47e80230
commit
25b139c3da
@ -603,7 +603,9 @@ Hero* Room::CreateHero(Creature* master,
|
||||
{
|
||||
Hero* hero = EntityFactory::Instance()->MakeHero(AllocUniid());
|
||||
hero->meta = meta;
|
||||
if (master) {
|
||||
hero->master.Attach(master);
|
||||
}
|
||||
hero->room = this;
|
||||
hero->SetPos(pos);
|
||||
hero->SetMoveDir(dir);
|
||||
@ -3788,5 +3790,21 @@ void Room::ForwardGasRing(int n)
|
||||
|
||||
void Room::ShuaMon(const a8::Vec2& center, std::vector<int>& airdrop_mon_list)
|
||||
{
|
||||
|
||||
for (int hero_id : airdrop_mon_list) {
|
||||
MetaData::Player* hero_meta = MetaMgr::Instance()->GetPlayer(hero_id);
|
||||
if (hero_meta) {
|
||||
int team_id = 666;
|
||||
Creature* master = nullptr;
|
||||
a8::Vec2 pos = center;
|
||||
a8::Vec2 dir = center;
|
||||
Hero* hero = CreateHero(master,
|
||||
hero_meta,
|
||||
pos,
|
||||
dir,
|
||||
team_id);
|
||||
if (!hero) {
|
||||
abort();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user