aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/EasternKingdoms
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2014-09-06 02:41:45 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2014-09-06 02:41:45 +0200
commitfe99efd6fa2ea879970d4984361edc6b29d949b5 (patch)
treeeb35a3453fcc88b88a7cf0c962d7b4b218bdd42d /src/server/scripts/EasternKingdoms
parent9a4f062b266315c99d5d2f018abc5161b890f81f (diff)
parent7f93e1e56e205c974b7644c6efa80fec11a6a78b (diff)
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/scripts/Commands/cs_misc.cpp src/server/scripts/Events/childrens_week.cpp src/server/scripts/Kalimdor/boss_azuregos.cpp src/server/scripts/Kalimdor/zone_azshara.cpp src/server/scripts/Kalimdor/zone_darkshore.cpp src/server/scripts/Kalimdor/zone_durotar.cpp src/server/scripts/Kalimdor/zone_moonglade.cpp src/server/scripts/Kalimdor/zone_mulgore.cpp src/server/scripts/Kalimdor/zone_orgrimmar.cpp src/server/scripts/Kalimdor/zone_thousand_needles.cpp src/server/scripts/Kalimdor/zone_ungoro_crater.cpp src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
-rw-r--r--src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/zone_wetlands.cpp12
2 files changed, 26 insertions, 14 deletions
diff --git a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp
index dbcf5998bdb..d242d17806c 100644
--- a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp
@@ -319,19 +319,24 @@ public:
struct npc_anchorite_truuenAI : public npc_escortAI
{
- npc_anchorite_truuenAI(Creature* creature) : npc_escortAI(creature) { }
+ npc_anchorite_truuenAI(Creature* creature) : npc_escortAI(creature)
+ {
+ Initialize();
+ UghostGUID = 0;
+ }
+
+ void Initialize()
+ {
+ m_uiChatTimer = 7000;
+ }
uint32 m_uiChatTimer;
uint64 UghostGUID;
- uint64 TheldanisGUID;
-
- Creature* Ughost;
- Creature* Theldanis;
void Reset() override
{
- m_uiChatTimer = 7000;
+ Initialize();
}
void JustSummoned(Creature* summoned) override
@@ -364,26 +369,25 @@ public:
Talk(SAY_WP_2);
break;
case 21:
- Theldanis = GetClosestCreatureWithEntry(me, NPC_THEL_DANIS, 150);
- if (Theldanis)
+ if (Creature* Theldanis = GetClosestCreatureWithEntry(me, NPC_THEL_DANIS, 150))
Theldanis->AI()->Talk(SAY_WP_3);
break;
case 23:
- Ughost = me->SummonCreature(NPC_GHOST_UTHER, 971.86f, -1825.42f, 81.99f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
- if (Ughost)
+ if (Creature* Ughost = me->SummonCreature(NPC_GHOST_UTHER, 971.86f, -1825.42f, 81.99f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
{
+ UghostGUID = Ughost->GetGUID();
Ughost->SetDisableGravity(true);
Ughost->AI()->Talk(SAY_WP_4, me);
}
m_uiChatTimer = 4000;
break;
case 24:
- if (Ughost)
+ if (Creature* Ughost = ObjectAccessor::GetCreature(*me, UghostGUID))
Ughost->AI()->Talk(SAY_WP_5, me);
m_uiChatTimer = 4000;
break;
case 25:
- if (Ughost)
+ if (Creature* Ughost = ObjectAccessor::GetCreature(*me, UghostGUID))
Ughost->AI()->Talk(SAY_WP_6, me);
m_uiChatTimer = 4000;
break;
diff --git a/src/server/scripts/EasternKingdoms/zone_wetlands.cpp b/src/server/scripts/EasternKingdoms/zone_wetlands.cpp
index e6c844b1b1e..94cea417b04 100644
--- a/src/server/scripts/EasternKingdoms/zone_wetlands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_wetlands.cpp
@@ -59,14 +59,22 @@ public:
struct npc_tapoke_slim_jahnAI : public npc_escortAI
{
- npc_tapoke_slim_jahnAI(Creature* creature) : npc_escortAI(creature) { }
+ npc_tapoke_slim_jahnAI(Creature* creature) : npc_escortAI(creature)
+ {
+ Initialize();
+ }
+
+ void Initialize()
+ {
+ IsFriendSummoned = false;
+ }
bool IsFriendSummoned;
void Reset() override
{
if (!HasEscortState(STATE_ESCORT_ESCORTING))
- IsFriendSummoned = false;
+ Initialize();
}
void WaypointReached(uint32 waypointId) override