![]() |
TrinityCore
|
#include <SpellHistory.h>
Classes | |
| struct | ChargeEntry |
| struct | CooldownEntry |
| struct | PersistenceHelper |
| struct | PersistenceHelper< Pet > |
| struct | PersistenceHelper< Player > |
Public Types | |
| typedef std::chrono::system_clock | Clock |
| typedef std::unordered_map < uint32, CooldownEntry > | CooldownStorageType |
| typedef std::unordered_map < uint32, CooldownEntry * > | CategoryCooldownStorageType |
| typedef std::unordered_map < uint32, std::deque < ChargeEntry > > | ChargeStorageType |
| typedef std::unordered_map < uint32, Clock::time_point > | GlobalCooldownStorageType |
Public Member Functions | |
| SpellHistory (Unit *owner) | |
| template<class OwnerType > | |
| void | LoadFromDB (PreparedQueryResult cooldownsResult, PreparedQueryResult chargesResult) |
| template<class OwnerType > | |
| void | SaveToDB (SQLTransaction &trans) |
| void | Update () |
| void | HandleCooldowns (SpellInfo const *spellInfo, Item const *item, Spell *spell=nullptr) |
| void | HandleCooldowns (SpellInfo const *spellInfo, uint32 itemID, Spell *spell=nullptr) |
| bool | IsReady (SpellInfo const *spellInfo, uint32 itemId=0, bool ignoreCategoryCooldown=false) const |
| template<class PacketType > | |
| void | WritePacket (PacketType *packet) const |
| void | StartCooldown (SpellInfo const *spellInfo, uint32 itemId, Spell *spell=nullptr, bool onHold=false) |
| void | SendCooldownEvent (SpellInfo const *spellInfo, uint32 itemId=0, Spell *spell=nullptr, bool startCooldown=true) |
| template<class Type , class Period > | |
| void | AddCooldown (uint32 spellId, uint32 itemId, std::chrono::duration< Type, Period > cooldownDuration) |
| void | AddCooldown (uint32 spellId, uint32 itemId, Clock::time_point cooldownEnd, uint32 categoryId, Clock::time_point categoryEnd, bool onHold=false) |
| void | ModifyCooldown (uint32 spellId, int32 cooldownModMs) |
| void | ResetCooldown (uint32 spellId, bool update=false) |
| void | ResetCooldown (CooldownStorageType::iterator &itr, bool update=false) |
| template<typename Predicate > | |
| void | ResetCooldowns (Predicate predicate, bool update=false) |
| void | ResetAllCooldowns () |
| bool | HasCooldown (SpellInfo const *spellInfo, uint32 itemId=0, bool ignoreCategoryCooldown=false) const |
| bool | HasCooldown (uint32 spellId, uint32 itemId=0, bool ignoreCategoryCooldown=false) const |
| uint32 | GetRemainingCooldown (SpellInfo const *spellInfo) const |
| void | LockSpellSchool (SpellSchoolMask schoolMask, uint32 lockoutTime) |
| bool | IsSchoolLocked (SpellSchoolMask schoolMask) const |
| bool | ConsumeCharge (SpellCategoryEntry const *chargeCategoryEntry) |
| void | RestoreCharge (SpellCategoryEntry const *chargeCategoryEntry) |
| void | ResetCharges (SpellCategoryEntry const *chargeCategoryEntry) |
| void | ResetAllCharges () |
| bool | HasCharge (SpellCategoryEntry const *chargeCategoryEntry) const |
| int32 | GetMaxCharges (SpellCategoryEntry const *chargeCategoryEntry) const |
| int32 | GetChargeRecoveryTime (SpellCategoryEntry const *chargeCategoryEntry) const |
| bool | HasGlobalCooldown (SpellInfo const *spellInfo) const |
| void | AddGlobalCooldown (SpellInfo const *spellInfo, uint32 duration) |
| void | CancelGlobalCooldown (SpellInfo const *spellInfo) |
| uint16 | GetArenaCooldownsSize () |
| void | SaveCooldownStateBeforeDuel () |
| void | RestoreCooldownStateAfterDuel () |
| template<> | |
| void | WritePacket (WorldPackets::Spells::SendSpellHistory *sendSpellHistory) const |
| template<> | |
| void | WritePacket (WorldPackets::Spells::SendSpellCharges *sendSpellCharges) const |
| template<> | |
| void | WritePacket (WorldPackets::Pet::PetSpells *petSpells) const |
Static Public Attributes | |
| static Clock::duration const | InfinityCooldownDelay = std::chrono::duration_cast<SpellHistory::Clock::duration>(std::chrono::seconds(MONTH)) |
Private Member Functions | |
| Player * | GetPlayerOwner () const |
| void | SendClearCooldowns (std::vector< int32 > const &cooldowns) const |
| CooldownStorageType::iterator | EraseCooldown (CooldownStorageType::iterator itr) |
Static Private Member Functions | |
| static void | GetCooldownDurations (SpellInfo const *spellInfo, uint32 itemId, int32 *cooldown, uint32 *categoryId, int32 *categoryCooldown) |
| typedef std::unordered_map<uint32 , CooldownEntry*> SpellHistory::CategoryCooldownStorageType |
| typedef std::unordered_map<uint32 , std::deque<ChargeEntry> > SpellHistory::ChargeStorageType |
| typedef std::chrono::system_clock SpellHistory::Clock |
| typedef std::unordered_map<uint32 , CooldownEntry> SpellHistory::CooldownStorageType |
| typedef std::unordered_map<uint32 , Clock::time_point> SpellHistory::GlobalCooldownStorageType |
|
inlineexplicit |
|
inline |
Here is the caller graph for this function:| void SpellHistory::AddCooldown | ( | uint32 | spellId, |
| uint32 | itemId, | ||
| Clock::time_point | cooldownEnd, | ||
| uint32 | categoryId, | ||
| Clock::time_point | categoryEnd, | ||
| bool | onHold = false |
||
| ) |
Here is the call graph for this function:| bool SpellHistory::ConsumeCharge | ( | SpellCategoryEntry const * | chargeCategoryEntry | ) |
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
Here is the caller graph for this function:| uint16 SpellHistory::GetArenaCooldownsSize | ( | ) |
| int32 SpellHistory::GetChargeRecoveryTime | ( | SpellCategoryEntry const * | chargeCategoryEntry | ) | const |
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Here is the call graph for this function:
Here is the caller graph for this function:| int32 SpellHistory::GetMaxCharges | ( | SpellCategoryEntry const * | chargeCategoryEntry | ) | const |
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:| void SpellHistory::HandleCooldowns | ( | SpellInfo const * | spellInfo, |
| Item const * | item, | ||
| Spell * | spell = nullptr |
||
| ) |
Here is the call graph for this function:| void SpellHistory::HandleCooldowns | ( | SpellInfo const * | spellInfo, |
| uint32 | itemID, | ||
| Spell * | spell = nullptr |
||
| ) |
Here is the call graph for this function:| bool SpellHistory::HasCharge | ( | SpellCategoryEntry const * | chargeCategoryEntry | ) | const |
Here is the call graph for this function:
Here is the caller graph for this function:| bool SpellHistory::HasCooldown | ( | SpellInfo const * | spellInfo, |
| uint32 | itemId = 0, |
||
| bool | ignoreCategoryCooldown = false |
||
| ) | const |
Here is the call graph for this function:
Here is the caller graph for this function:| bool SpellHistory::HasCooldown | ( | uint32 | spellId, |
| uint32 | itemId = 0, |
||
| bool | ignoreCategoryCooldown = false |
||
| ) | const |
Here is the call graph for this function:
Here is the caller graph for this function:| bool SpellHistory::IsReady | ( | SpellInfo const * | spellInfo, |
| uint32 | itemId = 0, |
||
| bool | ignoreCategoryCooldown = false |
||
| ) | const |
Here is the call graph for this function:
Here is the caller graph for this function:| bool SpellHistory::IsSchoolLocked | ( | SpellSchoolMask | schoolMask | ) | const |
Here is the caller graph for this function:| template void SpellHistory::LoadFromDB< Pet > | ( | PreparedQueryResult | cooldownsResult, |
| PreparedQueryResult | chargesResult | ||
| ) |
Here is the caller graph for this function:| void SpellHistory::LockSpellSchool | ( | SpellSchoolMask | schoolMask, |
| uint32 | lockoutTime | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:| void SpellHistory::ResetAllCharges | ( | ) |
Here is the call graph for this function:| void SpellHistory::ResetAllCooldowns | ( | ) |
Here is the call graph for this function:| void SpellHistory::ResetCharges | ( | SpellCategoryEntry const * | chargeCategoryEntry | ) |
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:
|
inline |
Here is the caller graph for this function:| void SpellHistory::RestoreCharge | ( | SpellCategoryEntry const * | chargeCategoryEntry | ) |
Here is the call graph for this function:| void SpellHistory::RestoreCooldownStateAfterDuel | ( | ) |
Here is the call graph for this function:| void SpellHistory::SaveCooldownStateBeforeDuel | ( | ) |
| template void SpellHistory::SaveToDB< Pet > | ( | SQLTransaction & | trans | ) |
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:| void SpellHistory::SendCooldownEvent | ( | SpellInfo const * | spellInfo, |
| uint32 | itemId = 0, |
||
| Spell * | spell = nullptr, |
||
| bool | startCooldown = true |
||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| void SpellHistory::StartCooldown | ( | SpellInfo const * | spellInfo, |
| uint32 | itemId, | ||
| Spell * | spell = nullptr, |
||
| bool | onHold = false |
||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| void SpellHistory::Update | ( | ) |
Here is the call graph for this function:
Here is the caller graph for this function:| void SpellHistory::WritePacket | ( | PacketType * | packet | ) | const |
| void SpellHistory::WritePacket | ( | WorldPackets::Spells::SendSpellHistory * | sendSpellHistory | ) | const |
Here is the call graph for this function:| void SpellHistory::WritePacket | ( | WorldPackets::Spells::SendSpellCharges * | sendSpellCharges | ) | const |
Here is the call graph for this function:| void SpellHistory::WritePacket | ( | WorldPackets::Pet::PetSpells * | petSpells | ) | const |
Here is the call graph for this function:
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
static |
1.8.8