refactor(Core/Misc): enforce east-const style and add codestyle check (#26492)

Co-authored-by: Ludwig <sudlud@users.noreply.github.com>
This commit is contained in:
Kitzunu
2026-07-21 06:13:51 +02:00
committed by GitHub
parent 9a9924ed43
commit 8eb009fdfc
361 changed files with 1016 additions and 980 deletions
@@ -403,7 +403,7 @@ void WorldSession::HandleArenaTeamLeaderOpcode(WorldPacket& recvData)
arenaTeam->BroadcastEvent(ERR_ARENA_TEAM_LEADER_CHANGED_SSS, ObjectGuid::Empty, 3, _player->GetName().c_str(), name, arenaTeam->GetName());
}
void WorldSession::SendArenaTeamCommandResult(uint32 teamAction, const std::string& team, const std::string& player, uint32 errorId)
void WorldSession::SendArenaTeamCommandResult(uint32 teamAction, std::string const& team, std::string const& player, uint32 errorId)
{
WorldPacket data(SMSG_ARENA_TEAM_COMMAND_RESULT, 4 + team.length() + 1 + player.length() + 1 + 4);
data << uint32(teamAction);
@@ -294,7 +294,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
return;
}
const AuctionHouseEntry* AHEntry = sAuctionMgr->GetAuctionHouseEntryFromFactionTemplate(auctioneerInfo->faction);
AuctionHouseEntry const* AHEntry = sAuctionMgr->GetAuctionHouseEntryFromFactionTemplate(auctioneerInfo->faction);
AH->houseId = AuctionHouseId(AHEntry->houseId);
}
+1 -1
View File
@@ -50,7 +50,7 @@ class Aura;
-FIX sending PartyMemberStats
*/
void WorldSession::SendPartyResult(PartyOperation operation, const std::string& member, PartyResult res, uint32 val /* = 0 */)
void WorldSession::SendPartyResult(PartyOperation operation, std::string const& member, PartyResult res, uint32 val /* = 0 */)
{
WorldPacket data(SMSG_PARTY_COMMAND_RESULT, 4 + member.size() + 1 + 4 + 4);
data << uint32(operation);
+1 -1
View File
@@ -37,7 +37,7 @@ void BuildPlayerLockDungeonBlock(WorldPacket& data, lfg::LfgLockMap const& lock)
}
}
void BuildPartyLockDungeonBlock(WorldPacket& data, const lfg::LfgLockPartyMap& lockMap)
void BuildPartyLockDungeonBlock(WorldPacket& data, lfg::LfgLockPartyMap const& lockMap)
{
data << uint8(lockMap.size());
for (lfg::LfgLockPartyMap::const_iterator it = lockMap.begin(); it != lockMap.end(); ++it)
+1 -1
View File
@@ -1088,7 +1088,7 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket)
caster->AddUnitState(UNIT_STATE_FOLLOW);
}
void WorldSession::SendPetNameInvalid(uint32 error, const std::string& name, DeclinedName* declinedName)
void WorldSession::SendPetNameInvalid(uint32 error, std::string const& name, DeclinedName* declinedName)
{
WorldPacket data(SMSG_PET_NAME_INVALID, 4 + name.size() + 1 + 1);
data << uint32(error);
+1 -1
View File
@@ -170,7 +170,7 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPacket& recvData)
ObjectGuid guid;
recvData >> guid;
const GameObjectTemplate* info = sObjectMgr->GetGameObjectTemplate(entry);
GameObjectTemplate const* info = sObjectMgr->GetGameObjectTemplate(entry);
if (info)
{
std::string Name;
+1 -1
View File
@@ -629,7 +629,7 @@ void WorldSession::HandleQueryQuestsCompleted(WorldPacket& /*recvData*/)
WorldPacket data(SMSG_QUERY_QUESTS_COMPLETED_RESPONSE, 4 + 4 * rew_count);
data << uint32(rew_count);
const RewardedQuestSet& rewQuests = _player->getRewardedQuests();
RewardedQuestSet const& rewQuests = _player->getRewardedQuests();
for (RewardedQuestSet::const_iterator itr = rewQuests.begin(); itr != rewQuests.end(); ++itr)
data << uint32(*itr);
+1 -1
View File
@@ -477,7 +477,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
// pussywizard: casting player's spells from vehicle when seat allows it
// if ANYTHING CHANGES in this function, INFORM ME BEFORE applying!!!
if (Vehicle* veh = mover->GetVehicleKit())
if (const VehicleSeatEntry* seat = veh->GetSeatForPassenger(_player))
if (VehicleSeatEntry const* seat = veh->GetSeatForPassenger(_player))
if (seat->m_flags & VEHICLE_SEAT_FLAG_CAN_ATTACK || spellInfo->Effects[EFFECT_0].Effect == SPELL_EFFECT_OPEN_LOCK /*allow looting from vehicle, but only if player has required spell (all necessary opening spells are in playercreateinfo_spell)*/)
if ((mover->IsCreature() && !mover->ToCreature()->HasSpell(spellId)) || spellInfo->IsPassive()) // the creature can't cast that spell, check player instead
{