From eaa7d5eef15bb83b4e1ad8c346ac70623c04a0c6 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sun, 18 Jan 2009 10:50:24 +0100 Subject: *Corrected target switching in Void Reaver script - by streetrat *Updated Tidewalker script - by Bagsac *Updated Nexusprince Shaffar script - by Iskander --HG-- branch : trunk --- .../mana_tombs/boss_nexusprince_shaffar.cpp | 9 ++ .../scripts/scripts/zone/barrens/the_barrens.cpp | 2 +- .../serpent_shrine/boss_morogrim_tidewalker.cpp | 133 ++++++++++++++------- .../zone/tempest_keep/the_eye/boss_void_reaver.cpp | 4 +- 4 files changed, 102 insertions(+), 46 deletions(-) (limited to 'src') diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp b/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp index 9b56561e16b..440f233bccf 100644 --- a/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp +++ b/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp @@ -50,6 +50,7 @@ EndContentData */ #define SPELL_ETHEREAL_BEACON_VISUAL 32368 #define ENTRY_BEACON 18431 +#define ENTRY_SHAFFAR 18344 struct TRINITY_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI { @@ -204,6 +205,7 @@ struct TRINITY_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI { HeroicMode = m_creature->GetMap()->IsHeroic(); Reset(); + CanEvade = false; } bool HeroicMode; @@ -239,6 +241,13 @@ struct TRINITY_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI { DoCast(m_creature->getVictim(),SPELL_ARCANE_BOLT); ArcaneBolt_Timer = 2000 + rand()%2500; + Unit *shaffar = FindCreature(ENTRY_SHAFFAR, 100); + if(!shaffar || shaffar->isDead()) + { + m_creature->SetVisibility(VISIBILITY_OFF); + m_creature->SetLootRecipient(NULL); + m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } }else ArcaneBolt_Timer -= diff; if( Apprentice_Timer < diff ) diff --git a/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp b/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp index 879076e1067..751b4d995f1 100644 --- a/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp +++ b/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp @@ -451,7 +451,7 @@ bool QuestAccept_npc_wizzlecrank_shredder(Player* player, Creature* creature, Qu if (quest->GetQuestId() == QUEST_ESCAPE) { ((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID()); - creature->setFaction(35); + creature->setFaction(113); } return true; } 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 b7a7e666b92..e3a6f226dcd 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 @@ -91,11 +91,16 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI } ScriptedInstance* pInstance; + Map::PlayerList const *PlayerList; uint32 TidalWave_Timer; uint32 WateryGrave_Timer; uint32 Earthquake_Timer; uint32 WateryGlobules_Timer; + uint32 SummonSpell; + uint32 globulespell[4]; + int8 Playercount; + int8 counter; bool Earthquake; bool Phase2; @@ -106,6 +111,10 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI WateryGrave_Timer = 30000; Earthquake_Timer = 40000; WateryGlobules_Timer = 0; + globulespell[0] = SPELL_SUMMON_WATER_GLOBULE_1; + globulespell[1] = SPELL_SUMMON_WATER_GLOBULE_2; + globulespell[2] = SPELL_SUMMON_WATER_GLOBULE_3; + globulespell[3] = SPELL_SUMMON_WATER_GLOBULE_4; Earthquake = false; Phase2 = false; @@ -126,9 +135,9 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI { switch(rand()%3) { - case 0: DoScriptText(SAY_SLAY1, m_creature); break; - case 1: DoScriptText(SAY_SLAY2, m_creature); break; - case 2: DoScriptText(SAY_SLAY3, m_creature); break; + case 0: DoScriptText(SAY_SLAY1, m_creature); break; + case 1: DoScriptText(SAY_SLAY2, m_creature); break; + case 2: DoScriptText(SAY_SLAY3, m_creature); break; } } @@ -139,17 +148,22 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI if (pInstance) pInstance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, NOT_STARTED); } - - void Aggro(Unit *who) { StartEvent(); } - - void ApplyWateryGrave(Unit *player, uint8 target) + + void Aggro(Unit *who) + { + PlayerList = &((InstanceMap*)m_creature->GetMap())->GetPlayers(); + Playercount = PlayerList->getSize(); + StartEvent(); + } + + void ApplyWateryGrave(Unit *player, uint8 i) { - switch(target) + switch(i) { - case 0: DoCast(player, SPELL_WATERY_GRAVE_1); break; - case 1: DoCast(player, SPELL_WATERY_GRAVE_2); break; - case 2: DoCast(player, SPELL_WATERY_GRAVE_3); break; - case 3: DoCast(player, SPELL_WATERY_GRAVE_4); break; + case 0: player->CastSpell(player, SPELL_WATERY_GRAVE_1, true); break; + case 1: player->CastSpell(player, SPELL_WATERY_GRAVE_2, true); break; + case 2: player->CastSpell(player, SPELL_WATERY_GRAVE_3, true); break; + case 3: player->CastSpell(player, SPELL_WATERY_GRAVE_4, true); break; } } @@ -176,28 +190,42 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI case 1: DoScriptText(SAY_SUMMON2, m_creature); break; } - if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) - { - //north - DoCast(target, SPELL_SUMMON_MURLOC_A6); - DoCast(target, SPELL_SUMMON_MURLOC_A7); - DoCast(target, SPELL_SUMMON_MURLOC_A8); - DoCast(target, SPELL_SUMMON_MURLOC_A9); - DoCast(target, SPELL_SUMMON_MURLOC_A10); - - //south - DoCast(target, SPELL_SUMMON_MURLOC_B6); - DoCast(target, SPELL_SUMMON_MURLOC_B7); - DoCast(target, SPELL_SUMMON_MURLOC_B8); - DoCast(target, SPELL_SUMMON_MURLOC_B9); - DoCast(target, SPELL_SUMMON_MURLOC_B10); + Unit* target; + using std::set; + set SummonList; + set::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; + } } - DoScriptText(EMOTE_EARTHQUAKE, m_creature); - - Earthquake = false; - Earthquake_Timer = 40000+rand()%5000; - } - }else Earthquake_Timer -= diff; + } + }else Earthquake_Timer -= diff; //TidalWave_Timer if (TidalWave_Timer < diff) @@ -213,11 +241,21 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI { //Teleport 4 players under the waterfalls Unit *target; + using std::set; + setlist; + set::iterator itr; for(uint8 i = 0; i < 4; i++) { - target = SelectUnit(SELECT_TARGET_RANDOM, 1); - if (target && (target->GetTypeId() == TYPEID_PLAYER) && !target->HasAura(SPELL_WATERY_GRAVE, 0) && target->IsWithinDistInMap(m_creature, 50)) - ApplyWateryGrave(target, i); + counter = 0; + do{target = SelectUnit(SELECT_TARGET_RANDOM, 1, 50, true); //target players only + if(counter < Playercount) + break; + if(target) itr = list.find(target->GetGUID()); + counter++; + }while(itr != list.end()); + if(target){list.insert(target->GetGUID()); + ApplyWateryGrave(target, i); + } } switch(rand()%2) @@ -239,13 +277,22 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI //WateryGlobules_Timer if (WateryGlobules_Timer < diff) { - if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) - { - DoCast(target, SPELL_SUMMON_WATER_GLOBULE_1); - DoCast(target, SPELL_SUMMON_WATER_GLOBULE_2); - DoCast(target, SPELL_SUMMON_WATER_GLOBULE_3); - DoCast(target, SPELL_SUMMON_WATER_GLOBULE_4); - } + Unit* globuletarget; + using std::set; + setglobulelist; + set::iterator itr; + for (int8 g = 0; g < 4; g++) //one unit cant cast more than one spell per update, so some players have to cast for us XD + { + counter = 0; + do {globuletarget = SelectUnit(SELECT_TARGET_RANDOM, 0,50,true); + if(globuletarget) itr = globulelist.find(globuletarget->GetGUID()); + if (counter > Playercount) + break; + counter++; + } while (itr != globulelist.end()); + if(globuletarget)globulelist.insert(globuletarget->GetGUID()); + globuletarget->CastSpell(globuletarget, globulespell[g], true); + } DoScriptText(EMOTE_WATERY_GLOBULES, m_creature); WateryGlobules_Timer = 25000; }else WateryGlobules_Timer -= diff; diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_void_reaver.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_void_reaver.cpp index 2f52eef8c05..c7e832fd172 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_void_reaver.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_void_reaver.cpp @@ -120,7 +120,7 @@ struct TRINITY_DLL_DECL boss_void_reaverAI : public ScriptedAI { target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); //18 yard radius minimum - if(target && target->GetDistance2d(m_creature) > 18) + if(target && target->GetTypeId() == TYPEID_PLAYER && target->isAlive() && target->GetDistance2d(m_creature) > 18) target_list.push_back(target); target = NULL; } @@ -128,7 +128,7 @@ struct TRINITY_DLL_DECL boss_void_reaverAI : public ScriptedAI target = *(target_list.begin()+rand()%target_list.size()); if (target) - DoCast(target, SPELL_ARCANE_ORB); + m_creature->CastSpell(target->GetPositionX(),target->GetPositionY(),target->GetPositionZ(), SPELL_ARCANE_ORB, true); ArcaneOrb_Timer = 3000; }else ArcaneOrb_Timer -= diff; -- cgit v1.2.3 From 1edf80dec94ea32c49bb8880cf628ce0bfe21930 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sun, 18 Jan 2009 11:07:43 +0100 Subject: *Fixed version required by cmakes. - by raczman *Added cmake error message if no ACE library found. - by raczman *Updated sql/updates install file. - by raczman *Genrevision vcproj fix by deicide. --HG-- branch : trunk --- CMakeLists.txt | 9 +-- sql/updates/CMakeLists.txt | 113 +++++++++++++++++++++++++++++++++++-- src/shared/Database/CMakeLists.txt | 1 - win/VC71/genrevision.vcproj | 2 +- win/VC80/genrevision.vcproj | 2 +- 5 files changed, 114 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/CMakeLists.txt b/CMakeLists.txt index 92ece2f40e5..8b64bc192ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ PROJECT(Trinity) -cmake_minimum_required(VERSION 2.4) +cmake_minimum_required(VERSION 2.6) cmake_policy(SET CMP0005 OLD) include(cmake/FindAce.cmake) @@ -121,9 +121,10 @@ FIND_ACE(ACE) if(ACE_FOUND) message(STATUS "Found ACE library: ${ACE_LIBRARY}") message(STATUS "Include dir is: ${ACE_INCLUDE_DIR}") -#else(ACE_FOUND) -#message( "** ACE library not found, will try to build it myself.") -#SET(BUILD_ACE 1) BRIAN LIKES MEN +else(ACE_FOUND) +message(SEND_ERROR "** ACE library not found! Trinity Core will not build!") +return() +#SET(BUILD_ACE 1) #SET(ACE_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/dep/ACE_wrappers ${CMAKE_BINARY_DIR}/dep/ACE_wrappers") #SET(ACE_LIBRARY ACE) #message(STATUS "I will try to build ACE from: ${ACE_INCLUDE_DIR}") diff --git a/sql/updates/CMakeLists.txt b/sql/updates/CMakeLists.txt index 53490e0a15e..ef9a6927e30 100644 --- a/sql/updates/CMakeLists.txt +++ b/sql/updates/CMakeLists.txt @@ -1,4 +1,4 @@ -install(FILES +INSTALL(FILES 11_characters.sql 45_characters.sql 54_world.sql @@ -33,8 +33,109 @@ install(FILES 175_world_scripts.sql 176_world.sql 182_world.sql -194_world_blacktemple.sql -195_world_serpent_shrine.sql - -#Yes, i sorted them manually, so please be as kind as to add incoming .sql updates in order. -DESTINATION share/trinity/sql/updates) \ No newline at end of file +212_world_scripts.sql +220_characters.sql +230_world_blacktemple.sql +230_world_scripts.sql +230_world_serpent_shrine.sql +230_world.sql +231_world_scripts.sql +233_world.sql +238_world.sql +240_world.sql +241_world.sql +247_world.sql +262_characters.sql +262_realmd.sql +262_world.sql +273_world_scripts.sql +285_world.sql +287_world_scripts.sql +329_world.sql +332_world.sql +333_world.sql +334_world.sql +341_world.sql +356_world.sql +373_world_scripts.sql +377_world_scripts.sql +389_world.sql +400_world.sql +410_characters.sql +426_world_scripts.sql +427_world_scripts.sql +444_world.sql +452_world.sql +455_world.sql +471_world.sql +480_world_scripts.sql +488_world_scripts.sql +502_world_scripts.sql +505_world.sql +506_world.sql +513_world_scripts.sql +519_world.sql +537_world.sql +541_characters.sql +541_world.sql +542_characters.sql +551_world.sql +566_world.sql +571_world.sql +572_world.sql +575_world_scripts.sql +583_world_scripts.sql +586_world_scripts.sql +588_world.sql +608_world.sql +615_world.sql +636_world_scripts.sql +640_world.sql +645_world_scripts.sql +667_world_scripts.sql +676_world.sql +679_world_scripts.sql +683_world_scripts.sql +686_world_scripts.sql +691_world_scripts.sql +692_world.sql +708_world_scripts.sql +722_world_script_texts.sql +724_world.sql +725_characters.sql +725_world.sql +728_world_scripts.sql +733_characters.sql +739_characters.sql +741_characters.sql +741_world.sql +747_world.sql +748_world_scripts.sql +758_world_scripts.sql +762_world.sql +764_world_scripts.sql +765_world_scripts.sql +773_world_scripts.sql +780_characters.sql +783_world.sql +785_world.sql +789_world.sql +807_world_scripts.sql +817_world_scripts.sql +822_world_scripts.sql +826_world_scripts.sql +832_characters.sql +833_world_scripts.sql +834_world_scripts.sql +837_world_scripts.sql +838_world_scripts.sql +839_world_scripts.sql +840_world_scripts.sql +841_world_scripts.sql +842_world.sql +850_world_scripts.sql +852_world_scripts.sql +857_world_scripts.sql +863_world_scripts.sql +871_world.sql +DESTINATION share/trinity/sql/updates) diff --git a/src/shared/Database/CMakeLists.txt b/src/shared/Database/CMakeLists.txt index a819a66dec7..78cc48436e7 100644 --- a/src/shared/Database/CMakeLists.txt +++ b/src/shared/Database/CMakeLists.txt @@ -13,7 +13,6 @@ SET(trinitydatabase_STAT_SRCS DatabasePostgre.h DatabaseSqlite.cpp DatabaseSqlite.h -#Brian likes men Field.cpp Field.h MySQLDelayThread.h diff --git a/win/VC71/genrevision.vcproj b/win/VC71/genrevision.vcproj index 2b36151003e..fa840d44318 100644 --- a/win/VC71/genrevision.vcproj +++ b/win/VC71/genrevision.vcproj @@ -1,7 +1,7 @@ Date: Sun, 18 Jan 2009 11:27:08 +0100 Subject: *Fixed factions for escort quests --HG-- branch : trunk --- .../scripts/scripts/zone/arathi_highlands/arathi_highlands.cpp | 1 + src/bindings/scripts/scripts/zone/ashenvale_forest/ashenvale.cpp | 3 ++- src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp | 2 +- src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp | 2 +- src/bindings/scripts/scripts/zone/razorfen_kraul/razorfen_kraul.cpp | 1 + .../scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp | 2 +- src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp | 1 + .../scripts/scripts/zone/thousand_needles/thousand_needles.cpp | 2 +- src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp | 2 +- 9 files changed, 10 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/bindings/scripts/scripts/zone/arathi_highlands/arathi_highlands.cpp b/src/bindings/scripts/scripts/zone/arathi_highlands/arathi_highlands.cpp index ad43b63b5f3..7aff80c0d02 100644 --- a/src/bindings/scripts/scripts/zone/arathi_highlands/arathi_highlands.cpp +++ b/src/bindings/scripts/scripts/zone/arathi_highlands/arathi_highlands.cpp @@ -111,6 +111,7 @@ bool QuestAccept_npc_professor_phizzlethorpe(Player* player, Creature* creature, { creature->Say(SAY_PROGRESS_1, LANG_UNIVERSAL, player->GetGUID()); ((npc_escortAI*)(creature->AI()))->Start(false, false, false, player->GetGUID()); + creature->setFaction(113); } return true; } diff --git a/src/bindings/scripts/scripts/zone/ashenvale_forest/ashenvale.cpp b/src/bindings/scripts/scripts/zone/ashenvale_forest/ashenvale.cpp index 49935651cb6..9ef0ca6a15d 100644 --- a/src/bindings/scripts/scripts/zone/ashenvale_forest/ashenvale.cpp +++ b/src/bindings/scripts/scripts/zone/ashenvale_forest/ashenvale.cpp @@ -140,6 +140,7 @@ bool QuestAccept_npc_torek(Player* player, Creature* creature, Quest const* ques //TODO: find companions, make them follow Torek, at any time (possibly done by mangos/database in future?) ((npc_escortAI*)(creature->AI()))->Start(true, true, true, player->GetGUID()); DoScriptText(SAY_READY, creature, player); + creature->setFaction(113); } return true; @@ -258,7 +259,7 @@ bool QuestAccept_npc_ruul_snowhoof(Player* player, Creature* creature, Quest con { if (quest->GetQuestId() == QUEST_FREEDOM_TO_RUUL) { - creature->setFaction(1603); + creature->setFaction(113); ((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID()); } return true; 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 b4eefc43ce1..8e94e1adc18 100644 --- a/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp +++ b/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp @@ -385,7 +385,7 @@ bool QuestAccept_npc_magwin(Player* player, Creature* creature, Quest const* que { if (quest->GetQuestId() == QUEST_A_CRY_FOR_HELP) { - creature->setFaction(10); + creature->setFaction(113); ((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID()); } return true; diff --git a/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp b/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp index 6350040cfe4..acef59df670 100644 --- a/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp +++ b/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp @@ -237,7 +237,7 @@ bool QuestAccept_npc_ranger_lilatha(Player* player, Creature* creature, Quest co { if (quest->GetQuestId() == QUEST_ESCAPE_FROM_THE_CATACOMBS) { - creature->setFaction(1603); + creature->setFaction(113); ((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID()); } return true; diff --git a/src/bindings/scripts/scripts/zone/razorfen_kraul/razorfen_kraul.cpp b/src/bindings/scripts/scripts/zone/razorfen_kraul/razorfen_kraul.cpp index 2d70b503a77..45e95d1c407 100644 --- a/src/bindings/scripts/scripts/zone/razorfen_kraul/razorfen_kraul.cpp +++ b/src/bindings/scripts/scripts/zone/razorfen_kraul/razorfen_kraul.cpp @@ -131,6 +131,7 @@ bool QuestAccept_npc_willix(Player* player, Creature* creature, Quest const* que { ((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID()); DoScriptText(SAY_READY, creature, player); + creature->setFaction(113); } return true; 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 be29cf79f0e..38f84f5ca7a 100644 --- a/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp +++ b/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp @@ -1271,7 +1271,7 @@ bool QuestAccept_npc_earthmender_wilda(Player* player, Creature* creature, Quest { if (quest->GetQuestId() == QUEST_ESCAPE_FROM_COILSKAR_CISTERN) { - creature->setFaction(1725); + creature->setFaction(113); ((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID()); } return true; diff --git a/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp b/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp index 47ba4a33e1d..81268dd5cea 100644 --- a/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp +++ b/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp @@ -441,6 +441,7 @@ bool QuestAccept_npc_isla_starmane(Player* player, Creature* creature, Quest con if (quest->GetQuestId() == QUEST_EFTW_H || quest->GetQuestId() == QUEST_EFTW_A) { ((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID()); + creature->setFaction(113); } return true; } diff --git a/src/bindings/scripts/scripts/zone/thousand_needles/thousand_needles.cpp b/src/bindings/scripts/scripts/zone/thousand_needles/thousand_needles.cpp index 6d230a49e3b..91b1e0ae3e5 100644 --- a/src/bindings/scripts/scripts/zone/thousand_needles/thousand_needles.cpp +++ b/src/bindings/scripts/scripts/zone/thousand_needles/thousand_needles.cpp @@ -102,7 +102,7 @@ bool QuestAccept_npc_swiftmountain(Player* player, Creature* creature, Quest con ((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID()); DoScriptText(SAY_READY, creature, player); // Change faction so mobs attack - creature->setFaction(775); + creature->setFaction(113); } return true; diff --git a/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp b/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp index 6f3ca0149bb..6fb19c15a65 100644 --- a/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp +++ b/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp @@ -332,7 +332,7 @@ bool QuestAccept_npc_kayra_longmane(Player* player, Creature* creature, Quest co if (quest->GetQuestId() == QUEST_EFU) { ((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID()); - creature->setFaction(775); + creature->setFaction(113); } return true; } -- cgit v1.2.3 From 88568e78fb6c9c96cd95532a303449a5ff967039 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sun, 18 Jan 2009 11:40:20 +0100 Subject: *More fixes on escort quests --HG-- branch : trunk --- sql/updates/822_world_scripts.sql | 3 ++- src/bindings/scripts/scripts/zone/ashenvale_forest/ashenvale.cpp | 5 ++++- src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/sql/updates/822_world_scripts.sql b/sql/updates/822_world_scripts.sql index 0102336e31f..f7a7016dcf7 100644 --- a/sql/updates/822_world_scripts.sql +++ b/sql/updates/822_world_scripts.sql @@ -1,2 +1,3 @@ update creature_template set scriptname='npc_kayra_longmane' where entry=17969; -delete from creature_template_addon where entry=17969; \ No newline at end of file +delete from creature_template_addon where entry=17969; +update quest_template set specialflags=2 where entry=9752; \ No newline at end of file diff --git a/src/bindings/scripts/scripts/zone/ashenvale_forest/ashenvale.cpp b/src/bindings/scripts/scripts/zone/ashenvale_forest/ashenvale.cpp index 9ef0ca6a15d..85ce5ea0bea 100644 --- a/src/bindings/scripts/scripts/zone/ashenvale_forest/ashenvale.cpp +++ b/src/bindings/scripts/scripts/zone/ashenvale_forest/ashenvale.cpp @@ -55,6 +55,7 @@ struct TRINITY_DLL_DECL npc_torekAI : public npc_escortAI uint32 Rend_Timer; uint32 Thunderclap_Timer; + bool Completed; void WaypointReached(uint32 i) { @@ -79,6 +80,7 @@ struct TRINITY_DLL_DECL npc_torekAI : public npc_escortAI break; case 20: DoScriptText(SAY_WIN, m_creature, player); + Completed = true; if (player && player->GetTypeId() == TYPEID_PLAYER) ((Player*)player)->GroupEventHappens(QUEST_TOREK_ASSULT,m_creature); break; @@ -92,6 +94,7 @@ struct TRINITY_DLL_DECL npc_torekAI : public npc_escortAI { Rend_Timer = 5000; Thunderclap_Timer = 8000; + Completed = false; } void Aggro(Unit* who) @@ -105,7 +108,7 @@ struct TRINITY_DLL_DECL npc_torekAI : public npc_escortAI void JustDied(Unit* killer) { - if (PlayerGUID) + if (PlayerGUID && !Completed) { if (Unit* player = Unit::GetUnit((*m_creature), PlayerGUID)) ((Player*)player)->FailQuest(QUEST_TOREK_ASSULT); diff --git a/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp b/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp index 6fb19c15a65..72c283f9f32 100644 --- a/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp +++ b/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp @@ -305,6 +305,7 @@ struct TRINITY_DLL_DECL npc_kayra_longmaneAI : public npc_escortAI case 19: m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); DoSay(SAY_PROGRESS_5, LANG_UNIVERSAL, player); break; case 26: DoSay(SAY_PROGRESS_6, LANG_UNIVERSAL, player); + Completed = true; if(player) ((Player*)player)->GroupEventHappens(QUEST_EFU, m_creature); break; @@ -313,7 +314,7 @@ struct TRINITY_DLL_DECL npc_kayra_longmaneAI : public npc_escortAI void JustDied(Unit* killer) { - if (PlayerGUID) + if (PlayerGUID && !Completed) { Unit* player = Unit::GetUnit((*m_creature), PlayerGUID); if (player && !Completed) -- cgit v1.2.3 From 9037423faf59eadec7bead177db875ce3a2c471a Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sun, 18 Jan 2009 11:58:22 +0100 Subject: *Added defines for Sunwell Plateau --HG-- branch : trunk --- .../scripts/zone/sunwell_plateau/boss_brutallus.cpp | 17 +++++++++++++++++ .../scripts/zone/sunwell_plateau/def_sunwell_plateau.h | 1 + .../zone/sunwell_plateau/instance_sunwell_plateau.cpp | 4 ++++ 3 files changed, 22 insertions(+) (limited to 'src') diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_brutallus.cpp b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_brutallus.cpp index 2d8b4f7c31b..71dededae54 100644 --- a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_brutallus.cpp +++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_brutallus.cpp @@ -51,6 +51,11 @@ EndScriptData */ #define SPELL_BERSERK 26662 #define SPELL_DUAL_WIELD 42459 +#define FREEZING 45203 +#define FROST_BOLT 44843 +#define ENCAPSULATE 45665 +#define ENCAPSULATE_CHANELLING 45661 + struct TRINITY_DLL_DECL boss_brutallusAI : public ScriptedAI { boss_brutallusAI(Creature *c) : ScriptedAI(c) @@ -66,6 +71,9 @@ struct TRINITY_DLL_DECL boss_brutallusAI : public ScriptedAI uint32 StompTimer; uint32 BerserkTimer; + uint32 ConversationTimer; + bool Intro; + void Reset() { SlashTimer = 11000; @@ -73,11 +81,17 @@ struct TRINITY_DLL_DECL boss_brutallusAI : public ScriptedAI BurnTimer = 60000; BerserkTimer = 360000; m_creature->CastSpell(m_creature, SPELL_DUAL_WIELD, true); + + if(pInstance) + pInstance->SetData(DATA_BRUTALLUS, NOT_STARTED); } void Aggro(Unit *who) { DoScriptText(YELL_AGGRO, m_creature); + + if(pInstance) + pInstance->SetData(DATA_BRUTALLUS, IN_PROGRESS); } void KilledUnit(Unit* victim) @@ -93,6 +107,9 @@ struct TRINITY_DLL_DECL boss_brutallusAI : public ScriptedAI void JustDied(Unit* Killer) { DoScriptText(YELL_DEATH, m_creature); + + if(pInstance) + pInstance->SetData(DATA_BRUTALLUS, DONE); } void UpdateAI(const uint32 diff) diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/def_sunwell_plateau.h b/src/bindings/scripts/scripts/zone/sunwell_plateau/def_sunwell_plateau.h index 4ded3e5f47d..95ff1f112bf 100644 --- a/src/bindings/scripts/scripts/zone/sunwell_plateau/def_sunwell_plateau.h +++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/def_sunwell_plateau.h @@ -18,6 +18,7 @@ #define DATA_KALECGOS_HUMAN 7 #define DATA_SATHROVARR 8 #define DATA_BRUTALLUS 9 +#define DATA_MADRIGOSA 24 #define DATA_FELMYST 10 #define DATA_ALYTHESS 11 #define DATA_SACROLASH 12 diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp b/src/bindings/scripts/scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp index f5772840c89..3de2c14e93a 100644 --- a/src/bindings/scripts/scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp @@ -34,6 +34,7 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance uint64 Kalecgos_Human; uint64 Sathrovarr; uint64 Brutallus; + uint64 Madrigosa; uint64 Felmyst; uint64 Alythess; uint64 Sacrolash; @@ -58,6 +59,7 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance Kalecgos_Human = 0; Sathrovarr = 0; Brutallus = 0; + Madrigosa = 0; Felmyst = 0; Alythess = 0; Sacrolash = 0; @@ -100,6 +102,7 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance case 24891: Kalecgos_Human = creature->GetGUID(); break; case 24892: Sathrovarr = creature->GetGUID(); break; case 24882: Brutallus = creature->GetGUID(); break; + case 24895: Madrigosa = creature->GetGUID(); break; case 25038: Felmyst = creature->GetGUID(); break; case 25166: Alythess = creature->GetGUID(); break; case 25165: Sacrolash = creature->GetGUID(); break; @@ -147,6 +150,7 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance case DATA_KALECGOS_HUMAN: return Kalecgos_Human; break; case DATA_SATHROVARR: return Sathrovarr; break; case DATA_BRUTALLUS: return Brutallus; break; + case DATA_MADRIGOSA: return Madrigosa; break; case DATA_FELMYST: return Felmyst; break; case DATA_ALYTHESS: return Alythess; break; case DATA_SACROLASH: return Sacrolash; break; -- cgit v1.2.3 From 08624f833884d13496f4b2ce00fb8e065a42305a Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sun, 18 Jan 2009 12:10:50 +0100 Subject: *Reverted not needed check in hyjalAI --HG-- branch : trunk --- .../scripts/scripts/zone/caverns_of_time/hyjal/hyjalAI.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src') diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjalAI.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjalAI.cpp index 53a013bed5a..cbb8ce53b91 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjalAI.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjalAI.cpp @@ -230,13 +230,6 @@ void hyjalAI::StartEvent(Player* player) if(!player) return; - Map* Hyjal = m_creature->GetMap(); - if(Hyjal->GetPlayersCountExceptGMs() < 15) //check if there are more than 15 players in hyjal (abuse prevent) - { - //error_log("Some Players try to farm in Hyjal (less than 15 people)"); - return; - } - Talk(BEGIN); EventBegun = true; -- cgit v1.2.3 From b5b109d3ffb0d27a40bd8761c6f7aceff3b4d9a4 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sun, 18 Jan 2009 12:54:58 +0100 Subject: *Fix a bug in waypoints --HG-- branch : trunk --- src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp b/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp index 751b4d995f1..24f4d134464 100644 --- a/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp +++ b/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp @@ -407,7 +407,8 @@ struct TRINITY_DLL_DECL npc_wizzlecrank_shredderAI : public npc_escortAI if(Mercenary) { ((Creature*)Mercenary)->Yell(SAY_MERCENARY_4, LANG_UNIVERSAL, NULL); - Mercenary->Attack(m_creature, true); + ((Creature*)Mercenary)->AI()->AttackStart(m_creature); + AttackStart(Mercenary); } }break; case 21: DoSay(SAY_PROGRESS_5, LANG_UNIVERSAL, NULL); @@ -474,7 +475,7 @@ CreatureAI* GetAI_npc_wizzlecrank_shredderAI(Creature *_Creature) thisAI->AddWaypoint(11, 1098.92, -3095.14, 82.97); thisAI->AddWaypoint(12, 1100.94, -3082.60, 82.83); thisAI->AddWaypoint(13, 1101.12, -3068.83, 82.53); - thisAI->AddWaypoint(14, 1096.97, -3051,99, 82.50); + thisAI->AddWaypoint(14, 1096.97, -3051.99, 82.50); thisAI->AddWaypoint(15, 1094.06, -3036.79, 82.70); thisAI->AddWaypoint(16, 1098.22, -3027.84, 83.79); thisAI->AddWaypoint(17, 1109.51, -3015.92, 85.73); -- cgit v1.2.3 From 9c9311c781206d7cb955dfeb960dab7c554567a4 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sun, 18 Jan 2009 13:08:42 +0100 Subject: Some changes for genrevision --HG-- branch : trunk --- src/shared/SystemConfig.h | 10 +- src/shared/SystemConfig.h.in | 54 --------- src/shared/revision.h.in | 4 - src/tools/genrevision/genrevision.cpp | 206 ++++++++++++++++++++++++++++------ src/trinitycore/Main.cpp | 2 +- src/trinityrealm/Main.cpp | 2 +- win/TrinityCore&Script VC71.sln | 5 +- win/TrinityCore&Script VC80.sln | 1 + win/TrinityCore&Script VC90.sln | 1 + win/VC71/genrevision.vcproj | 152 ------------------------- win/VC71/shared.vcproj | 22 ---- 11 files changed, 184 insertions(+), 275 deletions(-) delete mode 100644 src/shared/SystemConfig.h.in delete mode 100644 src/shared/revision.h.in (limited to 'src') diff --git a/src/shared/SystemConfig.h b/src/shared/SystemConfig.h index aeb38891c11..9e7fe3e3045 100644 --- a/src/shared/SystemConfig.h +++ b/src/shared/SystemConfig.h @@ -1,4 +1,4 @@ -/* +/* * Copyright (C) 2005-2008 MaNGOS * * Copyright (C) 2008 Trinity @@ -25,7 +25,7 @@ #define TRINITY_SYSTEMCONFIG_H #include "Platform/Define.h" -#include "revision.h" //-----here u are ------ _REVISION is the magic key +#include "revision.h" #define _PACKAGENAME "TrinityCore " @@ -39,12 +39,12 @@ #if PLATFORM == PLATFORM_WINDOWS # ifdef _WIN64 -# define _FULLVERSION _PACKAGENAME "Rev: " _REVISION " (Win64," _ENDIAN_STRING ")" +# define _FULLVERSION _PACKAGENAME "Rev: " _REVISION " Hash: " _HASH " (Win64," _ENDIAN_STRING ")" # else -# define _FULLVERSION _PACKAGENAME "Rev: " _REVISION " (Win32," _ENDIAN_STRING ")" +# define _FULLVERSION _PACKAGENAME "Rev: " _REVISION " Hash: " _HASH " (Win32," _ENDIAN_STRING ")" # endif #else -# define _FULLVERSION _PACKAGENAME "Rev: " _REVISION " (Unix," _ENDIAN_STRING ")" +# define _FULLVERSION _PACKAGENAME "Rev: " _REVISION " Hash: " _HASH " (Unix," _ENDIAN_STRING ")" #endif #define DEFAULT_PLAYER_LIMIT 100 diff --git a/src/shared/SystemConfig.h.in b/src/shared/SystemConfig.h.in deleted file mode 100644 index aeb38891c11..00000000000 --- a/src/shared/SystemConfig.h.in +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2005-2008 MaNGOS - * - * Copyright (C) 2008 Trinity - * - * - * 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 - */ - -// THIS FILE IS DEPRECATED - -#ifndef TRINITY_SYSTEMCONFIG_H -#define TRINITY_SYSTEMCONFIG_H - -#include "Platform/Define.h" -#include "revision.h" //-----here u are ------ _REVISION is the magic key - - -#define _PACKAGENAME "TrinityCore " -#define _CODENAME "YUME" - -#if TRINITY_ENDIAN == TRINITY_BIGENDIAN -# define _ENDIAN_STRING "big-endian" -#else -# define _ENDIAN_STRING "little-endian" -#endif - -#if PLATFORM == PLATFORM_WINDOWS -# ifdef _WIN64 -# define _FULLVERSION _PACKAGENAME "Rev: " _REVISION " (Win64," _ENDIAN_STRING ")" -# else -# define _FULLVERSION _PACKAGENAME "Rev: " _REVISION " (Win32," _ENDIAN_STRING ")" -# endif -#else -# define _FULLVERSION _PACKAGENAME "Rev: " _REVISION " (Unix," _ENDIAN_STRING ")" -#endif - -#define DEFAULT_PLAYER_LIMIT 100 -#define DEFAULT_WORLDSERVER_PORT 8085 //8129 -#define DEFAULT_REALMSERVER_PORT 3724 -#define DEFAULT_SOCKET_SELECT_TIME 10000 -#endif diff --git a/src/shared/revision.h.in b/src/shared/revision.h.in deleted file mode 100644 index a84170529eb..00000000000 --- a/src/shared/revision.h.in +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef __SVN_REVISION_H__ -#define __SVN_REVISION_H__ - #define _REVISION "794" //change this to your current revision -#endif // __SVN_REVISION_H__ diff --git a/src/tools/genrevision/genrevision.cpp b/src/tools/genrevision/genrevision.cpp index 1c58e82f85d..f9abc71b47a 100644 --- a/src/tools/genrevision/genrevision.cpp +++ b/src/tools/genrevision/genrevision.cpp @@ -24,9 +24,9 @@ #pragma warning(disable:4996) -/* struct RawData { + char hash_str[200]; char rev_str[200]; char date_str[200]; char time_str[200]; @@ -56,6 +56,45 @@ void extractDataFromSvn(FILE* EntriesFile, bool url, RawData& data) strcpy(data.rev_str,num_str); } +void extractDataFromHG(FILE* EntriesFile, std::string path, bool url, RawData& data) +{ + char buf[200]; + + char hash_str[200]; + char revision_str[200]; + + bool found = false; + while(fgets(buf,200,EntriesFile)) + { + if(sscanf(buf,"%s %s",hash_str,revision_str)==2) + { + found = true; + break; + } + } + + if(!found) + { + strcpy(data.hash_str,"*"); + strcpy(data.rev_str,"*"); + strcpy(data.date_str,"*"); + strcpy(data.time_str,"*"); + return; + } + + char thash_str[200]; + for(int i = 11;i >= 0; --i) + { + thash_str[i] = hash_str[i]; + } + + strcpy(data.hash_str,thash_str); + strcpy(data.rev_str,revision_str); + + strcpy(data.date_str,"*"); + strcpy(data.time_str,"*"); +} + void extractDataFromGit(FILE* EntriesFile, std::string path, bool url, RawData& data) { char buf[200]; @@ -76,6 +115,7 @@ void extractDataFromGit(FILE* EntriesFile, std::string path, bool url, RawData& if(!found) { + strcpy(data.hash_str,"*"); strcpy(data.rev_str,"*"); strcpy(data.date_str,"*"); strcpy(data.time_str,"*"); @@ -117,6 +157,7 @@ void extractDataFromGit(FILE* EntriesFile, std::string path, bool url, RawData& } else strcpy(data.rev_str,hash_str); + strcpy(data.hash_str,"*"); time_t rev_time = 0; // extracting date/time @@ -188,54 +229,154 @@ bool extractDataFromGit(std::string filename, std::string path, bool url, RawDat return true; } -std::string generateHeader(char const* rev_str, char const* date_str, char const* time_str) +bool extractDataFromHG(std::string filename, std::string path, bool url, RawData& data) +{ + FILE* EntriesFile = fopen(filename.c_str(), "r"); + if(!EntriesFile) + return false; + + extractDataFromHG(EntriesFile,path,url,data); + fclose(EntriesFile); + return true; +} + +std::string generateHeader(char const* rev_str, char const* date_str, char const* time_str, char const* hash_str) { std::ostringstream newData; newData << "#ifndef __REVISION_H__" << std::endl; newData << "#define __REVISION_H__" << std::endl; - newData << " #define REVISION_ID \"" << rev_str << "\"" << std::endl; - newData << " #define REVISION_DATE \"" << date_str << "\"" << std::endl; - newData << " #define REVISION_TIME \"" << time_str << "\""<< std::endl; + newData << " #define _REVISION \"" << rev_str << "\"" << std::endl; + newData << " #define _HASH \"" << hash_str << "\"" << std::endl; + newData << " #define _REVISION_DATE \"" << date_str << "\"" << std::endl; + newData << " #define _REVISION_TIME \"" << time_str << "\""<< std::endl; newData << "#endif // __REVISION_H__" << std::endl; return newData.str(); } -*/ + int main(int argc, char **argv) { + bool use_url = false; + bool hg_prefered = true; + bool git_prefered = false; + bool svn_prefered = false; std::string path; - if(argc >= 1 && argv[1] ) + // Call: tool {options} [path] + // -h use hg prefered (default) + // -g use git prefered + // -s use svn prefered + // -r use only revision (without repo URL) (default) + // -u include repositire URL as commit URL or "rev at URL" + for(int k = 1; k <= argc; ++k) { - path = argv[1]; - if(path.size() > 0 && (path[path.size()-1]!='/' || path[path.size()-1]!='\\')) - path += '/'; + if(!argv[k] || !*argv[k]) + break; + + if(argv[k][0]!='-') + { + path = argv[k]; + if(path.size() > 0 && (path[path.size()-1]!='/' || path[path.size()-1]!='\\')) + path += '/'; + break; + } + + switch(argv[k][1]) + { + case 'h': + hg_prefered = true; + git_prefered = false; + svn_prefered = false; + continue; + case 'g': + hg_prefered = false; + git_prefered = true; + svn_prefered = false; + continue; + case 'r': + use_url = false; + continue; + case 's': + hg_prefered = false; + git_prefered = false; + svn_prefered = true; + continue; + case 'u': + use_url = true; + continue; + default: + printf("Unknown option %s",argv[k]); + return 1; + } } - FILE* EntriesFile = fopen((path+".hg/branch.cache").c_str(), "r"); - if(!EntriesFile) - EntriesFile = fopen((path+"_hg/branch.cache").c_str(), "r"); - std::ostringstream newData; + /// new data extraction + std::string newData; - if(!EntriesFile) { - newData << "#ifndef __SVN_REVISION_H__" << std::endl; - newData << "#define __SVN_REVISION_H__" << std::endl; - newData << " #define _REVISION \"Unknown\"" << std::endl; - newData << "#endif // __SVN_REVISION_H__" << std::endl; - } - else - { - char revision[100]; - char temp[100]; - fscanf(EntriesFile,"%s%s",temp, &revision); - newData << "#ifndef __SVN_REVISION_H__" << std::endl; - newData << "#define __SVN_REVISION_H__" << std::endl; - newData << " #define _REVISION \"" << revision << "\"" << std::endl; - newData << "#endif // __SVN_REVISION_H__" << std::endl; - fclose(EntriesFile); + RawData data; + + bool res = false; + + if(svn_prefered) + { + /// SVN data + res = extractDataFromSvn(path+".svn/entries",use_url,data); + if (!res) + res = extractDataFromSvn(path+"_svn/entries",use_url,data); + // HG data + if (!res) + res = extractDataFromHG(path+".hg/branch.cache",path,use_url,data); + if (!res) + res = extractDataFromHG(path+"_hg/branch.cache",path,use_url,data); + // GIT data + if (!res) + res = extractDataFromGit(path+".git/FETCH_HEAD",path,use_url,data); + if (!res) + res = extractDataFromGit(path+"_git/FETCH_HEAD",path,use_url,data); + } + else if(git_prefered) + { + // GIT data + res = extractDataFromGit(path+".git/FETCH_HEAD",path,use_url,data); + if (!res) + res = extractDataFromGit(path+"_git/FETCH_HEAD",path,use_url,data); + // HG data + if (!res) + res = extractDataFromHG(path+".hg/branch.cache",path,use_url,data); + if (!res) + res = extractDataFromHG(path+"_hg/branch.cache",path,use_url,data); + /// SVN data + if (!res) + res = extractDataFromSvn(path+".svn/entries",use_url,data); + if (!res) + res = extractDataFromSvn(path+"_svn/entries",use_url,data); + } + + else if(hg_prefered) + { + // HG data + res = extractDataFromHG(path+".hg/branch.cache",path,use_url,data); + if (!res) + res = extractDataFromHG(path+"_hg/branch.cache",path,use_url,data); + /// SVN data + if (!res) + res = extractDataFromSvn(path+".svn/entries",use_url,data); + if (!res) + res = extractDataFromSvn(path+"_svn/entries",use_url,data); + // GIT data + if (!res) + res = extractDataFromGit(path+".git/FETCH_HEAD",path,use_url,data); + if (!res) + res = extractDataFromGit(path+"_git/FETCH_HEAD",path,use_url,data); + } + if(res) + newData = generateHeader(data.rev_str,data.date_str,data.time_str,data.hash_str); + else + newData = generateHeader("*", "*", "*", "*"); } + /// get existed header data for compare std::string oldData; if(FILE* HeaderFile = fopen("revision.h","rb")) @@ -251,11 +392,12 @@ int main(int argc, char **argv) fclose(HeaderFile); } - if(newData.str() != oldData) + /// update header only if different data + if(newData != oldData) { if(FILE* OutputFile = fopen("revision.h","wb")) { - fprintf(OutputFile,"%s",newData.str().c_str()); + fprintf(OutputFile,"%s",newData.c_str()); fclose(OutputFile); } } diff --git a/src/trinitycore/Main.cpp b/src/trinitycore/Main.cpp index 4c85ecd6d68..d24ae02d426 100644 --- a/src/trinitycore/Main.cpp +++ b/src/trinitycore/Main.cpp @@ -64,7 +64,7 @@ uint32 realmID; ///< Id of the realm void usage(const char *prog) { sLog.outString("Usage: \n %s []\n" - " --version print version and exist\n\r" + " --version print version and exit\n\r" " -c config_file use config_file as configuration file\n\r" #ifdef WIN32 " Running as service functions:\n\r" diff --git a/src/trinityrealm/Main.cpp b/src/trinityrealm/Main.cpp index 3e2739ec6b5..274aabf0717 100644 --- a/src/trinityrealm/Main.cpp +++ b/src/trinityrealm/Main.cpp @@ -71,7 +71,7 @@ DatabaseType LoginDatabase; ///< Accessor to the void usage(const char *prog) { sLog.outString("Usage: \n %s []\n" - " --version print version and exist\n\r" + " --version print version and exit\n\r" " -c config_file use config_file as configuration file\n\r" #ifdef WIN32 " Running as service functions:\n\r" diff --git a/win/TrinityCore&Script VC71.sln b/win/TrinityCore&Script VC71.sln index 2fc147a72cc..b13757a7688 100644 --- a/win/TrinityCore&Script VC71.sln +++ b/win/TrinityCore&Script VC71.sln @@ -8,6 +8,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shared", "VC71\shared.vcpro ProjectSection(ProjectDependencies) = postProject {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E} = {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E} {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} + {803F488E-4C5A-4866-8D5C-1E6C03C007C2} = {803F488E-4C5A-4866-8D5C-1E6C03C007C2} {7C74F49E-FECA-1BAD-6757-8A6348EA12C8} = {7C74F49E-FECA-1BAD-6757-8A6348EA12C8} {262199E8-EEDF-4700-A1D1-E9CC901CF480} = {262199E8-EEDF-4700-A1D1-E9CC901CF480} {DE0380F9-C910-4E99-A841-93550D0E61D7} = {DE0380F9-C910-4E99-A841-93550D0E61D7} @@ -112,12 +113,8 @@ Global {7C74F49E-FECA-1BAD-6757-8A6348EA12C8}.Release.Build.0 = Release|Win32 {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug|Win32.ActiveCfg = Debug|Win32 {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug|Win32.Build.0 = Debug|Win32 - {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug|x64.ActiveCfg = Debug|x64 - {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug|x64.Build.0 = Debug|x64 {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Release|Win32.ActiveCfg = Release|Win32 {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Release|Win32.Build.0 = Release|Win32 - {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Release|x64.ActiveCfg = Release|x64 - {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection diff --git a/win/TrinityCore&Script VC80.sln b/win/TrinityCore&Script VC80.sln index 504f37e342b..b4dae40257e 100644 --- a/win/TrinityCore&Script VC80.sln +++ b/win/TrinityCore&Script VC80.sln @@ -9,6 +9,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shared", "VC80\shared.vcpro ProjectSection(ProjectDependencies) = postProject {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E} = {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E} {AD537C9A-FECA-1BAD-6757-8A6348EA12C8} = {AD537C9A-FECA-1BAD-6757-8A6348EA12C8} + {803F488E-4C5A-4866-8D5C-1E6C03C007C2} = {803F488E-4C5A-4866-8D5C-1E6C03C007C2} {262199E8-EEDF-4700-A1D1-E9CC901CF480} = {262199E8-EEDF-4700-A1D1-E9CC901CF480} {8072769E-CF10-48BF-B9E1-12752A5DAC6E} = {8072769E-CF10-48BF-B9E1-12752A5DAC6E} {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} diff --git a/win/TrinityCore&Script VC90.sln b/win/TrinityCore&Script VC90.sln index 5ae813e7610..24b31acd40d 100644 --- a/win/TrinityCore&Script VC90.sln +++ b/win/TrinityCore&Script VC90.sln @@ -9,6 +9,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shared", "VC90\shared.vcpro ProjectSection(ProjectDependencies) = postProject {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E} = {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E} {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} + {803F488E-4C5A-4866-8D5C-1E6C03C007C2} = {803F488E-4C5A-4866-8D5C-1E6C03C007C2} {BD537C9A-FECA-1BAD-6757-8A6348EA12C8} = {BD537C9A-FECA-1BAD-6757-8A6348EA12C8} {8072769E-CF10-48BF-B9E1-12752A5DAC6E} = {8072769E-CF10-48BF-B9E1-12752A5DAC6E} {262199E8-EEDF-4700-A1D1-E9CC901CF480} = {262199E8-EEDF-4700-A1D1-E9CC901CF480} diff --git a/win/VC71/genrevision.vcproj b/win/VC71/genrevision.vcproj index fa840d44318..cc5fbdeaba6 100644 --- a/win/VC71/genrevision.vcproj +++ b/win/VC71/genrevision.vcproj @@ -12,9 +12,6 @@ - @@ -166,155 +163,6 @@ Name="VCPostBuildEventTool" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/VC71/shared.vcproj b/win/VC71/shared.vcproj index 8033e045700..384aa9f552a 100644 --- a/win/VC71/shared.vcproj +++ b/win/VC71/shared.vcproj @@ -444,28 +444,6 @@ Outputs="revision.h" /> - - - - - - -- cgit v1.2.3 From db8788ba79916e4d03240484874366b42439c4b6 Mon Sep 17 00:00:00 2001 From: Paradox Date: Sun, 18 Jan 2009 07:44:53 -0500 Subject: Add description for twosided trading in conf. --HG-- branch : trunk --- src/trinitycore/trinitycore.conf.dist | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/trinitycore/trinitycore.conf.dist b/src/trinitycore/trinitycore.conf.dist index af81a84038f..27253cc875b 100644 --- a/src/trinitycore/trinitycore.conf.dist +++ b/src/trinitycore/trinitycore.conf.dist @@ -653,6 +653,11 @@ Server.LoginInfo = 0 # Default: 0 (Not allowed) # 1 (Allowed) # +# AllowTwoSide.Trade +# Allow or not trading with other team in party. +# Default: 0 (Not allowed) +# 1 (Allowed) +# # TalentsInspecting # Allow other players see character talents in inspect dialog (Characters in Gamemaster mode can # inspect talents always) -- cgit v1.2.3 From 74ee1772627ba38901eb87259888479c4fe3673f Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sun, 18 Jan 2009 13:56:40 +0100 Subject: *Update on Shadowfang keep --HG-- branch : trunk --- .../shadowfang_keep/instance_shadowfang_keep.cpp | 96 ++++++++++++++++++---- .../zone/shadowfang_keep/shadowfang_keep.cpp | 8 +- 2 files changed, 85 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/bindings/scripts/scripts/zone/shadowfang_keep/instance_shadowfang_keep.cpp b/src/bindings/scripts/scripts/zone/shadowfang_keep/instance_shadowfang_keep.cpp index e9454d713ed..5ae6ca9a583 100644 --- a/src/bindings/scripts/scripts/zone/shadowfang_keep/instance_shadowfang_keep.cpp +++ b/src/bindings/scripts/scripts/zone/shadowfang_keep/instance_shadowfang_keep.cpp @@ -31,36 +31,61 @@ struct TRINITY_DLL_DECL instance_shadowfang_keep : public ScriptedInstance instance_shadowfang_keep(Map *map) : ScriptedInstance(map) {Initialize();}; uint32 Encounter[ENCOUNTERS]; + std::string str_data; - uint64 DoorCourtyard; - uint64 DoorSorcerer; - uint64 DoorArugal; + uint64 DoorCourtyardGUID; + uint64 DoorSorcererGUID; + uint64 DoorArugalGUID; void Initialize() { - DoorCourtyard = 0; - DoorSorcerer = 0; - DoorArugal = 0; + DoorCourtyardGUID = 0; + DoorSorcererGUID = 0; + DoorArugalGUID = 0; for(uint8 i=0; i < ENCOUNTERS; ++i) Encounter[i] = NOT_STARTED; } + Player* GetPlayerInMap() + { + Map::PlayerList const& players = instance->GetPlayers(); + + if (!players.isEmpty()) + { + for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + { + if (Player* plr = itr->getSource()) + return plr; + } + } + debug_log("TSCR: Instance Shadowfang Keep: GetPlayerInMap, but PlayerList is empty!"); + return NULL; + } + void OnObjectCreate(GameObject *go) { switch(go->GetEntry()) { - case 18895: DoorCourtyard = go->GetGUID(); break; - case 18972: DoorSorcerer = go->GetGUID(); break; - case 18971: DoorArugal = go->GetGUID(); break; + case 18895: DoorCourtyardGUID = go->GetGUID(); break; + case 18972: DoorSorcererGUID = go->GetGUID(); break; + case 18971: DoorArugalGUID = go->GetGUID(); break; } } - void OpenDoor(uint64 DoorGUID, bool open) - { - if(GameObject *Door = instance->GetGameObjectInMap(DoorGUID)) - Door->SetUInt32Value(GAMEOBJECT_STATE, open ? 0 : 1); - } + void HandleGameObject(uint64 guid, uint32 state) + { + Player *player = GetPlayerInMap(); + + if (!player || !guid) + { + debug_log("SD2: Instance Shadowfang Keep: HandleGameObject fail"); + return; + } + + if (GameObject *go = GameObject::GetGameObject(*player,guid)) + go->SetGoState(state); + } void SetData(uint32 type, uint32 data) { @@ -68,7 +93,7 @@ struct TRINITY_DLL_DECL instance_shadowfang_keep : public ScriptedInstance { case TYPE_FREE_NPC: if(data == DONE) - OpenDoor(DoorCourtyard, true); + HandleGameObject(DoorCourtyardGUID,0); Encounter[0] = data; break; case TYPE_RETHILGORE: @@ -76,15 +101,28 @@ struct TRINITY_DLL_DECL instance_shadowfang_keep : public ScriptedInstance break; case TYPE_FENRUS: if(data == DONE) - OpenDoor(DoorSorcerer, true); + HandleGameObject(DoorSorcererGUID,0); Encounter[2] = data; break; case TYPE_NANDOS: if(data == DONE) - OpenDoor(DoorArugal, true); + HandleGameObject(DoorArugalGUID,0); Encounter[3] = data; break; } + + if (data == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << Encounter[0] << " " << Encounter[1] << " " << Encounter[2] << " " << Encounter[3]; + + str_data = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } } uint32 GetData(uint32 type) @@ -103,6 +141,30 @@ struct TRINITY_DLL_DECL instance_shadowfang_keep : public ScriptedInstance return 0; } + const char* Save() + { + return str_data.c_str(); + } + + void Load(const char* in) + { + if (!in) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(in); + + std::istringstream loadStream(in); + loadStream >> Encounter[0] >> Encounter[1] >> Encounter[2] >> Encounter[3]; + + for(uint8 i = 0; i < ENCOUNTERS; ++i) + if (Encounter[i] == IN_PROGRESS) + Encounter[i] = NOT_STARTED; + + OUT_LOAD_INST_DATA_COMPLETE; + } }; InstanceData* GetInstanceData_instance_shadowfang_keep(Map* map) diff --git a/src/bindings/scripts/scripts/zone/shadowfang_keep/shadowfang_keep.cpp b/src/bindings/scripts/scripts/zone/shadowfang_keep/shadowfang_keep.cpp index 94d09998acc..471efff8c95 100644 --- a/src/bindings/scripts/scripts/zone/shadowfang_keep/shadowfang_keep.cpp +++ b/src/bindings/scripts/scripts/zone/shadowfang_keep/shadowfang_keep.cpp @@ -84,8 +84,12 @@ CreatureAI* GetAI_npc_shadowfang_prisoner(Creature *_Creature) bool GossipHello_npc_shadowfang_prisoner(Player *player, Creature *_Creature) { ScriptedInstance* pInstance = ((ScriptedInstance*)_Creature->GetInstanceData()); + + if (!pInstance) + return false; - player->ADD_GOSSIP_ITEM( 0, GOSSIP_ITEM_DOOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + if (pInstance->GetData(TYPE_FREE_NPC) != DONE && pInstance->GetData(TYPE_RETHILGORE) == DONE) + player->ADD_GOSSIP_ITEM( 0, GOSSIP_ITEM_DOOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID()); @@ -97,7 +101,7 @@ bool GossipSelect_npc_shadowfang_prisoner(Player *player, Creature *_Creature, u if (action == GOSSIP_ACTION_INFO_DEF+1) { player->CLOSE_GOSSIP_MENU(); - ((npc_escortAI*)(_Creature->AI()))->Start(false, false, false, player->GetGUID()); + ((npc_escortAI*)(_Creature->AI()))->Start(false, false, false); } return true; } -- cgit v1.2.3 From 2c119369baddfc41470355ad2435eac451ecdc63 Mon Sep 17 00:00:00 2001 From: KingPin Date: Sun, 18 Jan 2009 09:43:51 -0500 Subject: CMake fix for scripting library, thanx raczman --HG-- branch : trunk --- src/bindings/interface/CMakeLists.txt | 2 +- src/bindings/scripts/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/bindings/interface/CMakeLists.txt b/src/bindings/interface/CMakeLists.txt index 4a8f0872422..4cffc6446fd 100644 --- a/src/bindings/interface/CMakeLists.txt +++ b/src/bindings/interface/CMakeLists.txt @@ -11,7 +11,7 @@ SET(trinityinterface_LIB_SRCS Scripts/sc_defines.h ) -add_library(trinityinterface STATIC ${trinityinterface_LIB_SRCS}) +add_library(trinityinterface SHARED ${trinityinterface_LIB_SRCS}) target_link_libraries(trinityinterface) diff --git a/src/bindings/scripts/CMakeLists.txt b/src/bindings/scripts/CMakeLists.txt index 636530b9527..0ee315816e1 100644 --- a/src/bindings/scripts/CMakeLists.txt +++ b/src/bindings/scripts/CMakeLists.txt @@ -380,7 +380,7 @@ SET(trinityscript_LIB_SRCS system.cpp ) -add_library(trinityscript STATIC ${trinityscript_LIB_SRCS}) +add_library(trinityscript SHARED ${trinityscript_LIB_SRCS}) target_link_libraries(trinityscript) -- cgit v1.2.3 From bed8e3b87aff6f1d5a38377e3d4612af5098d11f Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sun, 18 Jan 2009 17:14:54 +0100 Subject: *Updated Shadow Labyrinth script --HG-- branch : trunk --- .../shadow_labyrinth/instance_shadow_labyrinth.cpp | 98 ++++++++++++++++++---- 1 file changed, 84 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp b/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp index f27fe6d0226..de45a54e043 100644 --- a/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp +++ b/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp @@ -41,16 +41,19 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance instance_shadow_labyrinth(Map *map) : ScriptedInstance(map) {Initialize();}; uint32 Encounter[ENCOUNTERS]; + std::string str_data; + + uint64 RefectoryDoorGUID; + uint64 ScreamingHallDoorGUID; - GameObject *RefectoryDoor; - GameObject *ScreamingHallDoor; uint64 GrandmasterVorpil; uint32 FelOverseerCount; void Initialize() { - RefectoryDoor = NULL; - ScreamingHallDoor = NULL; + RefectoryDoorGUID = 0; + ScreamingHallDoorGUID = 0; + GrandmasterVorpil = 0; FelOverseerCount = 0; @@ -70,12 +73,8 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance { switch(go->GetEntry()) { - case REFECTORY_DOOR: - RefectoryDoor = go; - break; - case SCREAMING_HALL_DOOR: - ScreamingHallDoor = go; - break; + case REFECTORY_DOOR: RefectoryDoorGUID = go->GetGUID(); break; + case SCREAMING_HALL_DOOR: ScreamingHallDoorGUID = go->GetGUID(); break; } } @@ -93,6 +92,37 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance } } + Player* GetPlayerInMap() + { + Map::PlayerList const& players = instance->GetPlayers(); + + if (!players.isEmpty()) + { + for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + { + if (Player* plr = itr->getSource()) + return plr; + } + } + + debug_log("SD2: Instance Shadow Labyrinth: GetPlayerInMap, but PlayerList is empty!"); + return NULL; + } + + void HandleGameObject(uint64 guid, uint32 state) + { + Player *player = GetPlayerInMap(); + + if (!player || !guid) + { + debug_log("SD2: Shadow Labyrinth: HandleGameObject fail"); + return; + } + + if (GameObject *go = GameObject::GetGameObject(*player,guid)) + go->SetGoState(state); + } + void SetData(uint32 type, uint32 data) { switch(type) @@ -119,8 +149,7 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance case DATA_BLACKHEARTTHEINCITEREVENT: if( data == DONE ) { - if( RefectoryDoor ) - RefectoryDoor->UseDoorOrButton(); + HandleGameObject(RefectoryDoorGUID,0); } Encounter[2] = data; break; @@ -128,8 +157,7 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance case DATA_GRANDMASTERVORPILEVENT: if( data == DONE ) { - if( ScreamingHallDoor ) - ScreamingHallDoor->UseDoorOrButton(); + HandleGameObject(ScreamingHallDoorGUID,0); } Encounter[3] = data; break; @@ -138,6 +166,23 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance Encounter[4] = data; break; } + + if (data == DONE) + { + if (type == TYPE_OVERSEER && FelOverseerCount != 0) + return; + + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << Encounter[0] << " " << Encounter[1] << " " + << Encounter[2] << " " << Encounter[3] << " " << Encounter[4]; + + str_data = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } } uint32 GetData(uint32 type) @@ -161,6 +206,31 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance return 0; } + + const char* Save() + { + return str_data.c_str(); + } + + void Load(const char* in) + { + if (!in) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(in); + + std::istringstream loadStream(in); + loadStream >> Encounter[0] >> Encounter[1] >> Encounter[2] >> Encounter[3] >> Encounter[4]; + + for(uint8 i = 0; i < ENCOUNTERS; ++i) + if (Encounter[i] == IN_PROGRESS) + Encounter[i] = NOT_STARTED; + + OUT_LOAD_INST_DATA_COMPLETE; + } }; InstanceData* GetInstanceData_instance_shadow_labyrinth(Map* map) -- cgit v1.2.3 From 1f3e051d22e4c482e83b4dd4051bf1690e7be5ed Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sun, 18 Jan 2009 17:46:33 +0100 Subject: *Some update on Skyriss event - by Anubisss --HG-- branch : trunk --- .../zone/tempest_keep/arcatraz/arcatraz.cpp | 5 ++-- .../arcatraz/boss_harbinger_skyriss.cpp | 27 ++++++++-------------- 2 files changed, 11 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/arcatraz.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/arcatraz.cpp index 5f93ac2d5a0..d4433c7afe5 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/arcatraz.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/arcatraz.cpp @@ -258,8 +258,6 @@ CreatureAI* GetAI_npc_millhouse_manastorm(Creature *_Creature) #define SPELL_TARGET_OMEGA 36852 #define SPELL_BUBBLE_VISUAL 36849 -#define GOBJECT_SHIELD 184802 - struct TRINITY_DLL_DECL npc_warden_mellicharAI : public ScriptedAI { npc_warden_mellicharAI(Creature *c) : ScriptedAI(c) @@ -360,7 +358,8 @@ struct TRINITY_DLL_DECL npc_warden_mellicharAI : public ScriptedAI case 2: DoCast(m_creature,SPELL_TARGET_ALPHA); pInstance->SetData(TYPE_WARDEN_1,IN_PROGRESS); - m_creature->SummonGameObject(GOBJECT_SHIELD, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()-0.5, m_creature->GetOrientation(), 0, 0, 0, 0, 0); + if (GameObject *Sphere = GameObject::GetGameObject(*m_creature,pInstance->GetData64(DATA_SPHERE_SHIELD))) + Sphere->SetGoState(1); break; case 3: DoCast(m_creature,SPELL_TARGET_BETA); diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp index 905f2361c55..823d35ed414 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp @@ -79,7 +79,8 @@ struct TRINITY_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI void Reset() { - m_creature->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NOT_ATTACKABLE_2); + if(!Intro) + m_creature->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NOT_ATTACKABLE_2); IsImage33 = false; IsImage66 = false; @@ -95,19 +96,13 @@ struct TRINITY_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI void MoveInLineOfSight(Unit *who) { if(!Intro) - ScriptedAI::MoveInLineOfSight(who); + { + return; + } + ScriptedAI::MoveInLineOfSight(who); } - void AttackStart(Unit* who) - { - if(!Intro) - ScriptedAI::AttackStart(who); - } - - void Aggro(Unit *who) - { - m_creature->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NOT_ATTACKABLE_2); - } + void Aggro(Unit *who) {} void JustDied(Unit* Killer) { @@ -129,11 +124,6 @@ struct TRINITY_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI } } - void JustSummoned(Creature *summoned) - { - summoned->AI()->AttackStart(m_creature->getVictim()); - } - void DoSplit(uint32 val) { if( m_creature->IsNonMeleeSpellCasted(false) ) @@ -149,7 +139,7 @@ struct TRINITY_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if( !Intro && !InCombat ) + if(!Intro) { if( !pInstance ) return; @@ -178,6 +168,7 @@ struct TRINITY_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI Intro_Timer = 3000; break; case 3: + m_creature->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NOT_ATTACKABLE_2); Intro = true; break; } -- cgit v1.2.3 From f4991543db423f246fb806f0af462d0a610f6b95 Mon Sep 17 00:00:00 2001 From: megamage Date: Sun, 18 Jan 2009 10:55:16 -0600 Subject: *Fix a crash bug. Do not use 880. --HG-- branch : trunk --- src/game/Unit.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 6d2eb1ec4cc..ef2570ddc9a 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -4662,13 +4662,6 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode) Aur->SetStackAmount(0); Aur->_RemoveAura(); - delete Aur; - - if(caster_channeled) - RemoveAurasAtChanneledTarget (AurSpellInfo); - - if(statue) - statue->UnSummon(); if(mode != AURA_REMOVE_BY_STACK) { @@ -4684,6 +4677,14 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode) } } + delete Aur; + + if(caster_channeled) + RemoveAurasAtChanneledTarget (AurSpellInfo); + + if(statue) + statue->UnSummon(); + // only way correctly remove all auras from list if( m_Auras.empty() ) i = m_Auras.end(); -- cgit v1.2.3 From eb21e69c3adf4f22366557a8a9b4c9db2a62408b Mon Sep 17 00:00:00 2001 From: megamage Date: Sun, 18 Jan 2009 11:06:54 -0600 Subject: *Fix the bug that shaman's elemental attack shaman himself. --HG-- branch : trunk --- src/game/SpellEffects.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index ab35c5f3d76..c04b08d80f0 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -3579,7 +3579,8 @@ void Spell::EffectSummonGuardian(uint32 i) } // trigger - if(!m_originalCaster || m_originalCaster->GetTypeId() != TYPEID_PLAYER /*m_spellInfo->Id == 40276*/) + if(!m_originalCaster || m_originalCaster->GetTypeId() != TYPEID_PLAYER + && !((Creature*)m_originalCaster)->isTotem()/*m_spellInfo->Id == 40276*/) { EffectSummonWild(i); return; -- cgit v1.2.3 From 85f171307fe10823101e61c55a6c7d7d07d35143 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sun, 18 Jan 2009 18:29:55 +0100 Subject: *Implemented configurable flying mount use on maps - by Zor --HG-- branch : trunk --- src/game/Spell.cpp | 26 +++++++++++++++++++++++--- src/game/World.cpp | 5 +++++ src/game/World.h | 4 ++++ src/trinitycore/trinitycore.conf.dist | 18 ++++++++++++++++++ 4 files changed, 50 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index aa0d24ffdb8..ddfb9c01be5 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -4168,9 +4168,29 @@ uint8 Spell::CanCast(bool strict) // not allow cast fly spells at old maps by players (all spells is self target) if(m_caster->GetTypeId()==TYPEID_PLAYER) { - if( !((Player*)m_caster)->isGameMaster() && - GetVirtualMapForMapAndZone(m_caster->GetMapId(),m_caster->GetZoneId()) != 530) - return SPELL_FAILED_NOT_HERE; + if(!((Player*)m_caster)->isGameMaster()) + { + uint32 v_map = GetVirtualMapForMapAndZone(m_caster->GetMapId(),m_caster->GetZoneId()); + switch(v_map) + { + case 0: + case 1: + { + if (!sWorld.getConfig(CONFIG_FLYING_MOUNTS_AZEROTH)) + return SPELL_FAILED_NOT_HERE; + } break; + case 530: + { + if (!sWorld.getConfig(CONFIG_FLYING_MOUNTS_OUTLAND)) + return SPELL_FAILED_NOT_HERE; + } break; + default: + { + if (!sWorld.getConfig(CONFIG_FLYING_MOUNTS_OTHERS)) + return SPELL_FAILED_NOT_HERE; + } break; + } + } } break; diff --git a/src/game/World.cpp b/src/game/World.cpp index 89a0b75cd36..219c656dcaf 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -526,6 +526,11 @@ void World::LoadConfigSettings(bool reload) ///- Read other configuration items from the config file + ///- Do we allow flying mounts in Azeroth/Outland and others (others being instances, BGs, arenas)? + m_configs[CONFIG_FLYING_MOUNTS_AZEROTH] = sConfig.GetBoolDefault("FlyingMounts.Azeroth", false); + m_configs[CONFIG_FLYING_MOUNTS_OUTLAND] = sConfig.GetBoolDefault("FlyingMounts.Outland", true); + m_configs[CONFIG_FLYING_MOUNTS_OTHERS] = sConfig.GetBoolDefault("FlyingMounts.Others", false); + m_configs[CONFIG_COMPRESSION] = sConfig.GetIntDefault("Compression", 1); if(m_configs[CONFIG_COMPRESSION] < 1 || m_configs[CONFIG_COMPRESSION] > 9) { diff --git a/src/game/World.h b/src/game/World.h index 63d9b52d7f2..e2e2096726a 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -184,6 +184,10 @@ enum WorldConfigs CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS, CONFIG_BATTLEGROUND_PREMATURE_FINISH_TIMER, + CONFIG_FLYING_MOUNTS_AZEROTH, + CONFIG_FLYING_MOUNTS_OUTLAND, + CONFIG_FLYING_MOUNTS_OTHERS, + CONFIG_MAX_WHO, CONFIG_BG_START_MUSIC, CONFIG_START_ALL_SPELLS, diff --git a/src/trinitycore/trinitycore.conf.dist b/src/trinitycore/trinitycore.conf.dist index 27253cc875b..7da04b0bdf6 100644 --- a/src/trinitycore/trinitycore.conf.dist +++ b/src/trinitycore/trinitycore.conf.dist @@ -502,6 +502,21 @@ LogColors = "" # Default: 0 (false) # 1 (true) # +# FlyingMounts.Azeroth +# Enable/disable flying mounts in Azeroth (map 0 and 1). +# Default: 0 - off +# 1 - on (may be crashy) +# +# FlyingMounts.Outland +# Enable/disable flying mounts in Outland (map 530). +# Default: 1 - on +# 0 - off +# +# FlyingMounts.Others +# Enable/disable flying mounts in other maps (instances, arenas, BGs, etc). +# Default: 0 - off +# 1 - on (may be crashy) +# # CastUnstuck # Allow cast or not Unstuck spell at .start or client Help option use # Default: 1 (true) @@ -607,6 +622,9 @@ ActivateWeather = 1 Battleground.CastDeserter = 1 Battleground.QueueAnnouncer.Enable = 1 Battleground.QueueAnnouncer.PlayerOnly = 0 +FlyingMounts.Azeroth = 0 +FlyingMounts.Outland = 1 +FlyingMounts.Others = 0 CastUnstuck = 1 Instance.IgnoreLevel = 0 Instance.IgnoreRaid = 0 -- cgit v1.2.3 From a88ee15ef370afb1e53e064e872ddba056c71012 Mon Sep 17 00:00:00 2001 From: megamage Date: Sun, 18 Jan 2009 11:39:25 -0600 Subject: *Add some debug message to find crash bug. --HG-- branch : trunk --- src/game/Unit.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index ef2570ddc9a..ed921d85fa5 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -258,8 +258,9 @@ Unit::~Unit() if(m_charmInfo) delete m_charmInfo; - RemoveAllAuras(); - assert(m_Auras.begin() == m_Auras.end()); + sLog.outDetail("Deconstruct Unit Entry = %u", GetEntry()); + if(m_scAuras.size()) + sLog.outError("Unit %u has sc auras during deconstruction", GetEntry()); } void Unit::Update( uint32 p_time ) -- cgit v1.2.3 From d97bb39393e45a9aacf2c2f03c5ca36bebc7e92e Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sun, 18 Jan 2009 19:35:15 +0100 Subject: *Added missing file --HG-- branch : trunk --- src/shared/revision.h | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/shared/revision.h (limited to 'src') diff --git a/src/shared/revision.h b/src/shared/revision.h new file mode 100644 index 00000000000..5ae723c641f --- /dev/null +++ b/src/shared/revision.h @@ -0,0 +1,7 @@ +#ifndef __REVISION_H__ +#define __REVISION_H__ + #define _REVISION "896" + #define _HASH "2fc9fa91df4b" + #define _REVISION_DATE "*" + #define _REVISION_TIME "*" +#endif // __REVISION_H__ -- cgit v1.2.3 From 137d270f0a03caf35017b2ff91451ee6b0a32c71 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sun, 18 Jan 2009 19:48:01 +0100 Subject: *Updated blackrock_depths - thanks for nofantasy --HG-- branch : trunk --- sql/updates/905_world_scripts.sql | 10 + src/bindings/scripts/Makefile.am | 12 +- src/bindings/scripts/ScriptMgr.cpp | 36 +- src/bindings/scripts/VC71/71ScriptDev2.vcproj | 36 +- src/bindings/scripts/VC80/80ScriptDev2.vcproj | 36 +- src/bindings/scripts/VC90/90ScriptDev2.vcproj | 26 +- .../zone/blackrock_depths/blackrock_depths.cpp | 553 +++++++++++++++++++-- .../zone/blackrock_depths/boss_angerrel.cpp | 91 ---- .../scripts/zone/blackrock_depths/boss_doomrel.cpp | 139 ------ .../scripts/zone/blackrock_depths/boss_doperel.cpp | 91 ---- .../zone/blackrock_depths/boss_gloomrel.cpp | 142 ------ .../scripts/zone/blackrock_depths/boss_haterel.cpp | 105 ---- .../zone/blackrock_depths/boss_seethrel.cpp | 115 ----- .../scripts/zone/blackrock_depths/boss_vilerel.cpp | 101 ---- .../zone/blackrock_depths/def_blackrock_depths.h | 59 +-- .../blackrock_depths/instance_blackrock_depths.cpp | 411 ++++++++------- 16 files changed, 824 insertions(+), 1139 deletions(-) create mode 100644 sql/updates/905_world_scripts.sql delete mode 100644 src/bindings/scripts/scripts/zone/blackrock_depths/boss_angerrel.cpp delete mode 100644 src/bindings/scripts/scripts/zone/blackrock_depths/boss_doomrel.cpp delete mode 100644 src/bindings/scripts/scripts/zone/blackrock_depths/boss_doperel.cpp delete mode 100644 src/bindings/scripts/scripts/zone/blackrock_depths/boss_gloomrel.cpp delete mode 100644 src/bindings/scripts/scripts/zone/blackrock_depths/boss_haterel.cpp delete mode 100644 src/bindings/scripts/scripts/zone/blackrock_depths/boss_seethrel.cpp delete mode 100644 src/bindings/scripts/scripts/zone/blackrock_depths/boss_vilerel.cpp (limited to 'src') diff --git a/sql/updates/905_world_scripts.sql b/sql/updates/905_world_scripts.sql new file mode 100644 index 00000000000..3e59e1f0e52 --- /dev/null +++ b/sql/updates/905_world_scripts.sql @@ -0,0 +1,10 @@ +UPDATE `creature_template` SET `ScriptName`='npc_grimstone' WHERE `entry`=10096; +UPDATE `creature_template` SET `ScriptName`='mob_phalanx' WHERE `entry`=9502; +UPDATE `creature_template` SET `ScriptName`='npc_rocknot' WHERE `entry`=9503; + +DELETE FROM `areatrigger_scripts` WHERE `entry`=1526; +INSERT INTO `areatrigger_scripts` VALUES (1526,'at_ring_of_law'); + +DELETE FROM `script_texts` WHERE `entry`=-1230000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1230000,'Ah, hits the spot!',0,0,0,'rocknot SAY_GOT_BEER'); \ No newline at end of file diff --git a/src/bindings/scripts/Makefile.am b/src/bindings/scripts/Makefile.am index 87cdb11db0a..e5eb629a84d 100644 --- a/src/bindings/scripts/Makefile.am +++ b/src/bindings/scripts/Makefile.am @@ -102,24 +102,18 @@ scripts/zone/black_temple/def_black_temple.h \ scripts/zone/black_temple/illidari_council.cpp \ scripts/zone/black_temple/instance_black_temple.cpp \ scripts/zone/blackrock_depths/blackrock_depths.cpp \ -scripts/zone/blackrock_depths/instance_blackrock_depths.cpp \ -scripts/zone/blackrock_depths/def_blackrock_depths.h \ scripts/zone/blackrock_depths/boss_ambassador_flamelash.cpp \ -scripts/zone/blackrock_depths/boss_angerrel.cpp \ scripts/zone/blackrock_depths/boss_anubshiah.cpp \ -scripts/zone/blackrock_depths/boss_doomrel.cpp \ -scripts/zone/blackrock_depths/boss_doperel.cpp \ scripts/zone/blackrock_depths/boss_emperor_dagran_thaurissan.cpp \ scripts/zone/blackrock_depths/boss_general_angerforge.cpp \ -scripts/zone/blackrock_depths/boss_gloomrel.cpp \ scripts/zone/blackrock_depths/boss_gorosh_the_dervish.cpp \ scripts/zone/blackrock_depths/boss_grizzle.cpp \ -scripts/zone/blackrock_depths/boss_haterel.cpp \ scripts/zone/blackrock_depths/boss_high_interrogator_gerstahn.cpp \ scripts/zone/blackrock_depths/boss_magmus.cpp \ scripts/zone/blackrock_depths/boss_moira_bronzebeard.cpp \ -scripts/zone/blackrock_depths/boss_seethrel.cpp \ -scripts/zone/blackrock_depths/boss_vilerel.cpp \ +scripts/zone/blackrock_depths/boss_tomb_of_seven.cpp \ +scripts/zone/blackrock_depths/def_blackrock_depths.h \ +scripts/zone/blackrock_depths/instance_blackrock_depths.cpp \ scripts/zone/blackrock_spire/boss_drakkisath.cpp \ scripts/zone/blackrock_spire/boss_gyth.cpp \ scripts/zone/blackrock_spire/boss_halycon.cpp \ diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp index b804b40b4f8..d415e8adfbe 100644 --- a/src/bindings/scripts/ScriptMgr.cpp +++ b/src/bindings/scripts/ScriptMgr.cpp @@ -163,21 +163,16 @@ extern void AddSC_instance_black_temple(); //Blackrock Depths extern void AddSC_blackrock_depths(); extern void AddSC_boss_ambassador_flamelash(); -extern void AddSC_boss_angerrel(); extern void AddSC_boss_anubshiah(); -extern void AddSC_boss_doomrel(); -extern void AddSC_boss_doperel(); extern void AddSC_boss_draganthaurissan(); extern void AddSC_boss_general_angerforge(); -extern void AddSC_boss_gloomrel(); extern void AddSC_boss_gorosh_the_dervish(); extern void AddSC_boss_grizzle(); -extern void AddSC_boss_haterel(); extern void AddSC_boss_high_interrogator_gerstahn(); extern void AddSC_boss_magmus(); extern void AddSC_boss_moira_bronzebeard(); -extern void AddSC_boss_seethrel(); -extern void AddSC_boss_vilerel(); +extern void AddSC_boss_tomb_of_seven(); +extern void AddSC_instance_blackrock_depths(); //Blackrock Spire extern void AddSC_boss_drakkisath(); @@ -1372,22 +1367,17 @@ void ScriptsInit() //Blackfathom Depths //Blackrock Depths AddSC_blackrock_depths(); - AddSC_boss_ambassador_flamelash(); - AddSC_boss_angerrel(); - AddSC_boss_anubshiah(); - AddSC_boss_doomrel(); - AddSC_boss_doperel(); - AddSC_boss_draganthaurissan(); - AddSC_boss_general_angerforge(); - AddSC_boss_gloomrel(); - AddSC_boss_gorosh_the_dervish(); - AddSC_boss_grizzle(); - AddSC_boss_haterel(); - AddSC_boss_high_interrogator_gerstahn(); - AddSC_boss_magmus(); - AddSC_boss_moira_bronzebeard(); - AddSC_boss_seethrel(); - AddSC_boss_vilerel(); + AddSC_boss_ambassador_flamelash(); + AddSC_boss_anubshiah(); + AddSC_boss_draganthaurissan(); + AddSC_boss_general_angerforge(); + AddSC_boss_gorosh_the_dervish(); + AddSC_boss_grizzle(); + AddSC_boss_high_interrogator_gerstahn(); + AddSC_boss_magmus(); + AddSC_boss_moira_bronzebeard(); + AddSC_boss_tomb_of_seven(); + AddSC_instance_blackrock_depths(); //Blackrock Spire AddSC_boss_drakkisath(); diff --git a/src/bindings/scripts/VC71/71ScriptDev2.vcproj b/src/bindings/scripts/VC71/71ScriptDev2.vcproj index 564ac2d109e..cf7ffbe6c49 100644 --- a/src/bindings/scripts/VC71/71ScriptDev2.vcproj +++ b/src/bindings/scripts/VC71/71ScriptDev2.vcproj @@ -2099,23 +2099,11 @@ - - - + - - - - - + @@ -2123,11 +2111,7 @@ - - - + @@ -2135,11 +2119,7 @@ - - - + @@ -2151,13 +2131,9 @@ - - - + diff --git a/src/bindings/scripts/VC80/80ScriptDev2.vcproj b/src/bindings/scripts/VC80/80ScriptDev2.vcproj index 7173c0f4950..3ec35fdab77 100644 --- a/src/bindings/scripts/VC80/80ScriptDev2.vcproj +++ b/src/bindings/scripts/VC80/80ScriptDev2.vcproj @@ -2276,23 +2276,11 @@ - - - + - - - - - + @@ -2300,11 +2288,7 @@ - - - + @@ -2312,11 +2296,7 @@ - - - + @@ -2328,13 +2308,9 @@ - - - + diff --git a/src/bindings/scripts/VC90/90ScriptDev2.vcproj b/src/bindings/scripts/VC90/90ScriptDev2.vcproj index 2b6274afb28..5f78d46ec93 100644 --- a/src/bindings/scripts/VC90/90ScriptDev2.vcproj +++ b/src/bindings/scripts/VC90/90ScriptDev2.vcproj @@ -2262,22 +2262,10 @@ RelativePath="..\scripts\zone\blackrock_depths\boss_ambassador_flamelash.cpp" > - - - - - - @@ -2286,10 +2274,6 @@ RelativePath="..\scripts\zone\blackrock_depths\boss_general_angerforge.cpp" > - - @@ -2298,10 +2282,6 @@ RelativePath="..\scripts\zone\blackrock_depths\boss_grizzle.cpp" > - - @@ -2315,11 +2295,7 @@ > - - GetInstanceData()); + + if (pInstance) + { + if (pInstance->GetData(TYPE_RING_OF_LAW) == IN_PROGRESS || pInstance->GetData(TYPE_RING_OF_LAW) == DONE) + return false; + + pInstance->SetData(TYPE_RING_OF_LAW,IN_PROGRESS); + player->SummonCreature(C_GRIMSTONE,625.559,-205.618,-52.735,2.609,TEMPSUMMON_DEAD_DESPAWN,0); + + return false; + } + return false; +} + +/*###### +## npc_grimstone +######*/ + +//TODO: implement quest part of event (different end boss) +struct TRINITY_DLL_DECL npc_grimstoneAI : public npc_escortAI +{ + npc_grimstoneAI(Creature *c) : npc_escortAI(c) + { + pInstance = ((ScriptedInstance*)c->GetInstanceData()); + MobSpawnId = rand()%6; + Reset(); + } + + ScriptedInstance* pInstance; + + uint8 EventPhase; + uint32 Event_Timer; + + uint8 MobSpawnId; + uint8 MobCount; + uint32 MobDeath_Timer; + + uint64 RingMobGUID[4]; + uint64 RingBossGUID; + + bool CanWalk; + + void Reset() + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + EventPhase = 0; + Event_Timer = 1000; + + MobCount = 0; + MobDeath_Timer = 0; + + for(uint8 i = 0; i < MOB_AMOUNT; i++) + RingMobGUID[i] = 0; + + RingBossGUID = 0; + + CanWalk = false; + } + + void Aggro(Unit *who) { } + + void DoGate(uint32 id, uint32 state) + { + if (GameObject *go = GameObject::GetGameObject(*m_creature,pInstance->GetData64(id))) + go->SetGoState(state); + + debug_log("SD2: npc_grimstone, arena gate update state."); + } + + //TODO: move them to center + void SummonRingMob() + { + if (Creature* tmp = m_creature->SummonCreature(RingMob[MobSpawnId],608.960,-235.322,-53.907,1.857,TEMPSUMMON_DEAD_DESPAWN,0)) + RingMobGUID[MobCount] = tmp->GetGUID(); + + ++MobCount; + + if (MobCount == MOB_AMOUNT) + MobDeath_Timer = 2500; + } + + //TODO: move them to center + void SummonRingBoss() + { + if (Creature* tmp = m_creature->SummonCreature(RingBoss[rand()%6],644.300,-175.989,-53.739,3.418,TEMPSUMMON_DEAD_DESPAWN,0)) + RingBossGUID = tmp->GetGUID(); + + MobDeath_Timer = 2500; + } + + void WaypointReached(uint32 i) + { + switch(i) + { + case 0: + DoScriptText(-1000000, m_creature);//2 + CanWalk = false; + Event_Timer = 5000; + break; + case 1: + DoScriptText(-1000000, m_creature);//4 + CanWalk = false; + Event_Timer = 5000; + break; + case 2: + CanWalk = false; + break; + case 3: + DoScriptText(-1000000, m_creature);//5 + break; + case 4: + DoScriptText(-1000000, m_creature);//6 + CanWalk = false; + Event_Timer = 5000; + break; + case 5: + if (pInstance) + { + pInstance->SetData(TYPE_RING_OF_LAW,DONE); + debug_log("SD2: npc_grimstone: event reached end and set complete."); + } + break; + } + } + + void UpdateAI(const uint32 diff) + { + if (!pInstance) + return; + + if (MobDeath_Timer) + { + if (MobDeath_Timer <= diff) + { + MobDeath_Timer = 2500; + + if (RingBossGUID) + { + Creature *boss = (Creature*)Unit::GetUnit(*m_creature,RingBossGUID); + if (boss && !boss->isAlive() && boss->isDead()) + { + RingBossGUID = 0; + Event_Timer = 5000; + MobDeath_Timer = 0; + return; + } + return; + } + + for(uint8 i = 0; i < MOB_AMOUNT; i++) + { + Creature *mob = (Creature*)Unit::GetUnit(*m_creature,RingMobGUID[i]); + if (mob && !mob->isAlive() && mob->isDead()) + { + RingMobGUID[i] = 0; + --MobCount; + + //seems all are gone, so set timer to continue and discontinue this + if (!MobCount) + { + Event_Timer = 5000; + MobDeath_Timer = 0; + } + } + } + }else MobDeath_Timer -= diff; + } + + if (Event_Timer) + { + if (Event_Timer <= diff) + { + switch(EventPhase) + { + case 0: + DoScriptText(-1000000, m_creature);//1 + DoGate(DATA_ARENA4,1); + Start(false, false, false); + CanWalk = true; + Event_Timer = 0; + break; + case 1: + CanWalk = true; + Event_Timer = 0; + break; + case 2: + Event_Timer = 2000; + break; + case 3: + DoGate(DATA_ARENA1,0); + Event_Timer = 3000; + break; + case 4: + CanWalk = true; + m_creature->SetVisibility(VISIBILITY_OFF); + SummonRingMob(); + Event_Timer = 8000; + break; + case 5: + SummonRingMob(); + SummonRingMob(); + Event_Timer = 8000; + break; + case 6: + SummonRingMob(); + Event_Timer = 0; + break; + case 7: + m_creature->SetVisibility(VISIBILITY_ON); + DoGate(DATA_ARENA1,1); + DoScriptText(-1000000, m_creature);//4 + CanWalk = true; + Event_Timer = 0; + break; + case 8: + DoGate(DATA_ARENA2,0); + Event_Timer = 5000; + break; + case 9: + m_creature->SetVisibility(VISIBILITY_OFF); + SummonRingBoss(); + Event_Timer = 0; + break; + case 10: + //if quest, complete + DoGate(DATA_ARENA2,1); + DoGate(DATA_ARENA3,0); + DoGate(DATA_ARENA4,0); + CanWalk = true; + Event_Timer = 0; + break; + } + ++EventPhase; + }else Event_Timer -= diff; + } + + if (CanWalk) + npc_escortAI::UpdateAI(diff); + } +}; + +CreatureAI* GetAI_npc_grimstone(Creature *_Creature) +{ + npc_grimstoneAI* Grimstone_AI = new npc_grimstoneAI(_Creature); + + for(uint8 i = 0; i < 6; ++i) + Grimstone_AI->AddWaypoint(i, RingLocations[i][0], RingLocations[i][1], RingLocations[i][2]); + + return (CreatureAI*)Grimstone_AI; + +} + /*###### ## mob_phalanx ######*/ @@ -107,19 +402,33 @@ CreatureAI* GetAI_mob_phalanx(Creature *_Creature) #define QUEST_4001 4001 #define QUEST_4342 4342 +#define GOSSIP_ITEM_KHARAN_1 "I need to know where the princess are, Kharan!" +#define GOSSIP_ITEM_KHARAN_2 "All is not lost, Kharan!" + +#define GOSSIP_ITEM_KHARAN_3 "Gor'shak is my friend, you can trust me." +#define GOSSIP_ITEM_KHARAN_4 "Not enough, you need to tell me more." +#define GOSSIP_ITEM_KHARAN_5 "So what happened?" +#define GOSSIP_ITEM_KHARAN_6 "Continue..." +#define GOSSIP_ITEM_KHARAN_7 "So you suspect that someone on the inside was involved? That they were tipped off?" +#define GOSSIP_ITEM_KHARAN_8 "Continue with your story please." +#define GOSSIP_ITEM_KHARAN_9 "Indeed." +#define GOSSIP_ITEM_KHARAN_10 "The door is open, Kharan. You are a free man." + bool GossipHello_npc_kharan_mighthammer(Player *player, Creature *_Creature) { if( _Creature->isQuestGiver() ) player->PrepareQuestMenu( _Creature->GetGUID() ); if( player->GetQuestStatus(QUEST_4001) == QUEST_STATUS_INCOMPLETE ) - player->ADD_GOSSIP_ITEM( 0, "I need to know where the princess are, Kharan!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + player->ADD_GOSSIP_ITEM( 0, GOSSIP_ITEM_KHARAN_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); if( player->GetQuestStatus(4342) == QUEST_STATUS_INCOMPLETE ) - player->ADD_GOSSIP_ITEM( 0, "All is not lost, Kharan!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + player->ADD_GOSSIP_ITEM( 0, GOSSIP_ITEM_KHARAN_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - if( player->GetTeam() == HORDE ) player->SEND_GOSSIP_MENU(2473, _Creature->GetGUID()); - if( player->GetTeam() == ALLIANCE ) player->SEND_GOSSIP_MENU(2474, _Creature->GetGUID()); + if (player->GetTeam() == HORDE) + player->SEND_GOSSIP_MENU(2473, _Creature->GetGUID()); + else + player->SEND_GOSSIP_MENU(2474, _Creature->GetGUID()); return true; } @@ -129,42 +438,44 @@ bool GossipSelect_npc_kharan_mighthammer(Player *player, Creature *_Creature, ui switch (action) { case GOSSIP_ACTION_INFO_DEF+1: - player->ADD_GOSSIP_ITEM(0, "Gor'shak is my friend, you can trust me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_KHARAN_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); player->SEND_GOSSIP_MENU(2475, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+2: - player->ADD_GOSSIP_ITEM(0, "Not enough, you need to tell me more.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_KHARAN_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); player->SEND_GOSSIP_MENU(2476, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+3: - player->ADD_GOSSIP_ITEM(0, "So what happened?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_KHARAN_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); player->SEND_GOSSIP_MENU(2477, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+4: - player->ADD_GOSSIP_ITEM(0, "Continue...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_KHARAN_6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); player->SEND_GOSSIP_MENU(2478, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+5: - player->ADD_GOSSIP_ITEM(0, "So you suspect that someone on the inside was involved? That they were tipped off?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_KHARAN_7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); player->SEND_GOSSIP_MENU(2479, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+6: - player->ADD_GOSSIP_ITEM(0, "Continue with your story please.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7); + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_KHARAN_8, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7); player->SEND_GOSSIP_MENU(2480, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+7: - player->ADD_GOSSIP_ITEM(0, "Indeed.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+8); + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_KHARAN_9, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+8); player->SEND_GOSSIP_MENU(2481, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+8: - player->ADD_GOSSIP_ITEM(0, "The door is open, Kharan. You are a free man.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+9); + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_KHARAN_10, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+9); player->SEND_GOSSIP_MENU(2482, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+9: player->CLOSE_GOSSIP_MENU(); - if( player->GetTeam() == HORDE ) player->AreaExploredOrEventHappens(QUEST_4001); - if( player->GetTeam() == ALLIANCE ) player->AreaExploredOrEventHappens(QUEST_4342); + if (player->GetTeam() == HORDE) + player->AreaExploredOrEventHappens(QUEST_4001); + else + player->AreaExploredOrEventHappens(QUEST_4342); break; } return true; @@ -179,19 +490,22 @@ bool GossipSelect_npc_kharan_mighthammer(Player *player, Creature *_Creature, ui #define QUEST_A_BINDING_CONTRACT 7604 #define SPELL_CREATE_THORIUM_BROTHERHOOD_CONTRACT_DND 23059 +#define GOSSIP_ITEM_SHOW_ACCESS "Show me what I have access to, Lothos." +#define GOSSIP_ITEM_GET_CONTRACT "Get Thorium Brotherhood Contract" + bool GossipHello_npc_lokhtos_darkbargainer(Player *player, Creature *_Creature) { if (_Creature->isQuestGiver()) player->PrepareQuestMenu( _Creature->GetGUID() ); if (_Creature->isVendor() && player->GetReputationRank(59) >= REP_FRIENDLY) - player->ADD_GOSSIP_ITEM( 1, "Show me what I have access to, Lothos.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + player->ADD_GOSSIP_ITEM( 1, GOSSIP_ITEM_SHOW_ACCESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); if (player->GetQuestRewardStatus(QUEST_A_BINDING_CONTRACT) != 1 && !player->HasItemCount(ITEM_THRORIUM_BROTHERHOOD_CONTRACT, 1, true) && player->HasItemCount(ITEM_SULFURON_INGOT, 1)) { - player->ADD_GOSSIP_ITEM(0, "Get Thorium Brotherhood Contract", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_GET_CONTRACT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } if (player->GetReputationRank(59) < REP_FRIENDLY) @@ -209,10 +523,9 @@ bool GossipSelect_npc_lokhtos_darkbargainer(Player *player, Creature *_Creature, player->CLOSE_GOSSIP_MENU(); player->CastSpell(player, SPELL_CREATE_THORIUM_BROTHERHOOD_CONTRACT_DND, false); } - if (action == GOSSIP_ACTION_TRADE) - { - player->SEND_VENDORLIST( _Creature->GetGUID() ); - } + if (action == GOSSIP_ACTION_TRADE) + player->SEND_VENDORLIST( _Creature->GetGUID() ); + return true; } @@ -225,7 +538,7 @@ bool GossipSelect_npc_lokhtos_darkbargainer(Player *player, Creature *_Creature, #define GOSSIP_DUGHAL "You're free, Dughal! Get out of here!" ScriptedInstance *pInstance; - +/* struct TRINITY_DLL_DECL npc_dughal_stormwingAI : public npc_escortAI { npc_dughal_stormwingAI(Creature *c) : npc_escortAI(c) { Reset(); } @@ -308,7 +621,7 @@ bool GossipSelect_npc_dughal_stormwing(Player *player, Creature *_Creature, uint } return true; } - + */ /*###### ## npc_marshal_windsor ######*/ @@ -325,7 +638,7 @@ bool GossipSelect_npc_dughal_stormwing(Player *player, Creature *_Creature, uint #define MOB_ENTRY_REGINALD_WINDSOR 9682 Player* PlayerStart; - +/* struct TRINITY_DLL_DECL npc_marshal_windsorAI : public npc_escortAI { npc_marshal_windsorAI(Creature *c) : npc_escortAI(c) @@ -354,7 +667,7 @@ struct TRINITY_DLL_DECL npc_marshal_windsorAI : public npc_escortAI pInstance->SetData(DATA_SUPPLY_ROOM, ENCOUNTER_STATE_IN_PROGRESS); break; case 13: - m_creature->HandleEmoteCommand(EMOTE_STATE_USESTANDING);/*EMOTE_STATE_WORK*/ + m_creature->HandleEmoteCommand(EMOTE_STATE_USESTANDING);//EMOTE_STATE_WORK break; case 14: pInstance->SetData(DATA_GATE_SR,0); @@ -364,7 +677,7 @@ struct TRINITY_DLL_DECL npc_marshal_windsorAI : public npc_escortAI m_creature->Say(SAY_WINDSOR_9, LANG_UNIVERSAL, PlayerGUID); break; case 17: - m_creature->HandleEmoteCommand(EMOTE_STATE_USESTANDING);/*EMOTE_STATE_WORK*/ + m_creature->HandleEmoteCommand(EMOTE_STATE_USESTANDING);//EMOTE_STATE_WORK break; case 18: pInstance->SetData(DATA_GATE_SC,0); @@ -468,7 +781,7 @@ bool QuestAccept_npc_marshal_windsor(Player *player, Creature *creature, Quest c } return false; } - + */ /*###### ## npc_marshal_reginald_windsor ######*/ @@ -491,7 +804,7 @@ bool QuestAccept_npc_marshal_windsor(Player *player, Creature *creature, Quest c #define MOB_ENTRY_CREST_KILLER 9680 int wp = 0; - +/* struct TRINITY_DLL_DECL npc_marshal_reginald_windsorAI : public npc_escortAI { npc_marshal_reginald_windsorAI(Creature *c) : npc_escortAI(c) @@ -681,13 +994,13 @@ CreatureAI* GetAI_npc_marshal_reginald_windsor(Creature *_Creature) return (CreatureAI*)marshal_reginald_windsorAI; } - +*/ /*###### ## npc_tobias_seecher ######*/ #define SAY_TOBIAS_FREE "Thank you! I will run for safety immediately!" - +/* struct TRINITY_DLL_DECL npc_tobias_seecherAI : public npc_escortAI { npc_tobias_seecherAI(Creature *c) :npc_escortAI(c) {Reset();} @@ -775,6 +1088,172 @@ bool GossipSelect_npc_tobias_seecher(Player *player, Creature *_Creature, uint32 } return true; } +*/ + +/*###### +## npc_rocknot +######*/ + +#define SAY_GOT_BEER -1230000 +#define SPELL_DRUNKEN_RAGE 14872 +#define QUEST_ALE 4295 + +float BarWpLocations[8][3]= +{ + {883.294861, -188.926300, -43.703655}, + {872.763550, -185.605621, -43.703655}, //b1 + {867.923401, -188.006393, -43.703655}, //b2 + {863.295898, -190.795212, -43.703655}, //b3 + {856.139587, -194.652756, -43.703655}, //b4 + {851.878906, -196.928131, -43.703655}, //b5 + {877.035217, -187.048080, -43.703655}, + {891.198000, -197.924000, -43.620400} //home +}; + +uint32 BarWpWait[8]= +{ + 0, + 5000, + 5000, + 5000, + 5000, + 15000, + 0, + 0 +}; + +struct TRINITY_DLL_DECL npc_rocknotAI : public npc_escortAI +{ + npc_rocknotAI(Creature *c) : npc_escortAI(c) + { + pInstance = ((ScriptedInstance*)c->GetInstanceData()); + Reset(); + } + + ScriptedInstance* pInstance; + + uint32 BreakKeg_Timer; + uint32 BreakDoor_Timer; + + void Reset() + { + if (IsBeingEscorted) + return; + + BreakKeg_Timer = 0; + BreakDoor_Timer = 0; + } + + void Aggro(Unit *who) { } + + void DoGo(uint32 id, uint32 state) + { + if (GameObject *go = GameObject::GetGameObject(*m_creature,pInstance->GetData64(id))) + go->SetGoState(state); + } + + void WaypointReached(uint32 i) + { + if (!pInstance) + return; + + switch(i) + { + case 1: + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_KICK); + break; + case 2: + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_ATTACKUNARMED); + break; + case 3: + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_ATTACKUNARMED); + break; + case 4: + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_KICK); + break; + case 5: + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_KICK); + BreakKeg_Timer = 2000; + break; + } + } + + void UpdateAI(const uint32 diff) + { + if (!pInstance) + return; + + if (BreakKeg_Timer) + { + if (BreakKeg_Timer <= diff) + { + DoGo(DATA_GO_BAR_KEG,0); + BreakKeg_Timer = 0; + BreakDoor_Timer = 1000; + }else BreakKeg_Timer -= diff; + } + + if (BreakDoor_Timer) + { + if (BreakDoor_Timer <= diff) + { + DoGo(DATA_GO_BAR_DOOR,2); + DoGo(DATA_GO_BAR_KEG_TRAP,0); //doesn't work very well, leaving code here for future + //spell by trap has effect61, this indicate the bar go hostile + + if (Unit *tmp = Unit::GetUnit(*m_creature,pInstance->GetData64(DATA_PHALANX))) + tmp->setFaction(14); + + //for later, this event(s) has alot more to it. + //optionally, DONE can trigger bar to go hostile. + pInstance->SetData(TYPE_BAR,DONE); + + BreakDoor_Timer = 0; + }else BreakDoor_Timer -= diff; + } + + npc_escortAI::UpdateAI(diff); + } +}; + +CreatureAI* GetAI_npc_rocknot(Creature *_Creature) +{ + npc_rocknotAI* Rocknot_AI = new npc_rocknotAI(_Creature); + + for(uint8 i = 0; i < 8; ++i) + Rocknot_AI->AddWaypoint(i, BarWpLocations[i][0], BarWpLocations[i][1], BarWpLocations[i][2], BarWpWait[i]); + + return (CreatureAI*)Rocknot_AI; +} + +bool ChooseReward_npc_rocknot(Player *player, Creature *_Creature, const Quest *_Quest, uint32 item) +{ + ScriptedInstance* pInstance = ((ScriptedInstance*)_Creature->GetInstanceData()); + + if (!pInstance) + return true; + + if (pInstance->GetData(TYPE_BAR) == DONE || pInstance->GetData(TYPE_BAR) == SPECIAL) + return true; + + if (_Quest->GetQuestId() == QUEST_ALE) + { + if (pInstance->GetData(TYPE_BAR) != IN_PROGRESS) + pInstance->SetData(TYPE_BAR,IN_PROGRESS); + + pInstance->SetData(TYPE_BAR,SPECIAL); + + //keep track of amount in instance script, returns SPECIAL if amount ok and event in progress + if (pInstance->GetData(TYPE_BAR) == SPECIAL) + { + DoScriptText(SAY_GOT_BEER, _Creature); + _Creature->CastSpell(_Creature,SPELL_DRUNKEN_RAGE,false); + ((npc_escortAI*)(_Creature->AI()))->Start(false, false, false); + } + } + + return true; +} /*###### ## @@ -784,6 +1263,16 @@ void AddSC_blackrock_depths() { Script *newscript; + newscript = new Script; + newscript->Name = "at_ring_of_law"; + newscript->pAreaTrigger = &AreaTrigger_at_ring_of_law; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_grimstone"; + newscript->GetAI = &GetAI_npc_grimstone; + newscript->RegisterSelf(); + newscript = new Script; newscript->Name="phalanx"; newscript->GetAI = &GetAI_mob_phalanx; @@ -800,7 +1289,7 @@ void AddSC_blackrock_depths() newscript->pGossipHello = &GossipHello_npc_lokhtos_darkbargainer; newscript->pGossipSelect = &GossipSelect_npc_lokhtos_darkbargainer; newscript->RegisterSelf(); - +/* newscript = new Script; newscript->Name="npc_dughal_stormwing"; newscript->pGossipHello = &GossipHello_npc_dughal_stormwing; @@ -824,5 +1313,5 @@ void AddSC_blackrock_depths() newscript = new Script; newscript->Name="npc_marshal_reginald_windsor"; newscript->GetAI = &GetAI_npc_marshal_reginald_windsor; - newscript->RegisterSelf(); + newscript->RegisterSelf();*/ } diff --git a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_angerrel.cpp b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_angerrel.cpp deleted file mode 100644 index 4cc3a8cc424..00000000000 --- a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_angerrel.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 - * 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_Angerrel -SD%Complete: 100 -SDComment: -SDCategory: Blackrock Depths -EndScriptData */ - -#include "precompiled.h" - -#define SPELL_SUNDERARMOR 24317 -#define SPELL_SHIELDBLOCK 12169 -#define SPELL_STRIKE 15580 - -struct TRINITY_DLL_DECL boss_angerrelAI : public ScriptedAI -{ - boss_angerrelAI(Creature *c) : ScriptedAI(c) {Reset();} - - uint32 SunderArmor_Timer; - uint32 ShieldBlock_Timer; - uint32 Strike_Timer; - - void Reset() - { - SunderArmor_Timer = 8000; - ShieldBlock_Timer = 15000; - Strike_Timer = 12000; - } - - void Aggro(Unit *who) - { - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() ) - return; - - //SunderArmor_Timer - if (SunderArmor_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_SUNDERARMOR); - SunderArmor_Timer = 28000; - }else SunderArmor_Timer -= diff; - - //ShieldBlock_Timer - if (ShieldBlock_Timer < diff) - { - DoCast(m_creature,SPELL_SHIELDBLOCK); - ShieldBlock_Timer = 25000; - }else ShieldBlock_Timer -= diff; - - //Strike_Timer - if (Strike_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_STRIKE); - Strike_Timer = 10000; - }else Strike_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; -CreatureAI* GetAI_boss_angerrel(Creature *_Creature) -{ - return new boss_angerrelAI (_Creature); -} - -void AddSC_boss_angerrel() -{ - Script *newscript; - newscript = new Script; - newscript->Name="boss_angerrel"; - newscript->GetAI = &GetAI_boss_angerrel; - newscript->RegisterSelf(); -} diff --git a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_doomrel.cpp b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_doomrel.cpp deleted file mode 100644 index 216321a5762..00000000000 --- a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_doomrel.cpp +++ /dev/null @@ -1,139 +0,0 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 - * 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_Doomrel -SD%Complete: 100 -SDComment: -SDCategory: Blackrock Depths -EndScriptData */ - -#include "precompiled.h" - -#define SPELL_SHADOWBOLTVOLLEY 17228 -#define SPELL_IMMOLATE 15505 -#define SPELL_CURSEOFWEAKNESS 17227 -#define SPELL_DEMONARMOR 11735 - -struct TRINITY_DLL_DECL boss_doomrelAI : public ScriptedAI -{ - boss_doomrelAI(Creature *c) : ScriptedAI(c) {Reset();} - - uint32 ShadowVolley_Timer; - uint32 Immolate_Timer; - uint32 CurseOfWeakness_Timer; - uint32 DemonArmor_Timer; - bool Voidwalkers; - int Rand; - int RandX; - int RandY; - Creature* Summoned; - - void Reset() - { - ShadowVolley_Timer = 10000; - Immolate_Timer = 18000; - CurseOfWeakness_Timer = 5000; - DemonArmor_Timer = 16000; - Voidwalkers = false; - } - - void Aggro(Unit *who) - { - } - - void SummonVoidwalkers(Unit* victim) - { - Rand = rand()%5; - switch (rand()%2) - { - case 0: RandX = 0 - Rand; break; - case 1: RandX = 0 + Rand; break; - } - Rand = 0; - Rand = rand()%5; - switch (rand()%2) - { - case 0: RandY = 0 - Rand; break; - case 1: RandY = 0 + Rand; break; - } - Rand = 0; - Summoned = DoSpawnCreature(16119, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000); - if(Summoned) - ((CreatureAI*)Summoned->AI())->AttackStart(victim); - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() ) - return; - - //ShadowVolley_Timer - if (ShadowVolley_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_SHADOWBOLTVOLLEY); - ShadowVolley_Timer = 12000; - }else ShadowVolley_Timer -= diff; - - //Immolate_Timer - if (Immolate_Timer < diff) - { - Unit* target = NULL; - target = SelectUnit(SELECT_TARGET_RANDOM,0); - if (target)DoCast(target,SPELL_IMMOLATE); - Immolate_Timer = 25000; - }else Immolate_Timer -= diff; - - //CurseOfWeakness_Timer - if (CurseOfWeakness_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_CURSEOFWEAKNESS); - CurseOfWeakness_Timer = 45000; - }else CurseOfWeakness_Timer -= diff; - - //DemonArmor_Timer - if (DemonArmor_Timer < diff) - { - DoCast(m_creature,SPELL_DEMONARMOR); - DemonArmor_Timer = 300000; - }else DemonArmor_Timer -= diff; - - //Summon Voidwalkers - if (!Voidwalkers && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 51 ) - { - SummonVoidwalkers(m_creature->getVictim()); - SummonVoidwalkers(m_creature->getVictim()); - SummonVoidwalkers(m_creature->getVictim()); - Voidwalkers = true; - } - - DoMeleeAttackIfReady(); - } -}; -CreatureAI* GetAI_boss_doomrel(Creature *_Creature) -{ - return new boss_doomrelAI (_Creature); -} - -void AddSC_boss_doomrel() -{ - Script *newscript; - newscript = new Script; - newscript->Name="boss_doomrel"; - newscript->GetAI = &GetAI_boss_doomrel; - newscript->RegisterSelf(); -} diff --git a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_doperel.cpp b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_doperel.cpp deleted file mode 100644 index bfecf682764..00000000000 --- a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_doperel.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 - * 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_Doperel -SD%Complete: 100 -SDComment: -SDCategory: Blackrock Depths -EndScriptData */ - -#include "precompiled.h" - -#define SPELL_SINISTERSTRIKE 15581 -#define SPELL_BACKSTAB 15582 -#define SPELL_GOUGE 13579 - -struct TRINITY_DLL_DECL boss_doperelAI : public ScriptedAI -{ - boss_doperelAI(Creature *c) : ScriptedAI(c) {Reset();} - - uint32 SinisterStrike_Timer; - uint32 BackStab_Timer; - uint32 Gouge_Timer; - - void Reset() - { - SinisterStrike_Timer = 8000; - BackStab_Timer = 12000; - Gouge_Timer = 6000; - } - - void Aggro(Unit *who) - { - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() ) - return; - - //SinisterStrike_Timer - if (SinisterStrike_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_SINISTERSTRIKE); - SinisterStrike_Timer = 7000; - }else SinisterStrike_Timer -= diff; - - //BackStab_Timer - if (BackStab_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_BACKSTAB); - BackStab_Timer = 6000; - }else BackStab_Timer -= diff; - - //Gouge_Timer - if (Gouge_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_GOUGE); - Gouge_Timer = 8000; - }else Gouge_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; -CreatureAI* GetAI_boss_doperel(Creature *_Creature) -{ - return new boss_doperelAI (_Creature); -} - -void AddSC_boss_doperel() -{ - Script *newscript; - newscript = new Script; - newscript->Name="boss_doperel"; - newscript->GetAI = &GetAI_boss_doperel; - newscript->RegisterSelf(); -} diff --git a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_gloomrel.cpp b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_gloomrel.cpp deleted file mode 100644 index 1c426688d47..00000000000 --- a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_gloomrel.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 - * 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_Gloomrel -SD%Complete: 80 -SDComment: Learning Smelt Dark Iron if tribute quest rewarded. Missing event and re-spawn GO Spectral Chalice -SDCategory: Blackrock Depths -EndScriptData */ - -#include "precompiled.h" - -#define SPELL_HAMSTRING 9080 -#define SPELL_CLEAVE 15579 -#define SPELL_MORTALSTRIKE 15708 - -struct TRINITY_DLL_DECL boss_gloomrelAI : public ScriptedAI -{ - boss_gloomrelAI(Creature *c) : ScriptedAI(c) {Reset();} - - uint32 HamString_Timer; - uint32 Cleave_Timer; - uint32 MortalStrike_Timer; - - void Reset() - { - HamString_Timer = 19000; - Cleave_Timer = 6000; - MortalStrike_Timer = 10000; - - m_creature->setFaction(734); - } - - void Aggro(Unit *who) - { - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() ) - return; - - //HamString_Timer - if (HamString_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_HAMSTRING); - HamString_Timer = 14000; - }else HamString_Timer -= diff; - - //Cleave_Timer - if (Cleave_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_CLEAVE); - Cleave_Timer = 8000; - }else Cleave_Timer -= diff; - - //MortalStrike_Timer - if (MortalStrike_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_MORTALSTRIKE); - MortalStrike_Timer = 12000; - }else MortalStrike_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; -CreatureAI* GetAI_boss_gloomrel(Creature *_Creature) -{ - return new boss_gloomrelAI (_Creature); -} - -bool GossipHello_boss_gloomrel(Player *player, Creature *_Creature) -{ - if (player->GetQuestRewardStatus(4083) == 1 && player->GetSkillValue(SKILL_MINING) >= 230 && !player->HasSpell(14891) ) - player->ADD_GOSSIP_ITEM(0, "Teach me the art of smelting dark iron", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - - if (player->GetQuestRewardStatus(4083) == 0 && player->GetSkillValue(SKILL_MINING) >= 230) - player->ADD_GOSSIP_ITEM(0, "I want to pay tribute", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - - player->ADD_GOSSIP_ITEM(0, "Challenge", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - player->SEND_GOSSIP_MENU(2602, _Creature->GetGUID()); - - return true; -} - -bool GossipSelect_boss_gloomrel(Player *player, Creature *_Creature, uint32 sender, uint32 action ) -{ - switch (action) - { - case GOSSIP_ACTION_INFO_DEF+1: - player->ADD_GOSSIP_ITEM( 0, "Continue...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); - player->SEND_GOSSIP_MENU(2606, _Creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+11: - player->CLOSE_GOSSIP_MENU(); - _Creature->CastSpell(player, 14894, false); - break; - case GOSSIP_ACTION_INFO_DEF+2: - player->ADD_GOSSIP_ITEM( 0, "[PH] Continue...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22); - player->SEND_GOSSIP_MENU(2604, _Creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+22: - player->CLOSE_GOSSIP_MENU(); - //re-spawn object here - break; - case GOSSIP_ACTION_INFO_DEF+3: - player->ADD_GOSSIP_ITEM( 0, "[PH] Continue...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 33); - player->SEND_GOSSIP_MENU(2605, _Creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+33: - player->CLOSE_GOSSIP_MENU(); - //start event here, below code just temporary - _Creature->setFaction(754); - break; - } - return true; -} - -void AddSC_boss_gloomrel() -{ - Script *newscript; - newscript = new Script; - newscript->Name="boss_gloomrel"; - newscript->GetAI = &GetAI_boss_gloomrel; - newscript->pGossipHello = &GossipHello_boss_gloomrel; - newscript->pGossipSelect = &GossipSelect_boss_gloomrel; - newscript->RegisterSelf(); -} diff --git a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_haterel.cpp b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_haterel.cpp deleted file mode 100644 index 640f528706f..00000000000 --- a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_haterel.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 - * 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_Haterel -SD%Complete: 100 -SDComment: -SDCategory: Blackrock Depths -EndScriptData */ - -#include "precompiled.h" - -#define SPELL_SHADOWBOLT 17483 //Not sure if right ID -#define SPELL_MANABURN 10876 -#define SPELL_SHADOWSHIELD 22417 -#define SPELL_STRIKE 15580 - -struct TRINITY_DLL_DECL boss_haterelAI : public ScriptedAI -{ - boss_haterelAI(Creature *c) : ScriptedAI(c) {Reset();} - - uint32 ShadowBolt_Timer; - uint32 ManaBurn_Timer; - uint32 ShadowShield_Timer; - uint32 Strike_Timer; - - void Reset() - { - ShadowBolt_Timer = 15000; - ManaBurn_Timer = 3000; - ShadowShield_Timer = 8000; - Strike_Timer = 12000; - } - - void Aggro(Unit *who) - { - } - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() ) - return; - - //ShadowBolt_Timer - if (ShadowBolt_Timer < diff) - { - Unit* target = NULL; - target = SelectUnit(SELECT_TARGET_RANDOM,0); - if (target) DoCast(target,SPELL_SHADOWBOLT); - ShadowBolt_Timer = 7000; - }else ShadowBolt_Timer -= diff; - - //ManaBurn_Timer - if (ManaBurn_Timer < diff) - { - Unit* target = NULL; - target = SelectUnit(SELECT_TARGET_RANDOM,0); - if (target) DoCast(target,SPELL_MANABURN); - ManaBurn_Timer = 13000; - }else ManaBurn_Timer -= diff; - - //ShadowShield_Timer - if (ShadowShield_Timer < diff) - { - DoCast(m_creature,SPELL_SHADOWSHIELD); - ShadowShield_Timer = 25000; - }else ShadowShield_Timer -= diff; - - //Strike_Timer - if (Strike_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_STRIKE); - Strike_Timer = 10000; - }else Strike_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_haterel(Creature *_Creature) -{ - return new boss_haterelAI (_Creature); -} - -void AddSC_boss_haterel() -{ - Script *newscript; - newscript = new Script; - newscript->Name="boss_haterel"; - newscript->GetAI = &GetAI_boss_haterel; - newscript->RegisterSelf(); -} diff --git a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_seethrel.cpp b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_seethrel.cpp deleted file mode 100644 index 4d6d6ea3916..00000000000 --- a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_seethrel.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 - * 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_Seethrel -SD%Complete: 100 -SDComment: -SDCategory: Blackrock Depths -EndScriptData */ - -#include "precompiled.h" - -#define SPELL_FROSTBOLT 16799 -#define SPELL_FROSTARMOR 15784 //This is actually a buff he gives himself -#define SPELL_BLIZZARD 19099 -#define SPELL_FROSTNOVA 15063 -#define SPELL_FROSTWARD 15004 - -struct TRINITY_DLL_DECL boss_seethrelAI : public ScriptedAI -{ - boss_seethrelAI(Creature *c) : ScriptedAI(c) {Reset();} - - uint32 FrostArmor_Timer; - uint32 Frostbolt_Timer; - uint32 Blizzard_Timer; - uint32 FrostNova_Timer; - uint32 FrostWard_Timer; - - void Reset() - { - FrostArmor_Timer = 2000; - Frostbolt_Timer = 6000; - Blizzard_Timer = 18000; - FrostNova_Timer = 12000; - FrostWard_Timer = 25000; - - m_creature->CastSpell(m_creature,SPELL_FROSTARMOR,true); - } - - void Aggro(Unit *who) - { - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() ) - return; - - //FrostArmor_Timer - if (FrostArmor_Timer < diff) - { - DoCast(m_creature, SPELL_FROSTARMOR); - FrostArmor_Timer = 180000; - }else FrostArmor_Timer -= diff; - - //Frostbolt_Timer - if (Frostbolt_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_FROSTBOLT); - Frostbolt_Timer = 15000; - }else Frostbolt_Timer -= diff; - - //Blizzard_Timer - if (Blizzard_Timer < diff) - { - Unit* target = NULL; - target = SelectUnit(SELECT_TARGET_RANDOM,0); - if (target) DoCast(target,SPELL_BLIZZARD); - Blizzard_Timer = 22000; - }else Blizzard_Timer -= diff; - - //FrostNova_Timer - if (FrostNova_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_FROSTNOVA); - FrostNova_Timer = 14000; - }else FrostNova_Timer -= diff; - - //FrostWard_Timer - if (FrostWard_Timer < diff) - { - DoCast(m_creature,SPELL_FROSTWARD); - FrostWard_Timer = 68000; - }else FrostWard_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; -CreatureAI* GetAI_boss_seethrel(Creature *_Creature) -{ - return new boss_seethrelAI (_Creature); -} - -void AddSC_boss_seethrel() -{ - Script *newscript; - newscript = new Script; - newscript->Name="boss_seethrel"; - newscript->GetAI = &GetAI_boss_seethrel; - newscript->RegisterSelf(); -} diff --git a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_vilerel.cpp b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_vilerel.cpp deleted file mode 100644 index 962b243ff28..00000000000 --- a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_vilerel.cpp +++ /dev/null @@ -1,101 +0,0 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 - * 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_Vilerel -SD%Complete: 100 -SDComment: -SDCategory: Blackrock Depths -EndScriptData */ - -#include "precompiled.h" - -#define SPELL_MINDBLAST 15587 -#define SPELL_HEAL 15586 -#define SPELL_PRAYEROFHEALING 15585 -#define SPELL_SHIELD 10901 - -struct TRINITY_DLL_DECL boss_vilerelAI : public ScriptedAI -{ - boss_vilerelAI(Creature *c) : ScriptedAI(c) {Reset();} - - uint32 MindBlast_Timer; - uint32 Heal_Timer; - uint32 PrayerOfHealing_Timer; - uint32 Shield_Timer; - - void Reset() - { - MindBlast_Timer = 10000; - Heal_Timer = 35000; - PrayerOfHealing_Timer = 25000; - Shield_Timer = 3000; - } - - void Aggro(Unit *who) - { - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() ) - return; - - //MindBlast_Timer - if (MindBlast_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_MINDBLAST); - MindBlast_Timer = 7000; - }else MindBlast_Timer -= diff; - - //Heal_Timer - if (Heal_Timer < diff) - { - DoCast(m_creature,SPELL_HEAL); - Heal_Timer = 20000; - }else Heal_Timer -= diff; - - //PrayerOfHealing_Timer - if (PrayerOfHealing_Timer < diff) - { - DoCast(m_creature,SPELL_PRAYEROFHEALING); - PrayerOfHealing_Timer = 30000; - }else PrayerOfHealing_Timer -= diff; - - //Shield_Timer - if (Shield_Timer < diff) - { - DoCast(m_creature,SPELL_SHIELD); - Shield_Timer = 30000; - }else Shield_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; -CreatureAI* GetAI_boss_vilerel(Creature *_Creature) -{ - return new boss_vilerelAI (_Creature); -} - -void AddSC_boss_vilerel() -{ - Script *newscript; - newscript = new Script; - newscript->Name="boss_vilerel"; - newscript->GetAI = &GetAI_boss_vilerel; - newscript->RegisterSelf(); -} diff --git a/src/bindings/scripts/scripts/zone/blackrock_depths/def_blackrock_depths.h b/src/bindings/scripts/scripts/zone/blackrock_depths/def_blackrock_depths.h index f6da69c8044..1a7f8962752 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_depths/def_blackrock_depths.h +++ b/src/bindings/scripts/scripts/zone/blackrock_depths/def_blackrock_depths.h @@ -1,35 +1,26 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 - * This program is free software licensed under GPL version 2 - * Please see the included DOCS/LICENSE.TXT for more information */ - -#ifndef DEF_BLACKROCK_DEPTHS_H -#define DEF_BLACKROCK_DEPTHS_H - -#define DATA_DUGHAL 0 -#define DATA_SUPPLY_ROOM 1 -#define DATA_JAZ 2 -#define DATA_SHILL 3 -#define DATA_CREST 4 -#define DATA_TOBIAS 5 -#define DATA_QUEST_JAIL_BREAK 6 - -#define ENCOUNTER_STATE_NOT_STARTED 100 -#define ENCOUNTER_STATE_BEFORE_START 101 -#define ENCOUNTER_STATE_IN_PROGRESS 102 -#define ENCOUNTER_STATE_OBJECTIVE_COMPLETED 103 -#define ENCOUNTER_STATE_ENDED 104 -#define ENCOUNTER_STATE_FAILED 105 - -#define DATA_GATE_D 111 -#define DATA_GATE_SR 112 -#define DATA_GATE_J 113 -#define DATA_GATE_S 114 -#define DATA_GATE_C 115 -#define DATA_GATE_T 116 -#define DATA_GATE_SC 117 -#define DATA_CREATURE_JAZ 118 -#define DATA_CREATURE_OGRABISI 119 -#define DATA_CREATURE_CREST 120 -#define DATA_CREATURE_SHILL 121 - +/* Copyright (C) 2006 - 2009 ScriptDev2 +* This program is free software licensed under GPL version 2 +* Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_BRD_H +#define DEF_BRD_H + +#define TYPE_RING_OF_LAW 1 +#define TYPE_VAULT 2 +#define TYPE_BAR 3 +#define TYPE_TOMB_OF_SEVEN 4 +#define TYPE_LYCEUM 5 +#define TYPE_IRON_HALL 6 + +#define DATA_EMPEROR 10 +#define DATA_PHALANX 11 + +#define DATA_ARENA1 12 +#define DATA_ARENA2 13 +#define DATA_ARENA3 14 +#define DATA_ARENA4 15 + +#define DATA_GO_BAR_KEG 16 +#define DATA_GO_BAR_KEG_TRAP 17 +#define DATA_GO_BAR_DOOR 18 #endif \ No newline at end of file diff --git a/src/bindings/scripts/scripts/zone/blackrock_depths/instance_blackrock_depths.cpp b/src/bindings/scripts/scripts/zone/blackrock_depths/instance_blackrock_depths.cpp index 301301c27c2..8a45955c706 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_depths/instance_blackrock_depths.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_depths/instance_blackrock_depths.cpp @@ -32,209 +32,276 @@ update `instance_template` set `script`='instance_blackrock_depths' where `map`= #include "precompiled.h" #include "def_blackrock_depths.h" -#define ENCOUNTERS 7 - +#define ENCOUNTERS 6 + +#define C_EMPEROR 9019 +#define C_PHALANX 9502 + +#define GO_ARENA1 161525 +#define GO_ARENA2 161522 +#define GO_ARENA3 161524 +#define GO_ARENA4 161523 +#define GO_SHADOW_LOCK 161460 +#define GO_SHADOW_MECHANISM 161461 +#define GO_SHADOW_GIANT_DOOR 157923 +#define GO_SHADOW_DUMMY 161516 +#define GO_BAR_KEG_SHOT 170607 +#define GO_BAR_KEG_TRAP 171941 +#define GO_BAR_DOOR 170571 +#define GO_TOMB_ENTER 170576 +#define GO_TOMB_EXIT 170577 +#define GO_LYCEUM 170558 +#define GO_GOLEM_ROOM_N 170573 +#define GO_GOLEM_ROOM_S 170574 +#define GO_THONE_ROOM 170575 + struct TRINITY_DLL_DECL instance_blackrock_depths : public ScriptedInstance { instance_blackrock_depths(Map *map) : ScriptedInstance(map) {Initialize();}; + + uint32 Encounter[ENCOUNTERS]; + std::string str_data; + + uint64 EmperorGUID; + uint64 PhalanxGUID; + + uint64 GoArena1GUID; + uint64 GoArena2GUID; + uint64 GoArena3GUID; + uint64 GoArena4GUID; + uint64 GoShadowLockGUID; + uint64 GoShadowMechGUID; + uint64 GoShadowGiantGUID; + uint64 GoShadowDummyGUID; + uint64 GoBarKegGUID; + uint64 GoBarKegTrapGUID; + uint64 GoBarDoorGUID; + uint64 GoTombEnterGUID; + uint64 GoTombExitGUID; + uint64 GoLyceumGUID; + uint64 GoGolemNGUID; + uint64 GoGolemSGUID; + uint64 GoThoneGUID; - uint64 GateDughal; - uint64 SupplyRoomGate; - uint64 GateJaz; - uint64 GateShill; - uint64 GateCrest; - uint64 GateTobias; - uint64 SupplyCrate; - - uint64 Jaz; - uint64 Ograbisi; - uint64 ShillDinger; - uint64 CrestKiller; - - uint32 state; - - bool Encounters[ENCOUNTERS]; - + uint32 BarAleCount; + void Initialize() - { - - GateDughal = 0; - SupplyRoomGate = 0; - GateJaz = 0; - GateShill = 0; - GateCrest = 0; - GateTobias = 0; - SupplyCrate = 0; - - Jaz = 0; - Ograbisi = 0; - ShillDinger = 0; - CrestKiller = 0; + { + EmperorGUID = 0; + PhalanxGUID = 0; - state = 0; + GoArena1GUID = 0; + GoArena2GUID = 0; + GoArena3GUID = 0; + GoArena4GUID = 0; + GoShadowLockGUID = 0; + GoShadowMechGUID = 0; + GoShadowGiantGUID = 0; + GoShadowDummyGUID = 0; + GoBarKegGUID = 0; + GoBarKegTrapGUID = 0; + GoBarDoorGUID = 0; + GoTombEnterGUID = 0; + GoTombExitGUID = 0; + GoLyceumGUID = 0; + GoGolemNGUID = 0; + GoGolemSGUID = 0; + GoThoneGUID = 0; + BarAleCount = 0; + for(uint8 i = 0; i < ENCOUNTERS; i++) - Encounters[i] = false; - } - - bool IsEncounterInProgress() const + Encounter[i] = NOT_STARTED; + } + + Player* GetPlayerInMap() { - for(uint8 i = 0; i < ENCOUNTERS; i++) - if(Encounters[i]) return true; - - return false; - } - - void OpenGO(uint64 DoorGUID, bool open) - { - if(GameObject *Door = instance->GetGameObjectInMap(DoorGUID)) - Door->SetUInt32Value(GAMEOBJECT_STATE, open ? 0 : 1); - } + Map::PlayerList const& players = instance->GetPlayers(); - void CloseGO(uint64 DoorGUID, bool close) - { - if(GameObject *Door = instance->GetGameObjectInMap(DoorGUID)) - Door->SetUInt32Value(GAMEOBJECT_STATE, close ? 1 : 0); - } + if (!players.isEmpty()) + { + for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + { + if (Player* plr = itr->getSource()) + return plr; + } + } + + debug_log("SD2: Instance Blackrock Depths: GetPlayerInMap, but PlayerList is empty!"); + return NULL; + } + + void OnCreatureCreate(Creature *creature, uint32 creature_entry) + { + switch(creature->GetEntry()) + { + case C_EMPEROR: EmperorGUID = creature->GetGUID(); break; + case C_PHALANX: PhalanxGUID = creature->GetGUID(); break; + } + } - uint32 GetData(uint32 type) + void OnObjectCreate(GameObject* go) + { + switch(go->GetEntry()) + { + case GO_ARENA1: GoArena1GUID = go->GetGUID(); break; + case GO_ARENA2: GoArena2GUID = go->GetGUID(); break; + case GO_ARENA3: GoArena3GUID = go->GetGUID(); break; + case GO_ARENA4: GoArena4GUID = go->GetGUID(); break; + case GO_SHADOW_LOCK: GoShadowLockGUID = go->GetGUID(); break; + case GO_SHADOW_MECHANISM: GoShadowMechGUID = go->GetGUID(); break; + case GO_SHADOW_GIANT_DOOR: GoShadowGiantGUID = go->GetGUID(); break; + case GO_SHADOW_DUMMY: GoShadowDummyGUID = go->GetGUID(); break; + case GO_BAR_KEG_SHOT: GoBarKegGUID = go->GetGUID(); break; + case GO_BAR_KEG_TRAP: GoBarKegTrapGUID = go->GetGUID(); break; + case GO_BAR_DOOR: GoBarDoorGUID = go->GetGUID(); break; + case GO_TOMB_ENTER: GoTombEnterGUID = go->GetGUID(); break; + case GO_TOMB_EXIT: GoTombExitGUID = go->GetGUID(); break; + case GO_LYCEUM: GoLyceumGUID = go->GetGUID(); break; + case GO_GOLEM_ROOM_N: GoGolemNGUID = go->GetGUID(); break; + case GO_GOLEM_ROOM_S: GoGolemSGUID = go->GetGUID(); break; + case GO_THONE_ROOM: GoThoneGUID = go->GetGUID(); break; + } + } + + void SetData(uint32 type, uint32 data) { + Player *player = GetPlayerInMap(); + + if (!player) + { + debug_log("SD2: Instance Blackrock Depths: SetData (Type: %u Data %u) cannot find any player.", type, data); + return; + } + + debug_log("SD2: Instance Blackrock Depths: SetData update (Type: %u Data %u)", type, data); + switch(type) { - case DATA_DUGHAL: return Encounters[0];break; - case DATA_SUPPLY_ROOM: return Encounters[1];break; - case DATA_JAZ: return Encounters[2];break; - case DATA_SHILL: return Encounters[3];break; - case DATA_CREST: return Encounters[4];break; - case DATA_TOBIAS: return Encounters[5];break; - case DATA_QUEST_JAIL_BREAK: return Encounters[6];break; - case DATA_GATE_D: return GateDughal; break; - case DATA_GATE_T: return GateTobias; break; - case DATA_GATE_C: return GateCrest; break; - case DATA_GATE_J: return GateJaz; break; - case DATA_GATE_S: return GateShill; break; - case DATA_CREATURE_JAZ: - if((((Creature*)Jaz)->isDead())) - state = 1; - else - state = 0; + case TYPE_RING_OF_LAW: + Encounter[0] = data; break; - case DATA_CREATURE_OGRABISI: - if((((Creature*)Ograbisi)->isDead())) - state = 1; - else - state = 0; + case TYPE_VAULT: + Encounter[1] = data; break; - case DATA_CREATURE_CREST: - if((((Creature*)CrestKiller)->isDead())) - state = 1; + case TYPE_BAR: + if (data == SPECIAL) + ++BarAleCount; else - state = 0; + Encounter[2] = data; break; - case DATA_CREATURE_SHILL: - if((((Creature*)ShillDinger)->isDead())) - state = 1; - else - state = 0; + case TYPE_TOMB_OF_SEVEN: + Encounter[3] = data; + break; + case TYPE_LYCEUM: + Encounter[4] = data; + break; + case TYPE_IRON_HALL: + Encounter[5] = data; break; } + + if (data == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << Encounter[0] << " " << Encounter[1] << " " << Encounter[2] << " " + << Encounter[3] << " " << Encounter[4] << " " << Encounter[5]; + + str_data = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + uint32 GetData(uint32 type) + { + switch(type) + { + case TYPE_RING_OF_LAW: + return Encounter[0]; + case TYPE_VAULT: + return Encounter[1]; + case TYPE_BAR: + if (Encounter[2] == IN_PROGRESS && BarAleCount == 3) + return SPECIAL; + else + return Encounter[2]; + case TYPE_TOMB_OF_SEVEN: + return Encounter[3]; + case TYPE_LYCEUM: + return Encounter[4]; + case TYPE_IRON_HALL: + return Encounter[5]; + } return 0; } - - void OnObjectCreate(GameObject *go) + + uint64 GetData64(uint32 data) { - switch(go->GetEntry()) + switch(data) { - case 170561: SupplyRoomGate = go->GetGUID(); state = go->GetUInt32Value(GAMEOBJECT_STATE); break; - case 170562: GateDughal = go->GetGUID(); state = go->GetUInt32Value(GAMEOBJECT_STATE); break; - case 170566: GateTobias = go->GetGUID(); state = go->GetUInt32Value(GAMEOBJECT_STATE); break; - case 170567: GateCrest = go->GetGUID(); state = go->GetUInt32Value(GAMEOBJECT_STATE); break; - case 170568: GateJaz = go->GetGUID(); state = go->GetUInt32Value(GAMEOBJECT_STATE); break; - case 170569: GateShill = go->GetGUID(); state = go->GetUInt32Value(GAMEOBJECT_STATE); break; - case 166872: SupplyCrate = go->GetGUID(); state = go->GetUInt32Value(GAMEOBJECT_STATE); break; + case DATA_EMPEROR: + return EmperorGUID; + case DATA_PHALANX: + return PhalanxGUID; + case DATA_ARENA1: + return GoArena1GUID; + case DATA_ARENA2: + return GoArena2GUID; + case DATA_ARENA3: + return GoArena3GUID; + case DATA_ARENA4: + return GoArena4GUID; + case DATA_GO_BAR_KEG: + return GoBarKegGUID; + case DATA_GO_BAR_KEG_TRAP: + return GoBarKegTrapGUID; + case DATA_GO_BAR_DOOR: + return GoBarDoorGUID; } + return 0; } - - void OnCreatureCreate(Creature *creature, uint32 creature_entry) + + const char* Save() { - switch(creature_entry) - { - case 9680: CrestKiller = creature->GetGUID(); break; - case 9677: Ograbisi = creature->GetGUID(); break; - case 9681: Jaz = creature->GetGUID(); break; - case 9678: ShillDinger = creature->GetGUID(); break; - } + return str_data.c_str(); } + + void Load(const char* in) + { + if (!in) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(in); - void SetData(uint32 type, uint32 data) - { - switch(type) - { - case DATA_DUGHAL: Encounters[0] = data; break; - case DATA_SUPPLY_ROOM: Encounters[1] = data; break; - case DATA_JAZ: Encounters[2] = data; break; - case DATA_SHILL: Encounters[3] = data; break; - case DATA_CREST: Encounters[4] = data; break; - case DATA_TOBIAS: Encounters[5] = data; break; - case DATA_QUEST_JAIL_BREAK: Encounters[6] = data; break; - case DATA_GATE_SR: - if(SupplyRoomGate) - { - if(data == NOT_STARTED) - OpenGO(SupplyRoomGate, true); - else - CloseGO(SupplyRoomGate, true); - } - break; - case DATA_GATE_SC: - if(SupplyCrate) - { - if(data == NOT_STARTED) - OpenGO(SupplyCrate, true); - else - CloseGO(SupplyCrate, true); - } - break; - case DATA_CREATURE_JAZ: - if(data) - { - (((Creature*)Jaz)->setFaction(54)); - (((Creature*)Ograbisi)->setFaction(54)); - (((Creature*)Ograbisi)->Say("Ograbisi needs new hat", LANG_UNIVERSAL, NULL)); - } - else - { - (((Creature*)Jaz)->setFaction(35)); - (((Creature*)Ograbisi)->setFaction(35)); - } - break; - case DATA_CREATURE_SHILL: - if(data) - (((Creature*)ShillDinger)->setFaction(54)); - else - (((Creature*)ShillDinger)->setFaction(35)); - break; - case DATA_CREATURE_CREST: - if(data) - (((Creature*)CrestKiller)->setFaction(54)); - else - (((Creature*)CrestKiller)->setFaction(35)); - break; - } - } + std::istringstream loadStream(in); + loadStream >> Encounter[0] >> Encounter[1] >> Encounter[2] >> Encounter[3] + >> Encounter[4] >> Encounter[5]; + for(uint8 i = 0; i < ENCOUNTERS; ++i) + if (Encounter[i] == IN_PROGRESS) + Encounter[i] = NOT_STARTED; + + OUT_LOAD_INST_DATA_COMPLETE; + } }; - + InstanceData* GetInstanceData_instance_blackrock_depths(Map* map) { - return new instance_blackrock_depths(map); + return new instance_blackrock_depths(map); } - -void AddSC_instance_blackrock_depths() -{ - Script *newscript; - newscript = new Script; - newscript->Name = "instance_blackrock_depths"; - newscript->GetInstanceData = &GetInstanceData_instance_blackrock_depths; - newscript->RegisterSelf(); -} \ No newline at end of file + + void AddSC_instance_blackrock_depths() + { + Script *newscript; + newscript = new Script; + newscript->Name = "instance_blackrock_depths"; + newscript->GetInstanceData = &GetInstanceData_instance_blackrock_depths; + newscript->RegisterSelf(); + } \ No newline at end of file -- cgit v1.2.3 From 613217fca7c2959fe3abbe593f4be65beedaeca8 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sun, 18 Jan 2009 20:01:45 +0100 Subject: *Missed part in prev commit --HG-- branch : trunk --- .../scripts/scripts/zone/blackrock_depths/blackrock_depths.cpp | 6 ++++++ src/shared/revision.h | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/bindings/scripts/scripts/zone/blackrock_depths/blackrock_depths.cpp b/src/bindings/scripts/scripts/zone/blackrock_depths/blackrock_depths.cpp index ddde07311a0..e0aa40d060c 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_depths/blackrock_depths.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_depths/blackrock_depths.cpp @@ -1314,4 +1314,10 @@ void AddSC_blackrock_depths() newscript->Name="npc_marshal_reginald_windsor"; newscript->GetAI = &GetAI_npc_marshal_reginald_windsor; newscript->RegisterSelf();*/ + + newscript = new Script; + newscript->Name = "npc_rocknot"; + newscript->GetAI = &GetAI_npc_rocknot; + newscript->pChooseReward = &ChooseReward_npc_rocknot; + newscript->RegisterSelf(); } diff --git a/src/shared/revision.h b/src/shared/revision.h index 5ae723c641f..95467c99a80 100644 --- a/src/shared/revision.h +++ b/src/shared/revision.h @@ -1,7 +1,7 @@ #ifndef __REVISION_H__ #define __REVISION_H__ - #define _REVISION "896" - #define _HASH "2fc9fa91df4b" + #define _REVISION "905" + #define _HASH "9c8352b53bb6" #define _REVISION_DATE "*" #define _REVISION_TIME "*" #endif // __REVISION_H__ -- cgit v1.2.3