DONE: save skill combo
This commit is contained in:
@@ -9,6 +9,19 @@ using BrewMonster.Scripts;
|
||||
|
||||
namespace BrewMonster
|
||||
{
|
||||
// C++: Host config constants (version, shortcut set counts/sizes)
|
||||
public static class HostCfgConstants
|
||||
{
|
||||
public const int HOSTCFG_VERSION = 11;
|
||||
public const int NUM_HOSTSCSETS1 = 5; // expanded from 3 to 5 (2009.05.27)
|
||||
public const int NUM_HOSTSCSETS2 = 3;
|
||||
public const int SIZE_HOSTSCSET1 = 9; // expanded from 6 to 9 (2009.05.27)
|
||||
public const int SIZE_HOSTSCSET2 = 8;
|
||||
public const int NUM_SYSMODSETS = 4; // System module shortcut sets count
|
||||
public const int SIZE_SYSMODSCSET = 4; // System module shortcut set size (first 4 slots)
|
||||
public const int SIZE_FASHIONSCSET = 240;
|
||||
}
|
||||
|
||||
public partial class CECHostPlayer
|
||||
{
|
||||
// Shortcut sets (converted from C++: m_aSCSets1[NUM_HOSTSCSETS1], m_aSCSets2[NUM_HOSTSCSETS2], m_aSCSetSysMod[NUM_SYSMODSETS])
|
||||
@@ -27,18 +40,7 @@ namespace BrewMonster
|
||||
|
||||
BOOTH_AUTO_YINPIAO m_AutoYinpiao;
|
||||
|
||||
// C++: Host config constants (version, shortcut set counts/sizes)
|
||||
private static class HostCfgConstants
|
||||
{
|
||||
public const int HOSTCFG_VERSION = 11;
|
||||
public const int NUM_HOSTSCSETS1 = 5; // expanded from 3 to 5 (2009.05.27)
|
||||
public const int NUM_HOSTSCSETS2 = 3;
|
||||
public const int SIZE_HOSTSCSET1 = 9; // expanded from 6 to 9 (2009.05.27)
|
||||
public const int SIZE_HOSTSCSET2 = 8;
|
||||
public const int NUM_SYSMODSETS = 4; // System module shortcut sets count
|
||||
public const int SIZE_SYSMODSCSET = 4; // System module shortcut set size (first 4 slots)
|
||||
public const int SIZE_FASHIONSCSET = 240;
|
||||
}
|
||||
|
||||
|
||||
// Load configs data (shortcut, etc.) from specified buffer
|
||||
// Converted from: bool CECHostPlayer::LoadConfigData(const void* pDataBuf)
|
||||
|
||||
@@ -902,14 +902,14 @@ public partial class CECGameRun : ITickable
|
||||
// iTotalSize += (int)dwUISize;
|
||||
// iTotalSize += sizeof (int);
|
||||
uint dwUISize = 0;
|
||||
pGameUI.GetUserLayout(null, ref dwUISize); // TODO: Check if this is needed here
|
||||
pGameUI.GetUserLayout(null,0, ref dwUISize); // TODO: Check if this is needed here
|
||||
iTotalSize += sizeof(int) + (int)dwUISize;
|
||||
|
||||
// int iSettingSize = 0;
|
||||
// g_pGame->GetConfigs()->SaveUserConfigData(NULL, &iSettingSize);
|
||||
// iTotalSize += iSettingSize;
|
||||
int iSettingSize = 0;
|
||||
EC_Game.GetConfigs().SaveUserConfigData(null, out iSettingSize);
|
||||
EC_Game.GetConfigs().SaveUserConfigData(null, 0, out iSettingSize);
|
||||
// iTotalSize += sizeof(int) + iSettingSize;
|
||||
iTotalSize += iSettingSize;
|
||||
|
||||
@@ -941,7 +941,7 @@ public partial class CECGameRun : ITickable
|
||||
// pData += dwUISize;
|
||||
Buffer.BlockCopy(BitConverter.GetBytes((int)dwUISize), 0, pDataBuf, offset, sizeof(int));
|
||||
offset += sizeof(int);
|
||||
pGameUI.GetUserLayout(pDataBuf, ref dwUISize); // TODO: Check if this is needed here
|
||||
pGameUI.GetUserLayout(pDataBuf, offset, ref dwUISize); // TODO: Check if this is needed here
|
||||
offset += (int)dwUISize;
|
||||
BMLogger.Log($"[SaveConfigsToServer] offset={offset} (after UI layout, dwUISize={dwUISize})");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user