refactor(Core): replace NULL with nullptr (#4593)
This commit is contained in:
parent
dbefa17a53
commit
28f1dc5c0c
231 changed files with 923 additions and 923 deletions
|
|
@ -48,7 +48,7 @@ protected:
|
|||
{
|
||||
sLog->outError("Out of file descriptors, suspending incoming connections for 10 seconds");
|
||||
reactor()->remove_handler(this, ACE_Event_Handler::ACCEPT_MASK | ACE_Event_Handler::DONT_CALL);
|
||||
reactor()->schedule_timer(this, NULL, ACE_Time_Value(10));
|
||||
reactor()->schedule_timer(this, nullptr, ACE_Time_Value(10));
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -443,7 +443,7 @@ void PetAI::OwnerAttacked(Unit* target)
|
|||
// Called when owner attacks something. Allows defensive pets to know
|
||||
// that they need to assist
|
||||
|
||||
// Target might be NULL if called from spell with invalid cast targets
|
||||
// Target might be nullptr if called from spell with invalid cast targets
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ void UnitAI::DoCastAOE(uint32 spellId, bool triggered)
|
|||
if (!triggered && me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
me->CastSpell((Unit*)NULL, spellId, triggered);
|
||||
me->CastSpell((Unit*)nullptr, spellId, triggered);
|
||||
}
|
||||
|
||||
#define UPDATE_TARGET(a) {if (AIInfo->target<a) AIInfo->target=a;}
|
||||
|
|
|
|||
|
|
@ -26,12 +26,12 @@ void CreatureAI::OnCharmed(bool /*apply*/)
|
|||
AISpellInfoType* UnitAI::AISpellInfo;
|
||||
AISpellInfoType* GetAISpellInfo(uint32 i) { return &CreatureAI::AISpellInfo[i]; }
|
||||
|
||||
void CreatureAI::Talk(uint8 id, WorldObject const* whisperTarget /*= NULL*/)
|
||||
void CreatureAI::Talk(uint8 id, WorldObject const* whisperTarget /*= nullptr*/)
|
||||
{
|
||||
sCreatureTextMgr->SendChat(me, id, whisperTarget);
|
||||
}
|
||||
|
||||
void CreatureAI::DoZoneInCombat(Creature* creature /*= NULL*/, float maxRangeToNearestTarget /* = 50.0f*/)
|
||||
void CreatureAI::DoZoneInCombat(Creature* creature /*= nullptr*/, float maxRangeToNearestTarget /* = 50.0f*/)
|
||||
{
|
||||
if (!creature)
|
||||
creature = me;
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ public:
|
|||
// Called at reaching home after evade
|
||||
virtual void JustReachedHome() {}
|
||||
|
||||
void DoZoneInCombat(Creature* creature = NULL, float maxRangeToNearestTarget = 50.0f);
|
||||
void DoZoneInCombat(Creature* creature = nullptr, float maxRangeToNearestTarget = 50.0f);
|
||||
|
||||
// Called at text emote receive from player
|
||||
virtual void ReceiveEmote(Player* /*player*/, uint32 /*emoteId*/) {}
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ namespace FactorySelector
|
|||
ainame = (ai_factory == nullptr) ? "NullCreatureAI" : ai_factory->key();
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "Creature %u used AI is %s.", creature->GetGUIDLow(), ainame.c_str());
|
||||
#endif
|
||||
return (ai_factory == NULL ? new NullCreatureAI(creature) : ai_factory->Create(creature));
|
||||
return (ai_factory == nullptr ? new NullCreatureAI(creature) : ai_factory->Create(creature));
|
||||
}
|
||||
|
||||
MovementGenerator* selectMovementGenerator(Creature* creature)
|
||||
|
|
@ -114,7 +114,7 @@ namespace FactorySelector
|
|||
}
|
||||
}*/
|
||||
|
||||
return (mv_factory == NULL ? NULL : mv_factory->Create(creature));
|
||||
return (mv_factory == nullptr ? nullptr : mv_factory->Create(creature));
|
||||
}
|
||||
|
||||
GameObjectAI* SelectGameObjectAI(GameObject* go)
|
||||
|
|
@ -130,10 +130,10 @@ namespace FactorySelector
|
|||
//future goAI types go here
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
std::string ainame = (ai_factory == NULL || go->GetScriptId()) ? "NullGameObjectAI" : ai_factory->key();
|
||||
std::string ainame = (ai_factory == nullptr || go->GetScriptId()) ? "NullGameObjectAI" : ai_factory->key();
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "GameObject %u used AI is %s.", go->GetGUIDLow(), ainame.c_str());
|
||||
#endif
|
||||
|
||||
return (ai_factory == NULL ? new NullGameObjectAI(go) : ai_factory->Create(go));
|
||||
return (ai_factory == nullptr ? new NullGameObjectAI(go) : ai_factory->Create(go));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -407,7 +407,7 @@ void npc_escortAI::SetRun(bool on)
|
|||
}
|
||||
|
||||
//TODO: get rid of this many variables passed in function.
|
||||
void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false */, uint64 playerGUID /* = 0 */, Quest const* quest /* = NULL */, bool instantRespawn /* = false */, bool canLoopPath /* = false */, bool resetWaypoints /* = true */)
|
||||
void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false */, uint64 playerGUID /* = 0 */, Quest const* quest /* = nullptr */, bool instantRespawn /* = false */, bool canLoopPath /* = false */, bool resetWaypoints /* = true */)
|
||||
{
|
||||
if (me->GetVictim())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public:
|
|||
virtual void WaypointReached(uint32 pointId) = 0;
|
||||
virtual void WaypointStart(uint32 /*pointId*/) {}
|
||||
|
||||
void Start(bool isActiveAttacker = true, bool run = false, uint64 playerGUID = 0, Quest const* quest = NULL, bool instantRespawn = false, bool canLoopPath = false, bool resetWaypoints = true);
|
||||
void Start(bool isActiveAttacker = true, bool run = false, uint64 playerGUID = 0, Quest const* quest = nullptr, bool instantRespawn = false, bool canLoopPath = false, bool resetWaypoints = true);
|
||||
|
||||
void SetRun(bool on = true);
|
||||
void SetEscortPaused(bool on);
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ void SmartAI::StartPath(bool run, uint32 path, bool repeat, Unit* invoker)
|
|||
GenerateWayPointArray(&pathPoints);
|
||||
|
||||
me->GetMotionMaster()->MoveSplinePath(&pathPoints);
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_START, NULL, wp->id, GetScript()->GetPathId());
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_START, nullptr, wp->id, GetScript()->GetPathId());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -248,7 +248,7 @@ void SmartAI::PausePath(uint32 delay, bool forced)
|
|||
me->StopMoving();
|
||||
me->GetMotionMaster()->MoveIdle();//force stop
|
||||
}
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_PAUSED, NULL, mCurrentWPID, GetScript()->GetPathId());
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_PAUSED, nullptr, mCurrentWPID, GetScript()->GetPathId());
|
||||
}
|
||||
|
||||
void SmartAI::StopPath(uint32 DespawnTime, uint32 quest, bool fail)
|
||||
|
|
@ -266,7 +266,7 @@ void SmartAI::StopPath(uint32 DespawnTime, uint32 quest, bool fail)
|
|||
|
||||
me->StopMoving();
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_STOPPED, NULL, mCurrentWPID, GetScript()->GetPathId());
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_STOPPED, nullptr, mCurrentWPID, GetScript()->GetPathId());
|
||||
EndPath(fail);
|
||||
}
|
||||
|
||||
|
|
@ -335,7 +335,7 @@ void SmartAI::EndPath(bool fail)
|
|||
return;
|
||||
}
|
||||
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_ENDED, NULL, mCurrentWPID, GetScript()->GetPathId());
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_ENDED, nullptr, mCurrentWPID, GetScript()->GetPathId());
|
||||
mCurrentWPID = 0;
|
||||
|
||||
if (mCanRepeatPath)
|
||||
|
|
@ -398,7 +398,7 @@ void SmartAI::UpdatePath(const uint32 diff)
|
|||
{
|
||||
if (!me->IsInCombat() && !HasEscortState(SMART_ESCORT_RETURNING) && (mWPReached || mForcedPaused))
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_RESUMED, NULL, mCurrentWPID, GetScript()->GetPathId());
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_RESUMED, nullptr, mCurrentWPID, GetScript()->GetPathId());
|
||||
RemoveEscortState(SMART_ESCORT_PAUSED);
|
||||
if (mForcedPaused)// if paused between 2 wps resend movement
|
||||
{
|
||||
|
|
@ -565,7 +565,7 @@ void SmartAI::MovepointReached(uint32 id)
|
|||
}
|
||||
|
||||
mWPReached = true;
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_REACHED, NULL, mCurrentWPID);
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_WAYPOINT_REACHED, nullptr, mCurrentWPID);
|
||||
|
||||
if (mLastWP)
|
||||
{
|
||||
|
|
@ -602,7 +602,7 @@ void SmartAI::MovementInform(uint32 MovementType, uint32 Data)
|
|||
if (MovementType == POINT_MOTION_TYPE && Data == SMART_ESCORT_LAST_OOC_POINT)
|
||||
me->ClearUnitState(UNIT_STATE_EVADE);
|
||||
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_MOVEMENTINFORM, NULL, MovementType, Data);
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_MOVEMENTINFORM, nullptr, MovementType, Data);
|
||||
if (!HasEscortState(SMART_ESCORT_ESCORTING))
|
||||
return;
|
||||
|
||||
|
|
@ -857,7 +857,7 @@ void SmartAI::UpdateAIWhileCharmed(const uint32 /*diff*/)
|
|||
|
||||
void SmartAI::CorpseRemoved(uint32& respawnDelay)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_CORPSE_REMOVED, NULL, respawnDelay);
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_CORPSE_REMOVED, nullptr, respawnDelay);
|
||||
|
||||
// xinef: end escort upon corpse remove, safe check in case of immediate despawn
|
||||
if (IsEscorted())
|
||||
|
|
@ -882,12 +882,12 @@ void SmartAI::InitializeAI()
|
|||
|
||||
void SmartAI::OnCharmed(bool apply)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_CHARMED, NULL, 0, 0, apply);
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_CHARMED, nullptr, 0, 0, apply);
|
||||
}
|
||||
|
||||
void SmartAI::DoAction(int32 param)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_ACTION_DONE, NULL, param);
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_ACTION_DONE, nullptr, param);
|
||||
}
|
||||
|
||||
uint32 SmartAI::GetData(uint32 /*id*/) const
|
||||
|
|
@ -897,7 +897,7 @@ uint32 SmartAI::GetData(uint32 /*id*/) const
|
|||
|
||||
void SmartAI::SetData(uint32 id, uint32 value)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_DATA_SET, NULL, id, value);
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_DATA_SET, nullptr, id, value);
|
||||
}
|
||||
|
||||
void SmartAI::SetGUID(uint64 /*guid*/, int32 /*id*/)
|
||||
|
|
@ -1052,7 +1052,7 @@ void SmartAI::SetScript9(SmartScriptHolder& e, uint32 entry, Unit* invoker)
|
|||
|
||||
void SmartAI::sOnGameEvent(bool start, uint16 eventId)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(start ? SMART_EVENT_GAME_EVENT_START : SMART_EVENT_GAME_EVENT_END, NULL, eventId);
|
||||
GetScript()->ProcessEventsFor(start ? SMART_EVENT_GAME_EVENT_START : SMART_EVENT_GAME_EVENT_END, nullptr, eventId);
|
||||
}
|
||||
|
||||
void SmartAI::OnSpellClick(Unit* clicker, bool& /*result*/)
|
||||
|
|
@ -1100,14 +1100,14 @@ bool SmartGameObjectAI::GossipHello(Player* player, bool reportUse)
|
|||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartGameObjectAI::GossipHello");
|
||||
#endif
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_GOSSIP_HELLO, player, (uint32)reportUse, 0, false, NULL, go);
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_GOSSIP_HELLO, player, (uint32)reportUse, 0, false, nullptr, go);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Called when a player selects a gossip item in the gameobject's gossip menu.
|
||||
bool SmartGameObjectAI::GossipSelect(Player* player, uint32 sender, uint32 action)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_GOSSIP_SELECT, player, sender, action, false, NULL, go);
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_GOSSIP_SELECT, player, sender, action, false, nullptr, go);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1120,26 +1120,26 @@ bool SmartGameObjectAI::GossipSelectCode(Player* /*player*/, uint32 /*sender*/,
|
|||
// Called when a player accepts a quest from the gameobject.
|
||||
bool SmartGameObjectAI::QuestAccept(Player* player, Quest const* quest)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_ACCEPTED_QUEST, player, quest->GetQuestId(), 0, false, NULL, go);
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_ACCEPTED_QUEST, player, quest->GetQuestId(), 0, false, nullptr, go);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Called when a player selects a quest reward.
|
||||
bool SmartGameObjectAI::QuestReward(Player* player, Quest const* quest, uint32 opt)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_REWARD_QUEST, player, quest->GetQuestId(), opt, false, NULL, go);
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_REWARD_QUEST, player, quest->GetQuestId(), opt, false, nullptr, go);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Called when the gameobject is destroyed (destructible buildings only).
|
||||
void SmartGameObjectAI::Destroyed(Player* player, uint32 eventId)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_DEATH, player, eventId, 0, false, NULL, go);
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_DEATH, player, eventId, 0, false, nullptr, go);
|
||||
}
|
||||
|
||||
void SmartGameObjectAI::SetData(uint32 id, uint32 value)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_DATA_SET, NULL, id, value);
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_DATA_SET, nullptr, id, value);
|
||||
}
|
||||
|
||||
void SmartGameObjectAI::SetScript9(SmartScriptHolder& e, uint32 entry, Unit* invoker)
|
||||
|
|
@ -1151,7 +1151,7 @@ void SmartGameObjectAI::SetScript9(SmartScriptHolder& e, uint32 entry, Unit* inv
|
|||
|
||||
void SmartGameObjectAI::OnGameEvent(bool start, uint16 eventId)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(start ? SMART_EVENT_GAME_EVENT_START : SMART_EVENT_GAME_EVENT_END, NULL, eventId);
|
||||
GetScript()->ProcessEventsFor(start ? SMART_EVENT_GAME_EVENT_START : SMART_EVENT_GAME_EVENT_END, nullptr, eventId);
|
||||
}
|
||||
|
||||
void SmartGameObjectAI::OnStateChanged(uint32 state, Unit* unit)
|
||||
|
|
@ -1161,7 +1161,7 @@ void SmartGameObjectAI::OnStateChanged(uint32 state, Unit* unit)
|
|||
|
||||
void SmartGameObjectAI::EventInform(uint32 eventId)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_GO_EVENT_INFORM, NULL, eventId);
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_GO_EVENT_INFORM, nullptr, eventId);
|
||||
}
|
||||
|
||||
void SmartGameObjectAI::SpellHit(Unit* unit, const SpellInfo* spellInfo)
|
||||
|
|
|
|||
|
|
@ -749,7 +749,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||
{
|
||||
if (go)
|
||||
{
|
||||
// Xinef: may be NULL!
|
||||
// Xinef: may be nullptr!
|
||||
go->CastSpell((*itr)->ToUnit(), e.action.cast.spell);
|
||||
}
|
||||
|
||||
|
|
@ -2104,7 +2104,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||
break;
|
||||
}
|
||||
case SMART_ACTION_TRIGGER_TIMED_EVENT:
|
||||
ProcessEventsFor((SMART_EVENT)SMART_EVENT_TIMED_EVENT_TRIGGERED, NULL, e.action.timeEvent.id);
|
||||
ProcessEventsFor((SMART_EVENT)SMART_EVENT_TIMED_EVENT_TRIGGERED, nullptr, e.action.timeEvent.id);
|
||||
|
||||
// xinef: remove this event if not repeatable
|
||||
if (e.event.event_flags & SMART_EVENT_FLAG_NOT_REPEATABLE)
|
||||
|
|
@ -2987,7 +2987,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||
case SMART_ACTION_TRIGGER_RANDOM_TIMED_EVENT:
|
||||
{
|
||||
uint32 eventId = urand(e.action.randomTimedEvent.minId, e.action.randomTimedEvent.maxId);
|
||||
ProcessEventsFor((SMART_EVENT)SMART_EVENT_TIMED_EVENT_TRIGGERED, NULL, eventId);
|
||||
ProcessEventsFor((SMART_EVENT)SMART_EVENT_TIMED_EVENT_TRIGGERED, nullptr, eventId);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SET_HOVER:
|
||||
|
|
@ -3427,7 +3427,7 @@ SmartScriptHolder SmartScript::CreateSmartEvent(SMART_EVENT e, uint32 event_flag
|
|||
return script;
|
||||
}
|
||||
|
||||
ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*= NULL*/)
|
||||
ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*= nullptr*/)
|
||||
{
|
||||
Unit* scriptTrigger = nullptr;
|
||||
if (invoker)
|
||||
|
|
@ -4297,7 +4297,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
|
|||
{
|
||||
if (e.event.gameEvent.gameEventId != var0)
|
||||
return;
|
||||
ProcessAction(e, NULL, var0);
|
||||
ProcessAction(e, nullptr, var0);
|
||||
break;
|
||||
}
|
||||
case SMART_EVENT_GO_STATE_CHANGED:
|
||||
|
|
@ -4311,7 +4311,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
|
|||
{
|
||||
if (e.event.eventInform.eventId != var0)
|
||||
return;
|
||||
ProcessAction(e, NULL, var0);
|
||||
ProcessAction(e, nullptr, var0);
|
||||
break;
|
||||
}
|
||||
case SMART_EVENT_ACTION_DONE:
|
||||
|
|
@ -4518,7 +4518,7 @@ void SmartScript::UpdateTimer(SmartScriptHolder& e, uint32 const diff)
|
|||
if (e.GetEventType() == SMART_EVENT_UPDATE_IC && (!me || !me->IsInCombat()))
|
||||
return;
|
||||
|
||||
if (e.GetEventType() == SMART_EVENT_UPDATE_OOC && (me && me->IsInCombat()))//can be used with me=NULL (go script)
|
||||
if (e.GetEventType() == SMART_EVENT_UPDATE_OOC && (me && me->IsInCombat()))//can be used with me=nullptr (go script)
|
||||
return;
|
||||
|
||||
if (e.timer < diff)
|
||||
|
|
@ -4654,7 +4654,7 @@ void SmartScript::OnUpdate(uint32 const diff)
|
|||
mTalkerEntry = 0;
|
||||
mTextTimer = 0;
|
||||
mUseTextTimer = false;
|
||||
ProcessEventsFor(SMART_EVENT_TEXT_OVER, NULL, textID, entry);
|
||||
ProcessEventsFor(SMART_EVENT_TEXT_OVER, nullptr, textID, entry);
|
||||
}
|
||||
else mTextTimer -= diff;
|
||||
}
|
||||
|
|
@ -4717,7 +4717,7 @@ void SmartScript::GetScript()
|
|||
else if (trigger)
|
||||
{
|
||||
e = sSmartScriptMgr->GetScript((int32)trigger->entry, mScriptType);
|
||||
FillScript(e, NULL, trigger);
|
||||
FillScript(e, nullptr, trigger);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4756,7 +4756,7 @@ void SmartScript::OnInitialize(WorldObject* obj, AreaTrigger const* at)
|
|||
}
|
||||
else
|
||||
{
|
||||
sLog->outError("SmartScript::OnInitialize: !WARNING! Initialized objects are NULL.");
|
||||
sLog->outError("SmartScript::OnInitialize: !WARNING! Initialized objects are nullptr.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,14 +25,14 @@ public:
|
|||
void GetScript();
|
||||
void FillScript(SmartAIEventList e, WorldObject* obj, AreaTrigger const* at);
|
||||
|
||||
void ProcessEventsFor(SMART_EVENT e, Unit* unit = NULL, uint32 var0 = 0, uint32 var1 = 0, bool bvar = false, const SpellInfo* spell = NULL, GameObject* gob = nullptr);
|
||||
void ProcessEvent(SmartScriptHolder& e, Unit* unit = NULL, uint32 var0 = 0, uint32 var1 = 0, bool bvar = false, const SpellInfo* spell = NULL, GameObject* gob = nullptr);
|
||||
void ProcessEventsFor(SMART_EVENT e, Unit* unit = nullptr, uint32 var0 = 0, uint32 var1 = 0, bool bvar = false, const SpellInfo* spell = nullptr, GameObject* gob = nullptr);
|
||||
void ProcessEvent(SmartScriptHolder& e, Unit* unit = nullptr, uint32 var0 = 0, uint32 var1 = 0, bool bvar = false, const SpellInfo* spell = nullptr, GameObject* gob = nullptr);
|
||||
bool CheckTimer(SmartScriptHolder const& e) const;
|
||||
void RecalcTimer(SmartScriptHolder& e, uint32 min, uint32 max);
|
||||
void UpdateTimer(SmartScriptHolder& e, uint32 const diff);
|
||||
void InitTimer(SmartScriptHolder& e);
|
||||
void ProcessAction(SmartScriptHolder& e, Unit* unit = NULL, uint32 var0 = 0, uint32 var1 = 0, bool bvar = false, const SpellInfo* spell = NULL, GameObject* gob = nullptr);
|
||||
void ProcessTimedAction(SmartScriptHolder& e, uint32 const& min, uint32 const& max, Unit* unit = NULL, uint32 var0 = 0, uint32 var1 = 0, bool bvar = false, const SpellInfo* spell = NULL, GameObject* gob = nullptr);
|
||||
void ProcessAction(SmartScriptHolder& e, Unit* unit = nullptr, uint32 var0 = 0, uint32 var1 = 0, bool bvar = false, const SpellInfo* spell = nullptr, GameObject* gob = nullptr);
|
||||
void ProcessTimedAction(SmartScriptHolder& e, uint32 const& min, uint32 const& max, Unit* unit = nullptr, uint32 var0 = 0, uint32 var1 = 0, bool bvar = false, const SpellInfo* spell = nullptr, GameObject* gob = nullptr);
|
||||
ObjectList* GetTargets(SmartScriptHolder const& e, Unit* invoker = nullptr);
|
||||
ObjectList* GetWorldObjectsInDist(float dist);
|
||||
void InstallTemplate(SmartScriptHolder const& e);
|
||||
|
|
@ -145,7 +145,7 @@ public:
|
|||
else
|
||||
mCounterList.insert(std::make_pair(id, value));
|
||||
|
||||
ProcessEventsFor(SMART_EVENT_COUNTER_SET, NULL, id);
|
||||
ProcessEventsFor(SMART_EVENT_COUNTER_SET, nullptr, id);
|
||||
}
|
||||
|
||||
uint32 GetCounterValue(uint32 id)
|
||||
|
|
|
|||
|
|
@ -1849,7 +1849,7 @@ private:
|
|||
{
|
||||
if (!data)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u Parameter can not be NULL, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u Parameter can not be nullptr, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -755,7 +755,7 @@ static const uint32 achievIdForDungeon[][4] =
|
|||
/**
|
||||
* this function will be called whenever the user might have done a criteria relevant action
|
||||
*/
|
||||
void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1 /*= 0*/, uint32 miscValue2 /*= 0*/, Unit* unit /*= NULL*/)
|
||||
void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1 /*= 0*/, uint32 miscValue2 /*= 0*/, Unit* unit /*= nullptr*/)
|
||||
{
|
||||
// disable for gamemasters with GM-mode enabled
|
||||
if (m_player->IsGameMaster())
|
||||
|
|
|
|||
|
|
@ -477,7 +477,7 @@ void AuctionHouseObject::Update()
|
|||
time_t checkTime = sWorld->GetGameTime() + 60;
|
||||
///- Handle expired auctions
|
||||
|
||||
// If storage is empty, no need to update. next == NULL in this case.
|
||||
// If storage is empty, no need to update. next == nullptr in this case.
|
||||
if (AuctionsMap.empty())
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -463,7 +463,7 @@ void Battlefield::SendWarningToAllInZone(uint32 entry)
|
|||
{
|
||||
if (Unit* unit = ObjectAccessor::FindUnit(StalkerGuid))
|
||||
if (Creature* stalker = unit->ToCreature())
|
||||
sCreatureTextMgr->SendChat(stalker, (uint8)entry, NULL, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_ZONE);
|
||||
sCreatureTextMgr->SendChat(stalker, (uint8)entry, nullptr, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_ZONE);
|
||||
}
|
||||
|
||||
void Battlefield::SendWarningToPlayer(Player* player, uint32 entry)
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public:
|
|||
virtual void SendChangePhase();
|
||||
|
||||
bool SetCapturePointData(GameObject* capturePoint);
|
||||
GameObject* GetCapturePointGo() { return ObjectAccessor::GetObjectInWorld(m_capturePoint, (GameObject*)NULL); }
|
||||
GameObject* GetCapturePointGo() { return ObjectAccessor::GetObjectInWorld(m_capturePoint, (GameObject*)nullptr); }
|
||||
GameObject* GetCapturePointGo(WorldObject* obj) { return ObjectAccessor::GetGameObject(*obj, m_capturePoint); }
|
||||
|
||||
TeamId GetTeamId() { return m_team; }
|
||||
|
|
|
|||
|
|
@ -373,7 +373,7 @@ public:
|
|||
bool SetupBattlefield() override;
|
||||
|
||||
/// Return pointer to relic object
|
||||
GameObject* GetRelic() { return ObjectAccessor::GetObjectInWorld(m_titansRelic, (GameObject*)NULL); }
|
||||
GameObject* GetRelic() { return ObjectAccessor::GetObjectInWorld(m_titansRelic, (GameObject*)nullptr); }
|
||||
|
||||
/// Define relic object
|
||||
//void SetRelic(GameObject* relic) { m_titansRelic = relic; }
|
||||
|
|
@ -1136,11 +1136,11 @@ struct BfWGGameObjectBuilding
|
|||
break;
|
||||
}
|
||||
|
||||
GameObject* go = ObjectAccessor::GetObjectInWorld(m_Build, (GameObject*)NULL);
|
||||
GameObject* go = ObjectAccessor::GetObjectInWorld(m_Build, (GameObject*)nullptr);
|
||||
if (go)
|
||||
{
|
||||
// Rebuild gameobject
|
||||
go->SetDestructibleState(GO_DESTRUCTIBLE_REBUILDING, NULL, true);
|
||||
go->SetDestructibleState(GO_DESTRUCTIBLE_REBUILDING, nullptr, true);
|
||||
go->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[m_Team]);
|
||||
}
|
||||
|
||||
|
|
@ -1190,7 +1190,7 @@ struct BfWGGameObjectBuilding
|
|||
{
|
||||
// Inform the global wintergrasp script of the destruction of this object
|
||||
case BATTLEFIELD_WG_OBJECTTYPE_TOWER:
|
||||
m_WG->UpdatedDestroyedTowerCount(TeamId(m_Team), ObjectAccessor::GetObjectInWorld(m_Build, (GameObject*)NULL));
|
||||
m_WG->UpdatedDestroyedTowerCount(TeamId(m_Team), ObjectAccessor::GetObjectInWorld(m_Build, (GameObject*)nullptr));
|
||||
break;
|
||||
case BATTLEFIELD_WG_OBJECTTYPE_DOOR_LAST:
|
||||
m_WG->SetRelicInteractible(true);
|
||||
|
|
@ -1202,7 +1202,7 @@ struct BfWGGameObjectBuilding
|
|||
case BATTLEFIELD_WG_OBJECTTYPE_DOOR:
|
||||
case BATTLEFIELD_WG_OBJECTTYPE_WALL:
|
||||
case BATTLEFIELD_WG_OBJECTTYPE_KEEP_TOWER:
|
||||
m_WG->UpdatedDestroyedTowerCount(TeamId(m_Team), ObjectAccessor::GetObjectInWorld(m_Build, (GameObject*)NULL));
|
||||
m_WG->UpdatedDestroyedTowerCount(TeamId(m_Team), ObjectAccessor::GetObjectInWorld(m_Build, (GameObject*)nullptr));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -1247,7 +1247,7 @@ struct BfWGGameObjectBuilding
|
|||
{
|
||||
case BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_INTACT:
|
||||
case BATTLEFIELD_WG_OBJECTSTATE_HORDE_INTACT:
|
||||
gobj->SetDestructibleState(GO_DESTRUCTIBLE_REBUILDING, NULL, true);
|
||||
gobj->SetDestructibleState(GO_DESTRUCTIBLE_REBUILDING, nullptr, true);
|
||||
break;
|
||||
case BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_DESTROY:
|
||||
case BATTLEFIELD_WG_OBJECTSTATE_HORDE_DESTROY:
|
||||
|
|
@ -1379,7 +1379,7 @@ struct BfWGGameObjectBuilding
|
|||
|
||||
void UpdateTurretAttack(bool disable)
|
||||
{
|
||||
GameObject* build = ObjectAccessor::GetObjectInWorld(m_Build, (GameObject*)NULL);
|
||||
GameObject* build = ObjectAccessor::GetObjectInWorld(m_Build, (GameObject*)nullptr);
|
||||
if (!build)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -410,13 +410,13 @@ inline void Battleground::_ProcessProgress(uint32 diff)
|
|||
if (newtime > (MINUTE * IN_MILLISECONDS))
|
||||
{
|
||||
if (newtime / (MINUTE * IN_MILLISECONDS) != m_PrematureCountDownTimer / (MINUTE * IN_MILLISECONDS))
|
||||
PSendMessageToAll(LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING, CHAT_MSG_SYSTEM, NULL, (uint32)(m_PrematureCountDownTimer / (MINUTE * IN_MILLISECONDS)));
|
||||
PSendMessageToAll(LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING, CHAT_MSG_SYSTEM, nullptr, (uint32)(m_PrematureCountDownTimer / (MINUTE * IN_MILLISECONDS)));
|
||||
}
|
||||
else
|
||||
{
|
||||
//announce every 15 seconds
|
||||
if (newtime / (15 * IN_MILLISECONDS) != m_PrematureCountDownTimer / (15 * IN_MILLISECONDS))
|
||||
PSendMessageToAll(LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING_SECS, CHAT_MSG_SYSTEM, NULL, (uint32)(m_PrematureCountDownTimer / IN_MILLISECONDS));
|
||||
PSendMessageToAll(LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING_SECS, CHAT_MSG_SYSTEM, nullptr, (uint32)(m_PrematureCountDownTimer / IN_MILLISECONDS));
|
||||
}
|
||||
m_PrematureCountDownTimer = newtime;
|
||||
}
|
||||
|
|
@ -557,7 +557,7 @@ inline void Battleground::_ProcessJoin(uint32 diff)
|
|||
if (GetStatus() == STATUS_IN_PROGRESS)
|
||||
{
|
||||
for (ToBeTeleportedMap::const_iterator itr = m_ToBeTeleported.begin(); itr != m_ToBeTeleported.end(); ++itr)
|
||||
if (Player* p = ObjectAccessor::GetObjectInOrOutOfWorld(itr->first, (Player*)NULL))
|
||||
if (Player* p = ObjectAccessor::GetObjectInOrOutOfWorld(itr->first, (Player*)nullptr))
|
||||
if (Player* t = ObjectAccessor::FindPlayer(itr->second))
|
||||
{
|
||||
if (!t->FindMap() || t->FindMap() != GetBgMap())
|
||||
|
|
|
|||
|
|
@ -1050,7 +1050,7 @@ bool BGQueueRemoveEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
|
|||
|
||||
Battleground* bg = sBattlegroundMgr->GetBattleground(m_BgInstanceGUID);
|
||||
|
||||
// battleground can be already deleted, bg may be NULL!
|
||||
// battleground can be already deleted, bg may be nullptr!
|
||||
|
||||
// check if still in queue for this battleground
|
||||
uint32 queueSlot = player->GetBattlegroundQueueIndex(m_BgQueueTypeId);
|
||||
|
|
|
|||
|
|
@ -825,7 +825,7 @@ void BattlegroundAV::DePopulateNode(BG_AV_Nodes node)
|
|||
|
||||
//remove bonus honor aura trigger creature when node is lost
|
||||
if (node < BG_AV_NODES_MAX)//fail safe
|
||||
DelCreature(node + 302);//NULL checks are in DelCreature! 0-302 spirit guides
|
||||
DelCreature(node + 302);//nullptr checks are in DelCreature! 0-302 spirit guides
|
||||
}
|
||||
|
||||
BG_AV_Nodes BattlegroundAV::GetNodeThroughObject(uint32 object)
|
||||
|
|
|
|||
|
|
@ -372,7 +372,7 @@ void BattlegroundEY::RespawnFlagAfterDrop()
|
|||
|
||||
_flagState = BG_EY_FLAG_STATE_ON_BASE;
|
||||
RespawnFlag();
|
||||
if (GameObject* flag = ObjectAccessor::GetObjectInMap(GetDroppedFlagGUID(), FindBgMap(), (GameObject*)NULL))
|
||||
if (GameObject* flag = ObjectAccessor::GetObjectInMap(GetDroppedFlagGUID(), FindBgMap(), (GameObject*)nullptr))
|
||||
flag->Delete();
|
||||
SetDroppedFlagGUID(0);
|
||||
}
|
||||
|
|
@ -418,7 +418,7 @@ void BattlegroundEY::EventPlayerClickedOnFlag(Player* player, GameObject* gameOb
|
|||
player->CastSpell(player, BG_EY_NETHERSTORM_FLAG_SPELL, true);
|
||||
player->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT);
|
||||
|
||||
PSendMessageToAll(LANG_BG_EY_HAS_TAKEN_FLAG, player->GetTeamId() == TEAM_ALLIANCE ? CHAT_MSG_BG_SYSTEM_ALLIANCE : CHAT_MSG_BG_SYSTEM_HORDE, NULL, player->GetName().c_str());
|
||||
PSendMessageToAll(LANG_BG_EY_HAS_TAKEN_FLAG, player->GetTeamId() == TEAM_ALLIANCE ? CHAT_MSG_BG_SYSTEM_ALLIANCE : CHAT_MSG_BG_SYSTEM_HORDE, nullptr, player->GetName().c_str());
|
||||
PlaySoundToAll(player->GetTeamId() == TEAM_ALLIANCE ? BG_EY_SOUND_FLAG_PICKED_UP_ALLIANCE : BG_EY_SOUND_FLAG_PICKED_UP_HORDE);
|
||||
UpdateWorldState(NETHERSTORM_FLAG, 0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ void BattlegroundIC::PostUpdateImpl(uint32 diff)
|
|||
UpdateNodeWorldState(&nodePoint[i]);
|
||||
HandleCapturedNodes(&nodePoint[i], false);
|
||||
|
||||
SendMessage2ToAll(LANG_BG_IC_TEAM_HAS_TAKEN_NODE, CHAT_MSG_BG_SYSTEM_NEUTRAL, NULL, (nodePoint[i].faction == TEAM_ALLIANCE ? LANG_BG_IC_ALLIANCE : LANG_BG_IC_HORDE), nodePoint[i].string);
|
||||
SendMessage2ToAll(LANG_BG_IC_TEAM_HAS_TAKEN_NODE, CHAT_MSG_BG_SYSTEM_NEUTRAL, nullptr, (nodePoint[i].faction == TEAM_ALLIANCE ? LANG_BG_IC_ALLIANCE : LANG_BG_IC_HORDE), nodePoint[i].string);
|
||||
|
||||
nodePoint[i].needChange = false;
|
||||
nodePoint[i].timer = BANNER_STATE_CHANGE_TIME;
|
||||
|
|
@ -543,7 +543,7 @@ void BattlegroundIC::HandleKillPlayer(Player* player, Player* killer)
|
|||
|
||||
void BattlegroundIC::EndBattleground(TeamId winnerTeamId)
|
||||
{
|
||||
SendMessage2ToAll(LANG_BG_IC_TEAM_WINS, CHAT_MSG_BG_SYSTEM_NEUTRAL, NULL, (winnerTeamId == TEAM_ALLIANCE ? LANG_BG_IC_ALLIANCE : LANG_BG_IC_HORDE));
|
||||
SendMessage2ToAll(LANG_BG_IC_TEAM_WINS, CHAT_MSG_BG_SYSTEM_NEUTRAL, nullptr, (winnerTeamId == TEAM_ALLIANCE ? LANG_BG_IC_ALLIANCE : LANG_BG_IC_HORDE));
|
||||
Battleground::EndBattleground(winnerTeamId);
|
||||
}
|
||||
|
||||
|
|
@ -944,7 +944,7 @@ void BattlegroundIC::DestroyGate(Player* /*player*/, GameObject* go)
|
|||
}
|
||||
|
||||
TurnBosses(true);
|
||||
SendMessage2ToAll(lang_entry, CHAT_MSG_BG_SYSTEM_NEUTRAL, NULL, (teamId == TEAM_ALLIANCE ? LANG_BG_IC_HORDE_KEEP : LANG_BG_IC_ALLIANCE_KEEP));
|
||||
SendMessage2ToAll(lang_entry, CHAT_MSG_BG_SYSTEM_NEUTRAL, nullptr, (teamId == TEAM_ALLIANCE ? LANG_BG_IC_HORDE_KEEP : LANG_BG_IC_ALLIANCE_KEEP));
|
||||
}
|
||||
|
||||
void BattlegroundIC::EventPlayerDamagedGO(Player* /*player*/, GameObject* /*go*/, uint32 /*eventType*/)
|
||||
|
|
|
|||
|
|
@ -70,18 +70,18 @@ void BattlegroundWS::PostUpdateImpl(uint32 diff)
|
|||
RespawnFlagAfterDrop(TEAM_HORDE);
|
||||
break;
|
||||
case BG_WS_EVENT_BOTH_FLAGS_KEPT10:
|
||||
if (Player* player = ObjectAccessor::GetObjectInMap(GetFlagPickerGUID(TEAM_ALLIANCE), this->FindBgMap(), (Player*)NULL))
|
||||
if (Player* player = ObjectAccessor::GetObjectInMap(GetFlagPickerGUID(TEAM_ALLIANCE), this->FindBgMap(), (Player*)nullptr))
|
||||
player->CastSpell(player, BG_WS_SPELL_FOCUSED_ASSAULT, true);
|
||||
if (Player* player = ObjectAccessor::GetObjectInMap(GetFlagPickerGUID(TEAM_HORDE), this->FindBgMap(), (Player*)NULL))
|
||||
if (Player* player = ObjectAccessor::GetObjectInMap(GetFlagPickerGUID(TEAM_HORDE), this->FindBgMap(), (Player*)nullptr))
|
||||
player->CastSpell(player, BG_WS_SPELL_FOCUSED_ASSAULT, true);
|
||||
break;
|
||||
case BG_WS_EVENT_BOTH_FLAGS_KEPT15:
|
||||
if (Player* player = ObjectAccessor::GetObjectInMap(GetFlagPickerGUID(TEAM_ALLIANCE), this->FindBgMap(), (Player*)NULL))
|
||||
if (Player* player = ObjectAccessor::GetObjectInMap(GetFlagPickerGUID(TEAM_ALLIANCE), this->FindBgMap(), (Player*)nullptr))
|
||||
{
|
||||
player->RemoveAurasDueToSpell(BG_WS_SPELL_FOCUSED_ASSAULT);
|
||||
player->CastSpell(player, BG_WS_SPELL_BRUTAL_ASSAULT, true);
|
||||
}
|
||||
if (Player* player = ObjectAccessor::GetObjectInMap(GetFlagPickerGUID(TEAM_HORDE), this->FindBgMap(), (Player*)NULL))
|
||||
if (Player* player = ObjectAccessor::GetObjectInMap(GetFlagPickerGUID(TEAM_HORDE), this->FindBgMap(), (Player*)nullptr))
|
||||
{
|
||||
player->RemoveAurasDueToSpell(BG_WS_SPELL_FOCUSED_ASSAULT);
|
||||
player->CastSpell(player, BG_WS_SPELL_BRUTAL_ASSAULT, true);
|
||||
|
|
@ -540,12 +540,12 @@ uint32 BattlegroundWS::GetAssaultSpellId() const
|
|||
|
||||
void BattlegroundWS::RemoveAssaultAuras()
|
||||
{
|
||||
if (Player* player = ObjectAccessor::GetObjectInMap(GetFlagPickerGUID(TEAM_ALLIANCE), this->FindBgMap(), (Player*)NULL))
|
||||
if (Player* player = ObjectAccessor::GetObjectInMap(GetFlagPickerGUID(TEAM_ALLIANCE), this->FindBgMap(), (Player*)nullptr))
|
||||
{
|
||||
player->RemoveAurasDueToSpell(BG_WS_SPELL_FOCUSED_ASSAULT);
|
||||
player->RemoveAurasDueToSpell(BG_WS_SPELL_BRUTAL_ASSAULT);
|
||||
}
|
||||
if (Player* player = ObjectAccessor::GetObjectInMap(GetFlagPickerGUID(TEAM_HORDE), this->FindBgMap(), (Player*)NULL))
|
||||
if (Player* player = ObjectAccessor::GetObjectInMap(GetFlagPickerGUID(TEAM_HORDE), this->FindBgMap(), (Player*)nullptr))
|
||||
{
|
||||
player->RemoveAurasDueToSpell(BG_WS_SPELL_FOCUSED_ASSAULT);
|
||||
player->RemoveAurasDueToSpell(BG_WS_SPELL_BRUTAL_ASSAULT);
|
||||
|
|
|
|||
|
|
@ -401,7 +401,7 @@ CalendarEventStore CalendarMgr::GetPlayerEvents(uint64 guid)
|
|||
for (CalendarEventInviteStore::const_iterator itr = _invites.begin(); itr != _invites.end(); ++itr)
|
||||
for (CalendarInviteStore::const_iterator itr2 = itr->second.begin(); itr2 != itr->second.end(); ++itr2)
|
||||
if ((*itr2)->GetInviteeGUID() == guid)
|
||||
if (CalendarEvent* event = GetEvent(itr->first)) // NULL check added as attempt to fix #11512
|
||||
if (CalendarEvent* event = GetEvent(itr->first)) // nullptr check added as attempt to fix #11512
|
||||
events.insert(event);
|
||||
|
||||
if (Player* player = ObjectAccessor::FindPlayerInOrOutOfWorld(guid))
|
||||
|
|
@ -665,7 +665,7 @@ void CalendarMgr::SendCalendarClearPendingAction(uint64 guid)
|
|||
}
|
||||
}
|
||||
|
||||
void CalendarMgr::SendCalendarCommandResult(uint64 guid, CalendarError err, char const* param /*= NULL*/)
|
||||
void CalendarMgr::SendCalendarCommandResult(uint64 guid, CalendarError err, char const* param /*= nullptr*/)
|
||||
{
|
||||
if (Player* player = ObjectAccessor::FindPlayerInOrOutOfWorld(guid))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ bool ChatHandler::HasLowerSecurityAccount(WorldSession* target, uint32 target_ac
|
|||
else if (target_account)
|
||||
target_sec = AccountMgr::GetSecurity(target_account, realmID);
|
||||
else
|
||||
return true; // caller must report error for (target == NULL && target_account == 0)
|
||||
return true; // caller must report error for (target == nullptr && target_account == 0)
|
||||
|
||||
AccountTypes target_ac_sec = AccountTypes(target_sec);
|
||||
if (m_session->GetSecurity() < target_ac_sec || (strong && m_session->GetSecurity() <= target_ac_sec))
|
||||
|
|
@ -276,7 +276,7 @@ bool ChatHandler::ExecuteCommandInTable(std::vector<ChatCommand> const& table, c
|
|||
if (!ExecuteCommandInTable(table[i].ChildCommands, text, fullcmd.c_str()))
|
||||
{
|
||||
#ifdef ELUNA
|
||||
if (!sEluna->OnCommand(GetSession() ? GetSession()->GetPlayer() : NULL, oldtext))
|
||||
if (!sEluna->OnCommand(GetSession() ? GetSession()->GetPlayer() : nullptr, oldtext))
|
||||
return true;
|
||||
#endif
|
||||
if (text[0] != '\0')
|
||||
|
|
@ -429,7 +429,7 @@ bool ChatHandler::ParseCommands(char const* text)
|
|||
if (!ExecuteCommandInTable(getCommandTable(), text, fullcmd))
|
||||
{
|
||||
#ifdef ELUNA
|
||||
if (!sEluna->OnCommand(GetSession() ? GetSession()->GetPlayer() : NULL, text))
|
||||
if (!sEluna->OnCommand(GetSession() ? GetSession()->GetPlayer() : nullptr, text))
|
||||
return true;
|
||||
#endif
|
||||
if (m_session && AccountMgr::IsPlayerAccount(m_session->GetSecurity()))
|
||||
|
|
@ -1084,7 +1084,7 @@ std::string ChatHandler::extractPlayerNameFromLink(char* text)
|
|||
return name;
|
||||
}
|
||||
|
||||
bool ChatHandler::extractPlayerTarget(char* args, Player** player, uint64* player_guid /*=NULL*/, std::string* player_name /*= NULL*/)
|
||||
bool ChatHandler::extractPlayerTarget(char* args, Player** player, uint64* player_guid /*=nullptr*/, std::string* player_name /*= nullptr*/)
|
||||
{
|
||||
if (args && *args)
|
||||
{
|
||||
|
|
@ -1171,7 +1171,7 @@ char* ChatHandler::extractQuotedArg(char* args)
|
|||
continue;
|
||||
}
|
||||
|
||||
// return NULL if we reached the end of the string
|
||||
// return nullptr if we reached the end of the string
|
||||
if (!*args)
|
||||
return nullptr;
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ public:
|
|||
char* extractKeyFromLink(char* text, char const* linkType, char** something1 = nullptr);
|
||||
char* extractKeyFromLink(char* text, char const* const* linkTypes, int* found_idx, char** something1 = nullptr);
|
||||
|
||||
// if args have single value then it return in arg2 and arg1 == NULL
|
||||
// if args have single value then it return in arg2 and arg1 == nullptr
|
||||
void extractOptFirstArg(char* args, char** arg1, char** arg2);
|
||||
char* extractQuotedArg(char* args);
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ public:
|
|||
bool GetPlayerGroupAndGUIDByName(const char* cname, Player*& player, Group*& group, uint64& guid, bool offline = false);
|
||||
std::string extractPlayerNameFromLink(char* text);
|
||||
// select by arg (name/link) or in-game selection online/offline player
|
||||
bool extractPlayerTarget(char* args, Player** player, uint64* player_guid = NULL, std::string* player_name = nullptr);
|
||||
bool extractPlayerTarget(char* args, Player** player, uint64* player_guid = nullptr, std::string* player_name = nullptr);
|
||||
|
||||
std::string playerLink(std::string const& name) const { return m_session ? "|cffffffff|Hplayer:" + name + "|h[" + name + "]|h|r" : name; }
|
||||
std::string GetNameLink(Player* chr) const;
|
||||
|
|
@ -123,7 +123,7 @@ protected:
|
|||
bool ShowHelpForSubCommands(std::vector<ChatCommand> const& table, char const* cmd, char const* subcmd);
|
||||
|
||||
private:
|
||||
WorldSession* m_session; // != NULL for chat command call and NULL for CLI command
|
||||
WorldSession* m_session; // != nullptr for chat command call and nullptr for CLI command
|
||||
|
||||
// common global flag
|
||||
static bool load_command_table;
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ bool ItemChatLink::Initialize(std::istringstream& iss)
|
|||
inline std::string ItemChatLink::FormatName(uint8 index, ItemLocale const* locale, char* const* suffixStrings) const
|
||||
{
|
||||
std::stringstream ss;
|
||||
if (locale == NULL || index >= locale->Name.size())
|
||||
if (locale == nullptr || index >= locale->Name.size())
|
||||
ss << _item->Name1;
|
||||
else
|
||||
ss << locale->Name[index];
|
||||
|
|
@ -188,7 +188,7 @@ bool ItemChatLink::ValidateName(char* buffer, const char* context)
|
|||
|
||||
char* const* suffixStrings = _suffix ? _suffix->nameSuffix : (_property ? _property->nameSuffix : nullptr);
|
||||
|
||||
bool res = (FormatName(LOCALE_enUS, NULL, suffixStrings) == buffer);
|
||||
bool res = (FormatName(LOCALE_enUS, nullptr, suffixStrings) == buffer);
|
||||
|
||||
if (!res)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ void ThreatContainer::clearReferences()
|
|||
}
|
||||
|
||||
//============================================================
|
||||
// Return the HostileReference of NULL, if not found
|
||||
// Return the HostileReference of nullptr, if not found
|
||||
HostileReference* ThreatContainer::getReferenceByTarget(Unit* victim) const
|
||||
{
|
||||
if (!victim)
|
||||
|
|
@ -338,7 +338,7 @@ HostileReference* ThreatContainer::selectNextVictim(Creature* attacker, HostileR
|
|||
// pussywizard: skip not valid targets
|
||||
if (attacker->_CanDetectFeignDeathOf(target) && attacker->CanCreatureAttack(target))
|
||||
{
|
||||
if (currentVictim) // pussywizard: if not NULL then target must have 10%/30% more threat
|
||||
if (currentVictim) // pussywizard: if not nullptr then target must have 10%/30% more threat
|
||||
{
|
||||
if (currentVictim == currentRef) // pussywizard: nothing found previously was good and enough, currentRef passed all necessary tests, so end now
|
||||
{
|
||||
|
|
@ -460,7 +460,7 @@ Unit* ThreatManager::getHostilTarget()
|
|||
iThreatContainer.update();
|
||||
HostileReference* nextVictim = iThreatContainer.selectNextVictim(GetOwner()->ToCreature(), getCurrentVictim());
|
||||
setCurrentVictim(nextVictim);
|
||||
return getCurrentVictim() != NULL ? getCurrentVictim()->getTarget() : nullptr;
|
||||
return getCurrentVictim() != nullptr ? getCurrentVictim()->getTarget() : nullptr;
|
||||
}
|
||||
|
||||
//============================================================
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ enum UNIT_EVENT_TYPE
|
|||
// New target should be fetched, could tbe the current target as well
|
||||
UEV_THREAT_SET_NEXT_TARGET = 1 << 5,
|
||||
|
||||
// A new victim (target) was set. Could be NULL
|
||||
// A new victim (target) was set. Could be nullptr
|
||||
UEV_THREAT_VICTIM_CHANGED = 1 << 6,
|
||||
|
||||
// Future use
|
||||
|
|
|
|||
|
|
@ -570,7 +570,7 @@ namespace lfg
|
|||
else
|
||||
{
|
||||
uint8 memberCount = 0;
|
||||
for (GroupReference* itr = grp->GetFirstMember(); itr != NULL && joinData.result == LFG_JOIN_OK; itr = itr->next())
|
||||
for (GroupReference* itr = grp->GetFirstMember(); itr != nullptr && joinData.result == LFG_JOIN_OK; itr = itr->next())
|
||||
{
|
||||
if (Player* plrg = itr->GetSource())
|
||||
{
|
||||
|
|
@ -598,7 +598,7 @@ namespace lfg
|
|||
joinData.result = LFG_JOIN_RANDOM_COOLDOWN;
|
||||
else if (grp)
|
||||
{
|
||||
for (GroupReference* itr = grp->GetFirstMember(); itr != NULL && joinData.result == LFG_JOIN_OK; itr = itr->next())
|
||||
for (GroupReference* itr = grp->GetFirstMember(); itr != nullptr && joinData.result == LFG_JOIN_OK; itr = itr->next())
|
||||
if (Player* plrg = itr->GetSource())
|
||||
if (plrg->HasAura(LFG_SPELL_DUNGEON_COOLDOWN)) // xinef: added !isContinue
|
||||
joinData.result = LFG_JOIN_PARTY_RANDOM_COOLDOWN;
|
||||
|
|
@ -733,7 +733,7 @@ namespace lfg
|
|||
|
||||
/**
|
||||
Leaves Dungeon System. Player/Group is removed from queue, rolechecks, proposals
|
||||
or votekicks. Player or group needs to be not NULL and using Dungeon System
|
||||
or votekicks. Player or group needs to be not nullptr and using Dungeon System
|
||||
|
||||
@param[in] guid Player or group guid
|
||||
*/
|
||||
|
|
@ -2085,7 +2085,7 @@ namespace lfg
|
|||
|
||||
// if we can take the quest, means that we haven't done this kind of "run", IE: First Heroic Random of Day.
|
||||
if (player->CanRewardQuest(quest, false))
|
||||
player->RewardQuest(quest, 0, NULL, false);
|
||||
player->RewardQuest(quest, 0, nullptr, false);
|
||||
else
|
||||
{
|
||||
done = true;
|
||||
|
|
@ -2093,7 +2093,7 @@ namespace lfg
|
|||
if (!quest)
|
||||
continue;
|
||||
// we give reward without informing client (retail does this)
|
||||
player->RewardQuest(quest, 0, NULL, false);
|
||||
player->RewardQuest(quest, 0, nullptr, false);
|
||||
}
|
||||
|
||||
// Give rewards
|
||||
|
|
|
|||
|
|
@ -1051,7 +1051,7 @@ void Creature::SetLootRecipient(Unit* unit, bool withGroup)
|
|||
{
|
||||
// set the player whose group should receive the right
|
||||
// to loot the creature after it dies
|
||||
// should be set to NULL after the loot disappears
|
||||
// should be set to nullptr after the loot disappears
|
||||
|
||||
if (!unit)
|
||||
{
|
||||
|
|
@ -2387,7 +2387,7 @@ void Creature::SendZoneUnderAttackMessage(Player* attacker)
|
|||
{
|
||||
WorldPacket data(SMSG_ZONE_UNDER_ATTACK, 4);
|
||||
data << (uint32)GetAreaId();
|
||||
sWorld->SendGlobalMessage(&data, NULL, (attacker->GetTeamId() == TEAM_ALLIANCE ? TEAM_HORDE : TEAM_ALLIANCE));
|
||||
sWorld->SendGlobalMessage(&data, nullptr, (attacker->GetTeamId() == TEAM_ALLIANCE ? TEAM_HORDE : TEAM_ALLIANCE));
|
||||
}
|
||||
|
||||
void Creature::SetInCombatWithZone()
|
||||
|
|
|
|||
|
|
@ -1212,7 +1212,7 @@ void GameObject::ResetDoorOrButton()
|
|||
m_cooldownTime = 0;
|
||||
}
|
||||
|
||||
void GameObject::UseDoorOrButton(uint32 time_to_restore, bool alternative /* = false */, Unit* user /*=NULL*/)
|
||||
void GameObject::UseDoorOrButton(uint32 time_to_restore, bool alternative /* = false */, Unit* user /*=nullptr*/)
|
||||
{
|
||||
if (m_lootState != GO_READY)
|
||||
return;
|
||||
|
|
@ -1667,7 +1667,7 @@ void GameObject::Use(Unit* user)
|
|||
|
||||
if (info->spellcaster.partyOnly)
|
||||
{
|
||||
Player const* caster = ObjectAccessor::GetObjectInOrOutOfWorld(GetOwnerGUID(), (Player*)NULL);
|
||||
Player const* caster = ObjectAccessor::GetObjectInOrOutOfWorld(GetOwnerGUID(), (Player*)nullptr);
|
||||
if (!caster || user->GetTypeId() != TYPEID_PLAYER || !user->ToPlayer()->IsInSameRaidWith(caster))
|
||||
return;
|
||||
}
|
||||
|
|
@ -2029,7 +2029,7 @@ void GameObject::SetWorldRotationAngles(float z_rot, float y_rot, float x_rot)
|
|||
SetWorldRotation(G3D::Quat(G3D::Matrix3::fromEulerAnglesZYX(z_rot, y_rot, x_rot)));
|
||||
}
|
||||
|
||||
void GameObject::ModifyHealth(int32 change, Unit* attackerOrHealer /*= NULL*/, uint32 spellId /*= 0*/)
|
||||
void GameObject::ModifyHealth(int32 change, Unit* attackerOrHealer /*= nullptr*/, uint32 spellId /*= 0*/)
|
||||
{
|
||||
if (!IsDestructibleBuilding())
|
||||
return;
|
||||
|
|
@ -2085,7 +2085,7 @@ void GameObject::ModifyHealth(int32 change, Unit* attackerOrHealer /*= NULL*/, u
|
|||
SetDestructibleState(newState, player, false);
|
||||
}
|
||||
|
||||
void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player* eventInvoker /*= NULL*/, bool setHealth /*= false*/)
|
||||
void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player* eventInvoker /*= nullptr*/, bool setHealth /*= false*/)
|
||||
{
|
||||
// the user calling this must know he is already operating on destructible gameobject
|
||||
ASSERT(GetGoType() == GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING);
|
||||
|
|
@ -2303,7 +2303,7 @@ void GameObject::SetLootRecipient(Unit* unit)
|
|||
{
|
||||
// set the player whose group should receive the right
|
||||
// to loot the creature after it dies
|
||||
// should be set to NULL after the loot disappears
|
||||
// should be set to nullptr after the loot disappears
|
||||
|
||||
if (!unit)
|
||||
{
|
||||
|
|
@ -2437,7 +2437,7 @@ void GameObject::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* t
|
|||
data->append(fieldBuffer);
|
||||
}
|
||||
|
||||
void GameObject::GetRespawnPosition(float& x, float& y, float& z, float* ori /* = NULL*/) const
|
||||
void GameObject::GetRespawnPosition(float& x, float& y, float& z, float* ori /* = nullptr*/) const
|
||||
{
|
||||
if (m_DBTableGuid)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ void AddItemsSetItem(Player* player, Item* item)
|
|||
}
|
||||
|
||||
// spell casted only if fit form requirement, in other case will casted at form change
|
||||
player->ApplyEquipSpell(spellInfo, NULL, true);
|
||||
player->ApplyEquipSpell(spellInfo, nullptr, true);
|
||||
eff->spells[y] = spellInfo;
|
||||
break;
|
||||
}
|
||||
|
|
@ -142,8 +142,8 @@ void RemoveItemsSetItem(Player* player, ItemTemplate const* proto)
|
|||
if (eff->spells[z] && eff->spells[z]->Id == set->spells[x])
|
||||
{
|
||||
// spell can be not active if not fit form requirement
|
||||
player->ApplyEquipSpell(eff->spells[z], NULL, false);
|
||||
eff->spells[z] = NULL;
|
||||
player->ApplyEquipSpell(eff->spells[z], nullptr, false);
|
||||
eff->spells[z] = nullptr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1075,7 +1075,7 @@ Item* Item::CreateItem(uint32 item, uint32 count, Player const* player, bool clo
|
|||
|
||||
Item* Item::CloneItem(uint32 count, Player const* player) const
|
||||
{
|
||||
// player CAN be NULL in which case we must not update random properties because that accesses player's item update queue
|
||||
// player CAN be nullptr in which case we must not update random properties because that accesses player's item update queue
|
||||
Item* newItem = CreateItem(GetEntry(), count, player, true, player ? GetItemRandomPropertyId() : 0);
|
||||
if (!newItem)
|
||||
return nullptr;
|
||||
|
|
@ -1143,7 +1143,7 @@ void Item::DeleteRefundDataFromDB(SQLTransaction* trans)
|
|||
}
|
||||
}
|
||||
|
||||
void Item::SetNotRefundable(Player* owner, bool changestate /*=true*/, SQLTransaction* trans /*=NULL*/)
|
||||
void Item::SetNotRefundable(Player* owner, bool changestate /*=true*/, SQLTransaction* trans /*=nullptr*/)
|
||||
{
|
||||
if (!HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_REFUNDABLE))
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -2201,7 +2201,7 @@ void WorldObject::AddObjectToRemoveList()
|
|||
map->AddObjectToRemoveList(this);
|
||||
}
|
||||
|
||||
TempSummon* Map::SummonCreature(uint32 entry, Position const& pos, SummonPropertiesEntry const* properties /*= NULL*/, uint32 duration /*= 0*/, Unit* summoner /*= NULL*/, uint32 spellId /*= 0*/, uint32 vehId /*= 0*/)
|
||||
TempSummon* Map::SummonCreature(uint32 entry, Position const& pos, SummonPropertiesEntry const* properties /*= nullptr*/, uint32 duration /*= 0*/, Unit* summoner /*= nullptr*/, uint32 spellId /*= 0*/, uint32 vehId /*= 0*/)
|
||||
{
|
||||
uint32 mask = UNIT_MASK_SUMMON;
|
||||
if (properties)
|
||||
|
|
@ -2305,14 +2305,14 @@ TempSummon* Map::SummonCreature(uint32 entry, Position const& pos, SummonPropert
|
|||
* @param list List to store pointers to summoned creatures.
|
||||
*/
|
||||
|
||||
void Map::SummonCreatureGroup(uint8 group, std::list<TempSummon*>* list /*= NULL*/)
|
||||
void Map::SummonCreatureGroup(uint8 group, std::list<TempSummon*>* list /*= nullptr*/)
|
||||
{
|
||||
std::vector<TempSummonData> const* data = sObjectMgr->GetSummonGroup(GetId(), SUMMONER_TYPE_MAP, group);
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
for (std::vector<TempSummonData>::const_iterator itr = data->begin(); itr != data->end(); ++itr)
|
||||
if (TempSummon* summon = SummonCreature(itr->entry, itr->pos, NULL, itr->time))
|
||||
if (TempSummon* summon = SummonCreature(itr->entry, itr->pos, nullptr, itr->time))
|
||||
if (list)
|
||||
list->push_back(summon);
|
||||
}
|
||||
|
|
@ -2437,7 +2437,7 @@ Creature* WorldObject::SummonTrigger(float x, float y, float z, float ang, uint3
|
|||
* @param group Id of group to summon.
|
||||
* @param list List to store pointers to summoned creatures.
|
||||
*/
|
||||
void WorldObject::SummonCreatureGroup(uint8 group, std::list<TempSummon*>* list /*= NULL*/)
|
||||
void WorldObject::SummonCreatureGroup(uint8 group, std::list<TempSummon*>* list /*= nullptr*/)
|
||||
{
|
||||
ASSERT((GetTypeId() == TYPEID_GAMEOBJECT || GetTypeId() == TYPEID_UNIT) && "Only GOs and creatures can summon npc groups!");
|
||||
|
||||
|
|
@ -2850,7 +2850,7 @@ void WorldObject::SetPhaseMask(uint32 newPhaseMask, bool update)
|
|||
UpdateObjectVisibility();
|
||||
}
|
||||
|
||||
void WorldObject::PlayDistanceSound(uint32 sound_id, Player* target /*= NULL*/)
|
||||
void WorldObject::PlayDistanceSound(uint32 sound_id, Player* target /*= nullptr*/)
|
||||
{
|
||||
WorldPacket data(SMSG_PLAY_OBJECT_SOUND, 4 + 8);
|
||||
data << uint32(sound_id);
|
||||
|
|
@ -2861,7 +2861,7 @@ void WorldObject::PlayDistanceSound(uint32 sound_id, Player* target /*= NULL*/)
|
|||
SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
void WorldObject::PlayDirectSound(uint32 sound_id, Player* target /*= NULL*/)
|
||||
void WorldObject::PlayDirectSound(uint32 sound_id, Player* target /*= nullptr*/)
|
||||
{
|
||||
WorldPacket data(SMSG_PLAY_SOUND, 4);
|
||||
data << uint32(sound_id);
|
||||
|
|
@ -2871,7 +2871,7 @@ void WorldObject::PlayDirectSound(uint32 sound_id, Player* target /*= NULL*/)
|
|||
SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
void WorldObject::PlayDirectMusic(uint32 music_id, Player* target /*= NULL*/)
|
||||
void WorldObject::PlayDirectMusic(uint32 music_id, Player* target /*= nullptr*/)
|
||||
{
|
||||
WorldPacket data(SMSG_PLAY_MUSIC, 4);
|
||||
data << uint32(music_id);
|
||||
|
|
@ -2997,7 +2997,7 @@ struct WorldObjectChangeAccumulator
|
|||
|
||||
if (IS_PLAYER_GUID(guid))
|
||||
{
|
||||
//Caster may be NULL if DynObj is in removelist
|
||||
//Caster may be nullptr if DynObj is in removelist
|
||||
if (Player* caster = ObjectAccessor::FindPlayer(guid))
|
||||
if (caster->GetUInt64Value(PLAYER_FARSIGHT) == source->GetGUID())
|
||||
BuildPacket(caster);
|
||||
|
|
|
|||
|
|
@ -1268,7 +1268,7 @@ void Pet::_LoadAuras(PreparedQueryResult result, uint32 timediff)
|
|||
int32 baseDamage[3];
|
||||
Field* fields = result->Fetch();
|
||||
uint64 caster_guid = fields[0].GetUInt64();
|
||||
// NULL guid stored - pet is the caster of the spell - see Pet::_SaveAuras
|
||||
// nullptr guid stored - pet is the caster of the spell - see Pet::_SaveAuras
|
||||
if (!caster_guid)
|
||||
caster_guid = GetGUID();
|
||||
uint32 spellid = fields[1].GetUInt32();
|
||||
|
|
@ -1319,7 +1319,7 @@ void Pet::_LoadAuras(PreparedQueryResult result, uint32 timediff)
|
|||
else
|
||||
remaincharges = 0;
|
||||
|
||||
if (Aura* aura = Aura::TryCreate(spellInfo, effmask, this, NULL, &baseDamage[0], NULL, caster_guid))
|
||||
if (Aura* aura = Aura::TryCreate(spellInfo, effmask, this, nullptr, &baseDamage[0], nullptr, caster_guid))
|
||||
{
|
||||
if (!aura->CanBeSaved())
|
||||
{
|
||||
|
|
@ -1781,7 +1781,7 @@ bool Pet::resetTalents()
|
|||
return true;
|
||||
}
|
||||
|
||||
void Pet::resetTalentsForAllPetsOf(Player* owner, Pet* online_pet /*= NULL*/)
|
||||
void Pet::resetTalentsForAllPetsOf(Player* owner, Pet* online_pet /*= nullptr*/)
|
||||
{
|
||||
// not need after this call
|
||||
if (owner->ToPlayer()->HasAtLoginFlag(AT_LOGIN_RESET_PET_TALENTS))
|
||||
|
|
@ -2237,7 +2237,7 @@ void Pet::HandleAsynchLoadFailed(AsynchPetSummon* info, Player* player, uint8 as
|
|||
// we are almost at home...
|
||||
if (asynchLoadType == PET_LOAD_SUMMON_PET)
|
||||
{
|
||||
Unit* caster = ObjectAccessor::GetObjectInMap(info->m_casterGUID, map, (Unit*)NULL);
|
||||
Unit* caster = ObjectAccessor::GetObjectInMap(info->m_casterGUID, map, (Unit*)nullptr);
|
||||
if (!caster)
|
||||
caster = player;
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ void Totem::UnSummon(uint32 msTime)
|
|||
player->SendAutoRepeatCancel(this);
|
||||
|
||||
if (SpellInfo const* spell = sSpellMgr->GetSpellInfo(GetUInt32Value(UNIT_CREATED_BY_SPELL)))
|
||||
player->SendCooldownEvent(spell, 0, NULL, false);
|
||||
player->SendCooldownEvent(spell, 0, nullptr, false);
|
||||
|
||||
if (Group* group = player->GetGroup())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -837,7 +837,7 @@ void StaticTransport::Update(uint32 diff)
|
|||
|
||||
void StaticTransport::RelocateToProgress(uint32 progress)
|
||||
{
|
||||
TransportAnimationEntry const* curr = NULL, *next = nullptr;
|
||||
TransportAnimationEntry const* curr = nullptr, *next = nullptr;
|
||||
float percPos;
|
||||
if (m_goValue.Transport.AnimationInfo->GetAnimNode(progress, curr, next, percPos))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1224,9 +1224,9 @@ void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage* damageInfo, int32 dama
|
|||
if (CanApplyResilience())
|
||||
{
|
||||
if (attackType != RANGED_ATTACK)
|
||||
Unit::ApplyResilience(victim, NULL, &damage, crit, CR_CRIT_TAKEN_MELEE);
|
||||
Unit::ApplyResilience(victim, nullptr, &damage, crit, CR_CRIT_TAKEN_MELEE);
|
||||
else
|
||||
Unit::ApplyResilience(victim, NULL, &damage, crit, CR_CRIT_TAKEN_RANGED);
|
||||
Unit::ApplyResilience(victim, nullptr, &damage, crit, CR_CRIT_TAKEN_RANGED);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -1242,7 +1242,7 @@ void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage* damageInfo, int32 dama
|
|||
}
|
||||
|
||||
if (CanApplyResilience())
|
||||
Unit::ApplyResilience(victim, NULL, &damage, crit, CR_CRIT_TAKEN_SPELL);
|
||||
Unit::ApplyResilience(victim, nullptr, &damage, crit, CR_CRIT_TAKEN_SPELL);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
@ -1354,7 +1354,7 @@ void Unit::CalculateMeleeDamage(Unit* victim, uint32 damage, CalcDamageInfo* dam
|
|||
// Calculate armor reduction
|
||||
if (IsDamageReducedByArmor((SpellSchoolMask)(damageInfo->damageSchoolMask)))
|
||||
{
|
||||
damageInfo->damage = Unit::CalcArmorReducedDamage(this, damageInfo->target, damage, NULL, 0, damageInfo->attackType);
|
||||
damageInfo->damage = Unit::CalcArmorReducedDamage(this, damageInfo->target, damage, nullptr, 0, damageInfo->attackType);
|
||||
damageInfo->cleanDamage += damage - damageInfo->damage;
|
||||
}
|
||||
else
|
||||
|
|
@ -1473,7 +1473,7 @@ void Unit::CalculateMeleeDamage(Unit* victim, uint32 damage, CalcDamageInfo* dam
|
|||
|
||||
// attackType is checked already for BASE_ATTACK or OFF_ATTACK so it can't be RANGED_ATTACK here
|
||||
if (CanApplyResilience())
|
||||
Unit::ApplyResilience(victim, NULL, &resilienceReduction, (damageInfo->hitOutCome == MELEE_HIT_CRIT), CR_CRIT_TAKEN_MELEE);
|
||||
Unit::ApplyResilience(victim, nullptr, &resilienceReduction, (damageInfo->hitOutCome == MELEE_HIT_CRIT), CR_CRIT_TAKEN_MELEE);
|
||||
|
||||
resilienceReduction = damageInfo->damage - resilienceReduction;
|
||||
damageInfo->damage -= resilienceReduction;
|
||||
|
|
@ -1548,7 +1548,7 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss)
|
|||
|
||||
// Call default DealDamage
|
||||
CleanDamage cleanDamage(damageInfo->cleanDamage, damageInfo->absorb, damageInfo->attackType, damageInfo->hitOutCome);
|
||||
Unit::DealDamage(this, victim, damageInfo->damage, &cleanDamage, DIRECT_DAMAGE, SpellSchoolMask(damageInfo->damageSchoolMask), NULL, durabilityLoss);
|
||||
Unit::DealDamage(this, victim, damageInfo->damage, &cleanDamage, DIRECT_DAMAGE, SpellSchoolMask(damageInfo->damageSchoolMask), nullptr, durabilityLoss);
|
||||
|
||||
// If this is a creature and it attacks from behind it has a probability to daze it's victim
|
||||
if (damageInfo->damage && ((damageInfo->hitOutCome == MELEE_HIT_CRIT || damageInfo->hitOutCome == MELEE_HIT_CRUSHING || damageInfo->hitOutCome == MELEE_HIT_NORMAL || damageInfo->hitOutCome == MELEE_HIT_GLANCING) &&
|
||||
|
|
@ -3214,9 +3214,9 @@ float Unit::GetUnitCriticalChance(WeaponAttackType attackType, const Unit* victi
|
|||
|
||||
// reduce crit chance from Rating for players
|
||||
if (attackType != RANGED_ATTACK)
|
||||
Unit::ApplyResilience(victim, &crit, NULL, false, CR_CRIT_TAKEN_MELEE);
|
||||
Unit::ApplyResilience(victim, &crit, nullptr, false, CR_CRIT_TAKEN_MELEE);
|
||||
else
|
||||
Unit::ApplyResilience(victim, &crit, NULL, false, CR_CRIT_TAKEN_RANGED);
|
||||
Unit::ApplyResilience(victim, &crit, nullptr, false, CR_CRIT_TAKEN_RANGED);
|
||||
|
||||
// Apply crit chance from defence skill
|
||||
crit += (int32(GetMaxSkillValueForLevel(victim)) - int32(victim->GetDefenseSkillValue(this))) * 0.04f;
|
||||
|
|
@ -3398,7 +3398,7 @@ void Unit::_UpdateAutoRepeatSpell()
|
|||
|
||||
void Unit::SetCurrentCastedSpell(Spell* pSpell)
|
||||
{
|
||||
ASSERT(pSpell); // NULL may be never passed here, use InterruptSpell or InterruptNonMeleeSpells
|
||||
ASSERT(pSpell); // nullptr may be never passed here, use InterruptSpell or InterruptNonMeleeSpells
|
||||
|
||||
CurrentSpellTypes CSpellType = pSpell->GetCurrentContainer();
|
||||
|
||||
|
|
@ -3936,7 +3936,7 @@ void Unit::DeMorph()
|
|||
SetDisplayId(GetNativeDisplayId());
|
||||
}
|
||||
|
||||
Aura* Unit::_TryStackingOrRefreshingExistingAura(SpellInfo const* newAura, uint8 effMask, Unit* caster, int32* baseAmount /*= NULL*/, Item* castItem /*= NULL*/, uint64 casterGUID /*= 0*/, bool periodicReset /*= false*/)
|
||||
Aura* Unit::_TryStackingOrRefreshingExistingAura(SpellInfo const* newAura, uint8 effMask, Unit* caster, int32* baseAmount /*= nullptr*/, Item* castItem /*= nullptr*/, uint64 casterGUID /*= 0*/, bool periodicReset /*= false*/)
|
||||
{
|
||||
ASSERT(casterGUID || caster);
|
||||
if (!casterGUID)
|
||||
|
|
@ -4570,7 +4570,7 @@ void Unit::RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit*
|
|||
// Xinef: if stealer has same aura
|
||||
Aura* curAura = stealer->GetAura(aura->GetId());
|
||||
if (!curAura || (!curAura->IsPermanent() && curAura->GetDuration() < (int32)dur))
|
||||
if (Aura* newAura = Aura::TryRefreshStackOrCreate(aura->GetSpellInfo(), effMask, stealer, NULL, &baseDamage[0], NULL, aura->GetCasterGUID()))
|
||||
if (Aura* newAura = Aura::TryRefreshStackOrCreate(aura->GetSpellInfo(), effMask, stealer, nullptr, &baseDamage[0], nullptr, aura->GetCasterGUID()))
|
||||
{
|
||||
// created aura must not be single target aura,, so stealer won't loose it on recast
|
||||
if (newAura->IsSingleTarget())
|
||||
|
|
@ -5657,7 +5657,7 @@ void Unit::AddGameObject(GameObject* gameObj)
|
|||
// Need disable spell use for owner
|
||||
if (createBySpell && createBySpell->IsCooldownStartedOnEvent())
|
||||
// note: item based cooldowns and cooldown spell mods with charges ignored (unknown existing cases)
|
||||
ToPlayer()->AddSpellAndCategoryCooldowns(createBySpell, 0, NULL, true);
|
||||
ToPlayer()->AddSpellAndCategoryCooldowns(createBySpell, 0, nullptr, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -5972,7 +5972,7 @@ void Unit::SendAttackStateUpdate(uint32 HitInfo, Unit* target, uint8 /*SwingType
|
|||
SendAttackStateUpdate(&dmgInfo);
|
||||
}
|
||||
|
||||
//victim may be NULL
|
||||
//victim may be nullptr
|
||||
bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown)
|
||||
{
|
||||
SpellInfo const* dummySpell = triggeredByAura->GetSpellInfo();
|
||||
|
|
@ -6726,7 +6726,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
|||
int32 total = CalculatePct(int32(damage), triggerAmount);
|
||||
int32 team = total / 5;
|
||||
int32 self = total - team;
|
||||
CastCustomSpell(this, 15290, &team, &self, NULL, true, castItem, triggeredByAura);
|
||||
CastCustomSpell(this, 15290, &team, &self, nullptr, true, castItem, triggeredByAura);
|
||||
return true; // no hidden cooldown
|
||||
}
|
||||
// Priest Tier 6 Trinket (Ashtongue Talisman of Acumen)
|
||||
|
|
@ -7404,7 +7404,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
|||
if (!victim || !victim->IsAlive())
|
||||
return false;
|
||||
|
||||
CastSpell(this, 71432, true, NULL, triggeredByAura);
|
||||
CastSpell(this, 71432, true, nullptr, triggeredByAura);
|
||||
|
||||
Aura const* dummy = GetAura(71432);
|
||||
if (!dummy || dummy->GetStackAmount() < (dummySpell->Id == 71406 ? 8 : 7))
|
||||
|
|
@ -8104,7 +8104,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
|||
continue;
|
||||
|
||||
basepoints0 = int32(CalculateSpellDamage(this, procSpell, i) * 0.4f);
|
||||
CastCustomSpell(this, triggered_spell_id, &basepoints0, nullptr, nullptr, true, NULL, triggeredByAura);
|
||||
CastCustomSpell(this, triggered_spell_id, &basepoints0, nullptr, nullptr, true, nullptr, triggeredByAura);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -8266,7 +8266,7 @@ bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, Sp
|
|||
return false;
|
||||
|
||||
int32 bp0 = int32(CalculatePct(GetMaxPower(POWER_MANA), spInfo->Effects[0].CalcValue()));
|
||||
CastCustomSpell(this, 67545, &bp0, nullptr, nullptr, true, NULL, triggeredByAura->GetEffect(EFFECT_0), GetGUID());
|
||||
CastCustomSpell(this, 67545, &bp0, nullptr, nullptr, true, nullptr, triggeredByAura->GetEffect(EFFECT_0), GetGUID());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -8707,14 +8707,14 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
|||
ToPlayer()->AddSpellCooldown(stack_spell_id, 0, cooldown);
|
||||
}
|
||||
|
||||
CastSpell(this, stack_spell_id, true, NULL, triggeredByAura);
|
||||
CastSpell(this, stack_spell_id, true, nullptr, triggeredByAura);
|
||||
|
||||
Aura* dummy = GetAura(stack_spell_id);
|
||||
if (!dummy || dummy->GetStackAmount() < triggerAmount)
|
||||
return false;
|
||||
|
||||
RemoveAurasDueToSpell(stack_spell_id);
|
||||
CastSpell(victim, trigger_spell_id, true, NULL, triggeredByAura);
|
||||
CastSpell(victim, trigger_spell_id, true, nullptr, triggeredByAura);
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
|
|
@ -9158,7 +9158,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
|||
if (AuraEffect* aurEff = owner->GetDummyAuraEffect(SPELLFAMILY_WARLOCK, 3220, 0))
|
||||
{
|
||||
basepoints0 = int32((aurEff->GetAmount() * owner->SpellBaseDamageBonusDone(SpellSchoolMask(SPELL_SCHOOL_MASK_MAGIC)) + 100.0f) / 100.0f); // TODO: Is it right?
|
||||
CastCustomSpell(this, trigger_spell_id, &basepoints0, &basepoints0, NULL, true, castItem, triggeredByAura);
|
||||
CastCustomSpell(this, trigger_spell_id, &basepoints0, &basepoints0, nullptr, true, castItem, triggeredByAura);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -9316,7 +9316,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
|||
}
|
||||
|
||||
if(basepoints0)
|
||||
CastCustomSpell(target, triggerEntry->Id, &basepoints0, NULL, NULL, true, castItem, triggeredByAura);
|
||||
CastCustomSpell(target, triggerEntry->Id, &basepoints0, nullptr, nullptr, true, castItem, triggeredByAura);
|
||||
else
|
||||
CastSpell(target, triggerEntry->Id, true, castItem, triggeredByAura);
|
||||
|
||||
|
|
@ -10170,7 +10170,7 @@ void Unit::SetMinion(Minion* minion, bool apply)
|
|||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(minion->GetUInt32Value(UNIT_CREATED_BY_SPELL));
|
||||
|
||||
if (spellInfo && spellInfo->IsCooldownStartedOnEvent())
|
||||
ToPlayer()->AddSpellAndCategoryCooldowns(spellInfo, 0, NULL, true);
|
||||
ToPlayer()->AddSpellAndCategoryCooldowns(spellInfo, 0, nullptr, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -11417,7 +11417,7 @@ float Unit::SpellTakenCritChance(Unit const* caster, SpellInfo const* spellProto
|
|||
crit_chance += GetMaxPositiveAuraModifierByMiscMask(SPELL_AURA_MOD_ATTACKER_SPELL_CRIT_CHANCE, schoolMask);
|
||||
}
|
||||
|
||||
Unit::ApplyResilience(this, &crit_chance, NULL, false, CR_CRIT_TAKEN_SPELL);
|
||||
Unit::ApplyResilience(this, &crit_chance, nullptr, false, CR_CRIT_TAKEN_SPELL);
|
||||
}
|
||||
// scripted (increase crit chance ... against ... target by x%
|
||||
if (caster)
|
||||
|
|
@ -11560,10 +11560,10 @@ float Unit::SpellTakenCritChance(Unit const* caster, SpellInfo const* spellProto
|
|||
if (attackType != RANGED_ATTACK)
|
||||
{
|
||||
// xinef: little hack, crit chance dont require caster to calculate, pass victim
|
||||
Unit::ApplyResilience(this, &crit_chance, NULL, false, CR_CRIT_TAKEN_MELEE);
|
||||
Unit::ApplyResilience(this, &crit_chance, nullptr, false, CR_CRIT_TAKEN_MELEE);
|
||||
}
|
||||
else
|
||||
Unit::ApplyResilience(this, &crit_chance, NULL, false, CR_CRIT_TAKEN_RANGED);
|
||||
Unit::ApplyResilience(this, &crit_chance, nullptr, false, CR_CRIT_TAKEN_RANGED);
|
||||
|
||||
// Apply crit chance from defence skill
|
||||
if (caster)
|
||||
|
|
@ -15465,7 +15465,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
|
|||
|
||||
DamageInfo damageInfo = DamageInfo(actor, actionTarget, damage, procSpell, procSpell ? SpellSchoolMask(procSpell->SchoolMask) : SPELL_SCHOOL_MASK_NORMAL, SPELL_DIRECT_DAMAGE);
|
||||
HealInfo healInfo = HealInfo(actor, actionTarget, damage, procSpell, procSpell ? SpellSchoolMask(procSpell->SchoolMask) : SPELL_SCHOOL_MASK_NORMAL);
|
||||
ProcEventInfo eventInfo = ProcEventInfo(actor, actionTarget, target, procFlag, 0, 0, procExtra, NULL, &damageInfo, &healInfo, procAura);
|
||||
ProcEventInfo eventInfo = ProcEventInfo(actor, actionTarget, target, procFlag, 0, 0, procExtra, nullptr, &damageInfo, &healInfo, procAura);
|
||||
|
||||
ProcTriggeredList procTriggered;
|
||||
// Fill procTriggered list
|
||||
|
|
@ -15522,7 +15522,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
|
|||
// Skip this auras
|
||||
if (isNonTriggerAura[aurEff->GetAuraType()])
|
||||
continue;
|
||||
// If not trigger by default and spellProcEvent == NULL - skip
|
||||
// If not trigger by default and spellProcEvent == nullptr - skip
|
||||
if (!isTriggerAura[aurEff->GetAuraType()] && triggerData.spellProcEvent == nullptr)
|
||||
continue;
|
||||
// Some spells must always trigger
|
||||
|
|
@ -15808,7 +15808,7 @@ void Unit::GetProcAurasTriggeredOnEvent(std::list<AuraApplication*>& aurasTrigge
|
|||
void Unit::TriggerAurasProcOnEvent(CalcDamageInfo& damageInfo)
|
||||
{
|
||||
DamageInfo dmgInfo = DamageInfo(damageInfo);
|
||||
TriggerAurasProcOnEvent(nullptr, NULL, damageInfo.target, damageInfo.procAttacker, damageInfo.procVictim, 0, 0, damageInfo.procEx, NULL, &dmgInfo, nullptr);
|
||||
TriggerAurasProcOnEvent(nullptr, nullptr, damageInfo.target, damageInfo.procAttacker, damageInfo.procVictim, 0, 0, damageInfo.procEx, nullptr, &dmgInfo, nullptr);
|
||||
}
|
||||
|
||||
void Unit::TriggerAurasProcOnEvent(std::list<AuraApplication*>* myProcAuras, std::list<AuraApplication*>* targetProcAuras, Unit* actionTarget, uint32 typeMaskActor, uint32 typeMaskActionTarget, uint32 spellTypeMask, uint32 spellPhaseMask, uint32 hitMask, Spell* spell, DamageInfo* damageInfo, HealInfo* healInfo)
|
||||
|
|
@ -16706,7 +16706,7 @@ bool Unit::HandleAuraRaidProcFromChargeWithValue(AuraEffect* triggeredByAura)
|
|||
if (Unit* target = nearMembers.front())
|
||||
{
|
||||
CastSpell(target, 41637 /*Dummy visual effect triggered by main spell cast*/, true);
|
||||
CastCustomSpell(target, spellProto->Id, &heal, nullptr, nullptr, true, NULL, triggeredByAura, caster_guid);
|
||||
CastCustomSpell(target, spellProto->Id, &heal, nullptr, nullptr, true, nullptr, triggeredByAura, caster_guid);
|
||||
if (Aura* aura = target->GetAura(spellProto->Id, caster->GetGUID()))
|
||||
aura->SetCharges(jumps);
|
||||
}
|
||||
|
|
@ -16758,14 +16758,14 @@ bool Unit::HandleAuraRaidProcFromCharge(AuraEffect* triggeredByAura)
|
|||
float radius = triggeredByAura->GetSpellInfo()->Effects[triggeredByAura->GetEffIndex()].CalcRadius(caster);
|
||||
if (Unit* target = GetNextRandomRaidMemberOrPet(radius))
|
||||
{
|
||||
CastSpell(target, spellProto, true, NULL, triggeredByAura, caster_guid);
|
||||
CastSpell(target, spellProto, true, nullptr, triggeredByAura, caster_guid);
|
||||
if (Aura* aura = target->GetAura(spellProto->Id, caster->GetGUID()))
|
||||
aura->SetCharges(jumps);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CastSpell(this, damageSpellId, true, NULL, triggeredByAura, caster_guid);
|
||||
CastSpell(this, damageSpellId, true, nullptr, triggeredByAura, caster_guid);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -16938,7 +16938,7 @@ void Unit::Kill(Unit* killer, Unit* victim, bool durabilityLoss, WeaponAttackTyp
|
|||
victim->SetUInt32Value(PLAYER_SELF_RES_SPELL, ressSpellId);
|
||||
|
||||
// FORM_SPIRITOFREDEMPTION and related auras
|
||||
victim->CastSpell(victim, 27827, true, NULL, aurEff);
|
||||
victim->CastSpell(victim, 27827, true, nullptr, aurEff);
|
||||
spiritOfRedemption = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -17336,7 +17336,7 @@ void Unit::SetFeared(bool apply)
|
|||
caster = ObjectAccessor::GetUnit(*this, fearAuras.front()->GetCasterGUID());
|
||||
if (!caster)
|
||||
caster = getAttackerForHelper();
|
||||
GetMotionMaster()->MoveFleeing(caster, fearAuras.empty() ? sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_FLEE_DELAY) : 0); // caster == NULL processed in MoveFleeing
|
||||
GetMotionMaster()->MoveFleeing(caster, fearAuras.empty() ? sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_FLEE_DELAY) : 0); // caster == nullptr processed in MoveFleeing
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -18599,7 +18599,7 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId)
|
|||
bp0[j] = spellEntry->Effects[j].BasePoints;
|
||||
|
||||
bp0[i] = seatId;
|
||||
Aura::TryRefreshStackOrCreate(spellEntry, MAX_EFFECT_MASK, this, clicker, bp0, NULL, origCasterGUID);
|
||||
Aura::TryRefreshStackOrCreate(spellEntry, MAX_EFFECT_MASK, this, clicker, bp0, nullptr, origCasterGUID);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1274,11 +1274,11 @@ struct AttackPosition {
|
|||
{
|
||||
if (!val)
|
||||
{
|
||||
// _pos = NULL;
|
||||
// _pos = nullptr;
|
||||
_taken = false;
|
||||
return 0; // NULL
|
||||
return 0; // nullptr
|
||||
}
|
||||
return 0; // NULL
|
||||
return 0; // nullptr
|
||||
};
|
||||
Position _pos;
|
||||
bool _taken;
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ private:
|
|||
void InitMovementInfoForBase();
|
||||
|
||||
/// This method transforms supplied transport offsets into global coordinates
|
||||
void CalculatePassengerPosition(float& x, float& y, float& z, float* o /*= NULL*/) const override
|
||||
void CalculatePassengerPosition(float& x, float& y, float& z, float* o /*= nullptr*/) const override
|
||||
{
|
||||
TransportBase::CalculatePassengerPosition(x, y, z, o,
|
||||
GetBase()->GetPositionX(), GetBase()->GetPositionY(),
|
||||
|
|
@ -73,7 +73,7 @@ private:
|
|||
}
|
||||
|
||||
/// This method transforms supplied global coordinates into local offsets
|
||||
void CalculatePassengerOffset(float& x, float& y, float& z, float* o /*= NULL*/) const override
|
||||
void CalculatePassengerOffset(float& x, float& y, float& z, float* o /*= nullptr*/) const override
|
||||
{
|
||||
TransportBase::CalculatePassengerOffset(x, y, z, o,
|
||||
GetBase()->GetPositionX(), GetBase()->GetPositionY(),
|
||||
|
|
|
|||
|
|
@ -1361,7 +1361,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
|
|||
{
|
||||
sObjectMgr->RemoveCreatureFromGrid(*itr, data);
|
||||
|
||||
if (Creature* creature = ObjectAccessor::GetObjectInWorld(MAKE_NEW_GUID(*itr, data->id, HIGHGUID_UNIT), (Creature*)NULL))
|
||||
if (Creature* creature = ObjectAccessor::GetObjectInWorld(MAKE_NEW_GUID(*itr, data->id, HIGHGUID_UNIT), (Creature*)nullptr))
|
||||
creature->AddObjectToRemoveList();
|
||||
}
|
||||
}
|
||||
|
|
@ -1383,7 +1383,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
|
|||
{
|
||||
sObjectMgr->RemoveGameobjectFromGrid(*itr, data);
|
||||
|
||||
if (GameObject* pGameobject = ObjectAccessor::GetObjectInWorld(MAKE_NEW_GUID(*itr, data->id, HIGHGUID_GAMEOBJECT), (GameObject*)NULL))
|
||||
if (GameObject* pGameobject = ObjectAccessor::GetObjectInWorld(MAKE_NEW_GUID(*itr, data->id, HIGHGUID_GAMEOBJECT), (GameObject*)nullptr))
|
||||
pGameobject->AddObjectToRemoveList();
|
||||
}
|
||||
}
|
||||
|
|
@ -1409,7 +1409,7 @@ void GameEventMgr::ChangeEquipOrModel(int16 event_id, bool activate)
|
|||
continue;
|
||||
|
||||
// Update if spawned
|
||||
Creature* creature = ObjectAccessor::GetObjectInWorld(MAKE_NEW_GUID(itr->first, data->id, HIGHGUID_UNIT), (Creature*)NULL);
|
||||
Creature* creature = ObjectAccessor::GetObjectInWorld(MAKE_NEW_GUID(itr->first, data->id, HIGHGUID_UNIT), (Creature*)nullptr);
|
||||
if (creature)
|
||||
{
|
||||
if (activate)
|
||||
|
|
|
|||
|
|
@ -110,12 +110,12 @@ Object* ObjectAccessor::GetObjectByTypeMask(WorldObject const& p, uint64 guid, u
|
|||
|
||||
Corpse* ObjectAccessor::GetCorpse(WorldObject const& u, uint64 guid)
|
||||
{
|
||||
return GetObjectInMap(guid, u.GetMap(), (Corpse*)NULL);
|
||||
return GetObjectInMap(guid, u.GetMap(), (Corpse*)nullptr);
|
||||
}
|
||||
|
||||
GameObject* ObjectAccessor::GetGameObject(WorldObject const& u, uint64 guid)
|
||||
{
|
||||
return GetObjectInMap(guid, u.GetMap(), (GameObject*)NULL);
|
||||
return GetObjectInMap(guid, u.GetMap(), (GameObject*)nullptr);
|
||||
}
|
||||
|
||||
Transport* ObjectAccessor::GetTransport(WorldObject const& u, uint64 guid)
|
||||
|
|
@ -129,27 +129,27 @@ Transport* ObjectAccessor::GetTransport(WorldObject const& u, uint64 guid)
|
|||
|
||||
DynamicObject* ObjectAccessor::GetDynamicObject(WorldObject const& u, uint64 guid)
|
||||
{
|
||||
return GetObjectInMap(guid, u.GetMap(), (DynamicObject*)NULL);
|
||||
return GetObjectInMap(guid, u.GetMap(), (DynamicObject*)nullptr);
|
||||
}
|
||||
|
||||
Unit* ObjectAccessor::GetUnit(WorldObject const& u, uint64 guid)
|
||||
{
|
||||
return GetObjectInMap(guid, u.GetMap(), (Unit*)NULL);
|
||||
return GetObjectInMap(guid, u.GetMap(), (Unit*)nullptr);
|
||||
}
|
||||
|
||||
Creature* ObjectAccessor::GetCreature(WorldObject const& u, uint64 guid)
|
||||
{
|
||||
return GetObjectInMap(guid, u.GetMap(), (Creature*)NULL);
|
||||
return GetObjectInMap(guid, u.GetMap(), (Creature*)nullptr);
|
||||
}
|
||||
|
||||
Pet* ObjectAccessor::GetPet(WorldObject const& u, uint64 guid)
|
||||
{
|
||||
return GetObjectInMap(guid, u.GetMap(), (Pet*)NULL);
|
||||
return GetObjectInMap(guid, u.GetMap(), (Pet*)nullptr);
|
||||
}
|
||||
|
||||
Player* ObjectAccessor::GetPlayer(WorldObject const& u, uint64 guid)
|
||||
{
|
||||
return GetObjectInMap(guid, u.GetMap(), (Player*)NULL);
|
||||
return GetObjectInMap(guid, u.GetMap(), (Player*)nullptr);
|
||||
}
|
||||
|
||||
Creature* ObjectAccessor::GetCreatureOrPetOrVehicle(WorldObject const& u, uint64 guid)
|
||||
|
|
@ -165,22 +165,22 @@ Creature* ObjectAccessor::GetCreatureOrPetOrVehicle(WorldObject const& u, uint64
|
|||
|
||||
Pet* ObjectAccessor::FindPet(uint64 guid)
|
||||
{
|
||||
return GetObjectInWorld(guid, (Pet*)NULL);
|
||||
return GetObjectInWorld(guid, (Pet*)nullptr);
|
||||
}
|
||||
|
||||
Player* ObjectAccessor::FindPlayer(uint64 guid)
|
||||
{
|
||||
return GetObjectInWorld(guid, (Player*)NULL);
|
||||
return GetObjectInWorld(guid, (Player*)nullptr);
|
||||
}
|
||||
|
||||
Player* ObjectAccessor::FindPlayerInOrOutOfWorld(uint64 guid)
|
||||
{
|
||||
return GetObjectInOrOutOfWorld(guid, (Player*)NULL);
|
||||
return GetObjectInOrOutOfWorld(guid, (Player*)nullptr);
|
||||
}
|
||||
|
||||
Unit* ObjectAccessor::FindUnit(uint64 guid)
|
||||
{
|
||||
return GetObjectInWorld(guid, (Unit*)NULL);
|
||||
return GetObjectInWorld(guid, (Unit*)nullptr);
|
||||
}
|
||||
|
||||
Player* ObjectAccessor::FindConnectedPlayer(uint64 const& guid)
|
||||
|
|
@ -334,7 +334,7 @@ Corpse* ObjectAccessor::ConvertCorpseForPlayer(uint64 player_guid, bool insignia
|
|||
sLog->outStaticDebug("Deleting Corpse and spawned bones.");
|
||||
#endif
|
||||
|
||||
// Map can be NULL
|
||||
// Map can be nullptr
|
||||
Map* map = corpse->FindMap();
|
||||
bool inWorld = corpse->IsInWorld();
|
||||
|
||||
|
|
@ -419,7 +419,7 @@ void ObjectAccessor::RemoveOldCorpses()
|
|||
next2 = itr;
|
||||
++next2;
|
||||
|
||||
Corpse* c = GetObjectInWorld((*itr), (Corpse*)NULL);
|
||||
Corpse* c = GetObjectInWorld((*itr), (Corpse*)nullptr);
|
||||
if (c)
|
||||
{
|
||||
if (!c->IsExpired(now))
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ public:
|
|||
template<class T> static T* GetObjectInMap(uint64 guid, Map* map, T* /*typeSpecifier*/)
|
||||
{
|
||||
ASSERT(map);
|
||||
if (T* obj = GetObjectInWorld(guid, (T*)NULL))
|
||||
if (T* obj = GetObjectInWorld(guid, (T*)nullptr))
|
||||
if (obj->GetMap() == map)
|
||||
return obj;
|
||||
return nullptr;
|
||||
|
|
|
|||
|
|
@ -1278,7 +1278,7 @@ CreatureModelInfo const* ObjectMgr::GetCreatureModelInfo(uint32 modelId)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
uint32 ObjectMgr::ChooseDisplayId(CreatureTemplate const* cinfo, CreatureData const* data /*= NULL*/)
|
||||
uint32 ObjectMgr::ChooseDisplayId(CreatureTemplate const* cinfo, CreatureData const* data /*= nullptr*/)
|
||||
{
|
||||
// Load creature model (display id)
|
||||
if (data && data->displayid)
|
||||
|
|
@ -1287,7 +1287,7 @@ uint32 ObjectMgr::ChooseDisplayId(CreatureTemplate const* cinfo, CreatureData co
|
|||
return cinfo->GetRandomValidModelId();
|
||||
}
|
||||
|
||||
void ObjectMgr::ChooseCreatureFlags(const CreatureTemplate* cinfo, uint32& npcflag, uint32& unit_flags, uint32& dynamicflags, const CreatureData* data /*= NULL*/)
|
||||
void ObjectMgr::ChooseCreatureFlags(const CreatureTemplate* cinfo, uint32& npcflag, uint32& unit_flags, uint32& dynamicflags, const CreatureData* data /*= nullptr*/)
|
||||
{
|
||||
npcflag = cinfo->npcflag;
|
||||
unit_flags = cinfo->unit_flags;
|
||||
|
|
@ -8042,7 +8042,7 @@ GameTele const* ObjectMgr::GetGameTele(const std::string& name) const
|
|||
{
|
||||
if (itr->second.wnameLow == wname)
|
||||
return &itr->second;
|
||||
else if (alt == NULL && itr->second.wnameLow.find(wname) != std::wstring::npos)
|
||||
else if (alt == nullptr && itr->second.wnameLow.find(wname) != std::wstring::npos)
|
||||
alt = &itr->second;
|
||||
}
|
||||
|
||||
|
|
@ -8314,7 +8314,7 @@ int ObjectMgr::LoadReferenceVendor(int32 vendor, int32 item, std::set<uint32>* s
|
|||
uint32 incrtime = fields[2].GetUInt32();
|
||||
uint32 ExtendedCost = fields[3].GetUInt32();
|
||||
|
||||
if (!IsVendorItemValid(vendor, item_id, maxcount, incrtime, ExtendedCost, NULL, skip_vendors))
|
||||
if (!IsVendorItemValid(vendor, item_id, maxcount, incrtime, ExtendedCost, nullptr, skip_vendors))
|
||||
continue;
|
||||
|
||||
VendorItemData& vList = _cacheVendorItemStore[vendor];
|
||||
|
|
@ -8364,7 +8364,7 @@ void ObjectMgr::LoadVendors()
|
|||
uint32 incrtime = fields[3].GetUInt32();
|
||||
uint32 ExtendedCost = fields[4].GetUInt32();
|
||||
|
||||
if (!IsVendorItemValid(entry, item_id, maxcount, incrtime, ExtendedCost, NULL, &skip_vendors))
|
||||
if (!IsVendorItemValid(entry, item_id, maxcount, incrtime, ExtendedCost, nullptr, &skip_vendors))
|
||||
continue;
|
||||
|
||||
VendorItemData& vList = _cacheVendorItemStore[entry];
|
||||
|
|
|
|||
|
|
@ -497,7 +497,7 @@ bool Group::AddMember(Player* player)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Group::RemoveMember(uint64 guid, const RemoveMethod& method /*= GROUP_REMOVEMETHOD_DEFAULT*/, uint64 kicker /*= 0*/, const char* reason /*= NULL*/)
|
||||
bool Group::RemoveMember(uint64 guid, const RemoveMethod& method /*= GROUP_REMOVEMETHOD_DEFAULT*/, uint64 kicker /*= 0*/, const char* reason /*= nullptr*/)
|
||||
{
|
||||
BroadcastGroupUpdate();
|
||||
|
||||
|
|
@ -1355,7 +1355,7 @@ void Group::CountTheRoll(Rolls::iterator rollI, Map* allowedMap)
|
|||
continue;
|
||||
|
||||
player = ObjectAccessor::FindPlayer(itr->first);
|
||||
if (!player || (allowedMap != NULL && player->FindMap() != allowedMap))
|
||||
if (!player || (allowedMap != nullptr && player->FindMap() != allowedMap))
|
||||
{
|
||||
--roll->totalNeed;
|
||||
continue;
|
||||
|
|
@ -1419,7 +1419,7 @@ void Group::CountTheRoll(Rolls::iterator rollI, Map* allowedMap)
|
|||
continue;
|
||||
|
||||
player = ObjectAccessor::FindPlayer(itr->first);
|
||||
if (!player || (allowedMap != NULL && player->FindMap() != allowedMap))
|
||||
if (!player || (allowedMap != nullptr && player->FindMap() != allowedMap))
|
||||
{
|
||||
--roll->totalGreed;
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ enum GroupUpdateFlags
|
|||
GROUP_UPDATE_FLAG_POSITION = 0x00000100, // uint16, uint16
|
||||
GROUP_UPDATE_FLAG_AURAS = 0x00000200, // uint64 mask, for each bit set uint32 spellid + uint8 unk
|
||||
GROUP_UPDATE_FLAG_PET_GUID = 0x00000400, // uint64 pet guid
|
||||
GROUP_UPDATE_FLAG_PET_NAME = 0x00000800, // pet name, NULL terminated string
|
||||
GROUP_UPDATE_FLAG_PET_NAME = 0x00000800, // pet name, nullptr terminated string
|
||||
GROUP_UPDATE_FLAG_PET_MODEL_ID = 0x00001000, // uint16, model id
|
||||
GROUP_UPDATE_FLAG_PET_CUR_HP = 0x00002000, // uint32 pet cur health
|
||||
GROUP_UPDATE_FLAG_PET_MAX_HP = 0x00004000, // uint32 pet max health
|
||||
|
|
|
|||
|
|
@ -531,7 +531,7 @@ void Guild::BankTab::SetText(std::string const& text)
|
|||
}
|
||||
|
||||
// Sets/removes contents of specified slot.
|
||||
// If pItem == NULL contents are removed.
|
||||
// If pItem == nullptr contents are removed.
|
||||
bool Guild::BankTab::SetItem(SQLTransaction& trans, uint8 slotId, Item* item)
|
||||
{
|
||||
if (slotId >= GUILD_BANK_MAX_SLOTS)
|
||||
|
|
@ -2155,7 +2155,7 @@ void Guild::BroadcastToGuild(WorldSession* session, bool officerOnly, std::strin
|
|||
if (session && session->GetPlayer() && _HasRankRight(session->GetPlayer(), officerOnly ? GR_RIGHT_OFFCHATSPEAK : GR_RIGHT_GCHATSPEAK))
|
||||
{
|
||||
WorldPacket data;
|
||||
ChatHandler::BuildChatPacket(data, officerOnly ? CHAT_MSG_OFFICER : CHAT_MSG_GUILD, Language(language), session->GetPlayer(), NULL, msg);
|
||||
ChatHandler::BuildChatPacket(data, officerOnly ? CHAT_MSG_OFFICER : CHAT_MSG_GUILD, Language(language), session->GetPlayer(), nullptr, msg);
|
||||
for (Members::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
|
||||
if (Player* player = itr->second->FindPlayer())
|
||||
if (_HasRankRight(player, officerOnly ? GR_RIGHT_OFFCHATLISTEN : GR_RIGHT_GCHATLISTEN) && !player->GetSocial()->HasIgnore(session->GetPlayer()->GetGUIDLow()))
|
||||
|
|
@ -2873,7 +2873,7 @@ void Guild::_BroadcastEvent(GuildEvents guildEvent, uint64 guid, const char* par
|
|||
#endif
|
||||
}
|
||||
|
||||
void Guild::_SendBankList(WorldSession* session /* = NULL*/, uint8 tabId /*= 0*/, bool sendAllSlots /*= false*/, SlotIds* slots /*= NULL*/) const
|
||||
void Guild::_SendBankList(WorldSession* session /* = nullptr*/, uint8 tabId /*= 0*/, bool sendAllSlots /*= false*/, SlotIds* slots /*= nullptr*/) const
|
||||
{
|
||||
WorldPacket data(SMSG_GUILD_BANK_LIST, 500);
|
||||
data << uint64(m_bankMoney);
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@ public: // pussywizard: public class Member
|
|||
int32 GetBankWithdrawValue(uint8 tabId) const;
|
||||
void ResetValues();
|
||||
|
||||
inline Player* FindPlayer() const { return ObjectAccessor::GetObjectInOrOutOfWorld(m_guid, (Player*)NULL); }
|
||||
inline Player* FindPlayer() const { return ObjectAccessor::GetObjectInOrOutOfWorld(m_guid, (Player*)nullptr); }
|
||||
|
||||
private:
|
||||
uint32 m_guildId;
|
||||
|
|
@ -841,8 +841,8 @@ private:
|
|||
void _SendBankMoneyUpdate(WorldSession* session) const;
|
||||
void _SendBankContentUpdate(MoveItemData* pSrc, MoveItemData* pDest) const;
|
||||
void _SendBankContentUpdate(uint8 tabId, SlotIds slots) const;
|
||||
void _SendBankList(WorldSession* session = NULL, uint8 tabId = 0, bool sendFullSlots = false, SlotIds* slots = nullptr) const;
|
||||
void _SendBankList(WorldSession* session = nullptr, uint8 tabId = 0, bool sendFullSlots = false, SlotIds* slots = nullptr) const;
|
||||
|
||||
void _BroadcastEvent(GuildEvents guildEvent, uint64 guid, const char* param1 = NULL, const char* param2 = NULL, const char* param3 = nullptr) const;
|
||||
void _BroadcastEvent(GuildEvents guildEvent, uint64 guid, const char* param1 = nullptr, const char* param2 = nullptr, const char* param3 = nullptr) const;
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -564,7 +564,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket& recvData)
|
|||
{
|
||||
SendAuctionCommandResult(0, AUCTION_CANCEL, ERR_AUCTION_DATABASE_ERROR);
|
||||
//this code isn't possible ... maybe there should be assert
|
||||
sLog->outError("CHEATER : %u, he tried to cancel auction (id: %u) of another player, or auction is NULL", player->GetGUIDLow(), auctionId);
|
||||
sLog->outError("CHEATER : %u, he tried to cancel auction (id: %u) of another player, or auction is nullptr", player->GetGUIDLow(), auctionId);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
|
|||
}
|
||||
|
||||
BattlegroundQueue& bgQueue = sBattlegroundMgr->GetBattlegroundQueue(bgQueueTypeId);
|
||||
GroupQueueInfo* ginfo = bgQueue.AddGroup(_player, NULL, bracketEntry, false, false, 0, 0, 0);
|
||||
GroupQueueInfo* ginfo = bgQueue.AddGroup(_player, nullptr, bracketEntry, false, false, 0, 0, 0);
|
||||
uint32 avgWaitTime = bgQueue.GetAverageQueueWaitTime(ginfo);
|
||||
|
||||
uint32 queueSlot = _player->AddBattlegroundQueueId(bgQueueTypeId);
|
||||
|
|
@ -675,7 +675,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket& recvData)
|
|||
}
|
||||
|
||||
BattlegroundQueue& bgQueue = sBattlegroundMgr->GetBattlegroundQueue(bgQueueTypeId);
|
||||
GroupQueueInfo* ginfo = bgQueue.AddGroup(_player, NULL, bracketEntry, false, false, 0, 0, 0);
|
||||
GroupQueueInfo* ginfo = bgQueue.AddGroup(_player, nullptr, bracketEntry, false, false, 0, 0, 0);
|
||||
uint32 avgWaitTime = bgQueue.GetAverageQueueWaitTime(ginfo);
|
||||
|
||||
uint32 queueSlot = _player->AddBattlegroundQueueId(bgQueueTypeId);
|
||||
|
|
|
|||
|
|
@ -340,7 +340,7 @@ void WorldSession::HandleSetChannelWatch(WorldPacket& recvPacket)
|
|||
return;
|
||||
|
||||
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeamId()))
|
||||
if (Channel* channel = cMgr->GetChannel(channelName, NULL, false))
|
||||
if (Channel* channel = cMgr->GetChannel(channelName, nullptr, false))
|
||||
channel->AddWatching(GetPlayer());
|
||||
}
|
||||
|
||||
|
|
@ -353,6 +353,6 @@ void WorldSession::HandleClearChannelWatch(WorldPacket& recvPacket)
|
|||
return;
|
||||
|
||||
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeamId()))
|
||||
if (Channel* channel = cMgr->GetChannel(channelName, NULL, false))
|
||||
if (Channel* channel = cMgr->GetChannel(channelName, nullptr, false))
|
||||
channel->RemoveWatching(GetPlayer());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ bool LoginQueryHolder::Initialize()
|
|||
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_MAILCOUNT_UNREAD);
|
||||
stmt->setUInt32(0, lowGuid);
|
||||
stmt->setUInt64(1, uint64(time(NULL)));
|
||||
stmt->setUInt64(1, uint64(time(nullptr)));
|
||||
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_MAIL_UNREAD_COUNT, stmt);
|
||||
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_MAILDATE);
|
||||
|
|
|
|||
|
|
@ -433,7 +433,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
|||
return;
|
||||
#endif
|
||||
WorldPacket data;
|
||||
ChatHandler::BuildChatPacket(data, ChatMsg(type), Language(lang), sender, NULL, msg);
|
||||
ChatHandler::BuildChatPacket(data, ChatMsg(type), Language(lang), sender, nullptr, msg);
|
||||
group->BroadcastPacket(&data, false, group->GetMemberGroup(GetPlayer()->GetGUID()));
|
||||
}
|
||||
break;
|
||||
|
|
@ -488,7 +488,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
|||
return;
|
||||
#endif
|
||||
WorldPacket data;
|
||||
ChatHandler::BuildChatPacket(data, CHAT_MSG_RAID, Language(lang), sender, NULL, msg);
|
||||
ChatHandler::BuildChatPacket(data, CHAT_MSG_RAID, Language(lang), sender, nullptr, msg);
|
||||
group->BroadcastPacket(&data, false);
|
||||
}
|
||||
break;
|
||||
|
|
@ -509,7 +509,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
|||
return;
|
||||
#endif
|
||||
WorldPacket data;
|
||||
ChatHandler::BuildChatPacket(data, CHAT_MSG_RAID_LEADER, Language(lang), sender, NULL, msg);
|
||||
ChatHandler::BuildChatPacket(data, CHAT_MSG_RAID_LEADER, Language(lang), sender, nullptr, msg);
|
||||
group->BroadcastPacket(&data, false);
|
||||
}
|
||||
break;
|
||||
|
|
@ -526,7 +526,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
|||
#endif
|
||||
WorldPacket data;
|
||||
//in battleground, raid warning is sent only to players in battleground - code is ok
|
||||
ChatHandler::BuildChatPacket(data, CHAT_MSG_RAID_WARNING, Language(lang), sender, NULL, msg);
|
||||
ChatHandler::BuildChatPacket(data, CHAT_MSG_RAID_WARNING, Language(lang), sender, nullptr, msg);
|
||||
group->BroadcastPacket(&data, false);
|
||||
}
|
||||
break;
|
||||
|
|
@ -543,7 +543,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
|||
return;
|
||||
#endif
|
||||
WorldPacket data;
|
||||
ChatHandler::BuildChatPacket(data, CHAT_MSG_BATTLEGROUND, Language(lang), sender, NULL, msg);
|
||||
ChatHandler::BuildChatPacket(data, CHAT_MSG_BATTLEGROUND, Language(lang), sender, nullptr, msg);
|
||||
group->BroadcastPacket(&data, false);
|
||||
}
|
||||
break;
|
||||
|
|
@ -560,7 +560,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
|||
return;
|
||||
#endif
|
||||
WorldPacket data;
|
||||
ChatHandler::BuildChatPacket(data, CHAT_MSG_BATTLEGROUND_LEADER, Language(lang), sender, NULL, msg);
|
||||
ChatHandler::BuildChatPacket(data, CHAT_MSG_BATTLEGROUND_LEADER, Language(lang), sender, nullptr, msg);
|
||||
group->BroadcastPacket(&data, false);
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -36,13 +36,13 @@ void WorldSession::HandleSplitItemOpcode(WorldPacket& recvData)
|
|||
|
||||
if (!_player->IsValidPos(srcbag, srcslot, true))
|
||||
{
|
||||
_player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, nullptr);
|
||||
_player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_player->IsValidPos(dstbag, dstslot, false)) // can be autostore pos
|
||||
{
|
||||
_player->SendEquipError(EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT, NULL, nullptr);
|
||||
_player->SendEquipError(EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -63,13 +63,13 @@ void WorldSession::HandleSwapInvItemOpcode(WorldPacket& recvData)
|
|||
|
||||
if (!_player->IsValidPos(INVENTORY_SLOT_BAG_0, srcslot, true))
|
||||
{
|
||||
_player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, nullptr);
|
||||
_player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_player->IsValidPos(INVENTORY_SLOT_BAG_0, dstslot, true))
|
||||
{
|
||||
_player->SendEquipError(EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT, NULL, nullptr);
|
||||
_player->SendEquipError(EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -127,13 +127,13 @@ void WorldSession::HandleSwapItem(WorldPacket& recvData)
|
|||
|
||||
if (!_player->IsValidPos(srcbag, srcslot, true))
|
||||
{
|
||||
_player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, nullptr);
|
||||
_player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_player->IsValidPos(dstbag, dstslot, true))
|
||||
{
|
||||
_player->SendEquipError(EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT, NULL, nullptr);
|
||||
_player->SendEquipError(EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -245,7 +245,7 @@ void WorldSession::HandleAutoEquipItemOpcode(WorldPacket& recvData)
|
|||
_player->AutoUnequipOffhandIfNeed();
|
||||
|
||||
// Xinef: Call this here after all needed items are equipped
|
||||
_player->RemoveItemDependentAurasAndCasts((Item*)NULL);
|
||||
_player->RemoveItemDependentAurasAndCasts((Item*)nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -273,13 +273,13 @@ void WorldSession::HandleDestroyItemOpcode(WorldPacket& recvData)
|
|||
Item* pItem = _player->GetItemByPos(bag, slot);
|
||||
if (!pItem)
|
||||
{
|
||||
_player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, nullptr);
|
||||
_player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
if (pItem->GetTemplate()->Flags & ITEM_FLAG_NO_USER_DESTROY)
|
||||
{
|
||||
_player->SendEquipError(EQUIP_ERR_CANT_DROP_SOULBOUND, NULL, nullptr);
|
||||
_player->SendEquipError(EQUIP_ERR_CANT_DROP_SOULBOUND, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -621,7 +621,7 @@ void WorldSession::HandleReadItem(WorldPacket& recvData)
|
|||
SendPacket(&data);
|
||||
}
|
||||
else
|
||||
_player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, nullptr);
|
||||
_player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, nullptr, nullptr);
|
||||
}
|
||||
|
||||
void WorldSession::HandleSellItemOpcode(WorldPacket& recvData)
|
||||
|
|
@ -643,7 +643,7 @@ void WorldSession::HandleSellItemOpcode(WorldPacket& recvData)
|
|||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleSellItemOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(vendorguid)));
|
||||
#endif
|
||||
_player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, NULL, itemguid, 0);
|
||||
_player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, nullptr, itemguid, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -768,7 +768,7 @@ void WorldSession::HandleBuybackItem(WorldPacket& recvData)
|
|||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleBuybackItem - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(vendorguid)));
|
||||
#endif
|
||||
_player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, NULL, 0, 0);
|
||||
_player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, nullptr, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -905,7 +905,7 @@ void WorldSession::SendListInventory(uint64 vendorGuid, uint32 vendorEntry)
|
|||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: SendListInventory - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(vendorGuid)));
|
||||
#endif
|
||||
_player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, NULL, 0, 0);
|
||||
_player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, nullptr, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1011,7 +1011,7 @@ void WorldSession::HandleAutoStoreBagItemOpcode(WorldPacket& recvData)
|
|||
|
||||
if (!_player->IsValidPos(dstbag, NULL_SLOT, false)) // can be autostore pos
|
||||
{
|
||||
_player->SendEquipError(EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT, NULL, nullptr);
|
||||
_player->SendEquipError(EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1200,7 +1200,7 @@ void WorldSession::HandleSetAmmoOpcode(WorldPacket& recvData)
|
|||
{
|
||||
if (!_player->IsAlive())
|
||||
{
|
||||
_player->SendEquipError(EQUIP_ERR_YOU_ARE_DEAD, NULL, nullptr);
|
||||
_player->SendEquipError(EQUIP_ERR_YOU_ARE_DEAD, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1215,7 +1215,7 @@ void WorldSession::HandleSetAmmoOpcode(WorldPacket& recvData)
|
|||
{
|
||||
if (!_player->GetItemCount(item))
|
||||
{
|
||||
_player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, nullptr);
|
||||
_player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ uint8 WorldSession::HandleLoadPetFromDBFirstCallback(PreparedQueryResult result,
|
|||
uint8 petSlot = fields[7].GetUInt8();
|
||||
bool current = petSlot == PET_SAVE_AS_CURRENT;
|
||||
uint32 summon_spell_id = fields[15].GetUInt32();
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(summon_spell_id); // CANT BE NULL
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(summon_spell_id); // CANT BE nullptr
|
||||
bool is_temporary_summoned = spellInfo && spellInfo->GetDuration() > 0;
|
||||
uint32 pet_number = fields[0].GetUInt32();
|
||||
uint32 savedhealth = fields[10].GetUInt32();
|
||||
|
|
@ -293,7 +293,7 @@ void WorldSession::HandleLoadPetFromDBSecondCallback(LoadPetFromDBQueryHolder* h
|
|||
pet->_LoadAuras(holder->GetPreparedResult(PET_LOAD_QUERY_LOADAURAS), holder->GetDiffTime());
|
||||
bool current = holder->GetCurrent();
|
||||
uint32 summon_spell_id = pet->GetUInt32Value(UNIT_CREATED_BY_SPELL);
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(summon_spell_id); // CANT BE NULL
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(summon_spell_id); // CANT BE nullptr
|
||||
bool is_temporary_summoned = spellInfo && spellInfo->GetDuration() > 0;
|
||||
|
||||
// load action bar, if data broken will fill later by default spells.
|
||||
|
|
@ -835,7 +835,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint16 spellid
|
|||
pet->SendPetAIReaction(guid1);
|
||||
}
|
||||
|
||||
pet->ToPet()->CastWhenWillAvailable(spellid, unit_target, NULL, tempspellIsPositive);
|
||||
pet->ToPet()->CastWhenWillAvailable(spellid, unit_target, nullptr, tempspellIsPositive);
|
||||
}
|
||||
}
|
||||
else if (haspositiveeffect)
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
|
|||
ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(charterid);
|
||||
if (!pProto)
|
||||
{
|
||||
_player->SendBuyError(BUY_ERR_CANT_FIND_ITEM, NULL, charterid, 0);
|
||||
_player->SendBuyError(BUY_ERR_CANT_FIND_ITEM, nullptr, charterid, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -479,7 +479,7 @@ void WorldSession::HandleQuestConfirmAccept(WorldPacket& recvData)
|
|||
return;
|
||||
|
||||
if (_player->CanAddQuest(quest, true))
|
||||
_player->AddQuestAndCheckCompletion(quest, nullptr); // NULL, this prevent DB script from duplicate running
|
||||
_player->AddQuestAndCheckCompletion(quest, nullptr); // nullptr, this prevent DB script from duplicate running
|
||||
|
||||
_player->SetDivider(0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,20 +69,20 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
|
|||
|
||||
if (glyphIndex >= MAX_GLYPH_SLOT_INDEX)
|
||||
{
|
||||
pUser->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, nullptr);
|
||||
pUser->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
Item* pItem = pUser->GetUseableItemByPos(bagIndex, slot);
|
||||
if (!pItem)
|
||||
{
|
||||
pUser->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, nullptr);
|
||||
pUser->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
if (pItem->GetGUID() != itemGUID)
|
||||
{
|
||||
pUser->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, nullptr);
|
||||
pUser->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -177,7 +177,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
|
|||
// xinef: additional check, client outputs message on its own
|
||||
if (!pUser->IsAlive())
|
||||
{
|
||||
pUser->SendEquipError(EQUIP_ERR_YOU_ARE_DEAD, NULL, nullptr);
|
||||
pUser->SendEquipError(EQUIP_ERR_YOU_ARE_DEAD, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -192,7 +192,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
|
|||
Item* item = pUser->GetItemByPos(bagIndex, slot);
|
||||
if (!item)
|
||||
{
|
||||
pUser->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, nullptr);
|
||||
pUser->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -437,7 +437,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
|
|||
{
|
||||
SpellInfo const* actualSpellInfo = spellInfo->GetAuraRankForLevel(targets.GetUnitTarget()->getLevel());
|
||||
|
||||
// if rank not found then function return NULL but in explicit cast case original spell can be casted and later failed with appropriate error message
|
||||
// if rank not found then function return nullptr but in explicit cast case original spell can be casted and later failed with appropriate error message
|
||||
if (actualSpellInfo)
|
||||
spellInfo = actualSpellInfo;
|
||||
}
|
||||
|
|
@ -620,7 +620,7 @@ void WorldSession::HandleMirrorImageDataRequest(WorldPacket& recvData)
|
|||
recvData >> guid;
|
||||
|
||||
// Get unit for which data is needed by client
|
||||
Unit* unit = ObjectAccessor::GetObjectInWorld(guid, (Unit*)NULL);
|
||||
Unit* unit = ObjectAccessor::GetObjectInWorld(guid, (Unit*)nullptr);
|
||||
if (!unit)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -133,8 +133,8 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
|
|||
{
|
||||
ItemPosCountVec traderDst;
|
||||
ItemPosCountVec playerDst;
|
||||
bool traderCanTrade = (myItems[i] == NULL || trader->CanStoreItem(NULL_BAG, NULL_SLOT, traderDst, myItems[i], false) == EQUIP_ERR_OK);
|
||||
bool playerCanTrade = (hisItems[i] == NULL || _player->CanStoreItem(NULL_BAG, NULL_SLOT, playerDst, hisItems[i], false) == EQUIP_ERR_OK);
|
||||
bool traderCanTrade = (myItems[i] == nullptr || trader->CanStoreItem(NULL_BAG, NULL_SLOT, traderDst, myItems[i], false) == EQUIP_ERR_OK);
|
||||
bool playerCanTrade = (hisItems[i] == nullptr || _player->CanStoreItem(NULL_BAG, NULL_SLOT, playerDst, hisItems[i], false) == EQUIP_ERR_OK);
|
||||
if (traderCanTrade && playerCanTrade)
|
||||
{
|
||||
// Ok, if trade item exists and can be stored
|
||||
|
|
@ -209,7 +209,7 @@ static void setAcceptTradeMode(TradeData* myTrade, TradeData* hisTrade, Item * *
|
|||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outStaticDebug("player trade item %u bag: %u slot: %u", item->GetGUIDLow(), item->GetBagSlot(), item->GetSlot());
|
||||
#endif
|
||||
//Can return NULL
|
||||
//Can return nullptr
|
||||
myItems[i] = item;
|
||||
myItems[i]->SetInTrade();
|
||||
}
|
||||
|
|
@ -280,14 +280,14 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
|
|||
|
||||
if (_player->GetMoney() >= uint32(MAX_MONEY_AMOUNT) - his_trade->GetMoney())
|
||||
{
|
||||
_player->SendEquipError(EQUIP_ERR_TOO_MUCH_GOLD, NULL, nullptr);
|
||||
_player->SendEquipError(EQUIP_ERR_TOO_MUCH_GOLD, nullptr, nullptr);
|
||||
my_trade->SetAccepted(false, true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (trader->GetMoney() >= uint32(MAX_MONEY_AMOUNT) - my_trade->GetMoney())
|
||||
{
|
||||
trader->SendEquipError(EQUIP_ERR_TOO_MUCH_GOLD, NULL, nullptr);
|
||||
trader->SendEquipError(EQUIP_ERR_TOO_MUCH_GOLD, nullptr, nullptr);
|
||||
his_trade->SetAccepted(false, true);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -459,7 +459,7 @@ void InstanceSaveManager::_ResetSave(InstanceSaveHashMap::iterator& itr)
|
|||
for (InstanceSave::PlayerListType::iterator iter = pList.begin(), iter2; iter != pList.end(); )
|
||||
{
|
||||
iter2 = iter++;
|
||||
PlayerUnbindInstanceNotExtended(*iter2, itr->second->GetMapId(), itr->second->GetDifficulty(), ObjectAccessor::GetObjectInOrOutOfWorld(MAKE_NEW_GUID(*iter2, 0, HIGHGUID_PLAYER), (Player*)NULL));
|
||||
PlayerUnbindInstanceNotExtended(*iter2, itr->second->GetMapId(), itr->second->GetDifficulty(), ObjectAccessor::GetObjectInOrOutOfWorld(MAKE_NEW_GUID(*iter2, 0, HIGHGUID_PLAYER), (Player*)nullptr));
|
||||
}
|
||||
|
||||
// delete stuff if no players left (noone extended id)
|
||||
|
|
@ -576,7 +576,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b
|
|||
}
|
||||
}
|
||||
|
||||
InstancePlayerBind* InstanceSaveManager::PlayerBindToInstance(uint32 guidLow, InstanceSave* save, bool permanent, Player* player /*= NULL*/)
|
||||
InstancePlayerBind* InstanceSaveManager::PlayerBindToInstance(uint32 guidLow, InstanceSave* save, bool permanent, Player* player /*= nullptr*/)
|
||||
{
|
||||
InstancePlayerBind& bind = playerBindStorage[guidLow]->m[save->GetDifficulty()][save->GetMapId()];
|
||||
ASSERT(!bind.perm || permanent); // ensure there's no changing permanent to temporary, this can be done only by unbinding
|
||||
|
|
@ -645,7 +645,7 @@ InstancePlayerBind* InstanceSaveManager::PlayerBindToInstance(uint32 guidLow, In
|
|||
return &bind;
|
||||
}
|
||||
|
||||
void InstanceSaveManager::PlayerUnbindInstance(uint32 guidLow, uint32 mapid, Difficulty difficulty, bool deleteFromDB, Player* player /*= NULL*/)
|
||||
void InstanceSaveManager::PlayerUnbindInstance(uint32 guidLow, uint32 mapid, Difficulty difficulty, bool deleteFromDB, Player* player /*= nullptr*/)
|
||||
{
|
||||
BoundInstancesMapWrapper* w = playerBindStorage[guidLow];
|
||||
BoundInstancesMap::iterator itr = w->m[difficulty].find(mapid);
|
||||
|
|
@ -668,7 +668,7 @@ void InstanceSaveManager::PlayerUnbindInstance(uint32 guidLow, uint32 mapid, Dif
|
|||
}
|
||||
}
|
||||
|
||||
void InstanceSaveManager::PlayerUnbindInstanceNotExtended(uint32 guidLow, uint32 mapid, Difficulty difficulty, Player* player /*= NULL*/)
|
||||
void InstanceSaveManager::PlayerUnbindInstanceNotExtended(uint32 guidLow, uint32 mapid, Difficulty difficulty, Player* player /*= nullptr*/)
|
||||
{
|
||||
BoundInstancesMapWrapper* w = playerBindStorage[guidLow];
|
||||
BoundInstancesMap::iterator itr = w->m[difficulty].find(mapid);
|
||||
|
|
@ -773,5 +773,5 @@ void InstanceSaveManager::UnbindAllFor(InstanceSave* save)
|
|||
{
|
||||
InstanceSave::PlayerListType& pList = save->m_playerList;
|
||||
while (!pList.empty())
|
||||
PlayerUnbindInstance(*(pList.begin()), save->GetMapId(), save->GetDifficulty(), true, ObjectAccessor::GetObjectInOrOutOfWorld(MAKE_NEW_GUID(*(pList.begin()), 0, HIGHGUID_PLAYER), (Player*)NULL));
|
||||
PlayerUnbindInstance(*(pList.begin()), save->GetMapId(), save->GetDifficulty(), true, ObjectAccessor::GetObjectInOrOutOfWorld(MAKE_NEW_GUID(*(pList.begin()), 0, HIGHGUID_PLAYER), (Player*)nullptr));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -329,7 +329,7 @@ void InstanceScript::DoSendNotifyToInstance(char const* format, ...)
|
|||
}
|
||||
|
||||
// Update Achievement Criteria for all players in instance
|
||||
void InstanceScript::DoUpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1 /*= 0*/, uint32 miscValue2 /*= 0*/, Unit* unit /*= NULL*/)
|
||||
void InstanceScript::DoUpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1 /*= 0*/, uint32 miscValue2 /*= 0*/, Unit* unit /*= nullptr*/)
|
||||
{
|
||||
Map::PlayerList const& PlayerList = instance->GetPlayers();
|
||||
|
||||
|
|
@ -390,7 +390,7 @@ void InstanceScript::DoCastSpellOnPlayers(uint32 spell)
|
|||
player->CastSpell(player, spell, true);
|
||||
}
|
||||
|
||||
bool InstanceScript::CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/ /*= NULL*/, uint32 /*miscvalue1*/ /*= 0*/)
|
||||
bool InstanceScript::CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/ /*= nullptr*/, uint32 /*miscvalue1*/ /*= 0*/)
|
||||
{
|
||||
sLog->outError("Achievement system call InstanceScript::CheckAchievementCriteriaMeet but instance script for map %u not have implementation for achievement criteria %u",
|
||||
instance->GetId(), criteria_id);
|
||||
|
|
@ -416,7 +416,7 @@ void InstanceScript::SetCompletedEncountersMask(uint32 newMask, bool save)
|
|||
}
|
||||
}
|
||||
|
||||
void InstanceScript::SendEncounterUnit(uint32 type, Unit* unit /*= NULL*/, uint8 param1 /*= 0*/, uint8 param2 /*= 0*/)
|
||||
void InstanceScript::SendEncounterUnit(uint32 type, Unit* unit /*= nullptr*/, uint8 param1 /*= 0*/, uint8 param2 /*= 0*/)
|
||||
{
|
||||
// size of this packet is at most 15 (usually less)
|
||||
WorldPacket data(SMSG_UPDATE_INSTANCE_ENCOUNTER_UNIT, 15);
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ public:
|
|||
|
||||
// Achievement criteria additional requirements check
|
||||
// NOTE: not use this if same can be checked existed requirement types from AchievementCriteriaRequirementType
|
||||
virtual bool CheckAchievementCriteriaMeet(uint32 /*criteria_id*/, Player const* /*source*/, Unit const* /*target*/ = NULL, uint32 /*miscvalue1*/ = 0);
|
||||
virtual bool CheckAchievementCriteriaMeet(uint32 /*criteria_id*/, Player const* /*source*/, Unit const* /*target*/ = nullptr, uint32 /*miscvalue1*/ = 0);
|
||||
|
||||
// Checks boss requirements (one boss required to kill other)
|
||||
virtual bool CheckRequiredBosses(uint32 /*bossId*/, Player const* /*player*/ = nullptr) const { return true; }
|
||||
|
|
@ -203,7 +203,7 @@ public:
|
|||
// Returns completed encounters mask for packets
|
||||
uint32 GetCompletedEncounterMask() const { return completedEncounters; }
|
||||
|
||||
void SendEncounterUnit(uint32 type, Unit* unit = NULL, uint8 param1 = 0, uint8 param2 = 0);
|
||||
void SendEncounterUnit(uint32 type, Unit* unit = nullptr, uint8 param1 = 0, uint8 param2 = 0);
|
||||
|
||||
virtual void FillInitialWorldStates(WorldPacket& /*data*/) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ private:
|
|||
LootStoreItemList ExplicitlyChanced; // Entries with chances defined in DB
|
||||
LootStoreItemList EqualChanced; // Zero chances - every entry takes the same chance
|
||||
|
||||
LootStoreItem const* Roll(Loot& loot, Player const* player, LootStore const& store, uint16 lootMode) const; // Rolls an item from the group, returns NULL if all miss their chances
|
||||
LootStoreItem const* Roll(Loot& loot, Player const* player, LootStore const& store, uint16 lootMode) const; // Rolls an item from the group, returns nullptr if all miss their chances
|
||||
|
||||
// This class must never be copied - storing pointers
|
||||
LootGroup(LootGroup const&);
|
||||
|
|
@ -1119,7 +1119,7 @@ void LootTemplate::LootGroup::AddEntry(LootStoreItem* item)
|
|||
EqualChanced.push_back(item);
|
||||
}
|
||||
|
||||
// Rolls an item from the group, returns NULL if all miss their chances
|
||||
// Rolls an item from the group, returns nullptr if all miss their chances
|
||||
LootStoreItem const* LootTemplate::LootGroup::Roll(Loot& loot, Player const* player, LootStore const& store, uint16 lootMode) const
|
||||
{
|
||||
LootStoreItemList possibleLoot = ExplicitlyChanced;
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ void MailDraft::SendMailTo(SQLTransaction& trans, MailReceiver const& receiver,
|
|||
if (!sendMail) // can be changed in the hook
|
||||
return;
|
||||
|
||||
Player* pReceiver = receiver.GetPlayer(); // can be NULL
|
||||
Player* pReceiver = receiver.GetPlayer(); // can be nullptr
|
||||
Player* pSender = ObjectAccessor::FindPlayerInOrOutOfWorld(MAKE_NEW_GUID(sender.GetSenderId(), 0, HIGHGUID_PLAYER));
|
||||
|
||||
if (pReceiver)
|
||||
|
|
|
|||
|
|
@ -185,11 +185,11 @@ void Map::LoadMap(int gx, int gy, bool reload)
|
|||
sScriptMgr->OnUnloadGridMap(this, GridMaps[gx][gy], gx, gy);
|
||||
|
||||
delete (GridMaps[gx][gy]);
|
||||
GridMaps[gx][gy] = NULL;
|
||||
GridMaps[gx][gy] = nullptr;
|
||||
}
|
||||
|
||||
// map file name
|
||||
char* tmp = NULL;
|
||||
char* tmp = nullptr;
|
||||
int len = sWorld->GetDataPath().length() + strlen("maps/%03u%02u%02u.map") + 1;
|
||||
tmp = new char[len];
|
||||
snprintf(tmp, len, (char*)(sWorld->GetDataPath() + "maps/%03u%02u%02u.map").c_str(), GetId(), gx, gy);
|
||||
|
|
@ -229,7 +229,7 @@ Map::Map(uint32 id, uint32 InstanceId, uint8 SpawnMode, Map* _parent) :
|
|||
for (unsigned int j = 0; j < MAX_NUMBER_OF_GRIDS; ++j)
|
||||
{
|
||||
//z code
|
||||
GridMaps[idx][j] = NULL;
|
||||
GridMaps[idx][j] = nullptr;
|
||||
setNGrid(nullptr, idx, j);
|
||||
}
|
||||
}
|
||||
|
|
@ -1909,7 +1909,7 @@ GridMap* Map::GetGrid(float x, float y)
|
|||
return GridMaps[gx][gy];
|
||||
}
|
||||
|
||||
float Map::GetWaterOrGroundLevel(uint32 phasemask, float x, float y, float z, float* ground /*= NULL*/, bool /*swim = false*/, float collisionHeight) const
|
||||
float Map::GetWaterOrGroundLevel(uint32 phasemask, float x, float y, float z, float* ground /*= nullptr*/, bool /*swim = false*/, float collisionHeight) const
|
||||
{
|
||||
if (const_cast<Map*>(this)->GetGrid(x, y))
|
||||
{
|
||||
|
|
@ -3056,17 +3056,17 @@ void BattlegroundMap::RemoveAllPlayers()
|
|||
|
||||
Player* Map::GetPlayer(uint64 guid)
|
||||
{
|
||||
return ObjectAccessor::GetObjectInMap(guid, this, (Player*)NULL);
|
||||
return ObjectAccessor::GetObjectInMap(guid, this, (Player*)nullptr);
|
||||
}
|
||||
|
||||
Creature* Map::GetCreature(uint64 guid)
|
||||
{
|
||||
return ObjectAccessor::GetObjectInMap(guid, this, (Creature*)NULL);
|
||||
return ObjectAccessor::GetObjectInMap(guid, this, (Creature*)nullptr);
|
||||
}
|
||||
|
||||
GameObject* Map::GetGameObject(uint64 guid)
|
||||
{
|
||||
return ObjectAccessor::GetObjectInMap(guid, this, (GameObject*)NULL);
|
||||
return ObjectAccessor::GetObjectInMap(guid, this, (GameObject*)nullptr);
|
||||
}
|
||||
|
||||
Transport* Map::GetTransport(uint64 guid)
|
||||
|
|
@ -3080,17 +3080,17 @@ Transport* Map::GetTransport(uint64 guid)
|
|||
|
||||
DynamicObject* Map::GetDynamicObject(uint64 guid)
|
||||
{
|
||||
return ObjectAccessor::GetObjectInMap(guid, this, (DynamicObject*)NULL);
|
||||
return ObjectAccessor::GetObjectInMap(guid, this, (DynamicObject*)nullptr);
|
||||
}
|
||||
|
||||
Pet* Map::GetPet(uint64 guid)
|
||||
{
|
||||
return ObjectAccessor::GetObjectInMap(guid, this, (Pet*)NULL);
|
||||
return ObjectAccessor::GetObjectInMap(guid, this, (Pet*)nullptr);
|
||||
}
|
||||
|
||||
Corpse* Map::GetCorpse(uint64 guid)
|
||||
{
|
||||
return ObjectAccessor::GetObjectInMap(guid, this, (Corpse*)NULL);
|
||||
return ObjectAccessor::GetObjectInMap(guid, this, (Corpse*)nullptr);
|
||||
}
|
||||
|
||||
void Map::UpdateIteratorBack(Player* player)
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ Map* MapInstanced::CreateInstanceForPlayer(const uint32 mapId, Player* player)
|
|||
uint32 newInstanceId = sMapMgr->GenerateInstanceId();
|
||||
ASSERT(!FindInstanceMap(newInstanceId)); // pussywizard: instance with new id can't exist
|
||||
Difficulty diff = player->GetGroup() ? player->GetGroup()->GetDifficulty(IsRaid()) : player->GetDifficulty(IsRaid());
|
||||
map = CreateInstance(newInstanceId, NULL, diff);
|
||||
map = CreateInstance(newInstanceId, nullptr, diff);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public:
|
|||
Map* FindInstanceMap(uint32 instanceId) const
|
||||
{
|
||||
InstancedMaps::const_iterator i = m_InstancedMaps.find(instanceId);
|
||||
return(i == m_InstancedMaps.end() ? NULL : i->second);
|
||||
return(i == m_InstancedMaps.end() ? nullptr : i->second);
|
||||
}
|
||||
bool DestroyInstance(InstancedMaps::iterator& itr);
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public:
|
|||
Map* FindBaseMap(uint32 mapId) const // pussywizard: need this public for movemaps (mmaps)
|
||||
{
|
||||
MapMapType::const_iterator iter = i_maps.find(mapId);
|
||||
return (iter == i_maps.end() ? NULL : iter->second);
|
||||
return (iter == i_maps.end() ? nullptr : iter->second);
|
||||
}
|
||||
|
||||
uint32 GetAreaId(uint32 mapid, float x, float y, float z) const
|
||||
|
|
|
|||
|
|
@ -344,7 +344,7 @@ void TransportMgr::AddPathNodeToTransport(uint32 transportEntry, uint32 timeSeg,
|
|||
animNode.Path[timeSeg] = node;
|
||||
}
|
||||
|
||||
MotionTransport* TransportMgr::CreateTransport(uint32 entry, uint32 guid /*= 0*/, Map* map /*= NULL*/)
|
||||
MotionTransport* TransportMgr::CreateTransport(uint32 entry, uint32 guid /*= 0*/, Map* map /*= nullptr*/)
|
||||
{
|
||||
// instance case, execute GetGameObjectEntry hook
|
||||
if (map)
|
||||
|
|
|
|||
|
|
@ -368,7 +368,7 @@ GraveyardStruct const* Graveyard::GetGraveyard(const std::string& name) const
|
|||
{
|
||||
if (itr->second.wnameLow == wname)
|
||||
return &itr->second;
|
||||
else if (alt == NULL && itr->second.wnameLow.find(wname) != std::wstring::npos)
|
||||
else if (alt == nullptr && itr->second.wnameLow.find(wname) != std::wstring::npos)
|
||||
alt = &itr->second;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ void MotionMaster::InitDefault()
|
|||
if (_owner->GetTypeId() == TYPEID_UNIT && _owner->IsAlive())
|
||||
{
|
||||
MovementGenerator* movement = FactorySelector::selectMovementGenerator(_owner->ToCreature());
|
||||
Mutate(movement == NULL ? &si_idleMovement : movement, MOTION_SLOT_IDLE);
|
||||
Mutate(movement == nullptr ? &si_idleMovement : movement, MOTION_SLOT_IDLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class WaypointMovementGenerator<Creature> : public MovementGeneratorMedium< Crea
|
|||
{
|
||||
public:
|
||||
WaypointMovementGenerator(uint32 _path_id = 0, bool _repeating = true)
|
||||
: PathMovementBase((WaypointPath const*)NULL), i_nextMoveTime(0), m_isArrivalDone(false), path_id(_path_id), repeating(_repeating) {}
|
||||
: PathMovementBase((WaypointPath const*)nullptr), i_nextMoveTime(0), m_isArrivalDone(false), path_id(_path_id), repeating(_repeating) {}
|
||||
~WaypointMovementGenerator() { i_path = nullptr; }
|
||||
void DoInitialize(Creature*);
|
||||
void DoFinalize(Creature*);
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ void OutdoorPvPMgr::InitOutdoorPvP()
|
|||
pvp = sScriptMgr->CreateOutdoorPvP(iter->second);
|
||||
if (!pvp)
|
||||
{
|
||||
sLog->outError("Could not initialize OutdoorPvP object for type ID %u; got NULL pointer from script.", uint32(i));
|
||||
sLog->outError("Could not initialize OutdoorPvP object for type ID %u; got nullptr pointer from script.", uint32(i));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ void PoolGroup<Creature>::Despawn1Object(uint32 guid)
|
|||
{
|
||||
sObjectMgr->RemoveCreatureFromGrid(guid, data);
|
||||
|
||||
if (Creature* creature = ObjectAccessor::GetObjectInWorld(MAKE_NEW_GUID(guid, data->id, HIGHGUID_UNIT), (Creature*)NULL))
|
||||
if (Creature* creature = ObjectAccessor::GetObjectInWorld(MAKE_NEW_GUID(guid, data->id, HIGHGUID_UNIT), (Creature*)nullptr))
|
||||
creature->AddObjectToRemoveList();
|
||||
}
|
||||
}
|
||||
|
|
@ -223,7 +223,7 @@ void PoolGroup<GameObject>::Despawn1Object(uint32 guid)
|
|||
{
|
||||
sObjectMgr->RemoveGameobjectFromGrid(guid, data);
|
||||
|
||||
if (GameObject* pGameobject = ObjectAccessor::GetObjectInWorld(MAKE_NEW_GUID(guid, data->id, HIGHGUID_GAMEOBJECT), (GameObject*)NULL))
|
||||
if (GameObject* pGameobject = ObjectAccessor::GetObjectInWorld(MAKE_NEW_GUID(guid, data->id, HIGHGUID_GAMEOBJECT), (GameObject*)nullptr))
|
||||
pGameobject->AddObjectToRemoveList();
|
||||
}
|
||||
}
|
||||
|
|
@ -505,7 +505,7 @@ template <>
|
|||
void PoolGroup<Creature>::ReSpawn1Object(PoolObject* obj)
|
||||
{
|
||||
if (CreatureData const* data = sObjectMgr->GetCreatureData(obj->guid))
|
||||
if (Creature* creature = ObjectAccessor::GetObjectInWorld(MAKE_NEW_GUID(obj->guid, data->id, HIGHGUID_UNIT), (Creature*)NULL))
|
||||
if (Creature* creature = ObjectAccessor::GetObjectInWorld(MAKE_NEW_GUID(obj->guid, data->id, HIGHGUID_UNIT), (Creature*)nullptr))
|
||||
creature->GetMap()->AddToMap(creature);
|
||||
}
|
||||
|
||||
|
|
@ -514,7 +514,7 @@ template <>
|
|||
void PoolGroup<GameObject>::ReSpawn1Object(PoolObject* obj)
|
||||
{
|
||||
if (GameObjectData const* data = sObjectMgr->GetGOData(obj->guid))
|
||||
if (GameObject* pGameobject = ObjectAccessor::GetObjectInWorld(MAKE_NEW_GUID(obj->guid, data->id, HIGHGUID_GAMEOBJECT), (GameObject*)NULL))
|
||||
if (GameObject* pGameobject = ObjectAccessor::GetObjectInWorld(MAKE_NEW_GUID(obj->guid, data->id, HIGHGUID_GAMEOBJECT), (GameObject*)nullptr))
|
||||
pGameobject->GetMap()->AddToMap(pGameobject);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ inline Player* Map::_GetScriptPlayerSourceOrTarget(Object* source, Object* targe
|
|||
{
|
||||
Player* player = nullptr;
|
||||
if (!source && !target)
|
||||
sLog->outError("%s source and target objects are NULL.", scriptInfo->GetDebugInfo().c_str());
|
||||
sLog->outError("%s source and target objects are nullptr.", scriptInfo->GetDebugInfo().c_str());
|
||||
else
|
||||
{
|
||||
// Check target first, then source.
|
||||
|
|
@ -113,7 +113,7 @@ inline Creature* Map::_GetScriptCreatureSourceOrTarget(Object* source, Object* t
|
|||
{
|
||||
Creature* creature = nullptr;
|
||||
if (!source && !target)
|
||||
sLog->outError("%s source and target objects are NULL.", scriptInfo->GetDebugInfo().c_str());
|
||||
sLog->outError("%s source and target objects are nullptr.", scriptInfo->GetDebugInfo().c_str());
|
||||
else
|
||||
{
|
||||
if (bReverse)
|
||||
|
|
@ -146,7 +146,7 @@ inline Unit* Map::_GetScriptUnit(Object* obj, bool isSource, const ScriptInfo* s
|
|||
{
|
||||
Unit* unit = nullptr;
|
||||
if (!obj)
|
||||
sLog->outError("%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
|
||||
sLog->outError("%s %s object is nullptr.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
|
||||
else if (!obj->isType(TYPEMASK_UNIT))
|
||||
sLog->outError("%s %s object is not unit (TypeId: %u, Entry: %u, GUID: %u), skipping.",
|
||||
scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetTypeId(), obj->GetEntry(), obj->GetGUIDLow());
|
||||
|
|
@ -164,7 +164,7 @@ inline Player* Map::_GetScriptPlayer(Object* obj, bool isSource, const ScriptInf
|
|||
{
|
||||
Player* player = nullptr;
|
||||
if (!obj)
|
||||
sLog->outError("%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
|
||||
sLog->outError("%s %s object is nullptr.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
|
||||
else
|
||||
{
|
||||
player = obj->ToPlayer();
|
||||
|
|
@ -179,7 +179,7 @@ inline Creature* Map::_GetScriptCreature(Object* obj, bool isSource, const Scrip
|
|||
{
|
||||
Creature* creature = nullptr;
|
||||
if (!obj)
|
||||
sLog->outError("%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
|
||||
sLog->outError("%s %s object is nullptr.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
|
||||
else
|
||||
{
|
||||
creature = obj->ToCreature();
|
||||
|
|
@ -194,7 +194,7 @@ inline WorldObject* Map::_GetScriptWorldObject(Object* obj, bool isSource, const
|
|||
{
|
||||
WorldObject* pWorldObject = nullptr;
|
||||
if (!obj)
|
||||
sLog->outError("%s %s object is NULL.",
|
||||
sLog->outError("%s %s object is nullptr.",
|
||||
scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
|
||||
else
|
||||
{
|
||||
|
|
@ -225,7 +225,7 @@ inline void Map::_ScriptProcessDoor(Object* source, Object* target, const Script
|
|||
if (!guid)
|
||||
sLog->outError("%s door guid is not specified.", scriptInfo->GetDebugInfo().c_str());
|
||||
else if (!source)
|
||||
sLog->outError("%s source object is NULL.", scriptInfo->GetDebugInfo().c_str());
|
||||
sLog->outError("%s source object is nullptr.", scriptInfo->GetDebugInfo().c_str());
|
||||
else if (!source->isType(TYPEMASK_UNIT))
|
||||
sLog->outError("%s source object is not unit (TypeId: %u, Entry: %u, GUID: %u), skipping.", scriptInfo->GetDebugInfo().c_str(),
|
||||
source->GetTypeId(), source->GetEntry(), source->GetGUIDLow());
|
||||
|
|
@ -530,12 +530,12 @@ void Map::ScriptsProcess()
|
|||
{
|
||||
if (!source)
|
||||
{
|
||||
sLog->outError("%s source object is NULL.", step.script->GetDebugInfo().c_str());
|
||||
sLog->outError("%s source object is nullptr.", step.script->GetDebugInfo().c_str());
|
||||
break;
|
||||
}
|
||||
if (!target)
|
||||
{
|
||||
sLog->outError("%s target object is NULL.", step.script->GetDebugInfo().c_str());
|
||||
sLog->outError("%s target object is nullptr.", step.script->GetDebugInfo().c_str());
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -674,7 +674,7 @@ void Map::ScriptsProcess()
|
|||
// Target must be GameObject.
|
||||
if (!target)
|
||||
{
|
||||
sLog->outError("%s target object is NULL.", step.script->GetDebugInfo().c_str());
|
||||
sLog->outError("%s target object is nullptr.", step.script->GetDebugInfo().c_str());
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -704,7 +704,7 @@ void Map::ScriptsProcess()
|
|||
// TODO: Allow gameobjects to be targets and casters
|
||||
if (!source && !target)
|
||||
{
|
||||
sLog->outError("%s source and target objects are NULL.", step.script->GetDebugInfo().c_str());
|
||||
sLog->outError("%s source and target objects are nullptr.", step.script->GetDebugInfo().c_str());
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1327,7 +1327,7 @@ void ScriptMgr::OnShutdown()
|
|||
bool ScriptMgr::OnCriteriaCheck(uint32 scriptId, Player* source, Unit* target)
|
||||
{
|
||||
ASSERT(source);
|
||||
// target can be NULL.
|
||||
// target can be nullptr.
|
||||
|
||||
GET_SCRIPT_RET(AchievementCriteriaScript, scriptId, tmpscript, false);
|
||||
return tmpscript->OnCheck(source, target);
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@ public:
|
|||
sLog->outError("Invalid MapScript for %u; no such map ID.", _mapId);
|
||||
}
|
||||
|
||||
// Gets the MapEntry structure associated with this script. Can return NULL.
|
||||
// Gets the MapEntry structure associated with this script. Can return nullptr.
|
||||
MapEntry const* GetEntry() { return _mapEntry; }
|
||||
|
||||
// Called when the map is created.
|
||||
|
|
@ -431,7 +431,7 @@ public:
|
|||
virtual void OnDamage(Unit* /*attacker*/, Unit* /*victim*/, uint32& /*damage*/) { }
|
||||
|
||||
// Called when DoT's Tick Damage is being Dealt
|
||||
// Attacker can be NULL if he is despawned while the aura still exists on target
|
||||
// Attacker can be nullptr if he is despawned while the aura still exists on target
|
||||
virtual void ModifyPeriodicDamageAurasTick(Unit* /*target*/, Unit* /*attacker*/, uint32& /*damage*/) { }
|
||||
|
||||
// Called when Melee Damage is being Dealt
|
||||
|
|
|
|||
|
|
@ -1333,9 +1333,9 @@ enum Opcodes
|
|||
/// Player state
|
||||
enum SessionStatus
|
||||
{
|
||||
STATUS_AUTHED = 0, // Player authenticated (_player == NULL, m_GUID has garbage)
|
||||
STATUS_LOGGEDIN, // Player in game (_player != NULL, m_GUID == _player->GetGUID(), inWorld())
|
||||
STATUS_TRANSFER, // Player transferring to another map (_player != NULL, m_GUID == _player->GetGUID(), !inWorld())
|
||||
STATUS_AUTHED = 0, // Player authenticated (_player == nullptr, m_GUID has garbage)
|
||||
STATUS_LOGGEDIN, // Player in game (_player != nullptr, m_GUID == _player->GetGUID(), inWorld())
|
||||
STATUS_TRANSFER, // Player transferring to another map (_player != nullptr, m_GUID == _player->GetGUID(), !inWorld())
|
||||
STATUS_NEVER, // Opcode not accepted from client (deprecated or server side only)
|
||||
STATUS_UNHANDLED, // Opcode not handled yet
|
||||
};
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ WorldSession::~WorldSession()
|
|||
|
||||
std::string const& WorldSession::GetPlayerName() const
|
||||
{
|
||||
return _player != NULL ? _player->GetName() : DefaultPlayerName;
|
||||
return _player != nullptr ? _player->GetName() : DefaultPlayerName;
|
||||
}
|
||||
|
||||
std::string WorldSession::GetPlayerInfo() const
|
||||
|
|
@ -179,7 +179,7 @@ std::string WorldSession::GetPlayerInfo() const
|
|||
std::ostringstream ss;
|
||||
|
||||
ss << "[Player: " << GetPlayerName()
|
||||
<< " (Guid: " << (_player != NULL ? _player->GetGUID() : 0)
|
||||
<< " (Guid: " << (_player != nullptr ? _player->GetGUID() : 0)
|
||||
<< ", Account: " << GetAccountId() << ")]";
|
||||
|
||||
return ss.str();
|
||||
|
|
@ -765,7 +765,7 @@ void WorldSession::SetAccountData(AccountDataType type, time_t tm, std::string c
|
|||
}
|
||||
else
|
||||
{
|
||||
// _player can be NULL and packet received after logout but m_GUID still store correct guid
|
||||
// _player can be nullptr and packet received after logout but m_GUID still store correct guid
|
||||
if (!m_GUIDLow)
|
||||
return;
|
||||
|
||||
|
|
@ -1160,7 +1160,7 @@ void WorldSession::SetPlayer(Player* player)
|
|||
void WorldSession::InitializeQueryCallbackParameters()
|
||||
{
|
||||
// Callback parameters that have pointers in them should be properly
|
||||
// initialized to NULL here.
|
||||
// initialized to nullptr here.
|
||||
_charCreateCallback.SetParam(nullptr);
|
||||
_loadPetFromDBFirstCallback.SetFirstParam(0);
|
||||
_loadPetFromDBFirstCallback.SetSecondParam(nullptr);
|
||||
|
|
|
|||
|
|
@ -1018,7 +1018,7 @@ private:
|
|||
typedef std::list<AddonInfo> AddonsList;
|
||||
|
||||
// Warden
|
||||
Warden* _warden; // Remains NULL if Warden system is not enabled by config
|
||||
Warden* _warden; // Remains nullptr if Warden system is not enabled by config
|
||||
|
||||
time_t _logoutTime;
|
||||
bool m_inQueue; // session wait in auth.queue
|
||||
|
|
|
|||
|
|
@ -582,7 +582,7 @@ int WorldSocket::handle_input_missing_data(void)
|
|||
// hope this is not hack, as proper m_RecvWPct is asserted around
|
||||
if (!m_RecvWPct)
|
||||
{
|
||||
sLog->outError("Forcing close on input m_RecvWPct = NULL");
|
||||
sLog->outError("Forcing close on input m_RecvWPct = nullptr");
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ protected:
|
|||
{
|
||||
sLog->outError("Out of file descriptors, suspending incoming connections for 10 seconds");
|
||||
reactor()->remove_handler(this, ACE_Event_Handler::ACCEPT_MASK | ACE_Event_Handler::DONT_CALL);
|
||||
reactor()->schedule_timer(this, NULL, ACE_Time_Value(10));
|
||||
reactor()->schedule_timer(this, nullptr, ACE_Time_Value(10));
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1272,14 +1272,14 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
|
|||
{
|
||||
if (player)
|
||||
player->RemoveSpellCooldown(spellId);
|
||||
target->CastSpell(target, spellId, true, NULL, this, target->GetGUID());
|
||||
target->CastSpell(target, spellId, true, nullptr, this, target->GetGUID());
|
||||
}
|
||||
|
||||
if (spellId2)
|
||||
{
|
||||
if (player)
|
||||
player->RemoveSpellCooldown(spellId2);
|
||||
target->CastSpell(target, spellId2, true, NULL, this, target->GetGUID());
|
||||
target->CastSpell(target, spellId2, true, nullptr, this, target->GetGUID());
|
||||
}
|
||||
|
||||
if (player)
|
||||
|
|
@ -1298,7 +1298,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
|
|||
continue;
|
||||
|
||||
if (spellInfo->Stances & (1 << (GetMiscValue() - 1)))
|
||||
target->CastSpell(target, itr->first, true, NULL, this, target->GetGUID());
|
||||
target->CastSpell(target, itr->first, true, nullptr, this, target->GetGUID());
|
||||
}
|
||||
|
||||
// xinef: talent stance auras are not on m_spells map, so iterate talents
|
||||
|
|
@ -1317,7 +1317,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
|
|||
continue;
|
||||
|
||||
if (spellInfo->Stances & (1 << (GetMiscValue() - 1)))
|
||||
target->CastSpell(target, itr->first, true, NULL, this, target->GetGUID());
|
||||
target->CastSpell(target, itr->first, true, nullptr, this, target->GetGUID());
|
||||
}
|
||||
|
||||
// Also do it for Glyphs
|
||||
|
|
@ -1331,7 +1331,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
|
|||
if (!spellInfo || !spellInfo->HasAttribute(SpellAttr0(SPELL_ATTR0_PASSIVE | SPELL_ATTR0_HIDDEN_CLIENTSIDE)))
|
||||
continue;
|
||||
if (spellInfo->Stances & (1 << (GetMiscValue() - 1)))
|
||||
target->CastSpell(target, glyph->SpellId, TriggerCastFlags(TRIGGERED_FULL_MASK & ~(TRIGGERED_IGNORE_SHAPESHIFT | TRIGGERED_IGNORE_CASTER_AURASTATE)), NULL, this, target->GetGUID());
|
||||
target->CastSpell(target, glyph->SpellId, TriggerCastFlags(TRIGGERED_FULL_MASK & ~(TRIGGERED_IGNORE_SHAPESHIFT | TRIGGERED_IGNORE_CASTER_AURASTATE)), nullptr, this, target->GetGUID());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1341,7 +1341,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
|
|||
{
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(24932);
|
||||
if (spellInfo && spellInfo->Stances & (1 << (GetMiscValue() - 1)))
|
||||
target->CastSpell(target, 24932, true, NULL, this, target->GetGUID());
|
||||
target->CastSpell(target, 24932, true, nullptr, this, target->GetGUID());
|
||||
}
|
||||
// Improved Barkskin - apply/remove armor bonus due to shapeshift
|
||||
if (player->HasTalent(63410, player->GetActiveSpec()) || player->HasTalent(63411, player->GetActiveSpec()))
|
||||
|
|
@ -1362,7 +1362,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
|
|||
{
|
||||
int32 HotWMod = (*i)->GetAmount() / 2; // For each 2% Intelligence, you get 1% stamina and 1% attack power.
|
||||
|
||||
target->CastCustomSpell(target, HotWSpellId, &HotWMod, nullptr, nullptr, true, NULL, this, target->GetGUID());
|
||||
target->CastCustomSpell(target, HotWSpellId, &HotWMod, nullptr, nullptr, true, nullptr, this, target->GetGUID());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1386,7 +1386,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
|
|||
spellId3 = 47180;
|
||||
break;
|
||||
}
|
||||
target->CastSpell(target, spellId3, true, NULL, this, target->GetGUID());
|
||||
target->CastSpell(target, spellId3, true, nullptr, this, target->GetGUID());
|
||||
}
|
||||
// Master Shapeshifter - Cat
|
||||
if (AuraEffect const* aurEff = target->GetDummyAuraEffect(SPELLFAMILY_GENERIC, 2851, 0))
|
||||
|
|
@ -1912,7 +1912,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
|
|||
{
|
||||
int32 basePoints = int32(std::min(oldPower, FurorChance));
|
||||
target->SetPower(POWER_ENERGY, 0);
|
||||
target->CastCustomSpell(target, 17099, &basePoints, nullptr, nullptr, true, NULL, this);
|
||||
target->CastCustomSpell(target, 17099, &basePoints, nullptr, nullptr, true, nullptr, this);
|
||||
break;
|
||||
}
|
||||
case FORM_BEAR:
|
||||
|
|
@ -1976,12 +1976,12 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
|
|||
case FORM_DIREBEAR:
|
||||
case FORM_CAT:
|
||||
if (AuraEffect* dummy = target->GetAuraEffect(37315, 0))
|
||||
target->CastSpell(target, 37316, true, NULL, dummy);
|
||||
target->CastSpell(target, 37316, true, nullptr, dummy);
|
||||
break;
|
||||
// Nordrassil Regalia - bonus
|
||||
case FORM_MOONKIN:
|
||||
if (AuraEffect* dummy = target->GetAuraEffect(37324, 0))
|
||||
target->CastSpell(target, 37325, true, NULL, dummy);
|
||||
target->CastSpell(target, 37325, true, nullptr, dummy);
|
||||
break;
|
||||
case FORM_BATTLESTANCE:
|
||||
case FORM_DEFENSIVESTANCE:
|
||||
|
|
@ -2050,7 +2050,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
|
|||
{
|
||||
if (Item* pItem = target->ToPlayer()->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND))
|
||||
{
|
||||
target->ToPlayer()->_ApplyWeaponDamage(EQUIPMENT_SLOT_MAINHAND, pItem->GetTemplate(), NULL, apply);
|
||||
target->ToPlayer()->_ApplyWeaponDamage(EQUIPMENT_SLOT_MAINHAND, pItem->GetTemplate(), nullptr, apply);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2530,7 +2530,7 @@ void AuraEffect::HandleAuraModDisarm(AuraApplication const* aurApp, uint8 mode,
|
|||
|
||||
if (attacktype < MAX_ATTACK)
|
||||
{
|
||||
target->ToPlayer()->_ApplyWeaponDamage(slot, pItem->GetTemplate(), NULL, !apply);
|
||||
target->ToPlayer()->_ApplyWeaponDamage(slot, pItem->GetTemplate(), nullptr, !apply);
|
||||
target->ToPlayer()->_ApplyWeaponDependentAuraMods(pItem, WeaponAttackType(attacktype), !apply);
|
||||
}
|
||||
}
|
||||
|
|
@ -4934,7 +4934,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
|||
case 13139: // net-o-matic
|
||||
// root to self part of (root_target->charge->root_self sequence
|
||||
if (caster)
|
||||
caster->CastSpell(caster, 13138, true, NULL, this);
|
||||
caster->CastSpell(caster, 13138, true, nullptr, this);
|
||||
break;
|
||||
case 34026: // kill command
|
||||
{
|
||||
|
|
@ -4942,7 +4942,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
|||
if (!pet)
|
||||
break;
|
||||
|
||||
target->CastSpell(target, 34027, true, NULL, this);
|
||||
target->CastSpell(target, 34027, true, nullptr, this);
|
||||
|
||||
// set 3 stacks and 3 charges (to make all auras not disappear at once)
|
||||
Aura* owner_aura = target->GetAura(34027, GetCasterGUID());
|
||||
|
|
@ -4966,10 +4966,10 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
|||
switch (caster->getGender())
|
||||
{
|
||||
case GENDER_FEMALE:
|
||||
caster->CastSpell(target, 37095, true, NULL, this); // Blood Elf Disguise
|
||||
caster->CastSpell(target, 37095, true, nullptr, this); // Blood Elf Disguise
|
||||
break;
|
||||
case GENDER_MALE:
|
||||
caster->CastSpell(target, 37093, true, NULL, this);
|
||||
caster->CastSpell(target, 37093, true, nullptr, this);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -4986,7 +4986,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
|||
}
|
||||
case 39850: // Rocket Blast
|
||||
if (roll_chance_i(20)) // backfire stun
|
||||
target->CastSpell(target, 51581, true, NULL, this);
|
||||
target->CastSpell(target, 51581, true, nullptr, this);
|
||||
break;
|
||||
case 43873: // Headless Horseman Laugh
|
||||
target->PlayDistanceSound(11965);
|
||||
|
|
@ -4997,10 +4997,10 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
|||
switch (caster->getGender())
|
||||
{
|
||||
case GENDER_FEMALE:
|
||||
caster->CastSpell(target, 46356, true, NULL, this);
|
||||
caster->CastSpell(target, 46356, true, nullptr, this);
|
||||
break;
|
||||
case GENDER_MALE:
|
||||
caster->CastSpell(target, 46355, true, NULL, this);
|
||||
caster->CastSpell(target, 46355, true, nullptr, this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -5086,7 +5086,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
|||
}
|
||||
|
||||
if (finalSpelId)
|
||||
caster->CastSpell(target, finalSpelId, true, NULL, this);
|
||||
caster->CastSpell(target, finalSpelId, true, nullptr, this);
|
||||
}
|
||||
|
||||
switch (m_spellInfo->SpellFamilyName)
|
||||
|
|
@ -5115,7 +5115,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
|||
}
|
||||
case 52172: // Coyote Spirit Despawn Aura
|
||||
case 60244: // Blood Parrot Despawn Aura
|
||||
target->CastSpell((Unit*)NULL, GetAmount(), true, NULL, this);
|
||||
target->CastSpell((Unit*)nullptr, GetAmount(), true, nullptr, this);
|
||||
break;
|
||||
// Halls of Lightning, Arc Lightning
|
||||
case 52921:
|
||||
|
|
@ -5373,7 +5373,7 @@ void AuraEffect::HandleChannelDeathItem(AuraApplication const* aurApp, uint8 mod
|
|||
Item* newitem = plCaster->StoreNewItem(dest, GetSpellInfo()->Effects[m_effIndex].ItemType, true);
|
||||
if (!newitem)
|
||||
{
|
||||
plCaster->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, nullptr);
|
||||
plCaster->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
plCaster->SendNewItem(newitem, count, true, true);
|
||||
|
|
@ -5527,9 +5527,9 @@ void AuraEffect::HandleAuraLinked(AuraApplication const* aurApp, uint8 mode, boo
|
|||
return;
|
||||
// If amount avalible cast with basepoints (Crypt Fever for example)
|
||||
if (GetAmount())
|
||||
caster->CastCustomSpell(target, triggeredSpellId, &m_amount, nullptr, nullptr, true, NULL, this);
|
||||
caster->CastCustomSpell(target, triggeredSpellId, &m_amount, nullptr, nullptr, true, nullptr, this);
|
||||
else
|
||||
caster->CastSpell(target, triggeredSpellId, true, NULL, this);
|
||||
caster->CastSpell(target, triggeredSpellId, true, nullptr, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -5714,7 +5714,7 @@ void AuraEffect::HandlePeriodicDummyAuraTick(Unit* target, Unit* caster) const
|
|||
if (GetSpellInfo()->SpellFamilyFlags[1] & 0x80000000)
|
||||
{
|
||||
if (caster)
|
||||
caster->CastCustomSpell(53352, SPELLVALUE_BASE_POINT0, m_amount, target, true, NULL, this);
|
||||
caster->CastCustomSpell(53352, SPELLVALUE_BASE_POINT0, m_amount, target, true, nullptr, this);
|
||||
break;
|
||||
}
|
||||
switch (GetSpellInfo()->Id)
|
||||
|
|
@ -5748,7 +5748,7 @@ void AuraEffect::HandlePeriodicDummyAuraTick(Unit* target, Unit* caster) const
|
|||
{
|
||||
case 49016: // Hysteria
|
||||
uint32 damage = uint32(target->CountPctFromMaxHealth(1));
|
||||
Unit::DealDamage(target, target, damage, NULL, NODAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
Unit::DealDamage(target, target, damage, nullptr, NODAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false);
|
||||
break;
|
||||
}
|
||||
// Blood of the North
|
||||
|
|
@ -5829,7 +5829,7 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
|
|||
case 27808:
|
||||
if (caster)
|
||||
{
|
||||
caster->CastCustomSpell(29879, SPELLVALUE_BASE_POINT0, int32(target->CountPctFromMaxHealth(21)), target, true, NULL, this);
|
||||
caster->CastCustomSpell(29879, SPELLVALUE_BASE_POINT0, int32(target->CountPctFromMaxHealth(21)), target, true, nullptr, this);
|
||||
if (GetTickNumber() == 1)
|
||||
caster->CastSpell(target, 27808, true);
|
||||
}
|
||||
|
|
@ -5872,7 +5872,7 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
|
|||
// so instakill will be naturally done before trigger spell
|
||||
case 31347:
|
||||
{
|
||||
target->CastSpell(target, 31350, true, NULL, this);
|
||||
target->CastSpell(target, 31350, true, nullptr, this);
|
||||
Unit::Kill(target, target);
|
||||
return;
|
||||
}
|
||||
|
|
@ -5893,7 +5893,7 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
|
|||
if (!caster || target->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
|
||||
caster->CastSpell(caster, 38495, true, NULL, this);
|
||||
caster->CastSpell(caster, 38495, true, nullptr, this);
|
||||
|
||||
Creature* creatureTarget = target->ToCreature();
|
||||
|
||||
|
|
@ -5954,20 +5954,20 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
|
|||
{
|
||||
// Mana Tide
|
||||
case 16191:
|
||||
target->CastCustomSpell(target, triggerSpellId, &m_amount, nullptr, nullptr, true, NULL, this);
|
||||
target->CastCustomSpell(target, triggerSpellId, &m_amount, nullptr, nullptr, true, nullptr, this);
|
||||
return;
|
||||
// Poison (Grobbulus)
|
||||
case 28158:
|
||||
case 54362:
|
||||
// Slime Pool (Dreadscale & Acidmaw)
|
||||
case 66882:
|
||||
target->CastCustomSpell(triggerSpellId, SPELLVALUE_RADIUS_MOD, (int32)((((float)m_tickNumber / 60) * 0.9f + 0.1f) * 10000 * 2 / 3), NULL, true, NULL, this);
|
||||
target->CastCustomSpell(triggerSpellId, SPELLVALUE_RADIUS_MOD, (int32)((((float)m_tickNumber / 60) * 0.9f + 0.1f) * 10000 * 2 / 3), nullptr, true, nullptr, this);
|
||||
return;
|
||||
// Eye of Eternity, Malygos, Arcane Overload
|
||||
case 56432:
|
||||
if (triggerSpellId == 56438)
|
||||
{
|
||||
target->CastCustomSpell(triggerSpellId, SPELLVALUE_RADIUS_MOD, (int32)(10000 * (1.0f - 0.02f * (m_tickNumber + 1))), NULL, true, NULL, this);
|
||||
target->CastCustomSpell(triggerSpellId, SPELLVALUE_RADIUS_MOD, (int32)(10000 * (1.0f - 0.02f * (m_tickNumber + 1))), nullptr, true, nullptr, this);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
|
@ -6059,7 +6059,7 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
|
|||
if (GetSpellInfo()->Effects[GetEffIndex()].TargetA.GetCheckType() == TARGET_CHECK_ENTRY || GetSpellInfo()->Effects[GetEffIndex()].TargetB.GetCheckType() == TARGET_CHECK_ENTRY)
|
||||
triggerFlags = TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_POWER_AND_REAGENT_COST);
|
||||
|
||||
triggerCaster->CastSpell(targets, triggeredSpellInfo, NULL, triggerFlags, NULL, this);
|
||||
triggerCaster->CastSpell(targets, triggeredSpellInfo, nullptr, triggerFlags, nullptr, this);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandlePeriodicTriggerSpellAuraTick: Spell %u Trigger %u", GetId(), triggeredSpellInfo->Id);
|
||||
#endif
|
||||
|
|
@ -6085,7 +6085,7 @@ void AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick(Unit* target, Unit*
|
|||
CustomSpellValues values;
|
||||
values.AddSpellMod(SPELLVALUE_BASE_POINT0, GetAmount());
|
||||
|
||||
triggerCaster->CastSpell(targets, triggeredSpellInfo, &values, TRIGGERED_FULL_MASK, NULL, this);
|
||||
triggerCaster->CastSpell(targets, triggeredSpellInfo, &values, TRIGGERED_FULL_MASK, nullptr, this);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick: Spell %u Trigger %u", GetId(), triggeredSpellInfo->Id);
|
||||
#endif
|
||||
|
|
@ -6213,7 +6213,7 @@ void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const
|
|||
|
||||
int32 dmg = damage;
|
||||
if (CanApplyResilience())
|
||||
Unit::ApplyResilience(target, NULL, &dmg, crit, CR_CRIT_TAKEN_SPELL);
|
||||
Unit::ApplyResilience(target, nullptr, &dmg, crit, CR_CRIT_TAKEN_SPELL);
|
||||
damage = dmg;
|
||||
|
||||
Unit::CalcAbsorbResist(caster, target, GetSpellInfo()->GetSchoolMask(), DOT, damage, &absorb, &resist, GetSpellInfo());
|
||||
|
|
@ -6295,7 +6295,7 @@ void AuraEffect::HandlePeriodicHealthLeechAuraTick(Unit* target, Unit* caster) c
|
|||
|
||||
int32 dmg = damage;
|
||||
if (CanApplyResilience())
|
||||
Unit::ApplyResilience(target, NULL, &dmg, crit, CR_CRIT_TAKEN_SPELL);
|
||||
Unit::ApplyResilience(target, nullptr, &dmg, crit, CR_CRIT_TAKEN_SPELL);
|
||||
damage = dmg;
|
||||
|
||||
Unit::CalcAbsorbResist(caster, target, GetSpellInfo()->GetSchoolMask(), DOT, damage, &absorb, &resist, m_spellInfo);
|
||||
|
|
@ -6580,7 +6580,7 @@ void AuraEffect::HandlePeriodicManaLeechAuraTick(Unit* target, Unit* caster) con
|
|||
if (manaFeedVal > 0)
|
||||
{
|
||||
int32 feedAmount = CalculatePct(gainedAmount, manaFeedVal);
|
||||
caster->CastCustomSpell(caster, 32554, &feedAmount, nullptr, nullptr, true, NULL, this);
|
||||
caster->CastCustomSpell(caster, 32554, &feedAmount, nullptr, nullptr, true, nullptr, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6713,7 +6713,7 @@ void AuraEffect::HandleProcTriggerSpellAuraProc(AuraApplication* aurApp, ProcEve
|
|||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleProcTriggerSpellAuraProc: Triggering spell %u from aura %u proc", triggeredSpellInfo->Id, GetId());
|
||||
#endif
|
||||
triggerCaster->CastSpell(triggerTarget, triggeredSpellInfo, true, NULL, this);
|
||||
triggerCaster->CastSpell(triggerTarget, triggeredSpellInfo, true, nullptr, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -6738,7 +6738,7 @@ void AuraEffect::HandleProcTriggerSpellWithValueAuraProc(AuraApplication* aurApp
|
|||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleProcTriggerSpellWithValueAuraProc: Triggering spell %u with value %d from aura %u proc", triggeredSpellInfo->Id, basepoints0, GetId());
|
||||
#endif
|
||||
triggerCaster->CastCustomSpell(triggerTarget, triggerSpellId, &basepoints0, nullptr, nullptr, true, NULL, this);
|
||||
triggerCaster->CastCustomSpell(triggerTarget, triggerSpellId, &basepoints0, nullptr, nullptr, true, nullptr, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -6803,7 +6803,7 @@ void AuraEffect::HandleRaidProcFromChargeAuraProc(AuraApplication* aurApp, ProcE
|
|||
|
||||
if (Unit* triggerTarget = target->GetNextRandomRaidMemberOrPet(radius))
|
||||
{
|
||||
target->CastSpell(triggerTarget, GetSpellInfo(), true, NULL, this, GetCasterGUID());
|
||||
target->CastSpell(triggerTarget, GetSpellInfo(), true, nullptr, this, GetCasterGUID());
|
||||
if (Aura* aura = triggerTarget->GetAura(GetId(), GetCasterGUID()))
|
||||
aura->SetCharges(jumps);
|
||||
}
|
||||
|
|
@ -6813,7 +6813,7 @@ void AuraEffect::HandleRaidProcFromChargeAuraProc(AuraApplication* aurApp, ProcE
|
|||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleRaidProcFromChargeAuraProc: Triggering spell %u from aura %u proc", triggerSpellId, GetId());
|
||||
#endif
|
||||
target->CastSpell(target, triggerSpellId, true, NULL, this, GetCasterGUID());
|
||||
target->CastSpell(target, triggerSpellId, true, nullptr, this, GetCasterGUID());
|
||||
}
|
||||
|
||||
void AuraEffect::HandleRaidProcFromChargeWithValueAuraProc(AuraApplication* aurApp, ProcEventInfo& /*eventInfo*/)
|
||||
|
|
@ -6847,7 +6847,7 @@ void AuraEffect::HandleRaidProcFromChargeWithValueAuraProc(AuraApplication* aurA
|
|||
|
||||
if (Unit* triggerTarget = target->GetNextRandomRaidMemberOrPet(radius))
|
||||
{
|
||||
target->CastCustomSpell(triggerTarget, GetId(), &value, nullptr, nullptr, true, NULL, this, GetCasterGUID());
|
||||
target->CastCustomSpell(triggerTarget, GetId(), &value, nullptr, nullptr, true, nullptr, this, GetCasterGUID());
|
||||
if (Aura* aura = triggerTarget->GetAura(GetId(), GetCasterGUID()))
|
||||
aura->SetCharges(jumps);
|
||||
}
|
||||
|
|
@ -6857,5 +6857,5 @@ void AuraEffect::HandleRaidProcFromChargeWithValueAuraProc(AuraApplication* aurA
|
|||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleRaidProcFromChargeWithValueAuraProc: Triggering spell %u from aura %u proc", triggerSpellId, GetId());
|
||||
#endif
|
||||
target->CastCustomSpell(target, triggerSpellId, &value, nullptr, nullptr, true, NULL, this, GetCasterGUID());
|
||||
target->CastCustomSpell(target, triggerSpellId, &value, nullptr, nullptr, true, nullptr, this, GetCasterGUID());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ uint8 Aura::BuildEffectMaskForOwner(SpellInfo const* spellProto, uint8 avalibleE
|
|||
return effMask & avalibleEffectMask;
|
||||
}
|
||||
|
||||
Aura* Aura::TryRefreshStackOrCreate(SpellInfo const* spellproto, uint8 tryEffMask, WorldObject* owner, Unit* caster, int32* baseAmount /*= NULL*/, Item* castItem /*= NULL*/, uint64 casterGUID /*= 0*/, bool* refresh /*= NULL*/, bool periodicReset /*= false*/)
|
||||
Aura* Aura::TryRefreshStackOrCreate(SpellInfo const* spellproto, uint8 tryEffMask, WorldObject* owner, Unit* caster, int32* baseAmount /*= nullptr*/, Item* castItem /*= nullptr*/, uint64 casterGUID /*= 0*/, bool* refresh /*= nullptr*/, bool periodicReset /*= false*/)
|
||||
{
|
||||
ASSERT(spellproto);
|
||||
ASSERT(owner);
|
||||
|
|
@ -339,7 +339,7 @@ Aura* Aura::TryRefreshStackOrCreate(SpellInfo const* spellproto, uint8 tryEffMas
|
|||
return Create(spellproto, effMask, owner, caster, baseAmount, castItem, casterGUID);
|
||||
}
|
||||
|
||||
Aura* Aura::TryCreate(SpellInfo const* spellproto, uint8 tryEffMask, WorldObject* owner, Unit* caster, int32* baseAmount /*= NULL*/, Item* castItem /*= NULL*/, uint64 casterGUID /*= 0*/)
|
||||
Aura* Aura::TryCreate(SpellInfo const* spellproto, uint8 tryEffMask, WorldObject* owner, Unit* caster, int32* baseAmount /*= nullptr*/, Item* castItem /*= nullptr*/, uint64 casterGUID /*= 0*/)
|
||||
{
|
||||
ASSERT(spellproto);
|
||||
ASSERT(owner);
|
||||
|
|
@ -428,7 +428,7 @@ void Aura::_InitEffects(uint8 effMask, Unit* caster, int32* baseAmount)
|
|||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
if (effMask & (uint8(1) << i))
|
||||
m_effects[i] = new AuraEffect(this, i, baseAmount ? baseAmount + i : NULL, caster);
|
||||
m_effects[i] = new AuraEffect(this, i, baseAmount ? baseAmount + i : nullptr, caster);
|
||||
else
|
||||
m_effects[i] = nullptr;
|
||||
}
|
||||
|
|
@ -488,7 +488,7 @@ void Aura::_ApplyForTarget(Unit* target, Unit* caster, AuraApplication* auraApp)
|
|||
if (m_spellInfo->IsCooldownStartedOnEvent())
|
||||
{
|
||||
Item* castItem = m_castItemGuid ? caster->ToPlayer()->GetItemByGuid(m_castItemGuid) : nullptr;
|
||||
caster->ToPlayer()->AddSpellAndCategoryCooldowns(m_spellInfo, castItem ? castItem->GetEntry() : 0, NULL, true);
|
||||
caster->ToPlayer()->AddSpellAndCategoryCooldowns(m_spellInfo, castItem ? castItem->GetEntry() : 0, nullptr, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1109,7 +1109,7 @@ void Aura::UnregisterSingleTarget()
|
|||
Unit* caster = GetCaster();
|
||||
// TODO: find a better way to do this.
|
||||
if (!caster)
|
||||
caster = ObjectAccessor::GetObjectInOrOutOfWorld(GetCasterGUID(), (Unit*)NULL);
|
||||
caster = ObjectAccessor::GetObjectInOrOutOfWorld(GetCasterGUID(), (Unit*)nullptr);
|
||||
if (!caster)
|
||||
{
|
||||
sLog->outMisc("Aura::UnregisterSingleTarget (A1) - %u, %u, %u, %s", GetId(), GetOwner()->GetTypeId(), GetOwner()->GetEntry(), GetOwner()->GetName().c_str());
|
||||
|
|
@ -1390,7 +1390,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
|
|||
damage = target->SpellHealingBonusTaken(caster, GetSpellInfo(), damage, DOT);
|
||||
|
||||
int32 basepoints0 = damage;
|
||||
caster->CastCustomSpell(target, 64801, &basepoints0, nullptr, nullptr, true, NULL, GetEffect(0));
|
||||
caster->CastCustomSpell(target, 64801, &basepoints0, nullptr, nullptr, true, nullptr, GetEffect(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -1408,8 +1408,8 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
|
|||
int32 basepoints0 = aurEff->GetAmount() * GetEffect(0)->GetTotalTicks() * int32(damage) / 100;
|
||||
int32 heal = int32(CalculatePct(basepoints0, 15));
|
||||
|
||||
caster->CastCustomSpell(target, 63675, &basepoints0, nullptr, nullptr, true, NULL, GetEffect(0));
|
||||
caster->CastCustomSpell(caster, 75999, &heal, nullptr, nullptr, true, NULL, GetEffect(0));
|
||||
caster->CastCustomSpell(target, 63675, &basepoints0, nullptr, nullptr, true, nullptr, GetEffect(0));
|
||||
caster->CastCustomSpell(caster, 75999, &heal, nullptr, nullptr, true, nullptr, GetEffect(0));
|
||||
}
|
||||
}
|
||||
// Power Word: Shield
|
||||
|
|
@ -1533,7 +1533,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
|
|||
{
|
||||
int32 remainingDamage = aurEff->GetAmount() * (aurEff->GetTotalTicks() - aurEff->GetTickNumber());
|
||||
if (remainingDamage > 0)
|
||||
caster->CastCustomSpell(caster, 72373, NULL, &remainingDamage, NULL, true);
|
||||
caster->CastCustomSpell(caster, 72373, nullptr, &remainingDamage, nullptr, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -1544,7 +1544,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
|
|||
case 66: // Invisibility
|
||||
if (removeMode != AURA_REMOVE_BY_EXPIRE)
|
||||
break;
|
||||
target->CastSpell(target, 32612, true, NULL, GetEffect(1));
|
||||
target->CastSpell(target, 32612, true, nullptr, GetEffect(1));
|
||||
target->CombatStop();
|
||||
break;
|
||||
case 74396: // Fingers of Frost
|
||||
|
|
@ -1572,7 +1572,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
|
|||
if (absorb->GetAmount() <= 0) // removed by damage, not dispel
|
||||
if (AuraEffect* dummy = caster->GetDummyAuraEffect(SPELLFAMILY_MAGE, 2945, 0))
|
||||
if (roll_chance_i(dummy->GetSpellInfo()->ProcChance))
|
||||
caster->CastSpell(target, 55080, true, NULL, GetEffect(0));
|
||||
caster->CastSpell(target, 55080, true, nullptr, GetEffect(0));
|
||||
}
|
||||
break;
|
||||
case SPELLFAMILY_WARRIOR:
|
||||
|
|
@ -1613,7 +1613,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
|
|||
if (AuraEffect const* aurEff = caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST, 178, 1))
|
||||
{
|
||||
int32 basepoints0 = aurEff->GetAmount() * caster->GetCreateMana() / 100;
|
||||
caster->CastCustomSpell(caster, 64103, &basepoints0, nullptr, nullptr, true, NULL, GetEffect(0));
|
||||
caster->CastCustomSpell(caster, 64103, &basepoints0, nullptr, nullptr, true, nullptr, GetEffect(0));
|
||||
}
|
||||
}
|
||||
// Power word: shield
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@ public:
|
|||
typedef std::map<uint64, AuraApplication*> ApplicationMap;
|
||||
|
||||
static uint8 BuildEffectMaskForOwner(SpellInfo const* spellProto, uint8 avalibleEffectMask, WorldObject* owner);
|
||||
static Aura* TryRefreshStackOrCreate(SpellInfo const* spellproto, uint8 tryEffMask, WorldObject* owner, Unit* caster, int32* baseAmount = NULL, Item* castItem = NULL, uint64 casterGUID = 0, bool* refresh = NULL, bool periodicReset = false);
|
||||
static Aura* TryCreate(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32* baseAmount = NULL, Item* castItem = NULL, uint64 casterGUID = 0);
|
||||
static Aura* TryRefreshStackOrCreate(SpellInfo const* spellproto, uint8 tryEffMask, WorldObject* owner, Unit* caster, int32* baseAmount = nullptr, Item* castItem = nullptr, uint64 casterGUID = 0, bool* refresh = nullptr, bool periodicReset = false);
|
||||
static Aura* TryCreate(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32* baseAmount = nullptr, Item* castItem = nullptr, uint64 casterGUID = 0);
|
||||
static Aura* Create(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32* baseAmount, Item* castItem, uint64 casterGUID);
|
||||
explicit Aura(SpellInfo const* spellproto, WorldObject* owner, Unit* caster, Item* castItem, uint64 casterGUID);
|
||||
void _InitEffects(uint8 effMask, Unit* caster, int32* baseAmount);
|
||||
|
|
|
|||
|
|
@ -1120,7 +1120,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTar
|
|||
CallScriptObjectTargetSelectHandlers(target, effIndex, targetType);
|
||||
if (!target)
|
||||
{
|
||||
//TC_LOG_DEBUG("spells", "Spell::SelectImplicitNearbyTargets: OnObjectTargetSelect script hook for spell Id %u set NULL target, effect %u", m_spellInfo->Id, effIndex);
|
||||
//TC_LOG_DEBUG("spells", "Spell::SelectImplicitNearbyTargets: OnObjectTargetSelect script hook for spell Id %u set nullptr target, effect %u", m_spellInfo->Id, effIndex);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -3026,7 +3026,7 @@ void Spell::DoAllEffectOnTarget(GOTargetInfo* target)
|
|||
|
||||
for (uint32 effectNumber = 0; effectNumber < MAX_SPELL_EFFECTS; ++effectNumber)
|
||||
if (effectMask & (1 << effectNumber))
|
||||
HandleEffects(nullptr, NULL, go, effectNumber, SPELL_EFFECT_HANDLE_HIT_TARGET);
|
||||
HandleEffects(nullptr, nullptr, go, effectNumber, SPELL_EFFECT_HANDLE_HIT_TARGET);
|
||||
|
||||
// xinef: inform ai about spellhit
|
||||
go->AI()->SpellHit(m_caster, m_spellInfo);
|
||||
|
|
@ -3047,7 +3047,7 @@ void Spell::DoAllEffectOnTarget(ItemTargetInfo* target)
|
|||
|
||||
for (uint32 effectNumber = 0; effectNumber < MAX_SPELL_EFFECTS; ++effectNumber)
|
||||
if (effectMask & (1 << effectNumber))
|
||||
HandleEffects(nullptr, target->item, NULL, effectNumber, SPELL_EFFECT_HANDLE_HIT_TARGET);
|
||||
HandleEffects(nullptr, target->item, nullptr, effectNumber, SPELL_EFFECT_HANDLE_HIT_TARGET);
|
||||
|
||||
CallScriptOnHitHandlers();
|
||||
|
||||
|
|
@ -3343,7 +3343,7 @@ SpellCastResult Spell::prepare(SpellCastTargets const* targets, AuraEffect const
|
|||
{
|
||||
// Xinef: Creature should focus to cast target if there is explicit target or self if casting positive spell
|
||||
// Xinef: Creature should not rotate like a retard when casting spell... based on halion behavior
|
||||
m_caster->ToCreature()->FocusTarget(this, m_targets.GetObjectTarget() != NULL ? m_targets.GetObjectTarget() : m_caster);
|
||||
m_caster->ToCreature()->FocusTarget(this, m_targets.GetObjectTarget() != nullptr ? m_targets.GetObjectTarget() : m_caster);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3610,7 +3610,7 @@ void Spell::_cast(bool skipCheck)
|
|||
// Okay, everything is prepared. Now we need to distinguish between immediate and evented delayed spells
|
||||
if ((m_spellInfo->Speed > 0.0f && !m_spellInfo->IsChanneled())/* xinef: we dont need this shit || m_spellInfo->Id == 14157*/)
|
||||
{
|
||||
// Remove used for cast item if need (it can be already NULL after TakeReagents call
|
||||
// Remove used for cast item if need (it can be already nullptr after TakeReagents call
|
||||
// in case delayed spell remove item at cast delay start
|
||||
TakeCastItem();
|
||||
|
||||
|
|
@ -3654,7 +3654,7 @@ void Spell::_cast(bool skipCheck)
|
|||
}
|
||||
|
||||
// Interrupt Spell casting
|
||||
// handle this here, in other places SpellHitTarget can be set to NULL, if there is an error in this function
|
||||
// handle this here, in other places SpellHitTarget can be set to nullptr, if there is an error in this function
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER))
|
||||
if (Unit* target = m_targets.GetUnitTarget())
|
||||
if (target->GetTypeId() == TYPEID_UNIT)
|
||||
|
|
@ -3719,7 +3719,7 @@ void Spell::handle_immediate()
|
|||
// spell is finished, perform some last features of the spell here
|
||||
_handle_finish_phase();
|
||||
|
||||
// Remove used for cast item if need (it can be already NULL after TakeReagents call
|
||||
// Remove used for cast item if need (it can be already nullptr after TakeReagents call
|
||||
TakeCastItem();
|
||||
|
||||
// handle ammo consumption for Hunter's volley spell
|
||||
|
|
@ -5312,7 +5312,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||
ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_SPELL, m_spellInfo->Id);
|
||||
if (!conditions.empty() && !sConditionMgr->IsObjectMeetToConditions(condInfo, conditions))
|
||||
{
|
||||
// mLastFailedCondition can be NULL if there was an error processing the condition in Condition::Meets (i.e. wrong data for ConditionTarget or others)
|
||||
// mLastFailedCondition can be nullptr if there was an error processing the condition in Condition::Meets (i.e. wrong data for ConditionTarget or others)
|
||||
if (condInfo.mLastFailedCondition && condInfo.mLastFailedCondition->ErrorType)
|
||||
{
|
||||
if (condInfo.mLastFailedCondition->ErrorType == SPELL_FAILED_CUSTOM_ERROR)
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@ void Spell::EffectInstaKill(SpellEffIndex /*effIndex*/)
|
|||
data << uint32(m_spellInfo->Id);
|
||||
m_caster->SendMessageToSet(&data, true);
|
||||
|
||||
Unit::DealDamage(m_caster, unitTarget, unitTarget->GetHealth(), NULL, NODAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
Unit::DealDamage(m_caster, unitTarget, unitTarget->GetHealth(), nullptr, NODAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false);
|
||||
}
|
||||
|
||||
void Spell::EffectEnvironmentalDMG(SpellEffIndex /*effIndex*/)
|
||||
|
|
@ -1092,7 +1092,7 @@ void Spell::EffectTriggerRitualOfSummoning(SpellEffIndex effIndex)
|
|||
|
||||
finish();
|
||||
|
||||
m_caster->CastSpell((Unit*)NULL, spellInfo, false);
|
||||
m_caster->CastSpell((Unit*)nullptr, spellInfo, false);
|
||||
}
|
||||
|
||||
void Spell::EffectJump(SpellEffIndex effIndex)
|
||||
|
|
@ -1669,7 +1669,7 @@ void Spell::DoCreateItem(uint8 /*effIndex*/, uint32 itemId)
|
|||
ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(newitemid);
|
||||
if (!pProto)
|
||||
{
|
||||
player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, nullptr);
|
||||
player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1762,7 +1762,7 @@ void Spell::DoCreateItem(uint8 /*effIndex*/, uint32 itemId)
|
|||
// was it successful? return error if not
|
||||
if (!pItem)
|
||||
{
|
||||
player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, nullptr);
|
||||
player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -2854,7 +2854,7 @@ void Spell::EffectEnchantItemPerm(SpellEffIndex effIndex)
|
|||
unitTarget = p_caster;
|
||||
// and add a scroll
|
||||
DoCreateItem(effIndex, m_spellInfo->Effects[effIndex].ItemType);
|
||||
itemTarget = NULL;
|
||||
itemTarget = nullptr;
|
||||
m_targets.SetItemTarget(nullptr);
|
||||
}
|
||||
else
|
||||
|
|
@ -3422,7 +3422,7 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
|
|||
// Skyshatter Harness item set bonus
|
||||
// Stormstrike
|
||||
if (AuraEffect* aurEff = m_caster->IsScriptOverriden(m_spellInfo, 5634))
|
||||
m_caster->CastSpell(m_caster, 38430, true, NULL, aurEff);
|
||||
m_caster->CastSpell(m_caster, 38430, true, nullptr, aurEff);
|
||||
// Lava lash damage increased by Flametongue weapon
|
||||
if (m_caster->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, 688, EFFECT_0))
|
||||
AddPct(totalDamagePercentMod, 25.0f);
|
||||
|
|
@ -6289,7 +6289,7 @@ void Spell::EffectRechargeManaGem(SpellEffIndex /*effIndex*/)
|
|||
ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(item_id);
|
||||
if (!pProto)
|
||||
{
|
||||
player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, nullptr);
|
||||
player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1275,7 +1275,7 @@ bool SpellInfo::IsAffectedBySpellMod(SpellModifier const* mod) const
|
|||
return false;
|
||||
|
||||
SpellInfo const* affectSpell = sSpellMgr->GetSpellInfo(mod->spellId);
|
||||
// False if affect_spell == NULL or spellFamily not equal
|
||||
// False if affect_spell == nullptr or spellFamily not equal
|
||||
if (!affectSpell || affectSpell->SpellFamilyName != SpellFamilyName)
|
||||
return false;
|
||||
|
||||
|
|
|
|||
|
|
@ -271,13 +271,13 @@ public:
|
|||
bool IsFarDestTargetEffect() const;
|
||||
bool IsUnitOwnedAuraEffect() const;
|
||||
|
||||
int32 CalcValue(Unit const* caster = NULL, int32 const* basePoints = NULL, Unit const* target = nullptr) const;
|
||||
int32 CalcValue(Unit const* caster = nullptr, int32 const* basePoints = nullptr, Unit const* target = nullptr) const;
|
||||
int32 CalcBaseValue(int32 value) const;
|
||||
float CalcValueMultiplier(Unit* caster, Spell* spell = nullptr) const;
|
||||
float CalcDamageMultiplier(Unit* caster, Spell* spell = nullptr) const;
|
||||
|
||||
bool HasRadius() const;
|
||||
float CalcRadius(Unit* caster = NULL, Spell* = nullptr) const;
|
||||
float CalcRadius(Unit* caster = nullptr, Spell* = nullptr) const;
|
||||
|
||||
uint32 GetProvidedTargetMask() const;
|
||||
uint32 GetMissingTargetMask(bool srcSet = false, bool destSet = false, uint32 mask = 0) const;
|
||||
|
|
@ -479,14 +479,14 @@ public:
|
|||
SpellSpecificType GetSpellSpecific() const;
|
||||
|
||||
float GetMinRange(bool positive = false) const;
|
||||
float GetMaxRange(bool positive = false, Unit* caster = NULL, Spell* spell = nullptr) const;
|
||||
float GetMaxRange(bool positive = false, Unit* caster = nullptr, Spell* spell = nullptr) const;
|
||||
|
||||
int32 GetDuration() const;
|
||||
int32 GetMaxDuration() const;
|
||||
|
||||
uint32 GetMaxTicks() const;
|
||||
|
||||
uint32 CalcCastTime(Unit* caster = NULL, Spell* spell = nullptr) const;
|
||||
uint32 CalcCastTime(Unit* caster = nullptr, Spell* spell = nullptr) const;
|
||||
uint32 GetRecoveryTime() const;
|
||||
|
||||
int32 CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask, Spell* spell = nullptr) const;
|
||||
|
|
|
|||
|
|
@ -508,7 +508,7 @@ uint32 SpellMgr::GetSpellIdForDifficulty(uint32 spellId, Unit const* caster) con
|
|||
if (difficultyEntry->SpellID[mode] <= 0 && mode > DUNGEON_DIFFICULTY_HEROIC)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellMgr::GetSpellIdForDifficulty: spell %u mode %u spell is NULL, using mode %u", spellId, mode, mode - 2);
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellMgr::GetSpellIdForDifficulty: spell %u mode %u spell is nullptr, using mode %u", spellId, mode, mode - 2);
|
||||
#endif
|
||||
mode -= 2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -352,38 +352,38 @@ public:
|
|||
// examples:
|
||||
// -shadowstep - explicit target is the unit you want to go behind of
|
||||
// -chain heal - explicit target is the unit to be healed first
|
||||
// -holy nova/arcane explosion - explicit target = NULL because target you are selecting doesn't affect how spell targets are selected
|
||||
// -holy nova/arcane explosion - explicit target = nullptr because target you are selecting doesn't affect how spell targets are selected
|
||||
// you can determine if spell requires explicit targets by dbc columns:
|
||||
// - Targets - mask of explicit target types
|
||||
// - ImplicitTargetXX set to TARGET_XXX_TARGET_YYY, _TARGET_ here means that explicit target is used by the effect, so spell needs one too
|
||||
|
||||
// returns: WorldLocation which was selected as a spell destination or NULL
|
||||
// returns: WorldLocation which was selected as a spell destination or nullptr
|
||||
WorldLocation const* GetExplTargetDest();
|
||||
|
||||
void SetExplTargetDest(WorldLocation& loc);
|
||||
|
||||
// returns: WorldObject which was selected as an explicit spell target or NULL if there's no target
|
||||
// returns: WorldObject which was selected as an explicit spell target or nullptr if there's no target
|
||||
WorldObject* GetExplTargetWorldObject();
|
||||
|
||||
// returns: Unit which was selected as an explicit spell target or NULL if there's no target
|
||||
// returns: Unit which was selected as an explicit spell target or nullptr if there's no target
|
||||
Unit* GetExplTargetUnit();
|
||||
|
||||
// returns: GameObject which was selected as an explicit spell target or NULL if there's no target
|
||||
// returns: GameObject which was selected as an explicit spell target or nullptr if there's no target
|
||||
GameObject* GetExplTargetGObj();
|
||||
|
||||
// returns: Item which was selected as an explicit spell target or NULL if there's no target
|
||||
// returns: Item which was selected as an explicit spell target or nullptr if there's no target
|
||||
Item* GetExplTargetItem();
|
||||
|
||||
// methods useable only during spell hit on target, or during spell launch on target:
|
||||
// returns: target of current effect if it was Unit otherwise NULL
|
||||
// returns: target of current effect if it was Unit otherwise nullptr
|
||||
Unit* GetHitUnit();
|
||||
// returns: target of current effect if it was Creature otherwise NULL
|
||||
// returns: target of current effect if it was Creature otherwise nullptr
|
||||
Creature* GetHitCreature();
|
||||
// returns: target of current effect if it was Player otherwise NULL
|
||||
// returns: target of current effect if it was Player otherwise nullptr
|
||||
Player* GetHitPlayer();
|
||||
// returns: target of current effect if it was Item otherwise NULL
|
||||
// returns: target of current effect if it was Item otherwise nullptr
|
||||
Item* GetHitItem();
|
||||
// returns: target of current effect if it was GameObject otherwise NULL
|
||||
// returns: target of current effect if it was GameObject otherwise nullptr
|
||||
GameObject* GetHitGObj();
|
||||
// returns: destination of current effect
|
||||
WorldLocation* GetHitDest();
|
||||
|
|
@ -802,13 +802,13 @@ public:
|
|||
|
||||
// returns guid of object which casted the aura (m_originalCaster of the Spell class)
|
||||
uint64 GetCasterGUID() const;
|
||||
// returns unit which casted the aura or NULL if not avalible (caster logged out for example)
|
||||
// returns unit which casted the aura or nullptr if not avalible (caster logged out for example)
|
||||
Unit* GetCaster() const;
|
||||
// returns object on which aura was casted, target for non-area auras, area aura source for area auras
|
||||
WorldObject* GetOwner() const;
|
||||
// returns owner if it's unit or unit derived object, NULL otherwise (only for persistent area auras NULL is returned)
|
||||
// returns owner if it's unit or unit derived object, nullptr otherwise (only for persistent area auras nullptr is returned)
|
||||
Unit* GetUnitOwner() const;
|
||||
// returns owner if it's dynobj, NULL otherwise
|
||||
// returns owner if it's dynobj, nullptr otherwise
|
||||
DynamicObject* GetDynobjOwner() const;
|
||||
|
||||
// removes aura with remove mode (see AuraRemoveMode enum)
|
||||
|
|
@ -853,7 +853,7 @@ public:
|
|||
|
||||
// check if aura has effect of given effindex
|
||||
bool HasEffect(uint8 effIndex) const;
|
||||
// returns aura effect of given effect index or NULL
|
||||
// returns aura effect of given effect index or nullptr
|
||||
AuraEffect* GetEffect(uint8 effIndex) const;
|
||||
|
||||
// check if aura has effect of given aura type
|
||||
|
|
@ -863,8 +863,8 @@ public:
|
|||
// Do not call these in hooks in which AuraApplication is not avalible, otherwise result will differ from expected (the functions will return nullptr)
|
||||
|
||||
// returns currently processed target of an aura
|
||||
// Return value does not need to be NULL-checked, the only situation this will (always)
|
||||
// return NULL is when the call happens in an unsupported hook, in other cases, it is always valid
|
||||
// Return value does not need to be nullptr-checked, the only situation this will (always)
|
||||
// return nullptr is when the call happens in an unsupported hook, in other cases, it is always valid
|
||||
Unit* GetTarget() const;
|
||||
// returns AuraApplication object of currently processed target
|
||||
AuraApplication const* GetTargetApplication() const;
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ void CreatureTextMgr::LoadCreatureTextLocales()
|
|||
sLog->outString();
|
||||
}
|
||||
|
||||
uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, WorldObject const* whisperTarget /*= NULL*/, ChatMsg msgType /*= CHAT_MSG_ADDON*/, Language language /*= LANG_ADDON*/, CreatureTextRange range /*= TEXT_RANGE_NORMAL*/, uint32 sound /*= 0*/, TeamId teamId /*= TEAM_NEUTRAL*/, bool gmOnly /*= false*/, Player* srcPlr /*= NULL*/)
|
||||
uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, WorldObject const* whisperTarget /*= nullptr*/, ChatMsg msgType /*= CHAT_MSG_ADDON*/, Language language /*= LANG_ADDON*/, CreatureTextRange range /*= TEXT_RANGE_NORMAL*/, uint32 sound /*= 0*/, TeamId teamId /*= TEAM_NEUTRAL*/, bool gmOnly /*= false*/, Player* srcPlr /*= nullptr*/)
|
||||
{
|
||||
if (!source)
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -86,11 +86,11 @@ public:
|
|||
void SendEmote(Unit* source, uint32 emote);
|
||||
|
||||
//if sent, returns the 'duration' of the text else 0 if error
|
||||
uint32 SendChat(Creature* source, uint8 textGroup, WorldObject const* whisperTarget = NULL, ChatMsg msgType = CHAT_MSG_ADDON, Language language = LANG_ADDON, CreatureTextRange range = TEXT_RANGE_NORMAL, uint32 sound = 0, TeamId teamId = TEAM_NEUTRAL, bool gmOnly = false, Player* srcPlr = nullptr);
|
||||
uint32 SendChat(Creature* source, uint8 textGroup, WorldObject const* whisperTarget = nullptr, ChatMsg msgType = CHAT_MSG_ADDON, Language language = LANG_ADDON, CreatureTextRange range = TEXT_RANGE_NORMAL, uint32 sound = 0, TeamId teamId = TEAM_NEUTRAL, bool gmOnly = false, Player* srcPlr = nullptr);
|
||||
bool TextExist(uint32 sourceEntry, uint8 textGroup);
|
||||
std::string GetLocalizedChatString(uint32 entry, uint8 gender, uint8 textGroup, uint32 id, LocaleConstant locale) const;
|
||||
|
||||
template<class Builder> void SendChatPacket(WorldObject* source, Builder const& builder, ChatMsg msgType, WorldObject const* whisperTarget = NULL, CreatureTextRange range = TEXT_RANGE_NORMAL, TeamId teamId = TEAM_NEUTRAL, bool gmOnly = false) const;
|
||||
template<class Builder> void SendChatPacket(WorldObject* source, Builder const& builder, ChatMsg msgType, WorldObject const* whisperTarget = nullptr, CreatureTextRange range = TEXT_RANGE_NORMAL, TeamId teamId = TEAM_NEUTRAL, bool gmOnly = false) const;
|
||||
|
||||
private:
|
||||
CreatureTextRepeatIds GetRepeatGroup(Creature* source, uint8 textGroup);
|
||||
|
|
@ -166,7 +166,7 @@ private:
|
|||
};
|
||||
|
||||
template<class Builder>
|
||||
void CreatureTextMgr::SendChatPacket(WorldObject* source, Builder const& builder, ChatMsg msgType, WorldObject const* whisperTarget /*= NULL*/, CreatureTextRange range /*= TEXT_RANGE_NORMAL*/, TeamId teamId /*= TEAM_NEUTRAL*/, bool gmOnly /*= false*/) const
|
||||
void CreatureTextMgr::SendChatPacket(WorldObject* source, Builder const& builder, ChatMsg msgType, WorldObject const* whisperTarget /*= nullptr*/, CreatureTextRange range /*= TEXT_RANGE_NORMAL*/, TeamId teamId /*= TEAM_NEUTRAL*/, bool gmOnly /*= false*/) const
|
||||
{
|
||||
if (!source)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ WorldSession* World::FindSession(uint32 id) const
|
|||
SessionMap::const_iterator itr = m_sessions.find(id);
|
||||
|
||||
if (itr != m_sessions.end())
|
||||
return itr->second; // also can return NULL for kicked session
|
||||
return itr->second; // also can return nullptr for kicked session
|
||||
else
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,12 +48,12 @@ public:
|
|||
};
|
||||
static std::vector<ChatCommand> disableCommandTable =
|
||||
{
|
||||
{ "add", SEC_ADMINISTRATOR, true, NULL, "", addDisableCommandTable },
|
||||
{ "remove", SEC_ADMINISTRATOR, true, NULL, "", removeDisableCommandTable },
|
||||
{ "add", SEC_ADMINISTRATOR, true, nullptr, "", addDisableCommandTable },
|
||||
{ "remove", SEC_ADMINISTRATOR, true, nullptr, "", removeDisableCommandTable },
|
||||
};
|
||||
static std::vector<ChatCommand> commandTable =
|
||||
{
|
||||
{ "disable", SEC_ADMINISTRATOR, false, NULL, "", disableCommandTable },
|
||||
{ "disable", SEC_ADMINISTRATOR, false, nullptr, "", disableCommandTable },
|
||||
};
|
||||
return commandTable;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public:
|
|||
|
||||
static std::vector<ChatCommand> commandTable =
|
||||
{
|
||||
{ "mmap", SEC_ADMINISTRATOR, true, NULL, "", mmapCommandTable },
|
||||
{ "mmap", SEC_ADMINISTRATOR, true, nullptr, "", mmapCommandTable },
|
||||
};
|
||||
return commandTable;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -519,7 +519,7 @@ public:
|
|||
}
|
||||
uint32 itemId = atol(pitem);
|
||||
|
||||
char* addMulti = strtok(NULL, " ");
|
||||
char* addMulti = strtok(nullptr, " ");
|
||||
if (!sObjectMgr->RemoveVendorItem(addMulti ? handler->GetSession()->GetCurrentVendor() : vendor->GetEntry(), itemId))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ITEM_NOT_IN_LIST, itemId);
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ public:
|
|||
break;
|
||||
case EVENT_SPELL_SHOCK_BARRIER:
|
||||
me->CastSpell(me, SPELL_SHOCK_BARRIER, true);
|
||||
me->CastCustomSpell(SPELL_PYROBLAST, SPELLVALUE_MAX_TARGETS, 1, (Unit*)NULL, false);
|
||||
me->CastCustomSpell(SPELL_PYROBLAST, SPELLVALUE_MAX_TARGETS, 1, (Unit*)nullptr, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_SHOCK_BARRIER, 50000);
|
||||
break;
|
||||
case EVENT_SPELL_PHOENIX:
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public:
|
|||
me->SetReactState(REACT_PASSIVE);
|
||||
DoCastAOE(SPELL_THREAT_PULSE, true);
|
||||
|
||||
sCreatureTextMgr->SendChat(me, SAY_PERSUADE_RAND, NULL, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_NEUTRAL, false, player);
|
||||
sCreatureTextMgr->SendChat(me, SAY_PERSUADE_RAND, nullptr, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_NEUTRAL, false, player);
|
||||
Talk(SAY_CRUSADER);
|
||||
}
|
||||
}
|
||||
|
|
@ -124,7 +124,7 @@ public:
|
|||
break;
|
||||
|
||||
case 5:
|
||||
sCreatureTextMgr->SendChat(me, SAY_PERSUADED5, NULL, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_NEUTRAL, false, player);
|
||||
sCreatureTextMgr->SendChat(me, SAY_PERSUADED5, nullptr, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_NEUTRAL, false, player);
|
||||
speechTimer = 8000;
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ public:
|
|||
|
||||
void HandleDummyTick(AuraEffect const* aurEff)
|
||||
{
|
||||
GetTarget()->CastSpell((Unit*)NULL, aurEff->GetAmount(), true);
|
||||
GetTarget()->CastSpell((Unit*)nullptr, aurEff->GetAmount(), true);
|
||||
}
|
||||
|
||||
void HandleUpdatePeriodic(AuraEffect* aurEff)
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue