mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-12-01 21:12:50 +08:00
[Initialization] Glyphs remove and dual spec
This commit is contained in:
@@ -1495,6 +1495,8 @@ void TravelTarget::setStatus(TravelStatus status)
|
||||
break;
|
||||
case TRAVEL_STATUS_COOLDOWN:
|
||||
statusTime = tDestination->getCooldownDelay();
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3687,7 +3689,7 @@ void TravelMgr::LoadQuestTravelTable()
|
||||
}
|
||||
}
|
||||
else
|
||||
"all";
|
||||
out << "all";
|
||||
|
||||
out << "\n";
|
||||
}
|
||||
|
||||
@@ -23,10 +23,15 @@ bool ChangeTalentsAction::Execute(Event event)
|
||||
if (param.find("help") != std::string::npos) {
|
||||
out << TalentsHelp();
|
||||
} else if (param.find("switch") != std::string::npos) {
|
||||
if (param.find("switch 1")) {
|
||||
if (param.find("switch 1") != std::string::npos) {
|
||||
bot->ActivateSpec(0);
|
||||
out << "Active first talent";
|
||||
} else if (param.find("switch 2")) {
|
||||
} else if (param.find("switch 2") != std::string::npos) {
|
||||
if (bot->GetSpecsCount() == 1 && bot->GetLevel() >= sWorld->getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL))
|
||||
{
|
||||
bot->CastSpell(bot, 63680, true, nullptr, nullptr, bot->GetGUID());
|
||||
bot->CastSpell(bot, 63624, true, nullptr, nullptr, bot->GetGUID());
|
||||
}
|
||||
bot->ActivateSpec(1);
|
||||
out << "Active second talent";
|
||||
}
|
||||
|
||||
@@ -115,6 +115,7 @@ class ChatActionContext : public NamedObjectContext<Action>
|
||||
creators["de"] = &ChatActionContext::dead;
|
||||
creators["trainer"] = &ChatActionContext::trainer;
|
||||
creators["maintenance"] = &ChatActionContext::maintenance;
|
||||
creators["remove glyph"] = &ChatActionContext::remove_glyph;
|
||||
creators["autogear"] = &ChatActionContext::autogear;
|
||||
creators["equip upgrade"] = &ChatActionContext::equip_upgrade;
|
||||
creators["attack my target"] = &ChatActionContext::attack_my_target;
|
||||
@@ -215,6 +216,7 @@ class ChatActionContext : public NamedObjectContext<Action>
|
||||
static Action* attack_my_target(PlayerbotAI* botAI) { return new AttackMyTargetAction(botAI); }
|
||||
static Action* trainer(PlayerbotAI* botAI) { return new TrainerAction(botAI); }
|
||||
static Action* maintenance(PlayerbotAI* botAI) { return new MaintenanceAction(botAI); }
|
||||
static Action* remove_glyph(PlayerbotAI* botAI) { return new RemoveGlyphAction(botAI); }
|
||||
static Action* autogear(PlayerbotAI* botAI) { return new AutoGearAction(botAI); }
|
||||
static Action* equip_upgrade(PlayerbotAI* botAI) { return new EquipUpgradeAction(botAI); }
|
||||
static Action* co(PlayerbotAI* botAI) { return new ChangeCombatStrategyAction(botAI); }
|
||||
|
||||
@@ -175,6 +175,15 @@ bool MaintenanceAction::Execute(Event event)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RemoveGlyphAction::Execute(Event event)
|
||||
{
|
||||
for (uint32 slotIndex = 0; slotIndex < MAX_GLYPH_SLOT_INDEX; ++slotIndex)
|
||||
{
|
||||
bot->SetGlyph(slotIndex, 0, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AutoGearAction::Execute(Event event)
|
||||
{
|
||||
if (!sPlayerbotAIConfig->autoGearCommand) {
|
||||
|
||||
@@ -35,6 +35,13 @@ class MaintenanceAction : public Action
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
class RemoveGlyphAction : public Action
|
||||
{
|
||||
public:
|
||||
RemoveGlyphAction(PlayerbotAI* botAI) : Action(botAI, "remove glyph") { }
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
class AutoGearAction : public Action
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -89,6 +89,7 @@ ChatCommandHandlerStrategy::ChatCommandHandlerStrategy(PlayerbotAI* botAI) : Pas
|
||||
supported.push_back("de");
|
||||
supported.push_back("trainer");
|
||||
supported.push_back("maintenance");
|
||||
supported.push_back("remove glyph");
|
||||
supported.push_back("autogear");
|
||||
supported.push_back("equip upgrade");
|
||||
supported.push_back("chat");
|
||||
|
||||
@@ -55,6 +55,7 @@ class ChatTriggerContext : public NamedObjectContext<Trigger>
|
||||
creators["de"] = &ChatTriggerContext::dead;
|
||||
creators["trainer"] = &ChatTriggerContext::trainer;
|
||||
creators["maintenance"] = &ChatTriggerContext::maintenance;
|
||||
creators["remove glyph"] = &ChatTriggerContext::remove_glyph;
|
||||
creators["autogear"] = &ChatTriggerContext::autogear;
|
||||
creators["equip upgrade"] = &ChatTriggerContext::equip_upgrade;
|
||||
creators["attack"] = &ChatTriggerContext::attack;
|
||||
@@ -168,6 +169,7 @@ class ChatTriggerContext : public NamedObjectContext<Trigger>
|
||||
static Trigger* attack(PlayerbotAI* botAI) { return new ChatCommandTrigger(botAI, "attack"); }
|
||||
static Trigger* trainer(PlayerbotAI* botAI) { return new ChatCommandTrigger(botAI, "trainer"); }
|
||||
static Trigger* maintenance(PlayerbotAI* botAI) { return new ChatCommandTrigger(botAI, "maintenance"); }
|
||||
static Trigger* remove_glyph(PlayerbotAI* botAI) { return new ChatCommandTrigger(botAI, "remove glyph"); }
|
||||
static Trigger* autogear(PlayerbotAI* botAI) { return new ChatCommandTrigger(botAI, "autogear"); }
|
||||
static Trigger* equip_upgrade(PlayerbotAI* botAI) { return new ChatCommandTrigger(botAI, "equip upgrade"); }
|
||||
static Trigger* co(PlayerbotAI* botAI) { return new ChatCommandTrigger(botAI, "co"); }
|
||||
|
||||
Reference in New Issue
Block a user