diff options
| author | Nay <dnpd.dd@gmail.com> | 2012-08-30 23:06:19 +0100 |
|---|---|---|
| committer | Nay <dnpd.dd@gmail.com> | 2012-08-30 23:06:19 +0100 |
| commit | d61f3131fb3b149c5c075dee5507cbed29927a80 (patch) | |
| tree | 9ef1d57bbcdcf9ab8f255f7349036f3ef5fb50ff /src/server/scripts/EasternKingdoms | |
| parent | 872c239dbe0a0a289ed72b3204986df2a612f546 (diff) | |
| parent | e3d9768a50a3b2b700d65e0cc96e697a5c9d22dc (diff) | |
Merge remote-tracking branch 'origin/master' into 4.3.4
Conflicts:
src/server/game/Entities/Creature/Creature.cpp
src/server/game/Entities/Player/Player.cpp
src/server/game/Globals/ObjectMgr.cpp
src/server/game/Server/Protocol/Opcodes.h
src/server/scripts/EasternKingdoms/silverpine_forest.cpp
src/server/scripts/Kalimdor/silithus.cpp
src/server/shared/DataStores/DBCFileLoader.h
src/server/shared/Database/Implementation/WorldDatabase.cpp
src/tools/map_extractor/System.cpp
src/tools/map_extractor/dbcfile.cpp
src/tools/vmap4_extractor/adtfile.cpp
src/tools/vmap4_extractor/dbcfile.cpp
src/tools/vmap4_extractor/wdtfile.cpp
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
5 files changed, 24 insertions, 30 deletions
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp index 204fbe5223b..25c3f2e41e3 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp @@ -243,11 +243,9 @@ public: std::list<HostileReference*> threatlist = me->getThreatManager().getThreatList(); for (std::list<HostileReference*>::const_iterator i = threatlist.begin(); i != threatlist.end(); ++i) { - Unit* unit; if ((*i) && (*i)->getSource()) { - unit = Unit::GetUnit(*me, (*i)->getUnitGuid()); - if (unit) + if (Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid())) { //Cast affliction DoCast(unit, RAND(SPELL_BROODAF_BLUE, SPELL_BROODAF_BLACK, diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp index 06c1243645c..533a1aac2f0 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp @@ -201,12 +201,11 @@ public: { for (uint8 i = 0; i < 4; ++i) { - Creature* Temp = NULL; if (AddGUID[i]) { - Temp = Creature::GetCreature((*me), AddGUID[i]); - if (Temp && Temp->isAlive()) - Temp->DisappearAndDie(); + Creature* temp = Creature::GetCreature((*me), AddGUID[i]); + if (temp && temp->isAlive()) + temp->DisappearAndDie(); } } } @@ -215,14 +214,13 @@ public: { for (uint8 i = 0; i < 4; ++i) { - Creature* Temp = NULL; if (AddGUID[i]) { - Temp = Creature::GetCreature((*me), AddGUID[i]); - if (Temp && Temp->isAlive()) + Creature* temp = Creature::GetCreature((*me), AddGUID[i]); + if (temp && temp->isAlive()) { - Temp->AI()->AttackStart(me->getVictim()); - DoZoneInCombat(Temp); + temp->AI()->AttackStart(me->getVictim()); + DoZoneInCombat(temp); } else EnterEvadeMode(); } @@ -250,13 +248,12 @@ public: { for (uint8 i = 0; i < 4; ++i) { - Creature* Temp = NULL; if (AddGUID[i]) { - Temp = Unit::GetCreature((*me), AddGUID[i]); - if (Temp && Temp->isAlive()) - if (!Temp->getVictim()) - Temp->AI()->AttackStart(me->getVictim()); + Creature* temp = Unit::GetCreature((*me), AddGUID[i]); + if (temp && temp->isAlive()) + if (!temp->getVictim()) + temp->AI()->AttackStart(me->getVictim()); } } CheckAdds_Timer = 5000; diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp index d4c037d45c3..b405f9eba85 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp @@ -240,7 +240,6 @@ public: return; Creature* pArchmage = instance->GetCreature(uiArchmageArugalGUID); - Creature* summon = NULL; if (!pArchmage || !pArchmage->isAlive()) return; @@ -252,7 +251,8 @@ public: switch (uiPhase) { case 1: - summon = pArchmage->SummonCreature(pArchmage->GetEntry(), SpawnLocation[4], TEMPSUMMON_TIMED_DESPAWN, 10000); + { + Creature* summon = pArchmage->SummonCreature(pArchmage->GetEntry(), SpawnLocation[4], TEMPSUMMON_TIMED_DESPAWN, 10000); summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); summon->SetReactState(REACT_DEFENSIVE); summon->CastSpell(summon, SPELL_ASHCROMBE_TELEPORT, true); @@ -260,13 +260,16 @@ public: uiTimer = 2000; uiPhase = 2; break; + } case 2: + { pArchmage->SummonCreature(NPC_ARUGAL_VOIDWALKER, SpawnLocation[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000); pArchmage->SummonCreature(NPC_ARUGAL_VOIDWALKER, SpawnLocation[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000); pArchmage->SummonCreature(NPC_ARUGAL_VOIDWALKER, SpawnLocation[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000); pArchmage->SummonCreature(NPC_ARUGAL_VOIDWALKER, SpawnLocation[3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000); uiPhase = 0; break; + } } } else uiTimer -= uiDiff; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp index 1009d3e0a0a..8fb3dd55077 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp @@ -315,14 +315,12 @@ class boss_zuljin : public CreatureScript { for (uint8 i = 0; i < 4; ++i) { - Unit* Temp = NULL; if (SpiritGUID[i]) { - Temp = Unit::GetUnit(*me, SpiritGUID[i]); - if (Temp) + if (Unit* temp = Unit::GetUnit(*me, SpiritGUID[i])) { - Temp->SetVisible(false); - Temp->setDeathState(DEAD); + temp->SetVisible(false); + temp->setDeathState(DEAD); } } SpiritGUID[i] = 0; diff --git a/src/server/scripts/EasternKingdoms/wetlands.cpp b/src/server/scripts/EasternKingdoms/wetlands.cpp index fac8fb51c2d..34e6e7c9ddf 100644 --- a/src/server/scripts/EasternKingdoms/wetlands.cpp +++ b/src/server/scripts/EasternKingdoms/wetlands.cpp @@ -60,12 +60,12 @@ public: { npc_tapoke_slim_jahnAI(Creature* creature) : npc_escortAI(creature) { } - bool m_bFriendSummoned; + bool IsFriendSummoned; void Reset() { if (!HasEscortState(STATE_ESCORT_ESCORTING)) - m_bFriendSummoned = false; + IsFriendSummoned = false; } void WaypointReached(uint32 waypointId) @@ -83,14 +83,12 @@ public: void EnterCombat(Unit* /*who*/) { - Player* player = GetPlayerForEscort(); - - if (HasEscortState(STATE_ESCORT_ESCORTING) && !m_bFriendSummoned && player) + if (HasEscortState(STATE_ESCORT_ESCORTING) && !IsFriendSummoned && GetPlayerForEscort()) { for (uint8 i = 0; i < 3; ++i) DoCast(me, SPELL_CALL_FRIENDS, true); - m_bFriendSummoned = true; + IsFriendSummoned = true; } } |
