Total-RP / Total-RP-3-Extended

Extended module for the Total RP 3 add-on for World of Warcraft, adding creation tools.
http://extended.totalrp.com
11 stars 13 forks source link

Side effect: Campaign Shared Memory #193

Closed Ricorei closed 1 year ago

Ricorei commented 3 years ago

As of the 1.4.2, using a campaign item storing a variable in the active campaign can store the variable in another campaign, and mess up with it, and the probability is even higher with simple variable names.

Scenario 1

Item use -> Store the variable in the right campaign.
Player switches campaign because that's what they do.
Item use -> Store the variable in the wrong campaign.

Scenario 2

A campaign is started and everything is going fine.
Player creates an item not related to the campaign.
Player uses the item to mess with the campaign variables.

Is there any workaround for this?

I can see adding a variable check with the name of the campaign in every inner campaign item created so they don't mess with other creators, but this won't prevent an item from outside the campaign to mess with it still. And there is no operand to get the running campaign ID either.