kimi gone wild

This commit is contained in:
ra
2026-02-14 23:12:33 -07:00
parent bbd205ecbe
commit 0222be36c5
98 changed files with 39726 additions and 309 deletions

View File

@@ -35,6 +35,25 @@ defmodule Odinsea.Channel.Players do
:ok
end
@doc """
Adds a player with full character state.
Extracts relevant fields from character state.
"""
def add_character(character_id, %{} = character_state) do
player_data = %{
character_id: character_id,
name: character_state.name,
map_id: character_state.map_id,
level: character_state.level,
job: character_state.job,
gm: Map.get(character_state, :gm, 0),
client_pid: character_state.client_pid
}
:ets.insert(@table, {character_id, player_data})
:ok
end
@doc """
Removes a player from the channel storage.
"""