Fix camera orbit, deselect, chat formatting, loot/vendor bugs, critter hostility, and character screen

Smooth idle camera orbit without jump at loop boundary, click empty space to
deselect target, auto-target when attacked, fix critter hostility so neutral
factions aren't flagged red, add armor/stats to item templates, fix loot
iterator invalidation, show item template names as fallback, position drop
confirmation at cursor, remove [SYSTEM] chat prefix, show NPC names in monster
say/yell, and prevent auto-login on character select screen.
This commit is contained in:
Kelsi 2026-02-06 16:40:44 -08:00
parent caeb6f56f7
commit 2aa8187562
10 changed files with 280 additions and 81 deletions

View file

@ -33,21 +33,13 @@ void CharacterScreen::render(game::GameHandler& gameHandler) {
gameHandler.requestCharacterList();
} else if (characters.empty()) {
ImGui::Text("No characters available.");
} else if (characters.size() == 1 && !characterSelected) {
// Auto-select the only available character
selectedCharacterIndex = 0;
selectedCharacterGuid = characters[0].guid;
characterSelected = true;
std::stringstream ss;
ss << "Entering world with " << characters[0].name << "...";
setStatus(ss.str());
if (!gameHandler.isSinglePlayerMode()) {
gameHandler.selectCharacter(characters[0].guid);
}
if (onCharacterSelected) {
onCharacterSelected(characters[0].guid);
}
} else {
// Auto-highlight the first character if none selected yet
if (selectedCharacterIndex < 0 && !characters.empty()) {
selectedCharacterIndex = 0;
selectedCharacterGuid = characters[0].guid;
}
// Character table
if (ImGui::BeginTable("CharactersTable", 6, ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg)) {
ImGui::TableSetupColumn("Name", ImGuiTableColumnFlags_WidthStretch);