Class PlayerInfo
- Namespace
- Archipelago.MultiClient.Net.Helpers
- Assembly
- Archipelago.MultiClient.Net.dll
Information about a specific player
public class PlayerInfo : IEquatable<PlayerInfo>
- Inheritance
-
PlayerInfo
- Implements
- Inherited Members
Constructors
PlayerInfo()
Creates and Empty PlayerInfo object, should probably not even be exposed
public PlayerInfo()
PlayerInfo(int, int, string, string, string, NetworkSlot[], int[])
Creates an PlayerInfo object, used by json deserialization
[JsonConstructor]
public PlayerInfo(int team, int slot, string name, string alias, string game, NetworkSlot[] groups, int[] groupMembers)
Parameters
teamintThe team of this player
slotintThe slot of this player
namestringThe name of that player
aliasstringThe alias of that player
gamestringThe game the player is playing
groupsNetworkSlot[]An array of groups this player is part of
groupMembersint[]An array of player slots that are is part of this player if its a group otherwise null
Properties
Alias
A custom name Alias for this player, that can optionally set with !alias, if no alias is set will return Name instead
public string Alias { get; }
Property Value
Game
The game the player is playing
public string Game { get; }
Property Value
Groups
A array of groups this player is part of
public NetworkSlot[] Groups { get; }
Property Value
IsGroup
Is true if the player is a group.
public bool IsGroup { get; }
Property Value
Name
The name of that player
public string Name { get; }
Property Value
Slot
The slot of this player
public int Slot { get; }
Property Value
Team
The team of this player
public int Team { get; }
Property Value
Methods
Equals(PlayerInfo)
public bool Equals(PlayerInfo other)
Parameters
otherPlayerInfo
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
GetGroupMembers(IPlayerHelper)
If this player is a group, gets its members. Otherwise returns null.
public IEnumerable<PlayerInfo> GetGroupMembers(IPlayerHelper playerHelper)
Parameters
playerHelperIPlayerHelper
Returns
- IEnumerable<PlayerInfo>
returns the players info's of members from a group slot, or null if this slot is not a group
GetHashCode()
public override int GetHashCode()
Returns
IsRelatedTo(PlayerInfo)
True if this player is the same player, or if either player is a group (e.g. itemlinks) that contains the other player
public bool IsRelatedTo(PlayerInfo other)
Parameters
otherPlayerInfo
Returns
IsSharingGroupWith(int, int)
Checks if the provided team and slot, are sharing any slot groups with this player
[Obsolete]
public bool IsSharingGroupWith(int team, int slot)
Parameters
Returns
- bool
Whether this player has any itemlinks in common with the specified player
ToString()
Returns the Alias of the player
public override string ToString()
Returns
Operators
operator ==(PlayerInfo, PlayerInfo)
public static bool operator ==(PlayerInfo lhs, PlayerInfo rhs)
Parameters
lhsPlayerInforhsPlayerInfo
Returns
implicit operator int(PlayerInfo)
Converts the PlayerInfo to the slot
public static implicit operator int(PlayerInfo p)
Parameters
Returns
operator !=(PlayerInfo, PlayerInfo)
public static bool operator !=(PlayerInfo lhs, PlayerInfo rhs)
Parameters
lhsPlayerInforhsPlayerInfo