Skip to content

Commit

Permalink
nameplates code cleanup, show player weapons/exp/karma in character s…
Browse files Browse the repository at this point in the history
…elect
  • Loading branch information
shnok committed Nov 9, 2024
1 parent 0c81fb3 commit 275139d
Show file tree
Hide file tree
Showing 15 changed files with 824 additions and 1,015 deletions.
2 changes: 1 addition & 1 deletion l2-unity-todo.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
TODO (priority from top to bottom)

show player weapons/exp/karma in character select
sync monstergrp (HP amount) with interlude
handle AOE hits
show karma and pvp/pk kills in stats
Expand All @@ -20,6 +19,7 @@ Nature renderer for deco layer

DONE

show player weapons/exp/karma in character select
dont use skillbar shortcuts when chat is opened
make arrows stick to entity when hit
make other entities shoot arrows too
Expand Down
187 changes: 112 additions & 75 deletions l2-unity/Assets/Resources/Scenes/Menu.unity
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,76 @@ MonoBehaviour:
m_EditorClassIdentifier:
_lastLoop: 489.67508
_loopDelay: 1
--- !u!21 &379825383
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Override
m_Shader: {fileID: 4800000, guid: a3a3bc8785681554d9558e2ea68f100e, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs: []
m_Ints: []
m_Floats:
- _AdvancedCat: 1
- _Banner: 1
- _DirectionalCat: 1
- _DirectionalFalloff: 2
- _DirectionalIntensity: 1
- _FarDistanceHeight: 0
- _FarDistanceOffset: 0
- _FogAxisMode: 1
- _FogCameraMode: 0
- _FogCat: 1
- _FogColorDuo: 1
- _FogDistanceEnd: 100
- _FogDistanceFalloff: 2
- _FogDistanceStart: 0
- _FogHeightEnd: 100
- _FogHeightFalloff: 2
- _FogHeightStart: 0
- _FogIntensity: 1
- _FogLayersMode: 0
- _IsHeightFogPreset: 1
- _IsHeightFogShader: 1
- _JitterIntensity: 1
- _NoiseCat: 1
- _NoiseDistanceEnd: 50
- _NoiseIntensity: 1
- _NoiseMax: 1
- _NoiseMin: 0
- _NoiseModeBlend: 1
- _NoiseScale: 30
- _SkyboxCat: 1
- _SkyboxFogBottom: 0
- _SkyboxFogFalloff: 1
- _SkyboxFogFill: 1
- _SkyboxFogHeight: 1
- _SkyboxFogIntensity: 1
- _SkyboxFogOffset: 0
m_Colors:
- _DirectionalColor: {r: 1, g: 0.7793103, b: 0.5, a: 1}
- _DirectionalDir: {r: 0, g: 0, b: 0, a: 0}
- _FogAxisOption: {r: 0, g: 0, b: 0, a: 0}
- _FogColorEnd: {r: 0.8862745, g: 1.443137, b: 2, a: 1}
- _FogColorStart: {r: 0.4411765, g: 0.722515, b: 1, a: 1}
- _NoiseSpeed: {r: 0.5, g: 0, b: 0.5, a: 0}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!1 &413261805
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -299,7 +369,7 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2bc6245aea0342f4f8c76719bfe12012, type: 3}
--- !u!21 &625025727
--- !u!21 &672348517
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -562,11 +632,12 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 6e37d17f53de5a542b5bbbead6a3d7a8, type: 3}
m_Name:
m_EditorClassIdentifier:
_camera: {fileID: 0}
_nameplateViewDistance: 50
_entityMask:
nameplateViewDistance: 50
entityMask:
serializedVersion: 2
m_Bits: 64
updatesPerSecond: 60
nameplateHeightMultiplier: 1.95
--- !u!1001 &1000493895
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -863,7 +934,7 @@ PrefabInstance:
- target: {fileID: 14083907825353274, guid: 8742fc349ac4f354d9cfb98ebb79a0e3, type: 3}
propertyPath: 'm_Materials.Array.data[0]'
value:
objectReference: {fileID: 625025727}
objectReference: {fileID: 672348517}
- target: {fileID: 2134954596300280144, guid: 8742fc349ac4f354d9cfb98ebb79a0e3, type: 3}
propertyPath: m_Name
value: Height Fog Global
Expand Down Expand Up @@ -1113,6 +1184,42 @@ Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 40cbb7f72ae50ed418b61cee6e547202, type: 3}
m_PrefabInstance: {fileID: 1371198110}
m_PrefabAsset: {fileID: 0}
--- !u!21 &1425413320
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Height Fog Global
m_Shader: {fileID: 4800000, guid: 3a7ef1b66bafb7a448a880ef76d2e6e6, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs: []
m_Ints: []
m_Floats:
- _AdvancedCat: 1
- _Banner: 1
- _DirectionalCat: 1
- _FogCat: 1
- _HeightFogGlobal: 1
- _IsHeightFogShader: 1
- _NoiseCat: 1
- _SkyboxCat: 1
m_Colors: []
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!1 &1469263346
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1327,76 +1434,6 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!21 &1768149233
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Override
m_Shader: {fileID: 4800000, guid: a3a3bc8785681554d9558e2ea68f100e, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs: []
m_Ints: []
m_Floats:
- _AdvancedCat: 1
- _Banner: 1
- _DirectionalCat: 1
- _DirectionalFalloff: 2
- _DirectionalIntensity: 1
- _FarDistanceHeight: 0
- _FarDistanceOffset: 0
- _FogAxisMode: 1
- _FogCameraMode: 0
- _FogCat: 1
- _FogColorDuo: 1
- _FogDistanceEnd: 100
- _FogDistanceFalloff: 2
- _FogDistanceStart: 0
- _FogHeightEnd: 100
- _FogHeightFalloff: 2
- _FogHeightStart: 0
- _FogIntensity: 1
- _FogLayersMode: 0
- _IsHeightFogPreset: 1
- _IsHeightFogShader: 1
- _JitterIntensity: 1
- _NoiseCat: 1
- _NoiseDistanceEnd: 50
- _NoiseIntensity: 1
- _NoiseMax: 1
- _NoiseMin: 0
- _NoiseModeBlend: 1
- _NoiseScale: 30
- _SkyboxCat: 1
- _SkyboxFogBottom: 0
- _SkyboxFogFalloff: 1
- _SkyboxFogFill: 1
- _SkyboxFogHeight: 1
- _SkyboxFogIntensity: 1
- _SkyboxFogOffset: 0
m_Colors:
- _DirectionalColor: {r: 1, g: 0.7793103, b: 0.5, a: 1}
- _DirectionalDir: {r: 0, g: 0, b: 0, a: 0}
- _FogAxisOption: {r: 0, g: 0, b: 0, a: 0}
- _FogColorEnd: {r: 0.8862745, g: 1.443137, b: 2, a: 1}
- _FogColorStart: {r: 0.4411765, g: 0.722515, b: 1, a: 1}
- _NoiseSpeed: {r: 0.5, g: 0, b: 0.5, a: 0}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!1001 &417367616115605176
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down
4 changes: 2 additions & 2 deletions l2-unity/Assets/Scripts/Camera/LoginCameraManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ public void SwitchCamera(string camera)

if (camera == "CharSelect")
{
LobbyNameplatesManager.Instance.Camera = obj;
NameplatesManagerLobby.Instance.SetActiveCamera(obj);
CharacterSelector.Instance.Camera = obj;
}
else
{
LobbyNameplatesManager.Instance.Camera = null;
NameplatesManagerLobby.Instance.SetActiveCamera(null);
CharacterSelector.Instance.Camera = null;
}

Expand Down
2 changes: 2 additions & 0 deletions l2-unity/Assets/Scripts/Game/Character/CharacterSelector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ public void SpawnCharacterSlot(int id)
referenceHolder.Entity.Appearance = _characters[id].PlayerAppearance;
referenceHolder.Entity.Stats = _characters[id].PlayerStats;
referenceHolder.Entity.Status = _characters[id].PlayerStatus;
referenceHolder.Entity.Identity.Name = _characters[id].Name;
referenceHolder.Entity.Identity.Id = id;

if (animController == null)
{
Expand Down
2 changes: 1 addition & 1 deletion l2-unity/Assets/Scripts/Game/Manager/World/World.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void Start()

void UpdateMasks()
{
NameplatesManager.Instance.SetMask(_entityMask);
NameplatesManagerGame.Instance.SetMask(_entityMask);
Geodata.Instance.ObstacleMask = _obstacleMask;
ClickManager.Instance.SetMasks(_entityClickAreaMask, _clickThroughMask);
CameraController.Instance.SetMask(_obstacleMask);
Expand Down
2 changes: 1 addition & 1 deletion l2-unity/Assets/Scripts/Game/Manager/World/WorldCombat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ public void SetupGauge(SetupGaugePacket.GaugeColor color, int time, int maxTime)
{
_eventProcessor.QueueEvent(() =>
{
NameplatesManager.Instance.StartCasting(color, maxTime != time ? maxTime - time : time);
NameplatesManagerGame.Instance.StartCasting(color, maxTime != time ? maxTime - time : time);
});
}

Expand Down
2 changes: 1 addition & 1 deletion l2-unity/Assets/Scripts/Game/Manager/World/WorldSpawner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public Task RemoveObject(int id)

Debug.LogWarning("Gameobject destroyed : " + e.gameObject.name);

NameplatesManager.Instance.RemoveNameplate(id);
NameplatesManagerGame.Instance.RemoveNameplate(id);

Destroy(e.gameObject);
});
Expand Down
Loading

0 comments on commit 275139d

Please sign in to comment.