-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from Andoryuuta/login-server-patches-2
Implement L2C_GET_LOGIN_SETTINGS_RES serializer & char creation fix
- Loading branch information
Showing
7 changed files
with
183 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
Arrowgene.Ddon.Shared/Entity/PacketStructure/L2CGetLoginSettingsRes.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using Arrowgene.Buffers; | ||
using Arrowgene.Ddon.Shared.Entity.Structure; | ||
using System.Collections.Generic; | ||
|
||
namespace Arrowgene.Ddon.Shared.Entity.PacketStructure | ||
{ | ||
public class L2CGetLoginSettingsRes | ||
{ | ||
public L2CGetLoginSettingsRes() | ||
{ | ||
LoginSetting = new CDataLoginSetting(); | ||
} | ||
|
||
public CDataLoginSetting LoginSetting; | ||
} | ||
|
||
public class L2CGetLoginSettingsResSerializer : EntitySerializer<L2CGetLoginSettingsRes> | ||
{ | ||
public override void Write(IBuffer buffer, L2CGetLoginSettingsRes obj) | ||
{ | ||
WriteEntity(buffer, obj.LoginSetting); | ||
} | ||
|
||
public override L2CGetLoginSettingsRes Read(IBuffer buffer) | ||
{ | ||
L2CGetLoginSettingsRes obj = new L2CGetLoginSettingsRes(); | ||
obj.LoginSetting = ReadEntity<CDataLoginSetting>(buffer); | ||
return obj; | ||
} | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
Arrowgene.Ddon.Shared/Entity/Structure/CDataLoginSetting.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
using Arrowgene.Buffers; | ||
using System.Collections.Generic; | ||
|
||
namespace Arrowgene.Ddon.Shared.Entity.Structure | ||
{ | ||
public class CDataLoginSetting | ||
{ | ||
public CDataLoginSetting() | ||
{ | ||
JobLevelMax = 0; | ||
ClanMemberMax = 0; | ||
EnableVisualEquip = false; | ||
FriendListMax = 0; | ||
URLInfoList = new List<CDataURLInfo>(); | ||
NoOperationTimeOutTime = 0; | ||
} | ||
|
||
public uint JobLevelMax; | ||
public uint ClanMemberMax; | ||
public byte CharacterNumMax; | ||
public bool EnableVisualEquip; | ||
public uint FriendListMax; | ||
public List<CDataURLInfo> URLInfoList; | ||
public uint NoOperationTimeOutTime; | ||
} | ||
|
||
public class CDataLoginSettingSerializer : EntitySerializer<CDataLoginSetting> | ||
{ | ||
public override void Write(IBuffer buffer, CDataLoginSetting obj) | ||
{ | ||
WriteUInt32(buffer, obj.JobLevelMax); | ||
WriteUInt32(buffer, obj.ClanMemberMax); | ||
WriteByte(buffer, obj.CharacterNumMax); | ||
WriteBool(buffer, obj.EnableVisualEquip); | ||
WriteUInt32(buffer, obj.FriendListMax); | ||
WriteEntityList(buffer, obj.URLInfoList); | ||
WriteUInt32(buffer, obj.NoOperationTimeOutTime); | ||
} | ||
|
||
public override CDataLoginSetting Read(IBuffer buffer) | ||
{ | ||
CDataLoginSetting obj = new CDataLoginSetting(); | ||
obj.JobLevelMax = ReadUInt32(buffer); | ||
obj.ClanMemberMax = ReadUInt32(buffer); | ||
obj.CharacterNumMax = ReadByte(buffer); | ||
obj.EnableVisualEquip = ReadBool(buffer); | ||
obj.FriendListMax = ReadUInt32(buffer); | ||
obj.URLInfoList = ReadEntityList<CDataURLInfo>(buffer); | ||
obj.NoOperationTimeOutTime = ReadUInt32(buffer); | ||
return obj; | ||
} | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using Arrowgene.Buffers; | ||
|
||
namespace Arrowgene.Ddon.Shared.Entity.Structure | ||
{ | ||
public class CDataURLInfo | ||
{ | ||
public CDataURLInfo() | ||
{ | ||
Type = 0; | ||
URL = ""; | ||
} | ||
|
||
public uint Type; | ||
public string URL; | ||
} | ||
|
||
public class CDataURLInfoSerializer : EntitySerializer<CDataURLInfo> | ||
{ | ||
public override void Write(IBuffer buffer, CDataURLInfo obj) | ||
{ | ||
WriteUInt32(buffer, obj.Type); | ||
WriteMtString(buffer, obj.URL); | ||
} | ||
|
||
public override CDataURLInfo Read(IBuffer buffer) | ||
{ | ||
CDataURLInfo obj = new CDataURLInfo(); | ||
obj.Type = ReadUInt32(buffer); | ||
obj.URL = ReadMtString(buffer); | ||
return obj; | ||
} | ||
} | ||
} |