Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wire up GameEventMagicPurgeBadEnchantments #4127

Merged
merged 3 commits into from
Mar 15, 2024

Conversation

LtRipley36706
Copy link
Member

According to PCAPs GameEventMagicPurgeBadEnchantments was sent to clients for players with Enduring Enchantment augmentation.

Client has slightly different check in CEnchantmentRegistry::PurgeBadEnchantmentList versus CEnchantmentRegistry::PurgeEnchantmentList

    if ( v4->data._smod.type & 0x2000000 || v4->data._duration == -1.0 )

vs

    if ( v4->data._duration == -1.0 )

According to PCAPs GameEventMagicPurgeBadEnchantments was sent to clients for players with Enduring Enchantment augmentation.

Client has slightly different check in CEnchantmentRegistry::PurgeBadEnchantmentList versus CEnchantmentRegistry::PurgeEnchantmentList
```cpp
    if ( v4->data._smod.type & 0x2000000 || v4->data._duration == -1.0 )
```
vs
```cpp
    if ( v4->data._duration == -1.0 )
```
A large number of spells that the DAT has marked beneficial do not also have their StatModType currently set with that same flag.

This changes makes them match.
@LtRipley36706
Copy link
Member Author

It turns out there are quite a lot of spells that would/should be considered Beneficial and marked as such in their StatModKey but are not currently. This would result in most "buffs" getting purged upon death. The Spells in the DAT has its own bitfield definition for Beneficial which would seemingly be the same in StatModKey. Using the DAT to supplement the missing bitfield from the server could work until the data were to be changed later.

@LtRipley36706 LtRipley36706 merged commit e0d4c3a into ACEmulator:master Mar 15, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant