putting a level restriction on dungeons

For any problems with Dawn of Light website or game server, please direct questions and problems here.

Moderator: Support Team

putting a level restriction on dungeons

Postby ontheDOL » Mon Feb 06, 2017 1:53 am

hey guys,
so like the title says, i want to put a level restriction on some low dungeons (eg. Tomb of mithra max player level 25)

Has someone done this?

I was looking at where to add this to the code. Maybe somewhere here in RegionChangeRequestHandler.cs?
Code: Select all
if (zonePoint.TargetRegion != 0) { Region reg = WorldMgr.GetRegion(zonePoint.TargetRegion); if (reg != null) { // check for target region disabled if player is in a standard region // otherwise the custom region should handle OnZonePoint for this check if (client.Player.CurrentRegion.IsCustom == false && reg.IsDisabled) { if ((client.Player.Mission is TaskDungeonMission && (client.Player.Mission as TaskDungeonMission).TaskRegion.Skin == reg.Skin) == false) { client.Out.SendMessage("This region has been disabled!", eChatType.CT_System, eChatLoc.CL_SystemWindow); if (client.Account.PrivLevel == 1) { return; } } } } }
Could i add a switch/case in here (under all the instance stuff) with the dungeons region id here as the case and then add the level check in that? or is there an easier way?

thanks
- Unty -
Model Showroom and DOL guides
http://losojos-001-site1.btempurl.com
User avatar
ontheDOL
Developer
 
Posts: 311
Joined: Fri May 20, 2016 4:21 am
Location: Australian abroad

Re: putting a level restriction on dungeons

Postby PlanarChaosRvrtwo » Mon Feb 06, 2017 8:53 am

You could check how Demons Breach is made and it could show you an way.
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am

Re: putting a level restriction on dungeons

Postby ontheDOL » Mon Feb 06, 2017 6:50 pm

thanks, i'll look into it
- Unty -
Model Showroom and DOL guides
http://losojos-001-site1.btempurl.com
User avatar
ontheDOL
Developer
 
Posts: 311
Joined: Fri May 20, 2016 4:21 am
Location: Australian abroad

Re: putting a level restriction on dungeons

Postby ontheDOL » Mon Feb 06, 2017 10:06 pm

You could check how Demons Breach is made and it could show you an way.
This worked perfect , thanks mate!
- Unty -
Model Showroom and DOL guides
http://losojos-001-site1.btempurl.com
User avatar
ontheDOL
Developer
 
Posts: 311
Joined: Fri May 20, 2016 4:21 am
Location: Australian abroad

Re: putting a level restriction on dungeons

Postby PlanarChaosRvrtwo » Tue Feb 07, 2017 12:39 am

Np its my job^^ couse dol is meant to support each other but not meant to do full work for others^^
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am


Return to “%s” Support

Who is online

Users browsing this forum: No registered users and 1 guest