game2006/server/gameserver/mt/InGameVoice.h
aozhiwei 5d9de283df 1
2024-03-29 17:25:37 +08:00

68 lines
1.6 KiB
C++

#pragma once
#include "mt/macro.h"
#include "mtb/InGameVoice.h"
A8_DECLARE_ENUM(InGameVoiceEventType_e,
kGlobalKills = 1,
kPersonalExceptFirstBooldKills = 2,
kMyTeamateBeKill = 3,
kEnemyTeamBekill = 4,
kTeamAllDead = 5,
kSeriesKills = 11,
kNoDeadSeriesKills = 21,
kFail = 99,
kVictory = 100
);
A8_DECLARE_ENUM(InGameVoiceNotifyObject_e,
kGlobal,
kKiller,
kNoKiller,
kKillerTeam,
kNoKillerTeam,
kDead,
kNoDead,
kDeadTeam,
kNoDeadTeam,
kTeammateExcludeDead
);
A8_DECLARE_ENUM(InGameVoiceCondType_e,
kNone,
kEq,
kGT,
kGE
);
namespace mt
{
DECLARE_ID_TABLE(InGameVoice, mtb::InGameVoice,
"ingameVoice@ingameVoice.json",
"id")
public:
static int s_play_interval;
static int s_series_kill_interval;
void Init1();
void Init2();
InGameVoiceNotifyObject_e GetNotifyObject() const;
InGameVoiceCondType_e CondType() const;
int CondVal() const;
static void Traverse(bool is_moba_room, int event_type, std::function<bool (const InGameVoice*)> cb);
private:
InGameVoiceNotifyObject_e _notify_object;
InGameVoiceCondType_e _cond_type = InGameVoiceCondType_e::kNone;
int _cond_val = 0;
static std::map<int, std::vector<const InGameVoice*>> s_type_hash_;
};
}