mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-11-21 09:00:33 +00:00
Buddy rework, adjustments, and fixes
I cleaned up the code a bit (I'll clean it up more as I make more progress) and fixed a bug with buddy slots. Now buddies aren't overwritten! A few reworks and adjustments I reworked the buddyIDs array to store only player UIDs instead of IDs. I also reworked buddy deleting so that it deletes buddies from the array. Code cleanup Cleaned up some of the code. I mainly just removed useless helper methods.
This commit is contained in:
@@ -34,11 +34,7 @@ namespace BuddyManager {
|
||||
void reqBuddyWarp(CNSocket* sock, CNPacketData* data);
|
||||
|
||||
// helper methods
|
||||
void requestedBuddy(CNSocket* sock, Player* plrReq, PlayerView& plr);
|
||||
void buddyList(CNSocket* sock, sBuddyBaseInfo BuddyInfo); // updates the buddylist
|
||||
void otherAcceptBuddy(CNSocket* sock, int32_t BuddyID, int64_t BuddyPCUID, sP_FE2CL_REP_ACCEPT_MAKE_BUDDY_SUCC resp, Player* plr); // tells the other player that they are now buddies with the requester.
|
||||
|
||||
|
||||
// Name checks
|
||||
bool firstNameCheck(char16_t reqFirstName[], char16_t resFirstName[], int sizeOfReq, int sizeOfRes); // checks if the request and requested player's first names match
|
||||
bool lastNameCheck(char16_t reqLastName[], char16_t resLastName[], int sizeOfLNReq, int sizeOfLNRes); // checks if the request and requested player's last names match
|
||||
bool NameCheck(char16_t reqName[], char16_t resName[], int sizeOfReq, int sizeOfRes); // checks if the request and requested player's names match
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user