Fixed cookies being reset on some occasions and admin-dependant classes are saved properly as well.

This commit is contained in:
Greyscale
2010-02-19 17:41:24 -08:00
parent 4776bf4e04
commit 21c41688d7
8 changed files with 124 additions and 23 deletions

View File

@ -318,6 +318,17 @@ WeaponsClientInit(client)
ZMarketClientInit(client);
}
/**
* Called once a client's saved cookies have been loaded from the database.
*
* @param client Client index.
*/
WeaponsOnCookiesCached(client)
{
// Forward event to sub-modules.
ZMarketOnCookiesCached(client);
}
/**
* Client is leaving the server.
*

View File

@ -109,7 +109,15 @@ ZMarketClientInit(client)
// Create a new array handle to store purchase count data for client.
g_hZMarketPurchaseCount[client] = CreateTrie();
}
/**
* Called once a client's saved cookies have been loaded from the database.
*
* @param client Client index.
*/
ZMarketOnCookiesCached(client)
{
// Initialize auto-rebuy data.
decl String:zmarketautorebuy[8];
GetClientCookie(client, g_hZMarketAutoRebuyCookie, zmarketautorebuy, sizeof(zmarketautorebuy));