83{
85 {
87 return;
88 }
89
92
94
95
97 {
98 itemList.emplace_back(0, 0, loot->
gold, 0, 0,
false,
false,
false,
false,
false,
false, 0);
99
115 trans->Append(stmt);
116 }
117
118
120 for (LootItemList::const_iterator li = loot->
items.begin(); li != loot->
items.end(); li++)
121 {
122
123
124
125
126
127
130 continue;
131
132 uint32 conditionLootId = 0;
133 if (!li->conditions.empty())
134 {
135 conditionLootId = li->conditions.front()->SourceGroup;
136 }
137
138 itemList.emplace_back(li->itemid, li->itemIndex, li->count, li->randomPropertyId, li->randomSuffix, li->follow_loot_rules, li->freeforall, li->is_blocked, li->is_counted,
139 li->is_underthreshold, li->needs_quest, conditionLootId);
140
144 stmt->
SetData(index++, li->itemid);
145 stmt->
SetData(index++, li->itemIndex);
146 stmt->
SetData(index++, li->count);
147 stmt->
SetData (index++, li->randomPropertyId);
148 stmt->
SetData(index++, li->randomSuffix);
149 stmt->
SetData(index++, li->follow_loot_rules);
150 stmt->
SetData(index++, li->freeforall);
151 stmt->
SetData(index++, li->is_blocked);
152 stmt->
SetData(index++, li->is_counted);
153 stmt->
SetData(index++, li->is_underthreshold);
154 stmt->
SetData(index++, li->needs_quest);
155 stmt->
SetData(index++, conditionLootId);
156
157 trans->Append(stmt);
158 }
159
161}
#define LOG_INFO(filterType__,...)
Definition: Log.h:165
std::uint8_t uint8
Definition: Define.h:109
std::uint32_t uint32
Definition: Define.h:107
#define sObjectMgr
Definition: ObjectMgr.h:1635
std::list< StoredLootItem > StoredLootItemList
Definition: LootItemStorage.h:47
@ CHAR_INS_ITEMCONTAINER_SINGLE_ITEM
Definition: CharacterDatabase.h:490
SQLTransaction< CharacterDatabaseConnection > CharacterDatabaseTransaction
Definition: DatabaseEnvFwd.h:69
DatabaseWorkerPool< CharacterDatabaseConnection > CharacterDatabase
Accessor to the character database.
Definition: DatabaseEnv.cpp:21
Definition: PreparedStatement.h:157
Acore::Types::is_default< T > SetData(const uint8 index, T value)
Definition: PreparedStatement.h:77
Definition: ItemTemplate.h:619
bool IsCurrencyToken() const
Definition: ItemTemplate.h:727
LowType GetCounter() const
Definition: ObjectGuid.h:145
std::string ToString() const
Definition: ObjectGuid.cpp:47
LootItemContainer lootItemStore
Definition: LootItemStorage.h:70
ObjectGuid containerGUID
Definition: LootMgr.h:329
bool isLooted() const
Definition: LootMgr.h:368
uint32 gold
Definition: LootMgr.h:322
std::vector< LootItem > items
Definition: LootMgr.h:320