procs silence (#1973)

This commit is contained in:
KayenEQ 2022-02-08 07:36:20 -05:00 committed by GitHub
parent 872d494bb6
commit e962ad3a35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3984,6 +3984,16 @@ void Mob::ExecWeaponProc(const EQ::ItemInstance *inst, uint16 spell_id, Mob *on,
return;
}
if (IsSilenced() && !IsDiscipline(spell_id)) {
MessageString(Chat::Red, SILENCED_STRING);
return;
}
if (IsAmnesiad() && IsDiscipline(spell_id)) {
MessageString(Chat::Red, MELEE_SILENCE);
return;
}
if(inst && IsClient()) {
//const cast is dirty but it would require redoing a ton of interfaces at this point
//It should be safe as we don't have any truly const EQ::ItemInstance floating around anywhere.