Core: White space CleanUp

This commit is contained in:
Vincent-Michael
2015-07-05 04:03:36 +02:00
parent 5624f71b62
commit d418ae54a4
12 changed files with 33 additions and 33 deletions

View File

@@ -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;
}

View File

@@ -1408,11 +1408,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;

View File

@@ -1562,7 +1562,7 @@ void Group::SendUpdateToPlayer(ObjectGuid playerGUID, MemberSlot* slot)
partyUpdate.PartyType = m_groupType;
partyUpdate.PartyIndex = 0;
partyUpdate.PartyFlags = uint8(IsCreated());
partyUpdate.PartyGUID = m_guid;
partyUpdate.LeaderGUID = m_leaderGuid;

View File

@@ -683,7 +683,7 @@ bool EmblemInfo::ValidateEmblemColors()
return sGuildColorBackgroundStore.LookupEntry(m_backgroundColor) &&
sGuildColorBorderStore.LookupEntry(m_borderColor) &&
sGuildColorEmblemStore.LookupEntry(m_color);
}
bool EmblemInfo::LoadFromDB(Field* fields)
@@ -693,7 +693,7 @@ bool EmblemInfo::LoadFromDB(Field* fields)
m_borderStyle = fields[5].GetUInt8();
m_borderColor = fields[6].GetUInt8();
m_backgroundColor = fields[7].GetUInt8();
return ValidateEmblemColors();
}
@@ -2257,7 +2257,7 @@ bool Guild::LoadFromDB(Field* fields)
if (!m_emblemInfo.LoadFromDB(fields))
{
TC_LOG_ERROR("guild", "Guild " UI64FMTD " has invalid emblem colors (Background: %u, Border: %u, Emblem: %u), skipped.",
TC_LOG_ERROR("guild", "Guild " UI64FMTD " has invalid emblem colors (Background: %u, Border: %u, Emblem: %u), skipped.",
m_id, m_emblemInfo.GetBackgroundColor(), m_emblemInfo.GetBorderColor(), m_emblemInfo.GetColor());
return false;
}

View File

@@ -433,7 +433,7 @@ void WorldSession::SendQueryPetNameResponse(ObjectGuid guid)
if (Pet* pet = unit->ToPet())
{
if (DeclinedName const* names = pet->GetDeclinedNames())
if (DeclinedName const* names = pet->GetDeclinedNames())
{
response.HasDeclined = true;
response.DeclinedNames = *names;

View File

@@ -26,7 +26,7 @@ void WorldSession::HandleSceneTriggerEvent(WorldPackets::Scenes::SceneTriggerEve
void WorldSession::HandleScenePlaybackComplete(WorldPackets::Scenes::ScenePlaybackComplete& scenePlaybackComplete)
{
TC_LOG_DEBUG("scenes", "HandleScenePlaybackComplete: SceneInstanceID: %u", scenePlaybackComplete.SceneInstanceID);
}

View File

@@ -1263,16 +1263,16 @@ enum SpellEffectName
enum SpellCastResult // 20201
{
SPELL_FAILED_SUCCESS = 0,
SPELL_FAILED_AFFECTING_COMBAT = 1,
SPELL_FAILED_ALREADY_AT_FULL_HEALTH = 2,
SPELL_FAILED_ALREADY_AT_FULL_MANA = 3,
SPELL_FAILED_ALREADY_AT_FULL_POWER = 4,
SPELL_FAILED_ALREADY_BEING_TAMED = 5,
SPELL_FAILED_ALREADY_HAVE_CHARM = 6,
SPELL_FAILED_ALREADY_HAVE_SUMMON = 7,
SPELL_FAILED_ALREADY_HAVE_PET = 8,
SPELL_FAILED_ALREADY_OPEN = 9,
SPELL_FAILED_SUCCESS = 0,
SPELL_FAILED_AFFECTING_COMBAT = 1,
SPELL_FAILED_ALREADY_AT_FULL_HEALTH = 2,
SPELL_FAILED_ALREADY_AT_FULL_MANA = 3,
SPELL_FAILED_ALREADY_AT_FULL_POWER = 4,
SPELL_FAILED_ALREADY_BEING_TAMED = 5,
SPELL_FAILED_ALREADY_HAVE_CHARM = 6,
SPELL_FAILED_ALREADY_HAVE_SUMMON = 7,
SPELL_FAILED_ALREADY_HAVE_PET = 8,
SPELL_FAILED_ALREADY_OPEN = 9,
SPELL_FAILED_AURA_BOUNCED = 10,
SPELL_FAILED_AUTOTRACK_INTERRUPTED = 11,
SPELL_FAILED_BAD_IMPLICIT_TARGETS = 12,

View File

@@ -665,7 +665,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Party::GroupPlayerInfos c
{
data.WriteBits(playerInfos.Name.size(), 6);
data.FlushBits();
data << playerInfos.GUID;
data << playerInfos.Status;
data << playerInfos.Subgroup;

View File

@@ -73,9 +73,9 @@ namespace WorldPackets
// Inviter
ObjectGuid InviterGUID;
ObjectGuid InviterBNetAccountId;
ObjectGuid InviterBNetAccountId;
std::string InviterName;
// Realm
bool IsXRealm = false;
bool IsLocal = true;
@@ -166,7 +166,7 @@ namespace WorldPackets
std::vector<GroupAura> AuraList;
};
struct GroupMemberStats
{
ObjectGuid GUID;
@@ -523,7 +523,7 @@ namespace WorldPackets
int8 PartyFlags = 0;
int8 PartyIndex = 0;
int8 PartyType = 0;
ObjectGuid PartyGUID;
ObjectGuid LeaderGUID;

View File

@@ -31,7 +31,7 @@ namespace WorldPackets
PlayScene() : ServerPacket(SMSG_PLAY_SCENE, 34) { }
WorldPacket const* Write() override;
int32 SceneID = 0;
int32 PlaybackFlags = 0;
int32 SceneInstanceID = 0;
@@ -39,7 +39,7 @@ namespace WorldPackets
ObjectGuid TransportGUID;
Position Location;
};
class SceneTriggerEvent final : public ClientPacket
{
public:
@@ -50,7 +50,7 @@ namespace WorldPackets
uint32 SceneInstanceID = 0;
std::string _Event;
};
class ScenePlaybackComplete final : public ClientPacket
{
public:
@@ -60,7 +60,7 @@ namespace WorldPackets
uint32 SceneInstanceID = 0;
};
class ScenePlaybackCanceled final : public ClientPacket
{
public:

View File

@@ -1431,7 +1431,7 @@ public:
handler->SendSysMessage("Target is not phased");
return true;
}
static bool HandleDebugSendPlaySceneCommand(ChatHandler* handler, char const* args)
{
if (!*args)
@@ -1458,7 +1458,7 @@ public:
sceneInstanceID = atoi(c);
if (d)
sceneScriptPackageID = atoi(d);
Player* me = handler->GetSession()->GetPlayer();
WorldPackets::Scenes::PlayScene packet;

View File

@@ -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)