mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-05 04:33:51 +00:00
Fix character appearance, previews, mount seat, and online unequip
This commit is contained in:
parent
4a023e773b
commit
275914b4db
19 changed files with 743 additions and 113 deletions
|
|
@ -7,6 +7,7 @@
|
|||
#include <functional>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <cstdint>
|
||||
|
||||
namespace wowee {
|
||||
namespace game { class GameHandler; }
|
||||
|
|
@ -39,6 +40,10 @@ private:
|
|||
std::string statusMessage;
|
||||
bool statusIsError = false;
|
||||
|
||||
// For many races/styles, CharSections hair color IDs are not guaranteed to be contiguous.
|
||||
// We expose an index (hairColor) in the UI and map it to the actual DBC hairColorId here.
|
||||
std::vector<uint8_t> hairColorIds_;
|
||||
|
||||
std::vector<game::Class> availableClasses;
|
||||
void updateAvailableClasses();
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,12 @@
|
|||
#include <imgui.h>
|
||||
#include <string>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
namespace wowee { namespace ui {
|
||||
namespace wowee {
|
||||
namespace pipeline { class AssetManager; }
|
||||
namespace rendering { class CharacterPreview; }
|
||||
namespace ui {
|
||||
|
||||
/**
|
||||
* Character selection screen UI
|
||||
|
|
@ -22,6 +26,11 @@ public:
|
|||
*/
|
||||
void render(game::GameHandler& gameHandler);
|
||||
|
||||
void setAssetManager(pipeline::AssetManager* am) {
|
||||
assetManager_ = am;
|
||||
previewInitialized_ = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set callback for character selection
|
||||
* @param callback Function to call when character is selected (receives character GUID)
|
||||
|
|
@ -83,6 +92,17 @@ private:
|
|||
static std::string getConfigDir();
|
||||
void saveLastCharacter(uint64_t guid);
|
||||
uint64_t loadLastCharacter();
|
||||
|
||||
// Preview (3D character portrait)
|
||||
pipeline::AssetManager* assetManager_ = nullptr;
|
||||
std::unique_ptr<rendering::CharacterPreview> preview_;
|
||||
bool previewInitialized_ = false;
|
||||
uint64_t previewGuid_ = 0;
|
||||
uint32_t previewAppearanceBytes_ = 0;
|
||||
uint8_t previewFacialFeatures_ = 0;
|
||||
bool previewUseFemaleModel_ = false;
|
||||
uint64_t previewEquipHash_ = 0;
|
||||
};
|
||||
|
||||
}} // namespace wowee::ui
|
||||
} // namespace ui
|
||||
} // namespace wowee
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue