aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Entities
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2015-07-21 00:33:36 +0200
committerShauren <shauren.trinity@gmail.com>2015-07-21 00:33:36 +0200
commita22e4e121a1e54b2f4154d59623ee4a94a449176 (patch)
treed4fb01e9f32e3f146062f47638cb1e664568c0de /src/server/game/Entities
parent5987391073b0a7a257658ecef51f1df4f0f38842 (diff)
Core/Misc: Fixing warnings detected by Visual Studio 2015 compiler
Diffstat (limited to 'src/server/game/Entities')
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp6
-rw-r--r--src/server/game/Entities/Object/Object.cpp4
-rw-r--r--src/server/game/Entities/Object/Object.h2
-rw-r--r--src/server/game/Entities/Pet/Pet.cpp4
-rw-r--r--src/server/game/Entities/Player/Player.cpp6
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp14
6 files changed, 18 insertions, 18 deletions
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index dc00a7ead69..84dea103df3 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -2338,12 +2338,12 @@ void GameObject::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* t
}
else if (index == GAMEOBJECT_FLAGS)
{
- uint32 flags = m_uint32Values[GAMEOBJECT_FLAGS];
+ uint32 goFlags = m_uint32Values[GAMEOBJECT_FLAGS];
if (GetGoType() == GAMEOBJECT_TYPE_CHEST)
if (GetGOInfo()->chest.usegrouplootrules && !IsLootAllowedFor(target))
- flags |= GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE;
+ goFlags |= GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE;
- fieldBuffer << flags;
+ fieldBuffer << goFlags;
}
else if (index == GAMEOBJECT_LEVEL)
{
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index 4a819a892b5..fcbab4e8ab4 100644
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -2867,8 +2867,8 @@ void WorldObject::UpdateAreaPhase()
{
bool up = false;
uint32 phaseGroup = uint32((*itr)->GetMiscValueB());
- std::set<uint32> const& phases = sDB2Manager.GetPhasesForGroup(phaseGroup);
- for (uint32 phase : phases)
+ std::set<uint32> const& phaseIDs = sDB2Manager.GetPhasesForGroup(phaseGroup);
+ for (uint32 phase : phaseIDs)
up = SetInPhase(phase, false, true);
if (!updateNeeded && up)
updateNeeded = true;
diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h
index ff5ab997385..717410164b2 100644
--- a/src/server/game/Entities/Object/Object.h
+++ b/src/server/game/Entities/Object/Object.h
@@ -336,7 +336,7 @@ struct MovementInfo
bool HasExtraMovementFlag(uint16 flag) const { return (flags2 & flag) != 0; }
uint32 GetFallTime() const { return jump.fallTime; }
- void SetFallTime(uint32 time) { jump.fallTime = time; }
+ void SetFallTime(uint32 fallTime) { jump.fallTime = fallTime; }
void ResetTransport()
{
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index 6055402d45a..20a431d2331 100644
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -344,10 +344,10 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petEntry, uint32 petnumber, bool c
if (getPetType() == HUNTER_PET)
{
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PET_DECLINED_NAME);
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PET_DECLINED_NAME);
stmt->setUInt64(0, owner->GetGUID().GetCounter());
stmt->setUInt32(1, GetCharmInfo()->GetPetNumber());
- PreparedQueryResult result = CharacterDatabase.Query(stmt);
+ result = CharacterDatabase.Query(stmt);
if (result)
{
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 68c50d46267..4a0c7e60196 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -7279,7 +7279,7 @@ uint32 Player::GetZoneIdFromDB(ObjectGuid guid)
// stored zone is zero, use generic and slow zone detection
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_POSITION_XYZ);
stmt->setUInt64(0, guidLow);
- PreparedQueryResult result = CharacterDatabase.Query(stmt);
+ result = CharacterDatabase.Query(stmt);
if (!result)
return 0;
@@ -17713,8 +17713,8 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timeDiff)
}
else if (invalidBagMap.find(bagGuid) != invalidBagMap.end())
{
- std::map<ObjectGuid, Item*>::iterator itr = invalidBagMap.find(bagGuid);
- if (std::find(problematicItems.begin(), problematicItems.end(), itr->second) != problematicItems.end())
+ std::map<ObjectGuid, Item*>::iterator invalidBagItr = invalidBagMap.find(bagGuid);
+ if (std::find(problematicItems.begin(), problematicItems.end(), invalidBagItr->second) != problematicItems.end())
err = EQUIP_ERR_INTERNAL_BAG_ERROR;
}
else
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 54a79f3e1fd..cd80fbb587f 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -8853,12 +8853,12 @@ uint32 Unit::SpellCriticalHealingBonus(SpellInfo const* /*spellProto*/, uint32 d
return damage;
}
-uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, uint32 healamount, DamageEffectType damagetype, SpellEffectInfo const* effect, uint32 stack) const
+uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, uint32 healamount, DamageEffectType damagetype, SpellEffectInfo const* spellEffect, uint32 stack) const
{
// For totems get healing bonus from owner (statue isn't totem in fact)
if (GetTypeId() == TYPEID_UNIT && IsTotem())
if (Unit* owner = GetOwner())
- return owner->SpellHealingBonusDone(victim, spellProto, healamount, damagetype, effect, stack);
+ return owner->SpellHealingBonusDone(victim, spellProto, healamount, damagetype, spellEffect, stack);
// No bonus healing for potion spells
if (spellProto->SpellFamilyName == SPELLFAMILY_POTION)
@@ -8914,11 +8914,11 @@ uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, ui
int32 DoneAdvertisedBenefit = SpellBaseHealingBonusDone(spellProto->GetSchoolMask());
// Check for table values
- float coeff = effect->BonusCoefficient;
+ float coeff = spellEffect->BonusCoefficient;
float factorMod = 1.0f;
- if (effect->BonusCoefficientFromAP > 0.0f)
+ if (spellEffect->BonusCoefficientFromAP > 0.0f)
{
- DoneTotal += int32(effect->BonusCoefficientFromAP * stack * GetTotalAttackPowerValue(
+ DoneTotal += int32(spellEffect->BonusCoefficientFromAP * stack * GetTotalAttackPowerValue(
(spellProto->IsRangedWeaponSpell() && spellProto->DmgClass != SPELL_DAMAGE_CLASS_MELEE) ? RANGED_ATTACK : BASE_ATTACK));
}
else if (coeff <= 0.0f)
@@ -9040,7 +9040,7 @@ float Unit::SpellHealingPctDone(Unit* victim, SpellInfo const* spellProto) const
return DoneTotalMod;
}
-uint32 Unit::SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, uint32 healamount, DamageEffectType /*damagetype*/, SpellEffectInfo const* effect, uint32 stack) const
+uint32 Unit::SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, uint32 healamount, DamageEffectType /*damagetype*/, SpellEffectInfo const* spellEffect, uint32 stack) const
{
float TakenTotalMod = 1.0f;
@@ -9073,7 +9073,7 @@ uint32 Unit::SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, u
}
// Check for table values
- float coeff = effect->BonusCoefficient;
+ float coeff = spellEffect->BonusCoefficient;
float factorMod = 1.0f;
if (coeff <= 0.0f)
{