Add own item info data handle
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using ModelRenderer.Scripts.GameData;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BrewMonster
|
||||
{
|
||||
@@ -24,7 +25,7 @@ namespace BrewMonster
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogError($"ElementDataManProvider: Failed to load element data: {ex}");
|
||||
Logger.LogError($"ElementDataManProvider: Failed to load element data: {ex} - {ex.StackTrace}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -586,11 +586,11 @@ namespace ModelRenderer.Scripts.GameData
|
||||
add_id_data(ID_SPACE.ID_SPACE_ESSENCE, item.id, item);
|
||||
}
|
||||
|
||||
foreach (var item in unionscroll_essence_array)
|
||||
/*foreach (var item in unionscroll_essence_array)
|
||||
{
|
||||
add_id_index(ID_SPACE.ID_SPACE_ESSENCE, item.id, DATA_TYPE.DT_UNIONSCROLL_ESSENCE);
|
||||
add_id_data(ID_SPACE.ID_SPACE_ESSENCE, item.id, item);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
public void SaveDataToTextFile()
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
using BrewMonster;
|
||||
using ModelRenderer.Scripts.GameData;
|
||||
|
||||
namespace PerfectWorld.Scripts.Managers
|
||||
{
|
||||
public class EC_IvtrItem
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 423a6efd71f143f08096d684ca414bba
|
||||
timeCreated: 1757752654
|
||||
@@ -102,11 +102,7 @@ namespace BrewMonster.Network
|
||||
{
|
||||
Instance._gameSession.SelectRoleAsync(roleInfo, callback);
|
||||
}
|
||||
public static void EnterWorldAsync(RoleInfo roleInfo, Action callback = null)
|
||||
{
|
||||
Instance._gameSession.EnterWorldAsync(roleInfo, callback);
|
||||
}
|
||||
|
||||
|
||||
public static void RequestInventoryAsync(Action callback = null)
|
||||
{
|
||||
Instance._gameSession.RequestInventoryAsync(callback);
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace BrewMonster.UI
|
||||
Logger.Log($"OnSelectRoleComplete {roleInfo.name} - {roleInfo.roleid}");
|
||||
|
||||
// now we have to enter the world
|
||||
/* UnityGameSession.SendProtocol(
|
||||
UnityGameSession.SendProtocol(
|
||||
new enterworld()
|
||||
{
|
||||
Roleid = roleInfo.roleid,
|
||||
@@ -97,8 +97,9 @@ namespace BrewMonster.UI
|
||||
Settime = 0,
|
||||
Timeout = 0
|
||||
}
|
||||
);*/
|
||||
UnityGameSession.EnterWorldAsync(roleInfo, OnEnterWorldComplete);
|
||||
|
||||
);
|
||||
OnEnterWorldComplete();
|
||||
}
|
||||
|
||||
private async void OnEnterWorldComplete()
|
||||
|
||||
@@ -13,6 +13,7 @@ using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
using Scene = UnityEngine.SceneManagement.Scene;
|
||||
using System.Runtime.InteropServices;
|
||||
using BrewMonster;
|
||||
|
||||
public class CECHostPlayer : MonoBehaviour
|
||||
{
|
||||
@@ -191,6 +192,27 @@ public class CECHostPlayer : MonoBehaviour
|
||||
OnMsgHstIvtrInfo(Msg);
|
||||
break;
|
||||
}
|
||||
case int value when value == EC_MsgDef.MSG_HST_OWNITEMINFO:
|
||||
{
|
||||
OnMsgHstOwnItemInfo(Msg);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void OnMsgHstOwnItemInfo(ECMSG Msg)
|
||||
{
|
||||
int cmd = Convert.ToInt32(Msg.dwParam2);
|
||||
switch (cmd)
|
||||
{
|
||||
case CommandID.OWN_ITEM_INFO:
|
||||
{
|
||||
Debug.Log("[Inventory] OWN_ITEM_INFO received");
|
||||
var data = Msg.dwParam1 as byte[];
|
||||
int hostId = Convert.ToInt32(Msg.dwParam3);
|
||||
LogInventoryPacket("OWN_ITEM_INFO", data, hostId);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
public void OnMsgHstIvtrInfo(ECMSG Msg)
|
||||
@@ -211,26 +233,10 @@ public class CECHostPlayer : MonoBehaviour
|
||||
{
|
||||
Debug.Log("[Inventory] OWN_IVTR_DETAIL_DATA received");
|
||||
LogInventoryPacket("OWN_IVTR_DETAIL_DATA", data, hostId);
|
||||
//ElementDataManProvider.GetElementDataMan().armor_essence_array.
|
||||
break;
|
||||
}
|
||||
case CommandID.GET_OWN_MONEY:
|
||||
{
|
||||
Debug.Log("[Inventory] GET_OWN_MONEY received");
|
||||
LogInventoryRaw("GET_OWN_MONEY", data);
|
||||
break;
|
||||
}
|
||||
case CommandID.CHANGE_IVTR_SIZE:
|
||||
{
|
||||
Debug.Log("[Inventory] CHANGE_IVTR_SIZE received");
|
||||
LogInventoryRaw("CHANGE_IVTR_SIZE", data);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
Debug.Log($"[Inventory] Unhandled inventory cmd={cmd}");
|
||||
LogInventoryRaw($"CMD_{cmd}", data);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
public void OnMsgHstCorrectPos(in ECMSG Msg)
|
||||
|
||||
Reference in New Issue
Block a user