mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 10:55:43 +00:00
Revert "Build/Clang: fixed 96 warnings + improved code readability"
This reverts commit a4589f71d5.
This commit is contained in:
@@ -180,8 +180,8 @@ bool ArenaSpectator::HandleSpectatorSpectateCommand(ChatHandler* handler, char c
|
||||
}
|
||||
|
||||
bool bgPreparation = false;
|
||||
if ((!handler->GetSession()->GetSecurity() && bgmap->GetBG()->GetStatus() != STATUS_IN_PROGRESS) ||
|
||||
(handler->GetSession()->GetSecurity() && bgmap->GetBG()->GetStatus() != STATUS_WAIT_JOIN && bgmap->GetBG()->GetStatus() != STATUS_IN_PROGRESS))
|
||||
if (!handler->GetSession()->GetSecurity() && bgmap->GetBG()->GetStatus() != STATUS_IN_PROGRESS ||
|
||||
handler->GetSession()->GetSecurity() && bgmap->GetBG()->GetStatus() != STATUS_WAIT_JOIN && bgmap->GetBG()->GetStatus() != STATUS_IN_PROGRESS)
|
||||
{
|
||||
bgPreparation = true;
|
||||
handler->SendSysMessage("Arena is not in progress yet. You will be invited as soon as it starts.");
|
||||
|
||||
@@ -394,8 +394,8 @@ public:
|
||||
{
|
||||
if (pInstance && pInstance->GetData(DATA_INSTANCE_PROGRESS) == INSTANCE_PROGRESS_NONE)
|
||||
{
|
||||
if ((me->GetPositionX() > 490.0f && me->GetPositionX() < 504.0f && me->GetPositionY() > 192.0f && me->GetPositionY() < 206.0f) ||
|
||||
(me->GetPositionX() > 490.0f && me->GetPositionX() < 504.0f && me->GetPositionY() > 240.0f && me->GetPositionY() < 254.0f))
|
||||
if (me->GetPositionX() > 490.0f && me->GetPositionX() < 504.0f && me->GetPositionY() > 192.0f && me->GetPositionY() < 206.0f ||
|
||||
me->GetPositionX() > 490.0f && me->GetPositionX() < 504.0f && me->GetPositionY() > 240.0f && me->GetPositionY() < 254.0f)
|
||||
{
|
||||
isInvincible = true;
|
||||
if (SPELL_NECROLYTE_CHANNELING)
|
||||
|
||||
@@ -158,13 +158,8 @@ class boss_festergut : public CreatureScript
|
||||
else if (Player* p = target->ToPlayer())
|
||||
{
|
||||
// Gaseous Blight damage
|
||||
if ((spell->Id == 69159 ||
|
||||
spell->Id == 70136 ||
|
||||
spell->Id == 69161 ||
|
||||
spell->Id == 70139 ||
|
||||
spell->Id == 69163 ||
|
||||
(spell->Id == 70469 && p->GetQuestStatus(QUEST_RESIDUE_RENDEZVOUS_10) == QUEST_STATUS_INCOMPLETE)) ||
|
||||
((spell->Id == 70135 || spell->Id == 70138 || spell->Id == 70468 || spell->Id == 70137 || spell->Id == 70140 || spell->Id == 70470) && p->GetQuestStatus(QUEST_RESIDUE_RENDEZVOUS_25) == QUEST_STATUS_INCOMPLETE))
|
||||
if ((spell->Id == 69159 || spell->Id == 70136 || spell->Id == 69161 || spell->Id == 70139 || spell->Id == 69163 || spell->Id == 70469) && p->GetQuestStatus(QUEST_RESIDUE_RENDEZVOUS_10) == QUEST_STATUS_INCOMPLETE ||
|
||||
(spell->Id == 70135 || spell->Id == 70138 || spell->Id == 70468 || spell->Id == 70137 || spell->Id == 70140 || spell->Id == 70470) && p->GetQuestStatus(QUEST_RESIDUE_RENDEZVOUS_25) == QUEST_STATUS_INCOMPLETE)
|
||||
p->CastSpell(p, SPELL_ORANGE_BLIGHT_RESIDUE, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -982,8 +982,7 @@ class spell_putricide_unstable_experiment : public SpellScriptLoader
|
||||
std::list<Creature*> creList;
|
||||
GetCreatureListWithEntryInGrid(creList, GetCaster(), NPC_ABOMINATION_WING_MAD_SCIENTIST_STALKER, 200.0f);
|
||||
for (std::list<Creature*>::iterator itr = creList.begin(); itr != creList.end(); ++itr)
|
||||
if (((*itr)->GetPositionX() > 4350.0f && stage == 0) ||
|
||||
((*itr)->GetPositionX() < 4350.0f && stage == 1))
|
||||
if ((*itr)->GetPositionX() > 4350.0f && stage == 0 || (*itr)->GetPositionX() < 4350.0f && stage == 1)
|
||||
{
|
||||
target = (*itr);
|
||||
break;
|
||||
|
||||
@@ -881,14 +881,9 @@ public:
|
||||
if (p->getClass() == CLASS_HUNTER)
|
||||
return true;
|
||||
uint8 maxIndex = p->GetMostPointsTalentTree();
|
||||
if ((p->getClass() == CLASS_PALADIN && maxIndex >= 1) ||
|
||||
(p->getClass() == CLASS_SHAMAN && maxIndex == 1) ||
|
||||
(p->getClass() == CLASS_DRUID && maxIndex == 1))
|
||||
if (p->getClass() == CLASS_PALADIN && maxIndex >= 1 || p->getClass() == CLASS_SHAMAN && maxIndex == 1 || p->getClass() == CLASS_DRUID && maxIndex == 1)
|
||||
return true;
|
||||
if (_removeHealers == (p->getClass() == CLASS_DRUID && maxIndex == 2) ||
|
||||
(p->getClass() == CLASS_PALADIN && maxIndex == 0) ||
|
||||
(p->getClass() == CLASS_PRIEST && maxIndex <= 1) ||
|
||||
(p->getClass() == CLASS_SHAMAN && maxIndex == 2))
|
||||
if (_removeHealers == (p->getClass() == CLASS_DRUID && maxIndex == 2 || p->getClass() == CLASS_PALADIN && maxIndex == 0 || p->getClass() == CLASS_PRIEST && maxIndex <= 1 || p->getClass() == CLASS_SHAMAN && maxIndex == 2))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -377,8 +377,7 @@ public:
|
||||
return false;
|
||||
if (_maxDist && _source->GetExactDist(target) > _maxDist)
|
||||
return false;
|
||||
if ((_exclude1 && target->HasAura(_exclude1)) ||
|
||||
(_exclude2 && target->HasAura(_exclude2)))
|
||||
if (_exclude1 && target->HasAura(_exclude1) || _exclude2 && target->HasAura(_exclude2))
|
||||
return false;
|
||||
if (_reqLOS && !_source->IsWithinLOSInMap(target))
|
||||
return false;
|
||||
@@ -1239,8 +1238,7 @@ class npc_tirion_fordring_tft : public CreatureScript
|
||||
void Reset()
|
||||
{
|
||||
_events.Reset();
|
||||
if (_instance->GetBossState(DATA_THE_LICH_KING) == DONE ||
|
||||
(me->GetMap()->IsHeroic() && !_instance->GetData(DATA_LK_HC_AVAILABLE)))
|
||||
if (_instance->GetBossState(DATA_THE_LICH_KING) == DONE || me->GetMap()->IsHeroic() && !_instance->GetData(DATA_LK_HC_AVAILABLE))
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
@@ -1312,8 +1310,7 @@ class npc_tirion_fordring_tft : public CreatureScript
|
||||
void JustReachedHome()
|
||||
{
|
||||
ScriptedAI::JustReachedHome();
|
||||
if (!(_instance->GetBossState(DATA_THE_LICH_KING) == DONE ||
|
||||
(me->GetMap()->IsHeroic() && !_instance->GetData(DATA_LK_HC_AVAILABLE))))
|
||||
if (!(_instance->GetBossState(DATA_THE_LICH_KING) == DONE || me->GetMap()->IsHeroic() && !_instance->GetData(DATA_LK_HC_AVAILABLE)))
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
|
||||
}
|
||||
|
||||
@@ -3231,8 +3231,7 @@ public:
|
||||
--currPipeWP;
|
||||
}
|
||||
me->SetHomePosition(VengefulWP[currPipeWP].GetPositionX(), VengefulWP[currPipeWP].GetPositionY(), VengefulWP[currPipeWP].GetPositionZ(), me->GetOrientation());
|
||||
if ((forward && currPipeWP == 3) ||
|
||||
(!forward && currPipeWP == 2))
|
||||
if (forward && currPipeWP == 3 || !forward && currPipeWP == 2)
|
||||
me->GetMotionMaster()->MoveJump(VengefulWP[currPipeWP].GetPositionX(), VengefulWP[currPipeWP].GetPositionY(), VengefulWP[currPipeWP].GetPositionZ(), 10.0f, 6.0f, 1);
|
||||
else
|
||||
me->GetMotionMaster()->MovePoint(1, VengefulWP[currPipeWP].GetPositionX(), VengefulWP[currPipeWP].GetPositionY(), VengefulWP[currPipeWP].GetPositionZ());
|
||||
@@ -3276,8 +3275,7 @@ public:
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if ((creature->GetEntry() == NPC_GARROSH_HELLSCREAM && player->PlayerTalkClass->GetGossipMenu().GetMenuId() == 11206) ||
|
||||
(creature->GetEntry() == NPC_KING_VARIAN_WRYNN && player->PlayerTalkClass->GetGossipMenu().GetMenuId() == 11204))
|
||||
if (creature->GetEntry() == NPC_GARROSH_HELLSCREAM && player->PlayerTalkClass->GetGossipMenu().GetMenuId() == 11206 || creature->GetEntry() == NPC_KING_VARIAN_WRYNN && player->PlayerTalkClass->GetGossipMenu().GetMenuId() == 11204)
|
||||
{
|
||||
if (!player->GetGroup() || !player->GetGroup()->isRaidGroup() || !player->GetGroup()->IsLeader(player->GetGUID()))
|
||||
{
|
||||
|
||||
@@ -526,8 +526,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
return entry;
|
||||
return 0;
|
||||
case NPC_SPIRE_FROSTWYRM:
|
||||
if ((TeamIdInInstance == TEAM_ALLIANCE && data->posY < 2200.0f) ||
|
||||
(TeamIdInInstance == TEAM_HORDE && data->posY > 2200.0f))
|
||||
if (TeamIdInInstance == TEAM_ALLIANCE && data->posY < 2200.0f || TeamIdInInstance == TEAM_HORDE && data->posY > 2200.0f)
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -275,9 +275,11 @@ class boss_algalon_the_observer : public CreatureScript
|
||||
{
|
||||
if (!item) // should not happen, but checked in GetAverageItemLevel()
|
||||
return true;
|
||||
if (item->ItemLevel <= 226 || (item->ItemLevel <= 232 && (item->InventoryType == INVTYPE_SHIELD ||
|
||||
item->Class == ITEM_CLASS_WEAPON ||
|
||||
(item->Class == ITEM_CLASS_ARMOR && (item->InventoryType == INVTYPE_RELIC || item->InventoryType == INVTYPE_HOLDABLE)))))
|
||||
if (item->ItemLevel <= 226 || item->ItemLevel <= 232 && (
|
||||
item->InventoryType == INVTYPE_SHIELD ||
|
||||
item->Class == ITEM_CLASS_WEAPON ||
|
||||
item->Class == ITEM_CLASS_ARMOR && (item->InventoryType == INVTYPE_RELIC || item->InventoryType == INVTYPE_HOLDABLE)
|
||||
))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -470,8 +470,8 @@ public:
|
||||
if( faction )
|
||||
for( uint8 k=0; k<4; ++k )
|
||||
{
|
||||
if((faction == 'A' && ( k>1 || (k==1 && RAID_MODE(1,0)) )) ||
|
||||
(faction == 'H' && ( k<2 || (k==3 && RAID_MODE(1,0)) )) )
|
||||
if( faction == 'A' && ( k>1 || k==1 && RAID_MODE(1,0) ) ||
|
||||
faction == 'H' && ( k<2 || k==3 && RAID_MODE(1,0) ) )
|
||||
continue;
|
||||
|
||||
for( uint8 i=0; i<4; ++i )
|
||||
@@ -639,8 +639,7 @@ public:
|
||||
if (me->IsSummon())
|
||||
if (Unit* s = me->ToTempSummon()->GetSummoner())
|
||||
{
|
||||
if ((s->GetTypeId() == TYPEID_PLAYER && !s->HasAura(SPELL_FLASH_FREEZE_TRAPPED_PLAYER)) ||
|
||||
(s->GetTypeId() == TYPEID_UNIT && !s->HasAura(SPELL_FLASH_FREEZE_TRAPPED_NPC)))
|
||||
if (s->GetTypeId() == TYPEID_PLAYER && !s->HasAura(SPELL_FLASH_FREEZE_TRAPPED_PLAYER) || s->GetTypeId() == TYPEID_UNIT && !s->HasAura(SPELL_FLASH_FREEZE_TRAPPED_NPC))
|
||||
me->DespawnOrUnsummon(2000);
|
||||
else if (s->GetTypeId() == TYPEID_PLAYER)
|
||||
if (InstanceScript* pInstance = me->GetInstanceScript())
|
||||
|
||||
@@ -484,7 +484,7 @@ public:
|
||||
if (!summon || summon->GetEntry() != NPC_OMINOUS_CLOUD || me->GetDistance(summon) < 20)
|
||||
continue;
|
||||
|
||||
if ((!cloud || (urand(0,1) && !summon->HasAura(SPELL_SUMMON_GUARDIAN_OF_YS))))
|
||||
if ((!cloud || urand(0,1) && !summon->HasAura(SPELL_SUMMON_GUARDIAN_OF_YS)))
|
||||
cloud = summon;
|
||||
}
|
||||
|
||||
|
||||
@@ -125,8 +125,7 @@ public:
|
||||
|
||||
Creature *pGuard1 = pInstance->instance->GetCreature(pInstance->GetData64(DATA_EREKEM_GUARD_1_GUID));
|
||||
Creature *pGuard2 = pInstance->instance->GetCreature(pInstance->GetData64(DATA_EREKEM_GUARD_2_GUID));
|
||||
if ((pGuard1 && !pGuard1->IsAlive()) ||
|
||||
(pGuard2 && !pGuard2->IsAlive()))
|
||||
if (pGuard1 && !pGuard1->IsAlive() || pGuard2 && !pGuard2->IsAlive())
|
||||
{
|
||||
events.RepeatEvent(urand(3000,6000));
|
||||
break;
|
||||
|
||||
@@ -397,8 +397,7 @@ public:
|
||||
pBoss->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
pBoss->SetReactState(REACT_AGGRESSIVE);
|
||||
if ((WaveCount == 6 && m_auiEncounter[0] == DONE) ||
|
||||
(WaveCount == 12 && m_auiEncounter[1] == DONE))
|
||||
if (WaveCount == 6 && m_auiEncounter[0] == DONE || WaveCount == 12 && m_auiEncounter[1] == DONE)
|
||||
pBoss->SetLootMode(0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user