About to head out the door, but just a couple of things to comment on,
Firstly, I'm fairly sure that the actual spell casting time calculations and such are handled server-side at the start of the cast rather than client side or in real time. The cast time bar is just a graphical doodad which fills up at a rate specified by the spell's cast time in the .DATs (which is why it never adjusts based on fast cast, and instead you just see spells go off at 50% cast time) in the form of ([1/Cast time]*Pixel size of bar) pixels/second
This would also explain why you see the kind of lag that you do when spells are interrupted. Rather than sending a "Stop casting spell" command to the server in real time, I believe the server simply flips a boolean for "SpellInterrupted" to true whenever an attack/stun would interrupt casting. This boolean is then only checked when the game actually processes the end of the cast, at the same time that the server checks to ensure that the player's ending position is the same as the starting position.
You can see evidence of this in the way the server handles player movement while casting. As long as you end the cast in the same place that you start it, the cast will go through. This means that the client is most likely not sending any information to the server about casting status in real time, as then any movement would stop the casting of a spell.
This is also visible in the way the server handles gear swaps during casting. Casting time is calculated at the beginning of the spell, and potency is calculated at the end of the spell. Taking Fast Cast off in the middle of a spell won't change the rate at which you cast the rest of the spell.
These sorts of things are where I derive my server casting model from. Looking at that model, I'm not sure where I would inject a command to do anything about melee attacks. Overflow/queue errors can also become an issue in high-haste/low-delay scenarios. It's interesting to talk about (certainly much more interesting than normal red mage melee talk, I agree), I just think it would be extremely awkward to try and implement without redoing the system.
Edit: Mana. Shut up. This discussion is significantly more productive than half of the other threads in this forum combined. Rather than sitting off in fairy land where pissing and moaning equates to results, we're discussing how this might actually be implemented or jury-rigged into existence if they actually decided to take a look at it. I'd appreciate it if you kept your nose out of it if you aren't going to contribute in a meaningful way.


Reply With Quote



