diff options
Diffstat (limited to 'src')
15 files changed, 875 insertions, 23 deletions
diff --git a/src/bindings/scripts/VC71/71ScriptDev2.vcproj b/src/bindings/scripts/VC71/71ScriptDev2.vcproj index b8df85fab45..701d2db3673 100644 --- a/src/bindings/scripts/VC71/71ScriptDev2.vcproj +++ b/src/bindings/scripts/VC71/71ScriptDev2.vcproj @@ -1875,7 +1875,6 @@ RelativePath="..\scripts\zone\caverns_of_time\dark_portal\instance_dark_portal.cpp" > </File> - </Filter> <Filter Name="Battle for Mt. Hyjal" @@ -1936,9 +1935,6 @@ > </File> </Filter> - <Filter - Name="Culling of Stratholme"> - </Filter> </Filter> <Filter Name="Silvermoon City" @@ -2008,12 +2004,63 @@ </Filter> <Filter Name="Azjol-Nerub"> - <Filter - Name="Ahn'kahet"> - </Filter> - <Filter - Name="Azjol-Nerub"> - </Filter> + <Filter + Name="Ahn'kahet" + > + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_amanitar.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_elder_nadox.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_herald_volazj.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_jedoga_shadowseeker.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_prince_taldaram.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\def_ahnkahet.h" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\instance_ahnkahet.cpp" + > + </File> + </Filter> + <Filter + Name="Azjol-Nerub" + > + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_anubarak.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_hadronox.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_krikthir_the_gatewatcher.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\def_azjol_nerub.h" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\instance_azjol_nerub.cpp" + > + </File> + </Filter> + </Filter> <Filter Name="Drak'Tharon Keep"> diff --git a/src/bindings/scripts/VC80/80ScriptDev2.vcproj b/src/bindings/scripts/VC80/80ScriptDev2.vcproj index 2ebc38618cc..b7311a6debb 100644 --- a/src/bindings/scripts/VC80/80ScriptDev2.vcproj +++ b/src/bindings/scripts/VC80/80ScriptDev2.vcproj @@ -1114,12 +1114,63 @@ </Filter> <Filter Name="Azjol-Nerub"> - <Filter - Name="Ahn'kahet"> - </Filter> - <Filter - Name="Azjol-Nerub"> - </Filter> + <Filter + Name="Ahn'kahet" + > + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_amanitar.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_elder_nadox.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_herald_volazj.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_jedoga_shadowseeker.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_prince_taldaram.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\def_ahnkahet.h" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\instance_ahnkahet.cpp" + > + </File> + </Filter> + <Filter + Name="Azjol-Nerub" + > + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_anubarak.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_hadronox.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_krikthir_the_gatewatcher.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\def_azjol_nerub.h" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\instance_azjol_nerub.cpp" + > + </File> + </Filter> + </Filter> <Filter Name="Drak'Tharon Keep"> @@ -2195,9 +2246,6 @@ </File> </Filter> <Filter - Name="Culling of Stratholme"> - </Filter> - <Filter Name="Culling of Stratholme" > </Filter> diff --git a/src/bindings/scripts/VC90/90ScriptDev2.vcproj b/src/bindings/scripts/VC90/90ScriptDev2.vcproj index 232a1ff7ca6..bd0d60e6463 100644 --- a/src/bindings/scripts/VC90/90ScriptDev2.vcproj +++ b/src/bindings/scripts/VC90/90ScriptDev2.vcproj @@ -801,10 +801,58 @@ <Filter Name="Ahn'kahet" > + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_amanitar.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_elder_nadox.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_herald_volazj.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_jedoga_shadowseeker.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_prince_taldaram.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\def_ahnkahet.h" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\instance_ahnkahet.cpp" + > + </File> </Filter> <Filter Name="Azjol-Nerub" > + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_anubarak.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_hadronox.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_krikthir_the_gatewatcher.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\def_azjol_nerub.h" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\instance_azjol_nerub.cpp" + > + </File> </Filter> </Filter> <Filter @@ -2219,10 +2267,6 @@ > </Filter> <Filter - Name="Culling of Stratholme" - > - </Filter> - <Filter Name="Old Hillsbrad" > <File diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_amanitar.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_amanitar.cpp new file mode 100644 index 00000000000..14480a8b725 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_amanitar.cpp @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * 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: boss_amanitar +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Ahn'kahet +EndScriptData */ + +#include "precompiled.h" +#include "def_ahnkahet.h" diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_elder_nadox.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_elder_nadox.cpp new file mode 100644 index 00000000000..059500ad593 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_elder_nadox.cpp @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * 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: boss_elder_nadox +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Ahn'kahet +EndScriptData */ + +#include "precompiled.h" +#include "def_ahnkahet.h" + +#define SPELL_BROOD_PLAGUE 56130 +#define H_SPELL_BROOD_PLAGUE 59467 +#define SPELL_BROOD_RAGE 59465 + +#define MOB_AHNKAHAR_SWARMER 30178 +#define SPELL_SUMMON_SWARMERS 56119//2x 30178 + +#define MOB_AHNKAHAR_SWARMER 30178 +#define SPELL_SUMMON_SWARM_GUARD 56120//1x 30176 +#define SPELL_DEADLY_POISON 56145// Proc trigger +#define H_SPELL_DEADLY_POISON 59479// Proc trigger +#define SPELL_GUARDIAN_AURA 56151 diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_herald_volazj.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_herald_volazj.cpp new file mode 100644 index 00000000000..389e828c881 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_herald_volazj.cpp @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * 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: boss_herald_volazj +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Ahn'kahet +EndScriptData */ + +#include "precompiled.h" +#include "def_ahnkahet.h" diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_jedoga_shadowseeker.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_jedoga_shadowseeker.cpp new file mode 100644 index 00000000000..efcd811641f --- /dev/null +++ b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_jedoga_shadowseeker.cpp @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * 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: boss_jedoga_shadowseeker +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Ahn'kahet +EndScriptData */ + +#include "precompiled.h" +#include "def_ahnkahet.h" + +#define SPELL_CYCLONE_STRIKE 56855 +#define H_SPELL_CYCLONE_STRIKE 60030//kein unterschied zu 56855 außer das 60030 1,5sec cast ist +#define SPELL_LIGHTNING_BOLT 56891 +#define H_SPELL_LIGHTNING_BOLT 60032 +#define SPELL_THUNDERSHOCK 56926//AOE works +#define H_SPELL_THUNDERSHOCK 60029//AOE works + +#define SPELL_GIFT_OF_THE_HERALD 56219//triggert if sucessfull sacreficed diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_prince_taldaram.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_prince_taldaram.cpp new file mode 100644 index 00000000000..c03fe85a7f1 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_prince_taldaram.cpp @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * 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: boss_prince_taldaram +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Ahn'kahet +EndScriptData */ + +#include "precompiled.h" +#include "def_ahnkahet.h" + +#define SPELL_BLOODTHIRST 55968 //Trigger Spell + add aura +#define SPELL_CONJURE_FLAME_SPHERE 55931 + +#define SPELL_FLAME_SPHERE_SUMMON_1 55895// 1x 30106 +#define H_SPELL_FLAME_SPHERE_SUMMON_1 59511// 1x 31686 +#define H_SPELL_FLAME_SPHERE_SUMMON_2 59512// 1x 31687 +#define SPELL_FLAME_SPHERE_SPAWN_EFFEKT 55891 +#define SPELL_FLAME_SPHERE_VISUAL 55928 +#define SPELL_FLAME_SPHERE_PERIODIC 55926 +#define H_SPELL_FLAME_SPHERE_PERIODIC 59508 +#define SPELL_FLAME_SPHERE_DEATH_EFFEKT 55947 + +#define SPELL_EMBRACE_OF_THE_VAMPYR 55959 +#define H_SPELL_EMBRACE_OF_THE_VAMPYR 59513 + +#define SPELL_VANISH 55964 diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/def_ahnkahet.h b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/def_ahnkahet.h new file mode 100644 index 00000000000..97c0db55d72 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/def_ahnkahet.h @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * 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 + */ + +#ifndef DEF_AHNKAHET_H +#define DEF_AHNKAHET_H + +#define DATA_ELDER_NADOX 1 +#define DATA_PRINCE_TALDARAM 2 +#define DATA_JEDOGA_SHADOWSEEKER 3 +#define DATA_HERALD_VOLAZJ 4 +#define DATA_AMANITAR 5 + +#define DATA_ELDER_NADOX_EVENT 6 +#define DATA_PRINCE_TALDARAM_EVENT 7 +#define DATA_JEDOGA_SHADOWSEEKER_EVENT 8 +#define DATA_HERALD_VOLAZJ_EVENT 9 +#define DATA_AMANITAR_EVENT 10 +#endif diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/instance_ahnkahet.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/instance_ahnkahet.cpp new file mode 100644 index 00000000000..3da7f28d95f --- /dev/null +++ b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/instance_ahnkahet.cpp @@ -0,0 +1,194 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * 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: Instance_Azjol_Nerub +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Azjol Nerub +EndScriptData */ + +#include "precompiled.h" +#include "def_ahnkahet.h" + +#define ENCOUNTERS 5 + +/* Ahn'kahet encounters: +0 - Elder Nadox +1 - Prince Taldaram +2 - Jedoga Shadowseeker +3 - Herald Volazj +4 - Amanitar (Heroic only) +*/ + +struct TRINITY_DLL_DECL instance_ahnkahet : public ScriptedInstance +{ + instance_ahnkahet(Map *Map) : ScriptedInstance(Map) {Initialize();}; + + uint64 Elder_Nadox; + uint64 Prince_Taldaram; + uint64 Jedoga_Shadowseeker; + uint64 Herald_Volazj; + uint64 Amanitar; + + uint32 Encounters[ENCOUNTERS]; + + void Initialize() + { + Elder_Nadox =0; + Prince_Taldaram =0; + Jedoga_Shadowseeker =0; + Herald_Volazj =0; + Amanitar =0; + + for(uint8 i = 0; i < ENCOUNTERS; ++i) + Encounters[i] = NOT_STARTED; + } + + bool IsEncounterInProgress() const + { + for(uint8 i = 0; i < ENCOUNTERS; ++i) + if(Encounters[i] == IN_PROGRESS) return true; + + return false; + } + + + void OnCreatureCreate(Creature *creature, uint32 creature_entry) + { + switch(creature_entry) + { + case 29309: Elder_Nadox = creature->GetGUID(); break; + case 29308: Prince_Taldaram = creature->GetGUID(); break; + case 29310: Jedoga_Shadowseeker = creature->GetGUID(); break; + case 29311: Herald_Volazj = creature->GetGUID(); break; + case 30258: Amanitar = creature->GetGUID(); break; + } + } + + uint64 GetData64(uint32 identifier) + { + switch(identifier) + { + case DATA_ELDER_NADOX: return Elder_Nadox; + case DATA_PRINCE_TALDARAM: return Prince_Taldaram; + case DATA_JEDOGA_SHADOWSEEKER: return Jedoga_Shadowseeker; + case DATA_HERALD_VOLAZJ: return Herald_Volazj; + case DATA_AMANITAR: return Amanitar; + } + return 0; + } + + void SetData(uint32 type, uint32 data) + { + switch(type) + { + case DATA_ELDER_NADOX_EVENT: + Encounters[0] = data;break; + case DATA_PRINCE_TALDARAM_EVENT: + Encounters[1] = data; break; + case DATA_JEDOGA_SHADOWSEEKER_EVENT: + Encounters[2] = data; break; + case DATA_HERALD_VOLAZJ: + Encounters[3] = data; break; + case DATA_AMANITAR: + Encounters[4] = data; break; + } + + if (data == DONE) + { + SaveToDB(); + } + } + + uint32 GetData(uint32 type) + { + switch(type) + { + case DATA_ELDER_NADOX_EVENT: return Encounters[0]; + case DATA_PRINCE_TALDARAM_EVENT: return Encounters[1]; + case DATA_JEDOGA_SHADOWSEEKER_EVENT: return Encounters[2]; + case DATA_HERALD_VOLAZJ: return Encounters[3]; + case DATA_AMANITAR: return Encounters[4]; + } + return 0; + } + + const char* Save() + { + OUT_SAVE_INST_DATA; + + std::string str_data; + + std::ostringstream saveStream; + saveStream << "A K " << Encounters[0] << " " << Encounters[1] << " " + << Encounters[2] << Encounters[3] << Encounters[4]; + + str_data = saveStream.str(); + + OUT_SAVE_INST_DATA_COMPLETE; + return str_data.c_str(); + } + + void Load(const char* in) + { + if (!in) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(in); + + char dataHead1, dataHead2; + uint16 data0,data1,data2,data3,data4; + + std::istringstream loadStream(in); + loadStream >> dataHead1 >> dataHead2 >> data0 >> data1 >> data2 >> data3 >> data4; + + if( dataHead1 == 'A' && dataHead2 == 'K') + { + Encounters[0] = data0; + Encounters[1] = data1; + Encounters[2] = data2; + Encounters[3] = data3; + Encounters[4] = data4; + + for(uint8 i = 0; i < ENCOUNTERS; ++i) + if (Encounters[i] == IN_PROGRESS) + Encounters[i] = NOT_STARTED; + + }else OUT_LOAD_INST_DATA_FAIL; + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_ahnkahet(Map* map) +{ + return new instance_ahnkahet(map); +} + +void AddSC_instance_ahnkahet() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_ahnkahet"; + newscript->GetInstanceData = &GetInstanceData_instance_ahnkahet; + newscript->RegisterSelf(); +} diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/boss_anubarak.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/boss_anubarak.cpp new file mode 100644 index 00000000000..f9922581733 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/boss_anubarak.cpp @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * 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: boss_anubarak +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Azjol Nerub +EndScriptData */ + +#include "precompiled.h" +#include "def_azjol_nerub.h" diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/boss_hadronox.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/boss_hadronox.cpp new file mode 100644 index 00000000000..72bcb708429 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/boss_hadronox.cpp @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * 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: boss_hadronox +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Azjol Nerub +EndScriptData */ + +#include "precompiled.h" +#include "def_azjol_nerub.h" + +#define SPELL_WEB_FRONT_DOORS 53177//dummy + +#define SPELL_ACID_CLOUD 53400 +#define H_SPELL_ACID_CLOUD 59419 +#define SPELL_LEECH_POISON 53030 +#define H_SPELL_LEECH_POISON 59417 +#define SPELL_LEECH_POISON_DEADTRIGGER 53800//heal 10% heroic und normal +#define SPELL_PIECE_ARMOR 53418 +#define SPELL_WEB_GRAB 53406 +#define H_SPELL_WEB_GRAB 59420
\ No newline at end of file diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/boss_krikthir_the_gatewatcher.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/boss_krikthir_the_gatewatcher.cpp new file mode 100644 index 00000000000..27f4d3070fc --- /dev/null +++ b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/boss_krikthir_the_gatewatcher.cpp @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * 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: boss_krikthir_the_gatewatcher +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Azjol Nerub +EndScriptData */ + +#include "precompiled.h" +#include "def_azjol_nerub.h" + +#define SPELL_MIND_FLAY 52586 +#define H_SPELL_MIND_FLAY 59367 +#define SPELL_CURSE_OF_FATIGUE 52592 +#define H_SPELL_CURSE_OF_FATIGUE 59368 +#define SPELL_FRENZY 28747 + +#define MOB_SKITTERING_SWARMER 28735 +#define MOB_SKITTERING_SWARMER_CONTROLLER 32593 +#define SPELL_SUMMON_SKITTERING_SWARMER 52438//AOE Effekt 140 +#define SPELL_SUMMON_SKITTERING_SWARMER 52439//Summon 3x 28735
\ No newline at end of file diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/def_azjol_nerub.h b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/def_azjol_nerub.h new file mode 100644 index 00000000000..9e319e8fde0 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/def_azjol_nerub.h @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * 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 + */ + +#ifndef DEF_AZJOL_NERUB_H +#define DEF_AZJOL_NERUB_H + +#define DATA_KRIKTHIR_THE_GATEWATCHER 1 +#define DATA_HADRONOX 2 +#define DATA_ANUBARAK 3 + +#define DATA_KRIKTHIR_THE_GATEWATCHER_EVENT 4 +#define DATA_HADRONOX_EVENT 5 +#define DATA_ANUBARAK_EVENT 6 +#endif diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/instance_azjol_nerub.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/instance_azjol_nerub.cpp new file mode 100644 index 00000000000..30acaa0c842 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/instance_azjol_nerub.cpp @@ -0,0 +1,180 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * 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: Instance_Azjol_Nerub +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Azjol Nerub +EndScriptData */ + +#include "precompiled.h" +#include "def_azjol_nerub.h" + +#define ENCOUNTERS 3 + +/* Azjol Nerub encounters: +0 - Krik'thir the Gatewatcher +1 - Hadronox +2 - Anub'arak +*/ + +struct TRINITY_DLL_DECL instance_azjol_nerub : public ScriptedInstance +{ + instance_azjol_nerub(Map *Map) : ScriptedInstance(Map) {Initialize();}; + + uint64 Krikthir; + uint64 Hadronox; + uint64 Anubarak; + + uint32 Encounters[ENCOUNTERS]; + + void Initialize() + { + Krikthir = 0; + Hadronox = 0; + Anubarak =0; + + + for(uint8 i = 0; i < ENCOUNTERS; ++i) + Encounters[i] = NOT_STARTED; + } + + bool IsEncounterInProgress() const + { + for(uint8 i = 0; i < ENCOUNTERS; ++i) + if(Encounters[i] == IN_PROGRESS) return true; + + return false; + } + + + void OnCreatureCreate(Creature *creature, uint32 creature_entry) + { + switch(creature_entry) + { + case 28684: Krikthir = creature->GetGUID(); break; + case 28921: Hadronox = creature->GetGUID(); break; + case 29120: Anubarak = creature->GetGUID(); break; + + } + } + + uint64 GetData64(uint32 identifier) + { + switch(identifier) + { + case DATA_KRIKTHIR_THE_GATEWATCHER: return Krikthir; + case DATA_HADRONOX: return Hadronox; + case DATA_ANUBARAK: return Anubarak; + } + + return 0; + } + + void SetData(uint32 type, uint32 data) + { + switch(type) + { + case DATA_KRIKTHIR_THE_GATEWATCHER_EVENT: + Encounters[0] = data;break; + case DATA_HADRONOX_EVENT: + Encounters[1] = data; break; + case DATA_ANUBARAK_EVENT: + Encounters[2] = data; break; + } + + if (data == DONE) + { + SaveToDB(); + } + } + + uint32 GetData(uint32 type) + { + switch(type) + { + case DATA_KRIKTHIR_THE_GATEWATCHER_EVENT: return Encounters[0]; + case DATA_HADRONOX_EVENT: return Encounters[1]; + case DATA_ANUBARAK_EVENT: return Encounters[2]; + } + + return 0; + } + + const char* Save() + { + OUT_SAVE_INST_DATA; + + std::string str_data; + + std::ostringstream saveStream; + saveStream << "A N " << Encounters[0] << " " << Encounters[1] << " " + << Encounters[2]; + + str_data = saveStream.str(); + + OUT_SAVE_INST_DATA_COMPLETE; + return str_data.c_str(); + } + + void Load(const char* in) + { + if (!in) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(in); + + char dataHead1, dataHead2; + uint16 data0,data1,data2; + + std::istringstream loadStream(in); + loadStream >> dataHead1 >> dataHead2 >> data0 >> data1 >> data2; + + if( dataHead1 == 'A' && dataHead2 == 'N') + { + Encounters[0] = data0; + Encounters[1] = data1; + Encounters[2] = data2; + + for(uint8 i = 0; i < ENCOUNTERS; ++i) + if (Encounters[i] == IN_PROGRESS) + Encounters[i] = NOT_STARTED; + + }else OUT_LOAD_INST_DATA_FAIL; + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_azjol_nerub(Map* map) +{ + return new instance_azjol_nerub(map); +} + +void AddSC_instance_azjol_nerub() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_azjol_nerub"; + newscript->GetInstanceData = &GetInstanceData_instance_azjol_nerub; + newscript->RegisterSelf(); +} |