diff --git a/src/game/BattleGround/BattleGround.cpp b/src/game/BattleGround/BattleGround.cpp index 9e5f8d736..39554b986 100644 --- a/src/game/BattleGround/BattleGround.cpp +++ b/src/game/BattleGround/BattleGround.cpp @@ -658,8 +658,8 @@ void BattleGround::EndBattleGround(Team winner) { this->RemoveFromBGFreeSlotQueue(); - ArenaTeam* winner_arena_team = nullptr; - ArenaTeam* loser_arena_team = nullptr; + ArenaTeam* winner_arena_team = NULL; + ArenaTeam* loser_arena_team = NULL; uint32 loser_rating = 0; uint32 winner_rating = 0; WorldPacket data; diff --git a/src/game/BattleGround/BattleGroundEY.cpp b/src/game/BattleGround/BattleGroundEY.cpp index 29a8c7e3b..7b0bdb890 100644 --- a/src/game/BattleGround/BattleGroundEY.cpp +++ b/src/game/BattleGround/BattleGroundEY.cpp @@ -427,12 +427,12 @@ void BattleGroundEY::EventPlayerDroppedFlag(Player* source) if (source->GetTeam() == ALLIANCE) { UpdateWorldState(WORLD_STATE_EY_NETHERSTORM_FLAG_STATE_ALLIANCE, 1); - SendMessageToAll(LANG_BG_EY_DROPPED_FLAG, CHAT_MSG_BG_SYSTEM_ALLIANCE, nullptr); + SendMessageToAll(LANG_BG_EY_DROPPED_FLAG, CHAT_MSG_BG_SYSTEM_ALLIANCE, NULL); } else { UpdateWorldState(WORLD_STATE_EY_NETHERSTORM_FLAG_STATE_HORDE, 1); - SendMessageToAll(LANG_BG_EY_DROPPED_FLAG, CHAT_MSG_BG_SYSTEM_HORDE, nullptr); + SendMessageToAll(LANG_BG_EY_DROPPED_FLAG, CHAT_MSG_BG_SYSTEM_HORDE, NULL); } } diff --git a/src/game/ChatCommands/Level1.cpp b/src/game/ChatCommands/Level1.cpp index 29cc30b1a..788ae407d 100644 --- a/src/game/ChatCommands/Level1.cpp +++ b/src/game/ChatCommands/Level1.cpp @@ -1999,7 +1999,7 @@ bool ChatHandler::HandleGroupgoCommand(char* args) return false; } - for (GroupReference* itr = grp->GetFirstMember(); itr != nullptr; itr = itr->next()) + for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* pl = itr->getSource(); diff --git a/src/game/ChatCommands/Level2.cpp b/src/game/ChatCommands/Level2.cpp index e7582d7ec..8d6c46dda 100644 --- a/src/game/ChatCommands/Level2.cpp +++ b/src/game/ChatCommands/Level2.cpp @@ -2445,7 +2445,7 @@ bool ChatHandler::HandleItemMoveCommand(char* args) if (!pParam1) return false; - char* pParam2 = strtok(nullptr, " "); + char* pParam2 = strtok(NULL, " "); if (!pParam2) return false; @@ -3392,7 +3392,7 @@ bool ChatHandler::HandleWpShowCommand(char* args) } Creature* wpOwner; ///< Npc that is moving - TemporarySummonWaypoint* wpTarget = nullptr; // Define here for wp-info command + TemporarySummonWaypoint* wpTarget = NULL; // Define here for wp-info command // Show info for the selected waypoint (Step one: get moving npc) if (subCmd == "info") @@ -3429,7 +3429,7 @@ bool ChatHandler::HandleWpShowCommand(char* args) wpOwner = targetCreature; // Get the path - WaypointPath* wpPath = nullptr; + WaypointPath* wpPath = NULL; if (wpOrigin != PATH_NO_PATH) // Might have been provided by param wpPath = sWaypointMgr.GetPathFromOrigin(wpOwner->GetEntry(), wpOwner->GetGUIDLow(), wpPathId, wpOrigin); else @@ -5092,7 +5092,7 @@ bool ChatHandler::HandleMmapPathCommand(char* args) if (strcmp(para, "go") == 0) { followPath = true; - para = strtok(nullptr, " "); + para = strtok(NULL, " "); if (para && strcmp(para, "straight") == 0) useStraightPath = true; } diff --git a/src/game/ChatCommands/Level3.cpp b/src/game/ChatCommands/Level3.cpp index 25bdad6ac..598e0a893 100644 --- a/src/game/ChatCommands/Level3.cpp +++ b/src/game/ChatCommands/Level3.cpp @@ -2581,7 +2581,7 @@ bool ChatHandler::HandleLearnCommand(char* args) if (!spell || !sSpellStore.LookupEntry(spell)) return false; - bool allRanks = ExtractLiteralArg(&args, "all") != nullptr; + bool allRanks = ExtractLiteralArg(&args, "all") != NULL; if (!allRanks && *args) // can be fail also at syntax error return false; @@ -3978,7 +3978,7 @@ bool ChatHandler::HandleDieCommand(char* /*args*/) if (target->IsAlive()) { - player->DealDamage(target, target->GetHealth(), nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false); + player->DealDamage(target, target->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } return true; @@ -4014,7 +4014,7 @@ bool ChatHandler::HandleDamageCommand(char* args) // flat melee damage without resistance/etc reduction if (!*args) { - player->DealDamage(target, damage, nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false); + player->DealDamage(target, damage, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); if (target != player) player->SendAttackStateUpdate(HITINFO_NORMALSWING2, target, SPELL_SCHOOL_MASK_NORMAL, damage, 0, 0, VICTIMSTATE_NORMAL, 0); return true; @@ -4046,7 +4046,7 @@ bool ChatHandler::HandleDamageCommand(char* args) damage -= absorb + resist; player->DealDamageMods(target, damage, &absorb); - player->DealDamage(target, damage, nullptr, DIRECT_DAMAGE, schoolmask, nullptr, false); + player->DealDamage(target, damage, NULL, DIRECT_DAMAGE, schoolmask, NULL, false); player->SendAttackStateUpdate(HITINFO_NORMALSWING2, target, schoolmask, damage, absorb, resist, VICTIMSTATE_NORMAL, 0); return true; } @@ -6441,7 +6441,7 @@ bool ChatHandler::HandleCastCommand(char* args) return false; } - bool triggered = ExtractLiteralArg(&args, "triggered") != nullptr; + bool triggered = ExtractLiteralArg(&args, "triggered") != NULL; if (!triggered && *args) // can be fail also at syntax error return false; diff --git a/src/game/MotionGenerators/MotionMaster.cpp b/src/game/MotionGenerators/MotionMaster.cpp index 88e3e96fc..12cb60887 100644 --- a/src/game/MotionGenerators/MotionMaster.cpp +++ b/src/game/MotionGenerators/MotionMaster.cpp @@ -59,7 +59,7 @@ void MotionMaster::Initialize() if (m_owner->GetTypeId() == TYPEID_UNIT && !m_owner->hasUnitState(UNIT_STAT_CONTROLLED)) { MovementGenerator* movement = FactorySelector::selectMovementGenerator((Creature*)m_owner); - push(movement == nullptr ? &si_idleMovement : movement); + push(movement == NULL ? &si_idleMovement : movement); top()->Initialize(*m_owner); if (top()->GetMovementGeneratorType() == WAYPOINT_MOTION_TYPE) (static_cast*>(top()))->InitializeWaypointPath(*((Creature*)(m_owner)), 0, PATH_NO_PATH, 0, 0); diff --git a/src/game/MotionGenerators/MotionMaster.h b/src/game/MotionGenerators/MotionMaster.h index 5ad398752..b14d23ddc 100644 --- a/src/game/MotionGenerators/MotionMaster.h +++ b/src/game/MotionGenerators/MotionMaster.h @@ -121,7 +121,7 @@ class MotionMaster : private std::stack void MoveTaxiFlight(uint32 path, uint32 pathnode); void MoveDistract(uint32 timeLimit); void MoveJump(float x, float y, float z, float horizontalSpeed, float max_height, uint32 id = 0); - void MoveDestination(float x, float y, float z, float o, float horizontalSpeed, float max_height, Unit* target = nullptr); + void MoveDestination(float x, float y, float z, float o, float horizontalSpeed, float max_height, Unit* target = NULL); void MoveFall(); void MoveFlyOrLand(uint32 id, float x, float y, float z, bool liftOff); diff --git a/src/game/Object/Object.cpp b/src/game/Object/Object.cpp index 124bca80c..ad876b463 100644 --- a/src/game/Object/Object.cpp +++ b/src/game/Object/Object.cpp @@ -1451,7 +1451,7 @@ bool WorldObject::isInBack(WorldObject const* target, float distance, float arc) return IsWithinDist(target, distance) && !HasInArc(2 * M_PI_F - arc, target); } -void WorldObject::GetRandomPoint(float x, float y, float z, float distance, float& rand_x, float& rand_y, float& rand_z, float minDist /*=0.0f*/, float const* ori /*=nullptr*/) const +void WorldObject::GetRandomPoint(float x, float y, float z, float distance, float& rand_x, float& rand_y, float& rand_z, float minDist /*=0.0f*/, float const* ori /*=NULL*/) const { if (distance == 0) { @@ -1490,7 +1490,7 @@ void WorldObject::UpdateGroundPositionZ(float x, float y, float& z) const { z = new_z + 0.05f; } // just to be sure that we are not a few pixel under the surface } -void WorldObject::UpdateAllowedPositionZ(float x, float y, float& z, Map* atMap /*=nullptr*/) const +void WorldObject::UpdateAllowedPositionZ(float x, float y, float& z, Map* atMap /*=NULL*/) const { if (!atMap) atMap = GetMap(); @@ -1761,7 +1761,7 @@ Creature* WorldObject::SummonCreature(uint32 id, float x, float y, float z, floa if (!cinfo) { sLog.outErrorDb("WorldObject::SummonCreature: Creature (Entry: %u) not existed for summoner: %s. ", id, GetGuidStr().c_str()); - return nullptr; + return NULL; } TemporarySummon* pCreature = new TemporarySummon(GetObjectGuid()); @@ -1778,7 +1778,7 @@ Creature* WorldObject::SummonCreature(uint32 id, float x, float y, float z, floa if (!pCreature->Create(GetMap()->GenerateLocalLowGuid(cinfo->GetHighGuid()), pos, cinfo, team)) { delete pCreature; - return nullptr; + return NULL; } pCreature->SetRespawnCoord(pos); diff --git a/src/game/Object/Object.h b/src/game/Object/Object.h index dfe3292a9..8d5f04302 100644 --- a/src/game/Object/Object.h +++ b/src/game/Object/Object.h @@ -545,9 +545,9 @@ class WorldObject : public Object bool IsPositionValid() const; void UpdateGroundPositionZ(float x, float y, float& z) const; - void UpdateAllowedPositionZ(float x, float y, float& z, Map* atMap = nullptr) const; + void UpdateAllowedPositionZ(float x, float y, float& z, Map* atMap = NULL) const; - void GetRandomPoint(float x, float y, float z, float distance, float& rand_x, float& rand_y, float& rand_z, float minDist = 0.0f, float const* ori = nullptr) const; + void GetRandomPoint(float x, float y, float z, float distance, float& rand_x, float& rand_y, float& rand_z, float minDist = 0.0f, float const* ori = NULL) const; uint32 GetMapId() const { return m_mapId; } uint32 GetInstanceId() const { return m_InstanceId; } diff --git a/src/game/Object/ObjectMgr.cpp b/src/game/Object/ObjectMgr.cpp index dc8e36a71..85c46c08a 100644 --- a/src/game/Object/ObjectMgr.cpp +++ b/src/game/Object/ObjectMgr.cpp @@ -9544,7 +9544,7 @@ void ObjectMgr::LoadActiveEntities(Map* _map) { _map = sMapMgr.FindMap(continents[i]); if (!_map) - _map = sMapMgr.CreateMap(continents[i], nullptr); + _map = sMapMgr.CreateMap(continents[i], NULL); if (_map) LoadActiveEntities(_map); diff --git a/src/game/Object/ObjectMgr.h b/src/game/Object/ObjectMgr.h index ea4cc9e1a..06bea9419 100644 --- a/src/game/Object/ObjectMgr.h +++ b/src/game/Object/ObjectMgr.h @@ -832,7 +832,7 @@ class ObjectMgr void LoadTrainerTemplates(); void LoadTrainers() { LoadTrainers("npc_trainer", false); } - /// @param _map Map* of the map for which to load active entities. If nullptr active entities on continents are loaded + /// @param _map Map* of the map for which to load active entities. If NULL active entities on continents are loaded void LoadActiveEntities(Map* _map); void LoadVehicleAccessory(); diff --git a/src/game/Object/PetAI.cpp b/src/game/Object/PetAI.cpp index 9dd029f2d..ef64d0cf4 100644 --- a/src/game/Object/PetAI.cpp +++ b/src/game/Object/PetAI.cpp @@ -132,7 +132,7 @@ void PetAI::UpdateAI(const uint32 diff) return; Unit* owner = m_creature->GetCharmerOrOwner(); - Unit* victim = nullptr; + Unit* victim = NULL; if (!((Pet*)m_creature)->isControlled()) m_creature->SelectHostileTarget(); diff --git a/src/game/Object/Player.cpp b/src/game/Object/Player.cpp index b2cdd6fe5..116e2fe62 100644 --- a/src/game/Object/Player.cpp +++ b/src/game/Object/Player.cpp @@ -4140,14 +4140,14 @@ void Player::BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) c { for (int i = 0; i < EQUIPMENT_SLOT_END; ++i) { - if (m_items[i] == nullptr) + if (m_items[i] == NULL) continue; m_items[i]->BuildCreateUpdateBlockForPlayer(data, target); } for (int i = INVENTORY_SLOT_BAG_START; i < BANK_SLOT_BAG_END; ++i) { - if (m_items[i] == nullptr) + if (m_items[i] == NULL) continue; m_items[i]->BuildCreateUpdateBlockForPlayer(data, target); @@ -6321,7 +6321,7 @@ void Player::CheckAreaExploreAndOutdoor() if (!shapeShift || (shapeShift->Stances || shapeShift->StancesNot) && !IsNeedCastSpellAtFormApply(spellInfo, GetShapeshiftForm())) continue; - CastSpell(this, itr->first, true, nullptr); + CastSpell(this, itr->first, true, NULL); } } else if (sWorld.getConfig(CONFIG_BOOL_VMAP_INDOOR_CHECK) && !isGameMaster()) diff --git a/src/game/Object/SpellMgr.h b/src/game/Object/SpellMgr.h index e462969a6..2ff7edfdb 100644 --- a/src/game/Object/SpellMgr.h +++ b/src/game/Object/SpellMgr.h @@ -83,7 +83,7 @@ SpellSpecific GetSpellSpecific(uint32 spellId); // Different spell properties inline float GetSpellRadius(SpellRadiusEntry const* radius) { return (radius ? radius->Radius : 0); } -uint32 GetSpellCastTime(SpellEntry const* spellInfo, Spell const* spell = nullptr); +uint32 GetSpellCastTime(SpellEntry const* spellInfo, Spell const* spell = NULL); uint32 GetSpellCastTimeForBonus(SpellEntry const* spellProto, DamageEffectType damagetype); float CalculateDefaultCoefficient(SpellEntry const* spellProto, DamageEffectType const damagetype); inline float GetSpellMinRange(SpellRangeEntry const* range, bool friendly = false) diff --git a/src/game/Object/Unit.cpp b/src/game/Object/Unit.cpp index 1a139f7a9..c89450cb9 100644 --- a/src/game/Object/Unit.cpp +++ b/src/game/Object/Unit.cpp @@ -981,8 +981,8 @@ uint32 Unit::DealDamage(Unit* pVictim, uint32 damage, CleanDamage const* cleanDa { SpellEntry const* shareSpell = (*itr)->GetSpellProto(); uint32 shareDamage = uint32(damage*(*itr)->GetModifier()->m_amount / 100.0f); - DealDamageMods(shareTarget, shareDamage, nullptr); - DealDamage(shareTarget, shareDamage, nullptr, damagetype, GetSpellSchoolMask(shareSpell), shareSpell, false); + DealDamageMods(shareTarget, shareDamage, NULL); + DealDamage(shareTarget, shareDamage, NULL, damagetype, GetSpellSchoolMask(shareSpell), shareSpell, false); } } } @@ -12307,13 +12307,13 @@ Unit* Unit::TakePossessOf(SpellEntry const* spellEntry, SummonPropertiesEntry co if (!cinfo) { sLog.outErrorDb("WorldObject::SummonCreature: Creature (Entry: %u) not existed for summoner: %s. ", creatureEntry, GetGuidStr().c_str()); - return nullptr; + return NULL; } if (GetCharm()) { sLog.outError("Unit::TakePossessOf> There is already a charmed creature for %s its : %s. ", GetGuidStr().c_str(), GetCharm()->GetGuidStr().c_str()); - return nullptr; + return NULL; } TemporarySummon* pCreature = new TemporarySummon(GetObjectGuid()); @@ -12326,10 +12326,10 @@ Unit* Unit::TakePossessOf(SpellEntry const* spellEntry, SummonPropertiesEntry co if (!pCreature->Create(GetMap()->GenerateLocalLowGuid(cinfo->GetHighGuid()), pos, cinfo)) { delete pCreature; - return nullptr; + return NULL; } - Player* player = GetTypeId() == TYPEID_PLAYER ? static_cast(this): nullptr; + Player* player = GetTypeId() == TYPEID_PLAYER ? static_cast(this): NULL; pCreature->setFaction(getFaction()); // set same faction than player pCreature->SetRespawnCoord(pos); // set spawn coord @@ -12383,7 +12383,7 @@ Unit* Unit::TakePossessOf(SpellEntry const* spellEntry, SummonPropertiesEntry co bool Unit::TakePossessOf(Unit* possessed) { - Player* player = nullptr; + Player* player = NULL; if (GetTypeId() == TYPEID_PLAYER) player = static_cast(this); @@ -12394,7 +12394,7 @@ bool Unit::TakePossessOf(Unit* possessed) SetCharm(possessed); - Creature* possessedCreature = nullptr; + Creature* possessedCreature = NULL; if (possessed->GetTypeId() == TYPEID_UNIT) possessedCreature = static_cast(possessed); @@ -12438,7 +12438,7 @@ bool Unit::TakePossessOf(Unit* possessed) void Unit::ResetControlState(bool attackCharmer /*= true*/) { - Player* player = nullptr; + Player* player = NULL; if (GetTypeId() == TYPEID_PLAYER) player = static_cast(this); diff --git a/src/game/Object/UnitEvents.h b/src/game/Object/UnitEvents.h index 1d24bad77..25b24e77d 100644 --- a/src/game/Object/UnitEvents.h +++ b/src/game/Object/UnitEvents.h @@ -94,7 +94,7 @@ class ThreatRefStatusChangeEvent : public UnitBaseEvent ThreatManager* iThreatManager; public: ThreatRefStatusChangeEvent(uint32 pType) : UnitBaseEvent(pType), iThreatManager(NULL) - { iHostileReference = nullptr; } + { iHostileReference = NULL; } ThreatRefStatusChangeEvent(uint32 pType, HostileReference* pHostileReference) : UnitBaseEvent(pType), iThreatManager(NULL) { iHostileReference = pHostileReference; } diff --git a/src/game/OutdoorPvP/OutdoorPvPEP.cpp b/src/game/OutdoorPvP/OutdoorPvPEP.cpp index 466c5ae0b..28c129753 100644 --- a/src/game/OutdoorPvP/OutdoorPvPEP.cpp +++ b/src/game/OutdoorPvP/OutdoorPvPEP.cpp @@ -179,7 +179,7 @@ void OutdoorPvPEP::HandleObjectiveComplete(uint32 eventId, const std::listGetTeam() == team) { (*itr)->KilledMonsterCredit(credit); - (*itr)->RewardHonor(nullptr, 1, HONOR_REWARD_PLAGUELANDS); + (*itr)->RewardHonor(NULL, 1, HONOR_REWARD_PLAGUELANDS); } } } diff --git a/src/game/Server/DBCStores.cpp b/src/game/Server/DBCStores.cpp index 3af678165..054287fef 100644 --- a/src/game/Server/DBCStores.cpp +++ b/src/game/Server/DBCStores.cpp @@ -1034,7 +1034,7 @@ ChatChannelsEntry const* GetChannelEntryFor(uint32 channel_id) if (ch && ch->ChannelID == channel_id) return ch; } - return nullptr; + return NULL; } bool IsTotemCategoryCompatiableWith(uint32 itemTotemCategoryId, uint32 requiredTotemCategoryId) diff --git a/src/game/Server/WorldSession.cpp b/src/game/Server/WorldSession.cpp index 888b503a9..f23859831 100644 --- a/src/game/Server/WorldSession.cpp +++ b/src/game/Server/WorldSession.cpp @@ -877,7 +877,7 @@ void WorldSession::SetAccountData(AccountDataType type, time_t time_, const std: } else { - // _player can be nullptr and packet received after logout but m_GUID still store correct guid + // _player can be NULL and packet received after logout but m_GUID still store correct guid if (!m_GUIDLow) return; diff --git a/src/game/WorldHandlers/ChannelMgr.cpp b/src/game/WorldHandlers/ChannelMgr.cpp index ed69a4738..a25e510e6 100644 --- a/src/game/WorldHandlers/ChannelMgr.cpp +++ b/src/game/WorldHandlers/ChannelMgr.cpp @@ -83,7 +83,7 @@ Channel* ChannelMgr::GetChannel(const std::string& name, Player* p, bool pkt) p->GetSession()->SendPacket(&data); } - return nullptr; + return NULL; } else return i->second; diff --git a/src/game/WorldHandlers/Chat.cpp b/src/game/WorldHandlers/Chat.cpp index 79ac14db3..266cf796c 100644 --- a/src/game/WorldHandlers/Chat.cpp +++ b/src/game/WorldHandlers/Chat.cpp @@ -311,7 +311,7 @@ ChatCommand* ChatHandler::getCommandTable() { "setphase", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectPhaseCommand, "", NULL }, { "target", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectTargetCommand, "", NULL }, { "turn", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectTurnCommand, "", NULL }, - { nullptr, 0, false, NULL, "", NULL } + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand guildCommandTable[] = diff --git a/src/game/WorldHandlers/CreatureLinkingMgr.cpp b/src/game/WorldHandlers/CreatureLinkingMgr.cpp index 8558eb827..c46a83cb5 100644 --- a/src/game/WorldHandlers/CreatureLinkingMgr.cpp +++ b/src/game/WorldHandlers/CreatureLinkingMgr.cpp @@ -335,7 +335,7 @@ CreatureLinkingInfo const* CreatureLinkingMgr::GetLinkedTriggerInformation(uint3 return &(iter->second); } - return nullptr; + return NULL; } // Function to add slave-NPCs to the holder @@ -453,7 +453,7 @@ void CreatureLinkingHolder::DoCreatureLinkingEvent(CreatureLinkingEvent eventTyp { if (pInfo->linkingFlag & reverseEventFlagFilter) { - Creature* pMaster = nullptr; + Creature* pMaster = NULL; if (pInfo->mapId != INVALID_MAP_ID) // entry case { BossGuidMapBounds finds = m_masterGuid.equal_range(pInfo->masterId); @@ -635,7 +635,7 @@ bool CreatureLinkingHolder::IsSlaveInRangeOfBoss(Creature const* pBoss, float sX bool CreatureLinkingHolder::IsRespawnReady(uint32 dbLowGuid, Map* _map) const { time_t respawnTime = _map->GetPersistentState()->GetCreatureRespawnTime(dbLowGuid); - return (!respawnTime || respawnTime <= time(NULL)) && CanSpawn(dbLowGuid, _map, nullptr, 0.0f, 0.0f); + return (!respawnTime || respawnTime <= time(NULL)) && CanSpawn(dbLowGuid, _map, NULL, 0.0f, 0.0f); } // Function to check if a passive spawning condition is met @@ -717,7 +717,7 @@ bool CreatureLinkingHolder::TryFollowMaster(Creature* pCreature) if (!pInfo || !(pInfo->linkingFlag & FLAG_FOLLOW)) return false; - Creature* pMaster = nullptr; + Creature* pMaster = NULL; if (pInfo->mapId != INVALID_MAP_ID) // entry case { BossGuidMapBounds finds = m_masterGuid.equal_range(pInfo->masterId); diff --git a/src/game/WorldHandlers/GridMap.h b/src/game/WorldHandlers/GridMap.h index 7c29d2cc6..8608da1e1 100644 --- a/src/game/WorldHandlers/GridMap.h +++ b/src/game/WorldHandlers/GridMap.h @@ -236,7 +236,7 @@ class TerrainInfo : public Referencable float GetWaterLevel(float x, float y, float z, float* pGround = NULL) const; float GetWaterOrGroundLevel(float x, float y, float z, float* pGround = NULL, bool swim = false) const; bool IsInWater(float x, float y, float z, GridMapLiquidData* data = 0) const; - bool IsSwimmable(float x, float y, float pZ, float radius = 1.5f, GridMapLiquidData* data = nullptr) const; + bool IsSwimmable(float x, float y, float pZ, float radius = 1.5f, GridMapLiquidData* data = NULL) const; bool IsUnderWater(float x, float y, float z) const; GridMapLiquidStatus getLiquidStatus(float x, float y, float z, uint8 ReqLiquidType, GridMapLiquidData* data = 0) const; diff --git a/src/game/WorldHandlers/Map.cpp b/src/game/WorldHandlers/Map.cpp index 75f99a5e9..31805255f 100644 --- a/src/game/WorldHandlers/Map.cpp +++ b/src/game/WorldHandlers/Map.cpp @@ -65,7 +65,7 @@ Map::~Map() m_persistentState->SetUsedByMapState(NULL); // field pointer can be deleted after this delete i_data; - i_data = nullptr; + i_data = NULL; // unload instance specific navigation data MMAP::MMapFactory::createOrGetMMapManager()->unloadMapInstance(m_TerrainData->GetMapId(), GetInstanceId()); @@ -2127,7 +2127,7 @@ bool Map::GetHeightInRange(uint32 phasemask, float x, float y, float& z, float m VMAP::IVMapManager* vmgr = VMAP::VMapFactory::createOrGetVMapManager(); if (!vmgr->isLineOfSightCalcEnabled()) - vmgr = nullptr; + vmgr = NULL; if (vmgr) { diff --git a/src/game/WorldHandlers/MapManager.cpp b/src/game/WorldHandlers/MapManager.cpp index 53d4eb17f..e43cba8fc 100644 --- a/src/game/WorldHandlers/MapManager.cpp +++ b/src/game/WorldHandlers/MapManager.cpp @@ -97,11 +97,11 @@ Map* MapManager::CreateMap(uint32 id, const WorldObject* obj) { Guard _guard(*this); - Map* m = nullptr; + Map* m = NULL; const MapEntry* entry = sMapStore.LookupEntry(id); if (!entry) - return nullptr; + return NULL; if (entry->Instanceable()) { @@ -115,7 +115,7 @@ Map* MapManager::CreateMap(uint32 id, const WorldObject* obj) { // create regular non-instanceable map m = FindMap(id); - if (m == nullptr) + if (m == NULL) { m = new WorldMap(id, i_gridCleanUpDelay); // add map into container diff --git a/src/game/WorldHandlers/MoveMap.cpp b/src/game/WorldHandlers/MoveMap.cpp index 22e60f6ca..a2fe20638 100644 --- a/src/game/WorldHandlers/MoveMap.cpp +++ b/src/game/WorldHandlers/MoveMap.cpp @@ -66,7 +66,7 @@ namespace MMAP delete[] mapList; } - bool MMapFactory::IsPathfindingEnabled(uint32 mapId, const Unit* unit = nullptr) + bool MMapFactory::IsPathfindingEnabled(uint32 mapId, const Unit* unit = NULL) { if (!sWorld.getConfig(CONFIG_BOOL_MMAP_ENABLED)) return false; diff --git a/src/game/WorldHandlers/PetHandler.cpp b/src/game/WorldHandlers/PetHandler.cpp index 734465346..627bf2643 100644 --- a/src/game/WorldHandlers/PetHandler.cpp +++ b/src/game/WorldHandlers/PetHandler.cpp @@ -121,7 +121,7 @@ void WorldSession::HandlePetAction(WorldPacket& recv_data) ((Pet*)pet)->SetIsRetreating(); ((Pet*)pet)->SetSpellOpener(); - Unit* targetUnit = targetGuid ? _player->GetMap()->GetUnit(targetGuid) : nullptr; + Unit* targetUnit = targetGuid ? _player->GetMap()->GetUnit(targetGuid) : NULL; if (targetUnit && targetUnit != pet && targetUnit->IsTargetableForAttack() && targetUnit->isInAccessablePlaceFor((Creature*)pet)) { @@ -201,7 +201,7 @@ void WorldSession::HandlePetAction(WorldPacket& recv_data) ((Pet*)pet)->SetIsRetreating(); ((Pet*)pet)->SetSpellOpener(); - Unit* unit_target = targetGuid ? _player->GetMap()->GetUnit(targetGuid) : nullptr; + Unit* unit_target = targetGuid ? _player->GetMap()->GetUnit(targetGuid) : NULL; // do not cast unknown spells SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellid); diff --git a/src/game/WorldHandlers/ScriptMgr.cpp b/src/game/WorldHandlers/ScriptMgr.cpp index 14c6e953a..abb0f92ef 100644 --- a/src/game/WorldHandlers/ScriptMgr.cpp +++ b/src/game/WorldHandlers/ScriptMgr.cpp @@ -1077,7 +1077,7 @@ bool ScriptAction::GetScriptProcessTargets(WorldObject* pOrigSource, WorldObject if (m_script->IsCreatureBuddy()) { - Creature* pCreatureBuddy = nullptr; + Creature* pCreatureBuddy = NULL; if (m_script->data_flags & SCRIPT_FLAG_BUDDY_IS_DESPAWNED) { @@ -1585,7 +1585,7 @@ bool ScriptAction::HandleScriptStep() } // bitmask: 0/1=target-player, 0/2=with distance dependent, 0/4=map wide, 0/8=zone wide - Player* pSoundTarget = nullptr; + Player* pSoundTarget = NULL; if (m_script->playSound.flags & 1) { pSoundTarget = GetPlayerTargetOrSourceAndLog(pSource, pTarget); @@ -1944,7 +1944,7 @@ bool ScriptAction::HandleScriptStep() ((Creature*)pSource)->AI()->SendAIEventAround(AIEventType(m_script->sendAIEvent.eventType), (Unit*)pTarget, 0, float(m_script->sendAIEvent.radius)); // else if no radius and target is creature send AI event to target else if (pTarget->GetTypeId() == TYPEID_UNIT) - ((Creature*)pSource)->AI()->SendAIEvent(AIEventType(m_script->sendAIEvent.eventType), nullptr, (Creature*)pTarget); + ((Creature*)pSource)->AI()->SendAIEvent(AIEventType(m_script->sendAIEvent.eventType), NULL, (Creature*)pTarget); break; } case SCRIPT_COMMAND_TURN_TO: // 36 @@ -2001,7 +2001,7 @@ bool ScriptAction::HandleScriptStep() orientation = m_script->o; pSource->GetRandomPoint(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), m_script->moveDynamic.maxDist, x, y, z, - m_script->moveDynamic.minDist, (orientation == 0.0f ? nullptr : &orientation)); + m_script->moveDynamic.minDist, (orientation == 0.0f ? NULL : &orientation)); z = std::max(z, pTarget->GetPositionZ()); pSource->UpdateAllowedPositionZ(x, y, z); } diff --git a/src/game/WorldHandlers/Spell.cpp b/src/game/WorldHandlers/Spell.cpp index 8c35a01cf..4a28c864f 100644 --- a/src/game/WorldHandlers/Spell.cpp +++ b/src/game/WorldHandlers/Spell.cpp @@ -2349,7 +2349,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& if (target && target != m_caster) { // Can only be casted on group's members or its pets - Group* pGroup = nullptr; + Group* pGroup = NULL; Unit* owner = m_caster->GetCharmerOrOwner(); Unit* targetOwner = target->GetCharmerOrOwner(); @@ -2527,7 +2527,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& case TARGET_AREAEFFECT_PARTY: { Unit* owner = m_caster->GetCharmerOrOwner(); - Player* pTarget = nullptr; + Player* pTarget = NULL; if (owner) { @@ -2553,13 +2553,13 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& } } - Group* pGroup = pTarget ? pTarget->GetGroup() : nullptr; + Group* pGroup = pTarget ? pTarget->GetGroup() : NULL; if (pGroup) { uint8 subgroup = pTarget->GetSubGroup(); - for (GroupReference* itr = pGroup->GetFirstMember(); itr != nullptr; itr = itr->next()) + for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* Target = itr->getSource(); @@ -2675,12 +2675,12 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& case TARGET_AREAEFFECT_PARTY_AND_CLASS: { Player* targetPlayer = m_targets.getUnitTarget() && m_targets.getUnitTarget()->GetTypeId() == TYPEID_PLAYER - ? (Player*)m_targets.getUnitTarget() : nullptr; + ? (Player*)m_targets.getUnitTarget() : NULL; - Group* pGroup = targetPlayer ? targetPlayer->GetGroup() : nullptr; + Group* pGroup = targetPlayer ? targetPlayer->GetGroup() : NULL; if (pGroup) { - for (GroupReference* itr = pGroup->GetFirstMember(); itr != nullptr; itr = itr->next()) + for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* Target = itr->getSource(); @@ -2717,7 +2717,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& case TARGET_RIGHT_FROM_VICTIM: case TARGET_LEFT_FROM_VICTIM: { - Unit* pTarget = nullptr; + Unit* pTarget = NULL; // explicit cast data from client or server-side cast // some spell at client send caster @@ -3085,7 +3085,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& } } -SpellCastResult Spell::PreCastCheck(Aura* triggeredByAura /*= nullptr*/) +SpellCastResult Spell::PreCastCheck(Aura* triggeredByAura /*= NULL*/) { // Prevent casting at cast another spell (ServerSide check) if (m_caster->IsNonMeleeSpellCasted(false, true, true) && m_cast_count && !m_spellInfo->HasAttribute(SPELL_ATTR_EX4_CAN_CAST_WHILE_CASTING)) @@ -3716,7 +3716,7 @@ void Spell::_handle_immediate_phase() if (spellEffect->Effect == SPELL_EFFECT_PERSISTENT_AREA_AURA || //summon a gameobject at the spell's destination xyz (spellEffect->Effect == SPELL_EFFECT_TRANS_DOOR && spellEffect->EffectImplicitTargetA == TARGET_AREAEFFECT_GO_AROUND_DEST)) - HandleEffects(nullptr, nullptr, nullptr, SpellEffectIndex(j)); + HandleEffects(NULL, NULL, NULL, SpellEffectIndex(j)); } } @@ -3853,7 +3853,7 @@ void Spell::update(uint32 difftime) continue; Unit* unit = m_caster->GetObjectGuid() == target.targetGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, target.targetGUID); - if (unit == nullptr) + if (unit == NULL) continue; p->RewardPlayerAndGroupAtCast(unit, m_spellInfo->Id); @@ -6141,7 +6141,7 @@ SpellCastResult Spell::CheckCast(bool strict) { if (strict) // Summoning Disorientation, trigger pet stun (cast by pet so it doesn't attack player) if (Pet* pet = ((Player*)m_caster)->GetPet()) - pet->CastSpell(pet, 32752, true, nullptr, nullptr, pet->GetObjectGuid()); + pet->CastSpell(pet, 32752, true, NULL, NULL, pet->GetObjectGuid()); } else return SPELL_FAILED_ALREADY_HAVE_SUMMON; @@ -6507,7 +6507,7 @@ SpellCastResult Spell::CheckPetCast(Unit* target) Unit* charmer = m_caster->GetCharmerOrOwner(); if (charmer) { - Player* pCharmer = charmer->GetTypeId() == TYPEID_PLAYER ? static_cast(charmer) : nullptr; + Player* pCharmer = charmer->GetTypeId() == TYPEID_PLAYER ? static_cast(charmer) : NULL; if (!charmer->IsAlive() && (!pCharmer || !pCharmer->IsGhouled())) return SPELL_FAILED_CASTER_DEAD; } diff --git a/src/game/WorldHandlers/Spell.h b/src/game/WorldHandlers/Spell.h index 60287a5dd..a59b5ca8e 100644 --- a/src/game/WorldHandlers/Spell.h +++ b/src/game/WorldHandlers/Spell.h @@ -390,7 +390,7 @@ class Spell Spell(Unit* caster, SpellEntry const* info, bool triggered, ObjectGuid originalCasterGUID = ObjectGuid(), SpellEntry const* triggeredBy = NULL); ~Spell(); - void SpellStart(SpellCastTargets const* targets, Aura* triggeredByAura = nullptr); + void SpellStart(SpellCastTargets const* targets, Aura* triggeredByAura = NULL); void cancel(); @@ -537,7 +537,7 @@ class Spell bool IgnoreItemRequirements() const; // some item use spells have unexpected reagent data void UpdateOriginalCasterPointer(); - SpellCastResult PreCastCheck(Aura* triggeredByAura = nullptr); + SpellCastResult PreCastCheck(Aura* triggeredByAura = NULL); void Prepare(); Unit* m_caster; diff --git a/src/game/WorldHandlers/SpellAuras.cpp b/src/game/WorldHandlers/SpellAuras.cpp index 0ffe8dd76..7c94e5dfd 100644 --- a/src/game/WorldHandlers/SpellAuras.cpp +++ b/src/game/WorldHandlers/SpellAuras.cpp @@ -818,7 +818,7 @@ void AreaAura::Update(uint32 diff) holder->SetAuraDuration(GetAuraDuration()); - AreaAura* aur = new AreaAura(actualSpellInfo, m_effIndex, &actualBasePoints, holder, (*tIter), caster, nullptr, GetSpellProto()->Id); + AreaAura* aur = new AreaAura(actualSpellInfo, m_effIndex, &actualBasePoints, holder, (*tIter), caster, NULL, GetSpellProto()->Id); holder->AddAura(aur, m_effIndex); if (addedToExisting) @@ -863,7 +863,7 @@ void AreaAura::Update(uint32 diff) { Player* check = caster->GetCharmerOrOwnerPlayerOrPlayerItself(); - Group* pGroup = check ? check->GetGroup() : nullptr; + Group* pGroup = check ? check->GetGroup() : NULL; if (pGroup) { Player* checkTarget = target->GetCharmerOrOwnerPlayerOrPlayerItself(); @@ -881,7 +881,7 @@ void AreaAura::Update(uint32 diff) { Player* check = caster->GetCharmerOrOwnerPlayerOrPlayerItself(); - Group* pGroup = check ? check->GetGroup() : nullptr; + Group* pGroup = check ? check->GetGroup() : NULL; if (pGroup) { Player* checkTarget = target->GetCharmerOrOwnerPlayerOrPlayerItself(); @@ -1199,7 +1199,7 @@ void Aura::TriggerSpell() case 19695: // Inferno { int32 damageForTick[8] = { 500, 500, 1000, 1000, 2000, 2000, 3000, 5000 }; - triggerTarget->CastCustomSpell(triggerTarget, 19698, &damageForTick[GetAuraTicks() - 1], nullptr, nullptr, true, nullptr); + triggerTarget->CastCustomSpell(triggerTarget, 19698, &damageForTick[GetAuraTicks() - 1], NULL, NULL, true, NULL); return;; } @@ -2294,7 +2294,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) case 13139: // net-o-matic // root to self part of (root_target->charge->root_self sequence if (Unit* caster = GetCaster()) - caster->CastSpell(caster, 13138, true, nullptr, this); + caster->CastSpell(caster, 13138, true, NULL, this); return; case 28832: // Mark of Korth'azz case 28833: // Mark of Blaumeux @@ -2317,7 +2317,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) } if (Unit* caster = GetCaster()) - caster->CastCustomSpell(target, 28836, &damage, nullptr, nullptr, true, nullptr, this); + caster->CastCustomSpell(target, 28836, &damage, NULL, NULL, true, NULL, this); return; } case 31606: // Stormcrow Amulet @@ -2347,7 +2347,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) } case 36587: // Vision Guide { - target->CastSpell(target, 36573, true, nullptr, this); + target->CastSpell(target, 36573, true, NULL, this); return; } // Gender spells @@ -2364,12 +2364,12 @@ void Aura::HandleAuraDummy(bool apply, bool Real) case 46354: spellId = (gender == GENDER_MALE ? 46355 : 46356); break; default: return; } - target->CastSpell(target, spellId, true, nullptr, this); + target->CastSpell(target, spellId, true, NULL, this); return; } case 39850: // Rocket Blast if (roll_chance_i(20)) // backfire stun - target->CastSpell(target, 51581, true, nullptr, this); + target->CastSpell(target, 51581, true, NULL, this); return; case 43873: // Headless Horseman Laugh target->PlayDistanceSound(11965); @@ -2383,7 +2383,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) return; } case 46637: // Break Ice - target->CastSpell(target, 46638, true, nullptr, this); + target->CastSpell(target, 46638, true, NULL, this); return; case 46699: // Requires No Ammo if (target->GetTypeId() == TYPEID_PLAYER) @@ -2391,21 +2391,21 @@ void Aura::HandleAuraDummy(bool apply, bool Real) ((Player*)target)->RemoveAmmo(); return; case 47190: // Toalu'u's Spiritual Incense - target->CastSpell(target, 47189, true, nullptr, this); + target->CastSpell(target, 47189, true, NULL, this); // allow script to process further (text) break; case 47563: // Freezing Cloud - target->CastSpell(target, 47574, true, nullptr, this); + target->CastSpell(target, 47574, true, NULL, this); return; case 47593: // Freezing Cloud - target->CastSpell(target, 47594, true, nullptr, this); + target->CastSpell(target, 47594, true, NULL, this); return; case 48025: // Headless Horseman's Mount Spell::SelectMountByAreaAndSkill(target, GetSpellProto(), 51621, 48024, 51617, 48023, 0); return; case 48143: // Forgotten Aura // See Death's Door - target->CastSpell(target, 48814, true, nullptr, this); + target->CastSpell(target, 48814, true, NULL, this); return; case 51405: // Digging for Treasure target->HandleEmote(EMOTE_STATE_WORK); @@ -2426,12 +2426,12 @@ void Aura::HandleAuraDummy(bool apply, bool Real) case 61187: // Twilight Shift (single target) case 61190: // Twilight Shift (many targets) target->RemoveAurasDueToSpell(57620); - target->CastSpell(target, 61885, true, nullptr, this); + target->CastSpell(target, 61885, true, NULL, this); return; case 62061: // Festive Holiday Mount if (target->HasAuraType(SPELL_AURA_MOUNTED)) // Reindeer Transformation - target->CastSpell(target, 25860, true, nullptr, this); + target->CastSpell(target, 25860, true, NULL, this); return; case 62109: // Tails Up: Aura target->setFaction(1990); // Ambient (hostile) @@ -2452,7 +2452,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) return; case 64132: // Constrictor Tentacle if (target->GetTypeId() == TYPEID_PLAYER) - target->CastSpell(target, 64133, true, nullptr, this); + target->CastSpell(target, 64133, true, NULL, this); return; case 65684: // Dark Essence target->RemoveAurasDueToSpell(65686); @@ -2471,17 +2471,17 @@ void Aura::HandleAuraDummy(bool apply, bool Real) return; case 70623: // Jaina's Call if (target->GetTypeId() == TYPEID_PLAYER) - target->CastSpell(target, 70525, true, nullptr, this); + target->CastSpell(target, 70525, true, NULL, this); return; case 70638: // Call of Sylvanas if (target->GetTypeId() == TYPEID_PLAYER) - target->CastSpell(target, 70639, true, nullptr, this); + target->CastSpell(target, 70639, true, NULL, this); return; case 71342: // Big Love Rocket Spell::SelectMountByAreaAndSkill(target, GetSpellProto(), 71344, 71345, 71346, 71347, 0); return; case 71563: // Deadly Precision - target->CastSpell(target, 71564, true, nullptr, this); + target->CastSpell(target, 71564, true, NULL, this); return; case 72286: // Invincible Spell::SelectMountByAreaAndSkill(target, GetSpellProto(), 72281, 72282, 72283, 72284, 0); @@ -2508,10 +2508,10 @@ void Aura::HandleAuraDummy(bool apply, bool Real) return; // Stance Cooldown - target->CastSpell(target, 41102, true, nullptr, this); + target->CastSpell(target, 41102, true, NULL, this); // Battle Aura - target->CastSpell(target, 41106, true, nullptr, this); + target->CastSpell(target, 41106, true, NULL, this); // equipment ((Creature*)target)->SetVirtualItem(VIRTUAL_ITEM_SLOT_0, 32614); @@ -2525,10 +2525,10 @@ void Aura::HandleAuraDummy(bool apply, bool Real) return; // Stance Cooldown - target->CastSpell(target, 41102, true, nullptr, this); + target->CastSpell(target, 41102, true, NULL, this); // Berserker Aura - target->CastSpell(target, 41107, true, nullptr, this); + target->CastSpell(target, 41107, true, NULL, this); // equipment ((Creature*)target)->SetVirtualItem(VIRTUAL_ITEM_SLOT_0, 32614); @@ -2542,10 +2542,10 @@ void Aura::HandleAuraDummy(bool apply, bool Real) return; // Stance Cooldown - target->CastSpell(target, 41102, true, nullptr, this); + target->CastSpell(target, 41102, true, NULL, this); // Defensive Aura - target->CastSpell(target, 41105, true, nullptr, this); + target->CastSpell(target, 41105, true, NULL, this); // equipment ((Creature*)target)->SetVirtualItem(VIRTUAL_ITEM_SLOT_0, 32604); @@ -2559,10 +2559,10 @@ void Aura::HandleAuraDummy(bool apply, bool Real) return; // Stance Cooldown - target->CastSpell(target, 59526, true, nullptr, this); + target->CastSpell(target, 59526, true, NULL, this); // Defensive Aura - target->CastSpell(target, 41105, true, nullptr, this); + target->CastSpell(target, 41105, true, NULL, this); // equipment ((Creature*)target)->SetVirtualItem(VIRTUAL_ITEM_SLOT_0, 43625); @@ -2576,10 +2576,10 @@ void Aura::HandleAuraDummy(bool apply, bool Real) return; // Stance Cooldown - target->CastSpell(target, 59526, true, nullptr, this); + target->CastSpell(target, 59526, true, NULL, this); // Berserker Aura - target->CastSpell(target, 41107, true, nullptr, this); + target->CastSpell(target, 41107, true, NULL, this); // equipment ((Creature*)target)->SetVirtualItem(VIRTUAL_ITEM_SLOT_0, 43625); @@ -2593,10 +2593,10 @@ void Aura::HandleAuraDummy(bool apply, bool Real) return; // Stance Cooldown - target->CastSpell(target, 59526, true, nullptr, this); + target->CastSpell(target, 59526, true, NULL, this); // Battle Aura - target->CastSpell(target, 41106, true, nullptr, this); + target->CastSpell(target, 41106, true, NULL, this); // equipment ((Creature*)target)->SetVirtualItem(VIRTUAL_ITEM_SLOT_0, 43623); @@ -2626,10 +2626,10 @@ void Aura::HandleAuraDummy(bool apply, bool Real) switch ((*itr)->GetSpellProto()->Id) { case 46859: // Unrelenting Assault, rank 1 - target->CastSpell(target, 64849, true, nullptr, (*itr)); + target->CastSpell(target, 64849, true, NULL, (*itr)); break; case 46860: // Unrelenting Assault, rank 2 - target->CastSpell(target, 64850, true, nullptr, (*itr)); + target->CastSpell(target, 64850, true, NULL, (*itr)); break; default: break; @@ -2648,7 +2648,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) switch (GetId()) { case 34026: // Kill Command - target->CastSpell(target, 34027, true, nullptr, this); + target->CastSpell(target, 34027, true, NULL, this); return; } break; @@ -2658,7 +2658,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) switch (GetId()) { case 55198: // Tidal Force - target->CastSpell(target, 55166, true, nullptr, this); + target->CastSpell(target, 55166, true, NULL, this); return; } @@ -2713,7 +2713,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) } if (finalSpellId) - caster->CastSpell(target, finalSpellId, true, nullptr, this); + caster->CastSpell(target, finalSpellId, true, NULL, this); return; } @@ -2733,7 +2733,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) return; } case 12479: // Hex of Jammal'an - target->CastSpell(target, 12480, true, nullptr, this); + target->CastSpell(target, 12480, true, NULL, this); return; case 12774: // (DND) Belnistrasz Idol Shutdown Visual { @@ -2749,36 +2749,36 @@ void Aura::HandleAuraDummy(bool apply, bool Real) case 28169: // Mutating Injection { // Mutagen Explosion - target->CastSpell(target, 28206, true, nullptr, this); + target->CastSpell(target, 28206, true, NULL, this); // Poison Cloud - target->CastSpell(target, 28240, true, nullptr, this); + target->CastSpell(target, 28240, true, NULL, this); return; } case 32045: // Soul Charge { if (m_removeMode == AURA_REMOVE_BY_EXPIRE) - target->CastSpell(target, 32054, true, nullptr, this); + target->CastSpell(target, 32054, true, NULL, this); return; } case 32051: // Soul Charge { if (m_removeMode == AURA_REMOVE_BY_EXPIRE) - target->CastSpell(target, 32057, true, nullptr, this); + target->CastSpell(target, 32057, true, NULL, this); return; } case 32052: // Soul Charge { if (m_removeMode == AURA_REMOVE_BY_EXPIRE) - target->CastSpell(target, 32053, true, nullptr, this); + target->CastSpell(target, 32053, true, NULL, this); return; } case 32286: // Focus Target Visual { if (m_removeMode == AURA_REMOVE_BY_EXPIRE) - target->CastSpell(target, 32301, true, nullptr, this); + target->CastSpell(target, 32301, true, NULL, this); return; } @@ -2791,7 +2791,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) } case 36730: // Flame Strike { - target->CastSpell(target, 36731, true, nullptr, this); + target->CastSpell(target, 36731, true, NULL, this); return; } case 41099: // Battle Stance @@ -2863,7 +2863,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) { uint32 spellId = target->GetMap()->IsRegularDifficulty() ? 44190 : 46163; - target->CastSpell(target, spellId, true, nullptr, this); + target->CastSpell(target, spellId, true, NULL, this); } return; } @@ -2871,7 +2871,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) { // Kill target if dispelled if (m_removeMode == AURA_REMOVE_BY_DISPEL) - target->DealDamage(target, target->GetHealth(), nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false); + target->DealDamage(target, target->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); return; } case 45963: // Call Alliance Deserter @@ -2883,12 +2883,12 @@ void Aura::HandleAuraDummy(bool apply, bool Real) case 46308: // Burning Winds { // casted only at creatures at spawn - target->CastSpell(target, 47287, true, nullptr, this); + target->CastSpell(target, 47287, true, NULL, this); return; } case 46637: // Break Ice { - target->CastSpell(target, 47030, true, nullptr, this); + target->CastSpell(target, 47030, true, NULL, this); return; } case 48385: // Create Spirit Fount Beam @@ -2900,7 +2900,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) { // Blood Oath if (m_removeMode == AURA_REMOVE_BY_EXPIRE) - target->CastSpell(target, 50001, true, nullptr, this); + target->CastSpell(target, 50001, true, NULL, this); return; } @@ -2928,7 +2928,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) if (Unit* pCaster = GetCaster()) { if (m_removeMode == AURA_REMOVE_BY_EXPIRE) - pCaster->CastSpell(target, 51872, true, nullptr, this); + pCaster->CastSpell(target, 51872, true, NULL, this); } return; @@ -2936,7 +2936,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) case 52098: // Charge Up { if (m_removeMode == AURA_REMOVE_BY_EXPIRE) - target->CastSpell(target, 52092, true, nullptr, this); + target->CastSpell(target, 52092, true, NULL, this); return; } @@ -2994,9 +2994,9 @@ void Aura::HandleAuraDummy(bool apply, bool Real) case 68839: // Corrupt Soul { // Knockdown Stun - target->CastSpell(target, 68848, true, nullptr, this); + target->CastSpell(target, 68848, true, NULL, this); // Draw Corrupted Soul - target->CastSpell(target, 68846, true, nullptr, this); + target->CastSpell(target, 68846, true, NULL, this); return; } } @@ -3005,7 +3005,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) if (classOptions && classOptions->SpellFamilyName == SPELLFAMILY_MAGE && (classOptions->SpellFamilyFlags & UI64LIT(0x2000000000000))) { if (m_removeMode == AURA_REMOVE_BY_EXPIRE || m_removeMode == AURA_REMOVE_BY_DISPEL) - target->CastSpell(target, m_modifier.m_amount, true, nullptr, this); + target->CastSpell(target, m_modifier.m_amount, true, NULL, this); return; } @@ -3044,7 +3044,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) if (!caster) return; - caster->CastSpell(target, 24659, true, nullptr, nullptr, GetCasterGuid()); + caster->CastSpell(target, 24659, true, NULL, NULL, GetCasterGuid()); } else target->RemoveAurasDueToSpell(24659); @@ -3058,7 +3058,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) if (!caster) return; - caster->CastSpell(target, 24662, true, nullptr, nullptr, GetCasterGuid()); + caster->CastSpell(target, 24662, true, NULL, NULL, GetCasterGuid()); } else target->RemoveAurasDueToSpell(24662); @@ -3255,7 +3255,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) int32 bp0 = m_modifier.m_amount; if (Unit* caster = GetCaster()) - target->CastCustomSpell(caster, 48210, &bp0, nullptr, nullptr, true, nullptr, this); + target->CastCustomSpell(caster, 48210, &bp0, NULL, NULL, true, NULL, this); } } break; @@ -3285,7 +3285,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) return; int32 bp0 = int32(target->GetMaxHealth() * m_modifier.m_amount / 100); - target->CastCustomSpell(target, 50322, &bp0, nullptr, nullptr, true); + target->CastCustomSpell(target, 50322, &bp0, NULL, NULL, true); } else target->RemoveAurasDueToSpell(50322); @@ -3318,12 +3318,12 @@ void Aura::HandleAuraDummy(bool apply, bool Real) if (target->IsInWorld() && GetStackAmount() > 0) { int32 amount = m_modifier.m_amount; - target->CastCustomSpell(target, 33778, &amount, nullptr, nullptr, true, nullptr, this, GetCasterGuid()); + target->CastCustomSpell(target, 33778, &amount, NULL, NULL, true, NULL, this, GetCasterGuid()); if (Unit* caster = GetCaster()) { int32 returnmana = (GetSpellProto()->GetManaCostPercentage() * caster->GetCreateMana() / 100) * GetStackAmount() / 2; - caster->CastCustomSpell(caster, 64372, &returnmana, nullptr, nullptr, true, nullptr, this, GetCasterGuid()); + caster->CastCustomSpell(caster, 64372, &returnmana, NULL, NULL, true, NULL, this, GetCasterGuid()); } } } @@ -3407,7 +3407,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) case 25899: // Greater Blessing of Sanctuary { if (apply) - target->CastSpell(target, 67480, true, nullptr, this); + target->CastSpell(target, 67480, true, NULL, this); else target->RemoveAurasDueToSpell(67480); return; @@ -3702,14 +3702,14 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real) if ((int32)target->GetPower(POWER_ENERGY) > furorChance) { target->SetPower(POWER_ENERGY, 0); - target->CastCustomSpell(target, 17099, &furorChance, nullptr, nullptr, true, nullptr, this); + target->CastCustomSpell(target, 17099, &furorChance, NULL, NULL, true, NULL, this); } } else if (furorChance) // only if talent known { target->SetPower(POWER_RAGE, 0); if (irand(1, 100) <= furorChance) - target->CastSpell(target, 17057, true, nullptr, this); + target->CastSpell(target, 17057, true, NULL, this); } break; } @@ -3765,12 +3765,12 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real) case FORM_BEAR: case FORM_CAT: if (Aura* dummy = target->GetDummyAura(37315)) - target->CastSpell(target, 37316, true, nullptr, dummy); + target->CastSpell(target, 37316, true, NULL, dummy); break; // Nordrassil Regalia - bonus case FORM_MOONKIN: if (Aura* dummy = target->GetDummyAura(37324)) - target->CastSpell(target, 37325, true, nullptr, dummy); + target->CastSpell(target, 37325, true, NULL, dummy); break; default: break; @@ -4784,7 +4784,7 @@ void Aura::HandleInvisibility(bool apply, bool Real) if (Real && target->GetTypeId() == TYPEID_PLAYER) { - if (((Player*)target)->GetMover() == nullptr) // check if the player doesnt have a mover, when player is hidden during MC of creature + if (((Player*)target)->GetMover() == NULL) // check if the player doesnt have a mover, when player is hidden during MC of creature { // apply glow vision target->SetByteFlag(PLAYER_FIELD_BYTES2, 1, PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW); @@ -7946,7 +7946,7 @@ void Aura::PeriodicDummyTick() } case 7057: // Haunting Spirits if (roll_chance_i(33)) - target->CastSpell(target, m_modifier.m_amount, true, nullptr, this); + target->CastSpell(target, m_modifier.m_amount, true, NULL, this); return; // // Panda // case 19230: break; @@ -8090,16 +8090,16 @@ void Aura::PeriodicDummyTick() // // Darkness // case 45996: break; case 46041: // Summon Blood Elves Periodic - target->CastSpell(target, 46037, true, nullptr, this); - target->CastSpell(target, roll_chance_i(50) ? 46038 : 46039, true, nullptr, this); - target->CastSpell(target, 46040, true, nullptr, this); + target->CastSpell(target, 46037, true, NULL, this); + target->CastSpell(target, roll_chance_i(50) ? 46038 : 46039, true, NULL, this); + target->CastSpell(target, 46040, true, NULL, this); return; // // Transform Visual Missile Periodic // case 46205: break; // // Find Opening Beam End // case 46333: break; case 46371: // Ice Spear Control Aura - target->CastSpell(target, 46372, true, nullptr, this); + target->CastSpell(target, 46372, true, NULL, this); return; // // Hailstone Chill // case 46458: break; @@ -8126,12 +8126,12 @@ void Aura::PeriodicDummyTick() { bool chance = roll_chance_i(50); - target->CastSpell(target, chance ? 48631 : 48632, true, nullptr, this); + target->CastSpell(target, chance ? 48631 : 48632, true, NULL, this); if (GetAuraTicks() % 2) // which doctor at odd tick - target->CastSpell(target, chance ? 48636 : 48635, true, nullptr, this); + target->CastSpell(target, chance ? 48636 : 48635, true, NULL, this); else // or harponeer, at even tick - target->CastSpell(target, chance ? 48634 : 48633, true, nullptr, this); + target->CastSpell(target, chance ? 48634 : 48633, true, NULL, this); return; } @@ -8160,18 +8160,18 @@ void Aura::PeriodicDummyTick() // case 50530: break; case 50789: // Summon iron dwarf (left or right) case 59860: - target->CastSpell(target, roll_chance_i(50) ? 50790 : 50791, true, nullptr, this); + target->CastSpell(target, roll_chance_i(50) ? 50790 : 50791, true, NULL, this); return; case 50792: // Summon iron trogg (left or right) case 59859: - target->CastSpell(target, roll_chance_i(50) ? 50793 : 50794, true, nullptr, this); + target->CastSpell(target, roll_chance_i(50) ? 50793 : 50794, true, NULL, this); return; case 50801: // Summon malformed ooze (left or right) case 59858: - target->CastSpell(target, roll_chance_i(50) ? 50802 : 50803, true, nullptr, this); + target->CastSpell(target, roll_chance_i(50) ? 50802 : 50803, true, NULL, this); return; case 50824: // Summon earthen dwarf - target->CastSpell(target, roll_chance_i(50) ? 50825 : 50826, true, nullptr, this); + target->CastSpell(target, roll_chance_i(50) ? 50825 : 50826, true, NULL, this); return; case 52441: // Cool Down target->CastSpell(target, 52443, true); @@ -8190,17 +8190,17 @@ void Aura::PeriodicDummyTick() // Cast different spell depending on trigger position // This will summon a different npc entry on each location - each of those has individual movement patern if (target->GetPositionZ() < 750.0f) - target->CastSpell(target, summonSpells[spell->Id - 53035][0], true, nullptr, this); + target->CastSpell(target, summonSpells[spell->Id - 53035][0], true, NULL, this); else if (target->GetPositionX() > 500.0f) - target->CastSpell(target, summonSpells[spell->Id - 53035][1], true, nullptr, this); + target->CastSpell(target, summonSpells[spell->Id - 53035][1], true, NULL, this); else - target->CastSpell(target, summonSpells[spell->Id - 53035][2], true, nullptr, this); + target->CastSpell(target, summonSpells[spell->Id - 53035][2], true, NULL, this); return; } case 53520: // Carrion Beetles - target->CastSpell(target, 53521, true, nullptr, this); - target->CastSpell(target, 53521, true, nullptr, this); + target->CastSpell(target, 53521, true, NULL, this); + target->CastSpell(target, 53521, true, NULL, this); return; case 55592: // Clean switch (urand(0, 2)) @@ -8213,18 +8213,18 @@ void Aura::PeriodicDummyTick() case 61968: // Flash Freeze { if (GetAuraTicks() == 1 && !target->HasAura(62464)) - target->CastSpell(target, 61970, true, nullptr, this); + target->CastSpell(target, 61970, true, NULL, this); return; } case 62018: // Collapse { // lose 1% of health every second - target->DealDamage(target, target->GetMaxHealth() * .01, nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, nullptr, false); + target->DealDamage(target, target->GetMaxHealth() * .01, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); return; } case 62019: // Rune of Summoning { - target->CastSpell(target, 62020, true, nullptr, this); + target->CastSpell(target, 62020, true, NULL, this); return; } case 62038: // Biting Cold @@ -8237,7 +8237,7 @@ void Aura::PeriodicDummyTick() target->RemoveAuraHolderFromStack(62039); // otherwise add one aura stack each 3 seconds else if (GetAuraTicks() % 3 && !target->HasAura(62821)) - target->CastSpell(target, 62039, true, nullptr, this); + target->CastSpell(target, 62039, true, NULL, this); return; } case 62039: // Biting Cold @@ -8255,11 +8255,11 @@ void Aura::PeriodicDummyTick() } case 62717: // Slag Pot { - target->CastSpell(target, target->GetMap()->IsRegularDifficulty() ? 65722 : 65723, true, nullptr, this); + target->CastSpell(target, target->GetMap()->IsRegularDifficulty() ? 65722 : 65723, true, NULL, this); // cast Slag Imbued if the target survives up to the last tick if (GetAuraTicks() == 10) - target->CastSpell(target, 63536, true, nullptr, this); + target->CastSpell(target, 63536, true, NULL, this); return; } case 63050: // Sanity @@ -8289,7 +8289,7 @@ void Aura::PeriodicDummyTick() if (GetHolder()->GetStackAmount() >= 10) { target->CastSpell(target, 64219, true); - target->DealDamage(target, target->GetHealth(), nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false); + target->DealDamage(target, target->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } return; } @@ -8309,13 +8309,13 @@ void Aura::PeriodicDummyTick() if (uiAuraId && !target->HasAura(uiAuraId)) { - target->CastSpell(target, uiAuraId, true, nullptr, this); + target->CastSpell(target, uiAuraId, true, NULL, this); // remove original aura if phased if (uiAuraId == 64417) { target->RemoveAurasDueToSpell(64412); - target->CastSpell(target, 62169, true, nullptr, this); + target->CastSpell(target, 62169, true, NULL, this); } } } @@ -8323,7 +8323,7 @@ void Aura::PeriodicDummyTick() } case 65272: // Shatter Chest { - target->CastSpell(target, 62501, true, nullptr, this); + target->CastSpell(target, 62501, true, NULL, this); return; } case 66118: // Leeching Swarm @@ -8341,10 +8341,10 @@ void Aura::PeriodicDummyTick() lifeLeeched = 250; // Leeching swarm damage - caster->CastCustomSpell(target, 66240, &lifeLeeched, nullptr, nullptr, true, nullptr, this); + caster->CastCustomSpell(target, 66240, &lifeLeeched, NULL, NULL, true, NULL, this); // Leeching swarm heal - target->CastCustomSpell(caster, 66125, &lifeLeeched, nullptr, nullptr, true, nullptr, this); + target->CastCustomSpell(caster, 66125, &lifeLeeched, NULL, NULL, true, NULL, this); return; } @@ -8354,7 +8354,7 @@ void Aura::PeriodicDummyTick() if (!caster) return; - caster->CastSpell(target, 66797, true, nullptr, this); + caster->CastSpell(target, 66797, true, NULL, this); target->RemoveAurasDueToSpell(GetId()); return; } @@ -8424,7 +8424,7 @@ void Aura::PeriodicDummyTick() if (GetAuraTicks() != 1) return; if (Unit* pCaster = GetCaster()) - pCaster->CastSpell(pCaster, GetSpellProto()->CalculateSimpleValue(m_effIndex), true, nullptr, this); + pCaster->CastSpell(pCaster, GetSpellProto()->CalculateSimpleValue(m_effIndex), true, NULL, this); return; } default: @@ -8450,7 +8450,7 @@ void Aura::PeriodicDummyTick() int32 mod = (rage < 100) ? rage : 100; int32 points = target->CalculateSpellDamage(target, spell, EFFECT_INDEX_1); int32 regen = target->GetMaxHealth() * (mod * points / 10) / 1000; - target->CastCustomSpell(target, 22845, ®en, nullptr, nullptr, true, nullptr, this); + target->CastCustomSpell(target, 22845, ®en, NULL, NULL, true, NULL, this); target->SetPower(POWER_RAGE, rage - mod); return; } @@ -8517,7 +8517,7 @@ void Aura::PeriodicDummyTick() { Unit* victim = target->getVictim(); if (victim && victim->GetHealth() * 100 < victim->GetMaxHealth() * 35) - target->CastSpell(target, spell->Id == 53511 ? 60096 : 60097, true, nullptr, this); + target->CastSpell(target, spell->Id == 53511 ? 60096 : 60097, true, NULL, this); return; } default: @@ -8543,7 +8543,7 @@ void Aura::PeriodicDummyTick() if (classOptions && classOptions->SpellFamilyFlags & UI64LIT(0x0000000000000020)) { if (Unit* caster = GetCaster()) - caster->CastCustomSpell(target, 52212, &m_modifier.m_amount, nullptr, nullptr, true, nullptr, this); + caster->CastCustomSpell(target, 52212, &m_modifier.m_amount, NULL, NULL, true, NULL, this); return; } // Raise Dead @@ -8576,7 +8576,7 @@ void Aura::PeriodicDummyTick() // Increases your attack power by $s1 for every $s2 armor value you have. // Calculate AP bonus (from 1 effect of this spell) int32 apBonus = m_modifier.m_amount * target->GetArmor() / target->CalculateSpellDamage(target, spell, EFFECT_INDEX_1); - target->CastCustomSpell(target, 61217, &apBonus, &apBonus, nullptr, true, nullptr, this); + target->CastCustomSpell(target, 61217, &apBonus, &apBonus, NULL, true, NULL, this); return; } // Reaping @@ -8590,7 +8590,7 @@ void Aura::PeriodicDummyTick() { // damage not expected to be show in logs, not any damage spell related to damage apply uint32 deal = m_modifier.m_amount * target->GetMaxHealth() / 100; - target->DealDamage(target, deal, nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false); + target->DealDamage(target, deal, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); return; } break; @@ -9010,7 +9010,7 @@ void Aura::HandleTriggerLinkedAura(bool apply, bool Real) if (apply) { // ToDo: handle various cases where base points need to be applied! - target->CastSpell(target, spellInfo, true, nullptr, this); + target->CastSpell(target, spellInfo, true, NULL, this); } else target->RemoveAurasByCasterSpell(linkedSpell, GetCasterGuid()); diff --git a/src/game/WorldHandlers/SpellAuras.h b/src/game/WorldHandlers/SpellAuras.h index f3ef1ebdb..a641a2372 100644 --- a/src/game/WorldHandlers/SpellAuras.h +++ b/src/game/WorldHandlers/SpellAuras.h @@ -558,7 +558,7 @@ class Aura class AreaAura : public Aura { public: - AreaAura(SpellEntry const* spellproto, SpellEffectIndex eff, int32* currentBasePoints, SpellAuraHolder* holder, Unit* target, Unit* caster = nullptr, Item* castItem = nullptr, uint32 originalRankSpellId = 0); + AreaAura(SpellEntry const* spellproto, SpellEffectIndex eff, int32* currentBasePoints, SpellAuraHolder* holder, Unit* target, Unit* caster = NULL, Item* castItem = NULL, uint32 originalRankSpellId = 0); ~AreaAura(); protected: void Update(uint32 diff) override; @@ -591,5 +591,5 @@ class SingleEnemyTargetAura : public Aura }; Aura* CreateAura(SpellEntry const* spellproto, SpellEffectIndex eff, int32* currentBasePoints, SpellAuraHolder* holder, Unit* target, Unit* caster = NULL, Item* castItem = NULL); -SpellAuraHolder* CreateSpellAuraHolder(SpellEntry const* spellproto, Unit* target, WorldObject* caster, Item* castItem = nullptr, SpellEntry const* triggeredBy = nullptr); +SpellAuraHolder* CreateSpellAuraHolder(SpellEntry const* spellproto, Unit* target, WorldObject* caster, Item* castItem = NULL, SpellEntry const* triggeredBy = NULL); #endif diff --git a/src/game/WorldHandlers/SpellEffects.cpp b/src/game/WorldHandlers/SpellEffects.cpp index 4fa37f26a..538246b58 100644 --- a/src/game/WorldHandlers/SpellEffects.cpp +++ b/src/game/WorldHandlers/SpellEffects.cpp @@ -307,7 +307,7 @@ void Spell::EffectInstaKill(SpellEffectEntry const* /*effect*/) data << uint32(m_spellInfo->Id); m_caster->SendMessageToSet(&data, true); - m_caster->DealDamage(unitTarget, unitTarget->GetHealth(), nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, m_spellInfo, false); + m_caster->DealDamage(unitTarget, unitTarget->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, m_spellInfo, false); } void Spell::EffectEnvironmentalDMG(SpellEffectEntry const* effect) @@ -543,7 +543,7 @@ void Spell::EffectSchoolDMG(SpellEffectEntry const* effect) // Conflagrate - consumes Immolate or Shadowflame else if (m_spellInfo->GetTargetAuraState() == AURA_STATE_CONFLAGRATE) { - Aura const* aura = nullptr; // found req. aura for damage calculation + Aura const* aura = NULL; // found req. aura for damage calculation Unit::AuraList const& mPeriodic = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE); for (Unit::AuraList::const_iterator i = mPeriodic.begin(); i != mPeriodic.end(); ++i) @@ -848,7 +848,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) case 4: spell_id = 8067; break; // Party Time! case 5: spell_id = 8068; break; // Healthy Spirit } - m_caster->CastSpell(m_caster, spell_id, true, nullptr); + m_caster->CastSpell(m_caster, spell_id, true, NULL); return; } case 8213: // Savory Deviate Delight @@ -865,7 +865,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) case 2: spell_id = (m_caster->getGender() == GENDER_MALE ? 8221 : 8222); break; } - m_caster->CastSpell(m_caster, spell_id, true, nullptr); + m_caster->CastSpell(m_caster, spell_id, true, NULL); return; } case 9976: // Polly Eats the E.C.A.C. @@ -905,7 +905,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) else // normal root spell_id = 13099; - m_caster->CastSpell(unitTarget, spell_id, true, nullptr); + m_caster->CastSpell(unitTarget, spell_id, true, NULL); return; } case 13489: @@ -925,7 +925,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) switch (m_triggeredByAuraSpell->Id) { case 26467: // Persistent Shield - m_caster->CastCustomSpell(unitTarget, 26470, &damage, nullptr, nullptr, true); + m_caster->CastCustomSpell(unitTarget, 26470, &damage, NULL, NULL, true); break; default: sLog.outError("EffectDummy: Non-handled case for spell 13567 for triggered aura %u", m_triggeredByAuraSpell->Id); @@ -989,7 +989,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) default: spell_id = 16591; break; } - m_caster->CastSpell(m_caster, spell_id, true, nullptr); + m_caster->CastSpell(m_caster, spell_id, true, NULL); return; } case 17009: // Voodoo @@ -1009,7 +1009,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) case 6: spell_id = 16716; break; // Launch } - m_caster->CastSpell(unitTarget, spell_id, true, nullptr, nullptr, m_originalCasterGUID, m_spellInfo); + m_caster->CastSpell(unitTarget, spell_id, true, NULL, NULL, m_originalCasterGUID, m_spellInfo); return; } case 17251: // Spirit Healer Res @@ -1036,12 +1036,12 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) ? 17269 // Create Resonating Skull : 17270; // Create Bone Dust - m_caster->CastSpell(m_caster, spell_id, true, nullptr); + m_caster->CastSpell(m_caster, spell_id, true, NULL); return; } case 17770: // Wolfshead Helm Energy { - m_caster->CastSpell(m_caster, 29940, true, nullptr); + m_caster->CastSpell(m_caster, 29940, true, NULL); return; } case 17950: // Shadow Portal @@ -1122,7 +1122,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) case 20577: // Cannibalize { if (unitTarget) - m_caster->CastSpell(m_caster, 20578, false, nullptr); + m_caster->CastSpell(m_caster, 20578, false, NULL); return; } @@ -1332,7 +1332,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) ? 29277 // Summon Purified Helboar Meat : 29278; // Summon Toxic Helboar Meat - m_caster->CastSpell(m_caster, spell_id, true, nullptr); + m_caster->CastSpell(m_caster, spell_id, true, NULL); return; } case 29858: // Soulshatter @@ -1347,7 +1347,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) if (!unitTarget) return; - unitTarget->CastSpell(unitTarget, 29952, true, nullptr, nullptr, m_caster->GetObjectGuid()); + unitTarget->CastSpell(unitTarget, 29952, true, NULL, NULL, m_caster->GetObjectGuid()); return; } case 29979: // Massive Magnetic Pull @@ -1440,7 +1440,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) case 5: spell_id = 33064; break; // Mr. Pinchy's Gift } - m_caster->CastSpell(m_caster, spell_id, true, nullptr); + m_caster->CastSpell(m_caster, spell_id, true, NULL); return; } case 34803: // Summon Reinforcements @@ -1493,7 +1493,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) return; int32 basepoints0 = 100; - m_caster->CastCustomSpell(unitTarget, 37675, &basepoints0, nullptr, nullptr, true); + m_caster->CastCustomSpell(unitTarget, 37675, &basepoints0, NULL, NULL, true); return; } case 39189: // Sha'tari Torch @@ -1516,7 +1516,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) if (!unitTarget) return; - unitTarget->CastSpell(unitTarget, 41466, true, nullptr, nullptr, m_caster->GetObjectGuid()); + unitTarget->CastSpell(unitTarget, 41466, true, NULL, NULL, m_caster->GetObjectGuid()); return; } case 40802: // Mingo's Fortune Generator (Mingo's Fortune Giblets) @@ -1622,7 +1622,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) unitTarget->CastSpell(m_caster, 42486, true); // There is no known spell to kill the target - m_caster->DealDamage(unitTarget, unitTarget->GetHealth(), nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false); + m_caster->DealDamage(unitTarget, unitTarget->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); return; } case 42489: // Cast Ooze Zap When Energized @@ -1719,7 +1719,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) if (!unitTarget) return; - unitTarget->CastSpell(unitTarget, 42493, true, nullptr, nullptr, m_caster->GetObjectGuid()); + unitTarget->CastSpell(unitTarget, 42493, true, NULL, NULL, m_caster->GetObjectGuid()); return; } case 43209: // Place Ram Meat @@ -1772,7 +1772,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) if (m_caster->GetTypeId() != TYPEID_PLAYER) return; - ((Player*)m_caster)->CastSpell(unitTarget, 43753, true, m_CastItem, nullptr, m_originalCasterGUID, m_spellInfo); + ((Player*)m_caster)->CastSpell(unitTarget, 43753, true, m_CastItem, NULL, m_originalCasterGUID, m_spellInfo); return; } case 43882: // Scourging Crystal Controller Dummy @@ -1802,8 +1802,8 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) return; // Cast the spectral realm effect spell, visual spell and spectral blast rift summoning - unitTarget->CastSpell(unitTarget, 44866, true, nullptr, nullptr, m_caster->GetObjectGuid()); - unitTarget->CastSpell(unitTarget, 46648, true, nullptr, nullptr, m_caster->GetObjectGuid()); + unitTarget->CastSpell(unitTarget, 44866, true, NULL, NULL, m_caster->GetObjectGuid()); + unitTarget->CastSpell(unitTarget, 46648, true, NULL, NULL, m_caster->GetObjectGuid()); unitTarget->CastSpell(unitTarget, 44811, true); return; } @@ -1817,7 +1817,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) creatureTarget->ForcedDespawn(); // cast spell Raptor Capture Credit - m_caster->CastSpell(m_caster, 42337, true, nullptr); + m_caster->CastSpell(m_caster, 42337, true, NULL); return; } case 44997: // Converting Sentry @@ -1866,7 +1866,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) // look for gameobject within max spell range of unitTarget, and respawn if found // big fire - GameObject* pGo = nullptr; + GameObject* pGo = NULL; float fMaxDist = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex)); @@ -2015,7 +2015,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) ((Player*)m_caster)->KilledMonsterCredit(unitTarget->GetEntry(), unitTarget->GetObjectGuid()); // look for gameobject within max spell range of unitTarget, and respawn if found - GameObject* pGo = nullptr; + GameObject* pGo = NULL; float fMaxDist = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex)); @@ -2129,7 +2129,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) // The additional castspell arguments are needed here to remove reagents for triggered spells if (spellId) - m_caster->CastSpell(m_caster, spellId, true, m_CastItem, nullptr, m_caster->GetObjectGuid(), m_spellInfo); + m_caster->CastSpell(m_caster, spellId, true, m_CastItem, NULL, m_caster->GetObjectGuid(), m_spellInfo); return; } @@ -2216,7 +2216,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) // Need internal way to track if credit has been given for this object. // Iron Dwarf Snapshot Credit - m_caster->CastSpell(m_caster, 48047, true, m_CastItem, nullptr, unitTarget->GetObjectGuid()); + m_caster->CastSpell(m_caster, 48047, true, m_CastItem, NULL, unitTarget->GetObjectGuid()); return; } case 48790: // Neltharion's Flame @@ -2436,7 +2436,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) if (BattleGround* bg = ((Player*)m_caster)->GetBattleGround()) bg->EventPlayerDroppedFlag((Player*)m_caster); - m_caster->CastSpell(m_caster, 30452, true, nullptr); + m_caster->CastSpell(m_caster, 30452, true, NULL); return; } case 51840: // Despawn Fruit Tosser @@ -2481,7 +2481,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) // Expecting pTargetDummy to be summoned by AI at death of target creatures. - Creature* pTargetDummy = nullptr; + Creature* pTargetDummy = NULL; float fRange = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex)); MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck u_check(*m_caster, 28523, true, false, fRange * 2); @@ -2552,7 +2552,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) uint32 reqAuraID = m_spellInfo->CalculateSimpleValue(EFFECT_INDEX_1); if (m_caster->HasAura(reqAuraID, EFFECT_INDEX_0)) - m_caster->CastSpell(m_caster, spellID, true, nullptr); + m_caster->CastSpell(m_caster, spellID, true, NULL); return; } case EFFECT_INDEX_1: // additional data for dummy[0] @@ -2596,7 +2596,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) if (!unitTarget) return; - m_caster->CastCustomSpell(unitTarget, 52752, &damage, nullptr, nullptr, true); + m_caster->CastCustomSpell(unitTarget, 52752, &damage, NULL, NULL, true); return; } case 52845: // Brewfest Mount Transformation (Faction Swap) @@ -2748,8 +2748,8 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) if (!unitTarget) return; - unitTarget->CastSpell(unitTarget, 56431, true, nullptr, nullptr, m_caster->GetObjectGuid()); - unitTarget->CastSpell(unitTarget, 56432, true, nullptr, nullptr, m_caster->GetObjectGuid()); + unitTarget->CastSpell(unitTarget, 56431, true, NULL, NULL, m_caster->GetObjectGuid()); + unitTarget->CastSpell(unitTarget, 56432, true, NULL, NULL, m_caster->GetObjectGuid()); return; } case 57578: // Lava Strike @@ -2793,7 +2793,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) case 3: spell_id = 59843; break; } - m_caster->CastSpell(m_caster, spell_id, true, nullptr); + m_caster->CastSpell(m_caster, spell_id, true, NULL); return; } case 60932: // Disengage (one from creature versions) @@ -2801,7 +2801,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) if (!unitTarget) return; - m_caster->CastSpell(unitTarget, 60934, true, nullptr); + m_caster->CastSpell(unitTarget, 60934, true, NULL); return; } case 62105: // To'kini's Blowgun @@ -2904,7 +2904,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) return; // There is no known spell to kill the target - m_caster->DealDamage(unitTarget, unitTarget->GetHealth(), nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false); + m_caster->DealDamage(unitTarget, unitTarget->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); return; } case 64385: // Spinning (from Unusual Compass) @@ -3170,7 +3170,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) return; m_caster->CastSpell(unitTarget, 74453, true); - m_caster->CastSpell(unitTarget, 74454, true, nullptr, nullptr, m_caster->GetObjectGuid(), m_spellInfo); + m_caster->CastSpell(unitTarget, 74454, true, NULL, NULL, m_caster->GetObjectGuid(), m_spellInfo); return; } } @@ -3262,7 +3262,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) if (warClassOptions && (warClassOptions->SpellFamilyFlags & UI64LIT(0x1)) && m_spellInfo->SpellVisual[0] == 867) { int32 chargeBasePoints0 = damage; - m_caster->CastCustomSpell(m_caster, 34846, &chargeBasePoints0, nullptr, nullptr, true); + m_caster->CastCustomSpell(m_caster, 34846, &chargeBasePoints0, NULL, NULL, true); return; } // Execute @@ -3286,7 +3286,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) int32 basePoints0 = damage+int32(rage_modified * effect->EffectDamageMultiplier + m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.2f); - m_caster->CastCustomSpell(unitTarget, 20647, &basePoints0, nullptr, nullptr, true, 0); + m_caster->CastCustomSpell(unitTarget, 20647, &basePoints0, NULL, NULL, true, 0); // Sudden Death if (m_caster->HasAura(52437)) @@ -3316,7 +3316,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) return; // dummy cast itself ignored by client in logs - m_caster->CastCustomSpell(unitTarget, 50782, &damage, nullptr, nullptr, true); + m_caster->CastCustomSpell(unitTarget, 50782, &damage, NULL, NULL, true); return; } // Concussion Blow @@ -3340,13 +3340,13 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) case 12975: { int32 healthModSpellBasePoints0 = int32(m_caster->GetMaxHealth() * 0.3); - m_caster->CastCustomSpell(m_caster, 12976, &healthModSpellBasePoints0, nullptr, nullptr, true, nullptr); + m_caster->CastCustomSpell(m_caster, 12976, &healthModSpellBasePoints0, NULL, NULL, true, NULL); return; } // Bloodthirst case 23881: { - m_caster->CastCustomSpell(unitTarget, 23885, &damage, nullptr, nullptr, true, nullptr); + m_caster->CastCustomSpell(unitTarget, 23885, &damage, NULL, NULL, true, NULL); return; } case 30012: // Move @@ -3401,7 +3401,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) if((*itr)->GetSpellProto()->GetSpellFamilyName()==SPELLFAMILY_WARLOCK && (*itr)->GetSpellProto()->SpellIconID == 208) mana = ((*itr)->GetModifier()->m_amount + 100)* mana / 100; - m_caster->CastCustomSpell(unitTarget, 31818, &mana, nullptr, nullptr, true); + m_caster->CastCustomSpell(unitTarget, 31818, &mana, NULL, NULL, true); // Mana Feed int32 manaFeedVal = 0; @@ -3414,7 +3414,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) if (manaFeedVal > 0) { manaFeedVal = manaFeedVal * mana / 100; - m_caster->CastCustomSpell(m_caster, 32553, &manaFeedVal, nullptr, nullptr, true, nullptr); + m_caster->CastCustomSpell(m_caster, 32553, &manaFeedVal, NULL, NULL, true, NULL); } } else @@ -3602,7 +3602,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) } if (!target || !target->IsAlive()) return; - m_caster->CastSpell(target, spellid, true, nullptr); + m_caster->CastSpell(target, spellid, true, NULL); } switch (m_spellInfo->Id) @@ -3642,7 +3642,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) if (!unitTarget) return; int32 healthModSpellBasePoints0 = int32(unitTarget->GetMaxHealth() * 0.3); - unitTarget->CastCustomSpell(unitTarget, 53479, &healthModSpellBasePoints0, nullptr, nullptr, true, nullptr); + unitTarget->CastCustomSpell(unitTarget, 53479, &healthModSpellBasePoints0, NULL, NULL, true, NULL); return; } // Master's Call @@ -3701,7 +3701,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) if (!spell_proto) return; - m_caster->CastSpell(unitTarget, spell_proto, true, nullptr); + m_caster->CastSpell(unitTarget, spell_proto, true, NULL); return; } } @@ -3722,7 +3722,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) { Player* player = friendTarget->GetCharmerOrOwnerPlayerOrPlayerItself(); if (!player || !player->IsInSameRaidWith((Player*)m_caster)) - friendTarget = nullptr; + friendTarget = NULL; } // non-standard cast requirement check @@ -3809,7 +3809,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) if (Aura* dummy = owner->GetDummyAura(55456)) damage += dummy->GetModifier()->m_amount * damage / 100; } - m_caster->CastCustomSpell(unitTarget, 52042, &damage, nullptr, nullptr, true, 0, 0, m_originalCasterGUID); + m_caster->CastCustomSpell(unitTarget, 52042, &damage, NULL, NULL, true, 0, 0, m_originalCasterGUID); } return; } @@ -3835,7 +3835,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) float weaponSpeed = (1.0f / IN_MILLISECONDS) * m_CastItem->GetProto()->Delay; int32 totalDamage = int32((damage + 3.85f * spellDamage) * 0.01 * weaponSpeed); - m_caster->CastCustomSpell(unitTarget, 10444, &totalDamage, nullptr, nullptr, true, m_CastItem); + m_caster->CastCustomSpell(unitTarget, 10444, &totalDamage, NULL, NULL, true, m_CastItem); return; } if (m_spellInfo->Id == 39610) // Mana Tide Totem effect @@ -3849,7 +3849,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) damage += dummy->GetModifier()->m_amount; // Regenerate 6% of Total Mana Every 3 secs int32 EffectBasePoints0 = unitTarget->GetMaxPower(POWER_MANA) * damage / 100; - m_caster->CastCustomSpell(unitTarget, 39609, &EffectBasePoints0, nullptr, nullptr, true, nullptr, nullptr, m_originalCasterGUID); + m_caster->CastCustomSpell(unitTarget, 39609, &EffectBasePoints0, NULL, NULL, true, NULL, NULL, m_originalCasterGUID); return; } // Lava Lash @@ -3897,10 +3897,10 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) default: return; } - totem->CastSpell(totem, triggered_spell_id, true, nullptr, nullptr, m_caster->GetObjectGuid()); + totem->CastSpell(totem, triggered_spell_id, true, NULL, NULL, m_caster->GetObjectGuid()); // Fire Nova Visual - totem->CastSpell(totem, 19823, true, nullptr, nullptr, m_caster->GetObjectGuid()); + totem->CastSpell(totem, 19823, true, NULL, NULL, m_caster->GetObjectGuid()); return; } break; @@ -3917,12 +3917,12 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) return; int32 bp = int32(damage * 1.5f); - m_caster->CastCustomSpell(unitTarget, 47633, &bp, nullptr, nullptr, true); + m_caster->CastCustomSpell(unitTarget, 47633, &bp, NULL, NULL, true); } else { int32 bp = damage; - m_caster->CastCustomSpell(unitTarget, 47632, &bp, nullptr, nullptr, true); + m_caster->CastCustomSpell(unitTarget, 47632, &bp, NULL, NULL, true); } return; } @@ -3964,7 +3964,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) } } - m_caster->CastCustomSpell(m_caster, 45470, &bp, nullptr, nullptr, true); + m_caster->CastCustomSpell(m_caster, 45470, &bp, NULL, NULL, true); return; } // Death Grip @@ -3985,7 +3985,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) uint32 spellId = m_spellInfo->CalculateSimpleValue(EFFECT_INDEX_0); float dest_x, dest_y; m_caster->GetNearPoint2D(dest_x, dest_y, m_caster->GetObjectBoundingRadius() + unitTarget->GetObjectBoundingRadius(), m_caster->GetOrientation()); - unitTarget->CastSpell(dest_x, dest_y, m_caster->GetPositionZ() + 0.5f, spellId, true, nullptr, nullptr, m_caster->GetObjectGuid(), m_spellInfo); + unitTarget->CastSpell(dest_x, dest_y, m_caster->GetPositionZ() + 0.5f, spellId, true, NULL, NULL, m_caster->GetObjectGuid(), m_spellInfo); return; } // Obliterate @@ -4053,7 +4053,7 @@ void Spell::EffectTriggerSpellWithValue(SpellEffectEntry const* effect) } int32 bp = damage; - m_caster->CastCustomSpell(unitTarget, triggered_spell_id, &bp, &bp, &bp, true, m_CastItem , nullptr, m_originalCasterGUID, m_spellInfo); + m_caster->CastCustomSpell(unitTarget, triggered_spell_id, &bp, &bp, &bp, true, m_CastItem , NULL, m_originalCasterGUID, m_spellInfo); } void Spell::EffectTriggerRitualOfSummoning(SpellEffectEntry const* effect) @@ -4132,9 +4132,9 @@ void Spell::EffectForceCast(SpellEffectEntry const* effect) // spell effect 141 needs to be cast as custom with basePoints if (effect->Effect == SPELL_EFFECT_FORCE_CAST_WITH_VALUE) - unitTarget->CastCustomSpell(unitTarget, spellInfo, &basePoints, &basePoints, &basePoints, true, nullptr , nullptr, m_originalCasterGUID, m_spellInfo); + unitTarget->CastCustomSpell(unitTarget, spellInfo, &basePoints, &basePoints, &basePoints, true, NULL , NULL, m_originalCasterGUID, m_spellInfo); else - unitTarget->CastSpell(unitTarget, spellInfo, true, nullptr, nullptr, m_originalCasterGUID, m_spellInfo); + unitTarget->CastSpell(unitTarget, spellInfo, true, NULL, NULL, m_originalCasterGUID, m_spellInfo); } void Spell::EffectTriggerSpell(SpellEffectEntry const* effect) @@ -4208,7 +4208,7 @@ void Spell::EffectTriggerSpell(SpellEffectEntry const* effect) { // Glyph of Mirror Image if (m_caster->HasAura(63093)) - m_caster->CastSpell(m_caster, 65047, true, m_CastItem, nullptr, m_originalCasterGUID); + m_caster->CastSpell(m_caster, 65047, true, m_CastItem, NULL, m_originalCasterGUID); break; } } @@ -4298,9 +4298,9 @@ void Spell::EffectTriggerMissileSpell(SpellEffectEntry const* effect) DEBUG_FILTER_LOG(LOG_FILTER_SPELL_CAST, "WORLD: cast Item spellId - %i", spellInfo->Id); if (m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION) - m_caster->CastSpell(m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ, spellInfo, true, m_CastItem, nullptr, m_originalCasterGUID, m_spellInfo); + m_caster->CastSpell(m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ, spellInfo, true, m_CastItem, NULL, m_originalCasterGUID, m_spellInfo); else if (unitTarget) - m_caster->CastSpell(unitTarget, spellInfo, true, m_CastItem, nullptr, m_originalCasterGUID, m_spellInfo); + m_caster->CastSpell(unitTarget, spellInfo, true, m_CastItem, NULL, m_originalCasterGUID, m_spellInfo); } void Spell::EffectJump(SpellEffectEntry const* effect) @@ -6668,7 +6668,7 @@ void Spell::EffectSummonPet(SpellEffectEntry const* effect) else NewSummon->setPetType(GUARDIAN_PET); - CreatureInfo const* cInfo = petentry ? ObjectMgr::GetCreatureTemplate(petentry) : nullptr; + CreatureInfo const* cInfo = petentry ? ObjectMgr::GetCreatureTemplate(petentry) : NULL; if (!cInfo) { sLog.outErrorDb("EffectSummonPet: creature entry %u not found for spell %u.", petentry, m_spellInfo->Id); @@ -7238,7 +7238,7 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect) default: spell_id = 8855; break; } - m_caster->CastSpell(m_caster, spell_id, true, nullptr); + m_caster->CastSpell(m_caster, spell_id, true, NULL); return; } case 17512: // Piccolo of the Flaming Fire @@ -7323,7 +7323,7 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect) } case 24320: // Poisonous Blood { - unitTarget->CastSpell(unitTarget, 24321, true, nullptr, nullptr, m_caster->GetObjectGuid()); + unitTarget->CastSpell(unitTarget, 24321, true, NULL, NULL, m_caster->GetObjectGuid()); return; } case 24324: // Blood Siphon @@ -7566,7 +7566,7 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect) int32 damage = unitTarget->GetHealth() - unitTarget->GetMaxHealth() * downToHealthPercent; if (damage > 0) - m_caster->CastCustomSpell(unitTarget, 28375, &damage, nullptr, nullptr, true); + m_caster->CastCustomSpell(unitTarget, 28375, &damage, NULL, NULL, true); return; } case 28560: // Summon Blizzard @@ -7711,7 +7711,7 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect) if (!unitTarget) return; - unitTarget->CastSpell(unitTarget, 30836, true, nullptr, nullptr, m_caster->GetObjectGuid()); + unitTarget->CastSpell(unitTarget, 30836, true, NULL, NULL, m_caster->GetObjectGuid()); break; } case 30918: // Improved Sprint @@ -7765,7 +7765,7 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect) if (!unitTarget) return; - unitTarget->CastSpell(unitTarget, unitTarget->GetMap()->IsRegularDifficulty() ? 23971 : 30928, true, nullptr, nullptr, m_caster->GetObjectGuid()); + unitTarget->CastSpell(unitTarget, unitTarget->GetMap()->IsRegularDifficulty() ? 23971 : 30928, true, NULL, NULL, m_caster->GetObjectGuid()); return; } case 35865: // Summon Nether Vapor @@ -7810,7 +7810,7 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect) if (!unitTarget) return; - unitTarget->CastSpell(unitTarget, 38353, true, nullptr, nullptr, m_caster->GetObjectGuid()); + unitTarget->CastSpell(unitTarget, 38353, true, NULL, NULL, m_caster->GetObjectGuid()); return; } case 39338: // Karazhan - Chess, Medivh CHEAT: Hand of Medivh, Target Horde @@ -7904,7 +7904,7 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect) return; int32 basePoints = effect->CalculateSimpleValue(); - unitTarget->CastCustomSpell(unitTarget, 42576, &basePoints, nullptr, nullptr, true); + unitTarget->CastCustomSpell(unitTarget, 42576, &basePoints, NULL, NULL, true); return; } case 43365: // The Cleansing: Shrine Cast @@ -7950,7 +7950,7 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect) // Are there anything special with this, a random chance or condition? // Feeding Rock Falcon - unitTarget->CastSpell(unitTarget, effect->CalculateSimpleValue(), true, nullptr, nullptr, unitTarget->GetObjectGuid(), m_spellInfo); + unitTarget->CastSpell(unitTarget, effect->CalculateSimpleValue(), true, NULL, NULL, unitTarget->GetObjectGuid(), m_spellInfo); return; } case 44455: // Character Script Effect Reverse Cast @@ -7997,7 +7997,7 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect) if (m_caster->GetTypeId() != TYPEID_UNIT) return; - Creature* pQuestCow = nullptr; + Creature* pQuestCow = NULL; float range = 20.0f; @@ -8057,7 +8057,7 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect) if (!unitTarget) return; - unitTarget->CastSpell(unitTarget, 46394, true, nullptr, nullptr, m_caster->GetObjectGuid()); + unitTarget->CastSpell(unitTarget, 46394, true, NULL, NULL, m_caster->GetObjectGuid()); return; } case 45151: // Burn @@ -8107,7 +8107,7 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect) if (!unitTarget) return; - unitTarget->CastSpell(unitTarget, 45236, true, nullptr, nullptr, m_caster->GetObjectGuid()); + unitTarget->CastSpell(unitTarget, 45236, true, NULL, NULL, m_caster->GetObjectGuid()); return; } case 45260: // Karazhan - Chess - Force Player to Kill Bunny @@ -8188,7 +8188,7 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect) if (m_caster->GetTypeId() != TYPEID_UNIT) return; - const CreatureInfo* cTemplate = nullptr; + const CreatureInfo* cTemplate = NULL; switch (m_caster->GetEntry()) { @@ -8277,7 +8277,7 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect) // Summon 4 clones of the same player for (uint8 i = 0; i < 4; ++i) - unitTarget->CastSpell(unitTarget, 45891, true, nullptr, nullptr, m_caster->GetObjectGuid()); + unitTarget->CastSpell(unitTarget, 45891, true, NULL, NULL, m_caster->GetObjectGuid()); return; } case 45918: // Soul Sever @@ -8531,7 +8531,7 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect) return; // Each target hit buffs the caster - unitTarget->CastSpell(m_caster, m_spellInfo->Id == 49380 ? 49381 : 59805, true, nullptr, nullptr, m_caster->GetObjectGuid()); + unitTarget->CastSpell(m_caster, m_spellInfo->Id == 49380 ? 49381 : 59805, true, NULL, NULL, m_caster->GetObjectGuid()); return; } case 49405: // Invader Taunt Trigger @@ -8607,7 +8607,7 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect) if (!unitTarget) return; - unitTarget->CastSpell(unitTarget, effect->CalculateSimpleValue(), true, nullptr, nullptr, m_originalCasterGUID); + unitTarget->CastSpell(unitTarget, effect->CalculateSimpleValue(), true, NULL, NULL, m_originalCasterGUID); return; } case 50439: // Script Cast Summon Image of Drakuru 05 @@ -8651,7 +8651,7 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect) return; unitTarget->RemoveAurasDueToSpell(50812); - unitTarget->CastSpell(unitTarget, m_spellInfo->Id == 50810 ? 50811 : 61547 , true, nullptr, nullptr, m_caster->GetObjectGuid()); + unitTarget->CastSpell(unitTarget, m_spellInfo->Id == 50810 ? 50811 : 61547 , true, NULL, NULL, m_caster->GetObjectGuid()); return; } case 50894: // Zul'Drak Rat @@ -8744,7 +8744,7 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect) // cast Summon Ghouls On Scarlet Crusade float x, y, z; m_targets.getDestination(x, y, z); - unitTarget->CastSpell(x, y, z, 54522, true, nullptr, nullptr, m_originalCasterGUID); + unitTarget->CastSpell(x, y, z, 54522, true, NULL, NULL, m_originalCasterGUID); return; } case 51910: // Kickin' Nass: Quest Completion @@ -8967,7 +8967,7 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect) case POWER_MANA: { int32 manapool = unitTarget->GetMaxPower(POWER_MANA) * 0.05; - unitTarget->CastCustomSpell(unitTarget, 59813, &manapool, nullptr, nullptr, true); + unitTarget->CastCustomSpell(unitTarget, 59813, &manapool, NULL, NULL, true); break; } case POWER_RAGE: @@ -9614,7 +9614,7 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect) if (missingStacks <= 0) return; - unitTarget->CastCustomSpell(unitTarget, 72371, &missingStacks, &missingStacks, nullptr, true); + unitTarget->CastCustomSpell(unitTarget, 72371, &missingStacks, &missingStacks, NULL, true); return; } case 72219: // Gastric Bloat @@ -9931,7 +9931,7 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect) { if (roll_chance_i((*i)->GetModifier()->m_amount)) { - unitTarget->CastSpell(unitTarget, 53398, true, nullptr, (*i), m_caster->GetObjectGuid()); + unitTarget->CastSpell(unitTarget, 53398, true, NULL, (*i), m_caster->GetObjectGuid()); break; } } diff --git a/src/game/WorldHandlers/TradeHandler.cpp b/src/game/WorldHandlers/TradeHandler.cpp index ee36d857f..4821d75b4 100644 --- a/src/game/WorldHandlers/TradeHandler.cpp +++ b/src/game/WorldHandlers/TradeHandler.cpp @@ -312,8 +312,8 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& recvPacket) if (!his_trade) return; - Item* myItems[TRADE_SLOT_TRADED_COUNT] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr }; - Item* hisItems[TRADE_SLOT_TRADED_COUNT] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr }; + Item* myItems[TRADE_SLOT_TRADED_COUNT] = { NULL, NULL, NULL, NULL, NULL, NULL }; + Item* hisItems[TRADE_SLOT_TRADED_COUNT] = { NULL, NULL, NULL, NULL, NULL, NULL }; // set before checks to properly undo at problems (it already set in to client) my_trade->SetAccepted(true); @@ -367,10 +367,10 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& recvPacket) { setAcceptTradeMode(my_trade, his_trade, myItems, hisItems); - Spell* my_spell = nullptr; + Spell* my_spell = NULL; SpellCastTargets my_targets; - Spell* his_spell = nullptr; + Spell* his_spell = NULL; SpellCastTargets his_targets; // not accept if spell can't be casted now (cheating) @@ -529,9 +529,9 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& recvPacket) // cleanup clearAcceptTradeMode(my_trade, his_trade); delete _player->m_trade; - _player->m_trade = nullptr; + _player->m_trade = NULL; delete trader->m_trade; - trader->m_trade = nullptr; + trader->m_trade = NULL; // desynchronized with the other saves here (SaveInventoryAndGoldToDB() not have own transaction guards) CharacterDatabase.BeginTransaction(); diff --git a/src/game/WorldHandlers/UnitAuraProcHandler.cpp b/src/game/WorldHandlers/UnitAuraProcHandler.cpp index 44835057c..8d527ec46 100644 --- a/src/game/WorldHandlers/UnitAuraProcHandler.cpp +++ b/src/game/WorldHandlers/UnitAuraProcHandler.cpp @@ -632,7 +632,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura int32 triggerAmount = triggeredByAura->GetModifier()->m_amount; Item* castItem = triggeredByAura->GetCastItemGuid() && GetTypeId() == TYPEID_PLAYER - ? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGuid()) : nullptr; + ? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGuid()) : NULL; // some dummy spells have trigger spell in spell data already (from 3.0.3) uint32 triggered_spell_id = dummySpellEffect->EffectApplyAuraName == SPELL_AURA_DUMMY ? dummySpellEffect->EffectTriggerSpell : 0; @@ -1321,7 +1321,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura RemoveAurasDueToSpell(triggeredByAura->GetId()); // Cast finish spell (triggeredByAura already not exist!) - CastSpell(this, 27285, true, castItem, nullptr, casterGuid); + CastSpell(this, 27285, true, castItem, NULL, casterGuid); return SPELL_AURA_PROC_OK; // no hidden cooldown } @@ -1343,7 +1343,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura RemoveAurasDueToSpell(triggeredByAura->GetId()); // Cast finish spell (triggeredByAura already not exist!) - CastSpell(this, 32865, true, castItem, nullptr, casterGuid); + CastSpell(this, 32865, true, castItem, NULL, casterGuid); return SPELL_AURA_PROC_OK; // no hidden cooldown } // Damage counting @@ -1502,7 +1502,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura // Heal amount - Self/Team int32 team = triggerAmount * damage / 500; int32 self = triggerAmount * damage / 100 - team; - CastCustomSpell(this, 15290, &team, &self, nullptr, true, castItem, triggeredByAura); + CastCustomSpell(this, 15290, &team, &self, NULL, true, castItem, triggeredByAura); return SPELL_AURA_PROC_OK; // no hidden cooldown } // Priest Tier 6 Trinket (Ashtongue Talisman of Acumen) @@ -1601,7 +1601,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura if (SpellEntry const* manaCastEntry = sSpellStore.LookupEntry(60889)) { int32 mana_percent = manaCastEntry->CalculateSimpleValue(EFFECT_INDEX_0) * heal_percent; - CastCustomSpell(this, manaCastEntry, &mana_percent, nullptr, nullptr, true, castItem, triggeredByAura); + CastCustomSpell(this, manaCastEntry, &mana_percent, NULL, NULL, true, castItem, triggeredByAura); } } break; @@ -1705,7 +1705,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura if (!second) return SPELL_AURA_PROC_FAILED; - pVictim->CastSpell(second, procSpell, true, nullptr, triggeredByAura, GetObjectGuid()); + pVictim->CastSpell(second, procSpell, true, NULL, triggeredByAura, GetObjectGuid()); return SPELL_AURA_PROC_OK; } // Item - Druid T10 Balance 4P Bonus @@ -1908,7 +1908,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura // Glyph of Mend Pet if (dummySpell->Id == 57870) { - pVictim->CastSpell(pVictim, 57894, true, nullptr, nullptr, GetObjectGuid()); + pVictim->CastSpell(pVictim, 57894, true, NULL, NULL, GetObjectGuid()); return SPELL_AURA_PROC_OK; } // Misdirection @@ -1957,7 +1957,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura return SPELL_AURA_PROC_FAILED; basepoints[0] = int32(pVictim->GetMaxHealth() * triggeredByAura->GetModifier()->m_amount / 100); - pVictim->CastCustomSpell(pVictim, 20267, &basepoints[0], nullptr, nullptr, true, nullptr, triggeredByAura); + pVictim->CastCustomSpell(pVictim, 20267, &basepoints[0], NULL, NULL, true, NULL, triggeredByAura); return SPELL_AURA_PROC_OK; } // Judgement of Wisdom @@ -1971,7 +1971,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura { // 2% of maximum base mana basepoints[0] = int32(pVictim->GetCreateMana() * 2 / 100); - pVictim->CastCustomSpell(pVictim, 20268, &basepoints[0], nullptr, nullptr, true, nullptr, triggeredByAura); + pVictim->CastCustomSpell(pVictim, 20268, &basepoints[0], NULL, NULL, true, NULL, triggeredByAura); } return SPELL_AURA_PROC_OK; } @@ -2073,7 +2073,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura } } if (stacks >= 5) - CastSpell(target, 42463, true, nullptr, triggeredByAura); + CastSpell(target, 42463, true, NULL, triggeredByAura); break; } // Judgements of the Wise @@ -2088,7 +2088,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura triggered_spell_id = 31930; // Replenishment - CastSpell(this, 57669, true, nullptr, triggeredByAura); + CastSpell(this, 57669, true, NULL, triggeredByAura); break; // Paladin Tier 6 Trinket (Ashtongue Talisman of Zeal) case 40470: @@ -2131,7 +2131,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura return SPELL_AURA_PROC_FAILED; // find caster main aura at beacon - Aura* dummy = nullptr; + Aura* dummy = NULL; Unit::AuraList const& baa = beacon->GetAurasByType(SPELL_AURA_PERIODIC_TRIGGER_SPELL); for (Unit::AuraList::const_iterator i = baa.begin(); i != baa.end(); ++i) { @@ -2150,7 +2150,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura basepoints[0] = triggeredByAura->GetModifier()->m_amount * damage / 100; // cast with original caster set but beacon to beacon for apply caster mods and avoid LoS check - beacon->CastCustomSpell(beacon, triggered_spell_id, &basepoints[0], nullptr, nullptr, true, castItem, triggeredByAura, pVictim->GetObjectGuid()); + beacon->CastCustomSpell(beacon, triggered_spell_id, &basepoints[0], NULL, NULL, true, castItem, triggeredByAura, pVictim->GetObjectGuid()); return SPELL_AURA_PROC_OK; } // Seal of Corruption (damage calc on apply aura) @@ -2175,7 +2175,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura } } if (stacks >= 5) - CastSpell(target, 53739, true, nullptr, triggeredByAura); + CastSpell(target, 53739, true, NULL, triggeredByAura); break; } // Glyph of Holy Light @@ -2386,7 +2386,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura // Attack Twice for (uint32 i = 0; i < 2; ++i) - CastCustomSpell(pVictim, triggered_spell_id, &basepoints[0], nullptr, nullptr, true, castItem, triggeredByAura); + CastCustomSpell(pVictim, triggered_spell_id, &basepoints[0], NULL, NULL, true, castItem, triggeredByAura); return SPELL_AURA_PROC_OK; } @@ -2886,9 +2886,9 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura if (basepoints[EFFECT_INDEX_0] || basepoints[EFFECT_INDEX_1] || basepoints[EFFECT_INDEX_2]) CastCustomSpell(target, triggered_spell_id, - basepoints[EFFECT_INDEX_0] ? &basepoints[EFFECT_INDEX_0] : nullptr, - basepoints[EFFECT_INDEX_1] ? &basepoints[EFFECT_INDEX_1] : nullptr, - basepoints[EFFECT_INDEX_2] ? &basepoints[EFFECT_INDEX_2] : nullptr, + basepoints[EFFECT_INDEX_0] ? &basepoints[EFFECT_INDEX_0] : NULL, + basepoints[EFFECT_INDEX_1] ? &basepoints[EFFECT_INDEX_1] : NULL, + basepoints[EFFECT_INDEX_2] ? &basepoints[EFFECT_INDEX_2] : NULL, true, castItem, triggeredByAura); else CastSpell(target, triggered_spell_id, true, castItem, triggeredByAura); @@ -2912,14 +2912,14 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d // Set trigger spell id, target, custom basepoints SpellEffectEntry const* spellEffect = auraSpellInfo->GetSpellEffect(triggeredByAura->GetEffIndex()); uint32 trigger_spell_id = spellEffect ? spellEffect->EffectTriggerSpell : 0; - Unit* target = nullptr; + Unit* target = NULL; int32 basepoints[MAX_EFFECT_INDEX] = {0, 0, 0}; if (triggeredByAura->GetModifier()->m_auraname == SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE) basepoints[0] = triggerAmount; Item* castItem = triggeredByAura->GetCastItemGuid() && GetTypeId() == TYPEID_PLAYER - ? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGuid()) : nullptr; + ? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGuid()) : NULL; // Try handle unknown trigger spells // Custom requirements (not listed in procEx) Warning! damage dealing after this @@ -3112,7 +3112,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d int32 basepoints2 = (int32)(damage * 0.45f); if (Unit* caster = triggeredByAura->GetCaster()) // Actually this spell should be sent with SMSG_SPELL_START - CastCustomSpell(caster, 69034, &basepoints2, nullptr, nullptr, true, nullptr, triggeredByAura, GetObjectGuid()); + CastCustomSpell(caster, 69034, &basepoints2, NULL, NULL, true, NULL, triggeredByAura, GetObjectGuid()); return SPELL_AURA_PROC_OK; } @@ -3213,7 +3213,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d { // basepoints of trigger spell stored in dummyeffect of spellProto int32 basepoints2 = GetMaxPower(POWER_MANA) * (*i)->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_2) / 100; - CastCustomSpell(this, 18371, &basepoints2, nullptr, nullptr, true, castItem, triggeredByAura); + CastCustomSpell(this, 18371, &basepoints2, NULL, NULL, true, castItem, triggeredByAura); break; } } @@ -3447,7 +3447,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d if (!pVictim || !pVictim->IsAlive()) return SPELL_AURA_PROC_FAILED; // stacking - CastSpell(this, 37658, true, nullptr, triggeredByAura); + CastSpell(this, 37658, true, NULL, triggeredByAura); Aura* dummy = GetDummyAura(37658); // release at 3 aura in stack (cont contain in basepoint of trigger aura) @@ -3471,7 +3471,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d if (!pVictim || !pVictim->IsAlive()) return SPELL_AURA_PROC_FAILED; // stacking - CastSpell(this, 54842, true, nullptr, triggeredByAura); + CastSpell(this, 54842, true, NULL, triggeredByAura); // counting Aura* dummy = GetDummyAura(54842); @@ -3492,7 +3492,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d uint32 castSpell = auraSpellInfo->Id == 67758 ? 67759 : 67713; // stacking - CastSpell(this, castSpell, true, nullptr, triggeredByAura); + CastSpell(this, castSpell, true, NULL, triggeredByAura); // counting Aura* dummy = GetDummyAura(castSpell); @@ -3805,7 +3805,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d return SPELL_AURA_PROC_FAILED; // try detect target manually if not set - if (target == nullptr) + if (target == NULL) target = !(procFlags & PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL) && IsPositiveSpell(trigger_spell_id) ? this : pVictim; // default case @@ -3814,9 +3814,9 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d if (basepoints[EFFECT_INDEX_0] || basepoints[EFFECT_INDEX_1] || basepoints[EFFECT_INDEX_2]) CastCustomSpell(target, trigger_spell_id, - basepoints[EFFECT_INDEX_0] ? &basepoints[EFFECT_INDEX_0] : nullptr, - basepoints[EFFECT_INDEX_1] ? &basepoints[EFFECT_INDEX_1] : nullptr, - basepoints[EFFECT_INDEX_2] ? &basepoints[EFFECT_INDEX_2] : nullptr, + basepoints[EFFECT_INDEX_0] ? &basepoints[EFFECT_INDEX_0] : NULL, + basepoints[EFFECT_INDEX_1] ? &basepoints[EFFECT_INDEX_1] : NULL, + basepoints[EFFECT_INDEX_2] ? &basepoints[EFFECT_INDEX_2] : NULL, true, castItem, triggeredByAura); else CastSpell(target, trigger_spell_id, true, castItem, triggeredByAura); diff --git a/src/game/WorldHandlers/WaypointManager.h b/src/game/WorldHandlers/WaypointManager.h index 892e823a9..a6a46c053 100644 --- a/src/game/WorldHandlers/WaypointManager.h +++ b/src/game/WorldHandlers/WaypointManager.h @@ -121,19 +121,19 @@ class WaypointManager break; case PATH_FROM_ENTRY: if (pathId >= 0xFF || pathId < 0) - return nullptr; + return NULL; key = (entry << 8) + pathId; wpMap = &m_pathTemplateMap; break; case PATH_FROM_EXTERNAL: if (pathId >= 0xFF || pathId < 0) - return nullptr; + return NULL; key = (entry << 8) + pathId; wpMap = &m_externalPathTemplateMap; break; case PATH_NO_PATH: default: - return nullptr; + return NULL; } WaypointPathMap::iterator find = wpMap->find(key); return find != wpMap->end() ? &find->second : NULL;