36 TC_LOG_DEBUG(
"network",
"WORLD: CMSG_AUTOSTORE_LOOT_ITEM");
91 loot = &creature->
loot;
110 Loot* loot =
nullptr;
111 bool shareMoney =
true;
153 loot = &creature->
loot;
168 if (shareMoney && player->
GetGroup())
172 std::vector<Player*> playersNear;
175 Player* member = itr->GetSource();
180 playersNear.push_back(member);
185 for (std::vector<Player*>::const_iterator i = playersNear.begin(); i != playersNear.end(); ++i)
187 (*i)->ModifyMoney(goldPerPlayer);
191 data <<
uint32(goldPerPlayer);
192 data <<
uint8(playersNear.size() <= 1);
193 (*i)->SendDirectMessage(&data);
231 if (
GetPlayer()->IsNonMeleeSpellCast(
false))
286 bool allOpensConsumed =
false;
319 loot = &corpse->
loot;
365 loot = &creature->
loot;
384 group->SendLooter(creature,
nullptr);
400 recvData >> lootguid >> slotid >> target_playerguid;
416 TC_LOG_DEBUG(
"network",
"WorldSession::HandleLootMasterGiveOpcode (CMSG_LOOT_MASTER_GIVE, 0x02A3) Target = [{}].", target->
GetName());
427 TC_LOG_INFO(
"entities.player.cheat",
"MasterLootItem: Player {} tried to give an item to ineligible player {} !",
GetPlayer()->GetName(), target->
GetName());
431 Loot* loot =
nullptr;
433 if (
GetPlayer()->GetLootGUID().IsCreatureOrVehicle())
439 loot = &creature->
loot;
441 else if (
GetPlayer()->GetLootGUID().IsGameObject())
455 TC_LOG_DEBUG(
"loot",
"MasterLootItem: Player {} might be using a hack! (slot {}, size {})",
456 GetPlayer()->GetName(), slotid, (
unsigned long)loot->
items.size());
@ ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE
@ ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM
@ ACHIEVEMENT_CRITERIA_TYPE_LOOT_EPIC_ITEM
@ ACHIEVEMENT_CRITERIA_TYPE_LOOT_MONEY
@ EQUIP_ERR_CANT_EQUIP_EVER
@ EQUIP_ERR_ITEM_MAX_COUNT
@ ITEM_FLAG_IS_PROSPECTABLE
#define TC_LOG_DEBUG(filterType__,...)
#define TC_LOG_INFO(filterType__,...)
@ LOOT_ERROR_MASTER_OTHER
@ LOOT_ERROR_MASTER_INV_FULL
@ LOOT_ERROR_MASTER_UNIQUE_ITEM
@ LOOT_ERROR_PLAYER_NOT_FOUND
#define INTERACTION_DISTANCE
std::vector< ItemPosCount > ItemPosCountVec
@ GAMEOBJECT_TYPE_FISHINGHOLE
@ GAMEOBJECT_TYPE_FISHINGNODE
@ CORPSE_DYNFLAG_LOOTABLE
@ AURA_INTERRUPT_FLAG_LOOTING
@ CORPSE_FIELD_DYNAMIC_FLAGS
void AllLootRemovedFromCorpse()
ObjectGuid GetOwnerGUID() const override
bool IsWithinDistInMap(Player const *player) const
void UseDoorOrButton(uint32 time_to_restore=0, bool alternative=false, Unit *user=nullptr)
GameObjectValue const * GetGOValue() const
void SetLootState(LootState s, Unit *unit=nullptr)
GameobjectTypes GetGoType() const
uint32 GetUseCount() const
ObjectGuid GetMasterLooterGuid() const
LootMethod GetLootMethod() const
GroupReference * GetFirstMember()
ItemTemplate const * GetTemplate() const
GameObject * GetGameObject(ObjectGuid const &guid)
Creature * GetCreature(ObjectGuid const &guid)
static ObjectGuid const Empty
bool IsGameObject() const
bool IsCreatureOrVehicle() const
virtual void RemoveDynamicFlag(uint32 flag)
void RemoveFlag(uint16 index, uint32 oldFlag)
static ObjectGuid GetGUID(Object const *o)
void ForceValuesUpdateAtIndex(uint32)
Item * StoreNewItem(ItemPosCountVec const &pos, uint32 item, bool update, int32 randomPropertyId=0, GuidSet const &allowedLooters=GuidSet())
void SendLootRelease(ObjectGuid guid) const
void UpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1=0, uint32 miscValue2=0, WorldObject *ref=nullptr)
bool ModifyMoney(int32 amount, bool sendError=true)
void SetLootGUID(ObjectGuid guid)
bool IsAtGroupRewardDistance(WorldObject const *pRewardSource) const
WorldSession * GetSession() const
ObjectGuid GetLootGUID() const
void DestroyItem(uint8 bag, uint8 slot, bool update)
uint32 DestroyItemCount(uint32 item, uint32 count, bool update, bool unequip_check=false)
void SendLoot(ObjectGuid guid, LootType loot_type)
void SendNewItem(Item *item, uint32 count, bool received, bool created, bool broadcast=false, bool sendChatMessage=true)
void StoreLootItem(uint8 lootSlot, Loot *loot)
Item * GetItemByGuid(ObjectGuid guid) const
InventoryResult CanStoreNewItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, uint32 item, uint32 count, uint32 *no_space_count=nullptr) const
void SendLootError(ObjectGuid guid, LootError error) const
void RemoveAurasWithInterruptFlags(uint32 flag, uint32 except=0)
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
bool IsInRaidWith(Unit const *unit) const
void RemoveUnitFlag(UnitFlags flags)
std::string const & GetName() const
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
bool IsInMap(WorldObject const *obj) const
void HandleLootMoneyOpcode(WorldPacket &recvPacket)
void HandleLootMasterGiveOpcode(WorldPacket &recvPacket)
void SendPacket(WorldPacket const *packet)
Send a packet to the client.
Player * GetPlayer() const
void HandleLootOpcode(WorldPacket &recvPacket)
void HandleAutostoreLootItemOpcode(WorldPacket &recvPacket)
void DoLootRelease(ObjectGuid lguid)
void HandleLootReleaseOpcode(WorldPacket &recvPacket)
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
TC_GAME_API Corpse * GetCorpse(WorldObject const &u, ObjectGuid const &guid)
bool HasFlag(ItemFlags flag) const
GuidSet const & GetAllowedLooters() const
bool AllowedForPlayer(Player const *player, bool isGivenByMasterLooter, ObjectGuid ownerGuid) const
void NotifyMoneyRemoved()
ObjectGuid roundRobinPlayer
std::vector< LootItem > items
void RemoveLooter(ObjectGuid GUID)
void NotifyItemRemoved(uint8 lootIndex)
std::vector< LootItem > quest_items
struct GameObjectValue::@188 FishingHole