1
This commit is contained in:
parent
e0bc44f63b
commit
992dd27cef
@ -46,27 +46,6 @@ void InGameVoice::OnHumanBeKill(int killer_id, Human* deader)
|
||||
InGameVoiceEventType_e::kGlobalKills,
|
||||
[this] (const mt::InGameVoice* meta) -> bool
|
||||
{
|
||||
switch (meta->CondType()) {
|
||||
case InGameVoiceCondType_e::kEQ:
|
||||
{
|
||||
|
||||
}
|
||||
break;
|
||||
case InGameVoiceCondType_e::kGT:
|
||||
{
|
||||
|
||||
}
|
||||
break;
|
||||
case InGameVoiceCondType_e::kGE:
|
||||
{
|
||||
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
@ -129,14 +129,31 @@ namespace mt
|
||||
}
|
||||
}
|
||||
|
||||
InGameVoiceCondType_e InGameVoice::CondType() const
|
||||
bool InGameVoice::MatchCond(int val) const
|
||||
{
|
||||
return _cond_type;
|
||||
}
|
||||
|
||||
int InGameVoice::CondVal() const
|
||||
{
|
||||
return _cond_val;
|
||||
switch (_cond_type) {
|
||||
case InGameVoiceCondType_e::kEQ:
|
||||
{
|
||||
return _cond_val == val;
|
||||
}
|
||||
break;
|
||||
case InGameVoiceCondType_e::kGT:
|
||||
{
|
||||
return _cond_val > val;
|
||||
}
|
||||
break;
|
||||
case InGameVoiceCondType_e::kGE:
|
||||
{
|
||||
return _cond_val >= val;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -50,8 +50,7 @@ namespace mt
|
||||
void Init1();
|
||||
void Init2();
|
||||
InGameVoiceNotifyObject_e GetNotifyObject() const;
|
||||
InGameVoiceCondType_e CondType() const;
|
||||
int CondVal() const;
|
||||
bool MatchCond(int val) const;
|
||||
|
||||
static void Traverse(bool is_moba_room, int event_type, std::function<bool (const InGameVoice*)> cb);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user