aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Northrend
diff options
context:
space:
mode:
authorSubv <s.v.h21@hotmail.com>2012-08-12 13:18:19 -0500
committerSubv <s.v.h21@hotmail.com>2012-08-12 13:18:19 -0500
commit61fcae113b92053388433c2a98e0ec7f3c360acd (patch)
tree10f3da98a5f8dd7056fc28a4edb6bd1cda0c30e8 /src/server/scripts/Northrend
parent75af5ac3535e8726a03f9575357f44f3981989a0 (diff)
parentf92946e128ed44de21c97900b0a935c7c55fcd65 (diff)
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/scripts/Kalimdor/moonglade.cpp
Diffstat (limited to 'src/server/scripts/Northrend')
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp2
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp6
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp1
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp1
-rw-r--r--src/server/scripts/Northrend/grizzly_hills.cpp147
5 files changed, 76 insertions, 81 deletions
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
index 76d5949eb44..d77c84b2978 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
@@ -219,8 +219,6 @@ public:
}
InstanceScript* instance;
-
- Creature* pMemory;
uint64 MemoryGUID;
bool bHealth;
diff --git a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp
index 7778a79a816..7875d8edacf 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp
@@ -190,16 +190,12 @@ public:
{
OUT_SAVE_INST_DATA;
- std::string str_data;
-
std::ostringstream saveStream;
saveStream << "D K " << m_auiEncounter[0] << ' ' << m_auiEncounter[1] << ' '
<< m_auiEncounter[2] << ' ' << m_auiEncounter[3];
- str_data = saveStream.str();
-
OUT_SAVE_INST_DATA_COMPLETE;
- return str_data;
+ return saveStream.str();
}
void Load(const char* in)
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
index 654d763ddbc..2f37fb06f24 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
@@ -134,6 +134,7 @@ class instance_ulduar : public InstanceMapScript
elderCount = 0;
conSpeedAtory = false;
Unbroken = true;
+ _algalonSummoned = false;
_summonAlgalon = false;
memset(AlgalonSigilDoorGUID, 0, sizeof(AlgalonSigilDoorGUID));
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp
index 191f4530e65..48667053373 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp
@@ -101,6 +101,7 @@ public:
boss_ingvar_the_plundererAI(Creature* creature) : ScriptedAI(creature)
{
instance = creature->GetInstanceScript();
+ bIsUndead = false;
}
InstanceScript* instance;
diff --git a/src/server/scripts/Northrend/grizzly_hills.cpp b/src/server/scripts/Northrend/grizzly_hills.cpp
index 1a0f6b57375..4ca12bc82a1 100644
--- a/src/server/scripts/Northrend/grizzly_hills.cpp
+++ b/src/server/scripts/Northrend/grizzly_hills.cpp
@@ -600,100 +600,99 @@ enum eSmokeEmOut
QUEST_SMOKE_EM_OUT_H = 12324,
SPELL_SMOKE_BOMB = 49075,
SPELL_CHOP = 43410,
- NPC_VENTURE_CO_STABLES_KC = 27568,
+ SPELL_VENTURE_STRAGGLER_CREDIT = 49093,
};
class npc_venture_co_straggler : public CreatureScript
{
-public:
- npc_venture_co_straggler() : CreatureScript("npc_venture_co_straggler") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new npc_venture_co_stragglerAI(creature);
- }
+ public:
+ npc_venture_co_straggler() : CreatureScript("npc_venture_co_straggler") { }
- struct npc_venture_co_stragglerAI : public ScriptedAI
- {
- npc_venture_co_stragglerAI(Creature* creature) : ScriptedAI(creature) { }
+ struct npc_venture_co_stragglerAI : public ScriptedAI
+ {
+ npc_venture_co_stragglerAI(Creature* creature) : ScriptedAI(creature) { }
- uint64 uiPlayerGUID;
- uint32 uiRunAwayTimer;
- uint32 uiTimer;
- uint32 uiChopTimer;
+ uint64 uiPlayerGUID;
+ uint32 uiRunAwayTimer;
+ uint32 uiTimer;
+ uint32 uiChopTimer;
- void Reset()
- {
- uiPlayerGUID = 0;
- uiTimer = 0;
- uiChopTimer = urand(10000, 12500);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
- me->SetReactState(REACT_AGGRESSIVE);
- }
+ void Reset()
+ {
+ uiPlayerGUID = 0;
+ uiTimer = 0;
+ uiRunAwayTimer = 0;
+ uiChopTimer = urand(10000, 12500);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
+ me->SetReactState(REACT_AGGRESSIVE);
+ }
- void UpdateAI(const uint32 uiDiff)
- {
- if (uiRunAwayTimer <= uiDiff)
+ void UpdateAI(const uint32 uiDiff)
{
- if (Player* player = Unit::GetPlayer(*me, uiPlayerGUID))
+ if (uiPlayerGUID && uiRunAwayTimer <= uiDiff)
{
- switch (uiTimer)
+ if (Player* player = Unit::GetPlayer(*me, uiPlayerGUID))
{
- case 0:
- if (player->GetQuestStatus(QUEST_SMOKE_EM_OUT_A) == QUEST_STATUS_INCOMPLETE ||
- player->GetQuestStatus(QUEST_SMOKE_EM_OUT_H) == QUEST_STATUS_INCOMPLETE)
- player->KilledMonsterCredit(NPC_VENTURE_CO_STABLES_KC, 0);
- me->GetMotionMaster()->MovePoint(0, me->GetPositionX()-7, me->GetPositionY()+7, me->GetPositionZ());
- uiRunAwayTimer = 2500;
- ++uiTimer;
- break;
- case 1:
- DoScriptText(RAND(SAY_SEO1, SAY_SEO2, SAY_SEO3, SAY_SEO4, SAY_SEO5), me);
- me->GetMotionMaster()->MovePoint(0, me->GetPositionX()-7, me->GetPositionY()-5, me->GetPositionZ());
- uiRunAwayTimer = 2500;
- ++uiTimer;
- break;
- case 2:
- me->GetMotionMaster()->MovePoint(0, me->GetPositionX()-5, me->GetPositionY()-5, me->GetPositionZ());
- uiRunAwayTimer = 2500;
- ++uiTimer;
- break;
- case 3:
- me->DisappearAndDie();
- uiTimer = 0;
- break;
+ switch (uiTimer)
+ {
+ case 0:
+ DoCast(player, SPELL_VENTURE_STRAGGLER_CREDIT);
+ me->GetMotionMaster()->MovePoint(0, me->GetPositionX()-7, me->GetPositionY()+7, me->GetPositionZ());
+ uiRunAwayTimer = 2500;
+ ++uiTimer;
+ break;
+ case 1:
+ DoScriptText(RAND(SAY_SEO1, SAY_SEO2, SAY_SEO3, SAY_SEO4, SAY_SEO5), me);
+ me->GetMotionMaster()->MovePoint(0, me->GetPositionX()-7, me->GetPositionY()-5, me->GetPositionZ());
+ uiRunAwayTimer = 2500;
+ ++uiTimer;
+ break;
+ case 2:
+ me->GetMotionMaster()->MovePoint(0, me->GetPositionX()-5, me->GetPositionY()-5, me->GetPositionZ());
+ uiRunAwayTimer = 2500;
+ ++uiTimer;
+ break;
+ case 3:
+ me->DisappearAndDie();
+ uiTimer = 0;
+ break;
+ }
}
}
- }
- else
- uiRunAwayTimer -= uiDiff;
+ else if (uiRunAwayTimer)
+ uiRunAwayTimer -= uiDiff;
- if (!UpdateVictim())
- return;
+ if (!UpdateVictim())
+ return;
- if (uiChopTimer <= uiDiff)
- {
- DoCast(me->getVictim(), SPELL_CHOP);
- uiChopTimer = urand(10000, 12000);
- }
- else
- uiChopTimer -= uiDiff;
+ if (uiChopTimer <= uiDiff)
+ {
+ DoCast(me->getVictim(), SPELL_CHOP);
+ uiChopTimer = urand(10000, 12000);
+ }
+ else
+ uiChopTimer -= uiDiff;
- DoMeleeAttackIfReady();
- }
+ DoMeleeAttackIfReady();
+ }
- void SpellHit(Unit* pCaster, const SpellInfo* pSpell)
- {
- if (pCaster && pCaster->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_SMOKE_BOMB)
+ void SpellHit(Unit* caster, SpellInfo const* spell)
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
- me->SetReactState(REACT_PASSIVE);
- me->CombatStop(false);
- uiPlayerGUID = pCaster->GetGUID();
- uiRunAwayTimer = 3500;
+ if (spell->Id == SPELL_SMOKE_BOMB && caster->GetTypeId() == TYPEID_PLAYER)
+ {
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
+ me->SetReactState(REACT_PASSIVE);
+ me->CombatStop(false);
+ uiPlayerGUID = caster->GetGUID();
+ uiRunAwayTimer = 3500;
+ }
}
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_venture_co_stragglerAI(creature);
}
- };
};
void AddSC_grizzly_hills()