Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())
{
Expand All @@ -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
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Creature*> 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);
Expand Down
24 changes: 14 additions & 10 deletions scripts/eastern_kingdoms/naxxramas/boss_kelthuzad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions scripts/maelstrom/kezan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down