aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/DataStores/DBCStores.cpp143
-rwxr-xr-xsrc/server/game/DataStores/DBCStores.h39
-rwxr-xr-xsrc/server/game/DataStores/DBCStructure.h482
-rwxr-xr-xsrc/server/game/DataStores/DBCfmt.h30
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp2
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp4
-rwxr-xr-xsrc/server/game/Quests/QuestDef.cpp4
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuraEffects.cpp2
-rwxr-xr-xsrc/server/game/Spells/Spell.cpp2
-rw-r--r--src/server/game/Spells/SpellInfo.cpp321
-rw-r--r--src/server/game/Spells/SpellInfo.h48
-rwxr-xr-xsrc/server/game/Spells/SpellMgr.cpp4
12 files changed, 820 insertions, 261 deletions
diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
index c5915b50967..fc587f8da9e 100755
--- a/src/server/game/DataStores/DBCStores.cpp
+++ b/src/server/game/DataStores/DBCStores.cpp
@@ -121,6 +121,18 @@ DBCStorage <ItemRandomPropertiesEntry> sItemRandomPropertiesStore(ItemRandomProp
DBCStorage <ItemRandomSuffixEntry> sItemRandomSuffixStore(ItemRandomSuffixfmt);
DBCStorage <ItemSetEntry> sItemSetStore(ItemSetEntryfmt);
+DBCStorage <ItemArmorQualityEntry> sItemArmorQualityStore(ItemArmorQualityfmt);
+DBCStorage <ItemArmorShieldEntry> sItemArmorShieldStore(ItemArmorShieldfmt);
+DBCStorage <ItemArmorTotalEntry> sItemArmorTotalStore(ItemArmorTotalfmt);
+DBCStorage <ItemDamageEntry> sItemDamageAmmoStore(ItemDamagefmt);
+DBCStorage <ItemDamageEntry> sItemDamageOneHandStore(ItemDamagefmt);
+DBCStorage <ItemDamageEntry> sItemDamageOneHandCasterStore(ItemDamagefmt);
+DBCStorage <ItemDamageEntry> sItemDamageRangedStore(ItemDamagefmt);
+DBCStorage <ItemDamageEntry> sItemDamageThrownStore(ItemDamagefmt);
+DBCStorage <ItemDamageEntry> sItemDamageTwoHandStore(ItemDamagefmt);
+DBCStorage <ItemDamageEntry> sItemDamageTwoHandCasterStore(ItemDamagefmt);
+DBCStorage <ItemDamageEntry> sItemDamageWandStore(ItemDamagefmt);
+
DBCStorage <LFGDungeonEntry> sLFGDungeonStore(LFGDungeonEntryfmt);
//DBCStorage <LiquidTypeEntry> sLiquidTypeStore(LiquidTypeEntryfmt);
DBCStorage <LockEntry> sLockStore(LockEntryfmt);
@@ -156,14 +168,36 @@ DBCStorage <SpellEntry> sSpellStore(SpellEntryfmt);
SpellCategoryStore sSpellCategoryStore;
PetFamilySpellsStore sPetFamilySpellsStore;
+
+DBCStorage <SpellReagentsEntry> sSpellReagentsStore(SpellReagentsEntryfmt);
+DBCStorage <SpellScalingEntry> sSpellScalingStore(SpellScalingEntryfmt);
+DBCStorage <SpellTotemsEntry> sSpellTotemsStore(SpellTotemsEntryfmt);
+DBCStorage <SpellTargetRestrictionsEntry> sSpellTargetRestrictionsStore(SpellTargetRestrictionsEntryfmt);
+DBCStorage <SpellPowerEntry> sSpellPowerStore(SpellPowerEntryfmt);
+DBCStorage <SpellLevelsEntry> sSpellLevelsStore(SpellLevelsEntryfmt);
+DBCStorage <SpellInterruptsEntry> sSpellInterruptsStore(SpellInterruptsEntryfmt);
+DBCStorage <SpellEquippedItemsEntry> sSpellEquippedItemsStore(SpellEquippedItemsEntryfmt);
+DBCStorage <SpellClassOptionsEntry> sSpellClassOptionsStore(SpellClassOptionsEntryfmt);
+DBCStorage <SpellCooldownsEntry> sSpellCooldownsStore(SpellCooldownsEntryfmt);
+DBCStorage <SpellAuraOptionsEntry> sSpellAuraOptionsStore(SpellAuraOptionsEntryfmt);
+DBCStorage <SpellAuraRestrictionsEntry> sSpellAuraRestrictionsStore(SpellAuraRestrictionsEntryfmt);
+DBCStorage <SpellCastingRequirementsEntry> sSpellCastingRequirementsStore(SpellCastingRequirementsEntryfmt);
+
+SpellEffectMap sSpellEffectMap;
+SpellReagentMap sSpellReagentMap;
+SpellTotemMap sSpellTotemMap;
+
DBCStorage <SpellCastTimesEntry> sSpellCastTimesStore(SpellCastTimefmt);
+DBCStorage <SpellCategoriesEntry> sSpellCategoriesStore(SpellCategoriesEntryfmt);
+DBCStorage <SpellEffectEntry> sSpellEffectStore(SpellEffectEntryfmt);
DBCStorage <SpellDifficultyEntry> sSpellDifficultyStore(SpellDifficultyfmt);
DBCStorage <SpellDurationEntry> sSpellDurationStore(SpellDurationfmt);
DBCStorage <SpellFocusObjectEntry> sSpellFocusObjectStore(SpellFocusObjectfmt);
DBCStorage <SpellRadiusEntry> sSpellRadiusStore(SpellRadiusfmt);
DBCStorage <SpellRangeEntry> sSpellRangeStore(SpellRangefmt);
DBCStorage <SpellRuneCostEntry> sSpellRuneCostStore(SpellRuneCostfmt);
-DBCStorage <SpellShapeshiftEntry> sSpellShapeshiftStore(SpellShapeshiftfmt);
+DBCStorage <SpellShapeshiftEntry> sSpellShapeshiftStore(SpellShapeshiftEntryfmt);
+DBCStorage <SpellShapeshiftFormEntry> sSpellShapeshiftFormStore(SpellShapeshiftFormfmt);
DBCStorage <StableSlotPricesEntry> sStableSlotPricesStore(StableSlotPricesfmt);
DBCStorage <SummonPropertiesEntry> sSummonPropertiesStore(SummonPropertiesfmt);
DBCStorage <TalentEntry> sTalentStore(TalentEntryfmt);
@@ -362,6 +396,19 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales, bad_dbc_files, sItemRandomSuffixStore, dbcPath, "ItemRandomSuffix.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sItemSetStore, dbcPath, "ItemSet.dbc");//14545
+
+ LoadDBC(availableDbcLocales, bad_dbc_files, sItemArmorQualityStore, dbcPath, "ItemArmorQuality.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sItemArmorShieldStore, dbcPath, "ItemArmorShield.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sItemArmorTotalStore, dbcPath, "ItemArmorTotal.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageAmmoStore, dbcPath, "ItemDamageAmmo.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageOneHandStore, dbcPath, "ItemDamageOneHand.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageOneHandCasterStore,dbcPath, "ItemDamageOneHandCaster.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageRangedStore, dbcPath, "ItemDamageRanged.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageThrownStore, dbcPath, "ItemDamageThrown.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageTwoHandStore, dbcPath, "ItemDamageTwoHand.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageTwoHandCasterStore,dbcPath, "ItemDamageTwoHandCaster.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageWandStore, dbcPath, "ItemDamageWand.dbc");//14545
+
LoadDBC(availableDbcLocales, bad_dbc_files, sItemClassStore, dbcPath,"ItemClass.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sLFGDungeonStore, dbcPath, "LFGDungeons.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sLockStore, dbcPath, "Lock.dbc");//14545
@@ -371,7 +418,7 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales, bad_dbc_files, sMapStore, dbcPath, "Map.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sMapDifficultyStore, dbcPath, "MapDifficulty.dbc");//14545
// fill data
- sMapDifficultyMap[MAKE_PAIR32(0, 0)] = MapDifficulty(0, 0, 0);//map 0 is missingg from MapDifficulty.dbc use this till its ported to sql
+ sMapDifficultyMap[MAKE_PAIR32(0, 0)] = MapDifficulty(0, 0, false);//map 0 is missingg from MapDifficulty.dbc use this till its ported to sql
for (uint32 i = 0; i < sMapDifficultyStore.GetNumRows(); ++i)
if (MapDifficultyEntry const* entry = sMapDifficultyStore.LookupEntry(i))
sMapDifficultyMap[MAKE_PAIR32(entry->MapId, entry->Difficulty)] = MapDifficulty(entry->resetTime, entry->maxPlayers, entry->areaTriggerText[0] > 0);
@@ -398,34 +445,37 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales, bad_dbc_files, sSkillLineStore, dbcPath, "SkillLine.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sSkillLineAbilityStore, dbcPath, "SkillLineAbility.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sSoundEntriesStore, dbcPath, "SoundEntries.dbc");//14545
- LoadDBC(availableDbcLocales, bad_dbc_files, sSpellStore, dbcPath, "Spell.dbc", &CustomSpellEntryfmt, &CustomSpellEntryIndex);//todo
+ 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);
+ SpellCategoriesEntry const* spell = sSpellCategoriesStore.LookupEntry(i);
if (spell && spell->Category)
sSpellCategoryStore[spell->Category].insert(i);
}
for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j)
{
- SkillLineAbilityEntry const* skillLine = sSkillLineAbilityStore.LookupEntry(j);
+ SkillLineAbilityEntry const *skillLine = sSkillLineAbilityStore.LookupEntry(j);
if (!skillLine)
continue;
SpellEntry const* spellInfo = sSpellStore.LookupEntry(skillLine->spellId);
-
if (spellInfo && spellInfo->Attributes & SPELL_ATTR0_PASSIVE)
{
for (uint32 i = 1; i < sCreatureFamilyStore.GetNumRows(); ++i)
{
+ SpellLevelsEntry const* levels = sSpellLevelsStore.LookupEntry(i);
+ if (!levels)
+ continue;
+
CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(i);
if (!cFamily)
continue;
if (skillLine->skillId != cFamily->skillLine[0] && skillLine->skillId != cFamily->skillLine[1])
continue;
- if (spellInfo->spellLevel)
+ if (levels->spellLevel)
continue;
if (skillLine->learnOnGetSkill != ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL)
@@ -436,16 +486,41 @@ void LoadDBCStores(const std::string& dataPath)
}
}
- LoadDBC(availableDbcLocales, bad_dbc_files, sSpellCastTimesStore, dbcPath, "SpellCastTimes.dbc");
- LoadDBC(availableDbcLocales, bad_dbc_files, sSpellDifficultyStore, dbcPath, "SpellDifficulty.dbc", &CustomSpellDifficultyfmt, &CustomSpellDifficultyIndex);
- LoadDBC(availableDbcLocales, bad_dbc_files, sSpellDurationStore, dbcPath, "SpellDuration.dbc");
- LoadDBC(availableDbcLocales, bad_dbc_files, sSpellFocusObjectStore, dbcPath, "SpellFocusObject.dbc");
- LoadDBC(availableDbcLocales, bad_dbc_files, sSpellItemEnchantmentStore, dbcPath, "SpellItemEnchantment.dbc");
- LoadDBC(availableDbcLocales, bad_dbc_files, sSpellItemEnchantmentConditionStore, dbcPath, "SpellItemEnchantmentCondition.dbc");
- LoadDBC(availableDbcLocales, bad_dbc_files, sSpellRadiusStore, dbcPath, "SpellRadius.dbc");
- LoadDBC(availableDbcLocales, bad_dbc_files, sSpellRangeStore, dbcPath, "SpellRange.dbc");
- LoadDBC(availableDbcLocales, bad_dbc_files, sSpellRuneCostStore, dbcPath, "SpellRuneCost.dbc");
- LoadDBC(availableDbcLocales, bad_dbc_files, sSpellShapeshiftStore, dbcPath, "SpellShapeshiftForm.dbc");
+
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellReagentsStore, dbcPath,"SpellReagents.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellScalingStore, dbcPath,"SpellScaling.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellTotemsStore, dbcPath,"SpellTotems.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellTargetRestrictionsStore,dbcPath,"SpellTargetRestrictions.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellPowerStore, dbcPath,"SpellPower.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellLevelsStore, dbcPath,"SpellLevels.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellInterruptsStore, dbcPath,"SpellInterrupts.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellEquippedItemsStore, dbcPath,"SpellEquippedItems.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellClassOptionsStore, dbcPath,"SpellClassOptions.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellCooldownsStore, dbcPath,"SpellCooldowns.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellAuraOptionsStore, dbcPath,"SpellAuraOptions.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellAuraRestrictionsStore, dbcPath,"SpellAuraRestrictions.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellCastingRequirementsStore, dbcPath,"SpellCastingRequirements.dbc");//14545
+
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellCategoriesStore, dbcPath,"SpellCategories.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellEffectStore, dbcPath,"SpellEffect.dbc");//14545
+
+ for(uint32 i = 1; i < sSpellEffectStore.GetNumRows(); ++i)
+ {
+ if(SpellEffectEntry const *spellEffect = sSpellEffectStore.LookupEntry(i))
+ sSpellEffectMap[spellEffect->EffectSpellId].effects[spellEffect->EffectIndex] = spellEffect;
+ }
+
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellCastTimesStore, dbcPath, "SpellCastTimes.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellDifficultyStore, dbcPath, "SpellDifficulty.dbc"/*, &CustomSpellDifficultyfmt, &CustomSpellDifficultyIndex*/);//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellDurationStore, dbcPath, "SpellDuration.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellFocusObjectStore, dbcPath, "SpellFocusObject.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellItemEnchantmentStore, dbcPath, "SpellItemEnchantment.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellItemEnchantmentConditionStore, dbcPath, "SpellItemEnchantmentCondition.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellRadiusStore, dbcPath, "SpellRadius.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellRangeStore, dbcPath, "SpellRange.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellRuneCostStore, dbcPath, "SpellRuneCost.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellShapeshiftStore, dbcPath, "SpellShapeshift.dbc");//14545
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellShapeshiftFormStore, dbcPath, "SpellShapeshiftForm.dbc");//14545
//LoadDBC(availableDbcLocales, bad_dbc_files, sStableSlotPricesStore, dbcPath, "StableSlotPrices.dbc");
LoadDBC(availableDbcLocales, bad_dbc_files, sSummonPropertiesStore, dbcPath, "SummonProperties.dbc");//14545
@@ -543,10 +618,9 @@ void LoadDBCStores(const std::string& dataPath)
{
std::set<uint32> spellPaths;
for (uint32 i = 1; i < sSpellStore.GetNumRows (); ++i)
- if (SpellEntry const* sInfo = sSpellStore.LookupEntry (i))
- for (int j = 0; j < MAX_SPELL_EFFECTS; ++j)
- if (sInfo->Effect[j] == SPELL_EFFECT_SEND_TAXI)
- spellPaths.insert(sInfo->EffectMiscValue[j]);
+ if (SpellEffectEntry const* sInfo = sSpellEffectStore.LookupEntry (i))
+ if (sInfo->Effect == SPELL_EFFECT_SEND_TAXI)
+ spellPaths.insert(sInfo->EffectMiscValue);
memset(sTaxiNodesMask, 0, sizeof(sTaxiNodesMask));
memset(sOldContinentsNodesMask, 0, sizeof(sOldContinentsNodesMask));
@@ -666,6 +740,33 @@ char const* GetPetName(uint32 petfamily, uint32 dbclang)
return pet_family->Name[dbclang]?pet_family->Name[dbclang]:NULL;
}
+SpellEffectEntry const* GetSpellEffectEntry(uint32 spellId, uint32 effect)
+{
+ SpellEffectMap::const_iterator itr = sSpellEffectMap.find(spellId);
+ if(itr == sSpellEffectMap.end())
+ return NULL;
+
+ return itr->second.effects[effect];
+}
+
+SpellReagentsEntry const* GetSpellReagentEntry(uint32 spellId, uint8 reagent)
+{
+ SpellReagentMap::const_iterator itr = sSpellReagentMap.find(spellId);
+ if(itr == sSpellReagentMap.end())
+ return NULL;
+
+ return itr->second.reagents[reagent];
+}
+
+SpellTotemsEntry const* GetSpellTotemEntry(uint32 spellId, uint8 totem)
+{
+ SpellTotemMap::const_iterator itr = sSpellTotemMap.find(spellId);
+ if(itr == sSpellTotemMap.end())
+ return NULL;
+
+ return itr->second.totems[totem];
+}
+
TalentSpellPos const* GetTalentSpellPos(uint32 spellId)
{
TalentSpellPosMap::const_iterator itr = sTalentSpellPosMap.find(spellId);
diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h
index c10c19fc428..c031b935faa 100755
--- a/src/server/game/DataStores/DBCStores.h
+++ b/src/server/game/DataStores/DBCStores.h
@@ -31,6 +31,9 @@ SimpleFactionsList const* GetFactionTeamList(uint32 faction);
char const* GetPetName(uint32 petfamily, uint32 dbclang);
uint32 GetTalentSpellCost(uint32 spellId);
TalentSpellPos const* GetTalentSpellPos(uint32 spellId);
+SpellEffectEntry const* GetSpellEffectEntry(uint32 spellId, uint32 effect);
+SpellReagentsEntry const* GetSpellReagentEntry(uint32 spellId, uint8 reagent);
+SpellTotemsEntry const* GetSpellTotemEntry(uint32 spellId, uint8 totem);
int32 GetAreaFlagByAreaID(uint32 area_id); // -1 if not found
AreaTableEntry const* GetAreaEntryByAreaID(uint32 area_id);
@@ -106,24 +109,33 @@ extern DBCStorage <GtChanceToMeleeCritEntry> sGtChanceToMeleeCritStore;
extern DBCStorage <GtChanceToSpellCritBaseEntry> sGtChanceToSpellCritBaseStore;
extern DBCStorage <GtChanceToSpellCritEntry> sGtChanceToSpellCritStore;
extern DBCStorage <GtOCTClassCombatRatingScalarEntry> sGtOCTClassCombatRatingScalarStore;
-extern DBCStorage <GtOCTRegenHPEntry> sGtOCTRegenHPStore;
//extern DBCStorage <GtOCTRegenMPEntry> sGtOCTRegenMPStore; -- not used currently
extern DBCStorage <GtRegenHPPerSptEntry> sGtRegenHPPerSptStore;
+extern DBCStorage <gtOCTHpPerStaminaEntry> sGtOCTHpPerStaminaStore;
extern DBCStorage <GtRegenMPPerSptEntry> sGtRegenMPPerSptStore;
extern DBCStorage <HolidaysEntry> sHolidaysStore;
-//extern DBCStorage <ItemEntry> sItemStore;
+extern DBCStorage <ItemArmorQualityEntry> sItemArmorQualityStore;
+extern DBCStorage <ItemArmorShieldEntry> sItemArmorShieldStore;
+extern DBCStorage <ItemArmorTotalEntry> sItemArmorTotalStore;
extern DBCStorage <ItemBagFamilyEntry> sItemBagFamilyStore;
+extern DBCStorage <ItemDamageEntry> sItemDamageAmmoStore;
+extern DBCStorage <ItemDamageEntry> sItemDamageOneHandStore;
+extern DBCStorage <ItemDamageEntry> sItemDamageOneHandCasterStore;
+extern DBCStorage <ItemDamageEntry> sItemDamageRangedStore;
+extern DBCStorage <ItemDamageEntry> sItemDamageThrownStore;
+extern DBCStorage <ItemDamageEntry> sItemDamageTwoHandStore;
+extern DBCStorage <ItemDamageEntry> sItemDamageTwoHandCasterStore;
+extern DBCStorage <ItemDamageEntry> sItemDamageWandStore;
//extern DBCStorage <ItemDisplayInfoEntry> sItemDisplayInfoStore; -- not used currently
-//extern DBCStorage <ItemExtendedCostEntry> sItemExtendedCostStore;
extern DBCStorage <ItemLimitCategoryEntry> sItemLimitCategoryStore;
extern DBCStorage <ItemRandomPropertiesEntry> sItemRandomPropertiesStore;
extern DBCStorage <ItemRandomSuffixEntry> sItemRandomSuffixStore;
extern DBCStorage <ItemSetEntry> sItemSetStore;
extern DBCStorage <LFGDungeonEntry> sLFGDungeonStore;
-//extern DBCStorage <LiquidTypeEntry> sLiquidTypeStore;
extern DBCStorage <LockEntry> sLockStore;
extern DBCStorage <MailTemplateEntry> sMailTemplateStore;
extern DBCStorage <MapEntry> sMapStore;
+extern DBCStorage <PhaseEntry> sPhaseStore;
//extern DBCStorage <MapDifficultyEntry> sMapDifficultyStore; -- use GetMapDifficultyData insteed
extern MapDifficultyMap sMapDifficultyMap;
extern DBCStorage <MovieEntry> sMovieStore;
@@ -149,8 +161,24 @@ extern DBCStorage <SpellRadiusEntry> sSpellRadiusStore;
extern DBCStorage <SpellRangeEntry> sSpellRangeStore;
extern DBCStorage <SpellRuneCostEntry> sSpellRuneCostStore;
extern DBCStorage <SpellShapeshiftEntry> sSpellShapeshiftStore;
+extern DBCStorage <SpellShapeshiftFormEntry> sSpellShapeshiftFormStore;
extern DBCStorage <SpellEntry> sSpellStore;
-extern DBCStorage <StableSlotPricesEntry> sStableSlotPricesStore;
+extern DBCStorage <SpellAuraOptionsEntry> sSpellAuraOptionsStore;
+extern DBCStorage <SpellAuraRestrictionsEntry> sSpellAuraRestrictionsStore;
+extern DBCStorage <SpellCastingRequirementsEntry> sSpellCastingRequirementsStore;
+extern DBCStorage <SpellCategoriesEntry> sSpellCategoriesStore;
+extern DBCStorage <SpellClassOptionsEntry> sSpellClassOptionsStore;
+extern DBCStorage <SpellCooldownsEntry> sSpellCooldownsStore;
+extern DBCStorage <SpellEffectEntry> sSpellEffectStore;
+extern DBCStorage <SpellEquippedItemsEntry> sSpellEquippedItemsStore;
+extern DBCStorage <SpellInterruptsEntry> sSpellInterruptsStore;
+extern DBCStorage <SpellLevelsEntry> sSpellLevelsStore;
+extern DBCStorage <SpellPowerEntry> sSpellPowerStore;
+extern DBCStorage <SpellReagentsEntry> sSpellReagentsStore;
+extern DBCStorage <SpellScalingEntry> sSpellScalingStore;
+extern DBCStorage <SpellTargetRestrictionsEntry> sSpellTargetRestrictionsStore;
+extern DBCStorage <SpellTotemsEntry> sSpellTotemsStore;
+//extern DBCStorage <StableSlotPricesEntry> sStableSlotPricesStore;
extern DBCStorage <SummonPropertiesEntry> sSummonPropertiesStore;
extern DBCStorage <TalentEntry> sTalentStore;
extern DBCStorage <TalentTabEntry> sTalentTabStore;
@@ -163,7 +191,6 @@ extern TaxiMask sAllianceTaxiNodesMask;
extern TaxiMask sDeathKnightTaxiNodesMask;
extern TaxiPathSetBySource sTaxiPathSetBySource;
extern TaxiPathNodesByPath sTaxiPathNodesByPath;
-extern DBCStorage <TeamContributionPointsEntry> sTeamContributionPointsStore;
extern DBCStorage <TotemCategoryEntry> sTotemCategoryStore;
extern DBCStorage <VehicleEntry> sVehicleStore;
extern DBCStorage <VehicleSeatEntry> sVehicleSeatStore;
diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h
index e65d42d2e4e..8509d0436e0 100755
--- a/src/server/game/DataStores/DBCStructure.h
+++ b/src/server/game/DataStores/DBCStructure.h
@@ -1137,6 +1137,43 @@ struct ItemClassEntry
//DBCString name; // 4
};
+// common struct for:
+// ItemDamageAmmo.dbc
+// ItemDamageOneHand.dbc
+// ItemDamageOneHandCaster.dbc
+// ItemDamageRanged.dbc
+// ItemDamageThrown.dbc
+// ItemDamageTwoHand.dbc
+// ItemDamageTwoHandCaster.dbc
+// ItemDamageWand.dbc
+struct ItemDamageEntry
+{
+ uint32 Id; // 0 item level
+ float Value[7]; // 1-7 multiplier for item quality
+ uint32 Id2; // 8 item level
+};
+
+struct ItemArmorQualityEntry
+{
+ uint32 Id; // 0 item level
+ float Value[7]; // 1-7 multiplier for item quality
+ uint32 Id2; // 8 item level
+};
+
+struct ItemArmorShieldEntry
+{
+ uint32 Id; // 0 item level
+ uint32 Id2; // 1 item level
+ float Value[7]; // 2-8 multiplier for item quality
+};
+
+struct ItemArmorTotalEntry
+{
+ uint32 Id; // 0 item level
+ uint32 Id2; // 1 item level
+ float Value[4]; // 2-5 multiplier for armor types (cloth...plate)
+};
+
struct ItemBagFamilyEntry
{
uint32 ID; // 0
@@ -1583,121 +1620,163 @@ struct SoundEntriesEntry
//unk // 33 4.0.0
};
+// SpellEffect.dbc
+struct SpellEffectEntry
+{
+ uint32 Id; // 0 m_ID
+ uint32 Effect; // 1 m_effect
+ float EffectValueMultiplier; // 2 m_effectAmplitude
+ uint32 EffectApplyAuraName; // 3 m_effectAura
+ uint32 EffectAmplitude; // 4 m_effectAuraPeriod
+ int32 EffectBasePoints; // 5 m_effectBasePoints (don't must be used in spell/auras explicitly, must be used cached Spell::m_currentBasePoints)
+ float EffectBonusMultiplier; // 6 m_effectBonus
+ float EffectDamageMultiplier; // 7 m_effectChainAmplitude
+ uint32 EffectChainTarget; // 8 m_effectChainTargets
+ int32 EffectDieSides; // 9 m_effectDieSides
+ uint32 EffectItemType; // 10 m_effectItemType
+ uint32 EffectMechanic; // 11 m_effectMechanic
+ int32 EffectMiscValue; // 12 m_effectMiscValue
+ int32 EffectMiscValueB; // 13 m_effectMiscValueB
+ float EffectPointsPerComboPoint; // 14 m_effectPointsPerCombo
+ uint32 EffectRadiusIndex; // 15 m_effectRadiusIndex - spellradius.dbc
+ uint32 EffectRadiusMaxIndex; // 16 4.0.0
+ float EffectRealPointsPerLevel; // 17 m_effectRealPointsPerLevel
+ flag96 EffectSpellClassMask; // 18 19 20 m_effectSpellClassMask1(2/3), effect 0
+ uint32 EffectTriggerSpell; // 21 m_effectTriggerSpell
+ uint32 EffectImplicitTargetA; // 22 m_implicitTargetA
+ uint32 EffectImplicitTargetB; // 23 m_implicitTargetB
+ uint32 EffectSpellId; // 24 new 4.0.0
+ uint32 EffectIndex; // 25 new 4.0.0
+ //uint32 Unk0 // 26 4.2.0
+};
+
#define MAX_SPELL_EFFECTS 3
#define MAX_EFFECT_MASK 7
#define MAX_SPELL_REAGENTS 8
+// SpellAuraOptions.dbc
+struct SpellAuraOptionsEntry
+{
+ uint32 Id; // 0 m_ID
+ uint32 StackAmount; // 1 m_cumulativeAura
+ uint32 procChance; // 2 m_procChance
+ uint32 procCharges; // 3 m_procCharges
+ uint32 procFlags; // 4 m_procTypeMask
+};
+
+// SpellAuraRestrictions.dbc/
+struct SpellAuraRestrictionsEntry
+{
+ //uint32 Id; // 0 m_ID
+ uint32 CasterAuraState; // 1 m_casterAuraState
+ uint32 TargetAuraState; // 2 m_targetAuraState
+ uint32 CasterAuraStateNot; // 3 m_excludeCasterAuraState
+ uint32 TargetAuraStateNot; // 4 m_excludeTargetAuraState
+ uint32 casterAuraSpell; // 5 m_casterAuraSpell
+ uint32 targetAuraSpell; // 6 m_targetAuraSpell
+ uint32 excludeCasterAuraSpell; // 7 m_excludeCasterAuraSpell
+ uint32 excludeTargetAuraSpell; // 8 m_excludeTargetAuraSpell
+};
+
+// SpellCastingRequirements.dbc
+struct SpellCastingRequirementsEntry
+{
+ //uint32 Id; // 0 m_ID
+ uint32 FacingCasterFlags; // 1 m_facingCasterFlags
+ //uint32 MinFactionId; // 2 m_minFactionID not used
+ //uint32 MinReputation; // 3 m_minReputation not used
+ int32 AreaGroupId; // 4 m_requiredAreaGroupId
+ //uint32 RequiredAuraVision; // 5 m_requiredAuraVision not used
+ uint32 RequiresSpellFocus; // 6 m_requiresSpellFocus
+};
+
+#define MAX_SPELL_TOTEMS 2
+
+// SpellTotems.dbc
+struct SpellTotemsEntry
+{
+ uint32 Id; // 0 m_ID
+ uint32 TotemCategory[MAX_SPELL_TOTEMS]; // 1 m_requiredTotemCategoryID
+ uint32 Totem[MAX_SPELL_TOTEMS]; // 2 m_totem
+};
+
+struct SpellTotem
+{
+ SpellTotem()
+ {
+ totems[0] = NULL;
+ totems[1] = NULL;
+ }
+ SpellTotemsEntry const* totems[MAX_SPELL_TOTEMS];
+};
+
+typedef std::map<uint32, SpellTotem> SpellTotemMap;
+
+// Spell.dbc
struct SpellEntry
{
uint32 Id; // 0 m_ID
+ uint32 Attributes; // 1 m_attribute
+ uint32 AttributesEx; // 2 m_attributesEx
+ uint32 AttributesEx2; // 3 m_attributesExB
+ uint32 AttributesEx3; // 4 m_attributesExC
+ uint32 AttributesEx4; // 5 m_attributesExD
+ uint32 AttributesEx5; // 6 m_attributesExE
+ uint32 AttributesEx6; // 7 m_attributesExF
+ uint32 AttributesEx7; // 8 m_attributesExG
+ uint32 AttributesEx8; // 9 m_attributesExH
+ // uint32 unk_400_1; // 10 4.0.0
+ // uint32 unk_420_1 // 11 4.2.0
+ uint32 CastingTimeIndex; // 12 m_castingTimeIndex
+ uint32 DurationIndex; // 13 m_durationIndex
+ uint32 powerType; // 14 m_powerType
+ uint32 rangeIndex; // 15 m_rangeIndex
+ float speed; // 16 m_speed
+ uint32 SpellVisual[2]; // 17-18 m_spellVisualID
+ uint32 SpellIconID; // 19 m_spellIconID
+ uint32 activeIconID; // 20 m_activeIconID
+ DBCString SpellName; // 21 m_name_lang
+ DBCString Rank; // 22 m_nameSubtext_lang
+ //DBCString Description; // 23 m_description_lang not used
+ //DBCString ToolTip; // 24 m_auraDescription_lang not used
+ uint32 SchoolMask; // 25 m_schoolMask
+ uint32 runeCostID; // 26 m_runeCostID
+ //uint32 spellMissileID; // 27 m_spellMissileID not used
+ //uint32 spellDescriptionVariableID; // 28 m_spellDescriptionVariableID, 3.2.0
+ uint32 SpellDifficultyId; // 29 m_spellDifficultyID - id from SpellDifficulty.dbc
+ //float unk_f1; // 30
+ uint32 SpellScalingId; // 31 SpellScaling.dbc
+ uint32 SpellAuraOptionsId; // 32 SpellAuraOptions.dbc
+ uint32 SpellAuraRestrictionsId; // 33 SpellAuraRestrictions.dbc
+ uint32 SpellCastingRequirementsId; // 34 SpellCastingRequirements.dbc
+ uint32 SpellCategoriesId; // 35 SpellCategories.dbc
+ uint32 SpellClassOptionsId; // 36 SpellClassOptions.dbc
+ uint32 SpellCooldownsId; // 37 SpellCooldowns.dbc
+ //uint32 unkIndex7; // 38 all zeros...
+ uint32 SpellEquippedItemsId; // 39 SpellEquippedItems.dbc
+ uint32 SpellInterruptsId; // 40 SpellInterrupts.dbc
+ uint32 SpellLevelsId; // 41 SpellLevels.dbc
+ uint32 SpellPowerId; // 42 SpellPower.dbc
+ uint32 SpellReagentsId; // 43 SpellReagents.dbc
+ uint32 SpellShapeshiftId; // 44 SpellShapeshift.dbc
+ uint32 SpellTargetRestrictionsId; // 45 SpellTargetRestrictions.dbc
+ uint32 SpellTotemsId; // 46 SpellTotems.dbc
+ //uint32 ResearchProject; // 47 ResearchProject.dbc
+
+ // struct access functions
+ SpellEffectEntry const* GetSpellEffect(uint32 eff) const;
+};
+
+// SpellCategories.dbc
+struct SpellCategoriesEntry
+{
+ //uint32 Id; // 0 m_ID
uint32 Category; // 1 m_category
+ uint32 DmgClass; // 153 m_defenseType
uint32 Dispel; // 2 m_dispelType
uint32 Mechanic; // 3 m_mechanic
- uint32 Attributes; // 4 m_attributes
- uint32 AttributesEx; // 5 m_attributesEx
- uint32 AttributesEx2; // 6 m_attributesExB
- uint32 AttributesEx3; // 7 m_attributesExC
- uint32 AttributesEx4; // 8 m_attributesExD
- uint32 AttributesEx5; // 9 m_attributesExE
- uint32 AttributesEx6; // 10 m_attributesExF
- uint32 AttributesEx7; // 11 m_attributesExG
- uint32 Stances; // 12 m_shapeshiftMask
- // uint32 unk_320_2; // 13 3.2.0
- uint32 StancesNot; // 14 m_shapeshiftExclude
- // uint32 unk_320_3; // 15 3.2.0
- uint32 Targets; // 16 m_targets
- uint32 TargetCreatureType; // 17 m_targetCreatureType
- uint32 RequiresSpellFocus; // 18 m_requiresSpellFocus
- uint32 FacingCasterFlags; // 19 m_facingCasterFlags
- uint32 CasterAuraState; // 20 m_casterAuraState
- uint32 TargetAuraState; // 21 m_targetAuraState
- uint32 CasterAuraStateNot; // 22 m_excludeCasterAuraState
- uint32 TargetAuraStateNot; // 23 m_excludeTargetAuraState
- uint32 casterAuraSpell; // 24 m_casterAuraSpell
- uint32 targetAuraSpell; // 25 m_targetAuraSpell
- uint32 excludeCasterAuraSpell; // 26 m_excludeCasterAuraSpell
- uint32 excludeTargetAuraSpell; // 27 m_excludeTargetAuraSpell
- uint32 CastingTimeIndex; // 28 m_castingTimeIndex
- uint32 RecoveryTime; // 29 m_recoveryTime
- uint32 CategoryRecoveryTime; // 30 m_categoryRecoveryTime
- uint32 InterruptFlags; // 31 m_interruptFlags
- uint32 AuraInterruptFlags; // 32 m_auraInterruptFlags
- uint32 ChannelInterruptFlags; // 33 m_channelInterruptFlags
- uint32 procFlags; // 34 m_procTypeMask
- uint32 procChance; // 35 m_procChance
- uint32 procCharges; // 36 m_procCharges
- uint32 maxLevel; // 37 m_maxLevel
- uint32 baseLevel; // 38 m_baseLevel
- uint32 spellLevel; // 39 m_spellLevel
- uint32 DurationIndex; // 40 m_durationIndex
- uint32 powerType; // 41 m_powerType
- uint32 manaCost; // 42 m_manaCost
- uint32 manaCostPerlevel; // 43 m_manaCostPerLevel
- uint32 manaPerSecond; // 44 m_manaPerSecond
- uint32 manaPerSecondPerLevel; // 45 m_manaPerSecondPerLeve
- uint32 rangeIndex; // 46 m_rangeIndex
- float speed; // 47 m_speed
- //uint32 modalNextSpell; // 48 m_modalNextSpell not used
- uint32 StackAmount; // 49 m_cumulativeAura
- uint32 Totem[2]; // 50-51 m_totem
- int32 Reagent[MAX_SPELL_REAGENTS]; // 52-59 m_reagent
- uint32 ReagentCount[MAX_SPELL_REAGENTS]; // 60-67 m_reagentCount
- int32 EquippedItemClass; // 68 m_equippedItemClass (value)
- int32 EquippedItemSubClassMask; // 69 m_equippedItemSubclass (mask)
- int32 EquippedItemInventoryTypeMask; // 70 m_equippedItemInvTypes (mask)
- uint32 Effect[MAX_SPELL_EFFECTS]; // 71-73 m_effect
- int32 EffectDieSides[MAX_SPELL_EFFECTS]; // 74-76 m_effectDieSides
- float EffectRealPointsPerLevel[MAX_SPELL_EFFECTS]; // 77-79 m_effectRealPointsPerLevel
- int32 EffectBasePoints[MAX_SPELL_EFFECTS]; // 80-82 m_effectBasePoints (must not be used in spell/auras explicitly, must be used cached Spell::m_currentBasePoints)
- uint32 EffectMechanic[MAX_SPELL_EFFECTS]; // 83-85 m_effectMechanic
- uint32 EffectImplicitTargetA[MAX_SPELL_EFFECTS]; // 86-88 m_implicitTargetA
- uint32 EffectImplicitTargetB[MAX_SPELL_EFFECTS]; // 89-91 m_implicitTargetB
- uint32 EffectRadiusIndex[MAX_SPELL_EFFECTS]; // 92-94 m_effectRadiusIndex - spellradius.dbc
- uint32 EffectApplyAuraName[MAX_SPELL_EFFECTS]; // 95-97 m_effectAura
- uint32 EffectAmplitude[MAX_SPELL_EFFECTS]; // 98-100 m_effectAuraPeriod
- float EffectValueMultiplier[MAX_SPELL_EFFECTS]; // 101-103
- uint32 EffectChainTarget[MAX_SPELL_EFFECTS]; // 104-106 m_effectChainTargets
- uint32 EffectItemType[MAX_SPELL_EFFECTS]; // 107-109 m_effectItemType
- int32 EffectMiscValue[MAX_SPELL_EFFECTS]; // 110-112 m_effectMiscValue
- int32 EffectMiscValueB[MAX_SPELL_EFFECTS]; // 113-115 m_effectMiscValueB
- uint32 EffectTriggerSpell[MAX_SPELL_EFFECTS]; // 116-118 m_effectTriggerSpell
- float EffectPointsPerComboPoint[MAX_SPELL_EFFECTS]; // 119-121 m_effectPointsPerCombo
- flag96 EffectSpellClassMask[MAX_SPELL_EFFECTS]; // 122-130
- uint32 SpellVisual[2]; // 131-132 m_spellVisualID
- uint32 SpellIconID; // 133 m_spellIconID
- uint32 activeIconID; // 134 m_activeIconID
- //uint32 spellPriority; // 135 not used
- char* SpellName[16]; // 136-151 m_name_lang
- //uint32 SpellNameFlag; // 152 not used
- char* Rank[16]; // 153-168 m_nameSubtext_lang
- //uint32 RankFlags; // 169 not used
- //char* Description[16]; // 170-185 m_description_lang not used
- //uint32 DescriptionFlags; // 186 not used
- //char* ToolTip[16]; // 187-202 m_auraDescription_lang not used
- //uint32 ToolTipFlags; // 203 not used
- uint32 ManaCostPercentage; // 204 m_manaCostPct
- uint32 StartRecoveryCategory; // 205 m_startRecoveryCategory
- uint32 StartRecoveryTime; // 206 m_startRecoveryTime
- uint32 MaxTargetLevel; // 207 m_maxTargetLevel
- uint32 SpellFamilyName; // 208 m_spellClassSet
- flag96 SpellFamilyFlags; // 209-211
- uint32 MaxAffectedTargets; // 212 m_maxTargets
- uint32 DmgClass; // 213 m_defenseType
- uint32 PreventionType; // 214 m_preventionType
- //uint32 StanceBarOrder; // 215 m_stanceBarOrder not used
- float EffectDamageMultiplier[MAX_SPELL_EFFECTS]; // 216-218 m_effectChainAmplitude
- //uint32 MinFactionId; // 219 m_minFactionID not used
- //uint32 MinReputation; // 220 m_minReputation not used
- //uint32 RequiredAuraVision; // 221 m_requiredAuraVision not used
- uint32 TotemCategory[2]; // 222-223 m_requiredTotemCategoryID
- int32 AreaGroupId; // 224 m_requiredAreaGroupId
- uint32 SchoolMask; // 225 m_schoolMask
- uint32 runeCostID; // 226 m_runeCostID
- //uint32 spellMissileID; // 227 m_spellMissileID not used
- //uint32 PowerDisplayId; // 228 PowerDisplay.dbc, new in 3.1
- float EffectBonusMultiplier[MAX_SPELL_EFFECTS]; // 229-231 3.2.0
- //uint32 spellDescriptionVariableID; // 232 3.2.0
- //uint32 SpellDifficultyId; // 233 3.3.0
+ uint32 PreventionType; // 154 m_preventionType
+ uint32 StartRecoveryCategory; // 145 m_startRecoveryCategory
};
typedef std::set<uint32> SpellCategorySet;
@@ -1722,16 +1801,15 @@ struct SpellDifficultyEntry
struct SpellFocusObjectEntry
{
uint32 ID; // 0
- //char* Name[16]; // 1-15 unused
- // 16 string flags, unused
+ //DBCString Name; // 1 m_name_lang
};
struct SpellRadiusEntry
{
uint32 ID;
- float radiusMin;
+ float radiusHostile;
//uint32 Unk //always 0
- float radiusMax;
+ float radiusFriend;
};
struct SpellRangeEntry
@@ -1740,12 +1818,70 @@ struct SpellRangeEntry
float minRangeHostile;
float minRangeFriend;
float maxRangeHostile;
- float maxRangeFriend;
+ float maxRangeFriend; //friend means unattackable unit here
uint32 type;
- //char* Name[16]; // 7-23 unused
- // 24 string flags, unused
- //char* Name2[16]; // 25-40 unused
- // 41 string flags, unused
+ //DBCString Name; // 6-21 m_displayName_lang
+ //DBCString ShortName; // 23-38 m_displayNameShort_lang
+};
+
+// SpellEquippedItems.dbc
+struct SpellEquippedItemsEntry
+{
+ //uint32 Id; // 0 m_ID
+ int32 EquippedItemClass; // 70 m_equippedItemClass (value)
+ int32 EquippedItemInventoryTypeMask; // 72 m_equippedItemInvTypes (mask)
+ int32 EquippedItemSubClassMask; // 71 m_equippedItemSubclass (mask)
+};
+
+// SpellCooldowns.dbc
+struct SpellCooldownsEntry
+{
+ //uint32 Id; // 0 m_ID
+ uint32 CategoryRecoveryTime; // 31 m_categoryRecoveryTime
+ uint32 RecoveryTime; // 30 m_recoveryTime
+ uint32 StartRecoveryTime; // 146 m_startRecoveryTime
+};
+
+// SpellClassOptions.dbc
+struct SpellClassOptionsEntry
+{
+ //uint32 Id; // 0 m_ID
+ //uint32 modalNextSpell; // 1 m_modalNextSpell not used
+ flag96 SpellFamilyFlags; // 2-4
+ uint32 SpellFamilyName; // 5 m_spellClassSet
+ //DBCString Description; // 6 4.0.0
+};
+
+// SpellInterrupts.dbc
+struct SpellInterruptsEntry
+{
+ //uint32 Id; // 0 m_ID
+ uint32 AuraInterruptFlags; // 33 m_auraInterruptFlags
+ //uint32 // 34 4.0.0
+ uint32 ChannelInterruptFlags; // 35 m_channelInterruptFlags
+ //uint32 // 36 4.0.0
+ uint32 InterruptFlags; // 32 m_interruptFlags
+};
+
+// SpellLevels.dbc
+struct SpellLevelsEntry
+{
+ //uint32 Id; // 0 m_ID
+ uint32 baseLevel; // 41 m_baseLevel
+ uint32 maxLevel; // 40 m_maxLevel
+ uint32 spellLevel; // 42 m_spellLevel
+};
+
+// SpellPower.dbc
+struct SpellPowerEntry
+{
+ //uint32 Id; // 0 m_ID
+ uint32 manaCost; // 45 m_manaCost
+ uint32 manaCostPerlevel; // 46 m_manaCostPerLevel
+ uint32 ManaCostPercentage; // 144 m_manaCostPct
+ uint32 manaPerSecond; // 47 m_manaPerSecond
+ //uint32 PowerDisplayId; // 168 m_powerDisplayID - id from PowerDisplay.dbc, new in 3.1
+ //uint32 unk1; // 6 4.0.0
};
struct SpellRuneCostEntry
@@ -1760,21 +1896,84 @@ struct SpellRuneCostEntry
#define MAX_SHAPESHIFT_SPELLS 8
-struct SpellShapeshiftEntry
+struct SpellShapeshiftFormEntry
{
uint32 ID; // 0
//uint32 buttonPosition; // 1 unused
- //char* Name[16]; // 2-17 unused
- //uint32 NameFlags; // 18 unused
- uint32 flags1; // 19
- int32 creatureType; // 20 <= 0 humanoid, other normal creature types
- //uint32 unk1; // 21 unused
- uint32 attackSpeed; // 22
- uint32 modelID_A; // 23 alliance modelid
- uint32 modelID_H; // 24 horde modelid (only one form)
- //uint32 unk3; // 25 unused
- //uint32 unk4; // 26 unused
- uint32 stanceSpell[MAX_SHAPESHIFT_SPELLS]; // 27 - 34 unused
+ //DBCString Name; // 2 unused
+ uint32 flags1; // 3
+ int32 creatureType; // 4 <=0 humanoid, other normal creature types
+ //uint32 unk1; // 5 unused, related to next field
+ uint32 attackSpeed; // 6
+ uint32 modelID_A; // 7 alliance modelid (0 means no model)
+ uint32 modelID_H; // 8 horde modelid (but only for one form)
+ //uint32 unk3; // 9 unused always 0
+ //uint32 unk4; // 10 unused always 0
+ uint32 stanceSpell[MAX_SHAPESHIFT_SPELLS]; // 11-18 spells which appear in the bar after shapeshifting
+ //uint32 unk5; // 19
+ //uint32 unk6; // 20
+};
+
+// SpellShapeshift.dbc
+struct SpellShapeshiftEntry
+{
+ uint32 Id; // 0 - m_ID
+ uint32 Stances; // 1 - m_shapeshiftMask
+ // uint32 unk_320_2; // 2 - 3.2.0
+ uint32 StancesNot; // 3 - m_shapeshiftExclude
+ // uint32 unk_320_3; // 4 - 3.2.0
+ // uint32 StanceBarOrder; // 5 - m_stanceBarOrder not used
+};
+
+// SpellTargetRestrictions.dbc
+struct SpellTargetRestrictionsEntry
+{
+ uint32 Id; // 0 m_ID
+ uint32 MaxAffectedTargets; // 152 m_maxTargets
+ uint32 MaxTargetLevel; // 147 m_maxTargetLevel
+ uint32 TargetCreatureType; // 18 m_targetCreatureType
+ uint32 Targets; // 17 m_targets
+};
+
+// SpellReagents.dbc
+struct SpellReagentsEntry
+{
+ //uint32 Id; // 0 m_ID
+ int32 Reagent[MAX_SPELL_REAGENTS]; // 54-61 m_reagent
+ uint32 ReagentCount[MAX_SPELL_REAGENTS]; // 62-69 m_reagentCount
+};
+
+struct SpellReagent
+{
+ SpellReagent()
+ {
+ reagents[0] = NULL;
+ reagents[1] = NULL;
+ reagents[2] = NULL;
+ reagents[3] = NULL;
+ reagents[4] = NULL;
+ reagents[5] = NULL;
+ reagents[6] = NULL;
+ reagents[7] = NULL;
+ }
+ SpellReagentsEntry const* reagents[MAX_SPELL_REAGENTS];
+};
+
+typedef std::map<uint32, SpellReagent> SpellReagentMap;
+
+// SpellScaling.dbc
+struct SpellScalingEntry
+{
+ //uint32 Id; // 0 m_ID
+ int32 castTimeMin; // 1
+ int32 castTimeMax; // 2
+ uint32 castScalingMaxLevel; // 3
+ uint32 playerClass; // 4 (index * 100) + charLevel => gtSpellScaling.dbc
+ float Multiplier[3]; // 5-7
+ float RandomMultiplier[3]; // 8-10
+ float OtherMultiplier[3]; // 11-13
+ float CoefBase; // 14 some coefficient, mostly 1.0f
+ uint32 CoefLevelBase; // 15 some level
};
struct SpellDurationEntry
@@ -1791,15 +1990,15 @@ struct SpellItemEnchantmentEntry
uint32 amount[MAX_ITEM_ENCHANTMENT_EFFECTS]; // 5-7 m_effectPointsMin[MAX_ITEM_ENCHANTMENT_EFFECTS]
//uint32 amount2[MAX_ITEM_ENCHANTMENT_EFFECTS] // 8-10 m_effectPointsMax[MAX_ITEM_ENCHANTMENT_EFFECTS]
uint32 spellid[MAX_ITEM_ENCHANTMENT_EFFECTS]; // 11-13 m_effectArg[MAX_ITEM_ENCHANTMENT_EFFECTS]
- char* description[16]; // 14-29 m_name_lang[16]
- //uint32 descriptionFlags; // 30 name flags
- uint32 aura_id; // 31 m_itemVisual
- uint32 slot; // 32 m_flags
- uint32 GemID; // 33 m_src_itemID
- uint32 EnchantmentCondition; // 34 m_condition_id
- uint32 requiredSkill; // 35 m_requiredSkillID
- uint32 requiredSkillValue; // 36 m_requiredSkillRank
- uint32 requiredLevel; // 37 m_requiredLevel
+ DBCString description; // 14 m_name_lang
+ uint32 aura_id; // 15 m_itemVisual
+ uint32 slot; // 16 m_flags
+ uint32 GemID; // 17 m_src_itemID
+ uint32 EnchantmentCondition; // 18 m_condition_id
+ uint32 requiredSkill; // 19 m_requiredSkillID
+ uint32 requiredSkillValue; // 20 m_requiredSkillRank
+ uint32 requiredLevel; // 21 new in 3.1
+ // 22 new in 3.1
};
struct SpellItemEnchantmentConditionEntry
@@ -2134,6 +2333,19 @@ struct TalentSpellPos
typedef std::map<uint32, TalentSpellPos> TalentSpellPosMap;
+struct SpellEffect
+{
+ SpellEffect()
+ {
+ effects[0] = NULL;
+ effects[1] = NULL;
+ effects[2] = NULL;
+ }
+ SpellEffectEntry const* effects[3];
+};
+
+typedef std::map<uint32, SpellEffect> SpellEffectMap;
+
struct TaxiPathBySourceAndDestination
{
TaxiPathBySourceAndDestination() : ID(0), price(0) {}
diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h
index ab25d942d37..3289f1b9615 100755
--- a/src/server/game/DataStores/DBCfmt.h
+++ b/src/server/game/DataStores/DBCfmt.h
@@ -77,6 +77,10 @@ const char GtRegenMPPerSptfmt[]="xf";
const char Holidaysfmt[]="nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
const char Itemfmt[]="niiiiiii";
const char ItemBagFamilyfmt[]="nx";
+const char ItemArmorQualityfmt[]="nfffffffi";
+const char ItemArmorShieldfmt[]="nifffffff";
+const char ItemArmorTotalfmt[]="niffff";
+const char ItemDamagefmt[]="nfffffffi";
const char ItemClassfmt[]="dixxx";
//const char ItemDisplayTemplateEntryfmt[]="nxxxxxxxxxxixxxxxxxxxxx";
//const char ItemCondExtCostsEntryfmt[]="xiii";
@@ -105,20 +109,36 @@ const char SkillLinefmt[]="nisxixi";
const char SkillLineAbilityfmt[]="niiiixxiiiiixx";
const char SoundEntriesfmt[]="nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
const char SpellCastTimefmt[]="nixx";
+const char SpellCategoriesEntryfmt[]="diiiiii";
const char SpellDifficultyfmt[]="niiii";
const std::string CustomSpellDifficultyfmt="ppppp";
const std::string CustomSpellDifficultyIndex="id";
const char SpellDurationfmt[]="niii";
-const char SpellEntryfmt[]="niiiiiiiiiiiixixiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiifxiiiiiiiiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiiiiifffiiiiiiiiiiiiixssssssssssssssssxssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiiiiiiiiiiixfffxxxiiiiixxfffxx";
+const char SpellEffectEntryfmt[]="nifiiiffiiiiiifiifiiiiiiiix";
+const char SpellEntryfmt[]="niiiiiiiiixxiiiifiiiissxxiixxixiiiiiiixiiiiiiiix";
const std::string CustomSpellEntryfmt="papppppppppppapapaaaaaaaaaaapaaapapppppppaaaaapaapaaaaaaaaaaaaaaaaaappppppppppppppppppppppppppppppppppppaaaaaapppppppppaaapppppppppaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaappppppppapppaaaaappaaaaaaa";
const std::string CustomSpellEntryIndex = "Id";
-const char SpellFocusObjectfmt[]="nxxxxxxxxxxxxxxxxx";
-const char SpellItemEnchantmentfmt[]="nxiiiiiixxxiiissssssssssssssssxiiiiiii";
+const char SpellFocusObjectfmt[]="nx";
+const char SpellItemEnchantmentfmt[]="nxiiiiiixxxiiisiiiiiiix";
const char SpellItemEnchantmentConditionfmt[]="nbbbbbxxxxxbbbbbbbbbbiiiiiXXXXX";
const char SpellRadiusfmt[]="nfxf";
-const char SpellRangefmt[]="nffffixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
+const char SpellRangefmt[]="nffffixx";
+const char SpellReagentsEntryfmt[]="diiiiiiiiiiiiiiii";
+const char SpellScalingEntryfmt[]="diiiiffffffffffi";
+const char SpellTotemsEntryfmt[]="niiii";
+const char SpellTargetRestrictionsEntryfmt[]="nxiiii";
+const char SpellPowerEntryfmt[]="diiiixx";
+const char SpellInterruptsEntryfmt[]="dixixi";
+const char SpellEquippedItemsEntryfmt[]="diii";
+const char SpellAuraOptionsEntryfmt[]="niiii";
+const char SpellAuraRestrictionsEntryfmt[]="diiiiiiii";
+const char SpellCastingRequirementsEntryfmt[]="dixxixi";
+const char SpellClassOptionsEntryfmt[]="dxiiiix";
+const char SpellCooldownsEntryfmt[]="diii";
+const char SpellLevelsEntryfmt[]="diii";
const char SpellRuneCostfmt[]="niiii";
-const char SpellShapeshiftfmt[]="nxxxxxxxxxxxxxxxxxxiixiiixxiiiiiiii";
+const char SpellShapeshiftEntryfmt[]="nixixx";
+const char SpellShapeshiftFormfmt[]="nxxiixiiixxiiiiiiiixx";
const char StableSlotPricesfmt[] = "ni";
const char SummonPropertiesfmt[] = "niiiii";
const char TalentEntryfmt[]="niiiiiiiiixxixxxxxx";
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 8380c568e1f..c999bad1af4 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -20437,7 +20437,7 @@ void Player::InitDataForForm(bool reapplyMods)
{
ShapeshiftForm form = GetShapeshiftForm();
- SpellShapeshiftEntry const* ssEntry = sSpellShapeshiftStore.LookupEntry(form);
+ SpellShapeshiftFormEntry const* ssEntry = sSpellShapeshiftFormStore.LookupEntry(form);
if (ssEntry && ssEntry->attackSpeed)
{
SetAttackTime(BASE_ATTACK, ssEntry->attackSpeed);
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index dc1c4105fea..cf021532abb 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -13326,7 +13326,7 @@ uint32 Unit::GetCreatureType() const
if (GetTypeId() == TYPEID_PLAYER)
{
ShapeshiftForm form = GetShapeshiftForm();
- SpellShapeshiftEntry const* ssEntry = sSpellShapeshiftStore.LookupEntry(form);
+ SpellShapeshiftFormEntry const* ssEntry = sSpellShapeshiftFormStore.LookupEntry(form);
if (ssEntry && ssEntry->creatureType > 0)
return ssEntry->creatureType;
else
@@ -16762,7 +16762,7 @@ uint32 Unit::GetModelForForm(ShapeshiftForm form)
}
uint32 modelid = 0;
- SpellShapeshiftEntry const* formEntry = sSpellShapeshiftStore.LookupEntry(form);
+ SpellShapeshiftFormEntry const* formEntry = sSpellShapeshiftFormStore.LookupEntry(form);
if (formEntry && formEntry->modelID_A)
{
// Take the alliance modelid as default
diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp
index 9650afb60e2..0fcb342fcfc 100755
--- a/src/server/game/Quests/QuestDef.cpp
+++ b/src/server/game/Quests/QuestDef.cpp
@@ -225,7 +225,7 @@ uint32 Quest::CalculateHonorGain(uint8 level) const
uint32 honor = 0;
- if (GetRewHonorAddition() > 0 || GetRewHonorMultiplier() > 0.0f)
+ /*if (GetRewHonorAddition() > 0 || GetRewHonorMultiplier() > 0.0f)
{
// values stored from 0.. for 1...
TeamContributionPointsEntry const* tc = sTeamContributionPointsStore.LookupEntry(level-1);
@@ -233,7 +233,7 @@ uint32 Quest::CalculateHonorGain(uint8 level) const
return 0;
honor = uint32(tc->value * GetRewHonorMultiplier() * 0.1000000014901161);
honor += GetRewHonorAddition();
- }
+ }*/
return honor;
}
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 152f94ad420..e68f5668cb1 100755
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -2115,7 +2115,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
if (target->GetTypeId() == TYPEID_PLAYER)
{
- SpellShapeshiftEntry const* shapeInfo = sSpellShapeshiftStore.LookupEntry(form);
+ SpellShapeshiftFormEntry const* shapeInfo = sSpellShapeshiftFormStore.LookupEntry(form);
// Learn spells for shapeshift form - no need to send action bars or add spells to spellbook
for (uint8 i = 0; i<MAX_SHAPESHIFT_SPELLS; ++i)
{
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 29ad870448e..40b95d497b0 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -4692,7 +4692,7 @@ SpellCastResult Spell::CheckCast(bool strict)
SpellEffectInfo const* effInfo = &m_spellInfo->Effects[effIndex];
if (effInfo->ApplyAuraName == SPELL_AURA_MOD_SHAPESHIFT)
{
- SpellShapeshiftEntry const* shapeShiftEntry = sSpellShapeshiftStore.LookupEntry(effInfo->MiscValue);
+ SpellShapeshiftFormEntry const* shapeShiftEntry = sSpellShapeshiftFormStore.LookupEntry(effInfo->MiscValue);
if (shapeShiftEntry && (shapeShiftEntry->flags1 & 1) == 0) // unk flag
checkMask |= VEHICLE_SEAT_FLAG_UNCONTROLLED;
break;
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 972276c7d26..78de015f200 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -459,28 +459,31 @@ SpellImplicitTargetInfo::StaticData SpellImplicitTargetInfo::_data[TOTAL_SPELL_
SpellEffectInfo::SpellEffectInfo(SpellEntry const* spellEntry, SpellInfo const* spellInfo, uint8 effIndex)
{
+ SpellEffectEntry const* _effect = spellEntry->GetSpellEffect(effIndex);
+
_spellInfo = spellInfo;
_effIndex = effIndex;
- Effect = spellEntry->Effect[effIndex];
- ApplyAuraName = spellEntry->EffectApplyAuraName[effIndex];
- Amplitude = spellEntry->EffectAmplitude[effIndex];
- DieSides = spellEntry->EffectDieSides[effIndex];
- RealPointsPerLevel = spellEntry->EffectRealPointsPerLevel[effIndex];
- BasePoints = spellEntry->EffectBasePoints[effIndex];
- PointsPerComboPoint = spellEntry->EffectPointsPerComboPoint[effIndex];
- ValueMultiplier = spellEntry->EffectValueMultiplier[effIndex];
- DamageMultiplier = spellEntry->EffectDamageMultiplier[effIndex];
- BonusMultiplier = spellEntry->EffectBonusMultiplier[effIndex];
- MiscValue = spellEntry->EffectMiscValue[effIndex];
- MiscValueB = spellEntry->EffectMiscValueB[effIndex];
- Mechanic = Mechanics(spellEntry->EffectMechanic[effIndex]);
- TargetA = SpellImplicitTargetInfo(spellEntry->EffectImplicitTargetA[effIndex]);
- TargetB = SpellImplicitTargetInfo(spellEntry->EffectImplicitTargetB[effIndex]);
- RadiusEntry = spellEntry->EffectRadiusIndex[effIndex] ? sSpellRadiusStore.LookupEntry(spellEntry->EffectRadiusIndex[effIndex]) : NULL;
- ChainTarget = spellEntry->EffectChainTarget[effIndex];
- ItemType = spellEntry->EffectItemType[effIndex];
- TriggerSpell = spellEntry->EffectTriggerSpell[effIndex];
- SpellClassMask = spellEntry->EffectSpellClassMask[effIndex];
+
+ Effect = _effect ? _effect->Effect : 0;
+ ApplyAuraName = _effect ? _effect->EffectApplyAuraName : 0;
+ Amplitude = _effect ? _effect->EffectAmplitude : 0;
+ DieSides = _effect ? _effect->EffectDieSides : 0;
+ RealPointsPerLevel = _effect ? _effect->EffectRealPointsPerLevel : 0.0f;
+ BasePoints = _effect ? _effect->EffectBasePoints : 0;
+ PointsPerComboPoint = _effect ? _effect->EffectPointsPerComboPoint : 0.0f;
+ ValueMultiplier = _effect ? _effect->EffectValueMultiplier : 0.0f;
+ DamageMultiplier = _effect ? _effect->EffectDamageMultiplier : 0.0f;
+ BonusMultiplier = _effect ? _effect->EffectBonusMultiplier : 0.0f;
+ MiscValue = _effect ? _effect->EffectMiscValue : 0;
+ MiscValueB = _effect ? _effect->EffectMiscValueB : 0;
+ Mechanic = Mechanics(_effect ? _effect->EffectMechanic : 0);
+ TargetA = SpellImplicitTargetInfo(_effect ? _effect->EffectImplicitTargetA : 0);
+ TargetB = SpellImplicitTargetInfo(_effect ? _effect->EffectImplicitTargetB : 0);
+ RadiusEntry = _effect && _effect->EffectRadiusIndex ? sSpellRadiusStore.LookupEntry(_effect->EffectRadiusIndex) : NULL;
+ ChainTarget = _effect ? _effect->EffectChainTarget : 0;
+ ItemType = _effect ? _effect->EffectItemType : 0;
+ TriggerSpell = _effect ? _effect->EffectTriggerSpell : 0;
+ SpellClassMask = _effect ? _effect->EffectSpellClassMask : flag96(0);
}
bool SpellEffectInfo::IsEffect() const
@@ -634,8 +637,8 @@ float SpellEffectInfo::CalcRadius(Unit* caster, Spell* spell) const
{
if (!HasRadius())
return 0.0f;
-
- float radius = RadiusEntry->radiusMax;
+ //TODO: FIX radius value
+ float radius = RadiusEntry->ID;
if (Player* modOwner = (caster ? caster->GetSpellModOwner() : NULL))
modOwner->ApplySpellMod(_spellInfo->Id, SPELLMOD_RADIUS, radius, spell);
@@ -854,9 +857,6 @@ SpellEffectInfo::StaticData SpellEffectInfo::_data[TOTAL_SPELL_EFFECTS] =
SpellInfo::SpellInfo(SpellEntry const* spellEntry)
{
Id = spellEntry->Id;
- Category = spellEntry->Category;
- Dispel = spellEntry->Dispel;
- Mechanic = spellEntry->Mechanic;
Attributes = spellEntry->Attributes;
AttributesEx = spellEntry->AttributesEx;
AttributesEx2 = spellEntry->AttributesEx2;
@@ -865,75 +865,150 @@ SpellInfo::SpellInfo(SpellEntry const* spellEntry)
AttributesEx5 = spellEntry->AttributesEx5;
AttributesEx6 = spellEntry->AttributesEx6;
AttributesEx7 = spellEntry->AttributesEx7;
+ AttributesEx8 = spellEntry->AttributesEx8;
AttributesCu = 0;
- Stances = spellEntry->Stances;
- StancesNot = spellEntry->StancesNot;
- Targets = spellEntry->Targets;
- TargetCreatureType = spellEntry->TargetCreatureType;
- RequiresSpellFocus = spellEntry->RequiresSpellFocus;
- FacingCasterFlags = spellEntry->FacingCasterFlags;
- CasterAuraState = spellEntry->CasterAuraState;
- TargetAuraState = spellEntry->TargetAuraState;
- CasterAuraStateNot = spellEntry->CasterAuraStateNot;
- TargetAuraStateNot = spellEntry->TargetAuraStateNot;
- CasterAuraSpell = spellEntry->casterAuraSpell;
- TargetAuraSpell = spellEntry->targetAuraSpell;
- ExcludeCasterAuraSpell = spellEntry->excludeCasterAuraSpell;
- ExcludeTargetAuraSpell = spellEntry->excludeTargetAuraSpell;
CastTimeEntry = spellEntry->CastingTimeIndex ? sSpellCastTimesStore.LookupEntry(spellEntry->CastingTimeIndex) : NULL;
- RecoveryTime = spellEntry->RecoveryTime;
- CategoryRecoveryTime = spellEntry->CategoryRecoveryTime;
- StartRecoveryCategory = spellEntry->StartRecoveryCategory;
- StartRecoveryTime = spellEntry->StartRecoveryTime;
- InterruptFlags = spellEntry->InterruptFlags;
- AuraInterruptFlags = spellEntry->AuraInterruptFlags;
- ChannelInterruptFlags = spellEntry->ChannelInterruptFlags;
- ProcFlags = spellEntry->procFlags;
- ProcChance = spellEntry->procChance;
- ProcCharges = spellEntry->procCharges;
- MaxLevel = spellEntry->maxLevel;
- BaseLevel = spellEntry->baseLevel;
- SpellLevel = spellEntry->spellLevel;
DurationEntry = spellEntry->DurationIndex ? sSpellDurationStore.LookupEntry(spellEntry->DurationIndex) : NULL;
PowerType = spellEntry->powerType;
- ManaCost = spellEntry->manaCost;
- ManaCostPerlevel = spellEntry->manaCostPerlevel;
- ManaPerSecond = spellEntry->manaPerSecond;
- ManaPerSecondPerLevel = spellEntry->manaPerSecondPerLevel;
- ManaCostPercentage = spellEntry->ManaCostPercentage;
- RuneCostID = spellEntry->runeCostID;
RangeEntry = spellEntry->rangeIndex ? sSpellRangeStore.LookupEntry(spellEntry->rangeIndex) : NULL;
Speed = spellEntry->speed;
- StackAmount = spellEntry->StackAmount;
- for (uint8 i = 0; i < 2; ++i)
- Totem[i] = spellEntry->Totem[i];
- for (uint8 i = 0; i < MAX_SPELL_REAGENTS; ++i)
- Reagent[i] = spellEntry->Reagent[i];
- for (uint8 i = 0; i < MAX_SPELL_REAGENTS; ++i)
- ReagentCount[i] = spellEntry->ReagentCount[i];
- EquippedItemClass = spellEntry->EquippedItemClass;
- EquippedItemSubClassMask = spellEntry->EquippedItemSubClassMask;
- EquippedItemInventoryTypeMask = spellEntry->EquippedItemInventoryTypeMask;
- for (uint8 i = 0; i < 2; ++i)
- TotemCategory[i] = spellEntry->TotemCategory[i];
for (uint8 i = 0; i < 2; ++i)
SpellVisual[i] = spellEntry->SpellVisual[i];
SpellIconID = spellEntry->SpellIconID;
ActiveIconID = spellEntry->activeIconID;
- for (uint8 i = 0; i < 16; ++i)
- SpellName[i] = spellEntry->SpellName[i];
- for (uint8 i = 0; i < 16; ++i)
- Rank[i] = spellEntry->Rank[i];
- MaxTargetLevel = spellEntry->MaxTargetLevel;
- MaxAffectedTargets = spellEntry->MaxAffectedTargets;
- SpellFamilyName = spellEntry->SpellFamilyName;
- SpellFamilyFlags = spellEntry->SpellFamilyFlags;
- DmgClass = spellEntry->DmgClass;
- PreventionType = spellEntry->PreventionType;
- AreaGroupId = spellEntry->AreaGroupId;
+ SpellName = spellEntry->SpellName;
+ Rank = spellEntry->Rank;
SchoolMask = spellEntry->SchoolMask;
+ RuneCostID = spellEntry->runeCostID;
+ SpellDifficultyId = spellEntry->SpellDifficultyId;
+ SpellScalingId = spellEntry->SpellScalingId;
+ SpellAuraOptionsId = spellEntry->SpellAuraOptionsId;
+ SpellAuraRestrictionsId = spellEntry->SpellAuraRestrictionsId;
+ SpellCastingRequirementsId = spellEntry->SpellCastingRequirementsId;
+ SpellCategoriesId = spellEntry->SpellCategoriesId;
+ SpellClassOptionsId = spellEntry->SpellClassOptionsId;
+ SpellCooldownsId = spellEntry->SpellCooldownsId;
+ SpellEquippedItemsId = spellEntry->SpellEquippedItemsId;
+ SpellInterruptsId = spellEntry->SpellInterruptsId;
+ SpellLevelsId = spellEntry->SpellLevelsId;
+ SpellPowerId = spellEntry->SpellPowerId;
+ SpellReagentsId = spellEntry->SpellReagentsId;
+ SpellShapeshiftId = spellEntry->SpellShapeshiftId;
+ SpellTargetRestrictionsId = spellEntry->SpellTargetRestrictionsId;
+ SpellTotemsId = spellEntry->SpellTotemsId;
+
+ // SpellDifficultyEntry
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
Effects[i] = SpellEffectInfo(spellEntry, this, i);
+
+ // SpellScalingEntry
+ SpellScalingEntry const* _scaling = GetSpellScaling();
+ castTimeMin = _scaling ? _scaling->castTimeMin : 0;
+ castTimeMax = _scaling ?_scaling->castTimeMax : 0;
+ castScalingMaxLevel = _scaling ? _scaling->castScalingMaxLevel : 0;
+ playerClass = _scaling ? _scaling->playerClass : 0;
+ for (uint8 i = 0; i < 3; ++i)
+ {
+ Multiplier[i] = _scaling ? _scaling->Multiplier[i] : 0;
+ RandomMultiplier[i] = _scaling ? _scaling->RandomMultiplier[i] : 0;
+ OtherMultiplier[i] = _scaling ? _scaling->OtherMultiplier[i] : 0;
+ }
+ CoefBase = _scaling ? _scaling->CoefBase : 0;
+ CoefLevelBase = _scaling ? _scaling->CoefLevelBase : 0;
+
+ // SpellAuraOptionsEntry
+ SpellAuraOptionsEntry const* _options = GetSpellAuraOptions();
+ ProcFlags = _options ? _options->procFlags : 0;
+ ProcChance = _options ? _options->procChance : 0;
+ ProcCharges = _options ? _options->procCharges : 0;
+ StackAmount = _options ? _options->StackAmount : 0;
+
+ // SpellAuraRestrictionsEntry
+ SpellAuraRestrictionsEntry const* _aura = GetSpellAuraRestrictions();
+ CasterAuraState = _aura ? _aura->CasterAuraState : 0;
+ TargetAuraState = _aura ? _aura->TargetAuraState : 0;
+ CasterAuraStateNot = _aura ? _aura->CasterAuraStateNot : 0;
+ TargetAuraStateNot = _aura ? _aura->TargetAuraStateNot : 0;
+ CasterAuraSpell = _aura ? _aura->casterAuraSpell : 0;
+ TargetAuraSpell = _aura ? _aura->targetAuraSpell : 0;
+ ExcludeCasterAuraSpell = _aura ? _aura->excludeCasterAuraSpell : 0;
+ ExcludeTargetAuraSpell = _aura ? _aura->excludeTargetAuraSpell : 0;
+
+ // SpellCastingRequirementsEntry
+ SpellCastingRequirementsEntry const* _castreq = GetSpellCastingRequirements();
+ RequiresSpellFocus = _castreq ? _castreq->RequiresSpellFocus : 0;
+ FacingCasterFlags = _castreq ? _castreq->FacingCasterFlags : 0;
+ AreaGroupId = _castreq ? _castreq->AreaGroupId : -1;
+
+ // SpellCategoriesEntry
+ SpellCategoriesEntry const* _categorie = GetSpellCategories();
+ Category = _categorie ? _categorie->Category : 0;
+ Dispel = _categorie ? _categorie->Dispel : 0;
+ Mechanic = _categorie ? _categorie->Mechanic : 0;
+ StartRecoveryCategory = _categorie ? _categorie->StartRecoveryCategory : 0;
+ DmgClass = _categorie ? _categorie->DmgClass : 0;
+ PreventionType = _categorie ? _categorie->PreventionType : 0;
+
+ // SpellClassOptionsEntry
+ SpellClassOptionsEntry const* _class = GetSpellClassOptions();
+ SpellFamilyName = _class ? _class->SpellFamilyName : 0;
+ SpellFamilyFlags = _class ? _class->SpellFamilyFlags : flag96(0);
+
+ // SpellCooldownsEntry
+ SpellCooldownsEntry const* _cooldowns = GetSpellCooldowns();
+ RecoveryTime = _cooldowns ? _cooldowns->RecoveryTime : 0;
+ CategoryRecoveryTime = _cooldowns ? _cooldowns->CategoryRecoveryTime : 0;
+ StartRecoveryTime = _cooldowns ? _cooldowns->StartRecoveryTime : 0;
+
+ // SpellEquippedItemsEntry
+ SpellEquippedItemsEntry const* _equipped = GetSpellEquippedItems();
+ EquippedItemClass = _equipped ? _equipped->EquippedItemClass : -1;
+ EquippedItemSubClassMask = _equipped ?_equipped->EquippedItemSubClassMask : -1;
+ EquippedItemInventoryTypeMask = _equipped ? _equipped->EquippedItemInventoryTypeMask : -1;
+
+ // SpellInterruptsEntry
+ SpellInterruptsEntry const* _interrupt = GetSpellInterrupts();
+ InterruptFlags = _interrupt ? _interrupt->InterruptFlags : 0;
+ AuraInterruptFlags = _interrupt ? _interrupt->AuraInterruptFlags : 0;
+ ChannelInterruptFlags = _interrupt ? _interrupt->ChannelInterruptFlags : 0;
+
+ // SpellLevelsEntry
+ SpellLevelsEntry const* _levels = GetSpellLevels();
+ MaxLevel = _levels ? _levels->maxLevel : 0;
+ BaseLevel = _levels ? _levels->baseLevel : 0;
+ SpellLevel = _levels ? _levels->spellLevel : 0;
+
+ // SpellPowerEntry
+ SpellPowerEntry const* _power = GetSpellPower();
+ ManaCost = _power ? _power->manaCost : 0;
+ ManaPerSecond = _power ? _power->manaPerSecond : 0;
+ ManaCostPercentage = _power ? _power->ManaCostPercentage : 0;
+
+ // SpellReagentsEntry
+ SpellReagentsEntry const* _reagents = GetSpellReagents();
+ for (uint8 i = 0; i < MAX_SPELL_REAGENTS; ++i)
+ Reagent[i] = _reagents ? _reagents->Reagent[i] : 0;
+ for (uint8 i = 0; i < MAX_SPELL_REAGENTS; ++i)
+ ReagentCount[i] = _reagents ? _reagents->ReagentCount[i] : 0;
+
+ // SpellShapeshiftEntry
+ SpellShapeshiftEntry const* _shapeshift = GetSpellShapeshift();
+ Stances = _shapeshift ? _shapeshift->Stances : 0;
+ StancesNot = _shapeshift ? _shapeshift->StancesNot : 0;
+
+ // SpellTargetRestrictionsEntry
+ SpellTargetRestrictionsEntry const* _target = GetSpellTargetRestrictions();
+ Targets = _target ? _target->Targets : 0;
+ TargetCreatureType = _target ? _target->TargetCreatureType : 0;
+ MaxAffectedTargets = _target ? _target->MaxAffectedTargets : 0;
+
+ // SpellTotemsEntry
+ SpellTotemsEntry const* _totem = GetSpellTotems();
+ for (uint8 i = 0; i < 2; ++i)
+ TotemCategory[i] = _totem ? _totem->TotemCategory[i] : 0;
+ for (uint8 i = 0; i < 2; ++i)
+ Totem[i] = _totem ? _totem->Totem[i] : 0;
+
ExplicitTargetMask = _GetExplicitTargetMask();
ChainEntry = NULL;
}
@@ -1381,10 +1456,10 @@ SpellCastResult SpellInfo::CheckShapeshift(uint32 form) const
return SPELL_CAST_OK;
bool actAsShifted = false;
- SpellShapeshiftEntry const* shapeInfo = NULL;
+ SpellShapeshiftFormEntry const* shapeInfo = NULL;
if (form > 0)
{
- shapeInfo = sSpellShapeshiftStore.LookupEntry(form);
+ shapeInfo = sSpellShapeshiftFormStore.LookupEntry(form);
if (!shapeInfo)
{
sLog->outError("GetErrorAtShapeshiftedCast: unknown shapeshift %u", form);
@@ -2522,3 +2597,83 @@ bool SpellInfo::_IsPositiveTarget(uint32 targetA, uint32 targetB)
return _IsPositiveTarget(targetB, 0);
return true;
}
+
+SpellTargetRestrictionsEntry const* SpellInfo::GetSpellTargetRestrictions() const
+{
+ return SpellTargetRestrictionsId ? sSpellTargetRestrictionsStore.LookupEntry(SpellTargetRestrictionsId) : NULL;
+}
+
+SpellEquippedItemsEntry const* SpellInfo::GetSpellEquippedItems() const
+{
+ return SpellEquippedItemsId ? sSpellEquippedItemsStore.LookupEntry(SpellEquippedItemsId) : NULL;
+}
+
+SpellInterruptsEntry const* SpellInfo::GetSpellInterrupts() const
+{
+ return SpellInterruptsId ? sSpellInterruptsStore.LookupEntry(SpellInterruptsId) : NULL;
+}
+
+SpellLevelsEntry const* SpellInfo::GetSpellLevels() const
+{
+ return SpellLevelsId ? sSpellLevelsStore.LookupEntry(SpellLevelsId) : NULL;
+}
+
+SpellPowerEntry const* SpellInfo::GetSpellPower() const
+{
+ return SpellPowerId ? sSpellPowerStore.LookupEntry(SpellPowerId) : NULL;
+}
+
+SpellReagentsEntry const* SpellInfo::GetSpellReagents() const
+{
+ return SpellReagentsId ? sSpellReagentsStore.LookupEntry(SpellReagentsId) : NULL;
+}
+
+SpellScalingEntry const* SpellInfo::GetSpellScaling() const
+{
+ return SpellScalingId ? sSpellScalingStore.LookupEntry(SpellScalingId) : NULL;
+}
+
+SpellShapeshiftEntry const* SpellInfo::GetSpellShapeshift() const
+{
+ return SpellShapeshiftId ? sSpellShapeshiftStore.LookupEntry(SpellShapeshiftId) : NULL;
+}
+
+SpellTotemsEntry const* SpellInfo::GetSpellTotems() const
+{
+ return SpellTotemsId ? sSpellTotemsStore.LookupEntry(SpellTotemsId) : NULL;
+}
+
+SpellAuraOptionsEntry const* SpellInfo::GetSpellAuraOptions() const
+{
+ return SpellAuraOptionsId ? sSpellAuraOptionsStore.LookupEntry(SpellAuraOptionsId) : NULL;
+}
+
+SpellAuraRestrictionsEntry const* SpellInfo::GetSpellAuraRestrictions() const
+{
+ return SpellAuraRestrictionsId ? sSpellAuraRestrictionsStore.LookupEntry(SpellAuraRestrictionsId) : NULL;
+}
+
+SpellCastingRequirementsEntry const* SpellInfo::GetSpellCastingRequirements() const
+{
+ return SpellCastingRequirementsId ? sSpellCastingRequirementsStore.LookupEntry(SpellCastingRequirementsId) : NULL;
+}
+
+SpellCategoriesEntry const* SpellInfo::GetSpellCategories() const
+{
+ return SpellCategoriesId ? sSpellCategoriesStore.LookupEntry(SpellCategoriesId) : NULL;
+}
+
+SpellClassOptionsEntry const* SpellInfo::GetSpellClassOptions() const
+{
+ return SpellClassOptionsId ? sSpellClassOptionsStore.LookupEntry(SpellClassOptionsId) : NULL;
+}
+
+SpellCooldownsEntry const* SpellInfo::GetSpellCooldowns() const
+{
+ return SpellCooldownsId ? sSpellCooldownsStore.LookupEntry(SpellCooldownsId) : NULL;
+}
+
+SpellEffectEntry const* SpellEntry::GetSpellEffect(uint32 eff) const
+{
+ return GetSpellEffectEntry(Id, eff);
+} \ No newline at end of file
diff --git a/src/server/game/Spells/SpellInfo.h b/src/server/game/Spells/SpellInfo.h
index 7faf0de890d..c6947372b0f 100644
--- a/src/server/game/Spells/SpellInfo.h
+++ b/src/server/game/Spells/SpellInfo.h
@@ -323,6 +323,7 @@ public:
uint32 AttributesEx5;
uint32 AttributesEx6;
uint32 AttributesEx7;
+ uint32 AttributesEx8;
uint32 AttributesCu;
uint32 Stances;
uint32 StancesNot;
@@ -373,8 +374,8 @@ public:
uint32 SpellVisual[2];
uint32 SpellIconID;
uint32 ActiveIconID;
- char* SpellName[16];
- char* Rank[16];
+ DBCString SpellName;
+ DBCString Rank;
uint32 MaxTargetLevel;
uint32 MaxAffectedTargets;
uint32 SpellFamilyName;
@@ -383,10 +384,53 @@ public:
uint32 PreventionType;
int32 AreaGroupId;
uint32 SchoolMask;
+ uint32 SpellDifficultyId;
+ uint32 SpellScalingId;
+ uint32 SpellAuraOptionsId;
+ uint32 SpellAuraRestrictionsId;
+ uint32 SpellCastingRequirementsId;
+ uint32 SpellCategoriesId;
+ uint32 SpellClassOptionsId;
+ uint32 SpellCooldownsId;
+ uint32 SpellEquippedItemsId;
+ uint32 SpellInterruptsId;
+ uint32 SpellLevelsId;
+ uint32 SpellPowerId;
+ uint32 SpellReagentsId;
+ uint32 SpellShapeshiftId;
+ uint32 SpellTargetRestrictionsId;
+ uint32 SpellTotemsId;
+ // SpellScalingEntry
+ int32 castTimeMin;
+ int32 castTimeMax;
+ uint32 castScalingMaxLevel;
+ uint32 playerClass;
+ float Multiplier[3];
+ float RandomMultiplier[3];
+ float OtherMultiplier[3];
+ float CoefBase;
+ uint32 CoefLevelBase;
SpellEffectInfo Effects[MAX_SPELL_EFFECTS];
uint32 ExplicitTargetMask;
SpellChainNode const* ChainEntry;
+ // struct access functions
+ SpellTargetRestrictionsEntry const* GetSpellTargetRestrictions() const;
+ SpellAuraOptionsEntry const* GetSpellAuraOptions() const;
+ SpellAuraRestrictionsEntry const* GetSpellAuraRestrictions() const;
+ SpellCastingRequirementsEntry const* GetSpellCastingRequirements() const;
+ SpellCategoriesEntry const* GetSpellCategories() const;
+ SpellClassOptionsEntry const* GetSpellClassOptions() const;
+ SpellCooldownsEntry const* GetSpellCooldowns() const;
+ SpellEquippedItemsEntry const* GetSpellEquippedItems() const;
+ SpellInterruptsEntry const* GetSpellInterrupts() const;
+ SpellLevelsEntry const* GetSpellLevels() const;
+ SpellPowerEntry const* GetSpellPower() const;
+ SpellReagentsEntry const* GetSpellReagents() const;
+ SpellScalingEntry const* GetSpellScaling() const;
+ SpellShapeshiftEntry const* GetSpellShapeshift() const;
+ SpellTotemsEntry const* GetSpellTotems() const;
+
SpellInfo(SpellEntry const* spellEntry);
bool HasEffect(SpellEffects effect) const;
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index c85758c3897..91cca4011ad 100755
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -2926,7 +2926,7 @@ void SpellMgr::LoadDbcDataCorrections()
{
uint32 oldMSTime = getMSTime();
- SpellEntry* spellInfo = NULL;
+ /*SpellEntry* spellInfo = NULL;
for (uint32 i = 0; i < sSpellStore.GetNumRows(); ++i)
{
spellInfo = (SpellEntry*)sSpellStore.LookupEntry(i);
@@ -3508,7 +3508,7 @@ void SpellMgr::LoadDbcDataCorrections()
properties->Type = SUMMON_TYPE_TOTEM;
properties = const_cast<SummonPropertiesEntry*>(sSummonPropertiesStore.LookupEntry(647)); // 52893
properties->Type = SUMMON_TYPE_TOTEM;
-
+ */
sLog->outString(">> Loading spell dbc data corrections in %u ms", GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}