push ho a dac
This commit is contained in:
Vendored
+1
-1
@@ -9,7 +9,7 @@
|
||||
{
|
||||
"name": "Attach to Unity",
|
||||
"type": "vstuc",
|
||||
"request": "attach"
|
||||
"request": "attach",
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -131,13 +131,13 @@ Material:
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0, g: 1, b: 0.9534545, a: 0.8509804}
|
||||
- _Color: {r: 0, g: 0.5, b: 1, a: 0.8}
|
||||
- _DeepColor: {r: 0, g: 0.9803924, b: 1, a: 0.78431374}
|
||||
- _DeepColor: {r: 0, g: 0.9803924, b: 1, a: 0.29803923}
|
||||
- _FoamColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _FoamSpeed: {r: 0.1, g: 0.1, b: 0, a: 0}
|
||||
- _FoamSpeedA: {r: 0.1, g: 0.1, b: 0, a: 0}
|
||||
- _FoamSpeedB: {r: -0.08, g: 0.06, b: 0, a: 0}
|
||||
- _NormalTiling: {r: 40, g: 40, b: 0, a: 0}
|
||||
- _ShallowColor: {r: 0, g: 0.9806142, b: 1, a: 1}
|
||||
- _ShallowColor: {r: 0, g: 0.9806141, b: 1, a: 0.68235296}
|
||||
- _WaterColor: {r: 0.19999996, g: 0.6, b: 0.8, a: 0.8}
|
||||
- _WaveDirection: {r: 1, g: 1, b: 0, a: 0}
|
||||
- _WaveSpeed1: {r: 0.05, g: 0.03, b: 0, a: 0}
|
||||
|
||||
@@ -1,8 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using CSNetwork.GPDataType;
|
||||
using UnityEngine;
|
||||
|
||||
[System.Serializable]
|
||||
public struct TRANS_TARGET
|
||||
{
|
||||
public int id;
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
|
||||
public ushort[] name;
|
||||
public int world_id;
|
||||
public A3DVECTOR3 vecPos;
|
||||
public int domain_id;
|
||||
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public struct TRANS_TARGET_SERV
|
||||
{
|
||||
public int id;
|
||||
public int world_id;
|
||||
public A3DVECTOR3 vecPos;
|
||||
public int domain_id;
|
||||
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public struct GShopBuyOption
|
||||
{
|
||||
@@ -72,3 +97,11 @@ public static class BinaryReaderExtensions
|
||||
return System.Text.Encoding.Unicode.GetString(bytes).TrimEnd('\0');
|
||||
}
|
||||
}
|
||||
|
||||
public class GlobalTransmitData
|
||||
{
|
||||
private static List<TRANS_TARGET> global_trans_targets = new();
|
||||
private static List<TRANS_TARGET_SERV> global_trans_targets_server = new();
|
||||
|
||||
public static List<TRANS_TARGET> globaldata_gettranstargets => global_trans_targets;
|
||||
}
|
||||
@@ -104,7 +104,7 @@ namespace BrewMonster.Scripts.Managers
|
||||
public async Task<GameObject> GetModelPlayer(byte profession, byte gender)
|
||||
{
|
||||
var prefab = await AddressableManager.Instance.LoadPrefabAsync(_playerModelPaths[profession * GENDER.NUM_GENDER + gender]);
|
||||
// BMLogger.LogError("_playerModelPaths[profession * GENDER.NUM_GENDER + gender] = " + _playerModelPaths[profession * GENDER.NUM_GENDER + gender]);
|
||||
BMLogger.LogError("_playerModelPaths[profession * GENDER.NUM_GENDER + gender] = " + _playerModelPaths[profession * GENDER.NUM_GENDER + gender]);
|
||||
if (prefab == null)
|
||||
{
|
||||
BMLogger.LogError( $" [NPC Manager] Not found Prefab from Addressable with profession : {profession} gender : {gender}");
|
||||
|
||||
@@ -32,6 +32,7 @@ namespace BrewMonster.Scripts
|
||||
/// </summary>
|
||||
public async void ShowAllPlayerModels(List<RoleInfo> roleInfos)
|
||||
{
|
||||
BMLogger.Log($"ShowAllPlayerModels: {roleInfos.Count}");
|
||||
_loadVersion++;
|
||||
int version = _loadVersion;
|
||||
|
||||
@@ -111,12 +112,14 @@ namespace BrewMonster.Scripts
|
||||
|
||||
private async UniTask<GameObject> LoadPlayerModel(RoleInfo role)
|
||||
{
|
||||
BMLogger.Log($"LoadPlayerModel: {role.roleid}");
|
||||
var elemendataman = BrewMonster.ElementDataManProvider.GetElementDataMan();
|
||||
GameObject prefab = await NPCManager.Instance.GetModelPlayer(role.occupation, role.gender);
|
||||
if (prefab == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
BMLogger.Log($"LoadPlayerModel: {role.roleid} - prefab loaded");
|
||||
GameObject model = Instantiate(prefab);
|
||||
var playerDefaultEquipments = model.GetComponentInChildren<PlayerDefaultEquipments>();
|
||||
if (playerDefaultEquipments == null)
|
||||
|
||||
@@ -3240,11 +3240,12 @@ namespace BrewMonster.UI
|
||||
// id_dialog = (int)pService.id_dialog;
|
||||
// idFunction = (int)SERVICE_TYPE.NPC_HEAL;
|
||||
// }
|
||||
// else if (DataType == DATA_TYPE.DT_NPC_TRANSMIT_SERVICE)
|
||||
// {
|
||||
// NPC_TRANSMIT_SERVICE pService = (NPC_TRANSMIT_SERVICE)pData;
|
||||
// idFunction = (int)SERVICE_TYPE.NPC_TRANSMIT;
|
||||
// }
|
||||
else if (DataType == DATA_TYPE.DT_NPC_TRANSMIT_SERVICE)
|
||||
{
|
||||
NPC_TRANSMIT_SERVICE pService = (NPC_TRANSMIT_SERVICE)pData;
|
||||
id_dialog = (int)pService.id_dialog;
|
||||
idFunction = (int)SERVICE_TYPE.NPC_TRANSMIT;
|
||||
}
|
||||
// else if (DataType == DATA_TYPE.DT_NPC_TRANSPORT_SERVICE)
|
||||
// {
|
||||
// NPC_TRANSPORT_SERVICE pService = (NPC_TRANSPORT_SERVICE)pData;
|
||||
@@ -3464,8 +3465,10 @@ namespace BrewMonster.UI
|
||||
}
|
||||
else if (idFunction == (int)SERVICE_TYPE.NPC_TRANSMIT)
|
||||
{
|
||||
dialogue1 = "Win_WorldMapTravel";
|
||||
// pShow1 = m_pAUIManager.GetDialog("Win_WorldMapTravel");
|
||||
dialogue1 = "Win_WorldMap";
|
||||
var pShow1 = m_pAUIManager.GetDialog("Win_WorldMap") as DlgWorldMap;
|
||||
pShow1.Show(true);
|
||||
pShow1.BuildTravelMap((uint)DATA_TYPE.DT_NPC_TRANSMIT_SERVICE, pData);
|
||||
//((CDlgWorldMap*)pShow1).BuildTravelMap(DT_NPC_TRANSMIT_SERVICE, pData);
|
||||
}
|
||||
// else if (idFunction == (int)SERVICE_TYPE.NPC_SKILL)
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using BrewMonster.Network;
|
||||
using CSNetwork.Common;
|
||||
using CSNetwork.GPDataType;
|
||||
using ModelRenderer.Scripts.Common;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
@@ -127,7 +130,8 @@ namespace BrewMonster.UI
|
||||
|
||||
if(dwType == (uint)DATA_TYPE.DT_NPC_TRANSMIT_SERVICE)
|
||||
{
|
||||
// worldid = pMgr->FindTransmitWorldID((NPC_TRANSMIT_SERVICE*)pData);
|
||||
var serviceData = (NPC_TRANSMIT_SERVICE)pData;
|
||||
var worldInstanceName = UnityGameSession.Instance.GetWorldInstanceName((int)serviceData.id);
|
||||
|
||||
// save the worldid
|
||||
// SetDataPtr((void*)worldid, "WorldID");
|
||||
@@ -167,4 +171,83 @@ namespace BrewMonster.UI
|
||||
CloseDialogue();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public struct TRANS_POINT
|
||||
{
|
||||
public int id;
|
||||
public int worldid;
|
||||
public string strName;
|
||||
public A3DVECTOR3 vecPos;
|
||||
};
|
||||
|
||||
|
||||
public enum TransMode
|
||||
{
|
||||
TM_INVALID = 0,
|
||||
TM_TRANSMITSCROLL = 1, // 通过传送卷轴传送 / Transmit scroll
|
||||
TM_NPC_TRANSMIT_NORMAL = 2, // 通过 NPC 传送服务、向当前 NPC 连接点传送 / Transmit service to the current NPC connection point
|
||||
TM_NPC_TRANSMIT_DIRECT = 3, // 通过 NPC 传送服务、向当前 NPC 可达点直接传送 / Transmit service to the current NPC reachable point directly
|
||||
};
|
||||
|
||||
|
||||
|
||||
public class CECMapDlgsMgr
|
||||
{
|
||||
public int m_nCurFlagIndex;
|
||||
public bool m_bMarking;
|
||||
public bool m_bMapDragging;
|
||||
public List<TRANS_POINT> m_vecTeamMate = new();
|
||||
public Dictionary<int, TRANS_POINT> m_transPoints = new();
|
||||
|
||||
// update player way-points
|
||||
public void UpdateWayPoints(object pData, int iSize, bool bClear)
|
||||
{
|
||||
var vecTarget = GlobalTransmitData.globaldata_gettranstargets;
|
||||
|
||||
if(bClear)
|
||||
{
|
||||
m_transPoints.Clear();
|
||||
}
|
||||
|
||||
// got valid points.
|
||||
for(int i = 0; i < iSize; i++ )
|
||||
{
|
||||
int idThis = *(pData+i);
|
||||
for(int j = 0; j < vecTarget.Count; j++ )
|
||||
{
|
||||
if( idThis != vecTarget[j].id ) continue;
|
||||
|
||||
TRANS_POINT tp;
|
||||
|
||||
tp.id = idThis;
|
||||
tp.strName = ByteToStringUtils.UshortArrayToUnicodeString(vecTarget[j].name);
|
||||
tp.vecPos = vecTarget[j].vecPos;
|
||||
tp.worldid = vecTarget[j].world_id;
|
||||
|
||||
m_transPoints[idThis] = tp;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class TransWay
|
||||
{
|
||||
public const int WAYPOINT_ME = 0;
|
||||
public const int WAYPOINT_TARGET = 1;
|
||||
|
||||
public const int MINIMAP_UL = 0;
|
||||
public const int MINIMAP_UR = 1;
|
||||
public const int MINIMAP_LL = 2;
|
||||
public const int MINIMAP_LR = 3;
|
||||
public const int MINIMAP_MAX = 4;
|
||||
|
||||
// The transmission mode to use when sending the transmission protocol (TM_NPC_TRANSMIT_NORMAL =2 and the number of wayPoints is greater than 1 may be true at the same time)
|
||||
public TransMode mode; // 发送传送协议时应使用的传送模式(TM_NPC_TRANSMIT_NORMAL =2 与 wayPoints 个数大于1可能同时成立)
|
||||
public int nCost; // 需要的完美币 / The required perfect coin
|
||||
public int nLevel; // 需求的等级 / The required level
|
||||
// The transmission route (excluding the start point and including the end point) (can be used for display in all modes, can only be used for protocol in TM_NPC_TRANSMIT_DIRECT mode)
|
||||
public List<TRANS_POINT> wayPoints = new(); // 传送路线(不含起点、包括终点)(各模式下均可用于显示,TM_NPC_TRANSMIT_DIRECT 模式下才可用于协议)
|
||||
}
|
||||
}
|
||||
@@ -57,54 +57,16 @@ namespace BrewMonster
|
||||
|
||||
void OnMsgHstWayPoint(ECMSG Msg)
|
||||
{
|
||||
//CECGameUIMan pGameUI = EC_Game.GetGameRun().GetUIManager().GetInGameUIMan();
|
||||
CECGameUIMan pGameUI = EC_Game.GetGameRun().GetUIManager().GetInGameUIMan();
|
||||
|
||||
//if (Convert.ToInt32(Msg.dwParam2) == CommandID.ACTIVATE_WAYPOINT)
|
||||
//{
|
||||
// cmd_activate_waypoint pCmd = GPDataTypeHelper.FromBytes<cmd_activate_waypoint>((byte[])Msg.dwParam1);
|
||||
// m_aWayPoints.Add(pCmd.waypoint);
|
||||
if (Convert.ToInt32(Msg.dwParam2) == CommandID.ACTIVATE_WAYPOINT)
|
||||
{
|
||||
cmd_activate_waypoint pCmd = GPDataTypeHelper.FromBytes<cmd_activate_waypoint>((byte[])Msg.dwParam1);
|
||||
m_aWayPoints.Add(pCmd.waypoint);
|
||||
|
||||
// // add to waypoints array
|
||||
// add to waypoints array
|
||||
// pGameUI.GetMapDlgsMgr().UpdateWayPoints(&pCmd.waypoint, 1, false);
|
||||
|
||||
// // Print a notify message
|
||||
// const CECMapDlgsMgr::PointMap& aWayPoints = pGameUI.GetMapDlgsMgr().GetTransPoint();
|
||||
// CECMapDlgsMgr::PointMap::const_iterator itr = aWayPoints.find(pCmd.waypoint);
|
||||
// if(itr != aWayPoints.end())
|
||||
// {
|
||||
// g_pGame.GetGameRun().AddFixedMessage(FIXMSG_NEWWAYPOINT, (itr.second).strName);
|
||||
|
||||
// bool bCanPopUITips = true;
|
||||
// int count = CECUIConfig::Instance().GetGameUI().GetTaskIDDisableWayPointsUITipsCount();
|
||||
// // ¼ì²éÉíÉÏÊÇ·ñÓнûÖ¹µ¯³ötipsµÄÈÎÎñ
|
||||
// for (int i=0;i<count;i++){
|
||||
// int taskID = CECUIConfig::Instance().GetGameUI().GetTaskIDDisableWayPointsUITips(i);
|
||||
// if(GetTaskInterface() && GetTaskInterface().HasTask(taskID)){
|
||||
// bCanPopUITips = false;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// // µ¯³ötips
|
||||
// CECScriptMan* pScriptMan = g_pGame.GetGameRun().GetUIManager().GetScriptMan();
|
||||
// if (pScriptMan && bCanPopUITips)
|
||||
// {
|
||||
// pScriptMan.GetContext().GetUI().SetTipDialogTitleAndContent(AC2AS_CP(CP_UTF8, pGameUI.GetStringFromTable(11350)), AC2AS_CP(CP_UTF8, (itr.second).strName));
|
||||
// pScriptMan.GetContext().GetUI().ShowTip(500, 500, 5000, 300);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// else if (Msg.dwParam2 == WAYPOINT_LIST)
|
||||
// {
|
||||
// cmd_waypoint_list* pCmd = (cmd_waypoint_list*)Msg.dwParam1;
|
||||
|
||||
// m_aWayPoints.SetSize(pCmd.count, 16);
|
||||
// for (size_t i = 0; i < pCmd.count; i++)
|
||||
// m_aWayPoints[i] = pCmd.list[i];
|
||||
|
||||
// // update the whole list
|
||||
// pGameUI.GetMapDlgsMgr().UpdateWayPoints(pCmd.list, pCmd.count, true);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
private void OnMsgHstPressCancel(ECMSG Msg)
|
||||
|
||||
Reference in New Issue
Block a user