Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nullify _carryingLadder after ladder is stored #13

Merged
merged 1 commit into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Client/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ internal async void OnCollect(int networkId)
Tick += CarryingTick;
}

[EventHandler("Inferno-Collection:Client:Ladders:Store")]
internal void OnStore() => _carryingLadder = null;

[EventHandler("Inferno-Collection:Client:Ladders:Attach")]
internal async void OnAttach(int playerId, int networkId, bool onBack = false)
{
Expand Down
1 change: 1 addition & 0 deletions Server/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ internal void StoreLadder(Player source)
}

source.State.Set("ICCarryingLadder", -1, true);
source.TriggerEvent("Inferno-Collection:Client:Ladders:Store");

_createdLadders.Remove(entity.Handle);

Expand Down
Loading