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 <noreply@anthropic.com>
47 lines
2.2 KiB
HTML
47 lines
2.2 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}{{ account.username }} - ROSS Admin{% endblock %}
|
|
{% block content %}
|
|
<div class="card" style="max-width:480px;">
|
|
<h2 style="margin-top:0;">Account: {{ account.username }}
|
|
{% if account.online %}<span class="badge ok">online</span>{% else %}<span class="badge off">offline</span>{% endif %}
|
|
</h2>
|
|
<form method="post">
|
|
<label>Accesslevel (100 = normaler Spieler, 900 = Admin)</label>
|
|
<input type="number" name="accesslevel" value="{{ account.accesslevel }}">
|
|
<label><input type="checkbox" name="active" style="width:auto;" {% if account.active %}checked{% endif %}> Aktiv</label>
|
|
<label>Neues Passwort (leer lassen = unverändert)</label>
|
|
<input type="password" name="password" placeholder="unverändert">
|
|
<div style="margin-top:20px;">
|
|
<button type="submit">Speichern</button>
|
|
<a class="btn secondary" href="{{ url_for('accounts') }}">Zurück</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="card">
|
|
<h3 style="margin-top:0;">Charaktere auf diesem Account</h3>
|
|
<table>
|
|
<tr><th>Name</th><th>Level</th><th></th></tr>
|
|
{% for c in chars %}
|
|
<tr>
|
|
<td>{{ c.char_name }}</td>
|
|
<td>{{ c.level }}</td>
|
|
<td><a class="btn small" href="{{ url_for('edit_character', char_id=c.id) }}">bearbeiten</a></td>
|
|
</tr>
|
|
{% else %}
|
|
<tr><td colspan="3">Keine Charaktere.</td></tr>
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
<div class="card" style="max-width:480px;border-color:#5a2530;">
|
|
<h3 style="margin-top:0;color:var(--danger);">Gefahrenzone</h3>
|
|
<form method="post" action="{{ url_for('kick_account', account_id=account.id) }}" style="margin-bottom:12px;">
|
|
<button type="submit" class="secondary">Online-Status zurücksetzen</button>
|
|
<p style="color:var(--muted);font-size:12px;">Nützlich wenn der Account nach einem Server-Crash als "online" hängen geblieben ist und sich nicht neu einloggen kann.</p>
|
|
</form>
|
|
<form method="post" action="{{ url_for('delete_account', account_id=account.id) }}"
|
|
onsubmit="return confirm('Account {{ account.username }} wirklich unwiderruflich löschen? (Charaktere bleiben erhalten)');">
|
|
<button type="submit" style="background:var(--danger);">Account löschen</button>
|
|
</form>
|
|
</div>
|
|
{% endblock %}
|