mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-02 06:02:25 +00:00
[Bug Fix] Patch for recent change to DEATH (#4032)
This commit is contained in:
parent
f98c79fdba
commit
5377bb3f49
@ -2454,6 +2454,8 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto* killer = GetHateDamageTop(this);
|
||||||
|
|
||||||
entity_list.RemoveFromTargets(this, p_depop);
|
entity_list.RemoveFromTargets(this, p_depop);
|
||||||
|
|
||||||
if (p_depop) {
|
if (p_depop) {
|
||||||
@ -2509,7 +2511,7 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
|
|||||||
Mob* give_exp = hate_list.GetDamageTopOnHateList(this);
|
Mob* give_exp = hate_list.GetDamageTopOnHateList(this);
|
||||||
|
|
||||||
if (give_exp) {
|
if (give_exp) {
|
||||||
give_exp = killer_mob;
|
give_exp = killer;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (give_exp && give_exp->HasOwner()) {
|
if (give_exp && give_exp->HasOwner()) {
|
||||||
@ -2795,18 +2797,18 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
|
|||||||
(!is_merchant || allow_merchant_corpse) &&
|
(!is_merchant || allow_merchant_corpse) &&
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
killer_mob &&
|
killer &&
|
||||||
(
|
(
|
||||||
killer_mob->IsClient() ||
|
killer->IsClient() ||
|
||||||
(
|
(
|
||||||
killer_mob->HasOwner() &&
|
killer->HasOwner() &&
|
||||||
killer_mob->GetUltimateOwner()->IsClient()
|
killer->GetUltimateOwner()->IsClient()
|
||||||
) ||
|
) ||
|
||||||
(
|
(
|
||||||
killer_mob->IsNPC() &&
|
killer->IsNPC() &&
|
||||||
killer_mob->CastToNPC()->GetSwarmInfo() &&
|
killer->CastToNPC()->GetSwarmInfo() &&
|
||||||
killer_mob->CastToNPC()->GetSwarmInfo()->GetOwner() &&
|
killer->CastToNPC()->GetSwarmInfo()->GetOwner() &&
|
||||||
killer_mob->CastToNPC()->GetSwarmInfo()->GetOwner()->IsClient()
|
killer->CastToNPC()->GetSwarmInfo()->GetOwner()->IsClient()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
) ||
|
) ||
|
||||||
@ -2815,13 +2817,13 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
if (killer_mob) {
|
if (killer) {
|
||||||
if (killer_mob->GetOwner() != 0 && killer_mob->GetOwner()->IsClient()) {
|
if (killer->GetOwner() != 0 && killer->GetOwner()->IsClient()) {
|
||||||
killer_mob = killer_mob->GetOwner();
|
killer = killer->GetOwner();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (killer_mob->IsClient() && !killer_mob->CastToClient()->GetGM()) {
|
if (killer->IsClient() && !killer->CastToClient()->GetGM()) {
|
||||||
CheckTrivialMinMaxLevelDrop(killer_mob);
|
CheckTrivialMinMaxLevelDrop(killer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2854,10 +2856,10 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
|
|||||||
SetID(0);
|
SetID(0);
|
||||||
ApplyIllusionToCorpse(illusion_spell_id, corpse);
|
ApplyIllusionToCorpse(illusion_spell_id, corpse);
|
||||||
|
|
||||||
if (killer_mob && killer_mob->IsClient()) {
|
if (killer && killer->IsClient()) {
|
||||||
corpse->AllowPlayerLoot(killer_mob, 0);
|
corpse->AllowPlayerLoot(killer, 0);
|
||||||
if (killer_mob->IsGrouped()) {
|
if (killer->IsGrouped()) {
|
||||||
Group* g = entity_list.GetGroupByClient(killer_mob->CastToClient());
|
Group* g = entity_list.GetGroupByClient(killer->CastToClient());
|
||||||
if (g) {
|
if (g) {
|
||||||
uint8 slot_id = 0;
|
uint8 slot_id = 0;
|
||||||
|
|
||||||
@ -2869,8 +2871,8 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
|
|||||||
slot_id++;
|
slot_id++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (killer_mob->IsRaidGrouped()) {
|
} else if (killer->IsRaidGrouped()) {
|
||||||
Raid* r = entity_list.GetRaidByClient(killer_mob->CastToClient());
|
Raid* r = entity_list.GetRaidByClient(killer->CastToClient());
|
||||||
if (r) {
|
if (r) {
|
||||||
uint8 slot_id = 0;
|
uint8 slot_id = 0;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user