Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 47d8e7b64c744cee8b2e9dbcf27cdea91bbe94e3 Mon Sep 17 00:00:00 2001
- From: Wyran Wyrm <[email protected]>
- Date: Fri, 15 Feb 2013 02:59:25 +0100
- Subject: [PATCH] Reimplement spell_dbc functionality.
- ---
- .../world/2013_02_15_00_world_spell_dbc.sql | 52 ++++++++++++++++++++++
- src/server/game/DataStores/DBCStores.cpp | 2 +-
- src/server/game/DataStores/DBCfmt.h | 2 +-
- 3 files changed, 54 insertions(+), 2 deletions(-)
- create mode 100644 sql/updates/world/2013_02_15_00_world_spell_dbc.sql
- diff --git a/sql/updates/world/2013_02_15_00_world_spell_dbc.sql b/sql/updates/world/2013_02_15_00_world_spell_dbc.sql
- new file mode 100644
- index 0000000..dda644d
- --- /dev/null
- +++ b/sql/updates/world/2013_02_15_00_world_spell_dbc.sql
- @@ -0,0 +1,52 @@
- +-- New structure for spell_dbc, matching fields from Spell.dbc.
- +-- Author: Wyran.
- +
- +DROP TABLE IF EXISTS spell_dbc;
- +
- +CREATE TABLE `spell_dbc` (
- + `Id` int (10),
- + `Attributes` int (10),
- + `AttributesEx` int (10),
- + `AttributesEx2` int (10),
- + `AttributesEx3` int (10),
- + `AttributesEx4` int (10),
- + `AttributesEx5` int (10),
- + `AttributesEx6` int (10),
- + `AttributesEx7` int (10),
- + `AttributesEx8` int (10),
- + `AttributesEx9` int (10),
- + `AttributesEx10` int (10),
- + `CastingTimeIndex` int (10),
- + `DurationIndex` int (10),
- + `powerType` int (10),
- + `rangeIndex` int (10),
- + `speed` float ,
- + `SpellVisual1` int (10),
- + `SpellVisual2` int (10),
- + `SpellIconId` int (10),
- + `activeIconId` int (10),
- + `SchoolMask` int (10),
- + `runeCostID` int (10),
- + `SpellDifficultyId` int (10),
- + `SpellCoef` float ,
- + `SpellScalingId` int (10),
- + `SpellAuraOptionsId` int (10),
- + `SpellAuraRestrictionsId` int (10),
- + `SpellCastingRequirementsId` int (10),
- + `SpellCategoriesId` int (10),
- + `SpellClassOptionsId` int (10),
- + `SpellCooldownsId` int (10),
- + `SpellEquippedItemsId` int (10),
- + `SpellInterruptsId` int (10),
- + `SpellLevelsId` int (10),
- + `SpellPowerId` int (10),
- + `SpellReagentsId` int (10),
- + `SpellShapeshiftId` int (10),
- + `SpellTargetRestrictionsId` int (10),
- + `SpellTotemsId` int (10),
- + `Comment` text
- +);
- +
- +INSERT INTO `spell_dbc` (`Id`, `Attributes`, `AttributesEx`, `AttributesEx2`, `AttributesEx3`, `AttributesEx4`, `AttributesEx5`, `AttributesEx6`, `AttributesEx7`, `AttributesEx8`, `AttributesEx9`, `AttributesEx10`, `CastingTimeIndex`, `DurationIndex`, `powerType`, `rangeIndex`, `speed`, `SpellVisual1`, `SpellVisual2`, `SpellIconId`, `activeIconId`, `SchoolMask`, `runeCostID`, `SpellDifficultyId`, `SpellCoef`, `SpellScalingId`, `SpellAuraOptionsId`, `SpellAuraRestrictionsId`, `SpellCastingRequirementsId`, `SpellCategoriesId`, `SpellClassOptionsId`, `SpellCooldownsId`, `SpellEquippedItemsId`, `SpellInterruptsId`, `SpellLevelsId`, `SpellPowerId`, `SpellReagentsId`, `SpellShapeshiftId`, `SpellTargetRestrictionsId`, `SpellTotemsId`, `Comment`) VALUES
- +('75193','0','1028','0','0','0','0','0','0','0','0','0','1','18','0','7','0','9355','0','2025','1','1','0','0','0','0','0','0','0','0','0','0','0','16550','0','0','0','0','0','0','Periodic effect of spell 75192.');
- +
- diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
- index de05fd2..abaa16e 100644
- --- a/src/server/game/DataStores/DBCStores.cpp
- +++ b/src/server/game/DataStores/DBCStores.cpp
- @@ -495,7 +495,7 @@ 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*/);//
- + LoadDBC(availableDbcLocales, bad_dbc_files, sSpellStore, dbcPath, "Spell.dbc", &CustomSpellEntryfmt, &CustomSpellEntryIndex);//
- for (uint32 i = 1; i < sSpellStore.GetNumRows(); ++i)
- {
- SpellCategoriesEntry const* spell = sSpellCategoriesStore.LookupEntry(i);
- diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h
- index 9895378..66c519e 100644
- --- a/src/server/game/DataStores/DBCfmt.h
- +++ b/src/server/game/DataStores/DBCfmt.h
- @@ -125,7 +125,7 @@ const std::string CustomSpellDifficultyIndex = "id";
- char const SpellDurationfmt[] = "niii";
- char const SpellEffectEntryfmt[] = "nifiiiffiiiiiifiifiiiiiiiix";
- char const SpellEntryfmt[] = "niiiiiiiiiiiiiiifiiiissxxiixxifiiiiiiixiiiiiiiix";
- -const std::string CustomSpellEntryfmt = "papppppppppppapapaaaaaaaaaaapaaapapppppppaaaaapaapaaaaaaaaaaaaaaaaaappppppppppppppppppppppppppppppppppppaaaaaapppppppppaaapppppppppaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaappppppppapppaaaaappaaaaaaa";
- +const std::string CustomSpellEntryfmt = "pppppppppppppppppppppaaaappaapppppppppappppppppa";
- const std::string CustomSpellEntryIndex = "Id";
- char const SpellFocusObjectfmt[] = "nx";
- char const SpellItemEnchantmentfmt[] = "nxiiiiiixxxiiisiiiiiiix";
- --
- 1.8.0.msysgit.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement