mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Unit: rename several getters to follow codestyle
uint8 GetLevel()
uint8 GetLevelForTarget(WorldObject const* /*target*/)
void SetLevel(uint8 lvl)
uint8 GetRace()
uint32 GetRaceMask()
uint8 GetClass()
uint32 GetClassMask()
uint8 GetGender()
(cherry picked from commit 5c09ff51f7)
This commit is contained in:
@@ -99,7 +99,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPackets::Battleground::Batt
|
||||
return;
|
||||
|
||||
// expected bracket entry
|
||||
PVPDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel());
|
||||
PVPDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bg->GetMapId(), _player->GetLevel());
|
||||
if (!bracketEntry)
|
||||
return;
|
||||
|
||||
@@ -318,7 +318,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPackets::Battleground::Battl
|
||||
bgTypeId = bg->GetTypeID();
|
||||
|
||||
// expected bracket entry
|
||||
PVPDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel());
|
||||
PVPDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bg->GetMapId(), _player->GetLevel());
|
||||
if (!bracketEntry)
|
||||
return;
|
||||
|
||||
@@ -336,10 +336,10 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPackets::Battleground::Battl
|
||||
TC_LOG_DEBUG("bg.battleground", "Player %s (%s) has a deserter debuff, do not port him to battleground!", _player->GetName().c_str(), _player->GetGUID().ToString().c_str());
|
||||
}
|
||||
//if player don't match battleground max level, then do not allow him to enter! (this might happen when player leveled up during his waiting in queue
|
||||
if (_player->getLevel() > bg->GetMaxLevel())
|
||||
if (_player->GetLevel() > bg->GetMaxLevel())
|
||||
{
|
||||
TC_LOG_DEBUG("network", "Player %s (%s) has level (%u) higher than maxlevel (%u) of battleground (%u)! Do not port him to battleground!",
|
||||
_player->GetName().c_str(), _player->GetGUID().ToString().c_str(), _player->getLevel(), bg->GetMaxLevel(), bg->GetTypeID());
|
||||
_player->GetName().c_str(), _player->GetGUID().ToString().c_str(), _player->GetLevel(), bg->GetMaxLevel(), bg->GetTypeID());
|
||||
battlefieldPort.AcceptedInvite = false;
|
||||
}
|
||||
}
|
||||
@@ -476,7 +476,7 @@ void WorldSession::HandleRequestBattlefieldStatusOpcode(WorldPackets::Battlegrou
|
||||
continue;
|
||||
|
||||
// expected bracket entry
|
||||
PVPDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel());
|
||||
PVPDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bg->GetMapId(), _player->GetLevel());
|
||||
if (!bracketEntry)
|
||||
continue;
|
||||
|
||||
@@ -512,7 +512,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPackets::Battleground::Battl
|
||||
|
||||
BattlegroundTypeId bgTypeId = bg->GetTypeID();
|
||||
BattlegroundQueueTypeId bgQueueTypeId = BattlegroundMgr::BGQueueTypeId(bgTypeId, BattlegroundQueueIdType::Arena, true, arenatype);
|
||||
PVPDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel());
|
||||
PVPDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bg->GetMapId(), _player->GetLevel());
|
||||
if (!bracketEntry)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user