Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
LootMgr.h
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6#ifndef SKYFIRE_LOOTMGR_H
7#define SKYFIRE_LOOTMGR_H
8
9#include "ByteBuffer.h"
10#include "ConditionMgr.h"
11#include "ItemEnchantmentMgr.h"
12#include "Object.h"
13#include "RefManager.h"
14#include "SharedDefines.h"
15
16#include <list>
17#include <map>
18#include <vector>
19
29
40
41#define MAX_NR_LOOT_ITEMS 16
42// note: the client cannot show more than 16 items total
43#define MAX_NR_QUEST_ITEMS 32
44// unrelated to the number of quest items shown, just for reserve
45
54
64
65enum class LootType
66{
71 // ignored always by client
75
76 LOOT_FISHINGHOLE = 20, // unsupported by client, sending LOOT_FISHING instead
77 LOOT_INSIGNIA = 21 // unsupported by client, sending LOOT_CORPSE instead
78};
79
80// type of Loot Item in Loot View
81enum class LootSlotType
82{
83 LOOT_SLOT_TYPE_ROLL_ONGOING = 0, // roll is ongoing. player cannot loot.
84 LOOT_SLOT_TYPE_LOCKED = 1, // item is shown in red. player cannot loot.
85 LOOT_SLOT_TYPE_MASTER = 2, // item can only be distributed by group loot master.
86 LOOT_SLOT_TYPE_ALLOW_LOOT = 5, // player can loot the item.
87 LOOT_SLOT_TYPE_OWNER = 6 // ignore binding confirmation and etc, for single player looting
88};
89
90class Player;
91class LootStore;
92
94{
95 uint32 itemid; // id of the item
96 float chance; // always positive, chance to drop for both quest and non-quest items, chance to be used for refs
97 int32 mincountOrRef; // mincount for drop items (positive) or minus referenced TemplateleId (negative)
100 bool needs_quest : 1; // quest drop (negative ChanceOrQuestChance in DB)
101 uint8 maxcount : 8; // max drop count for the item (mincountOrRef positive) or Ref multiplicator (mincountOrRef negative)
102 ConditionList conditions; // additional loot condition
103
104 // Constructor, converting ChanceOrQuestChance -> (chance, needs_quest)
105 // displayid is filled in IsValid() which must be called after
106 LootStoreItem(uint32 _itemid, float _chanceOrQuestChance, uint16 _lootmode, uint8 _group, int32 _mincountOrRef, uint8 _maxcount)
107 : itemid(_itemid), chance(fabs(_chanceOrQuestChance)), mincountOrRef(_mincountOrRef), lootmode(_lootmode),
108 group(_group), needs_quest(_chanceOrQuestChance < 0), maxcount(_maxcount)
109 { }
110
111 bool Roll(bool rate) const; // Checks if the entry takes it's chance (at loot generation)
112 bool IsValid(LootStore const& store, uint32 entry) const;
113 // Checks correctness of values
114};
115
116typedef std::set<uint32> AllowedLooterSet;
117
119{
123 ConditionList conditions; // additional loot condition
126 bool is_looted : 1;
127 bool is_blocked : 1;
128 bool freeforall : 1; // free for all
130 bool is_counted : 1;
131 bool needs_quest : 1; // quest drop
134
135 // Constructor, copies most fields from LootStoreItem, generates random count and random suffixes/properties
136 // Should be called for non-reference LootStoreItem entries only (mincountOrRef > 0)
137 explicit LootItem(LootStoreItem const& li);
138
139 // Empty constructor for creating an empty LootItem to be filled in with DB data
140 LootItem() : canSave(true) { };
141
142 // Basic checks for player/item compatibility - if false no chance to see the item in the loot
143 bool AllowedForPlayer(Player const* player) const;
144 void AddAllowedLooter(Player const* player);
146
147 // Write packet data
148 void WriteBitDataPart(PermissionTypes permission, LootSlotType hasSlotType, ByteBuffer* buff);
149 void WriteBasicDataPart(LootSlotType slotType, uint8 slot, ByteBuffer* buff);
150};
151
153{
154 uint8 index; // position in quest_items;
156
158 : index(0), is_looted(false) { }
159
160 QuestItem(uint8 _index, bool _islooted = false)
161 : index(_index), is_looted(_islooted) { }
162};
163
164struct Loot;
165class LootTemplate;
166
167typedef std::vector<QuestItem> QuestItemList;
168typedef std::vector<LootItem> LootItemList;
169typedef std::map<uint32, QuestItemList*> QuestItemMap;
170typedef std::list<LootStoreItem*> LootStoreItemList;
172
173typedef std::set<uint32> LootIdSet;
174
176{
177public:
178 explicit LootStore(char const* name, char const* entryName, bool ratesAllowed)
179 : m_name(name), m_entryName(entryName), m_ratesAllowed(ratesAllowed) { }
180
181 virtual ~LootStore() { Clear(); }
182
183 void Verify() const;
184
186 void CheckLootRefs(LootIdSet* ref_set = NULL) const; // check existence reference and remove it from ref_set
187 void ReportUnusedIds(LootIdSet const& ids_set) const;
188 void ReportNotExistedId(uint32 id) const;
189
190 bool HaveLootFor(uint32 loot_id) const { return m_LootTemplates.find(loot_id) != m_LootTemplates.end(); }
191 bool HaveQuestLootFor(uint32 loot_id) const;
192 bool HaveQuestLootForPlayer(uint32 loot_id, Player* player) const;
193
194 LootTemplate const* GetLootFor(uint32 loot_id) const;
195 void ResetConditions();
197
198 char const* GetName() const { return m_name; }
199 char const* GetEntryName() const { return m_entryName; }
200 bool IsRatesAllowed() const { return m_ratesAllowed; }
201protected:
203 void Clear();
204private:
206 char const* m_name;
207 char const* m_entryName;
209};
210
212{
213 class LootGroup; // A set of loot definitions for items (refs are not allowed inside)
214 typedef std::vector<LootGroup*> LootGroups;
215
216public:
219
220 // Adds an entry to the group (at loading stage)
221 void AddEntry(LootStoreItem* item);
222 // Rolls for every item in the template and adds the rolled items the the loot
223 void Process(Loot& loot, bool rate, uint16 lootMode, uint8 groupId = 0) const;
224 void CopyConditions(const ConditionList& conditions);
225 void CopyConditions(LootItem* li) const;
226
227 // True if template includes at least 1 quest drop entry
228 bool HasQuestDrop(LootTemplateMap const& store, uint8 groupId = 0) const;
229 // True if template includes at least 1 quest drop for an active quest of the player
230 bool HasQuestDropForPlayer(LootTemplateMap const& store, Player const* player, uint8 groupId = 0) const;
231
232 // Checks integrity of the template
233 void Verify(LootStore const& store, uint32 Id) const;
234 void CheckLootRefs(LootTemplateMap const& store, LootIdSet* ref_set) const;
235 bool addConditionItem(Condition* cond);
236 bool isReference(uint32 id);
237
238private:
239 LootStoreItemList Entries; // not grouped only
240 LootGroups Groups; // groups have own (optimised) processing, grouped entries go there
241
242 // Objects of this class must never be copied, we are storing pointers in container
245};
246
247//=====================================================
248
249class LootValidatorRef : public Reference<Loot, LootValidatorRef>
250{
251public:
255};
256
257//=====================================================
258
272
273//=====================================================
274struct LootView;
275
276struct Loot
277{
281
282 std::vector<LootItem> items;
283 std::vector<LootItem> quest_items;
286 uint64 roundRobinPlayer; // GUID of the player having the Round-Robin ownership for the loot. If 0, round robin owner has released.
287 LootType loot_type; // required for achievement system
288 uint8 maxDuplicates; // Max amount of items with the same entry that can drop (default is 1; on 25 man raid mode 3)
289
290 // GUIDLow of container that holds this loot (item_instance.entry)
291 // Only set for inventory items that can be right-click looted
293
295 ~Loot() { clear(); }
296
297 // For deleting items at loot removal since there is no backward interface to the Item()
300
301 // if loot becomes invalid this reference is used to inform the listener
302 void addLootValidatorRef(LootValidatorRef* pLootValidatorRef)
303 {
304 i_LootValidatorRefManager.insertFirst(pLootValidatorRef);
305 }
306
307 // void clear();
308 void clear()
309 {
310 for (QuestItemMap::const_iterator itr = PlayerQuestItems.begin(); itr != PlayerQuestItems.end(); ++itr)
311 delete itr->second;
312 PlayerQuestItems.clear();
313
314 for (QuestItemMap::const_iterator itr = PlayerFFAItems.begin(); itr != PlayerFFAItems.end(); ++itr)
315 delete itr->second;
316 PlayerFFAItems.clear();
317
318 for (QuestItemMap::const_iterator itr = PlayerNonQuestNonFFAConditionalItems.begin(); itr != PlayerNonQuestNonFFAConditionalItems.end(); ++itr)
319 delete itr->second;
321
322 PlayersLooting.clear();
323 items.clear();
324 quest_items.clear();
325 gold = 0;
326 unlootedCount = 0;
328 i_LootValidatorRefManager.clearReferences();
329 }
330
331 bool empty() const { return items.empty() && gold == 0; }
332 bool isLooted() const { return gold == 0 && unlootedCount == 0; }
333
334 void NotifyItemRemoved(uint8 lootIndex, ObjectGuid lootGuid = 0);
335 void NotifyQuestItemRemoved(uint8 questIndex, ObjectGuid lootGuid = 0);
336 void NotifyMoneyRemoved(ObjectGuid lootGuid = 0);
337 void AddLooter(uint64 GUID) { PlayersLooting.insert(GUID); }
338 void RemoveLooter(uint64 GUID) { PlayersLooting.erase(GUID); }
339 bool HasLooter(uint64 GUID) { return PlayersLooting.find(GUID) != PlayersLooting.end(); }
340
341 void generateMoneyLoot(uint32 minAmount, uint32 maxAmount);
342 bool FillLoot(uint32 lootId, LootStore const& store, Player* lootOwner, bool personal, bool noEmptyError = false, uint16 lootMode = LOOT_MODE_DEFAULT);
343
344 // Inserts the item into the loot (called by LootTemplate processors)
345 void AddItem(LootStoreItem const& item);
346
347 LootItem* LootItemInSlot(uint32 lootslot, Player* player, QuestItem** qitem = NULL, QuestItem** ffaitem = NULL, QuestItem** conditem = NULL);
348 uint32 GetMaxSlotInLootFor(Player* player) const;
349 bool hasItemFor(Player* player) const;
350 bool hasOverThresholdItem() const;
351
352private:
353 void FillNotNormalLootFor(Player* player, bool presentAtLooting);
356 QuestItemList* FillNonQuestNonFFAConditionalLoot(Player* player, bool presentAtLooting);
357
358 std::set<uint64> PlayersLooting;
362
363 // All rolls are registered here. They need to know, when the loot is not valid anymore
365};
366
368{
372
374 : loot(_loot), viewer(_viewer), permission(_permission) { }
375
376 void WriteData(ObjectGuid guid, LootType lootType, WorldPacket* data, bool isAoE = false);
377};
378
391
402
405
422
423#endif
std::list< Condition * > ConditionList
std::int32_t int32
Definition Define.h:73
std::uint8_t uint8
Definition Define.h:79
std::uint32_t uint32
Definition Define.h:77
std::uint64_t uint64
Definition Define.h:76
std::uint16_t uint16
Definition Define.h:78
LootStore LootTemplates_Spell("spell_loot_template", "spell id (random item creating)", false)
LootStore LootTemplates_Skinning("skinning_loot_template", "creature skinning id", true)
LootStore LootTemplates_Gameobject("gameobject_loot_template", "gameobject entry", true)
LootStore LootTemplates_Item("item_loot_template", "item entry", true)
LootStore LootTemplates_Milling("milling_loot_template", "item entry (herb)", true)
LootStore LootTemplates_Reference("reference_loot_template", "reference id", false)
LootStore LootTemplates_Disenchant("disenchant_loot_template", "item disenchant id", true)
LootStore LootTemplates_Prospecting("prospecting_loot_template", "item entry (ore)", true)
LootStore LootTemplates_Creature("creature_loot_template", "creature entry", true)
LootStore LootTemplates_Pickpocketing("pickpocketing_loot_template", "creature pickpocket lootid", true)
LootStore LootTemplates_Mail("mail_loot_template", "mail template id", false)
LootStore LootTemplates_Fishing("fishing_loot_template", "area id", true)
void LoadLootTemplates_Pickpocketing()
Definition LootMgr.cpp:1785
PermissionTypes
Definition LootMgr.h:56
@ ROUND_ROBIN_PERMISSION
Definition LootMgr.h:60
void LoadLootTemplates_Spell()
Definition LootMgr.cpp:1905
void LoadLootTemplates_Milling()
Definition LootMgr.cpp:1756
void LoadLootTemplates_Gameobject()
Definition LootMgr.cpp:1698
RollMask
Definition LootMgr.h:31
@ ROLL_ALL_TYPE_MASK
Definition LootMgr.h:38
@ ROLL_FLAG_TYPE_PASS
Definition LootMgr.h:32
@ ROLL_ALL_TYPE_NO_DISENCHANT
Definition LootMgr.h:37
@ ROLL_FLAG_TYPE_DISENCHANT
Definition LootMgr.h:35
@ ROLL_FLAG_TYPE_GREED
Definition LootMgr.h:34
@ ROLL_FLAG_TYPE_NEED
Definition LootMgr.h:33
void LoadLootTemplates_Creature()
Definition LootMgr.cpp:1606
std::set< uint32 > AllowedLooterSet
Definition LootMgr.h:116
std::vector< LootItem > LootItemList
Definition LootMgr.h:168
std::map< uint32, QuestItemList * > QuestItemMap
Definition LootMgr.h:169
RollType
Definition LootMgr.h:21
@ ROLL_NEED
Definition LootMgr.h:23
@ ROLL_GREED
Definition LootMgr.h:24
@ MAX_ROLL_TYPE
Definition LootMgr.h:26
@ ROLL_PASS
Definition LootMgr.h:22
@ ROLL_DISENCHANT
Definition LootMgr.h:25
@ ROLL_INVALID
Definition LootMgr.h:27
void LoadLootTemplates_Fishing()
Definition LootMgr.cpp:1674
LootSlotType
Definition LootMgr.h:82
@ LOOT_SLOT_TYPE_ROLL_ONGOING
Definition LootMgr.h:83
@ LOOT_SLOT_TYPE_MASTER
Definition LootMgr.h:85
@ LOOT_SLOT_TYPE_OWNER
Definition LootMgr.h:87
@ LOOT_SLOT_TYPE_ALLOW_LOOT
Definition LootMgr.h:86
@ LOOT_SLOT_TYPE_LOCKED
Definition LootMgr.h:84
void LoadLootTables()
Definition LootMgr.h:406
void LoadLootTemplates_Reference()
Definition LootMgr.cpp:1947
void LoadLootTemplates_Prospecting()
Definition LootMgr.cpp:1819
void LoadLootTemplates_Mail()
Definition LootMgr.cpp:1848
void LoadLootTemplates_Disenchant()
Definition LootMgr.cpp:1640
void LoadLootTemplates_Item()
Definition LootMgr.cpp:1732
LootMethod
Definition LootMgr.h:47
@ ROUND_ROBIN
Definition LootMgr.h:49
@ GROUP_LOOT
Definition LootMgr.h:51
@ FREE_FOR_ALL
Definition LootMgr.h:48
@ MASTER_LOOT
Definition LootMgr.h:50
@ NEED_BEFORE_GREED
Definition LootMgr.h:52
std::set< uint32 > LootIdSet
Definition LootMgr.h:173
UNORDERED_MAP< uint32, LootTemplate * > LootTemplateMap
Definition LootMgr.h:171
std::list< LootStoreItem * > LootStoreItemList
Definition LootMgr.h:170
LootType
Definition LootMgr.h:66
@ LOOT_PROSPECTING
Definition LootMgr.h:73
@ LOOT_DISENCHANTING
Definition LootMgr.h:70
@ LOOT_SKINNING
Definition LootMgr.h:72
@ LOOT_FISHINGHOLE
Definition LootMgr.h:76
@ LOOT_INSIGNIA
Definition LootMgr.h:77
@ LOOT_FISHING
Definition LootMgr.h:69
@ LOOT_PICKPOCKETING
Definition LootMgr.h:68
@ LOOT_MILLING
Definition LootMgr.h:74
@ LOOT_CORPSE
Definition LootMgr.h:67
void LoadLootTemplates_Skinning()
Definition LootMgr.cpp:1871
std::vector< QuestItem > QuestItemList
Definition LootMgr.h:167
@ LOOT_MODE_DEFAULT
#define UNORDERED_MAP
uint32 LoadLootTable()
Definition LootMgr.cpp:116
uint32 LoadAndCollectLootIds(LootIdSet &ids_set)
Definition LootMgr.cpp:237
char const * m_entryName
Definition LootMgr.h:207
void ResetConditions()
Definition LootMgr.cpp:208
LootTemplate const * GetLootFor(uint32 loot_id) const
Definition LootMgr.cpp:217
LootTemplateMap m_LootTemplates
Definition LootMgr.h:205
virtual ~LootStore()
Definition LootMgr.h:181
char const * GetEntryName() const
Definition LootMgr.h:199
bool HaveQuestLootForPlayer(uint32 loot_id, Player *player) const
Definition LootMgr.cpp:198
void CheckLootRefs(LootIdSet *ref_set=NULL) const
Definition LootMgr.cpp:247
bool HaveQuestLootFor(uint32 loot_id) const
Definition LootMgr.cpp:188
LootTemplate * GetLootForConditionFill(uint32 loot_id)
Definition LootMgr.cpp:227
LootStore(char const *name, char const *entryName, bool ratesAllowed)
Definition LootMgr.h:178
bool m_ratesAllowed
Definition LootMgr.h:208
bool IsRatesAllowed() const
Definition LootMgr.h:200
char const * m_name
Definition LootMgr.h:206
bool HaveLootFor(uint32 loot_id) const
Definition LootMgr.h:190
void Clear()
Definition LootMgr.cpp:99
char const * GetName() const
Definition LootMgr.h:198
void ReportNotExistedId(uint32 id) const
Definition LootMgr.cpp:260
void ReportUnusedIds(LootIdSet const &ids_set) const
Definition LootMgr.cpp:253
void Verify() const
Definition LootMgr.cpp:108
void Process(Loot &loot, bool rate, uint16 lootMode, uint8 groupId=0) const
Definition LootMgr.cpp:1388
void CopyConditions(const ConditionList &conditions)
Definition LootMgr.cpp:1363
void CheckLootRefs(LootTemplateMap const &store, LootIdSet *ref_set) const
Definition LootMgr.cpp:1520
bool isReference(uint32 id)
Definition LootMgr.cpp:1597
void AddEntry(LootStoreItem *item)
Definition LootMgr.cpp:1348
LootTemplate(LootTemplate const &)
LootTemplate & operator=(LootTemplate const &)
bool HasQuestDropForPlayer(LootTemplateMap const &store, Player const *player, uint8 groupId=0) const
Definition LootMgr.cpp:1471
LootStoreItemList Entries
Definition LootMgr.h:239
void Verify(LootStore const &store, uint32 Id) const
Definition LootMgr.cpp:1510
std::vector< LootGroup * > LootGroups
Definition LootMgr.h:214
LootGroups Groups
Definition LootMgr.h:240
bool HasQuestDrop(LootTemplateMap const &store, uint8 groupId=0) const
Definition LootMgr.cpp:1433
bool addConditionItem(Condition *cond)
Definition LootMgr.cpp:1539
void targetObjectDestroyLink()
Definition LootMgr.h:253
void sourceObjectDestroyLink()
Definition LootMgr.h:254
LinkedListHead::Iterator< LootValidatorRef > iterator
Definition LootMgr.h:262
LootValidatorRef * getFirst()
Definition LootMgr.h:264
LootValidatorRef * getLast()
Definition LootMgr.h:265
Reference< TO, FROM > * getFirst()
Definition RefManager.h:20
Reference< TO, FROM > * getLast()
Definition RefManager.h:22
QuestItemList * FillQuestLoot(Player *player)
Definition LootMgr.cpp:523
uint32 GetMaxSlotInLootFor(Player *player) const
Definition LootMgr.cpp:776
QuestItemMap PlayerNonQuestNonFFAConditionalItems
Definition LootMgr.h:361
Loot(uint32 _gold=0)
Definition LootMgr.h:294
std::set< uint64 > PlayersLooting
Definition LootMgr.h:358
bool empty() const
Definition LootMgr.h:331
bool hasItemFor(Player *player) const
Definition LootMgr.cpp:783
bool isLooted() const
Definition LootMgr.h:332
void clear()
Definition LootMgr.h:308
bool hasOverThresholdItem() const
Definition LootMgr.cpp:828
bool FillLoot(uint32 lootId, LootStore const &store, Player *lootOwner, bool personal, bool noEmptyError=false, uint16 lootMode=LOOT_MODE_DEFAULT)
Definition LootMgr.cpp:418
void NotifyQuestItemRemoved(uint8 questIndex, ObjectGuid lootGuid=0)
Definition LootMgr.cpp:636
bool HasLooter(uint64 GUID)
Definition LootMgr.h:339
QuestItemMap PlayerQuestItems
Definition LootMgr.h:359
uint8 unlootedCount
Definition LootMgr.h:285
void AddItem(LootStoreItem const &item)
Definition LootMgr.cpp:390
uint64 roundRobinPlayer
Definition LootMgr.h:286
void NotifyMoneyRemoved(ObjectGuid lootGuid=0)
Definition LootMgr.cpp:618
void NotifyItemRemoved(uint8 lootIndex, ObjectGuid lootGuid=0)
Definition LootMgr.cpp:599
QuestItemList * FillNonQuestNonFFAConditionalLoot(Player *player, bool presentAtLooting)
Definition LootMgr.cpp:563
uint32 containerID
Definition LootMgr.h:292
void AddLooter(uint64 GUID)
Definition LootMgr.h:337
void generateMoneyLoot(uint32 minAmount, uint32 maxAmount)
Definition LootMgr.cpp:673
uint32 gold
Definition LootMgr.h:284
QuestItemMap PlayerFFAItems
Definition LootMgr.h:360
uint8 maxDuplicates
Definition LootMgr.h:288
LootItem * LootItemInSlot(uint32 lootslot, Player *player, QuestItem **qitem=NULL, QuestItem **ffaitem=NULL, QuestItem **conditem=NULL)
Definition LootMgr.cpp:713
void RemoveLooter(uint64 GUID)
Definition LootMgr.h:338
QuestItemMap const & GetPlayerQuestItems() const
Definition LootMgr.h:278
void DeleteLootItemFromContainerItemDB(uint32 itemID)
Definition LootMgr.cpp:686
~Loot()
Definition LootMgr.h:295
std::vector< LootItem > items
Definition LootMgr.h:282
QuestItemMap const & GetPlayerFFAItems() const
Definition LootMgr.h:279
QuestItemList * FillFFALoot(Player *player)
Definition LootMgr.cpp:500
QuestItemMap const & GetPlayerNonQuestNonFFAConditionalItems() const
Definition LootMgr.h:280
void addLootValidatorRef(LootValidatorRef *pLootValidatorRef)
Definition LootMgr.h:302
void DeleteLootMoneyFromContainerItemDB()
Definition LootMgr.cpp:705
LootType loot_type
Definition LootMgr.h:287
void FillNotNormalLootFor(Player *player, bool presentAtLooting)
Definition LootMgr.cpp:462
std::vector< LootItem > quest_items
Definition LootMgr.h:283
LootValidatorRefManager i_LootValidatorRefManager
Definition LootMgr.h:364
uint32 itemid
Definition LootMgr.h:120
AllowedLooterSet allowedGUIDs
Definition LootMgr.h:124
bool is_blocked
Definition LootMgr.h:127
bool canSave
Definition LootMgr.h:133
void AddAllowedLooter(Player const *player)
Definition LootMgr.cpp:380
LootItem(LootStoreItem const &li)
Definition LootMgr.cpp:341
bool needs_quest
Definition LootMgr.h:131
bool follow_loot_rules
Definition LootMgr.h:132
void WriteBitDataPart(PermissionTypes permission, LootSlotType hasSlotType, ByteBuffer *buff)
Definition LootMgr.cpp:839
bool is_underthreshold
Definition LootMgr.h:129
int32 randomPropertyId
Definition LootMgr.h:122
uint8 count
Definition LootMgr.h:125
bool is_looted
Definition LootMgr.h:126
bool AllowedForPlayer(Player const *player) const
Definition LootMgr.cpp:352
LootItem()
Definition LootMgr.h:140
void WriteBasicDataPart(LootSlotType slotType, uint8 slot, ByteBuffer *buff)
Definition LootMgr.cpp:849
const AllowedLooterSet & GetAllowedLooters() const
Definition LootMgr.h:145
ConditionList conditions
Definition LootMgr.h:123
bool freeforall
Definition LootMgr.h:128
uint32 randomSuffix
Definition LootMgr.h:121
bool is_counted
Definition LootMgr.h:130
LootStoreItem(uint32 _itemid, float _chanceOrQuestChance, uint16 _lootmode, uint8 _group, int32 _mincountOrRef, uint8 _maxcount)
Definition LootMgr.h:106
float chance
Definition LootMgr.h:96
int32 mincountOrRef
Definition LootMgr.h:97
uint8 group
Definition LootMgr.h:99
bool Roll(bool rate) const
Definition LootMgr.cpp:271
bool needs_quest
Definition LootMgr.h:100
uint32 itemid
Definition LootMgr.h:95
ConditionList conditions
Definition LootMgr.h:102
uint8 maxcount
Definition LootMgr.h:101
uint16 lootmode
Definition LootMgr.h:98
bool IsValid(LootStore const &store, uint32 entry) const
Definition LootMgr.cpp:287
void WriteData(ObjectGuid guid, LootType lootType, WorldPacket *data, bool isAoE=false)
Definition LootMgr.cpp:866
PermissionTypes permission
Definition LootMgr.h:371
LootView(Loot &_loot, Player *_viewer, PermissionTypes _permission=PermissionTypes::ALL_PERMISSION)
Definition LootMgr.h:373
Loot & loot
Definition LootMgr.h:369
Player * viewer
Definition LootMgr.h:370
uint8 index
Definition LootMgr.h:154
QuestItem()
Definition LootMgr.h:157
bool is_looted
Definition LootMgr.h:155
QuestItem(uint8 _index, bool _islooted=false)
Definition LootMgr.h:160