![]() |
TrinityCore
|
#include "ItemEnchantmentMgr.h"#include "DatabaseEnv.h"#include "Log.h"#include "ObjectMgr.h"#include "Util.h"#include "DBCStores.h"#include "Random.h"#include "Timer.h"#include <list>#include <vector>#include <stdlib.h>
Include dependency graph for ItemEnchantmentMgr.cpp:Go to the source code of this file.
Classes | |
| struct | EnchStoreItem |
Typedefs | |
| typedef std::vector< EnchStoreItem > | EnchStoreList |
| typedef std::unordered_map< uint32, EnchStoreList > | EnchantmentStore |
Functions | |
| void | LoadRandomEnchantmentsTable () |
| uint32 | GetItemEnchantMod (int32 entry) |
| int32 | GenerateItemRandomPropertyId (uint32 item_id) |
| uint32 | GenerateEnchSuffixFactor (uint32 item_id) |
| uint32 | GetRandomPropertyPoints (uint32 itemLevel, uint32 quality, uint32 inventoryType) |
Variables | |
| static EnchantmentStore | RandomItemEnch |
| typedef std::unordered_map<uint32, EnchStoreList> EnchantmentStore |
Definition at line 44 of file ItemEnchantmentMgr.cpp.
| typedef std::vector<EnchStoreItem> EnchStoreList |
Definition at line 43 of file ItemEnchantmentMgr.cpp.
Definition at line 168 of file ItemEnchantmentMgr.cpp.
References ItemTemplate::GetBaseItemLevel(), ItemTemplate::GetInventoryType(), ItemTemplate::GetQuality(), GetRandomPropertyPoints(), ItemTemplate::GetRandomSuffix(), and sObjectMgr.
Referenced by LootItem::LootItem(), and Item::UpdateItemSuffixFactor().
Definition at line 122 of file ItemEnchantmentMgr.cpp.
References ItemTemplate::GetId(), GetItemEnchantMod(), ItemTemplate::GetRandomProperty(), ItemTemplate::GetRandomSuffix(), ItemRandomPropertiesEntry::ID, ItemRandomSuffixEntry::ID, sItemRandomPropertiesStore, sItemRandomSuffixStore, sObjectMgr, and TC_LOG_ERROR.
Referenced by Player::AddItem(), AuctionBotSeller::AddNewAuctions(), Spell::DoCreateItem(), misc_commandscript::HandleAddItemCommand(), misc_commandscript::HandleAddItemToCommand(), LootItem::LootItem(), item_mysterious_egg::OnExpire(), item_disgusting_jar::OnExpire(), Player::RewardQuest(), and Player::StoreNewItemInBestSlots().
Definition at line 81 of file ItemEnchantmentMgr.cpp.
References irand(), rand_chance(), RandomItemEnch, and TC_LOG_ERROR.
Referenced by GenerateItemRandomPropertyId(), and ObjectMgr::LoadItemTemplates().
Definition at line 180 of file ItemEnchantmentMgr.cpp.
References RandPropPointsEntry::Epic, RandPropPointsEntry::Good, INVTYPE_2HWEAPON, INVTYPE_BODY, INVTYPE_CHEST, INVTYPE_CLOAK, INVTYPE_FEET, INVTYPE_FINGER, INVTYPE_HANDS, INVTYPE_HEAD, INVTYPE_HOLDABLE, INVTYPE_LEGS, INVTYPE_NECK, INVTYPE_RANGED, INVTYPE_RANGEDRIGHT, INVTYPE_ROBE, INVTYPE_SHIELD, INVTYPE_SHOULDERS, INVTYPE_THROWN, INVTYPE_TRINKET, INVTYPE_WAIST, INVTYPE_WEAPON, INVTYPE_WEAPONMAINHAND, INVTYPE_WEAPONOFFHAND, INVTYPE_WRISTS, ITEM_QUALITY_EPIC, ITEM_QUALITY_RARE, ITEM_QUALITY_UNCOMMON, sRandPropPointsStore, and RandPropPointsEntry::Superior.
Referenced by GenerateEnchSuffixFactor().
| void LoadRandomEnchantmentsTable | ( | ) |
Definition at line 48 of file ItemEnchantmentMgr.cpp.
References Field::GetFloat(), getMSTime(), GetMSTimeDiffToNow(), Field::GetUInt32(), RandomItemEnch, TC_LOG_INFO, and WorldDatabase.
Referenced by reload_commandscript::HandleReloadItemEnchantementsCommand(), and World::SetInitialWorldSettings().
|
static |
Definition at line 46 of file ItemEnchantmentMgr.cpp.
Referenced by GetItemEnchantMod(), and LoadRandomEnchantmentsTable().