diff options
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
30 files changed, 102 insertions, 204 deletions
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp index 25c3f2e41e3..9beb3bb10fe 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp @@ -240,8 +240,8 @@ public:              //Affliction_Timer              if (Affliction_Timer <= diff)              { -                std::list<HostileReference*> threatlist = me->getThreatManager().getThreatList(); -                for (std::list<HostileReference*>::const_iterator i = threatlist.begin(); i != threatlist.end(); ++i) +                ThreatContainer::StorageType threatlist = me->getThreatManager().getThreatList(); +                for (ThreatContainer::StorageType::const_iterator i = threatlist.begin(); i != threatlist.end(); ++i)                  {                      if ((*i) && (*i)->getSource())                      { diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp index bf27cad44ef..2c7e1b9c48a 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp @@ -187,13 +187,11 @@ public:                  if (Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, 1))                      DoCast(target, SPELL_HATEFUL_BOLT); -              } else HatefulBoltTimer -= diff;              DoMeleeAttackIfReady();          }      }; -  };  void AddSC_boss_curator() diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp index 8921867be21..5f974a890bf 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp @@ -132,9 +132,7 @@ public:              DoMeleeAttackIfReady();          } -      }; -  };  void AddSC_boss_maiden_of_virtue() diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp index ea9cfe5c3c1..7eeced1d970 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp @@ -111,7 +111,6 @@ public:                  DoScriptText(SAY_DISARMED, me);          }      }; -  };  class boss_midnight : public CreatureScript @@ -232,7 +231,6 @@ public:              CAST_AI(boss_attumen::boss_attumenAI, pAttumen->AI())->Midnight = value;          }      }; -  };  void boss_attumen::boss_attumenAI::UpdateAI(const uint32 diff) @@ -284,9 +282,9 @@ void boss_attumen::boss_attumenAI::UpdateAI(const uint32 diff)          if (ChargeTimer <= diff)          {              Unit* target = NULL; -            std::list<HostileReference*> t_list = me->getThreatManager().getThreatList(); +            ThreatContainer::StorageType const &t_list = me->getThreatManager().getThreatList();              std::vector<Unit*> target_list; -            for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) +            for (ThreatContainer::StorageType::const_iterator itr = t_list.begin(); itr != t_list.end(); ++itr)              {                  target = Unit::GetUnit(*me, (*itr)->getUnitGuid());                  if (target && !target->IsWithinDist(me, ATTACK_DISTANCE, false)) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp index 533a1aac2f0..99f2cb51c85 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp @@ -307,7 +307,6 @@ public:                  DoMeleeAttackIfReady();          }      }; -  };  struct boss_moroes_guestAI : public ScriptedAI @@ -452,7 +451,6 @@ public:              } else ShadowWordPain_Timer -= diff;          }      }; -  };  class boss_baron_rafe_dreuger : public CreatureScript @@ -510,7 +508,6 @@ public:              } else HammerOfJustice_Timer -= diff;          }      }; -  };  class boss_lady_catriona_von_indi : public CreatureScript @@ -581,7 +578,6 @@ public:              } else DispelMagic_Timer -= diff;          }      }; -  };  class boss_lady_keira_berrybuck : public CreatureScript @@ -656,7 +652,6 @@ public:              } else Cleanse_Timer -= diff;          }      }; -  };  class boss_lord_robin_daris : public CreatureScript @@ -713,7 +708,6 @@ public:              } else WhirlWind_Timer -= diff;          }      }; -  };  class boss_lord_crispin_ference : public CreatureScript @@ -778,7 +772,6 @@ public:              } else ShieldWall_Timer -= diff;          }      }; -  };  void AddSC_boss_moroes() diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp index 60e1a5ebc4c..c6587c3cd8a 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp @@ -333,7 +333,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  void AddSC_boss_netherspite() diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp index e2420749a4c..690822203b5 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp @@ -413,7 +413,6 @@ public:              }          }      }; -  };  void AddSC_boss_nightbane() diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp index f4195620dda..d1c4790d705 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp @@ -169,7 +169,6 @@ public:          void Cleanup();      }; -  };  class boss_malchezaar : public CreatureScript @@ -314,14 +313,14 @@ public:              if (!info)                  return; -            std::list<HostileReference*> t_list = me->getThreatManager().getThreatList(); +            ThreatContainer::StorageType const &t_list = me->getThreatManager().getThreatList();              std::vector<Unit*> targets;              if (t_list.empty())                  return;              //begin + 1, so we don't target the one with the highest threat -            std::list<HostileReference*>::const_iterator itr = t_list.begin(); +            ThreatContainer::StorageType::const_iterator itr = t_list.begin();              std::advance(itr, 1);              for (; itr != t_list.end(); ++itr) //store the threat list in a different container                  if (Unit* target = Unit::GetUnit(*me, (*itr)->getUnitGuid())) @@ -483,14 +482,12 @@ public:                  {                      DoCast(me->getVictim(), SPELL_SUNDER_ARMOR);                      SunderArmorTimer = urand(10000, 18000); -                  } else SunderArmorTimer -= diff;                  if (Cleave_Timer <= diff)                  {                      DoCast(me->getVictim(), SPELL_CLEAVE);                      Cleave_Timer = urand(6000, 12000); -                  } else Cleave_Timer -= diff;              }              else @@ -602,15 +599,14 @@ public:              positions.push_back(point);          }      }; -  };  void netherspite_infernal::netherspite_infernalAI::Cleanup()  { -    Unit* pMalchezaar = Unit::GetUnit(*me, malchezaar); +    Creature *pMalchezaar = Unit::GetCreature(*me, malchezaar);      if (pMalchezaar && pMalchezaar->isAlive()) -        CAST_AI(boss_malchezaar::boss_malchezaarAI, CAST_CRE(pMalchezaar)->AI())->Cleanup(me, point); +        CAST_AI(boss_malchezaar::boss_malchezaarAI, pMalchezaar->AI())->Cleanup(me, point);  }  void AddSC_boss_malchezaar() diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index 7dd4e731a18..25fafdfcd0d 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -187,13 +187,13 @@ public:          void FlameWreathEffect()          {              std::vector<Unit*> targets; -            std::list<HostileReference*> t_list = me->getThreatManager().getThreatList(); +            ThreatContainer::StorageType const &t_list = me->getThreatManager().getThreatList();              if (t_list.empty())                  return;              //store the threat list in a different container -            for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) +            for (ThreatContainer::StorageType::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)              {                  Unit* target = Unit::GetUnit(*me, (*itr)->getUnitGuid());                  //only on alive players @@ -508,7 +508,6 @@ public:              }          }      }; -  };  class mob_aran_elemental : public CreatureScript @@ -546,7 +545,6 @@ public:              } else CastTimer -= diff;          }      }; -  };  void AddSC_boss_shade_of_aran() diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp index 44cd7e0faea..688a678060f 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp @@ -127,7 +127,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  class mob_demon_chain : public CreatureScript @@ -165,7 +164,6 @@ public:              }          }      }; -  };  class mob_fiendish_portal : public CreatureScript @@ -200,7 +198,6 @@ public:              summons.DespawnAll();          }      }; -  };  #define SPELL_FIREBOLT  30050   // Blasts a target for 181-209 Fire damage. @@ -245,7 +242,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  class boss_terestian_illhoof : public CreatureScript @@ -422,7 +418,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  void AddSC_boss_terestian_illhoof() diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index 30d33dc65cf..a4f4f603206 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -216,7 +216,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  class mob_tito : public CreatureScript @@ -271,7 +270,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  void boss_dorothee::boss_dorotheeAI::SummonTito() @@ -398,7 +396,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  class boss_tinhead : public CreatureScript @@ -508,7 +505,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  class boss_roar : public CreatureScript @@ -617,7 +613,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  class boss_crone : public CreatureScript @@ -699,7 +694,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  class mob_cyclone : public CreatureScript @@ -743,7 +737,6 @@ public:              } else MoveTimer -= diff;          }      }; -  };  /**************************************/ @@ -792,7 +785,6 @@ public:          return true;      } -  };  class boss_bigbadwolf : public CreatureScript @@ -915,10 +907,8 @@ public:                  DoCast(me->getVictim(), SPELL_WIDE_SWIPE);                  SwipeTimer = urand(25000, 30000);              } else SwipeTimer -= diff; -          }      }; -  };  /**********************************************/ @@ -977,7 +967,7 @@ void PretendToDie(Creature* creature)      creature->GetMotionMaster()->MovementExpired(false);      creature->GetMotionMaster()->MoveIdle();      creature->SetStandState(UNIT_STAND_STATE_DEAD); -}; +}  void Resurrect(Creature* target)  { @@ -992,7 +982,7 @@ void Resurrect(Creature* target)      }          else              target->GetMotionMaster()->Initialize(); -}; +}  class boss_julianne : public CreatureScript  { @@ -1114,7 +1104,6 @@ public:          void UpdateAI(const uint32 diff);      }; -  };  class boss_romulo : public CreatureScript @@ -1321,7 +1310,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  void boss_julianne::boss_julianneAI::UpdateAI(const uint32 diff) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index 05d6ecf1478..2ecd98cbc4c 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -288,7 +288,7 @@ public:              return 0;          } -        void Load(const char* chrIn) +        void Load(char const* chrIn)          {              if (!chrIn)              { @@ -308,7 +308,6 @@ public:              OUT_LOAD_INST_DATA_COMPLETE;          }      }; -  };  void AddSC_instance_karazhan() diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp index b84fc15d664..3bdfeab30da 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp @@ -321,7 +321,6 @@ public:                          WipeTimer = 15000;                      } else WipeTimer -= diff;                  } -              }          }      }; @@ -344,17 +343,17 @@ public:              case GOSSIP_ACTION_INFO_DEF+3:                  player->CLOSE_GOSSIP_MENU();                  pBarnesAI->m_uiEventId = EVENT_OZ; -                sLog->outInfo(LOG_FILTER_TSCR, "TSCR: player (GUID " UI64FMTD ") manually set Opera event to EVENT_OZ", player->GetGUID()); +                sLog->outInfo(LOG_FILTER_TSCR, "player (GUID " UI64FMTD ") manually set Opera event to EVENT_OZ", player->GetGUID());                  break;              case GOSSIP_ACTION_INFO_DEF+4:                  player->CLOSE_GOSSIP_MENU();                  pBarnesAI->m_uiEventId = EVENT_HOOD; -                sLog->outInfo(LOG_FILTER_TSCR, "TSCR: player (GUID " UI64FMTD ") manually set Opera event to EVENT_HOOD", player->GetGUID()); +                sLog->outInfo(LOG_FILTER_TSCR, "player (GUID " UI64FMTD ") manually set Opera event to EVENT_HOOD", player->GetGUID());                  break;              case GOSSIP_ACTION_INFO_DEF+5:                  player->CLOSE_GOSSIP_MENU();                  pBarnesAI->m_uiEventId = EVENT_RAJ; -                sLog->outInfo(LOG_FILTER_TSCR, "TSCR: player (GUID " UI64FMTD ") manually set Opera event to EVENT_RAJ", player->GetGUID()); +                sLog->outInfo(LOG_FILTER_TSCR, "player (GUID " UI64FMTD ") manually set Opera event to EVENT_RAJ", player->GetGUID());                  break;          } @@ -397,7 +396,6 @@ public:      {          return new npc_barnesAI(creature);      } -  };  /*### @@ -438,7 +436,6 @@ public:          player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());          return true;      } -  };  /*### @@ -538,7 +535,7 @@ public:          uint32 NextStep(uint32 Step)          { -            Unit* arca = Unit::GetUnit(*me, ArcanagosGUID); +            Creature* arca = Unit::GetCreature(*me, ArcanagosGUID);              Map* map = me->GetMap();              switch (Step)              { @@ -548,21 +545,21 @@ public:                  return 10000;              case 2:                  if (arca) -                    CAST_CRE(arca)->MonsterYell(SAY_DIALOG_ARCANAGOS_2, LANG_UNIVERSAL, 0); +                    arca->MonsterYell(SAY_DIALOG_ARCANAGOS_2, LANG_UNIVERSAL, 0);                  return 20000;              case 3:                  me->MonsterYell(SAY_DIALOG_MEDIVH_3, LANG_UNIVERSAL, 0);                  return 10000;              case 4:                  if (arca) -                    CAST_CRE(arca)->MonsterYell(SAY_DIALOG_ARCANAGOS_4, LANG_UNIVERSAL, 0); +                    arca->MonsterYell(SAY_DIALOG_ARCANAGOS_4, LANG_UNIVERSAL, 0);                  return 20000;              case 5:                  me->MonsterYell(SAY_DIALOG_MEDIVH_5, LANG_UNIVERSAL, 0);                  return 20000;              case 6:                  if (arca) -                    CAST_CRE(arca)->MonsterYell(SAY_DIALOG_ARCANAGOS_6, LANG_UNIVERSAL, 0); +                    arca->MonsterYell(SAY_DIALOG_ARCANAGOS_6, LANG_UNIVERSAL, 0);                  return 10000;              case 7:                  FireArcanagosTimer = 500; @@ -580,7 +577,7 @@ public:                  return 1000;              case 11:                  if (arca) -                    CAST_CRE(arca)->MonsterYell(SAY_DIALOG_ARCANAGOS_8, LANG_UNIVERSAL, 0); +                    arca->MonsterYell(SAY_DIALOG_ARCANAGOS_8, LANG_UNIVERSAL, 0);                  return 5000;              case 12:                  arca->GetMotionMaster()->MovePoint(0, -11010.82f, -1761.18f, 156.47f); @@ -613,12 +610,10 @@ public:                  return 5000;              default : return 9999999;              } -          }          void UpdateAI(const uint32 diff)          { -              if (YellTimer <= diff)              {                  if (EventStarted) @@ -645,7 +640,6 @@ public:              }          }      }; -  };  void AddSC_karazhan() diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h index e1817034189..c8a1aa55c7e 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h @@ -64,4 +64,3 @@ enum OperaEvents  #define ERROR_INST_DATA(a)          sLog->outError(LOG_FILTER_TSCR, "Instance Data for Karazhan not set properly. Encounter for Creature Entry %u may not work properly.", a->GetEntry());  #endif - diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp index bd79cbba628..e21a84d9499 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp @@ -189,20 +189,20 @@ public:              ScriptedAI::MoveInLineOfSight(who);          } -        void SetThreatList(Creature* SummonedUnit) +        void SetThreatList(Creature* summonedUnit)          { -            if (!SummonedUnit) +            if (!summonedUnit)                  return; -            std::list<HostileReference*>& m_threatlist = me->getThreatManager().getThreatList(); -            std::list<HostileReference*>::const_iterator i = m_threatlist.begin(); -            for (i = m_threatlist.begin(); i != m_threatlist.end(); ++i) +            ThreatContainer::StorageType const &threatlist = me->getThreatManager().getThreatList(); +            ThreatContainer::StorageType::const_iterator i = threatlist.begin(); +            for (i = threatlist.begin(); i != threatlist.end(); ++i)              {                  Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid());                  if (unit && unit->isAlive())                  {                      float threat = me->getThreatManager().getThreat(unit); -                    SummonedUnit->AddThreat(unit, threat); +                    summonedUnit->AddThreat(unit, threat);                  }              }          } @@ -212,9 +212,9 @@ public:              float x = KaelLocations[0][0];              float y = KaelLocations[0][1];              me->SetPosition(x, y, LOCATION_Z, 0.0f); -            //me->SendMonsterMove(x, y, LOCATION_Z, 0, 0, 0); // causes some issues... -            std::list<HostileReference*>::const_iterator i = me->getThreatManager().getThreatList().begin(); -            for (i = me->getThreatManager().getThreatList().begin(); i!= me->getThreatManager().getThreatList().end(); ++i) +            ThreatContainer::StorageType threatlist = me->getThreatManager().getThreatList(); +            ThreatContainer::StorageType::const_iterator i = threatlist.begin(); +            for (i = threatlist.begin(); i != threatlist.end(); ++i)              {                  Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid());                  if (unit && (unit->GetTypeId() == TYPEID_PLAYER)) @@ -225,8 +225,9 @@ public:          void CastGravityLapseKnockUp()          { -            std::list<HostileReference*>::const_iterator i = me->getThreatManager().getThreatList().begin(); -            for (i = me->getThreatManager().getThreatList().begin(); i!= me->getThreatManager().getThreatList().end(); ++i) +            ThreatContainer::StorageType threatlist = me->getThreatManager().getThreatList(); +            ThreatContainer::StorageType::const_iterator i = threatlist.begin(); +            for (i = threatlist.begin(); i != threatlist.end(); ++i)              {                  Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid());                  if (unit && (unit->GetTypeId() == TYPEID_PLAYER)) @@ -237,8 +238,9 @@ public:          void CastGravityLapseFly()                              // Use Fly Packet hack for now as players can't cast "fly" spells unless in map 530. Has to be done a while after they get knocked into the air...          { -            std::list<HostileReference*>::const_iterator i = me->getThreatManager().getThreatList().begin(); -            for (i = me->getThreatManager().getThreatList().begin(); i!= me->getThreatManager().getThreatList().end(); ++i) +            ThreatContainer::StorageType threatlist = me->getThreatManager().getThreatList(); +            ThreatContainer::StorageType::const_iterator i = threatlist.begin(); +            for (i = threatlist.begin(); i != threatlist.end(); ++i)              {                  Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid());                  if (unit && (unit->GetTypeId() == TYPEID_PLAYER)) @@ -257,8 +259,9 @@ public:          void RemoveGravityLapse()          { -            std::list<HostileReference*>::const_iterator i = me->getThreatManager().getThreatList().begin(); -            for (i = me->getThreatManager().getThreatList().begin(); i!= me->getThreatManager().getThreatList().end(); ++i) +            ThreatContainer::StorageType threatlist = me->getThreatManager().getThreatList(); +            ThreatContainer::StorageType::const_iterator i = threatlist.begin(); +            for (i = threatlist.begin(); i != threatlist.end(); ++i)              {                  Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid());                  if (unit && (unit->GetTypeId() == TYPEID_PLAYER)) @@ -306,7 +309,6 @@ public:                      if (PhoenixTimer <= diff)                      { -                          Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1);                          uint8 random = urand(1, 2); @@ -410,7 +412,6 @@ public:                                          Orb->AddThreat(target, 1000000.0f);                                          Orb->AI()->AttackStart(target);                                      } -                                  }                                  DoCast(me, SPELL_GRAVITY_LAPSE_CHANNEL); @@ -431,7 +432,6 @@ public:              }          }      }; -  };  class mob_felkael_flamestrike : public CreatureScript @@ -473,7 +473,6 @@ public:              } else FlameStrikeTimer -= diff;          }      }; -  };  class mob_felkael_phoenix : public CreatureScript @@ -522,7 +521,6 @@ public:              {                  damage = 0;                  return; -              }              //Don't really die in all phases of Kael'Thas              if (instance && instance->GetData(DATA_KAELTHAS_EVENT) == 0) @@ -544,9 +542,7 @@ public:                  me->GetMotionMaster()->Clear();                  me->GetMotionMaster()->MoveIdle();                  me->SetStandState(UNIT_STAND_STATE_DEAD); -             } -          }          void JustDied(Unit* /*killer*/) @@ -556,7 +552,6 @@ public:          void UpdateAI(const uint32 diff)          { -              //If we are fake death, we cast revbirth and after that we kill the phoenix to spawn the egg.              if (FakeDeath)              { @@ -568,7 +563,6 @@ public:                  if (Rebirth)                  { -                      if (Death_Timer <= diff)                      {                          me->SummonCreature(CREATURE_PHOENIX_EGG, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000); @@ -576,7 +570,6 @@ public:                          Rebirth = false;                      } else Death_Timer -= diff;                  } -              }              if (!UpdateVictim()) @@ -593,7 +586,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  class mob_felkael_phoenix_egg : public CreatureScript @@ -627,10 +619,8 @@ public:                  me->SummonCreature(CREATURE_PHOENIX, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);                  me->Kill(me);              } else HatchTimer -= diff; -          }      }; -  };  class mob_arcane_sphere : public CreatureScript @@ -687,7 +677,6 @@ public:              } else ChangeTargetTimer -= diff;          }      }; -  };  void AddSC_boss_felblood_kaelthas() diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp index 7ce9b08845f..2af417381a5 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp @@ -331,7 +331,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  enum eHealingPotion @@ -574,7 +573,6 @@ public:                  DoMeleeAttackIfReady();          }      }; -  };  enum eWarlockSpells @@ -671,7 +669,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  enum eKickDown @@ -728,7 +725,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  enum eMageSpells @@ -835,8 +831,8 @@ public:              if (Blink_Timer <= diff)              {                  bool InMeleeRange = false; -                std::list<HostileReference*>& t_list = me->getThreatManager().getThreatList(); -                for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) +                ThreatContainer::StorageType const &t_list = me->getThreatManager().getThreatList(); +                for (ThreatContainer::StorageType::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)                  {                      if (Unit* target = Unit::GetUnit(*me, (*itr)->getUnitGuid()))                      { @@ -859,7 +855,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  enum eWarriorSpells @@ -922,8 +917,8 @@ public:              if (Intercept_Stun_Timer <= diff)              {                  bool InMeleeRange = false; -                std::list<HostileReference*>& t_list = me->getThreatManager().getThreatList(); -                for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) +                ThreatContainer::StorageType const &t_list = me->getThreatManager().getThreatList(); +                for (ThreatContainer::StorageType::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)                  {                      if (Unit* target = Unit::GetUnit(*me, (*itr)->getUnitGuid()))                      { @@ -979,7 +974,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  enum eHunterSpells @@ -1103,7 +1097,6 @@ public:              }          }      }; -  };  enum Spells @@ -1203,7 +1196,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  enum eEngineerSpells @@ -1298,7 +1290,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  /* diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp index 82ad3ee2630..430bbb79bde 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp @@ -105,20 +105,20 @@ public:                  for (std::list<uint64>::const_iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr)                  {                      //Unit* unit = Unit::GetUnit(*me, FelCrystals[i]); -                    Unit* unit = Unit::GetUnit(*me, *itr); -                    if (unit) +                    if (Creature *creature = Unit::GetCreature(*me, *itr))                      { -                        if (!unit->isAlive()) -                            CAST_CRE(unit)->Respawn();      // Let the core handle setting death state, etc. +                        if (!creature->isAlive()) +                            creature->Respawn();      // Let the core handle setting death state, etc.                          // Only need to set unselectable flag. You can't attack unselectable units so non_attackable flag is not necessary here. -                        unit->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); +                        creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);                      }                  }                  instance->HandleGameObject(instance->GetData64(DATA_SELIN_ENCOUNTER_DOOR), true);                  // Open the big encounter door. Close it in Aggro and open it only in JustDied(and here) -                                                                // Small door opened after event are expected to be closed by default +                // Small door opened after event are expected to be closed by default +                  // Set Inst data for encounter                  instance->SetData(DATA_SELIN_EVENT, NOT_STARTED);              } else sLog->outError(LOG_FILTER_TSCR, ERROR_INST_DATA); @@ -291,7 +291,6 @@ public:                              DrainCrystalTimer = urand(20000, 25000);                      } else DrainCrystalTimer -= diff;                  } -              }else              {                  if (IsDraining) @@ -319,7 +318,6 @@ public:              DoMeleeAttackIfReady();                             // No need to check if we are draining crystal here, as the spell has a stun.          }      }; -  };  class mob_fel_crystal : public CreatureScript @@ -365,7 +363,6 @@ public:              } else sLog->outError(LOG_FILTER_TSCR, ERROR_INST_DATA);          }      }; -  };  void AddSC_boss_selin_fireheart() diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp index b5cf443c5a5..34682683ee3 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp @@ -192,7 +192,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  class mob_pure_energy : public CreatureScript @@ -224,7 +223,6 @@ public:          void MoveInLineOfSight(Unit* /*who*/) {}          void AttackStart(Unit* /*who*/) {}      }; -  };  void AddSC_boss_vexallus() diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp index cd2874f7253..da8b24c3985 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp @@ -262,7 +262,6 @@ public:              return 0;          }      }; -  };  void AddSC_instance_magisters_terrace() diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp index 69e0e5bff40..64b6c8d75b2 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp @@ -140,14 +140,14 @@ public:              if (lList.isEmpty())                  return; -            SpellInfo const* pSpell = sSpellMgr->GetSpellInfo(SPELL_ORB_KILL_CREDIT); +            SpellInfo const* spell = sSpellMgr->GetSpellInfo(SPELL_ORB_KILL_CREDIT);              for (Map::PlayerList::const_iterator i = lList.begin(); i != lList.end(); ++i)              {                  if (Player* player = i->getSource())                  { -                    if (pSpell && pSpell->Effects[0].MiscValue) -                        player->KilledMonsterCredit(pSpell->Effects[0].MiscValue, 0); +                    if (spell && spell->Effects[0].MiscValue) +                        player->KilledMonsterCredit(spell->Effects[0].MiscValue, 0);                  }              }          } @@ -170,7 +170,6 @@ public:              }          }      }; -  };  void AddSC_magisters_terrace() diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h index 78aa14b9102..660e58d325a 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h @@ -20,7 +20,6 @@  #define DEF_MAGISTERS_TERRACE_H  #define ERROR_INST_DATA      "TSCR Error: Instance Data not set properly for Magister's Terrace instance (map 585). Encounters will be buggy." -#endif  enum Data  { @@ -47,3 +46,5 @@ enum Data      DATA_ESCAPE_ORB             = 16  }; + +#endif diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp index ca91fb920b1..5e7fa111a7b 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -46,7 +46,7 @@ uint32 RandomLaugh[] = {11965, 11975, 11976};  enum Entry  {      HH_MOUNTED                  = 23682, -    HH_DISMOUNTED               = 23800,  // unhorsed?? wtf type of engrish was that? +    HH_DISMOUNTED               = 23800,      HEAD                        = 23775,      PULSING_PUMPKIN             = 23694,      PUMPKIN_FIEND               = 23545, @@ -127,7 +127,7 @@ static Locations Spawn[]=      {1765.28f, 1347.46f, 17.55f}     //spawn point for smoke  }; -static const char* Text[]= +static char const* Text[]=  {      "Horseman rise...",      "Your time is nigh...", @@ -592,8 +592,8 @@ public:                  caster->GetMotionMaster()->Clear(false);                  caster->GetMotionMaster()->MoveFollow(me, 6, float(urand(0, 5)));                  //DoResetThreat();//not sure if need -                std::list<HostileReference*>::const_iterator itr; -                for (itr = caster->getThreatManager().getThreatList().begin(); itr != caster->getThreatManager().getThreatList().end(); ++itr) +                ThreatContainer::StorageType threatlist = caster->getThreatManager().getThreatList(); +                for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)                  {                      Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid());                      if (unit && unit->isAlive() && unit != caster) diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp index 59244585ecf..dbbbb7fb0dd 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp @@ -153,12 +153,7 @@ public:          uint32 Start_Timer;          void Reset() {} - -        void WaypointReached(uint32 /*waypointId*/) -        { - -        } - +        void WaypointReached(uint32 /*waypointId*/) {}          void EnterCombat(Unit* /*who*/) {}          void UpdateAI(const uint32 diff) diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp index e40a48d0251..c763cb69dec 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp @@ -344,7 +344,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  void AddSC_boss_brutallus() diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp index e7b0e86285e..34548ec9116 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp @@ -121,13 +121,12 @@ public:              if (instance)              { -                Unit* Temp =  Unit::GetUnit(*me, instance->GetData64(DATA_ALYTHESS)); -                if (Temp) +                if (Creature *temp =  Unit::GetCreature(*me, instance->GetData64(DATA_ALYTHESS)))                  { -                    if (Temp->isDead()) -                        CAST_CRE(Temp)->Respawn(); -                    else if (Temp->getVictim()) -                        me->getThreatManager().addThreat(Temp->getVictim(), 0.0f); +                    if (temp->isDead()) +                        temp->Respawn(); +                    else if (temp->getVictim()) +                        me->getThreatManager().addThreat(temp->getVictim(), 0.0f);                  }              } @@ -153,9 +152,9 @@ public:              if (instance)              { -                Unit* Temp =  Unit::GetUnit(*me, instance->GetData64(DATA_ALYTHESS)); -                if (Temp && Temp->isAlive() && !(Temp->getVictim())) -                    CAST_CRE(Temp)->AI()->AttackStart(who); +                Creature *temp = Unit::GetCreature(*me, instance->GetData64(DATA_ALYTHESS)); +                if (temp && temp->isAlive() && !temp->getVictim()) +                    temp->AI()->AttackStart(who);              }              if (instance) @@ -341,7 +340,6 @@ public:              }          }      }; -  };  class boss_alythess : public CreatureScript @@ -383,13 +381,12 @@ public:              if (instance)              { -                Unit* Temp =  Unit::GetUnit(*me, instance->GetData64(DATA_SACROLASH)); -                if (Temp) +                if (Creature *temp = Unit::GetCreature((*me), instance->GetData64(DATA_SACROLASH)))                  { -                    if (Temp->isDead()) -                        CAST_CRE(Temp)->Respawn(); -                    else if (Temp->getVictim()) -                        me->getThreatManager().addThreat(Temp->getVictim(), 0.0f); +                    if (temp->isDead()) +                        temp->Respawn(); +                    else if (temp->getVictim()) +                        me->getThreatManager().addThreat(temp->getVictim(), 0.0f);                  }              } @@ -416,9 +413,9 @@ public:              if (instance)              { -                Unit* Temp =  Unit::GetUnit(*me, instance->GetData64(DATA_SACROLASH)); -                if (Temp && Temp->isAlive() && !(Temp->getVictim())) -                    CAST_CRE(Temp)->AI()->AttackStart(who); +                Creature *temp = Unit::GetCreature(*me, instance->GetData64(DATA_SACROLASH)); +                if (temp && temp->isAlive() && !temp->getVictim()) +                    temp->AI()->AttackStart(who);              }              if (instance) @@ -480,7 +477,6 @@ public:          {              switch (spell->Id)              { -              case SPELL_BLAZE:                  target->CastSpell(target, SPELL_BLAZE_SUMMON, true);              case SPELL_CONFLAGRATION: @@ -670,7 +666,6 @@ public:              } else EnrageTimer -= diff;          }      }; -  };  class mob_shadow_image : public CreatureScript @@ -705,7 +700,6 @@ public:          {              switch (spell->Id)              { -              case SPELL_SHADOW_FURY:              case SPELL_DARK_STRIKE:                  if (!target->HasAura(SPELL_DARK_FLAME)) @@ -752,7 +746,6 @@ public:              } else DarkstrikeTimer -= diff;          }      }; -  };  void AddSC_boss_eredar_twins() diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp index 7267c4e1bdb..bc841d76714 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp @@ -512,7 +512,6 @@ public:              }          }      }; -  };  class mob_felmyst_vapor : public CreatureScript @@ -545,7 +544,6 @@ public:                      AttackStart(target);          }      }; -  };  class mob_felmyst_trail : public CreatureScript @@ -573,7 +571,6 @@ public:          void MoveInLineOfSight(Unit* /*who*/) {}          void UpdateAI(const uint32 /*diff*/) {}      }; -  };  void AddSC_boss_felmyst() diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp index 57e69238816..3e503a547d8 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp @@ -304,11 +304,20 @@ public:                  if (SpectralBlastTimer <= diff)                  { -                    std::list<HostileReference*> &m_threatlist = me->getThreatManager().getThreatList(); +                    ThreatContainer::StorageType const& m_threatlist = me->getThreatManager().getThreatList();                      std::list<Unit*> targetList; -                    for (std::list<HostileReference*>::const_iterator itr = m_threatlist.begin(); itr!= m_threatlist.end(); ++itr) -                        if ((*itr)->getTarget() && (*itr)->getTarget()->GetTypeId() == TYPEID_PLAYER && (*itr)->getTarget()->GetGUID() != me->getVictim()->GetGUID() && !(*itr)->getTarget()->HasAura(AURA_SPECTRAL_EXHAUSTION) && (*itr)->getTarget()->GetPositionZ() > me->GetPositionZ()-5) -                            targetList.push_back((*itr)->getTarget()); +                    for (ThreatContainer::StorageType::const_iterator itr = m_threatlist.begin(); itr!= m_threatlist.end(); ++itr) +                    { +                        Unit* target = (*itr)->getTarget(); +                        if (target +                                && target->GetTypeId() == TYPEID_PLAYER +                                && target->GetGUID() != me->getVictim()->GetGUID() +                                && target->GetPositionZ() > me->GetPositionZ() - 5 +                                && !target->HasAura(AURA_SPECTRAL_EXHAUSTION)) +                        { +                            targetList.push_back(target); +                        } +                    }                      if (targetList.empty())                      {                          SpectralBlastTimer = 1000; @@ -431,7 +440,6 @@ public:              }          }      }; -  };  class boss_kalec : public CreatureScript @@ -533,7 +541,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  class kalecgos_teleporter : public GameObjectScript @@ -561,7 +568,6 @@ public:              player->CastSpell(player, SPELL_TELEPORT_SPECTRAL, true);          return true;      } -  };  class boss_sathrovarr : public CreatureScript @@ -761,15 +767,12 @@ public:              if (ResetThreat <= diff)              { -                for (std::list<HostileReference*>::const_iterator itr = me->getThreatManager().getThreatList().begin(); itr != me->getThreatManager().getThreatList().end(); ++itr) +                ThreatContainer::StorageType threatlist = me->getThreatManager().getThreatList(); +                for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)                  {                      if (Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid())) -                    { -                        if (unit->GetPositionZ() > me->GetPositionZ()+5) -                        { +                        if (unit->GetPositionZ() > me->GetPositionZ() + 5)                              me->getThreatManager().modifyThreatPercent(unit, -100); -                        } -                    }                  }                  ResetThreat = 1000;              } else ResetThreat -= diff; @@ -799,7 +802,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  void AddSC_boss_kalecgos() diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp index e368124abaf..096f6daaec2 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp @@ -367,7 +367,6 @@ public:              }          }      }; -  };  class go_orb_of_the_blue_flight : public GameObjectScript @@ -391,7 +390,6 @@ public:          }          return true;      } -  };  //AI for Kil'jaeden Event Controller @@ -492,7 +490,6 @@ public:              }          }      }; -  };  //AI for Kil'jaeden @@ -900,7 +897,6 @@ public:              }          }      }; -  };  //AI for Hand of the Deceiver @@ -987,8 +983,8 @@ public:              {                  if (Creature* pPortal = DoSpawnCreature(CREATURE_FELFIRE_PORTAL, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 20000))                  { -                    std::list<HostileReference*>::iterator itr; -                    for (itr = me->getThreatManager().getThreatList().begin(); itr != me->getThreatManager().getThreatList().end(); ++itr) +                    ThreatContainer::StorageType const &threatlist = me->getThreatManager().getThreatList(); +                    for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)                      {                          Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid());                          if (unit) @@ -1001,7 +997,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  //AI for Felfire Portal @@ -1046,7 +1041,6 @@ public:              } else uiSpawnFiendTimer -= diff;          }      }; -  };  //AI for Felfire Fiend @@ -1104,7 +1098,6 @@ public:              }          }      }; -  };  //AI for Armageddon target @@ -1159,7 +1152,6 @@ public:              } else uiTimer -=diff;          }      }; -  };  //AI for Shield Orbs @@ -1247,7 +1239,6 @@ public:              bPointReached = true;          }      }; -  };  //AI for Sinister Reflection @@ -1310,7 +1301,8 @@ public:                  }              } -            switch (victimClass) { +            switch (victimClass) +            {                  case CLASS_DRUID:                      if (uiTimer[1] <= diff)                      { @@ -1411,13 +1403,12 @@ public:                      }                      DoMeleeAttackIfReady();                      break; -                } -                sLog->outDebug(LOG_FILTER_TSCR, "Sinister-Timer"); -                for (uint8 i = 0; i < 3; ++i) -                    uiTimer[i] -= diff;              } +            sLog->outDebug(LOG_FILTER_TSCR, "Sinister-Timer"); +            for (uint8 i = 0; i < 3; ++i) +                uiTimer[i] -= diff; +        }      }; -  };  void AddSC_boss_kiljaeden() diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp index c00ab84b567..9fd0a5eb5d8 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp @@ -199,7 +199,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  class boss_muru : public CreatureScript @@ -364,7 +363,6 @@ public:              }          }      }; -  };  class npc_muru_portal : public CreatureScript @@ -448,7 +446,6 @@ public:              } else SummonTimer -= diff;          }      }; -  };  class npc_dark_fiend : public CreatureScript @@ -500,7 +497,6 @@ public:                  }                  else                  { -                      if (me->IsWithinDist(me->getVictim(), 5))                      {                          DoCastAOE(SPELL_DARKFIEND_AOE, false); @@ -511,7 +507,6 @@ public:              } else WaitTimer -= diff;          }      }; -  };  class npc_void_sentinel : public CreatureScript @@ -567,7 +562,6 @@ public:              DoMeleeAttackIfReady();          }      }; -  };  class npc_blackhole : public CreatureScript @@ -646,7 +640,6 @@ public:              else DespawnTimer -= diff;          }      }; -  };  void AddSC_boss_muru() diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp index 6324c5adf16..bea73837304 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp @@ -134,8 +134,9 @@ public:                              return player;                  }              } +            else +                sLog->outDebug(LOG_FILTER_TSCR, "Instance Sunwell Plateau: GetPlayerInMap, but PlayerList is empty!"); -            sLog->outDebug(LOG_FILTER_TSCR, "Instance Sunwell Plateau: GetPlayerInMap, but PlayerList is empty!");              return NULL;          } @@ -281,7 +282,7 @@ public:              return stream.str();          } -        void Load(const char* in) +        void Load(char const* in)          {              if (!in)              { @@ -299,7 +300,6 @@ public:              OUT_LOAD_INST_DATA_COMPLETE;          }      }; -  };  void AddSC_instance_sunwell_plateau()  | 
