This commit is contained in:
aozhiwei 2024-05-22 16:09:07 +08:00
parent e93d832101
commit 514509170c
4 changed files with 23 additions and 1 deletions

View File

@ -1827,7 +1827,7 @@ void CallFuncBuff::RandAdd()
void CallFuncBuff::ShowExplosion()
{
if (owner->dead || !meta->dead_valid()) {
if (owner->dead && !meta->dead_valid()) {
return;
}
int explosion_effect = meta->GetBuffParam2(this);

View File

@ -3587,6 +3587,26 @@ void Creature::RemoveSurplusObstacle(int id, int num)
}
}
void Creature::RemoveSurplusObstacleByUniid(int obj_uniid)
{
for (auto itr : slave_things2_) {
list_head* pos = nullptr;
list_head* next = nullptr;
float new_val = 0.0f;
bool inited = false;
list_for_each_safe(pos, next, &itr.second) {
RoomObstacle* ob = list_entry(pos,
RoomObstacle,
entry);
if (ob->GetUniId() == obj_uniid) {
ob->Destory();
list_del_init(&ob->entry);
return;
}
}
}
}
Obstacle* Creature::InternalSummonObstacle(Buff* buff, const mt::MapThing* thing_meta,
glm::vec3 dir, const glm::vec3 born_pos)
{

View File

@ -300,6 +300,7 @@ class Creature : public MoveableEntity
void RemoveSurplusHero(int hero_id, int num);
Obstacle* SummonObstacle(Buff* buff, int id, const glm::vec3& pos, const glm::vec3& dir);
void RemoveSurplusObstacle(int thing_id, int num);
void RemoveSurplusObstacleByUniid(int obj_uniid);
void FillSkillCasterState(SkillCasterState* caster_state);
void RecoverSkillCasterState(SkillCasterState* caster_state);
CreatureWeakPtr AllocWeakPtr();

View File

@ -829,6 +829,7 @@ message MFBullet
optional int32 bullet_uniid = 12; //id
optional int32 hand = 16 [default = 0]; // 0: 1:
optional int32 duration = 21; //(,>0)
optional int32 scale = 22 [default = 1]; //
//(trace_target_uniid != 0)
optional int32 trace_target_uniid = 13 [default = 0]; //0uniid