mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
Use created character data and DB start items/spells
This commit is contained in:
parent
2db690a866
commit
c89fccdfeb
4 changed files with 509 additions and 102 deletions
|
|
@ -112,6 +112,10 @@ public:
|
|||
* @param characterGuid GUID of character to log in with
|
||||
*/
|
||||
void selectCharacter(uint64_t characterGuid);
|
||||
void setActiveCharacterGuid(uint64_t guid) { activeCharacterGuid_ = guid; }
|
||||
uint64_t getActiveCharacterGuid() const { return activeCharacterGuid_; }
|
||||
const Character* getActiveCharacter() const;
|
||||
const Character* getFirstCharacter() const;
|
||||
|
||||
/**
|
||||
* Get current player movement info
|
||||
|
|
@ -167,6 +171,9 @@ public:
|
|||
// Money (copper)
|
||||
uint64_t getMoneyCopper() const { return playerMoneyCopper_; }
|
||||
|
||||
// Single-player: mark character list ready for selection UI
|
||||
void setSinglePlayerCharListReady();
|
||||
|
||||
// Inventory
|
||||
Inventory& getInventory() { return inventory; }
|
||||
const Inventory& getInventory() const { return inventory; }
|
||||
|
|
@ -216,6 +223,7 @@ public:
|
|||
void setSinglePlayerMode(bool sp) { singlePlayerMode_ = sp; }
|
||||
bool isSinglePlayerMode() const { return singlePlayerMode_; }
|
||||
void simulateMotd(const std::vector<std::string>& lines);
|
||||
void applySinglePlayerStartData(Race race, Class cls);
|
||||
|
||||
// NPC death callback (single-player)
|
||||
using NpcDeathCallback = std::function<void(uint64_t guid)>;
|
||||
|
|
@ -296,6 +304,16 @@ public:
|
|||
*/
|
||||
void update(float deltaTime);
|
||||
|
||||
struct SinglePlayerCreateInfo {
|
||||
uint32_t mapId = 0;
|
||||
uint32_t zoneId = 0;
|
||||
float x = 0.0f;
|
||||
float y = 0.0f;
|
||||
float z = 0.0f;
|
||||
float orientation = 0.0f;
|
||||
};
|
||||
bool getSinglePlayerCreateInfo(Race race, Class cls, SinglePlayerCreateInfo& out) const;
|
||||
|
||||
private:
|
||||
/**
|
||||
* Handle incoming packet from world server
|
||||
|
|
@ -503,6 +521,8 @@ private:
|
|||
bool pendingGroupInvite = false;
|
||||
std::string pendingInviterName;
|
||||
|
||||
uint64_t activeCharacterGuid_ = 0;
|
||||
|
||||
// ---- Phase 5: Loot ----
|
||||
bool lootWindowOpen = false;
|
||||
LootResponseData currentLoot;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue