Open TeoTwawki opened 10 months ago
I wonder if it would be easier to just add a NO_PARTY mobmod or something to the few battlefield mobs that don't actually link and check for it in the FindPartyForMob function.
So after looking closer at the FindPartyForMob function, I think it would work to just completely remove the battlefield type check and rely solely on the link field in mob_pools like every other mob outside of battlefields. There are ~630 pools flagged battlefield with linking turned on, and ~270 with linking turned off, so an audit would probably be necessary. Currently, linking in battlefields is basically undefined behavior. Take the following example:
Run this query: update mob_pools set links = 0 where poolid in (2304,3491,929,1777,4479);
Then restart your server, !additem 1130
, go to Waughroon Shrine, and go into Grimshell Shocktroopers. Pull anything EXCEPT Yo'Bhu Hideousmask, and notice how it doesn't link with the rest. If you then update mob_pools set links = 1 where poolid = 2304;
, restart, and repeat the BCNM, you'll notice they all link again, even though Yo'Bhu Hideousmask is still set to not link.
The first 4 pools are from a completely different BCNM in the same zone, but those mobs are also in the Quadav family. The only reason this situation happens is because we check MOBTYPE_BATTLEFIELD and equate that to having link set, but then build the actual party based on the link status of other mobs. If we simply remove the battlefield type part of the check, then all battlefield mobs should predictably party up and link based on their pool setting.
Also, the superlink mobmod being set by the battlefield setup function has no effect here, since that function is called on spawn, and this party building happens before that. So even if a mob has superlink mobmod set in the future, it doesn't do anything unless they're also already in the same party.
I affirm:
Describe the feature
Per https://github.com/LandSandBoat/server/issues/4890#issuecomment-1867089757 we may wish to reconsider automating this entirely, and instead add it to the battlefield info to be able to adjust on a case by case basis in order to better handle edge cases.
Just placing this here so the info doesn't get lost, as the battlefield that made us discus it was just patched and its issue now closed.