mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-29 12:47:54 +00:00
Added 'server ready' broadcast to UCS server so clients will reconnect after crash
This commit is contained in:
@@ -615,6 +615,7 @@ RULE_INT(Chat, KarmaGlobalChatLimit, 72) //amount of karma you need to be able t
|
||||
RULE_INT(Chat, GlobalChatLevelLimit, 8) //level limit you need to of reached to talk in ooc/auction/chat if your karma is too low.
|
||||
RULE_INT(Chat, ExpireClientVersionRequests, 3) // time in seconds to keep current cv requests active
|
||||
RULE_INT(Chat, ExpireClientVersionReplies, 30) // time in seconds to keep current cv replies active
|
||||
RULE_INT(Chat, UCSBroadcastServerReadyDelay, 60) // time in seconds to delay broadcast `server ready` after start-up
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Merchant)
|
||||
|
||||
@@ -192,6 +192,7 @@
|
||||
#define ServerOP_CZSetEntityVariableByClientName 0x4012
|
||||
#define ServerOP_UCSClientVersionRequest 0x4013
|
||||
#define ServerOP_UCSClientVersionReply 0x4014
|
||||
#define ServerOP_UCSBroadcastServerReady 0x4015
|
||||
/* Query Server OP Codes */
|
||||
#define ServerOP_QSPlayerLogTrades 0x5010
|
||||
#define ServerOP_QSPlayerLogHandins 0x5011
|
||||
@@ -1289,6 +1290,11 @@ struct UCSClientVersionReply_Struct {
|
||||
EQEmu::versions::ClientVersion client_version;
|
||||
};
|
||||
|
||||
struct UCSBroadcastServerReady_Struct {
|
||||
char chat_prefix[128];
|
||||
char mail_prefix[128];
|
||||
};
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
||||
@@ -110,6 +110,23 @@ uint32 SharedDatabase::GetTotalTimeEntitledOnAccount(uint32 AccountID) {
|
||||
return EntitledTime;
|
||||
}
|
||||
|
||||
void SharedDatabase::SetMailKey(int CharID, int IPAddress, int MailKey)
|
||||
{
|
||||
char MailKeyString[17];
|
||||
|
||||
if (RuleB(Chat, EnableMailKeyIPVerification) == true)
|
||||
sprintf(MailKeyString, "%08X%08X", IPAddress, MailKey);
|
||||
else
|
||||
sprintf(MailKeyString, "%08X", MailKey);
|
||||
|
||||
std::string query = StringFormat("UPDATE character_data SET mailkey = '%s' WHERE id = '%i'",
|
||||
MailKeyString, CharID);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log(Logs::General, Logs::Error, "SharedDatabase::SetMailKey(%i, %s) : %s", CharID, MailKeyString, results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
bool SharedDatabase::SaveCursor(uint32 char_id, std::list<EQEmu::ItemInstance*>::const_iterator &start, std::list<EQEmu::ItemInstance*>::const_iterator &end)
|
||||
{
|
||||
// Delete cursor items
|
||||
|
||||
@@ -72,6 +72,7 @@ class SharedDatabase : public Database
|
||||
void SaveCharacterInspectMessage(uint32 character_id, const InspectMessage_Struct* message);
|
||||
bool GetCommandSettings(std::map<std::string, std::pair<uint8, std::vector<std::string>>> &command_settings);
|
||||
uint32 GetTotalTimeEntitledOnAccount(uint32 AccountID);
|
||||
void SetMailKey(int CharID, int IPAddress, int MailKey);
|
||||
|
||||
/*
|
||||
Character InventoryProfile
|
||||
|
||||
Reference in New Issue
Block a user