Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C++ by Hundekuchen ( 16 years ago )
//m_uiArcaneExplosion_Timer
if (m_uiArcaneExplosion_Timer < uiDiff)
{
bool m_bInMeleeRange = false;
Unit *target = NULL;
std::vector<Unit*> target_list;
ThreatList const& m_threatlist = m_creature->getThreatManager().getThreatList();
for (ThreatList::const_iterator i = m_threatlist.begin(); i!= m_threatlist.end();++i)
{
if ((*i) != NULL && (*i) != 0)
{
Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid());
if (pUnit && (pUnit->GetTypeId() == TYPEID_PLAYER) && pUnit->IsWithinDistInMap(m_creature, ATTACK_DISTANCE) && pUnit->GetMaxHealth() > 5000)
m_bInMeleeRange = true;
}
}
if (m_bInMeleeRange)
{
DoCastSpellIfCan(m_creature, SPELL_ARCANE_EXPLOSION);
m_uiArcaneExplosion_Timer = urand(4000, 6000);
}
}
else
m_uiArcaneExplosion_Timer -= uiDiff;
Revise this Paste