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,
|
InGameVoiceEventType_e::kGlobalKills,
|
||||||
[this] (const mt::InGameVoice* meta) -> bool
|
[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;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -129,14 +129,31 @@ namespace mt
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
InGameVoiceCondType_e InGameVoice::CondType() const
|
bool InGameVoice::MatchCond(int val) const
|
||||||
{
|
{
|
||||||
return _cond_type;
|
switch (_cond_type) {
|
||||||
}
|
case InGameVoiceCondType_e::kEQ:
|
||||||
|
{
|
||||||
int InGameVoice::CondVal() const
|
return _cond_val == val;
|
||||||
{
|
}
|
||||||
return _cond_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 Init1();
|
||||||
void Init2();
|
void Init2();
|
||||||
InGameVoiceNotifyObject_e GetNotifyObject() const;
|
InGameVoiceNotifyObject_e GetNotifyObject() const;
|
||||||
InGameVoiceCondType_e CondType() const;
|
bool MatchCond(int val) const;
|
||||||
int CondVal() const;
|
|
||||||
|
|
||||||
static void Traverse(bool is_moba_room, int event_type, std::function<bool (const InGameVoice*)> cb);
|
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