Skip to content

Commit

Permalink
-Crash fix: Trying to invite bots already in a group with a master on…
Browse files Browse the repository at this point in the history
… a different map.
  • Loading branch information
mostlikely4r committed Apr 3, 2023
1 parent 7bb0ddd commit 071a245
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion playerbot/PlayerbotSecurity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,10 @@ bool PlayerbotSecurity::CheckLevelFor(PlayerbotSecurityLevel level, bool silent,
out << "I am currently leading a group. I can invite you if you want.";
break;
case DenyReason::PLAYERBOT_DENY_NOT_LEADER:
out << "I am in a group with " << bot->GetPlayerbotAI()->GetGroupMaster()->GetName() << ". You can ask him for invite.";
if (bot->GetPlayerbotAI()->GetGroupMaster() && bot->GetPlayerbotAI()->IsSafe(bot->GetPlayerbotAI()->GetGroupMaster()))
out << "I am in a group with " << bot->GetPlayerbotAI()->GetGroupMaster()->GetName() << ". You can ask him for invite.";
else
out << "I am in a group with someone else";
break;
case DenyReason::PLAYERBOT_DENY_BG:
out << "I am in a queue for BG. Will do it later";
Expand Down

0 comments on commit 071a245

Please sign in to comment.