Core: Fixed remaining C6246: Local declaration of 'x' hides declaration of the same name in outer scope. from previous commit
This commit is contained in:
@@ -3484,7 +3484,7 @@ bool Player::AddTalent(uint32 spell_id, uint8 spec, bool learning)
|
||||
if (!rankSpellId || rankSpellId == spell_id)
|
||||
continue;
|
||||
|
||||
PlayerTalentMap::iterator itr = m_talents[spec]->find(rankSpellId);
|
||||
itr = m_talents[spec]->find(rankSpellId);
|
||||
if (itr != m_talents[spec]->end())
|
||||
itr->second->state = PLAYERSPELL_REMOVED;
|
||||
}
|
||||
@@ -4094,8 +4094,6 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
|
||||
|
||||
if (uint32 prev_id = sSpellMgr->GetPrevSpellInChain(spell_id))
|
||||
{
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id);
|
||||
|
||||
// if talent then lesser rank also talent and need learn
|
||||
if (talentCosts)
|
||||
{
|
||||
@@ -4243,8 +4241,8 @@ void Player::RemoveArenaSpellCooldowns(bool removeActivePetCooldowns)
|
||||
if (Pet* pet = GetPet())
|
||||
{
|
||||
// notify player
|
||||
for (CreatureSpellCooldowns::const_iterator itr = pet->m_CreatureSpellCooldowns.begin(); itr != pet->m_CreatureSpellCooldowns.end(); ++itr)
|
||||
SendClearCooldown(itr->first, pet);
|
||||
for (CreatureSpellCooldowns::const_iterator itr2 = pet->m_CreatureSpellCooldowns.begin(); itr2 != pet->m_CreatureSpellCooldowns.end(); ++itr2)
|
||||
SendClearCooldown(itr2->first, pet);
|
||||
|
||||
// actually clear cooldowns
|
||||
pet->m_CreatureSpellCooldowns.clear();
|
||||
@@ -4397,9 +4395,9 @@ bool Player::resetTalents(bool no_cost)
|
||||
|
||||
RemovePet(NULL, PET_SAVE_NOT_IN_SLOT, true);
|
||||
|
||||
for (uint32 i = 0; i < sTalentStore.GetNumRows(); ++i)
|
||||
for (uint32 talentId = 0; talentId < sTalentStore.GetNumRows(); ++talentId)
|
||||
{
|
||||
TalentEntry const* talentInfo = sTalentStore.LookupEntry(i);
|
||||
TalentEntry const* talentInfo = sTalentStore.LookupEntry(talentId);
|
||||
|
||||
if (!talentInfo)
|
||||
continue;
|
||||
@@ -4835,14 +4833,14 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
|
||||
{
|
||||
do
|
||||
{
|
||||
Field* fields = resultItems->Fetch();
|
||||
uint32 item_guidlow = fields[11].GetUInt32();
|
||||
uint32 item_template = fields[12].GetUInt32();
|
||||
Field* fields2 = resultItems->Fetch();
|
||||
uint32 item_guidlow = fields2[11].GetUInt32();
|
||||
uint32 item_template = fields2[12].GetUInt32();
|
||||
|
||||
ItemTemplate const* itemProto = sObjectMgr->GetItemTemplate(item_template);
|
||||
if (!itemProto)
|
||||
{
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEM_INSTANCE);
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEM_INSTANCE);
|
||||
stmt->setUInt32(0, item_guidlow);
|
||||
trans->Append(stmt);
|
||||
continue;
|
||||
@@ -15899,9 +15897,9 @@ void Player::CastedCreatureOrGO(uint32 entry, uint64 guid, uint32 spell_id)
|
||||
if (reqTarget != entry) // if entry doesn't match, check for killcredits referenced in template
|
||||
{
|
||||
CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(entry);
|
||||
for (uint8 i = 0; i < MAX_KILL_CREDIT; ++i)
|
||||
if (cinfo->KillCredit[i] == reqTarget)
|
||||
entry = cinfo->KillCredit[i];
|
||||
for (uint8 j = 0; j < MAX_KILL_CREDIT; ++j)
|
||||
if (cinfo->KillCredit[j] == reqTarget)
|
||||
entry = cinfo->KillCredit[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17538,7 +17536,7 @@ void Player::_LoadMailedItems(Mail* mail)
|
||||
{
|
||||
sLog->outError("Player %u has unknown item_template (ProtoType) in mailed items(GUID: %u template: %u) in mail (%u), deleted.", GetGUIDLow(), item_guid_low, item_template, mail->messageID);
|
||||
CharacterDatabase.PExecute("DELETE FROM mail_items WHERE item_guid = '%u'", item_guid_low);
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEM_INSTANCE);
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEM_INSTANCE);
|
||||
stmt->setUInt32(0, item_guid_low);
|
||||
CharacterDatabase.Execute(stmt);
|
||||
continue;
|
||||
@@ -20125,9 +20123,9 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_INSTANT_TAXI))
|
||||
{
|
||||
TaxiNodesEntry const* lastnode = sTaxiNodesStore.LookupEntry(nodes[nodes.size()-1]);
|
||||
TaxiNodesEntry const* lastPathNode = sTaxiNodesStore.LookupEntry(nodes[nodes.size()-1]);
|
||||
m_taxi.ClearTaxiDestinations();
|
||||
TeleportTo(lastnode->map_id, lastnode->x, lastnode->y, lastnode->z, GetOrientation());
|
||||
TeleportTo(lastPathNode->map_id, lastPathNode->x, lastPathNode->y, lastPathNode->z, GetOrientation());
|
||||
return false;
|
||||
}
|
||||
else
|
||||
@@ -24330,9 +24328,9 @@ void Player::ActivateSpec(uint8 spec)
|
||||
// Let client clear his current Actions
|
||||
SendActionButtons(2);
|
||||
// m_actionButtons.clear() is called in the next _LoadActionButtons
|
||||
for (uint32 i = 0; i < sTalentStore.GetNumRows(); ++i)
|
||||
for (uint32 talentId = 0; talentId < sTalentStore.GetNumRows(); ++talentId)
|
||||
{
|
||||
TalentEntry const* talentInfo = sTalentStore.LookupEntry(i);
|
||||
TalentEntry const* talentInfo = sTalentStore.LookupEntry(talentId);
|
||||
|
||||
if (!talentInfo)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user