Entities/Unit: Cleanup all the direct accesses to m_unitMovedByMe. Refactor the field to be protected. Add assertions to catch dangling pointers.

Port From (https://github.com/TrinityCore/TrinityCore/commit/edc75831194bc2419e3abada47121fadf4b2aa8d)
This commit is contained in:
hondacrx
2021-12-23 20:17:08 -05:00
parent 4584543d45
commit 1f58dc2b53
5 changed files with 41 additions and 48 deletions
@@ -209,8 +209,6 @@ namespace Game.Entities
public List<ObjectGuid> m_clientGUIDs = new();
public List<ObjectGuid> m_visibleTransports = new();
public WorldObject seerView;
// only changed for direct client control (possess, vehicle etc.), not stuff you control using pet commands
public Unit m_unitMovedByMe;
Team m_team;
ReputationMgr reputationMgr;
QuestObjectiveCriteriaManager m_questObjectiveCriteriaMgr;