[Cleanup] Add Raid Loot Type Constants (#4022)

* [Cleanup] Add Raid Loot Type Constants

# Notes
- Add constants for Raid loot types.

* [Cleanup] Add Raid Loot Type Constants

# Notes
- Add constants for Raid loot types.
This commit is contained in:
Alex King 2024-01-28 22:45:32 -05:00 committed by GitHub
parent c09a3a5bba
commit e640e3cad3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 33 additions and 26 deletions

View File

@ -1120,4 +1120,11 @@ enum MoneySubtypes
SharedBank // Platinum Only SharedBank // Platinum Only
}; };
namespace RaidLootType {
constexpr uint32 LeaderOnly = 1;
constexpr uint32 LeaderAndGroupLeadersOnly = 2;
constexpr uint32 LeaderSelected = 3;
constexpr uint32 EntireRaid = 4;
}
#endif /*COMMON_EQ_CONSTANTS_H*/ #endif /*COMMON_EQ_CONSTANTS_H*/

View File

@ -2764,31 +2764,31 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
} }
switch (r->GetLootType()) { switch (r->GetLootType()) {
case 0: case RaidLootType::LeaderOnly:
case 1: if (m.member && m.is_raid_leader) {
if (m.member && m.is_raid_leader) { corpse->AllowPlayerLoot(m.member, i);
corpse->AllowPlayerLoot(m.member, i); i++;
i++; }
} break;
break; case RaidLootType::LeaderAndGroupLeadersOnly:
case 2: if (m.member && (m.is_raid_leader || m.is_group_leader)) {
if (m.member && (m.is_raid_leader || m.is_group_leader)) { corpse->AllowPlayerLoot(m.member, i);
corpse->AllowPlayerLoot(m.member, i); i++;
i++; }
} break;
break; case RaidLootType::LeaderSelected:
case 3: if (m.member && m.is_looter) {
if (m.member && m.is_looter) { corpse->AllowPlayerLoot(m.member, i);
corpse->AllowPlayerLoot(m.member, i); i++;
i++; }
} break;
break; case RaidLootType::EntireRaid:
case 4: default:
if (m.member) { if (m.member) {
corpse->AllowPlayerLoot(m.member, i); corpse->AllowPlayerLoot(m.member, i);
i++; i++;
} }
break; break;
} }
} }
} }
@ -4437,7 +4437,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
// produce a spell message. Send to everyone. // produce a spell message. Send to everyone.
// This fixes issues with npc-procs like 1002 and 918 and // This fixes issues with npc-procs like 1002 and 918 and
// damage based disciplines which need to spit out extra spell color. // damage based disciplines which need to spit out extra spell color.
if (IsValidSpell(spell_id) && if (IsValidSpell(spell_id) &&
(skill_used == EQ::skills::SkillTigerClaw || (skill_used == EQ::skills::SkillTigerClaw ||
(IsDamageSpell(spell_id) && IsDiscipline(spell_id))) (IsDamageSpell(spell_id) && IsDiscipline(spell_id)))
) { ) {