mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
feat(CI/Codestyle): added codestyle check (#3668)
This commit is contained in:
15
.github/workflows/codestyle.yml
vendored
Normal file
15
.github/workflows/codestyle.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
name: check-codestyle
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
check-codestyle:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
runs-on: ubuntu-20.04
|
||||
name: check codestyle
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Check core codestyle
|
||||
run: source ./apps/ci/ci-codestyle.sh
|
||||
23
apps/ci/ci-codestyle.sh
Normal file
23
apps/ci/ci-codestyle.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "Codestyle check script:"
|
||||
echo
|
||||
|
||||
declare -A singleLineRegexChecks=(
|
||||
["[[:blank:]]$"]="Remove whitespace at the end of the lines above"
|
||||
["\t"]="Replace tabs with 4 spaces in the lines above"
|
||||
)
|
||||
|
||||
for check in ${!singleLineRegexChecks[@]}; do
|
||||
echo " Checking RegEx: '${check}'"
|
||||
|
||||
if grep -P -r -I -n ${check} src; then
|
||||
echo
|
||||
echo "${singleLineRegexChecks[$check]}"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
echo
|
||||
echo "Everything looks good"
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C)
|
||||
# Copyright (C)
|
||||
#
|
||||
# This file is free software; as a special exception the author gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
|
||||
@@ -29,7 +29,6 @@ MACRO(AC_ADD_SCRIPT_LOADER script_dec include)
|
||||
CU_ADD_GLOBAL("AC_ADD_SCRIPTS_LIST" "Add${script_dec}Scripts()\;")
|
||||
endif()
|
||||
|
||||
|
||||
if (NOT ${include} STREQUAL "")
|
||||
CU_GET_GLOBAL("AC_ADD_SCRIPTS_INCLUDE")
|
||||
if (NOT ";${AC_ADD_SCRIPTS_INCLUDE};" MATCHES ";${include};")
|
||||
|
||||
@@ -96,7 +96,7 @@ if(NOT WITH_WARNINGS)
|
||||
/wd4267
|
||||
/wd4619
|
||||
# /wd4512
|
||||
)
|
||||
)
|
||||
message(STATUS "MSVC: Disabled generic compiletime warnings")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C)
|
||||
# Copyright (C)
|
||||
#
|
||||
# This file is free software; as a special exception the author gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
|
||||
MACRO(NORMALIZE_VERSION _requested_version _normalized_version)
|
||||
STRING(REGEX MATCH "[^0-9]*[0-9]+\\.[0-9]+\\.[0-9]+.*" _threePartMatch "${_requested_version}")
|
||||
if (_threePartMatch)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Find the MySQL client includes and library
|
||||
#
|
||||
#
|
||||
|
||||
# This module defines
|
||||
# MYSQL_INCLUDE_DIR, where to find mysql.h
|
||||
@@ -160,7 +160,7 @@ find_path(MYSQL_INCLUDE_DIR
|
||||
|
||||
if( UNIX )
|
||||
foreach(LIB ${MYSQL_ADD_LIBRARIES})
|
||||
find_library( MYSQL_LIBRARY
|
||||
find_library( MYSQL_LIBRARY
|
||||
NAMES
|
||||
mysql libmysql ${LIB}
|
||||
PATHS
|
||||
@@ -176,7 +176,7 @@ if( UNIX )
|
||||
endif( UNIX )
|
||||
|
||||
if( WIN32 )
|
||||
find_library( MYSQL_LIBRARY
|
||||
find_library( MYSQL_LIBRARY
|
||||
NAMES
|
||||
libmysql
|
||||
PATHS
|
||||
|
||||
@@ -182,7 +182,7 @@ ENDIF(WIN32 AND NOT CYGWIN)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OpenSSL DEFAULT_MSG
|
||||
OPENSSL_LIBRARIES
|
||||
OPENSSL_LIBRARIES
|
||||
OPENSSL_INCLUDE_DIR
|
||||
)
|
||||
|
||||
|
||||
@@ -2,4 +2,3 @@
|
||||
if( PREFIX )
|
||||
set(CMAKE_INSTALL_PREFIX "${PREFIX}")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -145,4 +145,3 @@ else()
|
||||
endif()
|
||||
|
||||
message("")
|
||||
|
||||
|
||||
@@ -364,7 +364,7 @@ protected:
|
||||
int numBVH2{0};
|
||||
|
||||
public:
|
||||
BuildStats()
|
||||
BuildStats()
|
||||
{
|
||||
for (int & i : numLeavesN) i = 0;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include "G3D/Set.h"
|
||||
#include "BoundingIntervalHierarchy.h"
|
||||
|
||||
|
||||
template<class T, class BoundsFunc = BoundsTrait<T>>
|
||||
class BIHWrap
|
||||
{
|
||||
|
||||
@@ -38,4 +38,3 @@ namespace MMAP
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -50,7 +50,6 @@ namespace MMAP
|
||||
MMapTileSet mmapLoadedTiles; // maps [map grid coords] to [dtTile]
|
||||
};
|
||||
|
||||
|
||||
typedef std::unordered_map<uint32, MMapData*> MMapDataSet;
|
||||
|
||||
// singleton class
|
||||
|
||||
@@ -408,7 +408,6 @@ namespace VMAP
|
||||
READ_OR_RETURN(&mogpflags, sizeof(uint32));
|
||||
READ_OR_RETURN(&GroupWMOID, sizeof(uint32));
|
||||
|
||||
|
||||
Vector3 vec1, vec2;
|
||||
READ_OR_RETURN(&vec1, sizeof(Vector3));
|
||||
|
||||
@@ -482,7 +481,6 @@ namespace VMAP
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
GroupModel_Raw::~GroupModel_Raw()
|
||||
{
|
||||
delete liquid;
|
||||
|
||||
@@ -63,7 +63,6 @@ namespace VMAP
|
||||
std::vector<G3D::Vector3> vertexArray;
|
||||
class WmoLiquid* liquid;
|
||||
|
||||
|
||||
GroupModel_Raw() : liquid(nullptr) { }
|
||||
|
||||
~GroupModel_Raw();
|
||||
|
||||
@@ -34,7 +34,6 @@ class GameObjectModel /*, public Intersectable*/
|
||||
VMAP::WorldModel* iModel;
|
||||
GameObject const* owner;
|
||||
|
||||
|
||||
GameObjectModel() : iModel(nullptr), owner(nullptr) { }
|
||||
bool initialize(const GameObject& go, const GameObjectDisplayInfoEntry& info);
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef _REGULAR_GRID_H
|
||||
#define _REGULAR_GRID_H
|
||||
|
||||
|
||||
#include <G3D/Ray.h>
|
||||
#include <G3D/Table.h>
|
||||
#include <G3D/BoundsTrait.h>
|
||||
@@ -143,7 +142,6 @@ public:
|
||||
bool isValid() const { return x >= 0 && x < CELL_NUMBER && y >= 0 && y < CELL_NUMBER;}
|
||||
};
|
||||
|
||||
|
||||
Node& getGridFor(float fx, float fy)
|
||||
{
|
||||
Cell c = Cell::ComputeCell(fx, fy);
|
||||
|
||||
@@ -35,4 +35,3 @@ void CleanStringForMysqlQuery(std::string& str)
|
||||
while ((n = str.find('"')) != str.npos) str.erase(n, 1);
|
||||
while ((n = str.find('\'')) != str.npos) str.erase(n, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -58,4 +58,3 @@ void AuthCrypt::EncryptSend(uint8* data, size_t len)
|
||||
|
||||
_serverEncrypt.UpdateData(len, data);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
|
||||
|
||||
#include "Cryptography/BigNumber.h"
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/crypto.h>
|
||||
@@ -186,4 +185,3 @@ char* BigNumber::AsDecStr() const
|
||||
{
|
||||
return BN_bn2dec(_bn);
|
||||
}
|
||||
|
||||
|
||||
@@ -88,4 +88,3 @@ private:
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -32,4 +32,3 @@ private:
|
||||
uint8 m_digest[SHA_DIGEST_LENGTH];
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -53,4 +53,3 @@ void SHA1Hash::Finalize(void)
|
||||
{
|
||||
SHA1_Final(mDigest, &mC);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,4 +35,3 @@ private:
|
||||
uint8 mDigest[SHA_DIGEST_LENGTH];
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -31,4 +31,3 @@ extern CharacterDatabaseWorkerPool CharacterDatabase;
|
||||
extern LoginDatabaseWorkerPool LoginDatabase;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -410,4 +410,3 @@ private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -451,7 +451,6 @@ PreparedStatementTask::PreparedStatementTask(PreparedStatement* stmt, PreparedQu
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
PreparedStatementTask::~PreparedStatementTask()
|
||||
{
|
||||
delete m_stmt;
|
||||
|
||||
@@ -99,4 +99,3 @@ private:
|
||||
typedef std::shared_ptr<PreparedResultSet> PreparedQueryResult;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -70,7 +70,6 @@ bool WheatyExceptionReport::alreadyCrashed;
|
||||
std::mutex WheatyExceptionReport::alreadyCrashedLock;
|
||||
WheatyExceptionReport::pRtlGetVersion WheatyExceptionReport::RtlGetVersion;
|
||||
|
||||
|
||||
// Declare global instance of class
|
||||
WheatyExceptionReport g_WheatyExceptionReport;
|
||||
|
||||
@@ -1230,7 +1229,6 @@ void WheatyExceptionReport::DumpTypeIndex(
|
||||
dataKind == DataIsStaticMember)
|
||||
continue;
|
||||
|
||||
|
||||
symbolDetails.top().HasChildren = true;
|
||||
if (!logChildren)
|
||||
{
|
||||
|
||||
@@ -75,7 +75,7 @@ private:
|
||||
LinkedListElement iLast;
|
||||
uint32 iSize{0};
|
||||
public:
|
||||
LinkedListHead()
|
||||
LinkedListHead()
|
||||
{
|
||||
// create empty list
|
||||
|
||||
|
||||
@@ -41,4 +41,3 @@ public:
|
||||
|
||||
//=====================================================
|
||||
#endif
|
||||
|
||||
|
||||
@@ -109,4 +109,3 @@ private:
|
||||
ContainerMapList<OBJECT_TYPES> i_elements;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -98,4 +98,3 @@ namespace acore
|
||||
//}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -153,4 +153,3 @@ namespace acore
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -96,4 +96,3 @@ private:
|
||||
VISITOR& i_visitor;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -29,4 +29,3 @@ struct TypeList
|
||||
#define TYPELIST_4(T1, T2, T3, T4) TypeList<T1, TYPELIST_3(T2, T3, T4) >
|
||||
#define TYPELIST_5(T1, T2, T3, T4, T5) TypeList<T1, TYPELIST_4(T2, T3, T4, T5) >
|
||||
#endif
|
||||
|
||||
|
||||
@@ -127,5 +127,4 @@ public:
|
||||
virtual bool GetSQLDriverQueryLogging() const = 0;
|
||||
};
|
||||
|
||||
|
||||
#endif //AZEROTHCORE_ILOG_H
|
||||
|
||||
@@ -64,7 +64,6 @@ Log::~Log()
|
||||
miscLogFile = NULL;
|
||||
}
|
||||
|
||||
|
||||
std::unique_ptr<ILog>& getLogInstance()
|
||||
{
|
||||
static std::unique_ptr<ILog> instance = std::make_unique<Log>();
|
||||
|
||||
@@ -118,4 +118,3 @@ std::unique_ptr<ILog>& getLogInstance();
|
||||
#define sLog getLogInstance()
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
const static size_t DEFAULT_SIZE = 0x1000;
|
||||
|
||||
// constructor
|
||||
ByteBuffer()
|
||||
ByteBuffer()
|
||||
{
|
||||
_storage.reserve(DEFAULT_SIZE);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ class WorldPacket : public ByteBuffer
|
||||
{
|
||||
public:
|
||||
// just container for later use
|
||||
WorldPacket() : ByteBuffer(0)
|
||||
WorldPacket() : ByteBuffer(0)
|
||||
{
|
||||
}
|
||||
explicit WorldPacket(uint16 opcode, size_t res = 200) : ByteBuffer(res), m_opcode(opcode) { }
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace ACE_Based
|
||||
|
||||
//! Create a LockedQueue.
|
||||
LockedQueue()
|
||||
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +117,6 @@ void Thread::setPriority(Priority priority)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// remove this ASSERT in case you don't want to know is thread priority change was successful or not
|
||||
ASSERT(_ok);
|
||||
}
|
||||
|
||||
@@ -53,4 +53,3 @@ inline void EndianConvertReverse(uint8&) { }
|
||||
inline void EndianConvertReverse( int8&) { }
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-GPL2
|
||||
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
|
||||
*/
|
||||
|
||||
#ifndef ACORE_OPTIONAL_H
|
||||
|
||||
@@ -249,4 +249,3 @@ bool WinServiceRun()
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -14,4 +14,3 @@ bool WinServiceRun();
|
||||
|
||||
#endif // _WIN32_SERVICE_
|
||||
#endif // _WIN32
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ struct IntervalTimer
|
||||
public:
|
||||
|
||||
IntervalTimer()
|
||||
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ extern int main(int argc, char** argv)
|
||||
sLog->outString(" ╚██████╗╚██████╔╝██║ ██║███████╗");
|
||||
sLog->outString(" ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝\n");
|
||||
|
||||
sLog->outString(" AzerothCore 3.3.5a - www.azerothcore.org\n");
|
||||
sLog->outString(" AzerothCore 3.3.5a - www.azerothcore.org\n");
|
||||
|
||||
sLog->outString("Using configuration file %s.", configFile);
|
||||
|
||||
|
||||
@@ -580,7 +580,6 @@ bool AuthSocket::_HandleLogonChallenge()
|
||||
for (int i = 0; i < 4; ++i)
|
||||
_localizationName[i] = ch->country[4 - i - 1];
|
||||
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug( LOG_FILTER_NETWORKIO, "'%s:%d' [AuthChallenge] account %s is using '%c%c%c%c' locale (%u)", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str (), ch->country[3], ch->country[2], ch->country[1], ch->country[0], GetLocaleByName(_localizationName) );
|
||||
#endif
|
||||
|
||||
@@ -242,7 +242,6 @@ WrongPass.BanType = 0
|
||||
|
||||
WrongPass.Logging = 0
|
||||
|
||||
|
||||
#
|
||||
###################################################################################################
|
||||
|
||||
|
||||
@@ -61,7 +61,6 @@ public:
|
||||
void AttackStart(Unit* who) override;
|
||||
void UpdateAI(uint32 diff) override;
|
||||
|
||||
|
||||
static int Permissible(Creature const* /*creature*/) { return PERMIT_BASE_NO; }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -74,4 +74,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -47,4 +47,3 @@ protected:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -296,7 +296,6 @@ bool SpellTargetSelector::operator()(Unit const* target) const
|
||||
float max_range = _caster->GetSpellMaxRangeForTarget(target, _spellInfo);
|
||||
float min_range = _caster->GetSpellMinRangeForTarget(target, _spellInfo);
|
||||
|
||||
|
||||
if (target && target != _caster)
|
||||
{
|
||||
if (range_type == SPELL_RANGE_MELEE)
|
||||
|
||||
@@ -111,7 +111,6 @@ struct PowerUsersSelector : public acore::unary_function<Unit*, bool>
|
||||
float const _dist;
|
||||
bool const _playerOnly;
|
||||
|
||||
|
||||
PowerUsersSelector(Unit const* unit, Powers power, float dist, bool playerOnly) : _me(unit), _power(power), _dist(dist), _playerOnly(playerOnly) { }
|
||||
|
||||
bool operator()(Unit const* target) const
|
||||
|
||||
@@ -55,4 +55,3 @@ struct AISpellInfoType
|
||||
AISpellInfoType* GetAISpellInfo(uint32 i);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -44,4 +44,3 @@ namespace AIRegistry
|
||||
(new MovementGeneratorFactory<WaypointMovementGenerator<Creature> >(WAYPOINT_MOTION_TYPE))->RegisterSelf();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,4 +12,3 @@ namespace AIRegistry
|
||||
void Initialize(void);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -139,4 +139,3 @@ namespace FactorySelector
|
||||
return (ai_factory == NULL ? new NullGameObjectAI(go) : ai_factory->Create(go));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,4 +20,3 @@ namespace FactorySelector
|
||||
GameObjectAI* SelectGameObjectAI(GameObject*);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -126,4 +126,3 @@ private:
|
||||
bool HasImmuneToNPCFlags;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -450,7 +450,6 @@ void SmartAI::UpdatePath(const uint32 diff)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SmartAI::CheckConditions(const uint32 diff)
|
||||
{
|
||||
Vehicle* vehicle = me->GetVehicleKit();
|
||||
|
||||
@@ -121,7 +121,6 @@ namespace AccountMgr
|
||||
return AOR_OK;
|
||||
}
|
||||
|
||||
|
||||
AccountOpResult ChangeUsername(uint32 accountId, std::string newUsername, std::string newPassword)
|
||||
{
|
||||
// Check if accounts exists
|
||||
|
||||
@@ -186,7 +186,7 @@ struct AchievementCriteriaData
|
||||
};
|
||||
uint32 ScriptId;
|
||||
|
||||
AchievementCriteriaData()
|
||||
AchievementCriteriaData()
|
||||
{
|
||||
raw.value1 = 0;
|
||||
raw.value2 = 0;
|
||||
|
||||
@@ -56,4 +56,3 @@ namespace AddonMgr
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -189,7 +189,6 @@ bool Battlefield::Update(uint32 diff)
|
||||
objective_changed = true;
|
||||
}
|
||||
|
||||
|
||||
if (m_LastResurectTimer <= diff)
|
||||
{
|
||||
for (uint8 i = 0; i < m_GraveyardList.size(); i++)
|
||||
|
||||
@@ -49,7 +49,6 @@ enum BattlefieldTimers
|
||||
BATTLEFIELD_OBJECTIVE_UPDATE_INTERVAL = 1000
|
||||
};
|
||||
|
||||
|
||||
const uint32 BattlefieldFactions[BG_TEAMS_COUNT] =
|
||||
{
|
||||
1732, // Alliance
|
||||
|
||||
@@ -96,7 +96,6 @@ bool BattlefieldWG::SetupBattlefield()
|
||||
m_GraveyardList[i] = graveyard;
|
||||
}
|
||||
|
||||
|
||||
// Spawn workshop creatures and gameobjects
|
||||
for (uint8 i = 0; i < WG_MAX_WORKSHOP; i++)
|
||||
{
|
||||
@@ -223,7 +222,6 @@ void BattlefieldWG::OnBattleStart()
|
||||
else
|
||||
sLog->outError("WG: Failed to spawn titan relic.");
|
||||
|
||||
|
||||
// Update tower visibility and update faction
|
||||
for (GuidSet::const_iterator itr = CanonList.begin(); itr != CanonList.end(); ++itr)
|
||||
{
|
||||
|
||||
@@ -25,14 +25,12 @@ typedef std::set<WGWorkshop*> Workshop;
|
||||
typedef std::set<Group*> GroupSet;
|
||||
//typedef std::set<WintergraspCapturePoint *> CapturePointSet; unused ?
|
||||
|
||||
|
||||
const uint32 VehNumWorldState[2] = { 3680, 3490 };
|
||||
const uint32 MaxVehNumWorldState[2] = { 3681, 3491 };
|
||||
const uint32 ClockWorldState[2] = { 3781, 4354 };
|
||||
const uint32 WintergraspFaction[3] = { 1, 2, 35 };
|
||||
float const WintergraspStalkerPos[4] = { 4948.985f, 2937.789f, 550.5172f, 1.815142f };
|
||||
|
||||
|
||||
enum WintergraspSpells
|
||||
{
|
||||
// Wartime auras
|
||||
|
||||
@@ -191,4 +191,3 @@ protected:
|
||||
ArenaTeamStats Stats;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -58,7 +58,6 @@ ArenaTeam* ArenaTeamMgr::GetArenaTeamByName(const std::string& arenaTeamName) co
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
ArenaTeam* ArenaTeamMgr::GetArenaTeamByName(std::string const& arenaTeamName, const uint32 type) const
|
||||
{
|
||||
std::string search = arenaTeamName;
|
||||
@@ -91,7 +90,6 @@ ArenaTeam* ArenaTeamMgr::GetArenaTeamByCaptain(uint64 guid) const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
ArenaTeam* ArenaTeamMgr::GetArenaTeamByCaptain(uint64 guid, const uint32 type) const
|
||||
{
|
||||
for (ArenaTeamContainer::const_iterator itr = ArenaTeamStore.begin(); itr != ArenaTeamStore.end(); ++itr)
|
||||
|
||||
@@ -714,7 +714,6 @@ uint32 Battleground::GetRealRepFactionForPlayer(uint32 factionId, Player* player
|
||||
return factionId;
|
||||
}
|
||||
|
||||
|
||||
void Battleground::UpdateWorldState(uint32 Field, uint32 Value)
|
||||
{
|
||||
WorldPacket data;
|
||||
|
||||
@@ -384,7 +384,6 @@ void BattlegroundQueue::FillPlayersToBG(Battleground* bg, const int32 aliFree, c
|
||||
auto Ali_itr = m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_ALLIANCE].begin();
|
||||
for (; Ali_itr != m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_ALLIANCE].end() && m_SelectionPools[TEAM_ALLIANCE].AddGroup((*Ali_itr), aliFree); ++Ali_itr);
|
||||
|
||||
|
||||
// horde: at first fill as much as possible
|
||||
auto Horde_itr = m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_HORDE].begin();
|
||||
for (; Horde_itr != m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_HORDE].end() && m_SelectionPools[TEAM_HORDE].AddGroup((*Horde_itr), hordeFree); ++Horde_itr);
|
||||
|
||||
@@ -277,4 +277,3 @@ private:
|
||||
bool _teamScores500Disadvantage[BG_TEAMS_COUNT] {};
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -396,4 +396,3 @@ private:
|
||||
uint32 _flagCapturedObject;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -795,7 +795,6 @@ GraveyardStruct const* BattlegroundSA::GetClosestGraveyard(Player* player)
|
||||
if (!closest && GraveyardStatus[BG_SA_BEACH_GY] == player->GetTeamId())
|
||||
return sGraveyard->GetGraveyard(BG_SA_GYEntries[BG_SA_BEACH_GY]);
|
||||
|
||||
|
||||
return closest;
|
||||
}
|
||||
|
||||
|
||||
@@ -405,7 +405,6 @@ bool BattlegroundWS::SetupBattleground()
|
||||
AddObject(BG_WS_OBJECT_DOOR_H_3, BG_OBJECT_DOOR_H_3_WS_ENTRY, 949.9523f, 1422.751f, 344.9273f, 0.0f, 0, 0, 0, 1, RESPAWN_IMMEDIATELY);
|
||||
AddObject(BG_WS_OBJECT_DOOR_H_4, BG_OBJECT_DOOR_H_4_WS_ENTRY, 950.7952f, 1459.583f, 342.1523f, 0.05235988f, 0, 0, 0.02617695f, 0.9996573f, RESPAWN_IMMEDIATELY);
|
||||
|
||||
|
||||
GraveyardStruct const* sg = sGraveyard->GetGraveyard(WS_GRAVEYARD_MAIN_ALLIANCE);
|
||||
AddSpiritGuide(WS_SPIRIT_MAIN_ALLIANCE, sg->x, sg->y, sg->z, 3.124139f, TEAM_ALLIANCE);
|
||||
|
||||
|
||||
@@ -127,7 +127,6 @@ enum BG_WS_CreatureTypes
|
||||
BG_CREATURES_MAX_WS = 2
|
||||
};
|
||||
|
||||
|
||||
enum BG_WS_Objectives
|
||||
{
|
||||
WS_OBJECTIVE_CAPTURE_FLAG = 42,
|
||||
|
||||
@@ -333,4 +333,3 @@ private:
|
||||
PlayersWatchingContainer playersWatchingStore;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -124,7 +124,6 @@ Channel* ChannelMgr::GetChannel(std::string const& name, Player* player, bool pk
|
||||
return i->second;
|
||||
}
|
||||
|
||||
|
||||
uint32 ChannelMgr::_channelIdMax = 0;
|
||||
ChannelMgr::ChannelRightsMap ChannelMgr::channels_rights;
|
||||
ChannelRights ChannelMgr::channelRightsEmpty;
|
||||
|
||||
@@ -161,5 +161,4 @@ private:
|
||||
std::istringstream _iss;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -62,4 +62,3 @@ public:
|
||||
};
|
||||
//=================================================
|
||||
#endif
|
||||
|
||||
|
||||
@@ -122,4 +122,3 @@ public:
|
||||
|
||||
//==============================================================
|
||||
#endif
|
||||
|
||||
|
||||
@@ -464,8 +464,6 @@ void LoadDBCStores(const std::string& dataPath)
|
||||
if (TaxiPathEntry const* entry = sTaxiPathStore.LookupEntry(i))
|
||||
sTaxiPathSetBySource[entry->from][entry->to] = TaxiPathBySourceAndDestination(entry->ID, entry->price);
|
||||
|
||||
|
||||
|
||||
// Calculate path nodes count
|
||||
uint32 pathCount = sTaxiPathStore.GetNumRows();
|
||||
std::vector<uint32> pathLength;
|
||||
|
||||
@@ -95,4 +95,3 @@ namespace lfg
|
||||
}
|
||||
|
||||
} // namespace lfg
|
||||
|
||||
|
||||
@@ -188,7 +188,6 @@ namespace lfg
|
||||
guid[2] = guid[1];
|
||||
}
|
||||
|
||||
|
||||
guid[1] = guid[0];
|
||||
guid[0] = g;
|
||||
|
||||
@@ -479,7 +478,6 @@ namespace lfg
|
||||
std::string GetRolesString(uint8 roles);
|
||||
std::string GetStateString(LfgState state);
|
||||
|
||||
|
||||
} // namespace lfg
|
||||
|
||||
#endif
|
||||
|
||||
@@ -424,7 +424,6 @@ namespace lfg
|
||||
lockData = LFG_LOCKSTATUS_MISSING_ITEM;
|
||||
}
|
||||
|
||||
|
||||
sScriptMgr->OnInitializeLockedDungeons(player, level, lockData);
|
||||
|
||||
/* TODO VoA closed if WG is not under team control (LFG_LOCKSTATUS_RAID_LOCKED)
|
||||
|
||||
@@ -615,7 +615,6 @@ void Creature::Update(uint32 diff)
|
||||
m_moveBackwardsMovementTime = MOVE_BACKWARDS_CHECK_INTERVAL;
|
||||
}
|
||||
|
||||
|
||||
if (!IsInEvadeMode() && IsAIEnabled)
|
||||
{
|
||||
// do not allow the AI to be changed during update
|
||||
@@ -791,7 +790,6 @@ void Creature::RegenerateHealth()
|
||||
addvalue = uint32(Spirit * 0.80 * HealthIncreaseRate);
|
||||
}
|
||||
|
||||
|
||||
// Apply modifiers (if any).
|
||||
AuraEffectList const& ModPowerRegenPCTAuras = GetAuraEffectsByType(SPELL_AURA_MOD_HEALTH_REGEN_PERCENT);
|
||||
for (AuraEffectList::const_iterator i = ModPowerRegenPCTAuras.begin(); i != ModPowerRegenPCTAuras.end(); ++i)
|
||||
@@ -1364,7 +1362,6 @@ bool Creature::CreateFromProto(uint32 guidlow, uint32 Entry, uint32 vehId, const
|
||||
else
|
||||
CreateVehicleKit(vehId, Entry);
|
||||
|
||||
|
||||
if (!UpdateEntry(Entry, data))
|
||||
return false;
|
||||
|
||||
|
||||
@@ -1190,7 +1190,6 @@ GameObject* GameObject::LookupFishingHoleAround(float range)
|
||||
{
|
||||
GameObject* ok = nullptr;
|
||||
|
||||
|
||||
CellCoord p(acore::ComputeCellCoord(GetPositionX(), GetPositionY()));
|
||||
Cell cell(p);
|
||||
acore::NearestGameObjectFishingHole u_check(*this, range);
|
||||
|
||||
@@ -230,4 +230,3 @@ Item* Bag::GetItemByPos(uint8 slot) const
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -59,4 +59,3 @@ inline Item* NewItemOrBag(ItemTemplate const* proto)
|
||||
return (proto->InventoryType == INVTYPE_BAG) ? new Bag : new Item;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -188,4 +188,3 @@ uint32 GenerateEnchSuffixFactor(uint32 item_id)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,4 +13,3 @@ void LoadRandomEnchantmentsTable();
|
||||
uint32 GetItemEnchantMod(int32 entry);
|
||||
uint32 GenerateEnchSuffixFactor(uint32 item_id);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1845,7 +1845,6 @@ bool WorldObject::CanDetectStealthOf(WorldObject const* obj, bool checkAlert) co
|
||||
if (checkAlert)
|
||||
visibilityRange += (visibilityRange * 0.08f) + 1.5f;
|
||||
|
||||
|
||||
Unit const* targetUnit = obj->ToUnit();
|
||||
|
||||
// If checking for alert, and creature's visibility range is greater than aggro distance, No alert
|
||||
@@ -2623,7 +2622,6 @@ void WorldObject::GetContactPoint(const WorldObject* obj, float& x, float& y, fl
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void WorldObject::GetChargeContactPoint(const WorldObject* obj, float& x, float& y, float& z, float distance2d) const
|
||||
{
|
||||
// angle to face `obj` to `this` using distance includes size of `obj`
|
||||
@@ -2985,7 +2983,6 @@ void WorldObject::PlayDirectSound(uint32 sound_id, Player* target /*= NULL*/)
|
||||
SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
|
||||
void WorldObject::PlayDirectMusic(uint32 music_id, Player* target /*= NULL*/)
|
||||
{
|
||||
WorldPacket data(SMSG_PLAY_MUSIC, 4);
|
||||
|
||||
@@ -485,7 +485,6 @@ struct Position
|
||||
|
||||
[[nodiscard]] Position GetPosition() const { return *this; }
|
||||
|
||||
|
||||
Position::PositionXYZStreamer PositionXYZStream()
|
||||
{
|
||||
return PositionXYZStreamer(*this);
|
||||
@@ -593,7 +592,6 @@ ByteBuffer& operator >> (ByteBuffer& buf, Position::PositionXYZStreamer const& s
|
||||
ByteBuffer& operator<<(ByteBuffer& buf, Position::PositionXYZOStreamer const& streamer);
|
||||
ByteBuffer& operator >> (ByteBuffer& buf, Position::PositionXYZOStreamer const& streamer);
|
||||
|
||||
|
||||
struct MovementInfo
|
||||
{
|
||||
// common
|
||||
|
||||
@@ -142,4 +142,3 @@ void UpdateData::Clear()
|
||||
m_outOfRangeGUIDs.clear();
|
||||
m_blockCount = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,4 +55,3 @@ protected:
|
||||
void Compress(void* dst, uint32* dst_size, void* src, int src_size);
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user