Files
DarkflameServer/dDatabase/GameDatabase/ITables/IPetNames.h
Aaron Kimbrell e213a7aeff feat: web dashboard and playground work
The NexusDashboard-parity dashboard (dDashboardServer) and everything built on it on the experimental branch:
accounts, characters, properties and moderation tools, permissions shared with in-game slash commands, economy
reports, World 3D and property 3D views with client scenery, scheduled events (features, vanity changes, live
events, announcements, restarts), vanity files and events, the CDClient browser, the message inspector with saved
captures, chat filter tools, community challenges, live ops, the AI moderator helper, and the server-side changes
they need.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 22:30:43 -05:00

42 lines
1.3 KiB
C++

#ifndef __IPETNAMES__H__
#define __IPETNAMES__H__
#include <cstdint>
#include <optional>
#include <string>
#include <string_view>
#include <vector>
#include "dCommonVars.h"
class IPetNames {
public:
struct Info {
std::string petName;
int32_t approvalStatus{};
// The character that owns the pet (0 when not known). Saving with 0 keeps the owner already stored.
LWOOBJID ownerId{};
};
// Set the pet name moderation status for the given pet id.
virtual void SetPetNameModerationStatus(const LWOOBJID& petId, const IPetNames::Info& info) = 0;
// Get pet info for the given pet id.
virtual std::optional<IPetNames::Info> GetPetNameInfo(const LWOOBJID& petId) = 0;
// Get paginated pet names data for DataTables display
virtual std::string GetPetNamesTable(uint32_t start, uint32_t length, const std::string_view search = "", uint32_t orderColumn = 0, bool orderAsc = true, bool pendingOnly = false) = 0;
// Approve a pet name by id
virtual void ApprovePetName(const int64_t id) = 0;
// Reject (delete) a pet name by id
virtual void RejectPetName(const int64_t id) = 0;
// Pets whose owner was never recorded (named before owners were saved), and recording one (0: nobody has it)
virtual std::vector<LWOOBJID> GetPetsWithUnknownOwner() = 0;
virtual void SetPetOwner(const LWOOBJID petId, const LWOOBJID ownerId) = 0;
};
#endif //!__IPETNAMES__H__