From c0f9ee43affe07b93b553c0af9e705dd88bfe772 Mon Sep 17 00:00:00 2001 From: fusion32 Date: Sun, 13 Jul 2025 13:16:38 -0300 Subject: impl BANISH_ACCOUNT --- src/querymanager.hh | 50 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 17 deletions(-) (limited to 'src/querymanager.hh') diff --git a/src/querymanager.hh b/src/querymanager.hh index 40066af..9e54ea8 100644 --- a/src/querymanager.hh +++ b/src/querymanager.hh @@ -647,6 +647,22 @@ void ProcessConnectionQuery(TConnection *Connection); // database.cc //============================================================================== +struct TWorldConfig{ + int Type; + int RebootTime; + int Address; + int Port; + int MaxPlayers; + int PremiumPlayerBuffer; + int MaxNewbies; + int PremiumNewbieBuffer; +}; + +struct TCharacterIndexEntry{ + char Name[30]; + int CharacterID; +}; + struct THouseAuction{ int HouseID; int BidderID; @@ -687,28 +703,24 @@ struct THouse{ bool GuildHouse; }; -struct TOnlineCharacter{ - char Name[30]; - int Level; - char Profession[30]; +struct TNamelockStatus{ + bool Namelocked; + bool Approved; }; -struct TCharacterIndexEntry{ - char Name[30]; - int CharacterID; +struct TBanishmentStatus{ + bool Banished; + bool FinalWarning; + int TimesBanished; }; -struct TWorldConfig{ - int Type; - int RebootTime; - int Address; - int Port; - int MaxPlayers; - int PremiumPlayerBuffer; - int MaxNewbies; - int PremiumNewbieBuffer; +struct TOnlineCharacter{ + char Name[30]; + int Level; + char Profession[30]; }; +// NOTE(fusion): Transaction scope guard. struct TransactionScope{ private: const char *m_Context; @@ -748,9 +760,13 @@ bool InsertHouses(int WorldID, int NumHouses, THouse *Houses); bool ExcludeFromAuctions(int WorldID, int CharacterID, int Duration, int BanishmentID); // NOTE(fusion): Banishment tables. -bool GetNamelockStatus(int CharacterID, bool *Approved); +TNamelockStatus GetNamelockStatus(int CharacterID); bool InsertNamelock(int CharacterID, int IPAddress, int GamemasterID, const char *Reason, const char *Comment); +TBanishmentStatus GetBanishmentStatus(int CharacterID); +bool InsertBanishment(int CharacterID, int IPAddress, + int GamemasterID, const char *Reason, const char *Comment, + bool FinalWarning, int Duration, int *BanishmentID); // NOTE(fusion): Info tables. bool DeleteOnlineCharacters(int WorldID); -- cgit v1.2.3