View Single Post
  #46  
Old 06-02-2020, 10:14 AM
7thGate 7thGate is offline
Sarnak


Join Date: Dec 2015
Posts: 369
Default

Quote:
Originally Posted by Dolalin [You must be logged in to view images. Log in or Register.]
I was looking at the Bind Wound code in EQEmu and it looks like a bit of a pain in the arse to modify. It's not set up to be 'interruptible'. Ideally you'd have a combat hit check that whether the player were in a "Binding Wound" state and interrupt that state. But it seems in EQEmu the bind wound process is simply timer driven? I'm no C++ guru though. That's probably why this hasn't been fixed yet I'm guessing, P99's code is probably mostly the same.

https://github.com/EQEmu/Server/blob...ient.cpp#L2767
Reading it, I think it might actually be as easy as calling BindWound(NULL, false, true) on the client getting hit when you want to signal you're interrupting bind wounds. Passing in the fail flag causes it to check if the timer is enabled and if so immediately go to the "You have moved" failure branch which turns off the timer and sends the failure message packet.

More annoying would be to find all of the places where a condition might interrupt you. If its all HP damage and nothing else, it might be easiest to make SetHP virtual and override the client implementation to check if HP is decreasing, then attempt to interrupt Bind Wounds if it is and the timer is enabled. That will block the ability to inline the function though, and SetHP is going to be highly performance sensitive since HP changing is a very frequent occurrence. Given all the other stuff that's going on in the combat loop its probably ok, just something to keep an eye on and maybe profile a bit.

If resisted AOEs or getting hit with nondamaging stuff is also supposed to interrupt, you would need to find those locations and stick calls to BindWound.
__________________
Jayya - 60 Rogue, Officer <Auld Lang Syne>

Sanctum Low Man Vindi Kill: https://www.youtube.com/watch?v=xyZfNjvsDRE