diff --git a/Assets/PerfectWorld/Scripts/NPC/CECNPC.cs b/Assets/PerfectWorld/Scripts/NPC/CECNPC.cs index 01439f3edb..8802f06b2e 100644 --- a/Assets/PerfectWorld/Scripts/NPC/CECNPC.cs +++ b/Assets/PerfectWorld/Scripts/NPC/CECNPC.cs @@ -53,7 +53,6 @@ public class CECNPC : CECObject [SerializeField] protected NPCVisual npcVisual; protected static CECStringTab m_ActionNames; - /* public string NameNPC => m_strName; public string ROLEBASICPROP => m_strName;*/ @@ -69,6 +68,54 @@ public class CECNPC : CECObject m_pNPCModelPolicy = new CECNPCModelDefaultPolicy(this); } + // Add this field to CECNPC class + private bool m_bHasRelatedTask = false; + + private float _timerCheckTask = 0; + public void UpdateTaskIcon() + { + // Check if npcUI is assigned + if (m_npcUI == null) + { + m_npcUI = GetComponentInChildren(); + if (m_npcUI == null) return; + } + + // 2. Get Host Player & Interface + var host = CECGameRun.Instance.GetHostPlayer(); + if (host == null) return; + + var taskInterface = host.GetTaskInterface(); + if (taskInterface == null) + { + if (m_bHasRelatedTask) // only update if state changed + { + m_npcUI.SetTaskIconMain(false); + m_bHasRelatedTask = false; + } + return; + } + + // Get NPC Template ID + int npcTemplateID = m_NPCInfo.tid; + + // Check if there are tasks related to this NPC + bool hasTask = taskInterface.HasTaskRelatedToNPC(npcTemplateID); + + // Update icon only if state changed + if (m_bHasRelatedTask != hasTask) + { + m_bHasRelatedTask = hasTask; + m_npcUI.SetTaskIconMain(hasTask); + + if (hasTask) + { + Debug.Log($"[Icon] NPC {m_strName} (TID: {npcTemplateID})"); + } + } + } + + public string GetName() { return m_strName; @@ -180,6 +227,7 @@ public class CECNPC : CECObject new Vector2(pHost.transform.position.x, pHost.transform.position.z)); } + UpdateTaskIcon(); return true; } @@ -513,6 +561,13 @@ public class CECNPC : CECObject { StartAdjustTransparency(-1.0f, GetTransparentLimit(), 500); } + + _timerCheckTask += Time.deltaTime; + if (_timerCheckTask > 1.0f) + { + _timerCheckTask = 0; + UpdateTaskIcon(); + } } private void TickWork_Dead(float deltaTime) diff --git a/Assets/PerfectWorld/Scripts/NPC/CECNPCServer.cs b/Assets/PerfectWorld/Scripts/NPC/CECNPCServer.cs index e0bb7eb963..83d88af57c 100644 --- a/Assets/PerfectWorld/Scripts/NPC/CECNPCServer.cs +++ b/Assets/PerfectWorld/Scripts/NPC/CECNPCServer.cs @@ -57,6 +57,8 @@ public class CECNPCServer : CECNPC transform.position = EC_Utility.ToVector3(info.pos); StartWork((int)WorkType.WT_NOTHING, (int)WorkID.WORK_STAND); + + UpdateTaskIcon(); return true; } diff --git a/Assets/PerfectWorld/Scripts/Task/ATaskTemplMan.cs b/Assets/PerfectWorld/Scripts/Task/ATaskTemplMan.cs index 74099bc7cd..b3a1af2b43 100644 --- a/Assets/PerfectWorld/Scripts/Task/ATaskTemplMan.cs +++ b/Assets/PerfectWorld/Scripts/Task/ATaskTemplMan.cs @@ -300,6 +300,97 @@ namespace BrewMonster.Scripts.Task return tasks; } + // Add this method to ATaskTemplMan class if not exists + public List GetAllTopTasks() + { + List topTasks = new List(); + + // Iterate through all task templates and collect top-level tasks + // Assuming you have a dictionary or collection of all tasks + foreach (var kvp in m_TaskTemplMap) // Replace with your actual collection name + { + var templ = kvp.Value; + if (templ != null && templ.m_pParent == null) // Top-level task has no parent + { + topTasks.Add(templ); + } + } + + return topTasks; + } + + // Alternative method if you want to check by NPC ID directly + public List GetAvailableTasksForNPC(int npcID) + { + List availableTasks = new List(); + + foreach (var kvp in m_TaskTemplMap) // Replace with your actual collection name + { + var templ = kvp.Value; + if (templ != null && + templ.m_pParent == null && + templ.m_FixedData.m_ulDelvNPC == npcID) + { + availableTasks.Add(templ); + } + } + + return availableTasks; + } + + // Add this method to ATaskTemplMan class + + /// + /// Get all task templates (for iterating to find available tasks) + /// Lấy tất cả task templates (để duyệt tìm nhiệm vụ có thể nhận) + /// + public List GetAllTaskTemplates() + { + List allTasks = new List(); + + // Assuming you have a collection storing all task templates + // Replace m_TaskMap with your actual collection name + if (m_TaskTemplMap != null) + { + foreach (var kvp in m_TaskTemplMap) + { + if (kvp.Value != null) + { + allTasks.Add(kvp.Value); + } + } + } + + return allTasks; + } + + /// + /// Get list of tasks delivered by a specific NPC + /// + public List GetTasksFromNPC(int npcID) + { + var result = new List(); + + // Check if NPC info map is available + if (m_NPCInfoMap != null && m_NPCInfoMap.TryGetValue((uint)npcID, out var npcInfo)) + { + return new List(); + } + else + { + // Fallback + foreach (var kvp in m_TaskTemplMap) + { + var templ = kvp.Value; + if (templ != null && templ.m_FixedData.m_ulDelvNPC == npcID) + { + result.Add(templ); + } + } + } + + return result; + } // General method to read a struct from a FileStream private T ReadStruct(FileStream stream) where T : struct diff --git a/Assets/PerfectWorld/Scripts/Task/CECTaskInterface.cs b/Assets/PerfectWorld/Scripts/Task/CECTaskInterface.cs index 49dd15cca7..2a6ca41983 100644 --- a/Assets/PerfectWorld/Scripts/Task/CECTaskInterface.cs +++ b/Assets/PerfectWorld/Scripts/Task/CECTaskInterface.cs @@ -1,17 +1,19 @@ +using BrewMonster.Managers; using BrewMonster.Network; +using BrewMonster.Scripts; // For CECNavigateCtrl +using BrewMonster.UI; +using CSNetwork; using CSNetwork.GPDataType; +using Cysharp.Threading.Tasks; using PerfectWorld.Scripts.Task; +using System; using System.Collections.Generic; using System.IO; using System.Runtime.InteropServices; using System.Threading; -using BrewMonster.UI; -using CSNetwork; -using Cysharp.Threading.Tasks; using UnityEngine; using UnityEngine.Networking; -using System; -using BrewMonster.Scripts; // For CECNavigateCtrl +using static BrewMonster.TASKDICE_ESSENCE; namespace BrewMonster.Scripts.Task { @@ -528,85 +530,164 @@ namespace BrewMonster.Scripts.Task { return m_pActiveListBuf; } - - // private void InitActiveTaskList() - // { - // ActiveTaskList pLst = GetActiveTaskList(); - // if (pLst == null) return; - // - // ATaskTemplMan pMan = GetTaskTemplMan(); - // if (pMan == null) return; - // - // // reset counters - // pLst.m_uTopShowTaskCount = 0; - // pLst.m_uTopHideTaskCount = 0; - // pLst.m_uTitleTaskCount = 0; - // - // byte i = 0; - // while (i < pLst.m_uTaskCount) - // { - // ActiveTaskEntry entry = pLst.m_TaskEntries[i]; - // if (entry == null) - // { - // i++; - // continue; - // } - // - // // repair sibling linkage - // if (entry.m_NextSblIndex != (char)0xff) - // { - // ActiveTaskEntry entryNextSbl = pLst.m_TaskEntries[entry.m_NextSblIndex]; - // if (entryNextSbl == null || entryNextSbl.m_PrevSblIndex != (char)i) - // { - // entry.m_NextSblIndex = (char)0xff; - // } - // } - // - // // resolve template for top-level entries; children left unresolved in C# - // if (entry.m_ParentIndex == (char)0xff) - // { - // // entry.m_ulTemplAddr = 0u; - // entry.m_ulTemplAddr = pMan.GetTopTaskByID(entry.m_ID) != null ? 1u : 0u; - // - // ATaskTempl topTempl = pMan.GetTopTaskByID(entry.m_ID); - // if (topTempl != null) - // { - // if (topTempl.m_FixedData.m_bHidden) - // pLst.m_uTopHideTaskCount++; - // else if (topTempl.m_FixedData.m_bDisplayInTitleTaskUI) - // pLst.m_uTitleTaskCount++; - // else - // pLst.m_uTopShowTaskCount++; - // } - // } - // else - // { - // entry.m_ulTemplAddr = 0u; - // } - // - // // cap template best-effort (no pointer in managed) - // if (entry.m_uCapTaskId != 0) - // { - // ATaskTempl cap = pMan.GetTopTaskByID(entry.m_uCapTaskId); - // entry.m_ulCapTemplAddr = 0u; - // if (cap == null) - // { - // entry.m_uCapTaskId = 0; - // } - // } - // else - // { - // entry.m_ulCapTemplAddr = 0u; - // } - // - // i++; - // } - // - // // approximate used count - // pLst.m_uUsedCount = pLst.m_uTaskCount; - // } - - public void InitActiveTaskList() + + // Trong file CECTaskInterface.cs + + public bool HasTaskRelatedToNPC(int npcID) + { + // Check tasks is active + ActiveTaskList activeList = GetActiveTaskList(); + if (activeList != null && activeList.m_TaskEntries != null) + { + for (int i = 0; i < activeList.m_uTaskCount; i++) + { + var entry = activeList.m_TaskEntries[i]; + if (entry == null) continue; + + ATaskTempl templ = entry.GetTempl(); + if (templ == null) continue; + + // Check if this NPC is the target of the task + if (IsNPCTargetOfTask(templ, entry, npcID)) + { + return true; + } + } + } + + // Check tasks new + ATaskTemplMan taskMan = GetTaskTemplMan(); + if (taskMan != null) + { + List npcTasks = taskMan.GetTasksFromNPC(npcID); + if (npcTasks != null) + { + uint ulCurTime = GetCurTime(); + foreach (var templ in npcTasks) + { + // Check prerequisite + if (templ.CheckPrerequisite(this, activeList, ulCurTime) == 0) + { + return true; + } + } + } + } + + return false; + } + + // Check NPC is target of the task + private bool IsNPCTargetOfTask(ATaskTempl templ, ActiveTaskEntry entry, int npcID) + { + var data = templ.m_FixedData; + + // Task completed case + if (entry.IsFinished()) + { + if (data.m_ulAwardNPC == npcID) return true; + } + else + { + // NPC target + if (data.m_ulNPCMoving == npcID) return true; + + // Pos target + if (data.m_ulNPCDestSite == npcID) return true; + + // Security target + if (data.m_ulNPCToProtect == npcID) return true; + + if (data.m_enumMethod == (ulong)TaskCompletionMethod.enumTMTalkToNPC) + { + if (data.m_ulNPCMoving == 0 && data.m_ulAwardNPC == npcID) + { + return true; + } + } + } + return false; + } + + + // private void InitActiveTaskList() + // { + // ActiveTaskList pLst = GetActiveTaskList(); + // if (pLst == null) return; + // + // ATaskTemplMan pMan = GetTaskTemplMan(); + // if (pMan == null) return; + // + // // reset counters + // pLst.m_uTopShowTaskCount = 0; + // pLst.m_uTopHideTaskCount = 0; + // pLst.m_uTitleTaskCount = 0; + // + // byte i = 0; + // while (i < pLst.m_uTaskCount) + // { + // ActiveTaskEntry entry = pLst.m_TaskEntries[i]; + // if (entry == null) + // { + // i++; + // continue; + // } + // + // // repair sibling linkage + // if (entry.m_NextSblIndex != (char)0xff) + // { + // ActiveTaskEntry entryNextSbl = pLst.m_TaskEntries[entry.m_NextSblIndex]; + // if (entryNextSbl == null || entryNextSbl.m_PrevSblIndex != (char)i) + // { + // entry.m_NextSblIndex = (char)0xff; + // } + // } + // + // // resolve template for top-level entries; children left unresolved in C# + // if (entry.m_ParentIndex == (char)0xff) + // { + // // entry.m_ulTemplAddr = 0u; + // entry.m_ulTemplAddr = pMan.GetTopTaskByID(entry.m_ID) != null ? 1u : 0u; + // + // ATaskTempl topTempl = pMan.GetTopTaskByID(entry.m_ID); + // if (topTempl != null) + // { + // if (topTempl.m_FixedData.m_bHidden) + // pLst.m_uTopHideTaskCount++; + // else if (topTempl.m_FixedData.m_bDisplayInTitleTaskUI) + // pLst.m_uTitleTaskCount++; + // else + // pLst.m_uTopShowTaskCount++; + // } + // } + // else + // { + // entry.m_ulTemplAddr = 0u; + // } + // + // // cap template best-effort (no pointer in managed) + // if (entry.m_uCapTaskId != 0) + // { + // ATaskTempl cap = pMan.GetTopTaskByID(entry.m_uCapTaskId); + // entry.m_ulCapTemplAddr = 0u; + // if (cap == null) + // { + // entry.m_uCapTaskId = 0; + // } + // } + // else + // { + // entry.m_ulCapTemplAddr = 0u; + // } + // + // i++; + // } + // + // // approximate used count + // pLst.m_uUsedCount = pLst.m_uTaskCount; + // } + + public void InitActiveTaskList() { ActiveTaskList pLst = GetActiveTaskList(); FinishedTaskList pFnsh = GetFinishedTaskList(); @@ -1058,10 +1139,11 @@ namespace BrewMonster.Scripts.Task // TODO: Expose account total cash on host/session return 0u; } - + + #if _TASK_CLIENT - // Prepare award preview based on task and state - public void GetTaskAwardPreview(uint ulTaskId, ref Task_Award_Preview p, bool bActiveTask=true) + // Prepare award preview based on task and state + public void GetTaskAwardPreview(uint ulTaskId, ref Task_Award_Preview p, bool bActiveTask=true) { // Zero and init output p = default; @@ -1644,7 +1726,7 @@ namespace BrewMonster.Scripts.Task { UnityEngine.Debug.Log($"[CECTaskInterface] OnNewTask: Task {iTaskID} is not a force navigate task (pTempl={pTempl != null}, method={pTempl?.m_FixedData.m_enumMethod})"); } - } + } public void OnTaskConfirmUpdate() { @@ -1676,7 +1758,7 @@ namespace BrewMonster.Scripts.Task { UnityEngine.Debug.Log($"[CECTaskInterface] OnCompleteTask: Task {iTaskID} is not a force navigate task"); } - } + } public void TakeAwayCommonItem(uint ulTemplId, uint ulNum) {} @@ -1699,7 +1781,7 @@ namespace BrewMonster.Scripts.Task { UnityEngine.Debug.Log($"[CECTaskInterface] OnGiveupTask: Task {iTaskID} is not a force navigate task"); } - } + } // Handle task text click in UI - trigger navigation if it's a force navigate task // 处理任务UI文本点击 - 如果是强制导航任务则触发导航 // This is called when user clicks on task name/link in the task UI // 当用户在任务UI中点击任务名称/链接时调用 diff --git a/Assets/PerfectWorld/Scripts/UI/GamePlay/UINPC.cs b/Assets/PerfectWorld/Scripts/UI/GamePlay/UINPC.cs index 60536c8431..dac452d005 100644 --- a/Assets/PerfectWorld/Scripts/UI/GamePlay/UINPC.cs +++ b/Assets/PerfectWorld/Scripts/UI/GamePlay/UINPC.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI; @@ -9,6 +10,10 @@ namespace BrewMonster [SerializeField] private TextMeshProUGUI _nameText; [SerializeField] private TextMeshProUGUI _healthText; [SerializeField] private Image _healthImage; + + [Header("List Icon Task")] + [SerializeField] private GameObject _iconTaskMain; + // Start is called once before the first execution of Update after the MonoBehaviour is created public void SetName(string name) { @@ -24,5 +29,11 @@ namespace BrewMonster if(_healthText != null) _healthText.text = healthText; } + + public void SetTaskIconMain(bool isShow) + { + if(_iconTaskMain != null) + _iconTaskMain.SetActive(isShow); + } } } diff --git a/Assets/PerfectWorld/UI/TaskIcon.meta b/Assets/PerfectWorld/UI/TaskIcon.meta new file mode 100644 index 0000000000..c283cdcdf8 --- /dev/null +++ b/Assets/PerfectWorld/UI/TaskIcon.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dcaa1adabe1192947a68c7e0f4edece4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PerfectWorld/UI/TaskIcon/ChuTuyen.png b/Assets/PerfectWorld/UI/TaskIcon/ChuTuyen.png new file mode 100644 index 0000000000..cd7885f285 Binary files /dev/null and b/Assets/PerfectWorld/UI/TaskIcon/ChuTuyen.png differ diff --git a/Assets/PerfectWorld/UI/TaskIcon/ChuTuyen.png.meta b/Assets/PerfectWorld/UI/TaskIcon/ChuTuyen.png.meta new file mode 100644 index 0000000000..205d22fd18 --- /dev/null +++ b/Assets/PerfectWorld/UI/TaskIcon/ChuTuyen.png.meta @@ -0,0 +1,153 @@ +fileFormatVersion: 2 +guid: d2ab8e4bde76db4478aff9994361b46a +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 2 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: + - serializedVersion: 2 + name: ChuTuyen_0 + rect: + serializedVersion: 2 + x: 201 + y: 163 + width: 618 + height: 700 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 42af0f91f2269ff47b862dbb765d32f2 + internalID: -338310257 + vertices: [] + indices: + edges: [] + weights: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: f1f78b52002efcf4da3264912e38dddb + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: + ChuTuyen_0: -338310257 + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PerfectWorld/UI/TaskIcon/MoRong.png b/Assets/PerfectWorld/UI/TaskIcon/MoRong.png new file mode 100644 index 0000000000..e48cc797e8 Binary files /dev/null and b/Assets/PerfectWorld/UI/TaskIcon/MoRong.png differ diff --git a/Assets/PerfectWorld/UI/TaskIcon/MoRong.png.meta b/Assets/PerfectWorld/UI/TaskIcon/MoRong.png.meta new file mode 100644 index 0000000000..1e0d1b93ab --- /dev/null +++ b/Assets/PerfectWorld/UI/TaskIcon/MoRong.png.meta @@ -0,0 +1,130 @@ +fileFormatVersion: 2 +guid: 7c5f76c428f533d4ca3a449e2bc02ff5 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PerfectWorld/UI/TaskIcon/TuChan.png b/Assets/PerfectWorld/UI/TaskIcon/TuChan.png new file mode 100644 index 0000000000..bc956fb967 Binary files /dev/null and b/Assets/PerfectWorld/UI/TaskIcon/TuChan.png differ diff --git a/Assets/PerfectWorld/UI/TaskIcon/TuChan.png.meta b/Assets/PerfectWorld/UI/TaskIcon/TuChan.png.meta new file mode 100644 index 0000000000..7bc9174a94 --- /dev/null +++ b/Assets/PerfectWorld/UI/TaskIcon/TuChan.png.meta @@ -0,0 +1,130 @@ +fileFormatVersion: 2 +guid: cd36f0d3de378e94caea2807302f7a18 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/NPC/NPCServer.prefab b/Assets/Resources/NPC/NPCServer.prefab index 23179f644d..b4a8d93276 100644 --- a/Assets/Resources/NPC/NPCServer.prefab +++ b/Assets/Resources/NPC/NPCServer.prefab @@ -49,7 +49,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: namedAnimancer: {fileID: 0} - isDebug: 0 animName1: --- !u!114 &-5899287755522118344 MonoBehaviour: @@ -63,11 +62,16 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: aebb5e19da26bb64c8d5620d35681a2b, type: 3} m_Name: m_EditorClassIdentifier: + m_NPCInfo: + nid: 0 + tid: 0 + vis_tid: 0 m_iMMIndex: 0 m_idAttackTarget: 0 - m_npcUI: {fileID: 0} m_fMoveSpeed: 0 _characterController: {fileID: -1360397627327243963} + isDebug: 0 + npcVisual: {fileID: 0} --- !u!136 &1637622316711963511 CapsuleCollider: m_ObjectHideFlags: 0 @@ -143,12 +147,13 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3297168817873124018} - m_LocalRotation: {x: 8.102368e-16, y: 1, z: 0.000000046460137, w: -0.000000017439397} + m_LocalRotation: {x: -0.08684798, y: 0.24095127, z: 0.02165367, w: 0.9664011} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: - {fileID: 5661997413782496610} + - {fileID: 7509779512108699303} m_Father: {fileID: 8745273338113588215} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} @@ -233,6 +238,81 @@ MonoBehaviour: m_EditorClassIdentifier: targetCamera: {fileID: 0} mode: 1 +--- !u!1 &5100466107490290627 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7509779512108699303} + - component: {fileID: 397635185778217656} + - component: {fileID: 1609008502916343598} + m_Layer: 0 + m_Name: TaskIcon + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &7509779512108699303 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5100466107490290627} + m_LocalRotation: {x: 3.7702125e-16, y: -0.97228837, z: -0.23378475, w: 1.5679955e-15} + m_LocalPosition: {x: 0, y: 0, z: 1.2} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8006159455096186264} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 2.36} + m_SizeDelta: {x: 0.5, y: 0.5} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &397635185778217656 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5100466107490290627} + m_CullTransparentMesh: 1 +--- !u!114 &1609008502916343598 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5100466107490290627} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: -338310257, guid: d2ab8e4bde76db4478aff9994361b46a, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!1 &5709911674741944065 GameObject: m_ObjectHideFlags: 0 @@ -281,6 +361,7 @@ MonoBehaviour: _nameText: {fileID: 606418994916995261} _healthText: {fileID: 0} _healthImage: {fileID: 0} + _iconTaskMain: {fileID: 5100466107490290627} --- !u!1 &6510845919681767284 GameObject: m_ObjectHideFlags: 0 @@ -307,7 +388,7 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6510845919681767284} - m_LocalRotation: {x: -0.015657494, y: 0.89469767, z: -0.03145985, w: -0.44528785} + m_LocalRotation: {x: 0.028356783, y: 0.9830809, z: 0.02226828, w: 0.17958853} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0