mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
[Bug Fix] Fix crash when checking Bot Group/Raid membership (#3641)
* [Bug Fix] Fix crash when checking Bot Group/Raid membership * Update bot.cpp --------- Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
parent
9959070f24
commit
0667fe435f
@ -3336,7 +3336,8 @@ bool Bot::Spawn(Client* botCharacterOwner) {
|
||||
|
||||
if (auto raid = entity_list.GetRaidByBotName(GetName())) {
|
||||
// Safety Check to confirm we have a valid raid
|
||||
if (!raid->IsRaidMember(GetBotOwner()->GetName())) {
|
||||
auto owner = GetBotOwner();
|
||||
if (owner && !raid->IsRaidMember(owner->GetCleanName())) {
|
||||
Bot::RemoveBotFromRaid(this);
|
||||
} else {
|
||||
SetRaidGrouped(true);
|
||||
@ -3346,7 +3347,8 @@ bool Bot::Spawn(Client* botCharacterOwner) {
|
||||
}
|
||||
else if (auto group = entity_list.GetGroupByMobName(GetName())) {
|
||||
// Safety Check to confirm we have a valid group
|
||||
if (!group->IsGroupMember(GetBotOwner()->GetName())) {
|
||||
auto owner = GetBotOwner();
|
||||
if (owner && !group->IsGroupMember(owner->GetCleanName())) {
|
||||
Bot::RemoveBotFromGroup(this, group);
|
||||
} else {
|
||||
SetGrouped(true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user