Switchbot gate: find the mt<date> mark anywhere in the client timestamp
Every locale.cfg client build is LOCALE_SERVICE_EUROPE and sends CG_CLIENT_VERSION2, and 203 compares that timestamp with atoi against 1215955205. The client now sends "1215955205 mt20261016", so the gate looks for "mt" instead of requiring it at the start. Found on channel5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
a28393b16b
commit
972c200cd0
@@ -12,8 +12,9 @@
|
||||
// "switchbot_stop <reason>") for localeInfo text, instead of AVA2's numeric locale ids 864 / 865.
|
||||
// - Leaving the core deletes the table after it is sent (AVA2 leaked it), and a logout that unregisters the last
|
||||
// active slot stops the roll event.
|
||||
// - Version gate: EnterGame sends nothing unless the CG_CLIENT_VERSION timestamp is "mt<date>" with
|
||||
// date >= PORT_SWITCHBOT_CLIENT_VERSION (older clients send __TIMESTAMP__ or "1215955205").
|
||||
// - Version gate: EnterGame sends nothing unless the CG_CLIENT_VERSION(2) timestamp carries "mt<date>" with
|
||||
// date >= PORT_SWITCHBOT_CLIENT_VERSION. The EU client sends "1215955205 mt<date>": the europe version
|
||||
// check reads the timestamp with atoi, so it still sees 1215955205. Older clients send "1215955205" only.
|
||||
// - The attribute list has two pseudo sets after ATTRIBUTE_SET_MAX_NUM: 8 = rings (port_rings.cpp) and
|
||||
// 9 = talismans (port_pendant.cpp), whose pools are not in item_attr.
|
||||
#include "stdafx.h"
|
||||
@@ -742,8 +743,8 @@ void CSwitchbotManager::SendSwitchbotUpdate(DWORD player_id)
|
||||
bool SwitchbotHelper::IsClientSupported(LPCHARACTER ch)
|
||||
{
|
||||
LPDESC d = ch ? ch->GetDesc() : NULL;
|
||||
const char* c_pszVersion = d ? d->GetClientVersion() : "";
|
||||
return c_pszVersion[0] == 'm' && c_pszVersion[1] == 't' && atoi(c_pszVersion + 2) >= PORT_SWITCHBOT_CLIENT_VERSION;
|
||||
const char* c_pszMark = d ? strstr(d->GetClientVersion(), "mt") : NULL;
|
||||
return c_pszMark && atoi(c_pszMark + 2) >= PORT_SWITCHBOT_CLIENT_VERSION;
|
||||
}
|
||||
|
||||
void CSwitchbotManager::EnterGame(LPCHARACTER ch)
|
||||
|
||||
Reference in New Issue
Block a user