Core: Fix some warnings vs2014 ctp (no support)
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user