From 15ea58af6636acabf29a53b636a4e0db006564ce Mon Sep 17 00:00:00 2001 From: Noudess Date: Tue, 16 Apr 2024 15:42:48 -0400 Subject: [PATCH 1/2] [Messages] Fix multiple errors in spell damage at death. --- zone/attack.cpp | 41 +++++++++++++++++++++++++++++++++-------- zone/beacon.h | 2 +- zone/bot.cpp | 2 +- zone/bot.h | 2 +- zone/client.h | 2 +- zone/corpse.h | 3 ++- zone/encounter.h | 2 +- zone/merc.cpp | 2 +- zone/merc.h | 2 +- zone/mob.h | 2 +- zone/npc.h | 2 +- 11 files changed, 44 insertions(+), 18 deletions(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index 4375d13fc6..4f29ed0489 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -1724,7 +1724,7 @@ void Client::Damage(Mob* other, int64 damage, uint16 spell_id, EQ::skills::Skill } } -bool Client::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillType attack_skill, KilledByTypes killed_by) +bool Client::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillType attack_skill, KilledByTypes killed_by, bool iBuffTic) { if (!ClientFinishedLoading() || dead) { return false; @@ -1786,12 +1786,25 @@ bool Client::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::Skil /* Make Death Packet */ EQApplicationPacket app(OP_Death, sizeof(Death_Struct)); Death_Struct* d = (Death_Struct*)app.pBuffer; + + // Convert last message to color to avoid duplicate damage messages + // that occur in these rare cases when this is the death blow. + if (IsValidSpell(spell) && + (attack_skill == EQ::skills::SkillTigerClaw || + (IsDamageSpell(spell) && IsDiscipline(spell)) || + !iBuffTic)) { + d->attack_skill = DamageTypeSpell; + d->spell_id = (iBuffTic) ? UINT32_MAX : spell; + } + else { + d->attack_skill = SkillDamageTypes[attack_skill]; + d->spell_id = UINT32_MAX; + } + d->spawn_id = GetID(); d->killer_id = killer_mob ? killer_mob->GetID() : 0; d->corpseid = GetID(); d->bindzoneid = m_pp.binds[0].zone_id; - d->spell_id = IsValidSpell(spell) ? spell : 0xffffffff; - d->attack_skill = IsValidSpell(spell) ? 0xe7 : attack_skill; d->damage = damage; app.priority = 6; entity_list.QueueClients(this, &app); @@ -2380,7 +2393,7 @@ void NPC::Damage(Mob* other, int64 damage, uint16 spell_id, EQ::skills::SkillTyp } } -bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillType attack_skill, KilledByTypes killed_by) +bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillType attack_skill, KilledByTypes killed_by, bool iBuffTic) { LogCombat( "Fatal blow dealt by [{}] with [{}] damage, spell [{}], skill [{}]", @@ -2493,12 +2506,24 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy auto app = new EQApplicationPacket(OP_Death, sizeof(Death_Struct)); auto d = (Death_Struct*) app->pBuffer; + + // Convert last message to color to avoid duplicate damage messages + // that occur in these rare cases when this is the death blow. + if (IsValidSpell(spell) && + (attack_skill == EQ::skills::SkillTigerClaw || + (IsDamageSpell(spell) && IsDiscipline(spell)) || + !iBuffTic)) { + d->attack_skill = DamageTypeSpell; + d->spell_id = (iBuffTic) ? UINT32_MAX : spell; + } + else { + d->attack_skill = SkillDamageTypes[attack_skill]; + d->spell_id = UINT32_MAX; + } d->spawn_id = GetID(); d->killer_id = killer_mob ? killer_mob->GetID() : 0; d->bindzoneid = 0; - d->spell_id = UINT32_MAX; - d->attack_skill = SkillDamageTypes[attack_skill]; d->damage = damage; d->corpseid = GetID(); @@ -4257,8 +4282,8 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons if (!IsSaved && !TrySpellOnDeath()) { SetHP(-500); - - if (Death(attacker, damage, spell_id, skill_used)) { + // killedByType is clarified in Client::Death if we are client. + if (Death(attacker, damage, spell_id, skill_used, KilledByTypes::Killed_NPC, iBuffTic)) { return; } } diff --git a/zone/beacon.h b/zone/beacon.h index 0c65d46b5a..1ab589b9d5 100644 --- a/zone/beacon.h +++ b/zone/beacon.h @@ -34,7 +34,7 @@ class Beacon : public Mob ~Beacon(); //abstract virtual function implementations requird by base abstract class - virtual bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC) { return true; } + virtual bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC, bool iBuffTic = false) { return true; } virtual void Damage(Mob* from, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None) { return; } virtual bool HasRaid() { return false; } virtual bool HasGroup() { return false; } diff --git a/zone/bot.cpp b/zone/bot.cpp index cf07281baf..0002040a55 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -4341,7 +4341,7 @@ void Bot::PerformTradeWithClient(int16 begin_slot_id, int16 end_slot_id, Client* } } -bool Bot::Death(Mob *killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by) +bool Bot::Death(Mob *killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by, bool iBuffTic) { if (!NPC::Death(killer_mob, damage, spell_id, attack_skill)) { return false; diff --git a/zone/bot.h b/zone/bot.h index 66e3c2cb50..bce699fdd8 100644 --- a/zone/bot.h +++ b/zone/bot.h @@ -131,7 +131,7 @@ class Bot : public NPC { Bot(uint32 botID, uint32 botOwnerCharacterID, uint32 botSpellsID, double totalPlayTime, uint32 lastZoneId, NPCType *npcTypeData, int32 expansion_bitmask); //abstract virtual override function implementations requird by base abstract class - bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC) override; + bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC, bool iBuffTic = false) override; void Damage(Mob* from, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None) override; diff --git a/zone/client.h b/zone/client.h index b16e5d55ed..b168dab75c 100644 --- a/zone/client.h +++ b/zone/client.h @@ -261,7 +261,7 @@ class Client : public Mob bool GotoPlayerRaid(const std::string& player_name); //abstract virtual function implementations required by base abstract class - virtual bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC); + virtual bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC, bool iBuffTic = false); virtual void Damage(Mob* from, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None); virtual bool HasRaid() { return (GetRaid() ? true : false); } virtual bool HasGroup() { return (GetGroup() ? true : false); } diff --git a/zone/corpse.h b/zone/corpse.h index 2879cd85d9..b3f71cb56e 100644 --- a/zone/corpse.h +++ b/zone/corpse.h @@ -68,7 +68,8 @@ class Corpse : public Mob { int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, - KilledByTypes killed_by = KilledByTypes::Killed_NPC + KilledByTypes killed_by = KilledByTypes::Killed_NPC, + bool iBuffTic = false ) { return true; } virtual void Damage( diff --git a/zone/encounter.h b/zone/encounter.h index 4a3e89d72f..583dc39f77 100644 --- a/zone/encounter.h +++ b/zone/encounter.h @@ -34,7 +34,7 @@ class Encounter : public Mob ~Encounter(); //abstract virtual function implementations required by base abstract class - virtual bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC) { return true; } + virtual bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC, bool iBuffTic = false) { return true; } virtual void Damage(Mob* from, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None) { return; } bool Attack(Mob* other, int Hand = EQ::invslot::slotPrimary, bool FromRiposte = false, bool IsStrikethrough = false, bool IsFromSpell = false, ExtraAttackOptions *opts = nullptr) override { diff --git a/zone/merc.cpp b/zone/merc.cpp index 6006cc6a1a..75d7c4b6d0 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -4070,7 +4070,7 @@ Mob* Merc::GetOwnerOrSelf() { return Result; } -bool Merc::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillType attack_skill, uint8 killed_by) +bool Merc::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillType attack_skill, uint8 killed_by, bool iBuffTic) { if (!NPC::Death(killer_mob, damage, spell, attack_skill)) { return false; diff --git a/zone/merc.h b/zone/merc.h index 6aa1c26c5b..b82fab04cd 100644 --- a/zone/merc.h +++ b/zone/merc.h @@ -52,7 +52,7 @@ class Merc : public NPC { virtual ~Merc(); //abstract virtual function implementations requird by base abstract class - virtual bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, uint8 killed_by = 0); + virtual bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, uint8 killed_by = 0, bool iBuffTic = false); virtual void Damage(Mob* from, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None); virtual bool Attack(Mob* other, int Hand = EQ::invslot::slotPrimary, bool FromRiposte = false, bool IsStrikethrough = false, bool IsFromSpell = false, ExtraAttackOptions *opts = nullptr); diff --git a/zone/mob.h b/zone/mob.h index 7cde4fa0e7..b47be71bbc 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -541,7 +541,7 @@ class Mob : public Entity { bool CanClassEquipItem(uint32 item_id); bool CanRaceEquipItem(uint32 item_id); bool AffectedBySpellExcludingSlot(int slot, int effect); - virtual bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC) = 0; + virtual bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC, bool iBuffTic = false) = 0; virtual void Damage(Mob* from, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None) = 0; void SetHP(int64 hp); diff --git a/zone/npc.h b/zone/npc.h index c9f074a1b3..ceb5217f3a 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -130,7 +130,7 @@ class NPC : public Mob static NPC * SpawnZonePointNodeNPC(std::string name, const glm::vec4 &position); //abstract virtual function implementations requird by base abstract class - virtual bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC); + virtual bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC, bool iBuffTic = false); virtual void Damage(Mob* from, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None); bool Attack(Mob* other, int Hand = EQ::invslot::slotPrimary, bool FromRiposte = false, bool IsStrikethrough = false, bool IsFromSpell = false, ExtraAttackOptions *opts = nullptr) override; From 4094539e1e3a6e937b1491285832012f44f44a25 Mon Sep 17 00:00:00 2001 From: Noudess Date: Sat, 27 Apr 2024 16:25:08 -0400 Subject: [PATCH 2/2] Change iBuffTic in new code to use snake_case --- zone/attack.cpp | 12 ++++++------ zone/beacon.h | 2 +- zone/bot.cpp | 2 +- zone/bot.h | 2 +- zone/client.h | 2 +- zone/corpse.h | 2 +- zone/encounter.h | 2 +- zone/merc.cpp | 2 +- zone/merc.h | 2 +- zone/mob.h | 2 +- zone/npc.h | 2 +- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index 4f29ed0489..7f21182f03 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -1724,7 +1724,7 @@ void Client::Damage(Mob* other, int64 damage, uint16 spell_id, EQ::skills::Skill } } -bool Client::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillType attack_skill, KilledByTypes killed_by, bool iBuffTic) +bool Client::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillType attack_skill, KilledByTypes killed_by, bool is_buff_tic) { if (!ClientFinishedLoading() || dead) { return false; @@ -1792,9 +1792,9 @@ bool Client::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::Skil if (IsValidSpell(spell) && (attack_skill == EQ::skills::SkillTigerClaw || (IsDamageSpell(spell) && IsDiscipline(spell)) || - !iBuffTic)) { + !is_buff_tic)) { d->attack_skill = DamageTypeSpell; - d->spell_id = (iBuffTic) ? UINT32_MAX : spell; + d->spell_id = (is_buff_tic) ? UINT32_MAX : spell; } else { d->attack_skill = SkillDamageTypes[attack_skill]; @@ -2393,7 +2393,7 @@ void NPC::Damage(Mob* other, int64 damage, uint16 spell_id, EQ::skills::SkillTyp } } -bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillType attack_skill, KilledByTypes killed_by, bool iBuffTic) +bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillType attack_skill, KilledByTypes killed_by, bool is_buff_tic) { LogCombat( "Fatal blow dealt by [{}] with [{}] damage, spell [{}], skill [{}]", @@ -2512,9 +2512,9 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy if (IsValidSpell(spell) && (attack_skill == EQ::skills::SkillTigerClaw || (IsDamageSpell(spell) && IsDiscipline(spell)) || - !iBuffTic)) { + !is_buff_tic)) { d->attack_skill = DamageTypeSpell; - d->spell_id = (iBuffTic) ? UINT32_MAX : spell; + d->spell_id = (is_buff_tic) ? UINT32_MAX : spell; } else { d->attack_skill = SkillDamageTypes[attack_skill]; diff --git a/zone/beacon.h b/zone/beacon.h index 1ab589b9d5..ac5beb31eb 100644 --- a/zone/beacon.h +++ b/zone/beacon.h @@ -34,7 +34,7 @@ class Beacon : public Mob ~Beacon(); //abstract virtual function implementations requird by base abstract class - virtual bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC, bool iBuffTic = false) { return true; } + virtual bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC, bool is_buff_tic = false) { return true; } virtual void Damage(Mob* from, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None) { return; } virtual bool HasRaid() { return false; } virtual bool HasGroup() { return false; } diff --git a/zone/bot.cpp b/zone/bot.cpp index 0002040a55..77cfa98407 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -4341,7 +4341,7 @@ void Bot::PerformTradeWithClient(int16 begin_slot_id, int16 end_slot_id, Client* } } -bool Bot::Death(Mob *killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by, bool iBuffTic) +bool Bot::Death(Mob *killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by, bool is_buff_tic) { if (!NPC::Death(killer_mob, damage, spell_id, attack_skill)) { return false; diff --git a/zone/bot.h b/zone/bot.h index bce699fdd8..1c58af7ab1 100644 --- a/zone/bot.h +++ b/zone/bot.h @@ -131,7 +131,7 @@ class Bot : public NPC { Bot(uint32 botID, uint32 botOwnerCharacterID, uint32 botSpellsID, double totalPlayTime, uint32 lastZoneId, NPCType *npcTypeData, int32 expansion_bitmask); //abstract virtual override function implementations requird by base abstract class - bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC, bool iBuffTic = false) override; + bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC, bool is_buff_tic = false) override; void Damage(Mob* from, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None) override; diff --git a/zone/client.h b/zone/client.h index b168dab75c..3509877d9d 100644 --- a/zone/client.h +++ b/zone/client.h @@ -261,7 +261,7 @@ class Client : public Mob bool GotoPlayerRaid(const std::string& player_name); //abstract virtual function implementations required by base abstract class - virtual bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC, bool iBuffTic = false); + virtual bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC, bool is_buff_tic = false); virtual void Damage(Mob* from, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None); virtual bool HasRaid() { return (GetRaid() ? true : false); } virtual bool HasGroup() { return (GetGroup() ? true : false); } diff --git a/zone/corpse.h b/zone/corpse.h index b3f71cb56e..28fc8c91a6 100644 --- a/zone/corpse.h +++ b/zone/corpse.h @@ -69,7 +69,7 @@ class Corpse : public Mob { uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC, - bool iBuffTic = false + bool is_buff_tic = false ) { return true; } virtual void Damage( diff --git a/zone/encounter.h b/zone/encounter.h index 583dc39f77..b0c6235626 100644 --- a/zone/encounter.h +++ b/zone/encounter.h @@ -34,7 +34,7 @@ class Encounter : public Mob ~Encounter(); //abstract virtual function implementations required by base abstract class - virtual bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC, bool iBuffTic = false) { return true; } + virtual bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC, bool is_buff_tic = false) { return true; } virtual void Damage(Mob* from, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None) { return; } bool Attack(Mob* other, int Hand = EQ::invslot::slotPrimary, bool FromRiposte = false, bool IsStrikethrough = false, bool IsFromSpell = false, ExtraAttackOptions *opts = nullptr) override { diff --git a/zone/merc.cpp b/zone/merc.cpp index 75d7c4b6d0..3cf3a0a72a 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -4070,7 +4070,7 @@ Mob* Merc::GetOwnerOrSelf() { return Result; } -bool Merc::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillType attack_skill, uint8 killed_by, bool iBuffTic) +bool Merc::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillType attack_skill, uint8 killed_by, bool is_buff_tic) { if (!NPC::Death(killer_mob, damage, spell, attack_skill)) { return false; diff --git a/zone/merc.h b/zone/merc.h index b82fab04cd..c0730dd0ef 100644 --- a/zone/merc.h +++ b/zone/merc.h @@ -52,7 +52,7 @@ class Merc : public NPC { virtual ~Merc(); //abstract virtual function implementations requird by base abstract class - virtual bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, uint8 killed_by = 0, bool iBuffTic = false); + virtual bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, uint8 killed_by = 0, bool is_buff_tic = false); virtual void Damage(Mob* from, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None); virtual bool Attack(Mob* other, int Hand = EQ::invslot::slotPrimary, bool FromRiposte = false, bool IsStrikethrough = false, bool IsFromSpell = false, ExtraAttackOptions *opts = nullptr); diff --git a/zone/mob.h b/zone/mob.h index b47be71bbc..014071be51 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -541,7 +541,7 @@ class Mob : public Entity { bool CanClassEquipItem(uint32 item_id); bool CanRaceEquipItem(uint32 item_id); bool AffectedBySpellExcludingSlot(int slot, int effect); - virtual bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC, bool iBuffTic = false) = 0; + virtual bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC, bool is_buff_tic = false) = 0; virtual void Damage(Mob* from, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None) = 0; void SetHP(int64 hp); diff --git a/zone/npc.h b/zone/npc.h index ceb5217f3a..7bbb4bfaa3 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -130,7 +130,7 @@ class NPC : public Mob static NPC * SpawnZonePointNodeNPC(std::string name, const glm::vec4 &position); //abstract virtual function implementations requird by base abstract class - virtual bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC, bool iBuffTic = false); + virtual bool Death(Mob* killer_mob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, KilledByTypes killed_by = KilledByTypes::Killed_NPC, bool is_buff_tic = false); virtual void Damage(Mob* from, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None); bool Attack(Mob* other, int Hand = EQ::invslot::slotPrimary, bool FromRiposte = false, bool IsStrikethrough = false, bool IsFromSpell = false, ExtraAttackOptions *opts = nullptr) override;