mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 09:07:19 +00:00
Merge pull request #367 from liyunfan1223/self-command
Fix .playerbot bot self
This commit is contained in:
@@ -19,7 +19,7 @@ bool InviteToGroupAction::Execute(Event event)
|
||||
|
||||
bool InviteToGroupAction::Invite(Player* player)
|
||||
{
|
||||
if (!player)
|
||||
if (!player || !player->IsInWorld())
|
||||
return false;
|
||||
|
||||
if (!GET_PLAYERBOT_AI(player) && !botAI->GetSecurity()->CheckLevelFor(PLAYERBOT_SECURITY_INVITE, true, player))
|
||||
|
||||
@@ -74,7 +74,7 @@ bool SellAction::Execute(Event event)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (text == "all")
|
||||
if (text != "")
|
||||
{
|
||||
std::vector<Item *> items = parseItems(text, ITERATE_ITEMS_IN_BAGS);
|
||||
for (Item *item : items)
|
||||
@@ -84,7 +84,7 @@ bool SellAction::Execute(Event event)
|
||||
return true;
|
||||
}
|
||||
|
||||
botAI->TellError("Usage: s gray/*/vendor/all");
|
||||
botAI->TellError("Usage: s gray/*/vendor/[item link]");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -172,6 +172,7 @@ bool MaintenanceAction::Execute(Event event)
|
||||
factory.ApplyEnchantAndGemsNew();
|
||||
}
|
||||
bot->DurabilityRepairAll(false, 1.0f, false);
|
||||
bot->SendTalentsInfoData(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -181,6 +182,7 @@ bool RemoveGlyphAction::Execute(Event event)
|
||||
{
|
||||
bot->SetGlyph(slotIndex, 0, true);
|
||||
}
|
||||
bot->SendTalentsInfoData(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -88,10 +88,10 @@ class FreezingTrapTrigger : public HasCcTargetTrigger
|
||||
FreezingTrapTrigger(PlayerbotAI* botAI) : HasCcTargetTrigger(botAI, "freezing trap") { }
|
||||
};
|
||||
|
||||
class RapidFireTrigger : public BuffTrigger
|
||||
class RapidFireTrigger : public BoostTrigger
|
||||
{
|
||||
public:
|
||||
RapidFireTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "rapid fire") { }
|
||||
RapidFireTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "rapid fire") { }
|
||||
};
|
||||
|
||||
class TrueshotAuraTrigger : public BuffTrigger
|
||||
|
||||
@@ -180,7 +180,7 @@ void MageBoostStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
triggers.push_back(new TriggerNode("icy veins", NextAction::array(0, new NextAction("icy veins", 50.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("presence of mind", NextAction::array(0, new NextAction("presence of mind", 42.0f), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("arcane power", NextAction::array(0, new NextAction("arcane power", 41.0f), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("mirror image", NextAction::array(0, new NextAction("mirror image", 41.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("mirror image", NextAction::array(0, new NextAction("mirror image", 41.0f), nullptr)));
|
||||
}
|
||||
|
||||
void MageCcStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "ChatHelper.h"
|
||||
#include "Playerbots.h"
|
||||
#include "Vehicle.h"
|
||||
#include "World.h"
|
||||
|
||||
SpellIdValue::SpellIdValue(PlayerbotAI* botAI) : CalculatedValue<uint32>(botAI, "spell id", 20 * 1000)
|
||||
{
|
||||
@@ -34,7 +35,7 @@ uint32 SpellIdValue::Calculate()
|
||||
char firstSymbol = tolower(namepart[0]);
|
||||
int spellLength = wnamepart.length();
|
||||
|
||||
LocaleConstant loc = bot->GetSession()->GetSessionDbcLocale();
|
||||
LocaleConstant loc = LOCALE_enUS;
|
||||
|
||||
std::set<uint32> spellIds;
|
||||
for (PlayerSpellMap::iterator itr = bot->GetSpellMap().begin(); itr != bot->GetSpellMap().end(); ++itr)
|
||||
|
||||
Reference in New Issue
Block a user