diff options
author | Shauren <shauren.trinity@gmail.com> | 2020-08-14 17:06:03 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2020-08-14 17:06:03 +0200 |
commit | 1c52d5fff738aa01bd27fd117076ac33515acef5 (patch) | |
tree | ff7d2113e023a0fd47fbdde8ea94c0fe4bb9a804 /src/server/game/Handlers/SpellHandler.cpp | |
parent | 02fd3a1f15840203d8515dae12920d9b66655076 (diff) |
Core/Misc: Replace NULL with nullptr
Diffstat (limited to 'src/server/game/Handlers/SpellHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/SpellHandler.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index c6ebd656a00..5be7223cb81 100644 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -49,48 +49,48 @@ void WorldSession::HandleUseItemOpcode(WorldPackets::Spells::UseItem& packet) Item* item = user->GetUseableItemByPos(packet.PackSlot, packet.Slot); if (!item) { - user->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL); + user->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, nullptr, nullptr); return; } if (item->GetGUID() != packet.CastItem) { - user->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL); + user->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, nullptr, nullptr); return; } ItemTemplate const* proto = item->GetTemplate(); if (!proto) { - user->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, item, NULL); + user->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, item, nullptr); return; } // some item classes can be used only in equipped state if (proto->GetInventoryType() != INVTYPE_NON_EQUIP && !item->IsEquipped()) { - user->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, item, NULL); + user->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, item, nullptr); return; } InventoryResult msg = user->CanUseItem(item); if (msg != EQUIP_ERR_OK) { - user->SendEquipError(msg, item, NULL); + user->SendEquipError(msg, item, nullptr); return; } // only allow conjured consumable, bandage, poisons (all should have the 2^21 item flag set in DB) if (proto->GetClass() == ITEM_CLASS_CONSUMABLE && !(proto->GetFlags() & ITEM_FLAG_IGNORE_DEFAULT_ARENA_RESTRICTIONS) && user->InArena()) { - user->SendEquipError(EQUIP_ERR_NOT_DURING_ARENA_MATCH, item, NULL); + user->SendEquipError(EQUIP_ERR_NOT_DURING_ARENA_MATCH, item, nullptr); return; } // don't allow items banned in arena if (proto->GetFlags() & ITEM_FLAG_NOT_USEABLE_IN_ARENA && user->InArena()) { - user->SendEquipError(EQUIP_ERR_NOT_DURING_ARENA_MATCH, item, NULL); + user->SendEquipError(EQUIP_ERR_NOT_DURING_ARENA_MATCH, item, nullptr); return; } @@ -102,7 +102,7 @@ void WorldSession::HandleUseItemOpcode(WorldPackets::Spells::UseItem& packet) { if (!spellInfo->CanBeUsedInCombat()) { - user->SendEquipError(EQUIP_ERR_NOT_IN_COMBAT, item, NULL); + user->SendEquipError(EQUIP_ERR_NOT_IN_COMBAT, item, nullptr); return; } } @@ -616,7 +616,7 @@ void WorldSession::HandleMissileTrajectoryCollision(WorldPackets::Spells::Missil void WorldSession::HandleUpdateMissileTrajectory(WorldPackets::Spells::UpdateMissileTrajectory& packet) { Unit* caster = ObjectAccessor::GetUnit(*_player, packet.Guid); - Spell* spell = caster ? caster->GetCurrentSpell(CURRENT_GENERIC_SPELL) : NULL; + Spell* spell = caster ? caster->GetCurrentSpell(CURRENT_GENERIC_SPELL) : nullptr; if (!spell || spell->m_spellInfo->Id != uint32(packet.SpellID) || !spell->m_targets.HasDst() || !spell->m_targets.HasSrc()) return; |