From 556b0c5a22df9bf7c3bbead72c328c5b177aac00 Mon Sep 17 00:00:00 2001 From: shnok Date: Mon, 21 Jul 2025 00:14:32 +0800 Subject: [PATCH 1/7] login fail popup messages --- .../Assets/Scripts/Datatable/ModelTable.cs | 4 ++-- .../Scripts/Datatable/ParticleEffectTable.cs | 2 +- .../Gameserver/GameServerPacketHandler.cs | 1 + .../LoginServer/LoginServerPacketHandler.cs | 23 +++++++++++++++++++ 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/l2-unity/Assets/Scripts/Datatable/ModelTable.cs b/l2-unity/Assets/Scripts/Datatable/ModelTable.cs index e62885b29..8781c2542 100644 --- a/l2-unity/Assets/Scripts/Datatable/ModelTable.cs +++ b/l2-unity/Assets/Scripts/Datatable/ModelTable.cs @@ -156,7 +156,7 @@ private GameObject LoadFaceModel(string model) GameObject face = (GameObject)Resources.Load(modelPath); if (face == null) { - Debug.LogWarning($"Can't find face model at {modelPath}"); + // Debug.LogWarning($"Can't find face model at {modelPath}"); } else { @@ -424,7 +424,7 @@ private GameObject LoadArmorModel(string model) } else { - Debug.Log($"Successfully loaded armor model at {modelPath}"); + // Debug.Log($"Successfully loaded armor model at {modelPath}"); } return armorPiece; diff --git a/l2-unity/Assets/Scripts/Datatable/ParticleEffectTable.cs b/l2-unity/Assets/Scripts/Datatable/ParticleEffectTable.cs index ab3f3e4f7..93e25bce5 100644 --- a/l2-unity/Assets/Scripts/Datatable/ParticleEffectTable.cs +++ b/l2-unity/Assets/Scripts/Datatable/ParticleEffectTable.cs @@ -150,7 +150,7 @@ private GameObject LoadEffectByName(string name) return null; } - Debug.Log($"Successfully loaded particle effect {name}."); + // Debug.Log($"Successfully loaded particle effect {name}."); return prefab; } diff --git a/l2-unity/Assets/Scripts/Networking/ClientLibrary/PacketHandler/Gameserver/GameServerPacketHandler.cs b/l2-unity/Assets/Scripts/Networking/ClientLibrary/PacketHandler/Gameserver/GameServerPacketHandler.cs index ee2e65e0b..a1a3ae0f1 100644 --- a/l2-unity/Assets/Scripts/Networking/ClientLibrary/PacketHandler/Gameserver/GameServerPacketHandler.cs +++ b/l2-unity/Assets/Scripts/Networking/ClientLibrary/PacketHandler/Gameserver/GameServerPacketHandler.cs @@ -239,6 +239,7 @@ private void OnKeyReceive(byte[] data) private void OnLoginFail(byte[] data) { LoginFailPacket packet = new LoginFailPacket(data); + EventProcessor.Instance.QueueEvent(() => GameClient.Instance.Disconnect()); EventProcessor.Instance.QueueEvent(() => LoginClient.Instance.Disconnect()); diff --git a/l2-unity/Assets/Scripts/Networking/ClientLibrary/PacketHandler/LoginServer/LoginServerPacketHandler.cs b/l2-unity/Assets/Scripts/Networking/ClientLibrary/PacketHandler/LoginServer/LoginServerPacketHandler.cs index 0cc77c52d..e0c59bed2 100644 --- a/l2-unity/Assets/Scripts/Networking/ClientLibrary/PacketHandler/LoginServer/LoginServerPacketHandler.cs +++ b/l2-unity/Assets/Scripts/Networking/ClientLibrary/PacketHandler/LoginServer/LoginServerPacketHandler.cs @@ -114,6 +114,29 @@ private void OnLoginFail(byte[] data) LoginServerFailPacket.LoginFailedReason failedReason = packet.FailedReason; + EventProcessor.Instance.QueueEvent(() => + { + int systemMessageId = 449; + switch (packet.FailedReason) + { + case LoginServerFailPacket.LoginFailedReason.REASON_USER_OR_PASS_WRONG: + systemMessageId = 449; + break; + case LoginServerFailPacket.LoginFailedReason.REASON_ACCOUNT_IN_USE: + systemMessageId = 455; + break; + case LoginServerFailPacket.LoginFailedReason.REASON_ACCESS_FAILED: + systemMessageId = 461; + break; + case LoginServerFailPacket.LoginFailedReason.REASON_INACTIVE: + systemMessageId = 1920; + break; + } + L2ConfirmWindow.Instance.ShowWindow(systemMessageId, () => + { + }, null); + }); + Debug.LogWarning($"Login failed reason: {Enum.GetName(typeof(LoginServerFailPacket.LoginFailedReason), failedReason)}"); _client.Disconnect(); From 801a49eb99e73cea65e1c040b869f309450fd8b3 Mon Sep 17 00:00:00 2001 From: shnok Date: Mon, 21 Jul 2025 00:18:06 +0800 Subject: [PATCH 2/7] FElf Pawn bone fix --- .../Resources/Data/Animations/Elf/FElf/Pawn_FElf.prefab | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/l2-unity/Assets/Resources/Data/Animations/Elf/FElf/Pawn_FElf.prefab b/l2-unity/Assets/Resources/Data/Animations/Elf/FElf/Pawn_FElf.prefab index f2fbdf05a..faa384af0 100644 --- a/l2-unity/Assets/Resources/Data/Animations/Elf/FElf/Pawn_FElf.prefab +++ b/l2-unity/Assets/Resources/Data/Animations/Elf/FElf/Pawn_FElf.prefab @@ -352,7 +352,7 @@ MonoBehaviour: m_EditorClassIdentifier: _referenceHolder: {fileID: 1640291941892263099} _rightHandBone: {fileID: 825657755094281025} - _leftHandBone: {fileID: 825657755094281025} + _leftHandBone: {fileID: 3418838697762964996} _shieldBone: {fileID: 3025577619606282943} _rightHandWeaponData: _id: 0 @@ -915,6 +915,11 @@ Transform: m_CorrespondingSourceObject: {fileID: 1183305660766650557, guid: d40e3dac79119ba41a4a5468c3ac58de, type: 3} m_PrefabInstance: {fileID: 4149768995483263490} m_PrefabAsset: {fileID: 0} +--- !u!4 &3418838697762964996 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 1649680053655626758, guid: d40e3dac79119ba41a4a5468c3ac58de, type: 3} + m_PrefabInstance: {fileID: 4149768995483263490} + m_PrefabAsset: {fileID: 0} --- !u!198 &4032877755202680889 stripped ParticleSystem: m_CorrespondingSourceObject: {fileID: 1036206256871414331, guid: d40e3dac79119ba41a4a5468c3ac58de, type: 3} From 2a4d39231b6a7b3342a17c060c076ef1dfee7d1d Mon Sep 17 00:00:00 2001 From: shnok Date: Mon, 21 Jul 2025 15:37:46 +0800 Subject: [PATCH 3/7] now equiping both duals/fists, attack packet fixed for multiple hits --- .../win/lib/x86_64/fmodstudio.dll.meta | 2 +- .../win/lib/x86_64/fmodstudioL.dll.meta | 2 +- .../NewHumanoidAnimationController.cs | 14 +-- .../Scripts/Camera/LoginCameraManager.cs | 2 +- .../Scripts/Datatable/Grp/Model/Weapongrp.cs | 11 +-- .../Scripts/Datatable/Grp/WeapongrpTable.cs | 7 +- .../Assets/Scripts/Datatable/ModelTable.cs | 31 ++++--- .../Assets/Scripts/Game/Combat/Gear/Gear.cs | 86 +++++++++++++------ l2-unity/Assets/Scripts/Game/Entity/Entity.cs | 4 +- .../StateMachine/State/StartingGameState.cs | 2 +- .../Scripts/Game/Manager/World/WorldCombat.cs | 8 +- .../Combat/EntityAttackPacket.cs | 2 +- .../Scripts/Tools/TestRoom/SkillEffectTest.cs | 2 +- l2-unity/Assets/Scripts/Utils/DatUtils.cs | 2 +- 14 files changed, 110 insertions(+), 65 deletions(-) diff --git a/l2-unity/Assets/Plugins/FMOD/platforms/win/lib/x86_64/fmodstudio.dll.meta b/l2-unity/Assets/Plugins/FMOD/platforms/win/lib/x86_64/fmodstudio.dll.meta index f74b2bed7..4e22b69d9 100644 --- a/l2-unity/Assets/Plugins/FMOD/platforms/win/lib/x86_64/fmodstudio.dll.meta +++ b/l2-unity/Assets/Plugins/FMOD/platforms/win/lib/x86_64/fmodstudio.dll.meta @@ -37,7 +37,7 @@ PluginImporter: settings: CPU: None Win64: - enabled: 1 + enabled: 0 settings: CPU: AnyCPU WindowsStoreApps: diff --git a/l2-unity/Assets/Plugins/FMOD/platforms/win/lib/x86_64/fmodstudioL.dll.meta b/l2-unity/Assets/Plugins/FMOD/platforms/win/lib/x86_64/fmodstudioL.dll.meta index eb15a9f7c..1518ca3fd 100644 --- a/l2-unity/Assets/Plugins/FMOD/platforms/win/lib/x86_64/fmodstudioL.dll.meta +++ b/l2-unity/Assets/Plugins/FMOD/platforms/win/lib/x86_64/fmodstudioL.dll.meta @@ -25,7 +25,7 @@ PluginImporter: settings: CPU: None Win64: - enabled: 0 + enabled: 1 settings: CPU: x86_64 WindowsStoreApps: diff --git a/l2-unity/Assets/Scripts/Animation/Controller/NewHumanoidAnimationController.cs b/l2-unity/Assets/Scripts/Animation/Controller/NewHumanoidAnimationController.cs index 46537756b..fe0181f3d 100644 --- a/l2-unity/Assets/Scripts/Animation/Controller/NewHumanoidAnimationController.cs +++ b/l2-unity/Assets/Scripts/Animation/Controller/NewHumanoidAnimationController.cs @@ -125,10 +125,10 @@ private void NextAttack(bool retry) case WeaponAnimType._2HS: case WeaponAnimType.pole: case WeaponAnimType._1HS: - maxAttackAnimIndex = 2; + maxAttackAnimIndex = 3; break; case WeaponAnimType.dual: - maxAttackAnimIndex = 1; + maxAttackAnimIndex = 2; break; case WeaponAnimType.bow: case WeaponAnimType.shield: @@ -137,10 +137,12 @@ private void NextAttack(bool retry) break; } - if (++_atkAnimIndex > maxAttackAnimIndex) - { - _atkAnimIndex = 0; - } + // if (++_atkAnimIndex > maxAttackAnimIndex) + // { + // _atkAnimIndex = 0; + // } + + _atkAnimIndex = Random.Range(0, maxAttackAnimIndex); PlayAttackAnimation(retry); } diff --git a/l2-unity/Assets/Scripts/Camera/LoginCameraManager.cs b/l2-unity/Assets/Scripts/Camera/LoginCameraManager.cs index bea376df2..45e2983d7 100644 --- a/l2-unity/Assets/Scripts/Camera/LoginCameraManager.cs +++ b/l2-unity/Assets/Scripts/Camera/LoginCameraManager.cs @@ -158,7 +158,7 @@ public void DisableMainCamera() if (Camera.main != null) { - Debug.Log("Disabling camera " + Camera.main.transform); + // Debug.Log("Disabling camera " + Camera.main.transform); Camera.main.enabled = false; } else if (_activeCamera != null) diff --git a/l2-unity/Assets/Scripts/Datatable/Grp/Model/Weapongrp.cs b/l2-unity/Assets/Scripts/Datatable/Grp/Model/Weapongrp.cs index c47468172..19300c4e3 100644 --- a/l2-unity/Assets/Scripts/Datatable/Grp/Model/Weapongrp.cs +++ b/l2-unity/Assets/Scripts/Datatable/Grp/Model/Weapongrp.cs @@ -1,14 +1,15 @@ using UnityEngine; [System.Serializable] -public class Weapongrp : Abstractgrp { +public class Weapongrp : Abstractgrp +{ [SerializeField] private WeaponType _weaponType; [SerializeField] private ItemSlot _bodyPart; [SerializeField] private byte _soulshot; [SerializeField] private byte _spiritshot; [SerializeField] private int _mpConsume; - [SerializeField] private string _model; - [SerializeField] private string _texture; + [SerializeField] private string[] _models; + [SerializeField] private string[] _textures; [SerializeField] private string[] _itemSounds; public ItemSlot BodyPart { get { return _bodyPart; } set { _bodyPart = value; } } @@ -16,7 +17,7 @@ public class Weapongrp : Abstractgrp { public byte Soulshot { get { return _soulshot; } set { _soulshot = value; } } public byte Spiritshot { get { return _spiritshot; } set { _spiritshot = value; } } public int MpConsume { get { return _mpConsume; } set { _mpConsume = value; } } - public string Model { get { return _model; } set { _model = value; } } - public string Texture { get { return _texture; } set { _texture = value; } } + public string[] Models { get { return _models; } set { _models = value; } } + public string[] Textures { get { return _textures; } set { _textures = value; } } public string[] ItemSounds { get { return _itemSounds; } set { _itemSounds = value; } } } diff --git a/l2-unity/Assets/Scripts/Datatable/Grp/WeapongrpTable.cs b/l2-unity/Assets/Scripts/Datatable/Grp/WeapongrpTable.cs index 3628ff536..080da8bd1 100644 --- a/l2-unity/Assets/Scripts/Datatable/Grp/WeapongrpTable.cs +++ b/l2-unity/Assets/Scripts/Datatable/Grp/WeapongrpTable.cs @@ -88,14 +88,13 @@ private void ReadWeaponGrpDat() weaponGrp.Spiritshot = byte.Parse(value); break; case "wp_mesh": //{{[LineageWeapons.hell_knife_m00_wp]};{1}} - //TODO for dualswords, store 2 models and textures + modTex = DatUtils.ParseArray(value); - weaponGrp.Model = modTex[0]; + weaponGrp.Models = modTex; break; case "texture": //{[LineageWeaponsTex.hell_knife_t00_wp]} - //TODO for dualswords, store 2 models and textures modTex = DatUtils.ParseArray(value); - weaponGrp.Texture = modTex[0]; + weaponGrp.Textures = modTex; break; case "item_sound": // {[ItemSound.sword_small_2];[ItemSound.public_sword_shing_9];[ItemSound.sword_small_7];[ItemSound.dagger_4]} string[] itemsounds = DatUtils.ParseArray(value); diff --git a/l2-unity/Assets/Scripts/Datatable/ModelTable.cs b/l2-unity/Assets/Scripts/Datatable/ModelTable.cs index 8781c2542..216642749 100644 --- a/l2-unity/Assets/Scripts/Datatable/ModelTable.cs +++ b/l2-unity/Assets/Scripts/Datatable/ModelTable.cs @@ -283,16 +283,19 @@ private void CacheWeapons() int success = 0; foreach (KeyValuePair kvp in ItemTable.Instance.Weapons) { - if (_weapons.ContainsKey(kvp.Value.Weapongrp.Model)) + foreach (string model in kvp.Value.Weapongrp.Models) { - continue; - } + if (_weapons.ContainsKey(model)) + { + continue; + } - GameObject weapon = LoadWeaponModel(kvp.Value.Weapongrp.Model); - if (weapon != null) - { - success++; - _weapons[kvp.Value.Weapongrp.Model] = weapon; + GameObject weapon = LoadWeaponModel(model); + if (weapon != null) + { + success++; + _weapons[model] = weapon; + } } } @@ -544,7 +547,7 @@ public L2ArmorPiece GetArmorPieceByItemId(int itemId, CharacterModelType raceId) return GetArmorPiece(armor, raceId); } - public GameObject GetWeaponById(int itemId) + public GameObject[] GetWeaponsById(int itemId) { Weapon weapon = ItemTable.Instance.GetWeapon(itemId); if (weapon == null) @@ -552,7 +555,15 @@ public GameObject GetWeaponById(int itemId) Debug.LogWarning($"Can't find weapon {itemId} in ItemTable"); } - return GetWeapon(weapon.Weapongrp.Model); + GameObject[] models = new GameObject[weapon.Weapongrp.Models.Length]; + + for (int i = 0; i < models.Length; i++) + { + Debug.LogWarning(itemId + " " + weapon.Weapongrp.Models[i]); + models[i] = GetWeapon(weapon.Weapongrp.Models[i]); + } + + return models; } public GameObject GetWeapon(string model) diff --git a/l2-unity/Assets/Scripts/Game/Combat/Gear/Gear.cs b/l2-unity/Assets/Scripts/Game/Combat/Gear/Gear.cs index 579930046..786d12ce5 100644 --- a/l2-unity/Assets/Scripts/Game/Combat/Gear/Gear.cs +++ b/l2-unity/Assets/Scripts/Game/Combat/Gear/Gear.cs @@ -98,6 +98,12 @@ public virtual void EquipAllWeapons(Appearance appearance) return; } + if (weapon.Weapongrp.WeaponType == WeaponType.dual || weapon.Weapongrp.WeaponType == WeaponType.fist) + { + UnequipWeapon(true); + EquipWeapon(appearance.RHand, weapon, false); + } + if (weapon.Weapongrp.WeaponType == WeaponType.bow) { appearance.LHand = appearance.RHand; @@ -127,8 +133,9 @@ public virtual void EquipAllWeapons(Appearance appearance) EquipWeapon(appearance.LHand, weapon, true); } - else + else if (!(appearance.RHand != 0 && _rightHandWeaponData.Weapongrp.BodyPart == ItemSlot.SLOT_LR_HAND)) { + // Unequip the weapon in left hand if it's not duals or fists UnequipWeapon(true); } } @@ -225,13 +232,22 @@ public virtual void EquipWeapon(int weaponId, Weapon weapon, bool leftSlot) UnequipWeapon(leftSlot); - GameObject weaponPrefab = ModelTable.Instance.GetWeaponById(weaponId); - if (weaponPrefab == null) + GameObject[] weaponPrefabs = ModelTable.Instance.GetWeaponsById(weaponId); //TODO: For duals and fists + if (weaponPrefabs == null) { - Debug.LogWarning($"Could load prefab for {weaponId} in DB for entity {_ownerId}."); + Debug.LogWarning($"Could not load weapon prefab array for weaponId: {weaponId} (entity: {_ownerId})."); return; } + for (int i = 0; i < weaponPrefabs.Length; i++) + { + if (weaponPrefabs[i] == null) + { + Debug.LogWarning($"Missing prefab at index {i} for weaponId: {weaponId} (entity: {_ownerId})."); + return; + } + } + // Updating weapon type if (leftSlot) { @@ -250,33 +266,49 @@ public virtual void EquipWeapon(int weaponId, Weapon weapon, bool leftSlot) } // Instantiating weapon - GameObject go = GameObject.Instantiate(weaponPrefab); - go.SetActive(false); - go.transform.name = "weapon"; - - if (weapon.Weapongrp.WeaponType == WeaponType.none) + for (int i = 0; i < weaponPrefabs.Length; i++) { - _leftHandWeapon = go.transform; - go.transform.SetParent(GetShieldBone(), false); - } - else if (weapon.Weapongrp.WeaponType == WeaponType.bow || leftSlot) - { - _leftHandWeapon = go.transform; - go.transform.SetParent(GetLeftHandBone(), false); - } - else - { - _rightHandWeapon = go.transform; - go.transform.SetParent(GetRightHandBone(), false); - } + GameObject go = GameObject.Instantiate(weaponPrefabs[i]); + go.SetActive(false); + go.transform.name = "weapon"; + + if (weapon.Weapongrp.WeaponType == WeaponType.none) + { + _leftHandWeapon = go.transform; + go.transform.SetParent(GetShieldBone(), false); + } + else if (weapon.Weapongrp.WeaponType == WeaponType.bow || leftSlot) + { + _leftHandWeapon = go.transform; + go.transform.SetParent(GetLeftHandBone(), false); + } + else if (weapon.Weapongrp.WeaponType == WeaponType.dual || weapon.Weapongrp.WeaponType == WeaponType.fist) + { + if (i == 0) + { + _rightHandWeapon = go.transform; + go.transform.SetParent(GetRightHandBone(), false); + } + else + { + _leftHandWeapon = go.transform; + go.transform.SetParent(GetLeftHandBone(), false); + } + } + else + { + _rightHandWeapon = go.transform; + go.transform.SetParent(GetRightHandBone(), false); + } - go.SetActive(true); + go.SetActive(true); - go.transform.localScale *= GetWeaponSizeRatio(); + go.transform.localScale *= GetWeaponSizeRatio(); - if (weaponType == WeaponType.bow) - { - EquipArrow(); + if (weaponType == WeaponType.bow) + { + EquipArrow(); + } } } diff --git a/l2-unity/Assets/Scripts/Game/Entity/Entity.cs b/l2-unity/Assets/Scripts/Game/Entity/Entity.cs index b3f089cb2..5dd6075ed 100644 --- a/l2-unity/Assets/Scripts/Game/Entity/Entity.cs +++ b/l2-unity/Assets/Scripts/Game/Entity/Entity.cs @@ -66,8 +66,8 @@ public virtual void Initialize() // EquipAllArmors(); } - public void EquipAllWeapons() { Gear.EquipAllWeapons(Appearance); } - public void EquipAllArmors() { Gear.EquipAllArmors(Appearance); } + // public void EquipAllWeapons() { Gear.EquipAllWeapons(Appearance); } + // public void EquipAllArmors() { Gear.EquipAllArmors(Appearance); } public virtual void OnStopMoving() { diff --git a/l2-unity/Assets/Scripts/Game/Manager/StateMachine/State/StartingGameState.cs b/l2-unity/Assets/Scripts/Game/Manager/StateMachine/State/StartingGameState.cs index 8e613557c..1502b7a16 100644 --- a/l2-unity/Assets/Scripts/Game/Manager/StateMachine/State/StartingGameState.cs +++ b/l2-unity/Assets/Scripts/Game/Manager/StateMachine/State/StartingGameState.cs @@ -37,7 +37,7 @@ public override void HandleEvent(GameEvent evt, object arg0) _stateMachine.ChangeState(GameState.LOGIN_CONNECTED); break; default: - Debug.LogWarning($"[GameStateMachine] Unhandled event {evt} for state {_stateMachine.State}"); + // Debug.LogWarning($"[GameStateMachine] Unhandled event {evt} for state {_stateMachine.State}"); break; } } diff --git a/l2-unity/Assets/Scripts/Game/Manager/World/WorldCombat.cs b/l2-unity/Assets/Scripts/Game/Manager/World/WorldCombat.cs index 94511a9af..5b0b6ca12 100644 --- a/l2-unity/Assets/Scripts/Game/Manager/World/WorldCombat.cs +++ b/l2-unity/Assets/Scripts/Game/Manager/World/WorldCombat.cs @@ -50,7 +50,7 @@ private void ApplyHits() { _hits.RemoveAt(i); InflictAttack(hit.Attacker, hit.Target, hit); - Debug.LogWarning($"Hit: Apply hit! Attacker: {hit.Attacker.gameObject.name}"); + // Debug.LogWarning($"Hit: Apply hit! Attacker: {hit.Attacker.gameObject.name}"); } } } @@ -67,7 +67,7 @@ public void InflictAttack(Entity attacker, Entity target, Hit hit) if (hit.isMiss()) { - Debug.LogWarning("Hit: Hit is miss."); + // Debug.LogWarning("Hit: Hit is miss."); attacker.ReferenceHolder.AudioHandler.PlaySwishSound(); return; } @@ -143,7 +143,7 @@ public Task OnMagicSkillLaunched(MagicSkillLaunchedPacked packet) public void EntityCastSkill(Entity entity, Entity target, int skillId, int hitTime, int reuseDelay) { - Debug.LogWarning($"EntityCastSkill: {entity.transform.name} Skill: {skillId}"); + // Debug.LogWarning($"EntityCastSkill: {entity.transform.name} Skill: {skillId}"); Skill skill = SkillTable.Instance.GetSkill(skillId); CastSkill(entity, target, skill, hitTime, reuseDelay); } @@ -316,7 +316,7 @@ public Task EntityAttacks(Vector3 attackerPosition, int sender, Hit hit, int hit } else { - hit.HitTime = Time.time + senderEntity.AnimationController.PAtkSpd / 2f / 1000f; + hit.HitTime = Time.time + senderEntity.AnimationController.PAtkSpd / (2f * (hitIndex + 1)) / 1000f; } _hits.Add(hit); diff --git a/l2-unity/Assets/Scripts/Networking/ClientLibrary/Packet/Gameserver/ServerPackets/Combat/EntityAttackPacket.cs b/l2-unity/Assets/Scripts/Networking/ClientLibrary/Packet/Gameserver/ServerPackets/Combat/EntityAttackPacket.cs index 38bc0a8d4..88dc2eab5 100644 --- a/l2-unity/Assets/Scripts/Networking/ClientLibrary/Packet/Gameserver/ServerPackets/Combat/EntityAttackPacket.cs +++ b/l2-unity/Assets/Scripts/Networking/ClientLibrary/Packet/Gameserver/ServerPackets/Combat/EntityAttackPacket.cs @@ -30,7 +30,7 @@ public override void Parse() _hits = new Hit[hitCount + 1]; _hits[0] = new Hit(targetId, damage, flags); - for (int i = 1; i < hitCount; i++) + for (int i = 1; i < hitCount + 1; i++) { targetId = ReadI(); damage = ReadI(); diff --git a/l2-unity/Assets/Scripts/Tools/TestRoom/SkillEffectTest.cs b/l2-unity/Assets/Scripts/Tools/TestRoom/SkillEffectTest.cs index 4ede13ee8..39b739efa 100644 --- a/l2-unity/Assets/Scripts/Tools/TestRoom/SkillEffectTest.cs +++ b/l2-unity/Assets/Scripts/Tools/TestRoom/SkillEffectTest.cs @@ -54,7 +54,7 @@ private IEnumerator DebugCoroutine() // Skill sps = SkillTable.Instance.GetSkill(2047); - caster.EquipAllWeapons(); + // caster.EquipAllWeapons(); caster.ReferenceHolder.NewAnimationController.Initialize(); diff --git a/l2-unity/Assets/Scripts/Utils/DatUtils.cs b/l2-unity/Assets/Scripts/Utils/DatUtils.cs index b71405f4d..eab448754 100644 --- a/l2-unity/Assets/Scripts/Utils/DatUtils.cs +++ b/l2-unity/Assets/Scripts/Utils/DatUtils.cs @@ -18,7 +18,7 @@ public static string ParseIcon(string value) public static string[] SplitJSON(string value) { - return value.Replace("{", string.Empty).Replace("}", string.Empty).Replace("[", string.Empty).Replace("]", string.Empty).Split(";"); + return value.Replace(";{1;1}", string.Empty).Replace(";{1}", string.Empty).Replace("{", string.Empty).Replace("}", string.Empty).Replace("[", string.Empty).Replace("]", string.Empty).Split(";"); } public static string ReorderColorBytes(string colorString) From be0a0ba69e3b58f17d89064b29e88542096361c2 Mon Sep 17 00:00:00 2001 From: shnok Date: Wed, 23 Jul 2025 16:35:47 +0800 Subject: [PATCH 4/7] play soulshot effect in both hands, packet handling now using queue --- .../Assets/Scripts/Game/Combat/Gear/Gear.cs | 2 +- .../Game/Manager/Effect/ParticleManager.cs | 51 +++++++++++---- .../ClientLibrary/AsynchronousClient.cs | 64 ++++++++++++++++++- .../PacketHandler/ServerPacketHandler.cs | 4 +- 4 files changed, 103 insertions(+), 18 deletions(-) diff --git a/l2-unity/Assets/Scripts/Game/Combat/Gear/Gear.cs b/l2-unity/Assets/Scripts/Game/Combat/Gear/Gear.cs index 786d12ce5..9e2b93e44 100644 --- a/l2-unity/Assets/Scripts/Game/Combat/Gear/Gear.cs +++ b/l2-unity/Assets/Scripts/Game/Combat/Gear/Gear.cs @@ -27,7 +27,7 @@ public class Gear : MonoBehaviour [SerializeField] protected Transform _leftHandWeapon; protected NewBaseAnimationController AnimationController { get { return _referenceHolder.NewAnimationController; } } - public WeaponType WeaponType { get { return _leftHandType != WeaponType.none ? _leftHandType : _rightHandType; } } + public WeaponType WeaponType { get { return (_leftHandType != WeaponType.none && _leftHandType != WeaponType.hand) ? _leftHandType : _rightHandType; } } public int OwnerId { get { return _ownerId; } set { _ownerId = value; } } public Transform RightHandBone { get { return _rightHandBone; } } diff --git a/l2-unity/Assets/Scripts/Game/Manager/Effect/ParticleManager.cs b/l2-unity/Assets/Scripts/Game/Manager/Effect/ParticleManager.cs index 45ac44891..01a98c68e 100644 --- a/l2-unity/Assets/Scripts/Game/Manager/Effect/ParticleManager.cs +++ b/l2-unity/Assets/Scripts/Game/Manager/Effect/ParticleManager.cs @@ -248,35 +248,60 @@ public PooledEffect[] SpawnCastParticles(Entity caster, Skill skill, int hitTime EffectEmitter action = castingActions[i]; AttachMethod attachOn = action.AttachOn; string effectClass = action.EffectClass; + byte repeatCount = 1; if (action.EtcEffect == EtcEffect.EET_SOULSHOT) { + if (caster.Gear?.WeaponType == WeaponType.bow) + { + attachOn = AttachMethod.AM_LH; + } + if (caster.Gear?.WeaponType == WeaponType.bow || caster.Gear?.WeaponType == WeaponType.fist) { effectClass = action.SecondaryEffectClass; - attachOn = AttachMethod.AM_LH; + } + + if (caster.Gear?.WeaponType == WeaponType.fist || caster.Gear?.WeaponType == WeaponType.dual) + { + repeatCount = 2; } } - PooledEffect effect = SpawnEffect(effectClass); - if (effect == null || effect.GameObject == null) + for (int r = 0; r < repeatCount; r++) { - Debug.LogError($"Can't spawn skill effect {effectClass} for skill {skill.SkillId}."); - return null; - } + if (repeatCount > 1) + { + if (r == 0) + { + attachOn = AttachMethod.AM_LH; + } + else + { + attachOn = AttachMethod.AM_RH; + } + } - effect.HitTime = hitTime / 1000f; //in seconds + PooledEffect effect = SpawnEffect(effectClass); + if (effect == null || effect.GameObject == null) + { + Debug.LogError($"Can't spawn skill effect {effectClass} for skill {skill.SkillId}."); + return null; + } - effect.GameObject.transform.parent = GetAttachTransform(caster, attachOn); + effect.HitTime = hitTime / 1000f; //in seconds - UpdateSkillEffectTransform(caster, action, effect.GameObject.transform, effect, attachOn); + effect.GameObject.transform.parent = GetAttachTransform(caster, attachOn); - float effectRatio = CalculateCastParticleSizeRatio(caster); - effect.GameObject.transform.localScale = effect.GameObject.transform.localScale * effectRatio; + UpdateSkillEffectTransform(caster, action, effect.GameObject.transform, effect, attachOn); - ActiveEffects.Enqueue(effect); + float effectRatio = CalculateCastParticleSizeRatio(caster); + effect.GameObject.transform.localScale = effect.GameObject.transform.localScale * effectRatio; - castEffects[i] = effect; + ActiveEffects.Enqueue(effect); + + castEffects[i] = effect; + } } return castEffects; diff --git a/l2-unity/Assets/Scripts/Networking/ClientLibrary/AsynchronousClient.cs b/l2-unity/Assets/Scripts/Networking/ClientLibrary/AsynchronousClient.cs index f94b38fdf..27272aa12 100644 --- a/l2-unity/Assets/Scripts/Networking/ClientLibrary/AsynchronousClient.cs +++ b/l2-unity/Assets/Scripts/Networking/ClientLibrary/AsynchronousClient.cs @@ -4,6 +4,8 @@ using System.Net; using System.Net.Sockets; using System.Threading.Tasks; +using System.Threading; +using System.Collections.Concurrent; public class AsynchronousClient { @@ -17,6 +19,10 @@ public class AsynchronousClient private bool _cryptEnabled = false; private bool _initPacket = true; private bool _initPacketEnabled; + private readonly ConcurrentQueue _packetQueue = new ConcurrentQueue(); + private readonly SemaphoreSlim _packetSemaphore = new SemaphoreSlim(0); + private CancellationTokenSource _processingCancellation; + private Task _processingTask; public bool InitPacket { get { return _initPacket; } set { _initPacket = value; } } public bool CryptEnabled @@ -85,6 +91,8 @@ public void Disconnect() return; } + // Cancel packet processing + _processingCancellation?.Cancel(); ClientCleanup(); @@ -105,7 +113,6 @@ public bool IsConnected() return !isDisconnected; } - private void ClientCleanup() { if (!_connected) @@ -152,6 +159,10 @@ public void StartReceiving() { Debug.Log("Start receiving"); + // Start the packet processing task + _processingCancellation = new CancellationTokenSource(); + _processingTask = Task.Run(() => ProcessPacketsAsync(_processingCancellation.Token)); + using (NetworkStream stream = new NetworkStream(_socket)) { int lengthHi; @@ -190,11 +201,60 @@ public void StartReceiving() receivedBytes += newBytes; } + // Queue the packet for processing instead of processing immediately if (_serverPacketHandler.HandlePacketCrypto(data, _initPacket)) { - Task.Run(() => _serverPacketHandler.HandlePacketAsync(data)); + _packetQueue.Enqueue(data); + _packetSemaphore.Release(); // Signal that a packet is available } } } + + // Clean shutdown of processing task + _processingCancellation?.Cancel(); + _processingTask?.Wait(TimeSpan.FromSeconds(2)); // Wait max 5 seconds for graceful shutdown + } + + private async Task ProcessPacketsAsync(CancellationToken cancellationToken) + { + try + { + while (!cancellationToken.IsCancellationRequested) + { + // Wait for a packet to be available + await _packetSemaphore.WaitAsync(cancellationToken); + + // Process all available packets in order + while (_packetQueue.TryDequeue(out byte[] data)) + { + try + { + await _serverPacketHandler.HandlePacketAsync(data); + } + catch (Exception ex) + { + Debug.LogError($"Error processing packet: {ex.Message}"); + // Continue processing other packets even if one fails + } + + // Check cancellation between packets + if (cancellationToken.IsCancellationRequested) + break; + } + } + } + catch (OperationCanceledException) + { + Debug.Log("Packet processing cancelled"); + } + catch (Exception ex) + { + Debug.LogError($"Packet processing task error: {ex.Message}"); + } + } + + public int GetQueuedPacketCount() + { + return _packetQueue.Count; } } diff --git a/l2-unity/Assets/Scripts/Networking/ClientLibrary/PacketHandler/ServerPacketHandler.cs b/l2-unity/Assets/Scripts/Networking/ClientLibrary/PacketHandler/ServerPacketHandler.cs index e43aef840..4cfb8899a 100644 --- a/l2-unity/Assets/Scripts/Networking/ClientLibrary/PacketHandler/ServerPacketHandler.cs +++ b/l2-unity/Assets/Scripts/Networking/ClientLibrary/PacketHandler/ServerPacketHandler.cs @@ -52,9 +52,9 @@ public bool HandlePacketCrypto(byte[] data, bool init) return true; } - public void HandlePacketAsync(byte[] data) + public async Task HandlePacketAsync(byte[] data) { - HandlePacket(data); + await Task.Run(() => HandlePacket(data)); } public void CancelTokens() From 16155cc57014c41246114d674fdade4ff3ec14d7 Mon Sep 17 00:00:00 2001 From: shnok Date: Wed, 23 Jul 2025 17:33:49 +0800 Subject: [PATCH 5/7] now showing icons in inventory in both hands for 2h weapons --- .../Icon/weapon_dual_sword_i00.png | Bin 0 -> 1764 bytes .../Icon/weapon_dual_sword_i00.png.meta | 117 ++++++++++++++++++ .../Assets/Scripts/Datatable/ModelTable.cs | 1 - .../Scripts/UI/Game/Inventory/GearSlot.cs | 3 +- .../UI/Game/Inventory/InventoryGearTab.cs | 23 ++-- 5 files changed, 131 insertions(+), 13 deletions(-) create mode 100644 l2-unity/Assets/Resources/Data/SysTextures/Icon/weapon_dual_sword_i00.png create mode 100644 l2-unity/Assets/Resources/Data/SysTextures/Icon/weapon_dual_sword_i00.png.meta diff --git a/l2-unity/Assets/Resources/Data/SysTextures/Icon/weapon_dual_sword_i00.png b/l2-unity/Assets/Resources/Data/SysTextures/Icon/weapon_dual_sword_i00.png new file mode 100644 index 0000000000000000000000000000000000000000..29f647574f7f1b4746d190274ba867886949a69c GIT binary patch literal 1764 zcmVXoUt5{;<{`_WK+zX+ST9|cd#k(4(|HI0QefnMPyxnqZD80cK|SrE zOm=Cpp>q!dOJp5P@`Nd#rZ!ghAsvVwM3@!%U+((8+*3-?+4Da2=2t06Bb+q8OVK5ZGBV1V)IW~^?CQCvq7YMNXMsV|teUyiQb@I|w~34BS} zr+>1*`2$C!2C_nZfgw1%IM9dLrhPx8jvM!J-ZHf!Ke61=xxg@x%${^ug{?1L2h(+} ze!yHg-WFBUko$5LP{~Ge_~9uGW9UE()@@vB6i%vTyfR~$Hm36I3d3>P{-4`hjvm=q zvI_F{+XF9*P8p{Ew-wZp2#|71m;&u3nzD5r{?bCZbLQMxYbwigC(Ejl6dy~!CEsoi z=&ZK-KvQi!Bu}M|$uC*HvrHyPqBcS>!7N!6+7k>7OP*W;#KeOEEhx(CKHKeYI7-u& z%V%2}{1wHen2t)20I;6%T2|3}3&}bpNfujFy0Y^`OXrE!C*$J1p7wB1$R1Z^%(pSkTZQ~1!vIWk4ZK^9X1gv1x44-U!%g8Dykf_Wq-T=%?%vsTs{KO8X)6#2+`I3K^UcqD zck;{WKQwVX*U+v3ZRhatp*w#iVk7L}85LY(}At>SjWAyCW+!e08TL6&tqP)ewc65?; z$O!-pFz)sZ%wLvA7$%HFCn^<==dMuD|c{oxw-ddyD$O zFzj%wQL6*@2dk^A2Lpk!%1WDw^#w(=oeB-z5WP{vsNM^wkTtrhz^&V=vghUO-o3Nw zu)j&gJ;v3sirmHU;=noohs)Dl?&-l;^3jK5#-}ycH$W1@H0g^Pf~)omDKN}fA6d`O zTin&rN!GFCV-f%g(uqi*;Xw$IPy~Qmy;l|%77&K+uqXiKtV(*eea~K;9oB0P)^rbv zI{}a_91NY3dYK1+rQ5x~U+uX_7%c}6JB~|3mn{wFaM>|`-Kf-*itje`5A+Y-86-&g zw%`$Vg19?0E8AjRm;bu3DOLzaH8=vhYXxenYXY{jVf$7z&EmHg(t*N>pP4y5b4EsM z%TNA8NBoE6Gk}Dm_5vhFL+;8_7YrTHwp`o^$2Vk21UQ5OuvL4x)P3R7`3uiZnsnn@ z|IPk>tcI%^08PhFZdkXTVC6P-`QDq2ekGUiCr)VuRJ$i09!Mu}KZ=gj)ZV*s>$&vw zt~U9SD>JkrFEdKiemwwh!RJK#a@eF=v(-OAQVTz-YVt3+9@s2=)X}j30000 items) { if (item.Equipped) { - //Debug.Log("Equip item: " + item); - if ((item.Slot == (int)Paperdoll.LHAND || item.Slot == (int)Paperdoll.RHAND) && item.BodyPart == ItemSlot.SLOT_LR_HAND && item.Type2 != ItemType2.TYPE2_SHIELD_ARMOR) //Todo verify + if (item.BodyPart == ItemSlot.SLOT_LR_HAND && item.Type1 == ItemType1.TYPE1_ITEM_QUESTITEM_ADENA) { - if (item.Type1 == ItemType1.TYPE1_ITEM_QUESTITEM_ADENA) - { - _gearSlots[(Paperdoll)item.Slot].AssignItem(item); - } - else - { - _gearSlots[Paperdoll.LHAND].AssignItem(item); - _gearSlots[Paperdoll.RHAND].AssignItem(item); - } + _gearSlots[(Paperdoll)item.Slot].AssignItem(item); // Arrows + } + else + if (item.Type2 == ItemType2.TYPE2_WEAPON && (((Weapongrp)item.ItemData.Itemgrp).WeaponType == WeaponType.bigblunt + || ((Weapongrp)item.ItemData.Itemgrp).WeaponType == WeaponType.bigword + || ((Weapongrp)item.ItemData.Itemgrp).WeaponType == WeaponType.dual + || ((Weapongrp)item.ItemData.Itemgrp).WeaponType == WeaponType.pole + || ((Weapongrp)item.ItemData.Itemgrp).WeaponType == WeaponType.fist)) + { + _gearSlots[Paperdoll.RHAND].AssignItem(item); + _gearSlots[Paperdoll.LHAND].AssignItem(item); } else if (item.Slot == (int)Paperdoll.CHEST && item.BodyPart == ItemSlot.SLOT_FULL_ARMOR) From c7a15c26317d536a823d0d854f885385018cbbe9 Mon Sep 17 00:00:00 2001 From: shnok Date: Fri, 25 Jul 2025 16:20:42 +0800 Subject: [PATCH 6/7] jump fixed --- .../DarkElf/FDarkElf/Player_FDarkElf.prefab | 7 ++- .../DarkElf/FDarkElf/User_FDarkElf.prefab | 4 +- .../DarkElf/MDarkElf/Player_MDarkElf.prefab | 8 ++- .../DarkElf/MDarkElf/User_MDarkElf.prefab | 4 +- .../Dwarf/FDwarf/Pawn_FDwarf.prefab | 2 +- .../Dwarf/FDwarf/Player_FDwarf.prefab | 8 ++- .../Dwarf/FDwarf/User_FDwarf.prefab | 4 +- .../Dwarf/MDwarf/Player_MDwarf.prefab | 8 ++- .../Dwarf/MDwarf/User_MDwarf.prefab | 4 +- .../Animations/Elf/FElf/Player_FElf.prefab | 8 ++- .../Data/Animations/Elf/FElf/User_FElf.prefab | 4 +- .../Animations/Elf/MElf/Player_MElf.prefab | 8 ++- .../Data/Animations/Elf/MElf/User_MElf.prefab | 2 +- .../Fighter/FFighter/Player_FFighter.prefab | 8 ++- .../Fighter/FFighter/User_FFighter.prefab | 4 +- .../Fighter/MFighter/Player_MFighter.prefab | 8 ++- .../Fighter/MFighter/User_MFighter.prefab | 4 +- .../Magic/FMagic/Player_FMagic.prefab | 8 ++- .../Magic/FMagic/User_FMagic.prefab | 4 +- .../Magic/MMagic/Player_MMagic.prefab | 8 ++- .../Magic/MMagic/User_MMagic.prefab | 4 +- .../NewHumanoidAnimationController.cs | 3 +- .../StateMachine/Intention/JumpIntention.cs | 1 - .../StateMachine/State/IdleState.cs | 2 +- .../StateMachine/State/JumpingState.cs | 15 ++---- .../NetworkCharacterControllerReceive.cs | 49 ++++++++++++------- 26 files changed, 88 insertions(+), 101 deletions(-) diff --git a/l2-unity/Assets/Resources/Data/Animations/DarkElf/FDarkElf/Player_FDarkElf.prefab b/l2-unity/Assets/Resources/Data/Animations/DarkElf/FDarkElf/Player_FDarkElf.prefab index 96a1db923..ac6de47c7 100644 --- a/l2-unity/Assets/Resources/Data/Animations/DarkElf/FDarkElf/Player_FDarkElf.prefab +++ b/l2-unity/Assets/Resources/Data/Animations/DarkElf/FDarkElf/Player_FDarkElf.prefab @@ -554,8 +554,8 @@ MonoBehaviour: _jumping: 1 _measuredSpeed: 0 _verticalVelocity: 0 - _jumpForce: 10 - _gravity: 28 + _jumpForce: 5 + _gravity: 15 _targetPosition: {x: 0, y: 0, z: 0} _runningToDestination: 0 _intentionToRun: 0 @@ -627,7 +627,6 @@ MonoBehaviour: m_EditorClassIdentifier: _sharingLoopDelayMs: 100 _lastDirection: {x: 0, y: 0, z: 0} - _lastForcedDirection: {x: 0, y: 0, z: 0} _lastDirectionAngle: 0 _lastSharingTimestamp: 0 _heading: 0 @@ -766,7 +765,7 @@ MonoBehaviour: _defaultAtkWaitAnimationSpeed: 0.5 _defaultRunAnimationSpeed: 0.35 _defaultWalkAnimationSpeed: 0.6 - _defaultJumpAnimationSpeed: 1.25 + _defaultJumpAnimationSpeed: 1 _defaultDieAnimationSpeed: 0.5 _defaultAnimContainer: {fileID: 11400000, guid: 8935f1c9993a39a4eaccbbfcc84a9aea, type: 2} _atkAnimContainer: {fileID: 11400000, guid: f1b40e188da08e0439583c59ed446410, type: 2} diff --git a/l2-unity/Assets/Resources/Data/Animations/DarkElf/FDarkElf/User_FDarkElf.prefab b/l2-unity/Assets/Resources/Data/Animations/DarkElf/FDarkElf/User_FDarkElf.prefab index 03aef1d8b..2491f17a3 100644 --- a/l2-unity/Assets/Resources/Data/Animations/DarkElf/FDarkElf/User_FDarkElf.prefab +++ b/l2-unity/Assets/Resources/Data/Animations/DarkElf/FDarkElf/User_FDarkElf.prefab @@ -648,7 +648,7 @@ MonoBehaviour: _speed: 0 _destination: {x: 0, y: 0, z: 0} _lastDestination: {x: 0, y: 0, z: 0} - _gravity: 28 + _gravity: 15 _moveSpeedMultiplier: 1 _stopAtRange: 0 _stopAtRangeDefault: 0.05 @@ -766,7 +766,7 @@ MonoBehaviour: _defaultAtkWaitAnimationSpeed: 0.5 _defaultRunAnimationSpeed: 0.35 _defaultWalkAnimationSpeed: 0.6 - _defaultJumpAnimationSpeed: 1.25 + _defaultJumpAnimationSpeed: 1 _defaultDieAnimationSpeed: 0.5 _defaultAnimContainer: {fileID: 11400000, guid: 8935f1c9993a39a4eaccbbfcc84a9aea, type: 2} _atkAnimContainer: {fileID: 11400000, guid: f1b40e188da08e0439583c59ed446410, type: 2} diff --git a/l2-unity/Assets/Resources/Data/Animations/DarkElf/MDarkElf/Player_MDarkElf.prefab b/l2-unity/Assets/Resources/Data/Animations/DarkElf/MDarkElf/Player_MDarkElf.prefab index b8a816b1d..0cfd9c0f2 100644 --- a/l2-unity/Assets/Resources/Data/Animations/DarkElf/MDarkElf/Player_MDarkElf.prefab +++ b/l2-unity/Assets/Resources/Data/Animations/DarkElf/MDarkElf/Player_MDarkElf.prefab @@ -554,8 +554,8 @@ MonoBehaviour: _jumping: 1 _measuredSpeed: 0 _verticalVelocity: 0 - _jumpForce: 10 - _gravity: 28 + _jumpForce: 5 + _gravity: 15 _targetPosition: {x: 0, y: 0, z: 0} _runningToDestination: 0 _intentionToRun: 0 @@ -612,7 +612,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _serverPosition: {x: 0, y: 0, z: 0} - _shouldShareRotation: 0 _rotationShareEnabled: 0 --- !u!114 &2816631728359154816 MonoBehaviour: @@ -628,7 +627,6 @@ MonoBehaviour: m_EditorClassIdentifier: _sharingLoopDelayMs: 100 _lastDirection: {x: 0, y: 0, z: 0} - _lastForcedDirection: {x: 0, y: 0, z: 0} _lastDirectionAngle: 0 _lastSharingTimestamp: 0 _heading: 0 @@ -767,7 +765,7 @@ MonoBehaviour: _defaultAtkWaitAnimationSpeed: 0.5 _defaultRunAnimationSpeed: 0.35 _defaultWalkAnimationSpeed: 0.25 - _defaultJumpAnimationSpeed: 1.25 + _defaultJumpAnimationSpeed: 1 _defaultDieAnimationSpeed: 0.5 _defaultAnimContainer: {fileID: 11400000, guid: d4e8f77825155a348ae0c28ac18ad41d, type: 2} _atkAnimContainer: {fileID: 11400000, guid: 2394fcefd3d70044dbb39fb2b43501fd, type: 2} diff --git a/l2-unity/Assets/Resources/Data/Animations/DarkElf/MDarkElf/User_MDarkElf.prefab b/l2-unity/Assets/Resources/Data/Animations/DarkElf/MDarkElf/User_MDarkElf.prefab index cbea0177c..10df35329 100644 --- a/l2-unity/Assets/Resources/Data/Animations/DarkElf/MDarkElf/User_MDarkElf.prefab +++ b/l2-unity/Assets/Resources/Data/Animations/DarkElf/MDarkElf/User_MDarkElf.prefab @@ -648,7 +648,7 @@ MonoBehaviour: _speed: 0 _destination: {x: 0, y: 0, z: 0} _lastDestination: {x: 0, y: 0, z: 0} - _gravity: 28 + _gravity: 15 _moveSpeedMultiplier: 1 _stopAtRange: 0 _stopAtRangeDefault: 0.05 @@ -766,7 +766,7 @@ MonoBehaviour: _defaultAtkWaitAnimationSpeed: 0.5 _defaultRunAnimationSpeed: 0.35 _defaultWalkAnimationSpeed: 0.25 - _defaultJumpAnimationSpeed: 1.25 + _defaultJumpAnimationSpeed: 1 _defaultDieAnimationSpeed: 0.5 _defaultAnimContainer: {fileID: 11400000, guid: d4e8f77825155a348ae0c28ac18ad41d, type: 2} _atkAnimContainer: {fileID: 11400000, guid: 2394fcefd3d70044dbb39fb2b43501fd, type: 2} diff --git a/l2-unity/Assets/Resources/Data/Animations/Dwarf/FDwarf/Pawn_FDwarf.prefab b/l2-unity/Assets/Resources/Data/Animations/Dwarf/FDwarf/Pawn_FDwarf.prefab index ad5396c94..065264064 100644 --- a/l2-unity/Assets/Resources/Data/Animations/Dwarf/FDwarf/Pawn_FDwarf.prefab +++ b/l2-unity/Assets/Resources/Data/Animations/Dwarf/FDwarf/Pawn_FDwarf.prefab @@ -751,7 +751,7 @@ MonoBehaviour: _defaultAtkWaitAnimationSpeed: 0.5 _defaultRunAnimationSpeed: 0.35 _defaultWalkAnimationSpeed: 0.4 - _defaultJumpAnimationSpeed: 1.25 + _defaultJumpAnimationSpeed: 1 _defaultDieAnimationSpeed: 0.5 _defaultAnimContainer: {fileID: 11400000, guid: 2c1f63188fb0b6a43bc9b94bb9844375, type: 2} _atkAnimContainer: {fileID: 11400000, guid: f8f959dcb7dba694ea4efcd1390218ad, type: 2} diff --git a/l2-unity/Assets/Resources/Data/Animations/Dwarf/FDwarf/Player_FDwarf.prefab b/l2-unity/Assets/Resources/Data/Animations/Dwarf/FDwarf/Player_FDwarf.prefab index 5f00b1911..e01bdf206 100644 --- a/l2-unity/Assets/Resources/Data/Animations/Dwarf/FDwarf/Player_FDwarf.prefab +++ b/l2-unity/Assets/Resources/Data/Animations/Dwarf/FDwarf/Player_FDwarf.prefab @@ -617,7 +617,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _serverPosition: {x: 0, y: 0, z: 0} - _shouldShareRotation: 0 _rotationShareEnabled: 0 --- !u!114 &2816631728359154816 MonoBehaviour: @@ -633,7 +632,6 @@ MonoBehaviour: m_EditorClassIdentifier: _sharingLoopDelayMs: 100 _lastDirection: {x: 0, y: 0, z: 0} - _lastForcedDirection: {x: 0, y: 0, z: 0} _lastDirectionAngle: 0 _lastSharingTimestamp: 0 _heading: 0 @@ -660,8 +658,8 @@ MonoBehaviour: _jumping: 1 _measuredSpeed: 0 _verticalVelocity: 0 - _jumpForce: 10 - _gravity: 28 + _jumpForce: 5 + _gravity: 15 _targetPosition: {x: 0, y: 0, z: 0} _runningToDestination: 0 _intentionToRun: 0 @@ -784,7 +782,7 @@ MonoBehaviour: _defaultAtkWaitAnimationSpeed: 0.5 _defaultRunAnimationSpeed: 0.35 _defaultWalkAnimationSpeed: 0.4 - _defaultJumpAnimationSpeed: 1.25 + _defaultJumpAnimationSpeed: 1 _defaultDieAnimationSpeed: 0.5 _defaultAnimContainer: {fileID: 11400000, guid: 2c1f63188fb0b6a43bc9b94bb9844375, type: 2} _atkAnimContainer: {fileID: 11400000, guid: f8f959dcb7dba694ea4efcd1390218ad, type: 2} diff --git a/l2-unity/Assets/Resources/Data/Animations/Dwarf/FDwarf/User_FDwarf.prefab b/l2-unity/Assets/Resources/Data/Animations/Dwarf/FDwarf/User_FDwarf.prefab index f6abe3406..899b9afb9 100644 --- a/l2-unity/Assets/Resources/Data/Animations/Dwarf/FDwarf/User_FDwarf.prefab +++ b/l2-unity/Assets/Resources/Data/Animations/Dwarf/FDwarf/User_FDwarf.prefab @@ -648,7 +648,7 @@ MonoBehaviour: _speed: 0 _destination: {x: 0, y: 0, z: 0} _lastDestination: {x: 0, y: 0, z: 0} - _gravity: 28 + _gravity: 15 _moveSpeedMultiplier: 1 _stopAtRange: 0 _stopAtRangeDefault: 0.05 @@ -766,7 +766,7 @@ MonoBehaviour: _defaultAtkWaitAnimationSpeed: 0.5 _defaultRunAnimationSpeed: 0.35 _defaultWalkAnimationSpeed: 0.4 - _defaultJumpAnimationSpeed: 1.25 + _defaultJumpAnimationSpeed: 1 _defaultDieAnimationSpeed: 0.5 _defaultAnimContainer: {fileID: 11400000, guid: 2c1f63188fb0b6a43bc9b94bb9844375, type: 2} _atkAnimContainer: {fileID: 11400000, guid: f8f959dcb7dba694ea4efcd1390218ad, type: 2} diff --git a/l2-unity/Assets/Resources/Data/Animations/Dwarf/MDwarf/Player_MDwarf.prefab b/l2-unity/Assets/Resources/Data/Animations/Dwarf/MDwarf/Player_MDwarf.prefab index f0e87626b..60d91b00b 100644 --- a/l2-unity/Assets/Resources/Data/Animations/Dwarf/MDwarf/Player_MDwarf.prefab +++ b/l2-unity/Assets/Resources/Data/Animations/Dwarf/MDwarf/Player_MDwarf.prefab @@ -617,7 +617,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _serverPosition: {x: 0, y: 0, z: 0} - _shouldShareRotation: 0 _rotationShareEnabled: 0 --- !u!114 &2816631728359154816 MonoBehaviour: @@ -633,7 +632,6 @@ MonoBehaviour: m_EditorClassIdentifier: _sharingLoopDelayMs: 100 _lastDirection: {x: 0, y: 0, z: 0} - _lastForcedDirection: {x: 0, y: 0, z: 0} _lastDirectionAngle: 0 _lastSharingTimestamp: 0 _heading: 0 @@ -660,8 +658,8 @@ MonoBehaviour: _jumping: 1 _measuredSpeed: 0 _verticalVelocity: 0 - _jumpForce: 10 - _gravity: 28 + _jumpForce: 5 + _gravity: 16 _targetPosition: {x: 0, y: 0, z: 0} _runningToDestination: 0 _intentionToRun: 0 @@ -792,7 +790,7 @@ MonoBehaviour: _defaultAtkWaitAnimationSpeed: 0.4 _defaultRunAnimationSpeed: 0.3 _defaultWalkAnimationSpeed: 0.3 - _defaultJumpAnimationSpeed: 1.25 + _defaultJumpAnimationSpeed: 1 _defaultDieAnimationSpeed: 0.5 _defaultAnimContainer: {fileID: 11400000, guid: 0e526b92214ccdf41876177c2b915d54, type: 2} _atkAnimContainer: {fileID: 11400000, guid: fd19a99a56222da43893e8b04072a705, type: 2} diff --git a/l2-unity/Assets/Resources/Data/Animations/Dwarf/MDwarf/User_MDwarf.prefab b/l2-unity/Assets/Resources/Data/Animations/Dwarf/MDwarf/User_MDwarf.prefab index 42a11f7f0..c45f6ac25 100644 --- a/l2-unity/Assets/Resources/Data/Animations/Dwarf/MDwarf/User_MDwarf.prefab +++ b/l2-unity/Assets/Resources/Data/Animations/Dwarf/MDwarf/User_MDwarf.prefab @@ -570,7 +570,7 @@ MonoBehaviour: _speed: 0 _destination: {x: 0, y: 0, z: 0} _lastDestination: {x: 0, y: 0, z: 0} - _gravity: 28 + _gravity: 15 _moveSpeedMultiplier: 1 _stopAtRange: 0 _stopAtRangeDefault: 0.05 @@ -696,7 +696,7 @@ MonoBehaviour: _defaultAtkWaitAnimationSpeed: 0.4 _defaultRunAnimationSpeed: 0.3 _defaultWalkAnimationSpeed: 0.3 - _defaultJumpAnimationSpeed: 1.25 + _defaultJumpAnimationSpeed: 1 _defaultDieAnimationSpeed: 0.5 _defaultAnimContainer: {fileID: 11400000, guid: 0e526b92214ccdf41876177c2b915d54, type: 2} _atkAnimContainer: {fileID: 11400000, guid: fd19a99a56222da43893e8b04072a705, type: 2} diff --git a/l2-unity/Assets/Resources/Data/Animations/Elf/FElf/Player_FElf.prefab b/l2-unity/Assets/Resources/Data/Animations/Elf/FElf/Player_FElf.prefab index 3e65ae4a5..a514e3b9e 100644 --- a/l2-unity/Assets/Resources/Data/Animations/Elf/FElf/Player_FElf.prefab +++ b/l2-unity/Assets/Resources/Data/Animations/Elf/FElf/Player_FElf.prefab @@ -554,8 +554,8 @@ MonoBehaviour: _jumping: 1 _measuredSpeed: 0 _verticalVelocity: 0 - _jumpForce: 10 - _gravity: 28 + _jumpForce: 5 + _gravity: 15 _targetPosition: {x: 0, y: 0, z: 0} _runningToDestination: 0 _intentionToRun: 0 @@ -612,7 +612,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _serverPosition: {x: 0, y: 0, z: 0} - _shouldShareRotation: 0 _rotationShareEnabled: 0 --- !u!114 &2816631728359154816 MonoBehaviour: @@ -628,7 +627,6 @@ MonoBehaviour: m_EditorClassIdentifier: _sharingLoopDelayMs: 100 _lastDirection: {x: 0, y: 0, z: 0} - _lastForcedDirection: {x: 0, y: 0, z: 0} _lastDirectionAngle: 0 _lastSharingTimestamp: 0 _heading: 0 @@ -767,7 +765,7 @@ MonoBehaviour: _defaultAtkWaitAnimationSpeed: 0.3 _defaultRunAnimationSpeed: 0.3 _defaultWalkAnimationSpeed: 0.3 - _defaultJumpAnimationSpeed: 1.25 + _defaultJumpAnimationSpeed: 1 _defaultDieAnimationSpeed: 0.5 _defaultAnimContainer: {fileID: 11400000, guid: e94638970a978954f9b0c508bd56ee4e, type: 2} _atkAnimContainer: {fileID: 11400000, guid: 8db386f8ace736d48ba0da4fe81cd05f, type: 2} diff --git a/l2-unity/Assets/Resources/Data/Animations/Elf/FElf/User_FElf.prefab b/l2-unity/Assets/Resources/Data/Animations/Elf/FElf/User_FElf.prefab index 1619184ae..f8b58866e 100644 --- a/l2-unity/Assets/Resources/Data/Animations/Elf/FElf/User_FElf.prefab +++ b/l2-unity/Assets/Resources/Data/Animations/Elf/FElf/User_FElf.prefab @@ -648,7 +648,7 @@ MonoBehaviour: _speed: 0 _destination: {x: 0, y: 0, z: 0} _lastDestination: {x: 0, y: 0, z: 0} - _gravity: 28 + _gravity: 15 _moveSpeedMultiplier: 1 _stopAtRange: 0 _stopAtRangeDefault: 0.05 @@ -766,7 +766,7 @@ MonoBehaviour: _defaultAtkWaitAnimationSpeed: 0.3 _defaultRunAnimationSpeed: 0.3 _defaultWalkAnimationSpeed: 0.3 - _defaultJumpAnimationSpeed: 1.25 + _defaultJumpAnimationSpeed: 1 _defaultDieAnimationSpeed: 0.5 _defaultAnimContainer: {fileID: 11400000, guid: e94638970a978954f9b0c508bd56ee4e, type: 2} _atkAnimContainer: {fileID: 11400000, guid: 8db386f8ace736d48ba0da4fe81cd05f, type: 2} diff --git a/l2-unity/Assets/Resources/Data/Animations/Elf/MElf/Player_MElf.prefab b/l2-unity/Assets/Resources/Data/Animations/Elf/MElf/Player_MElf.prefab index f2591d312..d13c53150 100644 --- a/l2-unity/Assets/Resources/Data/Animations/Elf/MElf/Player_MElf.prefab +++ b/l2-unity/Assets/Resources/Data/Animations/Elf/MElf/Player_MElf.prefab @@ -554,8 +554,8 @@ MonoBehaviour: _jumping: 1 _measuredSpeed: 0 _verticalVelocity: 0 - _jumpForce: 10 - _gravity: 28 + _jumpForce: 5 + _gravity: 15 _targetPosition: {x: 0, y: 0, z: 0} _runningToDestination: 0 _intentionToRun: 0 @@ -612,7 +612,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _serverPosition: {x: 0, y: 0, z: 0} - _shouldShareRotation: 0 _rotationShareEnabled: 0 --- !u!114 &2816631728359154816 MonoBehaviour: @@ -628,7 +627,6 @@ MonoBehaviour: m_EditorClassIdentifier: _sharingLoopDelayMs: 100 _lastDirection: {x: 0, y: 0, z: 0} - _lastForcedDirection: {x: 0, y: 0, z: 0} _lastDirectionAngle: 0 _lastSharingTimestamp: 0 _heading: 0 @@ -767,7 +765,7 @@ MonoBehaviour: _defaultAtkWaitAnimationSpeed: 0.35 _defaultRunAnimationSpeed: 0.25 _defaultWalkAnimationSpeed: 0.3 - _defaultJumpAnimationSpeed: 1.25 + _defaultJumpAnimationSpeed: 1 _defaultDieAnimationSpeed: 0.5 _defaultAnimContainer: {fileID: 11400000, guid: e2b606c90567d4448977edf756f306b8, type: 2} _atkAnimContainer: {fileID: 11400000, guid: 2e692db08a6eb974d81d735296c5969a, type: 2} diff --git a/l2-unity/Assets/Resources/Data/Animations/Elf/MElf/User_MElf.prefab b/l2-unity/Assets/Resources/Data/Animations/Elf/MElf/User_MElf.prefab index 72cfcb284..193037140 100644 --- a/l2-unity/Assets/Resources/Data/Animations/Elf/MElf/User_MElf.prefab +++ b/l2-unity/Assets/Resources/Data/Animations/Elf/MElf/User_MElf.prefab @@ -648,7 +648,7 @@ MonoBehaviour: _speed: 0 _destination: {x: 0, y: 0, z: 0} _lastDestination: {x: 0, y: 0, z: 0} - _gravity: 28 + _gravity: 15 _moveSpeedMultiplier: 1 _stopAtRange: 0 _stopAtRangeDefault: 0.05 diff --git a/l2-unity/Assets/Resources/Data/Animations/Fighter/FFighter/Player_FFighter.prefab b/l2-unity/Assets/Resources/Data/Animations/Fighter/FFighter/Player_FFighter.prefab index 13a4457d7..f2ef78cea 100644 --- a/l2-unity/Assets/Resources/Data/Animations/Fighter/FFighter/Player_FFighter.prefab +++ b/l2-unity/Assets/Resources/Data/Animations/Fighter/FFighter/Player_FFighter.prefab @@ -584,7 +584,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _serverPosition: {x: 0, y: 0, z: 0} - _shouldShareRotation: 0 _rotationShareEnabled: 0 --- !u!114 &3967418578199696562 MonoBehaviour: @@ -600,7 +599,6 @@ MonoBehaviour: m_EditorClassIdentifier: _sharingLoopDelayMs: 100 _lastDirection: {x: 0, y: 0, z: 0} - _lastForcedDirection: {x: 0, y: 0, z: 0} _lastDirectionAngle: 0 _lastSharingTimestamp: 0 _heading: 0 @@ -627,8 +625,8 @@ MonoBehaviour: _jumping: 1 _measuredSpeed: 0 _verticalVelocity: 0 - _jumpForce: 10 - _gravity: 28 + _jumpForce: 5 + _gravity: 15 _targetPosition: {x: 0, y: 0, z: 0} _runningToDestination: 0 _intentionToRun: 0 @@ -751,7 +749,7 @@ MonoBehaviour: _defaultAtkWaitAnimationSpeed: 0.3 _defaultRunAnimationSpeed: 0.3 _defaultWalkAnimationSpeed: 0.3 - _defaultJumpAnimationSpeed: 1.25 + _defaultJumpAnimationSpeed: 1 _defaultDieAnimationSpeed: 0.5 _defaultAnimContainer: {fileID: 11400000, guid: b388aff4079feaa42b0feb3f781b3343, type: 2} _atkAnimContainer: {fileID: 11400000, guid: 5b32327d84eefc14796187793c25d17f, type: 2} diff --git a/l2-unity/Assets/Resources/Data/Animations/Fighter/FFighter/User_FFighter.prefab b/l2-unity/Assets/Resources/Data/Animations/Fighter/FFighter/User_FFighter.prefab index 3a32814f1..bd3832643 100644 --- a/l2-unity/Assets/Resources/Data/Animations/Fighter/FFighter/User_FFighter.prefab +++ b/l2-unity/Assets/Resources/Data/Animations/Fighter/FFighter/User_FFighter.prefab @@ -712,7 +712,7 @@ MonoBehaviour: _speed: 0 _destination: {x: 0, y: 0, z: 0} _lastDestination: {x: 0, y: 0, z: 0} - _gravity: 28 + _gravity: 15 _moveSpeedMultiplier: 1 _stopAtRange: 0 _stopAtRangeDefault: 0.05 @@ -830,7 +830,7 @@ MonoBehaviour: _defaultAtkWaitAnimationSpeed: 0.3 _defaultRunAnimationSpeed: 0.3 _defaultWalkAnimationSpeed: 0.3 - _defaultJumpAnimationSpeed: 1.25 + _defaultJumpAnimationSpeed: 1 _defaultDieAnimationSpeed: 0.5 _defaultAnimContainer: {fileID: 11400000, guid: 2c1f63188fb0b6a43bc9b94bb9844375, type: 2} _atkAnimContainer: {fileID: 11400000, guid: f8f959dcb7dba694ea4efcd1390218ad, type: 2} diff --git a/l2-unity/Assets/Resources/Data/Animations/Fighter/MFighter/Player_MFighter.prefab b/l2-unity/Assets/Resources/Data/Animations/Fighter/MFighter/Player_MFighter.prefab index 81194f294..62eff9ca3 100644 --- a/l2-unity/Assets/Resources/Data/Animations/Fighter/MFighter/Player_MFighter.prefab +++ b/l2-unity/Assets/Resources/Data/Animations/Fighter/MFighter/Player_MFighter.prefab @@ -553,7 +553,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _serverPosition: {x: 0, y: 0, z: 0} - _shouldShareRotation: 0 _rotationShareEnabled: 0 --- !u!114 &3777964629261997670 MonoBehaviour: @@ -569,7 +568,6 @@ MonoBehaviour: m_EditorClassIdentifier: _sharingLoopDelayMs: 100 _lastDirection: {x: 0, y: 0, z: 0} - _lastForcedDirection: {x: 0, y: 0, z: 0} _lastDirectionAngle: 0 _lastSharingTimestamp: 0 _heading: 0 @@ -596,8 +594,8 @@ MonoBehaviour: _jumping: 1 _measuredSpeed: 0 _verticalVelocity: 0 - _jumpForce: 10 - _gravity: 28 + _jumpForce: 5 + _gravity: 15 _targetPosition: {x: 0, y: 0, z: 0} _runningToDestination: 0 _intentionToRun: 0 @@ -720,7 +718,7 @@ MonoBehaviour: _defaultAtkWaitAnimationSpeed: 0.25 _defaultRunAnimationSpeed: 0.25 _defaultWalkAnimationSpeed: 0.35 - _defaultJumpAnimationSpeed: 1.25 + _defaultJumpAnimationSpeed: 1 _defaultDieAnimationSpeed: 0.5 _defaultAnimContainer: {fileID: 11400000, guid: 1271f85c992f9234a8754a87c4bc78ac, type: 2} _atkAnimContainer: {fileID: 11400000, guid: f3594f0d1b4056e469a7d0cd3506d24a, type: 2} diff --git a/l2-unity/Assets/Resources/Data/Animations/Fighter/MFighter/User_MFighter.prefab b/l2-unity/Assets/Resources/Data/Animations/Fighter/MFighter/User_MFighter.prefab index 9933e7322..1de82c468 100644 --- a/l2-unity/Assets/Resources/Data/Animations/Fighter/MFighter/User_MFighter.prefab +++ b/l2-unity/Assets/Resources/Data/Animations/Fighter/MFighter/User_MFighter.prefab @@ -712,7 +712,7 @@ MonoBehaviour: _speed: 0 _destination: {x: 0, y: 0, z: 0} _lastDestination: {x: 0, y: 0, z: 0} - _gravity: 28 + _gravity: 15 _moveSpeedMultiplier: 1 _stopAtRange: 0 _stopAtRangeDefault: 0.05 @@ -830,7 +830,7 @@ MonoBehaviour: _defaultAtkWaitAnimationSpeed: 0.25 _defaultRunAnimationSpeed: 0.25 _defaultWalkAnimationSpeed: 0.35 - _defaultJumpAnimationSpeed: 1.25 + _defaultJumpAnimationSpeed: 1 _defaultDieAnimationSpeed: 0.5 _defaultAnimContainer: {fileID: 11400000, guid: 1271f85c992f9234a8754a87c4bc78ac, type: 2} _atkAnimContainer: {fileID: 11400000, guid: f3594f0d1b4056e469a7d0cd3506d24a, type: 2} diff --git a/l2-unity/Assets/Resources/Data/Animations/Magic/FMagic/Player_FMagic.prefab b/l2-unity/Assets/Resources/Data/Animations/Magic/FMagic/Player_FMagic.prefab index 20d7188c4..3e6f53490 100644 --- a/l2-unity/Assets/Resources/Data/Animations/Magic/FMagic/Player_FMagic.prefab +++ b/l2-unity/Assets/Resources/Data/Animations/Magic/FMagic/Player_FMagic.prefab @@ -617,7 +617,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _serverPosition: {x: 0, y: 0, z: 0} - _shouldShareRotation: 0 _rotationShareEnabled: 0 --- !u!114 &8030301430683069964 MonoBehaviour: @@ -633,7 +632,6 @@ MonoBehaviour: m_EditorClassIdentifier: _sharingLoopDelayMs: 100 _lastDirection: {x: 0, y: 0, z: 0} - _lastForcedDirection: {x: 0, y: 0, z: 0} _lastDirectionAngle: 0 _lastSharingTimestamp: 0 _heading: 0 @@ -660,8 +658,8 @@ MonoBehaviour: _jumping: 1 _measuredSpeed: 0 _verticalVelocity: 0 - _jumpForce: 10 - _gravity: 28 + _jumpForce: 5 + _gravity: 15 _targetPosition: {x: 0, y: 0, z: 0} _runningToDestination: 0 _intentionToRun: 0 @@ -784,7 +782,7 @@ MonoBehaviour: _defaultAtkWaitAnimationSpeed: 0.25 _defaultRunAnimationSpeed: 0.25 _defaultWalkAnimationSpeed: 0.4 - _defaultJumpAnimationSpeed: 1.25 + _defaultJumpAnimationSpeed: 1 _defaultDieAnimationSpeed: 0.5 _defaultAnimContainer: {fileID: 11400000, guid: 94c50cc5dd980ad42bf86587d8554a9e, type: 2} _atkAnimContainer: {fileID: 11400000, guid: e6c2decf60a173d458fb4b9dd803cb03, type: 2} diff --git a/l2-unity/Assets/Resources/Data/Animations/Magic/FMagic/User_FMagic.prefab b/l2-unity/Assets/Resources/Data/Animations/Magic/FMagic/User_FMagic.prefab index 3228d8572..3d79f386d 100644 --- a/l2-unity/Assets/Resources/Data/Animations/Magic/FMagic/User_FMagic.prefab +++ b/l2-unity/Assets/Resources/Data/Animations/Magic/FMagic/User_FMagic.prefab @@ -570,7 +570,7 @@ MonoBehaviour: _speed: 0 _destination: {x: 0, y: 0, z: 0} _lastDestination: {x: 0, y: 0, z: 0} - _gravity: 28 + _gravity: 15 _moveSpeedMultiplier: 1 _stopAtRange: 0 _stopAtRangeDefault: 0.05 @@ -688,7 +688,7 @@ MonoBehaviour: _defaultAtkWaitAnimationSpeed: 0.25 _defaultRunAnimationSpeed: 0.25 _defaultWalkAnimationSpeed: 0.4 - _defaultJumpAnimationSpeed: 1.25 + _defaultJumpAnimationSpeed: 1 _defaultDieAnimationSpeed: 0.5 _defaultAnimContainer: {fileID: 11400000, guid: 94c50cc5dd980ad42bf86587d8554a9e, type: 2} _atkAnimContainer: {fileID: 11400000, guid: e6c2decf60a173d458fb4b9dd803cb03, type: 2} diff --git a/l2-unity/Assets/Resources/Data/Animations/Magic/MMagic/Player_MMagic.prefab b/l2-unity/Assets/Resources/Data/Animations/Magic/MMagic/Player_MMagic.prefab index dbaf641ec..505205bd0 100644 --- a/l2-unity/Assets/Resources/Data/Animations/Magic/MMagic/Player_MMagic.prefab +++ b/l2-unity/Assets/Resources/Data/Animations/Magic/MMagic/Player_MMagic.prefab @@ -553,7 +553,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _serverPosition: {x: 0, y: 0, z: 0} - _shouldShareRotation: 0 _rotationShareEnabled: 0 --- !u!114 &8971746212916689295 MonoBehaviour: @@ -569,7 +568,6 @@ MonoBehaviour: m_EditorClassIdentifier: _sharingLoopDelayMs: 100 _lastDirection: {x: 0, y: 0, z: 0} - _lastForcedDirection: {x: 0, y: 0, z: 0} _lastDirectionAngle: 0 _lastSharingTimestamp: 0 _heading: 0 @@ -596,8 +594,8 @@ MonoBehaviour: _jumping: 1 _measuredSpeed: 0 _verticalVelocity: 0 - _jumpForce: 10 - _gravity: 28 + _jumpForce: 5 + _gravity: 15 _targetPosition: {x: 0, y: 0, z: 0} _runningToDestination: 0 _intentionToRun: 0 @@ -720,7 +718,7 @@ MonoBehaviour: _defaultAtkWaitAnimationSpeed: 0.25 _defaultRunAnimationSpeed: 0.25 _defaultWalkAnimationSpeed: 0.4 - _defaultJumpAnimationSpeed: 1.25 + _defaultJumpAnimationSpeed: 1 _defaultDieAnimationSpeed: 0.5 _defaultAnimContainer: {fileID: 11400000, guid: ce62c0f2a772ef44a93176ae978defbc, type: 2} _atkAnimContainer: {fileID: 11400000, guid: b53c6e45e43d5fe40841ef4de9818f01, type: 2} diff --git a/l2-unity/Assets/Resources/Data/Animations/Magic/MMagic/User_MMagic.prefab b/l2-unity/Assets/Resources/Data/Animations/Magic/MMagic/User_MMagic.prefab index 612f9106c..2eca70d80 100644 --- a/l2-unity/Assets/Resources/Data/Animations/Magic/MMagic/User_MMagic.prefab +++ b/l2-unity/Assets/Resources/Data/Animations/Magic/MMagic/User_MMagic.prefab @@ -572,7 +572,7 @@ MonoBehaviour: _speed: 0 _destination: {x: 0, y: 0, z: 0} _lastDestination: {x: 0, y: 0, z: 0} - _gravity: 28 + _gravity: 15 _moveSpeedMultiplier: 1 _stopAtRange: 0 _stopAtRangeDefault: 0.05 @@ -690,7 +690,7 @@ MonoBehaviour: _defaultAtkWaitAnimationSpeed: 0.25 _defaultRunAnimationSpeed: 0.25 _defaultWalkAnimationSpeed: 0.4 - _defaultJumpAnimationSpeed: 1.25 + _defaultJumpAnimationSpeed: 1 _defaultDieAnimationSpeed: 0.5 _defaultAnimContainer: {fileID: 11400000, guid: ce62c0f2a772ef44a93176ae978defbc, type: 2} _atkAnimContainer: {fileID: 11400000, guid: b53c6e45e43d5fe40841ef4de9818f01, type: 2} diff --git a/l2-unity/Assets/Scripts/Animation/Controller/NewHumanoidAnimationController.cs b/l2-unity/Assets/Scripts/Animation/Controller/NewHumanoidAnimationController.cs index fe0181f3d..203044570 100644 --- a/l2-unity/Assets/Scripts/Animation/Controller/NewHumanoidAnimationController.cs +++ b/l2-unity/Assets/Scripts/Animation/Controller/NewHumanoidAnimationController.cs @@ -357,12 +357,13 @@ public override void Jump() HumanoidAnimationDefaultEvent animEvent = HumanoidAnimationDefaultEvent.jump_run; if (PlayAnimation((int)animEvent)) { + _animancerState.Time = 0; _animancerState.EffectiveSpeed = _defaultJumpAnimationSpeed; if (!_animancerState.HasEvents) { // We need to change to Jump Sound - _animancerState.Events.Add(0.25f, () => AudioHandler.PlaySound(EntitySoundEvent.Jump_1)); + _animancerState.Events.Add(0f, () => AudioHandler.PlaySound(EntitySoundEvent.Jump_1)); } } } diff --git a/l2-unity/Assets/Scripts/Controller/StateMachine/Intention/JumpIntention.cs b/l2-unity/Assets/Scripts/Controller/StateMachine/Intention/JumpIntention.cs index 9a9727e88..3773333b7 100644 --- a/l2-unity/Assets/Scripts/Controller/StateMachine/Intention/JumpIntention.cs +++ b/l2-unity/Assets/Scripts/Controller/StateMachine/Intention/JumpIntention.cs @@ -13,6 +13,5 @@ public override void Enter(object arg0) public override void Exit() { } public override void Update() { - // _stateMachine.ChangeState(PlayerState.JUMPING); } } \ No newline at end of file diff --git a/l2-unity/Assets/Scripts/Controller/StateMachine/State/IdleState.cs b/l2-unity/Assets/Scripts/Controller/StateMachine/State/IdleState.cs index b391b1ecc..6ad59077a 100644 --- a/l2-unity/Assets/Scripts/Controller/StateMachine/State/IdleState.cs +++ b/l2-unity/Assets/Scripts/Controller/StateMachine/State/IdleState.cs @@ -24,7 +24,7 @@ public override void Enter(object wasCanceled) public override void Update() { - if (PlayerController.Instance != null && PlayerController.Instance.IsJumping()) + if (InputManager.Instance.Jump) { _stateMachine.ChangeIntention(Intention.INTENTION_JUMP); return; diff --git a/l2-unity/Assets/Scripts/Controller/StateMachine/State/JumpingState.cs b/l2-unity/Assets/Scripts/Controller/StateMachine/State/JumpingState.cs index 3e0259ca6..2e9b3d8e1 100644 --- a/l2-unity/Assets/Scripts/Controller/StateMachine/State/JumpingState.cs +++ b/l2-unity/Assets/Scripts/Controller/StateMachine/State/JumpingState.cs @@ -10,8 +10,11 @@ public override void Enter(object arg0) { _stateBeforeJump = (PlayerState)arg0; - PlayerController.Instance.Jump(); - NewPlayerAnimationController.Instance.Jump(); + if (!PlayerController.Instance.IsJumping()) + { + PlayerController.Instance.Jump(); + NewPlayerAnimationController.Instance.Jump(); + } } public override void Exit() @@ -23,14 +26,6 @@ public override void Update() { if (!PlayerController.Instance.IsJumping()) { - // if (InputManager.Instance.Move) - // { - // _stateMachine.ChangeIntention(Intention.INTENTION_MOVE); - // } - // else - // { - // _stateMachine.ChangeIntention(Intention.INTENTION_IDLE); - // } _stateMachine.ChangeState(_stateBeforeJump); } } diff --git a/l2-unity/Assets/Scripts/Networking/Unity/NetworkCharacterControllerReceive.cs b/l2-unity/Assets/Scripts/Networking/Unity/NetworkCharacterControllerReceive.cs index 82b0774ad..a0ea8c151 100644 --- a/l2-unity/Assets/Scripts/Networking/Unity/NetworkCharacterControllerReceive.cs +++ b/l2-unity/Assets/Scripts/Networking/Unity/NetworkCharacterControllerReceive.cs @@ -19,8 +19,8 @@ public class NetworkCharacterControllerReceive : MonoBehaviour public long lastUpdateTimestamp = 0; - private float _verticalVelocity = 0; - public bool _isJumping = false; + [SerializeField] private float _verticalVelocity = 0; + [SerializeField] public bool _isJumping = false; public Vector3 MoveDirection { get { return _direction; } set { _direction = value; } } void Start() @@ -52,6 +52,8 @@ private void FixedUpdate() Vector3 ajustedDirection = _direction * _speed * _moveSpeedMultiplier + Vector3.down; ajustedDirection = ApplyGravity(ajustedDirection); + ManageJump(); + _characterController.Move(ajustedDirection * Time.fixedDeltaTime); } private Vector3 ApplyGravity(Vector3 dir) @@ -64,13 +66,13 @@ private Vector3 ApplyGravity(Vector3 dir) _verticalVelocity = -1.25f; } - _isJumping = false; + // _isJumping = false; } else { _verticalVelocity -= _gravity * Time.deltaTime; - _isJumping = true; + // _isJumping = true; } dir.y = _verticalVelocity; @@ -93,31 +95,40 @@ public void UpdateMoveDirection(Vector3 position, Vector3 direction, float verti if (direction.x != 0 || direction.z != 0) { - _entity.AnimationController.Move(); - - //_networkTransformReceive.PausePositionSync(); _networkTransformReceive.SetFinalRotation(VectorUtils.CalculateMoveDirectionAngle(direction.x, direction.z)); } - else + + if (_characterController.isGrounded) { - _entity.AnimationController.Wait(); - } + if (direction.x != 0 || direction.z != 0) + _entity.AnimationController.Move(); + else + _entity.AnimationController.Wait(); - _networkTransformReceive.ResumePositionSync(); + _networkTransformReceive.ResumePositionSync(); - if (verticalVelocity >= 8.0f) - { - Jump(verticalVelocity); + if (verticalVelocity >= 4.0f) + { + _isJumping = true; + _entity.AnimationController.Jump(); + _verticalVelocity = verticalVelocity; + } } } - public void Jump(float _jumpForce) + private void ManageJump() { - if (_characterController.isGrounded) + if (_isJumping && _verticalVelocity <= 0 && _characterController.isGrounded) // jump is done { - _entity.AnimationController.Jump(); - - _verticalVelocity = _jumpForce; + _isJumping = false; + if (_direction.x != 0 || _direction.z != 0) + { + _entity.AnimationController.Move(); + } + else + { + _entity.AnimationController.Wait(); + } } } From b5079ccde5a269e8ec5568b9b2b46cc0c69192cf Mon Sep 17 00:00:00 2001 From: shnok Date: Fri, 25 Jul 2025 18:16:17 +0800 Subject: [PATCH 7/7] fixed levelup effect --- .../Data/Effects/e_u004_a/e_u004_a.prefab | 28 +++++++++++++++++-- .../Rendering/Effects/ParticleGroup.cs | 4 +-- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/l2-unity/Assets/Resources/Data/Effects/e_u004_a/e_u004_a.prefab b/l2-unity/Assets/Resources/Data/Effects/e_u004_a/e_u004_a.prefab index aff621600..4aba189d7 100644 --- a/l2-unity/Assets/Resources/Data/Effects/e_u004_a/e_u004_a.prefab +++ b/l2-unity/Assets/Resources/Data/Effects/e_u004_a/e_u004_a.prefab @@ -433,11 +433,15 @@ MonoBehaviour: - {fileID: 622236270894085245} - {fileID: 2150368556173845936} - {fileID: 1409011824050025666} + _warmup: 0 + _warmupTimeSec: 0 + _warmupTimeTickPerSec: 0 _countPerSecond: 12 _maxCount: 30 _hasCastDuration: 0 - _hasFixedDuration: 0 - _duration: 5 + _castDurationAffectsLifetime: 0 + _hasFixedDuration: 1 + _duration: 2 _instantKillAtCastEnd: 0 --- !u!1 &714123396989909627 GameObject: @@ -4858,9 +4862,13 @@ MonoBehaviour: _owner: {fileID: 8500736706040560274} _particles: - {fileID: 285968424575068918} + _warmup: 0 + _warmupTimeSec: 0 + _warmupTimeTickPerSec: 0 _countPerSecond: 140 _maxCount: 0 _hasCastDuration: 0 + _castDurationAffectsLifetime: 0 _hasFixedDuration: 0 _duration: 5 _instantKillAtCastEnd: 0 @@ -5239,9 +5247,13 @@ MonoBehaviour: _owner: {fileID: 8500736706040560274} _particles: - {fileID: 4180273773136041442} + _warmup: 0 + _warmupTimeSec: 0 + _warmupTimeTickPerSec: 0 _countPerSecond: 1000 _maxCount: 1 _hasCastDuration: 0 + _castDurationAffectsLifetime: 0 _hasFixedDuration: 0 _duration: 5 _instantKillAtCastEnd: 0 @@ -5339,9 +5351,13 @@ MonoBehaviour: - {fileID: 4342925127971592800} - {fileID: 4706291322406334608} - {fileID: 1771840116051498944} + _warmup: 0 + _warmupTimeSec: 0 + _warmupTimeTickPerSec: 0 _countPerSecond: 32 _maxCount: 24 _hasCastDuration: 0 + _castDurationAffectsLifetime: 0 _hasFixedDuration: 0 _duration: 5 _instantKillAtCastEnd: 0 @@ -5502,9 +5518,13 @@ MonoBehaviour: _owner: {fileID: 8500736706040560274} _particles: - {fileID: 1536803620613001198} + _warmup: 0 + _warmupTimeSec: 0 + _warmupTimeTickPerSec: 0 _countPerSecond: 1000 _maxCount: 1 _hasCastDuration: 0 + _castDurationAffectsLifetime: 0 _hasFixedDuration: 0 _duration: 5 _instantKillAtCastEnd: 0 @@ -5992,9 +6012,13 @@ MonoBehaviour: _owner: {fileID: 8500736706040560274} _particles: - {fileID: 2576043862087656804} + _warmup: 0 + _warmupTimeSec: 0 + _warmupTimeTickPerSec: 0 _countPerSecond: 100 _maxCount: 0 _hasCastDuration: 0 + _castDurationAffectsLifetime: 0 _hasFixedDuration: 0 _duration: 5 _instantKillAtCastEnd: 0 diff --git a/l2-unity/Assets/Scripts/Rendering/Effects/ParticleGroup.cs b/l2-unity/Assets/Scripts/Rendering/Effects/ParticleGroup.cs index 1b5a8e860..b5994c1c1 100644 --- a/l2-unity/Assets/Scripts/Rendering/Effects/ParticleGroup.cs +++ b/l2-unity/Assets/Scripts/Rendering/Effects/ParticleGroup.cs @@ -23,7 +23,7 @@ public class ParticleGroup : MonoBehaviour [Header("Loop")] [SerializeField] private bool _hasCastDuration; // does it it need a lifetime equal to the cast time [SerializeField] private bool _castDurationAffectsLifetime; // does it it need a lifetime equal to the cast time - private bool _hasFixedDuration; + [SerializeField] private bool _hasFixedDuration; [SerializeField] private float _duration = 5f; [SerializeField] private bool _instantKillAtCastEnd; private bool _stopped; @@ -82,7 +82,7 @@ public void ResetTimer(float duration) _lastEnable = Now(); // if (!_hasFixedDuration) // { - if (duration != 0) + if (duration > 0.1f) { _duration = duration; }