Skip to content

Commit

Permalink
Necropolis Entrance
Browse files Browse the repository at this point in the history
  • Loading branch information
FallenDev committed Aug 29, 2023
1 parent c31fa0e commit e228080
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 3 deletions.
Binary file modified Server.Configurations/ZolianDB/ZolianMaps.sql
Binary file not shown.
2 changes: 1 addition & 1 deletion Zolian.Server.Base/GameScripts/Areas/ArenaEntrance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Darkages.GameScripts.Areas;
[Script("Arena Entrance")]
public class ArenaEntrance : AreaScript
{
private Sprite _aisling;
private Aisling _aisling;

public ArenaEntrance(Area area) : base(area) => Area = area;
public override void Update(TimeSpan elapsedTime) { }
Expand Down
2 changes: 1 addition & 1 deletion Zolian.Server.Base/GameScripts/Areas/GenericArea.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Darkages.GameScripts.Areas;
[Script("Generic Area")]
public class GenericArea : AreaScript
{
private Sprite _aisling;
private Aisling _aisling;

public GenericArea(Area area) : base(area) => Area = area;
public override void Update(TimeSpan elapsedTime) { }
Expand Down
45 changes: 45 additions & 0 deletions Zolian.Server.Base/GameScripts/Areas/NecroEntrance.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using System.Numerics;

using Chaos.Common.Definitions;

using Darkages.Enums;
using Darkages.Network.Client;
using Darkages.ScriptingBase;
using Darkages.Sprites;
using Darkages.Types;

namespace Darkages.GameScripts.Areas;

[Script("Necro Entrance")]
public class NecroEntrance : AreaScript
{
private Aisling _aisling;

public NecroEntrance(Area area) : base(area) => Area = area;
public override void Update(TimeSpan elapsedTime) { }
public override void OnMapEnter(WorldClient client) => _aisling = client.Aisling;
public override void OnMapExit(WorldClient client) { }

public override void OnPlayerWalk(WorldClient client, Position oldLocation, Position newLocation)
{
var vectorMap = new Vector2(newLocation.X, newLocation.Y);
if (_aisling.Pos != vectorMap) return;
switch (newLocation.X)
{
case 5 when newLocation.Y == 0:
case 5 when newLocation.Y == 1:
if (_aisling.QuestManager.TagorDungeonAccess)
client.TransitionToMap(1204, new Position(17, 37));
else
{
_aisling.SendTargetedClientMethod(Scope.NearbyAislings, c => c.SendAnimation(75, null, _aisling.Serial));
client.SendServerMessage(ServerMessageType.ActiveMessage, $"{{=bYou are forcibly repelled!");
}

break;
}
}

public override void OnItemDropped(WorldClient client, Item itemDropped, Position locationDropped) { }
public override void OnGossip(WorldClient client, string message) { }
}
2 changes: 1 addition & 1 deletion Zolian.Server.Base/GameScripts/Areas/Piet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Darkages.GameScripts.Areas;
[Script("Piet")]
public class Piet : AreaScript
{
private Sprite _aisling;
private Aisling _aisling;

public Piet(Area area) : base(area) => Area = area;
public override void Update(TimeSpan elapsedTime) { }
Expand Down

0 comments on commit e228080

Please sign in to comment.