fix UIPlayer class

This commit is contained in:
MinhHai
2025-12-02 14:28:00 +07:00
parent f827878785
commit a73bacfa87
3 changed files with 13 additions and 15 deletions
@@ -7,6 +7,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using CSNetwork;
using UnityEngine;
namespace BrewMonster.Scripts.Task
@@ -362,12 +363,7 @@ namespace BrewMonster.Scripts.Task
return false;
}
// allocate internal buffers and copy; remaining bytes are zero-initialized in C#
// m_pActiveListRawBuf = new byte[TaskInterfaceConstants.TASK_ACTIVE_LIST_BUF_SIZE];
// {
// int copy = Mathf.Min(iActiveListLen, TaskInterfaceConstants.TASK_ACTIVE_LIST_BUF_SIZE);
// if (copy > 0) System.Buffer.BlockCopy(pActiveListBuf, 0, m_pActiveListRawBuf, 0, copy);
// }
m_pActiveListBuf = new ActiveTaskList();
m_pActiveListBuf.ReadFromBuffer(pActiveListBuf);
@@ -1310,11 +1306,6 @@ namespace BrewMonster.Scripts.Task
if (m_TasksToConfirm.TryGetValue(iTaskID, out ret)) return ret;
return false;
}
public void NotifyServer(ref task_notify_base pBuf, uint sz)
{
UnityGameSession.c2s_CmdTaskNotify(ref pBuf, sz);
}
public bool CheckVersion()
{
@@ -1436,6 +1427,12 @@ namespace BrewMonster.Scripts.Task
break;
}
}
public void NotifyServer(byte[] pBuf, uint sz)
{
// g_pGame->GetGameSession()->c2s_CmdTaskNotify(pBuf, sz);
UnityGameSession.c2s_CmdTaskNotify(pBuf, sz);
}
}