Core: Random cleanup + compile fix

This commit is contained in:
Shauren
2012-02-23 13:01:16 +01:00
parent dbd8cbcfc4
commit dc28b92415
20 changed files with 114 additions and 113 deletions
@@ -4686,11 +4686,11 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
if (owner_aura)
{
owner_aura->SetStackAmount(owner_aura->GetSpellInfo()->StackAmount);
}
if (pet_aura)
{
pet_aura->SetCharges(0);
pet_aura->SetStackAmount(owner_aura->GetSpellInfo()->StackAmount);
if (pet_aura)
{
pet_aura->SetCharges(0);
pet_aura->SetStackAmount(owner_aura->GetSpellInfo()->StackAmount);
}
}
break;
}
+6 -8
View File
@@ -1126,7 +1126,7 @@ void Spell::SelectImplicitAreaTargets(SpellEffIndex effIndex, SpellImplicitTarge
case TYPEID_PLAYER:
{
Unit* unitTarget = (*itr)->ToUnit();
if (unitTarget->isAlive() || !playerCaster->isHonorOrXPTarget(unitTarget)
if (unitTarget->isAlive() || !playerCaster->isHonorOrXPTarget(unitTarget)
|| ((unitTarget->GetCreatureTypeMask() & (1 << (CREATURE_TYPE_HUMANOID-1))) == 0)
|| (unitTarget->GetDisplayId() != unitTarget->GetNativeDisplayId()))
break;
@@ -1151,7 +1151,7 @@ void Spell::SelectImplicitAreaTargets(SpellEffIndex effIndex, SpellImplicitTarge
case 51328:
// check if our target is not valid (spell can target ghoul or dead unit)
if (!(m_targets.GetUnitTarget() && m_targets.GetUnitTarget()->GetDisplayId() == m_targets.GetUnitTarget()->GetNativeDisplayId() &&
((m_targets.GetUnitTarget()->GetEntry() == 26125 && m_targets.GetUnitTarget()->GetOwnerGUID() == m_caster->GetGUID())
((m_targets.GetUnitTarget()->GetEntry() == 26125 && m_targets.GetUnitTarget()->GetOwnerGUID() == m_caster->GetGUID())
|| m_targets.GetUnitTarget()->isDead())))
{
// remove existing targets
@@ -1893,7 +1893,7 @@ void Spell::SearchChainTargets(std::list<WorldObject*>& targets, uint32 chainTar
}
// chain lightning/heal spells and similar - allow to jump at larger distance and go out of los
bool isBouncingFar = (m_spellInfo->AttributesEx4 & SPELL_ATTR4_AREA_TARGET_CHAIN
bool isBouncingFar = (m_spellInfo->AttributesEx4 & SPELL_ATTR4_AREA_TARGET_CHAIN
|| m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_NONE
|| m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MAGIC);
@@ -4505,9 +4505,7 @@ void Spell::TakeReagents()
if (m_caster->GetTypeId() != TYPEID_PLAYER)
return;
ItemTemplate const* castItemTemplate = m_CastItem
? m_CastItem->GetTemplate()
: NULL;
ItemTemplate const* castItemTemplate = m_CastItem ? m_CastItem->GetTemplate() : NULL;
// do not take reagents for these item casts
if (castItemTemplate && castItemTemplate->Flags & ITEM_PROTO_FLAG_TRIGGERED_CAST)
@@ -7230,7 +7228,7 @@ namespace Trinity
{
WorldObjectSpellTargetCheck::WorldObjectSpellTargetCheck(Unit* caster, Unit* referer, SpellInfo const* spellInfo,
SpellTargetCheckTypes selectionType, ConditionList* condList) : _caster(caster), _referer(referer), _spellInfo(spellInfo),
SpellTargetCheckTypes selectionType, ConditionList* condList) : _caster(caster), _referer(referer), _spellInfo(spellInfo),
_targetSelectionType(selectionType), _condList(condList)
{
if (condList)
@@ -7304,7 +7302,7 @@ bool WorldObjectSpellTargetCheck::operator()(WorldObject* target)
return sConditionMgr->IsObjectMeetToConditions(*_condSrcInfo, *_condList);
}
WorldObjectSpellNearbyTargetCheck::WorldObjectSpellNearbyTargetCheck(float range, Unit* caster, SpellInfo const* spellInfo,
WorldObjectSpellNearbyTargetCheck::WorldObjectSpellNearbyTargetCheck(float range, Unit* caster, SpellInfo const* spellInfo,
SpellTargetCheckTypes selectionType, ConditionList* condList)
: WorldObjectSpellTargetCheck(caster, caster, spellInfo, selectionType, condList), _range(range), _position(caster)
{