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