mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +01:00
Core: Whitespace cleanup
This commit is contained in:
@@ -29,7 +29,7 @@ namespace Trinity
|
||||
DECLSPEC_NORETURN void Fatal(char const* file, int line, char const* function, char const* message) ATTR_NORETURN;
|
||||
|
||||
DECLSPEC_NORETURN void Error(char const* file, int line, char const* function, char const* message) ATTR_NORETURN;
|
||||
|
||||
|
||||
DECLSPEC_NORETURN void Abort(char const* file, int line, char const* function) ATTR_NORETURN;
|
||||
|
||||
void Warning(char const* file, int line, char const* function, char const* message);
|
||||
|
||||
@@ -246,10 +246,10 @@ class SmartScript
|
||||
DecPhase(abs(p));
|
||||
}
|
||||
|
||||
void DecPhase(int32 p = 1)
|
||||
{
|
||||
void DecPhase(int32 p = 1)
|
||||
{
|
||||
if(mEventPhase > (uint32)p)
|
||||
mEventPhase -= (uint32)p;
|
||||
mEventPhase -= (uint32)p;
|
||||
else
|
||||
mEventPhase = 0;
|
||||
}
|
||||
|
||||
@@ -1411,11 +1411,11 @@ bool Creature::CanStartAttack(Unit const* who, bool force) const
|
||||
return false;
|
||||
|
||||
// This set of checks is should be done only for creatures
|
||||
if ((HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC) && who->GetTypeId() != TYPEID_PLAYER) // flag is valid only for non player characters
|
||||
if ((HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC) && who->GetTypeId() != TYPEID_PLAYER) // flag is valid only for non player characters
|
||||
|| (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC) && who->GetTypeId() == TYPEID_PLAYER) // immune to PC and target is a player, return false
|
||||
|| (who->GetOwner() && who->GetOwner()->GetTypeId() == TYPEID_PLAYER && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC))) // player pets are immune to pc as well
|
||||
return false;
|
||||
|
||||
|
||||
// Do not attack non-combat pets
|
||||
if (who->GetTypeId() == TYPEID_UNIT && who->GetCreatureType() == CREATURE_TYPE_NON_COMBAT_PET)
|
||||
return false;
|
||||
|
||||
@@ -1863,7 +1863,7 @@ TempSummon* Map::SummonCreature(uint32 entry, Position const& pos, SummonPropert
|
||||
summon = new Minion(properties, summoner, false);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (!summon->Create(GenerateLowGuid<HighGuid::Unit>(), this, phase, entry, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), nullptr, vehId))
|
||||
{
|
||||
delete summon;
|
||||
|
||||
@@ -308,12 +308,12 @@ class OutdoorPvP : public ZoneScript
|
||||
|
||||
template<class Worker>
|
||||
void BroadcastWorker(Worker& _worker, uint32 zoneId);
|
||||
|
||||
|
||||
// Hack to store map because this code is just shit
|
||||
void SetMapFromZone(uint32 zone);
|
||||
std::map<ObjectGuid::LowType, GameObject*> m_GoScriptStore;
|
||||
std::map<ObjectGuid::LowType, Creature*> m_CreatureScriptStore;
|
||||
|
||||
|
||||
Map* m_map;
|
||||
};
|
||||
|
||||
|
||||
@@ -210,7 +210,7 @@ bool CanCreatePerfectItem(Player* player, uint32 spellId, float &perfectCreateCh
|
||||
// lack of entry means no perfection proc possible
|
||||
if (!thisEntry)
|
||||
return false;
|
||||
|
||||
|
||||
// if you don't have the spell needed, then no procs for you
|
||||
if (!player->HasSpell(thisEntry->requiredSpecialization))
|
||||
return false;
|
||||
@@ -218,7 +218,7 @@ bool CanCreatePerfectItem(Player* player, uint32 spellId, float &perfectCreateCh
|
||||
// set values as appropriate
|
||||
perfectCreateChance = thisEntry->perfectCreateChance;
|
||||
perfectItemType = thisEntry->perfectItemType;
|
||||
|
||||
|
||||
// and tell the caller to start rolling the dice
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
CooldownStorageType::size_type GetCooldownsSizeForPacket() const { return _spellCooldowns.size(); }
|
||||
void SaveCooldownStateBeforeDuel();
|
||||
void RestoreCooldownStateAfterDuel();
|
||||
|
||||
|
||||
private:
|
||||
Player* GetPlayerOwner() const;
|
||||
void SendClearCooldowns(std::vector<int32> const& cooldowns) const;
|
||||
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
uint32 spellId = handler->extractSpellIdFromLink((char*)args);
|
||||
if (!spellId)
|
||||
return false;
|
||||
|
||||
|
||||
if (!CheckSpellExistsAndIsValid(handler, spellId))
|
||||
return false;
|
||||
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
uint32 spellId = handler->extractSpellIdFromLink((char*)args);
|
||||
if (!spellId)
|
||||
return false;
|
||||
|
||||
|
||||
if (!CheckSpellExistsAndIsValid(handler, spellId))
|
||||
return false;
|
||||
|
||||
@@ -251,7 +251,7 @@ public:
|
||||
uint32 spellId = handler->extractSpellIdFromLink((char*)args);
|
||||
if (!spellId)
|
||||
return false;
|
||||
|
||||
|
||||
if (!CheckSpellExistsAndIsValid(handler, spellId))
|
||||
return false;
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
BossAI::JustSummoned(summon);
|
||||
|
||||
|
||||
if (me->IsInCombat())
|
||||
if (summon->GetEntry() == NPC_CRYPT_GUARD)
|
||||
summon->AI()->Talk(EMOTE_SPAWN, me);
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
summons.DoZoneInCombat();
|
||||
|
||||
|
||||
events.SetPhase(PHASE_NORMAL);
|
||||
events.ScheduleEvent(EVENT_IMPALE, urand(10 * IN_MILLISECONDS, 20 * IN_MILLISECONDS), 0, PHASE_NORMAL);
|
||||
events.ScheduleEvent(EVENT_SCARABS, urand(20 * IN_MILLISECONDS, 30 * IN_MILLISECONDS), 0, PHASE_NORMAL);
|
||||
@@ -209,7 +209,7 @@ public:
|
||||
Talk(EMOTE_LOCUST);
|
||||
DoCast(me, SPELL_LOCUST_SWARM);
|
||||
events.ScheduleEvent(EVENT_SPAWN_GUARD, 3 * IN_MILLISECONDS);
|
||||
|
||||
|
||||
events.ScheduleEvent(EVENT_LOCUST_ENDS, RAID_MODE(19, 23) * IN_MILLISECONDS);
|
||||
events.ScheduleEvent(EVENT_LOCUST, 90000);
|
||||
events.SetPhase(PHASE_SWARM);
|
||||
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
{
|
||||
_EnterCombat();
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
|
||||
eruptSection = 3;
|
||||
events.ScheduleEvent(EVENT_DISRUPT, urand(15 * IN_MILLISECONDS, 20 * IN_MILLISECONDS), 0, PHASE_FIGHT);
|
||||
events.ScheduleEvent(EVENT_FEVER, urand(10 * IN_MILLISECONDS, 20 * IN_MILLISECONDS), 0, PHASE_FIGHT);
|
||||
@@ -182,7 +182,7 @@ public:
|
||||
private:
|
||||
uint32 eruptSection;
|
||||
bool eruptDirection;
|
||||
|
||||
|
||||
bool safetyDance; // is achievement still possible? (= no player deaths yet)
|
||||
};
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ public:
|
||||
return;
|
||||
if (damage < me->GetHealth())
|
||||
return;
|
||||
|
||||
|
||||
me->SetHealth(1u);
|
||||
damage = 0u;
|
||||
}
|
||||
@@ -226,7 +226,7 @@ public:
|
||||
case EVENT_WARRIOR:
|
||||
Talk(SAY_SUMMON);
|
||||
Talk(EMOTE_SUMMON);
|
||||
|
||||
|
||||
CastSummon(RAID_MODE(2, 3), 0, 0);
|
||||
|
||||
events.ScheduleEvent(EVENT_WARRIOR, 40 * IN_MILLISECONDS, 0, PHASE_GROUND);
|
||||
@@ -291,7 +291,7 @@ public:
|
||||
break;
|
||||
case EVENT_GROUND:
|
||||
++balconyCount;
|
||||
|
||||
|
||||
DoCastAOE(SPELL_TELEPORT_BACK);
|
||||
Talk(EMOTE_TELEPORT_2);
|
||||
|
||||
@@ -308,7 +308,7 @@ public:
|
||||
{
|
||||
/* workaround for movechase breaking after blinking
|
||||
without this noth would just stand there unless his current target moves */
|
||||
if (justBlinked && me->GetVictim() && !me->IsWithinMeleeRange(me->EnsureVictim()))
|
||||
if (justBlinked && me->GetVictim() && !me->IsWithinMeleeRange(me->EnsureVictim()))
|
||||
{
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MoveChase(me->EnsureVictim());
|
||||
@@ -321,7 +321,7 @@ public:
|
||||
|
||||
private:
|
||||
uint32 balconyCount;
|
||||
|
||||
|
||||
bool justBlinked;
|
||||
|
||||
uint32 _SummonWarriorSpells[N_WARRIOR_SPELLS];
|
||||
|
||||
@@ -75,7 +75,7 @@ void OPvPCapturePointEP_EWT::ChangeState()
|
||||
auto bounds = map->GetGameObjectBySpawnIdStore().equal_range(m_capturePointSpawnId);
|
||||
for (auto itr = bounds.first; itr != bounds.second; ++itr)
|
||||
itr->second->SetGoArtKit(artkit);
|
||||
|
||||
|
||||
bounds = map->GetGameObjectBySpawnIdStore().equal_range(m_Objects[EP_EWT_FLAGS]);
|
||||
for (auto itr = bounds.first; itr != bounds.second; ++itr)
|
||||
itr->second->SetGoArtKit(artkit);
|
||||
|
||||
@@ -82,7 +82,7 @@ class boss_shattered_executioner : public CreatureScript
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
|
||||
|
||||
// _Reset() resets the loot mode, so we add them again, if any
|
||||
uint32 prisonersExecuted = instance->GetData(DATA_PRISONERS_EXECUTED);
|
||||
if (prisonersExecuted == 0)
|
||||
|
||||
@@ -297,7 +297,7 @@ const float CAPERNIAN_DISTANCE = 20.0f; //she casts away fro
|
||||
|
||||
Position const afGravityPos = {795.0f, 0.0f, 70.0f};
|
||||
|
||||
Position const TransitionPos[6] =
|
||||
Position const TransitionPos[6] =
|
||||
{
|
||||
// First two values are not static, they seem to differ on each sniff.
|
||||
{ 794.0522f, -0.96732f, 48.97848f, 0.0f },
|
||||
@@ -869,7 +869,7 @@ class boss_thaladred_the_darkener : public CreatureScript
|
||||
public:
|
||||
|
||||
boss_thaladred_the_darkener() : CreatureScript("boss_thaladred_the_darkener") { }
|
||||
|
||||
|
||||
struct boss_thaladred_the_darkenerAI : public advisorbase_ai
|
||||
{
|
||||
boss_thaladred_the_darkenerAI(Creature* creature) : advisorbase_ai(creature)
|
||||
@@ -963,7 +963,7 @@ class boss_lord_sanguinar : public CreatureScript
|
||||
public:
|
||||
|
||||
boss_lord_sanguinar() : CreatureScript("boss_lord_sanguinar") { }
|
||||
|
||||
|
||||
struct boss_lord_sanguinarAI : public advisorbase_ai
|
||||
{
|
||||
boss_lord_sanguinarAI(Creature* creature) : advisorbase_ai(creature)
|
||||
@@ -1027,7 +1027,7 @@ class boss_grand_astromancer_capernian : public CreatureScript
|
||||
public:
|
||||
|
||||
boss_grand_astromancer_capernian() : CreatureScript("boss_grand_astromancer_capernian") { }
|
||||
|
||||
|
||||
struct boss_grand_astromancer_capernianAI : public advisorbase_ai
|
||||
{
|
||||
boss_grand_astromancer_capernianAI(Creature* creature) : advisorbase_ai(creature)
|
||||
@@ -1307,7 +1307,7 @@ class npc_phoenix_tk : public CreatureScript
|
||||
public:
|
||||
|
||||
npc_phoenix_tk() : CreatureScript("npc_phoenix_tk") { }
|
||||
|
||||
|
||||
struct npc_phoenix_tkAI : public ScriptedAI
|
||||
{
|
||||
npc_phoenix_tkAI(Creature* creature) : ScriptedAI(creature)
|
||||
@@ -1366,7 +1366,7 @@ class npc_phoenix_egg_tk : public CreatureScript
|
||||
public:
|
||||
|
||||
npc_phoenix_egg_tk() : CreatureScript("npc_phoenix_egg_tk") { }
|
||||
|
||||
|
||||
struct npc_phoenix_egg_tkAI : public ScriptedAI
|
||||
{
|
||||
npc_phoenix_egg_tkAI(Creature* creature) : ScriptedAI(creature)
|
||||
@@ -1464,7 +1464,7 @@ class spell_kael_gravity_lapse : public SpellScriptLoader
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_kael_gravity_lapse_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
uint8 _targetCount;
|
||||
};
|
||||
|
||||
@@ -483,7 +483,7 @@ class npc_barada : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_barada() : CreatureScript("npc_barada") { }
|
||||
|
||||
|
||||
struct npc_baradaAI : public ScriptedAI
|
||||
{
|
||||
npc_baradaAI(Creature* creature) : ScriptedAI(creature)
|
||||
@@ -779,7 +779,7 @@ public:
|
||||
|
||||
me->SetCanFly(true);
|
||||
me->SetSpeed(MOVE_RUN, 0.2f);
|
||||
|
||||
|
||||
me->SetFacingTo(3.207566f);
|
||||
me->GetMotionMaster()->MoveJump(exorcismPos[2], 2.0f, 2.0f);
|
||||
|
||||
@@ -860,14 +860,14 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
|
||||
|
||||
uint8 circleRounds;
|
||||
uint8 point;
|
||||
|
||||
|
||||
bool wpreached;
|
||||
};
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ template<>
|
||||
struct ContainerMapList<TypeNull> /* nothing is in type null */
|
||||
{
|
||||
};
|
||||
template<class H, class T>
|
||||
template<class H, class T>
|
||||
struct ContainerMapList<TypeList<H, T> >
|
||||
{
|
||||
ContainerMapList<H> _elements;
|
||||
@@ -105,7 +105,7 @@ class TypeMapContainer
|
||||
template<class SPECIFIC_TYPE> size_t Count() const { return Trinity::Count(i_elements, (SPECIFIC_TYPE*)NULL); }
|
||||
|
||||
/// inserts a specific object into the container
|
||||
template<class SPECIFIC_TYPE>
|
||||
template<class SPECIFIC_TYPE>
|
||||
bool insert(SPECIFIC_TYPE *obj)
|
||||
{
|
||||
SPECIFIC_TYPE* t = Trinity::Insert(i_elements, obj);
|
||||
@@ -113,7 +113,7 @@ class TypeMapContainer
|
||||
}
|
||||
|
||||
/// Removes the object from the container, and returns the removed object
|
||||
//template<class SPECIFIC_TYPE>
|
||||
//template<class SPECIFIC_TYPE>
|
||||
//bool remove(SPECIFIC_TYPE* obj)
|
||||
//{
|
||||
// SPECIFIC_TYPE* t = Trinity::Remove(i_elements, obj);
|
||||
|
||||
Reference in New Issue
Block a user