*finalized basic hard-lootmode defines
-DB devs should stick with lootmode 2,4,8,16 for hardmode loots (use as bitmask) -and lootmode 1 as default --HG-- branch : trunk
This commit is contained in:
+2
-2
@@ -551,7 +551,7 @@ class TRINITY_DLL_SPEC Creature : public Unit, public GridObject<Creature>
|
|||||||
void SetLootMode(uint16 lootMode) { m_LootMode = lootMode; }
|
void SetLootMode(uint16 lootMode) { m_LootMode = lootMode; }
|
||||||
void AddLootMode(uint16 lootMode) { m_LootMode |= lootMode; }
|
void AddLootMode(uint16 lootMode) { m_LootMode |= lootMode; }
|
||||||
void RemoveLootMode(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 *reachWithSpellAttack(Unit *pVictim);
|
||||||
SpellEntry const *reachWithSpellCure(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())
|
CreatureInfo const* m_creatureInfo; // in difficulty mode > 0 can different from ObjMgr::GetCreatureTemplate(GetEntry())
|
||||||
CreatureData const* m_creatureData;
|
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:
|
private:
|
||||||
//WaypointMovementGenerator vars
|
//WaypointMovementGenerator vars
|
||||||
|
|||||||
@@ -687,7 +687,7 @@ class TRINITY_DLL_SPEC GameObject : public WorldObject, public GridObject<GameOb
|
|||||||
void SetLootMode(uint16 lootMode) { m_LootMode = lootMode; }
|
void SetLootMode(uint16 lootMode) { m_LootMode = lootMode; }
|
||||||
void AddLootMode(uint16 lootMode) { m_LootMode |= lootMode; }
|
void AddLootMode(uint16 lootMode) { m_LootMode |= lootMode; }
|
||||||
void RemoveLootMode(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); }
|
void AddToSkillupList(uint32 PlayerGuidLow) { m_SkillupList.push_back(PlayerGuidLow); }
|
||||||
bool IsInSkillupList(uint32 PlayerGuidLow) const
|
bool IsInSkillupList(uint32 PlayerGuidLow) const
|
||||||
@@ -754,7 +754,7 @@ class TRINITY_DLL_SPEC GameObject : public WorldObject, public GridObject<GameOb
|
|||||||
|
|
||||||
uint64 m_rotation;
|
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:
|
private:
|
||||||
void SwitchDoorOrButton(bool activate, bool alternative = false);
|
void SwitchDoorOrButton(bool activate, bool alternative = false);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -386,7 +386,7 @@ void Loot::AddItem(LootStoreItem const & item)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calls processor of corresponding LootTemplate (which handles everything including references)
|
// 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
|
// Must be provided
|
||||||
if (!loot_owner)
|
if (!loot_owner)
|
||||||
|
|||||||
+1
-1
@@ -289,7 +289,7 @@ struct Loot
|
|||||||
void RemoveLooter(uint64 GUID) { PlayersLooting.erase(GUID); }
|
void RemoveLooter(uint64 GUID) { PlayersLooting.erase(GUID); }
|
||||||
|
|
||||||
void generateMoneyLoot(uint32 minAmount, uint32 maxAmount);
|
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)
|
// Inserts the item into the loot (called by LootTemplate processors)
|
||||||
void AddItem(LootStoreItem const & item);
|
void AddItem(LootStoreItem const & item);
|
||||||
|
|||||||
@@ -24,8 +24,15 @@
|
|||||||
#include "Platform/Define.h"
|
#include "Platform/Define.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
// default loot mode for creatures and gameobjects
|
// loot modes for creatures and gameobjects, bitmask!
|
||||||
#define DEFAULT_LOOT_MODE 1
|
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
|
enum Gender
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -274,12 +274,12 @@ struct TRINITY_DLL_DECL boss_sartharionAI : public ScriptedAI
|
|||||||
// AddDrakeLootMode() should only ever be called from FetchDragons(), which is called from Aggro()
|
// AddDrakeLootMode() should only ever be called from FetchDragons(), which is called from Aggro()
|
||||||
void AddDrakeLootMode()
|
void AddDrakeLootMode()
|
||||||
{
|
{
|
||||||
if (m_creature->HasLootMode(4)) // Has two Drake loot modes
|
if (m_creature->HasLootMode(LOOT_MODE_HARD_MODE_2)) // Has two Drake loot modes
|
||||||
m_creature->AddLootMode(8); // Add 3rd Drake loot mode
|
m_creature->AddLootMode(LOOT_MODE_HARD_MODE_3); // Add 3rd Drake loot mode
|
||||||
else if (m_creature->HasLootMode(2)) // Has one Drake loot mode
|
else if (m_creature->HasLootMode(LOOT_MODE_HARD_MODE_1)) // Has one Drake loot mode
|
||||||
m_creature->AddLootMode(4); // Add 2nd Drake loot mode
|
m_creature->AddLootMode(LOOT_MODE_HARD_MODE_2); // Add 2nd Drake loot mode
|
||||||
else // Has no Drake loot modes
|
else // Has no Drake loot modes
|
||||||
m_creature->AddLootMode(2); // Add 1st Drake loot mode
|
m_creature->AddLootMode(LOOT_MODE_HARD_MODE_1); // Add 1st Drake loot mode
|
||||||
}
|
}
|
||||||
|
|
||||||
void FetchDragons()
|
void FetchDragons()
|
||||||
|
|||||||
Reference in New Issue
Block a user