Hello,
I’m trying to figure out how to handle adding buffs to a character in multiplayer. The two thoughts i have on it right now is that the character has an array of 1) effect objects or 2) an array of effect object references.
If we use #1 then any thing that causes an AOE will create a unique instance of the effect object on every single character and if the effect ends when the source is removed then every one of the characters that was effected needs to remove the instance of that effect. I can imagine this would get costly.
However, if we use #2 then the issue is what happens if the source was a player and that player disconnects? Do all of the reference objects now point to invalid areas in memory? Would we have to remove every effect reference from the source? If this was a buff/debuff i don’t want it to go away when the player logs out.
Any idea’s on this would be helpful,
Thank you!