This commit is contained in:
aozhiwei 2024-04-19 17:09:34 +08:00
parent 55dc6d2322
commit 65137e50ea
3 changed files with 13 additions and 22 deletions

View File

@ -1603,17 +1603,6 @@ behaviac::EBTStatus HeroAgent::ThrowItem(int slot)
fly_distance,
0);
last_throw_item_frameno_ = owner_->room->GetFrameNo();
switch (weapon_slot) {
case IS_FRAG:
{
owner_->TryAddBuffAndSetTime(owner_, kVertigoBuffId, mt::Param::s().frag_dinshen_time);
}
break;
default:
{
}
break;
}
return behaviac::BT_SUCCESS;
}
}

View File

@ -2968,6 +2968,19 @@ int Creature::Throw(int slot, const glm::vec3& bomb_pos, const glm::vec3& bomb_d
if (slot < 0 || slot >= weapons.size()) {
return 0;
}
switch (slot) {
case IS_FRAG:
case IS_SMOKE:
case IS_MOLOTOR_COCKTAIL:
{
TryAddBuffAndSetTime(this, kVertigoBuffId, mt::Param::s().frag_dinshen_time);
}
break;
default:
{
}
break;
}
Weapon& weapon = weapons.at(slot);
if (weapon.weapon_idx != 0 &&
weapon.meta &&

View File

@ -1762,17 +1762,6 @@ void Player::UpdateThrowBomb()
bomb_dir,
throw_bomb->fly_distance(),
0);
switch (equip_meta->_inventory_slot()) {
case IS_FRAG:
{
TryAddBuffAndSetTime(this, kVertigoBuffId, mt::Param::s().frag_dinshen_time);
}
break;
default:
{
}
break;
}
SendUnityDebugMsg(this, a8::Format("xxxxxxxx 9 throw_uniid:%d", {throw_bomb->throw_uniid()}));
}
}