1
This commit is contained in:
parent
c240b72f13
commit
e14cdf0262
@ -65,19 +65,7 @@ void InGameVoice::OnHumanBeKill(int killer_id, Human* deader)
|
|||||||
if (!killer->dead) {
|
if (!killer->dead) {
|
||||||
IncIntMap(personal_nodead_series_kills_, killer_id);
|
IncIntMap(personal_nodead_series_kills_, killer_id);
|
||||||
}
|
}
|
||||||
{
|
TriggerEvent(killer, deader);
|
||||||
mt::InGameVoice::Traverse
|
|
||||||
(
|
|
||||||
room_->IsMobaModeRoom(),
|
|
||||||
InGameVoiceEventType_e::kGlobalKills,
|
|
||||||
[this, killer, deader] (const mt::InGameVoice* meta) -> bool
|
|
||||||
{
|
|
||||||
if (meta->MatchCond(global_kills_)) {
|
|
||||||
Notify(killer, deader, meta);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
room_->xtimer.SetTimeoutWpEx
|
room_->xtimer.SetTimeoutWpEx
|
||||||
(
|
(
|
||||||
@ -119,3 +107,20 @@ a8::Attacher* InGameVoice::GetNoDeadTimerAttacher(int killer_id)
|
|||||||
}
|
}
|
||||||
return &itr->second;
|
return &itr->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void InGameVoice::TriggerEvent(Human* killer, Human* deader)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
mt::InGameVoice::Traverse
|
||||||
|
(
|
||||||
|
room_->IsMobaModeRoom(),
|
||||||
|
InGameVoiceEventType_e::kGlobalKills,
|
||||||
|
[this, killer, deader] (const mt::InGameVoice* meta) -> bool
|
||||||
|
{
|
||||||
|
if (meta->MatchCond(global_kills_)) {
|
||||||
|
Notify(killer, deader, meta);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -18,6 +18,7 @@ class InGameVoice : public std::enable_shared_from_this<InGameVoice>
|
|||||||
private:
|
private:
|
||||||
void UpdateTeamBeKillLastTime(int team_id);
|
void UpdateTeamBeKillLastTime(int team_id);
|
||||||
a8::Attacher* GetNoDeadTimerAttacher(int killer_id);
|
a8::Attacher* GetNoDeadTimerAttacher(int killer_id);
|
||||||
|
void TriggerEvent(Human* killer, Human* deader);
|
||||||
|
|
||||||
void Notify(Human* killer, Human* deader, const mt::InGameVoice* meta);
|
void Notify(Human* killer, Human* deader, const mt::InGameVoice* meta);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user