1
This commit is contained in:
parent
a1a1d6ab27
commit
951ad8b1e2
@ -167,6 +167,11 @@ void CallFuncBuff::Activate()
|
|||||||
owner->room->frame_event.AddHpChg(owner->GetWeakPtrRef());
|
owner->room->frame_event.AddHpChg(owner->GetWeakPtrRef());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case BuffCallFunc_e::kSummonCarSpecPoint:
|
||||||
|
{
|
||||||
|
SummonCarSpecPoint();
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -870,3 +875,8 @@ void CallFuncBuff::ProcAddMaxHp()
|
|||||||
owner->SetMaxHP(owner->GetMaxHP() + hold_param2_);
|
owner->SetMaxHP(owner->GetMaxHP() + hold_param2_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CallFuncBuff::SummonCarSpecPoint()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -27,6 +27,7 @@ A8_DECLARE_CLASS_ENUM(BuffCallFunc_e, int,
|
|||||||
kDecSkillCd = 27,
|
kDecSkillCd = 27,
|
||||||
kRefreshHp = 28,
|
kRefreshHp = 28,
|
||||||
kAddMaxHp = 29,
|
kAddMaxHp = 29,
|
||||||
|
kSummonCarSpecPoint = 30
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -56,6 +57,7 @@ class CallFuncBuff : public Buff
|
|||||||
void SummonObstacleSpecDistance();
|
void SummonObstacleSpecDistance();
|
||||||
void ClearSummonObstacle();
|
void ClearSummonObstacle();
|
||||||
void DecSkillCd();
|
void DecSkillCd();
|
||||||
|
void SummonCarSpecPoint();
|
||||||
|
|
||||||
float hold_param2_ = 0.0;
|
float hold_param2_ = 0.0;
|
||||||
Weapon* hold_weapon_ = nullptr;
|
Weapon* hold_weapon_ = nullptr;
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include "bullet.h"
|
#include "bullet.h"
|
||||||
#include "buff.h"
|
#include "buff.h"
|
||||||
#include "stats.h"
|
#include "stats.h"
|
||||||
|
#include "team.h"
|
||||||
|
|
||||||
#include "mt/Buff.h"
|
#include "mt/Buff.h"
|
||||||
#include "mt/Skill.h"
|
#include "mt/Skill.h"
|
||||||
@ -269,7 +270,33 @@ void Trigger::Die(int killer_id, int weapon_id)
|
|||||||
owner_->RemoveBuffByUniId(buff_uniid);
|
owner_->RemoveBuffByUniId(buff_uniid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TriggeCondBuffAll(kEventBuffDid);
|
Creature* killer = owner_->room->GetCreatureByUniId(killer_id);
|
||||||
|
TraverseCondBuffs
|
||||||
|
(kEventBuffDid,
|
||||||
|
[this, killer, killer_id] (Buff* buff, bool& stop)
|
||||||
|
{
|
||||||
|
switch (buff->meta->_int_buff_param2) {
|
||||||
|
case 0:
|
||||||
|
{
|
||||||
|
AddBuffs(buff, kEventBuffDid, buff->meta->_buff_param4_int_list);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
if (killer && killer->IsHuman()) {
|
||||||
|
auto buff_vars = std::make_shared<std::vector<float>>();
|
||||||
|
buff_vars->push_back(killer->GetUniId());
|
||||||
|
buff_vars->push_back(killer->GetTeam()->GetTeamId());
|
||||||
|
AddBuffs(buff, kEventBuffDid, buff->meta->_buff_param4_int_list, buff_vars);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
DispatchEvent(kDieEvent, {killer_id, weapon_id});
|
DispatchEvent(kDieEvent, {killer_id, weapon_id});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user