Skip to content

Commit

Permalink
Add more IsOlthoiPlayer checks to recalls (#3927)
Browse files Browse the repository at this point in the history
  • Loading branch information
LtRipley36706 committed Nov 25, 2022
1 parent efb5e54 commit e62acdd
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Source/ACE.Server/WorldObjects/Player_Location.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,12 @@ public void HandleActionTeleToLifestone()

public void HandleActionTeleToMarketPlace()
{
if (IsOlthoiPlayer)
{
Session.Network.EnqueueSend(new GameEventWeenieError(Session, WeenieError.OlthoiCanOnlyRecallToLifestone));
return;
}

if (PKTimerActive)
{
Session.Network.EnqueueSend(new GameEventWeenieError(Session, WeenieError.YouHaveBeenInPKBattleTooRecently));
Expand Down Expand Up @@ -261,6 +267,12 @@ public void HandleActionRecallAllegianceHometown()
{
//Console.WriteLine($"{Name}.HandleActionRecallAllegianceHometown()");

if (IsOlthoiPlayer)
{
Session.Network.EnqueueSend(new GameEventWeenieError(Session, WeenieError.OlthoiCanOnlyRecallToLifestone));
return;
}

if (PKTimerActive)
{
Session.Network.EnqueueSend(new GameEventWeenieError(Session, WeenieError.YouHaveBeenInPKBattleTooRecently));
Expand Down Expand Up @@ -348,6 +360,12 @@ public void HandleActionTeleToMansion()
{
//Console.WriteLine($"{Name}.HandleActionTeleToMansion()");

if (IsOlthoiPlayer)
{
Session.Network.EnqueueSend(new GameEventWeenieError(Session, WeenieError.OlthoiCanOnlyRecallToLifestone));
return;
}

if (PKTimerActive)
{
Session.Network.EnqueueSend(new GameEventWeenieError(Session, WeenieError.YouHaveBeenInPKBattleTooRecently));
Expand Down Expand Up @@ -541,6 +559,12 @@ public void HandleActionTeleToPklArena()
{
//Console.WriteLine($"{Name}.HandleActionTeleToPkLiteArena()");

if (IsOlthoiPlayer)
{
Session.Network.EnqueueSend(new GameEventWeenieError(Session, WeenieError.OlthoiCanOnlyRecallToLifestone));
return;
}

if (PlayerKillerStatus != PlayerKillerStatus.PKLite)
{
Session.Network.EnqueueSend(new GameEventWeenieError(Session, WeenieError.OnlyPKLiteMayUseCommand));
Expand Down

0 comments on commit e62acdd

Please sign in to comment.