1
This commit is contained in:
parent
65c6094079
commit
d396d12c8f
@ -158,6 +158,12 @@ void Bullet::ProcBomb()
|
|||||||
{
|
{
|
||||||
ProcSignalGunBomb(delay_time);
|
ProcSignalGunBomb(delay_time);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case IS_SHIELD_WALL:
|
||||||
|
{
|
||||||
|
ProcShieldWallBomb(delay_time);
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -214,7 +220,8 @@ bool Bullet::IsBomb()
|
|||||||
meta->i->_inventory_slot() == IS_POSION_GAS_BOMB ||
|
meta->i->_inventory_slot() == IS_POSION_GAS_BOMB ||
|
||||||
meta->i->_inventory_slot() == IS_MOLOTOR_COCKTAIL ||
|
meta->i->_inventory_slot() == IS_MOLOTOR_COCKTAIL ||
|
||||||
meta->i->_inventory_slot() == IS_C4 ||
|
meta->i->_inventory_slot() == IS_C4 ||
|
||||||
meta->i->_inventory_slot() == IS_SINGAL_GUN;
|
meta->i->_inventory_slot() == IS_SINGAL_GUN ||
|
||||||
|
meta->i->_inventory_slot() == IS_SHIELD_WALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Bullet::MapServiceUpdate()
|
void Bullet::MapServiceUpdate()
|
||||||
@ -411,3 +418,19 @@ void Bullet::ProcSignalGunBomb(int delay_time)
|
|||||||
sender.Get()->buff_vec2_param1 = old_buff_vec2_param1;
|
sender.Get()->buff_vec2_param1 = old_buff_vec2_param1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Bullet::ProcShieldWallBomb(int delay_time)
|
||||||
|
{
|
||||||
|
if (sender.Get()) {
|
||||||
|
a8::Vec2 old_buff_vec2_param1 = sender.Get()->buff_vec2_param1;
|
||||||
|
sender.Get()->buff_vec2_param1 = GetPos();
|
||||||
|
MetaData::Buff * buff_meta = MetaMgr::Instance()->GetBuff(gun_meta->i->buffid());
|
||||||
|
if (buff_meta) {
|
||||||
|
sender.Get()->AddBuff(sender.Get(),
|
||||||
|
buff_meta,
|
||||||
|
1
|
||||||
|
);
|
||||||
|
}
|
||||||
|
sender.Get()->buff_vec2_param1 = old_buff_vec2_param1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -51,6 +51,7 @@ protected:
|
|||||||
void ProcMolotorCocktailBomb(int delay_time);
|
void ProcMolotorCocktailBomb(int delay_time);
|
||||||
void ProcC4Bomb(int delay_time);
|
void ProcC4Bomb(int delay_time);
|
||||||
void ProcSignalGunBomb(int delay_time);
|
void ProcSignalGunBomb(int delay_time);
|
||||||
|
void ProcShieldWallBomb(int delay_time);
|
||||||
inline void MapServiceUpdate();
|
inline void MapServiceUpdate();
|
||||||
void Check(float distance);
|
void Check(float distance);
|
||||||
|
|
||||||
|
@ -290,6 +290,21 @@ void Creature::RemoveBuffById(int buff_id)
|
|||||||
for (auto& tuple1 : removed_buffs) {
|
for (auto& tuple1 : removed_buffs) {
|
||||||
MetaData::Buff* buff_meta = std::get<0>(tuple1);
|
MetaData::Buff* buff_meta = std::get<0>(tuple1);
|
||||||
Creature* caster = std::get<1>(tuple1);
|
Creature* caster = std::get<1>(tuple1);
|
||||||
|
|
||||||
|
for (int child_buff_id : buff_meta->child_buff_list) {
|
||||||
|
RemoveBuffById(child_buff_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!HasBuffEffect(buff_meta->i->buff_effect()) &&
|
||||||
|
!list_empty(&depend_effect_[buff_meta->i->buff_effect()])) {
|
||||||
|
struct list_head work_list;
|
||||||
|
list_replace_init(&depend_effect_[buff_meta->i->buff_effect()], &work_list);
|
||||||
|
while (!list_empty(&work_list)) {
|
||||||
|
Buff* buff = list_first_entry(&work_list, Buff, depend_entry);
|
||||||
|
RemoveBuffById(buff->meta->i->buff_id());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (const auto& tuple : buff_meta->post_remove_action) {
|
for (const auto& tuple : buff_meta->post_remove_action) {
|
||||||
switch (std::get<0>(tuple)) {
|
switch (std::get<0>(tuple)) {
|
||||||
case kRemoveBuffByIdAction:
|
case kRemoveBuffByIdAction:
|
||||||
@ -317,18 +332,6 @@ void Creature::RemoveBuffById(int buff_id)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int child_buff_id : buff_meta->child_buff_list) {
|
|
||||||
RemoveBuffById(child_buff_id);
|
|
||||||
}
|
|
||||||
if (!HasBuffEffect(buff_meta->i->buff_effect()) &&
|
|
||||||
!list_empty(&depend_effect_[buff_meta->i->buff_effect()])) {
|
|
||||||
struct list_head work_list;
|
|
||||||
list_replace_init(&depend_effect_[buff_meta->i->buff_effect()], &work_list);
|
|
||||||
while (!list_empty(&work_list)) {
|
|
||||||
Buff* buff = list_first_entry(&work_list, Buff, depend_entry);
|
|
||||||
RemoveBuffById(buff->meta->i->buff_id());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
RecalcBuffAttr();
|
RecalcBuffAttr();
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -600,6 +600,7 @@ void Player::LootInteraction(Loot* entity)
|
|||||||
break;
|
break;
|
||||||
case EQUIP_TYPE_SPOILS:
|
case EQUIP_TYPE_SPOILS:
|
||||||
{
|
{
|
||||||
|
|
||||||
ProcSpoils(entity, item_meta);
|
ProcSpoils(entity, item_meta);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user