35#include <boost/container/small_vector.hpp>
53 cooldownEntry->
SpellId = *spellId;
54 cooldownEntry->
CooldownEnd = time_point_cast<Duration>(Clock::from_time_t(fields[2].GetInt64()));
57 cooldownEntry->
CategoryEnd = time_point_cast<Duration>(Clock::from_time_t(fields[4].GetInt64()));
67 chargeEntry->
RechargeStart = time_point_cast<Duration>(Clock::from_time_t(fields[1].GetInt64()));
68 chargeEntry->
RechargeEnd = time_point_cast<Duration>(Clock::from_time_t(fields[2].GetInt64()));
105 cooldownEntry->
SpellId = *spellId;
106 cooldownEntry->
CooldownEnd = time_point_cast<Duration>(Clock::from_time_t(fields[1].GetInt64()));
107 cooldownEntry->
ItemId = 0;
109 cooldownEntry->
CategoryEnd = time_point_cast<Duration>(Clock::from_time_t(fields[3].GetInt64()));
119 chargeEntry->
RechargeStart = time_point_cast<Duration>(Clock::from_time_t(fields[1].GetInt64()));
120 chargeEntry->
RechargeEnd = time_point_cast<Duration>(Clock::from_time_t(fields[2].GetInt64()));
134 stmt->
setUInt32(index++, chargeCategory);
146template<
class OwnerType>
157 if (StatementInfo::ReadCooldown(cooldownsResult->Fetch(), &spellId, &cooldown))
164 }
while (cooldownsResult->NextRow());
171 Field* fields = chargesResult->Fetch();
174 if (StatementInfo::ReadCharge(fields, &categoryId, &charges))
177 }
while (chargesResult->NextRow());
181template<
class OwnerType>
188 StatementInfo::SetIdentifier(stmt, index++,
_owner);
193 if (!cooldown.OnHold)
196 stmt =
CharacterDatabase.GetPreparedStatement(StatementInfo::CooldownsInsertStatement);
197 StatementInfo::SetIdentifier(stmt, index++,
_owner);
198 StatementInfo::WriteCooldown(stmt, index, cooldown);
203 stmt =
CharacterDatabase.GetPreparedStatement(StatementInfo::ChargesDeleteStatement);
204 StatementInfo::SetIdentifier(stmt, 0,
_owner);
212 stmt =
CharacterDatabase.GetPreparedStatement(StatementInfo::ChargesInsertStatement);
213 StatementInfo::SetIdentifier(stmt, index++,
_owner);
214 StatementInfo::WriteCharge(stmt, index, categoryId, charge);
222 TimePoint now = time_point_cast<Duration>(GameTime::GetTime<Clock>());
225 if (itr->second->CategoryEnd < now && !itr->second->OnHold)
233 if (itr->second.CooldownEnd < now && !itr->second.OnHold)
240 while (!chargeRefreshTimes.empty() && chargeRefreshTimes.front().RechargeEnd <= now)
241 chargeRefreshTimes.pop_front();
282 TimePoint now = time_point_cast<Duration>(GameTime::GetTime<Clock>());
286 historyEntry.
SpellID = spellId;
287 historyEntry.
ItemID = cooldown.ItemId;
290 historyEntry.
OnHold =
true;
293 Milliseconds cooldownDuration = duration_cast<Milliseconds>(cooldown.CooldownEnd - now);
294 if (cooldownDuration.count() <= 0)
297 Milliseconds categoryDuration = duration_cast<Milliseconds>(cooldown.CategoryEnd - now);
298 if (categoryDuration.count() > 0)
300 historyEntry.
Category = cooldown.CategoryId;
304 if (cooldownDuration.count() > categoryDuration.count())
308 sendSpellHistory->
Entries.push_back(historyEntry);
316 TimePoint now = time_point_cast<Duration>(GameTime::GetTime<Clock>());
319 if (!consumedCharges.empty())
321 Milliseconds cooldownDuration = duration_cast<Milliseconds>(consumedCharges.front().RechargeEnd - now);
322 if (cooldownDuration.count() <= 0)
329 sendSpellCharges->
Entries.push_back(chargeEntry);
336 TimePoint now = time_point_cast<Duration>(GameTime::GetTime<Clock>());
342 petSpellCooldown.
SpellID = spellId;
343 petSpellCooldown.
Category = cooldown.CategoryId;
345 if (!cooldown.OnHold)
347 Milliseconds cooldownDuration = duration_cast<Milliseconds>(cooldown.CooldownEnd - now);
348 if (cooldownDuration.count() <= 0)
352 Milliseconds categoryDuration = duration_cast<Milliseconds>(cooldown.CategoryEnd - now);
353 if (categoryDuration.count() > 0)
359 petSpells->
Cooldowns.push_back(petSpellCooldown);
365 if (!consumedCharges.empty())
367 Milliseconds cooldownDuration = duration_cast<Milliseconds>(consumedCharges.front().RechargeEnd - now);
368 if (cooldownDuration.count() <= 0)
385 Duration cooldown = Duration::zero();
386 Duration categoryCooldown = Duration::zero();
388 bool needsCooldownPacket =
false;
393 cooldown = *forcedCooldown;
407 int32 intValue = value.count();
412 if (cooldown >= Duration::zero())
413 applySpellMod(cooldown);
416 applySpellMod(categoryCooldown);
432 auto calcRecoveryRate = [&](
AuraEffect const* modRecoveryRate)
434 double rate = 100.0 / (std::max(modRecoveryRate->GetAmount(), -99.0) + 100.0);
435 if (baseCooldown <= 1h
443 double recoveryRate = 1.0;
445 if (modRecoveryRate->IsAffectingSpell(spellInfo))
446 recoveryRate *= calcRecoveryRate(modRecoveryRate);
449 if (spellInfo->
HasLabel(modRecoveryRate->GetMiscValue()) || (modRecoveryRate->GetMiscValueB() && spellInfo->
HasLabel(modRecoveryRate->GetMiscValueB())))
450 recoveryRate *= calcRecoveryRate(modRecoveryRate);
452 if (recoveryRate > 0.0)
455 categoryCooldown =
Duration(
int64(categoryCooldown.count() * recoveryRate));
463 if (!playerOwner || playerOwner->
HasSpell(spellInfo->
Id))
465 needsCooldownPacket =
true;
476 if (cooldown > Duration::zero())
479 if (categoryCooldown > Duration::zero())
485 categoryCooldown = duration_cast<Milliseconds>(Clock::from_time_t(
sWorld->GetNextDailyQuestsResetTime()) - GameTime::GetTime<Clock>());
489 needsCooldownPacket =
true;
492 if (cooldown < Duration::zero())
493 cooldown = Duration::zero();
495 if (categoryCooldown < Duration::zero())
496 categoryCooldown = Duration::zero();
499 if (cooldown == Duration::zero() && categoryCooldown == Duration::zero())
503 TimePoint curTime = time_point_cast<Duration>(GameTime::GetTime<Clock>());
504 TimePoint catrecTime = categoryCooldown != Duration::zero() ? curTime + categoryCooldown : curTime;
505 TimePoint recTime = cooldown != Duration::zero() ? curTime + cooldown : catrecTime;
508 if (recTime != curTime)
510 AddCooldown(spellInfo->
Id, itemId, recTime, categoryId, catrecTime, onHold);
512 if (needsCooldownPacket)
520 playerOwner->SendDirectMessage(spellCooldown.
Write());
557 cooldownEntry.
SpellId = spellId;
559 cooldownEntry.
ItemId = itemId;
562 cooldownEntry.
OnHold = onHold;
580 TimePoint now = time_point_cast<Duration>(GameTime::GetTime<Clock>());
582 itr->second.CooldownEnd += cooldownMod;
584 if (itr->second.CategoryId)
586 if (!withoutCategoryCooldown)
587 itr->second.CategoryEnd += cooldownMod;
590 if (itr->second.CooldownEnd < itr->second.CategoryEnd)
591 itr->second.CooldownEnd = itr->second.CategoryEnd;
598 modifyCooldown.
SpellID = itr->second.SpellId;
599 modifyCooldown.
DeltaTime = duration_cast<Milliseconds>(cooldownMod).count();
601 playerOwner->SendDirectMessage(modifyCooldown.
Write());
604 if (itr->second.CooldownEnd <= now)
610 if (modChange <= 0.0f)
614 modChange = 1.0f / modChange;
616 TimePoint now = time_point_cast<Duration>(GameTime::GetTime<Clock>());
618 itr->second.CooldownEnd = now + duration_cast<Duration>((itr->second.CooldownEnd - now) * modChange);
620 if (itr->second.CategoryId)
621 itr->second.CategoryEnd = now + duration_cast<Duration>((itr->second.CategoryEnd - now) * modChange);
626 updateCooldown.
SpellID = itr->second.SpellId;
628 playerOwner->SendDirectMessage(updateCooldown.
Write());
640 if (!cooldownMod.count())
664 clearCooldown.
SpellID = itr->first;
666 playerOwner->SendDirectMessage(clearCooldown.
Write());
715 if (itr->second.OnHold)
716 return Duration::max();
718 end = itr->second.CooldownEnd;
724 return Duration::zero();
726 if (catItr->second->OnHold)
727 return Duration::max();
729 end = catItr->second->CategoryEnd;
732 TimePoint now = time_point_cast<Duration>(GameTime::GetTime<Clock>());
734 return Duration::zero();
736 Clock::duration remaining = end - now;
737 return duration_cast<Milliseconds>(remaining);
744 return Duration::zero();
746 if (catItr->second->OnHold)
747 return Duration::max();
749 TimePoint end = catItr->second->CategoryEnd;
751 TimePoint now = time_point_cast<Duration>(GameTime::GetTime<Clock>());
753 return Duration::zero();
755 Clock::duration remaining = end - now;
756 return duration_cast<Milliseconds>(remaining);
766 TimePoint now = time_point_cast<Duration>(GameTime::GetTime<Clock>());
767 TimePoint lockoutEnd = now + lockoutTime;
772 std::set<uint32> knownSpells;
775 for (
auto const& [spellId, playerSpell] : plrOwner->GetSpellMap())
777 knownSpells.insert(spellId);
781 for (
auto const& [spellId, petSpell] : petOwner->m_spells)
783 knownSpells.insert(spellId);
790 knownSpells.insert(spell);
796 for (
uint32 spellId : knownSpells)
815 spellCooldown.
SpellCooldowns.emplace_back(spellId, lockoutTime.count());
820 player->SendDirectMessage(spellCooldown.
Write());
825 TimePoint now = time_point_cast<Duration>(GameTime::GetTime<Clock>());
840 if (chargeRecovery <= 0 ||
GetMaxCharges(chargeCategoryId) <= 0)
849 recoveryStart = time_point_cast<Duration>(GameTime::GetTime<Clock>());
851 recoveryStart = charges.back().RechargeEnd;
853 charges.emplace_back(recoveryStart,
Milliseconds(chargeRecovery));
859 if (!chargeCategoryEntry)
866 TimePoint now = time_point_cast<Duration>(GameTime::GetTime<Clock>());
870 entry.RechargeStart += cooldownMod;
871 entry.RechargeEnd += cooldownMod;
874 while (!itr->second.empty() && itr->second.front().RechargeEnd < now)
875 itr->second.pop_front();
886 if (modChange <= 0.0f)
890 modChange = 1.0f / modChange;
892 TimePoint now = time_point_cast<Duration>(GameTime::GetTime<Clock>());
894 auto chargeItr = itr->second.begin();
896 chargeItr->RechargeEnd = now + duration_cast<Duration>((chargeItr->RechargeEnd - now) * modChange);
898 TimePoint prevEnd = chargeItr->RechargeEnd;
900 while (++chargeItr != itr->second.end())
902 Duration rechargeTime = duration_cast<Duration>((chargeItr->RechargeEnd - chargeItr->RechargeStart) * modChange);
903 chargeItr->RechargeStart = prevEnd;
904 chargeItr->RechargeEnd = prevEnd + rechargeTime;
905 prevEnd = chargeItr->RechargeEnd;
911 updateChargeCategoryCooldown.
Category = chargeCategoryId;
912 updateChargeCategoryCooldown.
ModChange = modChange;
913 playerOwner->SendDirectMessage(updateChargeCategoryCooldown.
Write());
922 itr->second.pop_back();
939 clearSpellCharges.
Category = chargeCategoryId;
940 player->SendDirectMessage(clearSpellCharges.
Write());
953 player->SendDirectMessage(clearAllSpellCharges.
Write());
974 if (!chargeCategoryEntry)
985 if (!chargeCategoryEntry)
992 if (modRecoveryRate->GetMiscValue() & chargeCategoryEntry->
TypeMask)
993 recoveryTime += modRecoveryRate->GetAmount();
1004 if (modRecoveryRate->GetMiscValue() ==
int32(chargeCategoryId))
1005 recoveryTime *= 100.0 / (std::max(modRecoveryRate->GetAmount(), -99.0) + 100.0);
1008 if (modRecoveryRate->GetMiscValue() & chargeCategoryEntry->
TypeMask)
1009 recoveryTime *= 100.0 / (std::max(modRecoveryRate->GetAmount(), -99.0) + 100.0);
1016 return int32(std::floor(recoveryTime));
1039 return Duration::zero();
1042 TimePoint now = time_point_cast<Duration>(GameTime::GetTime<Clock>());
1044 return Duration::zero();
1046 Clock::duration remaining = end - now;
1047 return duration_cast<Milliseconds>(remaining);
1052 _pauseTime = time_point_cast<Duration>(GameTime::GetTime<Clock>());
1060 Duration pausedDuration = time_point_cast<Duration>(GameTime::GetTime<Clock>()) - *
_pauseTime;
1063 if (!itr->second.OnHold)
1064 itr->second.CooldownEnd += pausedDuration;
1067 for (
ChargeEntry& chargeEntry : chargeRefreshTimes)
1068 chargeEntry.RechargeEnd += pausedDuration;
1086 clearCooldowns.
SpellID = std::move(cooldowns);
1087 playerOwner->SendDirectMessage(clearCooldowns.
Write());
1102 setSpellCharges.
Category = chargeCategoryId;
1103 if (!chargeCollection.empty())
1104 setSpellCharges.
NextRecoveryTime =
uint32(duration_cast<Milliseconds>(chargeCollection.front().RechargeEnd - GameTime::GetTime<Clock>()).count());
1107 player->SendDirectMessage(setSpellCharges.
Write());
1113 ASSERT(cooldown || categoryId || categoryCooldown);
1114 Duration tmpCooldown = Duration::min();
1115 uint32 tmpCategoryId = 0;
1116 Duration tmpCategoryCooldown = Duration::min();
1125 if (
uint32(itemEffect->SpellID) == spellInfo->
Id)
1128 tmpCategoryId = itemEffect->SpellCategoryID;
1129 tmpCategoryCooldown =
Milliseconds(itemEffect->CategoryCoolDownMSec);
1137 if (tmpCooldown < Duration::zero() && tmpCategoryCooldown < Duration::zero())
1145 *cooldown = tmpCooldown;
1147 *categoryId = tmpCategoryId;
1148 if (categoryCooldown)
1149 *categoryCooldown = tmpCategoryCooldown;
1154 boost::container::small_vector<std::pair<uint32, uint32>, 2> cooldownsToStart;
1158 cooldownsToStart.emplace_back(cooldown->SpellId, cooldown->ItemId);
1160 for (
auto [spellId, itemId] : cooldownsToStart)
1186 if (cooldown.OnHold)
1189 auto [itr, inserted] =
_spellCooldowns.try_emplace(spellId, cooldown);
1190 if (!inserted && !itr->second.OnHold )
1191 itr->second = cooldown;
1201 TimePoint now = time_point_cast<Duration>(GameTime::GetTime<Clock>());
1202 uint32 cooldownDuration =
uint32(cooldown.CooldownEnd > now ? duration_cast<Milliseconds>(cooldown.CooldownEnd - now).count() : 0);
1208 spellCooldown.
SpellCooldowns.emplace_back(spellId, cooldownDuration);
1211 player->SendDirectMessage(spellCooldown.
Write());
CharacterDatabaseStatements
@ CHAR_DEL_PET_SPELL_CHARGES
@ CHAR_INS_PET_SPELL_CHARGES
@ CHAR_INS_PET_SPELL_COOLDOWN
@ CHAR_DEL_CHAR_SPELL_COOLDOWNS
@ CHAR_INS_CHAR_SPELL_COOLDOWN
@ CHAR_INS_CHAR_SPELL_CHARGES
@ CHAR_DEL_PET_SPELL_COOLDOWNS
@ CHAR_DEL_CHAR_SPELL_CHARGES
DB2Storage< SpellCategoryEntry > sSpellCategoryStore("SpellCategory.db2", &SpellCategoryLoadInfo::Instance)
@ IgnoreDuringCooldownTimeRateCalculation
@ CooldownEventOnLeaveCombat
SQLTransaction< CharacterDatabaseConnection > CharacterDatabaseTransaction
std::shared_ptr< PreparedResultSet > PreparedQueryResult
DatabaseWorkerPool< CharacterDatabaseConnection > CharacterDatabase
Accessor to the character database.
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
std::optional< T > Optional
Optional helper class to wrap optional values within.
@ SPELL_ATTR9_IGNORE_SCHOOL_LOCKOUT
@ SPELL_PREVENTION_TYPE_SILENCE
@ SPELL_ATTR6_IGNORE_FOR_MOD_TIME_RATE
@ SPELL_ATTR6_NO_CATEGORY_COOLDOWN_MODS
@ SPELL_AURA_MOD_RECOVERY_RATE_BY_SPELL_LABEL
@ SPELL_AURA_MOD_CHARGE_RECOVERY_BY_TYPE_MASK
@ SPELL_AURA_MOD_CHARGE_RECOVERY_RATE_BY_TYPE_MASK
@ SPELL_AURA_MOD_COOLDOWN_BY_HASTE_REGEN
@ SPELL_AURA_CHARGE_RECOVERY_MOD
@ SPELL_AURA_CHARGE_RECOVERY_AFFECTED_BY_HASTE
@ SPELL_AURA_MOD_RECOVERY_RATE
@ SPELL_AURA_IGNORE_SPELL_COOLDOWN
@ SPELL_AURA_MOD_SPELL_CATEGORY_COOLDOWN
@ SPELL_AURA_MOD_CHARGE_RECOVERY_RATE
@ SPELL_AURA_CHARGE_RECOVERY_MULTIPLIER
@ SPELL_AURA_MOD_COOLDOWN
@ SPELL_AURA_CHARGE_RECOVERY_AFFECTED_BY_HASTE_REGEN
@ SPELL_AURA_MOD_SPELL_COOLDOWN_BY_HASTE
@ SPELL_AURA_MOD_MAX_CHARGES
@ SPELL_AURA_IGNORE_SPELL_CHARGE_COOLDOWN
double SpellEffectValue
This is a double instead of float to be able to store full range of int32.
@ SPELL_COOLDOWN_FLAG_INCLUDE_EVENT_COOLDOWNS
Starts GCD for spells that should start their cooldown on events, requires SPELL_COOLDOWN_FLAG_INCLUD...
@ SPELL_COOLDOWN_FLAG_LOSS_OF_CONTROL_UI
Shows interrupt cooldown in loss of control ui.
@ SPELL_COOLDOWN_FLAG_NONE
ObjectGuid const & GetGUID() const
uint32 m_spells[MAX_CREATURE_SPELLS]
Class used to access individual fields of database query result.
uint32 GetUInt32() const noexcept
Difficulty GetDifficultyID() const
LowType GetCounter() const
bool HasSpell(uint32 spell) const override
void setUInt32(uint8 index, uint32 value)
void setInt64(uint8 index, int64 value)
void setUInt64(uint8 index, uint64 value)
void AddCooldown(uint32 spellId, uint32 itemId, Duration cooldownDuration)
void UpdateCooldownRecoveryRate(Predicate &&predicate, float modChange, bool apply)
void HandleCooldowns(SpellInfo const *spellInfo, uint32 itemId, Spell *spell=nullptr)
Duration GetRemainingGlobalCooldown(SpellInfo const *spellInfo) const
void ConsumeCharge(uint32 chargeCategoryId)
GlobalCooldownStorageType _globalCooldowns
void LoadFromDB(PreparedQueryResult cooldownsResult, PreparedQueryResult chargesResult)
TimePoint _schoolLockouts[MAX_SPELL_SCHOOL]
bool HasGlobalCooldown(SpellInfo const *spellInfo) const
Duration GetRemainingCategoryCooldown(uint32 categoryId) const
int32 GetMaxCharges(uint32 chargeCategoryId) const
CooldownStorageType::iterator EraseCooldown(CooldownStorageType::iterator itr)
void ModifyChargeRecoveryTime(uint32 chargeCategoryId, Duration cooldownMod)
void SendCooldownEvent(SpellInfo const *spellInfo, uint32 itemId=0, Spell *spell=nullptr, bool startCooldown=true)
void ResetCooldown(uint32 spellId, bool update=false)
bool IsReady(SpellInfo const *spellInfo, uint32 itemId=0) const
void AddGlobalCooldown(SpellInfo const *spellInfo, Duration duration)
void SaveToDB(CharacterDatabaseTransaction trans)
void SendClearCooldowns(std::vector< int32 > &&cooldowns) const
void RestoreCharge(uint32 chargeCategoryId)
Optional< TimePoint > _pauseTime
void LockSpellSchool(SpellSchoolMask schoolMask, Duration lockoutTime)
std::deque< ChargeEntry > ChargeEntryCollection
Duration GetRemainingCooldown(SpellInfo const *spellInfo) const
SpellHistory(Unit *owner)
CooldownStorageType _spellCooldowns
void WritePacket(WorldPackets::Spells::SendSpellHistory *sendSpellHistory) const
void ResetCharges(uint32 chargeCategoryId)
bool HasCooldownOnHold(uint32 spellId) const
static void GetCooldownDurations(SpellInfo const *spellInfo, uint32 itemId, Duration *cooldown, uint32 *categoryId, Duration *categoryCooldown)
void SendSetSpellCharges(uint32 chargeCategoryId, ChargeEntryCollection const &chargeCollection) const
void CancelGlobalCooldown(SpellInfo const *spellInfo)
void RestoreCooldownStateAfterDuel()
void UpdateChargeRecoveryRate(uint32 chargeCategoryId, float modChange, bool apply)
void ModifyCooldown(uint32 spellId, Duration cooldownMod, bool withoutCategoryCooldown=false)
CooldownStorageType _spellCooldownsBeforeDuel
bool HasCharge(uint32 chargeCategoryId) const
void SaveCooldownStateBeforeDuel()
std::chrono::time_point< Clock, Duration > TimePoint
void ResetCooldowns(Predicate &&predicate, bool update=false)
void ModifySpellCooldown(uint32 spellId, Duration cooldownMod, bool withoutCategoryCooldown)
void StartCooldown(SpellInfo const *spellInfo, uint32 itemId, Spell *spell=nullptr, bool onHold=false, Optional< Duration > forcedCooldown={})
Player * GetPlayerOwner() const
int32 GetChargeRecoveryTime(uint32 chargeCategoryId) const
ChargeStorageType _categoryCharges
bool IsSchoolLocked(SpellSchoolMask schoolMask) const
CategoryCooldownStorageType _categoryCooldowns
bool HasCooldown(SpellInfo const *spellInfo, uint32 itemId=0) const
uint32 GetCategory() const
bool IsCooldownStartedOnEvent() const
uint32 CooldownAuraSpellId
uint32 CategoryRecoveryTime
SpellSchoolMask GetSchoolMask() const
bool HasAttribute(SpellAttr0 attribute) const
bool IsCooldownStartedOnEventAfterCombat() const
uint32 StartRecoveryCategory
bool HasLabel(uint32 labelId) const
bool IsIgnoringCooldowns() const
AuraEffectList const & GetAuraEffectsByType(AuraType type) const
bool HasAuraTypeWithMiscvalue(AuraType auraType, int32 miscValue) const
CharmInfo * GetCharmInfo()
float GetTotalAuraMultiplierByMiscValue(AuraType auraType, int32 misc_value) const
float GetTotalAuraModifier(AuraType auraType) const
bool HasAuraType(AuraType auraType) const
float GetTotalAuraModifierByMiscValue(AuraType auraType, int32 misc_value) const
UF::UpdateField< UF::UnitData, int32(WowCS::EntityFragment::CGObject), TYPEID_UNIT > m_unitData
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
bool HasAuraTypeWithAffectMask(AuraType auraType, SpellInfo const *affectedSpell) const
Player * GetSpellModOwner() const
Player * GetCharmerOrOwnerPlayerOrPlayerItself() const
std::vector< PetSpellCooldown > Cooldowns
std::vector< PetSpellHistory > SpellHistory
WorldPacket const * Write() override
WorldPacket const * Write() override
std::vector< int32 > SpellID
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
std::vector< SpellChargeEntry > Entries
std::vector< SpellHistoryEntry > Entries
WorldPacket const * Write() override
WorldPacket const * Write() override
std::vector< SpellCooldownStruct > SpellCooldowns
WorldPacket const * Write() override
WorldPacket const * Write() override
uint32 GetPetNumber() const
EnumFlag< SpellCategoryFlags > GetFlags() const
static bool ReadCooldown(Field const *fields, uint32 *spellId, CooldownEntry *cooldownEntry)
static void WriteCooldown(PreparedStatementBase *stmt, uint8 &index, CooldownEntry const &cooldown)
static bool ReadCharge(Field const *fields, uint32 *categoryId, ChargeEntry *chargeEntry)
static void SetIdentifier(PreparedStatementBase *stmt, uint8 index, Unit *owner)
static void WriteCharge(PreparedStatementBase *stmt, uint8 &index, uint32 chargeCategory, ChargeEntry const &charge)
static bool ReadCooldown(Field const *fields, uint32 *spellId, CooldownEntry *cooldownEntry)
static void WriteCharge(PreparedStatementBase *stmt, uint8 &index, uint32 chargeCategory, ChargeEntry const &charge)
static bool ReadCharge(Field const *fields, uint32 *categoryId, ChargeEntry *chargeEntry)
static void SetIdentifier(PreparedStatementBase *stmt, uint8 index, Unit const *owner)
static void WriteCooldown(PreparedStatementBase *stmt, uint8 &index, CooldownEntry const &cooldown)
int32 CategoryRecoveryTime