OregonCore  revision 3611e8a-git
Your Favourite TBC server
LootHandler.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of the OregonCore Project. See AUTHORS file for Copyright information
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the
6  * Free Software Foundation; either version 2 of the License, or (at your
7  * option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #include "Common.h"
19 #include "WorldPacket.h"
20 #include "Log.h"
21 #include "Corpse.h"
22 #include "GameObject.h"
23 #include "Player.h"
24 #include "ObjectAccessor.h"
25 #include "WorldSession.h"
26 #include "LootMgr.h"
27 #include "Object.h"
28 #include "Group.h"
29 #include "World.h"
30 #include "Util.h"
31 
33 {
34  sLog.outDebug("WORLD: CMSG_AUTOSTORE_LOOT_ITEM");
35  Player* player = GetPlayer();
36  uint64 lguid = player->GetLootGUID();
37  Loot* loot = NULL;
38  uint8 lootSlot = 0;
39 
40  recv_data >> lootSlot;
41 
42  if (IS_GAMEOBJECT_GUID(lguid))
43  {
44  GameObject* go = player->GetMap()->GetGameObject(lguid);
45 
46  // not check distance for GO in case owned GO (fishing bobber case, for example) or Fishing hole GO
48  {
49  player->SendLootRelease(lguid);
50  return;
51  }
52 
53  loot = &go->loot;
54  }
55  else if (IS_ITEM_GUID(lguid))
56  {
57  Item* pItem = player->GetItemByGuid(lguid);
58 
59  if (!pItem)
60  {
61  player->SendLootRelease(lguid);
62  return;
63  }
64 
65  loot = &pItem->loot;
66  }
67  else if (IS_CORPSE_GUID(lguid))
68  {
69  Corpse* bones = ObjectAccessor::GetCorpse(*player, lguid);
70  if (!bones)
71  {
72  player->SendLootRelease(lguid);
73  return;
74  }
75  loot = &bones->loot;
76  }
77  else
78  {
79  Creature* pCreature = GetPlayer()->GetMap()->GetCreature(lguid);
80 
81  bool ok_loot = pCreature && (pCreature->IsAlive() == (player->getClass() == CLASS_ROGUE && pCreature->loot.loot_type == LOOT_SKINNING) || (!pCreature->IsAlive() == (pCreature->GetSkinner() && pCreature->loot.loot_type == LOOT_SKINNING)));
82 
83  if (!ok_loot || !pCreature->IsWithinDistInMap(_player, INTERACTION_DISTANCE))
84  {
85  player->SendLootError(lguid, ok_loot ? LOOT_ERROR_TOO_FAR : LOOT_ERROR_DIDNT_KILL);
86  return;
87  }
88 
89  loot = &pCreature->loot;
90  }
91 
92  QuestItem* qitem = NULL;
93  QuestItem* ffaitem = NULL;
94  QuestItem* conditem = NULL;
95 
96  LootItem* item = loot->LootItemInSlot(lootSlot, player, &qitem, &ffaitem, &conditem);
97 
98  if (!item)
99  {
100  player->SendEquipError(EQUIP_ERR_ALREADY_LOOTED, NULL, NULL);
101  return;
102  }
103 
104  // questitems use the blocked field for other purposes
105  if (!qitem && item->is_blocked)
106  {
107  player->SendLootRelease(lguid);
108  return;
109  }
110 
111  ItemPosCountVec dest;
112  uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, item->itemid, item->count);
113  if (msg == EQUIP_ERR_OK)
114  {
115  Item* newitem = player->StoreNewItem(dest, item->itemid, true, item->randomPropertyId);
116 
117  if (qitem)
118  {
119  qitem->is_looted = true;
120  //freeforall is 1 if everyone's supposed to get the quest item.
121  if (item->freeforall || loot->GetPlayerQuestItems().size() == 1)
122  player->SendNotifyLootItemRemoved(lootSlot);
123  else
124  loot->NotifyQuestItemRemoved(qitem->index);
125  }
126  else
127  {
128  if (ffaitem)
129  {
130  //freeforall case, notify only one player of the removal
131  ffaitem->is_looted = true;
132  player->SendNotifyLootItemRemoved(lootSlot);
133  }
134  else
135  {
136  //not freeforall, notify everyone
137  if (conditem)
138  conditem->is_looted = true;
139  loot->NotifyItemRemoved(lootSlot);
140  }
141  }
142 
143  //if only one person is supposed to loot the item, then set it to looted
144  if (!item->freeforall)
145  item->is_looted = true;
146 
147  --loot->unlootedCount;
148 
149  player->SendNewItem(newitem, uint32(item->count), false, false, true);
150  }
151  else
152  player->SendEquipError(msg, NULL, NULL);
153 }
154 
156 {
157  sLog.outDebug("WORLD: CMSG_LOOT_MONEY");
158 
159  Player* player = GetPlayer();
160  uint64 guid = player->GetLootGUID();
161  if (!guid)
162  return;
163 
164  Loot* pLoot = NULL;
165  bool shareMoney = true;
166 
167  switch (GUID_HIPART(guid))
168  {
169  case HIGHGUID_GAMEOBJECT:
170  {
171  GameObject* pGameObject = GetPlayer()->GetMap()->GetGameObject(guid);
172 
173  // not check distance for GO in case owned GO (fishing bobber case, for example)
174  if (pGameObject && ((pGameObject->GetOwnerGUID() == _player->GetGUID() || pGameObject->IsWithinDistInMap(_player, INTERACTION_DISTANCE))))
175  pLoot = &pGameObject->loot;
176 
177  break;
178  }
179  case HIGHGUID_CORPSE: // remove insignia ONLY in BG
180  {
181  Corpse* bones = ObjectAccessor::GetCorpse(*GetPlayer(), guid);
182 
183  if (bones && bones->IsWithinDistInMap(_player, INTERACTION_DISTANCE))
184  {
185  pLoot = &bones->loot;
186  shareMoney = false;
187  }
188 
189  break;
190  }
191  case HIGHGUID_ITEM:
192  {
193  if (Item* item = GetPlayer()->GetItemByGuid(guid))
194  {
195  pLoot = &item->loot;
196  shareMoney = false;
197  }
198  break;
199  }
200  case HIGHGUID_UNIT:
201  {
202  Creature* creature = GetPlayer()->GetMap()->GetCreature(guid);
203 
204  bool ok_loot = creature && creature->IsAlive() == (player->getClass() == CLASS_ROGUE && creature->loot.loot_type == LOOT_SKINNING);
205 
206  if (ok_loot && creature->IsWithinDistInMap(_player, INTERACTION_DISTANCE))
207  {
208  pLoot = &creature->loot;
209  if (creature->IsAlive())
210  shareMoney = false;
211  }
212  else
213  player->SendLootError(guid, ok_loot ? LOOT_ERROR_TOO_FAR : LOOT_ERROR_DIDNT_KILL);
214  break;
215  }
216  default:
217  return; // unlootable type
218  }
219 
220  if (pLoot)
221  {
222  pLoot->NotifyMoneyRemoved();
223  if (shareMoney && player->GetGroup()) //item, pickpocket and players can be looted only single player
224  {
225  Group* group = player->GetGroup();
226 
227  std::vector<Player*> playersNear;
228  for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
229  {
230  Player* playerGroup = itr->GetSource();
231  if (!playerGroup)
232  continue;
233  if (player->GetDistance2d(playerGroup) < sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE))
234  playersNear.push_back(playerGroup);
235  }
236 
237  uint32 money_per_player = uint32((pLoot->gold) / (playersNear.size()));
238 
239  for (std::vector<Player*>::const_iterator i = playersNear.begin(); i != playersNear.end(); ++i)
240  {
241  (*i)->ModifyMoney(money_per_player);
242 
244  data << uint32(money_per_player);
245 
246  (*i)->GetSession()->SendPacket(&data);
247  }
248  }
249  else
250  player->ModifyMoney(pLoot->gold);
251 
252  pLoot->gold = 0;
253  }
254 }
255 
257 {
258  sLog.outDebug("WORLD: CMSG_LOOT");
259 
260  uint64 guid;
261  recv_data >> guid;
262 
263  // Check possible cheat
264  if (!_player->IsAlive())
265  return;
266 
267  GetPlayer()->SendLoot(guid, LOOT_CORPSE);
268 
269  // Interrupt spell casting on loot
270  if (GetPlayer()->IsNonMeleeSpellCast(false))
272 }
273 
275 {
276  sLog.outDebug("WORLD: CMSG_LOOT_RELEASE");
277 
278  // cheaters can modify lguid to prevent correct apply loot release code and re-loot
279  // use internal stored guid
280  uint64 guid;
281  recv_data >> guid;
282 
283  if (uint64 lguid = GetPlayer()->GetLootGUID())
284  if (lguid == guid)
285  DoLootRelease(lguid);
286 }
287 
289 {
290  Player* player = GetPlayer();
291  Loot* loot;
292 
293  player->SetLootGUID(0);
294  player->SendLootRelease(lguid);
295 
297 
298  if (!player->IsInWorld())
299  return;
300 
301  if (IS_GAMEOBJECT_GUID(lguid))
302  {
303  GameObject* go = GetPlayer()->GetMap()->GetGameObject(lguid);
304 
305  // not check distance for GO in case owned GO (fishing bobber case, for example) or Fishing hole GO
307  return;
308 
309  loot = &go->loot;
310 
311  if (go->GetGoType() == GAMEOBJECT_TYPE_DOOR)
312  {
313  // locked doors are opened with spelleffect openlock, prevent remove its as looted
314  go->UseDoorOrButton();
315  }
316  else if (loot->isLooted() || go->GetGoType() == GAMEOBJECT_TYPE_FISHINGNODE)
317  {
318  // GO is mineral vein? so it is not removed after its looted
319  if (go->GetGoType() == GAMEOBJECT_TYPE_CHEST)
320  {
321  uint32 go_min = go->GetGOInfo()->chest.minSuccessOpens;
322  uint32 go_max = go->GetGOInfo()->chest.maxSuccessOpens;
323 
324  // only vein pass this check
325  if (go_min != 0 && go_max > go_min)
326  {
327  float amount_rate = sWorld.getRate(RATE_MINING_AMOUNT);
328  float min_amount = go_min * amount_rate;
329  float max_amount = go_max * amount_rate;
330 
331  go->AddUse();
332  float uses = float(go->GetUseCount());
333 
334  if (uses < max_amount)
335  {
336  if (uses >= min_amount)
337  {
338  float chance_rate = sWorld.getRate(RATE_MINING_NEXT);
339 
340  int32 ReqValue = 175;
341  LockEntry const* lockInfo = sLockStore.LookupEntry(go->GetGOInfo()->chest.lockId);
342  if (lockInfo)
343  ReqValue = lockInfo->requiredminingskill;
344  float skill = float(player->GetSkillValue(SKILL_MINING)) / (ReqValue + 25);
345  double chance = pow(0.8 * chance_rate, 4 * (1 / double(max_amount)) * double(uses));
346  if (roll_chance_f(100 * chance + skill))
347  go->SetLootState(GO_READY);
348  else // not have more uses
350  }
351  else // 100% chance until min uses
352  go->SetLootState(GO_READY);
353  }
354  else // max uses already
356  }
357  else // not vein
359  }
360  else if (go->GetGoType() == GAMEOBJECT_TYPE_FISHINGHOLE)
361  {
362  // The fishing hole used once more
363  go->AddUse(); // if the max usage is reached, will be despawned in next tick
364  if (int32(go->GetUseCount()) >= irand(go->GetGOInfo()->fishinghole.minSuccessOpens, go->GetGOInfo()->fishinghole.maxSuccessOpens))
366  else
367  go->SetLootState(GO_READY);
368  }
369  else // not chest (or vein/herb/etc)
371 
372  loot->clear();
373  }
374  else
375  {
376  // not fully looted object
377  go->SetLootState(GO_ACTIVATED, player);
378 
379  if (player->GetGUID() == loot->roundRobinPlayer)
380  loot->roundRobinPlayer = 0;
381  }
382  }
383  else if (IS_CORPSE_GUID(lguid)) // ONLY remove insignia at BG
384  {
385  Corpse* corpse = ObjectAccessor::GetCorpse(*player, lguid);
386  if (!corpse || !corpse->IsWithinDistInMap(_player, INTERACTION_DISTANCE))
387  return;
388 
389  loot = &corpse->loot;
390 
391  if (loot->isLooted())
392  {
393  loot->clear();
395  }
396  }
397  else if (IS_ITEM_GUID(lguid))
398  {
399  Item* pItem = player->GetItemByGuid(lguid);
400  if (!pItem)
401  return;
402 
404  {
405  pItem->m_lootGenerated = false;
406  pItem->loot.clear();
407 
408  uint32 count = pItem->GetCount();
409 
410  // >=5 checked in spell code, but will work for cheating cases also with removing from another stacks.
411  if (count > 5)
412  count = 5;
413 
414  player->DestroyItemCount(pItem, count, true);
415  }
416  else
417  // FIXME: item must not be deleted in case not fully looted state. But this pre-request implement loot saving in DB at item save. Or cheating possible.
418  player->DestroyItem(pItem->GetBagSlot(), pItem->GetSlot(), true);
419  return; // item can be looted only single player
420  }
421  else
422  {
423  Creature* pCreature = GetPlayer()->GetMap()->GetCreature(lguid);
424 
425  bool ok_loot = pCreature && pCreature->IsAlive() == (player->getClass() == CLASS_ROGUE && pCreature->loot.loot_type == LOOT_PICKPOCKETING);
426  if (!ok_loot || !pCreature->IsWithinDistInMap(_player, INTERACTION_DISTANCE))
427  return;
428 
429  loot = &pCreature->loot;
430 
431  if (loot->isLooted())
432  {
434 
435  // skip pickpocketing loot for speed, skinning timer reduction is no-op in fact
436  if (!pCreature->IsAlive())
437  pCreature->AllLootRemovedFromCorpse();
438 
439  loot->clear();
440  }
441  else
442  {
443  // if the round robin player release, reset it.
444  if (player->GetGUID() == loot->roundRobinPlayer)
445  {
446  loot->roundRobinPlayer = 0;
447 
448  if (Group* group = player->GetGroup())
449  group->SendLooter(pCreature, NULL);
450  }
451  // force update of dynamic flags, otherwise other group's players still not able to loot.
453  }
454  }
455 
456  //Player is not looking at loot list, he doesn't need to see updates on the loot list
457  loot->RemoveLooter(player->GetGUID());
458 }
459 
461 {
462  uint8 slotid;
463  uint64 lootguid, target_playerguid;
464 
465  recv_data >> lootguid >> slotid >> target_playerguid;
466 
468  {
470  return;
471  }
472 
473  Player* target = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(target_playerguid, 0, HIGHGUID_PLAYER));
474  if (!target)
475  {
477  return;
478  }
479 
480  // TODO : add some error message?
481  if (_player->GetMapId() != target->GetMapId() || _player->GetDistance(target) > sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE))
482  return;
483 
484  sLog.outDebug("WorldSession::HandleLootMasterGiveOpcode (CMSG_LOOT_MASTER_GIVE, 0x02A3) Target = [%s].", target->GetName());
485 
486  if (_player->GetLootGUID() != lootguid)
487  {
489  return;
490  }
491 
492  Loot* pLoot = NULL;
493 
494  if (IS_CREATURE_GUID(GetPlayer()->GetLootGUID()))
495  {
496  Creature* pCreature = GetPlayer()->GetMap()->GetCreature(lootguid);
497  if (!pCreature)
498  return;
499 
500  pLoot = &pCreature->loot;
501  }
502  else if (IS_GAMEOBJECT_GUID(GetPlayer()->GetLootGUID()))
503  {
504  GameObject* pGO = GetPlayer()->GetMap()->GetGameObject(lootguid);
505  if (!pGO)
506  return;
507 
508  pLoot = &pGO->loot;
509  }
510 
511  if (!pLoot)
512  return;
513 
514  if (slotid > pLoot->items.size())
515  {
516  sLog.outDebug("AutoLootItem: Player %s might be using a hack! (slot %d, size %lu)", GetPlayer()->GetName(), slotid, (unsigned long)pLoot->items.size());
517  return;
518  }
519 
520  LootItem& item = pLoot->items[slotid];
521 
522  ItemPosCountVec dest;
523  uint8 msg = target->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, item.itemid, item.count);
524  if (msg != EQUIP_ERR_OK)
525  {
528  else if (msg == EQUIP_ERR_INVENTORY_FULL)
530  else
532 
533  target->SendEquipError(msg, NULL, NULL);
534  return;
535  }
536 
537  // now move item from loot to target inventory
538  Item* newitem = target->StoreNewItem(dest, item.itemid, true, item.randomPropertyId);
539  target->SendNewItem(newitem, uint32(item.count), false, false, true);
540 
541  // mark as looted
542  item.count = 0;
543  item.is_looted = true;
544 
545  pLoot->NotifyItemRemoved(slotid);
546  --pLoot->unlootedCount;
547 }
548 
void SendLoot(uint64 guid, LootType loot_type)
Definition: Player.cpp:7355
#define INTERACTION_DISTANCE
Definition: Object.h:35
uint32 GetCount() const
Definition: Item.h:251
ItemTemplate const * GetProto() const
Definition: Item.cpp:460
Group * GetGroup()
Definition: Player.h:2589
Definition: Corpse.h:48
LootItem * LootItemInSlot(uint32 lootslot, Player *player, QuestItem **qitem=NULL, QuestItem **ffaitem=NULL, QuestItem **conditem=NULL)
Definition: LootMgr.cpp:612
bool freeforall
Definition: LootMgr.h:133
Map * GetMap() const
Definition: Object.h:829
const uint64 & GetLootGUID() const
Definition: Player.h:1948
bool is_looted
Definition: LootMgr.h:149
void DestroyItemCount(uint32 item, uint32 count, bool update, bool unequip_check=false)
Definition: Player.cpp:10789
struct GameObjectInfo::@59::@64 chest
uint64 GetOwnerGUID() const
Definition: GameObject.h:662
Loot loot
Definition: Creature.h:662
bool m_lootGenerated
Definition: Item.h:340
void SendNotifyLootItemRemoved(uint8 lootSlot)
Definition: Player.cpp:7706
void HandleLootReleaseOpcode(WorldPacket &recvPacket)
DBCStorage< LockEntry > sLockStore(LockEntryfmt)
int32 irand(int32 min, int32 max)
Definition: Util.cpp:66
bool roll_chance_f(float chance)
Definition: Util.h:67
#define sLog
Log class singleton.
Definition: Log.h:187
bool is_blocked
Definition: LootMgr.h:132
ACE_INT32 int32
Definition: Define.h:67
void SendNewItem(Item *item, uint32 count, bool received, bool created, bool broadcast=false)
Definition: Player.cpp:12144
#define GUID_HIPART(x)
Definition: ObjectGuid.h:82
Player * GetPlayer() const
Definition: WorldSession.h:104
void HandleAutostoreLootItemOpcode(WorldPacket &recvPacket)
Definition: LootHandler.cpp:32
Item * StoreNewItem(ItemPosCountVec const &pos, uint32 item, bool update, int32 randomPropertyId=0)
Definition: Player.cpp:10277
void AllLootRemovedFromCorpse()
Definition: Creature.cpp:2334
bool is_looted
Definition: LootMgr.h:131
void clear()
Definition: LootMgr.h:327
void SetLootGUID(const uint64 &guid)
Definition: Player.h:1952
void HandleLootMasterGiveOpcode(WorldPacket &recvPacket)
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true) const
Definition: Object.h:762
void NotifyItemRemoved(uint8 lootIndex)
Definition: LootMgr.cpp:534
void DestroyItem(uint8 bag, uint8 slot, bool update)
Definition: Player.cpp:10724
float GetDistance2d(const WorldObject *obj) const
Definition: Object.h:721
uint8 CanStoreNewItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, uint32 item, uint32 count, uint32 *no_space_count=NULL) const
Definition: Player.h:1147
int32 randomPropertyId
Definition: LootMgr.h:128
#define IS_ITEM_GUID(Guid)
Definition: ObjectGuid.h:72
void SendLootError(uint64 guid, LootError error)
Definition: Player.cpp:7691
void NotifyQuestItemRemoved(uint8 questIndex)
Definition: LootMgr.cpp:565
void HandleLootOpcode(WorldPacket &recvPacket)
void SetLootState(LootState s, Unit *unit=NULL)
QuestItemMap const & GetPlayerQuestItems() const
Definition: LootMgr.h:294
Creature * GetCreature(uint64 guid)
Definition: Map.cpp:2632
ACE_UINT8 uint8
Definition: Define.h:73
Definition: Unit.h:297
const bool & IsInWorld() const
Definition: Object.h:129
uint64 GetMasterLooterGuid() const
Definition: Group.h:240
#define IS_CREATURE_GUID(Guid)
Definition: ObjectGuid.h:66
uint8 unlootedCount
Definition: LootMgr.h:310
void DoLootRelease(uint64 lguid)
Definition: LootMgr.h:290
bool IsAlive() const
Definition: Unit.h:1433
uint8 index
Definition: LootMgr.h:148
float GetDistance(const WorldObject *obj) const
Definition: Object.h:706
#define MAKE_NEW_GUID(l, e, h)
Definition: ObjectGuid.h:80
void NotifyMoneyRemoved()
Definition: LootMgr.cpp:550
Definition: Item.h:196
uint64 roundRobinPlayer
Definition: LootMgr.h:311
void HandleLootMoneyOpcode(WorldPacket &recvPacket)
static Player * FindPlayer(uint64, bool force=false)
void SendEquipError(uint8 msg, Item *pItem, Item *pItem2)
Definition: Player.cpp:11571
uint16 GetSkillValue(uint32 skill) const
Definition: Player.cpp:5545
uint32 GetMapId() const
Definition: Object.h:585
GroupReference * GetFirstMember()
Definition: Group.h:304
struct GameObjectInfo::@59::@82 fishinghole
void SendLootRelease(uint64 guid)
Definition: Player.cpp:7348
#define IS_GAMEOBJECT_GUID(Guid)
Definition: ObjectGuid.h:73
GroupReference * next()
void UseDoorOrButton(uint32 time_to_restore=0, bool alternative=false, Unit *user=NULL)
Definition: GameObject.cpp:950
uint8 GetSlot() const
Definition: Item.h:266
uint32 gold
Definition: LootMgr.h:309
const char * GetName() const
Definition: Object.h:692
std::vector< ItemPosCount > ItemPosCountVec
Definition: Player.h:605
void ForceValuesUpdateAtIndex(uint32)
Definition: Object.cpp:1797
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1006
ACE_UINT64 uint64
Definition: Define.h:70
std::vector< LootItem > items
Definition: LootMgr.h:307
GameobjectTypes GetGoType() const
Definition: GameObject.h:718
bool isLooted() const
Definition: LootMgr.h:355
Player * _player
Definition: WorldSession.h:729
uint64 GetSkinner() const
Definition: Creature.h:667
void AddUse()
Definition: GameObject.h:768
LootType loot_type
Definition: LootMgr.h:312
GameObjectInfo const * GetGOInfo() const
Definition: GameObject.h:591
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition: Unit.cpp:3522
unsupported by client, sending LOOT_SKINNING instead
Definition: LootMgr.h:62
uint8 getClass() const
Definition: Unit.h:1039
void RemoveLooter(uint64 GUID)
Definition: LootMgr.h:367
Loot loot
Definition: Corpse.h:93
LootMethod GetLootMethod() const
Definition: Group.h:230
uint32 requiredminingskill
Definition: DBCStructure.h:499
#define sWorld
Definition: World.h:860
uint8 count
Definition: LootMgr.h:130
void ModifyMoney(int32 d)
Definition: Player.h:1528
ACE_UINT32 uint32
Definition: Define.h:71
#define IS_CORPSE_GUID(Guid)
Definition: ObjectGuid.h:74
GameObject * GetGameObject(uint64 guid)
Definition: Map.cpp:2638
static Corpse * GetCorpse(WorldObject const &u, uint64 guid)
uint8 GetBagSlot() const
Definition: Item.cpp:728
uint32 itemid
Definition: LootMgr.h:126
Definition: Player.h:922
Loot loot
Definition: Item.h:339
Definition: Group.h:154
Item * GetItemByGuid(uint64 guid) const
Definition: Player.cpp:8583
const uint64 & GetGUID() const
Definition: Object.h:156
uint32 GetUseCount() const
Definition: GameObject.h:773