mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 12:31:31 +00:00
[Bug Fix] Fix for potential crash of DS damage on death (#4040)
On the unfortunate timing of a bot or owner dying when the bot deals damage due to a DS and the owner pointer is no longer valid.
This commit is contained in:
parent
71f47dbcef
commit
175f2b16f5
@ -4485,7 +4485,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
|
|||||||
if (attacker->IsBot()) {
|
if (attacker->IsBot()) {
|
||||||
Mob* owner = attacker->GetOwner();
|
Mob* owner = attacker->GetOwner();
|
||||||
|
|
||||||
if (owner->CastToClient()->GetFilter(FilterDamageShields) != FilterHide) {
|
if (owner && owner->CastToClient()->GetFilter(FilterDamageShields) != FilterHide) {
|
||||||
owner->MessageString(
|
owner->MessageString(
|
||||||
Chat::DamageShield,
|
Chat::DamageShield,
|
||||||
OTHER_HIT_NONMELEE,
|
OTHER_HIT_NONMELEE,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user