aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.hgignore14
-rw-r--r--sql/trinityscript_script_texts.sql12
-rw-r--r--sql/updates/3999_sd2.sql2
-rw-r--r--sql/updates/4000_world_spell_proc_event.sql (renamed from sql/updates/3997_world_spell_proc_event.sql)0
-rw-r--r--sql/updates/4003_world_scritp_waypoint.sql28
-rw-r--r--sql/updates/4006_sd2.sql10
-rw-r--r--sql/updates/4016_world_spell_#dk.sql5
-rw-r--r--sql/updates/4023_world_spell_proc_event.sql4
-rw-r--r--sql/updates/4030_world.sql1
-rw-r--r--sql/updates/4031_world_spell_proc_event.sql5
-rw-r--r--sql/updates/4032_world_spell_proc_event.sql4
-rw-r--r--sql/world.sql1055
-rw-r--r--sql/world_script_waypoints.sql29
-rw-r--r--sql/world_scripts_full.sql5
-rw-r--r--sql/world_scripts_structure.sql68
-rw-r--r--sql/world_spell_full.sql111
-rw-r--r--src/bindings/scripts/CMakeLists.txt1
-rw-r--r--src/bindings/scripts/ScriptMgr.cpp4
-rw-r--r--src/bindings/scripts/VC80/80ScriptDev2.vcproj6
-rw-r--r--src/bindings/scripts/VC90/90ScriptDev2.vcproj6
-rw-r--r--src/bindings/scripts/scripts/guard/guard_ai.cpp24
-rw-r--r--src/bindings/scripts/scripts/guard/guard_ai.h17
-rw-r--r--src/bindings/scripts/scripts/guard/guards.cpp34
-rw-r--r--src/bindings/scripts/scripts/npc/npcs_special.cpp14
-rw-r--r--src/bindings/scripts/scripts/zone/azshara/azshara.cpp4
-rw-r--r--src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp79
-rw-r--r--src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp4
-rw-r--r--src/bindings/scripts/scripts/zone/blasted_lands/blasted_lands.cpp2
-rw-r--r--src/bindings/scripts/scripts/zone/desolace/desolace.cpp174
-rw-r--r--src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp5
-rw-r--r--src/bindings/scripts/scripts/zone/isle_of_queldanas/isle_of_queldanas.cpp6
-rw-r--r--src/bindings/scripts/scripts/zone/orgrimmar/orgrimmar.cpp41
-rw-r--r--src/bindings/scripts/scripts/zone/scarlet_monastery/boss_headless_horseman.cpp4
-rw-r--r--src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp127
-rw-r--r--src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp63
-rw-r--r--src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp2
-rw-r--r--src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp136
-rw-r--r--src/game/Creature.cpp15
-rw-r--r--src/game/Creature.h2
-rw-r--r--src/game/GameObject.cpp2
-rw-r--r--src/game/GridNotifiers.cpp27
-rw-r--r--src/game/GridNotifiers.h2
-rw-r--r--src/game/Level3.cpp28
-rw-r--r--src/game/MiscHandler.cpp2
-rw-r--r--src/game/MovementHandler.cpp19
-rw-r--r--src/game/Player.cpp40
-rw-r--r--src/game/Player.h16
-rw-r--r--src/game/PointMovementGenerator.cpp2
-rw-r--r--src/game/RandomMovementGenerator.cpp6
-rw-r--r--src/game/SharedDefines.h2
-rw-r--r--src/game/Spell.cpp129
-rw-r--r--src/game/Spell.h5
-rw-r--r--src/game/SpellAuras.cpp102
-rw-r--r--src/game/SpellEffects.cpp8
-rw-r--r--src/game/SpellMgr.cpp13
-rw-r--r--src/game/SpellMgr.h4
-rw-r--r--src/game/TargetedMovementGenerator.cpp6
-rw-r--r--src/game/TemporarySummon.cpp3
-rw-r--r--src/game/Traveller.h4
-rw-r--r--src/game/Unit.cpp172
-rw-r--r--src/game/Unit.h35
-rw-r--r--src/game/Vehicle.cpp48
-rw-r--r--src/game/Vehicle.h2
-rw-r--r--src/game/WaypointMovementGenerator.cpp2
-rw-r--r--src/game/WorldSession.cpp2
65 files changed, 1041 insertions, 1763 deletions
diff --git a/.hgignore b/.hgignore
new file mode 100644
index 00000000000..c053a02579a
--- /dev/null
+++ b/.hgignore
@@ -0,0 +1,14 @@
+# use glob syntax.
+syntax: glob
+
+src/shared/revision.h
+build/
+.directory
+*.orig
+*.rej
+*~
+
+# use regexp syntax.
+syntax: regexp
+
+^src/shared/revision\.h
diff --git a/sql/trinityscript_script_texts.sql b/sql/trinityscript_script_texts.sql
index b0dd3ce636e..c15fc6ba557 100644
--- a/sql/trinityscript_script_texts.sql
+++ b/sql/trinityscript_script_texts.sql
@@ -32,7 +32,7 @@ INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content
(-1000000, '<TrinityScript Text Entry Missing!>', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'DEFAULT_TEXT'),
(-1000001, 'goes into a killing frenzy!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'EMOTE_GENERIC_FRENZY_KILL'),
(-1000004, 'goes into a berserker rage!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'EMOTE_GENERIC_BERSERK'),
-(-1000005, 'Greetings citizen', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'general_marcus SAY_GREETING');
+(-1000005, 'UNUSED', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'REUSE ME');
--
-- Normal text entries. Say/Yell/Whisper/Emote for any regular world object.
@@ -325,7 +325,7 @@ INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content
(-1000406, 'Meet me down by the orchard--I just need to put my gun away.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'stilwell SAY_DS_PROLOGUE'),
(-1000407, '%s howls in delight at the sight of his lunch!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'kyle EMOTE_SEE_LUNCH'),
(-1000408, '%s eats his lunch.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'kyle EMOTE_EAT_LUNCH'),
-(-1000409, '%s thanks you with a special dance.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'kyle EMOTE_DANCE');
+(-1000409, '%s thanks you with a special dance.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'kyle EMOTE_DANCE'),
(-1000411, 'Mist! I feared I would never see you again! Yes, I am well, do not worry for me. You must rest and recover your health.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'mist SAY_AT_HOME'),
(-1000412, 'growls in acknowledgement before straightening and making her way off into the forest.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'mist EMOTE_AT_HOME'),
(-1000413, 'Threshwackonator First Mate unit prepared to follow', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'threshwackonator EMOTE_START'),
@@ -342,7 +342,13 @@ INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content
(-1000424, 'Nope. didn\'t leave the fossil back here!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_PROGRESS'),
(-1000425, 'Ah. I remember now! I gave the mysterious fossil to Hollee! Check with her.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_REMEMBER'),
(-1000426, '%s goes back to work, oblivious to everything around him.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 7, 0, 'remtravel EMOTE_REM_END'),
-(-1000427, 'Something tells me this $r wants the mysterious fossil too. Help!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_AGGRO');
+(-1000427, 'Something tells me this $r wants the mysterious fossil too. Help!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_AGGRO'),
+
+(-1000428, 'Ah...the wondrous sound of kodos. I love the way they make the ground shake... inspect the beast for me.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0,'kodo round SAY_SMEED_HOME_1'),
+(-1000429, 'Hey, look out with that kodo! You had better inspect that beast before i give you credit!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0,'kodo round SAY_SMEED_HOME_2'),
+(-1000430, 'That kodo sure is a beauty. Wait a minute, where are my bifocals? Perhaps you should inspect the beast for me.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'kodo round SAY_SMEED_HOME_3');
+
+
-- -1 033 000 SHADOWFANG KEEP
INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES
diff --git a/sql/updates/3999_sd2.sql b/sql/updates/3999_sd2.sql
index 7815b7aa857..aefda08bd2e 100644
--- a/sql/updates/3999_sd2.sql
+++ b/sql/updates/3999_sd2.sql
@@ -2,4 +2,4 @@ DELETE FROM script_texts WHERE entry BETWEEN -1000342 AND -1000340;
INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES
(-1000340, 'We made it! Thanks, $N. I couldn''t have gotten without you.', 0, 0, 0, 0, 'npc_deathstalker_erland - SAY_THANKS'),
(-1000341, 'It''s good to see you again, Erland. What is your report?', 0, 0, 0, 0, 'npc_deathstalker_erland - SAY_RANE'),
-(-1000342, 'Masses of wolves are to the east, and whoever lived at Malden''s Orchard is gone.', 0, 0, 0, 0, 'npc_deathstalker_erland - SAY_ANSWER'),
+(-1000342, 'Masses of wolves are to the east, and whoever lived at Malden''s Orchard is gone.', 0, 0, 0, 0, 'npc_deathstalker_erland - SAY_ANSWER');
diff --git a/sql/updates/3997_world_spell_proc_event.sql b/sql/updates/4000_world_spell_proc_event.sql
index d426dc437cb..d426dc437cb 100644
--- a/sql/updates/3997_world_spell_proc_event.sql
+++ b/sql/updates/4000_world_spell_proc_event.sql
diff --git a/sql/updates/4003_world_scritp_waypoint.sql b/sql/updates/4003_world_scritp_waypoint.sql
new file mode 100644
index 00000000000..603115f72c0
--- /dev/null
+++ b/sql/updates/4003_world_scritp_waypoint.sql
@@ -0,0 +1,28 @@
+DELETE FROM script_waypoint WHERE entry=17969;
+INSERT INTO script_waypoint VALUES
+(17969, 0, -930.048950, 5288.080078, 23.848402, 0, ''),
+(17969, 1, -925.677917, 5296.482910, 18.183748, 0, ''),
+(17969, 2, -924.297180, 5299.016113, 17.710915, 0, ''),
+(17969, 3, -928.390076, 5317.022949, 18.208593, 0, ''),
+(17969, 4, -930.620972, 5329.915039, 18.773422, 0, 'SAY_AMBUSH1'),
+(17969, 5, -931.490295, 5357.654785, 18.027155, 0, 'SAY_PROGRESS'),
+(17969, 6, -934.777771, 5369.341797, 22.278048, 0, ''),
+(17969, 7, -934.521851, 5373.407227, 22.834690, 0, ''),
+(17969, 8, -937.008545, 5382.980469, 22.699078, 0, ''),
+(17969, 9, -941.948059, 5404.141602, 22.669743, 0, ''),
+(17969, 10, -931.244263, 5415.846680, 23.063961, 0, 'at crossroad'),
+(17969, 11, -901.497925, 5420.315430, 24.213270, 0, ''),
+(17969, 12, -860.311707, 5415.617676, 23.671139, 0, ''),
+(17969, 13, -777.988953, 5391.982422, 23.001669, 0, ''),
+(17969, 14, -750.362000, 5385.786621, 22.765791, 0, ''),
+(17969, 15, -731.339417, 5382.449707, 22.517065, 0, ''),
+(17969, 16, -681.235901, 5381.377930, 22.050159, 2500, 'end bridge SAY_AMBUSH2'),
+(17969, 17, -637.944458, 5384.338379, 22.205647, 0, 'SAY_END'),
+(17969, 18, -608.954407, 5408.715332, 21.630386, 0, ''),
+(17969, 19, -598.134277, 5413.608398, 21.412275, 0, ''),
+(17969, 20, -571.268982, 5420.771973, 21.184925, 0, ''),
+(17969, 21, -553.099915, 5424.616211, 21.193716, 0, ''),
+(17969, 22, -524.745483, 5443.945313, 20.977013, 0, ''),
+(17969, 23, -502.984985, 5446.283691, 22.149435, 0, ''),
+(17969, 24, -472.463959, 5449.546875, 22.561453, 0, ''),
+(17969, 25, -454.533264, 5461.302246, 22.602837, 30000, 'quest complete');
diff --git a/sql/updates/4006_sd2.sql b/sql/updates/4006_sd2.sql
new file mode 100644
index 00000000000..8ac01de7acf
--- /dev/null
+++ b/sql/updates/4006_sd2.sql
@@ -0,0 +1,10 @@
+UPDATE creature_template SET ScriptName='' WHERE entry=466;
+UPDATE script_texts SET content_default='UNUSED', language=0, comment='REUSE ME' WHERE entry=-1000005;
+
+UPDATE creature_template SET ScriptName='npc_aged_dying_ancient_kodo' WHERE entry IN (4700, 4701, 4702, 11627);
+
+DELETE FROM script_texts WHERE entry BETWEEN -1000430 AND -1000428;
+INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES
+(-1000428, 'Ah...the wondrous sound of kodos. I love the way they make the ground shake... inspect the beast for me.',0,0,0,0,'kodo round SAY_SMEED_HOME_1'),
+(-1000429, 'Hey, look out with that kodo! You had better inspect that beast before i give you credit!',0,0,0,0,'kodo round SAY_SMEED_HOME_2'),
+(-1000430, 'That kodo sure is a beauty. Wait a minute, where are my bifocals? Perhaps you should inspect the beast for me.',0,0,0,0,'kodo round SAY_SMEED_HOME_3');
diff --git a/sql/updates/4016_world_spell_#dk.sql b/sql/updates/4016_world_spell_#dk.sql
new file mode 100644
index 00000000000..c88b70b8277
--- /dev/null
+++ b/sql/updates/4016_world_spell_#dk.sql
@@ -0,0 +1,5 @@
+DELETE FROM `spell_script_target` WHERE entry IN
+(53110);
+INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES
+(53110,1,28940);
+
diff --git a/sql/updates/4023_world_spell_proc_event.sql b/sql/updates/4023_world_spell_proc_event.sql
new file mode 100644
index 00000000000..caa53b3c119
--- /dev/null
+++ b/sql/updates/4023_world_spell_proc_event.sql
@@ -0,0 +1,4 @@
+DELETE FROM `spell_proc_event` WHERE `entry` IN (51521, 51522);
+INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
+( 51521, 0x00, 11, 0x00000000, 0x01000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Improved Stormspike
+( 51522, 0x00, 11, 0x00000000, 0x01000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0); -- Improved Stormspike \ No newline at end of file
diff --git a/sql/updates/4030_world.sql b/sql/updates/4030_world.sql
new file mode 100644
index 00000000000..579bfa49d23
--- /dev/null
+++ b/sql/updates/4030_world.sql
@@ -0,0 +1 @@
+UPDATE creature_template SET ScriptName='npc_nestlewood_owlkin' WHERE entry=16518;
diff --git a/sql/updates/4031_world_spell_proc_event.sql b/sql/updates/4031_world_spell_proc_event.sql
new file mode 100644
index 00000000000..f887ea24b9e
--- /dev/null
+++ b/sql/updates/4031_world_spell_proc_event.sql
@@ -0,0 +1,5 @@
+DELETE FROM `spell_proc_event` WHERE `entry` IN (51698, 51700, 51701);
+INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
+( 51698, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 1), -- Honor Among Thieves
+( 51700, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 1), -- Honor Among Thieves
+( 51701, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 1); -- Honor Among Thieves
diff --git a/sql/updates/4032_world_spell_proc_event.sql b/sql/updates/4032_world_spell_proc_event.sql
new file mode 100644
index 00000000000..25c0b56ccdb
--- /dev/null
+++ b/sql/updates/4032_world_spell_proc_event.sql
@@ -0,0 +1,4 @@
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (51209, 50334);
+INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
+(51209, 55095, 1, 'Hungering cold - frost fever'),
+(50334, 58923, 2, 'Berserk - modify target number aura');
diff --git a/sql/world.sql b/sql/world.sql
index 47c7f8a6425..9915e83dc2a 100644
--- a/sql/world.sql
+++ b/sql/world.sql
@@ -13994,6 +13994,8 @@ INSERT INTO `spell_bonus_data` VALUES
/*!40000 ALTER TABLE `spell_bonus_data` ENABLE KEYS */;
UNLOCK TABLES;
+// TODO: update this after UDB release
+
--
-- Table structure for table `spell_disabled`
--
@@ -14157,25 +14159,6 @@ CREATE TABLE `spell_enchant_proc_data` (
SET character_set_client = @saved_cs_client;
--
--- Dumping data for table `spell_enchant_proc_data`
---
-
-LOCK TABLES `spell_enchant_proc_data` WRITE;
-/*!40000 ALTER TABLE `spell_enchant_proc_data` DISABLE KEYS */;
-INSERT INTO `spell_enchant_proc_data` VALUES
-(2,0,8.8,0),
-(12,0,8.8,0),
-(524,0,8.8,0),
-(1667,0,8.8,0),
-(1668,0,8.8,0),
-(2635,0,8.8,0),
-(3782,0,8.8,0),
-(3783,0,8.8,0),
-(3784,0,8.8,0);
-/*!40000 ALTER TABLE `spell_enchant_proc_data` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
-- Table structure for table `spell_learn_spell`
--
@@ -14248,134 +14231,6 @@ CREATE TABLE `spell_linked_spell` (
SET character_set_client = @saved_cs_client;
--
--- Dumping data for table `spell_linked_spell`
---
-
-LOCK TABLES `spell_linked_spell` WRITE;
-/*!40000 ALTER TABLE `spell_linked_spell` DISABLE KEYS */;
-INSERT INTO `spell_linked_spell` VALUES
-(-55053,55601,0,'Deathbloom (H)'),
-(-52610,-62071,0,'Savage Roar'),
-(-49012,49010,0,'Wyvern Sting'),
-(-49011,49009,0,'Wyvern Sting'),
-(-47953,60406,0,'Divine hymn buff to enemies'),
-(-46021,46020,0,'Teleport: Normal Realm'),
-(-41917,41915,0,'Summon Parasitic Shadowfiend'),
-(-41914,41915,0,'Summon Parasitic Shadowfiend'),
-(-41376,41377,0,'Spite'),
-(-39091,-39092,0,'Negative Charge'),
-(-39088,-29659,0,'Positive Charge'),
-(-38794,33686,0,'Murmur\'s Shockwave (Heroic)'),
-(-33711,33686,0,'Murmur\'s Shockwave (Normal)'),
-(-30410,44032,0,'Manticron Cube Mind Exhaustion'),
-(-29865,55594,0,'Deathbloom'),
-(-28169,28206,0,'Mutating Injection - Mutagen Explosion'),
-(-28169,28240,0,'Mutating Injection - Poison Cloud'),
-(-28084,-29660,0,'Negative Charge'),
-(-28059,-29659,0,'Positive Charge'),
-(-27068,27069,0,'Wyvern Sting'),
-(-24133,24135,0,'Wyvern Sting'),
-(-24132,24134,0,'Wyvern Sting'),
-(-19386,24131,0,'Wyvern Sting'),
-(781,56446,0,'Disengage'),
-(15237,23455,0,'Holy Nova (rank1)'),
-(15430,23458,0,'Holy Nova (rank2)'),
-(15431,23459,0,'Holy Nova (rank3)'),
-(16857,60089,0,'Faerie Fire (Feral) Rank 1'),
-(17390,60089,0,'Faerie Fire (Feral) Rank 2'),
-(17391,60089,0,'Faerie Fire (Feral) Rank 3'),
-(17392,60089,0,'Faerie Fire (Feral) Rank 4'),
-(17767,54501,2,'Consume Shadows - Rank 1'),
-(17850,54501,2,'Consume Shadows - Rank 2'),
-(17851,54501,2,'Consume Shadows - Rank 3'),
-(17852,54501,2,'Consume Shadows - Rank 4'),
-(17853,54501,2,'Consume Shadows - Rank 5'),
-(17854,54501,2,'Consume Shadows - Rank 6'),
-(25331,25329,0,'Holy Nova (rank7)'),
-(27011,60089,0,'Faerie Fire (Feral) Rank 5'),
-(27272,54501,2,'Consume Shadows - Rank 7'),
-(27799,27803,0,'Holy Nova (rank4)'),
-(27800,27804,0,'Holy Nova (rank5)'),
-(27801,27805,0,'Holy Nova (rank6)'),
-(28059,-28084,1,'Positive Charge - Negative Charge'),
-(28084,-28059,1,'Negative Charge - Positive Charge'),
-(28732,-28798,1,'Widow\'s Embrace - Frenzy'),
-(31224,-1543,2,'Cloak of Shadows - Flare'),
-(32386,60448,2,'Shadow Embrace Rank1'),
-(32388,60465,2,'Shadow Embrace Rank2'),
-(32389,60466,2,'Shadow Embrace Rank3'),
-(32390,60467,2,'Shadow Embrace Rank4'),
-(32391,60468,2,'Shadow Embrace Rank5'),
-(33206,44416,2,'Pain Suppression (threat)'),
-(33686,31705,0,'Murmur\'s Shockwave Jump'),
-(36574,36650,0,'Apply Phase Slip Vulnerability'),
-(39088,-39091,1,'Positive Charge - Negative Charge'),
-(39091,-39088,1,'Negative Charge - Positive Charge'),
-(39835,39968,1,'Needle Spine'),
-(39908,40017,1,'Eye Blast'),
-(40604,40616,1,'Fel Rage Aura'),
-(40616,41625,1,'Fel Rage Aura'),
-(41126,41131,1,'Flame Crash'),
-(41292,42017,2,'Aura of Suffering'),
-(43648,44007,1,'Storm Eye Safe Zone'),
-(43658,43655,0,'Electrical Arc Visual'),
-(43658,43656,0,'Electrical Arc Visual'),
-(43658,43659,0,'Electrical Arc Visual'),
-(43658,43654,0,'Electrical Arc Visual'),
-(43658,43653,0,'Electrical Arc Visual'),
-(44007,-43657,2,'Storm Eye Safe Zone Immune'),
-(44008,45265,1,'Static Disruption Visual'),
-(44867,-46019,2,'Spectral Exhaustion - Teleport: Spectral Realm'),
-(44869,44866,1,'Spectral Blast Portal'),
-(44869,-45018,1,'Remove Arcane Buffet'),
-(44869,46019,1,'Spectral Blast Teleport'),
-(45246,45348,1,'Apply Flame Touched'),
-(45248,45347,1,'Apply Dark Touched'),
-(45256,45347,1,'Apply Dark Touched'),
-(45270,45347,1,'Apply Dark Touched'),
-(45271,45347,1,'Apply Dark Touched'),
-(45329,45347,1,'Apply Dark Touched'),
-(45342,45348,1,'Apply Flame Touched'),
-(45347,-45348,1,'Remove Flame Touched'),
-(45348,-45347,1,'Remove Dark Touched'),
-(45661,45665,1,'Encapsulate'),
-(46019,-45018,1,'Remove Arcane Buffet'),
-(46019,46021,1,'Spectral Realm Aura'),
-(46020,44867,1,'Spectral Exhaustion'),
-(46228,-46247,0,'Black Hole Visual (Grown)'),
-(46228,46235,0,'Black Hole Visual (Grown)'),
-(46242,46247,0,'Black Hole Visual (Birth)'),
-(46262,46265,0,'Void Zone Visual'),
-(46771,45348,1,'Apply Flame Touched'),
-(47585,60069,0,'Dispersion (transform/regen)'),
-(47897,47960,1,'Shadowflame Rank 1'),
-(47987,54501,2,'Consume Shadows - Rank 8'),
-(47988,54501,2,'Consume Shadows - Rank 9'),
-(48077,48075,0,'Holy Nova (rank8)'),
-(48078,48076,0,'Holy Nova (rank9)'),
-(48263,61261,2,'Frost Presence'),
-(48265,49772,2,'Unholy Presence'),
-(48475,60089,0,'Faerie Fire (Feral) Rank 6'),
-(49576,49560,0,'Death Grip'),
-(49772,55222,2,'Unholy Presence'),
-(50720,59665,0,'Vigilance (redirect threat)'),
-(51723,52874,0,'Fan Of Knives'),
-(52610,62071,0,'Savage Roar'),
-(53563,53651,2,'Beacon of Light'),
-(54097,-54100,1,'Widow\'s Embrace - Frenzy (H)'),
-(54643,-54643,2,'Wintergrasp Defender Teleport'),
-(57635,57636,0,'Disengage'),
-(58666,58672,1,'Impale (Archavon)'),
-(60882,58672,1,'Impale (Archavon)'),
-(60932,60934,0,'Disengage'),
-(61290,61291,1,'Shadowflame Rank 2'),
-(61507,61508,0,'Disengage'),
-(61846,61848,2,'Aspect of te dragonhawk'),
-(61847,61848,2,'Aspect of te dragonhawk');
-/*!40000 ALTER TABLE `spell_linked_spell` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
-- Table structure for table `spell_loot_template`
--
@@ -14491,912 +14346,6 @@ CREATE TABLE `spell_proc_event` (
SET character_set_client = @saved_cs_client;
--
--- Dumping data for table `spell_proc_event`
---
-
-LOCK TABLES `spell_proc_event` WRITE;
-/*!40000 ALTER TABLE `spell_proc_event` DISABLE KEYS */;
-INSERT INTO `spell_proc_event` VALUES
-(324,0,0,0,0,0,0,0,0,0,3),
-(325,0,0,0,0,0,0,0,0,0,3),
-(905,0,0,0,0,0,0,0,0,0,3),
-(945,0,0,0,0,0,0,0,0,0,3),
-(974,0,0,0,0,0,0,0,0,0,3),
-(1463,0,0,0,0,0,0,1024,0,0,0),
-(3232,0,0,0,0,0,0,2,0,0,0),
-(5952,0,8,1,1,0,0,0,0,0,0),
-(6346,0,0,0,0,0,0,256,0,0,0),
-(7383,1,0,0,0,0,0,256,0,0,0),
-(7434,0,0,0,0,0,0,2,0,0,0),
-(8134,0,0,0,0,0,0,0,0,0,3),
-(8178,0,0,0,0,0,0,65536,0,0,0),
-(8494,0,0,0,0,0,0,1024,0,0,0),
-(8495,0,0,0,0,0,0,1024,0,0,0),
-(9452,0,0,0,0,0,0,0,3,0,0),
-(9782,0,0,0,0,0,0,64,0,0,0),
-(9784,0,0,0,0,0,0,64,0,0,0),
-(9799,0,0,0,0,0,0,2,0,0,0),
-(10191,0,0,0,0,0,0,1024,0,0,0),
-(10192,0,0,0,0,0,0,1024,0,0,0),
-(10193,0,0,0,0,0,0,1024,0,0,0),
-(10431,0,0,0,0,0,0,0,0,0,3),
-(10432,0,0,0,0,0,0,0,0,0,3),
-(11095,0,3,16,0,0,0,0,0,0,0),
-(11119,4,3,0,0,0,0,2,0,0,0),
-(11120,4,3,0,0,0,0,2,0,0,0),
-(11129,0,3,12582935,64,0,0,0,0,0,0),
-(11180,16,3,0,0,0,0,0,0,0,0),
-(11185,0,3,128,0,0,327680,0,0,0,0),
-(11255,0,3,16384,0,0,0,0,0,0,0),
-(12169,0,0,0,0,0,0,64,0,0,0),
-(12281,0,0,0,0,0,0,0,0,0,6),
-(12289,0,4,2,0,0,0,0,0,0,0),
-(12298,0,0,0,0,0,0,64,0,0,0),
-(12311,0,4,2048,1,0,0,0,0,0,0),
-(12319,0,0,0,0,0,0,2,0,0,0),
-(12322,0,0,0,0,0,0,0,2,0,0),
-(12487,0,3,128,0,0,327680,0,0,0,0),
-(12488,0,3,128,0,0,327680,0,0,0,0),
-(12598,0,3,16384,0,0,0,0,0,0,0),
-(12668,0,4,2,0,0,0,0,0,0,0),
-(12724,0,0,0,0,0,0,64,0,0,0),
-(12725,0,0,0,0,0,0,64,0,0,0),
-(12726,0,0,0,0,0,0,64,0,0,0),
-(12727,0,0,0,0,0,0,64,0,0,0),
-(12797,0,4,1024,0,0,0,0,0,0,0),
-(12799,0,4,1024,0,0,0,0,0,0,0),
-(12812,0,0,0,0,0,0,0,0,0,6),
-(12813,0,0,0,0,0,0,0,0,0,6),
-(12814,0,0,0,0,0,0,0,0,0,6),
-(12815,0,0,0,0,0,0,0,0,0,6),
-(12834,0,0,0,0,0,0,2,0,0,0),
-(12846,4,3,0,0,0,0,2,0,0,0),
-(12847,4,3,0,0,0,0,2,0,0,0),
-(12848,4,3,0,0,0,0,2,0,0,0),
-(12849,0,0,0,0,0,0,2,0,0,0),
-(12867,0,0,0,0,0,0,2,0,0,0),
-(12872,0,3,16,0,0,0,0,0,0,0),
-(12873,0,3,16,0,0,0,0,0,0,0),
-(12958,0,4,2048,1,0,0,0,0,0,0),
-(12966,0,0,0,0,0,0,65536,0,0,0),
-(12967,0,0,0,0,0,0,65536,0,0,0),
-(12968,0,0,0,0,0,0,65536,0,0,0),
-(12969,0,0,0,0,0,0,65536,0,0,0),
-(12970,0,0,0,0,0,0,65536,0,0,0),
-(12971,0,0,0,0,0,0,2,0,0,0),
-(12972,0,0,0,0,0,0,2,0,0,0),
-(12973,0,0,0,0,0,0,2,0,0,0),
-(12974,0,0,0,0,0,0,2,0,0,0),
-(12999,0,0,0,0,0,0,0,4,0,0),
-(13000,0,0,0,0,0,0,0,6,0,0),
-(13001,0,0,0,0,0,0,0,8,0,0),
-(13002,0,0,0,0,0,0,0,10,0,0),
-(13163,0,0,0,0,0,0,16,0,0,0),
-(13165,0,9,1,0,0,0,0,0,0,0),
-(13754,0,8,16,0,0,0,0,0,0,0),
-(13867,0,8,16,0,0,0,0,0,0,0),
-(13983,0,0,0,0,0,0,24,0,0,0),
-(14070,0,0,0,0,0,0,24,0,0,0),
-(14071,0,0,0,0,0,0,24,0,0,0),
-(14156,0,8,4063232,0,0,0,0,0,0,0),
-(14160,0,8,4063232,0,0,0,0,0,0,0),
-(14161,0,8,4063232,0,0,0,0,0,0,0),
-(14186,0,8,1082131720,2,0,0,2,0,0,0),
-(14190,0,8,1082131720,2,0,0,2,0,0,0),
-(14193,0,8,1082131720,2,0,0,2,0,0,0),
-(14194,0,8,1082131720,2,0,0,2,0,0,0),
-(14195,0,8,1082131720,2,0,0,2,0,0,0),
-(14318,0,9,1,0,0,0,0,0,0,0),
-(14319,0,9,1,0,0,0,0,0,0,0),
-(14320,0,9,1,0,0,0,0,0,0,0),
-(14321,0,9,1,0,0,0,0,0,0,0),
-(14322,0,9,1,0,0,0,0,0,0,0),
-(14531,0,0,0,0,0,0,2,0,0,0),
-(14774,0,0,0,0,0,0,2,0,0,0),
-(14892,0,6,268443136,65540,0,0,2,0,0,0),
-(15088,0,0,0,0,0,0,2,0,0,0),
-(15128,4,0,0,0,0,0,0,0,0,0),
-(15277,0,0,0,0,0,0,0,6,0,0),
-(15286,32,6,0,0,0,0,0,0,0,0),
-(15337,0,6,8192,2,0,0,2,0,0,0),
-(15338,0,6,8192,2,0,0,2,0,0,0),
-(15346,0,0,0,0,0,0,0,6,0,0),
-(15362,0,6,268443136,65540,0,0,2,0,0,0),
-(15363,0,6,268443136,65540,0,0,2,0,0,0),
-(15600,0,0,0,0,0,0,0,1,0,0),
-(16086,0,11,0,262144,0,0,0,0,0,0),
-(16164,0,11,2416967875,0,0,0,2,0,0,0),
-(16176,0,11,448,0,0,0,2,0,0,0),
-(16180,0,11,192,0,16,0,2,0,0,0),
-(16196,0,11,192,0,16,0,2,0,0,0),
-(16198,0,11,192,0,16,0,2,0,0,0),
-(16235,0,11,448,0,0,0,2,0,0,0),
-(16240,0,11,448,0,0,0,2,0,0,0),
-(16256,0,0,0,0,0,0,2,0,0,0),
-(16257,0,0,0,0,0,0,65536,0,0,0),
-(16277,0,0,0,0,0,0,65536,0,0,0),
-(16278,0,0,0,0,0,0,65536,0,0,0),
-(16279,0,0,0,0,0,0,65536,0,0,0),
-(16280,0,0,0,0,0,0,65536,0,0,0),
-(16281,0,0,0,0,0,0,2,0,0,0),
-(16282,0,0,0,0,0,0,2,0,0,0),
-(16283,0,0,0,0,0,0,2,0,0,0),
-(16284,0,0,0,0,0,0,2,0,0,0),
-(16487,0,0,0,0,0,0,2,0,0,0),
-(16489,0,0,0,0,0,0,2,0,0,0),
-(16492,0,0,0,0,0,0,2,0,0,0),
-(16544,0,11,0,262144,0,0,0,0,0,0),
-(16550,0,0,0,0,0,0,2,0,0,0),
-(16620,0,0,0,0,0,0,0,0,0,30),
-(16624,0,0,0,0,0,0,64,0,0,0),
-(16850,0,7,4,0,0,0,0,0,0,0),
-(16864,0,0,0,0,0,0,0,2,0,0),
-(16880,72,7,0,0,0,0,2,0,0,0),
-(16923,0,7,4,0,0,0,0,0,0,0),
-(16924,0,7,4,0,0,0,0,0,0,0),
-(16952,0,7,233472,1024,0,0,2,0,0,0),
-(16954,0,7,233472,1024,0,0,2,0,0,0),
-(16958,0,0,0,0,0,0,2,0,0,0),
-(16961,0,0,0,0,0,0,2,0,0,0),
-(17106,0,7,524288,0,0,0,0,0,0,0),
-(17107,0,7,524288,0,0,0,0,0,0,0),
-(17108,0,7,524288,0,0,0,0,0,0,0),
-(17364,8,0,0,0,0,0,0,0,0,0),
-(17495,0,0,0,0,0,0,64,0,0,0),
-(17619,0,13,0,0,0,32768,0,0,0,0),
-(17793,0,5,1,0,0,0,2,0,0,0),
-(17796,0,5,1,0,0,0,2,0,0,0),
-(17801,0,5,1,0,0,0,2,0,0,0),
-(17802,0,5,1,0,0,0,2,0,0,0),
-(17803,0,5,1,0,0,0,2,0,0,0),
-(18073,0,5,96,8388736,0,0,0,0,0,0),
-(18094,0,5,10,0,0,0,0,0,0,0),
-(18095,0,5,10,0,0,0,0,0,0,0),
-(18096,0,5,96,8388736,0,0,0,0,0,0),
-(18119,0,5,997,4288,0,0,0,0,0,0),
-(18120,0,5,997,4288,0,0,0,0,0,0),
-(18820,0,0,0,0,0,0,65536,0,0,0),
-(19184,0,9,20,8192,0,0,0,0,0,0),
-(19387,0,9,20,8192,0,0,0,0,0,0),
-(19388,0,9,20,8192,0,0,0,0,0,0),
-(19572,0,9,8388608,0,0,16384,0,0,0,0),
-(19573,0,9,8388608,0,0,16384,0,0,0,0),
-(20049,0,0,0,0,0,0,2,0,0,0),
-(20056,0,0,0,0,0,0,2,0,0,0),
-(20057,0,0,0,0,0,0,2,0,0,0),
-(20128,0,0,0,0,0,0,64,0,0,0),
-(20131,0,0,0,0,0,0,64,0,0,0),
-(20132,0,0,0,0,0,0,64,0,0,0),
-(20164,0,0,0,0,0,0,0,5,0,0),
-(20165,0,0,0,0,0,0,0,20,0,0),
-(20166,0,0,0,0,0,0,0,12,0,0),
-(20177,0,0,0,0,0,0,67,0,0,0),
-(20179,0,0,0,0,0,0,67,0,0,0),
-(20180,0,0,0,0,0,0,67,0,0,0),
-(20181,0,0,0,0,0,0,67,0,0,0),
-(20182,0,0,0,0,0,0,67,0,0,0),
-(20210,0,10,3221225472,0,0,0,2,0,0,0),
-(20212,0,10,3221225472,0,0,0,2,0,0,0),
-(20213,0,10,3221225472,0,0,0,2,0,0,0),
-(20214,0,10,3221225472,0,0,0,2,0,0,0),
-(20215,0,10,3221225472,0,0,0,2,0,0,0),
-(20234,0,10,32768,0,0,0,0,0,0,0),
-(20235,0,10,32768,0,0,0,0,0,0,0),
-(20375, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 7, 0, 1), -- Seal of Command
-(20500,0,4,268435456,0,0,0,0,0,0,0),
-(20501,0,4,268435456,0,0,0,0,0,0,0),
-(20705,0,0,0,0,0,0,2,0,0,0),
-(20911,0,0,0,0,0,0,112,0,0,0),
-(20925,0,0,0,0,0,0,64,0,0,0),
-(20927,0,0,0,0,0,0,64,0,0,0),
-(20928,0,0,0,0,0,0,64,0,0,0),
-(21185,0,0,0,0,0,0,0,0,0,10),
-(21882,0,0,0,0,0,0,2,0,0,0),
-(21890,0,4,712396527,876,0,0,0,0,0,0),
-(22007,0,3,2097185,0,0,0,65536,0,0,0),
-(22618,0,0,0,0,0,0,64,0,0,0),
-(22648,0,0,0,0,0,0,2,0,0,0),
-(23547,0,0,0,0,0,0,32,0,0,0),
-(23548,0,0,0,0,0,0,64,0,0,0),
-(23551,0,11,192,0,0,0,0,0,0,0),
-(23552,0,0,0,0,0,0,0,0,0,3),
-(23572,0,11,192,0,0,0,0,0,0,0),
-(23578,0,0,0,0,0,0,0,2,0,0),
-(23581,0,0,0,0,0,0,0,2,0,0),
-(23602,0,0,0,0,0,0,64,0,0,0),
-(23686,0,0,0,0,0,0,0,2,0,0),
-(23688,0,0,0,0,0,0,65536,0,0,0),
-(23689,0,0,0,0,0,0,0,4,0,0),
-(23695,0,4,2,0,0,0,0,0,0,0),
-(23721,0,9,2048,0,0,0,0,0,0,0),
-(23920,0,0,0,0,0,0,2048,0,0,0),
-(24353,0,0,0,0,0,0,2,0,0,0),
-(24389,0,3,12582935,64,0,0,0,0,0,0),
-(24398,0,0,0,0,0,0,0,0,0,3),
-(24658,0,0,0,0,0,82192,0,0,0,0),
-(24905,0,0,0,0,0,0,2,15,0,0),
-(24932,0,0,0,0,0,0,2,0,0,6),
-(25050,4,0,0,0,0,0,0,0,0,0),
-(25296,0,9,1,0,0,0,0,0,0,0),
-(25469,0,0,0,0,0,0,0,0,0,3),
-(25472,0,0,0,0,0,0,0,0,0,3),
-(25669,0,0,0,0,0,0,0,1,0,0),
-(25899,0,0,0,0,0,0,112,0,0,0),
-(25988,0,0,0,0,0,0,2,0,0,0),
-(26016,0,0,0,0,0,0,0,2,0,0),
-(26107,0,0,0,0,0,0,100,0,0,0),
-(26119,0,10,2416967683,0,0,0,65536,0,0,0),
-(26128,0,0,0,0,0,0,8,0,0,0),
-(26135,0,10,8388608,0,0,0,65536,0,0,0),
-(26480,0,0,0,0,0,0,0,3,0,0),
-(26605,0,0,0,0,0,0,2,0,0,0),
-(27044,0,9,1,0,0,0,0,0,0,0),
-(27131,0,0,0,0,0,0,1024,0,0,0),
-(27179,0,0,0,0,0,0,64,0,0,0),
-(27419,0,0,0,0,0,0,0,3,0,0),
-(27498,0,0,0,0,0,0,0,3,0,0),
-(27521,0,0,0,0,0,0,65536,0,0,15),
-(27656,0,0,0,0,0,0,0,3,0,0),
-(27774,0,0,0,0,0,0,65536,0,0,0),
-(27787,0,0,0,0,0,0,0,3,0,0),
-(27811,0,0,0,0,0,0,2,0,0,0),
-(27815,0,0,0,0,0,0,2,0,0,0),
-(27816,0,0,0,0,0,0,2,0,0,0),
-(28592,16,3,0,0,0,0,0,0,0,0),
-(28593,16,3,0,0,0,0,0,0,0,0),
-(28716,0,7,16,0,0,294912,0,0,0,0),
-(28719,0,7,32,0,0,0,2,0,0,0),
-(28744,0,7,64,0,0,278528,0,0,0,0),
-(28752,0,0,0,0,0,0,2,0,0,0),
-(28789,0,10,3221225472,0,0,0,0,0,0,0),
-(28802,0,0,0,0,0,0,65536,0,0,0),
-(28809,0,6,4096,0,0,0,2,0,0,0),
-(28812,0,8,33554438,0,0,0,2,0,0,0),
-(28816,0,0,0,0,0,0,0,3,0,0),
-(28823,0,11,192,0,0,0,0,0,0,0),
-(28847,0,7,32,0,0,0,0,0,0,0),
-(28849,0,11,128,0,0,0,0,0,0,0),
-(29074,20,3,0,0,0,0,2,0,0,0),
-(29075,20,3,0,0,0,0,2,0,0,0),
-(29076,20,3,0,0,0,0,2,0,0,0),
-(29150,0,0,0,0,0,0,0,3,0,0),
-(29179,0,0,0,0,0,0,2,0,0,0),
-(29180,0,0,0,0,0,0,2,0,0,0),
-(29385,0,0,0,0,0,0,0,7,0,0),
-(29441,0,0,0,0,0,0,8,0,0,1),
-(29444,0,0,0,0,0,0,8,0,0,1),
-(29455,0,0,0,0,0,0,64,0,0,0),
-(29501,0,0,0,0,0,0,0,3,0,0),
-(29593,0,0,0,0,0,0,112,0,0,0),
-(29594,0,0,0,0,0,0,112,0,0,0),
-(29624,0,0,0,0,0,0,0,3,0,0),
-(29625,0,0,0,0,0,0,0,3,0,0),
-(29626,0,0,0,0,0,0,0,3,0,0),
-(29632,0,0,0,0,0,0,0,3,0,0),
-(29633,0,0,0,0,0,0,0,3,0,0),
-(29634,0,0,0,0,0,0,0,3,0,0),
-(29635,0,0,0,0,0,0,0,3,0,0),
-(29636,0,0,0,0,0,0,0,3,0,0),
-(29637,0,0,0,0,0,0,0,3,0,0),
-(29801,0,0,0,0,0,0,2,0,0,0),
-(29834,0,0,0,0,0,0,65536,0,0,0),
-(29838,0,0,0,0,0,0,65536,0,0,0),
-(29977,0,3,12582935,64,0,0,0,0,0,0),
-(30003,0,0,0,0,0,0,2048,0,0,0),
-(30160,0,0,0,0,0,0,2,0,0,0),
-(30293,0,5,897,131264,0,0,0,0,0,0),
-(30295,0,5,897,131264,0,0,0,0,0,0),
-(30296,0,5,897,131264,0,0,0,0,0,0),
-(30299,126,0,0,0,0,0,0,0,0,0),
-(30301,126,0,0,0,0,0,0,0,0,0),
-(30302,126,0,0,0,0,0,0,0,0,0),
-(30675,0,11,3,0,0,0,0,0,0,0),
-(30678,0,11,3,0,0,0,0,0,0,0),
-(30679,0,11,3,0,0,0,0,0,0,0),
-(30701,28,0,0,0,0,0,0,0,0,0),
-(30705,28,0,0,0,0,0,0,0,0,0),
-(30802,0,0,0,0,0,0,2,0,0,0),
-(30803,0,0,0,0,0,0,2,0,0,0),
-(30804,0,0,0,0,0,0,2,0,0,0),
-(30805,0,0,0,0,0,0,2,0,0,0),
-(30806,0,0,0,0,0,0,2,0,0,0),
-(30807,0,0,0,0,0,0,2,0,0,0),
-(30808,0,0,0,0,0,0,2,0,0,0),
-(30809,0,0,0,0,0,0,2,0,0,0),
-(30810,0,0,0,0,0,0,2,0,0,0),
-(30811,0,0,0,0,0,0,2,0,0,0),
-(30823,0,0,0,0,0,0,0,10.5,0,0),
-(30881,0,0,0,0,0,0,0,0,0,5),
-(30883,0,0,0,0,0,0,0,0,0,5),
-(30884,0,0,0,0,0,0,0,0,0,5),
-(30885,0,0,0,0,0,0,0,0,0,5),
-(30886,0,0,0,0,0,0,0,0,0,5),
-(30937,32,0,0,0,0,0,0,0,0,0),
-(31124,0,8,16777222,0,0,0,0,0,0,0),
-(31126,0,8,16777222,0,0,0,0,0,0,0),
-(31221,0,8,4194304,0,0,81920,24577,0,0,0),
-(31222,0,8,4194304,0,0,81920,24577,0,0,0),
-(31223,0,8,4194304,0,0,81920,24577,0,0,0),
-(31244,0,8,4063232,9,0,0,4,0,0,0),
-(31245,0,8,4063232,9,0,0,4,0,0,0),
-(31394,32,0,0,0,0,0,0,0,0,0),
-(31569,0,3,65536,0,0,0,0,0,0,0),
-(31570,0,3,65536,0,0,0,0,0,0,0),
-(31571,0,3,0,34,0,16384,0,0,0,0),
-(31572,0,3,0,34,0,16384,0,0,0,0),
-(31794,0,0,0,0,0,0,65536,0,0,0),
-(31801,0,0,0,0,0,0,0,20,0,0),
-(31833,0,10,2147483648,0,0,0,0,0,0,0),
-(31835,0,10,2147483648,0,0,0,0,0,0,0),
-(31836,0,10,2147483648,0,0,0,0,0,0,0),
-(31871,0,10,16,0,0,16384,0,0,0,0),
-(31872,0,10,16,0,0,16384,0,0,0,0),
-(31876,0,10,8388608,0,0,0,0,0,0,0),
-(31877,0,10,8388608,0,0,0,0,0,0,0),
-(31878,0,10,8388608,0,0,0,0,0,0,0),
-(31904,0,0,0,0,0,0,64,0,0,0),
-(32385,0,5,1,262144,0,0,0,0,0,0),
-(32387,0,5,1,262144,0,0,0,0,0,0),
-(32392,0,5,1,262144,0,0,0,0,0,0),
-(32393,0,5,1,262144,0,0,0,0,0,0),
-(32394,0,5,1,262144,0,0,0,0,0,0),
-(32409,0,0,0,0,0,0,0,0,0,0),
-(32587,0,0,0,0,0,0,64,0,0,0),
-(32593,0,0,0,0,0,0,0,0,0,3),
-(32594,0,0,0,0,0,0,0,0,0,3),
-(32642,0,0,0,0,0,0,64,0,0,0),
-(32734,0,0,0,0,0,0,0,0,0,3),
-(32748,0,8,0,1,0,320,0,0,0,0),
-(32776,0,0,0,0,0,0,64,0,0,0),
-(32777,0,0,0,0,0,0,64,0,0,0),
-(32837,0,0,0,0,0,0,65536,0,0,45),
-(32844,0,0,0,0,0,0,0,2,0,0),
-(32885,0,0,0,0,0,0,2,0,0,0),
-(33076,0,0,0,0,0,656040,0,0,0,0),
-(33089,0,0,0,0,0,0,64,0,0,0),
-(33127,0,0,0,0,0,0,0,7,0,0),
-(33142,0,0,0,0,0,0,2,0,0,0),
-(33145,0,0,0,0,0,0,2,0,0,0),
-(33146,0,0,0,0,0,0,2,0,0,0),
-(33150,0,0,0,0,0,0,2,0,0,0),
-(33151,0,0,0,0,0,0,2,0,0,0),
-(33154,0,0,0,0,0,0,2,0,0,0),
-(33174,0,6,32,0,0,16384,0,0,0,0),
-(33182,0,6,32,0,0,16384,0,0,0,0),
-(33191,0,6,8421376,1024,0,0,0,0,0,0),
-(33192,0,6,8421376,1024,0,0,0,0,0,0),
-(33193,0,6,8421376,1024,0,0,0,0,0,0),
-(33297, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Quagmirrans Eye
-(33299,0,0,0,0,0,0,65536,0,0,0),
-(33510,0,0,0,0,0,0,0,5,0,0),
-(33648,0,0,0,0,0,0,2,0,0,0),
-(33719,0,0,0,0,0,0,2048,0,0,0),
-(33736,0,0,0,0,0,0,0,0,0,3),
-(33746,0,0,0,0,0,0,0,0,0,10),
-(33757,0,0,0,0,0,0,0,0,0,3),
-(33759,0,0,0,0,0,0,0,0,0,10),
-(33881,0,0,0,0,0,0,2,0,0,0),
-(33882,0,0,0,0,0,0,2,0,0,0),
-(33883,0,0,0,0,0,0,2,0,0,0),
-(33953,0,0,0,0,0,16384,0,0,0,45),
-(34074,0,0,0,0,0,0,3,0,0,0),
-(34080,0,0,0,0,0,0,8,0,0,0),
-(34138,0,11,128,0,0,0,0,0,0,0),
-(34139,0,10,1073741824,0,0,0,0,0,0,0),
-(34258,0,10,1024,8,0,0,0,0,0,0),
-(34262,0,10,8388608,0,0,0,65536,0,0,0),
-(34320, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 45), -- Shiffars Nexus-Horn
-(34355,0,0,0,0,0,0,0,0,0,3),
-(34457,0,0,0,0,0,0,2,0,0,0),
-(34497,0,0,0,0,0,0,2,0,0,0),
-(34498,0,0,0,0,0,0,2,0,0,0),
-(34499,0,0,0,0,0,0,2,0,0,0),
-(34500,0,0,0,0,0,0,2,0,0,0),
-(34502,0,0,0,0,0,0,2,0,0,0),
-(34503,0,0,0,0,0,0,2,0,0,0),
-(34584,0,0,0,0,0,0,0,0,0,30),
-(34586,0,0,0,0,0,0,0,1.5,0,0),
-(34598,0,0,0,0,0,0,0,0,0,45),
-(34749,0,0,0,0,0,0,8,0,0,0),
-(34753,0,6,6144,4,0,0,2,0,0,0),
-(34774,0,0,0,0,0,0,0,1.5,0,20),
-(34783,0,0,0,0,0,0,2048,0,0,0),
-(34827,0,0,0,0,0,0,0,0,0,3),
-(34859,0,6,6144,4,0,0,2,0,0,0),
-(34860,0,6,6144,4,0,0,2,0,0,0),
-(34914,0,6,8192,0,0,0,0,0,0,0),
-(34916,0,6,8192,0,0,0,0,0,0,0),
-(34917,0,6,8192,0,0,0,0,0,0,0),
-(34935,0,0,0,0,0,0,0,0,0,8),
-(34938,0,0,0,0,0,0,0,0,0,8),
-(34939,0,0,0,0,0,0,0,0,0,8),
-(34950,0,0,0,0,0,0,2,0,0,0),
-(34954,0,0,0,0,0,0,2,0,0,0),
-(35077,0,0,0,0,0,0,0,0,0,60),
-(35080,0,0,0,0,0,0,0,1,0,60),
-(35083,0,0,0,0,0,0,0,0,0,60),
-(35086,0,0,0,0,0,0,0,0,0,60),
-(35100,0,9,12289,0,0,65856,0,0,0,0),
-(35102,0,9,12289,0,0,0,0,0,0,0),
-(35121,0,0,0,0,0,0,2,0,0,0),
-(35541, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00800000, 0x00000000, 0, 0, 0), -- Combat Potency
-(35550, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00800000, 0x00000000, 0, 0, 0), -- Combat Potency
-(35551, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00800000, 0x00000000, 0, 0, 0), -- Combat Potency
-(35552, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00800000, 0x00000000, 0, 0, 0), -- Combat Potency
-(35553, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00800000, 0x00000000, 0, 0, 0), -- Combat Potency
-(36032,0,3,2048,32768,0,0,0,0,0,0),
-(36096,0,0,0,0,0,0,2048,0,0,0),
-(36111,0,0,0,0,0,0,0,0,0,0),
-(36541,4,0,0,0,0,0,0,0,0,0),
-(37165,0,8,2098176,0,0,0,0,0,0,0),
-(37168,0,8,4063232,9,0,0,0,0,0,0),
-(37170,0,0,0,0,0,0,0,1,0,0),
-(37173,0,8,750519704,262,0,0,0,0,0,30),
-(37189,0,10,3221225472,0,0,0,2,0,0,60),
-(37193,0,0,0,0,0,0,64,0,0,0),
-(37195,0,10,8388608,0,0,0,0,0,0,0),
-(37197,0,0,0,0,0,0,65536,0,0,45),
-(37213,0,0,0,0,0,0,2,0,0,0),
-(37214,0,0,0,0,0,0,65536,0,0,0),
-(37227,0,11,448,0,0,0,2,0,0,60),
-(37237,0,11,1,0,0,0,2,0,0,0),
-(37247,8,0,0,0,0,0,65536,0,0,45),
-(37377,32,0,0,0,0,0,65536,0,0,0),
-(37379,32,5,0,0,0,0,0,0,0,0),
-(37384,0,5,1,0,0,0,0,0,0,0),
-(37443,0,0,0,0,0,0,2,0,0,0),
-(37514,0,0,0,0,0,0,32,0,0,0),
-(37516,0,4,1024,0,0,0,0,0,0,0),
-(37519,0,0,0,0,0,0,48,0,0,0),
-(37523,0,0,0,0,0,0,64,0,0,0),
-(37528,0,4,4,0,0,0,0,0,0,0),
-(37536,0,4,65536,0,0,0,0,0,0,0),
-(37568,0,6,2048,0,0,0,0,0,0,0),
-(37594,0,6,4096,0,0,0,0,0,0,0),
-(37600,0,0,0,0,0,0,65536,0,0,0),
-(37601,0,0,0,0,0,0,65536,0,0,0),
-(37603,0,6,32768,0,0,0,0,0,0,0),
-(37655,0,0,0,0,0,0,0,0,0,60),
-(37657,0,0,0,0,0,0,2,0,0,3),
-(38026,1,0,0,0,0,0,256,0,0,0),
-(38031,0,0,0,0,0,0,64,0,0,0),
-(38290,0,0,0,0,0,0,0,1.6,0,0),
-(38299, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 15), -- Fel Reavers Piston
-(38326,0,0,0,0,0,0,2,0,0,0),
-(38327,0,0,0,0,0,0,2,0,0,0),
-(38334,0,0,0,0,0,0,0,0,0,60),
-(38347, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 45), -- Sextant of Unstable Currents
-(38350,0,0,0,0,0,0,2,0,0,0),
-(38394,0,5,6,0,0,0,0,0,0,0),
-(38857,0,0,0,0,0,0,65536,0,0,0),
-(39027,0,0,0,0,0,0,0,0,0,3),
-(39372,48,0,0,0,0,0,0,0,0,0),
-(39437,4,5,4964,192,0,0,65536,0,0,0),
-(39442,0,0,0,0,0,0,1,0,0,0),
-(39443,0,0,0,0,0,0,2,0,0,0),
-(39530,0,0,0,0,0,0,65536,0,0,0),
-(39958,0,0,0,0,0,0,0,0.7,0,40),
-(40407,0,0,0,0,0,0,0,6,0,0),
-(40438,0,6,32832,0,0,0,0,0,0,0),
-(40442,0,7,20,1088,0,0,0,0,0,0),
-(40444,0,0,0,0,0,0,64,0,0,0),
-(40458,0,4,33554432,1537,0,0,0,0,0,0),
-(40463,0,11,129,16,0,0,0,0,0,0),
-(40470,0,10,3229614080,0,0,0,0,0,0,0),
-(40475,0,0,0,0,0,0,0,3,0,0),
-(40478,0,5,2,0,0,0,0,0,0,0),
-(40482,0,0,0,0,0,0,2,0,0,0),
-(40485,0,9,0,1,0,0,0,0,0,0),
-(40899,0,0,0,0,0,0,0,0,0,3),
-(41034,0,0,0,0,0,0,1024,0,0,0),
-(41260,0,0,0,0,0,0,0,0,0,10),
-(41262,0,0,0,0,0,0,0,0,0,10),
-(41381,0,0,0,0,0,0,256,0,0,0),
-(41393,0,0,0,0,0,0,32,0,0,0),
-(41434,0,0,0,0,0,0,0,2,0,45),
-(41469,0,0,0,0,0,0,0,7,0,0),
-(41635,0,0,0,0,0,656040,0,0,0,0),
-(41989,0,0,0,0,0,0,0,0.5,0,0),
-(42083,0,0,0,0,0,0,2,0,0,45),
-(42135,0,0,0,0,0,0,0,0,0,90),
-(42136,0,0,0,0,0,0,0,0,0,90),
-(42368,0,10,1073741824,0,0,0,0,0,0,0),
-(42370,0,11,64,0,0,0,0,0,0,0),
-(42770,0,0,0,0,0,0,65536,0,0,0),
-(43019,0,0,0,0,0,0,1024,0,0,0),
-(43020,0,0,0,0,0,0,1024,0,0,0),
-(43338,0,0,0,0,0,0,2,0,0,0),
-(43443,0,0,0,0,0,0,2048,0,0,0),
-(43726,0,10,1073741824,0,0,0,0,0,0,0),
-(43728,0,11,128,0,0,0,0,0,0,0),
-(43737,0,7,0,1088,0,0,0,0,0,10),
-(43739,0,7,2,0,0,0,0,0,0,0),
-(43741,0,10,2147483648,0,0,0,0,0,0,0),
-(43745,0,10,0,512,0,0,0,0,0,0),
-(43748,0,11,2416967680,0,0,0,0,0,0,0),
-(43750,0,11,1,0,0,0,0,0,0,0),
-(43819,0,0,0,0,0,0,65536,0,0,0),
-(44394,0,0,0,0,0,0,1024,0,0,0),
-(44395,0,0,0,0,0,0,1024,0,0,0),
-(44396,0,0,0,0,0,0,1024,0,0,0),
-(44401,0,3,2097152,0,0,0,4095,0,0,0),
-(44404,0,3,536870945,36864,0,0,0,0,0,0),
-(44442,0,3,8388608,64,0,0,65536,0,0,1),
-(44443,0,3,8388608,64,0,0,65536,0,0,1),
-(44445,0,3,19,4096,0,0,0,0,0,0),
-(44446,0,3,19,4096,0,0,0,0,0,0),
-(44448,0,3,19,4096,0,0,0,0,0,0),
-(44449,0,3,551686775,102472,0,0,2,0,0,0),
-(44469,0,3,551686775,102472,0,0,2,0,0,0),
-(44470,0,3,551686775,102472,0,0,2,0,0,0),
-(44471,0,3,551686775,102472,0,0,2,0,0,0),
-(44472,0,3,551686775,102472,0,0,2,0,0,0),
-(44543,0,3,1049120,4096,0,65536,0,0,7,0),
-(44545,0,3,1049120,4096,0,65536,0,0,15,0),
-(44546,0,3,33555104,0,0,0,0,0,0,0),
-(44548,0,3,33555104,0,0,0,0,0,0,0),
-(44549,0,3,33555104,0,0,0,0,0,0,0),
-(44745,0,3,0,1,0,32768,8192,0,0,0),
-(44835,0,7,0,128,0,16,0,0,0,0),
-(45054,0,0,0,0,0,0,0,0,0,15),
-(45057,0,0,0,0,0,0,0,0,0,30),
-(45234,0,0,0,0,0,0,2,0,0,0),
-(45243,0,0,0,0,0,0,2,0,0,0),
-(45244,0,0,0,0,0,0,2,0,0,0),
-(45354,0,0,0,0,0,0,0,0,0,45),
-(45469,0,15,16,0,0,16,0,0,0,0),
-(45481,0,0,0,0,0,0,0,0,0,45),
-(45482,0,0,0,0,0,0,0,0,0,45),
-(45483,0,0,0,0,0,0,0,0,0,45),
-(45484,0,0,0,0,0,16384,0,0,0,45),
-(46025,32,6,0,0,0,0,0,0,0,0),
-(46092,0,10,1073741824,0,0,0,0,0,0,0),
-(46098,0,11,128,0,0,0,0,0,0,0),
-(46569,0,0,0,0,0,0,0,0,0,45),
-(46662,0,0,0,0,0,0,0,0,0,20),
-(46832,0,7,1,0,0,0,65536,0,0,0),
-(46854,0,0,0,0,0,0,2,0,0,0),
-(46855,0,0,0,0,0,0,2,0,0,0),
-(46867,0,0,0,0,0,0,2,0,0,0),
-(46910,0,0,0,0,0,0,1,5.5,0,0),
-(46911,0,0,0,0,0,0,1,7.5,0,0),
-(46913,0,4,0,1024,0,0,0,0,0,0),
-(46914,0,4,0,1024,0,0,0,0,0,0),
-(46915,0,4,0,1024,0,0,0,0,0,0),
-(46916,0,4,0,1024,0,0,2,0,0,0),
-(46951,0,4,1024,64,0,0,0,0,0,0),
-(46952,0,0,1024,64,0,0,0,0,0,0),
-(46953,0,0,1024,64,0,0,0,0,0,0),
-(47195,0,5,2,0,0,0,0,0,0,30),
-(47196,0,5,2,0,0,0,0,0,0,30),
-(47197,0,5,2,0,0,0,0,0,0,30),
-(47201,0,5,8,262144,0,0,65536,0,0,0),
-(47202,0,5,8,262144,0,0,0,0,0,0),
-(47203,0,5,8,262144,0,0,0,0,0,0),
-(47204,0,5,8,262144,0,0,0,0,0,0),
-(47205,0,5,8,262144,0,0,0,0,0,0),
-(47245,32,5,0,0,0,0,0,0,0,0),
-(47246,32,5,0,0,0,0,0,0,0,0),
-(47247,32,5,0,0,0,0,0,0,0,0),
-(47258,0,5,0,8388608,0,0,65536,0,0,0),
-(47259,0,5,0,8388608,0,0,65536,0,0,0),
-(47260,0,5,0,8388608,0,0,65536,0,0,0),
-(47263,32,5,0,0,0,0,2,0,0,20),
-(47264,32,5,0,0,0,0,2,0,0,20),
-(47265,32,5,0,0,0,0,2,0,0,20),
-(47509,0,0,0,0,0,0,2,0,0,0),
-(47511,0,0,0,0,0,0,2,0,0,0),
-(47515,0,0,0,0,0,0,2,0,0,0),
-(47516,0,6,6144,65536,0,0,0,0,0,0),
-(47517,0,6,6144,65536,0,0,0,0,0,0),
-(47535,0,6,6144,65536,0,81936,0,0,0,0),
-(47536,0,6,6144,65536,0,81936,0,0,0,0),
-(47537,0,6,6144,65536,0,81936,0,0,0,0),
-(47569,0,6,16384,0,0,16384,0,0,50,0),
-(47570,0,6,16384,0,0,16384,0,0,100,0),
-(47571,0,6,65536,0,0,65536,24576,0,50,0),
-(47580,0,6,0,0,64,0,65536,0,0,0),
-(47581,0,6,0,0,64,0,65536,0,0,0),
-(47582,0,6,0,0,64,0,65536,0,0,0),
-(48110,0,0,0,0,0,656040,0,0,0,0),
-(48111,0,0,0,0,0,656040,0,0,0,0),
-(48112,0,0,0,0,0,656040,0,0,0,0),
-(48113,0,0,0,0,0,656040,0,0,0,0),
-(48159,0,6,8192,0,0,0,0,0,0,0),
-(48160,0,6,8192,0,0,0,0,0,0,0),
-(48483,0,7,34816,1088,0,0,0,0,0,0),
-(48484,0,7,34816,1088,0,0,0,0,0,0),
-(48485,0,7,34816,1088,0,0,0,0,0,0),
-(48496,0,7,96,33554434,0,0,2,0,0,0),
-(48499,0,7,96,33554434,0,0,2,0,0,0),
-(48500,0,7,96,33554434,0,0,2,0,0,0),
-(48506,0,7,5,0,0,0,0,0,0,0),
-(48510,0,7,5,0,0,0,0,0,0,0),
-(48511,0,7,5,0,0,0,0,0,0,0),
-(48516,0,7,5,0,0,0,2,0,0,30),
-(48521,0,7,5,0,0,0,2,0,0,30),
-(48525,0,7,5,0,0,0,2,0,0,30),
-(48833,0,7,0,1088,0,0,0,0,0,0),
-(48835,0,10,0,8,0,0,0,0,0,0),
-(48837,0,11,2416967680,0,0,0,0,0,0,0),
-(48951,0,0,0,0,0,0,64,0,0,0),
-(48952,0,0,0,0,0,0,64,0,0,0),
-(48988,0,0,0,0,0,0,2,0,0,0),
-(49018,0,15,20971520,0,0,0,0,0,0,0),
-(49137,0,15,0,16384,0,0,0,0,0,0),
-(49188,0,15,2,0,0,0,0,0,0,0),
-(49208,0,15,4456448,0,0,0,0,0,0,0),
-(49222,0,0,0,0,0,0,0,0,0,3),
-(49280,0,0,0,0,0,0,0,0,0,3),
-(49281,0,0,0,0,0,0,0,0,0,3),
-(49283,0,0,0,0,0,0,0,0,0,3),
-(49284,0,0,0,0,0,0,0,0,0,3),
-(49503,0,0,0,0,0,0,2,0,0,0),
-(49504,0,0,0,0,0,0,2,0,0,0),
-(49529,0,15,20971520,0,0,0,0,0,0,0),
-(49530,0,15,20971520,0,0,0,0,0,0,0),
-(49622,0,0,0,0,0,0,0,0,0,60),
-(49657,0,15,0,16384,0,0,0,0,0,0),
-(50781, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 6), -- Fate Rune of Primal Energy
-(51123,0,0,0,0,0,0,2,0,0,0),
-(51127,0,0,0,0,0,0,2,0,0,0),
-(51128,0,0,0,0,0,0,2,0,0,0),
-(51129,0,0,0,0,0,0,2,0,0,0),
-(51130,0,0,0,0,0,0,2,0,0,0),
-(51346,0,0,0,0,0,0,0,0,0,10),
-(51349,0,0,0,0,0,0,0,0,0,10),
-(51352,0,0,0,0,0,0,0,0,0,10),
-(51359,0,0,0,0,0,0,0,0,0,10),
-(51414, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Venomous Tome
-(51466,0,0,0,0,0,0,2,0,0,0),
-(51470,0,0,0,0,0,0,2,0,0,0),
-(51474,0,0,0,0,0,0,65536,0,0,0),
-(51478,0,0,0,0,0,0,65536,0,0,0),
-(51479,0,0,0,0,0,0,65536,0,0,0),
-(51528,0,0,0,0,0,0,0,2.5,0,0),
-(51529,0,0,0,0,0,0,0,5,0,0),
-(51530,0,0,0,0,0,0,0,7.5,0,0),
-(51531,0,0,0,0,0,0,0,10,0,0),
-(51532,0,0,0,0,0,0,0,12.5,0,0),
-(51556,0,11,192,0,16,0,2,0,0,0),
-(51557,0,11,192,0,16,0,2,0,0,0),
-(51558,0,11,192,0,16,0,2,0,0,0),
-(51562,0,11,256,0,16,0,0,0,0,0),
-(51563,0,11,256,0,16,0,0,0,0,0),
-(51564,0,11,256,0,16,0,0,0,0,0),
-(51565,0,11,256,0,16,0,0,0,0,0),
-(51566,0,11,256,0,16,0,0,0,0,0),
-(51625,0,8,268476416,0,0,0,0,0,0,0),
-(51626,0,8,268476416,0,0,0,0,0,0,0),
-(51627,0,0,0,0,0,0,112,0,0,0),
-(51628,0,0,0,0,0,0,112,0,0,0),
-(51629,0,0,0,0,0,0,112,0,0,0),
-(51634,0,0,0,0,0,0,2,0,0,0),
-(51635,0,0,0,0,0,0,2,0,0,0),
-(51636,0,0,0,0,0,0,2,0,0,0),
-(51664,0,8,131072,8,0,0,0,0,0,0),
-(51665,0,8,131072,8,0,0,0,0,0,0),
-(51667,0,8,131072,8,0,0,0,0,0,0),
-(51668,0,8,131072,8,0,0,0,0,0,0),
-(51669,0,8,131072,8,0,0,0,0,0,0),
-(51672,0,0,0,0,0,0,16,0,0,1),
-(51674,0,0,0,0,0,0,16,0,0,1),
-(51679,0,8,1,1,0,0,0,0,0,0),
-(51692,0,8,512,0,0,0,2,0,0,0),
-(51696,0,8,512,0,0,0,2,0,0,0),
-(51698,0,0,0,0,0,0,2,0,0,1),
-(51700,0,0,0,0,0,0,2,0,0,1),
-(51701,0,0,0,0,0,0,2,0,0,1),
-(51940,0,0,0,0,0,0,0,0,20,0),
-(51989,0,0,0,0,0,0,0,0,20,0),
-(52004,0,0,0,0,0,0,0,0,20,0),
-(52005,0,0,0,0,0,0,0,0,20,0),
-(52007,0,0,0,0,0,0,0,0,20,0),
-(52008,0,0,0,0,0,0,0,0,20,0),
-(52020,0,7,32768,1048576,0,0,0,0,0,0),
-(52127,0,0,0,0,0,0,0,0,0,3),
-(52129,0,0,0,0,0,0,0,0,0,3),
-(52131,0,0,0,0,0,0,0,0,0,3),
-(52134,0,0,0,0,0,0,0,0,0,3),
-(52136,0,0,0,0,0,0,0,0,0,3),
-(52138,0,0,0,0,0,0,0,0,0,3),
-(52420,0,0,0,0,0,0,0,0,0,30),
-(52423,0,0,0,0,0,0,32,0,0,0),
-(52610,0,7,80000000,0,0,4000,0,0,0,0),
-(52795,0,6,1,0,0,0,0,0,0,0),
-(52797,0,6,1,0,0,0,0,0,0,0),
-(52798,0,6,1,0,0,0,0,0,0,0),
-(52799,0,6,1,0,0,0,0,0,0,0),
-(52800,0,6,1,0,0,0,0,0,0,0),
-(52898,0,0,0,0,0,0,2,0,0,0),
-(53137,0,15,20971520,0,0,0,0,0,0,0),
-(53138,0,15,20971520,0,0,0,0,0,0,0),
-(53215,0,9,1,0,0,0,0,0,0,0),
-(53216,0,9,1,0,0,0,0,0,0,0),
-(53217,0,9,1,0,0,0,0,0,0,0),
-(53221,0,9,0,1,0,0,0,0,0,0),
-(53222,0,9,0,1,0,0,0,0,0,0),
-(53224,0,9,0,1,0,0,0,0,0,0),
-(53228,0,9,32,16777216,0,0,0,0,0,0),
-(53232,0,9,32,16777216,0,0,0,0,0,0),
-(53256,0,9,2048,8388609,0,0,2,0,0,0),
-(53259,0,9,2048,8388609,0,0,2,0,0,0),
-(53260,0,9,2048,8388609,0,0,2,0,0,0),
-(53290,0,9,2048,2147483647,0,0,2,0,0,0),
-(53291,0,9,2048,2147483647,0,0,2,0,0,0),
-(53292,0,9,2048,2147483647,0,0,2,0,0,0),
-(53375,0,10,0,8192,0,16384,0,0,0,6),
-(53380,0,10,8388608,131072,0,0,2,0,0,0),
-(53381,0,10,8388608,131072,0,0,2,0,0,0),
-(53382,0,10,8388608,131072,0,0,2,0,0,0),
-(53397,0,0,0,0,0,0,2,0,0,0),
-(53486,0,10,8388608,163840,0,0,2,0,0,0),
-(53488,0,10,8388608,163840,0,0,2,0,0,0),
-(53501,0,0,0,0,0,0,2,0,0,0),
-(53502,0,0,0,0,0,0,2,0,0,0),
-(53503,0,0,0,0,0,0,2,0,0,0),
-(53551,0,10,4096,0,0,0,0,0,0,0),
-(53552,0,10,4096,0,0,0,0,0,0,0),
-(53553,0,10,4096,0,0,0,0,0,0,0),
-(53569,0,10,2097152,65536,0,0,2,0,0,0),
-(53576,0,10,2097152,65536,0,0,2,0,0,0),
-(53601,0,0,0,0,0,0,0,0,0,6),
-(53646,0,0,0,0,0,0,2,0,0,0),
-(53671,0,10,8388608,0,0,0,0,0,0,0),
-(53672,0,10,2097152,65536,0,0,2,0,0,0),
-(53673,0,10,8388608,0,0,0,0,0,0,0),
-(53754,0,5,0,1024,0,0,24576,0,0,0),
-(53759,0,5,0,1024,0,0,24576,0,0,0),
-(54149,0,10,2097152,65536,0,0,2,0,0,0),
-(54151,0,10,8388608,0,0,0,0,0,0,0),
-(54154,0,10,8388608,0,0,0,0,0,0,0),
-(54155,0,10,8388608,0,0,0,0,0,0,0),
-(54278,0,0,0,0,0,0,2,0,0,0),
-(54486,0,0,536870945,36864,0,0,0,0,0,0),
-(54488,0,0,536870945,36864,0,0,0,0,0,0),
-(54489,0,0,536870945,36864,0,0,0,0,0,0),
-(54490,0,0,536870945,36864,0,0,0,0,0,0),
-(54695, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Death Knights Anguish
-(54707,0,0,0,0,0,0,0,0,0,60),
-(54738,0,0,0,0,0,0,2,0,0,45),
-(54747,0,0,0,0,0,0,65536,0,0,0),
-(54749,0,0,0,0,0,0,65536,0,0,0),
-(54754,0,7,16,0,0,0,0,0,0,0),
-(54787,0,3,0,1,0,32768,8192,0,0,0),
-(54808,0,0,0,0,0,0,0,0,0,60),
-(54838, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Valonforths Remembrance
-(54841, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 3), -- Thunder Capacitor
-(54936,0,10,1073741824,0,0,0,0,0,0,0),
-(54937,0,10,2147483648,0,0,0,0,0,0,0),
-(54939,0,10,32768,0,0,0,0,0,0,0),
-(55198,0,11,448,0,0,16384,2,0,0,0),
-(55380,0,0,0,0,0,0,0,0,0,45),
-(55381,0,0,0,0,0,0,65536,0,0,15),
-(55440,0,11,64,0,0,0,0,0,0,0),
-(55640,0,0,0,0,0,0,0,0,0,45),
-(55666,0,15,1,0,0,0,0,0,0,0),
-(55667,0,15,1,0,0,0,0,0,0,0),
-(55668,0,15,1,0,0,0,0,0,0,0),
-(55669,0,15,1,0,0,0,0,0,0,0),
-(55670,0,15,1,0,0,0,0,0,0,0),
-(55672,0,6,1,0,0,16384,0,0,0,0),
-(55677,0,6,0,1,0,0,0,0,0,0),
-(55680,0,6,512,0,0,0,0,0,0,0),
-(55689,0,0,0,0,0,0,2,0,0,0),
-(55747, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Horn of Argent Fury
-(55768,0,0,0,0,0,0,0,0,0,45),
-(55776,0,0,0,0,0,0,0,0,0,45),
-(56218,0,5,2,0,0,0,0,0,0,0),
-(56249,0,5,0,0,1024,0,0,0,0,0),
-(56342,0,9,16384,0,0,0,0,0,0,0),
-(56343,0,9,16384,0,0,0,0,0,0,0),
-(56344,0,9,16384,0,0,0,0,0,0,0),
-(56355,0,0,0,0,0,0,64,0,0,0),
-(56364,0,3,0,16777216,0,0,0,0,0,0),
-(56372,0,3,0,128,0,16384,0,0,0,0),
-(56374,0,3,0,4000,0,4000,0,0,0,0),
-(56451,0,0,0,0,0,0,0,0,0,3),
-(56611,0,0,0,0,0,0,2,0,0,0),
-(56612,0,0,0,0,0,0,2,0,0,0),
-(56613,0,0,0,0,0,0,2,0,0,0),
-(56614,0,0,0,0,0,0,2,0,0,0),
-(56636,0,4,32,0,0,0,0,0,0,0),
-(56637,0,4,32,0,0,0,0,0,0,0),
-(56638,0,4,32,0,0,0,0,0,0,0),
-(56816,0,0,0,0,0,0,48,0,0,0),
-(56821,0,8,2,0,0,0,2,0,0,0),
-(56822,0,15,2,0,0,0,0,0,0,0),
-(56834,0,15,4456448,0,0,0,0,0,0,0),
-(56835,0,15,4456448,0,0,0,0,0,0,0),
-(57318,0,10,0,8192,0,16384,0,0,0,6),
-(57345,0,0,0,0,0,0,0,0,0,45),
-(57352, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x000288AA, 0x00000000, 0, 0, 45), -- Darkmoon Card: Death
-(57878,0,0,0,0,0,0,16,0,0,0),
-(57880,0,0,0,0,0,0,16,0,0,0),
-(57881,0,0,0,0,0,0,16,0,0,0),
-(57907,0,7,2,0,0,0,0,0,0,0),
-(57960,0,0,0,0,0,0,0,0,0,3),
-(58357,0,4,64,0,0,0,2,0,0,0),
-(58364,0,4,1024,0,0,0,0,0,0,0),
-(58372,0,4,2,0,0,0,0,0,0,0),
-(58386,0,0,0,0,0,0,32,0,0,0),
-(58426,0,8,4194304,0,0,81920,24577,0,0,0),
-(58435,0,5,2,256,0,0,0,0,0,0),
-(58442, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 15), -- Airy Pale Ale
-(58444, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 5), -- Worg Tooth Oatmeal Stout
-(58616,0,15,262144,0,0,0,0,0,0,0),
-(58620,0,15,0,16384,0,0,0,0,0,0),
-(58626,0,15,33554432,0,0,0,0,0,0,0),
-(58631,0,15,2,0,0,0,0,0,0,0),
-(58642,0,15,0,134217728,0,0,0,0,0,0),
-(58644,0,15,0,4,0,0,0,0,0,0),
-(58647,0,15,0,4,0,0,0,0,0,0),
-(58676,0,15,0,8,0,0,0,0,0,0),
-(58677,0,15,8192,0,0,0,0,0,0,0),
-(58872,0,0,0,0,0,0,64,0,0,0),
-(58874,0,0,0,0,0,0,64,0,0,0),
-(58901, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 45), -- Tears of Bitter Anguish
-(59057,0,15,2,0,0,0,0,0,0,0),
-(59088,0,4,0,2,0,4000,0,0,0,0),
-(59089,0,4,0,2,0,4000,0,0,0,0),
-(59176,0,0,0,0,0,0,2,0,0,0),
-(59327,0,15,134217728,0,0,0,0,0,0,0),
-(59345, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Crusaders Locket
-(59630, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Black Magic
-(59725,0,0,0,0,0,0,2048,0,0,0),
-(60061, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Scarab of the Infinite Cycle
-(60063, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Sundial of the Exiled
-(60066, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Hourglass of the Unraveller
-(60132,0,15,0,134348800,0,0,0,0,0,0),
-(60170,0,5,6,0,0,0,0,0,0,0),
-(60172,0,5,262144,0,0,0,65536,0,0,0),
-(60176,0,4,32,16,0,0,0,0,0,0),
-(60221, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Essence of Gossamer
-(60301, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Meteorite Whetstone
-(60306, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Vestige of Haldor
-(60317, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Signet of Edward the Odd
-(60436, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Grim Toll
-(60442,0,0,0,0,0,0,0,0,0,45),
-(60473, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Forge Ember
-(60482, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Pendulum of Telluric Currents
-(60487, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 15), -- Extract of Necromantic Power
-(60490, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Embrace of the Spider
-(60493,0,0,0,0,0,0,0,0,0,45),
-(60519, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Spark of Life
-(60529,0,0,0,0,0,0,0,0,0,45),
-(60537, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 45), -- Soul of the Dead
-(60564,0,11,2416967680,0,0,0,0,0,0,0),
-(60571,0,11,2416967680,0,0,0,0,0,0,0),
-(60572,0,11,2416967680,0,0,0,0,0,0,0),
-(60573,0,11,2416967680,0,0,0,0,0,0,0),
-(60574,0,11,2416967680,0,0,0,0,0,0,0),
-(60575,0,11,2416967680,0,0,0,0,0,0,0),
-(60617,0,0,0,0,0,0,32,0,0,0),
-(60710,0,7,2,0,0,0,0,0,0,0),
-(60717,0,7,2,0,0,0,0,0,100,0),
-(60719,0,7,2,0,0,0,0,0,0,0),
-(60722,0,7,2,0,0,0,0,0,0,0),
-(60724,0,7,2,0,0,0,0,0,0,0),
-(60726,0,7,2,0,0,0,0,0,0,0),
-(60770,0,11,1,0,0,0,0,0,0,0),
-(60818,0,10,0,512,0,0,0,0,0,0),
-(60826,0,15,20971520,0,0,0,0,0,0,0),
-(61188,0,5,4,0,0,0,0,0,0,0),
-(61257,0,0,0,0,0,131752,65536,0,0,0),
-(61324,0,10,0,131072,0,0,0,0,0,0),
-(61345,0,0,0,0,0,0,2,0,0,0),
-(61346,0,0,0,0,0,0,2,0,0,0),
-(61356, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x000002A8, 0x00000002, 0, 0, 90), -- Invigorating Earthsiege Diamond
-(61618,0,0,0,0,0,0,0,0,0,45),
-(61846,0,0,0,0,0,0,16,0,0,0),
-(61847,0,0,0,0,0,0,16,0,0,0),
-(61848,0,0,0,0,0,0,16,0,0,0),
-(62147,0,15,2,0,0,0,0,0,0,0),
-(62459,0,15,4,0,0,0,0,0,0,0);
-/*!40000 ALTER TABLE `spell_proc_event` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
-- Table structure for table `spell_required`
--
diff --git a/sql/world_script_waypoints.sql b/sql/world_script_waypoints.sql
index 0e57a8db004..e8c541a9b07 100644
--- a/sql/world_script_waypoints.sql
+++ b/sql/world_script_waypoints.sql
@@ -52,6 +52,35 @@ INSERT INTO script_waypoint VALUES
(16295, 33, 7603.768066, -7667.000488, 153.997726, 8000, 'SAY_END_2'),
(16295, 34, 7603.768066, -7667.000488, 153.997726, 0, '');
+DELETE FROM script_waypoint WHERE entry=17969;
+INSERT INTO script_waypoint VALUES
+(17969, 0, -930.048950, 5288.080078, 23.848402, 0, ''),
+(17969, 1, -925.677917, 5296.482910, 18.183748, 0, ''),
+(17969, 2, -924.297180, 5299.016113, 17.710915, 0, ''),
+(17969, 3, -928.390076, 5317.022949, 18.208593, 0, ''),
+(17969, 4, -930.620972, 5329.915039, 18.773422, 0, 'SAY_AMBUSH1'),
+(17969, 5, -931.490295, 5357.654785, 18.027155, 0, 'SAY_PROGRESS'),
+(17969, 6, -934.777771, 5369.341797, 22.278048, 0, ''),
+(17969, 7, -934.521851, 5373.407227, 22.834690, 0, ''),
+(17969, 8, -937.008545, 5382.980469, 22.699078, 0, ''),
+(17969, 9, -941.948059, 5404.141602, 22.669743, 0, ''),
+(17969, 10, -931.244263, 5415.846680, 23.063961, 0, 'at crossroad'),
+(17969, 11, -901.497925, 5420.315430, 24.213270, 0, ''),
+(17969, 12, -860.311707, 5415.617676, 23.671139, 0, ''),
+(17969, 13, -777.988953, 5391.982422, 23.001669, 0, ''),
+(17969, 14, -750.362000, 5385.786621, 22.765791, 0, ''),
+(17969, 15, -731.339417, 5382.449707, 22.517065, 0, ''),
+(17969, 16, -681.235901, 5381.377930, 22.050159, 2500, 'end bridge SAY_AMBUSH2'),
+(17969, 17, -637.944458, 5384.338379, 22.205647, 0, 'SAY_END'),
+(17969, 18, -608.954407, 5408.715332, 21.630386, 0, ''),
+(17969, 19, -598.134277, 5413.608398, 21.412275, 0, ''),
+(17969, 20, -571.268982, 5420.771973, 21.184925, 0, ''),
+(17969, 21, -553.099915, 5424.616211, 21.193716, 0, ''),
+(17969, 22, -524.745483, 5443.945313, 20.977013, 0, ''),
+(17969, 23, -502.984985, 5446.283691, 22.149435, 0, ''),
+(17969, 24, -472.463959, 5449.546875, 22.561453, 0, ''),
+(17969, 25, -454.533264, 5461.302246, 22.602837, 30000, 'quest complete');
+
DELETE FROM script_waypoint WHERE entry=467;
INSERT INTO script_waypoint VALUES
(467, 0, -10508.40, 1068.00, 55.21, 0, ''),
diff --git a/sql/world_scripts_full.sql b/sql/world_scripts_full.sql
index 024e437c472..cec2944c6df 100644
--- a/sql/world_scripts_full.sql
+++ b/sql/world_scripts_full.sql
@@ -1,4 +1,4 @@
--- Up to TC2 3515
+-- Up to TC2 4006
/* WORLD BOSS */
UPDATE `creature_template` SET `ScriptName`='boss_ysondre' WHERE `entry`=14887;
@@ -177,7 +177,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_engineer_spark_overgrind' WHERE
UPDATE `creature_template` SET `ScriptName`='npc_injured_draenei' WHERE `entry`=16971;
UPDATE `creature_template` SET `ScriptName`='npc_magwin' WHERE `entry`=17312;
UPDATE `creature_template` SET `ScriptName`='npc_geezle' WHERE `entry`=17318;
-UPDATE `creature_template` SET `ScriptName`='mob_nestlewood_owlkin' WHERE `entry`=16518;
+UPDATE `creature_template` SET `ScriptName`='npc_nestlewood_owlkin' WHERE `entry`=16518;
UPDATE `creature_template` SET `ScriptName`='npc_draenei_survivor' WHERE `entry`=16483;
/* BADLANDS */
@@ -799,7 +799,6 @@ UPDATE `creature_template` SET `ScriptName`='npc_kaya_flathoof' WHERE `entry`=11
UPDATE `creature_template` SET `ScriptName`='npc_archmage_malin' WHERE `entry`=2708;
UPDATE `creature_template` SET `ScriptName`='npc_bartleby' WHERE `entry`=6090;
UPDATE `creature_template` SET `ScriptName`='npc_dashel_stonefist' WHERE `entry`=4961;
-UPDATE `creature_template` SET `ScriptName`='npc_general_marcus_jonathan' WHERE `entry`=466;
UPDATE `creature_template` SET `ScriptName`='npc_lady_katrana_prestor' WHERE `entry`=1749;
/* STRANGLETHORN VALE */
diff --git a/sql/world_scripts_structure.sql b/sql/world_scripts_structure.sql
deleted file mode 100644
index 0087c4e1d1b..00000000000
--- a/sql/world_scripts_structure.sql
+++ /dev/null
@@ -1,68 +0,0 @@
--- Up to ACID 0.0.9
-
-DROP TABLE IF EXISTS `creature_ai_scripts`;
-CREATE TABLE `creature_ai_scripts` (
- `id` int(11) unsigned NOT NULL COMMENT 'Identifier' AUTO_INCREMENT,
- `creature_id` int(11) unsigned NOT NULL default '0' COMMENT 'Creature Template Identifier',
- `event_type` tinyint(5) unsigned NOT NULL default '0' COMMENT 'Event Type',
- `event_inverse_phase_mask` int(11) signed NOT NULL default '0' COMMENT 'Mask which phases this event will not trigger in',
- `event_chance` int(3) unsigned NOT NULL default '100',
- `event_flags` int(3) unsigned NOT NULL default '0',
- `event_param1` int(11) signed NOT NULL default '0',
- `event_param2` int(11) signed NOT NULL default '0',
- `event_param3` int(11) signed NOT NULL default '0',
- `event_param4` int(11) signed NOT NULL default '0',
- `action1_type` tinyint(5) unsigned NOT NULL default '0' COMMENT 'Action Type',
- `action1_param1` int(11) signed NOT NULL default '0',
- `action1_param2` int(11) signed NOT NULL default '0',
- `action1_param3` int(11) signed NOT NULL default '0',
- `action2_type` tinyint(5) unsigned NOT NULL default '0' COMMENT 'Action Type',
- `action2_param1` int(11) signed NOT NULL default '0',
- `action2_param2` int(11) signed NOT NULL default '0',
- `action2_param3` int(11) signed NOT NULL default '0',
- `action3_type` tinyint(5) unsigned NOT NULL default '0' COMMENT 'Action Type',
- `action3_param1` int(11) signed NOT NULL default '0',
- `action3_param2` int(11) signed NOT NULL default '0',
- `action3_param3` int(11) signed NOT NULL default '0',
- `comment` varchar(255) NOT NULL default '' COMMENT 'Event Comment',
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='EventAI Scripts';
-
-DROP TABLE IF EXISTS `creature_ai_summons`;
-CREATE TABLE `creature_ai_summons` (
- `id` int(11) unsigned NOT NULL COMMENT 'Location Identifier' AUTO_INCREMENT,
- `position_x` float NOT NULL default '0',
- `position_y` float NOT NULL default '0',
- `position_z` float NOT NULL default '0',
- `orientation` float NOT NULL default '0',
- `spawntimesecs` int(11) unsigned NOT NULL default '120',
- `comment` varchar(255) NOT NULL default '' COMMENT 'Summon Comment',
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='EventAI Summoning Locations';
-
-DROP TABLE IF EXISTS `creature_ai_texts`;
-CREATE TABLE `creature_ai_texts` (
- `entry` mediumint(8) NOT NULL,
- `content_default` text NOT NULL,
- `content_loc1` text,
- `content_loc2` text,
- `content_loc3` text,
- `content_loc4` text,
- `content_loc5` text,
- `content_loc6` text,
- `content_loc7` text,
- `content_loc8` text,
- `sound` mediumint(8) unsigned NOT NULL DEFAULT '0',
- `type` tinyint(3) unsigned NOT NULL DEFAULT '0',
- `language` tinyint(3) unsigned NOT NULL DEFAULT '0',
- `emote` tinyint(3) unsigned NOT NULL DEFAULT '0',
- `comment` text,
- PRIMARY KEY (`entry`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Script Texts';
-
-CREATE TABLE IF NOT EXISTS `version` (
- `core_version` varchar(120) default NULL COMMENT 'Core revision dumped at startup.',
- `core_revision` varchar(120) default '0',
- `db_version` varchar(120) default NULL COMMENT 'Version of world DB.',
- `script_version` varchar(120) default NULL COMMENT 'Version of scripts DB.'
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Version Notes'; \ No newline at end of file
diff --git a/sql/world_spell_full.sql b/sql/world_spell_full.sql
index 8a0f67e5933..08c23a2b726 100644
--- a/sql/world_spell_full.sql
+++ b/sql/world_spell_full.sql
@@ -1,4 +1,4 @@
--- Up to TC2 3515
+-- Up to TC2 4018
-- --------
-- LINKED
@@ -13,15 +13,7 @@
# - + 0 target casts 2 on self (originalCaster = caster) when aura 1 casted by caster is removed
# - - 0 aura 2 is removed when aura 1 is removed
-DROP TABLE IF EXISTS `spell_linked_spell`;
-CREATE TABLE `spell_linked_spell` (
- `spell_trigger` mediumint(8) NOT NULL,
- `spell_effect` mediumint(8) NOT NULL default '0',
- `type` tinyint(3) unsigned NOT NULL default '0',
- `comment` text NOT NULL,
- UNIQUE KEY `trigger_effect_type` (`spell_trigger`,`spell_effect`,`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Spell System';
-
+TRUNCATE TABLE `spell_linked_spell`;
INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
-- class
( 31224, -1543, 2, 'Cloak of Shadows - Flare'),
@@ -80,6 +72,8 @@ INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comm
( 50720, 59665, 0, 'Vigilance (redirect threat)'),
( 52610, 62071, 0, 'Savage Roar'),
( -52610, -62071, 0, 'Savage Roar'),
+(51209, 55095, 1, 'Hungering cold - frost fever'),
+(50334, 58923, 2, 'Berserk - modify target number aura'),
-- Creature
( 36574, 36650, 0, 'Apply Phase Slip Vulnerability'),
@@ -544,53 +538,6 @@ INSERT INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES
(0, 6, 56816, 'Rune Strike');
-- --------
--- REQUIRED
--- --------
-DROP TABLE IF EXISTS `spell_required`;
-CREATE TABLE `spell_required` (
- `spell_id` mediumint(9) NOT NULL default '0',
- `req_spell` mediumint(9) NOT NULL default '0',
- PRIMARY KEY (`spell_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Spell Additinal Data';
-
-INSERT INTO `spell_required` (`spell_id`, `req_spell`) VALUES
-(53312, 53308),
-(48938, 48936),
-(48937, 48935),
-(48934, 48932),
-(48933, 48931),
-(27143, 27142),
-(27141, 27140),
-(27009, 26989),
-(25916, 25291),
-(25918, 25290),
-(25894, 19854),
-(25782, 19838),
-(27681, 14752),
-(17329, 9853),
-(16813, 9852),
-(16812, 5196),
-(16811, 5195),
-(16810, 1062),
-(16689, 339),
-(9788, 9785),
-(17039, 9787),
-(17040, 9787),
-(17041, 9787),
-(10660, 10662),
-(10658, 10662),
-(10656, 10662),
-(28672, 28596),
-(28675, 28596),
-(28677, 28596),
-(26801, 26790),
-(26798, 26790),
-(26797, 26790),
-(20222, 12656),
-(20219, 12656),
-(25899, 20911);
-
--- --------
-- PROC
-- --------
/*
@@ -606,22 +553,7 @@ CONCAT('0x',LPAD(HEX(procex),8,'0')),
ppmrate, customchance, cooldown
from spell_proc_event order by entry;
*/
-DROP TABLE IF EXISTS `spell_proc_event`;
-CREATE TABLE `spell_proc_event` (
- `entry` smallint(5) unsigned NOT NULL default '0',
- `SchoolMask` tinyint(4) NOT NULL default '0',
- `SpellFamilyName` smallint(5) unsigned NOT NULL default '0',
- `SpellFamilyMask0` int(10) unsigned NOT NULL default '0',
- `SpellFamilyMask1` int(10) unsigned NOT NULL default '0',
- `SpellFamilyMask2` int(10) unsigned NOT NULL default '0',
- `procFlags` int(10) unsigned NOT NULL default '0',
- `procEx` int(10) unsigned NOT NULL default '0',
- `ppmRate` float NOT NULL default '0',
- `CustomChance` float NOT NULL default '0',
- `Cooldown` int(10) unsigned NOT NULL default '0',
- PRIMARY KEY (`entry`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
+TRUNCATE TABLE `spell_proc_event`;
INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
( 324, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 3), -- Lightning Shield (Rank 1)
( 325, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 3), -- Lightning Shield (Rank 2)
@@ -1284,6 +1216,8 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell
( 51474, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0, 0, 0), -- Astral Shift (Rank 1)
( 51478, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0, 0, 0), -- Astral Shift (Rank 2)
( 51479, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0, 0, 0), -- Astral Shift (Rank 3)
+( 51521, 0x00, 11, 0x00000000, 0x01000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Improved Stormstrike
+( 51522, 0x00, 11, 0x00000000, 0x01000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Improved Stormstrike
( 51528, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 2.5, 0, 0), -- Maelstrom Weapon (Rank 1)
( 51529, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 5, 0, 0), -- Maelstrom Weapon (Rank 2)
( 51530, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 7.5, 0, 0), -- Maelstrom Weapon (Rank 3)
@@ -1310,6 +1244,9 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell
( 51667, 0x00, 8, 0x00020000, 0x00000008, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Cut to the Chase (Rank 3)
( 51668, 0x00, 8, 0x00020000, 0x00000008, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Cut to the Chase (Rank 4)
( 51669, 0x00, 8, 0x00020000, 0x00000008, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Cut to the Chase (Rank 5)
+( 51698, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 1), -- Honor Among Thieves
+( 51700, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 1), -- Honor Among Thieves
+( 51701, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 1), -- Honor Among Thieves
( 51672, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0, 0, 1), -- Unfair Advantage (Rank 1)
( 51674, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0, 0, 1), -- Unfair Advantage (Rank 2)
( 51679, 0x00, 8, 0x00000001, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Throwing Specialization (Rank 2)
@@ -1404,7 +1341,7 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell
( 55380, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Skyflare Swiftness
( 55381, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0, 0, 15), -- Mana Restore
( 55440, 0x00, 11, 0x00000040, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Glyph of Healing Wave
-( 55610, 0x00, 15, 0x00000000, 0x04000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Improved Icy Talons
+( 55610, 0x00, 15, 0x00000000, 0x04000000, 0x00000000, 0x00001000, 0x00000000, 0, 0, 0), -- Improved Icy Talons
( 55620, 0x00, 15, 0x00000001, 0x08000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Night of the Dead (Rank 1)
( 55623, 0x00, 15, 0x00000001, 0x08000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Night of the Dead (Rank 2)
( 55640, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Lightweave Embroidery
@@ -1530,14 +1467,7 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell
-- --------
-- ENCHANT PROC
-- --------
-DROP TABLE IF EXISTS `spell_enchant_proc_data`;
-CREATE TABLE `spell_enchant_proc_data` (
- `entry` INT(10) UNSIGNED NOT NULL,
- `customChance` INT(10) UNSIGNED NOT NULL DEFAULT '0',
- `PPMChance` FLOAT UNSIGNED NOT NULL DEFAULT '0',
- `procEx` FLOAT UNSIGNED NOT NULL DEFAULT '0'
-) ENGINE=MYISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Spell enchant proc data';
-
+TRUNCATE TABLE `spell_enchant_proc_data`;
INSERT INTO spell_enchant_proc_data (`entry`, `customChance`, `PPMChance`,`procEx`) VALUES
(2, 0, 8.8,0), -- Frostbrand Weapon
(12, 0, 8.8,0), -- Frostbrand Weapon
@@ -1553,16 +1483,7 @@ INSERT INTO spell_enchant_proc_data (`entry`, `customChance`, `PPMChance`,`procE
-- SPELL AFFECT
-- --------
-DROP TABLE IF EXISTS `spell_affect`;
-CREATE TABLE `spell_affect` (
- `entry` smallint(5) unsigned NOT NULL default '0',
- `effectId` tinyint(3) unsigned NOT NULL default '0',
- `SpellClassMask0` int(5) unsigned NOT NULL default '0',
- `SpellClassMask1` int(5) unsigned NOT NULL default '0',
- `SpellClassMask2` int(5) unsigned NOT NULL default '0',
- PRIMARY KEY (`entry`,`effectId`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
+TRUNCATE TABLE `spell_affect`;
INSERT INTO `spell_affect` (`entry`, `effectId`, `SpellClassMask0`, `SpellClassMask1`, `SpellClassMask2`) VALUES
(44544,0,685904631,1151048,0); -- Fingers of frost
@@ -1658,6 +1579,12 @@ INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES
-- frostbrood vanquisher
update creature_template set maxhealth = 133525, minhealth = 133525, maxmana = 51360, minmana = 51360, spell1 = 53114, spell2 = 53112, spell3=53110, VehicleId = 156 where entry = 28670;
+DELETE FROM `spell_script_target` WHERE entry IN
+(53110);
+INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES
+(53110,1,28940);
+
+
-- --------
-- NAXXARAMAS
diff --git a/src/bindings/scripts/CMakeLists.txt b/src/bindings/scripts/CMakeLists.txt
index 4e2d4aa4de0..2dbf2545d3b 100644
--- a/src/bindings/scripts/CMakeLists.txt
+++ b/src/bindings/scripts/CMakeLists.txt
@@ -149,6 +149,7 @@ SET(trinityscript_LIB_SRCS
scripts/zone/darkshore/darkshore.cpp
scripts/zone/deadmines/def_deadmines.h
scripts/zone/deadmines/deadmines.cpp
+ scripts/zone/desolace/desolace.cpp
scripts/zone/dragonblight/dragonblight.cpp
scripts/zone/dun_morogh/dun_morogh.cpp
scripts/zone/dustwallow_marsh/dustwallow_marsh.cpp
diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp
index 24e0c488825..fadadda7246 100644
--- a/src/bindings/scripts/ScriptMgr.cpp
+++ b/src/bindings/scripts/ScriptMgr.cpp
@@ -255,6 +255,8 @@ extern void AddSC_instance_deadmines();
//Deadwind pass
//Desolace
+extern void AddSC_desolace();
+
//Dire Maul
extern void AddSC_dragonblight();
@@ -1149,6 +1151,8 @@ void ScriptsInit(char const* cfg_file = "trinitycore.conf")
//Deadwind pass
//Desolace
+ AddSC_desolace();
+
//Dire Maul
AddSC_dragonblight();
diff --git a/src/bindings/scripts/VC80/80ScriptDev2.vcproj b/src/bindings/scripts/VC80/80ScriptDev2.vcproj
index b3eb1437c02..5885b5de607 100644
--- a/src/bindings/scripts/VC80/80ScriptDev2.vcproj
+++ b/src/bindings/scripts/VC80/80ScriptDev2.vcproj
@@ -718,8 +718,10 @@
>
</Filter>
<Filter
- Name="Desolace"
- >
+ Name="Desolace">
+ <File
+ RelativePath="..\scripts\zone\desolace\desolace.cpp">
+ </File>
</Filter>
<Filter
Name="Dire Maul"
diff --git a/src/bindings/scripts/VC90/90ScriptDev2.vcproj b/src/bindings/scripts/VC90/90ScriptDev2.vcproj
index 95f44bd2275..97d0da3ceea 100644
--- a/src/bindings/scripts/VC90/90ScriptDev2.vcproj
+++ b/src/bindings/scripts/VC90/90ScriptDev2.vcproj
@@ -717,8 +717,10 @@
>
</Filter>
<Filter
- Name="Desolace"
- >
+ Name="Desolace">
+ <File
+ RelativePath="..\scripts\zone\desolace\desolace.cpp">
+ </File>
</Filter>
<Filter
Name="Dire Maul"
diff --git a/src/bindings/scripts/scripts/guard/guard_ai.cpp b/src/bindings/scripts/scripts/guard/guard_ai.cpp
index 3d7c3f5ba4c..41f3ad4fefc 100644
--- a/src/bindings/scripts/scripts/guard/guard_ai.cpp
+++ b/src/bindings/scripts/scripts/guard/guard_ai.cpp
@@ -170,3 +170,27 @@ void guardAI::UpdateAI(const uint32 diff)
}
}
+void guardAI::DoReplyToTextEmote(uint32 em)
+{
+ switch(em)
+ {
+ case TEXTEMOTE_KISS: m_creature->HandleEmoteCommand(EMOTE_ONESHOT_BOW); break;
+ case TEXTEMOTE_WAVE: m_creature->HandleEmoteCommand(EMOTE_ONESHOT_WAVE); break;
+ case TEXTEMOTE_SALUTE: m_creature->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE); break;
+ case TEXTEMOTE_SHY: m_creature->HandleEmoteCommand(EMOTE_ONESHOT_FLEX); break;
+ case TEXTEMOTE_RUDE:
+ case TEXTEMOTE_CHICKEN: m_creature->HandleEmoteCommand(EMOTE_ONESHOT_POINT); break;
+ }
+}
+
+void guardAI_orgrimmar::ReceiveEmote(Player *player, uint32 text_emote)
+{
+ if (player->GetTeam()==HORDE)
+ DoReplyToTextEmote(text_emote);
+}
+
+void guardAI_stormwind::ReceiveEmote(Player *player, uint32 text_emote)
+{
+ if (player->GetTeam() == ALLIANCE)
+ DoReplyToTextEmote(text_emote);
+}
diff --git a/src/bindings/scripts/scripts/guard/guard_ai.h b/src/bindings/scripts/scripts/guard/guard_ai.h
index 71ded211f6f..85baa30fb9d 100644
--- a/src/bindings/scripts/scripts/guard/guard_ai.h
+++ b/src/bindings/scripts/scripts/guard/guard_ai.h
@@ -21,6 +21,23 @@ struct TRINITY_DLL_DECL guardAI : public ScriptedAI
void JustDied(Unit *Killer);
void UpdateAI(const uint32 diff);
+
+ //common used for guards in main cities
+ void DoReplyToTextEmote(uint32 em);
+};
+
+struct TRINITY_DLL_DECL guardAI_orgrimmar : public guardAI
+{
+ guardAI_orgrimmar(Creature *c) : guardAI(c) {}
+
+ void ReceiveEmote(Player *player, uint32 text_emote);
+};
+
+struct TRINITY_DLL_DECL guardAI_stormwind : public guardAI
+{
+ guardAI_stormwind(Creature *c) : guardAI(c) {}
+
+ void ReceiveEmote(Player *player, uint32 text_emote);
};
#endif
diff --git a/src/bindings/scripts/scripts/guard/guards.cpp b/src/bindings/scripts/scripts/guard/guards.cpp
index fb27c64135d..4f160223aae 100644
--- a/src/bindings/scripts/scripts/guard/guards.cpp
+++ b/src/bindings/scripts/scripts/guard/guards.cpp
@@ -79,20 +79,6 @@ EndContentData */
#define GOSSIP_TEXT_INN_SILVERMOON_1 "Silvermoon City Inn"
#define GOSSIP_TEXT_INN_SILVERMOON_2 "Wayfarer's Rest tavern"
-//common used for guards in main cities
-void DoReplyToTextEmote(Creature *_Creature,uint32 em)
-{
- switch(em)
- {
- case TEXTEMOTE_KISS: _Creature->HandleEmoteCommand(EMOTE_ONESHOT_BOW); break;
- case TEXTEMOTE_WAVE: _Creature->HandleEmoteCommand(EMOTE_ONESHOT_WAVE); break;
- case TEXTEMOTE_SALUTE: _Creature->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE); break;
- case TEXTEMOTE_SHY: _Creature->HandleEmoteCommand(EMOTE_ONESHOT_FLEX); break;
- case TEXTEMOTE_RUDE:
- case TEXTEMOTE_CHICKEN: _Creature->HandleEmoteCommand(EMOTE_ONESHOT_POINT); break;
- }
-}
-
/*******************************************************
* guard_azuremyst start
*******************************************************/
@@ -2220,20 +2206,13 @@ bool GossipSelect_guard_orgrimmar(Player *player, Creature *_Creature, uint32 se
return true;
}
-bool ReceiveEmote_guard_orgrimmar(Player *player, Creature *_Creature, uint32 emote)
-{
- if( player->GetTeam() == HORDE )
- DoReplyToTextEmote(_Creature,emote);
- return true;
-}
-
/*******************************************************
* guard_orgrimmar end
*******************************************************/
CreatureAI* GetAI_guard_orgrimmar(Creature *_Creature)
{
- return new guardAI (_Creature);
+ return new guardAI_orgrimmar (_Creature);
}
/*******************************************************
@@ -3384,20 +3363,13 @@ bool GossipSelect_guard_stormwind(Player *player, Creature *_Creature, uint32 se
return true;
}
-bool ReceiveEmote_guard_stormwind(Player *player, Creature *_Creature, uint32 emote)
-{
- if( player->GetTeam() == ALLIANCE )
- DoReplyToTextEmote(_Creature,emote);
- return true;
-}
-
/*******************************************************
* guard_stormwind end
*******************************************************/
CreatureAI* GetAI_guard_stormwind(Creature *_Creature)
{
- return new guardAI (_Creature);
+ return new guardAI_stormwind (_Creature);
}
/*******************************************************
@@ -4010,7 +3982,6 @@ void AddSC_guards()
newscript->Name="guard_orgrimmar";
newscript->pGossipHello = &GossipHello_guard_orgrimmar;
newscript->pGossipSelect = &GossipSelect_guard_orgrimmar;
- //newscript->pReceiveEmote = &ReceiveEmote_guard_orgrimmar;
newscript->GetAI = &GetAI_guard_orgrimmar;
newscript->RegisterSelf();
@@ -4046,7 +4017,6 @@ void AddSC_guards()
newscript->Name="guard_stormwind";
newscript->pGossipHello = &GossipHello_guard_stormwind;
newscript->pGossipSelect = &GossipSelect_guard_stormwind;
- //newscript->pReceiveEmote = &ReceiveEmote_guard_stormwind;
newscript->GetAI = &GetAI_guard_stormwind;
newscript->RegisterSelf();
diff --git a/src/bindings/scripts/scripts/npc/npcs_special.cpp b/src/bindings/scripts/scripts/npc/npcs_special.cpp
index 3c0429ee4f3..c6a545faed1 100644
--- a/src/bindings/scripts/scripts/npc/npcs_special.cpp
+++ b/src/bindings/scripts/scripts/npc/npcs_special.cpp
@@ -98,14 +98,18 @@ struct TRINITY_DLL_DECL npc_chicken_cluckAI : public ScriptedAI
DoScriptText(EMOTE_A_HELLO, m_creature);
}
}
- } else DoScriptText(EMOTE_H_HELLO,m_creature);
+ }
+ else
+ DoScriptText(EMOTE_H_HELLO,m_creature);
}
if( emote == TEXTEMOTE_CHEER && player->GetTeam() == ALLIANCE )
- if( player->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_COMPLETE )
{
- m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
- m_creature->setFaction(FACTION_FRIENDLY);
- DoScriptText(EMOTE_CLUCK_TEXT2, m_creature);
+ if( player->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_COMPLETE )
+ {
+ m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
+ m_creature->setFaction(FACTION_FRIENDLY);
+ DoScriptText(EMOTE_CLUCK_TEXT2, m_creature);
+ }
}
}
};
diff --git a/src/bindings/scripts/scripts/zone/azshara/azshara.cpp b/src/bindings/scripts/scripts/zone/azshara/azshara.cpp
index 5223b6d93c3..6d191db16b2 100644
--- a/src/bindings/scripts/scripts/zone/azshara/azshara.cpp
+++ b/src/bindings/scripts/scripts/zone/azshara/azshara.cpp
@@ -310,7 +310,7 @@ struct TRINITY_DLL_DECL mob_rizzle_sprysprocketAI : public ScriptedAI
Player* player = Unit::GetPlayer(PlayerGUID);
SendText(MSG_ESCAPE_NOTICE, player);
DoCast(m_creature, SPELL_PERIODIC_DEPTH_CHARGE);
- m_creature->SetUnitMovementFlags(MOVEMENTFLAG_FLYING2 | MOVEMENTFLAG_SWIMMING);
+ m_creature->SetUnitMovementFlags(MOVEMENTFLAG_HOVER | MOVEMENTFLAG_SWIMMING);
m_creature->SetSpeed(MOVE_RUN, 0.85f, true);
m_creature->GetMotionMaster()->MovementExpired();
m_creature->GetMotionMaster()->MovePoint(CurrWP, WPs[CurrWP][0], WPs[CurrWP][1], WPs[CurrWP][2]);
@@ -441,7 +441,7 @@ struct TRINITY_DLL_DECL mob_depth_chargeAI : public ScriptedAI
void Reset()
{
- m_creature->SetUnitMovementFlags(MOVEMENTFLAG_FLYING2 | MOVEMENTFLAG_SWIMMING);
+ m_creature->SetUnitMovementFlags(MOVEMENTFLAG_HOVER | MOVEMENTFLAG_SWIMMING);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
we_must_die = false;
must_die_timer = 1000;
diff --git a/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp b/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp
index 320a1610827..ae2ac22ae71 100644
--- a/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp
+++ b/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp
@@ -565,56 +565,71 @@ CreatureAI* GetAI_npc_geezleAI(Creature *_Creature)
enum
{
- INOCULATION_CHANNEL = 29528,
- INOCULATED_OWLKIN = 16534
+ SPELL_INOCULATE_OWLKIN = 29528,
+ ENTRY_OWLKIN = 16518,
+ ENTRY_OWLKIN_INOC = 16534
};
-struct TRINITY_DLL_DECL mob_nestlewood_owlkinAI : public ScriptedAI
+struct TRINITY_DLL_DECL npc_nestlewood_owlkinAI : public ScriptedAI
{
- mob_nestlewood_owlkinAI(Creature *c) : ScriptedAI(c) {}
+ npc_nestlewood_owlkinAI(Creature *c) : ScriptedAI(c) {}
- uint32 ChannelTimer;
- bool Channeled;
- bool Hitted;
+ uint32 DespawnTimer;
void Reset()
{
- ChannelTimer = 0;
- Channeled = false;
- Hitted = false;
+ DespawnTimer = 0;
+ m_creature->SetVisibility(VISIBILITY_ON);
}
- void EnterCombat(Unit *who){}
+ void Aggro(Unit *who) {}
- void SpellHit(Unit* caster, const SpellEntry* spell)
+ void UpdateAI(const uint32 diff)
{
- if(!caster)
- return;
-
- if(caster->GetTypeId() == TYPEID_PLAYER && spell->Id == INOCULATION_CHANNEL)
+ //timer gets adjusted by the triggered aura effect
+ if (DespawnTimer)
{
- ChannelTimer = 3000;
- Hitted = true;
+ if (DespawnTimer <= diff)
+ {
+ //once we are able to, despawn us
+ m_creature->SetVisibility(VISIBILITY_OFF);
+ m_creature->setDeathState(JUST_DIED);
+ m_creature->SetHealth(0);
+ m_creature->CombatStop();
+ m_creature->DeleteThreatList();
+ m_creature->RemoveCorpse();
+ }else DespawnTimer -= diff;
}
- }
- void UpdateAI(const uint32 diff)
- {
- if(ChannelTimer < diff && !Channeled && Hitted)
- {
- m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
- m_creature->RemoveCorpse();
- m_creature->SummonCreature(INOCULATED_OWLKIN, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 180000);
- Channeled = true;
- }else ChannelTimer -= diff;
+ if (!UpdateVictim())
+ return;
DoMeleeAttackIfReady();
}
};
-CreatureAI* GetAI_mob_nestlewood_owlkinAI(Creature *_Creature)
+CreatureAI* GetAI_npc_nestlewood_owlkinAI(Creature* pCreature)
+{
+ return new npc_nestlewood_owlkinAI (pCreature);
+}
+
+bool EffectDummyCreature_npc_nestlewood_owlkin(Unit *pCaster, uint32 spellId, uint32 effIndex, Creature *pCreatureTarget)
{
- return new mob_nestlewood_owlkinAI (_Creature);
+ //always check spellid and effectindex
+ if (spellId == SPELL_INOCULATE_OWLKIN && effIndex == 0)
+ {
+ if (pCreatureTarget->GetEntry() != ENTRY_OWLKIN)
+ return true;
+
+ pCreatureTarget->UpdateEntry(ENTRY_OWLKIN_INOC);
+
+ //set despawn timer, since we want to remove creature after a short time
+ ((npc_nestlewood_owlkinAI*)pCreatureTarget->AI())->DespawnTimer = 15000;
+
+ //always return true when we are handling this spell and effect
+ return true;
+ }
+ return false;
}
void AddSC_azuremyst_isle()
@@ -650,8 +665,8 @@ void AddSC_azuremyst_isle()
newscript->RegisterSelf();
newscript = new Script;
- newscript->Name="mob_nestlewood_owlkin";
- newscript->GetAI = &GetAI_mob_nestlewood_owlkinAI;
+ newscript->Name="npc_nestlewood_owlkin";
+ newscript->GetAI = &GetAI_npc_nestlewood_owlkinAI;
newscript->RegisterSelf();
}
diff --git a/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp b/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp
index f8b92d4f077..30a9db9f29c 100644
--- a/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp
+++ b/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp
@@ -167,8 +167,8 @@ struct TRINITY_DLL_DECL npc_taskmaster_fizzuleAI : public ScriptedAI
{
if (m_creature->getFaction() == FACTION_FRIENDLY_F)
return;
- else
- DoFriend();
+
+ DoFriend();
}
}
}
diff --git a/src/bindings/scripts/scripts/zone/blasted_lands/blasted_lands.cpp b/src/bindings/scripts/scripts/zone/blasted_lands/blasted_lands.cpp
index 432633e90fe..be0c9c0d57c 100644
--- a/src/bindings/scripts/scripts/zone/blasted_lands/blasted_lands.cpp
+++ b/src/bindings/scripts/scripts/zone/blasted_lands/blasted_lands.cpp
@@ -50,7 +50,7 @@ bool GossipHello_npc_deathly_usher(Player *player, Creature *_Creature)
bool GossipSelect_npc_deathly_usher(Player *player, Creature *_Creature, uint32 sender, uint32 action)
{
- if(action = GOSSIP_ACTION_INFO_DEF)
+ if(action == GOSSIP_ACTION_INFO_DEF)
{
player->CLOSE_GOSSIP_MENU();
_Creature->CastSpell(player, SPELL_TELEPORT_SINGLE, true);
diff --git a/src/bindings/scripts/scripts/zone/desolace/desolace.cpp b/src/bindings/scripts/scripts/zone/desolace/desolace.cpp
new file mode 100644
index 00000000000..e1366d51727
--- /dev/null
+++ b/src/bindings/scripts/scripts/zone/desolace/desolace.cpp
@@ -0,0 +1,174 @@
+/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* ScriptData
+SDName: Desolace
+SD%Complete: 100
+SDComment: Quest support: 5561
+SDCategory: Desolace
+EndScriptData */
+
+/* ContentData
+npc_aged_dying_ancient_kodo
+EndContentData */
+
+#include "precompiled.h"
+
+enum
+{
+ SAY_SMEED_HOME_1 = -1000428,
+ SAY_SMEED_HOME_2 = -1000429,
+ SAY_SMEED_HOME_3 = -1000430,
+
+ QUEST_KODO = 5561,
+
+ NPC_SMEED = 11596,
+ NPC_AGED_KODO = 4700,
+ NPC_DYING_KODO = 4701,
+ NPC_ANCIENT_KODO = 4702,
+ NPC_TAMED_KODO = 11627,
+
+ SPELL_KODO_KOMBO_ITEM = 18153,
+ SPELL_KODO_KOMBO_PLAYER_BUFF = 18172, //spells here have unclear function, but using them at least for visual parts and checks
+ SPELL_KODO_KOMBO_DESPAWN_BUFF = 18377,
+ SPELL_KODO_KOMBO_GOSSIP = 18362
+
+};
+
+struct TRINITY_DLL_DECL npc_aged_dying_ancient_kodoAI : public ScriptedAI
+{
+ npc_aged_dying_ancient_kodoAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); }
+
+ uint32 m_uiDespawnTimer;
+
+ void Reset()
+ {
+ m_uiDespawnTimer = 0;
+ }
+
+ void MoveInLineOfSight(Unit* pWho)
+ {
+ if (pWho->GetEntry() == NPC_SMEED)
+ {
+ if (m_creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP))
+ return;
+
+ if (m_creature->IsWithinDistInMap(pWho, 10.0f))
+ {
+ switch(rand()%3)
+ {
+ case 0: DoScriptText(SAY_SMEED_HOME_1, pWho); break;
+ case 1: DoScriptText(SAY_SMEED_HOME_2, pWho); break;
+ case 2: DoScriptText(SAY_SMEED_HOME_3, pWho); break;
+ }
+
+ //spell have no implemented effect (dummy), so useful to notify spellHit
+ m_creature->CastSpell(m_creature,SPELL_KODO_KOMBO_GOSSIP,true);
+ }
+ }
+ }
+
+ void SpellHit(Unit* pCaster, SpellEntry const* pSpell)
+ {
+ if (pSpell->Id == SPELL_KODO_KOMBO_GOSSIP)
+ {
+ m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ m_uiDespawnTimer = 60000;
+ }
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ //timer should always be == 0 unless we already updated entry of creature. Then not expect this updated to ever be in combat.
+ if (m_uiDespawnTimer && m_uiDespawnTimer <= diff)
+ {
+ if (!m_creature->getVictim() && m_creature->isAlive())
+ {
+ Reset();
+ m_creature->setDeathState(JUST_DIED);
+ m_creature->Respawn();
+ return;
+ }
+ } else m_uiDespawnTimer -= diff;
+
+ if (!UpdateVictim())
+ return;
+
+ DoMeleeAttackIfReady();
+ }
+};
+
+CreatureAI* GetAI_npc_aged_dying_ancient_kodo(Creature* pCreature)
+{
+ return new npc_aged_dying_ancient_kodoAI(pCreature);
+}
+
+bool EffectDummyCreature_npc_aged_dying_ancient_kodo(Unit *pCaster, uint32 spellId, uint32 effIndex, Creature *pCreatureTarget)
+{
+ //always check spellid and effectindex
+ if (spellId == SPELL_KODO_KOMBO_ITEM && effIndex == 0)
+ {
+ //no effect if player/creature already have aura from spells
+ if (pCaster->HasAura(SPELL_KODO_KOMBO_PLAYER_BUFF) || pCreatureTarget->HasAura(SPELL_KODO_KOMBO_DESPAWN_BUFF))
+ return true;
+
+ if (pCreatureTarget->GetEntry() == NPC_AGED_KODO ||
+ pCreatureTarget->GetEntry() == NPC_DYING_KODO ||
+ pCreatureTarget->GetEntry() == NPC_ANCIENT_KODO)
+ {
+ pCaster->CastSpell(pCaster,SPELL_KODO_KOMBO_PLAYER_BUFF,true);
+
+ pCreatureTarget->UpdateEntry(NPC_TAMED_KODO);
+ pCreatureTarget->CastSpell(pCreatureTarget,SPELL_KODO_KOMBO_DESPAWN_BUFF,false);
+
+ if (pCreatureTarget->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE)
+ pCreatureTarget->GetMotionMaster()->MoveIdle();
+
+ pCreatureTarget->GetMotionMaster()->MoveFollow(pCaster, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
+ }
+
+ //always return true when we are handling this spell and effect
+ return true;
+ }
+ return false;
+}
+
+bool GossipHello_npc_aged_dying_ancient_kodo(Player* pPlayer, Creature* pCreature)
+{
+ if (pPlayer->HasAura(SPELL_KODO_KOMBO_PLAYER_BUFF) && pCreature->HasAura(SPELL_KODO_KOMBO_DESPAWN_BUFF))
+ {
+ //the expected quest objective
+ pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID());
+
+ pPlayer->RemoveAurasDueToSpell(SPELL_KODO_KOMBO_PLAYER_BUFF);
+ pCreature->GetMotionMaster()->MoveIdle();
+ }
+
+ pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
+ return true;
+}
+
+void AddSC_desolace()
+{
+ Script *newscript;
+
+ newscript = new Script;
+ newscript->Name = "npc_aged_dying_ancient_kodo";
+ newscript->GetAI = GetAI_npc_aged_dying_ancient_kodo;
+ newscript->pEffectDummyCreature = &EffectDummyCreature_npc_aged_dying_ancient_kodo;
+ newscript->pGossipHello = &GossipHello_npc_aged_dying_ancient_kodo;
+ newscript->RegisterSelf();
+}
diff --git a/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp b/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp
index 68e15fd0282..482a7169ad3 100644
--- a/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp
+++ b/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp
@@ -17,6 +17,7 @@
*/
#include "precompiled.h"
+#include "Vehicle.h"
#define GCD_CAST 1
@@ -560,13 +561,13 @@ struct TRINITY_DLL_DECL npc_ros_dark_riderAI : public ScriptedAI
return;
// this should be before next one otherwise he may enter vehicle again
- if(!me->m_Vehicle && who->GetEntry() == 28782 && CAST_CRE(who)->isVehicle() && !who->GetCharmerGUID())
+ if(!me->m_Vehicle && who->GetEntry() == 28782 && CAST_CRE(who)->isVehicle() && CAST_VEH(who)->HasEmptySeat(0))
me->EnterVehicle((Vehicle*)who);
ScriptedAI::MoveInLineOfSight(who);
}
- void CombatStart(Unit *who)
+ void EnterCombat(Unit *who)
{
me->ExitVehicle();
}
diff --git a/src/bindings/scripts/scripts/zone/isle_of_queldanas/isle_of_queldanas.cpp b/src/bindings/scripts/scripts/zone/isle_of_queldanas/isle_of_queldanas.cpp
index 51b22fd934a..d358fbc2a86 100644
--- a/src/bindings/scripts/scripts/zone/isle_of_queldanas/isle_of_queldanas.cpp
+++ b/src/bindings/scripts/scripts/zone/isle_of_queldanas/isle_of_queldanas.cpp
@@ -62,8 +62,10 @@ struct TRINITY_DLL_DECL npc_converted_sentryAI : public ScriptedAI
if( Timer <= diff )
{
uint32 i = urand(1,2);
- if( i=1 ) DoScriptText(SAY_CONVERTED_1, m_creature);
- else DoScriptText(SAY_CONVERTED_2, m_creature);
+ if( i==1 )
+ DoScriptText(SAY_CONVERTED_1, m_creature);
+ else
+ DoScriptText(SAY_CONVERTED_2, m_creature);
DoCast(m_creature, SPELL_CONVERT_CREDIT);
if(m_creature->isPet())
diff --git a/src/bindings/scripts/scripts/zone/orgrimmar/orgrimmar.cpp b/src/bindings/scripts/scripts/zone/orgrimmar/orgrimmar.cpp
index 5a9d17db745..74e7b953ad8 100644
--- a/src/bindings/scripts/scripts/zone/orgrimmar/orgrimmar.cpp
+++ b/src/bindings/scripts/scripts/zone/orgrimmar/orgrimmar.cpp
@@ -69,7 +69,10 @@ bool GossipSelect_npc_neeru_fireblade(Player *player, Creature *_Creature, uint3
## npc_shenthul
######*/
-#define QUEST_2460 2460
+enum
+{
+ QUEST_SHATTERED_SALUTE = 2460
+};
struct TRINITY_DLL_DECL npc_shenthulAI : public ScriptedAI
{
@@ -95,21 +98,27 @@ struct TRINITY_DLL_DECL npc_shenthulAI : public ScriptedAI
void UpdateAI(const uint32 diff)
{
if( CanEmote )
- if( Reset_Timer < diff )
{
- if( Unit* temp = Unit::GetUnit((*m_creature),playerGUID) )
- if( temp->GetTypeId() == TYPEID_PLAYER )
- CAST_PLR(temp)->FailQuest(QUEST_2460);
- Reset();
- } else Reset_Timer -= diff;
+ if (Reset_Timer < diff)
+ {
+ if (Player* pPlayer = (Player*)Unit::GetUnit((*m_creature),playerGUID))
+ {
+ if (pPlayer->GetTypeId() == TYPEID_PLAYER && pPlayer->GetQuestStatus(QUEST_SHATTERED_SALUTE) == QUEST_STATUS_INCOMPLETE)
+ pPlayer->FailQuest(QUEST_SHATTERED_SALUTE);
+ }
+ Reset();
+ } else Reset_Timer -= diff;
+ }
if( CanTalk && !CanEmote )
- if( Salute_Timer < diff )
{
- m_creature->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE);
- CanEmote = true;
- Reset_Timer = 60000;
- } else Salute_Timer -= diff;
+ if (Salute_Timer < diff)
+ {
+ m_creature->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE);
+ CanEmote = true;
+ Reset_Timer = 60000;
+ } else Salute_Timer -= diff;
+ }
if (!UpdateVictim())
return;
@@ -119,12 +128,14 @@ struct TRINITY_DLL_DECL npc_shenthulAI : public ScriptedAI
void ReciveEmote_npc_shenthul(Player *player, uint32 emote)
{
- if( emote == TEXTEMOTE_SALUTE && player->GetQuestStatus(QUEST_2460) == QUEST_STATUS_INCOMPLETE )
+ if( emote == TEXTEMOTE_SALUTE && player->GetQuestStatus(QUEST_SHATTERED_SALUTE) == QUEST_STATUS_INCOMPLETE )
+ {
if(CanEmote)
{
- player->AreaExploredOrEventHappens(QUEST_2460);
+ player->AreaExploredOrEventHappens(QUEST_SHATTERED_SALUTE);
Reset();
}
+ }
}
};
@@ -135,7 +146,7 @@ CreatureAI* GetAI_npc_shenthul(Creature *_Creature)
bool QuestAccept_npc_shenthul(Player* player, Creature* creature, Quest const* quest)
{
- if( quest->GetQuestId() == QUEST_2460 )
+ if( quest->GetQuestId() == QUEST_SHATTERED_SALUTE )
{
CAST_AI(npc_shenthulAI, creature->AI())->CanTalk = true;
CAST_AI(npc_shenthulAI, creature->AI())->playerGUID = player->GetGUID();
diff --git a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_headless_horseman.cpp b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_headless_horseman.cpp
index 0cf5119f0d8..f0a80248c19 100644
--- a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_headless_horseman.cpp
+++ b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_headless_horseman.cpp
@@ -400,7 +400,7 @@ struct TRINITY_DLL_DECL boss_headless_horsemanAI : public ScriptedAI
{
m_creature->SetVisibility(VISIBILITY_OFF);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- m_creature->AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
+ m_creature->AddUnitMovementFlag(MOVEMENTFLAG_HOVER);
m_creature->SetSpeed(MOVE_WALK,5.0f,true);
wp_reached = false;
count = 0;
@@ -432,7 +432,7 @@ struct TRINITY_DLL_DECL boss_headless_horsemanAI : public ScriptedAI
pInstance->SetData(GAMEOBJECT_PUMPKIN_SHRINE, 0); //hide gameobject
break;
case 19:
- m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_FLYING2);break;
+ m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_HOVER);break;
case 20: {
Phase = 1;
IsFlying = false;
diff --git a/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp b/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp
index d87c25c14a7..2aae2d51e4e 100644
--- a/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp
+++ b/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp
@@ -46,110 +46,115 @@ EndContentData */
# mob_mature_netherwing_drake
#####*/
-#define SPELL_PLACE_CARCASS 38439
-#define SPELL_JUST_EATEN 38502
-#define SPELL_NETHER_BREATH 38467
+enum
+{
+ SAY_JUST_EATEN = -1000222,
+
+ SPELL_PLACE_CARCASS = 38439,
+ SPELL_JUST_EATEN = 38502,
+ SPELL_NETHER_BREATH = 38467,
+ POINT_ID = 1,
+
+ QUEST_KINDNESS = 10804,
+ NPC_EVENT_PINGER = 22131
+};
-#define SAY_JUST_EATEN -1000222
struct TRINITY_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI
{
- mob_mature_netherwing_drakeAI(Creature* c) : ScriptedAI(c)
- {
- PlayerGUID = 0;
- Reset();
- }
+ mob_mature_netherwing_drakeAI(Creature* c) : ScriptedAI(c) { }
- uint64 PlayerGUID;
+ uint64 uiPlayerGUID;
- bool IsEating;
- bool Evade;
+ bool bCanEat;
+ bool bIsEating;
- uint32 ResetTimer;
- uint32 CastTimer;
uint32 EatTimer;
+ uint32 CastTimer;
void Reset()
{
- IsEating = false;
- Evade = false;
+ uiPlayerGUID = 0;
+
+ bCanEat = false;
+ bIsEating = false;
- ResetTimer = 120000;
EatTimer = 5000;
CastTimer = 5000;
}
void EnterCombat(Unit* who) { }
- void MoveInLineOfSight(Unit* who)
+ void SpellHit(Unit* pCaster, SpellEntry const* pSpell)
{
- if(m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE)
- return;
-
- ScriptedAI::MoveInLineOfSight(who);
- }
-
- void SpellHit(Unit* caster, const SpellEntry* spell)
- {
- if(!caster)
+ if (bCanEat || bIsEating)
return;
- if(caster->GetTypeId() == TYPEID_PLAYER && spell->Id == SPELL_PLACE_CARCASS && !m_creature->HasAura(SPELL_JUST_EATEN) && !PlayerGUID)
+ if (pCaster->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_PLACE_CARCASS && !m_creature->HasAura(SPELL_JUST_EATEN))
{
- float PlayerX, PlayerY, PlayerZ;
- caster->GetClosePoint(PlayerX, PlayerY, PlayerZ, m_creature->GetObjectSize());
- m_creature->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
- m_creature->GetMotionMaster()->MovePoint(1, PlayerX, PlayerY, PlayerZ);
- PlayerGUID = caster->GetGUID();
+ uiPlayerGUID = pCaster->GetGUID();
+ bCanEat = true;
}
}
void MovementInform(uint32 type, uint32 id)
{
- if(type != POINT_MOTION_TYPE)
+ if (type != POINT_MOTION_TYPE)
return;
- if(id == 1)
+ if (id == POINT_ID)
{
- IsEating = true;
- EatTimer = 5000;
- m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACKUNARMED);
- m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
+ bIsEating = true;
+ EatTimer = 7000;
+ m_creature->HandleEmoteCommand(EMOTE_ONESHOT_ATTACKUNARMED);
}
}
void UpdateAI(const uint32 diff)
{
- if(IsEating)
- if(EatTimer < diff)
+ if (bCanEat || bIsEating)
{
- IsEating = false;
- DoCast(m_creature, SPELL_JUST_EATEN);
- m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
- DoScriptText(SAY_JUST_EATEN, m_creature);
- if(PlayerGUID)
+ if (EatTimer < diff)
{
- Player* plr = Unit::GetPlayer(PlayerGUID);
- if(plr && plr->GetQuestStatus(10804) == QUEST_STATUS_INCOMPLETE)
+ if (bCanEat && !bIsEating)
{
- plr->KilledMonster(22131, m_creature->GetGUID());
- Evade = true;
- PlayerGUID = 0;
+ if (Unit* pUnit = Unit::GetUnit(*m_creature, uiPlayerGUID))
+ {
+ if (GameObject* pGo = pUnit->GetGameObject(SPELL_PLACE_CARCASS))
+ {
+ if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE)
+ m_creature->GetMotionMaster()->MovementExpired();
+
+ m_creature->GetMotionMaster()->MoveIdle();
+ m_creature->StopMoving();
+
+ m_creature->GetMotionMaster()->MovePoint(POINT_ID, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ());
+ }
+ }
+ bCanEat = false;
+ }
+ else if (bIsEating)
+ {
+ DoCast(m_creature, SPELL_JUST_EATEN);
+ DoScriptText(SAY_JUST_EATEN, m_creature);
+
+ if (Player* pPlr = (Player*)Unit::GetUnit((*m_creature), uiPlayerGUID))
+ pPlr->KilledMonster(NPC_EVENT_PINGER, m_creature->GetGUID());
+
+ Reset();
+ m_creature->GetMotionMaster()->Clear();
}
}
- }else EatTimer -= diff;
+ else
+ EatTimer -= diff;
- if(Evade)
- if(ResetTimer < diff)
- {
- EnterEvadeMode();
- return;
- }else ResetTimer -= diff;
+ return;
+ }
if(!UpdateVictim())
return;
- if(CastTimer < diff)
+ if (CastTimer < diff)
{
DoCast(m_creature->getVictim(), SPELL_NETHER_BREATH);
CastTimer = 5000;
@@ -159,9 +164,9 @@ struct TRINITY_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI
}
};
-CreatureAI* GetAI_mob_mature_netherwing_drake(Creature *_creature)
+CreatureAI* GetAI_mob_mature_netherwing_drake(Creature* pCreature)
{
- return new mob_mature_netherwing_drakeAI(_creature);
+ return new mob_mature_netherwing_drakeAI(pCreature);
}
/*###
diff --git a/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp b/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp
index 5cd9b01b7c3..3182a56926c 100644
--- a/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp
+++ b/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp
@@ -17,7 +17,7 @@
/* ScriptData
SDName: Stormwind_City
SD%Complete: 100
-SDComment: Quest support: 1640, 1447, 4185, 11223. Receive emote General Marcus
+SDComment: Quest support: 1640, 1447, 4185, 11223
SDCategory: Stormwind City
EndScriptData */
@@ -25,7 +25,6 @@ EndScriptData */
npc_archmage_malin
npc_bartleby
npc_dashel_stonefist
-npc_general_marcus_jonathan
npc_lady_katrana_prestor
EndContentData */
@@ -123,27 +122,33 @@ CreatureAI* GetAI_npc_bartleby(Creature *_creature)
## npc_dashel_stonefist
######*/
+enum
+{
+ QUEST_MISSING_DIPLO_PT8 = 1447,
+ FACTION_HOSTILE = 168
+};
+
struct TRINITY_DLL_DECL npc_dashel_stonefistAI : public ScriptedAI
{
- npc_dashel_stonefistAI(Creature *c) : ScriptedAI(c) {}
+ npc_dashel_stonefistAI(Creature *c) : ScriptedAI(c) { uiNormFaction = c->getFaction(); }
+
+ uint32 uiNormFaction;
void Reset()
{
- m_creature->setFaction(11);
+ m_creature->setFaction(uiNormFaction);
}
void DamageTaken(Unit *done_by, uint32 & damage)
{
- if((damage > m_creature->GetHealth()) || (m_creature->GetHealth() - damage)*100 / m_creature->GetMaxHealth() < 15)
+ if ((damage > m_creature->GetHealth()) || (m_creature->GetHealth() - damage)*100 / m_creature->GetMaxHealth() < 15)
{
//Take 0 damage
damage = 0;
if (done_by->GetTypeId() == TYPEID_PLAYER)
- {
- CAST_PLR(done_by)->AttackStop();
- CAST_PLR(done_by)->AreaExploredOrEventHappens(1447);
- }
+ CAST_PLR(done_by)->AreaExploredOrEventHappens(QUEST_MISSING_DIPLO_PT8);
+
//m_creature->CombatStop();
EnterEvadeMode();
}
@@ -152,42 +157,19 @@ struct TRINITY_DLL_DECL npc_dashel_stonefistAI : public ScriptedAI
void EnterCombat(Unit *who) {}
};
-bool QuestAccept_npc_dashel_stonefist(Player *player, Creature *_Creature, Quest const *_Quest)
+bool QuestAccept_npc_dashel_stonefist(Player* pPlayer, Creature* pCreature, Quest const* pQuest)
{
- if(_Quest->GetQuestId() == 1447)
+ if(pQuest->GetQuestId() == QUEST_MISSING_DIPLO_PT8)
{
- _Creature->setFaction(168);
- CAST_AI(npc_dashel_stonefistAI, _Creature->AI())->AttackStart(player);
+ pCreature->setFaction(FACTION_HOSTILE);
+ CAST_AI(npc_dashel_stonefistAI, pCreature->AI())->AttackStart(pPlayer);
}
return true;
}
-CreatureAI* GetAI_npc_dashel_stonefist(Creature *_creature)
+CreatureAI* GetAI_npc_dashel_stonefist(Creature* pCreature)
{
- return new npc_dashel_stonefistAI(_creature);
-}
-
-/*######
-## npc_general_marcus_jonathan
-######*/
-
-#define SAY_GREETING -1000005
-
-bool ReceiveEmote_npc_general_marcus_jonathan(Player *player, Creature *_Creature, uint32 emote)
-{
- if(player->GetTeam() == ALLIANCE)
- {
- if (emote == TEXTEMOTE_SALUTE)
- {
- _Creature->SetOrientation(_Creature->GetAngle(player));
- _Creature->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE);
- }
- if (emote == TEXTEMOTE_WAVE)
- {
- DoScriptText(SAY_GREETING, _Creature, player);
- }
- }
- return true;
+ return new npc_dashel_stonefistAI(pCreature);
}
/*######
@@ -259,11 +241,6 @@ void AddSC_stormwind_city()
newscript->RegisterSelf();
newscript = new Script;
- newscript->Name = "npc_general_marcus_jonathan";
- //newscript->pReceiveEmote = &ReceiveEmote_npc_general_marcus_jonathan;
- newscript->RegisterSelf();
-
- newscript = new Script;
newscript->Name="npc_lady_katrana_prestor";
newscript->pGossipHello = &GossipHello_npc_lady_katrana_prestor;
newscript->pGossipSelect = &GossipSelect_npc_lady_katrana_prestor;
diff --git a/src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp b/src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp
index e3c66109dfc..035df9082c8 100644
--- a/src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp
+++ b/src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp
@@ -295,7 +295,7 @@ struct TRINITY_DLL_DECL mob_annhylde_the_callerAI : public ScriptedAI
void Reset()
{
- m_creature->AddUnitMovementFlag(MOVEMENTFLAG_FLYING + MOVEMENTFLAG_FLYING2);
+ m_creature->AddUnitMovementFlag(MOVEMENTFLAG_FLYING + MOVEMENTFLAG_HOVER);
m_creature->SetSpeed(MOVE_SWIM , 0.1f);
m_creature->SetSpeed(MOVE_RUN , 0.1f);
m_creature->SetSpeed(MOVE_WALK , 0.1f);
diff --git a/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp b/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp
index a4f2f32b250..a3f84aa0dc2 100644
--- a/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp
+++ b/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp
@@ -17,7 +17,7 @@
/* ScriptData
SDName: Zangarmarsh
SD%Complete: 100
-SDComment: Quest support: 9785, 9803, 10009, 9752. Mark Of ... buffs.
+SDComment: Quest support: 9752, 9785, 9803, 10009. Mark Of ... buffs.
SDCategory: Zangarmarsh
EndScriptData */
@@ -255,71 +255,67 @@ bool GossipSelect_npc_mortog_steamhead(Player *player, Creature *_Creature, uint
## npc_kayra_longmane
######*/
-#define SAY_PROGRESS_1 -1000360
-#define SAY_PROGRESS_2 -1000361
-#define SAY_PROGRESS_3 -1000362
-#define SAY_PROGRESS_4 -1000363
-#define SAY_PROGRESS_5 -1000364
-#define SAY_PROGRESS_6 -1000365
-
-#define QUEST_EFU 9752
-#define MOB_AMBUSH 18042
+enum
+{
+ SAY_START = -1000360,
+ SAY_AMBUSH1 = -1000361,
+ SAY_PROGRESS = -1000362,
+ SAY_AMBUSH2 = -1000363,
+ SAY_NEAR_END = -1000364,
+ SAY_END = -1000365,
+
+ QUEST_ESCAPE_FROM = 9752,
+ NPC_SLAVEBINDER = 18042
+};
struct TRINITY_DLL_DECL npc_kayra_longmaneAI : public npc_escortAI
{
npc_kayra_longmaneAI(Creature* c) : npc_escortAI(c) {}
- bool Completed;
-
- void Reset()
- {
- Completed = false;
- m_creature->setFaction(1660);
- }
+ void Reset() { }
void EnterCombat(Unit* who){}
- void JustSummoned(Creature *summoned)
- {
- summoned->AI()->AttackStart(m_creature);
- summoned->setFaction(14);
- }
-
void WaypointReached(uint32 i)
{
- Player* player = Unit::GetPlayer(PlayerGUID);
+ Unit* pUnit = Unit::GetUnit(*m_creature, PlayerGUID);
+
+ if (!pUnit || pUnit->GetTypeId() != TYPEID_PLAYER)
+ return;
switch(i)
{
- case 0: DoScriptText(SAY_PROGRESS_1, m_creature, player); break;
- case 5: DoScriptText(SAY_PROGRESS_2, m_creature, player);
- m_creature->SummonCreature(MOB_AMBUSH, -922.24, 5357.98, 17.93, 5.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
- m_creature->SummonCreature(MOB_AMBUSH, -922.24, 5357.98, 17.93, 5.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
- break;
- case 6: DoScriptText(SAY_PROGRESS_3, m_creature, player);
- m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
- break;
- case 18: DoScriptText(SAY_PROGRESS_4, m_creature, player);
- m_creature->SummonCreature(MOB_AMBUSH, -671.86, 5379.81, 22.12, 5.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
- m_creature->SummonCreature(MOB_AMBUSH, -671.86, 5379.81, 22.12, 5.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
- break;
- case 19: m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
- DoScriptText(SAY_PROGRESS_5, m_creature, player); break;
- case 26: DoScriptText(SAY_PROGRESS_6, m_creature, player);
- Completed = true;
- if(player)
- player->GroupEventHappens(QUEST_EFU, m_creature);
- break;
+ case 4:
+ DoScriptText(SAY_AMBUSH1, m_creature, pUnit);
+ DoSpawnCreature(NPC_SLAVEBINDER, -10.0f, -5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
+ DoSpawnCreature(NPC_SLAVEBINDER, -8.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
+ break;
+ case 5:
+ DoScriptText(SAY_PROGRESS, m_creature, pUnit);
+ SetRun();
+ break;
+ case 16:
+ DoScriptText(SAY_AMBUSH2, m_creature, pUnit);
+ DoSpawnCreature(NPC_SLAVEBINDER, -10.0f, -5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
+ DoSpawnCreature(NPC_SLAVEBINDER, -8.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
+ break;
+ case 17:
+ SetRun(false);
+ DoScriptText(SAY_NEAR_END, m_creature, pUnit);
+ break;
+ case 26:
+ DoScriptText(SAY_END, m_creature, pUnit);
+ ((Player*)pUnit)->GroupEventHappens(QUEST_ESCAPE_FROM, m_creature);
+ break;
}
}
void JustDied(Unit* killer)
{
- if (PlayerGUID && !Completed)
+ if (Unit* pUnit = Unit::GetUnit(*m_creature, PlayerGUID))
{
- Player* player = Unit::GetPlayer(PlayerGUID);
- if (player && !Completed)
- player->FailQuest(QUEST_EFU);
+ if (((Player*)pUnit)->GetQuestStatus(QUEST_ESCAPE_FROM) == QUEST_STATUS_INCOMPLETE)
+ ((Player*)pUnit)->FailQuest(QUEST_ESCAPE_FROM);
}
}
@@ -329,49 +325,23 @@ struct TRINITY_DLL_DECL npc_kayra_longmaneAI : public npc_escortAI
}
};
-bool QuestAccept_npc_kayra_longmane(Player* player, Creature* creature, Quest const* quest)
+bool QuestAccept_npc_kayra_longmane(Player* pPlayer, Creature* pCreature, Quest const* pQuest)
{
- if (quest->GetQuestId() == QUEST_EFU)
+ if (pQuest->GetQuestId() == QUEST_ESCAPE_FROM)
{
- CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, false, player->GetGUID());
- creature->setFaction(113);
+ DoScriptText(SAY_START, pCreature, pPlayer);
+ ((npc_escortAI*)(pCreature->AI()))->Start(false, true, false, pPlayer->GetGUID());
}
return true;
}
-CreatureAI* GetAI_npc_kayra_longmaneAI(Creature* _Creature)
+CreatureAI* GetAI_npc_kayra_longmaneAI(Creature* pCreature)
{
- npc_kayra_longmaneAI* thisAI = new npc_kayra_longmaneAI(_Creature);
-
- thisAI->AddWaypoint(0, -931.88, 5283.56, 23.98);//SAY_PROGRESS_1
- thisAI->AddWaypoint(1, -930.52, 5287.57, 23.82);
- thisAI->AddWaypoint(2, -924.98, 5297.94, 17.78);
- thisAI->AddWaypoint(3, -928.83, 5316.07, 18.18);
- thisAI->AddWaypoint(4, -930.07, 5323.10, 18.63);
- thisAI->AddWaypoint(5, -926.58, 5331.24, 18.74, 6000);//SAY_PROGRESS_2
- thisAI->AddWaypoint(6, -926.58, 5331.24, 18.74, 3000);//SAY_PROGRESS_3 Run to the hills!
- thisAI->AddWaypoint(7, -931.24, 5358.89, 18.14);
- thisAI->AddWaypoint(8, -934.43, 5370.20, 22.41);
- thisAI->AddWaypoint(9, -943.01, 5400.55, 22.74);
- thisAI->AddWaypoint(10, -929.62, 5417.98, 23.07);
- thisAI->AddWaypoint(11, -901.92, 5420.38, 24.19);
- thisAI->AddWaypoint(12, -859.03, 5415.36, 23.64);
- thisAI->AddWaypoint(13, -808.94, 5401.93, 23.11);
- thisAI->AddWaypoint(14, -772.74, 5390.53, 22.97);
- thisAI->AddWaypoint(15, -749.71, 5385.39, 22.75);
- thisAI->AddWaypoint(16, -721.23, 5380.38, 22.47);
- thisAI->AddWaypoint(17, -687.96, 5379.08, 22.16);
- thisAI->AddWaypoint(18, -680.87, 5378.95, 21.99, 6000);//SAY_PROGRESS_4 Summon Ambush
- thisAI->AddWaypoint(19, -680.87, 5378.95, 21.99, 6000);//SAY_PROGRESS_5
- thisAI->AddWaypoint(20, -636.14, 5385.25, 22.20);
- thisAI->AddWaypoint(21, -602.94, 5411.36, 21.48);
- thisAI->AddWaypoint(22, -566.86, 5421.87, 21.25);
- thisAI->AddWaypoint(23, -547.27, 5427.87, 21.10);
- thisAI->AddWaypoint(24, -520.59, 5444.83, 21.15);
- thisAI->AddWaypoint(25, -488.45, 5447.83, 22.38);
- thisAI->AddWaypoint(26, -449.65, 5463.78, 21.77, 11000);//SAY_PROGRESS_6
-
- return thisAI;
+ npc_kayra_longmaneAI* thisAI = new npc_kayra_longmaneAI(pCreature);
+
+ thisAI->FillPointMovementListForCreature();
+
+ return (CreatureAI*)thisAI;
}
/*######
## AddSC
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index bfa185010fd..24fd970bddf 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -1648,9 +1648,13 @@ bool Creature::IsWithinSightDist(Unit const* u) const
bool Creature::canStartAttack(Unit const* who, bool force) const
{
- if(isCivilian()
- || !who->isInAccessiblePlaceFor(this)
- || !canFly() && GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
+ if(isCivilian() || !who->isInAccessiblePlaceFor(this))
+ return false;
+
+ if(!canFly() && (GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE))
+ //|| who->IsControlledByPlayer() && who->IsFlying()))
+ // we cannot check flying for other creatures, too much map/vmap calculation
+ // TODO: should switch to range attack
return false;
if(!force && (IsNeutralToAll() || !IsWithinDistInMap(who, GetAttackDistance(who))))
@@ -2190,6 +2194,9 @@ bool Creature::LoadCreaturesAddon(bool reload)
if (cainfo->move_flags != 0)
SetUnitMovementFlags(cainfo->move_flags);
+ if(GetCreatureInfo()->InhabitType & INHABIT_AIR)
+ AddUnitMovementFlag(MOVEMENTFLAG_FLY_MODE);
+
if(cainfo->auras)
{
for (CreatureDataAddonAura const* cAura = cainfo->auras; cAura->spell_id; ++cAura)
@@ -2504,4 +2511,4 @@ time_t Creature::GetLinkedCreatureRespawnTime() const
}
return 0;
-} \ No newline at end of file
+}
diff --git a/src/game/Creature.h b/src/game/Creature.h
index d7d070fc526..954259d8846 100644
--- a/src/game/Creature.h
+++ b/src/game/Creature.h
@@ -516,7 +516,7 @@ class TRINITY_DLL_SPEC Creature : public Unit
bool isTrigger() const { return GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_TRIGGER; }
bool canWalk() const { return GetCreatureInfo()->InhabitType & INHABIT_GROUND; }
bool canSwim() const { return GetCreatureInfo()->InhabitType & INHABIT_WATER; }
- bool canFly() const { return GetCreatureInfo()->InhabitType & INHABIT_AIR; }
+ //bool canFly() const { return GetCreatureInfo()->InhabitType & INHABIT_AIR; }
void SetReactState(ReactStates st) { m_reactState = st; }
ReactStates GetReactState() { return m_reactState; }
bool HasReactState(ReactStates state) const { return (m_reactState == state); }
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp
index 1ee7c817c6d..19acc73820b 100644
--- a/src/game/GameObject.cpp
+++ b/src/game/GameObject.cpp
@@ -1395,7 +1395,7 @@ void GameObject::CastSpell(Unit* target, uint32 spellId)
trigger->setFaction(14);
// Set owner guid for target if no owner avalible - needed by trigger auras
// - trigger gets despawned and there's no caster avalible (see AuraEffect::TriggerSpell())
- trigger->CastSpell(target, spellInfo, true, 0, 0, target->GetGUID());
+ trigger->CastSpell(target, spellInfo, true, 0, 0, target ? target->GetGUID() : 0);
}
//trigger->setDeathState(JUST_DIED);
//trigger->RemoveCorpse();
diff --git a/src/game/GridNotifiers.cpp b/src/game/GridNotifiers.cpp
index b87d57563af..858c807e386 100644
--- a/src/game/GridNotifiers.cpp
+++ b/src/game/GridNotifiers.cpp
@@ -38,10 +38,37 @@ VisibleChangesNotifier::Visit(PlayerMapType &m)
continue;
iter->getSource()->UpdateVisibilityOf(&i_object);
+
+ if(!iter->getSource()->GetSharedVisionList().empty())
+ for(SharedVisionList::const_iterator i = iter->getSource()->GetSharedVisionList().begin();
+ i != iter->getSource()->GetSharedVisionList().end(); ++i)
+ if((*i)->m_seer == iter->getSource())
+ (*i)->UpdateVisibilityOf(&i_object);
}
}
void
+VisibleChangesNotifier::Visit(CreatureMapType &m)
+{
+ for(CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
+ if(!iter->getSource()->GetSharedVisionList().empty())
+ for(SharedVisionList::const_iterator i = iter->getSource()->GetSharedVisionList().begin();
+ i != iter->getSource()->GetSharedVisionList().end(); ++i)
+ if((*i)->m_seer == iter->getSource())
+ (*i)->UpdateVisibilityOf(&i_object);
+}
+
+void
+VisibleChangesNotifier::Visit(DynamicObjectMapType &m)
+{
+ for(DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
+ if(IS_PLAYER_GUID(iter->getSource()->GetCasterGUID()))
+ if(Player* caster = (Player*)iter->getSource()->GetCaster())
+ if(caster->m_seer == iter->getSource())
+ caster->UpdateVisibilityOf(&i_object);
+}
+
+void
PlayerVisibilityNotifier::Notify()
{
// at this moment i_clientGUIDs have guids that not iterate at grid level checks
diff --git a/src/game/GridNotifiers.h b/src/game/GridNotifiers.h
index 5418bd09b16..64deb0d3123 100644
--- a/src/game/GridNotifiers.h
+++ b/src/game/GridNotifiers.h
@@ -81,6 +81,8 @@ namespace Trinity
explicit VisibleChangesNotifier(WorldObject &object) : i_object(object) {}
template<class T> void Visit(GridRefManager<T> &) {}
void Visit(PlayerMapType &);
+ void Visit(CreatureMapType &);
+ void Visit(DynamicObjectMapType &);
};
struct TRINITY_DLL_DECL GridUpdater
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp
index 77c81144d48..959e5dec7d3 100644
--- a/src/game/Level3.cpp
+++ b/src/game/Level3.cpp
@@ -697,7 +697,7 @@ bool ChatHandler::HandleReloadAchievementCriteriaDataCommand(const char*)
{
sLog.outString( "Re-Loading Additional Achievement Criteria Data..." );
achievementmgr.LoadAchievementCriteriaData();
- SendGlobalSysMessage("DB table `achievement_criteria_data` reloaded.");
+ SendGlobalGMSysMessage("DB table `achievement_criteria_data` reloaded.");
return true;
}
@@ -705,7 +705,7 @@ bool ChatHandler::HandleReloadAchievementRewardCommand(const char*)
{
sLog.outString( "Re-Loading Achievement Reward Data..." );
achievementmgr.LoadRewards();
- SendGlobalSysMessage("DB table `achievement_reward` reloaded.");
+ SendGlobalGMSysMessage("DB table `achievement_reward` reloaded.");
return true;
}
@@ -851,7 +851,7 @@ bool ChatHandler::HandleReloadLootTemplatesMillingCommand(const char*)
sLog.outString( "Re-Loading Loot Tables... (`milling_loot_template`)" );
LoadLootTemplates_Milling();
LootTemplates_Milling.CheckLootRefs();
- SendGlobalSysMessage("DB table `milling_loot_template` reloaded.");
+ SendGlobalGMSysMessage("DB table `milling_loot_template` reloaded.");
return true;
}
@@ -904,7 +904,7 @@ bool ChatHandler::HandleReloadLootTemplatesSpellCommand(const char*)
sLog.outString( "Re-Loading Loot Tables... (`spell_loot_template`)" );
LoadLootTemplates_Spell();
LootTemplates_Spell.CheckLootRefs();
- SendGlobalSysMessage("DB table `spell_loot_template` reloaded.");
+ SendGlobalGMSysMessage("DB table `spell_loot_template` reloaded.");
return true;
}
@@ -952,7 +952,7 @@ bool ChatHandler::HandleReloadPointsOfInterestCommand(const char*)
{
sLog.outString( "Re-Loading `points_of_interest` Table!" );
objmgr.LoadPointsOfInterest();
- SendGlobalSysMessage("DB table `points_of_interest` reloaded.");
+ SendGlobalGMSysMessage("DB table `points_of_interest` reloaded.");
return true;
}
@@ -960,7 +960,7 @@ bool ChatHandler::HandleReloadSpellClickSpellsCommand(const char*)
{
sLog.outString( "Re-Loading `npc_spellclick_spells` Table!" );
objmgr.LoadNPCSpellClickSpells();
- SendGlobalSysMessage("DB table `npc_spellclick_spells` reloaded.");
+ SendGlobalGMSysMessage("DB table `npc_spellclick_spells` reloaded.");
return true;
}
@@ -1008,7 +1008,7 @@ bool ChatHandler::HandleReloadSpellAreaCommand(const char*)
{
sLog.outString( "Re-Loading SpellArea Data..." );
spellmgr.LoadSpellAreas();
- SendGlobalSysMessage("DB table `spell_area` (spell dependences from area/quest/auras state) reloaded.");
+ SendGlobalGMSysMessage("DB table `spell_area` (spell dependences from area/quest/auras state) reloaded.");
return true;
}
@@ -1056,7 +1056,7 @@ bool ChatHandler::HandleReloadSpellBonusesCommand(const char*)
{
sLog.outString( "Re-Loading Spell Bonus Data..." );
spellmgr.LoadSpellBonusess();
- SendGlobalSysMessage("DB table `spell_bonus_data` (spell damage/healing coefficients) reloaded.");
+ SendGlobalGMSysMessage("DB table `spell_bonus_data` (spell damage/healing coefficients) reloaded.");
return true;
}
@@ -1112,7 +1112,7 @@ bool ChatHandler::HandleReloadItemRequiredTragetCommand(const char*)
{
sLog.outString( "Re-Loading Item Required Targets Table..." );
objmgr.LoadItemRequiredTarget();
- SendGlobalSysMessage("DB table `item_required_target` reloaded.");
+ SendGlobalGMSysMessage("DB table `item_required_target` reloaded.");
return true;
}
@@ -1181,7 +1181,7 @@ bool ChatHandler::HandleReloadEventAITextsCommand(const char* arg)
sLog.outString( "Re-Loading Texts from `creature_ai_texts`...");
CreatureEAI_Mgr.LoadCreatureEventAI_Texts();
- SendGlobalSysMessage("DB table `creature_ai_texts` reloaded.");
+ SendGlobalGMSysMessage("DB table `creature_ai_texts` reloaded.");
return true;
}
@@ -1189,7 +1189,7 @@ bool ChatHandler::HandleReloadEventAISummonsCommand(const char* arg)
{
sLog.outString( "Re-Loading Summons from `creature_ai_summons`...");
CreatureEAI_Mgr.LoadCreatureEventAI_Summons();
- SendGlobalSysMessage("DB table `creature_ai_summons` reloaded.");
+ SendGlobalGMSysMessage("DB table `creature_ai_summons` reloaded.");
return true;
}
@@ -1197,7 +1197,7 @@ bool ChatHandler::HandleReloadEventAIScriptsCommand(const char* arg)
{
sLog.outString( "Re-Loading Scripts from `creature_ai_scripts`...");
CreatureEAI_Mgr.LoadCreatureEventAI_Scripts();
- SendGlobalSysMessage("DB table `creature_ai_scripts` reloaded.");
+ SendGlobalGMSysMessage("DB table `creature_ai_scripts` reloaded.");
return true;
}
@@ -1306,7 +1306,7 @@ bool ChatHandler::HandleReloadLocalesAchievementRewardCommand(const char*)
{
sLog.outString( "Re-Loading Locales Achievement Reward Data..." );
achievementmgr.LoadRewardLocales();
- SendGlobalSysMessage("DB table `locales_achievement_reward` reloaded.");
+ SendGlobalGMSysMessage("DB table `locales_achievement_reward` reloaded.");
return true;
}
@@ -1354,7 +1354,7 @@ bool ChatHandler::HandleReloadLocalesPointsOfInterestCommand(const char* /*arg*/
{
sLog.outString( "Re-Loading Locales Points Of Interest ... ");
objmgr.LoadPointOfInterestLocales();
- SendGlobalSysMessage("DB table `locales_points_of_interest` reloaded.");
+ SendGlobalGMSysMessage("DB table `locales_points_of_interest` reloaded.");
return true;
}
diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp
index 043397f9c48..f5a1013f085 100644
--- a/src/game/MiscHandler.cpp
+++ b/src/game/MiscHandler.cpp
@@ -1609,7 +1609,7 @@ void WorldSession::HandleMoveSetCanFlyAckOpcode( WorldPacket & recv_data )
recv_data >> guid >> unk >> flags;
- _player->m_movementInfo.flags = flags;
+ _player->m_mover->m_movementInfo.flags = flags;
}
void WorldSession::HandleRequestPetInfoOpcode( WorldPacket & /*recv_data */)
diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp
index 775cef0edca..1a483a8869d 100644
--- a/src/game/MovementHandler.cpp
+++ b/src/game/MovementHandler.cpp
@@ -293,16 +293,12 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
GetPlayer()->SendMessageToSet(&data, false);
mover->m_movementInfo = movementInfo;
- mover->SetUnitMovementFlags(movementInfo.flags);
if(plMover) // nothing is charmed, or player charmed
{
plMover->SetPosition(movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o);
plMover->UpdateFallInformationIfNeed(movementInfo, recv_data.GetOpcode());
- if(plMover->isMovingOrTurning())
- plMover->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
-
if(movementInfo.z < -500.0f)
{
if(plMover->InBattleGround()
@@ -340,6 +336,13 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
if(mover->m_Vehicle)
return;
mover->GetMap()->CreatureRelocation((Creature*)mover, movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o);
+
+ /*if(mover->canFly())
+ {
+ bool flying = mover->IsFlying();
+ if(flying != ((mover->GetByteValue(UNIT_FIELD_BYTES_1, 3) & 0x02) ? true : false))
+ mover->SetFlying(flying);
+ }*/
}
//sLog.outString("Receive Movement Packet %s:", opcodeTable[recv_data.GetOpcode()]);
@@ -462,9 +465,7 @@ void WorldSession::HandleMoveNotActiveMover(WorldPacket &recv_data)
return;
}*/
- MovementInfo mi;
- ReadMovementInfo(recv_data, &mi);
- _player->m_movementInfo = mi;
+ ReadMovementInfo(recv_data, &_player->m_mover->m_movementInfo);
}
void WorldSession::HandleDismissControlledVehicle(WorldPacket &recv_data)
@@ -477,9 +478,7 @@ void WorldSession::HandleDismissControlledVehicle(WorldPacket &recv_data)
if(!vehicleGUID) // something wrong here...
return;
- MovementInfo mi;
- ReadMovementInfo(recv_data, &mi);
- _player->m_movementInfo = mi;
+ ReadMovementInfo(recv_data, &_player->m_mover->m_movementInfo);
_player->ExitVehicle();
}
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 54c86fa874a..68545b6a379 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -1654,7 +1654,6 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
// reset movement flags at teleport, because player will continue move with these flags after teleport
SetUnitMovementFlags(0);
- m_movementInfo.flags = 0;
if (m_transport)
{
@@ -5636,38 +5635,35 @@ bool Player::SetPosition(float x, float y, float z, float orientation, bool tele
return false;
}
- Map *m = GetMap();
+ //if(movementInfo.flags & MOVEMENTFLAG_MOVING)
+ // mover->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_MOVE);
+ //if(movementInfo.flags & MOVEMENTFLAG_TURNING)
+ // mover->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TURNING);
+ //AURA_INTERRUPT_FLAG_JUMP not sure
- const float old_x = GetPositionX();
- const float old_y = GetPositionY();
- const float old_z = GetPositionZ();
- const float old_r = GetOrientation();
+ if(GetOrientation() != orientation)
+ RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TURNING);
- if( teleport || old_x != x || old_y != y || old_z != z || old_r != orientation )
+ bool move2d = (teleport || GetPositionX() != x || GetPositionY() != y);
+ if(move2d || GetPositionZ() != z)
{
- if (teleport || old_x != x || old_y != y || old_z != z)
- RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_MOVE | AURA_INTERRUPT_FLAG_TURNING);
- else
- RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TURNING);
+ RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_MOVE);
// move and update visible state if need
- m->PlayerRelocation(this, x, y, z, orientation);
+ GetMap()->PlayerRelocation(this, x, y, z, orientation);
// reread after Map::Relocation
- m = GetMap();
- x = GetPositionX();
- y = GetPositionY();
- z = GetPositionZ();
+ GetPosition(x, y, z);
// group update
- if(GetGroup() && (old_x != x || old_y != y))
+ if(move2d && GetGroup())
SetGroupUpdateFlag(GROUP_UPDATE_FLAG_POSITION);
- }
- // code block for underwater state update
- UpdateUnderwaterState(m, x, y, z);
+ // code block for underwater state update
+ UpdateUnderwaterState(GetMap(), x, y, z);
- CheckExploreSystem();
+ CheckExploreSystem();
+ }
return true;
}
@@ -6416,7 +6412,7 @@ void Player::CheckDuelDistance(time_t currTime)
bool Player::IsOutdoorPvPActive()
{
- return (isAlive() && !HasInvisibilityAura() && !HasStealthAura() && (HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_IN_PVP) || sWorld.IsPvPRealm()) && !HasUnitMovementFlag(MOVEMENTFLAG_FLYING2) && !isInFlight());
+ return (isAlive() && !HasInvisibilityAura() && !HasStealthAura() && (HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_IN_PVP) || sWorld.IsPvPRealm()) && !HasUnitMovementFlag(MOVEMENTFLAG_FLYING) && !isInFlight());
}
void Player::DuelComplete(DuelCompleteType type)
diff --git a/src/game/Player.h b/src/game/Player.h
index 9dcad34f0e8..c879222d8d8 100644
--- a/src/game/Player.h
+++ b/src/game/Player.h
@@ -689,17 +689,6 @@ enum InstanceResetWarningType
RAID_INSTANCE_EXPIRED = 5
};
-// flags that use in movement check for example at spell casting
-MovementFlags const movementFlagsMask = MovementFlags(
- MOVEMENTFLAG_FORWARD |MOVEMENTFLAG_BACKWARD |MOVEMENTFLAG_STRAFE_LEFT|MOVEMENTFLAG_STRAFE_RIGHT|
- MOVEMENTFLAG_PITCH_UP|MOVEMENTFLAG_PITCH_DOWN|MOVEMENTFLAG_FLY_UNK1 |
- MOVEMENTFLAG_JUMPING |MOVEMENTFLAG_FALLING |MOVEMENTFLAG_FLY_UP |
- MOVEMENTFLAG_FLYING |MOVEMENTFLAG_SPLINE
-);
-
-MovementFlags const movementOrTurningFlagsMask = MovementFlags(
- movementFlagsMask | MOVEMENTFLAG_LEFT | MOVEMENTFLAG_RIGHT
-);
class InstanceSave;
enum RestType
@@ -1951,11 +1940,6 @@ class TRINITY_DLL_SPEC Player : public Unit
}
void HandleFall(MovementInfo const& movementInfo);
- bool isMoving() const { return m_movementInfo.HasMovementFlag(movementFlagsMask); }
- bool isMovingOrTurning() const { return m_movementInfo.HasMovementFlag(movementOrTurningFlagsMask); }
-
- bool CanFly() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_CAN_FLY); }
- bool IsFlying() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_FLYING); }
bool IsAllowUseFlyMountsHere() const;
void SetClientControl(Unit* target, uint8 allowMove);
diff --git a/src/game/PointMovementGenerator.cpp b/src/game/PointMovementGenerator.cpp
index c972683ce0b..ed057854aaa 100644
--- a/src/game/PointMovementGenerator.cpp
+++ b/src/game/PointMovementGenerator.cpp
@@ -35,7 +35,7 @@ void PointMovementGenerator<T>::Initialize(T &unit)
i_destinationHolder.SetDestination(traveller,i_x,i_y,i_z, !unit.hasUnitState(UNIT_STAT_JUMPING));
if (unit.GetTypeId() == TYPEID_UNIT && ((Creature*)&unit)->canFly())
- unit.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
+ unit.AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
}
template<class T>
diff --git a/src/game/RandomMovementGenerator.cpp b/src/game/RandomMovementGenerator.cpp
index 6d3648d51e4..e354e41827c 100644
--- a/src/game/RandomMovementGenerator.cpp
+++ b/src/game/RandomMovementGenerator.cpp
@@ -124,7 +124,7 @@ RandomMovementGenerator<Creature>::_setRandomLocation(Creature &creature)
if (is_air_ok)
{
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
- creature.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
+ creature.AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
}
//else if (is_water_ok) // Swimming mode to be done with more than this check
else
@@ -151,7 +151,7 @@ RandomMovementGenerator<Creature>::Initialize(Creature &creature)
wander_distance = creature.GetRespawnRadius();
if (creature.canFly())
- creature.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
+ creature.AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
else if(irand(0,RUNNING_CHANCE_RANDOMMV) > 0)
creature.AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
_setRandomLocation(creature);
@@ -194,7 +194,7 @@ RandomMovementGenerator<Creature>::Update(Creature &creature, const uint32 &diff
if(i_nextMoveTime.Passed())
{
if (creature.canFly())
- creature.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
+ creature.AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
else if(irand(0,RUNNING_CHANCE_RANDOMMV) > 0)
creature.AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
_setRandomLocation(creature);
diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h
index e1440d45454..b6ac8054ce2 100644
--- a/src/game/SharedDefines.h
+++ b/src/game/SharedDefines.h
@@ -344,7 +344,7 @@ enum SpellCategory
#define SPELL_ATTR_EX3_REQ_OFFHAND 0x01000000 // 24 Req offhand weapon
#define SPELL_ATTR_EX3_UNK25 0x02000000 // 25 no cause spell pushback ?
#define SPELL_ATTR_EX3_CAN_PROC_TRIGGERED 0x04000000 // 26
-#define SPELL_ATTR_EX3_UNK27 0x08000000 // 27
+#define SPELL_ATTR_EX3_DRAIN_SOUL 0x08000000 // 27 only drain soul has this flag
#define SPELL_ATTR_EX3_UNK28 0x10000000 // 28
#define SPELL_ATTR_EX3_UNK29 0x20000000 // 29
#define SPELL_ATTR_EX3_UNK30 0x40000000 // 30
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 2f641c43c35..d97bd11842d 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -423,7 +423,6 @@ Spell::Spell( Unit* Caster, SpellEntry const *info, bool triggered, uint64 origi
m_spellState = SPELL_STATE_NULL;
- m_castPositionX = m_castPositionY = m_castPositionZ = 0;
m_TriggerSpells.clear();
m_IsTriggeredSpell = triggered;
//m_AreaAura = false;
@@ -1209,7 +1208,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
if(m_spellInfo->speed > 0.0f && unit == m_targets.getUnitTarget()
&& (unit->HasAuraType(SPELL_AURA_MOD_INVISIBILITY)
|| unit->HasAuraTypeWithFamilyFlags(SPELL_AURA_MOD_STEALTH, SPELLFAMILY_ROGUE, SPELLFAMILYFLAG_ROGUE_VANISH))
- && !unit->isVisibleForOrDetect(m_caster, true))
+ && !m_caster->canSeeOrDetect(unit, true))
{
// that was causing CombatLog errors
// return SPELL_MISS_EVADE;
@@ -1410,12 +1409,20 @@ bool Spell::UpdateChanneledTargetList()
uint8 needAliveTargetMask = m_needAliveTargetMask;
uint8 needAuraMask = 0;
- for (uint8 i=0;i<MAX_SPELL_EFFECTS;++i)
+ for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
if (m_spellInfo->Effect[i] == SPELL_EFFECT_APPLY_AURA)
needAuraMask |= 1<<i;
needAuraMask &= needAliveTargetMask;
+ float range;
+ if(needAuraMask)
+ {
+ range = GetSpellMaxRange(m_spellInfo, IsPositiveSpell(m_spellInfo->Id));
+ if(Player * modOwner = m_caster->GetSpellModOwner())
+ modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RANGE, range, this);
+ }
+
for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
{
if( ihit->missCondition == SPELL_MISS_NONE && (needAliveTargetMask & ihit->effectMask) )
@@ -1428,9 +1435,6 @@ bool Spell::UpdateChanneledTargetList()
{
if(Aura * aur = unit->GetAura(m_spellInfo->Id, m_originalCasterGUID))
{
- float range = m_caster->GetSpellMaxRangeForTarget(unit,GetSpellRangeStore()->LookupEntry(m_spellInfo->rangeIndex));
- if(Player * modOwner = m_caster->GetSpellModOwner())
- modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RANGE, range, this);
if (m_caster != unit && !m_caster->IsWithinDistInMap(unit,range))
{
ihit->effectMask &= ~aur->GetEffectMask();
@@ -1438,7 +1442,7 @@ bool Spell::UpdateChanneledTargetList()
continue;
}
}
- else
+ else // aura is dispelled
continue;
}
@@ -2280,46 +2284,56 @@ void Spell::SetTargetMap(uint32 i, uint32 cur)
}
else
{
- if(m_spellInfo->Id == 27285) // Seed of Corruption proc spell
- unitList.remove(m_targets.getUnitTarget());
- else if (m_spellInfo->Id==57699) //Replenishment (special target selection) 10 targets with lowest mana
+ switch (m_spellInfo->Id)
{
- typedef std::priority_queue<PrioritizeManaWraper, std::vector<PrioritizeManaWraper>, PrioritizeMana> TopMana;
- TopMana manaUsers;
- for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end();++itr)
+ case 27285: // Seed of Corruption proc spell
+ unitList.remove(m_targets.getUnitTarget());
+ break;
+ case 55789: // Improved Icy Talons
+ case 59725: // Improved Spell Reflection - aoe aura
+ unitList.remove(m_caster);
+ break;
+ case 57699: //Replenishment (special target selection) 10 targets with lowest mana
{
- if ((*itr)->getPowerType() == POWER_MANA)
+ typedef std::priority_queue<PrioritizeManaWraper, std::vector<PrioritizeManaWraper>, PrioritizeMana> TopMana;
+ TopMana manaUsers;
+ for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end();++itr)
{
- PrioritizeManaWraper WTarget(*itr);
- manaUsers.push(WTarget);
+ if ((*itr)->getPowerType() == POWER_MANA)
+ {
+ PrioritizeManaWraper WTarget(*itr);
+ manaUsers.push(WTarget);
+ }
}
- }
- unitList.clear();
- while(!manaUsers.empty() && unitList.size()<10)
- {
- unitList.push_back(manaUsers.top().getUnit());
- manaUsers.pop();
+ unitList.clear();
+ while(!manaUsers.empty() && unitList.size()<10)
+ {
+ unitList.push_back(manaUsers.top().getUnit());
+ manaUsers.pop();
+ }
+ break;
}
- }
- else if (m_spellInfo->Id==52759)// Ancestral Awakening
- {
- typedef std::priority_queue<PrioritizeHealthWraper, std::vector<PrioritizeHealthWraper>, PrioritizeHealth> TopHealth;
- TopHealth healedMembers;
- for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end();++itr)
+ case 52759: // Ancestral Awakening
{
- PrioritizeHealthWraper WTarget(*itr);
- healedMembers.push(WTarget);
- }
+ typedef std::priority_queue<PrioritizeHealthWraper, std::vector<PrioritizeHealthWraper>, PrioritizeHealth> TopHealth;
+ TopHealth healedMembers;
+ for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end();++itr)
+ {
+ PrioritizeHealthWraper WTarget(*itr);
+ healedMembers.push(WTarget);
+ }
- unitList.clear();
- while(!healedMembers.empty() && unitList.size()<1)
- {
- unitList.push_back(healedMembers.top().getUnit());
- healedMembers.pop();
+ unitList.clear();
+ while(!healedMembers.empty() && unitList.size()<1)
+ {
+ unitList.push_back(healedMembers.top().getUnit());
+ healedMembers.pop();
+ }
+ break;
}
}
- else if (m_spellInfo->EffectImplicitTargetA[i] == TARGET_DEST_TARGET_ANY
+ if (m_spellInfo->EffectImplicitTargetA[i] == TARGET_DEST_TARGET_ANY
&& m_spellInfo->EffectImplicitTargetB[i] == TARGET_UNIT_AREA_ALLY_DST)// Wild Growth, Circle of Healing, Glyph of holy light target special selection
{
typedef std::priority_queue<PrioritizeHealthWraper, std::vector<PrioritizeHealthWraper>, PrioritizeHealth> TopHealth;
@@ -2376,9 +2390,6 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect* triggeredByAura
m_spellState = SPELL_STATE_PREPARING;
- m_caster->GetPosition(m_castPositionX, m_castPositionY, m_castPositionZ);
- m_castOrientation = m_caster->GetOrientation();
-
if(triggeredByAura)
m_triggeredByAuraSpell = triggeredByAura->GetSpellProto();
@@ -2510,16 +2521,12 @@ void Spell::cancel()
case SPELL_STATE_CASTING:
{
- for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit)
- {
- if( ihit->missCondition == SPELL_MISS_NONE )
- {
- Unit* unit = m_caster->GetGUID()==(*ihit).targetGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, ihit->targetGUID);
- if( unit && unit->isAlive() )
- unit->RemoveAurasDueToSpell(m_spellInfo->Id, m_originalCasterGUID, AURA_REMOVE_BY_CANCEL);
- }
- }
- m_caster->RemoveAurasDueToSpell(m_spellInfo->Id, m_originalCasterGUID, AURA_REMOVE_BY_CANCEL);
+ for(std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
+ if(ihit->missCondition == SPELL_MISS_NONE)
+ if(Unit* unit = m_caster->GetGUID() == ihit->targetGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, ihit->targetGUID))
+ if(unit->isAlive())
+ unit->RemoveAurasDueToSpell(m_spellInfo->Id, m_originalCasterGUID, AURA_REMOVE_BY_CANCEL);
+
SendChannelUpdate(0);
SendInterrupted(0);
SendCastResult(SPELL_FAILED_INTERRUPTED);
@@ -2902,21 +2909,18 @@ void Spell::update(uint32 difftime)
if(m_targets.getUnitTargetGUID() && !m_targets.getUnitTarget())
{
+ sLog.outDebug("Spell %u is cancelled due to removal of target.", m_spellInfo->Id);
cancel();
return;
}
// check if the player caster has moved before the spell finished
if ((m_caster->GetTypeId() == TYPEID_PLAYER && m_timer != 0) &&
- (m_castPositionX != m_caster->GetPositionX() || m_castPositionY != m_caster->GetPositionY() || m_castPositionZ != m_caster->GetPositionZ()) &&
+ m_caster->isMoving() && (m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_MOVEMENT) &&
(m_spellInfo->Effect[0] != SPELL_EFFECT_STUCK || !m_caster->HasUnitMovementFlag(MOVEMENTFLAG_FALLING)))
{
- // always cancel for channeled spells
- //if( m_spellState == SPELL_STATE_CASTING )
- // cancel();
// don't cancel for melee, autorepeat, triggered and instant spells
- //else
- if(!IsNextMeleeSwingSpell() && !IsAutoRepeat() && !m_IsTriggeredSpell && (m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_MOVEMENT))
+ if(!IsNextMeleeSwingSpell() && !IsAutoRepeat() && !m_IsTriggeredSpell)
cancel();
}
@@ -2939,17 +2943,6 @@ void Spell::update(uint32 difftime)
{
if(m_timer > 0)
{
- if( m_caster->GetTypeId() == TYPEID_PLAYER )
- {
- // check if player has jumped before the channeling finished
- if(m_caster->HasUnitMovementFlag(MOVEMENTFLAG_JUMPING))
- cancel();
-
- // check for incapacitating player states
- //if( m_caster->hasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_CONFUSED))
- // cancel();
- }
-
// check if there are alive targets left
if (!UpdateChanneledTargetList())
{
@@ -5924,6 +5917,7 @@ bool SpellEvent::Execute(uint64 e_time, uint32 p_time)
{
// no, we aren't, do the typical update
// check, if we have channeled spell on our hands
+ /*
if (IsChanneledSpell(m_Spell->m_spellInfo))
{
// evented channeled spell is processed separately, casted once after delay, and not destroyed till finish
@@ -5946,6 +5940,7 @@ bool SpellEvent::Execute(uint64 e_time, uint32 p_time)
// event will be re-added automatically at the end of routine)
}
else
+ */
{
// run the spell handler and think about what we can do next
uint64 t_offset = e_time - m_Spell->GetDelayStart();
diff --git a/src/game/Spell.h b/src/game/Spell.h
index 5309d881990..5d108f48fa1 100644
--- a/src/game/Spell.h
+++ b/src/game/Spell.h
@@ -274,7 +274,6 @@ class Spell
void EffectDualWield(uint32 i);
void EffectPickPocket(uint32 i);
void EffectAddFarsight(uint32 i);
- void EffectSummonWild(uint32 i);
void EffectHealMechanical(uint32 i);
void EffectJump(uint32 i);
void EffectJump2(uint32 i);
@@ -622,10 +621,6 @@ class Spell
uint32 m_spellState;
uint32 m_timer;
- float m_castPositionX;
- float m_castPositionY;
- float m_castPositionZ;
- float m_castOrientation;
bool m_IsTriggeredSpell;
// if need this can be replaced by Aura copy
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index f7eb73c7b72..471209e8f77 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -2478,6 +2478,10 @@ void AuraEffect::HandleAuraDummy(bool apply, bool Real, bool changeAmount)
if(m_target->GetTypeId()==TYPEID_PLAYER)
((Player*)m_target)->RemoveAmmo(); // not use ammo and not allow use
return;
+ case 52916: // Honor Among Thieves
+ if (Unit * target = ObjectAccessor::GetUnit(*m_target, m_target->GetUInt64Value(UNIT_FIELD_TARGET)))
+ m_target->CastSpell(target, 51699, true);
+ return;
}
// Earth Shield
@@ -4593,6 +4597,20 @@ void AuraEffect::HandlePeriodicDamage(bool apply, bool Real, bool changeAmount)
// For prevent double apply bonuses
bool loading = (m_target->GetTypeId() == TYPEID_PLAYER && ((Player*)m_target)->GetSession()->PlayerLoading());
+ // Curse of Doom
+ // This is a hack - this aura should be handled by passive aura and proc doomguard spawn on kill, however there is no such aura in dbcs
+ if(m_spellProto->SpellFamilyName==SPELLFAMILY_WARLOCK && m_spellProto->SpellFamilyFlags.IsEqual(0,0x02,0))
+ {
+ if (Real && !apply && GetParentAura()->GetRemoveMode()==AURA_REMOVE_BY_DEATH)
+ {
+ if (Unit * caster = GetCaster())
+ {
+ if (caster->GetTypeId()==TYPEID_PLAYER && ((Player*)caster)->isHonorOrXPTarget(m_target))
+ caster->CastSpell(m_target, 18662, true);
+ }
+ }
+ }
+
// Custom damage calculation after
if (!apply || loading)
return;
@@ -5654,26 +5672,15 @@ void AuraEffect::HandleAuraAllowFlight(bool apply, bool Real, bool /*changeAmoun
if(!Real)
return;
+ if(m_target->GetTypeId() == TYPEID_UNIT)
+ m_target->SetFlying(apply);
+
// allow fly
WorldPacket data;
if(apply)
- {
data.Initialize(SMSG_MOVE_SET_CAN_FLY, 12);
- if(m_target->GetTypeId() == TYPEID_UNIT)
- {
- m_target->SetByteFlag(UNIT_FIELD_BYTES_1, 3, 0x02);
- m_target->AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
- }
- }
else
- {
data.Initialize(SMSG_MOVE_UNSET_CAN_FLY, 12);
- if(m_target->GetTypeId() == TYPEID_UNIT)
- {
- m_target->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, 0x02);
- m_target->RemoveUnitMovementFlag(MOVEMENTFLAG_FLYING2);
- }
- }
data.append(m_target->GetPackGUID());
data << uint32(0); // unk
m_target->SendMessageToSet(&data, true);
@@ -5824,7 +5831,7 @@ void AuraEffect::HandleSchoolAbsorb(bool apply, bool Real, bool changeAmount)
switch(m_spellProto->SpellFamilyName)
{
case SPELLFAMILY_PRIEST:
- // PW: S
+ // Power Word: Shield
if(m_spellProto->SpellFamilyFlags.IsEqual(0x1, 0, 0x400))
{
// +80.68% from sp bonus
@@ -5856,6 +5863,14 @@ void AuraEffect::HandleSchoolAbsorb(bool apply, bool Real, bool changeAmount)
DoneActualBenefit = caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.3f;
}
break;
+ case SPELLFAMILY_PALADIN:
+ // Sacred Shield
+ if (m_spellProto->SpellFamilyFlags[1] & 0x80000)
+ {
+ // 0.75 from sp bonus
+ DoneActualBenefit = caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.75f;
+ }
+ break;
default:
break;
}
@@ -5994,9 +6009,9 @@ void AuraEffect::PeriodicTick()
SpellEntry const* spellProto = GetSpellProto();
// Set trigger flag
- uint32 procAttacker = PROC_FLAG_ON_DO_PERIODIC | PROC_FLAG_SUCCESSFUL_DAMAGING_SPELL_HIT;
- uint32 procVictim = PROC_FLAG_ON_TAKE_PERIODIC | PROC_FLAG_TAKEN_DAMAGING_SPELL_HIT;
- uint32 procEx = PROC_EX_NORMAL_HIT;
+ uint32 procAttacker = PROC_FLAG_ON_DO_PERIODIC;
+ uint32 procVictim = PROC_FLAG_ON_TAKE_PERIODIC;
+ uint32 procEx = PROC_EX_NORMAL_HIT | PROC_EX_INTERNAL_DOT;
pdamage = (pdamage <= absorb+resist) ? 0 : (pdamage-absorb-resist);
if (pdamage)
procVictim|=PROC_FLAG_TAKEN_ANY_DAMAGE;
@@ -6006,7 +6021,6 @@ void AuraEffect::PeriodicTick()
break;
}
case SPELL_AURA_PERIODIC_LEECH:
- case SPELL_AURA_PERIODIC_HEALTH_FUNNEL:
{
Unit *pCaster = GetCaster();
if(!pCaster)
@@ -6060,9 +6074,9 @@ void AuraEffect::PeriodicTick()
int32 stackAmount = GetParentAura()->GetStackAmount();
// Set trigger flag
- uint32 procAttacker = PROC_FLAG_ON_DO_PERIODIC | PROC_FLAG_SUCCESSFUL_DAMAGING_SPELL_HIT;
- uint32 procVictim = PROC_FLAG_ON_TAKE_PERIODIC | PROC_FLAG_TAKEN_DAMAGING_SPELL_HIT;
- uint32 procEx = PROC_EX_NORMAL_HIT;
+ uint32 procAttacker = PROC_FLAG_ON_DO_PERIODIC;
+ uint32 procVictim = PROC_FLAG_ON_TAKE_PERIODIC;
+ uint32 procEx = PROC_EX_NORMAL_HIT | PROC_EX_INTERNAL_DOT;
pdamage = (pdamage <= absorb+resist) ? 0 : (pdamage-absorb-resist);
if (pdamage)
procVictim|=PROC_FLAG_TAKEN_ANY_DAMAGE;
@@ -6087,6 +6101,30 @@ void AuraEffect::PeriodicTick()
pCaster->getHostilRefManager().threatAssist(pCaster, gain * 0.5f, spellProto);
break;
}
+ case SPELL_AURA_PERIODIC_HEALTH_FUNNEL: // only three spells
+ {
+ Unit *donator = GetCaster();
+ if(!donator || !donator->GetHealth())
+ return;
+
+ uint32 pdamage = GetAmount() * GetParentAura()->GetStackAmount();
+ if(donator->GetHealth() < pdamage)
+ pdamage = donator->GetHealth() - 1;
+ if(!pdamage)
+ return;
+
+ Unit* target = m_target; // aura can be deleted in DealDamage
+ SpellEntry const* spellProto = GetSpellProto();
+ //donator->SendSpellNonMeleeDamageLog(donator, GetId(), pdamage, GetSpellSchoolMask(spellProto), 0, 0, false, 0);
+ donator->ModifyHealth(-(int32)pdamage);
+ sLog.outDetail("PeriodicTick: donator %u target %u damage %u.", donator->GetEntry(), target->GetEntry(), pdamage);
+
+ if(spellProto->EffectMultipleValue[GetEffIndex()] > 0)
+ pdamage *= spellProto->EffectMultipleValue[GetEffIndex()];
+
+ donator->DealHeal(target, pdamage, spellProto);
+ break;
+ }
case SPELL_AURA_PERIODIC_HEAL:
case SPELL_AURA_OBS_MOD_HEALTH:
{
@@ -6161,9 +6199,9 @@ void AuraEffect::PeriodicTick()
}
}
- uint32 procAttacker = PROC_FLAG_ON_DO_PERIODIC | PROC_FLAG_SUCCESSFUL_HEALING_SPELL;
- uint32 procVictim = PROC_FLAG_ON_TAKE_PERIODIC | PROC_FLAG_TAKEN_HEALING_SPELL;
- uint32 procEx = PROC_EX_NORMAL_HIT;
+ uint32 procAttacker = PROC_FLAG_ON_DO_PERIODIC;
+ uint32 procVictim = PROC_FLAG_ON_TAKE_PERIODIC;
+ uint32 procEx = PROC_EX_NORMAL_HIT | PROC_EX_INTERNAL_HOT;
// ignore item heals
if(!haveCastItem)
pCaster->ProcDamageAndSpell(target, procAttacker, procVictim, procEx, pdamage, BASE_ATTACK, spellProto);
@@ -6358,9 +6396,9 @@ void AuraEffect::PeriodicTick()
pCaster->SendSpellNonMeleeDamageLog(&damageInfo);
// Set trigger flag
- uint32 procAttacker = PROC_FLAG_ON_DO_PERIODIC | PROC_FLAG_SUCCESSFUL_DAMAGING_SPELL_HIT;
- uint32 procVictim = PROC_FLAG_ON_TAKE_PERIODIC | PROC_FLAG_TAKEN_DAMAGING_SPELL_HIT;
- uint32 procEx = createProcExtendMask(&damageInfo, SPELL_MISS_NONE);
+ uint32 procAttacker = PROC_FLAG_ON_DO_PERIODIC;
+ uint32 procVictim = PROC_FLAG_ON_TAKE_PERIODIC;
+ uint32 procEx = createProcExtendMask(&damageInfo, SPELL_MISS_NONE) | PROC_EX_INTERNAL_DOT;
if (damageInfo.damage)
procVictim|=PROC_FLAG_TAKEN_ANY_DAMAGE;
@@ -7003,9 +7041,15 @@ void AuraEffect::HandleAuraControlVehicle(bool apply, bool Real, bool /*changeAm
}
else
{
+ if(GetId() == 53111) // Devour Humanoid
+ {
+ vehicle->Kill(caster);
+ if(caster->GetTypeId() == TYPEID_UNIT)
+ ((Creature*)caster)->RemoveCorpse();
+ }
+
// some SPELL_AURA_CONTROL_VEHICLE auras have a dummy effect on the player - remove them
caster->RemoveAurasDueToSpell(GetId());
-
caster->ExitVehicle();
}
}
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 24274cf19dd..f29c883a5f4 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -3364,6 +3364,8 @@ void Spell::EffectSummonType(uint32 i)
float radius = GetSpellRadiusForHostile(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i]));
int32 amount = damage > 0 ? damage : 1;
+ if (m_spellInfo->Id == 18662) // Curse of Doom
+ amount = 1;
for(int32 count = 0; count < amount; ++count)
{
@@ -4938,6 +4940,10 @@ void Spell::EffectScriptEffect(uint32 effIndex)
unitTarget->CastSpell(unitTarget, damage, false);
break;
}
+ case 53110: // Devour Humanoid
+ if(unitTarget)
+ unitTarget->CastSpell(m_caster, damage, true);
+ return;
// Winged Steed of the Ebon Blade
case 54729:
{
@@ -6651,8 +6657,6 @@ void Spell::SummonGuardian(uint32 entry, SummonPropertiesEntry const *properties
switch(m_spellInfo->Id)
{
case 1122: // Inferno
- case 18662: // Curse of Doom
- amount = 1;
break;
}
int32 duration = GetSpellDuration(m_spellInfo);
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 14f7033cfc6..5998933afc1 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -583,6 +583,7 @@ bool IsPositiveEffect(uint32 spellId, uint32 effIndex, bool deep)
case 34700: // Allergic Reaction
case 31719: // Suspension
case 61987: // Avenging Wrath Marker
+ case 11196: // Recently Bandadged
return false;
case 12042: // Arcane Power
return true;
@@ -1275,11 +1276,11 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const* spellPr
{
if (EventProcFlag & PROC_FLAG_SUCCESSFUL_DAMAGING_SPELL_HIT)
{
- if (!(procFlags & PROC_FLAG_SUCCESSFUL_DAMAGING_SPELL_HIT))
+ if (!(procExtra & PROC_EX_INTERNAL_DOT))
return false;
}
else if (EventProcFlag & PROC_FLAG_SUCCESSFUL_HEALING_SPELL
- && !(procFlags & PROC_FLAG_SUCCESSFUL_HEALING_SPELL))
+ && !(procExtra & PROC_EX_INTERNAL_HOT))
return false;
}
@@ -1287,11 +1288,11 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const* spellPr
{
if (EventProcFlag & PROC_FLAG_TAKEN_DAMAGING_SPELL_HIT)
{
- if (!(procFlags & PROC_FLAG_TAKEN_DAMAGING_SPELL_HIT))
+ if (!(procExtra & PROC_EX_INTERNAL_DOT))
return false;
}
else if (EventProcFlag & PROC_FLAG_TAKEN_HEALING_SPELL
- && !(procFlags & PROC_FLAG_TAKEN_HEALING_SPELL))
+ && !(procExtra & PROC_EX_INTERNAL_HOT))
return false;
}
@@ -3351,10 +3352,8 @@ void SpellMgr::LoadSpellCustomAttr()
// Target entry seems to be wrong for this spell :/
spellInfo->EffectImplicitTargetA[0] = TARGET_UNIT_PARTY_CASTER;
spellInfo->EffectRadiusIndex[0] = 45;
- //mSpellCustomAttr[i] |= SPELL_ATTR_CU_EXCLUDE_SELF;
- //break;
+ break;
case 27820: // Mana Detonation
- case 55789: // Improved Icy Talons
//case 28062: case 39090: // Positive/Negative Charge
//case 28085: case 39093:
mSpellCustomAttr[i] |= SPELL_ATTR_CU_EXCLUDE_SELF;
diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h
index 330dfd56eee..c479a57d7f6 100644
--- a/src/game/SpellMgr.h
+++ b/src/game/SpellMgr.h
@@ -424,7 +424,7 @@ enum ProcFlags
PROC_FLAG_ON_TRAP_ACTIVATION = 0x00200000, // 21 On trap activation
PROC_FLAG_TAKEN_OFFHAND_HIT = 0x00400000, // 22 Taken off-hand melee attacks(not used)
- PROC_FLAG_SUCCESSFUL_OFFHAND_HIT = 0x00800000, // 23 Successful off-hand melee attacks
+ PROC_FLAG_SUCCESSFUL_OFFHAND_HIT = 0x00800000, // 23 Successful off-hand melee attacks ( this is probably wrong )
PROC_FLAG_DEATH = 0x01000000 // 24 Died in any way
};
@@ -459,6 +459,8 @@ enum ProcFlagsEx
PROC_EX_EX_TRIGGER_ALWAYS = 0x0010000, // If set trigger always ( no matter another flags) used for drop charges
PROC_EX_EX_ONE_TIME_TRIGGER = 0x0020000, // If set trigger always but only one time (not used)
PROC_EX_INTERNAL_CANT_PROC = 0x0800000,
+ PROC_EX_INTERNAL_DOT = 0x1000000, // Only for internal use
+ PROC_EX_INTERNAL_HOT = 0x2000000, // Only for internal use
PROC_EX_INTERNAL_TRIGGERED = 0x4000000, // Only for internal use
PROC_EX_INTERNAL_REQ_FAMILY = 0x8000000 // Only for internal use
};
diff --git a/src/game/TargetedMovementGenerator.cpp b/src/game/TargetedMovementGenerator.cpp
index 54c99ee90dd..c40568318d4 100644
--- a/src/game/TargetedMovementGenerator.cpp
+++ b/src/game/TargetedMovementGenerator.cpp
@@ -132,7 +132,7 @@ TargetedMovementGenerator<T>::_setTargetLocation(T &owner)
i_destinationHolder.SetDestination(traveller, x, y, z);
owner.addUnitState(UNIT_STAT_CHASE);
if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
- owner.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
+ owner.AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
i_destinationHolder.StartTravel(traveller);
return true;
}
@@ -147,7 +147,7 @@ TargetedMovementGenerator<T>::Initialize(T &owner)
owner.RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
- owner.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
+ owner.AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
_setTargetLocation(owner);
}
@@ -199,7 +199,7 @@ TargetedMovementGenerator<T>::Update(T &owner, const uint32 & time_diff)
{
owner.addUnitState(UNIT_STAT_CHASE);
if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
- owner.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
+ owner.AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
i_destinationHolder.StartTravel(traveller);
return true;
diff --git a/src/game/TemporarySummon.cpp b/src/game/TemporarySummon.cpp
index b481afb4bce..724d68c568b 100644
--- a/src/game/TemporarySummon.cpp
+++ b/src/game/TemporarySummon.cpp
@@ -345,7 +345,10 @@ void Puppet::Update(uint32 time)
if(IsInWorld())
{
if(!isAlive())
+ {
UnSummon();
+ // TODO: why long distance .die does not remove it
+ }
}
}
diff --git a/src/game/Traveller.h b/src/game/Traveller.h
index dfa4913a4cc..b5d0fb28ecc 100644
--- a/src/game/Traveller.h
+++ b/src/game/Traveller.h
@@ -79,7 +79,7 @@ inline float Traveller<Creature>::Speed()
return i_traveller.m_TempSpeed;
else if(i_traveller.HasUnitMovementFlag(MOVEMENTFLAG_WALK_MODE))
return i_traveller.GetSpeed(MOVE_WALK);
- else if(i_traveller.HasUnitMovementFlag(MOVEMENTFLAG_FLYING2))
+ else if(i_traveller.HasUnitMovementFlag(MOVEMENTFLAG_FLYING))
return i_traveller.GetSpeed(MOVE_FLIGHT);
else
return i_traveller.GetSpeed(MOVE_RUN);
@@ -98,7 +98,7 @@ inline float Traveller<Creature>::GetMoveDestinationTo(float x, float y, float z
float dy = y - GetPositionY();
float dz = z - GetPositionZ();
- if(i_traveller.HasUnitMovementFlag(MOVEMENTFLAG_FLYING2))
+ if(i_traveller.HasUnitMovementFlag(MOVEMENTFLAG_FLYING))
return sqrt((dx*dx) + (dy*dy) + (dz*dz));
else //Walking on the ground
return sqrt((dx*dx) + (dy*dy));
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 944a92ae755..dd1307e7ef4 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -417,7 +417,7 @@ void Unit::SendMonsterMoveByPath(Path const& path, uint32 start, uint32 end)
addUnitState(UNIT_STAT_MOVE);
}
-void Unit::SendMonsterMoveTransport(Vehicle *vehicle, bool apply)
+void Unit::SendMonsterMoveTransport(Vehicle *vehicle)
{
WorldPacket data(SMSG_MONSTER_MOVE_TRANSPORT, GetPackGUID().size()+vehicle->GetPackGUID().size());
data.append(GetPackGUID());
@@ -432,9 +432,9 @@ void Unit::SendMonsterMoveTransport(Vehicle *vehicle, bool apply)
data << GetTransOffsetO();
data << uint32(MOVEFLAG_ENTER_TRANSPORT);
data << uint32(0); // move time
- data << GetTransOffsetX();
- data << GetTransOffsetY();
- data << GetTransOffsetZ();
+ data << uint32(0);//GetTransOffsetX();
+ data << uint32(0);//GetTransOffsetY();
+ data << uint32(0);//GetTransOffsetZ();
SendMessageToSet(&data, true);
}
@@ -3508,6 +3508,7 @@ void Unit::InterruptSpell(uint32 spellType, bool withDelayed, bool withInstant)
{
assert(spellType < CURRENT_MAX_SPELL);
+ //sLog.outDebug("Interrupt spell for unit %u.", GetEntry());
Spell *spell = m_currentSpells[spellType];
if(spell
&& (withDelayed || spell->getState() != SPELL_STATE_DELAYED)
@@ -7035,6 +7036,32 @@ bool Unit::HandleModDamagePctTakenAuraProc(Unit *pVictim, uint32 damage, AuraEff
return true;
}
+// Used in case when access to whole aura is needed
+// All procs should be handled like this...
+bool Unit::HandleAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const * procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown, bool * handled)
+{
+ SpellEntry const *dummySpell = triggeredByAura->GetSpellProto();
+
+ switch(dummySpell->SpellFamilyName)
+ {
+ case SPELLFAMILY_DEATHKNIGHT:
+ {
+ switch(dummySpell->Id)
+ {
+ // Hungering Cold aura drop
+ case 51209:
+ *handled = true;
+ // Drop only in disease case
+ if (procSpell && procSpell->Dispel == DISPEL_DISEASE)
+ return false;
+ return true;
+ }
+ break;
+ }
+ }
+ return false;
+}
+
bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellEntry const *procSpell, uint32 procFlags, uint32 procEx, uint32 cooldown)
{
// Get triggered aura spell info
@@ -7248,15 +7275,16 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
trigger_spell_id = 18093;
}
- // Drain Soul
+ // Improved Drain Soul
else if (auraSpellInfo->SpellFamilyFlags[0] & 0x4000)
{
- Unit::AuraEffectList const& mAddFlatModifier = GetAurasByType(SPELL_AURA_ADD_FLAT_MODIFIER);
+ Unit::AuraEffectList const& mAddFlatModifier = GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraEffectList::const_iterator i = mAddFlatModifier.begin(); i != mAddFlatModifier.end(); ++i)
{
if ((*i)->GetMiscValue() == SPELLMOD_CHANCE_OF_SUCCESS && (*i)->GetSpellProto()->SpellIconID == 113)
{
int32 value2 = CalculateSpellDamage((*i)->GetSpellProto(),2,(*i)->GetSpellProto()->EffectBasePoints[2],this);
+ basepoints0 = value2 * GetMaxPower(POWER_MANA) / 100;
// Drain Soul
CastCustomSpell(this, 18371, &basepoints0, NULL, NULL, true, castItem, triggeredByAura);
break;
@@ -7651,6 +7679,27 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
// dummy basepoints or other customs
switch(trigger_spell_id)
{
+ // Auras which should proc on area aura source (caster in this case):
+ // Turn the Tables
+ case 52914:
+ case 52915:
+ case 52910:
+ // Honor Among Thieves
+ case 52916:
+ {
+ target = triggeredByAura->GetParentAura()->GetCaster();
+ if(!target)
+ return false;
+
+ if( cooldown && GetTypeId()==TYPEID_PLAYER && ((Player*)target)->HasSpellCooldown(trigger_spell_id))
+ return false;
+
+ target->CastSpell(target,trigger_spell_id,true,castItem,triggeredByAura);
+
+ if( cooldown && GetTypeId()==TYPEID_PLAYER )
+ ((Player*)this)->AddSpellCooldown(trigger_spell_id,0,time(NULL) + cooldown);
+ return true;
+ }
// Cast positive spell on enemy target
case 7099: // Curse of Mending
case 39647: // Curse of Mending
@@ -7729,6 +7778,11 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
((Player*)this)->RemoveCategoryCooldown(1209);
break;
}
+ case 63375: // Improved Stormstrike
+ {
+ basepoints0 = GetCreateMana() * 0.20f;
+ break;
+ }
// Brain Freeze
case 57761:
{
@@ -12451,7 +12505,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
// Fill procTriggered list
for(AuraMap::const_iterator itr = GetAuras().begin(); itr!= GetAuras().end(); ++itr)
{
- // Do not allow auras to proc from effect of itself
+ // Do not allow auras to proc from effect triggered by itself
if (procAura && procAura->Id == itr->first)
continue;
ProcTriggeredData triggerData(itr->second);
@@ -12498,8 +12552,16 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
if (GetTypeId() == TYPEID_PLAYER && i->spellProcEvent && i->spellProcEvent->cooldown)
cooldown = i->spellProcEvent->cooldown;
- uint32 procDebug = 0;
+ // This bool is needed till separate aura effect procs are still here
+ bool handled = false;
+ if (HandleAuraProc(pTarget, damage, i->aura, procSpell, procFlag, procExtra, cooldown, &handled))
+ {
+ sLog.outDebug("ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), Id);
+ takeCharges = true;
+ }
+ uint32 procDebug = 0;
+ if (!handled)
for (uint8 effIndex = 0; effIndex<MAX_SPELL_EFFECTS;++effIndex)
{
if (!(i->effMask & (1<<effIndex)))
@@ -13330,8 +13392,9 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit *pVictim, Aura * aura, SpellEntry co
return false;
}
// Aura added by spell can`t trogger from self (prevent drop charges/do triggers)
- // But except periodic triggers (can triggered from self)
- if(procSpell && procSpell->Id == spellProto->Id && !(spellProto->procFlags&PROC_FLAG_ON_TAKE_PERIODIC))
+ // But except periodic and kill triggers (can triggered from self)
+ if(procSpell && procSpell->Id == spellProto->Id
+ && !(spellProto->procFlags&(PROC_FLAG_ON_TAKE_PERIODIC | PROC_FLAG_KILL)))
return false;
// Check if current equipment allows aura to proc
@@ -13500,6 +13563,9 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss)
// Prevent killing unit twice (and giving reward from kill twice)
if (!pVictim->GetHealth())
return;
+
+ //sLog.outError("%u kill %u", GetEntry(), pVictim->GetEntry());
+
pVictim->SetHealth(0);
// find player: owner of controlled `this` or `this` itself maybe
@@ -13699,7 +13765,7 @@ void Unit::SetControlled(bool apply, UnitState state)
{
case UNIT_STAT_STUNNED: if(HasAuraType(SPELL_AURA_MOD_STUN)) return;
else SetStunned(false); break;
- case UNIT_STAT_ROOT: if(HasAuraType(SPELL_AURA_MOD_ROOT)) return;
+ case UNIT_STAT_ROOT: if(HasAuraType(SPELL_AURA_MOD_ROOT) || m_Vehicle) return;
else SetRooted(false); break;
case UNIT_STAT_CONFUSED:if(HasAuraType(SPELL_AURA_MOD_CONFUSE)) return;
else SetConfused(false); break;
@@ -13732,13 +13798,13 @@ void Unit::SetStunned(bool apply)
SetUInt64Value(UNIT_FIELD_TARGET, 0);
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
CastStop();
+ AddUnitMovementFlag(MOVEMENTFLAG_ROOT);
// Creature specific
if(GetTypeId() != TYPEID_PLAYER)
((Creature*)this)->StopMoving();
else
SetStandState(UNIT_STAND_STATE_STAND);
- // SetUnitMovementFlags(0); //Clear movement flags
WorldPacket data(SMSG_FORCE_MOVE_ROOT, 8);
data.append(GetPackGUID());
@@ -13761,21 +13827,20 @@ void Unit::SetStunned(bool apply)
data.append(GetPackGUID());
data << uint32(0);
SendMessageToSet(&data,true);
+
+ RemoveUnitMovementFlag(MOVEMENTFLAG_ROOT);
}
}
}
void Unit::SetRooted(bool apply)
{
- uint32 apply_stat = UNIT_STAT_ROOT;
if(apply)
{
- //SetFlag(UNIT_FIELD_FLAGS,(apply_stat<<16)); // probably wrong
+ AddUnitMovementFlag(MOVEMENTFLAG_ROOT);
if(GetTypeId() == TYPEID_PLAYER)
{
- //SetUnitMovementFlags(0);
-
WorldPacket data(SMSG_FORCE_MOVE_ROOT, 10);
data.append(GetPackGUID());
data << (uint32)2;
@@ -13786,8 +13851,6 @@ void Unit::SetRooted(bool apply)
}
else
{
- //RemoveFlag(UNIT_FIELD_FLAGS,(apply_stat<<16)); // probably wrong
-
if(!hasUnitState(UNIT_STAT_STUNNED)) // prevent allow move if have also stun effect
{
if(GetTypeId() == TYPEID_PLAYER)
@@ -13797,6 +13860,8 @@ void Unit::SetRooted(bool apply)
data << (uint32)2;
SendMessageToSet(&data,true);
}
+
+ RemoveUnitMovementFlag(MOVEMENTFLAG_ROOT);
}
}
}
@@ -13805,6 +13870,8 @@ void Unit::SetFeared(bool apply)
{
if(apply)
{
+ SetUInt64Value(UNIT_FIELD_TARGET, 0);
+
Unit *caster = NULL;
Unit::AuraEffectList const& fearAuras = GetAurasByType(SPELL_AURA_MOD_FEAR);
if(!fearAuras.empty())
@@ -13815,8 +13882,13 @@ void Unit::SetFeared(bool apply)
}
else
{
- if(isAlive() && GetMotionMaster()->GetCurrentMovementGeneratorType() == FLEEING_MOTION_TYPE)
- GetMotionMaster()->MovementExpired();
+ if(isAlive())
+ {
+ if(GetMotionMaster()->GetCurrentMovementGeneratorType() == FLEEING_MOTION_TYPE)
+ GetMotionMaster()->MovementExpired();
+ if(getVictim())
+ SetUInt64Value(UNIT_FIELD_TARGET, getVictim()->GetGUID());
+ }
}
if (GetTypeId() == TYPEID_PLAYER)
@@ -13827,12 +13899,18 @@ void Unit::SetConfused(bool apply)
{
if(apply)
{
+ SetUInt64Value(UNIT_FIELD_TARGET, 0);
GetMotionMaster()->MoveConfused();
}
else
{
- if(isAlive() && GetMotionMaster()->GetCurrentMovementGeneratorType() == CONFUSED_MOTION_TYPE)
- GetMotionMaster()->MovementExpired();
+ if(isAlive())
+ {
+ if(GetMotionMaster()->GetCurrentMovementGeneratorType() == CONFUSED_MOTION_TYPE)
+ GetMotionMaster()->MovementExpired();
+ if(getVictim())
+ SetUInt64Value(UNIT_FIELD_TARGET, getVictim()->GetGUID());
+ }
}
if(GetTypeId() == TYPEID_PLAYER)
@@ -13909,6 +13987,8 @@ void Unit::SetCharmedBy(Unit* charmer, CharmType type)
switch(type)
{
case CHARM_TYPE_VEHICLE:
+ SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_24);
+ ((Player*)charmer)->SetClientControl(this, 1);
((Player*)charmer)->SetViewpoint(this, true);
((Player*)charmer)->VehicleSpellInitialize();
break;
@@ -14009,6 +14089,7 @@ void Unit::RemoveCharmedBy(Unit *charmer)
switch(type)
{
case CHARM_TYPE_VEHICLE:
+ ((Player*)charmer)->SetClientControl(charmer, 1);
((Player*)charmer)->SetViewpoint(this, false);
break;
case CHARM_TYPE_POSSESS:
@@ -14472,16 +14553,14 @@ void Unit::EnterVehicle(Vehicle *vehicle, int8 seatId)
return;
}
- m_Vehicle->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_24);
- //m_Vehicle->setFaction(getFaction());
-
addUnitState(UNIT_STAT_ONVEHICLE);
+ SetControlled(true, UNIT_STAT_ROOT);
//movementInfo is set in AddPassenger
//packets are sent in AddPassenger
if(GetTypeId() == TYPEID_PLAYER)
{
- ((Player*)this)->SetClientControl(vehicle, 1);
+ //((Player*)this)->SetClientControl(vehicle, 1);
WorldPacket data(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0);
((Player*)this)->GetSession()->SendPacket(&data);
}
@@ -14511,17 +14590,18 @@ void Unit::ExitVehicle()
if(!m_Vehicle)
return;
- m_Vehicle->RemovePassenger(this);
+ //sLog.outError("exit vehicle");
- m_Vehicle->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_24);
- //setFaction((GetTeam() == ALLIANCE) ? GetCreatureInfo()->faction_A : GetCreatureInfo()->faction_H);
+ m_Vehicle->RemovePassenger(this);
// This should be done before dismiss, because there may be some aura removal
Vehicle *vehicle = m_Vehicle;
m_Vehicle = NULL;
clearUnitState(UNIT_STAT_ONVEHICLE);
- RemoveUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_FLY_UNK1);
+ SetControlled(false, UNIT_STAT_ROOT);
+
+ RemoveUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT);
m_movementInfo.t_x = 0;
m_movementInfo.t_y = 0;
m_movementInfo.t_z = 0;
@@ -14529,18 +14609,16 @@ void Unit::ExitVehicle()
m_movementInfo.t_time = 0;
m_movementInfo.t_seat = 0;
- //Send leave vehicle
+ //Send leave vehicle, not correct
if(GetTypeId() == TYPEID_PLAYER)
{
- ((Player*)this)->SetClientControl(this, 1);
+ //((Player*)this)->SetClientControl(this, 1);
((Player*)this)->SendTeleportAckMsg();
}
WorldPacket data;
BuildHeartBeatMsg(&data);
SendMessageToSet(&data, false);
- //SendMonsterMoveTransport(m_Vehicle, false);
-
if(vehicle->GetOwnerGUID() == GetGUID())
vehicle->Dismiss();
}
@@ -14593,7 +14671,7 @@ void Unit::BuildMovementPacket(ByteBuffer *data) const
}
// 0x02200000
- if((GetUnitMovementFlags() & (MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_FLYING2))
+ if((GetUnitMovementFlags() & (MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_FLYING))
|| (m_movementInfo.unk1 & 0x20))
*data << (float)m_movementInfo.s_pitch;
@@ -14611,14 +14689,20 @@ void Unit::BuildMovementPacket(ByteBuffer *data) const
// 0x04000000
if(GetUnitMovementFlags() & MOVEMENTFLAG_SPLINE)
*data << (float)m_movementInfo.u_unk1;
+
+ /*if(GetTypeId() == TYPEID_PLAYER)
+ {
+ sLog.outString("Send MovementInfo:");
+ OutMovementInfo();
+ }*/
}
void Unit::OutMovementInfo() const
{
- sLog.outString("MovementInfo: Flag %u, Unk1 %u, Time %u, Pos %f %f %f %f, Fall %u", m_movementInfo.flags, (uint32)m_movementInfo.unk1, m_movementInfo.time, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation(), m_movementInfo.fallTime);
+ sLog.outString("MovementInfo for %u: Flag %u, Unk1 %u, Time %u, Pos %f %f %f %f, Fall %u", GetEntry(), m_movementInfo.flags, (uint32)m_movementInfo.unk1, m_movementInfo.time, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation(), m_movementInfo.fallTime);
if(m_movementInfo.flags & MOVEMENTFLAG_ONTRANSPORT)
sLog.outString("Transport: GUID " UI64FMTD ", Pos %f %f %f %f, Time %u, Seat %d", m_movementInfo.t_guid, m_movementInfo.t_x, m_movementInfo.t_y, m_movementInfo.t_z, m_movementInfo.t_o, m_movementInfo.t_time, (int32)m_movementInfo.t_seat);
- if((m_movementInfo.flags & (MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_FLYING2)) || (m_movementInfo.unk1 & 0x20))
+ if((m_movementInfo.flags & (MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_FLYING)) || (m_movementInfo.unk1 & 0x20))
sLog.outString("Pitch: %f", m_movementInfo.s_pitch);
if(m_movementInfo.flags & MOVEMENTFLAG_JUMPING)
sLog.outString("Jump: speedz %f, sin %f, cos %f, speedxy %f", m_movementInfo.j_zspeed, m_movementInfo.j_sinAngle, m_movementInfo.j_cosAngle, m_movementInfo.j_xyspeed);
@@ -14626,6 +14710,20 @@ void Unit::OutMovementInfo() const
sLog.outString("Spline: %f", m_movementInfo.u_unk1);
}
+void Unit::SetFlying(bool apply)
+{
+ if(apply)
+ {
+ SetByteFlag(UNIT_FIELD_BYTES_1, 3, 0x02);
+ AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
+ }
+ else
+ {
+ RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, 0x02);
+ RemoveUnitMovementFlag(MOVEMENTFLAG_FLYING);
+ }
+}
+
void Unit::NearTeleportTo( float x, float y, float z, float orientation, bool casting /*= false*/ )
{
if(GetTypeId() == TYPEID_PLAYER)
diff --git a/src/game/Unit.h b/src/game/Unit.h
index 65492676175..00478a74acd 100644
--- a/src/game/Unit.h
+++ b/src/game/Unit.h
@@ -36,6 +36,8 @@
#include "DBCStructure.h"
#include <list>
+class Vehicle;
+
#define WORLD_TRIGGER 12999
enum SpellInterruptFlags
@@ -354,8 +356,8 @@ enum DamageTypeToSchool
enum AuraRemoveMode
{
- AURA_REMOVE_BY_DEFAULT=0,
- AURA_REMOVE_BY_STACK, // change stack, single aura remove,
+ AURA_REMOVE_BY_DEFAULT=0, // scripted remove, remove by stack with aura with different ids and sc aura remove
+ AURA_REMOVE_BY_STACK, // replace by aura with same id
AURA_REMOVE_BY_CANCEL,
AURA_REMOVE_BY_ENEMY_SPELL, // dispel and absorb aura destroy
AURA_REMOVE_BY_EXPIRE, // dispel and absorb aura destroy
@@ -640,21 +642,29 @@ enum MovementFlags
MOVEMENTFLAG_WALK_MODE = 0x00000100, // Walking
MOVEMENTFLAG_ONTRANSPORT = 0x00000200, // Used for flying on some creatures
MOVEMENTFLAG_LEVITATING = 0x00000400,
- MOVEMENTFLAG_FLY_UNK1 = 0x00000800,
+ MOVEMENTFLAG_ROOT = 0x00000800,
MOVEMENTFLAG_JUMPING = 0x00001000,
- MOVEMENTFLAG_UNK4 = 0x00002000,
+ MOVEMENTFLAG_FALL_DAMAGE = 0x00002000, // newZ < oldZ
MOVEMENTFLAG_FALLING = 0x00004000,
// 0x8000, 0x10000, 0x20000, 0x40000, 0x80000, 0x100000
MOVEMENTFLAG_SWIMMING = 0x00200000, // appears with fly flag also
- MOVEMENTFLAG_FLY_UP = 0x00400000, // press "space" when flying
+ MOVEMENTFLAG_ASCEND = 0x00400000, // press "space" when flying
MOVEMENTFLAG_CAN_FLY = 0x00800000,
- MOVEMENTFLAG_FLYING = 0x01000000, // fly land
- MOVEMENTFLAG_FLYING2 = 0x02000000, // fly hover
+ MOVEMENTFLAG_FLY_MODE = 0x01000000, // can fly
+ MOVEMENTFLAG_FLYING = 0x02000000, // hover
MOVEMENTFLAG_SPLINE = 0x04000000, // used for flight paths
MOVEMENTFLAG_SPLINE2 = 0x08000000, // used for flight paths
MOVEMENTFLAG_WATERWALKING = 0x10000000, // prevent unit from falling through water
MOVEMENTFLAG_SAFE_FALL = 0x20000000, // active rogue safe fall spell (passive)
- MOVEMENTFLAG_UNK3 = 0x40000000
+ MOVEMENTFLAG_HOVER = 0x40000000, // hover, cannot jump
+
+ MOVEMENTFLAG_MOVING =
+ MOVEMENTFLAG_FORWARD |MOVEMENTFLAG_BACKWARD |MOVEMENTFLAG_STRAFE_LEFT|MOVEMENTFLAG_STRAFE_RIGHT|
+ MOVEMENTFLAG_PITCH_UP|MOVEMENTFLAG_PITCH_DOWN|MOVEMENTFLAG_FALL_DAMAGE|
+ MOVEMENTFLAG_JUMPING |MOVEMENTFLAG_FALLING |MOVEMENTFLAG_ASCEND |
+ MOVEMENTFLAG_SPLINE,
+ MOVEMENTFLAG_TURNING =
+ MOVEMENTFLAG_LEFT | MOVEMENTFLAG_RIGHT,
};
/*
@@ -1311,7 +1321,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
void SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint32 MoveFlags, uint32 time, float speedZ, Player *player = NULL);
//void SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint8 type, uint32 MovementFlags, uint32 Time, Player* player = NULL);
void SendMonsterMoveByPath(Path const& path, uint32 start, uint32 end);
- void SendMonsterMoveTransport(Vehicle *vehicle, bool apply);
+ void SendMonsterMoveTransport(Vehicle *vehicle);
void SendMonsterMoveWithSpeed(float x, float y, float z, uint32 transitTime = 0, Player* player = NULL);
void SendMonsterMoveWithSpeedToCurrentDestination(Player* player = NULL);
void SendMovementFlagUpdate();
@@ -1765,6 +1775,12 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
void SetTransport(Transport * t) { m_transport = t; }
void BuildMovementPacket(ByteBuffer *data) const;
+
+ bool isMoving() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_MOVING); }
+ bool isTurning() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_TURNING); }
+ bool canFly() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_FLY_MODE); }
+ bool IsFlying() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_FLYING); }
+ void SetFlying(bool apply);
protected:
explicit Unit ();
@@ -1834,6 +1850,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
bool HandleDummyAuraProc( Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
bool HandleObsModEnergyAuraProc( Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
bool HandleModDamagePctTakenAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
+ bool HandleAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const * procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown, bool * handled);
bool HandleHasteAuraProc( Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
bool HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
bool HandleOverrideClassScriptAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellEntry const *procSpell, uint32 cooldown);
diff --git a/src/game/Vehicle.cpp b/src/game/Vehicle.cpp
index 2271bcc3c4a..0464c52705e 100644
--- a/src/game/Vehicle.cpp
+++ b/src/game/Vehicle.cpp
@@ -44,8 +44,7 @@ void Vehicle::AddToWorld()
if(m_zoneScript)
m_zoneScript->OnCreatureCreate(this, true);
ObjectAccessor::Instance().AddObject(this);
- Unit::AddToWorld();
- AIM_Initialize();
+
switch(GetEntry())
{
//case 27850:InstallAccessory(27905,1);break;
@@ -66,11 +65,28 @@ void Vehicle::AddToWorld()
InstallAccessory(33142,2);
break;
}
- if(!GetMaxPower(POWER_MANA)) // m_vehicleInfo->36
+ for(uint32 i = 0; i < MAX_SPELL_VEHICLE; ++i)
{
- setPowerType(POWER_ENERGY);
- SetMaxPower(POWER_ENERGY, 100);
+ if(!m_spells[i])
+ continue;
+
+ SpellEntry const *spellInfo = sSpellStore.LookupEntry(m_spells[i]);
+ if(!spellInfo)
+ continue;
+
+ if(spellInfo->powerType == POWER_MANA)
+ break;
+
+ if(spellInfo->powerType == POWER_ENERGY)
+ {
+ setPowerType(POWER_ENERGY);
+ SetMaxPower(POWER_ENERGY, 100);
+ break;
+ }
}
+
+ Unit::AddToWorld();
+ AIM_Initialize();
}
}
@@ -114,7 +130,7 @@ void Vehicle::Update(uint32 diff)
{
Creature::Update(diff);
//310
- if(getPowerType() == POWER_ENERGY)
+ if(getPowerType() == POWER_ENERGY) // m_vehicleInfo->36
ModifyPower(POWER_ENERGY, 100);
}
@@ -224,6 +240,8 @@ void Vehicle::InstallAccessory(uint32 entry, int8 seatId)
accessory->m_Vehicle = this;
AddPassenger(accessory, seatId);
+ // This is not good, we have to send update twice
+ accessory->SendMovementFlagUpdate();
}
bool Vehicle::AddPassenger(Unit *unit, int8 seatId)
@@ -266,7 +284,7 @@ bool Vehicle::AddPassenger(Unit *unit, int8 seatId)
//SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_24);
- unit->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_FLY_UNK1);
+ unit->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT);
VehicleSeatEntry const *veSeat = seat->second.seatInfo;
unit->m_movementInfo.t_x = veSeat->m_attachmentOffsetX;
unit->m_movementInfo.t_y = veSeat->m_attachmentOffsetY;
@@ -278,16 +296,12 @@ bool Vehicle::AddPassenger(Unit *unit, int8 seatId)
if(unit->GetTypeId() == TYPEID_PLAYER && seat->first == 0 && seat->second.seatInfo->IsUsable()) // not right
SetCharmedBy(unit, CHARM_TYPE_VEHICLE);
- if(false)
- {
- unit->SendMonsterMoveTransport(this, true);
- }
- else
- {
- if(unit->GetTypeId() == TYPEID_PLAYER)
- ((Player*)unit)->SendTeleportAckMsg();
- unit->SendMovementFlagUpdate();
- }
+ if(IsInWorld())
+ unit->SendMonsterMoveTransport(this);
+
+ //if(unit->GetTypeId() == TYPEID_PLAYER)
+ // ((Player*)unit)->SendTeleportAckMsg();
+ //unit->SendMovementFlagUpdate();
return true;
}
diff --git a/src/game/Vehicle.h b/src/game/Vehicle.h
index e0473c45560..309e8a5f02c 100644
--- a/src/game/Vehicle.h
+++ b/src/game/Vehicle.h
@@ -35,7 +35,7 @@ struct VehicleSeat
typedef std::map<int8, VehicleSeat> SeatMap;
-class Vehicle : public Creature
+class TRINITY_DLL_SPEC Vehicle : public Creature
{
public:
explicit Vehicle();
diff --git a/src/game/WaypointMovementGenerator.cpp b/src/game/WaypointMovementGenerator.cpp
index 49d38799fe3..d256b01bd5d 100644
--- a/src/game/WaypointMovementGenerator.cpp
+++ b/src/game/WaypointMovementGenerator.cpp
@@ -86,7 +86,7 @@ void WaypointMovementGenerator<Creature>::InitTraveller(Creature &unit, const Wa
unit.SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
if(unit.canFly())
- unit.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
+ unit.AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
unit.addUnitState(UNIT_STAT_ROAMING);
}
diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp
index 6c2b9cd9932..91d1e6e018a 100644
--- a/src/game/WorldSession.cpp
+++ b/src/game/WorldSession.cpp
@@ -654,7 +654,7 @@ void WorldSession::ReadMovementInfo(WorldPacket &data, MovementInfo *mi)
data >> mi->t_seat;
}
- if((mi->flags & (MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_FLYING2)) || (mi->unk1 & 0x20))
+ if((mi->flags & (MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_FLYING)) || (mi->unk1 & 0x20))
{
CHECK_PACKET_SIZE(data, data.rpos()+4);
data >> mi->s_pitch;