diff --git a/scripts/eastern_kingdoms/blackrock_mountain/blackrock_depths/boss_emperor_dagran_thaurissan.cpp b/scripts/eastern_kingdoms/blackrock_mountain/blackrock_depths/boss_emperor_dagran_thaurissan.cpp index a0c26ad0..e944326e 100644 --- a/scripts/eastern_kingdoms/blackrock_mountain/blackrock_depths/boss_emperor_dagran_thaurissan.cpp +++ b/scripts/eastern_kingdoms/blackrock_mountain/blackrock_depths/boss_emperor_dagran_thaurissan.cpp @@ -75,12 +75,12 @@ struct boss_emperor_dagran_thaurissan : public CreatureScript void Aggro(Unit* /*pWho*/) override { - uint32 uiTextId; + int32 uiTextId; switch (urand(0, 2)) { case 0: uiTextId = YELL_AGGRO_1; break; case 1: uiTextId = YELL_AGGRO_2; break; - case 2: uiTextId = YELL_AGGRO_3; break; + default: uiTextId = YELL_AGGRO_3; break; } DoScriptText(uiTextId, m_creature); m_creature->CallForHelp(VISIBLE_RANGE); diff --git a/scripts/eastern_kingdoms/blackrock_mountain/blackrock_depths/instance_blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_mountain/blackrock_depths/instance_blackrock_depths.cpp index 1b9e1d24..9a8e5fa8 100644 --- a/scripts/eastern_kingdoms/blackrock_mountain/blackrock_depths/instance_blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_mountain/blackrock_depths/instance_blackrock_depths.cpp @@ -230,7 +230,7 @@ void instance_blackrock_depths::OnCreatureDeath(Creature* pCreature) // of Shadowforge Senators in the Throne Room if (Creature* pDagran = GetSingleCreatureFromStorage(NPC_EMPEROR)) { - uint32 uiTextId; + int32 uiTextId; if (!pDagran->IsAlive()) { @@ -247,7 +247,7 @@ void instance_blackrock_depths::OnCreatureDeath(Creature* pCreature) case 0: uiTextId = YELL_SENATOR_1; break; case 1: uiTextId = YELL_SENATOR_2; break; case 2: uiTextId = YELL_SENATOR_3; break; - case 3: uiTextId = YELL_SENATOR_4; break; + default: uiTextId = YELL_SENATOR_4; break; } DoScriptText(uiTextId, pDagran); m_uiDagranTimer = 30000; // set a timer of 30 sec to avoid Emperor Thaurissan to spam yells in case many senators are killed in a short amount of time @@ -681,7 +681,7 @@ void instance_blackrock_depths::HandleBarPatrons(uint8 uiEventType) { if (pPatron->GetPositionZ() > pGo->GetPositionZ() - 1 && pPatron->IsWithinDist2d(pGo->GetPositionX(), pGo->GetPositionY(), 18.0f)) { - uint32 uiTextId = 0; + int32 uiTextId = 0; switch (urand(0, 4)) { case 0: uiTextId = SAY_PISSED_PATRON_3; break; diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index 8e22d480..14c6bc23 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -788,15 +788,15 @@ struct is_karazhan : public InstanceScript } else { - searcher->getFaction() == FACTION_ID_CHESS_ALLIANCE ? FACTION_ID_CHESS_HORDE : FACTION_ID_CHESS_ALLIANCE; + uiTeam = searcher->getFaction() == FACTION_ID_CHESS_ALLIANCE ? FACTION_ID_CHESS_HORDE : FACTION_ID_CHESS_ALLIANCE; } // Get the list of enemies GuidList lTempList; std::vector vTargets; - vTargets.reserve(lTempList.size()); lTempList = uiTeam == FACTION_ID_CHESS_ALLIANCE ? m_lChessPiecesAlliance : m_lChessPiecesHorde; + vTargets.reserve(lTempList.size()); for (GuidList::const_iterator itr = lTempList.begin(); itr != lTempList.end(); ++itr) { Creature* pTemp = searcher->GetMap()->GetCreature(*itr); diff --git a/scripts/eastern_kingdoms/naxxramas/boss_kelthuzad.cpp b/scripts/eastern_kingdoms/naxxramas/boss_kelthuzad.cpp index 9d9df0aa..8f0b3f44 100644 --- a/scripts/eastern_kingdoms/naxxramas/boss_kelthuzad.cpp +++ b/scripts/eastern_kingdoms/naxxramas/boss_kelthuzad.cpp @@ -280,14 +280,16 @@ struct boss_kelthuzad : public CreatureScript float fAngle = GetLocationAngle(packId + 1); - float fX, fY, fZ; - if (AreaTriggerEntry const *at = sAreaTriggerStore.LookupEntry(m_pInstance->GetData(TYPE_SIGNAL_1))) + AreaTriggerEntry const *at = sAreaTriggerStore.LookupEntry(m_pInstance->GetData(TYPE_SIGNAL_1)); + if (!at) { - fX = at->x; - fY = at->y; - fZ = at->z; + return; } + float fX = at->x; + float fY = at->y; + float fZ = at->z; + fX += M_F_RANGE * cos(fAngle); fY += M_F_RANGE * sin(fAngle); fZ += M_F_HEIGHT; @@ -327,14 +329,16 @@ struct boss_kelthuzad : public CreatureScript float fAngle = GetLocationAngle(urand(1, 7)); - float fX, fY, fZ; - if (AreaTriggerEntry const *at = sAreaTriggerStore.LookupEntry(m_pInstance->GetData(TYPE_SIGNAL_1))) + AreaTriggerEntry const *at = sAreaTriggerStore.LookupEntry(m_pInstance->GetData(TYPE_SIGNAL_1)); + if (!at) { - fX = at->x; - fY = at->y; - fZ = at->z; + return; } + float fX = at->x; + float fY = at->y; + float fZ = at->z; + fX += M_F_RANGE * cos(fAngle); fY += M_F_RANGE * sin(fAngle); fZ += M_F_HEIGHT; diff --git a/scripts/maelstrom/kezan.cpp b/scripts/maelstrom/kezan.cpp index be960817..857e94bc 100644 --- a/scripts/maelstrom/kezan.cpp +++ b/scripts/maelstrom/kezan.cpp @@ -58,6 +58,7 @@ struct npc_sassy_hardwrench_kezan : public CreatureScript } DoScriptText(pPlayer->getGender() == GENDER_FEMALE ? SAY_SASSY_PROMOTION_FEMALE : SAY_SASSY_PROMOTION_MALE, pCreature, pPlayer); + return true; } }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index a131ae99..0e840041 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -319,7 +319,7 @@ struct is_trial_of_the_crusader : public InstanceScript case TYPE_FACTION_CHAMPIONS: if (uiData == SPECIAL) { - StartNextDialogueText(m_auiEncounter[uiType] != FAIL ? uint8(SAY_TIRION_PVP_INTRO_1) : uint8(TYPE_FACTION_CHAMPIONS)); + StartNextDialogueText(m_auiEncounter[uiType] != FAIL ? int32(SAY_TIRION_PVP_INTRO_1) : int32(TYPE_FACTION_CHAMPIONS)); } else if (uiData == FAIL) {