aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2014-07-11 20:08:35 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2014-07-11 20:08:35 +0200
commit29e0538624c5106381cda23c2672c6941f08022a (patch)
treeae02a73d1875623303d24c49e2f5e358472bb233
parentb62ee5eea2a48b0498a9c9cc23715df317778543 (diff)
Core: Fix some warnings vs2014 ctp (no support)
-rw-r--r--src/server/game/Battlefield/Zones/BattlefieldWG.cpp5
-rw-r--r--src/server/game/Battlefield/Zones/BattlefieldWG.h8
-rw-r--r--src/server/game/DungeonFinding/LFGMgr.cpp1
-rw-r--r--src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp10
-rw-r--r--src/server/scripts/Spells/spell_druid.cpp5
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp4
-rw-r--r--src/server/scripts/Spells/spell_paladin.cpp5
7 files changed, 20 insertions, 18 deletions
diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
index 41539b9cda6..55f74e44930 100644
--- a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
+++ b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
@@ -682,8 +682,9 @@ void BattlefieldWG::PromotePlayer(Player* killer)
{
if (!m_isActive)
return;
+ Aura* aur = NULL;
// Updating rank of player
- if (Aura* aur = killer->GetAura(SPELL_RECRUIT))
+ if (aur = killer->GetAura(SPELL_RECRUIT))
{
if (aur->GetStackAmount() >= 5)
{
@@ -694,7 +695,7 @@ void BattlefieldWG::PromotePlayer(Player* killer)
else
killer->CastSpell(killer, SPELL_RECRUIT, true);
}
- else if (Aura* aur = killer->GetAura(SPELL_CORPORAL))
+ else if (aur = killer->GetAura(SPELL_CORPORAL))
{
if (aur->GetStackAmount() >= 5)
{
diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.h b/src/server/game/Battlefield/Zones/BattlefieldWG.h
index 3a64458c48b..c01e6eb22ee 100644
--- a/src/server/game/Battlefield/Zones/BattlefieldWG.h
+++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h
@@ -1277,10 +1277,10 @@ struct BfWGGameObjectBuilding
for (uint8 i = 0; i < AttackTowers[towerid - 4].nbObject; i++)
{
WintergraspObjectPositionData gobData = AttackTowers[towerid - 4].GameObject[i];
- if (GameObject* go = m_WG->SpawnGameObject(gobData.entryHorde, gobData.x, gobData.y, gobData.z, gobData.o))
- m_GameObjectList[TEAM_HORDE].insert(go->GetGUID());
- if (GameObject* go = m_WG->SpawnGameObject(gobData.entryAlliance, gobData.x, gobData.y, gobData.z, gobData.o))
- m_GameObjectList[TEAM_ALLIANCE].insert(go->GetGUID());
+ if (GameObject* goHorde = m_WG->SpawnGameObject(gobData.entryHorde, gobData.x, gobData.y, gobData.z, gobData.o))
+ m_GameObjectList[TEAM_HORDE].insert(goHorde->GetGUID());
+ if (GameObject* goAlliance = m_WG->SpawnGameObject(gobData.entryAlliance, gobData.x, gobData.y, gobData.z, gobData.o))
+ m_GameObjectList[TEAM_ALLIANCE].insert(goAlliance->GetGUID());
}
// Spawn associate npc bottom
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp
index 7c01e8e9a3f..a24b3e3878a 100644
--- a/src/server/game/DungeonFinding/LFGMgr.cpp
+++ b/src/server/game/DungeonFinding/LFGMgr.cpp
@@ -355,7 +355,6 @@ void LFGMgr::Update(uint32 diff)
if (m_QueueTimer > LFG_QUEUEUPDATE_INTERVAL)
{
m_QueueTimer = 0;
- time_t currTime = time(NULL);
for (LfgQueueContainer::iterator it = QueuesStore.begin(); it != QueuesStore.end(); ++it)
it->second.UpdateQueueTimers(currTime);
}
diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
index ecb28a5b0cb..04be688d8aa 100644
--- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
+++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
@@ -148,9 +148,9 @@ public:
if (Player* target = ObjectAccessor::GetPlayer(*me, PlayerGUID))
AttackStart(target);
- switchFactionIfAlive(instance, ENTRY_RAVEN);
- switchFactionIfAlive(instance, ENTRY_ORO);
- switchFactionIfAlive(instance, ENTRY_MURTA);
+ switchFactionIfAlive(ENTRY_RAVEN);
+ switchFactionIfAlive(ENTRY_ORO);
+ switchFactionIfAlive(ENTRY_MURTA);
}
postGossipStep++;
}
@@ -185,9 +185,9 @@ public:
Text_Timer = 0;
}
- void switchFactionIfAlive(InstanceScript* instance, uint32 entry)
+ void switchFactionIfAlive(uint32 entry)
{
- if (Creature* crew = instance->instance->GetCreature(instance->GetData64(entry)))
+ if (Creature* crew = ObjectAccessor::GetCreature(*me, instance->GetData64(entry)))
if (crew->IsAlive())
crew->setFaction(FACTION_HOSTILE);
}
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp
index e466c15d417..8b629f96f22 100644
--- a/src/server/scripts/Spells/spell_druid.cpp
+++ b/src/server/scripts/Spells/spell_druid.cpp
@@ -574,14 +574,15 @@ class spell_dru_rip : public SpellScriptLoader
if (Unit* caster = GetCaster())
{
+ AuraEffect const* idol = NULL;
// 0.01 * $AP * cp
uint8 cp = caster->ToPlayer()->GetComboPoints();
// Idol of Feral Shadows. Can't be handled as SpellMod due its dependency from CPs
- if (AuraEffect const* idol = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_FERAL_SHADOWS, EFFECT_0))
+ if (idol = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_FERAL_SHADOWS, EFFECT_0))
amount += cp * idol->GetAmount();
// Idol of Worship. Can't be handled as SpellMod due its dependency from CPs
- else if (AuraEffect const* idol = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_WORSHIP, EFFECT_0))
+ else if (idol = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_WORSHIP, EFFECT_0))
amount += cp * idol->GetAmount();
amount += int32(CalculatePct(caster->GetTotalAttackPowerValue(BASE_ATTACK), cp));
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 4c72d790059..d72e2000e84 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -449,9 +449,9 @@ class spell_gen_bonked : public SpellScriptLoader
target->CastSpell(target, SPELL_FOAM_SWORD_DEFEAT, true);
target->RemoveAurasDueToSpell(SPELL_BONKED);
- if (Aura const* aura = target->GetAura(SPELL_ON_GUARD))
+ if (Aura const* auraOnGuard = target->GetAura(SPELL_ON_GUARD))
{
- if (Item* item = target->GetItemByGuid(aura->GetCastItemGUID()))
+ if (Item* item = target->GetItemByGuid(auraOnGuard->GetCastItemGUID()))
target->DestroyItemCount(item->GetEntry(), 1, true);
}
}
diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp
index 447cb645e76..9ec9a056b69 100644
--- a/src/server/scripts/Spells/spell_paladin.cpp
+++ b/src/server/scripts/Spells/spell_paladin.cpp
@@ -1201,6 +1201,7 @@ class spell_pal_sacred_shield : public SpellScriptLoader
{
if (Unit* caster = GetCaster())
{
+ AuraEffect const* dampening = NULL;
// +75.00% from sp bonus
float bonus = CalculatePct(caster->SpellBaseHealingBonusDone(GetSpellInfo()->GetSchoolMask()), 75.0f);
@@ -1211,10 +1212,10 @@ class spell_pal_sacred_shield : public SpellScriptLoader
amount += int32(bonus);
// Arena - Dampening
- if (AuraEffect const* dampening = caster->GetAuraEffect(SPELL_GENERIC_ARENA_DAMPENING, EFFECT_0))
+ if (dampening = caster->GetAuraEffect(SPELL_GENERIC_ARENA_DAMPENING, EFFECT_0))
AddPct(amount, dampening->GetAmount());
// Battleground - Dampening
- else if (AuraEffect const* dampening = caster->GetAuraEffect(SPELL_GENERIC_BATTLEGROUND_DAMPENING, EFFECT_0))
+ else if (dampening = caster->GetAuraEffect(SPELL_GENERIC_BATTLEGROUND_DAMPENING, EFFECT_0))
AddPct(amount, dampening->GetAmount());
}
}