diff --git a/src/game/AuctionHouseMgr.cpp b/src/game/AuctionHouseMgr.cpp index 3af8f1f99..f8d0bba3f 100644 --- a/src/game/AuctionHouseMgr.cpp +++ b/src/game/AuctionHouseMgr.cpp @@ -557,6 +557,7 @@ AuctionHouseEntry const* AuctionHouseMgr::GetAuctionHouseEntry(Unit* unit) { case ALLIANCE: houseid = player->GetAuctionAccessMode() == 0 ? 1 : 6; break; case HORDE: houseid = player->GetAuctionAccessMode() == 0 ? 6 : 1; break; + default: break; } } } diff --git a/src/game/BattleGround/BattleGround.cpp b/src/game/BattleGround/BattleGround.cpp index d4cd2a0d7..b8cc8d28b 100644 --- a/src/game/BattleGround/BattleGround.cpp +++ b/src/game/BattleGround/BattleGround.cpp @@ -73,7 +73,7 @@ namespace MaNGOS data << ObjectGuid(targetGuid); data << uint32(strlen(text) + 1); data << text; - data << uint8(i_source ? i_source->GetChatTag() : CHAT_TAG_NONE); + data << uint8(i_source ? i_source->GetChatTag() : uint8(CHAT_TAG_NONE)); } ChatMsg i_msgtype; @@ -152,7 +152,7 @@ namespace MaNGOS data << ObjectGuid(targetGuid); data << uint32(strlen(str) + 1); data << str; - data << uint8(i_source ? i_source->GetChatTag() : CHAT_TAG_NONE); + data << uint8(i_source ? i_source->GetChatTag() : uint8(CHAT_TAG_NONE)); } private: diff --git a/src/game/Channel.cpp b/src/game/Channel.cpp index d9e923602..b5ab63c42 100644 --- a/src/game/Channel.cpp +++ b/src/game/Channel.cpp @@ -574,7 +574,7 @@ void Channel::Say(ObjectGuid p, const char* what, uint32 lang) data << ObjectGuid(p); data << uint32(messageLength); data << what; - data << uint8(plr ? plr->GetChatTag() : CHAT_TAG_NONE); + data << uint8(plr ? plr->GetChatTag() : uint8(CHAT_TAG_NONE)); SendToAll(&data, !m_players[p].IsModerator() ? p : ObjectGuid()); } diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp index a04cb7f9e..a31f64e99 100644 --- a/src/game/CharacterHandler.cpp +++ b/src/game/CharacterHandler.cpp @@ -226,6 +226,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket& recv_data) { case ALLIANCE: disabled = mask & (1 << 0); break; case HORDE: disabled = mask & (1 << 1); break; + default: break; } if (disabled) diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index bb8a92781..c27e819fb 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -434,6 +434,8 @@ void GameObject::Update(uint32 update_diff, uint32 p_time) m_UniqueUsers.clear(); SetLootState(GO_READY); return; // SetLootState and return because go is treated as "burning flag" due to GetGoAnimProgress() being 100 and would be removed on the client + default: + break; } if (!HasStaticDBSpawnData()) // Remove wild summoned after use diff --git a/src/game/MapManager.cpp b/src/game/MapManager.cpp index 12b9aa30f..306e0107b 100644 --- a/src/game/MapManager.cpp +++ b/src/game/MapManager.cpp @@ -401,7 +401,7 @@ BattleGroundMap* MapManager::CreateBattleGroundMap(uint32 id, uint32 InstanceId, PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(), bg->GetMinLevel()); - uint8 spawnMode = bracketEntry ? bracketEntry->difficulty : REGULAR_DIFFICULTY; + uint8 spawnMode = bracketEntry ? bracketEntry->difficulty : uint8(REGULAR_DIFFICULTY); BattleGroundMap* map = new BattleGroundMap(id, i_gridCleanUpDelay, InstanceId, spawnMode); MANGOS_ASSERT(map->IsBattleGroundOrArena()); diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index 1e7b29978..2aaaf8927 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -875,6 +875,11 @@ bool Pet::InitStatsForLevel(uint32 petlevel, Unit* owner) // this enables popup window (pet abandon, cancel) SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); break; + case GUARDIAN_PET: + case MINI_PET: + case PROTECTOR_PET: + default: + break; } SetLevel(petlevel); diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 72ff6f37f..eb83b1de6 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -163,6 +163,7 @@ void PlayerTaxi::InitTaxiNodesForLevel(uint32 race, uint32 chrClass, uint32 leve { case ALLIANCE: SetTaximaskNode(100); break; case HORDE: SetTaximaskNode(99); break; + default: break; } // level dependent taxi hubs if (level >= 68) @@ -2386,7 +2387,7 @@ void Player::SetGameMaster(bool on) // restore phase AuraList const& phases = GetAurasByType(SPELL_AURA_PHASE); - SetPhaseMask(!phases.empty() ? phases.front()->GetMiscValue() : PHASEMASK_NORMAL, false); + SetPhaseMask(!phases.empty() ? phases.front()->GetMiscValue() : uint32(PHASEMASK_NORMAL), false); CallForAllControlledUnits(SetGameMasterOffHelper(getFaction()), CONTROLLED_PET | CONTROLLED_TOTEMS | CONTROLLED_GUARDIANS | CONTROLLED_CHARM); @@ -10795,7 +10796,7 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16& dest, Item* pItem, bool return EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE; // if swap ignore item (equipped also) - if (InventoryResult res2 = CanEquipUniqueItem(pItem, swap ? eslot : NULL_SLOT)) + if (InventoryResult res2 = CanEquipUniqueItem(pItem, swap ? eslot : uint8(NULL_SLOT))) return res2; // check unique-equipped special item classes diff --git a/src/game/QuestHandler.cpp b/src/game/QuestHandler.cpp index 25e4f9024..12b784bf6 100644 --- a/src/game/QuestHandler.cpp +++ b/src/game/QuestHandler.cpp @@ -238,7 +238,7 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket& recv_data) if (reward >= QUEST_REWARD_CHOICES_COUNT) { - sLog.outError("Error in CMSG_QUESTGIVER_CHOOSE_REWARD - %s tried to get invalid reward (%u) (probably packet hacking)", _player->GetGuidStr().c_str(), _player->GetGUIDLow(), reward); + sLog.outError("Error in CMSG_QUESTGIVER_CHOOSE_REWARD - %s tried to get invalid reward (%u) (probably packet hacking)", _player->GetGuidStr().c_str(), reward); return; } diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 49b369bbf..7c3533ce9 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1181,7 +1181,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target) // Do triggers for unit (reflect triggers passed on hit phase for correct drop charge) if (m_canTrigger && missInfo != SPELL_MISS_REFLECT) { - caster->ProcDamageAndSpell(unitTarget, real_caster ? procAttacker : PROC_FLAG_NONE, procVictim, procEx, addhealth, m_attackType, m_spellInfo); + caster->ProcDamageAndSpell(unitTarget, real_caster ? procAttacker : uint32(PROC_FLAG_NONE), procVictim, procEx, addhealth, m_attackType, m_spellInfo); } int32 gain = caster->DealHeal(unitTarget, addhealth, m_spellInfo, crit, absorb); @@ -1216,7 +1216,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target) // Do triggers for unit (reflect triggers passed on hit phase for correct drop charge) if (m_canTrigger && missInfo != SPELL_MISS_REFLECT) - caster->ProcDamageAndSpell(unitTarget, real_caster ? procAttacker : PROC_FLAG_NONE, procVictim, procEx, damageInfo.damage, m_attackType, m_spellInfo); + caster->ProcDamageAndSpell(unitTarget, real_caster ? procAttacker : uint32(PROC_FLAG_NONE), procVictim, procEx, damageInfo.damage, m_attackType, m_spellInfo); // trigger weapon enchants for weapon based spells; exclude spells that stop attack, because may break CC if (m_caster->GetTypeId() == TYPEID_PLAYER && m_spellInfo->GetEquippedItemClass() == ITEM_CLASS_WEAPON && @@ -1261,7 +1261,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target) procEx = createProcExtendMask(&damageInfo, missInfo); // Do triggers for unit (reflect triggers passed on hit phase for correct drop charge) if (m_canTrigger && missInfo != SPELL_MISS_REFLECT) - caster->ProcDamageAndSpell(unit, real_caster ? procAttacker : PROC_FLAG_NONE, procVictim, procEx, 0, m_attackType, m_spellInfo); + caster->ProcDamageAndSpell(unit, real_caster ? procAttacker : uint32(PROC_FLAG_NONE), procVictim, procEx, 0, m_attackType, m_spellInfo); } // Call scripted function for AI if this spell is casted upon a creature diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 058637806..3d5e0baa3 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -6712,6 +6712,16 @@ void Aura::HandleShapeshiftBoosts(bool apply) case FORM_STEALTH: case FORM_CREATURECAT: case FORM_CREATUREBEAR: + case FORM_STEVES_GHOUL: + case FORM_THARONJA_SKELETON: + case FORM_TEST_OF_STRENGTH: + case FORM_BLB_PLAYER: + case FORM_SHADOW_DANCE: + case FORM_TEST: + case FORM_ZOMBIE: + case FORM_UNDEAD: + case FORM_FRENZY: + case FORM_NONE: break; } @@ -8649,7 +8659,7 @@ void Aura::HandlePhase(bool apply, bool Real) target->RemoveAurasDueToSpell(phases.front()->GetId(), GetHolder()); } - target->SetPhaseMask(apply ? GetMiscValue() : PHASEMASK_NORMAL, true); + target->SetPhaseMask(apply ? GetMiscValue() : uint32(PHASEMASK_NORMAL), true); // no-phase is also phase state so same code for apply and remove if (GetEffIndex() == EFFECT_INDEX_0 && target->GetTypeId() == TYPEID_PLAYER) { diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 6517f913e..c7b949ec9 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -7962,6 +7962,12 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect) unitTarget->CastSpell(unitTarget, 59815, true); break; } + // These are not restored + case POWER_FOCUS: + case POWER_HAPPINESS: + case POWER_RUNE: + case POWER_HEALTH: + break; } return; } diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 1e07ffbc0..fdadfa2cd 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -3746,7 +3746,7 @@ uint32 Unit::GetWeaponSkillValue(WeaponAttackType attType, Unit const* target) c return GetMaxSkillValueForLevel(); // always maximized SKILL_FERAL_COMBAT in fact // weapon skill or (unarmed for base attack) - uint32 skill = item ? item->GetSkill() : SKILL_UNARMED; + uint32 skill = item ? item->GetSkill() : uint32(SKILL_UNARMED); // in PvP use full skill instead current skill value value = (target && target->GetTypeId() == TYPEID_PLAYER) @@ -7633,7 +7633,7 @@ uint32 Unit::MeleeDamageBonusDone(Unit* pVictim, uint32 pdamage, WeaponAttackTyp bool isWeaponDamageBasedSpell = !(spellProto && (damagetype == DOT || IsSpellHaveEffect(spellProto, SPELL_EFFECT_SCHOOL_DAMAGE))); Item* pWeapon = GetTypeId() == TYPEID_PLAYER ? ((Player*)this)->GetWeaponForAttack(attType, true, false) : NULL; uint32 creatureTypeMask = pVictim->GetCreatureTypeMask(); - uint32 schoolMask = spellProto ? spellProto->SchoolMask : GetMeleeDamageSchoolMask(); + uint32 schoolMask = spellProto ? spellProto->SchoolMask : uint32(GetMeleeDamageSchoolMask()); // FLAT damage bonus auras // ======================= @@ -7888,7 +7888,7 @@ uint32 Unit::MeleeDamageBonusTaken(Unit* pCaster, uint32 pdamage, WeaponAttackTy // differentiate for weapon damage based spells bool isWeaponDamageBasedSpell = !(spellProto && (damagetype == DOT || IsSpellHaveEffect(spellProto, SPELL_EFFECT_SCHOOL_DAMAGE))); - uint32 schoolMask = spellProto ? spellProto->SchoolMask : GetMeleeDamageSchoolMask(); + uint32 schoolMask = spellProto ? spellProto->SchoolMask : uint32(GetMeleeDamageSchoolMask()); uint32 mechanicMask = spellProto ? GetAllSpellMechanicMask(spellProto) : 0; // Shred also have bonus as MECHANIC_BLEED damages diff --git a/src/game/World.cpp b/src/game/World.cpp index bbaa3f105..8209c2654 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -957,7 +957,7 @@ void World::SetInitialWorldSettings() // No SQL injection as values are treated as integers // not send custom type REALM_FFA_PVP to realm list - uint32 server_type = IsFFAPvPRealm() ? REALM_TYPE_PVP : getConfig(CONFIG_UINT32_GAME_TYPE); + uint32 server_type = IsFFAPvPRealm() ? uint32(REALM_TYPE_PVP) : getConfig(CONFIG_UINT32_GAME_TYPE); uint32 realm_zone = getConfig(CONFIG_UINT32_REALM_ZONE); LoginDatabase.PExecute("UPDATE realmlist SET icon = %u, timezone = %u WHERE id = '%u'", server_type, realm_zone, realmID); diff --git a/src/shared/Database/SqlPreparedStatement.cpp b/src/shared/Database/SqlPreparedStatement.cpp index e0dceb390..99433dd92 100644 --- a/src/shared/Database/SqlPreparedStatement.cpp +++ b/src/shared/Database/SqlPreparedStatement.cpp @@ -152,6 +152,7 @@ void SqlPlainPreparedStatement::DataToString(const SqlStmtFieldData& data, std:: m_pConn.DB().escape_string(tmp); fmt << "'" << tmp << "'"; } + case FIELD_NONE: break; break; } } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 38ec2460a..d60b5ffa2 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "12127" + #define REVISION_NR "12128" #endif // __REVISION_NR_H__