![]() |
TrinityCore
|
#include <Loot.h>
Public Attributes | |
| std::vector< LootItem > | items |
| std::vector< LootItem > | quest_items |
| uint32 | gold |
| uint8 | unlootedCount |
| ObjectGuid | roundRobinPlayer |
| ObjectGuid | lootOwnerGUID |
| LootType | loot_type |
| uint8 | maxDuplicates |
| uint32 | containerID |
Private Member Functions | |
| void | FillNotNormalLootFor (Player *player, bool presentAtLooting) |
| NotNormalLootItemList * | FillFFALoot (Player *player) |
| NotNormalLootItemList * | FillQuestLoot (Player *player) |
| NotNormalLootItemList * | FillNonQuestNonFFAConditionalLoot (Player *player, bool presentAtLooting) |
| void Loot::AddItem | ( | LootStoreItem const & | item | ) |
Definition at line 174 of file Loot.cpp.
References LootItem::AllowedForPlayer(), LootStoreItem::conditions, LootItem::count, ObjectAccessor::FindPlayer(), ItemTemplate::GetMaxStackSize(), ItemTemplate::HasFlag(), ITEM_FLAG_MULTI_DROP, LootStoreItem::itemid, LootItem::itemIndex, items, lootOwnerGUID, MAX_NR_LOOT_ITEMS, MAX_NR_QUEST_ITEMS, LootStoreItem::maxcount, LootStoreItem::mincount, LootStoreItem::needs_quest, quest_items, sObjectMgr, unlootedCount, and urand().
Referenced by LootTemplate::Process(), and LootTemplate::LootGroup::Process().
|
inline |
Definition at line 261 of file Loot.h.
Referenced by Player::SendLoot().
|
inline |
Definition at line 248 of file Loot.h.
Referenced by Roll::targetObjectBuildLink().
| void Loot::BuildLootResponse | ( | WorldPackets::Loot::LootResponse & | packet, |
| Player const * | viewer, | ||
| PermissionTypes | permission | ||
| ) | const |
Definition at line 629 of file Loot.cpp.
References ALL_PERMISSION, WorldPackets::Loot::LootResponse::Coins, FillLootItemData(), LootItem::follow_loot_rules, Player::GetGroup(), Object::GetGUID(), Group::GetMasterLooterGuid(), GetPlayerFFAItems(), GetPlayerNonQuestNonFFAConditionalItems(), GetPlayerQuestItems(), gold, GROUP_PERMISSION, LootItem::is_blocked, LootItem::is_looted, ObjectGuid::IsEmpty(), items, WorldPackets::Loot::LootResponse::Items, LOOT_SLOT_TYPE_ALLOW_LOOT, LOOT_SLOT_TYPE_LOCKED, LOOT_SLOT_TYPE_MASTER, LOOT_SLOT_TYPE_OWNER, LOOT_SLOT_TYPE_ROLL_ONGOING, MASTER_PERMISSION, NONE_PERMISSION, OWNER_PERMISSION, quest_items, RESTRICTED_PERMISSION, ROUND_ROBIN_PERMISSION, and roundRobinPlayer.
Referenced by Player::SendLoot().
| void Loot::clear | ( | ) |
Definition at line 149 of file Loot.cpp.
References ObjectGuid::Clear(), RefManager< TO, FROM >::clearReferences(), gold, i_LootValidatorRefManager, items, LOOT_NONE, loot_type, PlayerFFAItems, PlayerNonQuestNonFFAConditionalItems, PlayerQuestItems, PlayersLooting, quest_items, roundRobinPlayer, and unlootedCount.
Referenced by WorldSession::DoLootRelease(), GameObject::getFishLoot(), GameObject::getFishLootJunk(), Unit::Kill(), Creature::RemoveCorpse(), Creature::Respawn(), Player::SendLoot(), GameObject::Update(), and ~Loot().
|
inline |
Definition at line 255 of file Loot.h.
Referenced by GameObject::getFishLoot(), GameObject::getFishLootJunk(), npc_commandscript::HandleNpcShowLootCommand(), Unit::Kill(), and Player::SendLoot().
|
private |
Definition at line 306 of file Loot.cpp.
References LootItem::AllowedForPlayer(), LootItem::freeforall, Object::GetGUID(), LootItem::is_looted, items, lootOwnerGUID, 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 |
||
| ) |
Definition at line 221 of file Loot.cpp.
References FillNotNormalLootFor(), Group::GetFirstMember(), Player::GetGroup(), Object::GetGUID(), LootStore::GetLootFor(), Group::GetLootThreshold(), LootStore::GetName(), LootStore::IsRatesAllowed(), items, lootOwnerGUID, MAX_NR_LOOT_ITEMS, MAX_NR_QUEST_ITEMS, LootTemplate::Process(), quest_items, roundRobinPlayer, sObjectMgr, and TC_LOG_ERROR.
Referenced by Player::AutoStoreLoot(), Group::CountTheRoll(), GameObject::getFishLoot(), GameObject::getFishLootJunk(), Unit::Kill(), MailDraft::prepareItems(), and Player::SendLoot().
|
private |
Definition at line 367 of file Loot.cpp.
References LootItem::AddAllowedLooter(), LootItem::AllowedForPlayer(), LootItem::conditions, LootItem::freeforall, Object::GetGUID(), LootItem::is_counted, LootItem::is_looted, items, lootOwnerGUID, PlayerNonQuestNonFFAConditionalItems, and unlootedCount.
Referenced by FillNotNormalLootFor().
|
private |
Definition at line 268 of file Loot.cpp.
References LootItem::AllowedForPlayer(), FillFFALoot(), FillNonQuestNonFFAConditionalLoot(), FillQuestLoot(), LootItem::freeforall, Object::GetGUID(), GetMaxSlotInLootFor(), LootItem::is_looted, LootItem::itemid, items, lootOwnerGUID, PlayerFFAItems, PlayerNonQuestNonFFAConditionalItems, PlayerQuestItems, quest_items, sObjectMgr, and Player::StoreLootItem().
Referenced by FillLoot().
|
private |
Definition at line 329 of file Loot.cpp.
References LootItem::AllowedForPlayer(), LootItem::follow_loot_rules, LootItem::freeforall, Player::GetGroup(), Object::GetGUID(), Group::GetLootMethod(), Group::GetMasterLooterGuid(), GROUP_LOOT, LootItem::is_blocked, LootItem::is_looted, items, lootOwnerGUID, MASTER_LOOT, MAX_NR_LOOT_ITEMS, PlayerQuestItems, quest_items, ROUND_ROBIN, and unlootedCount.
Referenced by FillNotNormalLootFor().
Definition at line 466 of file Loot.cpp.
References gold, RATE_DROP_MONEY, sWorld, and urand().
Referenced by Unit::Kill(), and Player::SendLoot().
Definition at line 542 of file Loot.cpp.
References Object::GetGUID(), items, and PlayerQuestItems.
Referenced by Player::AutoStoreLoot(), Group::CountTheRoll(), FillNotNormalLootFor(), and MailDraft::prepareItems().
|
inline |
Definition at line 228 of file Loot.h.
Referenced by BuildLootResponse(), npc_commandscript::HandleNpcShowLootCommand(), and hasItemFor().
|
inline |
Definition at line 229 of file Loot.h.
Referenced by BuildLootResponse(), npc_commandscript::HandleNpcShowLootCommand(), and hasItemFor().
|
inline |
Definition at line 227 of file Loot.h.
Referenced by BuildLootResponse(), npc_commandscript::HandleNpcShowLootCommand(), hasItemFor(), and Player::StoreLootItem().
| bool Loot::hasItemFor | ( | Player const * | player | ) | const |
Definition at line 562 of file Loot.cpp.
References Object::GetGUID(), GetPlayerFFAItems(), GetPlayerNonQuestNonFFAConditionalItems(), GetPlayerQuestItems(), LootItem::is_looted, items, and quest_items.
Referenced by Player::isAllowedToLoot().
| bool Loot::hasItemForAll | ( | ) | const |
Definition at line 549 of file Loot.cpp.
Referenced by Player::isAllowedToLoot().
| bool Loot::hasOverThresholdItem | ( | ) | const |
Definition at line 607 of file Loot.cpp.
References items.
Referenced by Player::isAllowedToLoot(), and Group::SendLooter().
|
inline |
Definition at line 256 of file Loot.h.
Referenced by LootItemStorage::AddNewStoredLoot(), Spell::CheckCast(), Item::DeleteFromDB(), WorldSession::DoLootRelease(), WorldSession::HandleAutostoreLootItemOpcode(), WorldSession::HandleLootMoneyOpcode(), Player::isAllowedToLoot(), Unit::Kill(), Item::SaveToDB(), and Player::SendLoot().
| LootItem * Loot::LootItemInSlot | ( | uint32 | lootslot, |
| Player * | player, | ||
| NotNormalLootItem ** | qitem = nullptr, |
||
| NotNormalLootItem ** | ffaitem = nullptr, |
||
| NotNormalLootItem ** | conditem = nullptr |
||
| ) |
Definition at line 479 of file Loot.cpp.
References LootItem::conditions, LootItem::freeforall, Object::GetGUID(), NotNormalLootItem::index, LootItem::is_looted, NotNormalLootItem::is_looted, items, PlayerFFAItems, PlayerNonQuestNonFFAConditionalItems, PlayerQuestItems, and quest_items.
Referenced by Player::AutoStoreLoot(), Group::CountTheRoll(), MailDraft::prepareItems(), and Player::StoreLootItem().
| void Loot::NotifyItemRemoved | ( | uint8 | lootIndex | ) |
Definition at line 401 of file Loot.cpp.
References ObjectAccessor::FindPlayer(), and PlayersLooting.
Referenced by Group::CountTheRoll(), WorldSession::HandleLootMasterGiveOpcode(), and Player::StoreLootItem().
| void Loot::NotifyMoneyRemoved | ( | ) |
Definition at line 417 of file Loot.cpp.
References ObjectAccessor::FindPlayer(), and PlayersLooting.
Referenced by WorldSession::HandleLootMoneyOpcode().
| void Loot::NotifyQuestItemRemoved | ( | uint8 | questIndex | ) |
Definition at line 432 of file Loot.cpp.
References ObjectAccessor::FindPlayer(), items, PlayerQuestItems, and PlayersLooting.
Referenced by Player::StoreLootItem().
|
inline |
Definition at line 262 of file Loot.h.
Referenced by WorldSession::DoLootRelease().
| uint32 Loot::containerID |
Definition at line 242 of file Loot.h.
Referenced by LootItemStorage::AddNewStoredLoot(), WorldSession::HandleLootMoneyOpcode(), LootItemStorage::LoadStoredLoot(), Player::SendLoot(), and Player::StoreLootItem().
| uint32 Loot::gold |
Definition at line 233 of file Loot.h.
Referenced by LootItemStorage::AddNewStoredLoot(), BuildLootResponse(), clear(), generateMoneyLoot(), WorldSession::HandleLootMoneyOpcode(), npc_commandscript::HandleNpcShowLootCommand(), hasItemForAll(), LootItemStorage::LoadStoredLoot(), Player::RemovedInsignia(), and Player::SendLoot().
|
private |
| std::vector<LootItem> Loot::items |
Definition at line 231 of file Loot.h.
Referenced by AddItem(), LootItemStorage::AddNewStoredLoot(), BuildLootResponse(), clear(), Group::CountRollVote(), Group::CountTheRoll(), FillFFALoot(), FillLoot(), FillNonQuestNonFFAConditionalLoot(), FillNotNormalLootFor(), FillQuestLoot(), GetMaxSlotInLootFor(), Group::GroupLoot(), WorldSession::HandleLootMasterGiveOpcode(), npc_commandscript::HandleNpcShowLootCommand(), hasItemFor(), hasItemForAll(), hasOverThresholdItem(), LootItemStorage::LoadStoredLoot(), LootItemInSlot(), Group::MasterLoot(), Group::NeedBeforeGreed(), NotifyQuestItemRemoved(), and LootGroupInvalidSelector::operator()().
| LootType Loot::loot_type |
Definition at line 237 of file Loot.h.
Referenced by Creature::AllLootRemovedFromCorpse(), clear(), WorldSession::DoLootRelease(), WorldSession::HandleAutostoreLootItemOpcode(), WorldSession::HandleLootMasterGiveOpcode(), WorldSession::HandleLootMoneyOpcode(), Player::isAllowedToLoot(), Player::SendLoot(), and Player::StoreLootItem().
| ObjectGuid Loot::lootOwnerGUID |
Definition at line 236 of file Loot.h.
Referenced by AddItem(), LootItemStorage::AddNewStoredLoot(), FillFFALoot(), FillLoot(), FillNonQuestNonFFAConditionalLoot(), FillNotNormalLootFor(), and FillQuestLoot().
| uint8 Loot::maxDuplicates |
Definition at line 238 of file Loot.h.
Referenced by GameObject::Create(), Creature::InitEntry(), and LootGroupInvalidSelector::operator()().
|
private |
Definition at line 287 of file Loot.h.
Referenced by clear(), FillFFALoot(), FillNotNormalLootFor(), and LootItemInSlot().
|
private |
Definition at line 288 of file Loot.h.
Referenced by clear(), FillNonQuestNonFFAConditionalLoot(), FillNotNormalLootFor(), and LootItemInSlot().
|
private |
Definition at line 286 of file Loot.h.
Referenced by clear(), FillNotNormalLootFor(), FillQuestLoot(), GetMaxSlotInLootFor(), LootItemInSlot(), and NotifyQuestItemRemoved().
|
private |
Definition at line 285 of file Loot.h.
Referenced by clear(), NotifyItemRemoved(), NotifyMoneyRemoved(), and NotifyQuestItemRemoved().
| std::vector<LootItem> Loot::quest_items |
Definition at line 232 of file Loot.h.
Referenced by AddItem(), BuildLootResponse(), clear(), Group::CountTheRoll(), FillLoot(), FillNotNormalLootFor(), FillQuestLoot(), Group::GroupLoot(), WorldSession::HandleLootMasterGiveOpcode(), npc_commandscript::HandleNpcShowLootCommand(), hasItemFor(), LootItemInSlot(), Group::MasterLoot(), and Group::NeedBeforeGreed().
| ObjectGuid Loot::roundRobinPlayer |
Definition at line 235 of file Loot.h.
Referenced by BuildLootResponse(), clear(), WorldSession::DoLootRelease(), FillLoot(), and Player::isAllowedToLoot().
| uint8 Loot::unlootedCount |
Definition at line 234 of file Loot.h.
Referenced by AddItem(), clear(), Group::CountTheRoll(), FillFFALoot(), FillNonQuestNonFFAConditionalLoot(), FillQuestLoot(), WorldSession::HandleLootMasterGiveOpcode(), LootItemStorage::LoadStoredLoot(), Player::SendLoot(), and Player::StoreLootItem().