mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-14 12:44:20 +01:00
Add Crown Code.
This commit is contained in:
parent
29799094ea
commit
f4dfe8e89c
3 changed files with 65 additions and 20 deletions
|
|
@ -123,4 +123,21 @@ public readonly unsafe struct Actor : IEquatable<Actor>
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
=> $"0x{Address:X}";
|
=> $"0x{Address:X}";
|
||||||
|
|
||||||
|
public OnlineStatus OnlineStatus
|
||||||
|
=> (OnlineStatus)AsCharacter->CharacterData.OnlineStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum OnlineStatus : byte
|
||||||
|
{
|
||||||
|
Normal = 0x00,
|
||||||
|
Mentor = 0x1B,
|
||||||
|
PvEMentor = 0x1C,
|
||||||
|
TradeMentor = 0x1D,
|
||||||
|
PvPMentor = 0x1E,
|
||||||
|
Busy = 0x0C,
|
||||||
|
Away = 0x11,
|
||||||
|
MeldMateria = 0x15,
|
||||||
|
RolePlaying = 0x16,
|
||||||
|
LookingForGroup = 0x17,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ public class CodeService
|
||||||
Shirts = 0x008000,
|
Shirts = 0x008000,
|
||||||
World = 0x010000,
|
World = 0x010000,
|
||||||
Elephants = 0x020000,
|
Elephants = 0x020000,
|
||||||
|
Crown = 0x040000,
|
||||||
}
|
}
|
||||||
|
|
||||||
public const CodeFlag DyeCodes = CodeFlag.Clown | CodeFlag.World | CodeFlag.Elephants;
|
public const CodeFlag DyeCodes = CodeFlag.Clown | CodeFlag.World | CodeFlag.Elephants;
|
||||||
|
|
@ -176,6 +177,7 @@ public class CodeService
|
||||||
CodeFlag.Shirts => 0,
|
CodeFlag.Shirts => 0,
|
||||||
CodeFlag.World => (DyeCodes | GearCodes) & ~CodeFlag.World,
|
CodeFlag.World => (DyeCodes | GearCodes) & ~CodeFlag.World,
|
||||||
CodeFlag.Elephants => (DyeCodes | GearCodes) & ~CodeFlag.Elephants,
|
CodeFlag.Elephants => (DyeCodes | GearCodes) & ~CodeFlag.Elephants,
|
||||||
|
CodeFlag.Crown => 0,
|
||||||
_ => 0,
|
_ => 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -200,6 +202,7 @@ public class CodeService
|
||||||
CodeFlag.Shirts => [ 0xD1, 0x35, 0xD7, 0x18, 0xBE, 0x45, 0x42, 0xBD, 0x88, 0x77, 0x7E, 0xC4, 0x41, 0x06, 0x34, 0x4D, 0x71, 0x3A, 0xC5, 0xCC, 0xA4, 0x1B, 0x7D, 0x3F, 0x3B, 0x86, 0x07, 0xCB, 0x63, 0xD7, 0xF9, 0xDB ],
|
CodeFlag.Shirts => [ 0xD1, 0x35, 0xD7, 0x18, 0xBE, 0x45, 0x42, 0xBD, 0x88, 0x77, 0x7E, 0xC4, 0x41, 0x06, 0x34, 0x4D, 0x71, 0x3A, 0xC5, 0xCC, 0xA4, 0x1B, 0x7D, 0x3F, 0x3B, 0x86, 0x07, 0xCB, 0x63, 0xD7, 0xF9, 0xDB ],
|
||||||
CodeFlag.World => [ 0xFD, 0xA2, 0xD2, 0xBC, 0xD9, 0x8A, 0x7E, 0x2B, 0x52, 0xCB, 0x57, 0x6E, 0x3A, 0x2E, 0x30, 0xBA, 0x4E, 0xAE, 0x42, 0xEA, 0x5C, 0x57, 0xDF, 0x17, 0x37, 0x3C, 0xCE, 0x17, 0x42, 0x43, 0xAE, 0xD0 ],
|
CodeFlag.World => [ 0xFD, 0xA2, 0xD2, 0xBC, 0xD9, 0x8A, 0x7E, 0x2B, 0x52, 0xCB, 0x57, 0x6E, 0x3A, 0x2E, 0x30, 0xBA, 0x4E, 0xAE, 0x42, 0xEA, 0x5C, 0x57, 0xDF, 0x17, 0x37, 0x3C, 0xCE, 0x17, 0x42, 0x43, 0xAE, 0xD0 ],
|
||||||
CodeFlag.Elephants => [ 0x9F, 0x4C, 0xCF, 0x6D, 0xC4, 0x01, 0x31, 0x46, 0x02, 0x05, 0x31, 0xED, 0xED, 0xB2, 0x66, 0x29, 0x31, 0x09, 0x1E, 0xE7, 0x47, 0xDE, 0x7B, 0x03, 0xB0, 0x3C, 0x06, 0x76, 0x26, 0x91, 0xDF, 0xB2 ],
|
CodeFlag.Elephants => [ 0x9F, 0x4C, 0xCF, 0x6D, 0xC4, 0x01, 0x31, 0x46, 0x02, 0x05, 0x31, 0xED, 0xED, 0xB2, 0x66, 0x29, 0x31, 0x09, 0x1E, 0xE7, 0x47, 0xDE, 0x7B, 0x03, 0xB0, 0x3C, 0x06, 0x76, 0x26, 0x91, 0xDF, 0xB2 ],
|
||||||
|
CodeFlag.Crown => [ 0x43, 0x8E, 0x34, 0x56, 0x24, 0xC9, 0xC6, 0xDE, 0x2A, 0x68, 0x3A, 0x5D, 0xF5, 0x8E, 0xCB, 0xEF, 0x0D, 0x4D, 0x5B, 0xDC, 0x23, 0xF9, 0xF9, 0xBD, 0xD9, 0x60, 0xAD, 0x53, 0xC5, 0xA0, 0x33, 0xC4 ],
|
||||||
_ => [],
|
_ => [],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,14 @@ public unsafe class FunModule : IDisposable
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_codes.Enabled(CodeService.CodeFlag.Crown)
|
||||||
|
&& actor.OnlineStatus is OnlineStatus.PvEMentor or OnlineStatus.PvPMentor or OnlineStatus.TradeMentor
|
||||||
|
&& slot.IsEquipment())
|
||||||
|
{
|
||||||
|
armor = new CharacterArmor(6117, 1, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (_codes.Masked(CodeService.GearCodes))
|
switch (_codes.Masked(CodeService.GearCodes))
|
||||||
{
|
{
|
||||||
case CodeService.CodeFlag.Emperor:
|
case CodeService.CodeFlag.Emperor:
|
||||||
|
|
@ -146,6 +154,13 @@ public unsafe class FunModule : IDisposable
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_codes.Enabled(CodeService.CodeFlag.Crown)
|
||||||
|
&& actor.OnlineStatus is OnlineStatus.Mentor or OnlineStatus.PvEMentor or OnlineStatus.PvPMentor or OnlineStatus.TradeMentor)
|
||||||
|
{
|
||||||
|
SetCrown(armor);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (_codes.Masked(CodeService.GearCodes))
|
switch (_codes.Masked(CodeService.GearCodes))
|
||||||
{
|
{
|
||||||
case CodeService.CodeFlag.Emperor:
|
case CodeService.CodeFlag.Emperor:
|
||||||
|
|
@ -203,7 +218,7 @@ public unsafe class FunModule : IDisposable
|
||||||
armor.Variant = item.Variant;
|
armor.Variant = item.Variant;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetElephant(EquipSlot slot, ref CharacterArmor armor)
|
private static void SetElephant(EquipSlot slot, ref CharacterArmor armor)
|
||||||
{
|
{
|
||||||
armor = slot switch
|
armor = slot switch
|
||||||
{
|
{
|
||||||
|
|
@ -213,6 +228,16 @@ public unsafe class FunModule : IDisposable
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void SetCrown(Span<CharacterArmor> armor)
|
||||||
|
{
|
||||||
|
var clown = new CharacterArmor(6117, 1, 0);
|
||||||
|
armor[0] = clown;
|
||||||
|
armor[1] = clown;
|
||||||
|
armor[2] = clown;
|
||||||
|
armor[3] = clown;
|
||||||
|
armor[4] = clown;
|
||||||
|
}
|
||||||
|
|
||||||
private void SetRace(ref CustomizeArray customize)
|
private void SetRace(ref CustomizeArray customize)
|
||||||
{
|
{
|
||||||
var race = _codes.GetRace();
|
var race = _codes.GetRace();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue