mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-10 20:22:41 +00:00
[Crash] Fixes Crash when Zoning with XTarget when Bots are in group. (#3126)
This commit is contained in:
parent
a6efb1e8b5
commit
53e6f931c9
@ -5457,6 +5457,7 @@ void Bot::ProcessBotOwnerRefDelete(Mob* botOwner) {
|
|||||||
if (tempBot) {
|
if (tempBot) {
|
||||||
tempBot->SetTarget(nullptr);
|
tempBot->SetTarget(nullptr);
|
||||||
tempBot->SetBotOwner(nullptr);
|
tempBot->SetBotOwner(nullptr);
|
||||||
|
tempBot->Zone();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -544,7 +544,6 @@ bool Group::UpdatePlayer(Mob* update) {
|
|||||||
return updateSuccess;
|
return updateSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Group::MemberZoned(Mob* removemob) {
|
void Group::MemberZoned(Mob* removemob) {
|
||||||
uint32 i;
|
uint32 i;
|
||||||
|
|
||||||
@ -554,11 +553,10 @@ void Group::MemberZoned(Mob* removemob) {
|
|||||||
if(removemob == GetLeader())
|
if(removemob == GetLeader())
|
||||||
SetLeader(nullptr);
|
SetLeader(nullptr);
|
||||||
|
|
||||||
for (i = 0; i < MAX_GROUP_MEMBERS; i++) {
|
//should NOT clear the name, it is used for world communication.
|
||||||
if (members[i] == removemob) {
|
for (auto & m : members) {
|
||||||
members[i] = nullptr;
|
if (m && (m == removemob || m->IsBot() && m->CastToBot()->GetBotOwner() == removemob)) {
|
||||||
//should NOT clear the name, it is used for world communication.
|
m = nullptr;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -924,6 +922,7 @@ void Group::DisbandGroup(bool joinraid) {
|
|||||||
{
|
{
|
||||||
if (members[i] == nullptr)
|
if (members[i] == nullptr)
|
||||||
{
|
{
|
||||||
|
membername[i][0] = '\0';
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1166,6 +1165,7 @@ bool Group::LearnMembers() {
|
|||||||
memberIndex++;
|
memberIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VerifyGroup();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2321,7 +2321,6 @@ void Group::UpdateXTargetMarkedNPC(uint32 Number, Mob *m)
|
|||||||
members[i]->CastToClient()->UpdateXTargetType((Number == 1) ? GroupMarkTarget1 : ((Number == 2) ? GroupMarkTarget2 : GroupMarkTarget3), m);
|
members[i]->CastToClient()->UpdateXTargetType((Number == 1) ? GroupMarkTarget1 : ((Number == 2) ? GroupMarkTarget2 : GroupMarkTarget3), m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Group::SetDirtyAutoHaters()
|
void Group::SetDirtyAutoHaters()
|
||||||
|
|||||||
@ -1952,10 +1952,10 @@ void Raid::QueueClients(Mob *sender, const EQApplicationPacket *app, bool ack_re
|
|||||||
if (!members[i].member) {
|
if (!members[i].member) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!members[i].member->IsClient()) {
|
if (members[i].IsBot) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (members[i].IsBot) {
|
if (!members[i].member->IsClient()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (ignore_sender && members[i].member == sender) {
|
if (ignore_sender && members[i].member == sender) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user