[12738] Removed spell_template, it was highly inspected and causes serious problems in current spell system

This commit is contained in:
sanctum32 2013-11-19 21:21:55 +02:00 committed by Antz
parent 94948f7912
commit 45f6161cea
9 changed files with 5 additions and 135 deletions

View file

@ -21421,77 +21421,6 @@ LOCK TABLES `spell_target_position` WRITE;
/*!40000 ALTER TABLE `spell_target_position` ENABLE KEYS */; /*!40000 ALTER TABLE `spell_target_position` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
--
-- Table structure for table `spell_template`
--
DROP TABLE IF EXISTS `spell_template`;
CREATE TABLE `spell_template` (
`id` int(11) unsigned NOT NULL DEFAULT '0',
`attr` int(11) unsigned NOT NULL DEFAULT '0',
`attr_ex` int(11) unsigned NOT NULL DEFAULT '0',
`attr_ex2` int(11) unsigned NOT NULL DEFAULT '0',
`attr_ex3` int(11) unsigned NOT NULL DEFAULT '0',
`proc_flags` int(11) unsigned NOT NULL DEFAULT '0',
`proc_chance` int(11) unsigned NOT NULL DEFAULT '0',
`duration_index` int(11) unsigned NOT NULL DEFAULT '0',
`effect0` int(11) unsigned NOT NULL DEFAULT '0',
`effect0_implicit_target_a` int(11) unsigned NOT NULL DEFAULT '0',
`effect0_implicit_target_b` int(11) unsigned NOT NULL DEFAULT '0',
`effect0_radius_idx` int(11) unsigned NOT NULL DEFAULT '0',
`effect0_apply_aura_name` int(11) unsigned NOT NULL DEFAULT '0',
`effect0_misc_value` int(11) unsigned NOT NULL DEFAULT '0',
`effect0_misc_value_b` int(11) unsigned NOT NULL DEFAULT '0',
`effect0_trigger_spell` int(11) unsigned NOT NULL DEFAULT '0',
`comments` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='MaNGOS server side spells';
--
-- Dumping data for table `spell_template`
--
LOCK TABLES `spell_template` WRITE;
/*!40000 ALTER TABLE `spell_template` DISABLE KEYS */;
INSERT INTO `spell_template` VALUES
-- id attr attr_ex attr_ex2 attr_ex3 proc_flags chnce dur ef0 tarA0 tarB0 rad aur misc miscB, trigger
(21387, 0x00000140, 0x10000000, 0x00000000, 0x00000000, 0x00000028, 15, 21, 6, 1, 0, 0, 42, 0, 0, 21388, 'Melt-Weapon trigger aura related used by Ragnaros'),
(23363, 0x00000100, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 76, 18, 0, 0, 0, 179804, 0, 0, 'Summon Drakonid Corpse Trigger'),
(23770, 0x24800100, 0x10000088, 0x00000001, 0x00100000, 0x00000000, 101, 367, 6, 25, 0, 0, 4, 0, 0, 0, 'Sayge''s timer - Darkmoon Faire'),
(25192, 0x00000100, 0x00000000, 0x00000004, 0x00000000, 0x00000000, 101, 21, 76, 18, 0, 0, 0, 180619, 0, 0, 'Summon Ossirian Crystal'),
(26133, 0x00000100, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 76, 18, 0, 0, 0, 180795, 0, 0, 'Summon Sandworm Base'),
(34810, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 28, 42, 0, 8, 0, 20083, 64, 0, 'Summon Summoned Bloodwarder Mender behind of the caster'),
(34817, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 28, 44, 0, 8, 0, 20078, 64, 0, 'Summon Summoned Bloodwarder Reservist right of the caster'),
(34818, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 28, 43, 0, 8, 0, 20078, 64, 0, 'Summon Summoned Bloodwarder Reservist left of the caster'),
(34819, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 28, 41, 0, 8, 0, 20078, 64, 0, 'Summon Summoned Bloodwarder Reservist front of the caster'),
(35153, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 28, 42, 0, 8, 0, 20405, 64, 0, 'Summon Nether Charge behind of the caster'),
(35904, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 28, 44, 0, 8, 0, 20405, 64, 0, 'Summon Nether Charge right of the caster'),
(35905, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 28, 43, 0, 8, 0, 20405, 64, 0, 'Summon Nether Charge left of the caster'),
(35906, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 28, 41, 0, 8, 0, 20405, 64, 0, 'Summon Nether Charge front of the caster'),
(37264, 0x00000180, 0x00000000, 0x00000004, 0x00000000, 0x00000000, 101, 21, 28, 18, 0, 7, 0, 21729, 64, 0, 'Power Converters: Summon Electromental (from cata)'),
(37278, 0x00000180, 0x00000000, 0x00000004, 0x00000000, 0x00000000, 101, 21, 28, 18, 0, 1, 0, 21737, 64, 0, 'Power Converters: Summon Mini-Electromental (from cata)'),
(37365, 0x00000180, 0x00000000, 0x00000004, 0x00000000, 0x00000000, 101, 21, 28, 18, 0, 1, 0, 21757, 64, 0, 'Power Converters: Summon Big Flavor Electromental (from cata)'),
(44920, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 6, 1, 0, 0, 56, 24941, 0, 0, 'Model - Shattered Sun Marksman - BE Male Tier 4'),
(44924, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 6, 1, 0, 0, 56, 24945, 0, 0, 'Model - Shattered Sun Marksman - BE Female Tier 4'),
(44928, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 6, 1, 0, 0, 56, 24949, 0, 0, 'Model - Shattered Sun Marksman - Draenei Male Tier 4'),
(44932, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 6, 1, 0, 0, 56, 24953, 0, 0, 'Model - Shattered Sun Marksman - Draenei Female Tier 4'),
(45158, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 6, 1, 0, 0, 56, 25119, 0, 0, 'Model - Shattered Sun Warrior - BE Female Tier 4'),
(45162, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 6, 1, 0, 0, 56, 25123, 0, 0, 'Model - Shattered Sun Warrior - BE Male Tier 4'),
(45166, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 6, 1, 0, 0, 56, 25127, 0, 0, 'Model - Shattered Sun Warrior - Draenei Female Tier 4'),
(45170, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 6, 1, 0, 0, 56, 25131, 0, 0, 'Model - Shattered Sun Warrior - Draenei Male Tier 4'),
(50574, 0x00000100, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 0, 90, 25, 0, 11, 0, 28042, 0, 0, 'Captain Brandon Kill Credit'),
(58630, 0x00800180, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 101, 37, 6, 22, 7, 28, 4, 0, 0, 0, 'Achievement check - Mal\'Ganis'),
(59046, 0x00800180, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 101, 37, 6, 22, 7, 28, 4, 0, 0, 0, 'Achievement check - Tribunal of Ages'),
(59450, 0x00800180, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 101, 37, 6, 22, 7, 28, 4, 0, 0, 0, 'Achievement check - The Four Horsemen'),
(62388, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 6, 1, 0, 0, 4, 0, 0, 0, 'Aura required for Demonic Circle 48020'),
(64899, 0x00800180, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 101, 37, 6, 22, 7, 28, 4, 0, 0, 0, 'Achievement check - Hodir'),
(64985, 0x00800180, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 101, 37, 6, 22, 7, 28, 4, 0, 0, 0, 'Achievement check - Thorim'),
(65074, 0x00800180, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 101, 37, 6, 22, 7, 28, 4, 0, 0, 0, 'Achievement check - Freya'),
(65195, 0x00800180, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 101, 37, 6, 22, 7, 28, 4, 0, 0, 0, 'Achievement check - Assembly of Iron'),
(68184, 0x00800180, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 101, 37, 6, 22, 7, 28, 4, 0, 0, 0, 'Achievement check - Faction Champions'),
(72845, 0x00800180, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 101, 37, 6, 22, 7, 28, 4, 0, 0, 0, 'Achievement check - Pit of Saron - Don\'t Look Up');
/*!40000 ALTER TABLE `spell_template` ENABLE KEYS */;
UNLOCK TABLES;
-- --
-- Table structure for table `spell_threat` -- Table structure for table `spell_threat`
-- --

View file

@ -0,0 +1,3 @@
ALTER TABLE db_version CHANGE COLUMN required_12712_02_mangos_command required_12738_01_mangos_spell_template bit;
DROP TABLE IF EXISTS `spell_template`;

View file

@ -7098,59 +7098,6 @@ void ObjectMgr::LoadNPCSpellClickSpells()
sLog.outString(">> Loaded %u spellclick definitions", count); sLog.outString(">> Loaded %u spellclick definitions", count);
} }
static char* SERVER_SIDE_SPELL = "MaNGOS server-side spell";
struct SQLSpellLoader : public SQLStorageLoaderBase<SQLSpellLoader, SQLHashStorage>
{
template<class S, class D>
void default_fill(uint32 field_pos, S src, D &dst)
{
if (field_pos == 65) // EquippedItemClass
dst = D(-1);
else
dst = D(src);
}
void default_fill_to_str(uint32 field_pos, char const* /*src*/, char * & dst)
{
if (field_pos == 132) // SpellName[0]
{
dst = SERVER_SIDE_SPELL;
}
else
{
dst = new char[1];
*dst = 0;
}
}
};
void ObjectMgr::LoadSpellTemplate()
{
SQLSpellLoader loader;
loader.Load(sSpellTemplate);
sLog.outString(">> Loaded %u spell definitions", sSpellTemplate.GetRecordCount());
sLog.outString();
for (uint32 i = 1; i < sSpellTemplate.GetMaxEntry(); ++i)
{
// check data correctness
SpellEntry const* spellEntry = sSpellTemplate.LookupEntry<SpellEntry>(i);
if (!spellEntry)
continue;
// insert serverside spell data
if (sSpellStore.GetNumRows() <= i)
{
sLog.outErrorDb("Loading Spell Template for spell %u, index out of bounds (max = %)", i, sSpellStore.GetNumRows());
continue;
}
else
sSpellStore.InsertEntry(const_cast<SpellEntry*>(spellEntry), i);
}
}
void ObjectMgr::LoadWeatherZoneChances() void ObjectMgr::LoadWeatherZoneChances()
{ {
uint32 count = 0; uint32 count = 0;

View file

@ -765,7 +765,6 @@ class ObjectMgr
void LoadQuestPhaseMaps(); void LoadQuestPhaseMaps();
void LoadNPCSpellClickSpells(); void LoadNPCSpellClickSpells();
void LoadSpellTemplate();
void LoadCreatureTemplateSpells(); void LoadCreatureTemplateSpells();
void LoadWeatherZoneChances(); void LoadWeatherZoneChances();

View file

@ -36,9 +36,6 @@ const char WorldTemplatesrcfmt[] = "is";
const char WorldTemplatedstfmt[] = "ii"; const char WorldTemplatedstfmt[] = "ii";
const char ConditionsSrcFmt[] = "iiii"; const char ConditionsSrcFmt[] = "iiii";
const char ConditionsDstFmt[] = "iiii"; const char ConditionsDstFmt[] = "iiii";
const char SpellTemplatesrcfmt[] = "iiiiiiiiiiiiiiiix";
const char SpellTemplatedstfmt[] = "niiiiiiiiiiiiiiifiiiissxxiixxixiiiiiiixiiiiiiiix";
// Id attr proc DurationIndex Effect0 tarA0 effectAura0 triggerSpell0 SpellName[16] Rank[16]
const char VehicleAccessorySrcFmt[] = "iiix"; const char VehicleAccessorySrcFmt[] = "iiix";
const char VehicleAccessoryDstFmt[] = "iii"; const char VehicleAccessoryDstFmt[] = "iii";
const char CreatureTemplateSpellsFmt[] = "iiiiiiiiiii"; const char CreatureTemplateSpellsFmt[] = "iiiiiiiiiii";
@ -57,7 +54,6 @@ SQLStorage sConditionStorage(ConditionsSrcFmt, ConditionsDstFmt, "condition_entr
SQLHashStorage sGameObjectDataAddonStorage(GameObjectInfoAddonInfofmt, "guid", "gameobject_addon"); SQLHashStorage sGameObjectDataAddonStorage(GameObjectInfoAddonInfofmt, "guid", "gameobject_addon");
SQLHashStorage sGOStorage(GameObjectInfosrcfmt, GameObjectInfodstfmt, "entry", "gameobject_template"); SQLHashStorage sGOStorage(GameObjectInfosrcfmt, GameObjectInfodstfmt, "entry", "gameobject_template");
SQLHashStorage sSpellTemplate(SpellTemplatesrcfmt, SpellTemplatedstfmt, "id", "spell_template");
SQLHashStorage sCreatureTemplateSpellsStorage(CreatureTemplateSpellsFmt, "entry", "creature_template_spells"); SQLHashStorage sCreatureTemplateSpellsStorage(CreatureTemplateSpellsFmt, "entry", "creature_template_spells");
SQLMultiStorage sVehicleAccessoryStorage(VehicleAccessorySrcFmt, VehicleAccessoryDstFmt, "vehicle_entry", "vehicle_accessory"); SQLMultiStorage sVehicleAccessoryStorage(VehicleAccessorySrcFmt, VehicleAccessoryDstFmt, "vehicle_entry", "vehicle_accessory");

View file

@ -33,7 +33,6 @@ extern SQLStorage sInstanceTemplate;
extern SQLStorage sWorldTemplate; extern SQLStorage sWorldTemplate;
extern SQLStorage sConditionStorage; extern SQLStorage sConditionStorage;
extern SQLHashStorage sSpellTemplate;
extern SQLHashStorage sGOStorage; extern SQLHashStorage sGOStorage;
extern SQLHashStorage sGameObjectDataAddonStorage; extern SQLHashStorage sGameObjectDataAddonStorage;
extern SQLHashStorage sCreatureTemplateSpellsStorage; extern SQLHashStorage sCreatureTemplateSpellsStorage;

View file

@ -992,9 +992,6 @@ void World::SetInitialWorldSettings()
DetectDBCLang(); DetectDBCLang();
sObjectMgr.SetDBCLocaleIndex(GetDefaultDbcLocale()); // Get once for all the locale index of DBC language (console/broadcasts) sObjectMgr.SetDBCLocaleIndex(GetDefaultDbcLocale()); // Get once for all the locale index of DBC language (console/broadcasts)
//sLog.outString("Loading SpellTemplate...");
//sObjectMgr.LoadSpellTemplate();
sLog.outString("Loading Script Names..."); sLog.outString("Loading Script Names...");
sScriptMgr.LoadScriptNames(); sScriptMgr.LoadScriptNames();

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "12737" #define REVISION_NR "12738"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__

View file

@ -1,6 +1,6 @@
#ifndef __REVISION_SQL_H__ #ifndef __REVISION_SQL_H__
#define __REVISION_SQL_H__ #define __REVISION_SQL_H__
#define REVISION_DB_CHARACTERS "required_12712_01_characters_characters" #define REVISION_DB_CHARACTERS "required_12712_01_characters_characters"
#define REVISION_DB_MANGOS "required_12712_02_mangos_command" #define REVISION_DB_MANGOS "required_12738_01_mangos_spell_template"
#define REVISION_DB_REALMD "required_c12484_02_realmd_account_access" #define REVISION_DB_REALMD "required_c12484_02_realmd_account_access"
#endif // __REVISION_SQL_H__ #endif // __REVISION_SQL_H__