named parameters for certain longer packets

This commit is contained in:
FateJH 2018-06-09 20:51:54 -04:00
parent ffd8c02de9
commit 8166a43bdc
6 changed files with 110 additions and 94 deletions

View file

@ -66,20 +66,20 @@ object AvatarConverter {
def MakeAppearanceData(obj : Player) : (Int)=>CharacterAppearanceData = {
CharacterAppearanceData(
BasicCharacterData(obj.Name, obj.Faction, obj.Sex, obj.Head, obj.Voice),
0,
false,
false,
voice2 = 0,
black_ops = false,
jammered = false,
obj.ExoSuit,
"",
0,
outfit_name = "",
outfit_logo = 0,
obj.isBackpack,
obj.Orientation.y,
obj.FacingYawUpper,
true,
facingPitch = obj.Orientation.y,
facingYawUpper = obj.FacingYawUpper,
lfs = true,
GrenadeState.None,
false,
false,
false,
is_cloaking = false,
charging_pose = false,
on_zipline = false,
RibbonBars()
)
}
@ -112,8 +112,8 @@ object AvatarConverter {
obj.Stamina,
obj.Certifications.toList.sortBy(_.id), //TODO is sorting necessary?
MakeImplantEntries(obj),
List.empty[String], //TODO fte list
List.empty[String], //TODO tutorial list
firstTimeEvents = List.empty[String], //TODO fte list
tutorials = List.empty[String], //TODO tutorial list
MakeCosmetics(obj.BEP)
)
}

View file

@ -25,10 +25,15 @@ class CharacterSelectConverter extends AvatarConverter {
DetailedCharacterData(
obj.BEP,
obj.CEP,
1, 1, 0, 1, 1,
Nil,
healthMax = 1,
health = 1,
armor = 0,
staminaMax = 1,
stamina = 1,
certs = Nil,
MakeImplantEntries(obj), //necessary for correct stream length
Nil, Nil,
firstTimeEvents = Nil,
tutorials = Nil,
AvatarConverter.MakeCosmetics(obj.BEP)
),
InventoryData(recursiveMakeHolsters(obj.Holsters().iterator)),
@ -46,20 +51,20 @@ class CharacterSelectConverter extends AvatarConverter {
private def MakeAppearanceData(obj : Player) : (Int)=>CharacterAppearanceData = {
CharacterAppearanceData(
BasicCharacterData(obj.Name, obj.Faction, obj.Sex, obj.Head, CharacterVoice.Mute),
0,
false,
false,
voice2 = 0,
black_ops = false,
jammered = false,
obj.ExoSuit,
"",
0,
false,
0f,
0f,
true,
outfit_name = "",
outfit_logo = 0,
backpack = false,
facingPitch = 0,
facingYawUpper = 0,
lfs = true,
GrenadeState.None,
false,
false,
false,
is_cloaking = false,
charging_pose = false,
on_zipline = false,
RibbonBars()
)
}

View file

@ -19,9 +19,18 @@ class CorpseConverter extends AvatarConverter {
PlacementData(obj.Position, Vector3(0,0, obj.Orientation.z)),
MakeAppearanceData(obj),
DetailedCharacterData(
0, 0, 0, 0, 0, 0, 0,
Nil, Nil, Nil, Nil,
None
bep = 0,
cep = 0,
healthMax = 0,
health = 0,
armor = 0,
staminaMax = 0,
stamina = 0,
certs = Nil,
implants = Nil,
firstTimeEvents = Nil,
tutorials = Nil,
cosmetics = None
),
InventoryData((MakeHolsters(obj) ++ MakeInventory(obj)).sortBy(_.parentSlot)),
DrawnSlot.None
@ -37,20 +46,20 @@ class CorpseConverter extends AvatarConverter {
private def MakeAppearanceData(obj : Player) : (Int)=>CharacterAppearanceData = {
CharacterAppearanceData(
BasicCharacterData(obj.Name, obj.Faction, CharacterGender.Male, 0, CharacterVoice.Mute),
0,
false,
false,
voice2 = 0,
black_ops = false,
jammered = false,
obj.ExoSuit,
"",
0,
true,
obj.Orientation.y, //TODO is this important?
0,
true,
outfit_name = "",
outfit_logo = 0,
backpack = true,
facingPitch = obj.Orientation.y, //TODO is this important?
facingYawUpper = 0,
lfs = true,
GrenadeState.None,
false,
false,
false,
is_cloaking = false,
charging_pose = false,
on_zipline = false,
RibbonBars()
)
}

View file

@ -18,21 +18,22 @@ class VehicleConverter extends ObjectCreateConverter[Vehicle]() {
VehicleData(
PlacementData(obj.Position, obj.Orientation, obj.Velocity),
obj.Faction,
false, //bops
health < 3, //destroyed
0,
obj.Jammered, //jammered
false,
bops = false,
destroyed = health < 3,
unk1 = 0,
obj.Jammered,
unk2 = false,
obj.Owner match {
case Some(owner) => owner
case None => PlanetSideGUID(0)
},
false,
unk3 = false,
health,
false, false,
unk4 = false,
no_mount_points = false,
obj.DeploymentState,
false,
false,
unk5 = false,
unk6 = false,
obj.Cloaked,
SpecificFormatData(obj),
Some(InventoryData(MakeDriverSeat(obj) ++ MakeUtilities(obj) ++ MakeMountings(obj)))