~ruther/NosSmooth

8f752eac962001824d3901deab86812fc0d6234d — František Boháček 2 years ago 493935a
chore(game): add missing documentation
M Core/NosSmooth.Game/Data/Items/PartnerEquipment.cs => Core/NosSmooth.Game/Data/Items/PartnerEquipment.cs +7 -0
@@ 6,6 6,13 @@

namespace NosSmooth.Game.Data.Items;

/// <summary>
/// An equipment of a partner.
/// </summary>
/// <param name="Weapon">The weapon of the partner.</param>
/// <param name="Armor">The armor of the partner.</param>
/// <param name="Gauntlet">The gauntlet of the partner.</param>
/// <param name="Boots">The boots of the partner.</param>
public record PartnerEquipment
(
    UpgradeableItem? Weapon,

M Core/NosSmooth.Game/Data/Mates/Mate.cs => Core/NosSmooth.Game/Data/Mates/Mate.cs +19 -0
@@ 11,6 11,25 @@ using NosSmooth.PacketSerializer.Abstractions.Common;

namespace NosSmooth.Game.Data.Mates;

/// <summary>
/// Information about player's pet or partner.
/// </summary>
/// <remarks>
/// Used for mates the character owns
/// </remarks>
/// <param name="MateId">The id of the mate.</param>
/// <param name="NpcVNum">The vnum of the mate.</param>
/// <param name="TransportId">Unknown function TODO.</param>
/// <param name="Level">The level of the mate.</param>
/// <param name="Loyalty">The loyalty of the mate.</param>
/// <param name="Attack">The attack statistics of the mate.</param>
/// <param name="Armor">The armor statistics of the mate.</param>
/// <param name="Element">The element of the mate.</param>
/// <param name="Resistance">The resistance of the mate.</param>
/// <param name="Hp">The health of the mate.</param>
/// <param name="Mp">The mana of the mate.</param>
/// <param name="Name">The name of the mate.</param>
/// <param name="IsSummonable">Whether the mate is summonable.</param>
public record Mate
(
    long MateId,

M Core/NosSmooth.Game/Data/Mates/Partner.cs => Core/NosSmooth.Game/Data/Mates/Partner.cs +19 -0
@@ 11,6 11,25 @@ using NosSmooth.Packets.Enums;

namespace NosSmooth.Game.Data.Mates;

/// <summary>
/// Information about player's partner
/// </summary>
/// <param name="MateId">The id of the mate.</param>
/// <param name="NpcVNum">The vnum of the mate.</param>
/// <param name="TransportId">Unknown function TODO.</param>
/// <param name="Level">The level of the mate.</param>
/// <param name="Loyalty">The loyalty of the mate.</param>
/// <param name="Attack">The attack statistics of the mate.</param>
/// <param name="Armor">The armor statistics of the mate.</param>
/// <param name="Equipment">The equipment of the partner.</param>
/// <param name="Element">The element of the mate.</param>
/// <param name="Resistance">The resistance of the mate.</param>
/// <param name="Hp">The health of the mate.</param>
/// <param name="Mp">The mana of the mate.</param>
/// <param name="MorphVNum">The morph vnum of the partner.</param>
/// <param name="Name">The name of the mate.</param>
/// <param name="IsSummonable">Whether the mate is summonable.</param>
/// <param name="Sp">The equipped sp of the partner.</param>
public record Partner
(
    long MateId,

M Core/NosSmooth.Game/Data/Mates/PartnerSkill.cs => Core/NosSmooth.Game/Data/Mates/PartnerSkill.cs +6 -0
@@ 10,6 10,12 @@ using NosSmooth.Packets.Enums.Mates;

namespace NosSmooth.Game.Data.Mates;

/// <summary>
/// A skill of a partner's sp.
/// </summary>
/// <param name="SkillVNum">The vnum of the skill.</param>
/// <param name="Rank">The partner rank of the skill.</param>
/// <param name="Info">The info of the skill.</param>
public record PartnerSkill
(
    int SkillVNum,

M Core/NosSmooth.Game/Data/Mates/PartnerSp.cs => Core/NosSmooth.Game/Data/Mates/PartnerSp.cs +8 -0
@@ 8,6 8,14 @@ using NosSmooth.Game.Data.Characters;

namespace NosSmooth.Game.Data.Mates;

/// <summary>
/// An sp of the partner.
/// </summary>
/// <param name="VNum">The vnum of the sp item.</param>
/// <param name="AgilityPercentage">The agility percentage for acquiring skills.</param>
/// <param name="Skill1">Information about the first skill of the partner.</param>
/// <param name="Skill2">Information about the second skill of the partner.</param>
/// <param name="Skill3">Information about the third skill of the partner.</param>
public record PartnerSp
(
    long VNum,

M Core/NosSmooth.Game/Data/Mates/PartyPartner.cs => Core/NosSmooth.Game/Data/Mates/PartyPartner.cs +4 -0
@@ 8,6 8,10 @@ using NosSmooth.Game.Data.Info;

namespace NosSmooth.Game.Data.Mates;

/// <summary>
/// Information about a partner that is currently in character's party.
/// </summary>
/// <param name="Partner">The underlying partner.</param>
public record PartyPartner
(
    Partner Partner

M Core/NosSmooth.Game/Data/Mates/PartyPet.cs => Core/NosSmooth.Game/Data/Mates/PartyPet.cs +4 -0
@@ 8,6 8,10 @@ using NosSmooth.Game.Data.Info;

namespace NosSmooth.Game.Data.Mates;

/// <summary>
/// Information about a pet that is currently in character's party.
/// </summary>
/// <param name="Pet">The underlying pet.</param>
public record PartyPet
(
    Pet Pet

M Core/NosSmooth.Game/Data/Mates/Pet.cs => Core/NosSmooth.Game/Data/Mates/Pet.cs +20 -0
@@ 12,6 12,26 @@ using NosSmooth.PacketSerializer.Abstractions.Common;

namespace NosSmooth.Game.Data.Mates;

/// <summary>
/// Information about player's pet or partner.
/// </summary>
/// <remarks>
/// Used for mates the character owns
/// </remarks>
/// <param name="MateId">The id of the mate.</param>
/// <param name="NpcVNum">The vnum of the mate.</param>
/// <param name="TransportId">Unknown function TODO.</param>
/// <param name="Level">The level of the mate.</param>
/// <param name="Loyalty">The loyalty of the mate.</param>
/// <param name="Attack">The attack statistics of the mate.</param>
/// <param name="Armor">The armor statistics of the mate.</param>
/// <param name="Element">The element of the mate.</param>
/// <param name="Resistance">The resistance of the mate.</param>
/// <param name="Hp">The health of the mate.</param>
/// <param name="Mp">The mana of the mate.</param>
/// <param name="Name">The name of the mate.</param>
/// <param name="IsSummonable">Whether the mate is summonable.</param>
/// <param name="CanPickUp">Whether the pet can pick up items.</param>
public record Pet
(
    long MateId,

M Core/NosSmooth.Game/Data/Social/Group.cs => Core/NosSmooth.Game/Data/Social/Group.cs +0 -1
@@ 16,7 16,6 @@ namespace NosSmooth.Game.Data.Social;
/// Represents nostale group of players or pets and partners.
/// </summary>
/// <param name="Id">The id of the group.</param>
/// <param name="Size">The size of the group.</param>
/// <param name="Members">The members of the group. (excluding the character)</param>
public record Group(short? Id, IReadOnlyList<GroupMember>? Members)
{

M Core/NosSmooth.Game/Data/Social/GroupMember.cs => Core/NosSmooth.Game/Data/Social/GroupMember.cs +5 -1
@@ 9,6 9,10 @@ using NosSmooth.Packets.Enums.Players;

namespace NosSmooth.Game.Data.Social;

/// <summary>
/// A member of a group the character is in.
/// </summary>
/// <param name="PlayerId">The id of the group member player.</param>
public record GroupMember(long PlayerId)
{
    /// <summary>


@@ 54,5 58,5 @@ public record GroupMember(long PlayerId)
    /// <summary>
    /// Gets the effects of the member.
    /// </summary>
    public IReadOnlyList<long>? EffectsVNums { get; internal set; }
    public IReadOnlyList<short>? EffectsVNums { get; internal set; }
}
\ No newline at end of file

M Core/NosSmooth.Game/Data/Stats/MateArmorStats.cs => Core/NosSmooth.Game/Data/Stats/MateArmorStats.cs +11 -2
@@ 6,12 6,21 @@

namespace NosSmooth.Game.Data.Stats;

/// <summary>
/// Stats about mate armor.
/// </summary>
/// <param name="DefenceUpgrade">The upgrade of defence.</param>
/// <param name="MeleeDefence">The melee defence.</param>
/// <param name="MeleeDefenceDodge">The melee dodge rate.</param>
/// <param name="RangedDefence">The ranged defence.</param>
/// <param name="RangedDodgeRate">The ranged dodge rate.</param>
/// <param name="MagicalDefence">The magical defence.</param>
public record MateArmorStats
(
    short DefenceUpgrade,
    int MeleeDefence,
    int MeleeDefenceDodge,
    int RangeDefence,
    int RangeDodgeRate,
    int RangedDefence,
    int RangedDodgeRate,
    int MagicalDefence
);
\ No newline at end of file

M Core/NosSmooth.Game/Data/Stats/MateAttackStats.cs => Core/NosSmooth.Game/Data/Stats/MateAttackStats.cs +9 -0
@@ 6,6 6,15 @@

namespace NosSmooth.Game.Data.Stats;

/// <summary>
/// Stats about mate attack.
/// </summary>
/// <param name="AttackUpgrade">The upgrade of attack.</param>
/// <param name="MinimumAttack">The minimum attack.</param>
/// <param name="MaximumAttack">The maximum attack.</param>
/// <param name="Precision">The precision or concentration.</param>
/// <param name="CriticalChance">The critical chance.</param>
/// <param name="CriticalRate">The critical rate.</param>
public record MateAttackStats
(
    short AttackUpgrade,

M Core/NosSmooth.Game/Data/Stats/Resistance.cs => Core/NosSmooth.Game/Data/Stats/Resistance.cs +7 -0
@@ 6,6 6,13 @@

namespace NosSmooth.Game.Data.Stats;

/// <summary>
/// Stats about resistance of character or mate.
/// </summary>
/// <param name="FireResistance">The fire resistance percentage.</param>
/// <param name="WaterResistance">The water resistance percentage.</param>
/// <param name="LightResistance">The light resistance percentage.</param>
/// <param name="DarkResistance">The dark resistance percentage.</param>
public record Resistance
(
    short FireResistance,

M Core/NosSmooth.Game/Events/Groups/GroupInitializedEvent.cs => Core/NosSmooth.Game/Events/Groups/GroupInitializedEvent.cs +7 -0
@@ 8,4 8,11 @@ using NosSmooth.Game.Data.Social;

namespace NosSmooth.Game.Events.Groups;

/// <summary>
/// A group has been initialized.
/// </summary>
/// <remarks>
/// May be sent multiple times even for the same group.
/// </remarks>
/// <param name="Group">The initialized group with members.</param>
public record GroupInitializedEvent(Group Group) : IGameEvent;
\ No newline at end of file

M Core/NosSmooth.Game/Events/Groups/GroupMemberStatEvent.cs => Core/NosSmooth.Game/Events/Groups/GroupMemberStatEvent.cs +4 -0
@@ 8,4 8,8 @@ using NosSmooth.Game.Data.Social;

namespace NosSmooth.Game.Events.Groups;

/// <summary>
/// A new stats (hp, mp) of a group received.
/// </summary>
/// <param name="Member">The updated group member.</param>
public record GroupMemberStatEvent(GroupMember Member) : IGameEvent;
\ No newline at end of file

M Core/NosSmooth.Game/Events/Mates/MateStatEvent.cs => Core/NosSmooth.Game/Events/Mates/MateStatEvent.cs +6 -0
@@ 10,4 10,10 @@ using NosSmooth.Game.Data.Social;

namespace NosSmooth.Game.Events.Mates;

/// <summary>
/// A new stats (hp, mp) of a mate received.
/// </summary>
/// <param name="Mate">The mate.</param>
/// <param name="Hp">The current hp of the mate.</param>
/// <param name="Mp">The current mp of the mate.</param>
public record MateStatEvent(Mate Mate, Health Hp, Health Mp) : IGameEvent;
\ No newline at end of file

M Core/NosSmooth.Game/Events/Mates/MatesPartyInitializedEvent.cs => Core/NosSmooth.Game/Events/Mates/MatesPartyInitializedEvent.cs +5 -0
@@ 9,4 9,9 @@ using NosSmooth.Game.Data.Social;

namespace NosSmooth.Game.Events.Mates;

/// <summary>
/// A party was initialized and got information about currently present party pets.
/// </summary>
/// <param name="Pet">The party pet.</param>
/// <param name="Partner">The party partner.</param>
public record MatesPartyInitializedEvent(Pet? Pet, Partner? Partner) : IGameEvent;
\ No newline at end of file

M Core/NosSmooth.Game/Events/Mates/PartnerInitializedEvent.cs => Core/NosSmooth.Game/Events/Mates/PartnerInitializedEvent.cs +4 -0
@@ 9,4 9,8 @@ using NosSmooth.Game.Data.Social;

namespace NosSmooth.Game.Events.Mates;

/// <summary>
/// A partner the character owns was initialized.
/// </summary>
/// <param name="Partner">The partner.</param>
public record PartnerInitializedEvent(Partner Partner) : IGameEvent;
\ No newline at end of file

M Core/NosSmooth.Game/Events/Mates/PartnerSkillsReceivedEvent.cs => Core/NosSmooth.Game/Events/Mates/PartnerSkillsReceivedEvent.cs +5 -0
@@ 10,4 10,9 @@ using NosSmooth.Game.Data.Social;

namespace NosSmooth.Game.Events.Mates;

/// <summary>
/// A partner the character owns skills were received.
/// </summary>
/// <param name="Partner">The partner.</param>
/// <param name="Skills">The skills of the partner.</param>
public record PartnerSkillsReceivedEvent(Partner? Partner, IReadOnlyList<Skill> Skills) : IGameEvent;
\ No newline at end of file

M Core/NosSmooth.Game/Events/Mates/PetInitializedEvent.cs => Core/NosSmooth.Game/Events/Mates/PetInitializedEvent.cs +4 -0
@@ 9,4 9,8 @@ using NosSmooth.Game.Data.Social;

namespace NosSmooth.Game.Events.Mates;

/// <summary>
/// A pet the character owns was initialized.
/// </summary>
/// <param name="Pet">The pet.</param>
public record PetInitializedEvent(Pet Pet) : IGameEvent;
\ No newline at end of file

M Core/NosSmooth.Game/Events/Mates/PetSkillReceivedEvent.cs => Core/NosSmooth.Game/Events/Mates/PetSkillReceivedEvent.cs +5 -0
@@ 10,4 10,9 @@ using NosSmooth.Game.Data.Social;

namespace NosSmooth.Game.Events.Mates;

/// <summary>
/// A pet the character owns skill was received.
/// </summary>
/// <param name="Pet">The pet.</param>
/// <param name="PetSkill">The skill of the pet.</param>
public record PetSkillReceivedEvent(Pet? Pet, Skill? PetSkill) : IGameEvent;
\ No newline at end of file

M Packets/NosSmooth.Packets/Server/Entities/RevivePacket.cs => Packets/NosSmooth.Packets/Server/Entities/RevivePacket.cs +7 -0
@@ 9,6 9,13 @@ using NosSmooth.PacketSerializer.Abstractions.Attributes;

namespace NosSmooth.Packets.Server.Entities;

/// <summary>
/// A packet specifying a revival
/// of an entity, usually a player.
/// </summary>
/// <param name="EntityType">The type of the revived entity.</param>
/// <param name="EntityId">The id of the revived entity.</param>
/// <param name="TimeSpaceLives">Unknown function, seems like representing lives in a timespace.</param>
[PacketHeader("revive", PacketSource.Server)]
[GenerateSerializer(true)]
public record RevivePacket

M Packets/NosSmooth.Packets/Server/Groups/PinitMateSubPacket.cs => Packets/NosSmooth.Packets/Server/Groups/PinitMateSubPacket.cs +9 -0
@@ 11,6 11,15 @@ using NosSmooth.PacketSerializer.Abstractions.Common;

namespace NosSmooth.Packets.Server.Groups;

/// <summary>
/// A sub packet of <see cref="PinitPacket"/>
/// representing a mate.
/// </summary>
/// <param name="MateType">The type of the mate.</param>
/// <param name="Level">The level of the mate.</param>
/// <param name="Name">The name of the mate.</param>
/// <param name="Unknown">Unknown TODO.</param>
/// <param name="VNum">The VNum of the mate entity.</param>
public record PinitMateSubPacket
(
    [PacketIndex(0)]

M Packets/NosSmooth.Packets/Server/Groups/PinitPlayerSubPacket.cs => Packets/NosSmooth.Packets/Server/Groups/PinitPlayerSubPacket.cs +12 -0
@@ 12,6 12,18 @@ using NosSmooth.PacketSerializer.Abstractions.Common;

namespace NosSmooth.Packets.Server.Groups;

/// <summary>
/// A sub packet of <see cref="PinitPacket"/>
/// representing a player.
/// </summary>
/// <param name="GroupPosition">The position in the group.</param>
/// <param name="Level">The level of the player.</param>
/// <param name="Name">The name of the player.</param>
/// <param name="GroupId">The group id of the group character is in.</param>
/// <param name="Sex">The sex of the player.</param>
/// <param name="Class">The class of the player.</param>
/// <param name="MorphVNum">The morph of the player</param>
/// <param name="HeroLevel">The hero level of the player.</param>
[PacketHeader(null, PacketSource.Server)]
[GenerateSerializer(true)]
public record PinitPlayerSubPacket

M Packets/NosSmooth.Packets/Server/Groups/PstPacket.cs => Packets/NosSmooth.Packets/Server/Groups/PstPacket.cs +3 -1
@@ 16,7 16,9 @@ namespace NosSmooth.Packets.Server.Groups;
/// Party status packet.
/// </summary>
/// <param name="EntityType">The type of the entity.</param>
/// <param name="GroupPosition">The position in the group of the entity</param>
/// <param name="EntityId">The id of the entity.</param>
/// <param name="GroupPosition">The position in the group of a player. Present only for players.</param>
/// <param name="MateType">The type of a mate. Present only for mates.</param>
/// <param name="HpPercentage">The hp percentage of the entity.</param>
/// <param name="MpPercentage">The mp percentage of the entity.</param>
/// <param name="Hp">The hp of the entity.</param>

M Packets/NosSmooth.Packets/Server/Mates/ScNPacket.cs => Packets/NosSmooth.Packets/Server/Mates/ScNPacket.cs +1 -1
@@ 23,7 23,7 @@ namespace NosSmooth.Packets.Server.Mates;
/// <param name="Loyalty">The loyalty of the partner.</param>
/// <param name="Experience">The experience of the partner.</param>
/// <param name="WeaponSubPacket">Information about partner's weapon.</param>
/// <param name="ArmodSubPacket">Information about partner's armor.</param>
/// <param name="ArmorSubPacket">Information about partner's armor.</param>
/// <param name="GauntletSubPacket">Information about partner's gauntlet.</param>
/// <param name="BootsSubPacket">Information about partner's boots.</param>
/// <param name="Unknown1">Unknown TODO.</param>