mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
Improve auction house UI with search filters, pagination, sell picker, and tooltips
- Add item class/subclass category filters (Weapon, Armor, etc.) with correct WoW 3.3.5a IDs - Add sell item picker dropdown with icons and Create Auction button - Add pagination (Prev/Next) for browse results with filter preservation - Add Buy/Bid action buttons to Bids tab - Add item icons and stat tooltips on hover across all three tabs - Add Enter-to-search from name field and search delay countdown - Parse SMSG_AUCTION_OWNER/BIDDER_NOTIFICATION into chat messages - Auto-refresh browse results after bid/buyout using saved search params - Clamp level range inputs to 0-80
This commit is contained in:
parent
9906269671
commit
1ae5fe867c
6 changed files with 945 additions and 157 deletions
|
|
@ -355,6 +355,11 @@ public:
|
|||
void acceptGuildInvite();
|
||||
void declineGuildInvite();
|
||||
void queryGuildInfo(uint32_t guildId);
|
||||
void createGuild(const std::string& guildName);
|
||||
void addGuildRank(const std::string& rankName);
|
||||
void deleteGuildRank();
|
||||
void requestPetitionShowlist(uint64_t npcGuid);
|
||||
void buyPetition(uint64_t npcGuid, const std::string& guildName);
|
||||
|
||||
// Guild state accessors
|
||||
bool isInGuild() const {
|
||||
|
|
@ -369,6 +374,13 @@ public:
|
|||
bool hasPendingGuildInvite() const { return pendingGuildInvite_; }
|
||||
const std::string& getPendingGuildInviterName() const { return pendingGuildInviterName_; }
|
||||
const std::string& getPendingGuildInviteGuildName() const { return pendingGuildInviteGuildName_; }
|
||||
const GuildInfoData& getGuildInfoData() const { return guildInfoData_; }
|
||||
const GuildQueryResponseData& getGuildQueryData() const { return guildQueryData_; }
|
||||
bool hasGuildInfoData() const { return guildInfoData_.isValid(); }
|
||||
bool hasPetitionShowlist() const { return showPetitionDialog_; }
|
||||
void clearPetitionDialog() { showPetitionDialog_ = false; }
|
||||
uint32_t getPetitionCost() const { return petitionCost_; }
|
||||
uint64_t getPetitionNpcGuid() const { return petitionNpcGuid_; }
|
||||
|
||||
// Ready check
|
||||
void initiateReadyCheck();
|
||||
|
|
@ -1123,6 +1135,8 @@ private:
|
|||
void handleGuildEvent(network::Packet& packet);
|
||||
void handleGuildInvite(network::Packet& packet);
|
||||
void handleGuildCommandResult(network::Packet& packet);
|
||||
void handlePetitionShowlist(network::Packet& packet);
|
||||
void handleTurnInPetitionResults(network::Packet& packet);
|
||||
|
||||
// ---- Character creation handler ----
|
||||
void handleCharCreateResponse(network::Packet& packet);
|
||||
|
|
@ -1467,10 +1481,15 @@ private:
|
|||
std::string guildName_;
|
||||
std::vector<std::string> guildRankNames_;
|
||||
GuildRosterData guildRoster_;
|
||||
GuildInfoData guildInfoData_;
|
||||
GuildQueryResponseData guildQueryData_;
|
||||
bool hasGuildRoster_ = false;
|
||||
bool pendingGuildInvite_ = false;
|
||||
std::string pendingGuildInviterName_;
|
||||
std::string pendingGuildInviteGuildName_;
|
||||
bool showPetitionDialog_ = false;
|
||||
uint32_t petitionCost_ = 0;
|
||||
uint64_t petitionNpcGuid_ = 0;
|
||||
|
||||
uint64_t activeCharacterGuid_ = 0;
|
||||
Race playerRace_ = Race::HUMAN;
|
||||
|
|
@ -1607,6 +1626,18 @@ private:
|
|||
AuctionListResult auctionBidderResults_;
|
||||
int auctionActiveTab_ = 0; // 0=Browse, 1=Bids, 2=Auctions
|
||||
float auctionSearchDelayTimer_ = 0.0f;
|
||||
// Last search params for re-query (pagination, auto-refresh after bid/buyout)
|
||||
struct AuctionSearchParams {
|
||||
std::string name;
|
||||
uint8_t levelMin = 0, levelMax = 0;
|
||||
uint32_t quality = 0xFFFFFFFF;
|
||||
uint32_t itemClass = 0xFFFFFFFF;
|
||||
uint32_t itemSubClass = 0xFFFFFFFF;
|
||||
uint32_t invTypeMask = 0;
|
||||
uint8_t usableOnly = 0;
|
||||
uint32_t offset = 0;
|
||||
};
|
||||
AuctionSearchParams lastAuctionSearch_;
|
||||
// Routing: which result vector to populate from next SMSG_AUCTION_LIST_RESULT
|
||||
enum class AuctionResultTarget { BROWSE, OWNER, BIDDER };
|
||||
AuctionResultTarget pendingAuctionTarget_ = AuctionResultTarget::BROWSE;
|
||||
|
|
|
|||
|
|
@ -1050,6 +1050,60 @@ public:
|
|||
static network::Packet build();
|
||||
};
|
||||
|
||||
/** CMSG_GUILD_CREATE packet builder */
|
||||
class GuildCreatePacket {
|
||||
public:
|
||||
static network::Packet build(const std::string& guildName);
|
||||
};
|
||||
|
||||
/** CMSG_GUILD_ADD_RANK packet builder */
|
||||
class GuildAddRankPacket {
|
||||
public:
|
||||
static network::Packet build(const std::string& rankName);
|
||||
};
|
||||
|
||||
/** CMSG_GUILD_DEL_RANK packet builder (empty body) */
|
||||
class GuildDelRankPacket {
|
||||
public:
|
||||
static network::Packet build();
|
||||
};
|
||||
|
||||
/** CMSG_PETITION_SHOWLIST packet builder */
|
||||
class PetitionShowlistPacket {
|
||||
public:
|
||||
static network::Packet build(uint64_t npcGuid);
|
||||
};
|
||||
|
||||
/** CMSG_PETITION_BUY packet builder */
|
||||
class PetitionBuyPacket {
|
||||
public:
|
||||
static network::Packet build(uint64_t npcGuid, const std::string& guildName);
|
||||
};
|
||||
|
||||
/** SMSG_PETITION_SHOWLIST data */
|
||||
struct PetitionShowlistData {
|
||||
uint64_t npcGuid = 0;
|
||||
uint32_t itemId = 0;
|
||||
uint32_t displayId = 0;
|
||||
uint32_t cost = 0;
|
||||
uint32_t charterType = 0;
|
||||
uint32_t requiredSigs = 0;
|
||||
|
||||
bool isValid() const { return npcGuid != 0; }
|
||||
};
|
||||
|
||||
/** SMSG_PETITION_SHOWLIST parser */
|
||||
class PetitionShowlistParser {
|
||||
public:
|
||||
static bool parse(network::Packet& packet, PetitionShowlistData& data);
|
||||
};
|
||||
|
||||
/** SMSG_TURN_IN_PETITION_RESULTS parser */
|
||||
class TurnInPetitionResultsParser {
|
||||
public:
|
||||
static bool parse(network::Packet& packet, uint32_t& result);
|
||||
};
|
||||
|
||||
// Guild event type constants
|
||||
namespace GuildEvent {
|
||||
constexpr uint8_t PROMOTION = 0;
|
||||
|
|
|
|||
|
|
@ -68,6 +68,12 @@ private:
|
|||
bool showGuildNoteEdit_ = false;
|
||||
bool editingOfficerNote_ = false;
|
||||
char guildNoteEditBuffer_[256] = {0};
|
||||
int guildRosterTab_ = 0; // 0=Roster, 1=Guild Info
|
||||
char guildMotdEditBuffer_[256] = {0};
|
||||
bool showMotdEdit_ = false;
|
||||
char petitionNameBuffer_[64] = {0};
|
||||
char addRankNameBuffer_[64] = {0};
|
||||
bool showAddRankModal_ = false;
|
||||
bool refocusChatInput = false;
|
||||
bool vendorBagsOpened_ = false; // Track if bags were auto-opened for current vendor session
|
||||
bool chatWindowLocked = true;
|
||||
|
|
@ -284,6 +290,10 @@ private:
|
|||
int auctionSellBid_[3] = {0, 0, 0}; // gold, silver, copper
|
||||
int auctionSellBuyout_[3] = {0, 0, 0}; // gold, silver, copper
|
||||
int auctionSelectedItem_ = -1;
|
||||
int auctionSellSlotIndex_ = -1; // Selected backpack slot for selling
|
||||
uint32_t auctionBrowseOffset_ = 0; // Pagination offset for browse results
|
||||
int auctionItemClass_ = -1; // Item class filter (-1 = All)
|
||||
int auctionItemSubClass_ = -1; // Item subclass filter (-1 = All)
|
||||
|
||||
// Guild bank money input
|
||||
int guildBankMoneyInput_[3] = {0, 0, 0}; // gold, silver, copper
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue