![]() |
AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "LootMgr.h"
Public Member Functions | |
| QuestItemMap const & | GetPlayerQuestItems () const |
| QuestItemMap const & | GetPlayerFFAItems () const |
| QuestItemMap const & | GetPlayerNonQuestNonFFAConditionalItems () const |
| Loot (uint32 _gold=0) | |
| ~Loot () | |
| void | addLootValidatorRef (LootValidatorRef *pLootValidatorRef) |
| void | clear () |
| bool | empty () const |
| bool | isLooted () const |
| void | NotifyItemRemoved (uint8 lootIndex) |
| void | NotifyQuestItemRemoved (uint8 questIndex) |
| void | NotifyMoneyRemoved () |
| void | AddLooter (ObjectGuid GUID) |
| void | RemoveLooter (ObjectGuid GUID) |
| void | generateMoneyLoot (uint32 minAmount, uint32 maxAmount) |
| bool | FillLoot (uint32 lootId, LootStore const &store, Player *lootOwner, bool personal, bool noEmptyError=false, uint16 lootMode=LOOT_MODE_DEFAULT, WorldObject *lootSource=nullptr) |
| void | AddItem (LootStoreItem const &item) |
| LootItem * | LootItemInSlot (uint32 lootslot, Player *player, QuestItem **qitem=nullptr, QuestItem **ffaitem=nullptr, QuestItem **conditem=nullptr) |
| uint32 | GetMaxSlotInLootFor (Player *player) const |
| bool | hasItemForAll () const |
| bool | hasItemFor (Player *player) const |
| bool | hasOverThresholdItem () const |
| void | FillNotNormalLootFor (Player *player) |
Public Attributes | |
| std::vector< LootItem > | items |
| std::vector< LootItem > | quest_items |
| uint32 | gold |
| uint8 | unlootedCount {0} |
| ObjectGuid | roundRobinPlayer |
| ObjectGuid | lootOwnerGUID |
| LootType | loot_type {LOOT_NONE} |
| ObjectGuid | containerGUID |
| ObjectGuid | sourceWorldObjectGUID |
| GameObject * | sourceGameObject {nullptr} |
Private Types | |
| typedef GuidSet | PlayersLootingSet |
Private Member Functions | |
| QuestItemList * | FillFFALoot (Player *player) |
| QuestItemList * | FillQuestLoot (Player *player) |
| QuestItemList * | FillNonQuestNonFFAConditionalLoot (Player *player) |
Friends | |
| ByteBuffer & | operator<< (ByteBuffer &b, LootView const &lv) |
|
private |
| void Loot::AddItem | ( | LootStoreItem const & | item | ) |
References LootItem::AllowedForPlayer(), LootStoreItem::conditions, LootItem::count, ObjectAccessor::FindPlayer(), Player::GetGroup(), ItemTemplate::GetMaxStackSize(), ItemTemplate::HasFlag(), ITEM_FLAG_MULTI_DROP, LootStoreItem::itemid, LootItem::itemIndex, items, LOG_DEBUG, lootOwnerGUID, MAX_NR_LOOT_ITEMS, MAX_NR_QUEST_ITEMS, LootStoreItem::maxcount, LootStoreItem::mincount, LootStoreItem::needs_quest, quest_items, sObjectMgr, sourceWorldObjectGUID, unlootedCount, and urand().
Referenced by LootTemplate::Process(), and LootTemplate::LootGroup::Process().
|
inline |
|
inline |
References i_LootValidatorRefMgr, and LinkedListHead::insertFirst().
Referenced by Roll::targetObjectBuildLink().
|
inline |
References ObjectGuid::Clear(), RefMgr< TO, FROM >::clearReferences(), gold, i_LootValidatorRefMgr, items, LOOT_NONE, loot_type, PlayerFFAItems, PlayerNonQuestNonFFAConditionalItems, PlayerQuestItems, PlayersLooting, quest_items, roundRobinPlayer, and unlootedCount.
Referenced by NPCStaveQuestAI::ClearLootIfUnfair(), boss_high_king_maulgar::DoAction(), WorldSession::DoLootRelease(), GameObject::GetFishLoot(), Unit::Kill(), Creature::RemoveCorpse(), Creature::Respawn(), Player::SendLoot(), boss_priestess_delrissa::SummonedCreatureDies(), GameObject::Update(), and ~Loot().
|
inline |
|
private |
References LootItem::AllowedForPlayer(), containerGUID, LootItem::freeforall, Object::GetGUID(), LootItem::is_looted, items, PlayerFFAItems, and unlootedCount.
Referenced by FillNotNormalLootFor().
| bool Loot::FillLoot | ( | uint32 | lootId, |
| LootStore const & | store, | ||
| Player * | lootOwner, | ||
| bool | personal, | ||
| bool | noEmptyError = false, |
||
| uint16 | lootMode = LOOT_MODE_DEFAULT, |
||
| WorldObject * | lootSource = nullptr |
||
| ) |
References FillNotNormalLootFor(), Group::GetFirstMember(), Player::GetGroup(), Object::GetGUID(), LootStore::GetLootFor(), Group::GetLootThreshold(), LootStore::GetName(), Player::IsAtLootRewardDistance(), items, LOG_ERROR, lootOwnerGUID, MAX_NR_LOOT_ITEMS, MAX_NR_QUEST_ITEMS, LootTemplate::Process(), quest_items, roundRobinPlayer, sObjectMgr, and sScriptMgr.
Referenced by Player::AutoStoreLoot(), Group::CountTheRoll(), boss_high_king_maulgar::DoAction(), GameObject::GetFishLoot(), Unit::Kill(), MailDraft::prepareItems(), Player::SendLoot(), and boss_priestess_delrissa::SummonedCreatureDies().
|
private |
References LootItem::AddAllowedLooter(), LootItem::AllowedForPlayer(), LootItem::conditions, LootItem::freeforall, Object::GetGUID(), LootItem::is_counted, LootItem::is_looted, items, PlayerNonQuestNonFFAConditionalItems, sourceWorldObjectGUID, and unlootedCount.
Referenced by FillNotNormalLootFor().
| void Loot::FillNotNormalLootFor | ( | Player * | player | ) |
References LootItem::AllowedForPlayer(), FillFFALoot(), FillNonQuestNonFFAConditionalLoot(), FillQuestLoot(), LootItem::freeforall, Object::GetGUID(), GetMaxSlotInLootFor(), LootItem::is_looted, LootItem::itemid, items, PlayerFFAItems, PlayerNonQuestNonFFAConditionalItems, PlayerQuestItems, quest_items, sObjectMgr, sourceWorldObjectGUID, and Player::StoreLootItem().
Referenced by FillLoot(), and LootItemStorage::LoadStoredLoot().
|
private |
References LootItem::AllowedForPlayer(), ObjectAccessor::FindPlayer(), LootItem::freeforall, Object::GetGUID(), LootItem::is_blocked, items, MAX_NR_LOOT_ITEMS, PlayerQuestItems, quest_items, roundRobinPlayer, sourceWorldObjectGUID, sScriptMgr, and unlootedCount.
Referenced by FillNotNormalLootFor().
References gold, RATE_DROP_MONEY, sWorld, and urand().
Referenced by Unit::Kill(), and Player::SendLoot().
References Object::GetGUID(), items, and PlayerQuestItems.
Referenced by Player::AutoStoreLoot(), Group::CountTheRoll(), FillNotNormalLootFor(), and MailDraft::prepareItems().
|
inline |
|
inline |
|
inline |
| bool Loot::hasItemFor | ( | Player * | player | ) | const |
References Object::GetGUID(), GetPlayerFFAItems(), GetPlayerNonQuestNonFFAConditionalItems(), GetPlayerQuestItems(), LootItem::is_looted, items, and quest_items.
Referenced by Player::isAllowedToLoot().
| bool Loot::hasItemForAll | ( | ) | const |
Referenced by Player::isAllowedToLoot().
| bool Loot::hasOverThresholdItem | ( | ) | const |
References items.
Referenced by Player::isAllowedToLoot(), and Group::SendLooter().
|
inline |
References gold, and unlootedCount.
Referenced by LootItemStorage::AddNewStoredLoot(), Spell::CheckCast(), Group::CountTheRoll(), WorldSession::DoLootRelease(), GameObject::GetFishLoot(), WorldSession::HandleAutostoreLootItemOpcode(), gobject_commandscript::HandleGameObjectInfoCommand(), WorldSession::HandleLootMoneyOpcode(), Player::isAllowedToLoot(), Unit::Kill(), and Player::SendLoot().
| LootItem * Loot::LootItemInSlot | ( | uint32 | lootslot, |
| Player * | player, | ||
| QuestItem ** | qitem = nullptr, |
||
| QuestItem ** | ffaitem = nullptr, |
||
| QuestItem ** | conditem = nullptr |
||
| ) |
References LootItem::AllowedForPlayer(), LootItem::conditions, LootItem::follow_loot_rules, LootItem::freeforall, Object::GetGUID(), QuestItem::index, LootItem::is_looted, QuestItem::is_looted, items, PlayerFFAItems, PlayerNonQuestNonFFAConditionalItems, PlayerQuestItems, quest_items, and sourceWorldObjectGUID.
Referenced by Player::AutoStoreLoot(), Group::CountTheRoll(), MailDraft::prepareItems(), and Player::StoreLootItem().
| void Loot::NotifyItemRemoved | ( | uint8 | lootIndex | ) |
References ObjectAccessor::FindPlayer(), PlayersLooting, and Player::SendNotifyLootItemRemoved().
Referenced by Group::CountTheRoll(), WorldSession::HandleAutostoreLootItemOpcode(), WorldSession::HandleLootMasterGiveOpcode(), and Player::StoreLootItem().
| void Loot::NotifyMoneyRemoved | ( | ) |
References ObjectAccessor::FindPlayer(), PlayersLooting, and Player::SendNotifyLootMoneyRemoved().
Referenced by WorldSession::HandleLootMoneyOpcode().
| void Loot::NotifyQuestItemRemoved | ( | uint8 | questIndex | ) |
References ObjectAccessor::FindPlayer(), Object::GetGUID(), items, PlayerQuestItems, PlayersLooting, and Player::SendNotifyLootItemRemoved().
Referenced by Player::StoreLootItem().
|
inline |
References PlayersLooting.
Referenced by WorldSession::DoLootRelease().
|
friend |
| ObjectGuid Loot::containerGUID |
| uint32 Loot::gold |
|
private |
Referenced by addLootValidatorRef(), and clear().
| std::vector<LootItem> Loot::items |
Referenced by AddItem(), LootItemStorage::AddNewStoredLoot(), clear(), Group::CountRollVote(), Group::CountTheRoll(), empty(), FillFFALoot(), FillLoot(), FillNonQuestNonFFAConditionalLoot(), FillNotNormalLootFor(), FillQuestLoot(), GetMaxSlotInLootFor(), Group::GroupLoot(), WorldSession::HandleLootMasterGiveOpcode(), hasItemFor(), hasItemForAll(), hasOverThresholdItem(), LootItemStorage::LoadStoredLoot(), LootItemInSlot(), Group::MasterLoot(), Group::NeedBeforeGreed(), NotifyQuestItemRemoved(), and LootGroupInvalidSelector::operator()().
| ObjectGuid Loot::lootOwnerGUID |
Referenced by AddItem(), and FillLoot().
|
private |
Referenced by clear(), FillFFALoot(), FillNotNormalLootFor(), GetPlayerFFAItems(), and LootItemInSlot().
|
private |
|
private |
|
private |
Referenced by AddLooter(), clear(), NotifyItemRemoved(), NotifyMoneyRemoved(), NotifyQuestItemRemoved(), and RemoveLooter().
| std::vector<LootItem> Loot::quest_items |
| ObjectGuid Loot::roundRobinPlayer |
Referenced by clear(), WorldSession::DoLootRelease(), FillLoot(), FillQuestLoot(), Player::isAllowedToLoot(), and Player::StoreLootItem().
| GameObject* Loot::sourceGameObject {nullptr} |
Referenced by GameObject::GameObject().
| ObjectGuid Loot::sourceWorldObjectGUID |
| uint8 Loot::unlootedCount {0} |
Referenced by AddItem(), clear(), Group::CountTheRoll(), FillFFALoot(), FillNonQuestNonFFAConditionalLoot(), FillQuestLoot(), WorldSession::HandleAutostoreLootItemOpcode(), WorldSession::HandleLootMasterGiveOpcode(), isLooted(), LootItemStorage::LoadStoredLoot(), LootItemStorage::RemoveStoredLootItem(), LootItemStorage::RemoveStoredLootMoney(), Player::SendLoot(), and Player::StoreLootItem().