==2317==ERROR: AddressSanitizer: heap-use-after-free on address 0x6170000633c0 at pc 0x55ed1d8e8d8b bp 0x7ffda4bef580 sp 0x7ffda4bef578
WRITE of size 8 at 0x6170000633c0 thread T0
#0 0x55ed1d8e8d8a in Group::SetLeader(Mob*) ../zone/groups.h:80
#1 0x55ed1d8e8d8a in Group::DisbandGroup(bool) ../zone/groups.cpp:1016
ASan didn't like this
Added public/private class for oldleadername so we can save the previous leader name when the entity is destroyed then allow us to transfer leadership.
Adjusted DelmemberOOZ and in zone functions to include removal of the old leader when disbanding.
Add Group and Raid method DoesAnyMemberHaveExpeditionLockout
This is required by some expeditions that perform a manual check for
custom dialogue (Ikkinz group expeditions)
When the group is disbanded, set the leader to null.
When setting a new raid leader, make sure we have a new raid leader. If we don't, avoid a crash and disband the raid. It's better than zones falling apart, and will resolve itself on the next VerifyRaid call.
If a member zones, set the leader pointer to nullptr. This fixes an issue where the leader pointer is freed later (MemberZoned normally cleans up the Client object), but referenced by other entities, allowing the leader to be used in the same server process tick, post-cleanup - as the leader won't exist.
Raid/Group Mana/Endurance updates should now update real-time once again
Fixed an issue with clients looking like they are 'skipping' when they are moving in view of another client
Fixed an issue with NPC's who are ghosted in plain view of a client when they are not really there
Group leader swapping didn't work and left the client in a bad state
This just disbands the group if the leader leaves
Also prevents a group leader from disbanding other groups ...
Which also lead to bad states
Group leader swapping not working is better than these issues :P
This should cause the auto haters to be shared with other toons who might be
interested (group/raid) like live.
There maybe some bugs since there is a lot of complex interactions here.