mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-27 06:22:26 +00:00
Merge pull request #1038 from alimalkhalifa/fix_charm_break_during_cast_lifetap_nuke
Fix edge case with NPC pet owners charming PCs
This commit is contained in:
commit
874ca053f7
@ -3979,6 +3979,8 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
|
|||||||
cd->hit_heading = action->hit_heading;
|
cd->hit_heading = action->hit_heading;
|
||||||
cd->hit_pitch = action->hit_pitch;
|
cd->hit_pitch = action->hit_pitch;
|
||||||
cd->damage = 0;
|
cd->damage = 0;
|
||||||
|
|
||||||
|
auto spellOwner = GetOwnerOrSelf();
|
||||||
if(!IsEffectInSpell(spell_id, SE_BindAffinity) && !is_damage_or_lifetap_spell){
|
if(!IsEffectInSpell(spell_id, SE_BindAffinity) && !is_damage_or_lifetap_spell){
|
||||||
entity_list.QueueCloseClients(
|
entity_list.QueueCloseClients(
|
||||||
spelltar, /* Sender */
|
spelltar, /* Sender */
|
||||||
@ -3989,14 +3991,8 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
|
|||||||
true, /* Packet ACK */
|
true, /* Packet ACK */
|
||||||
(spelltar->IsClient() ? FilterPCSpells : FilterNPCSpells) /* Message Filter Type: (8 or 9) */
|
(spelltar->IsClient() ? FilterPCSpells : FilterNPCSpells) /* Message Filter Type: (8 or 9) */
|
||||||
);
|
);
|
||||||
} else if (is_damage_or_lifetap_spell &&
|
} else if (is_damage_or_lifetap_spell && spellOwner->IsClient()) {
|
||||||
(IsClient() ||
|
spellOwner->CastToClient()->QueuePacket(
|
||||||
(HasOwner() &&
|
|
||||||
GetOwner()->IsClient()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
(HasOwner() ? GetOwner() : this)->CastToClient()->QueuePacket(
|
|
||||||
message_packet,
|
message_packet,
|
||||||
true,
|
true,
|
||||||
Mob::CLIENT_CONNECTINGALL,
|
Mob::CLIENT_CONNECTINGALL,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user