Because I don't know anything about the codebase, I will assume the current method is the most simplest I can think of programatically. I'm guessing that, currently, drinking a potion of flying calls the same piece of code that is called when a mage does 'c fly'. At risk of sounding like a flaming flaggot, I am willing to bet that this shared function can be passed another flag, which I'll name here as IS_PREP. Each affect would be added to the players affects list with this flag set to either true or false. For this next example, let's assume the PK flag is called something like in IN_PVP. Now, at every stage where preps are included in calculation of something (damage, regen, etc), we have the check
if IS_PREP and IN_PVP then skip calculating the prep modifiers. IS_PREP would be set to false if a spell is cast on a player by anything that is not a "prep" -- other players, Immortals, NPCs, perhaps gear progs, etc.
Yes, this will be tedious work -- all preps with some affect in battle need to be revisited. I think the benefit might be worth it, though. There might be PvE/RP related benefits to distinguishing between magic cast by items and magic cast by players, as well.
Edits are for grammatical errors that I am changing one at a time. No content has been added.
pls respond
Edited 3 time(s). Last edit at 07/22/2017 12:04PM by Stevers.