[Combat Messages] Fix issue where pet proc damage was not showing up (#3551)

* [Combat Messages] Fix issue where pet proc damage was not showing up

* Put back needed "skip" for some melee messages.

* spacing
This commit is contained in:
Paul Coene 2023-08-24 16:52:18 -04:00 committed by GitHub
parent 79a3ce8d7e
commit a2b78ff4e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4230,7 +4230,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
//attacker is a pet, let pet owners see their pet's damage
Mob* owner = attacker->GetOwner();
if (owner && owner->IsClient()) {
if ((IsValidSpell(spell_id) || (FromDamageShield)) && damage > 0) {
if (FromDamageShield && damage > 0) {
//special crap for spell damage, looks hackish to me
char val1[20] = { 0 };
owner->MessageString(Chat::NonMelee, OTHER_HIT_NONMELEE, GetCleanName(), ConvertArray(damage, val1));
@ -4249,7 +4249,15 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
filter = FilterPetMisses;
if (!FromDamageShield)
owner->CastToClient()->QueuePacket(outapp, true, CLIENT_CONNECTED, filter);
entity_list.QueueCloseClients(
this, /* Sender */
outapp, /* packet */
false, /* Skip Sender */
((IsValidSpell(spell_id)) ? RuleI(Range, SpellMessages) : RuleI(Range, DamageMessages)),
0, /* don't skip anyone on spell */
true, /* Packet ACK */
filter /* eqFilterType filter */
);
}
}
@ -4351,16 +4359,21 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
CastToClient()->QueuePacket(outapp);
}
// Otherwise, send normal spell or melee message to observers.
entity_list.QueueCloseClients(
this, /* Sender */
outapp, /* packet */
true, /* Skip Sender */
range, /* distance packet travels at the speed of sound */
(IsValidSpell(spell_id) && skill_used != EQ::skills::SkillTigerClaw) ? 0 : skip,
true, /* Packet ACK */
filter /* eqFilterType filter */
);
// Send normal message to observers
// Exclude damage done by client pets as that's handled
// elsewhere using proper "my pet damage filter"
Mob *owner = attacker->GetOwner();
if (!owner || (owner && !owner->IsClient())) {
entity_list.QueueCloseClients(
this, /* Sender */
outapp, /* packet */
true, /* Skip Sender */
range, /* distance packet travels at the speed of sound */
(IsValidSpell(spell_id) && skill_used != EQ::skills::SkillTigerClaw) ? 0 : skip,
true, /* Packet ACK */
filter /* eqFilterType filter */
);
}
}
}