mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[11293] Cleanups in spell target lists
This commit is contained in:
parent
37fd225a89
commit
ee5b59b7e0
4 changed files with 76 additions and 71 deletions
|
|
@ -802,7 +802,7 @@ void Spell::CleanupTargetList()
|
|||
|
||||
void Spell::AddUnitTarget(Unit* pVictim, SpellEffectIndex effIndex)
|
||||
{
|
||||
if( m_spellInfo->Effect[effIndex] == 0 )
|
||||
if (m_spellInfo->Effect[effIndex] == 0)
|
||||
return;
|
||||
|
||||
// Check for effect immune skip if immuned
|
||||
|
|
@ -811,7 +811,7 @@ void Spell::AddUnitTarget(Unit* pVictim, SpellEffectIndex effIndex)
|
|||
ObjectGuid targetGUID = pVictim->GetObjectGuid();
|
||||
|
||||
// Lookup target in already in list
|
||||
for(std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
for(TargetList::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
{
|
||||
if (targetGUID == ihit->targetGUID) // Found in list
|
||||
{
|
||||
|
|
@ -879,13 +879,13 @@ void Spell::AddUnitTarget(uint64 unitGUID, SpellEffectIndex effIndex)
|
|||
|
||||
void Spell::AddGOTarget(GameObject* pVictim, SpellEffectIndex effIndex)
|
||||
{
|
||||
if( m_spellInfo->Effect[effIndex] == 0 )
|
||||
if (m_spellInfo->Effect[effIndex] == 0)
|
||||
return;
|
||||
|
||||
ObjectGuid targetGUID = pVictim->GetObjectGuid();
|
||||
|
||||
// Lookup target in already in list
|
||||
for(std::list<GOTargetInfo>::iterator ihit = m_UniqueGOTargetInfo.begin(); ihit != m_UniqueGOTargetInfo.end(); ++ihit)
|
||||
for(GOTargetList::iterator ihit = m_UniqueGOTargetInfo.begin(); ihit != m_UniqueGOTargetInfo.end(); ++ihit)
|
||||
{
|
||||
if (targetGUID == ihit->targetGUID) // Found in list
|
||||
{
|
||||
|
|
@ -931,11 +931,11 @@ void Spell::AddGOTarget(uint64 goGUID, SpellEffectIndex effIndex)
|
|||
|
||||
void Spell::AddItemTarget(Item* pitem, SpellEffectIndex effIndex)
|
||||
{
|
||||
if( m_spellInfo->Effect[effIndex] == 0 )
|
||||
if (m_spellInfo->Effect[effIndex] == 0)
|
||||
return;
|
||||
|
||||
// Lookup target in already in list
|
||||
for(std::list<ItemTargetInfo>::iterator ihit = m_UniqueItemInfo.begin(); ihit != m_UniqueItemInfo.end(); ++ihit)
|
||||
for(ItemTargetList::iterator ihit = m_UniqueItemInfo.begin(); ihit != m_UniqueItemInfo.end(); ++ihit)
|
||||
{
|
||||
if (pitem == ihit->item) // Found in list
|
||||
{
|
||||
|
|
@ -1416,9 +1416,9 @@ bool Spell::IsAliveUnitPresentInTargetList()
|
|||
|
||||
uint8 needAliveTargetMask = m_needAliveTargetMask;
|
||||
|
||||
for(std::list<TargetInfo>::const_iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
for(TargetList::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
{
|
||||
if( ihit->missCondition == SPELL_MISS_NONE && (needAliveTargetMask & ihit->effectMask) )
|
||||
if (ihit->missCondition == SPELL_MISS_NONE && (needAliveTargetMask & ihit->effectMask))
|
||||
{
|
||||
Unit *unit = m_caster->GetObjectGuid() == ihit->targetGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, ihit->targetGUID);
|
||||
|
||||
|
|
@ -2839,12 +2839,12 @@ void Spell::cancel()
|
|||
|
||||
case SPELL_STATE_CASTING:
|
||||
{
|
||||
for(std::list<TargetInfo>::const_iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
for(TargetList::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
{
|
||||
if( ihit->missCondition == SPELL_MISS_NONE )
|
||||
if (ihit->missCondition == SPELL_MISS_NONE)
|
||||
{
|
||||
Unit* unit = m_caster->GetObjectGuid() == (*ihit).targetGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, ihit->targetGUID);
|
||||
if( unit && unit->isAlive() )
|
||||
if (unit && unit->isAlive())
|
||||
unit->RemoveAurasByCasterSpell(m_spellInfo->Id, m_caster->GetGUID());
|
||||
}
|
||||
}
|
||||
|
|
@ -3103,7 +3103,7 @@ void Spell::cast(bool skipCheck)
|
|||
TakeCastItem();
|
||||
|
||||
// fill initial spell damage from caster for delayed casted spells
|
||||
for(std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
for(TargetList::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
HandleDelayedSpellLaunch(&(*ihit));
|
||||
|
||||
// Okay, maps created, now prepare flags
|
||||
|
|
@ -3140,10 +3140,10 @@ void Spell::handle_immediate()
|
|||
// process immediate effects (items, ground, etc.) also initialize some variables
|
||||
_handle_immediate_phase();
|
||||
|
||||
for(std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
for(TargetList::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
DoAllEffectOnTarget(&(*ihit));
|
||||
|
||||
for(std::list<GOTargetInfo>::iterator ihit = m_UniqueGOTargetInfo.begin(); ihit != m_UniqueGOTargetInfo.end(); ++ihit)
|
||||
for(GOTargetList::iterator ihit = m_UniqueGOTargetInfo.begin(); ihit != m_UniqueGOTargetInfo.end(); ++ihit)
|
||||
DoAllEffectOnTarget(&(*ihit));
|
||||
|
||||
// spell is finished, perform some last features of the spell here
|
||||
|
|
@ -3167,25 +3167,25 @@ uint64 Spell::handle_delayed(uint64 t_offset)
|
|||
}
|
||||
|
||||
// now recheck units targeting correctness (need before any effects apply to prevent adding immunity at first effect not allow apply second spell effect and similar cases)
|
||||
for(std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
for(TargetList::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
{
|
||||
if (ihit->processed == false)
|
||||
if (!ihit->processed)
|
||||
{
|
||||
if ( ihit->timeDelay <= t_offset )
|
||||
if (ihit->timeDelay <= t_offset)
|
||||
DoAllEffectOnTarget(&(*ihit));
|
||||
else if( next_time == 0 || ihit->timeDelay < next_time )
|
||||
else if (next_time == 0 || ihit->timeDelay < next_time)
|
||||
next_time = ihit->timeDelay;
|
||||
}
|
||||
}
|
||||
|
||||
// now recheck gameobject targeting correctness
|
||||
for(std::list<GOTargetInfo>::iterator ighit = m_UniqueGOTargetInfo.begin(); ighit != m_UniqueGOTargetInfo.end(); ++ighit)
|
||||
for(GOTargetList::iterator ighit = m_UniqueGOTargetInfo.begin(); ighit != m_UniqueGOTargetInfo.end(); ++ighit)
|
||||
{
|
||||
if (ighit->processed == false)
|
||||
if (!ighit->processed)
|
||||
{
|
||||
if ( ighit->timeDelay <= t_offset )
|
||||
if (ighit->timeDelay <= t_offset)
|
||||
DoAllEffectOnTarget(&(*ighit));
|
||||
else if( next_time == 0 || ighit->timeDelay < next_time )
|
||||
else if (next_time == 0 || ighit->timeDelay < next_time)
|
||||
next_time = ighit->timeDelay;
|
||||
}
|
||||
}
|
||||
|
|
@ -3235,7 +3235,7 @@ void Spell::_handle_immediate_phase()
|
|||
m_diminishGroup = DIMINISHING_NONE;
|
||||
|
||||
// process items
|
||||
for(std::list<ItemTargetInfo>::iterator ihit = m_UniqueItemInfo.begin(); ihit != m_UniqueItemInfo.end(); ++ihit)
|
||||
for(ItemTargetList::iterator ihit = m_UniqueItemInfo.begin(); ihit != m_UniqueItemInfo.end(); ++ihit)
|
||||
DoAllEffectOnTarget(&(*ihit));
|
||||
|
||||
// process ground
|
||||
|
|
@ -3358,24 +3358,24 @@ void Spell::update(uint32 difftime)
|
|||
{
|
||||
if ( Player* p = m_caster->GetCharmerOrOwnerPlayerOrPlayerItself() )
|
||||
{
|
||||
for(std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
for(TargetList::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
{
|
||||
TargetInfo* target = &*ihit;
|
||||
if(!target->targetGUID.IsCreature())
|
||||
TargetInfo const& target = *ihit;
|
||||
if (!target.targetGUID.IsCreature())
|
||||
continue;
|
||||
|
||||
Unit* unit = m_caster->GetObjectGuid() == target->targetGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, target->targetGUID);
|
||||
Unit* unit = m_caster->GetObjectGuid() == target.targetGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, target.targetGUID);
|
||||
if (unit == NULL)
|
||||
continue;
|
||||
|
||||
p->RewardPlayerAndGroupAtCast(unit, m_spellInfo->Id);
|
||||
}
|
||||
|
||||
for(std::list<GOTargetInfo>::iterator ihit = m_UniqueGOTargetInfo.begin(); ihit != m_UniqueGOTargetInfo.end(); ++ihit)
|
||||
for(GOTargetList::const_iterator ihit = m_UniqueGOTargetInfo.begin(); ihit != m_UniqueGOTargetInfo.end(); ++ihit)
|
||||
{
|
||||
GOTargetInfo* target = &*ihit;
|
||||
GOTargetInfo const& target = *ihit;
|
||||
|
||||
GameObject* go = m_caster->GetMap()->GetGameObject(target->targetGUID);
|
||||
GameObject* go = m_caster->GetMap()->GetGameObject(target.targetGUID);
|
||||
if(!go)
|
||||
continue;
|
||||
|
||||
|
|
@ -3417,9 +3417,9 @@ void Spell::finish(bool ok)
|
|||
{
|
||||
if (!(*i)->isAffectedOnSpell(m_spellInfo))
|
||||
continue;
|
||||
for(std::list<TargetInfo>::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
for(TargetList::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
{
|
||||
if( ihit->missCondition == SPELL_MISS_NONE )
|
||||
if (ihit->missCondition == SPELL_MISS_NONE)
|
||||
{
|
||||
// check m_caster->GetGUID() let load auras at login and speedup most often case
|
||||
Unit *unit = m_caster->GetObjectGuid() == ihit->targetGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, ihit->targetGUID);
|
||||
|
|
@ -3462,7 +3462,7 @@ void Spell::finish(bool ok)
|
|||
bool needDrop = true;
|
||||
if (!IsPositiveSpell(m_spellInfo->Id))
|
||||
{
|
||||
for(std::list<TargetInfo>::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
for(TargetList::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
{
|
||||
if (ihit->missCondition != SPELL_MISS_NONE && ihit->targetGUID != m_caster->GetObjectGuid())
|
||||
{
|
||||
|
|
@ -3691,7 +3691,7 @@ void Spell::SendSpellGo()
|
|||
m_caster->SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
void Spell::WriteAmmoToPacket( WorldPacket * data )
|
||||
void Spell::WriteAmmoToPacket(WorldPacket* data)
|
||||
{
|
||||
uint32 ammoInventoryType = 0;
|
||||
uint32 ammoDisplayID = 0;
|
||||
|
|
@ -3763,47 +3763,47 @@ void Spell::WriteAmmoToPacket( WorldPacket * data )
|
|||
*data << uint32(ammoInventoryType);
|
||||
}
|
||||
|
||||
void Spell::WriteSpellGoTargets( WorldPacket * data )
|
||||
void Spell::WriteSpellGoTargets(WorldPacket* data)
|
||||
{
|
||||
size_t count_pos = data->wpos();
|
||||
*data << uint8(0); // placeholder
|
||||
|
||||
// This function also fill data for channeled spells:
|
||||
// m_needAliveTargetMask req for stop channeling if one target die
|
||||
uint32 hit = m_UniqueGOTargetInfo.size(); // Always hits on GO
|
||||
uint32 hit = m_UniqueGOTargetInfo.size(); // Always hits on GO
|
||||
uint32 miss = 0;
|
||||
for(std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
|
||||
for(TargetList::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
{
|
||||
if ((*ihit).effectMask == 0) // No effect apply - all immuned add state
|
||||
if (ihit->effectMask == 0) // No effect apply - all immuned add state
|
||||
{
|
||||
// possibly SPELL_MISS_IMMUNE2 for this??
|
||||
ihit->missCondition = SPELL_MISS_IMMUNE2;
|
||||
++miss;
|
||||
}
|
||||
else if ((*ihit).missCondition == SPELL_MISS_NONE)
|
||||
else if (ihit->missCondition == SPELL_MISS_NONE) // Add only hits
|
||||
{
|
||||
++hit;
|
||||
*data << ihit->targetGUID;
|
||||
m_needAliveTargetMask |= ihit->effectMask;
|
||||
}
|
||||
else
|
||||
++miss;
|
||||
}
|
||||
|
||||
*data << (uint8)hit;
|
||||
for(std::list<TargetInfo>::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
{
|
||||
if ((*ihit).missCondition == SPELL_MISS_NONE) // Add only hits
|
||||
{
|
||||
*data << ihit->targetGUID;
|
||||
m_needAliveTargetMask |=ihit->effectMask;
|
||||
}
|
||||
}
|
||||
|
||||
for(std::list<GOTargetInfo>::const_iterator ighit = m_UniqueGOTargetInfo.begin(); ighit != m_UniqueGOTargetInfo.end(); ++ighit)
|
||||
for(GOTargetList::const_iterator ighit = m_UniqueGOTargetInfo.begin(); ighit != m_UniqueGOTargetInfo.end(); ++ighit)
|
||||
*data << ighit->targetGUID; // Always hits
|
||||
|
||||
data->put<uint8>(count_pos, hit);
|
||||
|
||||
*data << (uint8)miss;
|
||||
for(std::list<TargetInfo>::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
for(TargetList::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
{
|
||||
if( ihit->missCondition != SPELL_MISS_NONE ) // Add only miss
|
||||
if (ihit->missCondition != SPELL_MISS_NONE) // Add only miss
|
||||
{
|
||||
*data << ihit->targetGUID;
|
||||
*data << uint8(ihit->missCondition);
|
||||
if( ihit->missCondition == SPELL_MISS_REFLECT )
|
||||
if (ihit->missCondition == SPELL_MISS_REFLECT)
|
||||
*data << uint8(ihit->reflectResult);
|
||||
}
|
||||
}
|
||||
|
|
@ -3965,7 +3965,7 @@ void Spell::SendChannelStart(uint32 duration)
|
|||
// select first not resisted target from target list for _0_ effect
|
||||
if (!m_UniqueTargetInfo.empty())
|
||||
{
|
||||
for(std::list<TargetInfo>::const_iterator itr = m_UniqueTargetInfo.begin(); itr != m_UniqueTargetInfo.end(); ++itr)
|
||||
for(TargetList::const_iterator itr = m_UniqueTargetInfo.begin(); itr != m_UniqueTargetInfo.end(); ++itr)
|
||||
{
|
||||
if ((itr->effectMask & (1 << EFFECT_INDEX_0)) && itr->reflectResult == SPELL_MISS_NONE &&
|
||||
itr->targetGUID != m_caster->GetObjectGuid())
|
||||
|
|
@ -3977,7 +3977,7 @@ void Spell::SendChannelStart(uint32 duration)
|
|||
}
|
||||
else if(!m_UniqueGOTargetInfo.empty())
|
||||
{
|
||||
for(std::list<GOTargetInfo>::const_iterator itr = m_UniqueGOTargetInfo.begin(); itr != m_UniqueGOTargetInfo.end(); ++itr)
|
||||
for(GOTargetList::const_iterator itr = m_UniqueGOTargetInfo.begin(); itr != m_UniqueGOTargetInfo.end(); ++itr)
|
||||
{
|
||||
if (itr->effectMask & (1 << EFFECT_INDEX_0))
|
||||
{
|
||||
|
|
@ -4302,7 +4302,7 @@ void Spell::HandleThreatSpells()
|
|||
// since 2.0.1 threat from positive effects also is distributed among all targets, so the overall caused threat is at most the defined bonus
|
||||
threat /= m_UniqueTargetInfo.size();
|
||||
|
||||
for (std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
for (TargetList::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
{
|
||||
if (ihit->missCondition != SPELL_MISS_NONE)
|
||||
continue;
|
||||
|
|
@ -5773,8 +5773,8 @@ bool Spell::CanAutoCast(Unit* target)
|
|||
{
|
||||
FillTargetMap();
|
||||
//check if among target units, our WANTED target is as well (->only self cast spells return false)
|
||||
for(std::list<TargetInfo>::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
if( ihit->targetGUID == targetguid )
|
||||
for(TargetList::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
if (ihit->targetGUID == targetguid)
|
||||
return true;
|
||||
}
|
||||
return false; //target invalid
|
||||
|
|
@ -6497,7 +6497,7 @@ void Spell::DelayedChannel()
|
|||
|
||||
DEBUG_FILTER_LOG(LOG_FILTER_SPELL_CAST, "Spell %u partially interrupted for %i ms, new duration: %u ms", m_spellInfo->Id, delaytime, m_timer);
|
||||
|
||||
for(std::list<TargetInfo>::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
for(TargetList::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
{
|
||||
if ((*ihit).missCondition == SPELL_MISS_NONE)
|
||||
{
|
||||
|
|
@ -6680,15 +6680,15 @@ bool Spell::IsTriggeredSpellWithRedundentData() const
|
|||
|
||||
bool Spell::HaveTargetsForEffect(SpellEffectIndex effect) const
|
||||
{
|
||||
for(std::list<TargetInfo>::const_iterator itr = m_UniqueTargetInfo.begin(); itr != m_UniqueTargetInfo.end(); ++itr)
|
||||
for(TargetList::const_iterator itr = m_UniqueTargetInfo.begin(); itr != m_UniqueTargetInfo.end(); ++itr)
|
||||
if(itr->effectMask & (1 << effect))
|
||||
return true;
|
||||
|
||||
for(std::list<GOTargetInfo>::const_iterator itr = m_UniqueGOTargetInfo.begin(); itr != m_UniqueGOTargetInfo.end(); ++itr)
|
||||
for(GOTargetList::const_iterator itr = m_UniqueGOTargetInfo.begin(); itr != m_UniqueGOTargetInfo.end(); ++itr)
|
||||
if(itr->effectMask & (1 << effect))
|
||||
return true;
|
||||
|
||||
for(std::list<ItemTargetInfo>::const_iterator itr = m_UniqueItemInfo.begin(); itr != m_UniqueItemInfo.end(); ++itr)
|
||||
for(ItemTargetList::const_iterator itr = m_UniqueItemInfo.begin(); itr != m_UniqueItemInfo.end(); ++itr)
|
||||
if(itr->effectMask & (1 << effect))
|
||||
return true;
|
||||
|
||||
|
|
|
|||
|
|
@ -393,8 +393,8 @@ class Spell
|
|||
void DoSummonTotem(SpellEffectIndex eff_idx, uint8 slot_dbc = 0);
|
||||
void DoSummonCritter(SpellEffectIndex eff_idx, uint32 forceFaction = 0);
|
||||
|
||||
void WriteSpellGoTargets( WorldPacket * data );
|
||||
void WriteAmmoToPacket( WorldPacket * data );
|
||||
void WriteSpellGoTargets(WorldPacket* data);
|
||||
void WriteAmmoToPacket(WorldPacket* data);
|
||||
|
||||
typedef std::list<Unit*> UnitList;
|
||||
void FillTargetMap();
|
||||
|
|
@ -581,7 +581,6 @@ class Spell
|
|||
uint8 effectMask:8;
|
||||
bool processed:1;
|
||||
};
|
||||
std::list<TargetInfo> m_UniqueTargetInfo;
|
||||
uint8 m_needAliveTargetMask; // Mask req. alive targets
|
||||
|
||||
struct GOTargetInfo
|
||||
|
|
@ -591,14 +590,20 @@ class Spell
|
|||
uint8 effectMask:8;
|
||||
bool processed:1;
|
||||
};
|
||||
std::list<GOTargetInfo> m_UniqueGOTargetInfo;
|
||||
|
||||
struct ItemTargetInfo
|
||||
{
|
||||
Item *item;
|
||||
uint8 effectMask;
|
||||
};
|
||||
std::list<ItemTargetInfo> m_UniqueItemInfo;
|
||||
|
||||
typedef std::list<TargetInfo> TargetList;
|
||||
typedef std::list<GOTargetInfo> GOTargetList;
|
||||
typedef std::list<ItemTargetInfo> ItemTargetList;
|
||||
|
||||
TargetList m_UniqueTargetInfo;
|
||||
GOTargetList m_UniqueGOTargetInfo;
|
||||
ItemTargetList m_UniqueItemInfo;
|
||||
|
||||
void AddUnitTarget(Unit* target, SpellEffectIndex effIndex);
|
||||
void AddUnitTarget(uint64 unitGUID, SpellEffectIndex effIndex);
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ void Spell::EffectSchoolDMG(SpellEffectIndex effect_idx)
|
|||
case 72624: case 72625: // Ooze Eruption
|
||||
{
|
||||
uint32 count = 0;
|
||||
for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit)
|
||||
for(TargetList::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
if(ihit->effectMask & (1<<effect_idx))
|
||||
++count;
|
||||
|
||||
|
|
@ -2761,7 +2761,7 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
|
|||
|
||||
// Righteous Defense (step 2) (in old version 31980 dummy effect)
|
||||
// Clear targets for eff 1
|
||||
for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit)
|
||||
for(TargetList::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
ihit->effectMask &= ~(1<<1);
|
||||
|
||||
// not empty (checked), copy
|
||||
|
|
@ -5641,7 +5641,7 @@ void Spell::EffectWeaponDmg(SpellEffectIndex eff_idx)
|
|||
case 71021: // Saber Lash
|
||||
{
|
||||
uint32 count = 0;
|
||||
for(std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
for(TargetList::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
if(ihit->effectMask & (1<<eff_idx))
|
||||
++count;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11292"
|
||||
#define REVISION_NR "11293"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue