-
Notifications
You must be signed in to change notification settings - Fork 7
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 #27 from seionmoya/modify-account-editions
WIP: Account edition handling
- Loading branch information
Showing
18 changed files
with
197 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,8 @@ public struct Account | |
|
||
[DataMember] | ||
public EftSave EftSave; | ||
|
||
[DataMember] | ||
public ArenaSave ArenaSave; | ||
} | ||
} |
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,18 @@ | ||
using System.Runtime.Serialization; | ||
using Fuyu.Platform.Common.Models.EFT.Profiles; | ||
|
||
namespace Fuyu.Platform.Common.Models.Fuyu.Accounts | ||
{ | ||
[DataContract] | ||
public struct ArenaProfile | ||
{ | ||
[DataMember] | ||
public Profile Pmc; | ||
|
||
[DataMember] | ||
public string[] Suites; | ||
|
||
[DataMember] | ||
public bool ShouldWipe; | ||
} | ||
} |
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,14 @@ | ||
using System.Runtime.Serialization; | ||
|
||
namespace Fuyu.Platform.Common.Models.Fuyu.Accounts | ||
{ | ||
[DataContract] | ||
public struct ArenaSave | ||
{ | ||
[DataMember] | ||
public string Edition; | ||
|
||
[DataMember] | ||
public ArenaProfile PvP; | ||
} | ||
} |
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,8 @@ | ||
namespace Fuyu.Platform.Common.Models.Fuyu.Accounts | ||
{ | ||
public enum EGame | ||
{ | ||
EFT, | ||
Arena | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
Fuyu.Platform.Common/Models/Fuyu/Requests/AccountRegisterGameRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System.Runtime.Serialization; | ||
using Fuyu.Platform.Common.Models.Fuyu.Accounts; | ||
|
||
namespace Fuyu.Platform.Common.Models.Fuyu.Requests | ||
{ | ||
[DataContract] | ||
public struct AccountRegisterGameRequest | ||
{ | ||
[DataMember] | ||
public EGame Game; | ||
|
||
[DataMember] | ||
public string Edition; | ||
} | ||
} |
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
12 changes: 12 additions & 0 deletions
12
Fuyu.Platform.Common/Models/Fuyu/Response/AccountRegisterGameResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System.Runtime.Serialization; | ||
using Fuyu.Platform.Common.Models.Fuyu.Accounts; | ||
|
||
namespace Fuyu.Platform.Common.Models.Fuyu.Responses | ||
{ | ||
[DataContract] | ||
public struct AccountRegisterGameResponse | ||
{ | ||
[DataMember] | ||
public ERegisterStatus Status; | ||
} | ||
} |
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
28 changes: 28 additions & 0 deletions
28
Fuyu.Platform.Server/Behaviours/Fuyu/AccountRegisterGame.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using Fuyu.Platform.Common.Models.Fuyu.Requests; | ||
using Fuyu.Platform.Common.Models.Fuyu.Responses; | ||
using Fuyu.Platform.Common.Networking; | ||
using Fuyu.Platform.Common.Serialization; | ||
using Fuyu.Platform.Server.Services.Fuyu; | ||
|
||
namespace Fuyu.Platform.Server.Behaviours.EFT | ||
{ | ||
public class AccountRegisterGame : HttpBehaviour | ||
{ | ||
public AccountRegisterGame() : base("/account/register/game") | ||
{ | ||
} | ||
|
||
public override void Run(HttpContext context) | ||
{ | ||
var request = context.GetJson<AccountRegisterGameRequest>(); | ||
var sessionId = context.GetSessionId(); | ||
var result = AccountService.RegisterGame(sessionId, request.Game, request.Edition); | ||
var response = new AccountRegisterGameResponse() | ||
{ | ||
Status = result | ||
}; | ||
|
||
SendJson(context, Json.Stringify(response)); | ||
} | ||
} | ||
} |
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.