-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add social list and remove cache
- Loading branch information
1 parent
9a3ca48
commit 8b0e328
Showing
13 changed files
with
526 additions
and
149 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,17 @@ | ||
namespace Dalamud.DrunkenToad.Core.Models; | ||
|
||
/// <summary> | ||
/// DataCenter data. | ||
/// </summary> | ||
public class ToadDataCenter | ||
{ | ||
/// <summary> | ||
/// Gets or sets data center id. | ||
/// </summary> | ||
public uint Id { get; set; } | ||
|
||
/// <summary> | ||
/// Gets data center name. | ||
/// </summary> | ||
public string Name { get; init; } = string.Empty; | ||
} |
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,46 @@ | ||
namespace Dalamud.DrunkenToad.Core.Models; | ||
|
||
using Utility; | ||
|
||
public class ToadSocialListMember | ||
{ | ||
/// <summary> | ||
/// The content ID of the local character. | ||
/// </summary> | ||
public ulong ContentId; | ||
|
||
/// <summary> | ||
/// Player Name. | ||
/// </summary> | ||
public string Name = string.Empty; | ||
|
||
/// <summary> | ||
/// Player HomeWorld ID. | ||
/// </summary> | ||
public ushort HomeWorld; | ||
|
||
/// <summary> | ||
/// Player is unable to retrieve (no name). | ||
/// </summary> | ||
public bool IsUnableToRetrieve; | ||
|
||
/// <summary> | ||
/// Validate if player is valid. | ||
/// </summary> | ||
/// <returns>Indicator if player is valid.</returns> | ||
public bool IsValid() | ||
{ | ||
if (this.ContentId == 0) | ||
{ | ||
return false; | ||
} | ||
|
||
// If the player's name is null or empty, the player is valid only if they are marked as unable to retrieve. | ||
if (string.IsNullOrEmpty(this.Name)) | ||
{ | ||
return this.IsUnableToRetrieve; | ||
} | ||
|
||
return DalamudContext.DataManager.IsValidWorld(this.HomeWorld) && this.Name.IsValidCharacterName(); | ||
} | ||
} |
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.