Core: fixed typos from previous commit and kill more warnings

This commit is contained in:
joschiwald
2014-12-29 01:32:55 +01:00
parent 9ecc578cb1
commit e8f97ec80a
6 changed files with 22 additions and 15 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ inline void LoadDB2(uint32& availableDb2Locales, DB2StoreProblemList& errlist, D
{
// compatibility format and C++ structure sizes
ASSERT(DB2FileLoader::GetFormatRecordSize(storage.GetFormat()) == sizeof(T),
"Size of '%s' set by format string (" SZFMTD ") not equal size of C++ structure (%u).",
"Size of '%s' set by format string (%u) not equal size of C++ structure (" SZFMTD ").",
filename.c_str(), DB2FileLoader::GetFormatRecordSize(storage.GetFormat()), sizeof(T));
++DB2FilesCount;
+2 -2
View File
@@ -504,7 +504,7 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales, bad_dbc_files, sNameGenStore, dbcPath, "NameGen.dbc"); // 19116
for (uint32 i = 0; i < sNameGenStore.GetNumRows(); ++i)
if (NameGenEntry const* entry = sNameGenStore.LookupEntry(i))
sGenerateNamesMap[entry->Race].Contents[entry->Sex].push_back(std::string(entry->Name));
sGenerateNamesMap[entry->Race].Contents[entry->Sex].emplace_back(entry->Name);
sNameGenStore.Clear();
LoadDBC(availableDbcLocales, bad_dbc_files, sMovieStore, dbcPath, "Movie.dbc");//19116
@@ -1150,7 +1150,7 @@ std::list<uint32> GetSpellsForLevels(uint32 classId, uint32 raceMask, uint32 spe
if (specIter != sSpecializationSpellsBySpecStore.end())
{
SpecializationSpellsBySpecEntry learnSpellList = specIter->second;
for (int i = 0; i < learnSpellList.size(); i++)
for (size_t i = 0; i < learnSpellList.size(); ++i)
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(learnSpellList[i]->SpellID);
if (!spellInfo)
@@ -231,15 +231,13 @@ void WorldPackets::Spells::SpellCastRequest::Read()
_worldPacket >> movementInfo;
}
// SpellWeight
for (uint32 i = 0; i < SpellWeightCount; ++i)
{
_worldPacket.ResetBitPos();
uint32 Type = _worldPacket.ReadBits(2);
uint32 ID;
_worldPacket >> ID;
uint32 Quantity;
_worldPacket >> Quantity;
SpellWeight unused;
unused.Type = _worldPacket.ReadBits(2);
_worldPacket >> unused.ID;
_worldPacket >> unused.Quantity;
}
}
@@ -125,6 +125,13 @@ namespace WorldPackets
class SpellCastRequest final : public ClientPacket
{
public:
struct SpellWeight
{
uint32 Type = 0;
int32 ID = 0;
uint32 Quantity = 0;
};
SpellCastRequest(WorldPacket&& packet) : ClientPacket(std::move(packet))
{
ASSERT(packet.GetOpcode() == CMSG_CAST_SPELL || packet.GetOpcode() == CMSG_PET_CAST_SPELL);
+5 -3
View File
@@ -4773,7 +4773,7 @@ void Spell::TakeReagents()
// if CastItem is also spell reagent
if (castItemTemplate && castItemTemplate->GetId() == itemid)
{
for (int s = 0; s < castItemTemplate->Effects.size(); ++s)
for (uint8 s = 0; s < castItemTemplate->Effects.size(); ++s)
{
// CastItem will be used up and does not count as reagent
int32 charges = m_CastItem->GetSpellCharges(s);
@@ -6516,7 +6516,7 @@ SpellCastResult Spell::CheckItems()
if (Item* pitem = player->GetItemByEntry(item_id))
{
for (int x = 0; x < pProto->Effects.size(); ++x)
for (uint8 x = 0; x < pProto->Effects.size(); ++x)
if (pProto->Effects[x].Charges != 0 && pitem->GetSpellCharges(x) == pProto->Effects[x].Charges)
return SPELL_FAILED_ITEM_AT_MAX_CHARGES;
}
@@ -6813,7 +6813,7 @@ bool Spell::CheckEffectTarget(GameObject const* target, SpellEffectInfo const* e
return true;
}
bool Spell::CheckEffectTarget(Item const* target, SpellEffectInfo const* effect) const
bool Spell::CheckEffectTarget(Item const* /*target*/, SpellEffectInfo const* effect) const
{
if (!effect->IsEffect())
return false;
@@ -7150,6 +7150,8 @@ void Spell::SetSpellValue(SpellValueMod mod, int32 value)
case SPELLVALUE_AURA_STACK:
m_spellValue->AuraStackAmount = uint8(value);
break;
default:
break;
}
}
+3 -3
View File
@@ -912,7 +912,7 @@ void Spell::EffectTriggerRitualOfSummoning(SpellEffIndex /*effIndex*/)
m_caster->CastSpell((Unit*)NULL, spellInfo, false);
}
void Spell::EffectJump(SpellEffIndex effIndex)
void Spell::EffectJump(SpellEffIndex /*effIndex*/)
{
if (effectHandleMode != SPELL_EFFECT_HANDLE_LAUNCH_TARGET)
return;
@@ -931,7 +931,7 @@ void Spell::EffectJump(SpellEffIndex effIndex)
m_caster->GetMotionMaster()->MoveJump(x, y, z, speedXY, speedZ);
}
void Spell::EffectJumpDest(SpellEffIndex effIndex)
void Spell::EffectJumpDest(SpellEffIndex /*effIndex*/)
{
if (effectHandleMode != SPELL_EFFECT_HANDLE_LAUNCH)
return;
@@ -5641,7 +5641,7 @@ void Spell::EffectRechargeManaGem(SpellEffIndex /*effIndex*/)
if (Item* pItem = player->GetItemByEntry(item_id))
{
for (int x = 0; x < pProto->Effects.size(); ++x)
for (size_t x = 0; x < pProto->Effects.size(); ++x)
pItem->SetSpellCharges(x, pProto->Effects[x].Charges);
pItem->SetState(ITEM_CHANGED, player);
}