mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 15:58:36 +00:00
[Crash] Fix out of bound arrays, other potential crashes (#3166)
This commit is contained in:
+4
-5
@@ -545,7 +545,6 @@ bool Group::UpdatePlayer(Mob* update) {
|
||||
}
|
||||
|
||||
void Group::MemberZoned(Mob* removemob) {
|
||||
uint32 i;
|
||||
|
||||
if (!removemob) {
|
||||
return;
|
||||
@@ -557,21 +556,21 @@ void Group::MemberZoned(Mob* removemob) {
|
||||
|
||||
//should NOT clear the name, it is used for world communication.
|
||||
for (auto & m : members) {
|
||||
if (m && (m == removemob || m->IsBot() && m->CastToBot()->GetBotOwner() == removemob)) {
|
||||
if (m && (m == removemob || (m->IsBot() && m->CastToBot()->GetBotOwner() == removemob))) {
|
||||
m = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
if (removemob->IsClient() && HasRole(removemob, RoleAssist)) {
|
||||
SetGroupAssistTarget(0);
|
||||
SetGroupAssistTarget(nullptr);
|
||||
}
|
||||
|
||||
if (removemob->IsClient() && HasRole(removemob, RoleTank)) {
|
||||
SetGroupTankTarget(0);
|
||||
SetGroupTankTarget(nullptr);
|
||||
}
|
||||
|
||||
if (removemob->IsClient() && HasRole(removemob, RolePuller)) {
|
||||
SetGroupPullerTarget(0);
|
||||
SetGroupPullerTarget(nullptr);
|
||||
}
|
||||
|
||||
if (removemob->IsClient() && removemob == mentoree) {
|
||||
|
||||
Reference in New Issue
Block a user