Code style (game + scripts only):
"if(" --> "if ("
--HG--
branch : trunk
This commit is contained in:
@@ -100,7 +100,7 @@ struct boss_maiden_of_griefAI : public ScriptedAI
|
||||
{
|
||||
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
if(pTarget)
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_PARTING_SORROW);
|
||||
|
||||
PartingSorrowTimer = 30000 + rand()%10000;
|
||||
|
||||
@@ -269,7 +269,7 @@ struct mob_iron_sludgeAI : public ScriptedAI
|
||||
void JustDied(Unit* pKiller)
|
||||
{
|
||||
if (pInstance)
|
||||
if(Creature* pSjonnir = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_SJONNIR)))
|
||||
if (Creature* pSjonnir = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_SJONNIR)))
|
||||
CAST_AI(boss_sjonnirAI, pSjonnir->AI())->KilledIronSludge();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -184,7 +184,7 @@ struct mob_tribuna_controllerAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(bKaddrakActivated)
|
||||
if (bKaddrakActivated)
|
||||
{
|
||||
if (uiKaddrakEncounterTimer <= diff)
|
||||
{
|
||||
|
||||
@@ -133,9 +133,9 @@ struct boss_flame_leviathanAI : public BossAI
|
||||
|
||||
void SpellHit(Unit *caster, const SpellEntry *spell)
|
||||
{
|
||||
if(spell->Id == 62472)
|
||||
if (spell->Id == 62472)
|
||||
vehicle->InstallAllAccessories();
|
||||
else if(spell->Id == SPELL_ELECTROSHOCK)
|
||||
else if (spell->Id == SPELL_ELECTROSHOCK)
|
||||
m_creature->InterruptSpell(CURRENT_CHANNELED_SPELL);
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ struct boss_flame_leviathanAI : public BossAI
|
||||
DoCastAOE(SPELL_PURSUED, true);
|
||||
//events.RepeatEvent(35000); // this should not be used because eventId may be overriden
|
||||
events.RescheduleEvent(EVENT_PURSUE, 35000);
|
||||
if(!m_creature->getVictim()) // all siege engines and demolishers are dead
|
||||
if (!m_creature->getVictim()) // all siege engines and demolishers are dead
|
||||
UpdateVictim(); // begin to kill other things
|
||||
return;
|
||||
case EVENT_MISSILE:
|
||||
@@ -183,8 +183,8 @@ struct boss_flame_leviathanAI : public BossAI
|
||||
events.RepeatEvent(15000);
|
||||
return;
|
||||
case EVENT_SUMMON:
|
||||
if(summons.size() < 15) // 4seat+1turret+10lift
|
||||
if(Creature *lift = DoSummonFlyer(MOB_MECHANOLIFT, me, urand(20,40), 50, 0))
|
||||
if (summons.size() < 15) // 4seat+1turret+10lift
|
||||
if (Creature *lift = DoSummonFlyer(MOB_MECHANOLIFT, me, urand(20,40), 50, 0))
|
||||
lift->GetMotionMaster()->MoveRandom(100);
|
||||
events.RepeatEvent(2000);
|
||||
return;
|
||||
@@ -222,7 +222,7 @@ struct boss_flame_leviathan_seatAI : public PassiveAI
|
||||
#ifdef BOSS_DEBUG
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if(who->GetTypeId() == TYPEID_PLAYER && CAST_PLR(who)->isGameMaster()
|
||||
if (who->GetTypeId() == TYPEID_PLAYER && CAST_PLR(who)->isGameMaster()
|
||||
&& !who->GetVehicle() && vehicle->GetPassenger(SEAT_TURRET))
|
||||
who->EnterVehicle(vehicle, SEAT_PLAYER);
|
||||
}
|
||||
@@ -235,16 +235,16 @@ struct boss_flame_leviathan_seatAI : public PassiveAI
|
||||
|
||||
if (seatId == SEAT_PLAYER)
|
||||
{
|
||||
if(!apply)
|
||||
if (!apply)
|
||||
return;
|
||||
|
||||
if(Creature *turret = CAST_CRE(vehicle->GetPassenger(SEAT_TURRET)))
|
||||
if (Creature *turret = CAST_CRE(vehicle->GetPassenger(SEAT_TURRET)))
|
||||
{
|
||||
turret->setFaction(m_creature->GetVehicleBase()->getFaction());
|
||||
turret->SetUInt32Value(UNIT_FIELD_FLAGS, 0); // unselectable
|
||||
turret->AI()->AttackStart(who);
|
||||
}
|
||||
if(Unit *device = vehicle->GetPassenger(SEAT_DEVICE))
|
||||
if (Unit *device = vehicle->GetPassenger(SEAT_DEVICE))
|
||||
{
|
||||
device->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
|
||||
device->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -288,17 +288,17 @@ struct boss_flame_leviathan_overload_deviceAI : public PassiveAI
|
||||
|
||||
void DoAction(const int32 param)
|
||||
{
|
||||
if(param == EVENT_SPELLCLICK)
|
||||
if (param == EVENT_SPELLCLICK)
|
||||
{
|
||||
m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
if(m_creature->GetVehicle())
|
||||
if (m_creature->GetVehicle())
|
||||
{
|
||||
if(Unit *player = m_creature->GetVehicle()->GetPassenger(SEAT_PLAYER))
|
||||
if (Unit *player = m_creature->GetVehicle()->GetPassenger(SEAT_PLAYER))
|
||||
{
|
||||
player->ExitVehicle();
|
||||
m_creature->GetVehicleBase()->CastSpell(player, SPELL_SMOKE_TRAIL, true);
|
||||
if(Unit *leviathan = m_creature->GetVehicleBase()->GetVehicleBase())
|
||||
if (Unit *leviathan = m_creature->GetVehicleBase()->GetVehicleBase())
|
||||
player->GetMotionMaster()->MoveKnockbackFrom(leviathan->GetPositionX(), leviathan->GetPositionY(), 30, 30);
|
||||
}
|
||||
}
|
||||
@@ -312,9 +312,9 @@ struct boss_flame_leviathan_safety_containerAI : public PassiveAI
|
||||
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
{
|
||||
if(id == m_creature->GetEntry())
|
||||
if (id == m_creature->GetEntry())
|
||||
{
|
||||
if(Creature *liquid = DoSummon(MOB_LIQUID, me, 0))
|
||||
if (Creature *liquid = DoSummon(MOB_LIQUID, me, 0))
|
||||
liquid->CastSpell(liquid, 62494, true);
|
||||
m_creature->DisappearAndDie(); // this will relocate creature to sky
|
||||
}
|
||||
@@ -322,7 +322,7 @@ struct boss_flame_leviathan_safety_containerAI : public PassiveAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!m_creature->GetVehicle() && m_creature->isSummon() && m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE)
|
||||
if (!m_creature->GetVehicle() && m_creature->isSummon() && m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE)
|
||||
m_creature->GetMotionMaster()->MoveFall(409.8f, m_creature->GetEntry());
|
||||
}
|
||||
};
|
||||
@@ -341,7 +341,7 @@ struct spell_pool_of_tarAI : public TriggerAI
|
||||
|
||||
void SpellHit(Unit* caster, const SpellEntry *spell)
|
||||
{
|
||||
if(spell->SchoolMask & SPELL_SCHOOL_MASK_FIRE && !m_creature->HasAura(SPELL_BLAZE))
|
||||
if (spell->SchoolMask & SPELL_SCHOOL_MASK_FIRE && !m_creature->HasAura(SPELL_BLAZE))
|
||||
m_creature->CastSpell(me, SPELL_BLAZE, true);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -117,19 +117,19 @@ struct boss_kologarnAI : public BossAI
|
||||
case EVENT_NONE:
|
||||
break;
|
||||
case EVENT_SMASH:
|
||||
if(left && right)
|
||||
if (left && right)
|
||||
DoCastVictim(SPELL_TWO_ARM_SMASH, true);
|
||||
else if(left || right)
|
||||
else if (left || right)
|
||||
DoCastVictim(SPELL_ONE_ARM_SMASH, true);
|
||||
events.RepeatEvent(15000);
|
||||
break;
|
||||
case EVENT_SWEEP:
|
||||
if(left)
|
||||
if (left)
|
||||
DoCastAOE(SPELL_ARM_SWEEP, true);
|
||||
events.RepeatEvent(15000);
|
||||
break;
|
||||
case EVENT_GRIP:
|
||||
if(right)
|
||||
if (right)
|
||||
DoCastAOE(SPELL_STONE_GRIP, true);
|
||||
events.RepeatEvent(15000);
|
||||
break;
|
||||
|
||||
@@ -110,7 +110,7 @@ struct boss_razorscaleAI : public BossAI
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(m_creature->GetPositionY() > -60 || m_creature->GetPositionX() < 450) // Not Blizzlike, anti-exploit to prevent players from pulling bosses to vehicles.
|
||||
if (m_creature->GetPositionY() > -60 || m_creature->GetPositionX() < 450) // Not Blizzlike, anti-exploit to prevent players from pulling bosses to vehicles.
|
||||
{
|
||||
m_creature->RemoveAllAuras();
|
||||
m_creature->DeleteThreatList();
|
||||
|
||||
@@ -24,21 +24,21 @@ The teleporter appears to be active and stable.
|
||||
bool GoHello_ulduar_teleporter( Player *pPlayer, GameObject *pGO )
|
||||
{
|
||||
ScriptedInstance *pInstance = pGO->GetInstanceData();
|
||||
if(!pInstance) return true;
|
||||
if (!pInstance) return true;
|
||||
|
||||
pPlayer->ADD_GOSSIP_ITEM(0, "Teleport to the Expedition Base Camp", GOSSIP_SENDER_MAIN, BASE_CAMP);
|
||||
pPlayer->ADD_GOSSIP_ITEM(0, "Teleport to the Formation Grounds", GOSSIP_SENDER_MAIN, GROUNDS);
|
||||
if(pInstance->GetData(TYPE_LEVIATHAN) == DONE)
|
||||
if (pInstance->GetData(TYPE_LEVIATHAN) == DONE)
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(0, "Teleport to the Colossal Forge", GOSSIP_SENDER_MAIN, FORGE);
|
||||
if(pInstance->GetData(TYPE_XT002) == DONE)
|
||||
if (pInstance->GetData(TYPE_XT002) == DONE)
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(0, "Teleport to the Scrapyard", GOSSIP_SENDER_MAIN, SCRAPYARD);
|
||||
pPlayer->ADD_GOSSIP_ITEM(0, "Teleport to the Antechamber of Ulduar", GOSSIP_SENDER_MAIN, ANTECHAMBER);
|
||||
if(pInstance->GetData(TYPE_KOLOGARN) == DONE)
|
||||
if (pInstance->GetData(TYPE_KOLOGARN) == DONE)
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(0, "Teleport to the Shattered Walkway", GOSSIP_SENDER_MAIN, WALKWAY);
|
||||
if(pInstance->GetData(TYPE_AURIAYA) == DONE)
|
||||
if (pInstance->GetData(TYPE_AURIAYA) == DONE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(0, "Teleport to the Conservatory of Life", GOSSIP_SENDER_MAIN, CONSERVATORY);
|
||||
}
|
||||
}
|
||||
@@ -50,8 +50,8 @@ bool GoHello_ulduar_teleporter( Player *pPlayer, GameObject *pGO )
|
||||
|
||||
bool GOSelect_ulduar_teleporter( Player *pPlayer, GameObject *pGO, uint32 sender, uint32 action )
|
||||
{
|
||||
if(sender != GOSSIP_SENDER_MAIN) return true;
|
||||
if(!pPlayer->getAttackers().empty()) return true;
|
||||
if (sender != GOSSIP_SENDER_MAIN) return true;
|
||||
if (!pPlayer->getAttackers().empty()) return true;
|
||||
|
||||
switch(action)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user