aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/DataStores
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2015-10-29 17:55:57 +0100
committerShauren <shauren.trinity@gmail.com>2015-10-29 17:56:18 +0100
commit7dcddd90be6e49281ca04239de5839e757ef3f7a (patch)
treec9bc94e1c6e970c708393622e640f51f703d35b9 /src/server/game/DataStores
parent3f32307d377d53f31ed92f068fdc4db8069a3b6c (diff)
Core/Spells: Improved spell category cooldown handling
* Category cooldown is stored with the spell that started the cooldown (and only resetting cooldown on that spell will clear cooldowns on entire category - this fully mirrors client behavior) * This significantly reduces the amount of data saved to database for cooldowns * Spell casts from items that have a different category specified than on spell will now check for cooldown during the cast (cherry picked from commit 1efb3f08e278530f59d681f676b031a7fc6db3ac) Closes #15766 Closes #15137 Closes #14837
Diffstat (limited to 'src/server/game/DataStores')
-rw-r--r--src/server/game/DataStores/DBCStores.cpp7
-rw-r--r--src/server/game/DataStores/DBCStores.h1
-rw-r--r--src/server/game/DataStores/DBCStructure.h2
3 files changed, 0 insertions, 10 deletions
diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
index e268b376b34..14e4631548e 100644
--- a/src/server/game/DataStores/DBCStores.cpp
+++ b/src/server/game/DataStores/DBCStores.cpp
@@ -163,7 +163,6 @@ DBCStorage <SoundEntriesEntry> sSoundEntriesStore(SoundEntriesfmt);
DBCStorage <SpellItemEnchantmentEntry> sSpellItemEnchantmentStore(SpellItemEnchantmentfmt);
DBCStorage <SpellItemEnchantmentConditionEntry> sSpellItemEnchantmentConditionStore(SpellItemEnchantmentConditionfmt);
DBCStorage <SpellEntry> sSpellStore(SpellEntryfmt);
-SpellCategoryStore sSpellsByCategoryStore;
PetFamilySpellsStore sPetFamilySpellsStore;
DBCStorage <SpellCastTimesEntry> sSpellCastTimesStore(SpellCastTimefmt);
@@ -430,12 +429,6 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales, bad_dbc_files, sSkillTiersStore, dbcPath, "SkillTiers.dbc");
LoadDBC(availableDbcLocales, bad_dbc_files, sSoundEntriesStore, dbcPath, "SoundEntries.dbc");
LoadDBC(availableDbcLocales, bad_dbc_files, sSpellStore, dbcPath, "Spell.dbc", &CustomSpellEntryfmt, &CustomSpellEntryIndex);
- for (uint32 i = 1; i < sSpellStore.GetNumRows(); ++i)
- {
- SpellEntry const* spell = sSpellStore.LookupEntry(i);
- if (spell && spell->Category)
- sSpellsByCategoryStore[spell->Category].insert(i);
- }
for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j)
{
diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h
index d955e9581ab..858cd33f8fc 100644
--- a/src/server/game/DataStores/DBCStores.h
+++ b/src/server/game/DataStores/DBCStores.h
@@ -165,7 +165,6 @@ extern DBCStorage <SpellDurationEntry> sSpellDurationStore;
extern DBCStorage <SpellFocusObjectEntry> sSpellFocusObjectStore;
extern DBCStorage <SpellItemEnchantmentEntry> sSpellItemEnchantmentStore;
extern DBCStorage <SpellItemEnchantmentConditionEntry> sSpellItemEnchantmentConditionStore;
-extern SpellCategoryStore sSpellsByCategoryStore;
extern PetFamilySpellsStore sPetFamilySpellsStore;
extern DBCStorage <SpellRadiusEntry> sSpellRadiusStore;
extern DBCStorage <SpellRangeEntry> sSpellRangeStore;
diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h
index 092ef714145..72317a196cb 100644
--- a/src/server/game/DataStores/DBCStructure.h
+++ b/src/server/game/DataStores/DBCStructure.h
@@ -1737,8 +1737,6 @@ struct SpellEntry
//uint32 SpellDifficultyId; // 233 3.3.0
};
-typedef std::set<uint32> SpellCategorySet;
-typedef std::map<uint32, SpellCategorySet > SpellCategoryStore;
typedef std::set<uint32> PetFamilySpellsSet;
typedef std::map<uint32, PetFamilySpellsSet > PetFamilySpellsStore;