mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
quest share
This commit is contained in:
@@ -134,7 +134,7 @@ PlayerbotAI::PlayerbotAI(Player* bot) : PlayerbotAIBase(true), bot(bot), chatHel
|
||||
masterIncomingPacketHandlers.AddHandler(CMSG_TAXICLEARNODE, "taxi done");
|
||||
masterIncomingPacketHandlers.AddHandler(CMSG_GROUP_UNINVITE, "uninvite");
|
||||
masterIncomingPacketHandlers.AddHandler(CMSG_GROUP_UNINVITE_GUID, "uninvite guid");
|
||||
// masterIncomingPacketHandlers.AddHandler(CMSG_PUSHQUESTTOPARTY, "quest share");
|
||||
masterIncomingPacketHandlers.AddHandler(CMSG_PUSHQUESTTOPARTY, "quest share");
|
||||
masterIncomingPacketHandlers.AddHandler(CMSG_LFG_TELEPORT, "lfg teleport");
|
||||
masterIncomingPacketHandlers.AddHandler(CMSG_CAST_SPELL, "see spell");
|
||||
masterIncomingPacketHandlers.AddHandler(CMSG_REPOP_REQUEST, "release spirit");
|
||||
|
||||
@@ -88,6 +88,14 @@ bool AcceptQuestShareAction::Execute(Event event)
|
||||
return false;
|
||||
|
||||
quest = qInfo->GetQuestId();
|
||||
|
||||
if (bot->HasQuest(quest))
|
||||
{
|
||||
bot->SetDivider(ObjectGuid::Empty);
|
||||
botAI->TellError("I have this quest");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!bot->CanTakeQuest(qInfo, false))
|
||||
{
|
||||
// can't take quest
|
||||
|
||||
@@ -14,7 +14,7 @@ void QuestStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
PassTroughStrategy::InitTriggers(triggers);
|
||||
|
||||
// triggers.push_back(new TriggerNode("quest share", NextAction::array(0, new NextAction("accept quest share", relevance), nullptr)));
|
||||
triggers.push_back(new TriggerNode("quest share", NextAction::array(0, new NextAction("accept quest share", relevance), nullptr)));
|
||||
}
|
||||
|
||||
void DefaultQuestStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
|
||||
@@ -660,7 +660,7 @@ class NewPlayerNearbyTrigger : public Trigger
|
||||
class CollisionTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
CollisionTrigger(PlayerbotAI* botAI) : Trigger(botAI, "collision", 5) { }
|
||||
CollisionTrigger(PlayerbotAI* botAI) : Trigger(botAI, "collision", 5 * 1000) { }
|
||||
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user