diff --git a/Arrowgene.Ddon.Database/Arrowgene.Ddon.Database.csproj b/Arrowgene.Ddon.Database/Arrowgene.Ddon.Database.csproj
index b901ec7d8..94253866f 100644
--- a/Arrowgene.Ddon.Database/Arrowgene.Ddon.Database.csproj
+++ b/Arrowgene.Ddon.Database/Arrowgene.Ddon.Database.csproj
@@ -33,91 +33,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
-
diff --git a/Arrowgene.Ddon.Database/DdonDatabaseBuilder.cs b/Arrowgene.Ddon.Database/DdonDatabaseBuilder.cs
index 2d9973550..16a7dbede 100644
--- a/Arrowgene.Ddon.Database/DdonDatabaseBuilder.cs
+++ b/Arrowgene.Ddon.Database/DdonDatabaseBuilder.cs
@@ -14,7 +14,7 @@ public static class DdonDatabaseBuilder
private static readonly ILogger Logger = LogProvider.Logger(typeof(DdonDatabaseBuilder));
private const string DefaultSchemaFile = "Script/schema_sqlite.sql";
- public const uint Version = 19;
+ public const uint Version = 20;
public static IDatabase Build(DatabaseSetting settings)
{
diff --git a/Arrowgene.Ddon.Database/Files/Database/Script/clan_migration.sql b/Arrowgene.Ddon.Database/Files/Database/Script/clan_migration.sql
new file mode 100644
index 000000000..607b792b4
--- /dev/null
+++ b/Arrowgene.Ddon.Database/Files/Database/Script/clan_migration.sql
@@ -0,0 +1,38 @@
+CREATE TABLE "ddon_clan_param"
+(
+ "clan_id" INTEGER PRIMARY KEY NOT NULL,
+ "clan_level" INTEGER NOT NULL,
+ "member_num" INTEGER NOT NULL,
+ "master_id" INTEGER NOT NULL,
+ "system_restriction" BOOLEAN NOT NULL,
+ "is_base_release" BOOLEAN NOT NULL,
+ "can_base_release" BOOLEAN NOT NULL,
+ "total_clan_point" INTEGER NOT NULL,
+ "money_clan_point" INTEGER NOT NULL,
+ "name" TEXT NOT NULL,
+ "short_name" TEXT NOT NULL,
+ "emblem_mark_type" SMALLINT NOT NULL,
+ "emblem_base_type" SMALLINT NOT NULL,
+ "emblem_main_color" SMALLINT NOT NULL,
+ "emblem_sub_color" SMALLINT NOT NULL,
+ "motto" INTEGER NOT NULL,
+ "active_days" INTEGER NOT NULL,
+ "active_time" INTEGER NOT NULL,
+ "characteristic" INTEGER NOT NULL,
+ "is_publish" BOOLEAN NOT NULL,
+ "comment" TEXT NOT NULL,
+ "board_message" TEXT NOT NULL,
+ "created" DATETIME NOT NULL
+);
+
+CREATE TABLE "ddon_clan_membership"
+(
+ "character_id" INTEGER NOT NULL,
+ "clan_id" INTEGER NOT NULL,
+ "rank" INTEGER NOT NULL,
+ "permission" INTEGER NOT NULL,
+ "created" DATETIME NOT NULL,
+ CONSTRAINT "pk_ddon_clan_membership" PRIMARY KEY ("character_id", "clan_id"),
+ CONSTRAINT "fk_ddon_clan_membership_character_id" FOREIGN KEY ("character_id") REFERENCES "ddon_character" ("character_id") ON DELETE CASCADE,
+ CONSTRAINT "fk_ddon_clan_membership_clan_id" FOREIGN KEY ("clan_id") REFERENCES "ddon_clan_param" ("clan_id") ON DELETE CASCADE
+);
diff --git a/Arrowgene.Ddon.Database/Files/Database/Script/schema_sqlite.sql b/Arrowgene.Ddon.Database/Files/Database/Script/schema_sqlite.sql
index a46d6e7af..96aa092af 100644
--- a/Arrowgene.Ddon.Database/Files/Database/Script/schema_sqlite.sql
+++ b/Arrowgene.Ddon.Database/Files/Database/Script/schema_sqlite.sql
@@ -713,3 +713,42 @@ CREATE TABLE IF NOT EXISTS "ddon_bbm_content_treasure"
"amount" INTEGER NOT NULL,
CONSTRAINT "fk_ddon_bbm_content_treasure_character_id" FOREIGN KEY ("character_id") REFERENCES "ddon_character" ("character_id") ON DELETE CASCADE
);
+
+CREATE TABLE IF NOT EXISTS "ddon_clan_param"
+(
+ "clan_id" INTEGER PRIMARY KEY NOT NULL,
+ "clan_level" INTEGER NOT NULL,
+ "member_num" INTEGER NOT NULL,
+ "master_id" INTEGER NOT NULL,
+ "system_restriction" BOOLEAN NOT NULL,
+ "is_base_release" BOOLEAN NOT NULL,
+ "can_base_release" BOOLEAN NOT NULL,
+ "total_clan_point" INTEGER NOT NULL,
+ "money_clan_point" INTEGER NOT NULL,
+ "name" TEXT NOT NULL,
+ "short_name" TEXT NOT NULL,
+ "emblem_mark_type" SMALLINT NOT NULL,
+ "emblem_base_type" SMALLINT NOT NULL,
+ "emblem_main_color" SMALLINT NOT NULL,
+ "emblem_sub_color" SMALLINT NOT NULL,
+ "motto" INTEGER NOT NULL,
+ "active_days" INTEGER NOT NULL,
+ "active_time" INTEGER NOT NULL,
+ "characteristic" INTEGER NOT NULL,
+ "is_publish" BOOLEAN NOT NULL,
+ "comment" TEXT NOT NULL,
+ "board_message" TEXT NOT NULL,
+ "created" DATETIME NOT NULL
+);
+
+CREATE TABLE IF NOT EXISTS "ddon_clan_membership"
+(
+ "character_id" INTEGER NOT NULL,
+ "clan_id" INTEGER NOT NULL,
+ "rank" INTEGER NOT NULL,
+ "permission" INTEGER NOT NULL,
+ "created" DATETIME NOT NULL,
+ CONSTRAINT "pk_ddon_clan_membership" PRIMARY KEY ("character_id", "clan_id"),
+ CONSTRAINT "fk_ddon_clan_membership_character_id" FOREIGN KEY ("character_id") REFERENCES "ddon_character" ("character_id") ON DELETE CASCADE,
+ CONSTRAINT "fk_ddon_clan_membership_clan_id" FOREIGN KEY ("clan_id") REFERENCES "ddon_clan_param" ("clan_id") ON DELETE CASCADE
+);
diff --git a/Arrowgene.Ddon.Database/IDatabase.cs b/Arrowgene.Ddon.Database/IDatabase.cs
index 26f6bf95d..95f60d98f 100644
--- a/Arrowgene.Ddon.Database/IDatabase.cs
+++ b/Arrowgene.Ddon.Database/IDatabase.cs
@@ -9,6 +9,7 @@
using Arrowgene.Ddon.Shared.Entity.Structure;
using Arrowgene.Ddon.Shared.Model;
using Arrowgene.Ddon.Shared.Model.BattleContent;
+using Arrowgene.Ddon.Shared.Model.Clan;
using Arrowgene.Ddon.Shared.Model.Quest;
namespace Arrowgene.Ddon.Database
@@ -521,7 +522,7 @@ uint crestAmount
// Bitterblack Maze Progress
bool InsertBBMCharacterId(uint characterId, uint bbmCharacterId);
- uint SelectBBMCharacterId(uint characterId);
+ uint SelectBBMCharacterId(uint characterId, DbConnection? connectionIn = null);
uint SelectBBMNormalCharacterId(uint bbmCharacterId);
bool InsertBBMProgress(
uint characterId,
@@ -568,5 +569,18 @@ bool InsertBBMContentTreasure(
bool UpdateBBMContentTreasure(uint characterId, uint contentId, uint amount);
bool RemoveBBMContentTreasure(uint characterId);
List SelectBBMContentTreasure(uint characterId);
+
+ // Clan
+ bool CreateClan(CDataClanParam clanParam);
+ bool DeleteClan(CDataClanParam clan, DbConnection? connectionIn = null);
+ uint SelectClanMembershipByCharacterId(uint characterId, DbConnection? connectionIn = null);
+ ClanName GetClanNameByClanId(uint clanId, DbConnection? connectionIn = null);
+ CDataClanParam SelectClan(uint clanId, DbConnection? connectionIn = null);
+ bool UpdateClan(CDataClanParam clan, DbConnection? connectionIn = null);
+ bool InsertClanMember(CDataClanMemberInfo memberInfo, uint clanId, DbConnection? connectionIn = null);
+ bool DeleteClanMember(uint characterId, uint clanId, DbConnection? connectionIn = null);
+ List GetClanMemberList(uint clanId, DbConnection? connectionIn = null);
+ CDataClanMemberInfo GetClanMember(uint characterId, DbConnection? connectionIn = null);
+ bool UpdateClanMember(CDataClanMemberInfo memberInfo, uint clanId, DbConnection? connectionIn = null);
}
}
diff --git a/Arrowgene.Ddon.Database/Sql/Core/DdonSqlDbBitterBlackMazeCharacterMap.cs b/Arrowgene.Ddon.Database/Sql/Core/DdonSqlDbBitterBlackMazeCharacterMap.cs
index e520c99f5..909be09fe 100644
--- a/Arrowgene.Ddon.Database/Sql/Core/DdonSqlDbBitterBlackMazeCharacterMap.cs
+++ b/Arrowgene.Ddon.Database/Sql/Core/DdonSqlDbBitterBlackMazeCharacterMap.cs
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.ComponentModel.Design;
using System.Data.Common;
+using System.Security.Claims;
using System.Xml;
using Arrowgene.Ddon.Shared.Model;
using Arrowgene.Ddon.Shared.Model.BattleContent;
@@ -38,16 +39,12 @@ public bool InsertBBMCharacterId(TCon connection, uint characterId, uint bbmChar
}) == 1;
}
- public uint SelectBBMCharacterId(uint characterId)
- {
- using TCon connection = OpenNewConnection();
- return SelectBBMCharacterId(connection, characterId);
- }
-
- public uint SelectBBMCharacterId(TCon connection, uint characterId)
+ public uint SelectBBMCharacterId(uint characterId, DbConnection? connectionIn = null)
{
uint bbmCharacterId = 0;
- ExecuteInTransaction(connection =>
+ bool isTransaction = connectionIn is not null;
+ TCon connection = (TCon)(connectionIn ?? OpenNewConnection());
+ try
{
ExecuteReader(connection, SqlSelectBBMCharacterId, command =>
{
@@ -59,8 +56,11 @@ public uint SelectBBMCharacterId(TCon connection, uint characterId)
bbmCharacterId = GetUInt32(reader, "bbm_character_id");
}
});
- });
-
+ }
+ finally
+ {
+ if (!isTransaction) connection.Dispose();
+ }
return bbmCharacterId;
}
diff --git a/Arrowgene.Ddon.Database/Sql/Core/DdonSqlDbCharacter.cs b/Arrowgene.Ddon.Database/Sql/Core/DdonSqlDbCharacter.cs
index cf2b5abec..351996c05 100644
--- a/Arrowgene.Ddon.Database/Sql/Core/DdonSqlDbCharacter.cs
+++ b/Arrowgene.Ddon.Database/Sql/Core/DdonSqlDbCharacter.cs
@@ -236,15 +236,33 @@ public List SelectAllCharacters(DbConnection conn)
public bool DeleteCharacter(uint characterId)
{
- uint bbmCharacterId = SelectBBMCharacterId(characterId);
- if (bbmCharacterId > 0)
+ int rowsAffected = 0;
+ ExecuteInTransaction(conn =>
{
- ExecuteNonQuery(SqlDeleteCharacter,
- command => { AddParameter(command, "@character_id", bbmCharacterId); });
- }
+ var clan = SelectClanMembershipByCharacterId(characterId, conn);
+ if (clan != 0)
+ {
+ if (GetClanMemberList(clan, conn).Count == 1)
+ {
+ DeleteClan(clan, conn);
+ }
+ else
+ {
+ IncrementClanMemberNum(-1, clan, conn);
+ }
+ }
+
+ uint bbmCharacterId = SelectBBMCharacterId(characterId, conn);
+ if (bbmCharacterId > 0)
+ {
+ ExecuteNonQuery(conn, SqlDeleteCharacter,
+ command => { AddParameter(command, "@character_id", bbmCharacterId); });
+ }
- int rowsAffected = ExecuteNonQuery(SqlDeleteCharacter,
- command => { AddParameter(command, "@character_id", characterId); });
+ rowsAffected = ExecuteNonQuery(conn, SqlDeleteCharacter,
+ command => { AddParameter(command, "@character_id", characterId); });
+ });
+
return rowsAffected > NoRowsAffected;
}
@@ -396,6 +414,10 @@ private void QueryCharacterData(TCon conn, Character character)
}
});
}
+
+ //Clan membership
+ character.ClanId = SelectClanMembershipByCharacterId(character.CharacterId, conn);
+ character.ClanName = GetClanNameByClanId(character.ClanId);
}
public bool UpdateMyPawnSlot(uint characterId, uint num)
diff --git a/Arrowgene.Ddon.Database/Sql/Core/DdonSqlDbClan.cs b/Arrowgene.Ddon.Database/Sql/Core/DdonSqlDbClan.cs
new file mode 100644
index 000000000..6f9e6f04d
--- /dev/null
+++ b/Arrowgene.Ddon.Database/Sql/Core/DdonSqlDbClan.cs
@@ -0,0 +1,479 @@
+using Arrowgene.Ddon.Database.Model;
+using Arrowgene.Ddon.Shared.Entity.Structure;
+using Arrowgene.Ddon.Shared.Model;
+using Arrowgene.Ddon.Shared.Model.Clan;
+using System.Collections.Generic;
+using System.Data.Common;
+using System.Diagnostics.Metrics;
+using System.Reflection;
+using System.Security.Claims;
+
+namespace Arrowgene.Ddon.Database.Sql.Core
+{
+ public abstract partial class DdonSqlDb : SqlDb
+ where TCon : DbConnection
+ where TCom : DbCommand
+ where TReader : DbDataReader
+ {
+ private static readonly string[] ClanParamFields = new string[] {
+ "clan_level", "member_num", "master_id", "system_restriction",
+ "is_base_release", "can_base_release", "total_clan_point", "money_clan_point",
+ "name", "short_name", "emblem_mark_type", "emblem_base_type", "emblem_main_color",
+ "emblem_sub_color", "motto", "active_days", "active_time", "characteristic",
+ "is_publish", "comment", "board_message", "created"
+ };
+
+ private static readonly string[] ClanMembershipFields = new string[]
+ {
+ "character_id", "clan_id", "rank", "permission", "created"
+ };
+
+ private readonly string SqlInsertClanParam = $"INSERT INTO \"ddon_clan_param\" ({BuildQueryField(ClanParamFields)}) VALUES ({BuildQueryInsert(ClanParamFields)});";
+ private readonly string SqlDeleteClanParam = "DELETE FROM \"ddon_clan_param\" WHERE \"clan_id\"=@clan_id;";
+ private readonly string SqlUpdateClanParam = $"UPDATE \"ddon_clan_param\" SET {BuildQueryUpdate(ClanParamFields)} WHERE \"clan_id\" = @clan_id;";
+ private readonly string SqlSelectClanParamById = $"SELECT \"clan_id\", {BuildQueryField(ClanParamFields)} FROM \"ddon_clan_param\" WHERE \"clan_id\"=@clan_id;";
+
+ private readonly string SqlIncrementClanMemberNum = "UPDATE \"ddon_clan_param\" SET \"member_num\" = \"member_num\" + @value WHERE \"clan_id\" = @clan_id;";
+
+ private readonly string SqlInsertClanMembership = $"INSERT INTO \"ddon_clan_membership\" ({BuildQueryField(ClanMembershipFields)}) VALUES ({BuildQueryInsert(ClanMembershipFields)});";
+ private readonly string SqlSelectClanMembershipByCharacterId = $"SELECT {BuildQueryField(ClanMembershipFields)} FROM \"ddon_clan_membership\" WHERE \"character_id\"=@character_id;";
+ private readonly string SqlDeleteClanMembership = "DELETE FROM \"ddon_clan_membership\" WHERE \"character_id\"=@character_id;";
+ private readonly string SqlUpdateClanMembership = $"UPDATE \"ddon_clan_membership\" SET {BuildQueryUpdate(ClanMembershipFields)} WHERE \"character_id\" = @character_id";
+
+ private readonly string SqlCDataClanMemberInfoList = "SELECT \"ddon_clan_membership\".\"character_id\", \"ddon_clan_membership\".\"rank\", \"ddon_clan_membership\".\"permission\", \"ddon_clan_membership\".\"created\", \"ddon_character\".\"first_name\", \"ddon_character\".\"last_name\", \"ddon_character_job_data\".\"job\", \"ddon_character_job_data\".\"lv\" "
+ + "FROM \"ddon_clan_membership\" "
+ + "INNER JOIN \"ddon_character\" ON \"ddon_clan_membership\".\"character_id\" = \"ddon_character\".\"character_id\" AND \"ddon_clan_membership\".\"clan_id\" = @clan_id "
+ + "INNER JOIN \"ddon_character_common\" ON \"ddon_character_common\".\"character_common_id\" = \"ddon_character\".\"character_common_id\" "
+ + "INNER JOIN \"ddon_character_job_data\" ON \"ddon_character_job_data\".\"character_common_id\" = \"ddon_character\".\"character_common_id\" AND \"ddon_character_job_data\".\"job\" = \"ddon_character_common\".\"job\";";
+ private readonly string SqlCDataClanMemberInfo = "SELECT \"ddon_clan_membership\".\"character_id\", \"ddon_clan_membership\".\"rank\", \"ddon_clan_membership\".\"permission\", \"ddon_clan_membership\".\"created\", \"ddon_character\".\"first_name\", \"ddon_character\".\"last_name\", \"ddon_character_job_data\".\"job\", \"ddon_character_job_data\".\"lv\" "
+ + "FROM \"ddon_clan_membership\" "
+ + "INNER JOIN \"ddon_character\" ON \"ddon_clan_membership\".\"character_id\" = \"ddon_character\".\"character_id\" AND \"ddon_character\".\"character_id\" = @character_id "
+ + "INNER JOIN \"ddon_character_common\" ON \"ddon_character_common\".\"character_common_id\" = \"ddon_character\".\"character_common_id\" "
+ + "INNER JOIN \"ddon_character_job_data\" ON \"ddon_character_job_data\".\"character_common_id\" = \"ddon_character\".\"character_common_id\" AND \"ddon_character_job_data\".\"job\" = \"ddon_character_common\".\"job\";";
+
+ public bool CreateClan(CDataClanParam clanParam)
+ {
+ return ExecuteInTransaction(conn =>
+ {
+ ExecuteNonQuery(
+ conn,
+ SqlInsertClanParam,
+ command =>
+ {
+ AddParameter(command, clanParam);
+ },
+ out long clanId
+ );
+ clanParam.ClanServerParam.ID = (uint)clanId;
+
+ InsertClanMember(clanParam.ClanServerParam.MasterInfo, clanParam.ClanServerParam.ID, conn);
+ });
+ }
+
+ public CDataClanParam SelectClan(uint clanId, DbConnection? connectionIn = null)
+ {
+ CDataClanParam clanParam = new CDataClanParam();
+
+ bool isTransaction = connectionIn is not null;
+ TCon connection = (TCon)(connectionIn ?? OpenNewConnection());
+ try
+ {
+ uint masterId = 0;
+ ExecuteReader(
+ connection,
+ SqlSelectClanParamById,
+ command =>
+ {
+ AddParameter(command, "@clan_id", clanId);
+ },
+ reader =>
+ {
+ if (reader.Read())
+ {
+ clanParam.ClanUserParam = ReadClanUserParam(reader);
+ clanParam.ClanServerParam = ReadClanServerParam(reader);
+ masterId = GetUInt32(reader, "master_id");
+ }
+ });
+
+ if (masterId > 0)
+ {
+ var master = GetClanMember(masterId);
+ if (master is not null)
+ {
+ clanParam.ClanServerParam.MasterInfo = master;
+ }
+ else
+ {
+ ExecuteNonQuery(
+ connection,
+ "UPDATE \"ddon_clan_param\" SET \"master_id\" = 0 WHERE \"clan_id\" = @clan_id;",
+ command =>
+ {
+ AddParameter(command, "@clan_id", clanId);
+ }
+ );
+ }
+ }
+ }
+ finally
+ {
+ if (!isTransaction) connection.Dispose();
+ }
+ return clanParam;
+ }
+
+ public uint SelectClanMembershipByCharacterId(uint characterId, DbConnection? connectionIn = null)
+ {
+ uint clanId = 0;
+ bool isTransaction = connectionIn is not null;
+ TCon connection = (TCon)(connectionIn ?? OpenNewConnection());
+ try
+ {
+ ExecuteReader(connection,
+ SqlSelectClanMembershipByCharacterId,
+ command => { AddParameter(command, "@character_id", characterId); },
+ reader =>
+ {
+ if (reader.Read())
+ {
+ clanId = GetUInt32(reader, "clan_id");
+ }
+ });
+ }
+ finally
+ {
+ if (!isTransaction) connection.Dispose();
+ }
+
+ return clanId;
+ }
+
+ public List GetClanMemberList(uint clanId, DbConnection? connectionIn = null)
+ {
+ List list = new();
+ bool isTransaction = connectionIn is not null;
+ TCon connection = (TCon)(connectionIn ?? OpenNewConnection());
+ try
+ {
+ ExecuteReader(connection,
+ SqlCDataClanMemberInfoList,
+ command => { AddParameter(command, "@clan_id", clanId); },
+ reader =>
+ {
+ while (reader.Read())
+ {
+ CDataClanMemberInfo info = ReadClanMemberInfo(reader);
+ list.Add(info);
+ }
+ });
+ }
+ finally
+ {
+ if (!isTransaction) connection.Dispose();
+ }
+
+ return list;
+ }
+
+ public CDataClanMemberInfo GetClanMember(uint characterId, DbConnection? connectionIn = null)
+ {
+ CDataClanMemberInfo member = null;
+ bool isTransaction = connectionIn is not null;
+ TCon connection = (TCon)(connectionIn ?? OpenNewConnection());
+ try
+ {
+ ExecuteReader(connection,
+ SqlCDataClanMemberInfo,
+ command => { AddParameter(command, "@character_id", characterId); },
+ reader =>
+ {
+ if (reader.Read())
+ {
+ member = ReadClanMemberInfo(reader);
+ }
+ });
+ }
+ finally
+ {
+ if (!isTransaction) connection.Dispose();
+ }
+
+ return member;
+ }
+
+ public ClanName GetClanNameByClanId(uint clanId, DbConnection? connectionIn = null)
+ {
+ ClanName clanName = new ClanName();
+
+ bool isTransaction = connectionIn is not null;
+ TCon connection = (TCon)(connectionIn ?? OpenNewConnection());
+ try
+ {
+ ExecuteReader(
+ connection,
+ SqlSelectClanParamById,
+ command =>
+ {
+ AddParameter(command, "@clan_id", clanId);
+ },
+ reader =>
+ {
+ if (reader.Read())
+ {
+ clanName.Name = GetString(reader, "name");
+ clanName.ShortName = GetString(reader, "short_name");
+ }
+ });
+ }
+ finally
+ {
+ if (!isTransaction) connection.Dispose();
+ }
+
+ return clanName;
+ }
+
+ public bool UpdateClan(CDataClanParam clan, DbConnection? connectionIn = null)
+ {
+ bool isTransaction = connectionIn is not null;
+ TCon connection = (TCon)(connectionIn ?? OpenNewConnection());
+ try
+ {
+ return ExecuteNonQuery(connection, SqlUpdateClanParam, command =>
+ {
+ AddParameter(command, clan);
+ }) == 1;
+ }
+ finally
+ {
+ if (!isTransaction) connection.Dispose();
+ }
+ }
+
+ public bool DeleteClan(uint clanId, DbConnection? connectionIn = null)
+ {
+ bool isTransaction = connectionIn is not null;
+ TCon connection = (TCon)(connectionIn ?? OpenNewConnection());
+ try
+ {
+ return ExecuteNonQuery(connection, SqlDeleteClanParam, command =>
+ {
+ AddParameter(command, "@clan_id", clanId);
+ }) == 1;
+ }
+ finally
+ {
+ if (!isTransaction) connection.Dispose();
+ }
+ }
+
+ public bool DeleteClan(CDataClanParam clan, DbConnection? connectionIn = null)
+ {
+ bool isTransaction = connectionIn is not null;
+ TCon connection = (TCon)(connectionIn ?? OpenNewConnection());
+ try
+ {
+ return ExecuteNonQuery(connection, SqlDeleteClanParam, command =>
+ {
+ AddParameter(command, clan);
+ }) == 1;
+ }
+ finally
+ {
+ if (!isTransaction) connection.Dispose();
+ }
+ }
+
+ public bool IncrementClanMemberNum(int value, uint clanId, DbConnection? connectionIn = null)
+ {
+ bool isTransaction = connectionIn is not null;
+ TCon connection = (TCon)(connectionIn ?? OpenNewConnection());
+ try
+ {
+ return ExecuteNonQuery(connection, SqlIncrementClanMemberNum, command =>
+ {
+ AddParameter(command, "@clan_id", clanId);
+ AddParameter(command, "@value", value);
+ }) == 1;
+ }
+ finally
+ {
+ if (!isTransaction) connection.Dispose();
+ }
+ }
+
+ public bool InsertClanMember(CDataClanMemberInfo memberInfo, uint clanId, DbConnection? connectionIn = null)
+ {
+ bool isTransaction = connectionIn is not null;
+ TCon connection = (TCon)(connectionIn ?? OpenNewConnection());
+ try
+ {
+ var memberInsert = ExecuteNonQuery(
+ connection,
+ SqlInsertClanMembership,
+ command =>
+ {
+ AddParameter(command, memberInfo, clanId);
+ }
+ ) == 1;
+ var incrementNum = IncrementClanMemberNum(1, clanId, connection);
+ return memberInsert && incrementNum;
+ }
+ finally
+ {
+ if (!isTransaction) connection.Dispose();
+ }
+ }
+
+ public bool DeleteClanMember(uint characterId, uint clanId, DbConnection? connectionIn = null)
+ {
+ bool isTransaction = connectionIn is not null;
+ TCon connection = (TCon)(connectionIn ?? OpenNewConnection());
+ try
+ {
+ var memberInsert = ExecuteNonQuery(
+ connection,
+ SqlDeleteClanMembership,
+ command =>
+ {
+ AddParameter(command, "@character_id", characterId);
+ }
+ ) == 1;
+ var incrementNum = IncrementClanMemberNum(-1, clanId, connection);
+ return memberInsert && incrementNum;
+ }
+ finally
+ {
+ if (!isTransaction) connection.Dispose();
+ }
+ }
+
+ public bool UpdateClanMember(CDataClanMemberInfo memberInfo, uint clanId, DbConnection? connectionIn = null)
+ {
+ bool isTransaction = connectionIn is not null;
+ TCon connection = (TCon)(connectionIn ?? OpenNewConnection());
+ try
+ {
+ var memberUpdate = ExecuteNonQuery(
+ connection,
+ SqlUpdateClanMembership,
+ command =>
+ {
+ AddParameter(command, memberInfo, clanId);
+ }
+ ) == 1;
+ return memberUpdate;
+ }
+ finally
+ {
+ if (!isTransaction) connection.Dispose();
+ }
+ }
+
+ private void AddParameter(TCom command, CDataClanParam clanParam)
+ {
+
+ AddParameter(command, "@clan_id", clanParam.ClanServerParam.ID);
+ AddParameter(command, "@clan_level", clanParam.ClanServerParam.Lv);
+ AddParameter(command, "@member_num", clanParam.ClanServerParam.MemberNum);
+ AddParameter(command, "@master_id", clanParam.ClanServerParam.MasterInfo.CharacterListElement.CommunityCharacterBaseInfo.CharacterId);
+ AddParameter(command, "@system_restriction", clanParam.ClanServerParam.IsSystemRestriction);
+ AddParameter(command, "@is_base_release", clanParam.ClanServerParam.IsClanBaseRelease);
+ AddParameter(command, "@can_base_release", clanParam.ClanServerParam.CanClanBaseRelease);
+ AddParameter(command, "@total_clan_point", clanParam.ClanServerParam.TotalClanPoint);
+ AddParameter(command, "@money_clan_point", clanParam.ClanServerParam.MoneyClanPoint);
+ AddParameter(command, "@name", clanParam.ClanUserParam.Name);
+ AddParameter(command, "@short_name", clanParam.ClanUserParam.ShortName);
+ AddParameter(command, "@emblem_mark_type", clanParam.ClanUserParam.EmblemMarkType);
+ AddParameter(command, "@emblem_base_type", clanParam.ClanUserParam.EmblemBaseType);
+ AddParameter(command, "@emblem_main_color", clanParam.ClanUserParam.EmblemBaseMainColor);
+ AddParameter(command, "@emblem_sub_color", clanParam.ClanUserParam.EmblemBaseSubColor);
+ AddParameter(command, "@motto", clanParam.ClanUserParam.Motto);
+ AddParameter(command, "@active_days", clanParam.ClanUserParam.ActiveDays);
+ AddParameter(command, "@active_time", clanParam.ClanUserParam.ActiveTime);
+ AddParameter(command, "@characteristic", clanParam.ClanUserParam.Characteristic);
+ AddParameter(command, "@is_publish", clanParam.ClanUserParam.IsPublish);
+ AddParameter(command, "@comment", clanParam.ClanUserParam.Comment);
+ AddParameter(command, "@board_message", clanParam.ClanUserParam.BoardMessage);
+ AddParameter(command, "@created", clanParam.ClanUserParam.Created.UtcDateTime);
+ }
+
+ private void AddParameter(TCom command, CDataClanMemberInfo memberInfo, uint clanId)
+ {
+ AddParameter(command, "@character_id", memberInfo.CharacterListElement.CommunityCharacterBaseInfo.CharacterId);
+ AddParameter(command, "@clan_id", clanId);
+ AddParameter(command, "@rank", (uint)memberInfo.Rank);
+ AddParameter(command, "@permission", memberInfo.Permission);
+ AddParameter(command, "@created", memberInfo.Created.UtcDateTime);
+ }
+
+ private CDataClanUserParam ReadClanUserParam(TReader reader)
+ {
+ CDataClanUserParam userParam = new()
+ {
+ Name = GetString(reader, "name"),
+ ShortName = GetString(reader, "short_name"),
+ EmblemMarkType = GetByte(reader, "emblem_mark_type"),
+ EmblemBaseType = GetByte(reader, "emblem_base_type"),
+ EmblemBaseMainColor = GetByte(reader, "emblem_main_color"),
+ EmblemBaseSubColor = GetByte(reader, "emblem_sub_color"),
+ Motto = GetUInt32(reader, "motto"),
+ ActiveDays = GetUInt32(reader, "active_days"),
+ ActiveTime = GetUInt32(reader, "active_time"),
+ Characteristic = GetUInt32(reader, "characteristic"),
+ IsPublish = GetBoolean(reader, "is_publish"),
+ Comment = GetString(reader, "comment"),
+ BoardMessage = GetString(reader, "board_message"),
+ Created = GetDateTime(reader, "created")
+ };
+
+ return userParam;
+ }
+
+ private CDataClanServerParam ReadClanServerParam(TReader reader)
+ {
+ CDataClanServerParam serverParam = new()
+ {
+ ID = GetUInt32(reader, "clan_id"),
+ Lv = GetUInt16(reader, "clan_level"),
+ MemberNum = GetUInt16(reader, "member_num"),
+ IsSystemRestriction = GetBoolean(reader, "system_restriction"),
+ IsClanBaseRelease = GetBoolean(reader, "is_base_release"),
+ CanClanBaseRelease = GetBoolean(reader, "can_base_release"),
+ TotalClanPoint = GetUInt32(reader, "total_clan_point"),
+ MoneyClanPoint = GetUInt32(reader, "money_clan_point"),
+ };
+
+ return serverParam;
+ }
+
+ private CDataClanMemberInfo ReadClanMemberInfo(TReader reader)
+ {
+ var member = new CDataClanMemberInfo()
+ {
+ Rank = (ClanMemberRank)GetUInt32(reader, "rank"),
+ Permission = GetUInt32(reader, "permission"),
+ Created = GetDateTime(reader, "created"),
+ CharacterListElement = new()
+ {
+ CommunityCharacterBaseInfo = new()
+ {
+ CharacterId = GetUInt32(reader, "character_id"),
+ CharacterName = new()
+ {
+ FirstName = GetString(reader, "first_name"),
+ LastName = GetString(reader, "last_name")
+ }
+ },
+ CurrentJobBaseInfo = new()
+ {
+ Job = (JobId)GetByte(reader, "job"),
+ Level = GetByte(reader, "lv")
+ }
+ }
+ };
+ return member;
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Database/Sql/Core/Migration/00000020_ClanMigration.cs b/Arrowgene.Ddon.Database/Sql/Core/Migration/00000020_ClanMigration.cs
new file mode 100644
index 000000000..5d8290cd1
--- /dev/null
+++ b/Arrowgene.Ddon.Database/Sql/Core/Migration/00000020_ClanMigration.cs
@@ -0,0 +1,24 @@
+using System.Data.Common;
+
+namespace Arrowgene.Ddon.Database.Sql.Core.Migration
+{
+ public class ClanMigration : IMigrationStrategy
+ {
+ public uint From => 19;
+ public uint To => 20;
+
+ private readonly DatabaseSetting DatabaseSetting;
+
+ public ClanMigration(DatabaseSetting databaseSetting)
+ {
+ DatabaseSetting = databaseSetting;
+ }
+
+ public bool Migrate(IDatabase db, DbConnection conn)
+ {
+ string adaptedSchema = DdonDatabaseBuilder.GetAdaptedSchema(DatabaseSetting, "Script/clan_migration.sql");
+ db.Execute(conn, adaptedSchema);
+ return true;
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.GameServer/Characters/ClanManager.cs b/Arrowgene.Ddon.GameServer/Characters/ClanManager.cs
new file mode 100644
index 000000000..40230353e
--- /dev/null
+++ b/Arrowgene.Ddon.GameServer/Characters/ClanManager.cs
@@ -0,0 +1,483 @@
+using Arrowgene.Ddon.Server;
+using Arrowgene.Ddon.Shared.Entity;
+using Arrowgene.Ddon.Shared.Entity.PacketStructure;
+using Arrowgene.Ddon.Shared.Entity.Structure;
+using Arrowgene.Ddon.Shared.Model;
+using Arrowgene.Ddon.Shared.Model.Clan;
+using Arrowgene.Logging;
+using System;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.Linq;
+
+namespace Arrowgene.Ddon.GameServer.Characters
+{
+ public class PeriodicSync
+ {
+ private DateTime LastSync = DateTime.MinValue;
+ private TimeSpan SyncPeriod;
+ internal T Obj { get; set; }
+
+ public PeriodicSync(T obj, TimeSpan syncPeriod)
+ {
+ Obj = obj;
+ SyncPeriod = syncPeriod;
+ }
+
+ public bool NeedSync
+ {
+ get
+ {
+ return (DateTime.UtcNow - LastSync) > SyncPeriod;
+ }
+ }
+
+ public void Sync()
+ {
+ LastSync = DateTime.UtcNow;
+ }
+ }
+
+ public class ClanManager
+ {
+ private static readonly ServerLogger Logger = LogProvider.Logger(typeof(ClanManager));
+
+ private readonly DdonGameServer Server;
+
+ private readonly Dictionary> ClanParams;
+ private readonly Dictionary> ClanMembers;
+
+ private static readonly CDataClanParam NULL_CLAN = new();
+ private static readonly uint ALL_PERMISSIONS = 6143;
+ private static readonly uint SUBMASTER_ALL_PERMISSIONS = 5002;
+
+ private static readonly TimeSpan CLAN_CACHE_TIME = TimeSpan.FromHours(1);
+
+ public static readonly uint[] TOTAL_CP_FOR_ADV = new uint[] {
+ /********/ 0,
+ /* Lv 1 */ 500,
+ /* Lv 2 */ 2000,
+ /* Lv 3 */ 5000,
+ /* Lv 4 */ 9000,
+ /* Lv 5 */ 16000,
+ /* Lv 6 */ 26000,
+ /* Lv 7 */ 40000,
+ /* Lv 8 */ 58000,
+ /* Lv 9 */ 80000,
+ /* Lv 10 */ 106000,
+ /* Lv 11 */ 136000,
+ /* Lv 12 */ 170000,
+ /* Lv 13 */ 208000,
+ /* Lv 14 */ 250000,
+ /* Lv 15 */ 350000,
+ /* Lv 16 */ 450000, // Missing from wiki, guessed this value.
+ /* Lv 17 */ 600000,
+ /* Lv 18 */ 800000,
+ /* Lv 19 */ 1000000,
+ };
+
+ public ClanManager(DdonGameServer server)
+ {
+ Server = server;
+ ClanParams = new();
+ }
+
+ private void AddClan(CDataClanParam clan)
+ {
+ var syncObject = new PeriodicSync(clan, CLAN_CACHE_TIME);
+ ClanParams.Add(clan.ClanServerParam.ID, syncObject);
+ }
+
+ public CDataClanParam GetClan(uint id)
+ {
+ if (id == 0) return NULL_CLAN;
+
+ lock(ClanParams)
+ {
+ if (!ClanParams.ContainsKey(id))
+ {
+ var clan = Server.Database.SelectClan(id);
+
+ if (clan.ClanServerParam.ID == 0)
+ {
+ // Failed to fetch the clan, because it doesn't exist.
+ // Throw an exception?
+ throw new ResponseErrorException(ErrorCode.ERROR_CODE_CLAN_NOT_EXIST);
+ }
+
+ clan.ClanServerParam.NextClanPoint = TOTAL_CP_FOR_ADV[clan.ClanServerParam.Lv];
+ AddClan(clan);
+
+ return clan;
+ }
+ else
+ {
+ if (ClanParams[id].NeedSync)
+ {
+ ClanParams[id].Obj = Server.Database.SelectClan(id);
+ ClanParams[id].Sync();
+ }
+ return ClanParams[id].Obj;
+ }
+ }
+ }
+
+ public CDataClanParam CreateClan(GameClient client, CDataClanUserParam createParam)
+ {
+ var serverParam = new CDataClanServerParam()
+ {
+ Lv = 1,
+ MemberNum = 0,
+ MasterInfo = NewMaster(client.Character),
+ IsSystemRestriction = false,
+ IsClanBaseRelease = false,
+ CanClanBaseRelease = false,
+ TotalClanPoint = 0,
+ MoneyClanPoint = 0,
+ NextClanPoint = TOTAL_CP_FOR_ADV[1],
+ };
+
+ CDataClanParam newClan = new CDataClanParam()
+ {
+ ClanServerParam = serverParam,
+ ClanUserParam = createParam
+ };
+ newClan.ClanUserParam.Created = DateTimeOffset.UtcNow;
+ Server.Database.CreateClan(newClan);
+
+ AddClan(newClan);
+ newClan.ClanServerParam.MemberNum = 1;
+
+ client.Character.ClanId = newClan.ClanServerParam.ID;
+ client.Character.ClanName.Name = newClan.ClanUserParam.Name;
+ client.Character.ClanName.ShortName = newClan.ClanUserParam.ShortName;
+
+ var joinNtc = new S2CClanClanJoinNtc()
+ {
+ CharacterId = client.Character.CharacterId
+ };
+
+ var selfNtc = new S2CClanClanJoinSelfNtc()
+ {
+ ClanParam = newClan,
+ SelfInfo = serverParam.MasterInfo,
+ MemberList = new List() { serverParam.MasterInfo }
+ };
+ client.Send(selfNtc);
+
+ foreach (GameClient otherClient in Server.ClientLookup.GetAll())
+ {
+ otherClient.Send(joinNtc);
+ }
+
+ return newClan;
+ }
+
+ public void UpdateClan(GameClient client, CDataClanUserParam updateParam)
+ {
+ if (client.Character.ClanId != 0)
+ {
+ var clan = Server.ClanManager.GetClan(client.Character.ClanId);
+ updateParam.Name = clan.ClanUserParam.Name;
+ updateParam.Created = clan.ClanUserParam.Created;
+ clan.ClanUserParam = updateParam;
+ Server.Database.UpdateClan(clan);
+
+ foreach (var otherClient in Server.ClientLookup.GetAll())
+ {
+ if (otherClient.Character != null && otherClient.Character.ClanId == client.Character.ClanId)
+ {
+ otherClient.Send(new S2CClanClanUpdateNtc());
+ }
+ }
+ }
+ }
+
+ public void JoinClan(uint characterId, uint clanId)
+ {
+ var client = Server.ClientLookup.GetClientByCharacterId(characterId);
+ var character = client.Character;
+ var clan = GetClan(clanId);
+
+ clan.ClanServerParam.MemberNum++;
+
+ var memberInfo = NewMember(character);
+ Server.Database.InsertClanMember(memberInfo, clanId);
+
+ character.ClanId = clanId;
+ character.ClanName.Name = clan.ClanUserParam.Name;
+ character.ClanName.ShortName = clan.ClanUserParam.Name;
+
+ S2CClanClanJoinNtc joinNtc = new()
+ {
+ CharacterId = characterId,
+ };
+
+ S2CClanClanJoinSelfNtc selfntc = new()
+ {
+ ClanParam = clan,
+ SelfInfo = memberInfo,
+ MemberList = MemberList(clanId)
+ };
+
+ S2CClanClanJoinMemberNtc memberNtc = new()
+ {
+ ClanId = clanId,
+ MemberInfo = memberInfo,
+ };
+
+ client.Send(selfntc);
+ foreach (var otherClient in Server.ClientLookup.GetAll())
+ {
+ otherClient.Send(joinNtc);
+ }
+ SendToClan(clanId, memberNtc);
+ }
+
+ public void LeaveClan(uint characterId, uint clanId)
+ {
+ if (clanId == 0) return;
+
+ var clan = GetClan(clanId);
+ clan.ClanServerParam.MemberNum--;
+
+ bool leaderLeaving = false;
+ bool clanDelete = false;
+ if (clan.ClanServerParam.MasterInfo.CharacterListElement.CommunityCharacterBaseInfo.CharacterId == characterId)
+ {
+ clan.ClanServerParam.MasterInfo = new CDataClanMemberInfo();
+ leaderLeaving = true;
+ }
+ if (clan.ClanServerParam.MemberNum == 0)
+ {
+ clanDelete = true;
+ }
+
+ var memberList = MemberList(clanId);
+ var character = memberList.Where(x => x.CharacterListElement.CommunityCharacterBaseInfo.CharacterId == characterId).FirstOrDefault();
+
+ Server.Database.ExecuteInTransaction(conn =>
+ {
+ Server.Database.DeleteClanMember(characterId, clanId, conn);
+ if (leaderLeaving && !clanDelete)
+ {
+ Server.Database.UpdateClan(clan, conn);
+ }
+ else if (clanDelete)
+ {
+ Server.Database.DeleteClan(clan, conn);
+ ClanParams.Remove(clanId);
+ }
+ });
+
+ Character characterLookup = Server.ClientLookup.GetClientByCharacterId(characterId)?.Character;
+ if (character != null)
+ {
+ character.CharacterListElement.CommunityCharacterBaseInfo.ClanName = string.Empty;
+ characterLookup.ClanId = 0;
+ characterLookup.ClanName.Name = string.Empty;
+ characterLookup.ClanName.ShortName = string.Empty;
+ }
+
+ var ntc = new S2CClanClanLeaveMemberNtc()
+ {
+ ClanId = 0,
+ CharacterListElement = character.CharacterListElement
+ };
+ foreach (var client in Server.ClientLookup.GetAll())
+ {
+ client.Send(ntc);
+ }
+ }
+
+ public void SetMemberRank(uint characterId, uint clanId, uint rank, uint permission)
+ {
+ if (clanId == 0) return;
+
+ CDataClanMemberInfo memberInfo = null;
+
+ Server.Database.ExecuteInTransaction(conn =>
+ {
+ memberInfo = Server.Database.GetClanMember(characterId, conn);
+
+ memberInfo.Rank = (ClanMemberRank)rank;
+ memberInfo.Permission = permission;
+
+ Server.Database.UpdateClanMember(memberInfo, clanId, conn);
+ });
+
+ SendToClan(clanId, new S2CClanClanSetMemberRankNtc()
+ {
+ ClanId = clanId,
+ CharacterId = characterId,
+ Rank = rank,
+ Permission = permission
+ });
+ }
+
+ public void NegotiateMaster(uint characterId, uint clanId)
+ {
+ if (clanId == 0) return;
+
+ uint prevMasterId = MasterId(clanId);
+
+ CDataClanMemberInfo memberInfo = null;
+ CDataClanMemberInfo prevMasterInfo = null;
+
+ Server.Database.ExecuteInTransaction(conn =>
+ {
+ memberInfo = Server.Database.GetClanMember(characterId, conn);
+ memberInfo.Rank = ClanMemberRank.Master;
+ memberInfo.Permission = ALL_PERMISSIONS;
+ Server.Database.UpdateClanMember(memberInfo, clanId, conn);
+
+ if (prevMasterId != 0)
+ {
+ prevMasterInfo = Server.Database.GetClanMember(prevMasterId, conn);
+ prevMasterInfo.Rank = ClanMemberRank.SubMaster;
+ prevMasterInfo.Permission = SUBMASTER_ALL_PERMISSIONS;
+ Server.Database.UpdateClanMember(prevMasterInfo, clanId, conn);
+ }
+ });
+
+ var masterNtc = new S2CClanClanNegotiateMasterNtc()
+ {
+ ClanId = clanId,
+ MemberInfo = memberInfo
+ };
+
+ SendToClan(clanId, masterNtc);
+
+ if (prevMasterInfo != null)
+ {
+ SendToClan(clanId, new S2CClanClanSetMemberRankNtc()
+ {
+ ClanId = clanId,
+ CharacterId = prevMasterId,
+ Rank = (uint)prevMasterInfo.Rank,
+ Permission = prevMasterInfo.Permission
+ });
+ }
+ }
+
+ public uint MasterId(uint clanId)
+ {
+ if (clanId == 0) return 0;
+
+ return GetClan(clanId).ClanServerParam.MasterInfo.CharacterListElement.CommunityCharacterBaseInfo.CharacterId;
+ }
+
+ public static CDataClanMemberInfo NewMaster(Character character)
+ {
+ var info = new CDataClanMemberInfo()
+ {
+ Rank = ClanMemberRank.Master,
+ Created = DateTimeOffset.UtcNow,
+ LastLoginTime = DateTimeOffset.UtcNow,
+ Permission = ALL_PERMISSIONS
+ };
+ GameStructure.CDataCharacterListElement(info.CharacterListElement, character);
+ return info;
+ }
+
+ public static CDataClanMemberInfo NewMember(Character character)
+ {
+ var info = new CDataClanMemberInfo()
+ {
+ Rank = ClanMemberRank.Member,
+ Created = DateTimeOffset.UtcNow,
+ LastLoginTime = DateTimeOffset.UtcNow,
+ Permission = 0
+ };
+ GameStructure.CDataCharacterListElement(info.CharacterListElement, character);
+ return info;
+ }
+
+ public List MemberList(uint clanId)
+ {
+ if (clanId == 0) return new();
+
+ var clan = GetClan(clanId);
+ var memberList = Server.Database.GetClanMemberList(clanId);
+ foreach (var member in memberList)
+ {
+ CDataCommunityCharacterBaseInfo memberInfo = member.CharacterListElement.CommunityCharacterBaseInfo;
+ memberInfo.ClanName = clan.ClanUserParam.ShortName;
+ GameClient lookup = Server.ClientLookup.GetClientByCharacterId(memberInfo.CharacterId);
+ if (lookup != null)
+ {
+ member.CharacterListElement.OnlineStatus = lookup.Character.OnlineStatus;
+ }
+ else
+ {
+ member.CharacterListElement.OnlineStatus = OnlineStatus.Offline;
+ }
+ }
+ return memberList;
+ }
+
+ public (uint ClanId, CDataClanMemberInfo MemberInfo) ClanMembership(uint characterId)
+ {
+ uint clanId = 0;
+ CDataClanMemberInfo membership = new();
+ Server.Database.ExecuteInTransaction(conn =>
+ {
+ clanId = Server.Database.SelectClanMembershipByCharacterId(characterId, conn);
+ membership = Server.Database.GetClanMember(characterId, conn);
+ });
+
+ return (clanId, membership);
+ }
+
+ public void SendToClan(uint clanId, T packet)
+ where T : class, IPacketStructure, new()
+ {
+ if (clanId == 0) return;
+
+ foreach (var client in Server.ClientLookup.GetAll())
+ {
+ if (client.Character != null && client.Character.ClanId == clanId)
+ {
+ client.Send(packet);
+ }
+ }
+ }
+
+ // Will likely need this later for clan searching.
+ private static bool ClanSearchBitmaskMatch(uint searchParam, uint match)
+ {
+ return (searchParam & match) == match;
+ }
+
+ private static int BitsToInt(IEnumerable bitindices)
+ {
+ return bitindices.Aggregate(0, (sum, val) => sum + (1 << val));
+ }
+
+ private static List IntToBits(int input)
+ {
+ var res = new List();
+ BitVector32 bitvector = new BitVector32(input);
+ for (int i = 0; i < 32; i++)
+ {
+ if (bitvector[i])
+ {
+ res.Add(i);
+ }
+ }
+ return res;
+ }
+
+ private static int EnumsToInt(IEnumerable enums)
+ where T : struct, IConvertible
+ {
+ return BitsToInt(enums.Select(x => (int)(object)x));
+ }
+
+ private static List IntToEnums(int input)
+ where T : struct, IConvertible
+ {
+ return IntToBits(input).Select(x => (T)(object)x).ToList();
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.GameServer/Characters/ContactListManager.cs b/Arrowgene.Ddon.GameServer/Characters/ContactListManager.cs
index b53f5deb4..3bcc84720 100644
--- a/Arrowgene.Ddon.GameServer/Characters/ContactListManager.cs
+++ b/Arrowgene.Ddon.GameServer/Characters/ContactListManager.cs
@@ -1,4 +1,4 @@
-using Arrowgene.Ddon.Database;
+using Arrowgene.Ddon.Database;
using Arrowgene.Ddon.Shared.Entity.Structure;
using Arrowgene.Ddon.Shared.Model;
@@ -22,55 +22,53 @@ public static Character getCharWithOnlineStatus(DdonGameServer server, IDatabase
return otherCharacter;
}
-
+
public static CDataCommunityCharacterBaseInfo CharacterToCommunityInfo(Character c)
+ {
+ return new CDataCommunityCharacterBaseInfo()
+ {
+ CharacterId = c.CharacterId,
+ CharacterName = new CDataCharacterName()
{
- return new CDataCommunityCharacterBaseInfo()
- {
- CharacterId = c.CharacterId,
- CharacterName = new CDataCharacterName()
- {
- FirstName = c.FirstName,
- LastName = c.LastName
- },
- ClanName = "", // TODO get clan
-
- };
-
- }
-
- public static CDataCharacterListElement CharacterToListEml(Character c)
+ FirstName = c.FirstName,
+ LastName = c.LastName
+ },
+ ClanName = c.ClanName.ShortName,
+ };
+ }
+
+ public static CDataCharacterListElement CharacterToListEml(Character c)
+ {
+ return new CDataCharacterListElement()
+ {
+ OnlineStatus = c.OnlineStatus,
+ MatchingProfile = c.MatchingProfile.Comment,
+ ServerId = c.Server.Id,
+ CommunityCharacterBaseInfo = CharacterToCommunityInfo(c),
+ CurrentJobBaseInfo = new CDataJobBaseInfo()
{
- return new CDataCharacterListElement()
- {
- OnlineStatus = c.OnlineStatus,
- MatchingProfile = c.MatchingProfile.Comment,
- ServerId = c.Server.Id,
- CommunityCharacterBaseInfo = CharacterToCommunityInfo(c),
- CurrentJobBaseInfo = new CDataJobBaseInfo()
- {
- Job = c.Job,
- Level = (byte)(c.ActiveCharacterJobData?.Lv ?? 0x00)
- },
- EntryJobBaseInfo = new CDataJobBaseInfo()
- {
- // TODO
- Job = c.MatchingProfile.EntryJob,
- Level = (byte)(c.MatchingProfile?.EntryJobLevel ?? 0x00)
- }
- };
- }
-
- public static CDataFriendInfo CharacterToFriend(Character c, uint unFriendNo, bool isFavorite)
+ Job = c.Job,
+ Level = (byte)(c.ActiveCharacterJobData?.Lv ?? 0x00)
+ },
+ EntryJobBaseInfo = new CDataJobBaseInfo()
{
- return new CDataFriendInfo()
- {
- IsFavorite = isFavorite,
- PendingStatus = 0x00, // TODO
- UnFriendNo = unFriendNo,
- CharacterListElement = CharacterToListEml(c)
-
- };
-
+ // TODO
+ Job = c.MatchingProfile.EntryJob,
+ Level = (byte)(c.MatchingProfile?.EntryJobLevel ?? 0x00)
}
+ };
+ }
+
+ public static CDataFriendInfo CharacterToFriend(Character c, uint unFriendNo, bool isFavorite)
+ {
+ return new CDataFriendInfo()
+ {
+ IsFavorite = isFavorite,
+ PendingStatus = 0x00, // TODO
+ UnFriendNo = unFriendNo,
+ CharacterListElement = CharacterToListEml(c)
+
+ };
+
+ }
}
diff --git a/Arrowgene.Ddon.GameServer/Characters/HubManager.cs b/Arrowgene.Ddon.GameServer/Characters/HubManager.cs
index f05db05c9..c092e5952 100644
--- a/Arrowgene.Ddon.GameServer/Characters/HubManager.cs
+++ b/Arrowgene.Ddon.GameServer/Characters/HubManager.cs
@@ -157,6 +157,11 @@ private static void GatherContexts(IEnumerable sourceClients, GameCl
public void LeaveAllHubs(GameClient client)
{
+ foreach (var otherClient in Server.ClientLookup.GetAll())
+ {
+ otherClient.Character?.LastSeenLobby.Remove(client.Character.CharacterId);
+ }
+
foreach (var hub in HubMembers.Values)
{
hub.Remove(client);
diff --git a/Arrowgene.Ddon.GameServer/Chat/ChatManager.cs b/Arrowgene.Ddon.GameServer/Chat/ChatManager.cs
index 1696564e8..a8ddf3507 100644
--- a/Arrowgene.Ddon.GameServer/Chat/ChatManager.cs
+++ b/Arrowgene.Ddon.GameServer/Chat/ChatManager.cs
@@ -1,4 +1,5 @@
using System.Collections.Generic;
+using System.Linq;
using Arrowgene.Ddon.GameServer.Party;
using Arrowgene.Ddon.Server;
using Arrowgene.Ddon.Shared.Entity.PacketStructure;
@@ -132,7 +133,7 @@ private void Deliver(GameClient client, ChatResponse response)
{
case LobbyChatMsgType.Say:
case LobbyChatMsgType.Shout:
- response.Recipients.AddRange(_server.Clients);
+ response.Recipients.AddRange(_server.ClientLookup.GetAll());
break;
case LobbyChatMsgType.Party:
PartyGroup party = client.Party;
@@ -141,6 +142,19 @@ private void Deliver(GameClient client, ChatResponse response)
response.Recipients.AddRange(party.Clients);
}
break;
+ case LobbyChatMsgType.Clan:
+ if (client.Character.ClanId == 0)
+ {
+ response.Recipients.Add(client);
+ break;
+ }
+
+ response.Recipients.AddRange(_server.ClientLookup.GetAll().Where(
+ x => x.Character != null
+ && client.Character != null
+ && x.Character.ClanId == client.Character.ClanId)
+ );
+ break;
default:
response.Recipients.Add(client);
break;
diff --git a/Arrowgene.Ddon.GameServer/DdonGameServer.cs b/Arrowgene.Ddon.GameServer/DdonGameServer.cs
index 8941990d1..397c0698f 100644
--- a/Arrowgene.Ddon.GameServer/DdonGameServer.cs
+++ b/Arrowgene.Ddon.GameServer/DdonGameServer.cs
@@ -80,6 +80,7 @@ public DdonGameServer(GameServerSetting setting, IDatabase database, AssetReposi
BonusDungeonManager = new BonusDungeonManager(this);
BoardManager = new BoardManager(this);
TimerManager = new TimerManager(this);
+ ClanManager = new ClanManager(this);
// Orb Management is slightly complex and requires updating fields across multiple systems
OrbUnlockManager = new OrbUnlockManager(database, WalletManager, JobManager, CharacterManager);
@@ -114,6 +115,7 @@ public DdonGameServer(GameServerSetting setting, IDatabase database, AssetReposi
public BonusDungeonManager BonusDungeonManager { get; }
public BoardManager BoardManager { get; }
public TimerManager TimerManager { get; }
+ public ClanManager ClanManager { get; }
public ChatLogHandler ChatLogHandler { get; }
@@ -268,6 +270,23 @@ private void LoadPacketHandler()
AddHandler(new ClanClanSettingUpdateHandler(this));
AddHandler(new ClanGetFurnitureHandler(this));
AddHandler(new ClanSetFurnitureHandler(this));
+ AddHandler(new ClanClanScoutEntryGetMyHandler(this));
+ AddHandler(new ClanClanScoutEntryGetInvitedListHandler(this));
+ AddHandler(new ClanClanGetMyJoinRequestListHandler(this));
+ AddHandler(new ClanClanCreateHandler(this));
+ AddHandler(new ClanClanGetHistoryHandler(this));
+ AddHandler(new ClanClanUpdateHandler(this));
+ AddHandler(new ClanClanInviteHandler(this));
+ AddHandler(new ClanClanGetInfoHandler(this));
+ AddHandler(new ClanClanInviteAcceptHandler(this));
+ AddHandler(new ClanClanScoutEntrySearchHandler(this));
+ AddHandler(new ClanClanSearchHandler(this));
+ AddHandler(new ClanClanScoutEntryGetInviteListHandler(this));
+ AddHandler(new ClanClanLeaveMemberHandler(this));
+ AddHandler(new ClanClanGetMemberListHandler(this));
+ AddHandler(new ClanClanExpelMemberHandler(this));
+ AddHandler(new ClanClanSetMemberRankHandler(this));
+ AddHandler(new ClanClanNegotiateMasterHandler(this));
AddHandler(new ClientChallengeHandler(this));
diff --git a/Arrowgene.Ddon.GameServer/GameStructure.cs b/Arrowgene.Ddon.GameServer/GameStructure.cs
index 5ce7db074..62b2ea112 100644
--- a/Arrowgene.Ddon.GameServer/GameStructure.cs
+++ b/Arrowgene.Ddon.GameServer/GameStructure.cs
@@ -47,7 +47,7 @@ public static void CDataCommunityCharacterBaseInfo(
{
cDataCommunityCharacterBaseInfo.CharacterId = character.CharacterId;
CDataCharacterName(cDataCommunityCharacterBaseInfo.CharacterName, character);
- cDataCommunityCharacterBaseInfo.ClanName = ""; // TODO: Clan
+ cDataCommunityCharacterBaseInfo.ClanName = character.ClanName.ShortName;
}
public static void CDataCommunityCharacterBaseInfo(
diff --git a/Arrowgene.Ddon.GameServer/Handler/AreaGetAreaBaseInfoListHandler.cs b/Arrowgene.Ddon.GameServer/Handler/AreaGetAreaBaseInfoListHandler.cs
index df30e1785..f306ff18d 100644
--- a/Arrowgene.Ddon.GameServer/Handler/AreaGetAreaBaseInfoListHandler.cs
+++ b/Arrowgene.Ddon.GameServer/Handler/AreaGetAreaBaseInfoListHandler.cs
@@ -27,6 +27,7 @@ public override void Handle(GameClient client, IPacket packet)
{
areaBaseInfo.Rank = 15;
areaBaseInfo.CanRankUp = false;
+ areaBaseInfo.ClanAreaPoint = 0;
}
client.Send(pcap);
}
diff --git a/Arrowgene.Ddon.GameServer/Handler/CharacterCommunityCharacterStatusGetHandler.cs b/Arrowgene.Ddon.GameServer/Handler/CharacterCommunityCharacterStatusGetHandler.cs
index 9b215ca3a..89fe0f9c5 100644
--- a/Arrowgene.Ddon.GameServer/Handler/CharacterCommunityCharacterStatusGetHandler.cs
+++ b/Arrowgene.Ddon.GameServer/Handler/CharacterCommunityCharacterStatusGetHandler.cs
@@ -1,4 +1,4 @@
-using System.Collections.Generic;
+using System.Collections.Generic;
using Arrowgene.Ddon.GameServer.Characters;
using Arrowgene.Ddon.Server;
using Arrowgene.Ddon.Shared.Entity.PacketStructure;
diff --git a/Arrowgene.Ddon.GameServer/Handler/CharacterDecideCharacterIdHandler.cs b/Arrowgene.Ddon.GameServer/Handler/CharacterDecideCharacterIdHandler.cs
index b8855e26f..f102f8f22 100644
--- a/Arrowgene.Ddon.GameServer/Handler/CharacterDecideCharacterIdHandler.cs
+++ b/Arrowgene.Ddon.GameServer/Handler/CharacterDecideCharacterIdHandler.cs
@@ -80,7 +80,7 @@ public override void Handle(GameClient client, StructurePacket
+ {
+ private static readonly ServerLogger Logger = LogProvider.Logger(typeof(ClanClanCreateHandler));
+
+ public ClanClanCreateHandler(DdonGameServer server) : base(server)
+ {
+ }
+
+ public override S2CClanClanCreateRes Handle(GameClient client, C2SClanClanCreateReq request)
+ {
+ var res = new S2CClanClanCreateRes();
+
+ res.ClanParam = Server.ClanManager.CreateClan(client, request.CreateParam);
+ res.MemberList.Add(res.ClanParam.ClanServerParam.MasterInfo);
+
+ return res;
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.GameServer/Handler/ClanClanExpelMemberHandler.cs b/Arrowgene.Ddon.GameServer/Handler/ClanClanExpelMemberHandler.cs
new file mode 100644
index 000000000..289ee8604
--- /dev/null
+++ b/Arrowgene.Ddon.GameServer/Handler/ClanClanExpelMemberHandler.cs
@@ -0,0 +1,27 @@
+using Arrowgene.Ddon.Server;
+using Arrowgene.Ddon.Shared.Entity.PacketStructure;
+using Arrowgene.Logging;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Arrowgene.Ddon.GameServer.Handler
+{
+ public class ClanClanExpelMemberHandler : GameRequestPacketHandler
+ {
+ private static readonly ServerLogger Logger = LogProvider.Logger(typeof(ClanClanExpelMemberHandler));
+
+ public ClanClanExpelMemberHandler(DdonGameServer server) : base(server)
+ {
+ }
+
+ public override S2CClanClanExpelMemberRes Handle(GameClient client, C2SClanClanExpelMemberReq request)
+ {
+ Server.ClanManager.LeaveClan(request.CharacterId, client.Character.ClanId);
+
+ return new S2CClanClanExpelMemberRes();
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.GameServer/Handler/ClanClanGetHistoryHandler.cs b/Arrowgene.Ddon.GameServer/Handler/ClanClanGetHistoryHandler.cs
new file mode 100644
index 000000000..76e29657f
--- /dev/null
+++ b/Arrowgene.Ddon.GameServer/Handler/ClanClanGetHistoryHandler.cs
@@ -0,0 +1,21 @@
+using Arrowgene.Ddon.Server;
+using Arrowgene.Ddon.Shared.Entity.PacketStructure;
+using Arrowgene.Logging;
+
+namespace Arrowgene.Ddon.GameServer.Handler
+{
+ public class ClanClanGetHistoryHandler : GameRequestPacketHandler
+ {
+ private static readonly ServerLogger Logger = LogProvider.Logger(typeof(ClanClanGetMyJoinRequestListHandler));
+
+ public ClanClanGetHistoryHandler(DdonGameServer server) : base(server)
+ {
+ }
+
+ public override S2CClanClanGetHistoryRes Handle(GameClient client, C2SClanClanGetHistoryReq request)
+ {
+ // TODO: Implement.
+ return new S2CClanClanGetHistoryRes();
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.GameServer/Handler/ClanClanGetInfoHandler.cs b/Arrowgene.Ddon.GameServer/Handler/ClanClanGetInfoHandler.cs
new file mode 100644
index 000000000..5d257fefa
--- /dev/null
+++ b/Arrowgene.Ddon.GameServer/Handler/ClanClanGetInfoHandler.cs
@@ -0,0 +1,23 @@
+using Arrowgene.Ddon.Server;
+using Arrowgene.Ddon.Shared.Entity.PacketStructure;
+using Arrowgene.Logging;
+
+namespace Arrowgene.Ddon.GameServer.Handler
+{
+ public class ClanClanGetInfoHandler : GameRequestPacketHandler
+ {
+ private static readonly ServerLogger Logger = LogProvider.Logger(typeof(ClanClanSettingUpdateHandler));
+
+ public ClanClanGetInfoHandler(DdonGameServer server) : base(server)
+ {
+ }
+
+ public override S2CClanClanGetInfoRes Handle(GameClient client, C2SClanClanGetInfoReq request)
+ {
+ return new S2CClanClanGetInfoRes()
+ {
+ ClanParam = Server.ClanManager.GetClan(request.ClanId)
+ };
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.GameServer/Handler/ClanClanGetJoinRequestedListHandler.cs b/Arrowgene.Ddon.GameServer/Handler/ClanClanGetJoinRequestedListHandler.cs
index d696b4d24..d7730fc84 100644
--- a/Arrowgene.Ddon.GameServer/Handler/ClanClanGetJoinRequestedListHandler.cs
+++ b/Arrowgene.Ddon.GameServer/Handler/ClanClanGetJoinRequestedListHandler.cs
@@ -1,25 +1,22 @@
-using Arrowgene.Ddon.GameServer.Dump;
using Arrowgene.Ddon.Server;
-using Arrowgene.Ddon.Server.Network;
-using Arrowgene.Ddon.Shared.Network;
+using Arrowgene.Ddon.Shared.Entity.PacketStructure;
using Arrowgene.Logging;
namespace Arrowgene.Ddon.GameServer.Handler
{
- public class ClanClanGetJoinRequestedListHandler : PacketHandler
+ public class ClanClanGetJoinRequestedListHandler : GameRequestPacketHandler
{
private static readonly ServerLogger Logger = LogProvider.Logger(typeof(ClanClanGetJoinRequestedListHandler));
-
public ClanClanGetJoinRequestedListHandler(DdonGameServer server) : base(server)
{
}
- public override PacketId Id => PacketId.C2S_CLAN_CLAN_GET_JOIN_REQUESTED_LIST_REQ;
-
- public override void Handle(GameClient client, IPacket packet)
+ public override S2CClanClanGetJoinRequestedListRes Handle(GameClient client, C2SClanClanGetJoinRequestedListReq request)
{
- client.Send(InGameDump.Dump_69);
+ // TODO: Implement.
+ // client.Send(InGameDump.Dump_69);
+ return new();
}
}
}
diff --git a/Arrowgene.Ddon.GameServer/Handler/ClanClanGetMemberListHandler.cs b/Arrowgene.Ddon.GameServer/Handler/ClanClanGetMemberListHandler.cs
new file mode 100644
index 000000000..705ddd7c1
--- /dev/null
+++ b/Arrowgene.Ddon.GameServer/Handler/ClanClanGetMemberListHandler.cs
@@ -0,0 +1,24 @@
+using Arrowgene.Ddon.Server;
+using Arrowgene.Ddon.Shared.Entity.PacketStructure;
+using Arrowgene.Logging;
+
+namespace Arrowgene.Ddon.GameServer.Handler
+{
+ public class ClanClanGetMemberListHandler : GameRequestPacketHandler
+ {
+ private static readonly ServerLogger Logger = LogProvider.Logger(typeof(ClanClanGetMemberListHandler));
+
+ public ClanClanGetMemberListHandler(DdonGameServer server) : base(server)
+ {
+ }
+
+ public override S2CClanClanGetMemberListRes Handle(GameClient client, C2SClanClanGetMemberListReq request)
+ {
+ S2CClanClanGetMemberListRes res = new S2CClanClanGetMemberListRes();
+
+ res.MemberList = Server.ClanManager.MemberList(request.ClanId);
+
+ return res;
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.GameServer/Handler/ClanClanGetMyInfoHandler.cs b/Arrowgene.Ddon.GameServer/Handler/ClanClanGetMyInfoHandler.cs
index 1799dddf2..7617d0313 100644
--- a/Arrowgene.Ddon.GameServer/Handler/ClanClanGetMyInfoHandler.cs
+++ b/Arrowgene.Ddon.GameServer/Handler/ClanClanGetMyInfoHandler.cs
@@ -1,12 +1,10 @@
-using Arrowgene.Ddon.GameServer.Dump;
using Arrowgene.Ddon.Server;
-using Arrowgene.Ddon.Server.Network;
-using Arrowgene.Ddon.Shared.Network;
+using Arrowgene.Ddon.Shared.Entity.PacketStructure;
using Arrowgene.Logging;
namespace Arrowgene.Ddon.GameServer.Handler
{
- public class ClanClanGetMyInfoHandler : PacketHandler
+ public class ClanClanGetMyInfoHandler : GameRequestPacketHandler
{
private static readonly ServerLogger Logger = LogProvider.Logger(typeof(ClanClanGetMyInfoHandler));
@@ -15,11 +13,14 @@ public ClanClanGetMyInfoHandler(DdonGameServer server) : base(server)
{
}
- public override PacketId Id => PacketId.C2S_CLAN_CLAN_GET_MY_INFO_REQ;
-
- public override void Handle(GameClient client, IPacket packet)
+ public override S2CClanClanGetMyInfoRes Handle(GameClient client, C2SClanClanGetMyInfoReq request)
{
- client.Send(InGameDump.Dump_62);
+ var res = new S2CClanClanGetMyInfoRes()
+ {
+ ClanParam = Server.ClanManager.GetClan(client.Character.ClanId)
+ };
+
+ return res;
}
}
}
diff --git a/Arrowgene.Ddon.GameServer/Handler/ClanClanGetMyJoinRequestListHandler.cs b/Arrowgene.Ddon.GameServer/Handler/ClanClanGetMyJoinRequestListHandler.cs
new file mode 100644
index 000000000..f4cf798d8
--- /dev/null
+++ b/Arrowgene.Ddon.GameServer/Handler/ClanClanGetMyJoinRequestListHandler.cs
@@ -0,0 +1,21 @@
+using Arrowgene.Ddon.Server;
+using Arrowgene.Ddon.Shared.Entity.PacketStructure;
+using Arrowgene.Logging;
+
+namespace Arrowgene.Ddon.GameServer.Handler
+{
+ public class ClanClanGetMyJoinRequestListHandler : GameRequestPacketHandler
+ {
+ private static readonly ServerLogger Logger = LogProvider.Logger(typeof(ClanClanGetMyJoinRequestListHandler));
+
+ public ClanClanGetMyJoinRequestListHandler(DdonGameServer server) : base(server)
+ {
+ }
+
+ public override S2CClanClanGetMyJoinRequestListRes Handle(GameClient client, C2SClanClanGetMyJoinRequestListReq request)
+ {
+ // TODO: Implement.
+ return new S2CClanClanGetMyJoinRequestListRes();
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.GameServer/Handler/ClanClanGetMyMemberListHandler.cs b/Arrowgene.Ddon.GameServer/Handler/ClanClanGetMyMemberListHandler.cs
index 11b063ce6..169dd9451 100644
--- a/Arrowgene.Ddon.GameServer/Handler/ClanClanGetMyMemberListHandler.cs
+++ b/Arrowgene.Ddon.GameServer/Handler/ClanClanGetMyMemberListHandler.cs
@@ -1,32 +1,24 @@
-using Arrowgene.Ddon.GameServer.Dump;
using Arrowgene.Ddon.Server;
-using Arrowgene.Ddon.Server.Network;
using Arrowgene.Ddon.Shared.Entity.PacketStructure;
-using Arrowgene.Ddon.Shared.Network;
using Arrowgene.Logging;
namespace Arrowgene.Ddon.GameServer.Handler
{
- public class ClanClanGetMyMemberListHandler : PacketHandler
+ public class ClanClanGetMyMemberListHandler : GameRequestPacketHandler
{
private static readonly ServerLogger Logger = LogProvider.Logger(typeof(ClanClanGetMyMemberListHandler));
-
public ClanClanGetMyMemberListHandler(DdonGameServer server) : base(server)
{
}
- public override PacketId Id => PacketId.C2S_CLAN_CLAN_GET_MY_MEMBER_LIST_REQ;
-
- public override void Handle(GameClient client, IPacket packet)
+ public override S2CClanClanGetMyMemberListRes Handle(GameClient client, C2SClanClanGetMyMemberListReq request)
{
S2CClanClanGetMyMemberListRes res = new S2CClanClanGetMyMemberListRes();
- res.CharacterId = client.Character.CharacterId;
- res.FirstName = client.Character.FirstName;
- res.LastName = client.Character.LastName;
- client.Send(res);
-
- // client.Send(InGameDump.Dump_67);
+
+ res.MemberList = Server.ClanManager.MemberList(client.Character.ClanId);
+
+ return res;
}
}
}
diff --git a/Arrowgene.Ddon.GameServer/Handler/ClanClanInviteAcceptHandler.cs b/Arrowgene.Ddon.GameServer/Handler/ClanClanInviteAcceptHandler.cs
new file mode 100644
index 000000000..b70d4cab8
--- /dev/null
+++ b/Arrowgene.Ddon.GameServer/Handler/ClanClanInviteAcceptHandler.cs
@@ -0,0 +1,22 @@
+using Arrowgene.Ddon.Server;
+using Arrowgene.Ddon.Shared.Entity.PacketStructure;
+using Arrowgene.Logging;
+
+namespace Arrowgene.Ddon.GameServer.Handler
+{
+ internal class ClanClanInviteAcceptHandler : GameRequestPacketHandler
+ {
+ private static readonly ServerLogger Logger = LogProvider.Logger(typeof(ClanClanInviteAcceptHandler));
+
+ public ClanClanInviteAcceptHandler(DdonGameServer server) : base(server)
+ {
+ }
+
+ public override S2CClanClanInviteAcceptRes Handle(GameClient client, C2SClanClanInviteAcceptReq request)
+ {
+ Server.ClanManager.JoinClan(client.Character.CharacterId, request.ClanId);
+
+ return new S2CClanClanInviteAcceptRes();
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.GameServer/Handler/ClanClanInviteHandler.cs b/Arrowgene.Ddon.GameServer/Handler/ClanClanInviteHandler.cs
new file mode 100644
index 000000000..6ba8fac63
--- /dev/null
+++ b/Arrowgene.Ddon.GameServer/Handler/ClanClanInviteHandler.cs
@@ -0,0 +1,35 @@
+using Arrowgene.Ddon.Server;
+using Arrowgene.Ddon.Shared.Entity.PacketStructure;
+using Arrowgene.Logging;
+
+namespace Arrowgene.Ddon.GameServer.Handler
+{
+ public class ClanClanInviteHandler : GameRequestPacketHandler
+ {
+ private static readonly ServerLogger Logger = LogProvider.Logger(typeof(ClanClanInviteHandler));
+
+
+ public ClanClanInviteHandler(DdonGameServer server) : base(server)
+ {
+ }
+
+ public override S2CClanClanInviteRes Handle(GameClient client, C2SClanClanInviteReq request)
+ {
+ var targetClient = Server.ClientLookup.GetClientByCharacterId(request.CharacterId);
+
+ if (targetClient != null)
+ {
+ var ntc = new S2CClanClanInviteNtc()
+ {
+ ClanId = client.Character.ClanId,
+ ClanName = client.Character.ClanName.Name,
+ };
+ GameStructure.CDataCharacterListElement(ntc.CharacterListElement, client.Character);
+ targetClient.Send(ntc);
+ }
+
+
+ return new S2CClanClanInviteRes();
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.GameServer/Handler/ClanClanLeaveMemberHandler.cs b/Arrowgene.Ddon.GameServer/Handler/ClanClanLeaveMemberHandler.cs
new file mode 100644
index 000000000..4299eeb29
--- /dev/null
+++ b/Arrowgene.Ddon.GameServer/Handler/ClanClanLeaveMemberHandler.cs
@@ -0,0 +1,22 @@
+using Arrowgene.Ddon.Server;
+using Arrowgene.Ddon.Shared.Entity.PacketStructure;
+using Arrowgene.Logging;
+
+namespace Arrowgene.Ddon.GameServer.Handler
+{
+ public class ClanClanLeaveMemberHandler : GameRequestPacketHandler
+ {
+ private static readonly ServerLogger Logger = LogProvider.Logger(typeof(ClanClanLeaveMemberHandler));
+
+ public ClanClanLeaveMemberHandler(DdonGameServer server) : base(server)
+ {
+ }
+
+ public override S2CClanClanLeaveMemberRes Handle(GameClient client, C2SClanClanLeaveMemberReq request)
+ {
+ Server.ClanManager.LeaveClan(client.Character.CharacterId, client.Character.ClanId);
+
+ return new S2CClanClanLeaveMemberRes();
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.GameServer/Handler/ClanClanNegotiateMasterHandler.cs b/Arrowgene.Ddon.GameServer/Handler/ClanClanNegotiateMasterHandler.cs
new file mode 100644
index 000000000..3492e09ce
--- /dev/null
+++ b/Arrowgene.Ddon.GameServer/Handler/ClanClanNegotiateMasterHandler.cs
@@ -0,0 +1,30 @@
+using Arrowgene.Ddon.Server;
+using Arrowgene.Ddon.Shared.Entity.PacketStructure;
+using Arrowgene.Logging;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Arrowgene.Ddon.GameServer.Handler
+{
+ public class ClanClanNegotiateMasterHandler : GameRequestPacketHandler
+ {
+ private static readonly ServerLogger Logger = LogProvider.Logger(typeof(ClanClanNegotiateMasterHandler));
+
+ public ClanClanNegotiateMasterHandler(DdonGameServer server) : base(server)
+ {
+ }
+
+ public override S2CClanClanNegotiateMasterRes Handle(GameClient client, C2SClanClanNegotiateMasterReq request)
+ {
+ Server.ClanManager.NegotiateMaster(request.CharacterId, client.Character.ClanId);
+
+ return new S2CClanClanNegotiateMasterRes()
+ {
+ MemberId = request.CharacterId,
+ };
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.GameServer/Handler/ClanClanScoutEntryGetInviteListHandler.cs b/Arrowgene.Ddon.GameServer/Handler/ClanClanScoutEntryGetInviteListHandler.cs
new file mode 100644
index 000000000..a39cfa712
--- /dev/null
+++ b/Arrowgene.Ddon.GameServer/Handler/ClanClanScoutEntryGetInviteListHandler.cs
@@ -0,0 +1,21 @@
+using Arrowgene.Ddon.Server;
+using Arrowgene.Ddon.Shared.Entity.PacketStructure;
+using Arrowgene.Logging;
+
+namespace Arrowgene.Ddon.GameServer.Handler
+{
+ public class ClanClanScoutEntryGetInviteListHandler : GameRequestPacketHandler
+ {
+ private static readonly ServerLogger Logger = LogProvider.Logger(typeof(ClanClanScoutEntryGetInviteListHandler));
+
+ public ClanClanScoutEntryGetInviteListHandler(DdonGameServer server) : base(server)
+ {
+ }
+
+ public override S2CClanClanScoutEntryGetInviteListRes Handle(GameClient client, C2SClanClanScoutEntryGetInviteListReq request)
+ {
+ // TODO: Implement.
+ return new();
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.GameServer/Handler/ClanClanScoutEntryGetInvitedListHandler.cs b/Arrowgene.Ddon.GameServer/Handler/ClanClanScoutEntryGetInvitedListHandler.cs
new file mode 100644
index 000000000..40b2e4807
--- /dev/null
+++ b/Arrowgene.Ddon.GameServer/Handler/ClanClanScoutEntryGetInvitedListHandler.cs
@@ -0,0 +1,21 @@
+using Arrowgene.Ddon.Server;
+using Arrowgene.Ddon.Shared.Entity.PacketStructure;
+using Arrowgene.Logging;
+
+namespace Arrowgene.Ddon.GameServer.Handler
+{
+ public class ClanClanScoutEntryGetInvitedListHandler : GameRequestPacketHandler
+ {
+ private static readonly ServerLogger Logger = LogProvider.Logger(typeof(ClanClanScoutEntryGetInvitedListHandler));
+
+ public ClanClanScoutEntryGetInvitedListHandler(DdonGameServer server) : base(server)
+ {
+ }
+
+ public override S2CClanClanScoutEntryGetInvitedListRes Handle(GameClient client, C2SClanClanScoutEntryGetInvitedListReq request)
+ {
+ // TODO: Implement.
+ return new S2CClanClanScoutEntryGetInvitedListRes();
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.GameServer/Handler/ClanClanScoutEntryGetMyHandler.cs b/Arrowgene.Ddon.GameServer/Handler/ClanClanScoutEntryGetMyHandler.cs
new file mode 100644
index 000000000..2136c315d
--- /dev/null
+++ b/Arrowgene.Ddon.GameServer/Handler/ClanClanScoutEntryGetMyHandler.cs
@@ -0,0 +1,24 @@
+using Arrowgene.Ddon.Server;
+using Arrowgene.Ddon.Shared.Entity.PacketStructure;
+using Arrowgene.Logging;
+
+namespace Arrowgene.Ddon.GameServer.Handler
+{
+ public class ClanClanScoutEntryGetMyHandler : GameRequestPacketHandler
+ {
+ private static readonly ServerLogger Logger = LogProvider.Logger(typeof(ClanClanScoutEntryGetMyHandler));
+
+
+ public ClanClanScoutEntryGetMyHandler(DdonGameServer server) : base(server)
+ {
+ }
+
+ public override S2CClanClanScoutEntryGetMyRes Handle(GameClient client, C2SClanClanScoutEntryGetMyReq request)
+ {
+ return new S2CClanClanScoutEntryGetMyRes()
+ {
+ //TODO: Actually return the list.
+ };
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.GameServer/Handler/ClanClanScoutEntrySearchHandler.cs b/Arrowgene.Ddon.GameServer/Handler/ClanClanScoutEntrySearchHandler.cs
new file mode 100644
index 000000000..e40dd2dee
--- /dev/null
+++ b/Arrowgene.Ddon.GameServer/Handler/ClanClanScoutEntrySearchHandler.cs
@@ -0,0 +1,21 @@
+using Arrowgene.Ddon.Server;
+using Arrowgene.Ddon.Shared.Entity.PacketStructure;
+using Arrowgene.Logging;
+
+namespace Arrowgene.Ddon.GameServer.Handler
+{
+ public class ClanClanScoutEntrySearchHandler : GameRequestPacketHandler
+ {
+ private static readonly ServerLogger Logger = LogProvider.Logger(typeof(ClanClanScoutEntrySearchHandler));
+
+ public ClanClanScoutEntrySearchHandler(DdonGameServer server) : base(server)
+ {
+ }
+
+ public override S2CClanClanScoutEntrySearchRes Handle(GameClient client, C2SClanClanScoutEntrySearchReq request)
+ {
+ // TODO: Implement.
+ return new S2CClanClanScoutEntrySearchRes();
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.GameServer/Handler/ClanClanSearchHandler.cs b/Arrowgene.Ddon.GameServer/Handler/ClanClanSearchHandler.cs
new file mode 100644
index 000000000..7c853b1ad
--- /dev/null
+++ b/Arrowgene.Ddon.GameServer/Handler/ClanClanSearchHandler.cs
@@ -0,0 +1,21 @@
+using Arrowgene.Ddon.Server;
+using Arrowgene.Ddon.Shared.Entity.PacketStructure;
+using Arrowgene.Logging;
+
+namespace Arrowgene.Ddon.GameServer.Handler
+{
+ public class ClanClanSearchHandler : GameRequestPacketHandler
+ {
+ private static readonly ServerLogger Logger = LogProvider.Logger(typeof(ClanClanSearchHandler));
+
+ public ClanClanSearchHandler(DdonGameServer server) : base(server)
+ {
+ }
+
+ public override S2CClanClanSearchRes Handle(GameClient client, C2SClanClanSearchReq request)
+ {
+ // TODO: Implement.
+ return new S2CClanClanSearchRes();
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.GameServer/Handler/ClanClanSetMemberRankHandler.cs b/Arrowgene.Ddon.GameServer/Handler/ClanClanSetMemberRankHandler.cs
new file mode 100644
index 000000000..bd12a794d
--- /dev/null
+++ b/Arrowgene.Ddon.GameServer/Handler/ClanClanSetMemberRankHandler.cs
@@ -0,0 +1,31 @@
+using Arrowgene.Ddon.Server;
+using Arrowgene.Ddon.Shared.Entity.PacketStructure;
+using Arrowgene.Logging;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Arrowgene.Ddon.GameServer.Handler
+{
+ public class ClanClanSetMemberRankHandler : GameRequestPacketHandler
+ {
+ private static readonly ServerLogger Logger = LogProvider.Logger(typeof(ClanClanSetMemberRankHandler));
+
+ public ClanClanSetMemberRankHandler(DdonGameServer server) : base(server)
+ {
+ }
+
+ public override S2CClanClanSetMemberRankRes Handle(GameClient client, C2SClanClanSetMemberRankReq request)
+ {
+ Server.ClanManager.SetMemberRank(request.CharacterId, client.Character.ClanId, request.Rank, request.Permission);
+
+ return new S2CClanClanSetMemberRankRes()
+ {
+ MemberId = request.CharacterId,
+ Rank = request.Rank,
+ };
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.GameServer/Handler/ClanClanSettingUpdateHandler.cs b/Arrowgene.Ddon.GameServer/Handler/ClanClanSettingUpdateHandler.cs
index b831ed9aa..09ecdae1a 100644
--- a/Arrowgene.Ddon.GameServer/Handler/ClanClanSettingUpdateHandler.cs
+++ b/Arrowgene.Ddon.GameServer/Handler/ClanClanSettingUpdateHandler.cs
@@ -1,12 +1,10 @@
-using Arrowgene.Ddon.GameServer.Dump;
using Arrowgene.Ddon.Server;
-using Arrowgene.Ddon.Server.Network;
-using Arrowgene.Ddon.Shared.Network;
+using Arrowgene.Ddon.Shared.Entity.PacketStructure;
using Arrowgene.Logging;
namespace Arrowgene.Ddon.GameServer.Handler
{
- public class ClanClanSettingUpdateHandler : PacketHandler
+ public class ClanClanSettingUpdateHandler : GameRequestPacketHandler
{
private static readonly ServerLogger Logger = LogProvider.Logger(typeof(ClanClanSettingUpdateHandler));
@@ -15,11 +13,13 @@ public ClanClanSettingUpdateHandler(DdonGameServer server) : base(server)
{
}
- public override PacketId Id => PacketId.C2S_CLAN_CLAN_SETTING_UPDATE_REQ;
-
- public override void Handle(GameClient client, IPacket packet)
+ public override S2CClanClanSettingUpdateRes Handle(GameClient client, C2SClanClanSettingUpdateReq request)
{
- client.Send(GameDump.Dump_18);
+ // TODO: Figure out what fires this and implement.
+ return new S2CClanClanSettingUpdateRes()
+ {
+ IsMemberNotice = false
+ };
}
}
}
diff --git a/Arrowgene.Ddon.GameServer/Handler/ClanClanUpdateHandler.cs b/Arrowgene.Ddon.GameServer/Handler/ClanClanUpdateHandler.cs
new file mode 100644
index 000000000..0b27d9b94
--- /dev/null
+++ b/Arrowgene.Ddon.GameServer/Handler/ClanClanUpdateHandler.cs
@@ -0,0 +1,22 @@
+using Arrowgene.Ddon.Server;
+using Arrowgene.Ddon.Shared.Entity.PacketStructure;
+using Arrowgene.Logging;
+
+namespace Arrowgene.Ddon.GameServer.Handler
+{
+ public class ClanClanUpdateHandler : GameRequestPacketHandler
+ {
+ private static readonly ServerLogger Logger = LogProvider.Logger(typeof(ClanClanSettingUpdateHandler));
+
+ public ClanClanUpdateHandler(DdonGameServer server) : base(server)
+ {
+ }
+
+ public override S2CClanClanUpdateRes Handle(GameClient client, C2SClanClanUpdateReq request)
+ {
+ Server.ClanManager.UpdateClan(client, request.CreateParam);
+
+ return new S2CClanClanUpdateRes();
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.GameServer/Handler/LobbyLobbyJoinHandler.cs b/Arrowgene.Ddon.GameServer/Handler/LobbyLobbyJoinHandler.cs
index 589c3897f..0001b70b3 100644
--- a/Arrowgene.Ddon.GameServer/Handler/LobbyLobbyJoinHandler.cs
+++ b/Arrowgene.Ddon.GameServer/Handler/LobbyLobbyJoinHandler.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Linq;
using Arrowgene.Ddon.GameServer.Characters;
using Arrowgene.Ddon.Server;
using Arrowgene.Ddon.Shared.Entity.PacketStructure;
@@ -24,8 +25,6 @@ public override S2CLobbyJoinRes Handle(GameClient client, C2SLobbyJoinReq reques
// Notify new player of already present players
S2CUserListJoinNtc alreadyPresentUsersNtc = new S2CUserListJoinNtc();
- List alreadyPresentPlayerContextNtcs =
- new List();
foreach (GameClient otherClient in Server.ClientLookup.GetAll())
{
if (otherClient != client && otherClient.Character != null)
@@ -37,7 +36,7 @@ public override S2CLobbyJoinRes Handle(GameClient client, C2SLobbyJoinReq reques
CharacterId = otherClient.Character.CharacterId,
FirstName = otherClient.Character.FirstName,
LastName = otherClient.Character.LastName,
- ClanName = "",
+ ClanName = otherClient.Character.ClanName.ShortName,
PawnId = 0,
Unk0 = 1,
Unk1 = 0,
@@ -58,7 +57,7 @@ public override S2CLobbyJoinRes Handle(GameClient client, C2SLobbyJoinReq reques
CharacterId = client.Character.CharacterId,
FirstName = client.Character.FirstName,
LastName = client.Character.LastName,
- ClanName = "", // TODO: Clan
+ ClanName = client.Character.ClanName.ShortName,
Unk0 = 1, // Platform PC?
Unk1 = 0,
OnlineStatus = OnlineStatus.Online // OnlineStatus?
@@ -75,10 +74,11 @@ public override S2CLobbyJoinRes Handle(GameClient client, C2SLobbyJoinReq reques
Server.BazaarManager.NotifySoldExhibitions(client);
+ var allUsers = newUserNtc.UserList.Concat(alreadyPresentUsersNtc.UserList).ToList();
return new S2CLobbyJoinRes()
{
CharacterId = client.Character.CharacterId,
- LobbyMemberInfoList = newUserNtc.UserList
+ LobbyMemberInfoList = allUsers
};
}
}
diff --git a/Arrowgene.Ddon.GameServer/Handler/ProfileGetCharacterProfileHandler.cs b/Arrowgene.Ddon.GameServer/Handler/ProfileGetCharacterProfileHandler.cs
index 3ee00c545..5f4f14801 100644
--- a/Arrowgene.Ddon.GameServer/Handler/ProfileGetCharacterProfileHandler.cs
+++ b/Arrowgene.Ddon.GameServer/Handler/ProfileGetCharacterProfileHandler.cs
@@ -44,8 +44,14 @@ public override S2CProfileGetCharacterProfileRes Handle(GameClient client, C2SPr
GameStructure.CDataCharacterName(res.CharacterName, targetClient.Character);
res.JobId = targetClient.Character.Job;
res.JobLevel = (byte)targetClient.Character.ActiveCharacterJobData.Lv;
- // TODO: ClanParam
- // TODO: ClanMemberRank
+ res.ClanParam = Server.ClanManager.GetClan(targetClient.Character.ClanId);
+
+ var (clanId, memberInfo) = Server.ClanManager.ClanMembership(targetClient.Character.CharacterId);
+ if (memberInfo != null)
+ {
+ res.ClanMemberRank = (uint)memberInfo.Rank;
+ }
+
res.JobLevelList = targetClient.Character.CharacterJobDataList.Select(jobData => new CDataJobBaseInfo()
{
Job = jobData.Job,
diff --git a/Arrowgene.Ddon.GameServer/Handler/WarpGetReturnLocationHandler.cs b/Arrowgene.Ddon.GameServer/Handler/WarpGetReturnLocationHandler.cs
index 2141c4127..310dd0799 100644
--- a/Arrowgene.Ddon.GameServer/Handler/WarpGetReturnLocationHandler.cs
+++ b/Arrowgene.Ddon.GameServer/Handler/WarpGetReturnLocationHandler.cs
@@ -78,8 +78,6 @@ public override S2CWarpGetReturnLocationRes Handle(GameClient client, C2SWarpGet
{
S2CWarpGetReturnLocationRes response = new S2CWarpGetReturnLocationRes();
- Logger.Info($"LastSafeStageId: {client.Character.LastSafeStageId}");
-
if (client.GameMode == GameMode.BitterblackMaze)
{
response.JumpLocation.stageId = 602;
diff --git a/Arrowgene.Ddon.LoginServer/Handler/GetCharacterListHandler.cs b/Arrowgene.Ddon.LoginServer/Handler/GetCharacterListHandler.cs
index d9c9c2def..c8032857a 100644
--- a/Arrowgene.Ddon.LoginServer/Handler/GetCharacterListHandler.cs
+++ b/Arrowgene.Ddon.LoginServer/Handler/GetCharacterListHandler.cs
@@ -92,6 +92,8 @@ public override void Handle(LoginClient client, IPacket packet)
.Union(c.Equipment.AsCDataEquipItemInfo(EquipType.Visual))
.ToList();
+ cResponse.ClanName = c.ClanName.Name;
+ cResponse.ClanNameShort = c.ClanName.ShortName;
characterListResponse.Add(cResponse);
}
diff --git a/Arrowgene.Ddon.LoginServer/LoginServerSetting.cs b/Arrowgene.Ddon.LoginServer/LoginServerSetting.cs
index 01a8e7ff2..2aa78b633 100644
--- a/Arrowgene.Ddon.LoginServer/LoginServerSetting.cs
+++ b/Arrowgene.Ddon.LoginServer/LoginServerSetting.cs
@@ -1,4 +1,4 @@
-using System.Runtime.Serialization;
+using System.Runtime.Serialization;
using Arrowgene.Ddon.Server;
namespace Arrowgene.Ddon.LoginServer
diff --git a/Arrowgene.Ddon.Shared/Entity/EntitySerializer.cs b/Arrowgene.Ddon.Shared/Entity/EntitySerializer.cs
index 5cddbe778..b3c040e41 100644
--- a/Arrowgene.Ddon.Shared/Entity/EntitySerializer.cs
+++ b/Arrowgene.Ddon.Shared/Entity/EntitySerializer.cs
@@ -73,10 +73,29 @@ static EntitySerializer()
Create(new CDataCharacterSearchParam.Serializer());
Create(new CDataCharacterSearchParameter.Serializer()); // Yes there are two structs with similar names
Create(new CDataCharacterEditPriceInfo.Serializer());
+
+ Create(new CDataClanJoinRequest.Serializer());
Create(new CDataClanMemberInfo.Serializer());
Create(new CDataClanParam.Serializer());
+ Create(new CDataClanScoutEntryInviteInfo.Serializer());
+ Create(new CDataClanScoutEntrySearchResult.Serializer());
+ Create(new CDataClanSearchParam.Serializer());
+ Create(new CDataClanSearchResult.Serializer());
Create(new CDataClanServerParam.Serializer());
Create(new CDataClanUserParam.Serializer());
+ Create(new CDataClanHistoryElement.Serializer());
+ Create(new CDataClanNoticePackage.Serializer());
+ Create(new CDataClanShopBuffInfo.Serializer());
+ Create(new CDataClanShopBuffItem.Serializer());
+ Create(new CDataClanShopConciergeItem.Serializer());
+ Create(new CDataClanShopFunctionInfo.Serializer());
+ Create(new CDataClanShopFunctionItem.Serializer());
+ Create(new CDataClanConciergeInfo.Serializer());
+ Create(new CDataClanConciergeNpc.Serializer());
+ Create(new CDataClanPartnerPawnInfo.Serializer());
+ Create(new CDataClanShopLineupName.Serializer());
+ Create(new CDataClanValueInfo.Serializer());
+
Create(new CDataClearTimePointBonus.Serializer());
Create(new CDataCommonU8.Serializer());
Create(new CDataCommonU32.Serializer());
@@ -239,6 +258,8 @@ static EntitySerializer()
Create(new CDataPartyMemberMinimum.Serializer());
Create(new CDataPartyPlayerContext.Serializer());
Create(new CDataPartyQuestProgressInfo.Serializer());
+
+ Create(new CDataPawnExpeditionInfo.Serializer());
Create(new CDataPawnCraftData.Serializer());
Create(new CDataPawnCraftSkill.Serializer());
Create(new CDataPawnEquipInfo.Serializer());
@@ -254,6 +275,7 @@ static EntitySerializer()
Create(new CDataPawnTrainingPreparationInfoToAdvice.Serializer());
Create(new CDataPawnSearchParameter.Serializer());
Create(new CDataRegisterdPawnList.Serializer());
+
Create(new CDataPlayPointDataSerializer());
Create(new CDataPresetAbilityParam.Serializer());
Create(new CDataPriorityQuest.Serializer());
@@ -430,6 +452,27 @@ static EntitySerializer()
Create(new C2SClanClanPartnerPawnDataGetReq.Serializer());
Create(new C2SClanGetFurnitureReq.Serializer());
Create(new C2SClanSetFurnitureReq.Serializer());
+ Create(new C2SClanClanSettingUpdateReq.Serializer());
+ Create(new C2SClanClanScoutEntryGetMyReq.Serializer());
+ Create(new C2SClanClanCreateReq.Serializer());
+ Create(new C2SClanClanGetMemberListReq.Serializer());
+ Create(new C2SClanClanGetMyJoinRequestListReq.Serializer());
+ Create(new C2SClanClanLeaveMemberReq.Serializer());
+ Create(new C2SClanClanScoutEntryGetInvitedListReq.Serializer());
+ Create(new C2SClanClanSearchReq.Serializer());
+ Create(new C2SClanClanUpdateReq.Serializer());
+ Create(new C2SClanClanGetHistoryReq.Serializer());
+ Create(new C2SClanClanGetMyInfoReq.Serializer());
+ Create(new C2SClanClanInviteReq.Serializer());
+ Create(new C2SClanClanInviteAcceptReq.Serializer());
+ Create(new C2SClanClanGetInfoReq.Serializer());
+ Create(new C2SClanClanGetMyMemberListReq.Serializer());
+ Create(new C2SClanClanScoutEntrySearchReq.Serializer());
+ Create(new C2SClanClanScoutEntryGetInviteListReq.Serializer());
+ Create(new C2SClanClanGetJoinRequestedListReq.Serializer());
+ Create(new C2SClanClanExpelMemberReq.Serializer());
+ Create(new C2SClanClanSetMemberRankReq.Serializer());
+ Create(new C2SClanClanNegotiateMasterReq.Serializer());
Create(new C2SConnectionLoginReq.Serializer());
Create(new C2SConnectionMoveInServerReq.Serializer());
@@ -851,6 +894,43 @@ static EntitySerializer()
Create(new S2CClanClanPartnerPawnDataGetRes.Serializer());
Create(new S2CClanGetFurnitureRes.Serializer());
Create(new S2CClanSetFurnitureRes.Serializer());
+ Create(new S2CClanClanSettingUpdateRes.Serializer());
+ Create(new S2CClanClanScoutEntryGetMyRes.Serializer());
+ Create(new S2CClanClanCreateRes.Serializer());
+ Create(new S2CClanClanGetMemberListRes.Serializer());
+ Create(new S2CClanClanGetMyJoinRequestListRes.Serializer());
+ Create(new S2CClanClanLeaveMemberRes.Serializer());
+ Create(new S2CClanClanScoutEntryGetInvitedListRes.Serializer());
+ Create(new S2CClanClanSearchRes.Serializer());
+ Create(new S2CClanClanUpdateRes.Serializer());
+ Create(new S2CClanClanGetHistoryRes.Serializer());
+ Create(new S2CClanClanInviteRes.Serializer());
+ Create(new S2CClanClanInviteNtc.Serializer());
+ Create(new S2CClanClanInviteAcceptRes.Serializer());
+ Create(new S2CClanClanGetInfoRes.Serializer());
+ Create(new S2CClanClanScoutEntrySearchRes.Serializer());
+ Create(new S2CClanClanScoutEntryGetInviteListRes.Serializer());
+ Create(new S2CClanClanGetJoinRequestedListRes.Serializer());
+ Create(new S2CClanClanExpelMemberRes.Serializer());
+ Create(new S2CClanClanSetMemberRankRes.Serializer());
+ Create(new S2CClanClanNegotiateMasterRes.Serializer());
+
+ Create(new S2CClanClanLeaveMemberNtc.Serializer());
+ Create(new S2CClanClanUpdateNtc.Serializer());
+ Create(new S2CClanClanBaseReleaseStateUpdateNtc.Serializer());
+ Create(new S2CClanClanJoinDisapproveNtc.Serializer());
+ Create(new S2CClanClanJoinMemberNtc.Serializer());
+ Create(new S2CClanClanJoinNtc.Serializer());
+ Create(new S2CClanClanJoinSelfNtc.Serializer());
+ Create(new S2CClanClanPointAddNtc.Serializer());
+ Create(new S2CClanClanQuestClearNtc.Serializer());
+ Create(new S2CClanClanScoutEntryDisapproveInviteNtc.Serializer());
+ Create(new S2CClanClanUpdateCommonNtc.Serializer());
+ Create(new S2CClanClanShopBuyItemNtc.Serializer());
+ Create(new S2CClanClanLevelUpNtc.Serializer());
+ Create(new S2CClanClanSetMemberRankNtc.Serializer());
+ Create(new S2CClanClanNegotiateMasterNtc.Serializer());
+
Create(new S2CConnectionLoginRes.Serializer());
Create(new S2CConnectionLogoutRes.Serializer());
Create(new S2CConnectionMoveInServerRes.Serializer());
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanCreateReq.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanCreateReq.cs
new file mode 100644
index 000000000..1b8063506
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanCreateReq.cs
@@ -0,0 +1,33 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Entity.Structure;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class C2SClanClanCreateReq : IPacketStructure
+ {
+ public PacketId Id => PacketId.C2S_CLAN_CLAN_CREATE_REQ;
+
+ public CDataClanUserParam CreateParam { get; set; }
+
+ public C2SClanClanCreateReq()
+ {
+ CreateParam = new CDataClanUserParam();
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, C2SClanClanCreateReq obj)
+ {
+ WriteEntity(buffer, obj.CreateParam);
+ }
+
+ public override C2SClanClanCreateReq Read(IBuffer buffer)
+ {
+ C2SClanClanCreateReq obj = new C2SClanClanCreateReq();
+ obj.CreateParam = ReadEntity(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanExpelMemberReq.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanExpelMemberReq.cs
new file mode 100644
index 000000000..0ace17302
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanExpelMemberReq.cs
@@ -0,0 +1,27 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class C2SClanClanExpelMemberReq : IPacketStructure
+ {
+ public PacketId Id => PacketId.C2S_CLAN_CLAN_EXPEL_MEMBER_REQ;
+
+ public uint CharacterId { get; set; }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, C2SClanClanExpelMemberReq obj)
+ {
+ WriteUInt32(buffer, obj.CharacterId);
+ }
+
+ public override C2SClanClanExpelMemberReq Read(IBuffer buffer)
+ {
+ C2SClanClanExpelMemberReq obj = new C2SClanClanExpelMemberReq();
+ obj.CharacterId = ReadUInt32(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanGetHistoryReq.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanGetHistoryReq.cs
new file mode 100644
index 000000000..5a9d447fb
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanGetHistoryReq.cs
@@ -0,0 +1,27 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class C2SClanClanGetHistoryReq : IPacketStructure
+ {
+ public PacketId Id => PacketId.C2S_CLAN_CLAN_GET_HISTORY_REQ;
+
+ public C2SClanClanGetHistoryReq()
+ {
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, C2SClanClanGetHistoryReq obj)
+ {
+ }
+
+ public override C2SClanClanGetHistoryReq Read(IBuffer buffer)
+ {
+ C2SClanClanGetHistoryReq obj = new C2SClanClanGetHistoryReq();
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanGetInfoReq.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanGetInfoReq.cs
new file mode 100644
index 000000000..dd9004b58
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanGetInfoReq.cs
@@ -0,0 +1,31 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class C2SClanClanGetInfoReq : IPacketStructure
+ {
+ public PacketId Id => PacketId.C2S_CLAN_CLAN_GET_INFO_REQ;
+
+ public uint ClanId { get; set; }
+
+ public C2SClanClanGetInfoReq()
+ {
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, C2SClanClanGetInfoReq obj)
+ {
+ WriteUInt32(buffer, obj.ClanId);
+ }
+
+ public override C2SClanClanGetInfoReq Read(IBuffer buffer)
+ {
+ C2SClanClanGetInfoReq obj = new C2SClanClanGetInfoReq();
+ obj.ClanId = ReadUInt32(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanGetJoinRequestedListReq.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanGetJoinRequestedListReq.cs
new file mode 100644
index 000000000..ca7b7cefe
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanGetJoinRequestedListReq.cs
@@ -0,0 +1,23 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class C2SClanClanGetJoinRequestedListReq : IPacketStructure
+ {
+ public PacketId Id => PacketId.C2S_CLAN_CLAN_GET_JOIN_REQUESTED_LIST_REQ;
+
+ public class Serializer : PacketEntitySerializer
+ {
+
+ public override void Write(IBuffer buffer, C2SClanClanGetJoinRequestedListReq obj)
+ {
+ }
+
+ public override C2SClanClanGetJoinRequestedListReq Read(IBuffer buffer)
+ {
+ return new C2SClanClanGetJoinRequestedListReq();
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanGetMemberListReq.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanGetMemberListReq.cs
new file mode 100644
index 000000000..3c9fb7f41
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanGetMemberListReq.cs
@@ -0,0 +1,31 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class C2SClanClanGetMemberListReq : IPacketStructure
+ {
+ public PacketId Id => PacketId.C2S_CLAN_CLAN_GET_MEMBER_LIST_REQ;
+
+ public uint ClanId { get; set; }
+
+ public C2SClanClanGetMemberListReq()
+ {
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, C2SClanClanGetMemberListReq obj)
+ {
+ WriteUInt32(buffer, obj.ClanId);
+ }
+
+ public override C2SClanClanGetMemberListReq Read(IBuffer buffer)
+ {
+ C2SClanClanGetMemberListReq obj = new C2SClanClanGetMemberListReq();
+ obj.ClanId = ReadUInt32(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanGetMyInfoReq.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanGetMyInfoReq.cs
new file mode 100644
index 000000000..7fabc451c
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanGetMyInfoReq.cs
@@ -0,0 +1,27 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class C2SClanClanGetMyInfoReq : IPacketStructure
+ {
+ public PacketId Id => PacketId.C2S_CLAN_CLAN_GET_MY_INFO_REQ;
+
+ public C2SClanClanGetMyInfoReq()
+ {
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, C2SClanClanGetMyInfoReq obj)
+ {
+ }
+
+ public override C2SClanClanGetMyInfoReq Read(IBuffer buffer)
+ {
+ C2SClanClanGetMyInfoReq obj = new C2SClanClanGetMyInfoReq();
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanGetMyJoinRequestListReq.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanGetMyJoinRequestListReq.cs
new file mode 100644
index 000000000..f9ec7e80b
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanGetMyJoinRequestListReq.cs
@@ -0,0 +1,27 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class C2SClanClanGetMyJoinRequestListReq : IPacketStructure
+ {
+ public PacketId Id => PacketId.C2S_CLAN_CLAN_GET_MY_JOIN_REQUEST_LIST_REQ;
+
+ public C2SClanClanGetMyJoinRequestListReq()
+ {
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, C2SClanClanGetMyJoinRequestListReq obj)
+ {
+ }
+
+ public override C2SClanClanGetMyJoinRequestListReq Read(IBuffer buffer)
+ {
+ C2SClanClanGetMyJoinRequestListReq obj = new C2SClanClanGetMyJoinRequestListReq();
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanGetMyMemberListReq.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanGetMyMemberListReq.cs
new file mode 100644
index 000000000..6452e9efb
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanGetMyMemberListReq.cs
@@ -0,0 +1,27 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class C2SClanClanGetMyMemberListReq : IPacketStructure
+ {
+ public PacketId Id => PacketId.C2S_CLAN_CLAN_GET_MY_MEMBER_LIST_REQ;
+
+ public C2SClanClanGetMyMemberListReq()
+ {
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, C2SClanClanGetMyMemberListReq obj)
+ {
+ }
+
+ public override C2SClanClanGetMyMemberListReq Read(IBuffer buffer)
+ {
+ C2SClanClanGetMyMemberListReq obj = new C2SClanClanGetMyMemberListReq();
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanInviteAcceptReq.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanInviteAcceptReq.cs
new file mode 100644
index 000000000..31fa9d53e
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanInviteAcceptReq.cs
@@ -0,0 +1,31 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class C2SClanClanInviteAcceptReq : IPacketStructure
+ {
+ public PacketId Id => PacketId.C2S_CLAN_CLAN_INVITE_ACCEPT_REQ;
+
+ public uint ClanId { get; set; }
+
+ public C2SClanClanInviteAcceptReq()
+ {
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, C2SClanClanInviteAcceptReq obj)
+ {
+ WriteUInt32(buffer, obj.ClanId);
+ }
+
+ public override C2SClanClanInviteAcceptReq Read(IBuffer buffer)
+ {
+ C2SClanClanInviteAcceptReq obj = new C2SClanClanInviteAcceptReq();
+ obj.ClanId = ReadUInt32(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanInviteReq.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanInviteReq.cs
new file mode 100644
index 000000000..bf7a13332
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanInviteReq.cs
@@ -0,0 +1,31 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class C2SClanClanInviteReq : IPacketStructure
+ {
+ public PacketId Id => PacketId.C2S_CLAN_CLAN_INVITE_REQ;
+
+ public uint CharacterId { get; set; }
+
+ public C2SClanClanInviteReq()
+ {
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, C2SClanClanInviteReq obj)
+ {
+ WriteUInt32(buffer, obj.CharacterId);
+ }
+
+ public override C2SClanClanInviteReq Read(IBuffer buffer)
+ {
+ C2SClanClanInviteReq obj = new C2SClanClanInviteReq();
+ obj.CharacterId = ReadUInt32(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanLeaveMemberReq.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanLeaveMemberReq.cs
new file mode 100644
index 000000000..fe486d0bf
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanLeaveMemberReq.cs
@@ -0,0 +1,27 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class C2SClanClanLeaveMemberReq : IPacketStructure
+ {
+ public PacketId Id => PacketId.C2S_CLAN_CLAN_LEAVE_MEMBER_REQ;
+
+ public C2SClanClanLeaveMemberReq()
+ {
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, C2SClanClanLeaveMemberReq obj)
+ {
+ }
+
+ public override C2SClanClanLeaveMemberReq Read(IBuffer buffer)
+ {
+ C2SClanClanLeaveMemberReq obj = new C2SClanClanLeaveMemberReq();
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanNegotiateMasterReq.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanNegotiateMasterReq.cs
new file mode 100644
index 000000000..7057c5700
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanNegotiateMasterReq.cs
@@ -0,0 +1,31 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class C2SClanClanNegotiateMasterReq : IPacketStructure
+ {
+ public PacketId Id => PacketId.C2S_CLAN_CLAN_NEGOTIATE_MASTER_REQ;
+
+ public uint CharacterId { get; set; }
+
+ public C2SClanClanNegotiateMasterReq()
+ {
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, C2SClanClanNegotiateMasterReq obj)
+ {
+ WriteUInt32(buffer, obj.CharacterId);
+ }
+
+ public override C2SClanClanNegotiateMasterReq Read(IBuffer buffer)
+ {
+ C2SClanClanNegotiateMasterReq obj = new C2SClanClanNegotiateMasterReq();
+ obj.CharacterId = ReadUInt32(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanScoutEntryGetInviteListReq.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanScoutEntryGetInviteListReq.cs
new file mode 100644
index 000000000..901fa22af
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanScoutEntryGetInviteListReq.cs
@@ -0,0 +1,23 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class C2SClanClanScoutEntryGetInviteListReq : IPacketStructure
+ {
+ public PacketId Id => PacketId.C2S_CLAN_CLAN_SCOUT_ENTRY_GET_INVITE_LIST_REQ;
+
+ public class Serializer : PacketEntitySerializer
+ {
+
+ public override void Write(IBuffer buffer, C2SClanClanScoutEntryGetInviteListReq obj)
+ {
+ }
+
+ public override C2SClanClanScoutEntryGetInviteListReq Read(IBuffer buffer)
+ {
+ return new C2SClanClanScoutEntryGetInviteListReq();
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanScoutEntryGetInvitedListReq.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanScoutEntryGetInvitedListReq.cs
new file mode 100644
index 000000000..53d1e3f71
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanScoutEntryGetInvitedListReq.cs
@@ -0,0 +1,28 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class C2SClanClanScoutEntryGetInvitedListReq : IPacketStructure
+ {
+ public PacketId Id => PacketId.C2S_CLAN_CLAN_SCOUT_ENTRY_GET_INVITED_LIST_REQ;
+
+ public C2SClanClanScoutEntryGetInvitedListReq()
+ {
+
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, C2SClanClanScoutEntryGetInvitedListReq obj)
+ {
+ }
+
+ public override C2SClanClanScoutEntryGetInvitedListReq Read(IBuffer buffer)
+ {
+ C2SClanClanScoutEntryGetInvitedListReq obj = new C2SClanClanScoutEntryGetInvitedListReq();
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanScoutEntryGetMyReq.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanScoutEntryGetMyReq.cs
new file mode 100644
index 000000000..115bc58ad
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanScoutEntryGetMyReq.cs
@@ -0,0 +1,32 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class C2SClanClanScoutEntryGetMyReq : IPacketStructure
+ {
+ public PacketId Id => PacketId.C2S_CLAN_CLAN_SCOUT_ENTRY_GET_MY_REQ;
+
+ public C2SClanClanScoutEntryGetMyReq()
+ {
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, C2SClanClanScoutEntryGetMyReq obj)
+ {
+ }
+
+ public override C2SClanClanScoutEntryGetMyReq Read(IBuffer buffer)
+ {
+ C2SClanClanScoutEntryGetMyReq obj = new C2SClanClanScoutEntryGetMyReq();
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanScoutEntrySearchReq.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanScoutEntrySearchReq.cs
new file mode 100644
index 000000000..2d3e7b08f
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanScoutEntrySearchReq.cs
@@ -0,0 +1,23 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class C2SClanClanScoutEntrySearchReq : IPacketStructure
+ {
+ public PacketId Id => PacketId.C2S_CLAN_CLAN_SCOUT_ENTRY_SEARCH_REQ;
+
+ public class Serializer : PacketEntitySerializer
+ {
+
+ public override void Write(IBuffer buffer, C2SClanClanScoutEntrySearchReq obj)
+ {
+ }
+
+ public override C2SClanClanScoutEntrySearchReq Read(IBuffer buffer)
+ {
+ return new C2SClanClanScoutEntrySearchReq();
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanSearchReq.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanSearchReq.cs
new file mode 100644
index 000000000..9d8e556b5
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanSearchReq.cs
@@ -0,0 +1,33 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Entity.Structure;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class C2SClanClanSearchReq : IPacketStructure
+ {
+ public PacketId Id => PacketId.C2S_CLAN_CLAN_SEARCH_REQ;
+
+ public CDataClanSearchParam SearchParam { get; set; }
+
+ public C2SClanClanSearchReq()
+ {
+ SearchParam = new CDataClanSearchParam();
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, C2SClanClanSearchReq obj)
+ {
+ WriteEntity(buffer, obj.SearchParam);
+ }
+
+ public override C2SClanClanSearchReq Read(IBuffer buffer)
+ {
+ C2SClanClanSearchReq obj = new C2SClanClanSearchReq();
+ obj.SearchParam = ReadEntity(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanSetMemberRankReq.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanSetMemberRankReq.cs
new file mode 100644
index 000000000..3f1f9d1a4
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanSetMemberRankReq.cs
@@ -0,0 +1,34 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class C2SClanClanSetMemberRankReq : IPacketStructure
+ {
+ public PacketId Id => PacketId.C2S_CLAN_CLAN_SET_MEMBER_RANK_REQ;
+
+ public uint CharacterId { get; set; }
+ public uint Rank { get; set; }
+ public uint Permission { get; set; }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, C2SClanClanSetMemberRankReq obj)
+ {
+ WriteUInt32(buffer, obj.CharacterId);
+ WriteUInt32(buffer, obj.Rank);
+ WriteUInt32(buffer, obj.Permission);
+ }
+
+ public override C2SClanClanSetMemberRankReq Read(IBuffer buffer)
+ {
+ C2SClanClanSetMemberRankReq obj = new C2SClanClanSetMemberRankReq();
+ obj.CharacterId = ReadUInt32(buffer);
+ obj.Rank = ReadUInt32(buffer);
+ obj.Permission = ReadUInt32(buffer);
+
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanSettingUpdateReq.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanSettingUpdateReq.cs
new file mode 100644
index 000000000..72602b0e3
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanSettingUpdateReq.cs
@@ -0,0 +1,27 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class C2SClanClanSettingUpdateReq : IPacketStructure
+ {
+ public PacketId Id => PacketId.C2S_CLAN_CLAN_SETTING_UPDATE_REQ;
+
+ public C2SClanClanSettingUpdateReq()
+ {
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, C2SClanClanSettingUpdateReq obj)
+ {
+ }
+
+ public override C2SClanClanSettingUpdateReq Read(IBuffer buffer)
+ {
+ C2SClanClanSettingUpdateReq obj = new C2SClanClanSettingUpdateReq();
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanUpdateReq.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanUpdateReq.cs
new file mode 100644
index 000000000..027fd7e17
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/C2SClanClanUpdateReq.cs
@@ -0,0 +1,33 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Entity.Structure;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class C2SClanClanUpdateReq : IPacketStructure
+ {
+ public PacketId Id => PacketId.C2S_CLAN_CLAN_UPDATE_REQ;
+
+ public CDataClanUserParam CreateParam { get; set; }
+
+ public C2SClanClanUpdateReq()
+ {
+ CreateParam = new CDataClanUserParam();
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, C2SClanClanUpdateReq obj)
+ {
+ WriteEntity(buffer, obj.CreateParam);
+ }
+
+ public override C2SClanClanUpdateReq Read(IBuffer buffer)
+ {
+ C2SClanClanUpdateReq obj = new C2SClanClanUpdateReq();
+ obj.CreateParam = ReadEntity(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanBaseGetInfoRes.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanBaseGetInfoRes.cs
index efcd85d3d..4abd59dd5 100644
--- a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanBaseGetInfoRes.cs
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanBaseGetInfoRes.cs
@@ -1,27 +1,57 @@
using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Entity.Structure;
using Arrowgene.Ddon.Shared.Network;
+using System.Collections.Generic;
namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
{
- public class S2CClanClanBaseGetInfoRes : IPacketStructure
+ public class S2CClanClanBaseGetInfoRes : ServerResponse
{
- public PacketId Id => PacketId.S2C_CLAN_CLAN_BASE_GET_INFO_RES;
+ public override PacketId Id => PacketId.S2C_CLAN_CLAN_BASE_GET_INFO_RES;
+
+ public List FunctionReleaseIds { get; set; }
+ public List DungeonReleaseIds { get; set; }
+ public CDataPawnExpeditionInfo PawnExpeditionInfo { get; set; }
+ public CDataClanPartnerPawnInfo PartnerPawnInfo { get; set; }
+ public CDataClanConciergeInfo ConciergeInfo { get; set; }
+ public List ShopLineupNameList { get; set; }
+ public List ClanValueInfoList { get; set; }
public class Serializer : PacketEntitySerializer
{
public override void Write(IBuffer buffer, S2CClanClanBaseGetInfoRes obj)
{
- WriteByteArray(buffer, obj.BaseData);
+#if false
+ WriteByteArray(buffer, BaseData);
+#endif
+
+ WriteServerResponse(buffer, obj);
+ WriteEntityList(buffer, obj.FunctionReleaseIds);
+ WriteEntityList(buffer, obj.DungeonReleaseIds);
+ WriteEntity(buffer, obj.PawnExpeditionInfo);
+ WriteEntity(buffer, obj.PartnerPawnInfo);
+ WriteEntity(buffer, obj.ConciergeInfo);
+ WriteEntityList(buffer, obj.ShopLineupNameList);
+ WriteEntityList(buffer, obj.ClanValueInfoList);
}
public override S2CClanClanBaseGetInfoRes Read(IBuffer buffer)
{
S2CClanClanBaseGetInfoRes obj = new S2CClanClanBaseGetInfoRes();
+ ReadServerResponse(buffer, obj);
+
+ obj.FunctionReleaseIds = ReadEntityList(buffer);
+ obj.DungeonReleaseIds = ReadEntityList(buffer);
+ obj.PawnExpeditionInfo = ReadEntity(buffer);
+ obj.PartnerPawnInfo = ReadEntity(buffer);
+ obj.ConciergeInfo = ReadEntity(buffer);
+ obj.ShopLineupNameList = ReadEntityList(buffer);
+ obj.ClanValueInfoList = ReadEntityList(buffer);
return obj;
}
}
- private readonly byte[] BaseData =
+ private readonly byte[] BaseData =
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x05,
0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02,
@@ -172,6 +202,5 @@ public override S2CClanClanBaseGetInfoRes Read(IBuffer buffer)
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xCF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x52, 0x8B, 0x00, 0x00, 0x00, 0x00, 0x3C
};
-
}
}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanBaseReleaseStateUpdateNtc.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanBaseReleaseStateUpdateNtc.cs
new file mode 100644
index 000000000..548a76ddf
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanBaseReleaseStateUpdateNtc.cs
@@ -0,0 +1,29 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanBaseReleaseStateUpdateNtc : IPacketStructure
+ {
+ public PacketId Id => PacketId.S2C_CLAN_CLAN_BASE_RELEASE_STATE_UPDATE_NTC;
+
+ public byte State;
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanBaseReleaseStateUpdateNtc obj)
+ {
+ WriteByte(buffer, obj.State);
+ }
+
+ public override S2CClanClanBaseReleaseStateUpdateNtc Read(IBuffer buffer)
+ {
+ S2CClanClanBaseReleaseStateUpdateNtc obj = new S2CClanClanBaseReleaseStateUpdateNtc();
+
+ obj.State = ReadByte(buffer);
+
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanCreateRes.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanCreateRes.cs
new file mode 100644
index 000000000..1136b4b85
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanCreateRes.cs
@@ -0,0 +1,40 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Entity.Structure;
+using Arrowgene.Ddon.Shared.Network;
+using System.Collections.Generic;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanCreateRes : ServerResponse
+ {
+ public override PacketId Id => PacketId.S2C_CLAN_CLAN_CREATE_RES;
+
+ public S2CClanClanCreateRes()
+ {
+ ClanParam = new CDataClanParam();
+ MemberList = new List();
+ }
+
+ public CDataClanParam ClanParam { get; set; }
+ public List MemberList { get; set; }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanCreateRes obj)
+ {
+ WriteServerResponse(buffer, obj);
+ WriteEntity(buffer, obj.ClanParam);
+ WriteEntityList(buffer, obj.MemberList);
+ }
+
+ public override S2CClanClanCreateRes Read(IBuffer buffer)
+ {
+ S2CClanClanCreateRes obj = new S2CClanClanCreateRes();
+ ReadServerResponse(buffer, obj);
+ obj.ClanParam = ReadEntity(buffer);
+ obj.MemberList = ReadEntityList(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanExpelMemberRes.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanExpelMemberRes.cs
new file mode 100644
index 000000000..dc3711bae
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanExpelMemberRes.cs
@@ -0,0 +1,25 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanExpelMemberRes : ServerResponse
+ {
+ public override PacketId Id => PacketId.S2C_CLAN_CLAN_EXPEL_MEMBER_RES;
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanExpelMemberRes obj)
+ {
+ WriteServerResponse(buffer, obj);
+ }
+
+ public override S2CClanClanExpelMemberRes Read(IBuffer buffer)
+ {
+ S2CClanClanExpelMemberRes obj = new S2CClanClanExpelMemberRes();
+ ReadServerResponse(buffer, obj);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanGetHistoryRes.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanGetHistoryRes.cs
new file mode 100644
index 000000000..e36910d9c
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanGetHistoryRes.cs
@@ -0,0 +1,36 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Entity.Structure;
+using Arrowgene.Ddon.Shared.Network;
+using System.Collections.Generic;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanGetHistoryRes : ServerResponse
+ {
+ public override PacketId Id => PacketId.S2C_CLAN_CLAN_GET_HISTORY_RES;
+
+ public S2CClanClanGetHistoryRes()
+ {
+ ClanHistoryList = new List();
+ }
+
+ public List ClanHistoryList { get; set; }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanGetHistoryRes obj)
+ {
+ WriteServerResponse(buffer, obj);
+ WriteEntityList(buffer, obj.ClanHistoryList);
+ }
+
+ public override S2CClanClanGetHistoryRes Read(IBuffer buffer)
+ {
+ S2CClanClanGetHistoryRes obj = new S2CClanClanGetHistoryRes();
+ ReadServerResponse(buffer, obj);
+ obj.ClanHistoryList = ReadEntityList(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanGetInfoRes.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanGetInfoRes.cs
new file mode 100644
index 000000000..3e03511fc
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanGetInfoRes.cs
@@ -0,0 +1,34 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Entity.Structure;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanGetInfoRes : ServerResponse
+ {
+ public override PacketId Id => PacketId.S2C_CLAN_CLAN_GET_INFO_RES;
+
+ public S2CClanClanGetInfoRes()
+ {
+ ClanParam = new CDataClanParam();
+ }
+ public CDataClanParam ClanParam { get; set; }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanGetInfoRes obj)
+ {
+ WriteServerResponse(buffer, obj);
+ WriteEntity(buffer, obj.ClanParam);
+ }
+
+ public override S2CClanClanGetInfoRes Read(IBuffer buffer)
+ {
+ S2CClanClanGetInfoRes obj = new S2CClanClanGetInfoRes();
+ ReadServerResponse(buffer, obj);
+ obj.ClanParam = ReadEntity(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanGetJoinRequestedListRes.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanGetJoinRequestedListRes.cs
new file mode 100644
index 000000000..53730603e
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanGetJoinRequestedListRes.cs
@@ -0,0 +1,36 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Entity.Structure;
+using Arrowgene.Ddon.Shared.Network;
+using System.Collections.Generic;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanGetJoinRequestedListRes : ServerResponse
+ {
+ public override PacketId Id => PacketId.S2C_CLAN_CLAN_GET_JOIN_REQUESTED_LIST_RES;
+
+ public S2CClanClanGetJoinRequestedListRes()
+ {
+ JoinReqList = new List();
+ }
+
+ public List JoinReqList;
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanGetJoinRequestedListRes obj)
+ {
+ WriteServerResponse(buffer, obj);
+ WriteEntityList(buffer, obj.JoinReqList);
+ }
+
+ public override S2CClanClanGetJoinRequestedListRes Read(IBuffer buffer)
+ {
+ S2CClanClanGetJoinRequestedListRes obj = new S2CClanClanGetJoinRequestedListRes();
+ ReadServerResponse(buffer, obj);
+ obj.JoinReqList = ReadEntityList(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanGetMemberListRes.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanGetMemberListRes.cs
new file mode 100644
index 000000000..a6e4e27ac
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanGetMemberListRes.cs
@@ -0,0 +1,36 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Entity.Structure;
+using Arrowgene.Ddon.Shared.Network;
+using System.Collections.Generic;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanGetMemberListRes : ServerResponse
+ {
+ public override PacketId Id => PacketId.S2C_CLAN_CLAN_GET_MEMBER_LIST_RES;
+
+ public S2CClanClanGetMemberListRes()
+ {
+ MemberList = new List();
+ }
+
+ public List MemberList { get; set; }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanGetMemberListRes obj)
+ {
+ WriteServerResponse(buffer, obj);
+ WriteEntityList(buffer, obj.MemberList);
+ }
+
+ public override S2CClanClanGetMemberListRes Read(IBuffer buffer)
+ {
+ S2CClanClanGetMemberListRes obj = new S2CClanClanGetMemberListRes();
+ ReadServerResponse(buffer, obj);
+ obj.MemberList = ReadEntityList(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanGetMyInfoRes.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanGetMyInfoRes.cs
index 902060004..3ab5a3273 100644
--- a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanGetMyInfoRes.cs
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanGetMyInfoRes.cs
@@ -10,10 +10,9 @@ public class S2CClanClanGetMyInfoRes : ServerResponse
public S2CClanClanGetMyInfoRes()
{
- CreateParam = new CDataClanParam();
+ ClanParam = new CDataClanParam();
}
-
- public CDataClanParam CreateParam { get; set; }
+ public CDataClanParam ClanParam { get; set; }
public long LeaveTime { get; set; }
public class Serializer : PacketEntitySerializer
@@ -21,7 +20,7 @@ public class Serializer : PacketEntitySerializer
public override void Write(IBuffer buffer, S2CClanClanGetMyInfoRes obj)
{
WriteServerResponse(buffer, obj);
- WriteEntity(buffer, obj.CreateParam);
+ WriteEntity(buffer, obj.ClanParam);
WriteInt64(buffer, obj.LeaveTime);
}
@@ -29,10 +28,10 @@ public override S2CClanClanGetMyInfoRes Read(IBuffer buffer)
{
S2CClanClanGetMyInfoRes obj = new S2CClanClanGetMyInfoRes();
ReadServerResponse(buffer, obj);
- obj.CreateParam = ReadEntity(buffer);
+ obj.ClanParam = ReadEntity(buffer);
obj.LeaveTime = ReadInt64(buffer);
return obj;
}
}
}
-}
\ No newline at end of file
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanGetMyJoinRequestListRes.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanGetMyJoinRequestListRes.cs
new file mode 100644
index 000000000..11aad93d2
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanGetMyJoinRequestListRes.cs
@@ -0,0 +1,36 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Entity.Structure;
+using Arrowgene.Ddon.Shared.Network;
+using System.Collections.Generic;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanGetMyJoinRequestListRes : ServerResponse
+ {
+ public override PacketId Id => PacketId.S2C_CLAN_CLAN_GET_MY_JOIN_REQUEST_LIST_RES;
+
+ public S2CClanClanGetMyJoinRequestListRes()
+ {
+ JoinInfo = new List();
+ }
+
+ public List JoinInfo { get; set; }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanGetMyJoinRequestListRes obj)
+ {
+ WriteServerResponse(buffer, obj);
+ WriteEntityList(buffer, obj.JoinInfo);
+ }
+
+ public override S2CClanClanGetMyJoinRequestListRes Read(IBuffer buffer)
+ {
+ S2CClanClanGetMyJoinRequestListRes obj = new S2CClanClanGetMyJoinRequestListRes();
+ ReadServerResponse(buffer, obj);
+ obj.JoinInfo = ReadEntityList(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanGetMyMemberListRes.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanGetMyMemberListRes.cs
index ee451e49b..62b0d8b36 100644
--- a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanGetMyMemberListRes.cs
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanGetMyMemberListRes.cs
@@ -1,5 +1,7 @@
using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Entity.Structure;
using Arrowgene.Ddon.Shared.Network;
+using System.Collections.Generic;
namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
{
@@ -9,46 +11,24 @@ public class S2CClanClanGetMyMemberListRes : ServerResponse
public S2CClanClanGetMyMemberListRes()
{
- CharacterId = 0;
- FirstName = "";
- LastName = "";
+ MemberList = new List();
}
- public uint CharacterId { get; set; }
- public string FirstName { get; set; }
- public string LastName { get; set; }
-
+ public List MemberList;
public class Serializer : PacketEntitySerializer
{
public override void Write(IBuffer buffer, S2CClanClanGetMyMemberListRes obj)
{
WriteServerResponse(buffer, obj);
- WriteUInt32(buffer, 1);
- WriteByteArray(buffer, new byte[]{ 0x0, 0x0, 0x0, 0x1,
- 0x0, 0x0, 0x0, 0x0, 0x5C, 0x68, 0x7C, 0xB8, 0x0, 0x0, 0x0, 0x0, 0x5D, 0x9A, 0x1B, 0xE4,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1F, 0xFE,}
- );
- WriteUInt32(buffer, obj.CharacterId);
- WriteMtString(buffer, obj.FirstName);
- WriteMtString(buffer, obj.LastName);
- WriteMtString(buffer, "Clan");
- WriteByteArray(buffer, new byte[]{ 0x0, 0x5, 0x1, 0x5, 0x78, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x5C, 0x68, 0x9B, 0x34, 0x0, 0x0}
- );
-
+ WriteEntityList(buffer, obj.MemberList);
}
public override S2CClanClanGetMyMemberListRes Read(IBuffer buffer)
{
S2CClanClanGetMyMemberListRes obj = new S2CClanClanGetMyMemberListRes();
ReadServerResponse(buffer, obj);
- obj.CharacterId = ReadUInt32(buffer);
- obj.CharacterId = ReadUInt32(buffer);
- ReadUInt32(buffer);
- ReadUInt32(buffer);
- obj.FirstName = ReadMtString(buffer);
- obj.LastName = ReadMtString(buffer);
+ obj.MemberList = ReadEntityList(buffer);
return obj;
}
}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanInviteAcceptRes.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanInviteAcceptRes.cs
new file mode 100644
index 000000000..1e467b8f0
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanInviteAcceptRes.cs
@@ -0,0 +1,25 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanInviteAcceptRes : ServerResponse
+ {
+ public override PacketId Id => PacketId.S2C_CLAN_CLAN_INVITE_ACCEPT_RES;
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanInviteAcceptRes obj)
+ {
+ WriteServerResponse(buffer, obj);
+ }
+
+ public override S2CClanClanInviteAcceptRes Read(IBuffer buffer)
+ {
+ S2CClanClanInviteAcceptRes obj = new S2CClanClanInviteAcceptRes();
+ ReadServerResponse(buffer, obj);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanInviteNtc.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanInviteNtc.cs
new file mode 100644
index 000000000..357b3399c
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanInviteNtc.cs
@@ -0,0 +1,42 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Entity.Structure;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanInviteNtc : IPacketStructure
+ {
+ public PacketId Id => PacketId.S2C_CLAN_CLAN_INVITE_NTC;
+
+ public uint ClanId;
+ public string ClanName;
+ public CDataCharacterListElement CharacterListElement;
+
+ public S2CClanClanInviteNtc()
+ {
+ ClanName = string.Empty;
+ CharacterListElement = new CDataCharacterListElement();
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanInviteNtc obj)
+ {
+ WriteUInt32(buffer, obj.ClanId);
+ WriteMtString(buffer, obj.ClanName);
+ WriteEntity(buffer, obj.CharacterListElement);
+ }
+
+ public override S2CClanClanInviteNtc Read(IBuffer buffer)
+ {
+ S2CClanClanInviteNtc obj = new S2CClanClanInviteNtc();
+
+ obj.ClanId = ReadUInt32(buffer);
+ obj.ClanName = ReadMtString(buffer);
+ obj.CharacterListElement = ReadEntity(buffer);
+
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanInviteRes.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanInviteRes.cs
new file mode 100644
index 000000000..bdb4da1bf
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanInviteRes.cs
@@ -0,0 +1,25 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanInviteRes : ServerResponse
+ {
+ public override PacketId Id => PacketId.S2C_CLAN_CLAN_INVITE_RES;
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanInviteRes obj)
+ {
+ WriteServerResponse(buffer, obj);
+ }
+
+ public override S2CClanClanInviteRes Read(IBuffer buffer)
+ {
+ S2CClanClanInviteRes obj = new S2CClanClanInviteRes();
+ ReadServerResponse(buffer, obj);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanJoinDisapproveNtc.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanJoinDisapproveNtc.cs
new file mode 100644
index 000000000..bdfea4b5a
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanJoinDisapproveNtc.cs
@@ -0,0 +1,35 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Entity.Structure;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanJoinDisapproveNtc : IPacketStructure
+ {
+ public PacketId Id => PacketId.S2C_CLAN_CLAN_JOIN_DISAPPROVE_NTC;
+
+ public CDataClanJoinRequest JoinReq;
+
+ public S2CClanClanJoinDisapproveNtc()
+ {
+ JoinReq = new();
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanJoinDisapproveNtc obj)
+ {
+ WriteEntity(buffer, obj.JoinReq);
+ }
+
+ public override S2CClanClanJoinDisapproveNtc Read(IBuffer buffer)
+ {
+ S2CClanClanJoinDisapproveNtc obj = new S2CClanClanJoinDisapproveNtc();
+
+ obj.JoinReq = ReadEntity(buffer);
+
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanJoinMemberNtc.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanJoinMemberNtc.cs
new file mode 100644
index 000000000..8790b9541
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanJoinMemberNtc.cs
@@ -0,0 +1,38 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Entity.Structure;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanJoinMemberNtc : IPacketStructure
+ {
+ public PacketId Id => PacketId.S2C_CLAN_CLAN_JOIN_MEMBER_NTC;
+
+ public uint ClanId;
+ public CDataClanMemberInfo MemberInfo;
+
+ public S2CClanClanJoinMemberNtc()
+ {
+ MemberInfo = new CDataClanMemberInfo();
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanJoinMemberNtc obj)
+ {
+ WriteUInt32(buffer, obj.ClanId);
+ WriteEntity(buffer, obj.MemberInfo);
+ }
+
+ public override S2CClanClanJoinMemberNtc Read(IBuffer buffer)
+ {
+ S2CClanClanJoinMemberNtc obj = new S2CClanClanJoinMemberNtc();
+
+ obj.ClanId = ReadUInt32(buffer);
+ obj.MemberInfo = ReadEntity(buffer);
+
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanJoinNtc.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanJoinNtc.cs
new file mode 100644
index 000000000..88506ce28
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanJoinNtc.cs
@@ -0,0 +1,29 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanJoinNtc : IPacketStructure
+ {
+ public PacketId Id => PacketId.S2C_CLAN_CLAN_JOIN_NTC;
+
+ public uint CharacterId;
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanJoinNtc obj)
+ {
+ WriteUInt32(buffer, obj.CharacterId);
+ }
+
+ public override S2CClanClanJoinNtc Read(IBuffer buffer)
+ {
+ S2CClanClanJoinNtc obj = new S2CClanClanJoinNtc();
+
+ obj.CharacterId = ReadUInt32(buffer);
+
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanJoinSelfNtc.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanJoinSelfNtc.cs
new file mode 100644
index 000000000..b318fa4a7
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanJoinSelfNtc.cs
@@ -0,0 +1,45 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Entity.Structure;
+using Arrowgene.Ddon.Shared.Network;
+using System.Collections.Generic;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanJoinSelfNtc : IPacketStructure
+ {
+ public PacketId Id => PacketId.S2C_CLAN_CLAN_JOIN_SELF_NTC;
+
+
+ public CDataClanParam ClanParam;
+ public CDataClanMemberInfo SelfInfo;
+ public List MemberList;
+
+ public S2CClanClanJoinSelfNtc()
+ {
+ ClanParam = new();
+ SelfInfo = new();
+ MemberList = new();
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanJoinSelfNtc obj)
+ {
+ WriteEntity(buffer, obj.ClanParam);
+ WriteEntity(buffer, obj.SelfInfo);
+ WriteEntityList(buffer, obj.MemberList);
+ }
+
+ public override S2CClanClanJoinSelfNtc Read(IBuffer buffer)
+ {
+ S2CClanClanJoinSelfNtc obj = new S2CClanClanJoinSelfNtc();
+
+ obj.ClanParam = ReadEntity(buffer);
+ obj.SelfInfo = ReadEntity(buffer);
+ obj.MemberList = ReadEntityList(buffer);
+
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanLeaveMemberNtc.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanLeaveMemberNtc.cs
new file mode 100644
index 000000000..7cbd093de
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanLeaveMemberNtc.cs
@@ -0,0 +1,36 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Entity.Structure;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanLeaveMemberNtc : IPacketStructure
+ {
+ public PacketId Id => PacketId.S2C_CLAN_CLAN_LEAVE_MEMBER_NTC;
+
+ public S2CClanClanLeaveMemberNtc()
+ {
+ CharacterListElement = new CDataCharacterListElement();
+ }
+
+ public uint ClanId { get; set; }
+ public CDataCharacterListElement CharacterListElement { get; set; }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanLeaveMemberNtc obj)
+ {
+ WriteUInt32(buffer, obj.ClanId);
+ WriteEntity(buffer, obj.CharacterListElement);
+ }
+
+ public override S2CClanClanLeaveMemberNtc Read(IBuffer buffer)
+ {
+ S2CClanClanLeaveMemberNtc obj = new S2CClanClanLeaveMemberNtc();
+ obj.ClanId = ReadUInt32(buffer);
+ obj.CharacterListElement = ReadEntity(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanLeaveMemberRes.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanLeaveMemberRes.cs
new file mode 100644
index 000000000..fb5ff67a4
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanLeaveMemberRes.cs
@@ -0,0 +1,29 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanLeaveMemberRes : ServerResponse
+ {
+ public override PacketId Id => PacketId.S2C_CLAN_CLAN_LEAVE_MEMBER_RES;
+
+ public S2CClanClanLeaveMemberRes()
+ {
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanLeaveMemberRes obj)
+ {
+ WriteServerResponse(buffer, obj);
+ }
+
+ public override S2CClanClanLeaveMemberRes Read(IBuffer buffer)
+ {
+ S2CClanClanLeaveMemberRes obj = new S2CClanClanLeaveMemberRes();
+ ReadServerResponse(buffer, obj);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanLevelUpNtc.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanLevelUpNtc.cs
new file mode 100644
index 000000000..da8c3eb7d
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanLevelUpNtc.cs
@@ -0,0 +1,32 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanLevelUpNtc : IPacketStructure
+ {
+ public PacketId Id => PacketId.S2C_CLAN_CLAN_LEVEL_UP_NTC;
+
+ public uint ClanLevel;
+ public uint NextClanPoint;
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanLevelUpNtc obj)
+ {
+ WriteUInt32(buffer, obj.ClanLevel);
+ WriteUInt32(buffer, obj.NextClanPoint);
+ }
+
+ public override S2CClanClanLevelUpNtc Read(IBuffer buffer)
+ {
+ S2CClanClanLevelUpNtc obj = new S2CClanClanLevelUpNtc();
+
+ obj.ClanLevel = ReadUInt32(buffer);
+ obj.NextClanPoint = ReadUInt32(buffer);
+
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanNegotiateMasterNtc.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanNegotiateMasterNtc.cs
new file mode 100644
index 000000000..69ede9ccd
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanNegotiateMasterNtc.cs
@@ -0,0 +1,31 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Entity.Structure;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanNegotiateMasterNtc : IPacketStructure
+ {
+ public PacketId Id => PacketId.S2C_CLAN_CLAN_NEGOTIATE_MASTER_NTC;
+
+ public uint ClanId { get; set; }
+ public CDataClanMemberInfo MemberInfo { get; set; }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanNegotiateMasterNtc obj)
+ {
+ WriteUInt32(buffer, obj.ClanId);
+ WriteEntity(buffer, obj.MemberInfo);
+ }
+
+ public override S2CClanClanNegotiateMasterNtc Read(IBuffer buffer)
+ {
+ S2CClanClanNegotiateMasterNtc obj = new S2CClanClanNegotiateMasterNtc();
+ obj.ClanId = ReadUInt32(buffer);
+ obj.MemberInfo = ReadEntity(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanNegotiateMasterRes.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanNegotiateMasterRes.cs
new file mode 100644
index 000000000..0730c6ec5
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanNegotiateMasterRes.cs
@@ -0,0 +1,29 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanNegotiateMasterRes : ServerResponse
+ {
+ public override PacketId Id => PacketId.S2C_CLAN_CLAN_NEGOTIATE_MASTER_RES;
+
+ public uint MemberId { get; set; }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanNegotiateMasterRes obj)
+ {
+ WriteServerResponse(buffer, obj);
+ WriteUInt32(buffer, obj.MemberId);
+ }
+
+ public override S2CClanClanNegotiateMasterRes Read(IBuffer buffer)
+ {
+ S2CClanClanNegotiateMasterRes obj = new S2CClanClanNegotiateMasterRes();
+ ReadServerResponse(buffer, obj);
+ obj.MemberId = ReadUInt32(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanPointAddNtc.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanPointAddNtc.cs
new file mode 100644
index 000000000..0203cfc79
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanPointAddNtc.cs
@@ -0,0 +1,36 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanPointAddNtc : IPacketStructure
+ {
+ public PacketId Id => PacketId.S2C_CLAN_CLAN_POINT_ADD_NTC;
+
+ public uint ClanPoint;
+ public uint TotalClanPoint;
+ public uint MoneyClanPoint;
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanPointAddNtc obj)
+ {
+ WriteUInt32(buffer, obj.ClanPoint);
+ WriteUInt32(buffer, obj.TotalClanPoint);
+ WriteUInt32(buffer, obj.MoneyClanPoint);
+
+ }
+
+ public override S2CClanClanPointAddNtc Read(IBuffer buffer)
+ {
+ S2CClanClanPointAddNtc obj = new S2CClanClanPointAddNtc();
+
+ obj.ClanPoint = ReadUInt32(buffer);
+ obj.TotalClanPoint = ReadUInt32(buffer);
+ obj.MoneyClanPoint = ReadUInt32(buffer);
+
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanQuestClearNtc.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanQuestClearNtc.cs
new file mode 100644
index 000000000..c04b0bcd3
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanQuestClearNtc.cs
@@ -0,0 +1,29 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanQuestClearNtc : IPacketStructure
+ {
+ public PacketId Id => PacketId.S2C_CLAN_CLAN_QUEST_CLEAR_NTC;
+
+ public uint QuestId;
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanQuestClearNtc obj)
+ {
+ WriteUInt32(buffer, obj.QuestId);
+ }
+
+ public override S2CClanClanQuestClearNtc Read(IBuffer buffer)
+ {
+ S2CClanClanQuestClearNtc obj = new S2CClanClanQuestClearNtc();
+
+ obj.QuestId = ReadUInt32(buffer);
+
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanScoutEntryDisapproveInviteNtc.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanScoutEntryDisapproveInviteNtc.cs
new file mode 100644
index 000000000..8762b87bf
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanScoutEntryDisapproveInviteNtc.cs
@@ -0,0 +1,29 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanScoutEntryDisapproveInviteNtc : IPacketStructure
+ {
+ public PacketId Id => PacketId.S2C_CLAN_CLAN_SCOUT_ENTRY_DISAPPROVE_INVITE_NTC;
+
+ public uint InviteId;
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanScoutEntryDisapproveInviteNtc obj)
+ {
+ WriteUInt32(buffer, obj.InviteId);
+ }
+
+ public override S2CClanClanScoutEntryDisapproveInviteNtc Read(IBuffer buffer)
+ {
+ S2CClanClanScoutEntryDisapproveInviteNtc obj = new S2CClanClanScoutEntryDisapproveInviteNtc();
+
+ obj.InviteId = ReadUInt32(buffer);
+
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanScoutEntryGetInviteListRes.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanScoutEntryGetInviteListRes.cs
new file mode 100644
index 000000000..65ed77422
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanScoutEntryGetInviteListRes.cs
@@ -0,0 +1,36 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Entity.Structure;
+using Arrowgene.Ddon.Shared.Network;
+using System.Collections.Generic;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanScoutEntryGetInviteListRes : ServerResponse
+ {
+ public override PacketId Id => PacketId.S2C_CLAN_CLAN_SCOUT_ENTRY_GET_INVITE_LIST_RES;
+
+ public S2CClanClanScoutEntryGetInviteListRes()
+ {
+ InviteInfo = new List();
+ }
+
+ public List InviteInfo;
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanScoutEntryGetInviteListRes obj)
+ {
+ WriteServerResponse(buffer, obj);
+ WriteEntityList(buffer, obj.InviteInfo);
+ }
+
+ public override S2CClanClanScoutEntryGetInviteListRes Read(IBuffer buffer)
+ {
+ S2CClanClanScoutEntryGetInviteListRes obj = new S2CClanClanScoutEntryGetInviteListRes();
+ ReadServerResponse(buffer, obj);
+ obj.InviteInfo = ReadEntityList(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanScoutEntryGetInvitedListRes.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanScoutEntryGetInvitedListRes.cs
new file mode 100644
index 000000000..0ba36ad6e
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanScoutEntryGetInvitedListRes.cs
@@ -0,0 +1,36 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Entity.Structure;
+using Arrowgene.Ddon.Shared.Network;
+using System.Collections.Generic;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanScoutEntryGetInvitedListRes : ServerResponse
+ {
+ public override PacketId Id => PacketId.S2C_CLAN_CLAN_SCOUT_ENTRY_GET_INVITED_LIST_RES;
+
+ public S2CClanClanScoutEntryGetInvitedListRes()
+ {
+ InviteInfo = new List();
+ }
+
+ public List InviteInfo { get; set; }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanScoutEntryGetInvitedListRes obj)
+ {
+ WriteServerResponse(buffer, obj);
+ WriteEntityList(buffer, obj.InviteInfo);
+ }
+
+ public override S2CClanClanScoutEntryGetInvitedListRes Read(IBuffer buffer)
+ {
+ S2CClanClanScoutEntryGetInvitedListRes obj = new S2CClanClanScoutEntryGetInvitedListRes();
+ ReadServerResponse(buffer, obj);
+ obj.InviteInfo = ReadEntityList(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanScoutEntryGetMyRes.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanScoutEntryGetMyRes.cs
new file mode 100644
index 000000000..fc6310d6b
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanScoutEntryGetMyRes.cs
@@ -0,0 +1,36 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Entity.Structure;
+using Arrowgene.Ddon.Shared.Network;
+using System.Collections.Generic;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanScoutEntryGetMyRes : ServerResponse
+ {
+ public override PacketId Id => PacketId.S2C_CLAN_CLAN_SCOUT_ENTRY_GET_MY_RES;
+
+ public S2CClanClanScoutEntryGetMyRes()
+ {
+ MyEntries = new List();
+ }
+
+ public List MyEntries { get; set; }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanScoutEntryGetMyRes obj)
+ {
+ WriteServerResponse(buffer, obj);
+ WriteEntityList(buffer, obj.MyEntries);
+ }
+
+ public override S2CClanClanScoutEntryGetMyRes Read(IBuffer buffer)
+ {
+ S2CClanClanScoutEntryGetMyRes obj = new S2CClanClanScoutEntryGetMyRes();
+ ReadServerResponse(buffer, obj);
+ obj.MyEntries = ReadEntityList(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanScoutEntrySearchRes.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanScoutEntrySearchRes.cs
new file mode 100644
index 000000000..214bbdff5
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanScoutEntrySearchRes.cs
@@ -0,0 +1,36 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Entity.Structure;
+using Arrowgene.Ddon.Shared.Network;
+using System.Collections.Generic;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanScoutEntrySearchRes : ServerResponse
+ {
+ public override PacketId Id => PacketId.S2C_CLAN_CLAN_SCOUT_ENTRY_SEARCH_RES;
+
+ public S2CClanClanScoutEntrySearchRes()
+ {
+ SearchResult = new List();
+ }
+
+ public List SearchResult;
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanScoutEntrySearchRes obj)
+ {
+ WriteServerResponse(buffer, obj);
+ WriteEntityList(buffer, obj.SearchResult);
+ }
+
+ public override S2CClanClanScoutEntrySearchRes Read(IBuffer buffer)
+ {
+ S2CClanClanScoutEntrySearchRes obj = new S2CClanClanScoutEntrySearchRes();
+ ReadServerResponse(buffer, obj);
+ obj.SearchResult = ReadEntityList(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanSearchRes.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanSearchRes.cs
new file mode 100644
index 000000000..989b77733
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanSearchRes.cs
@@ -0,0 +1,36 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Entity.Structure;
+using Arrowgene.Ddon.Shared.Network;
+using System.Collections.Generic;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanSearchRes : ServerResponse
+ {
+ public override PacketId Id => PacketId.S2C_CLAN_CLAN_SEARCH_RES;
+
+ public S2CClanClanSearchRes()
+ {
+ ClanList = new List();
+ }
+
+ public List ClanList { get; set; }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanSearchRes obj)
+ {
+ WriteServerResponse(buffer, obj);
+ WriteEntityList(buffer, obj.ClanList);
+ }
+
+ public override S2CClanClanSearchRes Read(IBuffer buffer)
+ {
+ S2CClanClanSearchRes obj = new S2CClanClanSearchRes();
+ ReadServerResponse(buffer, obj);
+ obj.ClanList = ReadEntityList(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanSetMemberRankNtc.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanSetMemberRankNtc.cs
new file mode 100644
index 000000000..7a8046a06
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanSetMemberRankNtc.cs
@@ -0,0 +1,37 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanSetMemberRankNtc : IPacketStructure
+ {
+ public PacketId Id => PacketId.S2C_CLAN_CLAN_SET_MEMBER_RANK_NTC;
+
+ public uint ClanId { get; set; }
+ public uint CharacterId { get; set; }
+ public uint Rank { get; set; }
+ public uint Permission { get; set; }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanSetMemberRankNtc obj)
+ {
+ WriteUInt32(buffer, obj.ClanId);
+ WriteUInt32(buffer, obj.CharacterId);
+ WriteUInt32(buffer, obj.Rank);
+ WriteUInt32(buffer, obj.Permission);
+ }
+
+ public override S2CClanClanSetMemberRankNtc Read(IBuffer buffer)
+ {
+ S2CClanClanSetMemberRankNtc obj = new S2CClanClanSetMemberRankNtc();
+ obj.ClanId = ReadUInt32(buffer);
+ obj.CharacterId = ReadUInt32(buffer);
+ obj.Rank = ReadUInt32(buffer);
+ obj.Permission = ReadUInt32(buffer);
+
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanSetMemberRankRes.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanSetMemberRankRes.cs
new file mode 100644
index 000000000..8553f7ed0
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanSetMemberRankRes.cs
@@ -0,0 +1,32 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanSetMemberRankRes : ServerResponse
+ {
+ public override PacketId Id => PacketId.S2C_CLAN_CLAN_SET_MEMBER_RANK_RES;
+
+ public uint MemberId { get; set; }
+ public uint Rank { get; set; }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanSetMemberRankRes obj)
+ {
+ WriteServerResponse(buffer, obj);
+ WriteUInt32(buffer, obj.MemberId);
+ WriteUInt32(buffer, obj.Rank);
+ }
+
+ public override S2CClanClanSetMemberRankRes Read(IBuffer buffer)
+ {
+ S2CClanClanSetMemberRankRes obj = new S2CClanClanSetMemberRankRes();
+ ReadServerResponse(buffer, obj);
+ obj.MemberId = ReadUInt32(buffer);
+ obj.Rank = ReadUInt32(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanSettingUpdateRes.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanSettingUpdateRes.cs
new file mode 100644
index 000000000..10e643fde
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanSettingUpdateRes.cs
@@ -0,0 +1,33 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanSettingUpdateRes : ServerResponse
+ {
+ public override PacketId Id => PacketId.S2C_CLAN_CLAN_SETTING_UPDATE_RES;
+
+ public S2CClanClanSettingUpdateRes()
+ {
+ }
+
+ public bool IsMemberNotice;
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanSettingUpdateRes obj)
+ {
+ WriteServerResponse(buffer, obj);
+ WriteBool(buffer, obj.IsMemberNotice);
+ }
+
+ public override S2CClanClanSettingUpdateRes Read(IBuffer buffer)
+ {
+ S2CClanClanSettingUpdateRes obj = new S2CClanClanSettingUpdateRes();
+ ReadServerResponse(buffer, obj);
+ obj.IsMemberNotice = ReadBool(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanShopBuyItemNtc.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanShopBuyItemNtc.cs
new file mode 100644
index 000000000..5e22db5c9
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanShopBuyItemNtc.cs
@@ -0,0 +1,51 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Entity.Structure;
+using Arrowgene.Ddon.Shared.Network;
+using System.Collections.Generic;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanShopBuyItemNtc : IPacketStructure
+ {
+ public PacketId Id => PacketId.S2C_CLAN_CLAN_SHOP_BUY_ITEM_NTC;
+
+ public List FunctionList { get; set; }
+ public List BuffList { get; set; }
+ public List ConciergeList { get; set; }
+ public CDataCharacterName BuyerName { get; set; }
+ public uint ClanPoint { get; set; }
+
+ public S2CClanClanShopBuyItemNtc()
+ {
+ FunctionList = new();
+ BuffList = new();
+ ConciergeList = new();
+ BuyerName = new();
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanShopBuyItemNtc obj)
+ {
+ WriteEntityList(buffer, obj.FunctionList);
+ WriteEntityList(buffer, obj.BuffList);
+ WriteEntityList(buffer, obj.ConciergeList);
+ WriteEntity(buffer, obj.BuyerName);
+ WriteUInt32(buffer, obj.ClanPoint);
+ }
+
+ public override S2CClanClanShopBuyItemNtc Read(IBuffer buffer)
+ {
+ S2CClanClanShopBuyItemNtc obj = new S2CClanClanShopBuyItemNtc();
+
+ obj.FunctionList = ReadEntityList(buffer);
+ obj.BuffList = ReadEntityList(buffer);
+ obj.ConciergeList = ReadEntityList(buffer);
+ obj.BuyerName = ReadEntity(buffer);
+ obj.ClanPoint = ReadUInt32(buffer);
+
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanUpdateCommonNtc.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanUpdateCommonNtc.cs
new file mode 100644
index 000000000..783b80e53
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanUpdateCommonNtc.cs
@@ -0,0 +1,35 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Entity.Structure;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanUpdateCommonNtc : IPacketStructure
+ {
+ public PacketId Id => PacketId.S2C_CLAN_CLAN_UPDATE_COMMON_NTC;
+
+ public CDataClanNoticePackage Notice;
+
+ public S2CClanClanUpdateCommonNtc()
+ {
+ Notice = new();
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanUpdateCommonNtc obj)
+ {
+ WriteEntity(buffer, obj.Notice);
+ }
+
+ public override S2CClanClanUpdateCommonNtc Read(IBuffer buffer)
+ {
+ S2CClanClanUpdateCommonNtc obj = new S2CClanClanUpdateCommonNtc();
+
+ obj.Notice = ReadEntity(buffer);
+
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanUpdateNtc.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanUpdateNtc.cs
new file mode 100644
index 000000000..50bdb6791
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanUpdateNtc.cs
@@ -0,0 +1,27 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanUpdateNtc : IPacketStructure
+ {
+ public PacketId Id => PacketId.S2C_CLAN_CLAN_UPDATE_NTC;
+
+ public S2CClanClanUpdateNtc()
+ {
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanUpdateNtc obj)
+ {
+ }
+
+ public override S2CClanClanUpdateNtc Read(IBuffer buffer)
+ {
+ S2CClanClanUpdateNtc obj = new S2CClanClanUpdateNtc();
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanUpdateRes.cs b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanUpdateRes.cs
new file mode 100644
index 000000000..bed682478
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CClanClanUpdateRes.cs
@@ -0,0 +1,29 @@
+using Arrowgene.Buffers;
+using Arrowgene.Ddon.Shared.Network;
+
+namespace Arrowgene.Ddon.Shared.Entity.PacketStructure
+{
+ public class S2CClanClanUpdateRes : ServerResponse
+ {
+ public override PacketId Id => PacketId.S2C_CLAN_CLAN_UPDATE_RES;
+
+ public S2CClanClanUpdateRes()
+ {
+ }
+
+ public class Serializer : PacketEntitySerializer
+ {
+ public override void Write(IBuffer buffer, S2CClanClanUpdateRes obj)
+ {
+ WriteServerResponse(buffer, obj);
+ }
+
+ public override S2CClanClanUpdateRes Read(IBuffer buffer)
+ {
+ S2CClanClanUpdateRes obj = new S2CClanClanUpdateRes();
+ ReadServerResponse(buffer, obj);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/Structure/CDataCharacterListInfo.cs b/Arrowgene.Ddon.Shared/Entity/Structure/CDataCharacterListInfo.cs
index 5242bfea6..e40f8dffe 100644
--- a/Arrowgene.Ddon.Shared/Entity/Structure/CDataCharacterListInfo.cs
+++ b/Arrowgene.Ddon.Shared/Entity/Structure/CDataCharacterListInfo.cs
@@ -14,7 +14,6 @@ public CDataCharacterListInfo()
GpCourseValidList = new List();
ClanName = "";
ClanNameShort = "";
- ClanNameShort = "";
IsClanMemberNotice = 0;
}
diff --git a/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanConciergeInfo.cs b/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanConciergeInfo.cs
new file mode 100644
index 000000000..92adb21dc
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanConciergeInfo.cs
@@ -0,0 +1,34 @@
+using Arrowgene.Buffers;
+using System.Collections.Generic;
+
+namespace Arrowgene.Ddon.Shared.Entity.Structure
+{
+ public class CDataClanConciergeInfo
+ {
+ public CDataClanConciergeInfo()
+ {
+ ClanConciergeNpcList = new();
+ }
+
+ public uint NpcId { get; set; }
+ public List ClanConciergeNpcList { get; set; }
+
+
+ public class Serializer : EntitySerializer
+ {
+ public override void Write(IBuffer buffer, CDataClanConciergeInfo obj)
+ {
+ WriteUInt32(buffer, obj.NpcId);
+ WriteEntityList(buffer, obj.ClanConciergeNpcList);
+ }
+
+ public override CDataClanConciergeInfo Read(IBuffer buffer)
+ {
+ CDataClanConciergeInfo obj = new CDataClanConciergeInfo();
+ obj.NpcId = ReadUInt32(buffer);
+ obj.ClanConciergeNpcList = ReadEntityList(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanConciergeNpc.cs b/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanConciergeNpc.cs
new file mode 100644
index 000000000..86c33806c
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanConciergeNpc.cs
@@ -0,0 +1,33 @@
+using Arrowgene.Buffers;
+
+namespace Arrowgene.Ddon.Shared.Entity.Structure
+{
+ public class CDataClanConciergeNpc
+ {
+ public uint NpcId { get; set; }
+ public uint Price { get; set; }
+ public bool IsInit { get; set; }
+ public uint SortId { get; set; }
+
+ public class Serializer : EntitySerializer
+ {
+ public override void Write(IBuffer buffer, CDataClanConciergeNpc obj)
+ {
+ WriteUInt32(buffer, obj.NpcId);
+ WriteUInt32(buffer, obj.Price);
+ WriteBool(buffer, obj.IsInit);
+ WriteUInt32(buffer, obj.SortId);
+ }
+
+ public override CDataClanConciergeNpc Read(IBuffer buffer)
+ {
+ CDataClanConciergeNpc obj = new CDataClanConciergeNpc();
+ obj.NpcId = ReadUInt32(buffer);
+ obj.Price = ReadUInt32(buffer);
+ obj.IsInit = ReadBool(buffer);
+ obj.SortId = ReadUInt32(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanHistoryElement.cs b/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanHistoryElement.cs
new file mode 100644
index 000000000..a49036614
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanHistoryElement.cs
@@ -0,0 +1,49 @@
+using Arrowgene.Buffers;
+
+namespace Arrowgene.Ddon.Shared.Entity.Structure
+{
+ public class CDataClanHistoryElement
+ {
+ public CDataClanHistoryElement()
+ {
+ CharacterName = new CDataCharacterName();
+ FreeText = "";
+ }
+
+ public long Date { get; set; }
+ public byte Type { get; set; }
+ public CDataCharacterName CharacterName { get; set; }
+ public uint Value1 { get; set; }
+ public uint Value2 { get; set; }
+ public uint Value3 { get; set; }
+ public string FreeText { get; set; }
+
+
+ public class Serializer : EntitySerializer
+ {
+ public override void Write(IBuffer buffer, CDataClanHistoryElement obj)
+ {
+ WriteInt64(buffer, obj.Date);
+ WriteByte(buffer, obj.Type);
+ WriteEntity(buffer, obj.CharacterName);
+ WriteUInt32(buffer, obj.Value1);
+ WriteUInt32(buffer, obj.Value2);
+ WriteUInt32(buffer, obj.Value3);
+ WriteMtString(buffer, obj.FreeText);
+ }
+
+ public override CDataClanHistoryElement Read(IBuffer buffer)
+ {
+ CDataClanHistoryElement obj = new CDataClanHistoryElement();
+ obj.Date = ReadInt64(buffer);
+ obj.Type = ReadByte(buffer);
+ obj.CharacterName = ReadEntity(buffer);
+ obj.Value1 = ReadUInt32(buffer);
+ obj.Value2 = ReadUInt32(buffer);
+ obj.Value3 = ReadUInt32(buffer);
+ obj.FreeText = ReadMtString(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanJoinRequest.cs b/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanJoinRequest.cs
new file mode 100644
index 000000000..06c8d5136
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanJoinRequest.cs
@@ -0,0 +1,39 @@
+using Arrowgene.Buffers;
+
+namespace Arrowgene.Ddon.Shared.Entity.Structure
+{
+ public class CDataClanJoinRequest
+ {
+ public CDataClanJoinRequest()
+ {
+ ClanName = "";
+ BaseInfo = new CDataCommunityCharacterBaseInfo();
+ }
+
+ public uint ClanId { get; set; }
+ public string ClanName { get; set; }
+ public CDataCommunityCharacterBaseInfo BaseInfo { get; set; }
+ public long CreateTime { get; set; }
+
+ public class Serializer : EntitySerializer
+ {
+ public override void Write(IBuffer buffer, CDataClanJoinRequest obj)
+ {
+ WriteUInt32(buffer, obj.ClanId);
+ WriteMtString(buffer, obj.ClanName);
+ WriteEntity(buffer, obj.BaseInfo);
+ WriteInt64(buffer, obj.CreateTime);
+ }
+
+ public override CDataClanJoinRequest Read(IBuffer buffer)
+ {
+ CDataClanJoinRequest obj = new CDataClanJoinRequest();
+ obj.ClanId = ReadUInt32(buffer);
+ obj.ClanName = ReadMtString(buffer);
+ obj.BaseInfo = ReadEntity(buffer);
+ obj.CreateTime = ReadInt64(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanMemberInfo.cs b/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanMemberInfo.cs
index 8a08fc963..e8332094b 100644
--- a/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanMemberInfo.cs
+++ b/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanMemberInfo.cs
@@ -1,7 +1,7 @@
-using System.Collections.Generic;
using Arrowgene.Buffers;
-using Arrowgene.Ddon.Shared.Model;
-
+using Arrowgene.Ddon.Shared.Model.Clan;
+using System;
+
namespace Arrowgene.Ddon.Shared.Entity.Structure
{
public class CDataClanMemberInfo
@@ -9,12 +9,15 @@ public class CDataClanMemberInfo
public CDataClanMemberInfo()
{
CharacterListElement = new CDataCharacterListElement();
+ Created = DateTimeOffset.MinValue;
+ LastLoginTime = DateTimeOffset.MinValue;
+ LeaveTime = DateTimeOffset.MinValue;
}
- public uint Rank { get; set; }
- public long Created { get; set; }
- public long LastLoginTime { get; set; }
- public long LeaveTime { get; set; }
+ public ClanMemberRank Rank { get; set; }
+ public DateTimeOffset Created { get; set; }
+ public DateTimeOffset LastLoginTime { get; set; }
+ public DateTimeOffset LeaveTime { get; set; }
public uint Permission { get; set; }
public CDataCharacterListElement CharacterListElement { get; set; }
@@ -22,10 +25,10 @@ public class Serializer : EntitySerializer
{
public override void Write(IBuffer buffer, CDataClanMemberInfo obj)
{
- WriteUInt32(buffer, obj.Rank);
- WriteInt64(buffer, obj.Created);
- WriteInt64(buffer, obj.LastLoginTime);
- WriteInt64(buffer, obj.LeaveTime);
+ WriteUInt32(buffer, (uint)obj.Rank);
+ WriteInt64(buffer, obj.Created.ToUnixTimeSeconds());
+ WriteInt64(buffer, obj.LastLoginTime.ToUnixTimeSeconds());
+ WriteInt64(buffer, obj.LeaveTime.ToUnixTimeSeconds());
WriteUInt32(buffer, obj.Permission);
WriteEntity(buffer, obj.CharacterListElement);
}
@@ -33,14 +36,14 @@ public override void Write(IBuffer buffer, CDataClanMemberInfo obj)
public override CDataClanMemberInfo Read(IBuffer buffer)
{
CDataClanMemberInfo obj = new CDataClanMemberInfo();
- obj.Rank = ReadUInt32(buffer);
- obj.Created = ReadInt64(buffer);
- obj.LastLoginTime = ReadInt64(buffer);
- obj.LeaveTime = ReadInt64(buffer);
+ obj.Rank = (ClanMemberRank)ReadUInt32(buffer);
+ obj.Created = DateTimeOffset.FromUnixTimeSeconds(ReadInt64(buffer));
+ obj.LastLoginTime = DateTimeOffset.FromUnixTimeSeconds(ReadInt64(buffer));
+ obj.LeaveTime = DateTimeOffset.FromUnixTimeSeconds(ReadInt64(buffer));
obj.Permission = ReadUInt32(buffer);
obj.CharacterListElement = ReadEntity(buffer);
return obj;
}
}
}
-}
\ No newline at end of file
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanNoticePackage.cs b/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanNoticePackage.cs
new file mode 100644
index 000000000..6416de09d
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanNoticePackage.cs
@@ -0,0 +1,42 @@
+using Arrowgene.Buffers;
+
+namespace Arrowgene.Ddon.Shared.Entity.Structure
+{
+ public class CDataClanNoticePackage
+ {
+ public CDataClanNoticePackage()
+ {
+ Text = string.Empty;
+ }
+
+ public byte Type { get; set; } // Might be ClanHistoryType
+ public uint Value1 { get; set; }
+ public uint Value2 { get; set; }
+ public uint Value3 { get; set; }
+ public string Text { get; set; }
+
+
+ public class Serializer : EntitySerializer
+ {
+ public override void Write(IBuffer buffer, CDataClanNoticePackage obj)
+ {
+ WriteByte(buffer, obj.Type);
+ WriteUInt32(buffer, obj.Value1);
+ WriteUInt32(buffer, obj.Value2);
+ WriteUInt32(buffer, obj.Value3);
+ WriteMtString(buffer, obj.Text);
+ }
+
+ public override CDataClanNoticePackage Read(IBuffer buffer)
+ {
+ CDataClanNoticePackage obj = new CDataClanNoticePackage();
+ obj.Type = ReadByte(buffer);
+ obj.Value1 = ReadUInt32(buffer);
+ obj.Value2 = ReadUInt32(buffer);
+ obj.Value3 = ReadUInt32(buffer);
+ obj.Text = ReadMtString(buffer);
+ return obj;
+ }
+ }
+ }
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanParam.cs b/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanParam.cs
index 112b3bcc7..41c9ead8f 100644
--- a/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanParam.cs
+++ b/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanParam.cs
@@ -1,7 +1,5 @@
-using System.Collections.Generic;
using Arrowgene.Buffers;
-using Arrowgene.Ddon.Shared.Model;
-
+
namespace Arrowgene.Ddon.Shared.Entity.Structure
{
public class CDataClanParam
@@ -31,4 +29,4 @@ public override CDataClanParam Read(IBuffer buffer)
}
}
}
-}
\ No newline at end of file
+}
diff --git a/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanPartnerPawnInfo.cs b/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanPartnerPawnInfo.cs
new file mode 100644
index 000000000..5ee701df4
--- /dev/null
+++ b/Arrowgene.Ddon.Shared/Entity/Structure/CDataClanPartnerPawnInfo.cs
@@ -0,0 +1,34 @@
+using Arrowgene.Buffers;
+using System.Collections.Generic;
+
+namespace Arrowgene.Ddon.Shared.Entity.Structure
+{
+ public class CDataClanPartnerPawnInfo
+ {
+ public CDataClanPartnerPawnInfo()
+ {
+ MyPartnerPawnList = new();
+ MemberPartnerPawnList = new();
+ }
+
+ public List