吾爱尚玩资源基地

标题: WOW私服模拟器Creature_template里面实现8个spell技能 [打印本页]

作者: admin    时间: 2016-4-19 22:53
标题: WOW私服模拟器Creature_template里面实现8个spell技能
diff --git a/sql/fixes/core.sql b/sql/fixes/core.sqlindex 6206bc2..c97eab8 100644
--- a/sql/fixes/core.sql
+++ b/sql/fixes/core.sql
@@ -1,4 +1,8 @@
ALTER TABLE creature_template
+  ADD COLUMN `spell5` mediumint(8) unsigned NOT NULL default '0' AFTER `spell4`,
+  ADD COLUMN `spell6` mediumint(8) unsigned NOT NULL default '0' AFTER `spell5`,
+  ADD COLUMN `spell7` mediumint(8) unsigned NOT NULL default '0' AFTER `spell6`,
+  ADD COLUMN `spell8` mediumint(8) unsigned NOT NULL default '0' AFTER `spell7`,
   ADD COLUMN `PowerType` tinyint(3) unsigned NOT NULL default '0' AFTER `MaxHealth`;

DROP TABLE IF EXISTS `spell_disabled`;
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index c7de624..f66315b 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -124,7 +124,7 @@ m_creatureInfo(NULL), m_splineFlags(SPLINEFLAG_WALKMODE)
     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/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 73f5351..e4f1707 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -2891,7 +2891,7 @@ bool LoadPetDefaultSpells_helper(CreatureInfo const* cInfo, PetDefaultSpellsEntr

void SpellMgr::LoadPetDefaultSpells()
{
-    ASSERT(MAX_CREATURE_SPELL_DATA_SLOT==CREATURE_MAX_SPELLS);
+    ASSERT(MAX_CREATURE_SPELL_DATA_SLOT <= CREATURE_MAX_SPELLS);

     mPetDefaultSpellsMap.clear();

diff --git a/src/game/Unit.h b/src/game/Unit.h
index a74457d..709a146 100644
--- a/src/game/Unit.h
+++ b/src/game/Unit.h
@@ -230,7 +230,7 @@ enum UnitRename
     UNIT_CAN_BE_ABANDONED   = 0x02,
};

-#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 9b70274..4c7fecb 100644
--- a/src/shared/Database/SQLStorage.cpp
+++ b/src/shared/Database/SQLStorage.cpp
@@ -25,8 +25,8 @@ extern DatabasePostgre  WorldDatabase;
extern DatabaseMysql  WorldDatabase;
#endif

-const char CreatureInfosrcfmt[]="iiiiiiiiiisssiiiiibiiiiiifffiffiifiiiiiiiiiiffiiiiiiiiiiiiiiiiiiisiiffliiiiiiiliiis";
-const char CreatureInfodstfmt[]="iiiiiiiiiisssiiiiibiiiiiifffiffiifiiiiiiiiiiffiiiiiiiiiiiiiiiiiiisiiffliiiiiiiliiii";
+const char CreatureInfosrcfmt[]="iiiiiiiiiisssiiiiibiiiiiifffiffiifiiiiiiiiiiffiiiiiiiiiiiiiiiiiiiiiiisiiffliiiiiiiliiis";
+const char CreatureInfodstfmt[]="iiiiiiiiiisssiiiiibiiiiiifffiffiifiiiiiiiiiiffiiiiiiiiiiiiiiiiiiiiiiisiiffliiiiiiiliiii";
const char CreatureDataAddonInfofmt[]="iiiiiis";
const char CreatureModelfmt[]="iffbi";
const char CreatureInfoAddonInfofmt[]="iiiiiis";


作者: 1314    时间: 2016-10-16 12:12
找了好久终于找到了!吾爱尚玩真棒!




欢迎光临 吾爱尚玩资源基地 (http://bbs.523play.com/) Powered by Discuz! X3.4