本文整理汇总了C++中PlayerbotAI::GetMaster方法的典型用法代码示例。如果您正苦于以下问题:C++ PlayerbotAI::GetMaster方法的具体用法?C++ PlayerbotAI::GetMaster怎么用?C++ PlayerbotAI::GetMaster使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerbotAI
的用法示例。
在下文中一共展示了PlayerbotAI::GetMaster方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnPlayerLogin
void RandomPlayerbotMgr::OnPlayerLogin(Player* player)
{
for (PlayerBotMap::const_iterator it = GetPlayerBotsBegin(); it != GetPlayerBotsEnd(); ++it)
{
Player* const bot = it->second;
if (player == bot || player->GetPlayerbotAI())
continue;
Group* group = bot->GetGroup();
if (!group)
continue;
for (GroupReference *gref = group->GetFirstMember(); gref; gref = gref->next())
{
Player* member = gref->getSource();
PlayerbotAI* ai = bot->GetPlayerbotAI();
if (member == player && (!ai->GetMaster() || ai->GetMaster()->GetPlayerbotAI()))
{
ai->SetMaster(player);
ai->ResetStrategies();
ai->TellMaster("Hello");
break;
}
}
}
if (!player->GetPlayerbotAI())
players.push_back(player);
}
示例2: OnPlayerLogout
void RandomPlayerbotMgr::OnPlayerLogout(Player* player)
{
for (PlayerBotMap::const_iterator it = GetPlayerBotsBegin(); it != GetPlayerBotsEnd(); ++it)
{
Player* const bot = it->second;
PlayerbotAI* ai = bot->GetPlayerbotAI();
if (player == ai->GetMaster())
{
ai->SetMaster(NULL);
ai->ResetStrategies();
}
}
if (!player->GetPlayerbotAI())
{
vector<Player*>::iterator i = find(players.begin(), players.end(), player);
if (i != players.end())
players.erase(i);
}
}
示例3: HealTarget
bool PlayerbotPaladinAI::HealTarget(Unit &target, uint8 hp)
{
PlayerbotAI* ai = GetAI();
if (!ai)
return false;
Player* pMaster = ai->GetMaster();
if (!pMaster)
return false;
if ((hp < 40)
&& (HOLY_LIGHT > 0)
&& (ai->GetManaPercent() >= 34)
&& (ai->CastSpell(HOLY_LIGHT, target)))
return true;
if ((hp < 35)
&& (HOLY_SHOCK > 0)
&& (ai->GetManaPercent() >= 21)
&& (ai->CastSpell(HOLY_SHOCK, target)))
return true;
if ((hp < 30)
&& (FLASH_OF_LIGHT > 0)
&& (ai->GetManaPercent() >= 8)
&& (ai->CastSpell(FLASH_OF_LIGHT, target)))
return true;
if ((hp < 25)
&& (LAY_ON_HANDS > 0)
&& (ai->GetHealthPercent() > 30)
&& (ai->GetManaPercent() >= 8)
&& (ai->CastSpell(LAY_ON_HANDS, target)))
return true;
return false;
}
示例4: DoNonCombatActions
void PlayerbotPaladinAI::DoNonCombatActions()
{
PlayerbotAI* ai = GetAI();
Player * m_bot = GetPlayerBot();
if (!m_bot)
return;
// Buff myself
if (ai->GetCombatOrder() == ai->ORDERS_TANK)
ai->SelfBuff(RIGHTEOUS_FURY);
BuffPlayer(m_bot);
// Buff master
BuffPlayer(ai->GetMaster());
// mana check
if (m_bot->getStandState() != UNIT_STAND_STATE_STAND)
m_bot->SetStandState(UNIT_STAND_STATE_STAND);
Item* pItem = ai->FindDrink();
Item* fItem = ai->FindBandage();
if (pItem != NULL && ai->GetManaPercent() < 40)
{
ai->TellMaster("I could use a drink.");
ai->UseItem(pItem);
return;
}
// hp check original
if (m_bot->getStandState() != UNIT_STAND_STATE_STAND)
m_bot->SetStandState(UNIT_STAND_STATE_STAND);
pItem = ai->FindFood();
if (pItem != NULL && ai->GetHealthPercent() < 40)
{
ai->TellMaster("I could use some food.");
ai->UseItem(pItem);
return;
}
else if (pItem == NULL && fItem != NULL && !m_bot->HasAura(RECENTLY_BANDAGED, EFFECT_INDEX_0) && ai->GetHealthPercent() < 70)
{
ai->TellMaster("I could use first aid.");
ai->UseItem(fItem);
return;
}
// heal and buff group
if (GetMaster()->GetGroup())
{
Group::MemberSlotList const& groupSlot = GetMaster()->GetGroup()->GetMemberSlots();
for (Group::member_citerator itr = groupSlot.begin(); itr != groupSlot.end(); itr++)
{
Player *tPlayer = sObjectMgr.GetPlayer(itr->guid);
if (!tPlayer)
continue;
if (!tPlayer->isAlive())
{
if (ai->CastSpell(REDEMPTION, *tPlayer))
{
std::string msg = "Resurrecting ";
msg += tPlayer->GetName();
m_bot->Say(msg, LANG_UNIVERSAL);
return;
}
else
continue;
}
if (HealTarget(tPlayer))
return;
if (tPlayer != m_bot && tPlayer != GetMaster())
if (BuffPlayer(tPlayer))
return;
}
}
}
示例5: HealTarget
bool PlayerbotDruidAI::HealTarget(Unit &target, uint8 hp)
{
PlayerbotAI* ai = GetAI();
if (!ai)
return false;
Player* pMaster = ai->GetMaster();
if (!pMaster)
return false;
Player *m_bot = GetPlayerBot();
if ((hp < 70)
&& (REJUVENATION > 0)
&& (!target.HasAura(REJUVENATION, EFFECT_INDEX_0))
&& (!target.HasAura(REGROWTH, EFFECT_INDEX_0))
&& (ai->GetManaPercent() >= 21)
&& (ai->CastSpell(REJUVENATION, target)))
return true;
if ((hp < 60)
&& (LIFEBLOOM > 0)
&& (!target.HasAura(LIFEBLOOM, EFFECT_INDEX_0))
&& (ai->GetManaPercent() >= 28)
&& (ai->CastSpell(LIFEBLOOM, target)))
return true;
if ((hp < 55)
&& (REGROWTH > 0)
&& (!target.HasAura(REGROWTH, EFFECT_INDEX_0))
&& (!target.HasAura(REJUVENATION, EFFECT_INDEX_0))
&& (ai->GetManaPercent() >= 33)
&& (ai->CastSpell(REGROWTH, target)))
return true;
if ((hp < 50)
&& (SWIFTMEND > 0)
&& (target.HasAura(REJUVENATION, EFFECT_INDEX_0) || target.HasAura(REGROWTH, EFFECT_INDEX_0))
&& (ai->GetManaPercent() >= 16)
&& (ai->CastSpell(SWIFTMEND, target)))
return true;
if ((hp < 45)
&& (WILD_GROWTH > 0)
&& (!target.HasAura(WILD_GROWTH, EFFECT_INDEX_0))
&& (ai->GetManaPercent() >= 26)
&& (ai->CastSpell(WILD_GROWTH, target)))
return true;
if ((hp < 30)
&& (NOURISH > 0)
&& (ai->GetManaPercent() >= 18)
&& (ai->CastSpell(NOURISH, target)))
return true;
if ((hp < 25)
&& (HEALING_TOUCH > 0)
&& (ai->GetManaPercent() >= 38)
&& (ai->CastSpell(HEALING_TOUCH, target)))
return true;
return false;
}
示例6: DoNonCombatActions
bool PlayerbotDruidAI::DoNonCombatActions()
{
Player * m_bot = GetPlayerBot();
if (!m_bot)
return false;
PlayerbotAI* ai = GetAI();
if (!ai)
return false;
Player* pMaster = ai->GetMaster();
if (!pMaster)
return false;
if (m_bot->HasAura(CAT_FORM, EFFECT_INDEX_0))
m_bot->RemoveAurasDueToSpell(768);
if (m_bot->HasAura(BEAR_FORM, EFFECT_INDEX_0))
m_bot->RemoveAurasDueToSpell(5487);
if (m_bot->HasAura(DIRE_BEAR_FORM, EFFECT_INDEX_0))
m_bot->RemoveAurasDueToSpell(9634);
if (m_bot->HasAura(MOONKIN_FORM, EFFECT_INDEX_0))
m_bot->RemoveAurasDueToSpell(24858);
if ((MARK_OF_THE_WILD > 0)
&& (!m_bot->HasAura(MARK_OF_THE_WILD, EFFECT_INDEX_0))
&& (ai->CastSpell(MARK_OF_THE_WILD, *m_bot)))
return true;
if ((THORNS > 0)
&& (!m_bot->HasAura(THORNS, EFFECT_INDEX_0))
&& (ai->CastSpell(THORNS, *m_bot)))
return true;
if (m_bot->getStandState() != UNIT_STAND_STATE_STAND)
m_bot->SetStandState(UNIT_STAND_STATE_STAND);
Item* drinkOrFoodItem = ai->FindDrink();
Item* bandageItem = ai->FindBandage();
if (drinkOrFoodItem
&& (ai->GetManaPercent() < 30))
{
ai->UseItem(*drinkOrFoodItem);
ai->SetIgnoreUpdateTime(30);
return true;
}
if (!drinkOrFoodItem
&& (INNERVATE > 0)
&& (!m_bot->HasAura(INNERVATE, EFFECT_INDEX_0))
&& (ai->GetManaPercent() <= 70)
&& (ai->CastSpell(INNERVATE, *m_bot)))
return true;
if (!drinkOrFoodItem
&& (MANA_REJUVENATION > 0)
&& (!m_bot->HasAura(INNERVATE, EFFECT_INDEX_0))
&& (!m_bot->HasAura(MANA_REJUVENATION, EFFECT_INDEX_0))
&& (ai->GetManaPercent() <= 70)
&& (ai->CastSpell(MANA_REJUVENATION, *m_bot)))
return true;
if (m_bot->getStandState() != UNIT_STAND_STATE_STAND)
m_bot->SetStandState(UNIT_STAND_STATE_STAND);
drinkOrFoodItem = ai->FindFood();
if (drinkOrFoodItem
&& (ai->GetHealthPercent() < 30))
{
ai->UseItem(*drinkOrFoodItem);
ai->SetIgnoreUpdateTime(30);
return true;
}
if (!drinkOrFoodItem
&& bandageItem
&& (!m_bot->HasAura(RECENTLY_BANDAGED, EFFECT_INDEX_0))
&& (ai->GetHealthPercent() < 70))
{
ai->UseItem(*bandageItem);
ai->SetIgnoreUpdateTime(8);
return true;
}
if (pMaster->GetGroup())
{
Group::MemberSlotList const& groupSlot = pMaster->GetGroup()->GetMemberSlots();
for (Group::member_citerator itr = groupSlot.begin(); itr != groupSlot.end(); itr++)
{
Player *tPlayer = sObjectMgr.GetPlayer(itr->guid);
if (!tPlayer || !tPlayer->isAlive())
continue;
if ((!tPlayer->HasAura(MARK_OF_THE_WILD, EFFECT_INDEX_0))
&& (ai->CastSpell(MARK_OF_THE_WILD, *tPlayer)))
return true;
if (HealTarget(*tPlayer, tPlayer->GetHealth() * 100 / tPlayer->GetMaxHealth()))
return true;
}
//.........这里部分代码省略.........
示例7: DoNextCombatManeuver
bool PlayerbotDruidAI::DoNextCombatManeuver(Unit *pTarget)
{
PlayerbotAI* ai = GetAI();
if (!ai)
return false;
Player* pMaster = ai->GetMaster();
if (!pMaster)
return false;
uint32 masterHP = pMaster->GetHealth() * 100 / pMaster->GetMaxHealth();
ai->SetInFront(pTarget);
Player *m_bot = GetPlayerBot();
Unit* pVictim = pTarget->getVictim();
if (pVictim
&& (ai->GetHealthPercent() >= 40)
&& (pMaster->GetHealth() >= pMaster->GetMaxHealth() * 0.4))
{
if (pVictim == m_bot)
SpellSequence = DruidTank;
}
else if (pVictim
&& (pTarget->GetHealth() > pTarget->GetMaxHealth() * 0.8))
{
if (pVictim != m_bot)
SpellSequence = DruidSpell;
}
else if (ai->GetHealthPercent() <= 40 || pMaster->GetHealth() <= pMaster->GetMaxHealth() * 0.4)
SpellSequence = DruidHeal;
else
SpellSequence = DruidCombat;
switch (SpellSequence)
{
case DruidTank:
m_bot->SetInFront(pTarget);
if (pVictim)
pVictim->Attack(pTarget, true);
if (m_bot->HasAura(CAT_FORM, EFFECT_INDEX_0))
m_bot->RemoveAurasDueToSpell(768);
if ((MOONKIN_FORM > 0)
&& (!m_bot->HasAura(MOONKIN_FORM, EFFECT_INDEX_0))
&& (ai->CastSpell(MOONKIN_FORM)))
return true;
if ((DIRE_BEAR_FORM > 0)
&& (!m_bot->HasAura(MOONKIN_FORM, EFFECT_INDEX_0))
&& (!m_bot->HasAura(DIRE_BEAR_FORM, EFFECT_INDEX_0))
&& (ai->CastSpell(DIRE_BEAR_FORM)))
return true;
if ((BEAR_FORM > 0)
&& (!m_bot->HasAura(MOONKIN_FORM, EFFECT_INDEX_0))
&& (!m_bot->HasAura(DIRE_BEAR_FORM, EFFECT_INDEX_0))
&& (!m_bot->HasAura(BEAR_FORM, EFFECT_INDEX_0))
&& (ai->CastSpell(BEAR_FORM)))
return true;
if ((DEMORALIZING_ROAR > 0)
&& ((m_bot->HasAura(DIRE_BEAR_FORM, EFFECT_INDEX_0))|| m_bot->HasAura(BEAR_FORM, EFFECT_INDEX_0))
&& (!m_bot->HasAura(MOONKIN_FORM, EFFECT_INDEX_0))
&& (!pTarget->HasAura(DEMORALIZING_ROAR, EFFECT_INDEX_0))
&& (ai->GetRageAmount() >= 10)
&& (ai->CastSpell(DEMORALIZING_ROAR, *pTarget)))
return true;
if ((FAERIE_FIRE > 0)
&& (DruidSpellCombat < 1)
&& (!pTarget->HasAura(FAERIE_FIRE, EFFECT_INDEX_0))
&& (ai->CastSpell(FAERIE_FIRE, *pTarget)))
{
DruidSpellCombat++;
return true;
}
if ((MOONFIRE > 0)
&& (m_bot->HasAura(MOONKIN_FORM, EFFECT_INDEX_0))
&& (DruidSpellCombat < 2)
&& (!pTarget->HasAura(MOONFIRE, EFFECT_INDEX_0))
&& (ai->GetManaPercent() >= 24)
&& (ai->CastSpell(MOONFIRE, *pTarget)))
{
DruidSpellCombat++;
return true;
}
if ((ROOTS > 0)
&& (m_bot->HasAura(MOONKIN_FORM, EFFECT_INDEX_0))
&& (DruidSpellCombat < 3)
&& (!pTarget->HasAura(ROOTS, EFFECT_INDEX_0))
&& (ai->GetManaPercent() >= 8)
&& (ai->CastSpell(ROOTS, *pTarget)))
{
DruidSpellCombat++;
return true;
//.........这里部分代码省略.........
示例8: DoNonCombatActions
bool PlayerbotPaladinAI::DoNonCombatActions()
{
PlayerbotAI* ai = GetAI();
if (!ai)
return false;
Player* pMaster = ai->GetMaster();
if (!pMaster)
return false;
Player * m_bot = GetPlayerBot();
if (!m_bot)
return false;
if ((GREATER_BLESSING_OF_MIGHT > 0)
&& (!m_bot->HasAura(GREATER_BLESSING_OF_MIGHT, EFFECT_INDEX_0))
&& (ai->CastSpell(GREATER_BLESSING_OF_MIGHT, *m_bot)))
return true;
if ((BLESSING_OF_MIGHT > 0)
&& (!m_bot->HasAura(GREATER_BLESSING_OF_MIGHT, EFFECT_INDEX_0))
&& (!m_bot->HasAura(BLESSING_OF_MIGHT, EFFECT_INDEX_0))
&& (ai->CastSpell(BLESSING_OF_MIGHT, *m_bot)))
return true;
if ((DIVINE_FAVOR > 0)
&& (!m_bot->HasAura(DIVINE_FAVOR, EFFECT_INDEX_0))
&& (ai->GetManaPercent() >= 3)
&& (ai->CastSpell(DIVINE_FAVOR , *m_bot)))
return true;
if ((BLESSING_OF_WISDOM > 0)
&& (pMaster->getClass() == CLASS_PRIEST)
&& (!pMaster->HasAura(GREATER_BLESSING_OF_WISDOM, EFFECT_INDEX_0))
&& (!pMaster->HasAura(BLESSING_OF_WISDOM, EFFECT_INDEX_0))
&& (ai->CastSpell(BLESSING_OF_WISDOM, * (pMaster))))
return true;
if ((GREATER_BLESSING_OF_WISDOM > 0)
&& (pMaster->getClass() == CLASS_PRIEST)
&& (!pMaster->HasAura(GREATER_BLESSING_OF_WISDOM, EFFECT_INDEX_0))
&& (ai->CastSpell(GREATER_BLESSING_OF_WISDOM, * (pMaster))))
return true;
if ((BLESSING_OF_WISDOM > 0)
&& (pMaster->getClass() == CLASS_MAGE)
&& (!pMaster->HasAura(GREATER_BLESSING_OF_WISDOM, EFFECT_INDEX_0))
&& (!pMaster->HasAura(BLESSING_OF_WISDOM, EFFECT_INDEX_0))
&& (ai->CastSpell(BLESSING_OF_WISDOM, * (pMaster))))
return true;
if ((GREATER_BLESSING_OF_WISDOM > 0)
&& (pMaster->getClass() == CLASS_MAGE)
&& (!pMaster->HasAura(GREATER_BLESSING_OF_WISDOM, EFFECT_INDEX_0))
&& (ai->CastSpell(GREATER_BLESSING_OF_WISDOM, * (pMaster))))
return true;
if ((BLESSING_OF_WISDOM > 0)
&& (pMaster->getClass() == CLASS_PALADIN)
&& (!pMaster->HasAura(GREATER_BLESSING_OF_WISDOM, EFFECT_INDEX_0))
&& (!pMaster->HasAura(BLESSING_OF_WISDOM, EFFECT_INDEX_0))
&& (ai->CastSpell(BLESSING_OF_WISDOM, * (pMaster))))
return true;
if ((GREATER_BLESSING_OF_WISDOM > 0)
&& (pMaster->getClass() == CLASS_PALADIN)
&& (!pMaster->HasAura(GREATER_BLESSING_OF_WISDOM, EFFECT_INDEX_0))
&& (ai->CastSpell(GREATER_BLESSING_OF_WISDOM, * (pMaster))))
return true;
if ((BLESSING_OF_WISDOM > 0)
&& (pMaster->getClass() == CLASS_WARLOCK)
&& (!pMaster->HasAura(GREATER_BLESSING_OF_WISDOM, EFFECT_INDEX_0))
&& (!pMaster->HasAura(BLESSING_OF_WISDOM, EFFECT_INDEX_0))
&& (ai->CastSpell(BLESSING_OF_WISDOM, * (pMaster))))
return true;
if ((GREATER_BLESSING_OF_WISDOM > 0)
&& (pMaster->getClass() == CLASS_WARLOCK)
&& (!pMaster->HasAura(GREATER_BLESSING_OF_WISDOM, EFFECT_INDEX_0))
&& (ai->CastSpell(GREATER_BLESSING_OF_WISDOM, * (pMaster))))
return true;
if ((BLESSING_OF_MIGHT > 0)
&& (pMaster->getClass() == CLASS_WARRIOR)
&& (!pMaster->HasAura(GREATER_BLESSING_OF_MIGHT, EFFECT_INDEX_0))
&& (!pMaster->HasAura(BLESSING_OF_MIGHT, EFFECT_INDEX_0))
&& (!pMaster->HasAura(DEFENSIVE_STANCE, EFFECT_INDEX_0))
&& (ai->CastSpell(BLESSING_OF_MIGHT, * (pMaster))))
return true;
if ((GREATER_BLESSING_OF_MIGHT > 0)
&& (pMaster->getClass() == CLASS_WARRIOR)
&& (!pMaster->HasAura(GREATER_BLESSING_OF_MIGHT, EFFECT_INDEX_0))
&& (!pMaster->HasAura(DEFENSIVE_STANCE, EFFECT_INDEX_0))
&& (ai->CastSpell(GREATER_BLESSING_OF_MIGHT, * (pMaster))))
return true;
if ((BLESSING_OF_KINGS > 0)
&& (pMaster->getClass() == CLASS_WARRIOR)
//.........这里部分代码省略.........
示例9: DoNextCombatManeuver
bool PlayerbotPaladinAI::DoNextCombatManeuver(Unit *pTarget)
{
Unit* pVictim = pTarget->getVictim();
PlayerbotAI* ai = GetAI();
if (!ai)
return false;
Player* pMaster = ai->GetMaster();
if (!pMaster)
return false;
ai->SetInFront(pTarget);
Player *m_bot = GetPlayerBot();
Group *m_group = m_bot->GetGroup();
float dist = m_bot->GetDistance(pTarget);
uint32 masterHP = pMaster->GetHealth() * 100 / pMaster->GetMaxHealth();
if (pMaster->isAlive())
{
if ((masterHP < 25)
&& (HAND_OF_PROTECTION > 0)
&& (!pMaster->HasAura(FORBEARANCE, EFFECT_INDEX_0))
&& (!pMaster->HasAura(HAND_OF_PROTECTION, EFFECT_INDEX_0))
&& (!pMaster->HasAura(DIVINE_PROTECTION, EFFECT_INDEX_0))
&& (!pMaster->HasAura(DIVINE_SHIELD, EFFECT_INDEX_0))
&& (ai->CastSpell(HAND_OF_PROTECTION, *pMaster)))
return true;
}
if (m_group
&& (pVictim != m_bot))
{
Group::MemberSlotList const& groupSlot = m_group->GetMemberSlots();
for (Group::member_citerator itr = groupSlot.begin(); itr != groupSlot.end(); itr++)
{
Player *m_groupMember = sObjectMgr.GetPlayer(itr->guid);
if (!m_groupMember || !m_groupMember->isAlive())
continue;
uint32 memberHP = m_groupMember->GetHealth() * 100 / m_groupMember->GetMaxHealth();
if ((memberHP < 40)
&& (ai->GetManaPercent() >= 40)
&& (HealTarget(*m_groupMember, memberHP)))
return true;
}
}
if ((RIGHTEOUS_FURY > 0)
&& (!m_bot->HasAura(RIGHTEOUS_FURY, EFFECT_INDEX_0))
&& (ai->CastSpell(RIGHTEOUS_FURY, *m_bot)))
return true;
if ((SHADOW_RESISTANCE_AURA > 0)
&& (!m_bot->HasAura(SHADOW_RESISTANCE_AURA, EFFECT_INDEX_0))
&& (pTarget->getClass() == CLASS_WARLOCK)
&& (ai->CastSpell(SHADOW_RESISTANCE_AURA, *m_bot)))
return true;
if ((DEVOTION_AURA > 0)
&& (!m_bot->HasAura(DEVOTION_AURA, EFFECT_INDEX_0))
&& (pTarget->getClass() == CLASS_WARRIOR)
&& (ai->CastSpell(DEVOTION_AURA, *m_bot)))
return true;
if ((FIRE_RESISTANCE_AURA > 0)
&& (!m_bot->HasAura(FIRE_RESISTANCE_AURA, EFFECT_INDEX_0))
&& (pTarget->getClass() == CLASS_MAGE)
&& (ai->CastSpell(FIRE_RESISTANCE_AURA, *m_bot)))
return true;
if ((RETRIBUTION_AURA > 0)
&& (!m_bot->HasAura(RETRIBUTION_AURA, EFFECT_INDEX_0))
&& (pTarget->getClass() == CLASS_PRIEST)
&& (ai->CastSpell(RETRIBUTION_AURA, *m_bot)))
return true;
if ((DEVOTION_AURA > 0)
&& (!m_bot->HasAura(DEVOTION_AURA, EFFECT_INDEX_0))
&& (pTarget->getClass() == CLASS_SHAMAN)
&& (ai->CastSpell(DEVOTION_AURA, *m_bot)))
return true;
if ((DEVOTION_AURA > 0)
&& (!m_bot->HasAura(DEVOTION_AURA, EFFECT_INDEX_0))
&& (pTarget->getClass() == CLASS_ROGUE)
&& (ai->CastSpell(DEVOTION_AURA, *m_bot)))
return true;
if ((DEVOTION_AURA > 0)
&& (!m_bot->HasAura(DEVOTION_AURA, EFFECT_INDEX_0))
&& (pTarget->getClass() == CLASS_PALADIN)
&& (ai->CastSpell(DEVOTION_AURA, *m_bot)))
return true;
if ((ai->GetHealthPercent() <= 40) || (pMaster->GetHealth() <= (pMaster->GetMaxHealth() * 0.4)))
SpellSequence = Healing;
else
SpellSequence = Combat;
//.........这里部分代码省略.........