fix(Core/Misc): all GCC warnings (#3457)

This commit is contained in:
Francesco Borzì
2020-09-14 17:31:12 +02:00
committed by GitHub
parent 80b149b218
commit b61ae8abcd
34 changed files with 157 additions and 75 deletions
+2 -1
View File
@@ -169,7 +169,8 @@ public:
uint32_t statesize = SFMT_N*4; // Size of state vector uint32_t statesize = SFMT_N*4; // Size of state vector
// Fill state vector with random numbers from seed // Fill state vector with random numbers from seed
((uint32_t*)state)[0] = y; uint32_t* s = (uint32_t*)&state;
s[0] = y;
const uint32_t factor = 1812433253U;// Multiplication factor const uint32_t factor = 1812433253U;// Multiplication factor
for (i = 1; i < statesize; i++) { for (i = 1; i < statesize; i++) {
@@ -149,6 +149,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: Invoker: %s (guidlow: %u)", tempInvoker->GetName().c_str(), tempInvoker->GetGUIDLow()); sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: Invoker: %s (guidlow: %u)", tempInvoker->GetName().c_str(), tempInvoker->GetGUIDLow());
#endif #endif
bool isControlled = e.action.MoveToPos.controlled > 0;
switch (e.GetActionType()) switch (e.GetActionType())
{ {
case SMART_ACTION_TALK: case SMART_ACTION_TALK:
@@ -1933,7 +1935,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
randomPoint.m_positionZ, randomPoint.m_positionZ,
true, true,
true, true,
e.action.MoveToPos.controlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE isControlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE
); );
} }
@@ -1963,7 +1965,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (TransportBase* trans = me->GetDirectTransport()) if (TransportBase* trans = me->GetDirectTransport())
trans->CalculatePassengerPosition(dest.x, dest.y, dest.z); trans->CalculatePassengerPosition(dest.x, dest.y, dest.z);
me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, dest.x, dest.y, dest.z, true, true, e.action.MoveToPos.controlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE); me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, dest.x, dest.y, dest.z, true, true, isControlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE);
} }
else // Xinef: we can use dest.x, dest.y, dest.z to make offset else // Xinef: we can use dest.x, dest.y, dest.z to make offset
{ {
@@ -1971,7 +1973,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
target->GetPosition(x, y, z); target->GetPosition(x, y, z);
if (e.action.MoveToPos.ContactDistance > 0) if (e.action.MoveToPos.ContactDistance > 0)
target->GetContactPoint(me, x, y, z, e.action.MoveToPos.ContactDistance); target->GetContactPoint(me, x, y, z, e.action.MoveToPos.ContactDistance);
me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, x + e.target.x, y + e.target.y, z + e.target.z, e.action.MoveToPos.controlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE); me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, x + e.target.x, y + e.target.y, z + e.target.z, true, true, isControlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE);
} }
break; break;
} }
@@ -1986,7 +1988,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsCreature(*itr)) if (IsCreature(*itr))
{ {
Creature* target = (*itr)->ToCreature(); Creature* target = (*itr)->ToCreature();
target->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, e.target.x, e.target.y, e.target.z, true, true, e.action.MoveToPos.controlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE); target->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, e.target.x, e.target.y, e.target.z, true, true, isControlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE);
} }
} }
@@ -305,6 +305,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
*data << uint32(0x00000002); // count of next fields *data << uint32(0x00000002); // count of next fields
*data << uint32(((BattlegroundICScore*)itr2->second)->BasesAssaulted); // bases asssulted *data << uint32(((BattlegroundICScore*)itr2->second)->BasesAssaulted); // bases asssulted
*data << uint32(((BattlegroundICScore*)itr2->second)->BasesDefended); // bases defended *data << uint32(((BattlegroundICScore*)itr2->second)->BasesDefended); // bases defended
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
default: default:
if (BattlegroundMgr::getBgFromMap.find(bg->GetMapId()) != BattlegroundMgr::getBgFromMap.end()) if (BattlegroundMgr::getBgFromMap.find(bg->GetMapId()) != BattlegroundMgr::getBgFromMap.end())
BattlegroundMgr::getBgFromMap[bg->GetMapId()](data, itr2); BattlegroundMgr::getBgFromMap[bg->GetMapId()](data, itr2);
@@ -947,7 +948,7 @@ bool BattlegroundMgr::IsBGWeekend(BattlegroundTypeId bgTypeId)
BattlegroundTypeId BattlegroundMgr::GetRandomBG(BattlegroundTypeId bgTypeId) BattlegroundTypeId BattlegroundMgr::GetRandomBG(BattlegroundTypeId bgTypeId)
{ {
if (CreateBattlegroundData const* bgTemplate = GetBattlegroundTemplateByTypeId(bgTypeId)) if (GetBattlegroundTemplateByTypeId(bgTypeId))
{ {
std::vector<BattlegroundTypeId> ids; std::vector<BattlegroundTypeId> ids;
ids.reserve(16); ids.reserve(16);
@@ -197,6 +197,7 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
case AV_QUEST_A_BOSS1: case AV_QUEST_A_BOSS1:
case AV_QUEST_H_BOSS1: case AV_QUEST_H_BOSS1:
m_Team_QuestStatus[teamId][4] += 9; //you can turn in 10 or 1 item.. m_Team_QuestStatus[teamId][4] += 9; //you can turn in 10 or 1 item..
[[fallthrough]];
case AV_QUEST_A_BOSS2: case AV_QUEST_A_BOSS2:
case AV_QUEST_H_BOSS2: case AV_QUEST_H_BOSS2:
m_Team_QuestStatus[teamId][4]++; m_Team_QuestStatus[teamId][4]++;
@@ -813,16 +813,22 @@ bool BattlegroundSA::CanInteractWithObject(uint32 objectId)
{ {
case BG_SA_TITAN_RELIC: case BG_SA_TITAN_RELIC:
if (GateStatus[BG_SA_ANCIENT_GATE] != BG_SA_GATE_DESTROYED || GateStatus[BG_SA_YELLOW_GATE] != BG_SA_GATE_DESTROYED) if (GateStatus[BG_SA_ANCIENT_GATE] != BG_SA_GATE_DESTROYED || GateStatus[BG_SA_YELLOW_GATE] != BG_SA_GATE_DESTROYED)
{
return false; return false;
// no break }
[[fallthrough]];
case BG_SA_CENTRAL_FLAG: case BG_SA_CENTRAL_FLAG:
if (GateStatus[BG_SA_RED_GATE] != BG_SA_GATE_DESTROYED && GateStatus[BG_SA_PURPLE_GATE] != BG_SA_GATE_DESTROYED) if (GateStatus[BG_SA_RED_GATE] != BG_SA_GATE_DESTROYED && GateStatus[BG_SA_PURPLE_GATE] != BG_SA_GATE_DESTROYED)
{
return false; return false;
// no break }
[[fallthrough]];
case BG_SA_LEFT_FLAG: case BG_SA_LEFT_FLAG:
case BG_SA_RIGHT_FLAG: case BG_SA_RIGHT_FLAG:
if (GateStatus[BG_SA_GREEN_GATE] != BG_SA_GATE_DESTROYED && GateStatus[BG_SA_BLUE_GATE] != BG_SA_GATE_DESTROYED) if (GateStatus[BG_SA_GREEN_GATE] != BG_SA_GATE_DESTROYED && GateStatus[BG_SA_BLUE_GATE] != BG_SA_GATE_DESTROYED)
{
return false; return false;
}
break; break;
default: default:
ABORT(); ABORT();
@@ -29,10 +29,11 @@ void LfgGroupData::SetState(LfgState state)
case LFG_STATE_NONE: case LFG_STATE_NONE:
m_Dungeon = 0; m_Dungeon = 0;
m_KicksLeft = LFG_GROUP_MAX_KICKS; m_KicksLeft = LFG_GROUP_MAX_KICKS;
[[fallthrough]];
case LFG_STATE_FINISHED_DUNGEON: case LFG_STATE_FINISHED_DUNGEON:
case LFG_STATE_DUNGEON: case LFG_STATE_DUNGEON:
m_OldState = state; m_OldState = state;
// No break on purpose [[fallthrough]];
default: default:
m_State = state; m_State = state;
} }
@@ -524,19 +524,28 @@ void LFGMgr::JoinLfg(Player* player, uint8 roles, LfgDungeonSet& dungeons, const
{ {
case LFG_TYPE_RANDOM: case LFG_TYPE_RANDOM:
if (dungeons.size() > 1) // Only allow 1 random dungeon if (dungeons.size() > 1) // Only allow 1 random dungeon
{
joinData.result = LFG_JOIN_DUNGEON_INVALID; joinData.result = LFG_JOIN_DUNGEON_INVALID;
}
else else
{
rDungeonId = (*dungeons.begin()); rDungeonId = (*dungeons.begin());
}
// No break on purpose (Random can only be dungeon or heroic dungeon) // No break on purpose (Random can only be dungeon or heroic dungeon)
[[fallthrough]];
case LFG_TYPE_HEROIC: case LFG_TYPE_HEROIC:
case LFG_TYPE_DUNGEON: case LFG_TYPE_DUNGEON:
if (isRaid) if (isRaid)
{
joinData.result = LFG_JOIN_MIXED_RAID_DUNGEON; joinData.result = LFG_JOIN_MIXED_RAID_DUNGEON;
}
isDungeon = true; isDungeon = true;
break; break;
case LFG_TYPE_RAID: case LFG_TYPE_RAID:
if (isDungeon) if (isDungeon)
{
joinData.result = LFG_JOIN_MIXED_RAID_DUNGEON; joinData.result = LFG_JOIN_MIXED_RAID_DUNGEON;
}
isRaid = true; isRaid = true;
break; break;
default: default:
@@ -30,10 +30,10 @@ void LfgPlayerData::SetState(LfgState state)
m_Roles = 0; m_Roles = 0;
m_SelectedDungeons.clear(); m_SelectedDungeons.clear();
m_Comment = ""; m_Comment = "";
// No break on purpose [[fallthrough]];
case LFG_STATE_DUNGEON: case LFG_STATE_DUNGEON:
m_OldState = state; m_OldState = state;
// No break on purpose [[fallthrough]];
default: default:
m_State = state; m_State = state;
} }
@@ -483,6 +483,7 @@ void GameObject::Update(uint32 diff)
} }
// NO BREAK for switch (m_lootState) // NO BREAK for switch (m_lootState)
[[fallthrough]];
} }
case GO_READY: case GO_READY:
{ {
+4 -4
View File
@@ -401,10 +401,10 @@ struct Position
Position* m_pos; Position* m_pos;
}; };
float m_positionX; float m_positionX = 0;
float m_positionY; float m_positionY = 0;
float m_positionZ; float m_positionZ = 0;
float m_orientation; float m_orientation = 0;
bool operator==(Position const &a); bool operator==(Position const &a);
+4 -5
View File
@@ -10023,7 +10023,7 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid)
bf->FillInitialWorldStates(data); bf->FillInitialWorldStates(data);
break; break;
} }
// No break here, intended. [[fallthrough]];
default: default:
data << uint32(0x914) << uint32(0x0); // 7 data << uint32(0x914) << uint32(0x0); // 7
data << uint32(0x913) << uint32(0x0); // 8 data << uint32(0x913) << uint32(0x0); // 8
@@ -15823,14 +15823,14 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver,
for (uint8 i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i) for (uint8 i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
{ {
if (ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(quest->RequiredItemId[i])) if (sObjectMgr->GetItemTemplate(quest->RequiredItemId[i]))
{ {
DestroyItemCount(quest->RequiredItemId[i], quest->RequiredItemCount[i], true); DestroyItemCount(quest->RequiredItemId[i], quest->RequiredItemCount[i], true);
} }
} }
for (uint8 i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i) for (uint8 i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
{ {
if (ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(quest->ItemDrop[i])) if (sObjectMgr->GetItemTemplate(quest->ItemDrop[i]))
{ {
DestroyItemCount(quest->ItemDrop[i], quest->ItemDropQuantity[i], true); DestroyItemCount(quest->ItemDrop[i], quest->ItemDropQuantity[i], true);
} }
@@ -18968,7 +18968,6 @@ void Player::_LoadMailAsynch(PreparedQueryResult result)
{ {
do do
{ {
bool has_items = false;
Field* fields = result->Fetch(); Field* fields = result->Fetch();
if (fields[14].GetUInt32() != prevMailID) if (fields[14].GetUInt32() != prevMailID)
{ {
@@ -18983,7 +18982,7 @@ void Player::_LoadMailAsynch(PreparedQueryResult result)
m->receiver = fields[17].GetUInt32(); m->receiver = fields[17].GetUInt32();
m->subject = fields[18].GetString(); m->subject = fields[18].GetString();
m->body = fields[19].GetString(); m->body = fields[19].GetString();
has_items = fields[20].GetBool(); // has_items = fields[20].GetBool();
m->expire_time = time_t(fields[21].GetUInt32()); m->expire_time = time_t(fields[21].GetUInt32());
m->deliver_time = time_t(fields[22].GetUInt32()); m->deliver_time = time_t(fields[22].GetUInt32());
m->money = fields[23].GetUInt32(); m->money = fields[23].GetUInt32();
+8 -3
View File
@@ -2912,13 +2912,15 @@ SpellMissInfo Unit::SpellHitResult(Unit* victim, SpellInfo const* spell, bool Ca
case SPELL_DAMAGE_CLASS_NONE: case SPELL_DAMAGE_CLASS_NONE:
{ {
if (spell->SpellFamilyName) if (spell->SpellFamilyName)
{
return SPELL_MISS_NONE; return SPELL_MISS_NONE;
}
// Xinef: apply DAMAGE_CLASS_MAGIC conditions to damaging DAMAGE_CLASS_NONE spells // Xinef: apply DAMAGE_CLASS_MAGIC conditions to damaging DAMAGE_CLASS_NONE spells
for (uint8 i = EFFECT_0; i < MAX_SPELL_EFFECTS; ++i) for (uint8 i = EFFECT_0; i < MAX_SPELL_EFFECTS; ++i)
if (spell->Effects[i].Effect && spell->Effects[i].Effect != SPELL_EFFECT_SCHOOL_DAMAGE) if (spell->Effects[i].Effect && spell->Effects[i].Effect != SPELL_EFFECT_SCHOOL_DAMAGE)
if (spell->Effects[i].ApplyAuraName != SPELL_AURA_PERIODIC_DAMAGE) if (spell->Effects[i].ApplyAuraName != SPELL_AURA_PERIODIC_DAMAGE)
return SPELL_MISS_NONE; return SPELL_MISS_NONE;
// no break intended [[fallthrough]];
} }
case SPELL_DAMAGE_CLASS_MAGIC: case SPELL_DAMAGE_CLASS_MAGIC:
return MagicSpellHitResult(victim, spell); return MagicSpellHitResult(victim, spell);
@@ -6812,6 +6814,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
triggered_spell_id = isWrathSpell ? 48518 : 48517; triggered_spell_id = isWrathSpell ? 48518 : 48517;
break; break;
} }
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
} }
case SPELLFAMILY_ROGUE: case SPELLFAMILY_ROGUE:
{ {
@@ -8593,6 +8596,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
target = this; target = this;
trigger_spell_id = 22588; trigger_spell_id = 22588;
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
} }
// Bonus Healing (Crystal Spire of Karabor mace) // Bonus Healing (Crystal Spire of Karabor mace)
case 40971: case 40971:
@@ -11088,8 +11092,8 @@ float Unit::SpellTakenCritChance(Unit const* caster, SpellInfo const* spellProto
switch ((*i)->GetMiscValue()) switch ((*i)->GetMiscValue())
{ {
// Shatter // Shatter
case 911: modChance+= 16; case 911: modChance+= 16; [[fallthrough]];
case 910: modChance+= 17; case 910: modChance+= 17; [[fallthrough]];
case 849: modChance+= 17; case 849: modChance+= 17;
if (!HasAuraState(AURA_STATE_FROZEN, spellProto, caster)) if (!HasAuraState(AURA_STATE_FROZEN, spellProto, caster))
break; break;
@@ -11199,6 +11203,7 @@ float Unit::SpellTakenCritChance(Unit const* caster, SpellInfo const* spellProto
} }
break; break;
} }
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
case SPELL_DAMAGE_CLASS_RANGED: case SPELL_DAMAGE_CLASS_RANGED:
{ {
// flat aura mods // flat aura mods
+1 -1
View File
@@ -373,7 +373,7 @@ void WorldSession::SendLfgUpdateParty(lfg::LfgUpdateData const& updateData)
{ {
case lfg::LFG_UPDATETYPE_ADDED_TO_QUEUE: // Rolecheck Success case lfg::LFG_UPDATETYPE_ADDED_TO_QUEUE: // Rolecheck Success
queued = true; queued = true;
// no break on purpose [[fallthrough]];
case lfg::LFG_UPDATETYPE_PROPOSAL_BEGIN: case lfg::LFG_UPDATETYPE_PROPOSAL_BEGIN:
join = true; join = true;
break; break;
+1
View File
@@ -647,6 +647,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint16 spellid
if (pet->ToPet()) if (pet->ToPet())
pet->ToPet()->ClearCastWhenWillAvailable(); pet->ToPet()->ClearCastWhenWillAvailable();
pet->ClearInPetCombat(); pet->ClearInPetCombat();
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
case REACT_DEFENSIVE: //recovery case REACT_DEFENSIVE: //recovery
case REACT_AGGRESSIVE: //activete case REACT_AGGRESSIVE: //activete
+1 -2
View File
@@ -1031,13 +1031,12 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data)
SavedAddon const* savedAddon = AddonMgr::GetAddonInfo(addonName); SavedAddon const* savedAddon = AddonMgr::GetAddonInfo(addonName);
if (savedAddon) if (savedAddon)
{ {
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
bool match = true; bool match = true;
if (addon.CRC != savedAddon->CRC) if (addon.CRC != savedAddon->CRC)
match = false; match = false;
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (!match) if (!match)
sLog->outDetail("ADDON: %s was known, but didn't match known CRC (0x%x)!", addon.Name.c_str(), savedAddon->CRC); sLog->outDetail("ADDON: %s was known, but didn't match known CRC (0x%x)!", addon.Name.c_str(), savedAddon->CRC);
else else
@@ -593,6 +593,7 @@ void AuraEffect::CalculatePeriodic(Unit* caster, bool create, bool load)
// 3 spells have no amplitude set // 3 spells have no amplitude set
if (!m_amplitude) if (!m_amplitude)
m_amplitude = 1 * IN_MILLISECONDS; m_amplitude = 1 * IN_MILLISECONDS;
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
case SPELL_AURA_PERIODIC_DAMAGE: case SPELL_AURA_PERIODIC_DAMAGE:
case SPELL_AURA_PERIODIC_HEAL: case SPELL_AURA_PERIODIC_HEAL:
case SPELL_AURA_OBS_MOD_HEALTH: case SPELL_AURA_OBS_MOD_HEALTH:
@@ -3598,7 +3599,7 @@ void AuraEffect::HandleModMechanicImmunity(AuraApplication const* aurApp, uint8
return; return;
Unit* target = aurApp->GetTarget(); Unit* target = aurApp->GetTarget();
uint32 mechanic; uint32 mechanic = 0;
switch (GetId()) switch (GetId())
{ {
@@ -1559,6 +1559,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
case SPELLFAMILY_WARRIOR: case SPELLFAMILY_WARRIOR:
if (!caster) if (!caster)
break; break;
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
case SPELLFAMILY_WARLOCK: case SPELLFAMILY_WARLOCK:
if (!caster) if (!caster)
break; break;
@@ -2637,6 +2638,7 @@ void UnitAura::FillTargetMap(std::map<Unit*, uint8> & targets, Unit* caster)
} }
case SPELL_EFFECT_APPLY_AREA_AURA_PET: case SPELL_EFFECT_APPLY_AREA_AURA_PET:
targetList.push_back(GetUnitOwner()); targetList.push_back(GetUnitOwner());
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
case SPELL_EFFECT_APPLY_AREA_AURA_OWNER: case SPELL_EFFECT_APPLY_AREA_AURA_OWNER:
{ {
if (Unit* owner = GetUnitOwner()->GetCharmerOrOwner()) if (Unit* owner = GetUnitOwner()->GetCharmerOrOwner())
+10 -6
View File
@@ -1366,7 +1366,7 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
Map* map = m_caster->GetMap(); Map* map = m_caster->GetMap();
uint32 mapid = m_caster->GetMapId(); uint32 mapid = m_caster->GetMapId();
uint32 phasemask = m_caster->GetPhaseMask(); uint32 phasemask = m_caster->GetPhaseMask();
float destx, desty, destz, ground, startx, starty, startz, starto; float destx, desty, destz = 0, ground, startx, starty, startz, starto;
Position pos; Position pos;
Position lastpos; Position lastpos;
@@ -1379,8 +1379,8 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
if (!m_caster->HasUnitMovementFlag(MOVEMENTFLAG_FALLING) || (pos.GetPositionZ() - ground < distance)) if (!m_caster->HasUnitMovementFlag(MOVEMENTFLAG_FALLING) || (pos.GetPositionZ() - ground < distance))
{ {
float tstX, tstY, tstZ, prevX, prevY, prevZ; float tstX = 0, tstY = 0, tstZ = 0, prevX = 0, prevY = 0, prevZ = 0;
float tstZ1, tstZ2, tstZ3, destz1, destz2, destz3, srange, srange1, srange2, srange3; float tstZ1 = 0, tstZ2 = 0, tstZ3 = 0, destz1 = 0, destz2 = 0, destz3 = 0, srange = 0, srange1 = 0, srange2 = 0, srange3 = 0;
float maxtravelDistZ = 2.65f; float maxtravelDistZ = 2.65f;
float overdistance = 0.0f; float overdistance = 0.0f;
float totalpath = 0.0f; float totalpath = 0.0f;
@@ -3571,6 +3571,7 @@ void Spell::cancel(bool bySelf)
if (m_caster->ToPlayer()->NeedSendSpectatorData()) if (m_caster->ToPlayer()->NeedSendSpectatorData())
ArenaSpectator::SendCommand_Spell(m_caster->FindMap(), m_caster->GetGUID(), "SPE", m_spellInfo->Id, bySelf ? 99998 : 99999); ArenaSpectator::SendCommand_Spell(m_caster->FindMap(), m_caster->GetGUID(), "SPE", m_spellInfo->Id, bySelf ? 99998 : 99999);
} }
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
case SPELL_STATE_DELAYED: case SPELL_STATE_DELAYED:
SendInterrupted(0); SendInterrupted(0);
// xinef: fixes bugged gcd reset in some cases // xinef: fixes bugged gcd reset in some cases
@@ -6010,6 +6011,7 @@ SpellCastResult Spell::CheckCast(bool strict)
case SUMMON_CATEGORY_PET: case SUMMON_CATEGORY_PET:
if (m_caster->GetPetGUID()) if (m_caster->GetPetGUID())
return SPELL_FAILED_ALREADY_HAVE_SUMMON; return SPELL_FAILED_ALREADY_HAVE_SUMMON;
[[fallthrough]];
case SUMMON_CATEGORY_PUPPET: case SUMMON_CATEGORY_PUPPET:
if (m_caster->GetCharmGUID()) if (m_caster->GetCharmGUID())
return SPELL_FAILED_ALREADY_HAVE_CHARM; return SPELL_FAILED_ALREADY_HAVE_CHARM;
@@ -6929,6 +6931,7 @@ SpellCastResult Spell::CheckItems()
return SPELL_FAILED_DONT_REPORT; return SPELL_FAILED_DONT_REPORT;
} }
} }
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
case SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC: case SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC:
{ {
Item* targetItem = m_targets.GetItemTarget(); Item* targetItem = m_targets.GetItemTarget();
@@ -7490,8 +7493,9 @@ bool Spell::CheckEffectTarget(Unit const* target, uint32 eff) const
break; break;
/*case SPELL_EFFECT_CHARGE: /*case SPELL_EFFECT_CHARGE:
if (MMAP::MMapFactory::IsPathfindingEnabled(m_caster->FindMap())) if (MMAP::MMapFactory::IsPathfindingEnabled(m_caster->FindMap()))
break;*/ break;
// else no break intended [[fallthrough]];
*/
case SPELL_EFFECT_SUMMON_RAF_FRIEND: case SPELL_EFFECT_SUMMON_RAF_FRIEND:
if (m_caster->GetTypeId() != TYPEID_PLAYER || target->GetTypeId() != TYPEID_PLAYER) if (m_caster->GetTypeId() != TYPEID_PLAYER || target->GetTypeId() != TYPEID_PLAYER)
@@ -8444,7 +8448,7 @@ bool WorldObjectSpellTargetCheck::operator()(WorldObject* target)
case TARGET_CHECK_RAID_CLASS: case TARGET_CHECK_RAID_CLASS:
if (_referer->getClass() != unitTarget->getClass()) if (_referer->getClass() != unitTarget->getClass())
return false; return false;
// nobreak; [[fallthrough]];
case TARGET_CHECK_RAID: case TARGET_CHECK_RAID:
if (unitTarget->IsTotem()) if (unitTarget->IsTotem())
return false; return false;
+2 -1
View File
@@ -165,7 +165,7 @@ uint32 SpellImplicitTargetInfo::GetExplicitTargetMask(bool& srcSet, bool& dstSet
targetMask = TARGET_FLAG_UNIT_PASSENGER; targetMask = TARGET_FLAG_UNIT_PASSENGER;
break; break;
case TARGET_CHECK_RAID_CLASS: case TARGET_CHECK_RAID_CLASS:
// nobreak; [[fallthrough]];
default: default:
targetMask = TARGET_FLAG_UNIT; targetMask = TARGET_FLAG_UNIT;
break; break;
@@ -2232,6 +2232,7 @@ SpellSpecificType SpellInfo::LoadSpellSpecific() const
/// @workaround For non-stacking tracking spells (We need generic solution) /// @workaround For non-stacking tracking spells (We need generic solution)
if (Id == 30645) // Gas Cloud Tracking if (Id == 30645) // Gas Cloud Tracking
return SPELL_SPECIFIC_NORMAL; return SPELL_SPECIFIC_NORMAL;
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
case SPELL_AURA_TRACK_RESOURCES: case SPELL_AURA_TRACK_RESOURCES:
case SPELL_AURA_TRACK_STEALTHED: case SPELL_AURA_TRACK_STEALTHED:
return SPELL_SPECIFIC_TRACKER; return SPELL_SPECIFIC_TRACKER;
+12 -2
View File
@@ -2905,6 +2905,7 @@ void SpellMgr::LoadSpellCustomAttr()
spellInfo->Effects[j].ApplyAuraName == SPELL_AURA_PERIODIC_HEALTH_FUNNEL || spellInfo->Effects[j].ApplyAuraName == SPELL_AURA_PERIODIC_HEALTH_FUNNEL ||
spellInfo->Effects[j].ApplyAuraName == SPELL_AURA_PERIODIC_DUMMY) spellInfo->Effects[j].ApplyAuraName == SPELL_AURA_PERIODIC_DUMMY)
continue; continue;
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
default: default:
if (spellInfo->Effects[j].CalcValue() || ((spellInfo->Effects[j].Effect == SPELL_EFFECT_INTERRUPT_CAST || spellInfo->HasAttribute(SPELL_ATTR0_CU_DONT_BREAK_STEALTH)) && !spellInfo->HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY))) if (spellInfo->Effects[j].CalcValue() || ((spellInfo->Effects[j].Effect == SPELL_EFFECT_INTERRUPT_CAST || spellInfo->HasAttribute(SPELL_ATTR0_CU_DONT_BREAK_STEALTH)) && !spellInfo->HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY)))
if (spellInfo->Id != 69649 && spellInfo->Id != 71056 && spellInfo->Id != 71057 && spellInfo->Id != 71058 && spellInfo->Id != 73061 && spellInfo->Id != 73062 && spellInfo->Id != 73063 && spellInfo->Id != 73064) // Sindragosa Frost Breath if (spellInfo->Id != 69649 && spellInfo->Id != 71056 && spellInfo->Id != 71057 && spellInfo->Id != 71058 && spellInfo->Id != 73061 && spellInfo->Id != 73062 && spellInfo->Id != 73063 && spellInfo->Id != 73064) // Sindragosa Frost Breath
@@ -4375,6 +4376,7 @@ void SpellMgr::LoadDbcDataCorrections()
case 57619: // WintergraspDemolisher - Spell Hourl Boulder - EffectRadiusIndex case 57619: // WintergraspDemolisher - Spell Hourl Boulder - EffectRadiusIndex
case 57610: // Cannon (Siege Turret) case 57610: // Cannon (Siege Turret)
spellInfo->EffectRadiusIndex[1] = EFFECT_RADIUS_25_YARDS; // SPELL_EFFECT_WMO_DAMAGE spellInfo->EffectRadiusIndex[1] = EFFECT_RADIUS_25_YARDS; // SPELL_EFFECT_WMO_DAMAGE
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
case 51422: // WintergraspCannon - Spell Fire Cannon - EffectRadiusIndex case 51422: // WintergraspCannon - Spell Fire Cannon - EffectRadiusIndex
spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_10_YARDS; // SPELL_EFFECT_SCHOOL_DAMAGE spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_10_YARDS; // SPELL_EFFECT_SCHOOL_DAMAGE
break; break;
@@ -4787,7 +4789,7 @@ void SpellMgr::LoadDbcDataCorrections()
case 56430: case 56430:
spellInfo->Effect[0] = SPELL_EFFECT_TRIGGER_MISSILE; spellInfo->Effect[0] = SPELL_EFFECT_TRIGGER_MISSILE;
spellInfo->EffectTriggerSpell[0] = 56429; spellInfo->EffectTriggerSpell[0] = 56429;
// no break intended [[fallthrough]];
case 56429: case 56429:
spellInfo->EffectImplicitTargetA[0] = TARGET_DEST_DEST; spellInfo->EffectImplicitTargetA[0] = TARGET_DEST_DEST;
spellInfo->EffectImplicitTargetB[0] = 0; spellInfo->EffectImplicitTargetB[0] = 0;
@@ -5157,7 +5159,7 @@ void SpellMgr::LoadDbcDataCorrections()
spellInfo->EffectImplicitTargetA[1] = TARGET_UNIT_TARGET_ANY; spellInfo->EffectImplicitTargetA[1] = TARGET_UNIT_TARGET_ANY;
spellInfo->EffectImplicitTargetB[1] = TARGET_DEST_TARGET_ANY; spellInfo->EffectImplicitTargetB[1] = TARGET_DEST_TARGET_ANY;
spellInfo->Effect[1] = 0; spellInfo->Effect[1] = 0;
// no break intended [[fallthrough]];
case 66317: case 66317:
spellInfo->Attributes |= SPELL_ATTR0_STOP_ATTACK_TARGET; spellInfo->Attributes |= SPELL_ATTR0_STOP_ATTACK_TARGET;
spellInfo->AttributesEx |= SPELL_ATTR1_NO_THREAT; spellInfo->AttributesEx |= SPELL_ATTR1_NO_THREAT;
@@ -5254,6 +5256,7 @@ void SpellMgr::LoadDbcDataCorrections()
spellInfo->EffectImplicitTargetA[0] = 6; spellInfo->EffectImplicitTargetA[0] = 6;
spellInfo->EffectImplicitTargetB[0] = 0; spellInfo->EffectImplicitTargetB[0] = 0;
spellInfo->Effect[1] = 0; spellInfo->Effect[2] = 0; spellInfo->Effect[1] = 0; spellInfo->Effect[2] = 0;
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
case 65767: // light surge 0 case 65767: // light surge 0
spellInfo->excludeTargetAuraSpell = 65686; spellInfo->excludeTargetAuraSpell = 65686;
break; break;
@@ -5262,6 +5265,7 @@ void SpellMgr::LoadDbcDataCorrections()
spellInfo->EffectImplicitTargetA[0] = 6; spellInfo->EffectImplicitTargetA[0] = 6;
spellInfo->EffectImplicitTargetB[0] = 0; spellInfo->EffectImplicitTargetB[0] = 0;
spellInfo->Effect[1] = 0; spellInfo->Effect[2] = 0; spellInfo->Effect[1] = 0; spellInfo->Effect[2] = 0;
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
case 67274: // light surge 1 case 67274: // light surge 1
spellInfo->excludeTargetAuraSpell = 67222; spellInfo->excludeTargetAuraSpell = 67222;
break; break;
@@ -5270,6 +5274,7 @@ void SpellMgr::LoadDbcDataCorrections()
spellInfo->EffectImplicitTargetA[0] = 6; spellInfo->EffectImplicitTargetA[0] = 6;
spellInfo->EffectImplicitTargetB[0] = 0; spellInfo->EffectImplicitTargetB[0] = 0;
spellInfo->Effect[1] = 0; spellInfo->Effect[2] = 0; spellInfo->Effect[1] = 0; spellInfo->Effect[2] = 0;
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
case 67275: // light surge 2 case 67275: // light surge 2
spellInfo->excludeTargetAuraSpell = 67223; spellInfo->excludeTargetAuraSpell = 67223;
break; break;
@@ -5278,6 +5283,7 @@ void SpellMgr::LoadDbcDataCorrections()
spellInfo->EffectImplicitTargetA[0] = 6; spellInfo->EffectImplicitTargetA[0] = 6;
spellInfo->EffectImplicitTargetB[0] = 0; spellInfo->EffectImplicitTargetB[0] = 0;
spellInfo->Effect[1] = 0; spellInfo->Effect[2] = 0; spellInfo->Effect[1] = 0; spellInfo->Effect[2] = 0;
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
case 67276: // light surge 3 case 67276: // light surge 3
spellInfo->excludeTargetAuraSpell = 67224; spellInfo->excludeTargetAuraSpell = 67224;
break; break;
@@ -5286,6 +5292,7 @@ void SpellMgr::LoadDbcDataCorrections()
spellInfo->EffectImplicitTargetA[0] = 6; spellInfo->EffectImplicitTargetA[0] = 6;
spellInfo->EffectImplicitTargetB[0] = 0; spellInfo->EffectImplicitTargetB[0] = 0;
spellInfo->Effect[1] = 0; spellInfo->Effect[2] = 0; spellInfo->Effect[1] = 0; spellInfo->Effect[2] = 0;
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
case 65769: // dark surge 0 case 65769: // dark surge 0
spellInfo->excludeTargetAuraSpell = 65684; spellInfo->excludeTargetAuraSpell = 65684;
break; break;
@@ -5294,6 +5301,7 @@ void SpellMgr::LoadDbcDataCorrections()
spellInfo->EffectImplicitTargetA[0] = 6; spellInfo->EffectImplicitTargetA[0] = 6;
spellInfo->EffectImplicitTargetB[0] = 0; spellInfo->EffectImplicitTargetB[0] = 0;
spellInfo->Effect[1] = 0; spellInfo->Effect[2] = 0; spellInfo->Effect[1] = 0; spellInfo->Effect[2] = 0;
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
case 67265: // dark surge 1 case 67265: // dark surge 1
spellInfo->excludeTargetAuraSpell = 67176; spellInfo->excludeTargetAuraSpell = 67176;
break; break;
@@ -5302,6 +5310,7 @@ void SpellMgr::LoadDbcDataCorrections()
spellInfo->EffectImplicitTargetA[0] = 6; spellInfo->EffectImplicitTargetA[0] = 6;
spellInfo->EffectImplicitTargetB[0] = 0; spellInfo->EffectImplicitTargetB[0] = 0;
spellInfo->Effect[1] = 0; spellInfo->Effect[2] = 0; spellInfo->Effect[1] = 0; spellInfo->Effect[2] = 0;
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
case 67266: // dark surge 2 case 67266: // dark surge 2
spellInfo->excludeTargetAuraSpell = 67177; spellInfo->excludeTargetAuraSpell = 67177;
break; break;
@@ -5310,6 +5319,7 @@ void SpellMgr::LoadDbcDataCorrections()
spellInfo->EffectImplicitTargetA[0] = 6; spellInfo->EffectImplicitTargetA[0] = 6;
spellInfo->EffectImplicitTargetB[0] = 0; spellInfo->EffectImplicitTargetB[0] = 0;
spellInfo->Effect[1] = 0; spellInfo->Effect[2] = 0; spellInfo->Effect[1] = 0; spellInfo->Effect[2] = 0;
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
case 67267: // dark surge 3 case 67267: // dark surge 3
spellInfo->excludeTargetAuraSpell = 67178; spellInfo->excludeTargetAuraSpell = 67178;
break; break;
+2 -1
View File
@@ -210,6 +210,7 @@ bool Weather::UpdateWeather()
if (!sWorld->SendZoneMessage(m_zone, &data)) if (!sWorld->SendZoneMessage(m_zone, &data))
return false; return false;
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
///- Log the event ///- Log the event
char const* wthstr; char const* wthstr;
switch (state) switch (state)
@@ -255,7 +256,7 @@ bool Weather::UpdateWeather()
wthstr = "fine"; wthstr = "fine";
break; break;
} }
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDetail("Change the weather of zone %u to %s.", m_zone, wthstr); sLog->outDetail("Change the weather of zone %u to %s.", m_zone, wthstr);
#endif #endif
sScriptMgr->OnWeatherChange(this, state, m_grade); sScriptMgr->OnWeatherChange(this, state, m_grade);
+1
View File
@@ -198,6 +198,7 @@ public:
banReturn = sBan->BanAccountByPlayerName(nameOrIP, durationStr, reasonStr, handler->GetSession() ? handler->GetSession()->GetPlayerName() : ""); banReturn = sBan->BanAccountByPlayerName(nameOrIP, durationStr, reasonStr, handler->GetSession() ? handler->GetSession()->GetPlayerName() : "");
break; break;
case BAN_IP: case BAN_IP:
default:
banReturn = sBan->BanIP(nameOrIP, durationStr, reasonStr, handler->GetSession() ? handler->GetSession()->GetPlayerName() : ""); banReturn = sBan->BanIP(nameOrIP, durationStr, reasonStr, handler->GetSession() ? handler->GetSession()->GetPlayerName() : "");
break; break;
} }
@@ -53,8 +53,10 @@ public:
break; break;
case NPC_NIGHTBANE: case NPC_NIGHTBANE:
m_uiNightBaneGUID = creature->GetGUID(); m_uiNightBaneGUID = creature->GetGUID();
break;
case NPC_RELAY: case NPC_RELAY:
m_uiRelayGUID = creature->GetGUID(); m_uiRelayGUID = creature->GetGUID();
break;
} }
} }
+3 -2
View File
@@ -408,8 +408,8 @@ public:
{ {
allowQuest = true; allowQuest = true;
eventStarted = 1; eventStarted = 1;
float x, y, z, o; float x = 0, y = 0, z = 0, o = 0;
uint32 path; uint32 path = 0;
GetInitXYZ(x, y, z, o, path); GetInitXYZ(x, y, z, o, path);
if (Creature* cr = me->SummonCreature(NPC_SHADE_OF_HORSEMAN, x, y, z, o, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000)) if (Creature* cr = me->SummonCreature(NPC_SHADE_OF_HORSEMAN, x, y, z, o, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000))
{ {
@@ -602,6 +602,7 @@ class npc_hallows_end_soh : public CreatureScript
case 235434: x = 360.9f; y = -4735.5f; z = 11.773f; break; case 235434: x = 360.9f; y = -4735.5f; z = 11.773f; break;
case 235435: x = 2229.4f; y = 263.1f; z = 36.13f; break; case 235435: x = 2229.4f; y = 263.1f; z = 36.13f; break;
case 235436: x = 9532.9f; y = -6833.8f; z = 18.5f; break; case 235436: x = 9532.9f; y = -6833.8f; z = 18.5f; break;
default: x = 0; y = 0; z = 0; break;
} }
} }
@@ -238,8 +238,11 @@ public:
{ {
instance->LoadGrid(instancePositions[2].GetPositionX(), instancePositions[2].GetPositionY()); instance->LoadGrid(instancePositions[2].GetPositionX(), instancePositions[2].GetPositionY());
if (Creature* drake = instance->SummonCreature(NPC_LIEUTENANT_DRAKE, instancePositions[2])) if (Creature* drake = instance->SummonCreature(NPC_LIEUTENANT_DRAKE, instancePositions[2]))
{
drake->AI()->Talk(0); drake->AI()->Talk(0);
} }
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
}
case EVENT_THRALL_REPOSITION: case EVENT_THRALL_REPOSITION:
{ {
if (Creature* thrall = instance->GetCreature(_thrallGUID)) if (Creature* thrall = instance->GetCreature(_thrallGUID))
@@ -173,6 +173,7 @@ class boss_hadronox : public CreatureScript
break; break;
case EVENT_HADRONOX_MOVE4: case EVENT_HADRONOX_MOVE4:
me->CastSpell(me, SPELL_WEB_FRONT_DOORS, true); me->CastSpell(me, SPELL_WEB_FRONT_DOORS, true);
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
case EVENT_HADRONOX_MOVE1: case EVENT_HADRONOX_MOVE1:
case EVENT_HADRONOX_MOVE2: case EVENT_HADRONOX_MOVE2:
case EVENT_HADRONOX_MOVE3: case EVENT_HADRONOX_MOVE3:
@@ -227,8 +227,10 @@ class boss_halion : public CreatureScript
case NPC_METEOR_STRIKE_FLAME: case NPC_METEOR_STRIKE_FLAME:
if (Is25ManRaid() && IsHeroic() && roll_chance_i(90) && summons.GetEntryCount(NPC_LIVING_EMBER) < _livingEmberCount + 12) if (Is25ManRaid() && IsHeroic() && roll_chance_i(90) && summons.GetEntryCount(NPC_LIVING_EMBER) < _livingEmberCount + 12)
if (Creature* ember = me->SummonCreature(NPC_LIVING_EMBER, *summon, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1000)) if (Creature* ember = me->SummonCreature(NPC_LIVING_EMBER, *summon, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1000))
{
ember->SetVisible(false); ember->SetVisible(false);
// no break }
[[fallthrough]];
case NPC_METEOR_STRIKE_NORTH: case NPC_METEOR_STRIKE_NORTH:
case NPC_METEOR_STRIKE_SOUTH: case NPC_METEOR_STRIKE_SOUTH:
case NPC_METEOR_STRIKE_WEST: case NPC_METEOR_STRIKE_WEST:
@@ -523,7 +523,9 @@ public:
break; break;
case ACTION_STOP_LK_FIGHT: case ACTION_STOP_LK_FIGHT:
if (!IsDuringLKFight) if (!IsDuringLKFight)
{
break; break;
}
instance->LoadGrid(LeaderEscapePos.GetPositionX(), LeaderEscapePos.GetPositionY()); instance->LoadGrid(LeaderEscapePos.GetPositionX(), LeaderEscapePos.GetPositionY());
if (Creature* c = instance->GetCreature(NPC_LeaderGUID)) if (Creature* c = instance->GetCreature(NPC_LeaderGUID))
{ {
@@ -568,7 +570,7 @@ public:
IsDuringLKFight = false; IsDuringLKFight = false;
outroTimer = 0; outroTimer = 0;
outroStep = 0; outroStep = 0;
// no break intended [[fallthrough]];
case ACTION_DELETE_ICE_WALL: case ACTION_DELETE_ICE_WALL:
HandleGameObject(GO_IceWallGUID, true); HandleGameObject(GO_IceWallGUID, true);
GO_IceWallGUID = 0; GO_IceWallGUID = 0;
@@ -130,11 +130,11 @@ public:
n2->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY1H); n2->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY1H);
} }
// TODO This spell check is invalid // TODO This spell check is invalid
if (SPELL_NECROLYTE_CHANNELING) // if (SPELL_NECROLYTE_CHANNELING)
{ // {
n1->RemoveAura(SPELL_NECROLYTE_CHANNELING); n1->RemoveAura(SPELL_NECROLYTE_CHANNELING);
n2->RemoveAura(SPELL_NECROLYTE_CHANNELING); n2->RemoveAura(SPELL_NECROLYTE_CHANNELING);
} // }
for (SummonList::iterator itr = summons.begin(); itr != summons.end(); ++itr) for (SummonList::iterator itr = summons.begin(); itr != summons.end(); ++itr)
if (Creature* c = pInstance->instance->GetCreature(*itr)) if (Creature* c = pInstance->instance->GetCreature(*itr))
@@ -401,16 +401,20 @@ public:
isInvincible = true; isInvincible = true;
// TODO This spell check is invalid // TODO This spell check is invalid
if (SPELL_NECROLYTE_CHANNELING) // if (SPELL_NECROLYTE_CHANNELING)
me->CastSpell(me, SPELL_NECROLYTE_CHANNELING, false); me->CastSpell(me, SPELL_NECROLYTE_CHANNELING, false);
if (me->GetPositionY() < 206.0f) if (me->GetPositionY() < 206.0f)
{
pInstance->SetData64(DATA_NECROLYTE_1_GUID, me->GetGUID()); pInstance->SetData64(DATA_NECROLYTE_1_GUID, me->GetGUID());
}
else else
{
pInstance->SetData64(DATA_NECROLYTE_2_GUID, me->GetGUID()); pInstance->SetData64(DATA_NECROLYTE_2_GUID, me->GetGUID());
} }
} }
} }
}
void MovementInform(uint32 type, uint32 id) void MovementInform(uint32 type, uint32 id)
{ {
@@ -421,7 +425,7 @@ public:
void EnterCombat(Unit* /*who*/) void EnterCombat(Unit* /*who*/)
{ {
// TODO This spell check is invalid // TODO This spell check is invalid
if (SPELL_NECROLYTE_CHANNELING) // if (SPELL_NECROLYTE_CHANNELING)
me->RemoveAura(SPELL_NECROLYTE_CHANNELING); me->RemoveAura(SPELL_NECROLYTE_CHANNELING);
events.Reset(); events.Reset();
events.RescheduleEvent(1, 0); events.RescheduleEvent(1, 0);
@@ -1101,7 +1101,7 @@ class instance_icecrown_citadel : public InstanceMapScript
loot->SetLootRecipient(deathbringer->GetLootRecipient()); loot->SetLootRecipient(deathbringer->GetLootRecipient());
loot->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE | GO_FLAG_NODESPAWN); loot->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE | GO_FLAG_NODESPAWN);
} }
// no break [[fallthrough]];
case NOT_STARTED: case NOT_STARTED:
if (GameObject* teleporter = instance->GetGameObject(SaurfangTeleportGUID)) if (GameObject* teleporter = instance->GetGameObject(SaurfangTeleportGUID))
{ {
@@ -1460,8 +1460,10 @@ class instance_icecrown_citadel : public InstanceMapScript
{ {
case DATA_THE_LICH_KING: case DATA_THE_LICH_KING:
if (GetBossState(DATA_PROFESSOR_PUTRICIDE) != DONE) if (GetBossState(DATA_PROFESSOR_PUTRICIDE) != DONE)
{
return false; return false;
// no break }
[[fallthrough]];
case DATA_PROFESSOR_PUTRICIDE: case DATA_PROFESSOR_PUTRICIDE:
if (GetBossState(DATA_FESTERGUT) != DONE || GetBossState(DATA_ROTFACE) != DONE) if (GetBossState(DATA_FESTERGUT) != DONE || GetBossState(DATA_ROTFACE) != DONE)
return false; return false;
@@ -1479,8 +1481,10 @@ class instance_icecrown_citadel : public InstanceMapScript
{ {
case DATA_THE_LICH_KING: case DATA_THE_LICH_KING:
if (GetBossState(DATA_BLOOD_QUEEN_LANA_THEL) != DONE) if (GetBossState(DATA_BLOOD_QUEEN_LANA_THEL) != DONE)
{
return false; return false;
// no break }
[[fallthrough]];
case DATA_BLOOD_QUEEN_LANA_THEL: case DATA_BLOOD_QUEEN_LANA_THEL:
if (GetBossState(DATA_BLOOD_PRINCE_COUNCIL) != DONE) if (GetBossState(DATA_BLOOD_PRINCE_COUNCIL) != DONE)
return false; return false;
@@ -1498,13 +1502,19 @@ class instance_icecrown_citadel : public InstanceMapScript
{ {
case DATA_THE_LICH_KING: case DATA_THE_LICH_KING:
if (GetBossState(DATA_SINDRAGOSA) != DONE) if (GetBossState(DATA_SINDRAGOSA) != DONE)
{
return false; return false;
// no break }
[[fallthrough]];
case DATA_SINDRAGOSA: case DATA_SINDRAGOSA:
if (GetBossState(DATA_VALITHRIA_DREAMWALKER) != DONE) if (GetBossState(DATA_VALITHRIA_DREAMWALKER) != DONE)
{
return false; return false;
}
if (GetBossState(DATA_SINDRAGOSA_GAUNTLET) != DONE) if (GetBossState(DATA_SINDRAGOSA_GAUNTLET) != DONE)
{
return false; return false;
}
break; break;
default: default:
break; break;
@@ -1526,20 +1536,28 @@ class instance_icecrown_citadel : public InstanceMapScript
case DATA_ROTFACE: case DATA_ROTFACE:
case DATA_FESTERGUT: case DATA_FESTERGUT:
if (GetBossState(DATA_DEATHBRINGER_SAURFANG) != DONE) if (GetBossState(DATA_DEATHBRINGER_SAURFANG) != DONE)
{
return false; return false;
// no break }
[[fallthrough]];
case DATA_DEATHBRINGER_SAURFANG: case DATA_DEATHBRINGER_SAURFANG:
if (GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != DONE) if (GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != DONE)
{
return false; return false;
// no break }
[[fallthrough]];
case DATA_ICECROWN_GUNSHIP_BATTLE: case DATA_ICECROWN_GUNSHIP_BATTLE:
if (GetBossState(DATA_LADY_DEATHWHISPER) != DONE) if (GetBossState(DATA_LADY_DEATHWHISPER) != DONE)
{
return false; return false;
// no break }
[[fallthrough]];
case DATA_LADY_DEATHWHISPER: case DATA_LADY_DEATHWHISPER:
if (GetBossState(DATA_LORD_MARROWGAR) != DONE) if (GetBossState(DATA_LORD_MARROWGAR) != DONE)
{
return false; return false;
// no break }
[[fallthrough]];
case DATA_LORD_MARROWGAR: case DATA_LORD_MARROWGAR:
default: default:
break; break;
@@ -1751,8 +1769,10 @@ class instance_icecrown_citadel : public InstanceMapScript
break; break;
case EVENT_ENEMY_GUNSHIP_COMBAT: case EVENT_ENEMY_GUNSHIP_COMBAT:
if (Creature* captain = source->FindNearestCreature(TeamIdInInstance == TEAM_HORDE ? NPC_IGB_HIGH_OVERLORD_SAURFANG : NPC_IGB_MURADIN_BRONZEBEARD, 200.0f)) if (Creature* captain = source->FindNearestCreature(TeamIdInInstance == TEAM_HORDE ? NPC_IGB_HIGH_OVERLORD_SAURFANG : NPC_IGB_MURADIN_BRONZEBEARD, 200.0f))
{
captain->AI()->DoAction(ACTION_ENEMY_GUNSHIP_TALK); captain->AI()->DoAction(ACTION_ENEMY_GUNSHIP_TALK);
// no break; }
[[fallthrough]];
case EVENT_PLAYERS_GUNSHIP_SPAWN: case EVENT_PLAYERS_GUNSHIP_SPAWN:
case EVENT_PLAYERS_GUNSHIP_COMBAT: case EVENT_PLAYERS_GUNSHIP_COMBAT:
if (GameObject* go = source->ToGameObject()) if (GameObject* go = source->ToGameObject())
@@ -1278,6 +1278,7 @@ public:
break; break;
} }
[[fallthrough]];
} }
case EVENT_MISS: case EVENT_MISS:
{ {
@@ -45,7 +45,7 @@ class instance_gruuls_lair : public InstanceMapScript
{ {
case NPC_MAULGAR: case NPC_MAULGAR:
_maulgarGUID = creature->GetGUID(); _maulgarGUID = creature->GetGUID();
// no break; [[fallthrough]];
case NPC_KROSH_FIREHAND: case NPC_KROSH_FIREHAND:
case NPC_OLM_THE_SUMMONER: case NPC_OLM_THE_SUMMONER:
case NPC_KIGGLER_THE_CRAZED: case NPC_KIGGLER_THE_CRAZED:
@@ -508,7 +508,7 @@ public:
_events.Update(diff); _events.Update(diff);
switch (uint32 eventId = _events.ExecuteEvent()) switch (_events.ExecuteEvent())
{ {
case EVENT_SPELL_ISHANAH_HOLY_SMITE: case EVENT_SPELL_ISHANAH_HOLY_SMITE:
me->CastSpell(me->GetVictim(), HOLY_SMITE_ISHANAH, false); me->CastSpell(me->GetVictim(), HOLY_SMITE_ISHANAH, false);
+2 -2
View File
@@ -45,7 +45,7 @@ struct AchievementEntry
struct AchievementCategoryEntry struct AchievementCategoryEntry
{ {
uint32 ID; // 0 int32 ID; // 0
int32 parentCategory; // 1 -1 for main category int32 parentCategory; // 1 -1 for main category
//char *name[16]; // 2-17 //char *name[16]; // 2-17
//uint32 name_flags; // 18 //uint32 name_flags; // 18
@@ -1075,7 +1075,7 @@ struct HolidaysEntry
//uint32 holidayDescriptionId; // 50 m_holidayDescriptionID (HolidayDescriptions.dbc) //uint32 holidayDescriptionId; // 50 m_holidayDescriptionID (HolidayDescriptions.dbc)
char* TextureFilename; // 51 m_textureFilename char* TextureFilename; // 51 m_textureFilename
uint32 Priority; // 52 m_priority uint32 Priority; // 52 m_priority
uint32 CalendarFilterType; // 53 m_calendarFilterType (-1 = Fishing Contest, 0 = Unk, 1 = Darkmoon Festival, 2 = Yearly holiday) int32 CalendarFilterType; // 53 m_calendarFilterType (-1 = Fishing Contest, 0 = Unk, 1 = Darkmoon Festival, 2 = Yearly holiday)
//uint32 flags; // 54 m_flags (0 = Darkmoon Faire, Fishing Contest and Wotlk Launch, rest is 1) //uint32 flags; // 54 m_flags (0 = Darkmoon Faire, Fishing Contest and Wotlk Launch, rest is 1)
}; };