diff options
author | Blaymoira <none@none> | 2009-01-18 21:43:45 +0100 |
---|---|---|
committer | Blaymoira <none@none> | 2009-01-18 21:43:45 +0100 |
commit | 9a2abe9000980aba9c9b8c4a4fee8eb10c032b1b (patch) | |
tree | ce43bf13b4e746d597994af261ba525d0a3f317b | |
parent | ccd4815d841f207fb91dd54e89e570b37a494f41 (diff) |
*Add a hack for tidewalker script - by Bagsac
--HG--
branch : trunk
-rw-r--r-- | src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp | 62 |
1 files changed, 25 insertions, 37 deletions
diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp index e3a6f226dcd..40cf1b6a615 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp @@ -65,7 +65,7 @@ EndScriptData */ #define SPELL_SUMMON_WATER_GLOBULE_3 37860 #define SPELL_SUMMON_WATER_GLOBULE_4 37861 -#define SPELL_SUMMON_MURLOC_A6 39813 +/*#define SPELL_SUMMON_MURLOC_A6 39813 #define SPELL_SUMMON_MURLOC_A7 39814 #define SPELL_SUMMON_MURLOC_A8 39815 #define SPELL_SUMMON_MURLOC_A9 39816 @@ -75,7 +75,21 @@ EndScriptData */ #define SPELL_SUMMON_MURLOC_B7 39819 #define SPELL_SUMMON_MURLOC_B8 39820 #define SPELL_SUMMON_MURLOC_B9 39821 -#define SPELL_SUMMON_MURLOC_B10 39822 +#define SPELL_SUMMON_MURLOC_B10 39822*/ + +float MurlocCords[10][5] = +{ + {21920, 424.36, -715.4, -7.14, 0.124}, + {21920, 425.13, -719.3, -7.14, 0.124}, + {21920, 425.05, -724.23, -7.14, 0.124}, + {21920, 424.91, -728.68, -7.14, 0.124}, + {21920, 424.84, -732.18, -7.14, 0.124}, + {21920, 321.05, -734.2, -13.15, 0.124}, + {21920, 321.05, -729.4, -13.15, 0.124}, + {21920, 321.05, -724.03, -13.15, 0.124}, + {21920, 321.05, -718.73, -13.15, 0.124}, + {21920, 321.05, -714.24, -13.15, 0.124} +}; //Creatures #define WATER_GLOBULE 21913 @@ -97,7 +111,6 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI uint32 WateryGrave_Timer; uint32 Earthquake_Timer; uint32 WateryGlobules_Timer; - uint32 SummonSpell; uint32 globulespell[4]; int8 Playercount; int8 counter; @@ -190,41 +203,16 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI case 1: DoScriptText(SAY_SUMMON2, m_creature); break; } - Unit* target; - using std::set; - set<int> SummonList; - set<int>::iterator itr; - - target = SelectUnit(SELECT_TARGET_RANDOM, 0, 50, true); - m_creature->CastSpell(target, SummonSpell, false); - SummonSpell++; - - for (int8 i = 0; i < 9; i++) //bad hack - { //instead of casting 9 spell in one update - counter = 0; // selecet 9 players which cast our spells - do{target = SelectUnit(SELECT_TARGET_RANDOM, 0, 50, true); //check if player is already selected - if(counter > Playercount) - break; - if(target) itr = SummonList.find(target->GetGUID()); - counter++; - } while (itr != SummonList.end()); - - if(target){ - SummonList.insert(target->GetGUID()); - target->CastSpell(target, SummonSpell, false); //player cast on himself (this works) - } - SummonSpell++; - - if(SummonSpell > SPELL_SUMMON_MURLOC_B10) //reset all variables for earthquake - { - SummonSpell = SPELL_SUMMON_MURLOC_A6; - SummonList.clear(); - DoScriptText(EMOTE_EARTHQUAKE, m_creature); - Earthquake = false; - Earthquake_Timer = 40000+rand()%5000; - } + for(uint8 i = 0; i < 10; i++) + { + Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0); + Creature* Murloc = m_creature->SummonCreature(MurlocCords[i][0],MurlocCords[i][1],MurlocCords[i][2],MurlocCords[i][3],MurlocCords[i][4], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + Murloc->AI()->AttackStart(target); } - } + DoScriptText(EMOTE_EARTHQUAKE, m_creature); + Earthquake = false; + Earthquake_Timer = 40000+rand()%5000; + } }else Earthquake_Timer -= diff; //TidalWave_Timer |