Dome Remaining after PvP Zone gets removed.Fixed

Hey Guys, we have a little issue - the following is happening.

Intention: We have PvP Zones for TimedDrops, they create a zone, and upon being picked up or killed they are supposed to remove the PvPZone and the Dome.

What is happening: Sometimes the Dome remains after the PvP Zone gets removed, its really random. (Actually no PvP happening anymore & no message)

I could narrow down two locations, in the log file, one working and the other one not being removed properly.

1 - Working Zone, where the dome actually disappeared

[Dynamic PVP] Trying to create supply drop Landed event at (-1789.54, 15.04, 586.47).
[Dynamic PVP] Checking 0 active supply signals
[Dynamic PVP] Supply drop is probably NOT from supply signal
[Dynamic PVP] No active signals, must be from a timed event cargo plane
[Dynamic PVP] Trying to create parented entity eventName=SupplyDrop on parentEntity=supply_drop[5965526].
[Dynamic PVP] Trying to create zoneId=5965526 for eventName=SupplyDrop at position=(-1789.54, 15.04, 586.47), radius=150m, size=(0.00, 0.00, 0.00), center=(0.00, 0.00, 0.00), duration=-1s.
[Dynamic PVP] Created zoneId=5965526 for eventName=SupplyDrop with properties: Dome,Mapping.
[Dynamic PVP] Parented zoneId=5965526 to parentEntity=supply_drop[5965526].

2 - Not Working Zone, where the dome remains after the PvP Zone disappears

[Dynamic PVP] Trying to create supply drop Landed event at (-1339.69, 42.78, -575.86).
[Dynamic PVP] No active signals, must be from a timed event cargo plane
[Dynamic PVP] Checking 0 active supply signals
[Dynamic PVP] Supply drop is probably NOT from supply signal
[Dynamic PVP] Trying to create parented entity eventName=SupplyDrop on parentEntity=supply_drop[6236622].
[Dynamic PVP] Trying to create zoneId=6236622 for eventName=SupplyDrop at position=(-1339.69, 42.78, -575.86), radius=150m, size=(0.00, 0.00, 0.00), center=(0.00, 0.00, 0.00), duration=-1s.
[Dynamic PVP] Created zoneId=6236622 for eventName=SupplyDrop with properties: Dome,Mapping.
[Dynamic PVP] Trying to create supply drop Landed event at (-1339.69, 42.78, -575.86).
[Dynamic PVP] Checking 0 active supply signals
[Dynamic PVP] No active signals, must be from a timed event cargo plane
[Dynamic PVP] Supply drop is probably NOT from supply signal
[Dynamic PVP] Trying to create parented entity eventName=SupplyDrop on parentEntity=supply_drop[6236622].
[Dynamic PVP] Trying to create zoneId=6236622 for eventName=SupplyDrop at position=(-1339.69, 42.78, -575.86), radius=150m, size=(0.00, 0.00, 0.00), center=(0.00, 0.00, 0.00), duration=-1s.
Exception while calling NextTick callback (ArgumentException: An item with the same key has already been added. Key: 6236622)
at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x0015a] in <f98723dd4586469db5213ec59da723ca>:0
at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <f98723dd4586469db5213ec59da723ca>:0
at Oxide.Plugins.DynamicPVP.CreateDome (System.String zoneId, UnityEngine.Vector3 position, System.Single radius, Oxide.Plugins.DynamicPVP+DomeSettings domeData) [0x000c7] in <6ad0dde62551455ead75be7d20e581ba>:0
at Oxide.Plugins.DynamicPVP.CreateDynamicZone (System.String eventName, UnityEngine.Vector3 position, System.String zoneId, System.String[] zoneSettings, System.Boolean delay) [0x00368] in <6ad0dde62551455ead75be7d20e581ba>:0
at Oxide.Plugins.DynamicPVP.HandleParentedEntityEvent (System.String eventName, BaseEntity parentEntity, System.Boolean parentOnCreate, System.Boolean delay) [0x00104] in <6ad0dde62551455ead75be7d20e581ba>:0
at Oxide.Plugins.DynamicPVP.OnSupplyDropEvent (SupplyDrop supplyDrop, System.Boolean isLanded) [0x0019b] in <6ad0dde62551455ead75be7d20e581ba>:0
at Oxide.Plugins.DynamicPVP+<>c__DisplayClass77_0.<OnSupplyDropLanded>b__0 () [0x00000] in <6ad0dde62551455ead75be7d20e581ba>:0
at Oxide.Core.OxideMod.OnFrame (System.Single delta) [0x00051] in <112d89ea5d3348c8b949af0ab1a866d2>:0
[Dynamic PVP] Parented zoneId=6236622 to parentEntity=supply_drop[6236622].


My config:

"Timed Supply Event": {
"Enable Event": true,
"Delay In Starting Event": 0.0,
"Delay In Stopping Event": 0.0,
"Holster Time On Enter (In seconds, or 0 to disable)": 0.0,
"Enable PVP Delay": true,
"PVP Delay Time": 10.0,
"TruePVE Mapping": "exclude",
"Use Blacklist Commands (If false, a whitelist is used)": true,
"Command works for PVP delayed players": false,
"Command List (If there is a '/' at the front, it is a chat command)": [],
"Drop plugin Backpacks on death (null disables override)": null,
"Bypass Loot Defender locks": false,
"Block Restore Upon Death": false,
"Dome Settings": {
"Dome Darkness (0 to disable)": 3,
"Enable Red Ring": false,
"Enable Green Ring": false,
"Enable Blue Ring": false,
"Enable Purple Ring": true
},
"Enable Bots (Need BotSpawn Plugin)": false,
"BotSpawn Profile Name": "",
"Event Duration": 300.0,
"Dynamic PVP Zone Settings": {
"Zone Comfort": 0.0,
"Zone Radiation": 0.0,
"Zone Temperature": 0.0,
"Enable Safe Zone": false,
"Eject Spawns": "",
"Zone Parent ID": "",
"Enter Message": "Entering a PVP area!",
"Leave Message": "Leaving a PVP area.",
"Permission Required To Enter Zone": "",
"Extra Zone Flags": [],
"Zone Radius": 150.0,
"Zone Size": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"Transform Position": {
"x": 0.0,
"y": 0.0,
"z": 0.0
}
},
"Start Event When Spawned (If false, the event starts when landed)": false,
"Stop Event When Killed": true,
"Event Timer Starts When Looted": true
},

Β 

- Drei

Thanks for the detailed report, I'll look into it. On first glance, it appears that something called the drop landed hook twice for the same air drop, so I probably need to protect against that.

Merged post

Fixed in Dynamic PVP 4.9.2.

Hey,

thank you for the reply & the fix, great plugin πŸ’―

- DreiΒ 

Locked automatically