diff options
author | QAston <none@none> | 2009-02-11 22:59:02 +0100 |
---|---|---|
committer | QAston <none@none> | 2009-02-11 22:59:02 +0100 |
commit | c4fa6a5d54adbb76b5c7fd4a27d2a453149a30c9 (patch) | |
tree | be9b1722c49a843178840e8db0074977e193ca97 | |
parent | 376788d761a2f06c7ceb6437fab801cee0c9abab (diff) |
*Allow creatures to have up to 8 spells in creature_template.
--HG--
branch : trunk
-rw-r--r-- | sql/updates/1327_world.sql | 4 | ||||
-rw-r--r-- | src/bindings/scripts/include/sc_creature.cpp | 2 | ||||
-rw-r--r-- | src/game/Creature.cpp | 2 | ||||
-rw-r--r-- | src/game/Unit.h | 2 | ||||
-rw-r--r-- | src/shared/Database/SQLStorage.cpp | 4 |
5 files changed, 9 insertions, 5 deletions
diff --git a/sql/updates/1327_world.sql b/sql/updates/1327_world.sql new file mode 100644 index 00000000000..61ae8ded684 --- /dev/null +++ b/sql/updates/1327_world.sql @@ -0,0 +1,4 @@ +ALTER TABLE `creature_template` ADD COLUMN `spell5` mediumint(8) unsigned NOT NULL default '0' AFTER `spell4`; +ALTER TABLE `creature_template` ADD COLUMN `spell6` mediumint(8) unsigned NOT NULL default '0' AFTER `spell5`; +ALTER TABLE `creature_template` ADD COLUMN `spell7` mediumint(8) unsigned NOT NULL default '0' AFTER `spell6`; +ALTER TABLE `creature_template` ADD COLUMN `spell8` mediumint(8) unsigned NOT NULL default '0' AFTER `spell7`; diff --git a/src/bindings/scripts/include/sc_creature.cpp b/src/bindings/scripts/include/sc_creature.cpp index ad266fb37c5..6d68e203352 100644 --- a/src/bindings/scripts/include/sc_creature.cpp +++ b/src/bindings/scripts/include/sc_creature.cpp @@ -464,7 +464,7 @@ SpellEntry const* ScriptedAI::SelectSpell(Unit* Target, int32 School, int32 Mech SpellRangeEntry const* TempRange; //Check if each spell is viable(set it to null if not) - for (uint32 i = 0; i < 4; i++) + for (uint32 i = 0; i < CREATURE_MAX_SPELLS; i++) { TempSpell = GetSpellStore()->LookupEntry(m_creature->m_spells[i]); diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 87dc3674601..b87540e1802 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -153,7 +153,7 @@ m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL),m_creatureInfo(NULL), m_DBTabl m_regenTimer = 200; m_valuesCount = UNIT_END; - for(int i =0; i<4; ++i) + for(int i =0; i<CREATURE_MAX_SPELLS; ++i) m_spells[i] = 0; m_CreatureSpellCooldowns.clear(); diff --git a/src/game/Unit.h b/src/game/Unit.h index eb8041dd672..9ed85ca9cc3 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -219,7 +219,7 @@ enum UnitRename UNIT_RENAME_ALLOWED = 0x03 }; -#define CREATURE_MAX_SPELLS 4 +#define CREATURE_MAX_SPELLS 8 enum Swing { diff --git a/src/shared/Database/SQLStorage.cpp b/src/shared/Database/SQLStorage.cpp index 4d4b883926a..2f4f4534b3a 100644 --- a/src/shared/Database/SQLStorage.cpp +++ b/src/shared/Database/SQLStorage.cpp @@ -27,8 +27,8 @@ extern DatabasePostgre WorldDatabase; extern DatabaseMysql WorldDatabase; #endif -const char CreatureInfosrcfmt[]="iiiiiisssiiiiiiiiiiffiffiiiiiiiiiiiffiiiiiiiiiiiiiiiiiiisiilliiis"; -const char CreatureInfodstfmt[]="iiiiiisssiiiiiiiiiiffiffiiiiiiiiiiiffiiiiiiiiiiiiiiiiiiisiilliiii"; +const char CreatureInfosrcfmt[]="iiiiiisssiiiiiiiiiiffiffiiiiiiiiiiiffiiiiiiiiiiiiiiiiiiiiiiisiilliiis"; +const char CreatureInfodstfmt[]="iiiiiisssiiiiiiiiiiffiffiiiiiiiiiiiffiiiiiiiiiiiiiiiiiiiiiiisiilliiii"; const char CreatureDataAddonInfofmt[]="iiiiiiiis"; const char CreatureModelfmt[]="iffbi"; const char CreatureInfoAddonInfofmt[]="iiiiiiiis"; |