mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-05 12:03:48 +00:00
Revert "Build/Clang: fixed 96 warnings + improved code readability"
This reverts commit a4589f71d5.
This commit is contained in:
@@ -2073,11 +2073,8 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
|
||||
|
||||
// xinef: check money
|
||||
bool valid = Player::TeamIdForRace(oldRace) == Player::TeamIdForRace(race);
|
||||
if ((level < 10 && money <= 0) ||
|
||||
(level > 10 && level <= 30 && money <= 3000000) ||
|
||||
(level > 30 && level <= 50 && money <= 10000000) ||
|
||||
(level > 50 && level <= 70 && money <= 50000000) ||
|
||||
(level > 70 && money <= 200000000))
|
||||
if (level < 10 && money <= 0 || level > 10 && level <= 30 && money <= 3000000 || level > 30 && level <= 50 && money <= 10000000 ||
|
||||
level > 50 && level <= 70 && money <= 50000000 || level > 70 && money <= 200000000)
|
||||
valid = true;
|
||||
if (!valid)
|
||||
{
|
||||
|
||||
@@ -398,7 +398,7 @@ void WorldSession::HandleLogoutRequestOpcode(WorldPacket & /*recv_data*/)
|
||||
if (uint64 lguid = GetPlayer()->GetLootGUID())
|
||||
DoLootRelease(lguid);
|
||||
|
||||
bool instantLogout = (GetSecurity() >= sWorld->getIntConfig(CONFIG_INSTANT_LOGOUT) || (GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING) && !GetPlayer()->IsInCombat())) || GetPlayer()->IsInFlight();
|
||||
bool instantLogout = (GetSecurity() >= sWorld->getIntConfig(CONFIG_INSTANT_LOGOUT) || GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING) && !GetPlayer()->IsInCombat()) || GetPlayer()->IsInFlight();
|
||||
|
||||
/// TODO: Possibly add RBAC permission to log out in combat
|
||||
bool canLogoutInCombat = GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING);
|
||||
@@ -1520,17 +1520,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!groupGuy->IsAlive() ||
|
||||
groupGuy->IsInCombat() ||
|
||||
groupGuy->GetVictim() ||
|
||||
groupGuy->m_mover != groupGuy ||
|
||||
groupGuy->IsNonMeleeSpellCast(true) ||
|
||||
(!groupGuy->GetMotionMaster()->empty() && groupGuy->GetMotionMaster()->GetCurrentMovementGeneratorType() != IDLE_MOTION_TYPE) ||
|
||||
!groupGuy->movespline->Finalized() ||
|
||||
!groupGuy->GetMap()->ToInstanceMap() ||
|
||||
!groupGuy->GetMap()->ToInstanceMap()->GetInstanceScript() ||
|
||||
groupGuy->GetMap()->ToInstanceMap()->GetInstanceScript()->IsEncounterInProgress() ||
|
||||
!groupGuy->Satisfy(sObjectMgr->GetAccessRequirement(groupGuy->GetMap()->GetId(), Difficulty(mode)), groupGuy->GetMap()->GetId(), false))
|
||||
if (!groupGuy->IsAlive() || groupGuy->IsInCombat() || groupGuy->GetVictim() || groupGuy->m_mover != groupGuy || groupGuy->IsNonMeleeSpellCast(true) || !groupGuy->GetMotionMaster()->empty() && groupGuy->GetMotionMaster()->GetCurrentMovementGeneratorType() != IDLE_MOTION_TYPE || !groupGuy->movespline->Finalized() || !groupGuy->GetMap()->ToInstanceMap() || !groupGuy->GetMap()->ToInstanceMap()->GetInstanceScript() || groupGuy->GetMap()->ToInstanceMap()->GetInstanceScript()->IsEncounterInProgress() || !groupGuy->Satisfy(sObjectMgr->GetAccessRequirement(groupGuy->GetMap()->GetId(), Difficulty(mode)), groupGuy->GetMap()->GetId(), false))
|
||||
{
|
||||
_player->SendRaidDifficulty(group != NULL);
|
||||
return;
|
||||
@@ -1554,17 +1544,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data)
|
||||
if (Player* p = itr->GetSource())
|
||||
if (p->GetGroup() != group)
|
||||
{
|
||||
if (!p->IsInWorld() ||
|
||||
!p->IsAlive() ||
|
||||
p->IsInCombat() ||
|
||||
p->GetVictim() ||
|
||||
p->m_mover != p ||
|
||||
p->IsNonMeleeSpellCast(true) ||
|
||||
(!p->GetMotionMaster()->empty() && p->GetMotionMaster()->GetCurrentMovementGeneratorType() != IDLE_MOTION_TYPE) ||
|
||||
!p->movespline->Finalized() ||
|
||||
!p->GetMap()->ToInstanceMap() ||
|
||||
!p->GetMap()->ToInstanceMap()->GetInstanceScript() ||
|
||||
p->GetMap()->ToInstanceMap()->GetInstanceScript()->IsEncounterInProgress())
|
||||
if (!p->IsInWorld() || !p->IsAlive() || p->IsInCombat() || p->GetVictim() || p->m_mover != p || p->IsNonMeleeSpellCast(true) || !p->GetMotionMaster()->empty() && p->GetMotionMaster()->GetCurrentMovementGeneratorType() != IDLE_MOTION_TYPE || !p->movespline->Finalized() || !p->GetMap()->ToInstanceMap() || !p->GetMap()->ToInstanceMap()->GetInstanceScript() || p->GetMap()->ToInstanceMap()->GetInstanceScript()->IsEncounterInProgress())
|
||||
{
|
||||
_player->SendRaidDifficulty(group != NULL);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user