ACEmulator / ACE

Asheron's Call server emulator.
https://emulator.ac
GNU Affero General Public License v3.0
297 stars 242 forks source link

Wire up GameEventMagicPurgeBadEnchantments #4127

Closed LtRipley36706 closed 7 months ago

LtRipley36706 commented 7 months ago

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 )
LtRipley36706 commented 7 months ago

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.