本文整理汇总了C++中PlayerbotAI::FindPotion方法的典型用法代码示例。如果您正苦于以下问题:C++ PlayerbotAI::FindPotion方法的具体用法?C++ PlayerbotAI::FindPotion怎么用?C++ PlayerbotAI::FindPotion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerbotAI
的用法示例。
在下文中一共展示了PlayerbotAI::FindPotion方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoNextCombatManeuver
//.........这里部分代码省略.........
//heal pets and bots
Unit *target = DoSelectLowestHpFriendly(40, 1000);
if(target && target->isAlive() && HealTarget(target, target->GetHealth()*100 / target->GetMaxHealth()) ) { return; }
break;
#pragma endregion
}
#pragma region ShamanCommon
//Defensive Stuff
if (m_tank->GetGUID() != m_bot->GetGUID() && pVictim && pVictim->GetGUID() == m_bot->GetGUID() )
{
if (pDist > 5 && CastSpell(FROST_SHOCK, pTarget)) { return; }
if ((pTarget->GetCreatureType() == (uint32) CREATURE_TYPE_BEAST || pTarget->GetCreatureType() == (uint32) CREATURE_TYPE_HUMANOID) && CastSpell(HEX, pTarget)) { return; } // no gcd
if (CastSpell(WIND_SHEAR, pTarget)) { } // no gcd
}
if (m_bot->getRace() == (uint8) RACE_BLOODELF && pDist < 8 && pTarget->IsNonMeleeSpellCasted(true) && CastSpell(R_ARCANE_TORRENT, pTarget)) { } //no gcd
if (pTarget->IsNonMeleeSpellCasted(true) && CastSpell(WIND_SHEAR, pTarget)) { } //no gcd
if (m_bot->getRace() == (uint8) RACE_TAUREN && pVictim && pVictim->GetGUID() == m_bot->GetGUID() && pDist < 8 && CastSpell(R_WAR_STOMP, pTarget)) { return; }
//Catch
if (pTarget->HasUnitMovementFlag(UNIT_FLAG_FLEEING))
{
if (CastSpell(FROST_SHOCK,pTarget)) return;
}
//Buff and restores
if ( ( (ai->GetHealthPercent() < 60 && isUnderAttack()) ||
(ai->GetManaPercent() < 30) ) && CastSpell(SHAMANISTIC_RAGE, m_bot)) { return; }
if (m_bot->getRace() == (uint8) RACE_TROLL && CastSpell(R_BERSERKING,m_bot)) {} // no GCD
if (m_bot->getRace() == (uint8) RACE_ORC && CastSpell(R_BLOOD_FURY,m_bot)) {} // no GCD
if (!m_bot->HasAura(HEROISM) && !m_bot->HasAura(EXHAUSTION) && !m_bot->HasAura(SATED) && CastSpell(HEROISM,m_bot)) { return; }
if (m_role != BOT_ROLE_SUPPORT && CastSpell(NATURES_SWIFTNESS, m_bot)) { } //healers keep it for healing no gcd
else if (CastSpell(ELEMENTAL_MASTERY, m_bot)) { } //no gcd
// If at threat limit, use WIND_SHEAR to reduce threat
if (pThreat > threatThreshold && m_tank->GetGUID() != m_bot->GetGUID() && !isUnderAttack())
{
if (m_tank->getVictim() && m_tank->getVictim()->GetGUID() != pTarget->GetGUID()) // I am attacking wrong target!!
{
m_bot->SetSelection(m_tank->getVictim()->GetGUID());
return;
}
else
{
if (CastSpell(WIND_SHEAR,pTarget)) { return; } //Lets see if we can manage
else { return; } //use no spells and wait threat to be reduced
}
}
if (TALENT_ELEMENTAL)
{
if (CastSpell(ELEMENTAL_MASTERY, m_bot)) { } //no gcd
if (!pTarget->HasAura(FLAME_SHOCK,m_bot->GetGUID()) && CastSpell(FLAME_SHOCK,pTarget)) { return; }
if (CastSpell(LAVA_BURST,pTarget)) { return; }
if (CastSpell(CHAIN_LIGHTNING,pTarget)) { return; }
if (CastSpell(LIGHTNING_BOLT,pTarget)) { return; }
}
//dps
if (MAELSTROM_WEAPON)
{
Aura *maelaura = m_bot->GetAura(MAELSTROM_WEAPON);
if (maelaura && maelaura->GetStackAmount() == 5)
{
if ((isUnderAttack(m_tank,3) || m_tank->GetGUID() == m_bot->GetGUID()) && CastSpell(CHAIN_LIGHTNING,pTarget,true,true)) { return; }
if (CastSpell(LIGHTNING_BOLT,pTarget,true,true)) { return; }
}
}
if (CastSpell(FLAME_SHOCK,pTarget)) { return; }
if (CastSpell(STORMSTRIKE,pTarget,true,true)) { return; }
//if (!TALENT_ENHANCEMENT && CanCast(LAVA_BURST,pTarget,true) && pTarget->HasAura(FLAME_SHOCK,m_bot->GetGUID()) && CastSpell(LAVA_BURST,pTarget,false)) { return; }
if (CastSpell(FERAL_SPIRIT,m_bot)) { return; }
if (CanCast(EARTH_SHOCK,pTarget,true) && (pTarget->HasAura(STORMSTRIKE,m_bot->GetGUID()) || pTarget->HasAura(FLAME_SHOCK,m_bot->GetGUID()) ) && CastSpell(EARTH_SHOCK,pTarget)) { return; }
//if (CanCast(FLAME_SHOCK,pTarget) && CastSpell(FLAME_SHOCK,pTarget)) { return; }
if (CastSpell(LAVA_LASH,pTarget,true,true)) { return; }
if (CastSpell(FIRE_NOVA,pTarget)) { return; }
//if ((isUnderAttack(m_tank,4) || m_tank->GetGUID() == m_bot->GetGUID()) && CastSpell(FIRE_NOVA,pTarget)) { return; }
if (ai->GetManaPercent() > 60 && castDispel(PURGE,pTarget)) { return; } //PURGE but dont overpurge
#pragma endregion
// drink potion if support / healer (Other builds simply overuse mana and waste mana pots)
if(ai->GetManaPercent() < 5 && (m_role == BOT_ROLE_SUPPORT || m_role == BOT_ROLE_HEALER) )
{
Item *pItem = ai->FindPotion();
if(pItem != NULL)
{
if (pItem->GetSpell() && m_bot->HasSpellCooldown(pItem->GetSpell()) ) { return; } //pot is in cooldown
ai->UseItem(*pItem);
}
}
} //end DoNextCombatManeuver
示例2: DoNextCombatManeuver
//.........这里部分代码省略.........
if (TALENT_ARCANE)
{
if (CastSpell(ARCANE_POWER,m_bot)) {} //nogcd
if (CastSpell(MIRROR_IMAGE,m_bot)) { return; }
//AOE
if (isUnderAttack(m_tank,5))
{
if (CastSpell(BLIZZARD,pTarget)) { return; }
}
//DPS
if (ARCANE_BLAST)
{
Aura *abaura = m_bot->GetAura(P_ARCANE_BLAST);
if (abaura && abaura->GetStackAmount() >= 3)
{
if (m_bot->HasAura(P_MISSILE_BARRAGE) && CastSpell(ARCANE_MISSILES,pTarget)) { return; }
else if (CastSpell(ARCANE_BARRAGE,pTarget)) { return; }
}
}
if (CastSpell(ARCANE_BARRAGE,pTarget) ) { return; }
}
if (TALENT_FIRE)
{
if (CastSpell(COMBUSTION,m_bot)) { } //nogcd
if (CastSpell(MIRROR_IMAGE,m_bot)) { return; }
//AOE
if (isUnderAttack(m_tank,5))
{
if (CastSpell(FLAMESTRIKE,pTarget)) { return; }
if (CastSpell(BLAST_WAVE,pTarget)) { return; }
if (CastSpell(LIVING_BOMB,pTarget)) { return; }
if (CastSpell(DRAGONS_BREATH,pTarget)) { return; }
}
//DPS
if (m_bot->HasAura(P_HOT_STREAK) && CastSpell(PYROBLAST,pTarget)) { return; }
if (!pTarget->HasAura(LIVING_BOMB,m_bot->GetGUID()) && CastSpell(LIVING_BOMB,pTarget)) { return; }
//if (!pTarget->HasAura(IMP_SCORCH) && CastSpell(SCORCH,pTarget)) { return; }
if (CastSpell(FIREBALL,pTarget)) { return; }
}
if (TALENT_FROST)
{
if (CastSpell(MIRROR_IMAGE,m_bot)) { return; }
if (CastSpell(WATER_ELEMENTAL,m_bot)) { return; }
uint64 pet_guid = m_bot->GetPetGUID();
if (pet_guid>0){
Pet* pet = ObjectAccessor::GetPet(*m_bot, pet_guid);
Unit *unit = ObjectAccessor::GetUnit(*m_bot, pet_guid);
if (unit!=NULL){
if (!unit->isInCombat()) {
m_bot->GetSession()->HandlePetActionHelper(unit, pet_guid, COMMAND_ATTACK, ACT_COMMAND, pTarget->GetGUID());
}
}
}
//if (CastSpell(33395, pTarget)) // pet freeze spell
// sLog.outError ("successfully casted freeze");
//AOE
if (isUnderAttack(m_tank,5))
{
if (CastSpell(BLIZZARD,pTarget)) { return; }
}
//DPS
if (m_bot->HasAura(P_FINGERS_OF_FROST) && CastSpell(DEEP_FREEZE,pTarget)) { return; }
if (m_bot->HasAura(P_BRAIN_FREEZE) && CastSpell(FROSTFIRE_BOLT,pTarget)) { return; }
if (CastSpell(FROSTBOLT,pTarget,true,true)) { return; }
}
// Defaults especialy for lower levels
if (m_bot->HasAura(P_BRAIN_FREEZE) && CastSpell(FIREBALL,pTarget,1,1)) { return; }
if (m_bot->HasAura(P_FIRESTARTER) && CastSpell(FLAMESTRIKE,pTarget,1,1)) { return; }
if (m_bot->HasAura(P_HOT_STREAK) && CastSpell(PYROBLAST,pTarget,1,1)) { return; }
if (m_bot->HasAura(POM) && (CastSpell(PYROBLAST,pTarget,1,1) || CastSpell(FIREBALL,pTarget,1,1) || CastSpell(FROSTBOLT,pTarget,1,1))) { return; }
if (pTarget->isFrozen() && CastSpell(ICE_LANCE,pTarget)) { return; }
if (m_bot->isMoving() && (CastSpell(FIRE_BLAST,pTarget,1,1) || CastSpell(ARCANE_BARRAGE,pTarget) || CastSpell(ICE_LANCE,pTarget))) { return; }
if (CastSpell(FIREBALL,pTarget)) { return; }
if (CastSpell(FROSTBOLT,pTarget)) { return; }
if (CastSpell(ARCANE_MISSILES,pTarget)) { return; }
// drink potion
if(ai->GetManaPercent() < 5 )
{
Item *pItem = ai->FindPotion();
if(pItem != NULL)
{
if (pItem->GetSpell() && m_bot->HasSpellCooldown(pItem->GetSpell()) ) { return; } //pot is in cooldown
ai->UseItem(*pItem);
}
}
// if we get down here, it means we are out of mana, so use wand
CastSpell(SHOOT, pTarget);
} //end DoNextCombatManeuver
示例3: DoNextCombatManeuver
//.........这里部分代码省略.........
if (ai->GetHealthPercent() <= 75 && CastSpell(SURVIVAL_INSTINCTS, m_bot)) { return; }
if (isUnderAttack() && CastSpell(NATURES_GRASP, m_bot)) { return; }
if (CastSpell(FAERIE_FIRE_FERAL, pTarget)) { return; }
if (m_bot->GetComboPoints() < 5)
{
if (CastSpell(RAKE, pTarget)) { return; }
if (CastSpell(MANGLE_CAT, pTarget)) { return; }
if (!pTarget->HasInArc(M_PI,m_bot) && CastSpell(SHRED, pTarget)) { return; }
if (ai->GetEnergyAmount() > 65 && CastSpell(MANGLE_CAT, pTarget)) { return; } //Spam mangle if cannot cast shred
if (ai->GetEnergyAmount() > 65 && CastSpell(CLAW, pTarget) ) { return; } //Spam Claw if there is no mangle
// if (CanCast(COWER, pTarget) && CastSpell(COWER, pTarget)) { return; } //if still nothing, use COWER to reduce threat
}
else
{
if (CastSpell(SAVAGE_ROAR)) { return; }
if (CastSpell(RIP, pTarget)) { return; }
if (ai->GetEnergyAmount() >= 65 && CastSpell(FEROCIOUS_BITE, pTarget)) { return; } //maxhit for feracious bite
}
if (CastSpell(TIGERS_FURY, m_bot)) { return; } //if nothing is ready yet, use tigers fury
}
else if (ai->GetForm() == FORM_DIREBEAR || ai->GetForm() == FORM_BEAR)
{
// If at threat limit, stop
if (pThreat > threatThreshold && m_tank->GetGUID() != m_bot->GetGUID() && !isUnderAttack() )
{
//Change to tank's target
if (m_tank->getVictim() && m_tank->getVictim()->GetGUID() != pTarget->GetGUID()) { m_bot->SetSelection(m_tank->getVictim()->GetGUID()); }
return; //use no spells and wait threat to be reduced
}
if (CastSpell(FERAL_CHARGE_BEAR,pTarget)) { return; }
if (CastSpell(BASH, pTarget,true,true)) { return; } //Need check for immunity
if (CastSpell(BERSERK, m_bot)) { return; }
if (CastSpell(DEMORALIZING_ROAR, pTarget)) { return; }
if (ai->GetHealthPercent() > 90 && ai->GetRageAmount() < 50 && CastSpell(ENRAGE, m_bot)) { return; }
if (ai->GetHealthPercent() <= 75 && CastSpell(SURVIVAL_INSTINCTS, m_bot)) { return; }
if ( ( ai->GetHealthPercent() <= 30 || (ai->GetHealthPercent() < 85 && m_tank->GetGUID() != m_bot->GetGUID()) )
&& CastSpell(FRENZIED_REGENERATION)) { return; }
if (CastSpell(FAERIE_FIRE_FERAL, pTarget)) { return; }
if (CastSpell(MANGLE_BEAR, pTarget)) { return; }
if ((ai->GetRageAmount() > 70 || m_tank->GetGUID() == m_bot->GetGUID()) && CastSpell(SWIPE_BEAR, pTarget)) { return; }
if (ai->GetRageAmount() > 50 && CastSpell(MAUL, pTarget)) {} // Low Priority, Next Attack effect
if (ai->GetRageAmount() > 60 && CastSpell(LACERATE, pTarget)) { return; } //Currently applies only 1
}
else
{
//Defensive stuff
if (m_tank->GetGUID() != m_bot->GetGUID() && pVictim && pVictim->GetGUID() == m_bot->GetGUID() )
{
if (ROOTS && !pTarget->HasAura(CYCLONE) && !pTarget->HasAura(HIBERNATE) && CastSpell(ROOTS, pTarget)) { return; }
if (CYCLONE && pDist > 5 && !pTarget->HasAura(ROOTS) && !pTarget->HasAura(HIBERNATE) && CastSpell(CYCLONE, pTarget)) { return; }
if (HIBERNATE && pTarget->GetCreatureType() == (uint32) CREATURE_TYPE_BEAST && !pTarget->HasAura(ROOTS) && !pTarget->HasAura(CYCLONE) && CastSpell(HIBERNATE, pTarget)) { return; }
//if (m_bot->getRace() == (uint8) RACE_NIGHTELF && isUnderAttack() && CastSpell(R_SHADOWMELD, m_bot)) { return; }
if (m_bot->getRace() == (uint8) RACE_TAUREN && pDist < 8 && CastSpell(R_WAR_STOMP, pTarget)) { return; }
}
if (CastSpell(FAERIE_FIRE, pTarget)) { return; }
// If at threat limit, stop
if (pThreat > threatThreshold && m_tank->GetGUID() != m_bot->GetGUID() && !isUnderAttack() )
{
//Change to tank's target
if (m_tank->getVictim() && m_tank->getVictim()->GetGUID() != pTarget->GetGUID()) { m_bot->SetSelection(m_tank->getVictim()->GetGUID()); }
return; //use no spells and wait threat to be reduced
}
// Continue attacking if theres excess mana (for healers)
if (m_role == BOT_ROLE_SUPPORT && ai->GetManaPercent() < offensiveSpellThreshold) { return; }
if (m_role != BOT_ROLE_SUPPORT && CastSpell(NATURES_SWIFTNESS, m_bot)) { } //only balance no gcd
if (m_bot->HasAura(NATURES_SWIFTNESS) && CastSpell(STARFIRE, pTarget)) { return; }
if (CastSpell(INSECT_SWARM, pTarget)) { return; }
if (CastSpell(TYPHOON, pTarget)) { return; }
if (isUnderAttack(m_tank,4) && CastSpell(HURRICANE, pTarget)) { ai->SetIgnoreUpdateTime(8); return; }
if (isUnderAttack(m_tank,5) && CastSpell(FORCE_OF_NATURE, m_bot)) { return; }
if (isUnderAttack(m_tank,4) && CastSpell(STARFALL, pTarget)) { return; }
if (CastSpell(MOONFIRE, pTarget)) { return; }
if (CastSpell(WRATH, pTarget)) { return; }
if (CastSpell(STARFIRE, pTarget)) { return; }
}
// If there is nothing else to do buff UP
if (m_role == BOT_ROLE_DPS_MELEE) //Those already healed and buffed or should never buff in combat
{
if (DoSupportRaid(GetMaster(),false,false,false)) { return; }
if (m_bot->GetGroup() && GetMaster()->GetGroup() != m_bot->GetGroup() && DoSupportRaid(m_bot,false,false,false)) { return; }
}
// drink potion if support / healer (Other builds simply overuse mana and waste mana pots)
if(ai->GetManaPercent() < 5 && (m_role == BOT_ROLE_SUPPORT || m_role == BOT_ROLE_HEALER) )
{
Item *pItem = ai->FindPotion();
if(pItem != NULL)
{
if (pItem->GetSpell() && m_bot->HasSpellCooldown(pItem->GetSpell()) ) { return; } //pot is in cooldown
ai->UseItem(*pItem);
}
}
#pragma endregion
} //end DoNextCombatManeuver
示例4: DoNextCombatManeuver
//.........这里部分代码省略.........
}
}
// My target is not attacking me, taunt..
if ( m_tank->GetGUID() == m_bot->GetGUID() && pVictim && pVictim->GetGUID() != m_bot->GetGUID() && CastSpell(HOR, pTarget,true,true) ) { } //NO GCD
// Tank specials
if (TALENT_PROT && ai->GetManaPercent() < 90 && CastSpell (DIVINE_PLEA, m_bot)) { return; } //Prot paladin always uses this..
if (pVictim && pVictim->GetGUID() == m_bot->GetGUID() && CastSpell(HOLY_SHIELD,m_bot)) { return; }
if (CastSpell(AVENGERS_SHIELD,pTarget,true,true)) { return; }
if (CastSpell(HOTR,pTarget,true,true)) { return; }
if (CastSpell(HOLY_WRATH,pTarget,true,true)){ return; }
if (CastSpell(CONSECRATION,pTarget)) { return; }
if (m_bot->getRace() == (uint8) RACE_DWARF && CastSpell(R_STONEFORM,m_bot)) { return; }
if (DoSupportRaid(m_bot)) { return; }
//heal pets and bots
if(target && target->isAlive() && HealTarget(target, target->GetHealth()*100 / target->GetMaxHealth()) ) { return; }
break;
#pragma endregion
#pragma region BOT_ROLE_DPS_MELEE
case BOT_ROLE_DPS_MELEE:
ChangeAura(RETRIBUTION_AURA);
if (!TALENT_PROT && m_tank->GetGUID() != m_bot->GetGUID()) m_bot->RemoveAurasDueToSpell(RIGHTEOUS_FURY);
if (CastSpell(SOV,m_bot)) { return; }
if (CastSpell (HAMMER_OF_JUSTICE, pTarget)) { return; }
if (!m_bot->HasAura(FORBEARANCE) && CastSpell(AVENGING_WRATH,m_bot)) {} //no gcd
if (CastSpell(JOW,pTarget)) { return; }
if (CastSpell(DIVINE_STORM, pTarget)) { return; }
if (CastSpell(CRUSADER_STRIKE, pTarget)) { return; }
if (GetAI()->GetHealthPercent(*pTarget)<20 && CastSpell(HAMMER_OF_WRATH, pTarget)) { return; }
if (CastSpell(CONSECRATION,pTarget)) { return; }
if (m_bot->HasAura(AOW) && CastSpell(EXORCISM,pTarget)) { return; }
if (CastSpell(HOLY_WRATH,pTarget)) { return; }
break;
#pragma endregion
}
#pragma region PaladinCommon
// Shared dps spells
if (pTarget->GetCreatureType() == (uint32) CREATURE_TYPE_HUMANOID && pTarget->IsNonMeleeSpellCasted(true) && CastSpell (REPENTANCE, pTarget)) { return; }
if (m_bot->getRace() == (uint8) RACE_BLOODELF && pDist < 8 && pTarget->IsNonMeleeSpellCasted(true) && CastSpell(R_ARCANE_TORRENT, pTarget)) { } //no gcd
if (m_bot->getRace() == (uint8) RACE_TROLL && CastSpell(R_BERSERKING,m_bot)) {} // no GCD
if (m_bot->getRace() == (uint8) RACE_ORC && CastSpell(R_BLOOD_FURY,m_bot)) {} // no GCD
// If at threat limit, stop
if(pThreat > threatThreshold && !TALENT_PROT && m_tank->GetGUID() != m_bot->GetGUID() && !isUnderAttack())
{
if (m_tank->getVictim() && m_tank->getVictim()->GetGUID() != pTarget->GetGUID()) // I am attacking wrong target!!
{
m_bot->SetSelection(m_tank->getVictim()->GetGUID());
return;
}
else
{
if (CastSpell(HOS,m_bot)) { return; } //Lets see if we can manage with HOS
else { return; } //use no spells and wait threat to be reduced
}
}
// Continue attacking if theres excess mana (for healers)
if (m_role == BOT_ROLE_SUPPORT && ai->GetManaPercent() < offensiveSpellThreshold) { return; }
if (GetAI()->GetHealthPercent(*pTarget)<20 && CastSpell(HAMMER_OF_WRATH, pTarget,true,true)) { return; } //no gcd but cast
if (CastSpell (HAMMER_OF_JUSTICE, pTarget)) { return; }
if (CanCast(JOW,pTarget,true) &&
( ( ai->GetManaPercent() <= 70 && ai->GetHealthPercent() > 90)
|| ( ai->GetManaPercent() <= 50 && ai->GetHealthPercent() > 75)
|| ( ai->GetManaPercent() <= 20 && ai->GetHealthPercent() > 20) )
&& CastSpell(JOW,pTarget,false)) { return; }
else if (CastSpell(JOL,pTarget),true,true) { return; }
if (CastSpell(SHIELD_OF_RIGHTEOUSNESS,pTarget,true,true)) { return; }
if (CastSpell (DIVINE_STORM, pTarget,true,true)) { return; }
if (CastSpell (CRUSADER_STRIKE, pTarget,true,true)) { return; }
if (m_bot->getRace() == (uint8) RACE_TAUREN && pDist < 8 && CastSpell(R_WAR_STOMP, pTarget)) { return; } //no GCD but cast
if (isUnderAttack(m_tank,4) && CastSpell(HOLY_WRATH,pTarget,true,true)) { return; }
if (isUnderAttack(m_tank,4) && CastSpell(CONSECRATION,pTarget)) { return; }
if (CastSpell(HOLY_SHOCK,pTarget,true,true)) { return; }
if (m_role != BOT_ROLE_SUPPORT && ai->GetManaPercent() > 60 && OwnPartyHP < 65 && DoSupportRaid(m_bot)) { return; } //if there is spare time and mana, do healz and other stuff..
else if (m_role != BOT_ROLE_SUPPORT && ai->GetManaPercent() > 30 && DoSupportRaid(m_bot,30,false,false,false,true,false)) { return; }
if (CastSpell(EXORCISM,pTarget,true,true)) { return; }
// drink potion if support / healer (Other builds simply overuse mana and waste mana pots)
if(ai->GetManaPercent() < 5 && (m_role == BOT_ROLE_SUPPORT || m_role == BOT_ROLE_HEALER) )
{
Item *pItem = ai->FindPotion();
if(pItem != NULL)
{
if (pItem->GetSpell() && m_bot->HasSpellCooldown(pItem->GetSpell()) ) { return; } //pot is in cooldown
ai->UseItem(*pItem);
}
}
#pragma endregion
} //end DoNextCombatManeuver