mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
fix(CI/Core/ArenaSpectator): clang warnings + prevent new warnings (#3317)
Co-authored by @meerd
This commit is contained in:
@@ -49,8 +49,6 @@ case $COMPILER in
|
|||||||
time sudo apt-get install -y clang-10
|
time sudo apt-get install -y clang-10
|
||||||
echo "CCOMPILERC=\"clang-10\"" >> ./conf/config.sh
|
echo "CCOMPILERC=\"clang-10\"" >> ./conf/config.sh
|
||||||
echo "CCOMPILERCXX=\"clang++-10\"" >> ./conf/config.sh
|
echo "CCOMPILERCXX=\"clang++-10\"" >> ./conf/config.sh
|
||||||
# disable -Werror for clang-10 TODO: remove when this is fixed https://github.com/azerothcore/azerothcore-wotlk/issues/3108
|
|
||||||
echo "CCUSTOMOPTIONS='-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache'" >> ./conf/config.sh
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
* )
|
* )
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ namespace ArenaSpectator
|
|||||||
{
|
{
|
||||||
if (!IS_PLAYER_GUID(targetGUID))
|
if (!IS_PLAYER_GUID(targetGUID))
|
||||||
return;
|
return;
|
||||||
SendCommand(o, "%s0x%016lX;%s=%s;", SPECTATOR_ADDON_PREFIX, targetGUID, prefix, c);
|
SendCommand(o, "%s0x%016llX;%s=%s;", SPECTATOR_ADDON_PREFIX, (unsigned long long)targetGUID, prefix, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
@@ -100,7 +100,7 @@ namespace ArenaSpectator
|
|||||||
{
|
{
|
||||||
if (!IS_PLAYER_GUID(targetGUID))
|
if (!IS_PLAYER_GUID(targetGUID))
|
||||||
return;
|
return;
|
||||||
SendCommand(o, "%s0x%016lX;%s=%u;", SPECTATOR_ADDON_PREFIX, targetGUID, prefix, t);
|
SendCommand(o, "%s0x%016llX;%s=%u;", SPECTATOR_ADDON_PREFIX, (unsigned long long)targetGUID, prefix, t);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
@@ -108,7 +108,7 @@ namespace ArenaSpectator
|
|||||||
{
|
{
|
||||||
if (!IS_PLAYER_GUID(targetGUID))
|
if (!IS_PLAYER_GUID(targetGUID))
|
||||||
return;
|
return;
|
||||||
SendCommand(o, "%s0x%016lX;%s=0x%016lX;", SPECTATOR_ADDON_PREFIX, targetGUID, prefix, t);
|
SendCommand(o, "%s0x%016llX;%s=0x%016llX;", SPECTATOR_ADDON_PREFIX, (unsigned long long)targetGUID, prefix, (unsigned long long)t);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
@@ -116,7 +116,7 @@ namespace ArenaSpectator
|
|||||||
{
|
{
|
||||||
if (!IS_PLAYER_GUID(targetGUID))
|
if (!IS_PLAYER_GUID(targetGUID))
|
||||||
return;
|
return;
|
||||||
SendCommand(o, "%s0x%016lX;%s=%u,%i;", SPECTATOR_ADDON_PREFIX, targetGUID, prefix, id, casttime);
|
SendCommand(o, "%s0x%016llX;%s=%u,%i;", SPECTATOR_ADDON_PREFIX, (unsigned long long)targetGUID, prefix, id, casttime);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
@@ -127,7 +127,7 @@ namespace ArenaSpectator
|
|||||||
if (const SpellInfo* si = sSpellMgr->GetSpellInfo(id))
|
if (const SpellInfo* si = sSpellMgr->GetSpellInfo(id))
|
||||||
if (si->SpellIconID == 1)
|
if (si->SpellIconID == 1)
|
||||||
return;
|
return;
|
||||||
SendCommand(o, "%s0x%016lX;%s=%u,%u,%u;", SPECTATOR_ADDON_PREFIX, targetGUID, prefix, id, dur, maxdur);
|
SendCommand(o, "%s0x%016llX;%s=%u,%u,%u;", SPECTATOR_ADDON_PREFIX, (unsigned long long)targetGUID, prefix, id, dur, maxdur);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
@@ -135,7 +135,7 @@ namespace ArenaSpectator
|
|||||||
{
|
{
|
||||||
if (!IS_PLAYER_GUID(targetGUID))
|
if (!IS_PLAYER_GUID(targetGUID))
|
||||||
return;
|
return;
|
||||||
SendCommand(o, "%s0x%016lX;%s=%u,%u,%i,%i,%u,%u,%u,0x%016lX;", SPECTATOR_ADDON_PREFIX, targetGUID, prefix, remove ? 1 : 0, stack, dur, maxdur, id, dispel, isDebuff ? 1 : 0, caster);
|
SendCommand(o, "%s0x%016llX;%s=%u,%u,%i,%i,%u,%u,%u,0x%016llX;", SPECTATOR_ADDON_PREFIX, (unsigned long long)targetGUID, prefix, remove ? 1 : 0, stack, dur, maxdur, id, dispel, isDebuff ? 1 : 0, (unsigned long long)caster);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandleResetCommand(Player* p)
|
void HandleResetCommand(Player* p)
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ Copied events should probably have a new owner
|
|||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
#include "SocialMgr.h"
|
#include "SocialMgr.h"
|
||||||
#include "CalendarMgr.h"
|
#include "CalendarMgr.h"
|
||||||
#include "ObjectMgr.h"
|
|
||||||
#include "ObjectAccessor.h"
|
#include "ObjectAccessor.h"
|
||||||
#include "DatabaseEnv.h"
|
#include "DatabaseEnv.h"
|
||||||
#include "GuildMgr.h"
|
#include "GuildMgr.h"
|
||||||
@@ -212,7 +211,7 @@ bool validUtf8String(WorldPacket& recvData, std::string& s, std::string action,
|
|||||||
{
|
{
|
||||||
if (!utf8::is_valid(s.begin(), s.end()))
|
if (!utf8::is_valid(s.begin(), s.end()))
|
||||||
{
|
{
|
||||||
sLog->outString("CalendarHandler: Player with guid %lu attempt to %s an event with invalid name or description (packet modification)", playerGUID, action.c_str());
|
sLog->outString("CalendarHandler: Player with guid %llu attempt to %s an event with invalid name or description (packet modification)", (unsigned long long)playerGUID, action.c_str());
|
||||||
recvData.rfinish();
|
recvData.rfinish();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
#include "ObjectMgr.h"
|
#include "ObjectMgr.h"
|
||||||
#include "Chat.h"
|
#include "Chat.h"
|
||||||
#include "AccountMgr.h"
|
#include "AccountMgr.h"
|
||||||
#include "Language.h"
|
|
||||||
#include "World.h"
|
#include "World.h"
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
#include "Opcodes.h"
|
#include "Opcodes.h"
|
||||||
|
|||||||
@@ -722,6 +722,7 @@ namespace MMAP
|
|||||||
|
|
||||||
G3D::Vector3 vert;
|
G3D::Vector3 vert;
|
||||||
for (uint32 x = 0; x < vertsX; ++x)
|
for (uint32 x = 0; x < vertsX; ++x)
|
||||||
|
{
|
||||||
for (uint32 y = 0; y < vertsY; ++y)
|
for (uint32 y = 0; y < vertsY; ++y)
|
||||||
{
|
{
|
||||||
vert = G3D::Vector3(corner.x + x * GRID_PART_SIZE, corner.y + y * GRID_PART_SIZE, data[y*vertsX + x]);
|
vert = G3D::Vector3(corner.x + x * GRID_PART_SIZE, corner.y + y * GRID_PART_SIZE, data[y*vertsX + x]);
|
||||||
@@ -730,38 +731,45 @@ namespace MMAP
|
|||||||
vert.y *= -1.f;
|
vert.y *= -1.f;
|
||||||
liqVerts.push_back(vert);
|
liqVerts.push_back(vert);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int idx1, idx2, idx3, idx4;
|
int idx1, idx2, idx3, idx4;
|
||||||
uint32 square;
|
uint32 square;
|
||||||
for (uint32 x = 0; x < tilesX; ++x)
|
for (uint32 x = 0; x < tilesX; ++x)
|
||||||
for (uint32 y = 0; y < tilesY; ++y)
|
{
|
||||||
if ((flags[x+y*tilesX] & 0x0f) != 0x0f)
|
for (uint32 y = 0; y < tilesY; ++y)
|
||||||
{
|
{
|
||||||
square = x * tilesY + y;
|
if ((flags[x + y * tilesX] & 0x0f) != 0x0f)
|
||||||
idx1 = square+x;
|
{
|
||||||
idx2 = square+1+x;
|
square = x * tilesY + y;
|
||||||
idx3 = square+tilesY+1+1+x;
|
idx1 = square + x;
|
||||||
idx4 = square+tilesY+1+x;
|
idx2 = square + 1 + x;
|
||||||
|
idx3 = square + tilesY + 1 + 1 + x;
|
||||||
|
idx4 = square + tilesY + 1 + x;
|
||||||
|
|
||||||
// top triangle
|
// top triangle
|
||||||
liqTris.push_back(idx3);
|
liqTris.push_back(idx3);
|
||||||
liqTris.push_back(idx2);
|
liqTris.push_back(idx2);
|
||||||
liqTris.push_back(idx1);
|
liqTris.push_back(idx1);
|
||||||
// bottom triangle
|
// bottom triangle
|
||||||
liqTris.push_back(idx4);
|
liqTris.push_back(idx4);
|
||||||
liqTris.push_back(idx3);
|
liqTris.push_back(idx3);
|
||||||
liqTris.push_back(idx1);
|
liqTris.push_back(idx1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
uint32 liqOffset = meshData.liquidVerts.size() / 3;
|
uint32 liqOffset = meshData.liquidVerts.size() / 3;
|
||||||
for (uint32 j = 0; j < liqVerts.size(); ++j)
|
for (uint32 j = 0; j < liqVerts.size(); ++j)
|
||||||
meshData.liquidVerts.append(liqVerts[j].y, liqVerts[j].z, liqVerts[j].x);
|
{
|
||||||
|
meshData.liquidVerts.append(liqVerts[j].y, liqVerts[j].z, liqVerts[j].x);
|
||||||
|
}
|
||||||
|
|
||||||
for (uint32 j = 0; j < liqTris.size() / 3; ++j)
|
for (uint32 j = 0; j < liqTris.size() / 3; ++j)
|
||||||
{
|
{
|
||||||
meshData.liquidTris.append(liqTris[j*3+1] + liqOffset, liqTris[j*3+2] + liqOffset, liqTris[j*3] + liqOffset);
|
meshData.liquidTris.append(liqTris[j*3+1] + liqOffset, liqTris[j*3+2] + liqOffset, liqTris[j*3] + liqOffset);
|
||||||
meshData.liquidType.append(type);
|
meshData.liquidType.append(type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user