Advertisement
Wyran

Reimplement spell_dbc functionality.

Feb 14th, 2013
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 5.16 KB | None | 0 0
  1. From 47d8e7b64c744cee8b2e9dbcf27cdea91bbe94e3 Mon Sep 17 00:00:00 2001
  2. From: Wyran Wyrm <[email protected]>
  3. Date: Fri, 15 Feb 2013 02:59:25 +0100
  4. Subject: [PATCH] Reimplement spell_dbc functionality.
  5.  
  6. ---
  7. .../world/2013_02_15_00_world_spell_dbc.sql        | 52 ++++++++++++++++++++++
  8.  src/server/game/DataStores/DBCStores.cpp           |  2 +-
  9.  src/server/game/DataStores/DBCfmt.h                |  2 +-
  10.  3 files changed, 54 insertions(+), 2 deletions(-)
  11.  create mode 100644 sql/updates/world/2013_02_15_00_world_spell_dbc.sql
  12.  
  13. 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
  14. new file mode 100644
  15. index 0000000..dda644d
  16. --- /dev/null
  17. +++ b/sql/updates/world/2013_02_15_00_world_spell_dbc.sql
  18. @@ -0,0 +1,52 @@
  19. +-- New structure for spell_dbc, matching fields from Spell.dbc.
  20. +-- Author: Wyran.
  21. +
  22. +DROP TABLE IF EXISTS spell_dbc;
  23. +
  24. +CREATE TABLE `spell_dbc` (
  25. +   `Id` int (10),
  26. +   `Attributes` int (10),
  27. +   `AttributesEx` int (10),
  28. +   `AttributesEx2` int (10),
  29. +   `AttributesEx3` int (10),
  30. +   `AttributesEx4` int (10),
  31. +   `AttributesEx5` int (10),
  32. +   `AttributesEx6` int (10),
  33. +   `AttributesEx7` int (10),
  34. +   `AttributesEx8` int (10),
  35. +   `AttributesEx9` int (10),
  36. +   `AttributesEx10` int (10),
  37. +   `CastingTimeIndex` int (10),
  38. +   `DurationIndex` int (10),
  39. +   `powerType` int (10),
  40. +   `rangeIndex` int (10),
  41. +   `speed` float ,
  42. +   `SpellVisual1` int (10),
  43. +   `SpellVisual2` int (10),
  44. +   `SpellIconId` int (10),
  45. +   `activeIconId` int (10),
  46. +   `SchoolMask` int (10),
  47. +   `runeCostID` int (10),
  48. +   `SpellDifficultyId` int (10),
  49. +   `SpellCoef` float ,
  50. +   `SpellScalingId` int (10),
  51. +   `SpellAuraOptionsId` int (10),
  52. +   `SpellAuraRestrictionsId` int (10),
  53. +   `SpellCastingRequirementsId` int (10),
  54. +   `SpellCategoriesId` int (10),
  55. +   `SpellClassOptionsId` int (10),
  56. +   `SpellCooldownsId` int (10),
  57. +   `SpellEquippedItemsId` int (10),
  58. +   `SpellInterruptsId` int (10),
  59. +   `SpellLevelsId` int (10),
  60. +   `SpellPowerId` int (10),
  61. +   `SpellReagentsId` int (10),
  62. +   `SpellShapeshiftId` int (10),
  63. +   `SpellTargetRestrictionsId` int (10),
  64. +   `SpellTotemsId` int (10),
  65. +   `Comment` text
  66. +);
  67. +
  68. +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
  69. +('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.');
  70. +
  71. diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
  72. index de05fd2..abaa16e 100644
  73. --- a/src/server/game/DataStores/DBCStores.cpp
  74. +++ b/src/server/game/DataStores/DBCStores.cpp
  75. @@ -495,7 +495,7 @@ void LoadDBCStores(const std::string& dataPath)
  76.      LoadDBC(availableDbcLocales, bad_dbc_files, sSkillLineStore,              dbcPath, "SkillLine.dbc");//14545
  77.      LoadDBC(availableDbcLocales, bad_dbc_files, sSkillLineAbilityStore,       dbcPath, "SkillLineAbility.dbc");//14545
  78.      LoadDBC(availableDbcLocales, bad_dbc_files, sSoundEntriesStore,           dbcPath, "SoundEntries.dbc");//14545
  79. -    LoadDBC(availableDbcLocales, bad_dbc_files, sSpellStore,                  dbcPath, "Spell.dbc"/*, &CustomSpellEntryfmt, &CustomSpellEntryIndex*/);//
  80. +    LoadDBC(availableDbcLocales, bad_dbc_files, sSpellStore,                  dbcPath, "Spell.dbc", &CustomSpellEntryfmt, &CustomSpellEntryIndex);//
  81.      for (uint32 i = 1; i < sSpellStore.GetNumRows(); ++i)
  82.      {
  83.          SpellCategoriesEntry const* spell = sSpellCategoriesStore.LookupEntry(i);
  84. diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h
  85. index 9895378..66c519e 100644
  86. --- a/src/server/game/DataStores/DBCfmt.h
  87. +++ b/src/server/game/DataStores/DBCfmt.h
  88. @@ -125,7 +125,7 @@ const std::string CustomSpellDifficultyIndex = "id";
  89.  char const SpellDurationfmt[] = "niii";
  90.  char const SpellEffectEntryfmt[] = "nifiiiffiiiiiifiifiiiiiiiix";
  91.  char const SpellEntryfmt[] = "niiiiiiiiiiiiiiifiiiissxxiixxifiiiiiiixiiiiiiiix";
  92. -const std::string CustomSpellEntryfmt = "papppppppppppapapaaaaaaaaaaapaaapapppppppaaaaapaapaaaaaaaaaaaaaaaaaappppppppppppppppppppppppppppppppppppaaaaaapppppppppaaapppppppppaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaappppppppapppaaaaappaaaaaaa";
  93. +const std::string CustomSpellEntryfmt = "pppppppppppppppppppppaaaappaapppppppppappppppppa";
  94.  const std::string CustomSpellEntryIndex = "Id";
  95.  char const SpellFocusObjectfmt[] = "nx";
  96.  char const SpellItemEnchantmentfmt[] = "nxiiiiiixxxiiisiiiiiiix";
  97. --
  98. 1.8.0.msysgit.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement