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

@@ -375,7 +375,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
if (mover->IsPlayer())
{
// not have spell in spellbook or spell passive and not casted by client
if( !(spellInfo->Targets & TARGET_FLAG_GAMEOBJECT_ITEM) && (!mover->ToPlayer()->HasActiveSpell(spellId) || spellInfo->IsPassive()) )
if (!(spellInfo->Targets & TARGET_FLAG_GAMEOBJECT_ITEM) && (!mover->ToPlayer()->HasActiveSpell(spellId) || spellInfo->IsPassive()))
{
bool allow = false;
@@ -411,7 +411,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
if (seat->m_flags & VEHICLE_SEAT_FLAG_CAN_ATTACK || spellInfo->Effects[EFFECT_0].Effect == SPELL_EFFECT_OPEN_LOCK /*allow looting from vehicle, but only if player has required spell (all necessary opening spells are in playercreateinfo_spell)*/)
if ((mover->IsCreature() && !mover->ToCreature()->HasSpell(spellId)) || spellInfo->IsPassive()) // the creature can't cast that spell, check player instead
{
if( !(spellInfo->Targets & TARGET_FLAG_GAMEOBJECT_ITEM) && (!_player->HasActiveSpell (spellId) || spellInfo->IsPassive()) )
if (!(spellInfo->Targets & TARGET_FLAG_GAMEOBJECT_ITEM) && (!_player->HasActiveSpell (spellId) || spellInfo->IsPassive()))
{
//cheater? kick? ban?
recvPacket.rfinish(); // prevent spam at ignore packet