chore(Core/Misc): Some cleanup (#19970)

* remove weird blanks

* update if

* ) ) to ))

* missed some ) )

* now switch

* .
This commit is contained in:
Kitzunu
2024-09-21 19:34:31 +02:00
committed by GitHub
parent 0ba59c0053
commit 386aea03ee
157 changed files with 1606 additions and 1616 deletions

View File

@@ -4684,7 +4684,7 @@ void Player::DurabilityLossAll(double percent, bool inventory)
void Player::DurabilityLoss(Item* item, double percent)
{
if(!item || percent == 0.0)
if (!item || percent == 0.0)
return;
uint32 pMaxDurability = item ->GetUInt32Value(ITEM_FIELD_MAXDURABILITY);
@@ -10001,13 +10001,13 @@ void Player::RemoveSpellMods(Spell* spell)
spell->m_appliedMods.erase(iterMod);
// MAGE T8P4 BONUS
if( spellInfo->SpellFamilyName == SPELLFAMILY_MAGE )
if (spellInfo->SpellFamilyName == SPELLFAMILY_MAGE)
{
SpellInfo const* sp = mod->ownerAura->GetSpellInfo();
// Missile Barrage, Hot Streak, Brain Freeze (trigger spell - Fireball!)
if( sp->SpellIconID == 3261 || sp->SpellIconID == 2999 || sp->SpellIconID == 2938 )
if( AuraEffect* aurEff = GetAuraEffectDummy(64869) )
if( roll_chance_i(aurEff->GetAmount()) )
if (sp->SpellIconID == 3261 || sp->SpellIconID == 2999 || sp->SpellIconID == 2938)
if (AuraEffect* aurEff = GetAuraEffectDummy(64869))
if (roll_chance_i(aurEff->GetAmount()))
{
mod->charges = 1;
continue;
@@ -15443,7 +15443,7 @@ void Player::PrepareCharmAISpells()
}
else if (spellInfo->Effects[i].ApplyAuraName == SPELL_AURA_PERIODIC_DAMAGE)
{
if( (int32)periodic_damage < CalculateSpellDamage(this, spellInfo, i) )
if ((int32)periodic_damage < CalculateSpellDamage(this, spellInfo, i))
{
m_charmAISpells[SPELL_DOT_DAMAGE] = spellInfo->Id;
break;

View File

@@ -294,7 +294,7 @@ bool Player::CanCompleteQuest(uint32 quest_id, const QuestStatusData* q_savedSta
return false;
// Xinef: take seasonals into account
if(!qInfo->IsRepeatable() && !qInfo->IsSeasonal() && IsQuestRewarded(quest_id))
if (!qInfo->IsRepeatable() && !qInfo->IsSeasonal() && IsQuestRewarded(quest_id))
return false; // not allow re-complete quest
// auto complete quest

View File

@@ -991,7 +991,7 @@ InventoryResult Player::CanStoreItem_InBag(uint8 bag, ItemPosCountVec& dest, Ite
// skip not existed bag or self targeted bag
Bag* pBag = GetBagByPos(bag);
if (!pBag || pBag == pSrcItem || (pSrcItem && (pSrcItem->GetGUID() == pBag->GetGUID())) )
if (!pBag || pBag == pSrcItem || (pSrcItem && (pSrcItem->GetGUID() == pBag->GetGUID())))
return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG;
if (pSrcItem && pSrcItem->IsNotEmptyBag())
@@ -1119,8 +1119,8 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec& des
if (pItem)
{
// you bad chet0rz, wpe pro
if( bag == NULL_BAG && slot == NULL_SLOT )
if( pItem->IsBag() && pItem->IsNotEmptyBag() )
if (bag == NULL_BAG && slot == NULL_SLOT)
if (pItem->IsBag() && pItem->IsNotEmptyBag())
return EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS;
// Xinef: Removed next loot generated check
@@ -7197,7 +7197,7 @@ void Player::_SaveAuras(CharacterDatabaseTransaction trans, bool logout)
continue;
Aura* aura = itr->second;
if( !logout && aura->GetDuration() < 60 * IN_MILLISECONDS )
if (!logout && aura->GetDuration() < 60 * IN_MILLISECONDS )
continue;
int32 damage[MAX_SPELL_EFFECTS];