OpenDAoC / OpenDAoC-Core

OpenDAoC is a free Dark Age of Camelot server emulator
https://www.opendaoc.com
GNU General Public License v3.0
33 stars 21 forks source link

Fix charm effects persisting on the player when zoning (#96, #167) #12

Closed bm01 closed 2 years ago

bm01 commented 2 years ago

https://bug.atlasfreeshard.com/issues/96 https://bug.atlasfreeshard.com/issues/167

The pet would be released, but the charm effect on the caster would persist (can't be cancelled), then drain mana and show resist chance on each pulse.

This was caused by IsWithinRadius returning true due to the zone not being updated yet (mob zone == player zone). Removing IsWithinRadius' call doesn't seem to have any negative impact and effects are properly cancelled when out of range.

Also removed the song.SpellHandler.Spell.InstrumentRequirement check since it's always 0. Minstrel's charm doesn't require an instrument to be kept active (confirmed through debugging), and even if we did we probably want to cancel the effect anyway.