Core/Player: implement ResetCoolDownAfterDuel configurable feature

This commit is contained in:
ShinDarth committed 2015-10-05 15:57:53 +02:00
1 parent ba009ea2e2
commit 24b41a5211
10 files changed
+57 -2

No files matched your search

+17
View File
@@ -637,6 +637,23 @@ void SpellHistory::BuildCooldownPacket(WorldPacket& data, uint8 flags, PacketCoo
}
}
uint16 SpellHistory::GetArenaCooldownsSize()
{
uint16 count = 0;
for (auto itr = _spellCooldowns.begin(); itr != _spellCooldowns.end();)
{
SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(itr->first);
if (spellInfo->RecoveryTime < 10 * MINUTE * IN_MILLISECONDS &&
spellInfo->CategoryRecoveryTime < 10 * MINUTE * IN_MILLISECONDS)
++count;
++itr;
}
return count;
}
template void SpellHistory::LoadFromDB<Player>(PreparedQueryResult cooldownsResult);
template void SpellHistory::LoadFromDB<Pet>(PreparedQueryResult cooldownsResult);
template void SpellHistory::SaveToDB<Player>(SQLTransaction& trans);