TrinityCore
Loot.h File Reference
#include "ConditionMgr.h"
#include "DBCEnums.h"
#include "Define.h"
#include "Duration.h"
#include "ItemEnchantmentMgr.h"
#include "ObjectGuid.h"
#include "Optional.h"
#include "SharedDefines.h"
#include <memory>
#include <unordered_map>
#include <vector>
+ Include dependency graph for Loot.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  LootItem
 
struct  NotNormalLootItem
 
struct  PlayerRollVote
 
class  LootRoll
 
struct  Loot
 
class  AELootResult
 
struct  AELootResult::ResultValue
 

Namespaces

namespace  WorldPackets
 
namespace  WorldPackets::Loot
 

Macros

#define MAX_NR_LOOT_ITEMS   18
 

Typedefs

typedef std::vector< NotNormalLootItemNotNormalLootItemList
 
typedef std::vector< LootItemLootItemList
 
typedef std::unordered_map< ObjectGuid, std::unique_ptr< NotNormalLootItemList > > NotNormalLootItemMap
 

Enumerations

enum  RollType {
  ROLL_PASS = 0 , ROLL_NEED = 1 , ROLL_GREED = 2 , ROLL_DISENCHANT = 3 ,
  ROLL_TRANSMOG = 4 , MAX_ROLL_TYPE = 5
}
 
enum class  RollVote {
  Pass = 0 , Need = 1 , Greed = 2 , Disenchant = 3 ,
  NotEmitedYet = 4 , NotValid = 5
}
 
enum  RollMask {
  ROLL_FLAG_TYPE_PASS = 0x01 , ROLL_FLAG_TYPE_NEED = 0x02 , ROLL_FLAG_TYPE_GREED = 0x04 , ROLL_FLAG_TYPE_DISENCHANT = 0x08 ,
  ROLL_FLAG_TYPE_TRANSMOG = 0x10 , ROLL_ALL_TYPE_NO_DISENCHANT = 0x07 , ROLL_ALL_TYPE_MASK = 0x0F
}
 
enum  LootMethod : uint8 {
  FREE_FOR_ALL = 0 , ROUND_ROBIN = 1 , MASTER_LOOT = 2 , GROUP_LOOT = 3 ,
  NEED_BEFORE_GREED = 4 , PERSONAL_LOOT = 5
}
 
enum  LootType : uint8 {
  LOOT_NONE = 0 , LOOT_CORPSE = 1 , LOOT_PICKPOCKETING = 2 , LOOT_FISHING = 3 ,
  LOOT_DISENCHANTING = 4 , LOOT_ITEM = 5 , LOOT_SKINNING = 6 , LOOT_GATHERING_NODE = 8 ,
  LOOT_CHEST = 9 , LOOT_CORPSE_PERSONAL = 14 , LOOT_FISHINGHOLE = 20 , LOOT_INSIGNIA = 21 ,
  LOOT_FISHING_JUNK = 22 , LOOT_PROSPECTING = 23 , LOOT_MILLING = 24
}
 
enum  LootError : uint8 {
  LOOT_ERROR_DIDNT_KILL = 0 , LOOT_ERROR_TOO_FAR = 4 , LOOT_ERROR_BAD_FACING = 5 , LOOT_ERROR_LOCKED = 6 ,
  LOOT_ERROR_NOTSTANDING = 8 , LOOT_ERROR_STUNNED = 9 , LOOT_ERROR_PLAYER_NOT_FOUND = 10 , LOOT_ERROR_PLAY_TIME_EXCEEDED = 11 ,
  LOOT_ERROR_MASTER_INV_FULL = 12 , LOOT_ERROR_MASTER_UNIQUE_ITEM = 13 , LOOT_ERROR_MASTER_OTHER = 14 , LOOT_ERROR_ALREADY_PICKPOCKETED = 15 ,
  LOOT_ERROR_NOT_WHILE_SHAPESHIFTED = 16 , LOOT_ERROR_NO_LOOT = 17
}
 
enum  LootSlotType {
  LOOT_SLOT_TYPE_ALLOW_LOOT = 0 , LOOT_SLOT_TYPE_ROLL_ONGOING = 1 , LOOT_SLOT_TYPE_MASTER = 3 , LOOT_SLOT_TYPE_LOCKED = 2 ,
  LOOT_SLOT_TYPE_OWNER = 4
}
 
enum class  LootRollIneligibilityReason : uint32 {
  None = 0 , UnusableByClass = 1 , MaxUniqueItemCount = 2 , CannotBeDisenchanted = 3 ,
  EnchantingSkillTooLow = 4 , NeedDisabled = 5 , OwnBetterItem = 6
}
 

Functions

constexpr LootType GetLootTypeForClient (LootType lootType)
 

Variables

constexpr Minutes LOOT_ROLL_TIMEOUT = 1min
 

Macro Definition Documentation

◆ MAX_NR_LOOT_ITEMS

#define MAX_NR_LOOT_ITEMS   18

Definition at line 85 of file Loot.h.

Typedef Documentation

◆ LootItemList

typedef std::vector<LootItem> LootItemList

Definition at line 231 of file Loot.h.

◆ NotNormalLootItemList

Definition at line 230 of file Loot.h.

◆ NotNormalLootItemMap

typedef std::unordered_map<ObjectGuid, std::unique_ptr<NotNormalLootItemList> > NotNormalLootItemMap

Definition at line 232 of file Loot.h.

Enumeration Type Documentation

◆ LootError

enum LootError : uint8
Enumerator
LOOT_ERROR_DIDNT_KILL 
LOOT_ERROR_TOO_FAR 
LOOT_ERROR_BAD_FACING 
LOOT_ERROR_LOCKED 
LOOT_ERROR_NOTSTANDING 
LOOT_ERROR_STUNNED 
LOOT_ERROR_PLAYER_NOT_FOUND 
LOOT_ERROR_PLAY_TIME_EXCEEDED 
LOOT_ERROR_MASTER_INV_FULL 
LOOT_ERROR_MASTER_UNIQUE_ITEM 
LOOT_ERROR_MASTER_OTHER 
LOOT_ERROR_ALREADY_PICKPOCKETED 
LOOT_ERROR_NOT_WHILE_SHAPESHIFTED 
LOOT_ERROR_NO_LOOT 

Definition at line 136 of file Loot.h.

◆ LootMethod

enum LootMethod : uint8
Enumerator
FREE_FOR_ALL 
ROUND_ROBIN 
MASTER_LOOT 
GROUP_LOOT 
NEED_BEFORE_GREED 
PERSONAL_LOOT 

Definition at line 87 of file Loot.h.

◆ LootRollIneligibilityReason

enum class LootRollIneligibilityReason : uint32
strong
Enumerator
None 
UnusableByClass 
MaxUniqueItemCount 
CannotBeDisenchanted 
EnchantingSkillTooLow 
NeedDisabled 
OwnBetterItem 

Definition at line 164 of file Loot.h.

◆ LootSlotType

Enumerator
LOOT_SLOT_TYPE_ALLOW_LOOT 
LOOT_SLOT_TYPE_ROLL_ONGOING 
LOOT_SLOT_TYPE_MASTER 
LOOT_SLOT_TYPE_LOCKED 
LOOT_SLOT_TYPE_OWNER 

Definition at line 155 of file Loot.h.

◆ LootType

enum LootType : uint8
Enumerator
LOOT_NONE 
LOOT_CORPSE 
LOOT_PICKPOCKETING 
LOOT_FISHING 
LOOT_DISENCHANTING 
LOOT_ITEM 
LOOT_SKINNING 
LOOT_GATHERING_NODE 
LOOT_CHEST 
LOOT_CORPSE_PERSONAL 
LOOT_FISHINGHOLE 
LOOT_INSIGNIA 
LOOT_FISHING_JUNK 
LOOT_PROSPECTING 
LOOT_MILLING 

Definition at line 97 of file Loot.h.

◆ RollMask

enum RollMask
Enumerator
ROLL_FLAG_TYPE_PASS 
ROLL_FLAG_TYPE_NEED 
ROLL_FLAG_TYPE_GREED 
ROLL_FLAG_TYPE_DISENCHANT 
ROLL_FLAG_TYPE_TRANSMOG 
ROLL_ALL_TYPE_NO_DISENCHANT 
ROLL_ALL_TYPE_MASK 

Definition at line 73 of file Loot.h.

◆ RollType

enum RollType
Enumerator
ROLL_PASS 
ROLL_NEED 
ROLL_GREED 
ROLL_DISENCHANT 
ROLL_TRANSMOG 
MAX_ROLL_TYPE 

Definition at line 53 of file Loot.h.

◆ RollVote

enum class RollVote
strong
Enumerator
Pass 
Need 
Greed 
Disenchant 
NotEmitedYet 
NotValid 

Definition at line 63 of file Loot.h.

Function Documentation

◆ GetLootTypeForClient()

constexpr LootType GetLootTypeForClient ( LootType  lootType)
constexpr

Definition at line 118 of file Loot.h.

+ Here is the caller graph for this function:

Variable Documentation

◆ LOOT_ROLL_TIMEOUT

constexpr Minutes LOOT_ROLL_TIMEOUT = 1min
constexpr

Definition at line 33 of file Loot.h.