diff --git a/l2-unity/Assets/Resources/Data/Effects/skybox/L2Sky.mat b/l2-unity/Assets/Resources/Data/Effects/skybox/L2Sky.mat index 694222c1b..828fd28c4 100644 --- a/l2-unity/Assets/Resources/Data/Effects/skybox/L2Sky.mat +++ b/l2-unity/Assets/Resources/Data/Effects/skybox/L2Sky.mat @@ -50,8 +50,8 @@ Material: m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _SunMoon: - m_Texture: {fileID: 2800000, guid: b443728fc86061b4f8ecbe8a96c9d2ef, type: 3} - m_Scale: {x: 2.5, y: 2.5} + m_Texture: {fileID: 2800000, guid: 87bfdbc0202b0e440b4b25a3824f15db, type: 3} + m_Scale: {x: 1.5, y: 1.5} m_Offset: {x: 0.5, y: 0.5} - unity_Lightmaps: m_Texture: {fileID: 0} @@ -70,13 +70,13 @@ Material: - _Cloud_Cutoff: 4.01 - _Cloud_Distance: 0.8 - _Clouds_Far_Tiling: 0.352 - - _Clouds_Opacity: 0.12 + - _Clouds_Opacity: 2.54 - _Clouds_Tiling: 0.12 - _GradientColor1Influence: 0.6 - _GradientColor2Influence: 0.5 - _HorizonCloudsRotationSpeed: -0.1 - _Horizon_Clouds_Height: 1.44 - - _Horizon_Clouds_Opacity: 0.05 + - _Horizon_Clouds_Opacity: 1 - _Horizon_Clouds_X_Tile: 1 - _Horizon_Clouds_Y_Tile: 3.17 - _QueueControl: 0 @@ -92,12 +92,12 @@ Material: - _Stars_Y_Tile: 1 - _SunMoonSize: 0.13 m_Colors: - - _GradientColor1: {r: -0.003921569, g: -0.003921569, b: -0.007843138, a: -1} + - _GradientColor1: {r: 0, g: 0.3529412, b: 0.54901963, a: 1} - _GradientColor2: {r: 0, g: 0, b: 0, a: 1} - _GradientColor3: {r: 7.488819, g: 7.981503, b: 8.47419, a: 1} - - _MainLightForward: {r: -0.03662476, g: -0.9986578, b: -0.036624923, a: 0} - - _MainLightRight: {r: 0.7071067, g: 0, b: -0.70710695, a: 0} - - _MainLightUp: {r: 0.7061578, g: -0.05179538, b: 0.7061577, a: 0} + - _MainLightForward: {r: -0.23021153, g: -0.9455186, b: -0.23021153, a: 0} + - _MainLightRight: {r: 0.7071067, g: 0, b: -0.7071068, a: 0} + - _MainLightUp: {r: 0.6685827, g: -0.32556826, b: 0.66858256, a: 0} - _SunMoonColor: {r: 1, g: 1, b: 1, a: 0} m_BuildTextureStacks: [] m_AllowLocking: 1 diff --git a/l2-unity/Assets/Scripts/Controller/StateMachine/Intention/AttackIntention.cs b/l2-unity/Assets/Scripts/Controller/StateMachine/Intention/AttackIntention.cs index 10bc395cc..93599ac2b 100644 --- a/l2-unity/Assets/Scripts/Controller/StateMachine/Intention/AttackIntention.cs +++ b/l2-unity/Assets/Scripts/Controller/StateMachine/Intention/AttackIntention.cs @@ -37,7 +37,7 @@ public override void Enter(object arg0) // Debug.Log($"target: {target} distance: {distance} range: {attackRange}"); // Is close enough? Is player already waiting for server reply? - if (distance <= attackRange * 0.95f && !_stateMachine.WaitingForServerReply) + if (distance <= attackRange * 0.95f && !_stateMachine.WaitingForServerReply && !targetEntity.IsDead) { PlayerController.Instance.UpdateFinalAngleToLookAt(targetEntity.transform); @@ -48,9 +48,18 @@ public override void Enter(object arg0) else { // Move to target with a 5% error margin + + MoveReason reason = MoveReason.ATTACK; + + if (targetEntity.IsDead) + { + attackRange = WorldCombat.Instance.GetInteractRange(PlayerEntity.Instance, targetEntity); + reason = MoveReason.DEFAULT; + } + PathFinderController.Instance.MoveTo(targetPos, attackRange * 0.95f, () => { - _stateMachine.ChangeIntention(Intention.INTENTION_FOLLOW, MoveReason.ATTACK); + _stateMachine.ChangeIntention(Intention.INTENTION_FOLLOW, reason); }); } } diff --git a/l2-unity/Assets/Scripts/Networking/ClientLibrary/PacketHandler/Gameserver/GameClientPacketHandler.cs b/l2-unity/Assets/Scripts/Networking/ClientLibrary/PacketHandler/Gameserver/GameClientPacketHandler.cs index ed7cda816..b1ebaadad 100644 --- a/l2-unity/Assets/Scripts/Networking/ClientLibrary/PacketHandler/Gameserver/GameClientPacketHandler.cs +++ b/l2-unity/Assets/Scripts/Networking/ClientLibrary/PacketHandler/Gameserver/GameClientPacketHandler.cs @@ -1,7 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading; -using UnityEditor.VersionControl; using UnityEngine; public class GameClientPacketHandler : ClientPacketHandler diff --git a/l2-unity/Assets/Scripts/Networking/Unity/NetworkCharacterControllerReceive.cs b/l2-unity/Assets/Scripts/Networking/Unity/NetworkCharacterControllerReceive.cs index fd9b03d9b..f0a2b3867 100644 --- a/l2-unity/Assets/Scripts/Networking/Unity/NetworkCharacterControllerReceive.cs +++ b/l2-unity/Assets/Scripts/Networking/Unity/NetworkCharacterControllerReceive.cs @@ -70,7 +70,7 @@ public void UpdateMoveDirection(Vector3 direction) // Move to destination packets public void SetDestination(Vector3 destination, float stopAtRange) { - Debug.LogWarning("Set destination: " + destination); + // Debug.LogWarning("Set destination: " + destination); if (_lastDestination == destination) { return; diff --git a/l2-unity/Assets/Scripts/UI/Game/Nameplate/Nameplate/Nameplate.cs b/l2-unity/Assets/Scripts/UI/Game/Nameplate/Nameplate/Nameplate.cs index c65ec2d51..3b254cff4 100644 --- a/l2-unity/Assets/Scripts/UI/Game/Nameplate/Nameplate/Nameplate.cs +++ b/l2-unity/Assets/Scripts/UI/Game/Nameplate/Nameplate/Nameplate.cs @@ -50,7 +50,7 @@ public void ManageColors() { if (_previousServerTitleColor != _entity.Appearance.ServerTitleColor) { - Debug.LogWarning($"Title color changed: Old:{_previousServerTitleColor} New:{_entity.Appearance.ServerTitleColor}"); + // Debug.LogWarning($"Title color changed: Old:{_previousServerTitleColor} New:{_entity.Appearance.ServerTitleColor}"); _previousServerTitleColor = _entity.Appearance.ServerTitleColor; if (_previousServerTitleColor != 0) @@ -96,7 +96,7 @@ public void ManageColors() _lastFlag = 0; _previousKarmaAmount = 0; - Debug.LogWarning($"Name color changed: Old:{_previousServerNameColor} New:{_entity.Appearance.ServerNameColor}"); + // Debug.LogWarning($"Name color changed: Old:{_previousServerNameColor} New:{_entity.Appearance.ServerNameColor}"); _previousServerNameColor = _entity.Appearance.ServerNameColor; if (_previousServerNameColor != 0)