Code Style (game + scripts only):
"==" --> " == " (when needed) --HG-- branch : trunk
This commit is contained in:
@@ -938,7 +938,7 @@ struct npc_marshal_reginald_windsorAI : public npc_escortAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) return;
|
||||
if (wp==7)
|
||||
if (wp == 7)
|
||||
{
|
||||
if (!pInstance->GetData(DATA_GATE_J) && pInstance->GetData(DATA_JAZ) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
{
|
||||
@@ -951,7 +951,7 @@ struct npc_marshal_reginald_windsorAI : public npc_escortAI
|
||||
pInstance->SetData(DATA_JAZ,ENCOUNTER_STATE_ENDED);
|
||||
}
|
||||
}
|
||||
else if (wp==11)
|
||||
else if (wp == 11)
|
||||
{
|
||||
if (!pInstance->GetData(DATA_GATE_S) && pInstance->GetData(DATA_SHILL) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
{
|
||||
@@ -964,7 +964,7 @@ struct npc_marshal_reginald_windsorAI : public npc_escortAI
|
||||
SetEscortPaused(false);
|
||||
}
|
||||
}
|
||||
else if (wp==20)
|
||||
else if (wp == 20)
|
||||
{
|
||||
if (!pInstance->GetData(DATA_GATE_C) && pInstance->GetData(DATA_CREST) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
{
|
||||
@@ -978,7 +978,7 @@ struct npc_marshal_reginald_windsorAI : public npc_escortAI
|
||||
pInstance->SetData(DATA_CREST,ENCOUNTER_STATE_ENDED);
|
||||
}
|
||||
}
|
||||
if (pInstance->GetData(DATA_TOBIAS)==ENCOUNTER_STATE_OBJECTIVE_COMPLETED) SetEscortPaused(false);
|
||||
if (pInstance->GetData(DATA_TOBIAS) == ENCOUNTER_STATE_OBJECTIVE_COMPLETED) SetEscortPaused(false);
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -62,7 +62,7 @@ struct npc_converted_sentryAI : public ScriptedAI
|
||||
if (Timer <= diff)
|
||||
{
|
||||
uint32 i = urand(1,2);
|
||||
if (i==1)
|
||||
if (i == 1)
|
||||
DoScriptText(SAY_CONVERTED_1, m_creature);
|
||||
else
|
||||
DoScriptText(SAY_CONVERTED_2, m_creature);
|
||||
|
||||
@@ -94,7 +94,7 @@ struct boss_midnightAI : public ScriptedAI
|
||||
if (Unit *pAttumen = Unit::GetUnit(*m_creature, Attumen))
|
||||
Mount(pAttumen);
|
||||
}
|
||||
else if (Phase ==3)
|
||||
else if (Phase == 3)
|
||||
{
|
||||
if (Mount_Timer)
|
||||
{
|
||||
|
||||
@@ -207,7 +207,7 @@ struct boss_netherspiteAI : public ScriptedAI
|
||||
}
|
||||
}
|
||||
// aggro target if Red Beam
|
||||
if (j==RED_PORTAL && m_creature->getVictim() != pTarget && pTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
if (j == RED_PORTAL && m_creature->getVictim() != pTarget && pTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
m_creature->getThreatManager().addThreat(pTarget, 100000.0f+DoGetThreat(m_creature->getVictim()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ struct instance_uldaman : public ScriptedInstance
|
||||
for (std::vector<uint64>::const_iterator i = stoneKeeper.begin(); i != stoneKeeper.end(); ++i)
|
||||
{
|
||||
Creature *pTarget = instance->GetCreature(*i);
|
||||
if (!pTarget || !pTarget->isAlive() || pTarget->getFaction()==14)
|
||||
if (!pTarget || !pTarget->isAlive() || pTarget->getFaction() == 14)
|
||||
continue;
|
||||
pTarget->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE);
|
||||
pTarget->setFaction(14);
|
||||
@@ -119,7 +119,7 @@ struct instance_uldaman : public ScriptedInstance
|
||||
for (std::vector<uint64>::const_iterator i = archaedasWallMinions.begin(); i != archaedasWallMinions.end(); ++i)
|
||||
{
|
||||
Creature *pTarget = instance->GetCreature(*i);
|
||||
if (!pTarget || !pTarget->isAlive() || pTarget->getFaction()==14)
|
||||
if (!pTarget || !pTarget->isAlive() || pTarget->getFaction() == 14)
|
||||
continue;
|
||||
archaedas->CastSpell(pTarget, SPELL_AWAKEN_VAULT_WALKER, true);
|
||||
pTarget->CastSpell(pTarget, SPELL_ARCHAEDAS_AWAKEN,true);
|
||||
@@ -216,19 +216,19 @@ struct instance_uldaman : public ScriptedInstance
|
||||
void SetData (uint32 type, uint32 data)
|
||||
{
|
||||
//error_log ("SetData: data = %d", data);
|
||||
if (data==0) OpenDoor (altarOfTheKeeperTempleDoor);
|
||||
if (data==0) OpenDoor (archaedasTempleDoor);
|
||||
if (data==3) OpenDoor (ancientVaultDoor);
|
||||
if (data==1) ActivateStoneKeepers();
|
||||
if (data==2) ActivateWallMinions();
|
||||
if (data==4) DeActivateMinions();
|
||||
if (data==5) RespawnMinions();
|
||||
if (data == 0) OpenDoor (altarOfTheKeeperTempleDoor);
|
||||
if (data == 0) OpenDoor (archaedasTempleDoor);
|
||||
if (data == 3) OpenDoor (ancientVaultDoor);
|
||||
if (data == 1) ActivateStoneKeepers();
|
||||
if (data == 2) ActivateWallMinions();
|
||||
if (data == 4) DeActivateMinions();
|
||||
if (data == 5) RespawnMinions();
|
||||
}
|
||||
|
||||
void SetData64 (uint32 type, uint64 data)
|
||||
{
|
||||
// Archaedas
|
||||
if (type==0)
|
||||
if (type == 0)
|
||||
{
|
||||
ActivateArchaedas (data);
|
||||
}
|
||||
|
||||
@@ -59,13 +59,13 @@ EndScriptData */
|
||||
#define SOUND_INTRO 12090
|
||||
|
||||
//Spells:
|
||||
// ====== Troll Form
|
||||
//====== Troll Form
|
||||
#define SPELL_WHIRLWIND 17207
|
||||
#define SPELL_GRIEVOUS_THROW 43093 // remove debuff after full healed
|
||||
// ====== Bear Form
|
||||
//====== Bear Form
|
||||
#define SPELL_CREEPING_PARALYSIS 43095 // should cast on the whole raid
|
||||
#define SPELL_OVERPOWER 43456 // use after melee attack dodged
|
||||
// ====== Eagle Form
|
||||
//====== Eagle Form
|
||||
#define SPELL_ENERGY_STORM 43983 // enemy area aura, trigger 42577
|
||||
#define SPELL_ZAP_INFORM 42577
|
||||
#define SPELL_ZAP_DAMAGE 43137 // 1250 damage
|
||||
|
||||
@@ -56,7 +56,7 @@ struct mobs_spitelashesAI : public ScriptedAI
|
||||
if (!spellhit &&
|
||||
Hitter->GetTypeId() == TYPEID_PLAYER &&
|
||||
CAST_PLR(Hitter)->GetQuestStatus(9364) == QUEST_STATUS_INCOMPLETE &&
|
||||
(Spellkind->Id==118 || Spellkind->Id== 12824 || Spellkind->Id== 12825 || Spellkind->Id== 12826))
|
||||
(Spellkind->Id == 118 || Spellkind->Id == 12824 || Spellkind->Id == 12825 || Spellkind->Id == 12826))
|
||||
{
|
||||
spellhit=true;
|
||||
DoCast(m_creature, 29124); //become a sheep
|
||||
|
||||
@@ -490,7 +490,7 @@ struct npc_geezleAI : public ScriptedAI
|
||||
|
||||
for (std::list<Player*>::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->GetQuestStatus(QUEST_TREES_COMPANY)==QUEST_STATUS_INCOMPLETE
|
||||
if ((*itr)->GetQuestStatus(QUEST_TREES_COMPANY) == QUEST_STATUS_INCOMPLETE
|
||||
&&(*itr)->HasAura(SPELL_TREE_DISGUISE))
|
||||
{
|
||||
(*itr)->KilledMonsterCredit(MOB_SPARK,0);
|
||||
|
||||
@@ -171,7 +171,7 @@ struct instance_mount_hyjal : public ScriptedInstance
|
||||
case DATA_AZGALOREVENT:
|
||||
{
|
||||
m_auiEncounter[3] = data;
|
||||
if (data==DONE)
|
||||
if (data == DONE)
|
||||
{
|
||||
if (ArchiYell)break;
|
||||
ArchiYell = true;
|
||||
|
||||
@@ -40,19 +40,19 @@ bool GossipHello_npcs_riverbreeze_and_silversky(Player* pPlayer, Creature* pCrea
|
||||
if (pCreature->isQuestGiver())
|
||||
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
|
||||
|
||||
if (eCreature==9528)
|
||||
if (eCreature == 9528)
|
||||
{
|
||||
if (pPlayer->GetQuestRewardStatus(4101))
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BEACON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
pPlayer->SEND_GOSSIP_MENU(2848, pCreature->GetGUID());
|
||||
} else if (pPlayer->GetTeam()==HORDE)
|
||||
} else if (pPlayer->GetTeam() == HORDE)
|
||||
pPlayer->SEND_GOSSIP_MENU(2845, pCreature->GetGUID());
|
||||
else
|
||||
pPlayer->SEND_GOSSIP_MENU(2844, pCreature->GetGUID());
|
||||
}
|
||||
|
||||
if (eCreature==9529)
|
||||
if (eCreature == 9529)
|
||||
{
|
||||
if (pPlayer->GetQuestRewardStatus(4102))
|
||||
{
|
||||
@@ -69,7 +69,7 @@ bool GossipHello_npcs_riverbreeze_and_silversky(Player* pPlayer, Creature* pCrea
|
||||
|
||||
bool GossipSelect_npcs_riverbreeze_and_silversky(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
|
||||
{
|
||||
if (uiAction ==GOSSIP_ACTION_INFO_DEF+1)
|
||||
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
|
||||
{
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pCreature->CastSpell(pPlayer, 15120, false);
|
||||
|
||||
@@ -130,9 +130,9 @@ bool GossipSelect_npc_great_bear_spirit(Player* pPlayer, Creature* pCreature, ui
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
pPlayer->SEND_GOSSIP_MENU(4735, pCreature->GetGUID());
|
||||
if (pPlayer->GetQuestStatus(5929)==QUEST_STATUS_INCOMPLETE)
|
||||
if (pPlayer->GetQuestStatus(5929) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->AreaExploredOrEventHappens(5929);
|
||||
if (pPlayer->GetQuestStatus(5930)==QUEST_STATUS_INCOMPLETE)
|
||||
if (pPlayer->GetQuestStatus(5930) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->AreaExploredOrEventHappens(5930);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -80,20 +80,20 @@ struct boss_ayamissAI : public ScriptedAI
|
||||
return;
|
||||
|
||||
//If he is 70% start phase 2
|
||||
if (phase==1 && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 70 && !m_creature->IsNonMeleeSpellCasted(false))
|
||||
if (phase == 1 && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 70 && !m_creature->IsNonMeleeSpellCasted(false))
|
||||
{
|
||||
phase=2;
|
||||
}
|
||||
|
||||
//STINGERSPRAY_Timer (only in phase2)
|
||||
if (phase==2 && STINGERSPRAY_Timer <= diff)
|
||||
if (phase == 2 && STINGERSPRAY_Timer <= diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_STINGERSPRAY);
|
||||
STINGERSPRAY_Timer = 30000;
|
||||
} else STINGERSPRAY_Timer -= diff;
|
||||
|
||||
//POISONSTINGER_Timer (only in phase1)
|
||||
if (phase==1 && POISONSTINGER_Timer <= diff)
|
||||
if (phase == 1 && POISONSTINGER_Timer <= diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_POISONSTINGER);
|
||||
POISONSTINGER_Timer = 30000;
|
||||
|
||||
@@ -931,7 +931,7 @@ struct npc_anachronos_quest_triggerAI : public ScriptedAI
|
||||
if (Spawn)
|
||||
{
|
||||
Spawn->LoadCreaturesAddon();
|
||||
if (Spawn->GetGUID()== 15423)
|
||||
if (Spawn->GetGUID() == 15423)
|
||||
Spawn->SetUInt32Value(UNIT_FIELD_DISPLAYID,15427+rand()%4);
|
||||
if (i >= 30) WaveCount = 1;
|
||||
if (i >= 33) WaveCount = 2;
|
||||
|
||||
@@ -253,7 +253,7 @@ struct aqsentinelAI : public ScriptedAI
|
||||
for (i = m_creature->getThreatManager().getThreatList().begin(); i != m_creature->getThreatManager().getThreatList().end(); ++i)
|
||||
{
|
||||
Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid());
|
||||
if (pUnit->getPowerType()==POWER_MANA)
|
||||
if (pUnit->getPowerType() == POWER_MANA)
|
||||
return pUnit;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
@@ -134,7 +134,7 @@ bool GossipHello_npc_witch_doctor_mauari(Player* pPlayer, Creature* pCreature)
|
||||
|
||||
bool GossipSelect_npc_witch_doctor_mauari(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
|
||||
{
|
||||
if (uiAction ==GOSSIP_ACTION_INFO_DEF+1)
|
||||
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
|
||||
{
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pCreature->CastSpell(pPlayer, 16351, false);
|
||||
|
||||
@@ -1845,7 +1845,7 @@ enum Mootoo_the_Younger_Entries
|
||||
};
|
||||
bool QuestAccept_npc_mootoo_the_younger(Player* pPlayer, Creature* pCreature, Quest const* quest)
|
||||
{
|
||||
if (quest->GetQuestId()==QUEST_ESCAPING_THE_MIST)
|
||||
if (quest->GetQuestId() == QUEST_ESCAPING_THE_MIST)
|
||||
{
|
||||
switch (pPlayer->GetTeam())
|
||||
{
|
||||
@@ -1930,7 +1930,7 @@ enum Script_Texts_Bonker_Togglevolt
|
||||
|
||||
bool QuestAccept_npc_bonker_togglevolt(Player* pPlayer, Creature* pCreature, Quest const* quest)
|
||||
{
|
||||
if (quest->GetQuestId()==QUEST_GET_ME_OUTA_HERE)
|
||||
if (quest->GetQuestId() == QUEST_GET_ME_OUTA_HERE)
|
||||
{
|
||||
switch (pPlayer->GetTeam())
|
||||
{
|
||||
@@ -1967,7 +1967,7 @@ struct npc_bonker_togglevoltAI : public npc_escortAI
|
||||
{
|
||||
if (GetAttack() && UpdateVictim())
|
||||
{
|
||||
if (Bonker_agro==0)
|
||||
if (Bonker_agro == 0)
|
||||
{
|
||||
DoScriptText(SAY_bonker_1,m_creature);
|
||||
Bonker_agro++;
|
||||
|
||||
@@ -131,11 +131,11 @@ struct boss_malygosAI : public ScriptedAI
|
||||
if (victim == m_creature)
|
||||
return;
|
||||
|
||||
if (phase ==1)
|
||||
if (phase == 1)
|
||||
DoScriptText(RAND(SAY_PHASE1_SLAY_1,SAY_PHASE1_SLAY_2,SAY_PHASE1_SLAY_3), m_creature);
|
||||
if (phase ==2)
|
||||
if (phase == 2)
|
||||
DoScriptText(RAND(SAY_PHASE2_SLAY_1,SAY_PHASE2_SLAY_2,SAY_PHASE2_SLAY_3), m_creature);
|
||||
if (phase ==3)
|
||||
if (phase == 3)
|
||||
DoScriptText(RAND(SAY_PHASE3_SLAY_1,SAY_PHASE3_SLAY_2,SAY_PHASE3_SLAY_3), m_creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -274,7 +274,7 @@ struct mob_ravenous_furbolgAI : public ScriptedAI
|
||||
m_creature->GetMotionMaster()->MoveTargetedHome();
|
||||
|
||||
if (pInstance)
|
||||
if (pInstance->GetData(DATA_GORTOK_PALEHOOF_EVENT)==IN_PROGRESS)
|
||||
if (pInstance->GetData(DATA_GORTOK_PALEHOOF_EVENT) == IN_PROGRESS)
|
||||
{
|
||||
Creature *pPalehoof = Unit::GetCreature((*m_creature), pInstance ? pInstance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
|
||||
if (pPalehoof && pPalehoof->isAlive())
|
||||
@@ -380,7 +380,7 @@ struct mob_frenzied_worgenAI : public ScriptedAI
|
||||
m_creature->GetMotionMaster()->MoveTargetedHome();
|
||||
|
||||
if (pInstance)
|
||||
if (pInstance->GetData(DATA_GORTOK_PALEHOOF_EVENT)==IN_PROGRESS)
|
||||
if (pInstance->GetData(DATA_GORTOK_PALEHOOF_EVENT) == IN_PROGRESS)
|
||||
{
|
||||
Creature *pPalehoof = Unit::GetCreature((*m_creature), pInstance ? pInstance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
|
||||
if (pPalehoof && pPalehoof->isAlive())
|
||||
@@ -489,7 +489,7 @@ struct mob_ferocious_rhinoAI : public ScriptedAI
|
||||
m_creature->GetMotionMaster()->MoveTargetedHome();
|
||||
|
||||
if (pInstance)
|
||||
if (pInstance->GetData(DATA_GORTOK_PALEHOOF_EVENT)==IN_PROGRESS)
|
||||
if (pInstance->GetData(DATA_GORTOK_PALEHOOF_EVENT) == IN_PROGRESS)
|
||||
{
|
||||
Creature *pPalehoof = Unit::GetCreature((*m_creature), pInstance ? pInstance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
|
||||
if (pPalehoof && pPalehoof->isAlive())
|
||||
@@ -702,7 +702,7 @@ struct mob_palehoof_orbAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (currentPhase==PHASE_NONE)
|
||||
if (currentPhase == PHASE_NONE)
|
||||
return;
|
||||
|
||||
if (SummonTimer<=diff)
|
||||
|
||||
@@ -909,7 +909,7 @@ bool ItemUse_item_tainted_core(Player* pPlayer, Item* _Item, SpellCastTargets co
|
||||
Vashj = (Unit::GetCreature((*pPlayer), pInstance->GetData64(DATA_LADYVASHJ)));
|
||||
if (Vashj && CAST_AI(boss_lady_vashjAI, Vashj->AI())->Phase == 2)
|
||||
{
|
||||
if (targets.getGOTarget() && targets.getGOTarget()->GetTypeId()==TYPEID_GAMEOBJECT)
|
||||
if (targets.getGOTarget() && targets.getGOTarget()->GetTypeId() == TYPEID_GAMEOBJECT)
|
||||
{
|
||||
uint32 identifier;
|
||||
uint8 channel_identifier;
|
||||
|
||||
@@ -293,7 +293,7 @@ struct boss_vazruden_the_heraldAI : public ScriptedAI
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
if (phase==0)
|
||||
if (phase == 0)
|
||||
{
|
||||
phase = 1;
|
||||
check = 0;
|
||||
|
||||
Reference in New Issue
Block a user