-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #185 from sebastian-heinz/develop
new release
- Loading branch information
Showing
412 changed files
with
315,136 additions
and
4,235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,235 @@ | ||
{ | ||
// Place your área de trabajo de ddo-server snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and | ||
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope | ||
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is | ||
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | ||
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. | ||
// Placeholders with the same ids are connected. | ||
// Example: | ||
// "Print to console": { | ||
// "scope": "javascript,typescript", | ||
// "prefix": "log", | ||
// "body": [ | ||
// "console.log('$1');", | ||
// "$2" | ||
// ], | ||
// "description": "Log output to console" | ||
// } | ||
"C2S - Request Packet Structure": { | ||
"scope": "csharp", | ||
"prefix": "c2s", | ||
"description": "Request packet structure and serializer", | ||
"body": [ | ||
"using Arrowgene.Buffers;", | ||
"using Arrowgene.Ddon.Shared.Model;", | ||
"using Arrowgene.Ddon.Shared.Network;", | ||
"", | ||
"namespace Arrowgene.Ddon.Shared.Entity.PacketStructure", | ||
"{", | ||
"\tpublic class $1 : IPacketStructure", | ||
"\t{", | ||
"\t\tpublic PacketId Id => PacketId.$2;", | ||
"", | ||
"\t\tpublic $1()", | ||
"\t\t{", | ||
"\t\t\t", | ||
"\t\t}", | ||
"", | ||
"\t\t$0", | ||
"", | ||
"\t\tpublic class Serializer : PacketEntitySerializer<$1>", | ||
"\t\t{", | ||
"\t\t\tpublic override void Write(IBuffer buffer, $1 obj)", | ||
"\t\t\t{", | ||
"\t\t\t\t", | ||
"\t\t\t}", | ||
"", | ||
"\t\t\tpublic override $1 Read(IBuffer buffer)", | ||
"\t\t\t{", | ||
"\t\t\t\t$1 obj = new $1();", | ||
"\t\t\t\t", | ||
"\t\t\t\treturn obj;", | ||
"\t\t\t}", | ||
"\t\t}", | ||
"", | ||
"\t}", | ||
"}", | ||
] | ||
}, | ||
"S2C - Response Packet Structure": { | ||
"scope": "csharp", | ||
"prefix": "s2c", | ||
"description": "Response packet structure and serializer", | ||
"body": [ | ||
"using Arrowgene.Buffers;", | ||
"using Arrowgene.Ddon.Shared.Model;", | ||
"using Arrowgene.Ddon.Shared.Network;", | ||
"", | ||
"namespace Arrowgene.Ddon.Shared.Entity.PacketStructure", | ||
"{", | ||
"\tpublic class $1 : ServerResponse", | ||
"\t{", | ||
"\t\tpublic override PacketId Id => PacketId.$2;", | ||
"", | ||
"\t\tpublic $1()", | ||
"\t\t{", | ||
"\t\t\t", | ||
"\t\t}", | ||
"", | ||
"\t\t$0", | ||
"", | ||
"\t\tpublic class Serializer : PacketEntitySerializer<$1>", | ||
"\t\t{", | ||
"\t\t\tpublic override void Write(IBuffer buffer, $1 obj)", | ||
"\t\t\t{", | ||
"\t\t\t\tWriteServerResponse(buffer, obj);", | ||
"\t\t\t\t", | ||
"\t\t\t}", | ||
"", | ||
"\t\t\tpublic override $1 Read(IBuffer buffer)", | ||
"\t\t\t{", | ||
"\t\t\t\t$1 obj = new $1();", | ||
"\t\t\t\tReadServerResponse(buffer, obj);", | ||
"\t\t\t\t", | ||
"\t\t\t\treturn obj;", | ||
"\t\t\t}", | ||
"\t\t}", | ||
"\t}", | ||
"}", | ||
] | ||
}, | ||
"CData - Structure and serializer": { | ||
"scope": "csharp", | ||
"prefix": "cdata", | ||
"description": "Structure and serializer", | ||
"body": [ | ||
"using System.Collections.Generic;", | ||
"using Arrowgene.Buffers;", | ||
"using Arrowgene.Ddon.Shared.Model;", | ||
" ", | ||
"namespace Arrowgene.Ddon.Shared.Entity.Structure", | ||
"{", | ||
" public class $1", | ||
" {", | ||
" public $1() {", | ||
" ", | ||
" }", | ||
" ", | ||
" $0", | ||
" ", | ||
" public class Serializer : EntitySerializer<$1>", | ||
" {", | ||
" public override void Write(IBuffer buffer, $1 obj)", | ||
" {", | ||
" ", | ||
" }", | ||
" ", | ||
" public override $1 Read(IBuffer buffer)", | ||
" {", | ||
" $1 obj = new $1();", | ||
" ", | ||
" return obj;", | ||
" }", | ||
" }", | ||
" }", | ||
"}" | ||
] | ||
}, | ||
"Handler - Packet handler": { | ||
"scope": "csharp", | ||
"prefix": "handler", | ||
"description": "Packet handler", | ||
"body": [ | ||
"using System.Linq;", | ||
"using Arrowgene.Ddon.Server;", | ||
"using Arrowgene.Ddon.Server.Network;", | ||
"using Arrowgene.Ddon.Shared.Entity.PacketStructure;", | ||
"using Arrowgene.Ddon.Shared.Entity.Structure;", | ||
"using Arrowgene.Ddon.Shared.Model;", | ||
"using Arrowgene.Ddon.Shared.Network;", | ||
"using Arrowgene.Logging;", | ||
"", | ||
"namespace Arrowgene.Ddon.GameServer.Handler", | ||
"{", | ||
"\tpublic class $1 : GameStructurePacketHandler<C2S$2>", | ||
"\t{", | ||
"\t\tprivate static readonly ServerLogger Logger = LogProvider.Logger<ServerLogger>(typeof($1));", | ||
"\t\t", | ||
"\t\tpublic $1(DdonGameServer server) : base(server)", | ||
"\t\t{", | ||
"\t\t}", | ||
"", | ||
"\t\tpublic override void Handle(GameClient client, StructurePacket<C2S$2> packet)", | ||
"\t\t{", | ||
"\t\t\t$0", | ||
"\t\t}", | ||
"\t}", | ||
"}" | ||
] | ||
}, | ||
"Structure Serializer": { | ||
"scope": "csharp", | ||
"prefix": "serializer", | ||
"description": "Generic structure serializer", | ||
"body": [ | ||
"public class Serializer : EntitySerializer<$1>", | ||
"{", | ||
"\tpublic override void Write(IBuffer buffer, $1 obj)", | ||
"\t{", | ||
"\t\t$0", | ||
"\t}", | ||
"", | ||
"\tpublic override $1 Read(IBuffer buffer)", | ||
"\t{", | ||
"\t\t$1 obj = new $1();", | ||
"\t\t", | ||
"\t\treturn obj;", | ||
"\t}", | ||
"}" | ||
] | ||
}, | ||
"Packet Structure Serializer": { | ||
"scope": "csharp", | ||
"prefix": "packetserializer", | ||
"description": "Packet structure serializer", | ||
"body": [ | ||
"public class Serializer : PacketEntitySerializer<$1>", | ||
"{", | ||
"\tpublic override void Write(IBuffer buffer, $1 obj)", | ||
"\t{", | ||
"\t\t$0", | ||
"\t}", | ||
"", | ||
"\tpublic override $1 Read(IBuffer buffer)", | ||
"\t{", | ||
"\t\t$1 obj = new $1();", | ||
"\t\t", | ||
"\t\treturn obj;", | ||
"\t}", | ||
"}" | ||
] | ||
}, | ||
"Response Structure Serializer": { | ||
"scope": "csharp", | ||
"prefix": "responseserializer", | ||
"description": "Response packet structure serializer", | ||
"body": [ | ||
"public class Serializer : PacketEntitySerializer<$1>", | ||
"{", | ||
"\tpublic override void Write(IBuffer buffer, $1 obj)", | ||
"\t{", | ||
"\t\tWriteServerResponse(buffer, obj);", | ||
"\t\t$0", | ||
"\t}", | ||
"", | ||
"\tpublic override $1 Read(IBuffer buffer)", | ||
"\t{", | ||
"\t\t$1 obj = new $1();", | ||
"\t\tReadServerResponse(buffer, obj);", | ||
"\t\t", | ||
"\t\treturn obj;", | ||
"\t}", | ||
"}" | ||
] | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.