aboutsummaryrefslogtreecommitdiff
path: root/src/bindings
diff options
context:
space:
mode:
authormegamage <none@none>2008-12-26 16:27:41 -0600
committermegamage <none@none>2008-12-26 16:27:41 -0600
commit7346ed5951822d5b8f61817ff1ad95d2c4e2cd73 (patch)
tree3a6c59366f445379b9709df26afd05173eed1531 /src/bindings
parent8d79395783e6dfb59777ce5fcedf722a99580765 (diff)
parent07e2410ed830a620a0749e4039e0e544278267d7 (diff)
*Merge to Trinity 673.
--HG-- branch : trunk
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/scripts/include/sc_creature.cpp50
-rw-r--r--src/bindings/scripts/include/sc_creature.h6
-rw-r--r--src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp153
-rw-r--r--src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp18
-rw-r--r--src/bindings/scripts/scripts/zone/blackrock_depths/blackrock_depths.cpp19
-rw-r--r--src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp64
-rw-r--r--src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp54
-rw-r--r--src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp16
8 files changed, 296 insertions, 84 deletions
diff --git a/src/bindings/scripts/include/sc_creature.cpp b/src/bindings/scripts/include/sc_creature.cpp
index e3bcc2129cc..cd1e5788ebd 100644
--- a/src/bindings/scripts/include/sc_creature.cpp
+++ b/src/bindings/scripts/include/sc_creature.cpp
@@ -735,6 +735,56 @@ void ScriptedAI::DoTeleportAll(float x, float y, float z, float o)
i_pl->TeleportTo(m_creature->GetMapId(), x, y, z, o, TELE_TO_NOT_LEAVE_COMBAT);
}
+Unit* ScriptedAI::FindCreature(uint32 entry, uint32 range)
+{
+ CellPair pair(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
+ Cell cell(pair);
+ cell.data.Part.reserved = ALL_DISTRICT;
+ cell.SetNoCreate();
+
+ std::list<Creature*> NPCList;
+
+ Trinity::AllCreaturesOfEntryInRange check(m_creature, entry, range);
+ Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(NPCList, check);
+ TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> visitor(searcher);
+
+ CellLock<GridReadGuard> cell_lock(cell, pair);
+ cell_lock->Visit(cell_lock, visitor, *(m_creature->GetMap()));
+
+ if (!NPCList.empty())
+ {
+ for(std::list<Creature*>::iterator itr = NPCList.begin(); itr != NPCList.end(); ++itr)
+ {
+ return Creature::GetUnit((*m_creature), (*itr)->GetGUID());
+ }
+ }else error_log("SD2 ERROR: Entry: %u not found!", entry); return NULL;
+}
+
+GameObject* ScriptedAI::FindGameObject(uint32 entry)
+{
+ CellPair pair(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
+ Cell cell(pair);
+ cell.data.Part.reserved = ALL_DISTRICT;
+ cell.SetNoCreate();
+
+ std::list<GameObject*> GOList;
+
+ Trinity::AllGameObjectsWithEntryInGrid go_check(entry);
+ Trinity::GameObjectListSearcher<Trinity::AllGameObjectsWithEntryInGrid> go_search(GOList, go_check);
+ TypeContainerVisitor
+ <Trinity::GameObjectListSearcher<Trinity::AllGameObjectsWithEntryInGrid>, GridTypeMapContainer> go_visit(go_search);
+ CellLock<GridReadGuard> cell_lock(cell, pair);
+ cell_lock->Visit(cell_lock, go_visit, *(m_creature->GetMap()));
+
+ if (!GOList.empty())
+ {
+ for(std::list<GameObject*>::iterator itr = GOList.begin(); itr != GOList.end(); ++itr)
+ {
+ return (*itr);
+ }
+ }
+ else error_log("SD2 ERROR: GameObject Entry: %u not found!", entry); return NULL;
+}
Unit* ScriptedAI::DoSelectLowestHpFriendly(float range, uint32 MinHPDiff)
{
diff --git a/src/bindings/scripts/include/sc_creature.h b/src/bindings/scripts/include/sc_creature.h
index c0c09d70e34..90a66911ac7 100644
--- a/src/bindings/scripts/include/sc_creature.h
+++ b/src/bindings/scripts/include/sc_creature.h
@@ -148,6 +148,12 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
void DoTeleportPlayer(Unit* pUnit, float x, float y, float z, float o);
void DoTeleportAll(float x, float y, float z, float o);
+ //Get a single creature of given entry
+ Unit* FindCreature(uint32 entry, uint32 range);
+
+ //Get a single gameobject of given entry
+ GameObject* FindGameObject(uint32 entry);
+
//Returns friendly unit with the most amount of hp missing from max hp
Unit* DoSelectLowestHpFriendly(float range, uint32 MinHPDiff = 1);
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 59dc502b2f5..92ce2caaa40 100644
--- a/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp
+++ b/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp
@@ -17,7 +17,7 @@
/* ScriptData
SDName: Azuremyst_Isle
SD%Complete: 75
-SDComment: Quest support: 9283, 9537, 9582, 9554(special flight path, proper model for mount missing). Injured Draenei cosmetic only
+SDComment: Quest support: 9283, 9537, 9582, 9554, 9531(special flight path, proper model for mount missing). Injured Draenei cosmetic only
SDCategory: Azuremyst Isle
EndScriptData */
@@ -27,6 +27,7 @@ npc_engineer_spark_overgrind
npc_injured_draenei
npc_magwin
npc_susurrus
+npc_geezle
EndContentData */
#include "precompiled.h"
@@ -463,6 +464,150 @@ bool GossipSelect_npc_susurrus(Player *player, Creature *_Creature, uint32 sende
}
/*######
+## npc_geezle
+######*/
+
+#define GEEZLE_SAY_1 "What's the big idea, Spark?"
+#define SPARK_SAY_2 "What's the big idea? You nearly blew my cover, idiot! I told you to put the compass and navigation maps somewhere safe - not out in the open for any fool to discover."
+#define SPARK_SAY_3 "The Master has gone to great lengths to secure information about the whereabouts of the Exodar. You could have blown the entire operation, including the cover of our spy on the inside."
+#define GEEZLE_SAY_4 "Relax, Spark! I have it all under control. We'll strip mine the Exodar right out from under 'em - making both you and I very, very rich in the process."
+#define SPARK_SAY_5 "Relax? Do you know what Kael'thas does to those that fail him, Geezle? Eternal suffering and pain... Do NOT screw this up, fool."
+#define SPARK_SAY_6 "Our Bloodmyst scouts have located our contact. The fool, Velen, will soon leave himself open and defenseless -- long enough for us to strike! Now get out of my sight before I vaporize you..."
+#define GEEZLE_SAY_7 "Yes, sir. It won't happen again..."
+
+#define EMOTE_SPARK "picks up the naga flag."
+#define MOB_SPARK 17243
+#define GO_NAGA_FLAG 181694
+
+static float SparkPos[4] = {-5030.95, -11291.99, 7.97};
+
+struct TRINITY_DLL_DECL npc_geezleAI : public ScriptedAI
+{
+ npc_geezleAI(Creature *c) : ScriptedAI(c) {Reset();}
+
+ std::list<GameObject*> FlagList;
+
+ uint64 SparkGUID;
+
+ uint32 Step;
+ uint32 SayTimer;
+
+ bool EventStarted;
+
+ void Reset()
+ {
+ SparkGUID = 0;
+ Step = 0;
+ StartEvent();
+ }
+
+ void Aggro(Unit* who){}
+
+ void StartEvent()
+ {
+ Step = 1;
+ EventStarted = true;
+ Creature* Spark = m_creature->SummonCreature(MOB_SPARK, SparkPos[0], SparkPos[1], SparkPos[2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1000);
+ SparkGUID = Spark->GetGUID();
+ Spark->setActive(true);
+ Spark->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ m_creature->GetMotionMaster()->MovePoint(0, -5092.26, -11252, 0.71);
+ Spark->GetMotionMaster()->MovePoint(0, -5080.70, -11253.61, 0.56);
+ SayTimer = 23000;
+ }
+
+ uint32 NextStep(uint32 Step)
+ {
+ Unit* Spark = Unit::GetUnit((*m_creature), SparkGUID);
+
+ switch(Step)
+ {
+ case 0: return 99999;
+ case 1:
+ //DespawnNagaFlag(true);
+ ((Creature*)Spark)->TextEmote(EMOTE_SPARK, NULL, false);
+ return 1000;
+ case 2:
+ DoSay(GEEZLE_SAY_1, LANG_UNIVERSAL, Spark);
+ Spark->SetInFront(m_creature);
+ m_creature->SetInFront(Spark);
+ return 5000;
+ case 3:
+ ((Creature*)Spark)->Say(SPARK_SAY_2, LANG_UNIVERSAL, NULL);
+ return 7000;
+ case 4:
+ ((Creature*)Spark)->Say(SPARK_SAY_3, LANG_UNIVERSAL, NULL);
+ return 8000;
+ case 5:
+ DoSay(GEEZLE_SAY_4, LANG_UNIVERSAL, Spark);
+ return 8000;
+ case 6:
+ ((Creature*)Spark)->Say(SPARK_SAY_5, LANG_UNIVERSAL, NULL);
+ return 9000;
+ case 7:
+ ((Creature*)Spark)->Say(SPARK_SAY_6, LANG_UNIVERSAL, NULL);
+ return 8000;
+ case 8:
+ DoSay(GEEZLE_SAY_7, LANG_UNIVERSAL, Spark);
+ return 2000;
+ case 9:
+ m_creature->GetMotionMaster()->MoveTargetedHome();
+ Spark->GetMotionMaster()->MovePoint(0, -5030.95, -11291.99, 7.97);
+ return 20000;
+ case 10:
+ Spark->DealDamage(Spark,Spark->GetHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ //DespawnNagaFlag(false);
+ m_creature->SetVisibility(VISIBILITY_OFF);
+ default: return 99999999;
+ }
+ }
+
+ void DespawnNagaFlag(bool despawn)
+ {
+ CellPair pair(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
+ Cell cell(pair);
+ cell.data.Part.reserved = ALL_DISTRICT;
+ cell.SetNoCreate();
+
+ Trinity::AllGameObjectsWithEntryInGrid go_check(GO_NAGA_FLAG);
+ Trinity::GameObjectListSearcher<Trinity::AllGameObjectsWithEntryInGrid> go_search(FlagList, go_check);
+ TypeContainerVisitor
+ <Trinity::GameObjectListSearcher<Trinity::AllGameObjectsWithEntryInGrid>, GridTypeMapContainer> go_visit(go_search);
+ CellLock<GridReadGuard> cell_lock(cell, pair);
+ cell_lock->Visit(cell_lock, go_visit, *(m_creature->GetMap()));
+
+ Player* player = NULL;
+ if (!FlagList.empty())
+ {
+ for(std::list<GameObject*>::iterator itr = FlagList.begin(); itr != FlagList.end(); ++itr)
+ {
+ //TODO: Found how to despawn and respawn
+ if(despawn)
+ (*itr)->RemoveFromWorld();
+ else
+ (*itr)->Respawn();
+ }
+ } else error_log("SD2 ERROR: FlagList is empty!");
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if(SayTimer < diff)
+ {
+ if(EventStarted)
+ {
+ SayTimer = NextStep(Step++);
+ }
+ }else SayTimer -= diff;
+ }
+};
+
+CreatureAI* GetAI_npc_geezleAI(Creature *_Creature)
+{
+ return new npc_geezleAI(_Creature);
+}
+
+/*######
##
######*/
@@ -498,4 +643,10 @@ void AddSC_azuremyst_isle()
newscript->pGossipHello = &GossipHello_npc_susurrus;
newscript->pGossipSelect = &GossipSelect_npc_susurrus;
newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name="npc_geezle";
+ newscript->GetAI = &GetAI_npc_geezleAI;
+ newscript->RegisterSelf();
+
}
diff --git a/src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp b/src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp
index 6ae77e670aa..6c642ea41a3 100644
--- a/src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp
+++ b/src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp
@@ -30,7 +30,7 @@ EndScriptData */
//Spells
#define SPELL_MOLTEN_PUNCH 40126
-#define SPELL_HURTFUL_STRIKE 41926
+#define SPELL_HATEFUL_STRIKE 41926
#define SPELL_MOLTEN_FLAME 40980
#define SPELL_VOLCANIC_ERUPTION 40117
#define SPELL_VOLCANIC_SUMMON 40276
@@ -63,7 +63,7 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
uint32 SwitchTargetTimer;
uint32 PhaseSwitchTimer;
uint32 SummonVolcanoTimer;
- uint32 HurtfulStrikeTimer;
+ uint32 HatefulStrikeTimer;
uint32 BerserkTimer;
bool Phase1;
@@ -82,7 +82,7 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
else ToggleDoors(false);
}
- HurtfulStrikeTimer = 5000;
+ HatefulStrikeTimer = 5000;
SummonFlameTimer = 20000;
SwitchTargetTimer = 90000;
PhaseSwitchTimer = 60000;
@@ -123,7 +123,7 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
void JustSummoned(Creature *summon) {summons.Summon(summon);}
void SummonedCreatureDespawn(Creature *summon) {summons.Despawn(summon);}
- Unit* CalculateHurtfulStrikeTarget()
+ Unit* CalculateHatefulStrikeTarget()
{
uint32 health = 0;
Unit* target = NULL;
@@ -166,14 +166,14 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
if(Phase1)
{
- if(HurtfulStrikeTimer < diff)
+ if(HatefulStrikeTimer < diff)
{
- if(Unit* target = CalculateHurtfulStrikeTarget())
+ if(Unit* target = CalculateHatefulStrikeTarget())
{
- DoCast(target, SPELL_HURTFUL_STRIKE);
- HurtfulStrikeTimer = 5000;
+ DoCast(target, SPELL_HATEFUL_STRIKE);
+ HatefulStrikeTimer = 5000;
}
- }else HurtfulStrikeTimer -= diff;
+ }else HatefulStrikeTimer -= diff;
}
if(!Phase1)
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 08afd55c98b..2930f6eafec 100644
--- a/src/bindings/scripts/scripts/zone/blackrock_depths/blackrock_depths.cpp
+++ b/src/bindings/scripts/scripts/zone/blackrock_depths/blackrock_depths.cpp
@@ -17,7 +17,7 @@
/* ScriptData
SDName: Blackrock_Depths
SD%Complete: 95
-SDComment: Quest support: 4001, 4342, 7604. Vendor Lokhtos Darkbargainer.
+SDComment: Quest support: 4001, 4342, 7604, 4322. Vendor Lokhtos Darkbargainer.
SDCategory: Blackrock Depths
EndScriptData */
@@ -25,12 +25,15 @@ EndScriptData */
mob_phalanx
npc_kharan_mighthammer
npc_lokhtos_darkbargainer
+npc_dughal_stormwing
+npc_marshal_windsor
+npc_marshal_reginald_windsor
+npc_tobias_seecher
EndContentData */
#include "precompiled.h"
#include "../../npc/npc_escortAI.h"
#include "def_blackrock_depths.h"
-#include "GameObject.h"
/*######
## mob_phalanx
@@ -281,6 +284,7 @@ CreatureAI* GetAI_npc_dughal_stormwing(Creature *_Creature)
dughal_stormwingAI->AddWaypoint(0, 280.42,-82.86, -77.12,0);
dughal_stormwingAI->AddWaypoint(1, 287.64,-87.01, -76.79,0);
dughal_stormwingAI->AddWaypoint(2, 354.63,-64.95, -67.53,0);
+
return (CreatureAI*)dughal_stormwingAI;
}
bool GossipHello_npc_dughal_stormwing(Player *player, Creature *_Creature)
@@ -425,6 +429,7 @@ struct TRINITY_DLL_DECL npc_marshal_windsorAI : public npc_escortAI
CreatureAI* GetAI_npc_marshal_windsor(Creature *_Creature)
{
npc_marshal_windsorAI* marshal_windsorAI = new npc_marshal_windsorAI(_Creature);
+
marshal_windsorAI->AddWaypoint(0, 316.336,-225.528, -77.7258,7000);
marshal_windsorAI->AddWaypoint(1, 316.336,-225.528, -77.7258,2000);
marshal_windsorAI->AddWaypoint(2, 322.96,-207.13, -77.87,0);
@@ -445,6 +450,7 @@ CreatureAI* GetAI_npc_marshal_windsor(Creature *_Creature)
marshal_windsorAI->AddWaypoint(17, 403.61,-51.71, -63.92,2000);
marshal_windsorAI->AddWaypoint(18, 403.61,-51.71, -63.92,1000);
marshal_windsorAI->AddWaypoint(19, 403.61,-51.71, -63.92,0);
+
return (CreatureAI*)marshal_windsorAI;
}
@@ -545,8 +551,8 @@ struct TRINITY_DLL_DECL npc_marshal_reginald_windsorAI : public npc_escortAI
break;
case 32:
m_creature->Say(SAY_REGINALD_WINDSOR_20_2, LANG_UNIVERSAL, PlayerGUID);
- PlayerStart->GroupEventHappens(QUEST_JAIL_BREAK,m_creature);
- pInstance->SetData(DATA_SHILL,ENCOUNTER_STATE_ENDED);
+ PlayerStart->GroupEventHappens(QUEST_JAIL_BREAK, m_creature);
+ pInstance->SetData(DATA_SHILL, ENCOUNTER_STATE_ENDED);
break;
}
}
@@ -636,6 +642,7 @@ struct TRINITY_DLL_DECL npc_marshal_reginald_windsorAI : public npc_escortAI
CreatureAI* GetAI_npc_marshal_reginald_windsor(Creature *_Creature)
{
npc_marshal_reginald_windsorAI* marshal_reginald_windsorAI = new npc_marshal_reginald_windsorAI(_Creature);
+
marshal_reginald_windsorAI->AddWaypoint(0, 403.61,-52.71, -63.92,4000);
marshal_reginald_windsorAI->AddWaypoint(1, 403.61,-52.71, -63.92,4000);
marshal_reginald_windsorAI->AddWaypoint(2, 406.33,-54.87, -63.95,0);
@@ -667,10 +674,11 @@ CreatureAI* GetAI_npc_marshal_reginald_windsor(Creature *_Creature)
marshal_reginald_windsorAI->AddWaypoint(28, 484.21,-56.24, -62.43,0);
marshal_reginald_windsorAI->AddWaypoint(29, 470.39,-6.01, -70.10,0);
marshal_reginald_windsorAI->AddWaypoint(30, 451.27,30.85, -70.07,0);
- marshal_reginald_windsorAI->AddWaypoint(31, 452.45,29.85, -70.37,1500); //tezi trqbva da se opravqt
+ marshal_reginald_windsorAI->AddWaypoint(31, 452.45,29.85, -70.37,1500);
marshal_reginald_windsorAI->AddWaypoint(32, 452.45,29.85, -70.37,7000);
marshal_reginald_windsorAI->AddWaypoint(33, 452.45,29.85, -70.37,10000);
marshal_reginald_windsorAI->AddWaypoint(34, 451.27,31.85, -70.07,0);
+
return (CreatureAI*)marshal_reginald_windsorAI;
}
@@ -742,6 +750,7 @@ CreatureAI* GetAI_npc_tobias_seecher(Creature *_Creature)
tobias_seecherAI->AddWaypoint(2, 533.59, -249.38, -67.04);
tobias_seecherAI->AddWaypoint(3, 519.44, -217.02, -59.34);
tobias_seecherAI->AddWaypoint(4, 506.55, -153.49, -62.34);
+
return (CreatureAI*)tobias_seecherAI;
}
diff --git a/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp b/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp
index 1eff1d97606..ca9c9c6bf44 100644
--- a/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp
+++ b/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp
@@ -161,7 +161,9 @@ struct TRINITY_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI
case 0:
{
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
- setCage(true);
+ GameObject* Cage = FindGameObject(GO_CAGE);
+ if(Cage)
+ Cage->SetGoState(0);
DoSay(SAY_START, LANG_UNIVERSAL, player);
break;
}
@@ -196,7 +198,9 @@ struct TRINITY_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI
case 33:
m_creature->SetOrientation(5.858011);
DoSay(SAY_END2, LANG_UNIVERSAL, player);
- captainAnswer();
+ Unit* CaptainHelios = FindCreature(NPC_CAPTAIN_HELIOS, 50);
+ if(CaptainHelios)
+ ((Creature*)CaptainHelios)->Say(CAPTAIN_ANSWER, LANG_UNIVERSAL, PlayerGUID);
break;
}
}
@@ -207,7 +211,10 @@ struct TRINITY_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI
{
if (!IsBeingEscorted)
m_creature->setFaction(1602);
- setCage(false);
+
+ GameObject* Cage = FindGameObject(GO_CAGE);
+ if(Cage)
+ Cage->SetGoState(1);
}
void JustDied(Unit* killer)
@@ -224,57 +231,6 @@ struct TRINITY_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI
{
npc_escortAI::UpdateAI(diff);
}
-
- void setCage(bool open)
- {
- CellPair pair(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
- Cell cell(pair);
- cell.data.Part.reserved = ALL_DISTRICT;
- cell.SetNoCreate();
-
- Trinity::AllGameObjectsWithEntryInGrid go_check(GO_CAGE);
- Trinity::GameObjectListSearcher<Trinity::AllGameObjectsWithEntryInGrid> go_search(CageList, go_check);
- TypeContainerVisitor
- <Trinity::GameObjectListSearcher<Trinity::AllGameObjectsWithEntryInGrid>, GridTypeMapContainer> go_visit(go_search);
- CellLock<GridReadGuard> cell_lock(cell, pair);
- cell_lock->Visit(cell_lock, go_visit, *(m_creature->GetMap()));
-
- if (!CageList.empty())
- {
- for(std::list<GameObject*>::iterator itr = CageList.begin(); itr != CageList.end(); ++itr)
- {
- if( open )
- (*itr)->SetGoState(0);
- else
- (*itr)->SetGoState(1);
- }
- } else error_log("SD2 ERROR: CageList is empty!");
- }
-
- void captainAnswer()
- {
- CellPair pair(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
- Cell cell(pair);
- cell.data.Part.reserved = ALL_DISTRICT;
- cell.SetNoCreate();
-
- std::list<Creature*> NPCList;
-
- Trinity::AllCreaturesOfEntryInRange check(m_creature, NPC_CAPTAIN_HELIOS, 100);
- Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(NPCList, check);
- TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> visitor(searcher);
-
- CellLock<GridReadGuard> cell_lock(cell, pair);
- cell_lock->Visit(cell_lock, visitor, *(m_creature->GetMap()));
-
- if (!NPCList.empty())
- {
- for(std::list<Creature*>::iterator itr = NPCList.begin(); itr != NPCList.end(); ++itr)
- {
- (*itr)->Say(CAPTAIN_ANSWER, LANG_UNIVERSAL, PlayerGUID);
- }
- }else error_log("SD2 ERROR: Captain Helios not found!");
- }
};
bool QuestAccept_npc_ranger_lilatha(Player* player, Creature* creature, Quest const* quest)
diff --git a/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp b/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp
index 555ffc0b769..8d1c528f7ae 100644
--- a/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp
+++ b/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp
@@ -670,11 +670,13 @@ bool AreaTrigger_at_commander_dawnforge(Player *player, AreaTriggerEntry *at)
## npc_protectorate_nether_drake
######*/
+#define GOSSIP_ITEM "I'm ready to fly! Take me up, dragon!"
+
bool GossipHello_npc_protectorate_nether_drake(Player *player, Creature *_Creature)
{
//On Nethery Wings
if (player->GetQuestStatus(10438) == QUEST_STATUS_INCOMPLETE && player->HasItemCount(29778,1) )
- player->ADD_GOSSIP_ITEM(0, "Fly me to Ultris", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
@@ -698,6 +700,49 @@ bool GossipSelect_npc_protectorate_nether_drake(Player *player, Creature *_Creat
}
/*######
+## npc_professor_dabiri
+######*/
+
+#define SPELL_PHASE_DISTRUPTOR 35780
+#define GOSSIP_ITEM "I need a new phase distruptor, Professor"
+#define WHISPER_DABIRI "Saeed is currently engaged or awaiting orders to engage. You may check directly east of me and see if Saeed is ready for you. If he is not present then he is off fighting another battle. I recommend that you wait for him to return before attacking Dimensius."
+
+#define QUEST_DIMENSIUS 10439
+#define QUEST_ON_NETHERY_WINGS 10438
+
+bool GossipHello_npc_professor_dabiri(Player *player, Creature *_Creature)
+{
+ if (_Creature->isQuestGiver())
+ player->PrepareQuestMenu( _Creature->GetGUID() );
+
+ if(player->GetQuestStatus(QUEST_ON_NETHERY_WINGS) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(29778, 1))
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+
+ player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
+
+ return true;
+}
+
+bool GossipSelect_npc_professor_dabiri(Player *player, Creature *_Creature, uint32 sender, uint32 action )
+{
+ if (action == GOSSIP_ACTION_INFO_DEF+1)
+ {
+ _Creature->CastSpell(player, SPELL_PHASE_DISTRUPTOR, false);
+ player->CLOSE_GOSSIP_MENU();
+ }
+
+ return true;
+}
+
+bool QuestAccept_npc_professor_dabiri(Player *player, Creature *creature, Quest const *quest )
+{
+ if(quest->GetQuestId() == QUEST_DIMENSIUS)
+ creature->Whisper(WHISPER_DABIRI, player->GetGUID(), false);
+
+ return true;
+}
+
+/*######
## npc_veronia
######*/
@@ -870,6 +915,13 @@ void AddSC_netherstorm()
newscript->pGossipSelect = &GossipSelect_npc_protectorate_nether_drake;
newscript->RegisterSelf();
+ newscript = new Script;
+ newscript->Name = "npc_professor_dabiri";
+ newscript->pGossipHello = &GossipHello_npc_professor_dabiri;
+ newscript->pGossipSelect = &GossipSelect_npc_professor_dabiri;
+ newscript->pQuestAccept = &QuestAccept_npc_professor_dabiri;
+ newscript->RegisterSelf();
+
newscript = new Script;
newscript->Name="npc_veronia";
newscript->pGossipHello = &GossipHello_npc_veronia;
diff --git a/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp b/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp
index e68286d4f21..3ebb0931d4d 100644
--- a/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp
+++ b/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp
@@ -467,25 +467,13 @@ struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI
else {
if(LaceratingSlash_Timer < diff)
{
- if(!m_creature->getVictim()->HasAura(SPELL_MANGLEEFFECT, 0))
- DoCast(m_creature->getVictim(), SPELL_LACERATINGSLASH);
- else
- {
- int32 bp0 = 3470;
- m_creature->CastCustomSpell(m_creature->getVictim(), SPELL_LACERATINGSLASH, &bp0, NULL, NULL, false);
- }
+ DoCast(m_creature->getVictim(), SPELL_LACERATINGSLASH);
LaceratingSlash_Timer = 18000 + rand()%5000;
}else LaceratingSlash_Timer -= diff;
if(RendFlesh_Timer < diff)
{
- if(!m_creature->getVictim()->HasAura(SPELL_MANGLEEFFECT, 0))
- DoCast(m_creature->getVictim(), SPELL_RENDFLESH);
- else
- {
- int32 bp1 = 4670;
- m_creature->CastCustomSpell(m_creature->getVictim(), SPELL_RENDFLESH, NULL, &bp1, NULL, false);
- }
+ DoCast(m_creature->getVictim(), SPELL_RENDFLESH);
RendFlesh_Timer = 5000 + rand()%5000;
}else RendFlesh_Timer -= diff;