Core: Fix compile without PCH and fix some warnings

This commit is contained in:
Spp
2011-08-03 11:23:08 +02:00
parent 8572d5d0e9
commit e7327e7e94
30 changed files with 51 additions and 43 deletions
+1 -1
View File
@@ -99,7 +99,7 @@ class Aura
uint32 GetId() const{ return GetSpellInfo()->Id; }
uint64 GetCastItemGUID() const { return m_castItemGuid; }
uint64 const GetCasterGUID() const { return m_casterGuid; }
uint64 GetCasterGUID() const { return m_casterGuid; }
Unit* GetCaster() const;
WorldObject * GetOwner() const { return m_owner; }
Unit* GetUnitOwner() const { ASSERT(GetType() == UNIT_AURA_TYPE); return (Unit*)m_owner; }
+2 -2
View File
@@ -2376,7 +2376,7 @@ void Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur)
break;
default:
sLog->outError("SPELL (caster[type: %u; guidlow: %u], spell: %u): unhandled spell target (%u)",
m_caster->GetTypeId(), m_caster->GetGUIDLow(), m_spellInfo->Id, cur);
m_caster->GetTypeId(), m_caster->GetGUIDLow(), m_spellInfo->Id, cur.GetTarget());
break;
}
break;
@@ -5758,7 +5758,7 @@ bool Spell::CanAutoCast(Unit* target)
return false; //target invalid
}
SpellCastResult Spell::CheckRange(bool strict)
SpellCastResult Spell::CheckRange(bool /*strict*/)
{
Unit* target = m_targets.GetUnitTarget();
float max_range = m_caster->GetSpellMaxRangeForTarget(target, m_spellInfo);
+1 -1
View File
@@ -281,7 +281,7 @@ void Spell::EffectInstaKill(SpellEffIndex /*effIndex*/)
m_caster->DealDamage(unitTarget, unitTarget->GetHealth(), NULL, NODAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
}
void Spell::EffectEnvirinmentalDMG(SpellEffIndex effIndex)
void Spell::EffectEnvirinmentalDMG(SpellEffIndex /*effIndex*/)
{
if (!unitTarget || !unitTarget->isAlive())
return;
+4 -2
View File
@@ -514,7 +514,8 @@ uint32 SpellMgr::GetLastSpellInChain(uint32 spell_id) const
uint32 SpellMgr::GetNextSpellInChain(uint32 spell_id) const
{
if (SpellChainNode const* node = GetSpellChainNode(spell_id))
return node->next ? node->next->Id : NULL;
if (node->next)
return node->next->Id;
return 0;
}
@@ -522,7 +523,8 @@ uint32 SpellMgr::GetNextSpellInChain(uint32 spell_id) const
uint32 SpellMgr::GetPrevSpellInChain(uint32 spell_id) const
{
if (SpellChainNode const* node = GetSpellChainNode(spell_id))
return node->prev ? node->prev->Id : NULL;
if (node->prev)
return node->prev->Id;
return 0;
}
+1 -1
View File
@@ -713,7 +713,7 @@ uint32 AuraScript::GetId() const
return m_aura->GetId();
}
uint64 const AuraScript::GetCasterGUID() const
uint64 AuraScript::GetCasterGUID() const
{
return m_aura->GetCasterGUID();
}
+1 -1
View File
@@ -585,7 +585,7 @@ class AuraScript : public _SpellScript
uint32 GetId() const;
// returns guid of object which casted the aura (m_originalCaster of the Spell class)
uint64 const GetCasterGUID() const;
uint64 GetCasterGUID() const;
// returns unit which casted the aura or NULL if not avalible (caster logged out for example)
Unit* GetCaster() const;
// returns object on which aura was casted, target for non-area auras, area aura source for area auras