1
This commit is contained in:
parent
28c86b6ebd
commit
e7b8529238
@ -2070,6 +2070,7 @@ void Creature::SummonHero(Buff* buff,
|
||||
float y = std::get<2>(info) ;
|
||||
int hero_id = std::get<3>(info);
|
||||
int num = std::get<4>(info);
|
||||
int life_time = std::get<5>(info);
|
||||
MetaData::Player* hero_meta = MetaMgr::Instance()->GetPlayer(hero_id);
|
||||
if (hero_meta) {
|
||||
for (int j = 0; j < num; ++j) {
|
||||
@ -2086,6 +2087,18 @@ void Creature::SummonHero(Buff* buff,
|
||||
if (hero) {
|
||||
RemoveSurplusHero(buff->meta->i->buff_id(), hero_id, num);
|
||||
slave_heros_.push_back(std::make_tuple(buff->meta->i->buff_id(), hero));
|
||||
hero->room->xtimer.AddDeadLineTimerAndAttach
|
||||
(
|
||||
life_time / FRAME_RATE_MS,
|
||||
a8::XParams(),
|
||||
[] (const a8::XParams& param)
|
||||
{
|
||||
},
|
||||
&hero->xtimer_attacher.timer_list_,
|
||||
[] (const a8::XParams& param)
|
||||
{
|
||||
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -909,9 +909,10 @@ namespace MetaData
|
||||
float y = a8::XValue(strings2[2]).GetDouble();
|
||||
int hero_id = a8::XValue(strings2[3]);
|
||||
int num = strings2.size() > 4 ? a8::XValue(strings2[4]).GetInt() : 10000;
|
||||
int life_time = strings2.size() > 5 ? a8::XValue(strings2[5]).GetInt() : 1000;
|
||||
hero_infos.push_back
|
||||
(
|
||||
std::make_tuple(through_wall, x, y, hero_id, num)
|
||||
std::make_tuple(through_wall, x, y, hero_id, num, life_time)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -221,7 +221,7 @@ namespace MetaData
|
||||
std::vector<std::tuple<int, std::vector<std::tuple<int, int>>>> batch_add_list;
|
||||
std::vector<std::tuple<int, std::vector<int>>> post_remove_action;
|
||||
std::set<int> immune_buffeffect;
|
||||
std::vector<std::tuple<int, float, float, int, int>> hero_infos;
|
||||
std::vector<std::tuple<int, float, float, int, int, int>> hero_infos;
|
||||
std::set<int> tags;
|
||||
|
||||
std::vector<int> child_buff_list;
|
||||
|
@ -1151,7 +1151,7 @@ void Player::_CMMove(f8::MsgHdr& hdr, const cs::CMMove& msg)
|
||||
get_on = msg.get_on();
|
||||
}
|
||||
if (msg.has_switch_seat()) {
|
||||
switch_seat = msg.has_switch_seat() + 1;
|
||||
switch_seat = msg.switch_seat() + 1;
|
||||
}
|
||||
if (msg.has_jump()) {
|
||||
jump = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user