Hello,HowTo use AdventureWingInstance's
Simply Edit "zonepoint" table where ID leads to a Instanced Dungeon or an area you want Instanced.
The Instance creation will happen when going through this JumpPoint !
- Code: Select all
UPDATE `zonepoint` SET `ClassType` = 'DOL.GS.ServerRules.AdventureWingJumpPoint' WHERE `Id` IN('142', '142', '142', '295', '294', '296', '297', '289', '289', '289', '288', '288', '288', '397', '397', '397', '398', '398', '398', '252', '252', '252', '450', '450', '450', '451', '451', '451', '589', '589', '589', '321', '321', '321', '320', '320', '320', '594', '594', '594', '279', '279', '279', '455', '455', '455', '454', '454', '454', '579', '579', '579', '597', '597', '597', '439', '439', '439', '440', '440', '440', '449', '449', '449', '445', '445', '445', '583', '583', '583', '310', '310', '302', '302', '302', '317', '317', '317', '453', '453', '453', '452', '452', '452', '311', '311', '311', '300', '300', '300', '582', '582', '582', '301', '301', '301', '586', '586', '586', '403', '404', '431', '432', '406', '405', '421', '422', '437', '438', '372', '373', '369', '368', '376', '377', '375', '374', '370', '371', '291', '290', '293', '292', '298', '299');
I wanted to implement fast Adventure Wings Instance dungeon to create area where people could PvE alone or in group...
I didn't wanted to use DungeonTaskMission because it use randomness for region instancing and need special element in instance table !
As some of my Catacombs area are already populated but not instanced, I Needed a way to copy an existing Area to a private Instance !
So I ended up making a class that create a new unique area (ID > 1000) and then make a LoadFromDatabase to get everything matching it's fake "Region ID" (Skin ID) and changing every object.Region ID to Current.Region ID (ID > 1000)
This end up as making an Instanced clone of an entire Region ! (I don't handle BindPoint or persistence, but a subclass could, thus making a server as instanced as official cluster servers with Multiples Homeland/Housing/etc...)
On top of this class I use a subclass to instantiate AdventureWings Dungeon that handle ownership, the special jumppoint is handling creation and cleaning so at most there could be 'n' Player Instance (this part of the code could be messy, but anyone is welcome to write is own jumppoint !)
The AdventureWingInstance also handle Aurulite loot generator to make it "livelike", it's implemented with absolutely no real value, and the item template is to be handled by yourself in the database ! (Model 541 I think)
A class could be written for aurulite so it could handle different stash size, but it's not really important, my "default" loot generator try to drop packsize of livelike sized stash, so it can be given right to an aurulite GameMerchant !
Main Drawbacks of AdventureWings :
- Can be very heavy on memory as dungeon are kept 30 min after every ppl left out
- No way to know an instance is empty of mobs and should be destroyed anyway
- Core doesn't handle connecting into an instance (it does a special check to port you to BindPoint even if Instance still exists !)
- Clean up are really lazy... (but anyway 30 min later everything is destroyed !)
Main Drawbacks of RegionInstance :
- To make sure everything happen as expected RegionInstance are build on a duplicated Database Object modifying each Region to Instance Region, so it's more heavy on memory that simply duplicating GameObjects (I had problem when working directly on GameObjects but maybe my workaround can improve other aspects i didn't thought of)
- Can't Handle Persistence ! If you want zone perma-instance it can't handle saving modification to database (it wouldn't know where or what to save as previous records exists) a subclass like hypothetical "WorldInstance" could maintain persistent unique Region ID and save object in database with it ! (using Region ClassType...)
- Previous Region "Skin ID" that is used as clone will stays in memory, only a GM could jump to the original instance or a JumpPoint not handling instance... This is a Drawback and also work as safety in case something went wrong when creating Instance !
How to use :
Simply put the JumpPoint handler for zonepoint that lead to instance zone, it will use TargetRegionID as a template.
To map instance, simply disable zonepoint class to jump to original region, or when in instance use /jump to region {SkinId}
This patch will have no effect until zonepoint are modified to use the JumpPoint handler, no way to break the core !
And you can use RegionInstance to create subclass for Demon's Breach Instance, or real Throne Room Instance ! (Maybe Even Celestius !)