mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-28 12:52:25 +01:00
Core/Creatures: restore helper to check if a creature has been damaged enough by players to allow loot to drop
This commit is contained in:
@@ -384,6 +384,7 @@ class TC_GAME_API Creature : public Unit, public GridObject<Creature>, public Ma
|
||||
|
||||
void SetDisableReputationGain(bool disable) { DisableReputationGain = disable; }
|
||||
bool IsReputationGainDisabled() const { return DisableReputationGain; }
|
||||
bool IsDamageEnoughForLootingAndReward() const { return (m_creatureInfo->flags_extra & CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ) || (m_PlayerDamageReq == 0); }
|
||||
void LowerPlayerDamageReq(uint64 unDamage);
|
||||
void ResetPlayerDamageReq() { m_PlayerDamageReq = GetHealth() / 2; }
|
||||
uint64 m_PlayerDamageReq;
|
||||
|
||||
Reference in New Issue
Block a user