Skip to content

Commit

Permalink
auto-login feature, receive inventory data from server
Browse files Browse the repository at this point in the history
  • Loading branch information
shnok committed Jul 25, 2024
1 parent e2f76c6 commit 4f145e1
Show file tree
Hide file tree
Showing 11 changed files with 228 additions and 95 deletions.
240 changes: 163 additions & 77 deletions l2-unity/Assets/Scenes/Game.unity
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 0.265
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 1678428046}
m_IndirectSpecularColor: {r: 0.009025055, g: 0.009593783, b: 0.009667485, a: 0.265}
m_IndirectSpecularColor: {r: 0.01060486, g: 0.01120213, b: 0.011241127, a: 0.265}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
Expand Down Expand Up @@ -222,6 +222,41 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!21 &256552156
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: 3001
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: []
--- !u!1 &323175237
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -359,6 +394,75 @@ Camera:
m_PrefabInstance: {fileID: 366704775}
m_PrefabAsset: {fileID: 0}
--- !u!21 &490068225
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: []
--- !u!21 &562206055
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1524,75 +1628,6 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!21 &1532671880
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: []
--- !u!1001 &1675638824
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1717,19 +1752,19 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7988497584237515198, guid: 824ee6870a432f9439e35ee4e771a1f5, type: 3}
propertyPath: m_LocalRotation.w
value: 0.7231029
value: 0.53795695
objectReference: {fileID: 0}
- target: {fileID: 7988497584237515198, guid: 824ee6870a432f9439e35ee4e771a1f5, type: 3}
propertyPath: m_LocalRotation.x
value: 0.57504404
value: 0.751103
objectReference: {fileID: 0}
- target: {fileID: 7988497584237515198, guid: 824ee6870a432f9439e35ee4e771a1f5, type: 3}
propertyPath: m_LocalRotation.y
value: 0.29951906
value: 0.22282907
objectReference: {fileID: 0}
- target: {fileID: 7988497584237515198, guid: 824ee6870a432f9439e35ee4e771a1f5, type: 3}
propertyPath: m_LocalRotation.z
value: -0.23819104
value: -0.31111708
objectReference: {fileID: 0}
- target: {fileID: 7988497584237515198, guid: 824ee6870a432f9439e35ee4e771a1f5, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
Expand Down Expand Up @@ -7674,6 +7709,10 @@ PrefabInstance:
propertyPath: _tabs.Array.data[1]._tabName
value: Gear
objectReference: {fileID: 0}
- target: {fileID: 1268749513020361338, guid: d5d2a11e1a77f80418a7d8b1ec2abd25, type: 3}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1956824699379132072, guid: d5d2a11e1a77f80418a7d8b1ec2abd25, type: 3}
propertyPath: m_LocalPosition.x
value: 0
Expand Down Expand Up @@ -7714,11 +7753,20 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2482552831895554876, guid: d5d2a11e1a77f80418a7d8b1ec2abd25, type: 3}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3547752662103543225, guid: d5d2a11e1a77f80418a7d8b1ec2abd25, type: 3}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8310766140472177322, guid: d5d2a11e1a77f80418a7d8b1ec2abd25, type: 3}
propertyPath: m_Name
value: UI
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedComponents:
- {fileID: 948048435015809040, guid: d5d2a11e1a77f80418a7d8b1ec2abd25, type: 3}
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents:
Expand All @@ -7728,6 +7776,9 @@ PrefabInstance:
- targetCorrespondingSourceObject: {fileID: 8310766140472177322, guid: d5d2a11e1a77f80418a7d8b1ec2abd25, type: 3}
insertIndex: -1
addedObject: {fileID: 4500056793450147205}
- targetCorrespondingSourceObject: {fileID: 8310766140472177322, guid: d5d2a11e1a77f80418a7d8b1ec2abd25, type: 3}
insertIndex: -1
addedObject: {fileID: 4500056793450147206}
m_SourcePrefab: {fileID: 100100000, guid: d5d2a11e1a77f80418a7d8b1ec2abd25, type: 3}
--- !u!1 &4500056793450147203 stripped
GameObject:
Expand All @@ -7741,7 +7792,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4500056793450147203}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e2dbbe000884fe1448323a8be82a381d, type: 3}
m_Name:
Expand All @@ -7753,11 +7804,46 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4500056793450147203}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 877ebcd6cfbd7384dbe5f502ceb4317a, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &4500056793450147206
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4500056793450147203}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4ecd1a0a0495f174fb7ecee096229e89, type: 3}
m_Name:
m_EditorClassIdentifier:
_minimized: 0
_expanded: 0
_gearTab:
_tabName: Tab
_selectedSlot: -1
_tabs:
- _tabName: All
_selectedSlot: -1
_filteredCategories:
- _tabName: Equip
_selectedSlot: -1
_filteredCategories: 000102
- _tabName: Supplies
_selectedSlot: -1
_filteredCategories: 0504
- _tabName: Quest
_selectedSlot: -1
_filteredCategories: 03
_usedSlots: 0
_slotCount: 0
_currentWeight: 0
_maximumWeight: 0
_adenaCount: 0
--- !u!4 &4580226862848979865 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7310219005897297132, guid: 3f35c752b3e58c0449c6b8d097fe80a0, type: 3}
Expand Down
8 changes: 4 additions & 4 deletions l2-unity/Assets/Scenes/Menu.unity
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2bc6245aea0342f4f8c76719bfe12012, type: 3}
--- !u!21 &487790708
--- !u!21 &678400564
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -443,7 +443,7 @@ MonoBehaviour:
_entityMask:
serializedVersion: 2
m_Bits: 64
--- !u!21 &968757019
--- !u!21 &870669955
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -708,7 +708,7 @@ PrefabInstance:
- target: {fileID: 14083907825353274, guid: 8742fc349ac4f354d9cfb98ebb79a0e3, type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 487790708}
objectReference: {fileID: 678400564}
- target: {fileID: 2134954596300280144, guid: 8742fc349ac4f354d9cfb98ebb79a0e3, type: 3}
propertyPath: m_Name
value: Height Fog Global
Expand Down Expand Up @@ -834,7 +834,7 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8742fc349ac4f354d9cfb98ebb79a0e3, type: 3}
--- !u!21 &1237903006
--- !u!21 &1417980671
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
Expand Down
5 changes: 5 additions & 0 deletions l2-unity/Assets/Scripts/Game/Manager/GameManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ public class GameManager : MonoBehaviour {
[SerializeField] private int _protocolVersion = 1;
[SerializeField] private GameState _gameState = GameState.LOGIN_SCREEN;
private bool _gameReady = false;
[SerializeField] private bool _autoLogin = false;

public bool AutoLogin { get { return _autoLogin; } }

public GameState GameState {
get { return _gameState; }
Expand Down Expand Up @@ -48,6 +51,8 @@ private void LoadTables() {
ModelTable.Instance.Initialize();
LogongrpTable.Instance.Initialize();
SystemMessageTable.Instance.Initialize();
IconManager.Instance.Initialize();
IconManager.Instance.CacheIcons();
}

public void LogIn() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public class InventoryItemListPacket : AbstractItemPacket
public ItemInstance[] Items { get { return _items; } }

public InventoryItemListPacket(byte[] d) : base(d){
Parse();
}

public override void Parse() {
Expand All @@ -16,6 +17,9 @@ public override void Parse() {
bool openWindow = ReadB() == 1;
int itemListSize = ReadI();

Debug.Log("OpenWindow? " + openWindow);
Debug.Log("itemListSize " + itemListSize);

_items = new ItemInstance[itemListSize];
for(int i = 0; i < itemListSize; i++) {
_items[i] = ReadItem();
Expand Down
Loading

0 comments on commit 4f145e1

Please sign in to comment.