Skip to content

Commit d96f240

Browse files
authored
Bot leaving group causes un-follow (#235)
1 parent 6e34e26 commit d96f240

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/modules/Bots/playerbot/strategy/actions/LeaveGroupAction.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@ namespace ai
1111

1212
virtual bool Execute(Event event)
1313
{
14-
if (!bot->GetGroup())
14+
if (bot->GetGroup())
1515
{
16-
return false;
16+
ai->TellMaster("Goodbye!", PLAYERBOT_SECURITY_TALK);
1717
}
1818

19-
ai->TellMaster("Goodbye!", PLAYERBOT_SECURITY_TALK);
20-
2119
WorldPacket p;
2220
string member = bot->GetName();
2321
p << uint32(PARTY_OP_LEAVE) << member << uint32(0);
@@ -31,6 +29,9 @@ namespace ai
3129
}
3230

3331
ai->ResetStrategies();
32+
ai->ChangeStrategy("-follow master", BOT_STATE_NON_COMBAT);
33+
ai->ChangeStrategy("-follow master", BOT_STATE_DEAD);
34+
ai->ChangeStrategy("-follow master", BOT_STATE_COMBAT);
3435
return true;
3536
}
3637
};

0 commit comments

Comments
 (0)