feat(CI/Codestyle): added codestyle check (#3668)
This commit is contained in:
@@ -615,7 +615,6 @@ void Creature::Update(uint32 diff)
|
||||
m_moveBackwardsMovementTime = MOVE_BACKWARDS_CHECK_INTERVAL;
|
||||
}
|
||||
|
||||
|
||||
if (!IsInEvadeMode() && IsAIEnabled)
|
||||
{
|
||||
// do not allow the AI to be changed during update
|
||||
@@ -791,7 +790,6 @@ void Creature::RegenerateHealth()
|
||||
addvalue = uint32(Spirit * 0.80 * HealthIncreaseRate);
|
||||
}
|
||||
|
||||
|
||||
// Apply modifiers (if any).
|
||||
AuraEffectList const& ModPowerRegenPCTAuras = GetAuraEffectsByType(SPELL_AURA_MOD_HEALTH_REGEN_PERCENT);
|
||||
for (AuraEffectList::const_iterator i = ModPowerRegenPCTAuras.begin(); i != ModPowerRegenPCTAuras.end(); ++i)
|
||||
@@ -1364,7 +1362,6 @@ bool Creature::CreateFromProto(uint32 guidlow, uint32 Entry, uint32 vehId, const
|
||||
else
|
||||
CreateVehicleKit(vehId, Entry);
|
||||
|
||||
|
||||
if (!UpdateEntry(Entry, data))
|
||||
return false;
|
||||
|
||||
|
||||
@@ -1190,7 +1190,6 @@ GameObject* GameObject::LookupFishingHoleAround(float range)
|
||||
{
|
||||
GameObject* ok = nullptr;
|
||||
|
||||
|
||||
CellCoord p(acore::ComputeCellCoord(GetPositionX(), GetPositionY()));
|
||||
Cell cell(p);
|
||||
acore::NearestGameObjectFishingHole u_check(*this, range);
|
||||
|
||||
@@ -230,4 +230,3 @@ Item* Bag::GetItemByPos(uint8 slot) const
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -59,4 +59,3 @@ inline Item* NewItemOrBag(ItemTemplate const* proto)
|
||||
return (proto->InventoryType == INVTYPE_BAG) ? new Bag : new Item;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -188,4 +188,3 @@ uint32 GenerateEnchSuffixFactor(uint32 item_id)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,4 +13,3 @@ void LoadRandomEnchantmentsTable();
|
||||
uint32 GetItemEnchantMod(int32 entry);
|
||||
uint32 GenerateEnchSuffixFactor(uint32 item_id);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1845,7 +1845,6 @@ bool WorldObject::CanDetectStealthOf(WorldObject const* obj, bool checkAlert) co
|
||||
if (checkAlert)
|
||||
visibilityRange += (visibilityRange * 0.08f) + 1.5f;
|
||||
|
||||
|
||||
Unit const* targetUnit = obj->ToUnit();
|
||||
|
||||
// If checking for alert, and creature's visibility range is greater than aggro distance, No alert
|
||||
@@ -2623,7 +2622,6 @@ void WorldObject::GetContactPoint(const WorldObject* obj, float& x, float& y, fl
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void WorldObject::GetChargeContactPoint(const WorldObject* obj, float& x, float& y, float& z, float distance2d) const
|
||||
{
|
||||
// angle to face `obj` to `this` using distance includes size of `obj`
|
||||
@@ -2985,7 +2983,6 @@ void WorldObject::PlayDirectSound(uint32 sound_id, Player* target /*= NULL*/)
|
||||
SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
|
||||
void WorldObject::PlayDirectMusic(uint32 music_id, Player* target /*= NULL*/)
|
||||
{
|
||||
WorldPacket data(SMSG_PLAY_MUSIC, 4);
|
||||
|
||||
@@ -485,7 +485,6 @@ struct Position
|
||||
|
||||
[[nodiscard]] Position GetPosition() const { return *this; }
|
||||
|
||||
|
||||
Position::PositionXYZStreamer PositionXYZStream()
|
||||
{
|
||||
return PositionXYZStreamer(*this);
|
||||
@@ -593,7 +592,6 @@ ByteBuffer& operator >> (ByteBuffer& buf, Position::PositionXYZStreamer const& s
|
||||
ByteBuffer& operator<<(ByteBuffer& buf, Position::PositionXYZOStreamer const& streamer);
|
||||
ByteBuffer& operator >> (ByteBuffer& buf, Position::PositionXYZOStreamer const& streamer);
|
||||
|
||||
|
||||
struct MovementInfo
|
||||
{
|
||||
// common
|
||||
|
||||
@@ -142,4 +142,3 @@ void UpdateData::Clear()
|
||||
m_outOfRangeGUIDs.clear();
|
||||
m_blockCount = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,4 +55,3 @@ protected:
|
||||
void Compress(void* dst, uint32* dst_size, void* src, int src_size);
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -2155,7 +2155,6 @@ void Pet::HandleAsynchLoadSucceed()
|
||||
if (spell->GetSpellInfo()->HasEffect(SPELL_EFFECT_SUMMON_PET))
|
||||
CastSpell(this, 32752, true, nullptr, nullptr, GetGUID());
|
||||
|
||||
|
||||
if (owner->NeedSendSpectatorData() && GetCreatureTemplate()->family)
|
||||
{
|
||||
ArenaSpectator::SendCommand_UInt32Value(owner->FindMap(), owner->GetGUID(), "PHP", (uint32)GetHealthPct());
|
||||
|
||||
@@ -21,7 +21,6 @@ struct PetSpell
|
||||
PetSpellType type;
|
||||
};
|
||||
|
||||
|
||||
class AsynchPetSummon
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -7577,7 +7577,6 @@ uint32 Player::GetArenaTeamIdFromStorage(uint32 guid, uint8 slot)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void Player::SetArenaTeamInfoField(uint8 slot, ArenaTeamInfoType type, uint32 value)
|
||||
{
|
||||
if (slot < MAX_ARENA_SLOT)
|
||||
@@ -8287,7 +8286,6 @@ void Player::_ApplyItemBonuses(ItemTemplate const* proto, uint8 slot, bool apply
|
||||
if (CanUseAttackType(attType))
|
||||
_ApplyWeaponDamage(slot, proto, ssv, apply);
|
||||
|
||||
|
||||
// Druids get feral AP bonus from weapon dps (also use DPS from ScalingStatValue)
|
||||
if (getClass() == CLASS_DRUID)
|
||||
{
|
||||
@@ -12645,7 +12643,6 @@ Item* Player::StoreNewItem(ItemPosCountVec const& dest, uint32 item, bool update
|
||||
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM, item, count);
|
||||
pItem = StoreItem(dest, pItem, update);
|
||||
|
||||
|
||||
if (allowedLooters.size() > 1 && pItem->GetTemplate()->GetMaxStackSize() == 1 && pItem->IsSoulBound())
|
||||
{
|
||||
pItem->SetSoulboundTradeable(allowedLooters);
|
||||
@@ -19145,7 +19142,6 @@ void Player::_LoadMail()
|
||||
m->stationery = fields[12].GetUInt8();
|
||||
m->mailTemplateId = fields[13].GetInt16();
|
||||
|
||||
|
||||
if (m->mailTemplateId && !sMailTemplateStore.LookupEntry(m->mailTemplateId))
|
||||
{
|
||||
sLog->outError("Player::_LoadMail - Mail (%u) have not existed MailTemplateId (%u), remove at load", m->messageID, m->mailTemplateId);
|
||||
@@ -21638,7 +21634,6 @@ void Player::LeaveAllArenaTeams(uint64 guid)
|
||||
} while (result->NextRow());
|
||||
}
|
||||
|
||||
|
||||
uint32 Player::GetArenaTeamId(uint8 slot) const
|
||||
{
|
||||
uint32 rtVal = 0;
|
||||
@@ -21654,7 +21649,6 @@ uint32 Player::GetArenaTeamId(uint8 slot) const
|
||||
return rtVal;
|
||||
}
|
||||
|
||||
|
||||
uint32 Player::GetArenaPersonalRating(uint8 slot) const
|
||||
{
|
||||
uint32 rtVal = 0;
|
||||
@@ -23224,7 +23218,6 @@ void Player::AddComboPoints(Unit* target, int8 count)
|
||||
else if (*comboPoints < 0)
|
||||
*comboPoints = 0;
|
||||
|
||||
|
||||
SendComboPoints();
|
||||
}
|
||||
|
||||
@@ -24730,7 +24723,6 @@ void Player::UpdateUnderwaterState(Map* m, float x, float y, float z)
|
||||
_lastLiquid = nullptr;
|
||||
}
|
||||
|
||||
|
||||
// All liquids type - check under water position
|
||||
if (liquid_status.type_flags & (MAP_LIQUID_TYPE_WATER | MAP_LIQUID_TYPE_OCEAN | MAP_LIQUID_TYPE_MAGMA | MAP_LIQUID_TYPE_SLIME))
|
||||
{
|
||||
@@ -25568,7 +25560,6 @@ uint32 Player::GetPhaseMaskForSpawn() const
|
||||
if (!phase)
|
||||
phase = PHASEMASK_NORMAL;
|
||||
|
||||
|
||||
// some aura phases include 1 normal map in addition to phase itself
|
||||
uint32 n_phase = phase & ~PHASEMASK_NORMAL;
|
||||
if (n_phase > 0)
|
||||
|
||||
@@ -116,7 +116,7 @@ class SocialMgr
|
||||
private:
|
||||
SocialMgr();
|
||||
~SocialMgr();
|
||||
|
||||
|
||||
public:
|
||||
static SocialMgr* instance();
|
||||
// Misc
|
||||
|
||||
@@ -70,7 +70,6 @@ void Totem::InitStats(uint32 duration)
|
||||
if (totemSpell->CalcCastTime()) // If spell has cast time -> its an active totem
|
||||
m_type = TOTEM_ACTIVE;
|
||||
|
||||
|
||||
m_duration = duration;
|
||||
}
|
||||
|
||||
|
||||
@@ -1101,8 +1101,6 @@ void Creature::CalculateMinMaxDamage(WeaponAttackType attType, bool normalized,
|
||||
######## ########
|
||||
#######################################*/
|
||||
|
||||
|
||||
|
||||
bool Guardian::UpdateStats(Stats stat)
|
||||
{
|
||||
if (stat >= MAX_STATS)
|
||||
|
||||
@@ -1764,7 +1764,6 @@ float Unit::GetEffectiveResistChance(Unit const* owner, SpellSchoolMask schoolMa
|
||||
if (owner)
|
||||
victimResistance += std::max((float(victim->getLevel()) - float(owner->getLevel())) * 5.0f, 0.0f);
|
||||
|
||||
|
||||
static uint32 const BOSS_LEVEL = 83;
|
||||
static float const BOSS_RESISTANCE_CONSTANT = 510.0f;
|
||||
uint32 level = victim->getLevel();
|
||||
@@ -9056,7 +9055,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Custom basepoints/target for exist spell
|
||||
// dummy basepoints or other customs
|
||||
switch (trigger_spell_id)
|
||||
@@ -9452,7 +9450,6 @@ bool Unit::HandleOverrideClassScriptAuraProc(Unit* victim, uint32 /*damage*/, Au
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void Unit::setPowerType(Powers new_powertype)
|
||||
{
|
||||
SetByteValue(UNIT_FIELD_BYTES_0, 3, new_powertype);
|
||||
@@ -9565,7 +9562,6 @@ ReputationRank Unit::GetReactionTo(Unit const* target) const
|
||||
return *repRank;
|
||||
}
|
||||
|
||||
|
||||
if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE))
|
||||
{
|
||||
if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE))
|
||||
@@ -11154,7 +11150,6 @@ uint32 Unit::SpellDamageBonusTaken(Unit* caster, SpellInfo const* spellProto, ui
|
||||
if (spellProto->ValidateAttribute6SpellDamageMods(caster, *i, damagetype == DOT))
|
||||
AddPct(TakenTotalMod, (*i)->GetAmount());
|
||||
|
||||
|
||||
// .. taken pct: dummy auras
|
||||
AuraEffectList const& mDummyAuras = GetAuraEffectsByType(SPELL_AURA_DUMMY);
|
||||
for (AuraEffectList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i)
|
||||
@@ -14315,7 +14310,6 @@ float Unit::GetSpellMinRangeForTarget(Unit const* target, SpellInfo const* spell
|
||||
return spellInfo->GetMinRange(!IsHostileTo(target));
|
||||
}
|
||||
|
||||
|
||||
uint32 Unit::GetCreatureType() const
|
||||
{
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
@@ -17879,7 +17873,6 @@ bool Unit::IsInRaidWith(Unit const* unit) const
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void Unit::GetPartyMembers(std::list<Unit*>& TagUnitMap)
|
||||
{
|
||||
Unit* owner = GetCharmerOrOwnerOrSelf();
|
||||
|
||||
Reference in New Issue
Block a user