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 #371 from Arochka/dev
Add new player setters/getters
- Loading branch information
Showing
13 changed files
with
757 additions
and
27 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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace AltV.Net.Data | ||
{ | ||
[StructLayout(LayoutKind.Sequential)] | ||
public struct HeadBlendData : IEquatable<HeadBlendData> | ||
{ | ||
public static HeadBlendData Zero = new(0, 0, 0, 0, 0, 0, 0, 0, 0); | ||
|
||
public uint ShapeFirstID; | ||
public uint ShapeSecondID; | ||
public uint ShapeThirdID; | ||
public uint SkinFirstID; | ||
public uint SkinSecondID; | ||
public uint SkinThirdID; | ||
public float ShapeMix; | ||
public float SkinMix; | ||
public float ThirdMix; | ||
|
||
public HeadBlendData(uint shapeFirstID, uint shapeSecondID, uint shapeThirdID, uint skinFirstID, uint skinSecondID, uint skinThirdID, float shapeMix, float skinMix, float thirdMix) | ||
{ | ||
ShapeFirstID = shapeFirstID; | ||
ShapeSecondID = shapeSecondID; | ||
ShapeThirdID = shapeThirdID; | ||
SkinFirstID = skinFirstID; | ||
SkinSecondID = skinSecondID; | ||
SkinThirdID = skinThirdID; | ||
ShapeMix = shapeMix; | ||
SkinMix = skinMix; | ||
ThirdMix = thirdMix; | ||
} | ||
public override string ToString() | ||
{ | ||
return $"HeadBlendData(shapeFirstID: {ShapeFirstID}, shapeSecondID: {ShapeSecondID}, shapeThirdID: {ShapeThirdID}, skinFirstID: {SkinFirstID}, skinSecondID: {SkinSecondID}, skinThirdID: {SkinThirdID}, shapeMix: {ShapeMix}, skinMix: {SkinMix}, thirdMix: {ThirdMix})"; | ||
} | ||
|
||
public override bool Equals(object obj) | ||
{ | ||
return obj is HeadBlendData other && Equals(other); | ||
} | ||
|
||
public bool Equals(HeadBlendData other) | ||
{ | ||
return ShapeFirstID.Equals(other.ShapeFirstID) && ShapeSecondID.Equals(other.ShapeSecondID) && ShapeThirdID.Equals(other.ShapeThirdID) && SkinFirstID.Equals(other.SkinFirstID) | ||
&& SkinSecondID.Equals(other.SkinSecondID) && SkinThirdID.Equals(other.SkinThirdID) && ShapeMix.Equals(other.ShapeMix) && SkinMix.Equals(other.SkinMix) && ThirdMix.Equals(other.ThirdMix); | ||
} | ||
|
||
public override int GetHashCode() => HashCode.Combine(HashCode.Combine(ShapeFirstID.GetHashCode(), ShapeSecondID.GetHashCode(), ShapeThirdID.GetHashCode(), SkinFirstID.GetHashCode(), SkinSecondID.GetHashCode(), SkinThirdID.GetHashCode(), ShapeMix.GetHashCode(), SkinMix.GetHashCode()), ThirdMix.GetHashCode()); | ||
} | ||
} |
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,43 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace AltV.Net.Data | ||
{ | ||
[StructLayout(LayoutKind.Sequential)] | ||
public struct HeadOverlay : IEquatable<HeadOverlay> | ||
{ | ||
public static HeadOverlay Zero = new(0, 0, 0, 0, 0); | ||
|
||
public byte Index; | ||
public float Opacity; | ||
public byte ColorType; | ||
public byte ColorIndex; | ||
public byte SecondColorIndex; | ||
|
||
public HeadOverlay(byte index, float opacity, byte colorType, byte colorIndex, byte secondColorIndex) | ||
{ | ||
Index = index; | ||
Opacity = opacity; | ||
ColorType = colorType; | ||
ColorIndex = colorIndex; | ||
SecondColorIndex = secondColorIndex; | ||
} | ||
|
||
public override string ToString() | ||
{ | ||
return $"HeadOverlay(index: {Index}, opacity: {Opacity}, colorType: {ColorType}, colorIndex: {ColorIndex}, secondColorIndex: {SecondColorIndex})"; | ||
} | ||
|
||
public override bool Equals(object obj) | ||
{ | ||
return obj is HeadOverlay other && Equals(other); | ||
} | ||
|
||
public bool Equals(HeadOverlay other) | ||
{ | ||
return Index.Equals(other.Index) && Opacity.Equals(other.Opacity) && ColorType.Equals(other.ColorType) && ColorIndex.Equals(other.ColorIndex) && SecondColorIndex.Equals(other.SecondColorIndex); | ||
} | ||
|
||
public override int GetHashCode() => HashCode.Combine(Index.GetHashCode(), Opacity.GetHashCode(), ColorType.GetHashCode(), ColorIndex.GetHashCode(), SecondColorIndex.GetHashCode()); | ||
} | ||
} |
Oops, something went wrong.