![]() |
TrinityCore
|
#include <Loot.h>
Public Member Functions | |
| LootItem (LootStoreItem const &li) | |
| LootItem ()=default | |
| LootItem (LootItem const &) | |
| LootItem (LootItem &&) noexcept | |
| LootItem & | operator= (LootItem const &) |
| LootItem & | operator= (LootItem &&) noexcept |
| ~LootItem () | |
| bool | AllowedForPlayer (Player const *player, Loot const *loot) const |
| void | AddAllowedLooter (Player const *player) |
| GuidSet const & | GetAllowedLooters () const |
| bool | HasAllowedLooter (ObjectGuid const &looter) const |
| Optional< LootSlotType > | GetUiTypeForPlayer (Player const *player, Loot const &loot) const |
Static Public Member Functions | |
| static bool | AllowedForPlayer (Player const *player, LootStoreItem const &lootStoreItem, bool strictUsabilityCheck) |
| static bool | ItemAllowedForPlayer (Player const *player, Loot const *loot, uint32 itemid, bool needs_quest, bool follow_loot_rules, bool strictUsabilityCheck, ConditionsReference const &conditions) |
| static bool | CurrencyAllowedForPlayer (Player const *player, uint32 currencyId, bool needs_quest, ConditionsReference const &conditions) |
| static bool | TrackingQuestAllowedForPlayer (Player const *player, uint32 questId, ConditionsReference const &conditions) |
Public Attributes | |
| uint32 | itemid = 0 |
| uint32 | LootListId = 0 |
| ItemRandomBonusListId | randomBonusListId = 0 |
| std::vector< int32 > | BonusListIDs |
| ItemContext | context = ItemContext::NONE |
| ConditionsReference | conditions |
| GuidSet | allowedGUIDs |
| ObjectGuid | rollWinnerGUID |
| uint32 | count = 0 |
| LootItemType | type = LootItemType::Item |
| bool | is_looted: 1 = false |
| bool | is_blocked: 1 = false |
| bool | freeforall: 1 = false |
| bool | is_underthreshold: 1 = false |
| bool | is_counted: 1 = false |
| bool | needs_quest: 1 = false |
| bool | follow_loot_rules: 1 = false |
|
explicit |
Definition at line 43 of file Loot.cpp.
References Currency, LootStoreItem::Currency, follow_loot_rules, freeforall, GenerateItemRandomBonusListId(), ItemTemplate::HasFlag(), Item, LootStoreItem::Item, ITEM_FLAG_MULTI_DROP, ITEM_FLAGS_CU_FOLLOW_LOOT_RULES, itemid, LootStoreItem::needs_quest, randomBonusListId, sObjectMgr, TrackingQuest, LootStoreItem::TrackingQuest, type, and LootStoreItem::type.
|
default |
|
default |
|
defaultnoexcept |
|
default |
| void LootItem::AddAllowedLooter | ( | Player const * | player | ) |
Definition at line 200 of file Loot.cpp.
References allowedGUIDs, and BaseEntity::GetGUID().
Referenced by LootItemStorage::LoadStoredLoot().
Definition at line 76 of file Loot.cpp.
References Currency, Item, and TrackingQuest.
Referenced by LootTemplate::LootGroup::HasDropForPlayer(), LootTemplate::HasDropForPlayer(), LootGroupInvalidSelector::operator()(), LootTemplate::Process(), and LootTemplate::ProcessPersonalLoot().
|
static |
Definition at line 92 of file Loot.cpp.
References ASSERT_NOTNULL, LootStoreItem::conditions, LootStoreItem::Currency, CurrencyAllowedForPlayer(), LootStoreItem::Item, ITEM_FLAGS_CU_FOLLOW_LOOT_RULES, ItemAllowedForPlayer(), LootStoreItem::itemid, LootStoreItem::needs_quest, sObjectMgr, LootStoreItem::TrackingQuest, TrackingQuestAllowedForPlayer(), and LootStoreItem::type.
|
static |
Definition at line 164 of file Loot.cpp.
References ALLIANCE, conditions, CurrencyTypesEntry::GetFlags(), Player::GetTeam(), Player::HasQuestForCurrency(), HORDE, IsAllianceOnly, IsHordeOnly, ConditionsReference::Meets(), needs_quest, and sCurrencyTypesStore.
Referenced by AllowedForPlayer().
|
inline |
Definition at line 217 of file Loot.h.
Referenced by WorldSession::HandleLootMasterGiveOpcode(), Loot::NotifyItemRemoved(), Player::StoreLootItem(), and LootRoll::TryToStart().
| Optional< LootSlotType > LootItem::GetUiTypeForPlayer | ( | Player const * | player, |
| Loot const & | loot | ||
| ) | const |
Definition at line 210 of file Loot.cpp.
References allowedGUIDs, follow_loot_rules, FREE_FOR_ALL, freeforall, BaseEntity::GetGUID(), Loot::GetLootMasterGUID(), Loot::GetLootMethod(), Loot::GetPlayerFFAItems(), GROUP_LOOT, is_blocked, is_looted, is_underthreshold, ObjectGuid::IsEmpty(), LOOT_SLOT_TYPE_ALLOW_LOOT, LOOT_SLOT_TYPE_LOCKED, LOOT_SLOT_TYPE_MASTER, LOOT_SLOT_TYPE_OWNER, LOOT_SLOT_TYPE_ROLL_ONGOING, LootListId, NotNormalLootItem::LootListId, Trinity::Containers::MapGetValuePtr(), MASTER_LOOT, NEED_BEFORE_GREED, needs_quest, PERSONAL_LOOT, rollWinnerGUID, ROUND_ROBIN, and Loot::roundRobinPlayer.
| bool LootItem::HasAllowedLooter | ( | ObjectGuid const & | looter | ) | const |
Definition at line 205 of file Loot.cpp.
References allowedGUIDs.
Referenced by Loot::AutoStore(), WorldSession::HandleLootMasterGiveOpcode(), Player::StoreLootItem(), and LootRoll::TryToStart().
|
static |
Definition at line 110 of file Loot.cpp.
References ALLIANCE, Player::CanRollNeedForItem(), conditions, ItemTemplate::Effects, EQUIP_ERR_OK, follow_loot_rules, BaseEntity::GetGUID(), Loot::GetLootMasterGUID(), Loot::GetLootMethod(), Player::GetQuestStatus(), ItemTemplate::GetRequiredSkill(), ItemTemplate::GetStartQuest(), Player::GetTeam(), ItemTemplate::HasFlag(), Player::HasQuestForItem(), Player::HasSkill(), Player::HasSpell(), HORDE, ItemTemplate::IsArmor(), ItemTemplate::IsUsableByLootSpecialization(), ItemTemplate::IsWeapon(), ITEM_FLAG2_FACTION_ALLIANCE, ITEM_FLAG2_FACTION_HORDE, ITEM_FLAG_HIDE_UNUSABLE_RECIPE, ITEM_FLAGS_CU_IGNORE_QUEST_STATUS, ITEM_SPELLTRIGGER_ON_LEARN, itemid, MASTER_LOOT, ConditionsReference::Meets(), needs_quest, QUEST_STATUS_NONE, and sObjectMgr.
Referenced by AllowedForPlayer().
|
static |
Definition at line 188 of file Loot.cpp.
References conditions, Player::IsQuestCompletedBitSet(), and ConditionsReference::Meets().
Referenced by AllowedForPlayer().
| GuidSet LootItem::allowedGUIDs |
Definition at line 184 of file Loot.h.
Referenced by AddAllowedLooter(), LootRoll::FillPacket(), GetUiTypeForPlayer(), and HasAllowedLooter().
| std::vector<int32> LootItem::BonusListIDs |
Definition at line 181 of file Loot.h.
Referenced by Loot::AddItem(), StoredLootContainer::AddLootItem(), Loot::AutoStore(), WorldSession::HandleLootMasterGiveOpcode(), WorldPackets::Item::ItemInstance::Initialize(), LootItemStorage::LoadStorageFromDB(), and LootItemStorage::LoadStoredLoot().
| ConditionsReference LootItem::conditions |
Definition at line 183 of file Loot.h.
Referenced by LootTemplate::CopyConditions(), CurrencyAllowedForPlayer(), ItemAllowedForPlayer(), and TrackingQuestAllowedForPlayer().
| ItemContext LootItem::context = ItemContext::NONE |
Definition at line 182 of file Loot.h.
Referenced by Loot::AddItem(), StoredLootContainer::AddLootItem(), Loot::AutoStore(), WorldSession::HandleLootMasterGiveOpcode(), WorldPackets::Item::ItemInstance::Initialize(), LootItemStorage::LoadStorageFromDB(), LootItemStorage::LoadStoredLoot(), and Player::StoreLootItem().
| uint32 LootItem::count = 0 |
Definition at line 186 of file Loot.h.
Referenced by npc_commandscript::_IterateNotNormalLootMap(), Loot::AddItem(), StoredLootContainer::AddLootItem(), Loot::AutoStore(), LootRoll::FillPacket(), WorldSession::HandleLootMasterGiveOpcode(), LootItemStorage::LoadStorageFromDB(), LootItemStorage::LoadStoredLoot(), and Player::StoreLootItem().
| bool LootItem::follow_loot_rules |
Definition at line 194 of file Loot.h.
Referenced by StoredLootContainer::AddLootItem(), GetUiTypeForPlayer(), ItemAllowedForPlayer(), LootItemStorage::LoadStorageFromDB(), LootItemStorage::LoadStoredLoot(), and LootItem().
| bool LootItem::freeforall |
Definition at line 190 of file Loot.h.
Referenced by StoredLootContainer::AddLootItem(), Loot::AutoStore(), GetUiTypeForPlayer(), LootItemStorage::LoadStorageFromDB(), LootItemStorage::LoadStoredLoot(), LootItem(), Loot::LootItemInSlot(), and Player::StoreLootItem().
| bool LootItem::is_blocked |
Definition at line 189 of file Loot.h.
Referenced by StoredLootContainer::AddLootItem(), Loot::AutoStore(), LootRoll::Finish(), GetUiTypeForPlayer(), LootItemStorage::LoadStorageFromDB(), LootItemStorage::LoadStoredLoot(), Loot::OnLootOpened(), Player::StoreLootItem(), and LootRoll::TryToStart().
| bool LootItem::is_counted |
Definition at line 192 of file Loot.h.
Referenced by StoredLootContainer::AddLootItem(), LootItemStorage::LoadStorageFromDB(), and LootItemStorage::LoadStoredLoot().
| bool LootItem::is_looted |
Definition at line 188 of file Loot.h.
Referenced by npc_commandscript::_IterateNotNormalLootMap(), Loot::AutoStore(), GetUiTypeForPlayer(), WorldSession::HandleLootMasterGiveOpcode(), Loot::LootItemInSlot(), and Player::StoreLootItem().
| bool LootItem::is_underthreshold |
Definition at line 191 of file Loot.h.
Referenced by StoredLootContainer::AddLootItem(), GetUiTypeForPlayer(), LootItemStorage::LoadStorageFromDB(), LootItemStorage::LoadStoredLoot(), and LootRoll::TryToStart().
| uint32 LootItem::itemid = 0 |
Definition at line 178 of file Loot.h.
Referenced by npc_commandscript::_IterateNotNormalLootMap(), Loot::AddItem(), StoredLootContainer::AddLootItem(), Loot::AutoStore(), LootTemplate::CopyConditions(), LootRoll::Finish(), LootRoll::GetItemDisenchantLootId(), LootRoll::GetItemDisenchantSkillRequired(), WorldSession::HandleLootMasterGiveOpcode(), WorldPackets::Item::ItemInstance::Initialize(), ItemAllowedForPlayer(), LootItemStorage::LoadStorageFromDB(), LootItemStorage::LoadStoredLoot(), LootItem(), LootRoll::SendStartRoll(), Player::StoreLootItem(), and LootRoll::TryToStart().
| uint32 LootItem::LootListId = 0 |
Definition at line 179 of file Loot.h.
Referenced by Loot::AddItem(), StoredLootContainer::AddLootItem(), LootRoll::FillPacket(), LootRoll::Finish(), GetUiTypeForPlayer(), LootRoll::IsLootItem(), LootItemStorage::LoadStorageFromDB(), LootItemStorage::LoadStoredLoot(), and Player::StoreLootItem().
| bool LootItem::needs_quest |
Definition at line 193 of file Loot.h.
Referenced by StoredLootContainer::AddLootItem(), CurrencyAllowedForPlayer(), GetUiTypeForPlayer(), ItemAllowedForPlayer(), LootItemStorage::LoadStorageFromDB(), and LootItemStorage::LoadStoredLoot().
| ItemRandomBonusListId LootItem::randomBonusListId = 0 |
Definition at line 180 of file Loot.h.
Referenced by StoredLootContainer::AddLootItem(), Loot::AutoStore(), WorldSession::HandleLootMasterGiveOpcode(), WorldPackets::Item::ItemInstance::Initialize(), LootItemStorage::LoadStorageFromDB(), LootItemStorage::LoadStoredLoot(), LootItem(), and Player::StoreLootItem().
| ObjectGuid LootItem::rollWinnerGUID |
Definition at line 185 of file Loot.h.
Referenced by Loot::AutoStore(), LootRoll::Finish(), GetUiTypeForPlayer(), and Player::StoreLootItem().
| LootItemType LootItem::type = LootItemType::Item |
Definition at line 187 of file Loot.h.
Referenced by npc_commandscript::_IterateNotNormalLootMap(), StoredLootContainer::AddLootItem(), Loot::AutoStore(), LootTemplate::CopyConditions(), WorldSession::HandleLootMasterGiveOpcode(), LootItemStorage::LoadStorageFromDB(), LootItem(), and Player::StoreLootItem().