mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-09 16:33:53 +00:00
[Cleanup] Remove unnecessary conditions in Client::FilteredMessageCheck() (#3262)
# Notes - We check `FilterHide` prior to the secondary conditions, so it can never show up.
This commit is contained in:
parent
9009a7aa23
commit
a0768d2d28
@ -3304,28 +3304,28 @@ bool Client::FilteredMessageCheck(Mob *sender, eqFilterType filter)
|
||||
{
|
||||
eqFilterMode mode = GetFilter(filter);
|
||||
// easy ones first
|
||||
if (mode == FilterShow)
|
||||
if (mode == FilterShow) {
|
||||
return true;
|
||||
else if (mode == FilterHide)
|
||||
} else if (mode == FilterHide) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (sender != this && (mode == FilterHide || mode == FilterShowSelfOnly)) {
|
||||
if (sender != this && mode == FilterShowSelfOnly) {
|
||||
return false;
|
||||
} else if (sender) {
|
||||
if (this == sender) {
|
||||
if (mode == FilterHide) // don't need to check others
|
||||
return false;
|
||||
} else if (mode == FilterShowGroupOnly) {
|
||||
Group *g = GetGroup();
|
||||
Raid *r = GetRaid();
|
||||
if (mode == FilterShowGroupOnly) {
|
||||
auto g = GetGroup();
|
||||
auto r = GetRaid();
|
||||
if (g) {
|
||||
if (g->IsGroupMember(sender))
|
||||
if (g->IsGroupMember(sender)) {
|
||||
return true;
|
||||
}
|
||||
} else if (r && sender->IsClient()) {
|
||||
uint32 rgid1 = r->GetGroup(this);
|
||||
uint32 rgid2 = r->GetGroup(sender->CastToClient());
|
||||
if (rgid1 != 0xFFFFFFFF && rgid1 == rgid2)
|
||||
auto rgid1 = r->GetGroup(this);
|
||||
auto rgid2 = r->GetGroup(sender->CastToClient());
|
||||
if (rgid1 != RAID_GROUPLESS && rgid1 == rgid2) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user