1
This commit is contained in:
parent
673580d178
commit
6d4aa34c9e
@ -745,9 +745,7 @@ void CallFuncBuff::SummonObstacleSpecDistance()
|
||||
|
||||
void CallFuncBuff::ClearSummonObstacle()
|
||||
{
|
||||
#if 0
|
||||
int hero_id = meta->_int_buff_param2;
|
||||
float hero_num = meta->GetBuffParam3(this);
|
||||
owner->RemoveSurplusHero(hero_id, hero_num);
|
||||
#endif
|
||||
int id = meta->_int_buff_param2;
|
||||
float num = meta->GetBuffParam3(this);
|
||||
owner->RemoveSurplusObstacle(id, num);
|
||||
}
|
||||
|
@ -3074,3 +3074,23 @@ std::shared_ptr<std::set<int>> Creature::CalcReporterList(const mt::Equip* weapo
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
void Creature::RemoveSurplusObstacle(int id, int num)
|
||||
{
|
||||
#if 0
|
||||
if (slave_things_.size() >= num && num > 0) {
|
||||
std::vector<RoomObstacleWeakPtr> matched_things;
|
||||
for (auto& itr : slave_things_) {
|
||||
if (std::get<0>(itr) == buff_id &&
|
||||
std::get<1>(itr).Get() &&
|
||||
std::get<1>(itr).Get()->meta->thing_id() == id) {
|
||||
matched_things.push_back(std::get<1>(itr));
|
||||
}
|
||||
}
|
||||
while (matched_things.size() > num) {
|
||||
matched_things[0].Get()->Destory();
|
||||
matched_things.erase(matched_things.begin());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user