Give me access to the entire codebase. I'll sort it out.
Are there flags now for determining whether a player in combat is fighting against a PC or NPC? I believe there are.
A) Tribbies are notified when a player attacks another player within their jurisdiction
B) You cannot enter your guild/the Inn too soon after PvP
I imagine the code for one of those criteria above sets some kind of flag on a player saying they have recently been in PvP. Now, we had to add flags on all preps that we want to be PvE-only that can be checked against the player which consumed the prep. The first round of any battle thus becomes:
1) Player A attacks Player B
2) Iterate over Player A's preps, check for PvE-only flags
3) For all PvE-only preps, negate the effect somehow (more on this below)
4) Repeat 1 - 3 for player B
5) Player A's attack is calculated against player B, battle commences
There would be no change in timing from the player's perspective, as this is a fast piece of code to run. Now we need to sort out how to negate the effects of preps.
The preps are probably checked at every stage of battle, every time a piece of damage is calculated, every tick, and in tons of other instances. This way, damage calculation or regen can take prep effects into account at every possible instance. Each time a check on preps occurs, just add another check within that -- if prep is PvE only and player has PK flag set, prep does nothing. Whether or not the timer on the prep should count down while a PK flag is set isn't part of my discussion, though I'd wager we should still let the prep effect timers count down even if a PK flag is set.
pls respond