From 315f64cf950c3d843d262d587bcbc7c769438961 Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 9 Jul 2026 07:54:00 +0200 Subject: [PATCH] Add character teleport, delete, and account kick/delete to admin panel Traced how login placement actually works: CPlayer login placement (Src/World Server/worldpackets.cpp:27, pakPlayer) calls GetRespawnByID(Position->respawn), and Position->respawn is loaded straight from characters.respawnid (playerdata.cpp:110). So setting respawnid to a Src/World Server list_respawnzones.id is a real, live lever over where a character logs in next -- not a vestigial column (unlike characters.townid, which turned out to be dead: the only other code path that reads it is commented-out dead code in pakUserDied, superseded by CPlayer::RespawnPlayer which uses an in-memory Position->saved instead). Added to the character edit page: a teleport dropdown grouped by map, populated from list_respawnzones, wired straight to respawnid (takes effect on the character's next login same as other stat edits) and a delete-character action. Added to the account edit page: delete account (characters are kept) and a "reset online flag" action for accounts stuck thinking they're still logged in after a crash. Co-Authored-By: Claude Sonnet 5 --- webadmin/app.py | 71 +++++++++++++++++++++++++- webadmin/templates/edit_account.html | 15 +++++- webadmin/templates/edit_character.html | 21 +++++++- 3 files changed, 103 insertions(+), 4 deletions(-) diff --git a/webadmin/app.py b/webadmin/app.py index 8ba23e1..f382694 100644 --- a/webadmin/app.py +++ b/webadmin/app.py @@ -27,9 +27,14 @@ ADMIN_MIN_ACCESSLEVEL = int(os.environ.get("ADMIN_MIN_ACCESSLEVEL", "900")) CHAR_STAT_FIELDS = [ "level", "zuly", "str", "con", "dex", "_int", "cha", "sen", - "curHp", "curMp", "statp", "skillp", "stamina", + "curHp", "curMp", "statp", "skillp", "stamina", "exp", "classid", ] +# Column edited via its own @@ -30,4 +32,15 @@ {% endfor %} +
+

Gefahrenzone

+
+ +

Nützlich wenn der Account nach einem Server-Crash als "online" hängen geblieben ist und sich nicht neu einloggen kann.

+
+
+ +
+
{% endblock %} diff --git a/webadmin/templates/edit_character.html b/webadmin/templates/edit_character.html index 30bfdde..0e6f759 100644 --- a/webadmin/templates/edit_character.html +++ b/webadmin/templates/edit_character.html @@ -4,7 +4,19 @@

Charakter: {{ char.char_name }} Account: {{ char.account_name }}

-
+ + + +
{% for field in stat_fields %}
@@ -20,4 +32,11 @@
+
+

Gefahrenzone

+
+ +
+
{% endblock %}