mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
Code Style (game + scripts only):
"!=" --> " != " (when needed) " !=" --> " !=" "!= " --> "!= " --HG-- branch : trunk
This commit is contained in:
@@ -1052,7 +1052,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
||||
SpellMissInfo missInfo = target->missCondition;
|
||||
|
||||
// Need init unitTarget by default unit (can changed in code on reflect)
|
||||
// Or on missInfo!=SPELL_MISS_NONE unitTarget undefined (but need in trigger subsystem)
|
||||
// Or on missInfo != SPELL_MISS_NONE unitTarget undefined (but need in trigger subsystem)
|
||||
unitTarget = unit;
|
||||
|
||||
// Reset damage/healing counter
|
||||
@@ -1068,7 +1068,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
||||
|
||||
//Spells with this flag cannot trigger if effect is casted on self
|
||||
// Slice and Dice, relentless strikes, eviscerate
|
||||
bool canEffectTrigger = unitTarget->CanProc() && (m_spellInfo->AttributesEx4 & (SPELL_ATTR_EX4_CANT_PROC_FROM_SELFCAST) ? m_caster!=unitTarget : true);
|
||||
bool canEffectTrigger = unitTarget->CanProc() && (m_spellInfo->AttributesEx4 & (SPELL_ATTR_EX4_CANT_PROC_FROM_SELFCAST) ? m_caster != unitTarget : true);
|
||||
Unit * spellHitTarget = NULL;
|
||||
|
||||
if (missInfo == SPELL_MISS_NONE) // In case spell hit target, do all effect on that target
|
||||
@@ -4108,7 +4108,7 @@ void Spell::TakePower()
|
||||
for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
if (ihit->targetGUID == targetGUID)
|
||||
{
|
||||
if (ihit->missCondition != SPELL_MISS_NONE && ihit->missCondition != SPELL_MISS_MISS/* && ihit->targetGUID!=m_caster->GetGUID()*/)
|
||||
if (ihit->missCondition != SPELL_MISS_NONE && ihit->missCondition != SPELL_MISS_MISS/* && ihit->targetGUID != m_caster->GetGUID()*/)
|
||||
hit = false;
|
||||
if (ihit->missCondition != SPELL_MISS_NONE)
|
||||
{
|
||||
@@ -4399,7 +4399,7 @@ void Spell::HandleEffects(Unit *pUnitTarget,Item *pItemTarget,GameObject *pGOTar
|
||||
|
||||
void Spell::TriggerSpell()
|
||||
{
|
||||
for (TriggerSpells::iterator si=m_TriggerSpells.begin(); si!=m_TriggerSpells.end(); ++si)
|
||||
for (TriggerSpells::iterator si=m_TriggerSpells.begin(); si != m_TriggerSpells.end(); ++si)
|
||||
{
|
||||
Spell* spell = new Spell(m_caster, (*si), true, m_originalCasterGUID, m_selfContainer, true);
|
||||
spell->prepare(&m_targets); // use original spell original targets
|
||||
@@ -4791,7 +4791,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate(); // Really don't know what is that???
|
||||
|
||||
Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck u_check(*m_caster,i_spellST->second.targetEntry,i_spellST->second.type!=SPELL_TARGET_TYPE_DEAD,range);
|
||||
Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck u_check(*m_caster,i_spellST->second.targetEntry,i_spellST->second.type != SPELL_TARGET_TYPE_DEAD,range);
|
||||
Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(m_caster, p_Creature, u_check);
|
||||
|
||||
TypeContainerVisitor<Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck>, GridTypeMapContainer > grid_creature_searcher(searcher);
|
||||
@@ -4818,7 +4818,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
{
|
||||
m_targets.setDst(creatureScriptTarget->GetPositionX(),creatureScriptTarget->GetPositionY(),creatureScriptTarget->GetPositionZ());
|
||||
|
||||
if (m_spellInfo->EffectImplicitTargetA[j] == TARGET_DST_NEARBY_ENTRY && m_spellInfo->EffectImplicitTargetB[j] == 0 && m_spellInfo->Effect[j]!=SPELL_EFFECT_PERSISTENT_AREA_AURA)
|
||||
if (m_spellInfo->EffectImplicitTargetA[j] == TARGET_DST_NEARBY_ENTRY && m_spellInfo->EffectImplicitTargetB[j] == 0 && m_spellInfo->Effect[j] != SPELL_EFFECT_PERSISTENT_AREA_AURA)
|
||||
AddUnitTarget(creatureScriptTarget, j);
|
||||
}
|
||||
// store explicit target for TARGET_UNIT_NEARBY_ENTRY
|
||||
@@ -4833,7 +4833,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
{
|
||||
m_targets.setDst(goScriptTarget->GetPositionX(),goScriptTarget->GetPositionY(),goScriptTarget->GetPositionZ());
|
||||
|
||||
if (m_spellInfo->EffectImplicitTargetA[j] == TARGET_DST_NEARBY_ENTRY && m_spellInfo->EffectImplicitTargetB[j] == 0 && m_spellInfo->Effect[j]!=SPELL_EFFECT_PERSISTENT_AREA_AURA)
|
||||
if (m_spellInfo->EffectImplicitTargetA[j] == TARGET_DST_NEARBY_ENTRY && m_spellInfo->EffectImplicitTargetB[j] == 0 && m_spellInfo->Effect[j] != SPELL_EFFECT_PERSISTENT_AREA_AURA)
|
||||
AddGOTarget(goScriptTarget, j);
|
||||
}
|
||||
// store explicit target for TARGET_UNIT_NEARBY_ENTRY
|
||||
@@ -5900,7 +5900,7 @@ SpellCastResult Spell::CheckItems()
|
||||
&& (m_targets.getItemTarget()->IsWeaponVellum() || m_targets.getItemTarget()->IsArmorVellum()))
|
||||
{
|
||||
// cannot enchant vellum for other player
|
||||
if (m_targets.getItemTarget()->GetOwner()!=m_caster)
|
||||
if (m_targets.getItemTarget()->GetOwner() != m_caster)
|
||||
return SPELL_FAILED_NOT_TRADEABLE;
|
||||
// do not allow to enchant vellum from scroll made by vellum-prevent exploit
|
||||
if (m_CastItem && m_CastItem->GetProto()->Flags & ITEM_FLAGS_TRIGGERED_CAST)
|
||||
@@ -6948,13 +6948,13 @@ void Spell::FillRaidOrPartyTargets(UnitList &TagUnitMap, Unit* target, float rad
|
||||
&& !m_caster->IsHostileTo(Target))
|
||||
{
|
||||
if (Target == m_caster && withcaster ||
|
||||
Target!=m_caster && m_caster->IsWithinDistInMap(Target, radius))
|
||||
Target != m_caster && m_caster->IsWithinDistInMap(Target, radius))
|
||||
TagUnitMap.push_back(Target);
|
||||
|
||||
if (withPets)
|
||||
if (Pet* pet = Target->GetPet())
|
||||
if (pet == m_caster && withcaster ||
|
||||
pet!=m_caster && m_caster->IsWithinDistInMap(pet, radius))
|
||||
pet != m_caster && m_caster->IsWithinDistInMap(pet, radius))
|
||||
TagUnitMap.push_back(pet);
|
||||
}
|
||||
}
|
||||
@@ -6963,13 +6963,13 @@ void Spell::FillRaidOrPartyTargets(UnitList &TagUnitMap, Unit* target, float rad
|
||||
{
|
||||
Unit* ownerOrSelf = pTarget ? pTarget : target->GetCharmerOrOwnerOrSelf();
|
||||
if (ownerOrSelf == m_caster && withcaster ||
|
||||
ownerOrSelf!=m_caster && m_caster->IsWithinDistInMap(ownerOrSelf, radius))
|
||||
ownerOrSelf != m_caster && m_caster->IsWithinDistInMap(ownerOrSelf, radius))
|
||||
TagUnitMap.push_back(ownerOrSelf);
|
||||
|
||||
if (withPets)
|
||||
if (Guardian* pet = ownerOrSelf->GetGuardianPet())
|
||||
if (pet == m_caster && withcaster ||
|
||||
pet!=m_caster && m_caster->IsWithinDistInMap(pet, radius))
|
||||
pet != m_caster && m_caster->IsWithinDistInMap(pet, radius))
|
||||
TagUnitMap.push_back(pet);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user