aboutsummaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/Creature.h4
-rw-r--r--src/game/GameObject.h4
-rw-r--r--src/game/LootMgr.cpp2
-rw-r--r--src/game/LootMgr.h2
-rw-r--r--src/game/SharedDefines.h11
5 files changed, 15 insertions, 8 deletions
diff --git a/src/game/Creature.h b/src/game/Creature.h
index ad8dfc2b01c..58974fe0c83 100644
--- a/src/game/Creature.h
+++ b/src/game/Creature.h
@@ -551,7 +551,7 @@ class TRINITY_DLL_SPEC Creature : public Unit, public GridObject<Creature>
void SetLootMode(uint16 lootMode) { m_LootMode = lootMode; }
void AddLootMode(uint16 lootMode) { m_LootMode |= lootMode; }
void RemoveLootMode(uint16 lootMode) { m_LootMode &= ~lootMode; }
- void ResetLootMode() { m_LootMode = DEFAULT_LOOT_MODE; }
+ void ResetLootMode() { m_LootMode = LOOT_MODE_DEFAULT; }
SpellEntry const *reachWithSpellAttack(Unit *pVictim);
SpellEntry const *reachWithSpellCure(Unit *pVictim);
@@ -709,7 +709,7 @@ class TRINITY_DLL_SPEC Creature : public Unit, public GridObject<Creature>
CreatureInfo const* m_creatureInfo; // in difficulty mode > 0 can different from ObjMgr::GetCreatureTemplate(GetEntry())
CreatureData const* m_creatureData;
- uint16 m_LootMode; // bitmask, default DEFAULT_LOOT_MODE, determines what loot will be lootable
+ uint16 m_LootMode; // bitmask, default LOOT_MODE_DEFAULT, determines what loot will be lootable
private:
//WaypointMovementGenerator vars
diff --git a/src/game/GameObject.h b/src/game/GameObject.h
index dd0b3508b36..104263154db 100644
--- a/src/game/GameObject.h
+++ b/src/game/GameObject.h
@@ -687,7 +687,7 @@ class TRINITY_DLL_SPEC GameObject : public WorldObject, public GridObject<GameOb
void SetLootMode(uint16 lootMode) { m_LootMode = lootMode; }
void AddLootMode(uint16 lootMode) { m_LootMode |= lootMode; }
void RemoveLootMode(uint16 lootMode) { m_LootMode &= ~lootMode; }
- void ResetLootMode() { m_LootMode = DEFAULT_LOOT_MODE; }
+ void ResetLootMode() { m_LootMode = LOOT_MODE_DEFAULT; }
void AddToSkillupList(uint32 PlayerGuidLow) { m_SkillupList.push_back(PlayerGuidLow); }
bool IsInSkillupList(uint32 PlayerGuidLow) const
@@ -754,7 +754,7 @@ class TRINITY_DLL_SPEC GameObject : public WorldObject, public GridObject<GameOb
uint64 m_rotation;
- uint16 m_LootMode; // bitmask, default DEFAULT_LOOT_MODE, determines what loot will be lootable
+ uint16 m_LootMode; // bitmask, default LOOT_MODE_DEFAULT, determines what loot will be lootable
private:
void SwitchDoorOrButton(bool activate, bool alternative = false);
};
diff --git a/src/game/LootMgr.cpp b/src/game/LootMgr.cpp
index 502b552fbf8..d7e2cde320d 100644
--- a/src/game/LootMgr.cpp
+++ b/src/game/LootMgr.cpp
@@ -386,7 +386,7 @@ void Loot::AddItem(LootStoreItem const & item)
}
// Calls processor of corresponding LootTemplate (which handles everything including references)
-bool Loot::FillLoot(uint32 loot_id, LootStore const& store, Player* loot_owner, bool personal, bool noEmptyError, uint16 lootMode /*= DEFAULT_LOOT_MODE*/)
+bool Loot::FillLoot(uint32 loot_id, LootStore const& store, Player* loot_owner, bool personal, bool noEmptyError, uint16 lootMode /*= LOOT_MODE_DEFAULT*/)
{
// Must be provided
if (!loot_owner)
diff --git a/src/game/LootMgr.h b/src/game/LootMgr.h
index 41ae0cc4be8..f03d0b9056f 100644
--- a/src/game/LootMgr.h
+++ b/src/game/LootMgr.h
@@ -289,7 +289,7 @@ struct Loot
void RemoveLooter(uint64 GUID) { PlayersLooting.erase(GUID); }
void generateMoneyLoot(uint32 minAmount, uint32 maxAmount);
- bool FillLoot(uint32 loot_id, LootStore const& store, Player* loot_owner, bool personal, bool noEmptyError = false, uint16 lootMode = DEFAULT_LOOT_MODE);
+ bool FillLoot(uint32 loot_id, LootStore const& store, Player* loot_owner, bool personal, bool noEmptyError = false, uint16 lootMode = LOOT_MODE_DEFAULT);
// Inserts the item into the loot (called by LootTemplate processors)
void AddItem(LootStoreItem const & item);
diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h
index 5724261c9b8..23b7cf20f91 100644
--- a/src/game/SharedDefines.h
+++ b/src/game/SharedDefines.h
@@ -24,8 +24,15 @@
#include "Platform/Define.h"
#include <cassert>
-// default loot mode for creatures and gameobjects
-#define DEFAULT_LOOT_MODE 1
+// loot modes for creatures and gameobjects, bitmask!
+enum LootModes
+{
+ LOOT_MODE_DEFAULT = 1,
+ LOOT_MODE_HARD_MODE_1 = 2,
+ LOOT_MODE_HARD_MODE_2 = 4,
+ LOOT_MODE_HARD_MODE_3 = 8,
+ LOOT_MODE_HARD_MODE_4 = 16
+};
enum Gender
{