Rework Battlefield Group Death Counter #6223
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I affirm:
What does this pull request do?
Before this change it would track the number of mobs that have died in a battlefield group. Once all the mobs have died it would call the
allDeath
callback. This works fine for mobs that are spawned at the start of the battlefield and have to die. This does not work if not all mobs are spawned at the start and/or can be spawned multiple times and consequently the death count can reach the target amount without having all mobs dead.This is fixed by tracking how many mobs are dead for the group when a mob dies.
Steps to test these changes
I'm not sure if we have any battlefields that currently work like this but I have one in the works (Call To Arms ISNM) that does. You can cheat this though by going to a battlefield that does have an
allDeath
and respawn a mob after killing it to see that it doesn't work without this change and will work with this change.Divine Punishers BCNM has allDeath
!additem 1130
!zone Balgas Dias
Enter Divine Punishers and go kill a mob with
!hp 0
after they despawn then respawn it. Kill the other mobs one by one and the bcnm should end with one mob remaining.