mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
druid caster form
This commit is contained in:
@@ -2206,8 +2206,15 @@ bool PlayerbotAI::CanCastSpell(uint32 spellid, Unit* target, bool checkHasSpell,
|
||||
case SPELL_FAILED_MOVING:
|
||||
case SPELL_FAILED_TRY_AGAIN:
|
||||
case SPELL_CAST_OK:
|
||||
case SPELL_FAILED_NOT_SHAPESHIFT:
|
||||
return true;
|
||||
default:
|
||||
// if (!sPlayerbotAIConfig->logInGroupOnly || bot->GetGroup()) {
|
||||
// if (result != SPELL_FAILED_NOT_READY && result != SPELL_CAST_OK) {
|
||||
// LOG_DEBUG("playerbots", "CanCastSpell Check Failed. - target name: {}, spellid: {}, bot name: {}, result: {}",
|
||||
// target->GetName(), spellid, bot->GetName(), result);
|
||||
// }
|
||||
// }
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1188,6 +1188,9 @@ void PlayerbotFactory::InitEquipment(bool incremental)
|
||||
for (uint32 requiredLevel = bot->GetLevel(); requiredLevel > std::max((int32)bot->GetLevel() - delta, 0); requiredLevel--) {
|
||||
for (InventoryType inventoryType : GetPossibleInventoryTypeListBySlot((EquipmentSlots)slot)) {
|
||||
for (uint32 itemId : sRandomItemMgr->GetCachedEquipments(requiredLevel, inventoryType)) {
|
||||
if (itemId == 46978) { // shaman earth ring totem
|
||||
continue;
|
||||
}
|
||||
ItemTemplate const* proto = sObjectMgr->GetItemTemplate(itemId);
|
||||
if (!proto)
|
||||
continue;
|
||||
|
||||
@@ -292,13 +292,13 @@ bool ListSpellsAction::Execute(Event event)
|
||||
{
|
||||
botAI->TellMasterNoFacing(i->second);
|
||||
|
||||
if (++count >= 50)
|
||||
{
|
||||
std::ostringstream msg;
|
||||
msg << (spells.size() - 50) << " more...";
|
||||
botAI->TellMasterNoFacing(msg.str());
|
||||
break;
|
||||
}
|
||||
// if (++count >= 50)
|
||||
// {
|
||||
// std::ostringstream msg;
|
||||
// msg << (spells.size() - 50) << " more...";
|
||||
// botAI->TellMasterNoFacing(msg.str());
|
||||
// break;
|
||||
// }
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -31,7 +31,7 @@ bool CastTravelFormAction::isUseful()
|
||||
bool CastCasterFormAction::isUseful()
|
||||
{
|
||||
return botAI->HasAnyAuraOf(GetTarget(), "dire bear form", "bear form", "cat form", "travel form", "aquatic form",
|
||||
"flight form", "swift flight form", "moonkin form", nullptr);
|
||||
"flight form", "swift flight form", "moonkin form", nullptr) && AI_VALUE2(uint8, "mana", "self target") > sPlayerbotAIConfig->mediumHealth;
|
||||
}
|
||||
|
||||
bool CastCasterFormAction::Execute(Event event)
|
||||
|
||||
@@ -54,14 +54,14 @@ class GenericDruidNonCombatStrategyActionNodeFactory : public NamedObjectFactory
|
||||
static ActionNode* regrowth_on_party(PlayerbotAI* ai)
|
||||
{
|
||||
return new ActionNode ("regrowth on party",
|
||||
/*P*/ NextAction::array(0, new NextAction("caster form"), NULL),
|
||||
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
|
||||
/*A*/ NULL,
|
||||
/*C*/ NULL);
|
||||
}
|
||||
static ActionNode* rejuvenation_on_party(PlayerbotAI* ai)
|
||||
{
|
||||
return new ActionNode ("rejuvenation on party",
|
||||
/*P*/ NextAction::array(0, new NextAction("caster form"), NULL),
|
||||
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
|
||||
/*A*/ NULL,
|
||||
/*C*/ NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user