Skip to content

Commit

Permalink
[Cleanup] Remove unnecessary group validation in Bot::Death() (#3235)
Browse files Browse the repository at this point in the history
# Note
- We already break if there is no group above, revalidation is unnecessary.
  • Loading branch information
Kinglykrab committed Apr 3, 2023
1 parent 7090382 commit da5e672
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions zone/bot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4590,10 +4590,9 @@ bool Bot::Death(Mob *killerMob, int64 damage, uint16 spell_id, EQ::skills::Skill
GroupJoin_Struct* gu = (GroupJoin_Struct*) outapp->pBuffer;
gu->action = groupActLeave;
strcpy(gu->membername, GetCleanName());
if (g) {
for (int k = 0; k < MAX_GROUP_MEMBERS; k++) {
if (g->members[k] && g->members[k]->IsClient())
g->members[k]->CastToClient()->QueuePacket(outapp);
for (int k = 0; k < MAX_GROUP_MEMBERS; k++) {
if (g->members[k] && g->members[k]->IsClient()) {
g->members[k]->CastToClient()->QueuePacket(outapp);
}
}
safe_delete(outapp);
Expand Down

0 comments on commit da5e672

Please sign in to comment.