Whitespace cleanups...
This commit is contained in:
@@ -1978,10 +1978,10 @@ struct WorldStateSounds
|
||||
struct WorldStateUI
|
||||
{
|
||||
uint32 ID; // 0
|
||||
uint32 map_id; // 1 Can be -1 to show up everywhere.
|
||||
uint32 zone; // 2 Can be zero for "everywhere".
|
||||
uint32 map_id; // 1 Can be -1 to show up everywhere.
|
||||
uint32 zone; // 2 Can be zero for "everywhere".
|
||||
uint32 phaseMask; // 3 Phase this WorldState is avaliable in
|
||||
uint32 icon; // 4 The icon that is used in the interface.
|
||||
uint32 icon; // 4 The icon that is used in the interface.
|
||||
char* textureFilename; // 5
|
||||
char* text; // 6-21 The worldstate text
|
||||
char* description; // 22-38 Text shown when hovering mouse on icon
|
||||
|
||||
@@ -42,7 +42,7 @@ class Aura;
|
||||
//
|
||||
// in aura handler there should be check for modes:
|
||||
// AURA_EFFECT_HANDLE_REAL set
|
||||
// AURA_EFFECT_HANDLE_SEND_FOR_CLIENT_MASK set
|
||||
// AURA_EFFECT_HANDLE_SEND_FOR_CLIENT_MASK set
|
||||
// AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK set - aura is recalculated or is just applied/removed - need to redo all things related to m_amount
|
||||
// AURA_EFFECT_HANDLE_CHANGE_AMOUNT_SEND_FOR_CLIENT_MASK - logical or of above conditions
|
||||
// AURA_EFFECT_HANDLE_STAT - set when stats are reapplied
|
||||
@@ -850,7 +850,7 @@ void AuraEffect::CalculatePeriodic(Unit* caster, bool create, bool load)
|
||||
// reset periodic timer on aura create or on reapply when aura isn't dot
|
||||
// possibly we should not reset periodic timers only when aura is triggered by proc
|
||||
// or maybe there's a spell attribute somewhere
|
||||
bool resetPeriodicTimer = create
|
||||
bool resetPeriodicTimer = create
|
||||
|| ((GetAuraType() != SPELL_AURA_PERIODIC_DAMAGE) && (GetAuraType() != SPELL_AURA_PERIODIC_DAMAGE_PERCENT));
|
||||
|
||||
if (resetPeriodicTimer)
|
||||
@@ -6594,7 +6594,7 @@ void AuraEffect::HandleAuraLinked(AuraApplication const* aurApp, uint8 mode, boo
|
||||
else if (mode & AURA_EFFECT_HANDLE_REAPPLY && apply)
|
||||
{
|
||||
uint64 casterGUID = IsSpellRequiringFocusedTarget(GetSpellProto()) ? GetCasterGUID() : target->GetGUID();
|
||||
|
||||
|
||||
// change the stack amount to be equal to stack amount of our aura
|
||||
if (Aura* triggeredAura = target->GetAura(triggeredSpellId, casterGUID))
|
||||
triggeredAura->ModStackAmount(GetBase()->GetStackAmount() - triggeredAura->GetStackAmount());
|
||||
|
||||
@@ -747,7 +747,7 @@ void Aura::SetCharges(uint8 charges)
|
||||
uint8 Aura::CalcMaxCharges(Unit* caster) const
|
||||
{
|
||||
uint8 maxProcCharges = m_spellProto->procCharges;
|
||||
|
||||
|
||||
if (caster)
|
||||
if (Player* modOwner = caster->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod(GetId(), SPELLMOD_CHARGES, maxProcCharges);
|
||||
@@ -780,7 +780,7 @@ void Aura::SetStackAmount(uint8 stackAmount)
|
||||
{
|
||||
m_stackAmount = stackAmount;
|
||||
Unit* caster = GetCaster();
|
||||
|
||||
|
||||
std::list<AuraApplication*> applications;
|
||||
GetApplicationList(applications);
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ class Aura
|
||||
time_t GetApplyTime() const { return m_applyTime; }
|
||||
int32 GetMaxDuration() const { return m_maxDuration; }
|
||||
void SetMaxDuration(int32 duration) { m_maxDuration = duration; }
|
||||
int32 CalcMaxDuration() const { return CalcMaxDuration(GetCaster()); }
|
||||
int32 CalcMaxDuration() const { return CalcMaxDuration(GetCaster()); }
|
||||
int32 CalcMaxDuration(Unit* caster) const;
|
||||
int32 GetDuration() const { return m_duration; }
|
||||
void SetDuration(int32 duration, bool withMods = false);
|
||||
@@ -136,7 +136,7 @@ class Aura
|
||||
uint8 CalcMaxCharges(Unit* caster) const;
|
||||
uint8 CalcMaxCharges() const { return CalcMaxCharges(GetCaster()); }
|
||||
bool ModCharges(int32 num, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
|
||||
bool DropCharge(AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT) { return ModCharges(-1, removeMode); }
|
||||
bool DropCharge(AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT) { return ModCharges(-1, removeMode); }
|
||||
|
||||
uint8 GetStackAmount() const { return m_stackAmount; }
|
||||
void SetStackAmount(uint8 num);
|
||||
|
||||
@@ -485,7 +485,7 @@ class AuraScript : public _SpellScript
|
||||
};
|
||||
typedef std::stack<ScriptStateStore> ScriptStateStack;
|
||||
ScriptStateStack m_scriptStates;
|
||||
|
||||
|
||||
public:
|
||||
//
|
||||
// AuraScript interface
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
|
||||
@@ -105,7 +105,7 @@ class boss_kurinnaxx : public CreatureScript
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
private:
|
||||
|
||||
@@ -32,7 +32,7 @@ enum Spells
|
||||
SPELL_SUMMON_MANA_FIEND_1 = 25681, // TARGET_DEST_CASTER_FRONT
|
||||
SPELL_SUMMON_MANA_FIEND_2 = 25682, // TARGET_DEST_CASTER_LEFT
|
||||
SPELL_SUMMON_MANA_FIEND_3 = 25683, // TARGET_DEST_CASTER_RIGHT
|
||||
SPELL_ENERGIZE = 25685
|
||||
SPELL_ENERGIZE = 25685
|
||||
};
|
||||
|
||||
enum Events
|
||||
@@ -167,7 +167,7 @@ class boss_moam : public CreatureScript
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
private:
|
||||
|
||||
@@ -112,7 +112,7 @@ class boss_rajaxx : public CreatureScript
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
private:
|
||||
|
||||
@@ -66,7 +66,7 @@ class instance_ruins_of_ahnqiraj : public InstanceMapScript
|
||||
{
|
||||
if (!InstanceScript::SetBossState(bossId, state))
|
||||
return false;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -190,7 +190,7 @@ class boss_baltharus_the_warborn : public CreatureScript
|
||||
break;
|
||||
case EVENT_CLEAVE:
|
||||
DoCastVictim(SPELL_CLEAVE);
|
||||
events.ScheduleEvent(EVENT_CLEAVE, 24000, 0, PHASE_COMBAT);
|
||||
events.ScheduleEvent(EVENT_CLEAVE, 24000, 0, PHASE_COMBAT);
|
||||
break;
|
||||
case EVENT_BLADE_TEMPEST:
|
||||
DoCast(me, SPELL_BLADE_TEMPEST);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include "ScriptPCH.h"
|
||||
#include "ruby_sanctum.h"
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ enum AuriayaYells
|
||||
enum AuriayaActions
|
||||
{
|
||||
ACTION_CRAZY_CAT_LADY = 0,
|
||||
ACTION_RESPAWN_DEFENDER
|
||||
ACTION_RESPAWN_DEFENDER
|
||||
};
|
||||
|
||||
#define SENTRY_NUMBER RAID_MODE<uint8>(2, 4)
|
||||
@@ -122,7 +122,7 @@ class boss_auriaya : public CreatureScript
|
||||
{
|
||||
_EnterCombat();
|
||||
DoScriptText(SAY_AGGRO,me);
|
||||
|
||||
|
||||
events.ScheduleEvent(EVENT_SCREECH, urand(45000, 65000));
|
||||
events.ScheduleEvent(EVENT_BLAST, urand(20000, 25000));
|
||||
events.ScheduleEvent(EVENT_TERRIFYING, urand(20000, 30000));
|
||||
@@ -148,7 +148,7 @@ class boss_auriaya : public CreatureScript
|
||||
}
|
||||
|
||||
if (summoned->GetEntry() == NPC_FERAL_DEFENDER)
|
||||
{
|
||||
{
|
||||
if (!summoned->isInCombat() && me->getVictim())
|
||||
summoned->AI()->AttackStart(me->getVictim());
|
||||
summoned->SetAuraStack(SPELL_FERAL_ESSENCE, summoned, 9);
|
||||
@@ -168,7 +168,7 @@ class boss_auriaya : public CreatureScript
|
||||
--defenderLifes;
|
||||
if (!defenderLifes)
|
||||
{
|
||||
SetData(DATA_NINE_LIVES, 1);
|
||||
SetData(DATA_NINE_LIVES, 1);
|
||||
break;
|
||||
}
|
||||
events.ScheduleEvent(EVENT_RESPAWN_DEFENDER, 30000);
|
||||
|
||||
@@ -293,7 +293,7 @@ class boss_general_vezax : public CreatureScript
|
||||
std::advance(itr, urand(0, size - 1));
|
||||
return *itr;
|
||||
}
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -192,8 +192,8 @@ class npc_flash_freeze : public CreatureScript
|
||||
if (!UpdateVictim() || me->getVictim()->HasAura(SPELL_BLOCK_OF_ICE) || me->getVictim()->HasAura(SPELL_FLASH_FREEZE_HELPER))
|
||||
return;
|
||||
|
||||
if (me->getVictim()->GetGUID() != targetGUID || instance->GetBossState(BOSS_HODIR) != IN_PROGRESS)
|
||||
me->DespawnOrUnsummon();
|
||||
if (me->getVictim()->GetGUID() != targetGUID || instance->GetBossState(BOSS_HODIR) != IN_PROGRESS)
|
||||
me->DespawnOrUnsummon();
|
||||
|
||||
if (checkDespawnTimer <= diff)
|
||||
{
|
||||
@@ -644,10 +644,10 @@ class npc_hodir_priest : public CreatureScript
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*who*/)
|
||||
{
|
||||
{
|
||||
if (Creature* Hodir = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(BOSS_HODIR) : 0))
|
||||
Hodir->AI()->DoAction(ACTION_I_HAVE_THE_COOLEST_FRIENDS);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
InstanceScript* instance;
|
||||
@@ -706,10 +706,10 @@ class npc_hodir_shaman : public CreatureScript
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*who*/)
|
||||
{
|
||||
{
|
||||
if (Creature* Hodir = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(BOSS_HODIR) : 0))
|
||||
Hodir->AI()->DoAction(ACTION_I_HAVE_THE_COOLEST_FRIENDS);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
InstanceScript* instance;
|
||||
@@ -767,10 +767,10 @@ class npc_hodir_druid : public CreatureScript
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*who*/)
|
||||
{
|
||||
{
|
||||
if (Creature* Hodir = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(BOSS_HODIR) : 0))
|
||||
Hodir->AI()->DoAction(ACTION_I_HAVE_THE_COOLEST_FRIENDS);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
InstanceScript* instance;
|
||||
@@ -847,10 +847,10 @@ class npc_hodir_mage : public CreatureScript
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*who*/)
|
||||
{
|
||||
if (Creature* Hodir = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(BOSS_HODIR) : 0))
|
||||
{
|
||||
if (Creature* Hodir = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(BOSS_HODIR) : 0))
|
||||
Hodir->AI()->DoAction(ACTION_I_HAVE_THE_COOLEST_FRIENDS);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
InstanceScript* instance;
|
||||
|
||||
@@ -198,7 +198,7 @@ class boss_xt002 : public CreatureScript
|
||||
|
||||
uint32 transferHealth;
|
||||
bool enterHardMode;
|
||||
|
||||
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -353,7 +353,7 @@ class boss_xt002 : public CreatureScript
|
||||
DoCast(SPELL_SUBMERGE); // WIll make creature untargetable
|
||||
me->AttackStop();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
|
||||
|
||||
Unit* heart = me->GetVehicleKit() ? me->GetVehicleKit()->GetPassenger(HEART_VEHICLE_SEAT) : NULL;
|
||||
if (heart)
|
||||
{
|
||||
@@ -364,7 +364,7 @@ class boss_xt002 : public CreatureScript
|
||||
|
||||
//heart->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PET_IN_COMBAT | UNIT_FLAG_UNK_15 | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_UNK_29);
|
||||
heart->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
|
||||
}
|
||||
|
||||
events.CancelEvent(EVENT_SEARING_LIGHT);
|
||||
@@ -451,7 +451,7 @@ public:
|
||||
{
|
||||
XT002->AI()->SetData(DATA_TRANSFERED_HEALTH, me->GetMaxHealth());
|
||||
XT002->AI()->DoAction(ACTION_ENTER_HARD_MODE);
|
||||
damage = 0;
|
||||
damage = 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -570,14 +570,14 @@ public:
|
||||
DoCast(me->getVictim(), SPELL_TRAMPLE);
|
||||
uiTrampleTimer = TIMER_TRAMPLE;
|
||||
}
|
||||
else
|
||||
else
|
||||
uiTrampleTimer -= diff;
|
||||
|
||||
if (uiUppercutTimer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_UPPERCUT);
|
||||
uiUppercutTimer = TIMER_UPPERCUT;
|
||||
}
|
||||
}
|
||||
else
|
||||
uiUppercutTimer -= diff;
|
||||
}
|
||||
@@ -607,7 +607,7 @@ class BoomEvent : public BasicEvent
|
||||
// then EFFECT_1, etc - instead of applying each effect on target1, then target2, etc.
|
||||
// The above situation causes the visual for this spell to be bugged, so we remove the instakill
|
||||
// effect and implement a script hack for that.
|
||||
|
||||
|
||||
_me->CastSpell(_me, SPELL_BOOM, false);
|
||||
return true;
|
||||
}
|
||||
@@ -708,7 +708,7 @@ public:
|
||||
struct mob_life_sparkAI : public ScriptedAI
|
||||
{
|
||||
mob_life_sparkAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
{
|
||||
m_pInstance = pCreature->GetInstanceScript();
|
||||
}
|
||||
|
||||
|
||||
@@ -422,7 +422,7 @@ bool MySQLConnection::ExecuteTransaction(SQLTransaction& transaction)
|
||||
// we might want to restart the transaction. So to prevent data loss, we only clean up when it's all done.
|
||||
// This is done in calling functions DatabaseWorkerPool<T>::DirectCommitTransaction and TransactionTask::Execute,
|
||||
// and not while iterating over every element.
|
||||
|
||||
|
||||
CommitTransaction();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ void Transaction::Append(PreparedStatement* stmt)
|
||||
void Transaction::Cleanup()
|
||||
{
|
||||
// This might be called by explicit calls to Cleanup or by the auto-destructor
|
||||
if (_cleanedUp)
|
||||
if (_cleanedUp)
|
||||
return;
|
||||
|
||||
while (!m_queries.empty())
|
||||
|
||||
Reference in New Issue
Block a user