refactor(Core): rename namespaces and macros to acore (#2454)

This commit is contained in:
Viste
2019-12-01 15:13:31 +03:00
committed by Francesco Borzì
parent e19e95e5d0
commit e22d78ecd6
278 changed files with 1292 additions and 1309 deletions

View File

@@ -4,8 +4,8 @@
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/
#ifndef TRINITY_MOTIONMASTER_H
#define TRINITY_MOTIONMASTER_H
#ifndef ACORE_MOTIONMASTER_H
#define ACORE_MOTIONMASTER_H
#include "Common.h"
#include <vector>

View File

@@ -4,8 +4,8 @@
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/
#ifndef TRINITY_MOVEMENTGENERATOR_H
#define TRINITY_MOVEMENTGENERATOR_H
#ifndef ACORE_MOVEMENTGENERATOR_H
#define ACORE_MOVEMENTGENERATOR_H
#include "Define.h"
#include <ace/Singleton.h>

View File

@@ -4,8 +4,8 @@
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/
#ifndef TRINITY_MOVEMENTGENERATOR_IMPL_H
#define TRINITY_MOVEMENTGENERATOR_IMPL_H
#ifndef ACORE_MOVEMENTGENERATOR_IMPL_H
#define ACORE_MOVEMENTGENERATOR_IMPL_H
#include "MovementGenerator.h"

View File

@@ -37,8 +37,8 @@ void ConfusedMovementGenerator<T>::DoInitialize(T* unit)
float wanderY = y + (wander_distance * (float)rand_norm() - wander_distance/2);
// prevent invalid coordinates generation
Trinity::NormalizeMapCoord(wanderX);
Trinity::NormalizeMapCoord(wanderY);
acore::NormalizeMapCoord(wanderX);
acore::NormalizeMapCoord(wanderY);
float new_z = map->GetHeight(unit->GetPhaseMask(), wanderX, wanderY, z, true);
if (new_z <= INVALID_HEIGHT || fabs(z-new_z) > 3.0f) // pussywizard

View File

@@ -4,8 +4,8 @@
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/
#ifndef TRINITY_CONFUSEDGENERATOR_H
#define TRINITY_CONFUSEDGENERATOR_H
#ifndef ACORE_CONFUSEDGENERATOR_H
#define ACORE_CONFUSEDGENERATOR_H
#include "MovementGenerator.h"
#include "Timer.h"

View File

@@ -2,8 +2,8 @@
Written by Xinef
*/
#ifndef TRINITY_ESCORTMOVEMENTGENERATOR_H
#define TRINITY_ESCORTMOVEMENTGENERATOR_H
#ifndef ACORE_ESCORTMOVEMENTGENERATOR_H
#define ACORE_ESCORTMOVEMENTGENERATOR_H
#include "MovementGenerator.h"

View File

@@ -151,8 +151,8 @@ bool FleeingMovementGenerator<T>::_getPoint(T* owner, float &x, float &y, float
temp_x = x + distance * cos(angle);
temp_y = y + distance * sin(angle);
Trinity::NormalizeMapCoord(temp_x);
Trinity::NormalizeMapCoord(temp_y);
acore::NormalizeMapCoord(temp_x);
acore::NormalizeMapCoord(temp_y);
if (owner->IsWithinLOS(temp_x, temp_y, z))
{
bool is_water_now = _map->IsInWater(x,y,z);

View File

@@ -4,8 +4,8 @@
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/
#ifndef TRINITY_FLEEINGMOVEMENTGENERATOR_H
#define TRINITY_FLEEINGMOVEMENTGENERATOR_H
#ifndef ACORE_FLEEINGMOVEMENTGENERATOR_H
#define ACORE_FLEEINGMOVEMENTGENERATOR_H
#include "MovementGenerator.h"

View File

@@ -4,8 +4,8 @@
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/
#ifndef TRINITY_HOMEMOVEMENTGENERATOR_H
#define TRINITY_HOMEMOVEMENTGENERATOR_H
#ifndef ACORE_HOMEMOVEMENTGENERATOR_H
#define ACORE_HOMEMOVEMENTGENERATOR_H
#include "MovementGenerator.h"

View File

@@ -4,8 +4,8 @@
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/
#ifndef TRINITY_IDLEMOVEMENTGENERATOR_H
#define TRINITY_IDLEMOVEMENTGENERATOR_H
#ifndef ACORE_IDLEMOVEMENTGENERATOR_H
#define ACORE_IDLEMOVEMENTGENERATOR_H
#include "MovementGenerator.h"

View File

@@ -39,7 +39,7 @@ PathGenerator::PathGenerator(const Unit* owner) :
{
MMAP::MMapManager* mmap = MMAP::MMapFactory::createOrGetMMapManager();
TRINITY_READ_GUARD(ACE_RW_Thread_Mutex, mmap->GetManagerLock());
ACORE_READ_GUARD(ACE_RW_Thread_Mutex, mmap->GetManagerLock());
_navMesh = mmap->GetNavMesh(mapId);
_navMeshQuery = mmap->GetNavMeshQuery(mapId, _sourceUnit->GetInstanceId());
}
@@ -62,7 +62,7 @@ bool PathGenerator::CalculatePath(float destX, float destY, float destZ, bool fo
else
_sourceUnit->GetPosition(x, y, z);
if (!Trinity::IsValidMapCoord(destX, destY, destZ) || !Trinity::IsValidMapCoord(x, y, z))
if (!acore::IsValidMapCoord(destX, destY, destZ) || !acore::IsValidMapCoord(x, y, z))
return false;
G3D::Vector3 dest(destX, destY, destZ);

View File

@@ -4,8 +4,8 @@
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/
#ifndef TRINITY_POINTMOVEMENTGENERATOR_H
#define TRINITY_POINTMOVEMENTGENERATOR_H
#ifndef ACORE_POINTMOVEMENTGENERATOR_H
#define ACORE_POINTMOVEMENTGENERATOR_H
#include "MovementGenerator.h"
#include "FollowerReference.h"

View File

@@ -54,7 +54,7 @@ void RandomMovementGenerator<Creature>::_setRandomLocation(Creature* creature)
Map* map = creature->GetMap();
float x = _destinationPoints[newPoint].x, y = _destinationPoints[newPoint].y, z = _destinationPoints[newPoint].z;
// invalid coordinates
if (!Trinity::IsValidMapCoord(x, y))
if (!acore::IsValidMapCoord(x, y))
{
_validPointsVector[_currentPoint].erase(randomIter);
_preComputedPaths.erase(pathIdx);

View File

@@ -2,8 +2,8 @@
* Originally written by Xinef - Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: http://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
*/
#ifndef TRINITY_RANDOMMOTIONGENERATOR_H
#define TRINITY_RANDOMMOTIONGENERATOR_H
#ifndef ACORE_RANDOMMOTIONGENERATOR_H
#define ACORE_RANDOMMOTIONGENERATOR_H
#include "MovementGenerator.h"
#include "PathGenerator.h"

View File

@@ -4,8 +4,8 @@
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/
#ifndef TRINITY_TARGETEDMOVEMENTGENERATOR_H
#define TRINITY_TARGETEDMOVEMENTGENERATOR_H
#ifndef ACORE_TARGETEDMOVEMENTGENERATOR_H
#define ACORE_TARGETEDMOVEMENTGENERATOR_H
#include "MovementGenerator.h"
#include "FollowerReference.h"

View File

@@ -4,8 +4,8 @@
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/
#ifndef TRINITY_WAYPOINTMOVEMENTGENERATOR_H
#define TRINITY_WAYPOINTMOVEMENTGENERATOR_H
#ifndef ACORE_WAYPOINTMOVEMENTGENERATOR_H
#define ACORE_WAYPOINTMOVEMENTGENERATOR_H
/** @page PathMovementGenerator is used to generate movements
* of waypoints and flight paths. Each serves the purpose

View File

@@ -56,8 +56,8 @@ void WaypointMgr::Load()
float z = fields[4].GetFloat();
float o = fields[5].GetFloat();
Trinity::NormalizeMapCoord(x);
Trinity::NormalizeMapCoord(y);
acore::NormalizeMapCoord(x);
acore::NormalizeMapCoord(y);
wp->id = fields[1].GetUInt32();
wp->x = x;
@@ -118,8 +118,8 @@ void WaypointMgr::ReloadPath(uint32 id)
float z = fields[3].GetFloat();
float o = fields[4].GetFloat();
Trinity::NormalizeMapCoord(x);
Trinity::NormalizeMapCoord(y);
acore::NormalizeMapCoord(x);
acore::NormalizeMapCoord(y);
wp->id = fields[0].GetUInt32();
wp->x = x;

View File

@@ -4,8 +4,8 @@
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/
#ifndef TRINITY_WAYPOINTMANAGER_H
#define TRINITY_WAYPOINTMANAGER_H
#ifndef ACORE_WAYPOINTMANAGER_H
#define ACORE_WAYPOINTMANAGER_H
#include <ace/Singleton.h>
#include <ace/Null_Mutex.h>