Last active
May 26, 2019 01:32
-
-
Save scottstamp/d23099ba32c71b17e2c82971b171aa3a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public class ConfigurationMsg | |
{ | |
public int ClothSellConversionRate; | |
public PriceData[] CraftingPrices; | |
public int HcToScConversionRate; | |
public int NewLabelDisplayDays; | |
public int NameChangePrice; | |
public int PartyCreationPrice; | |
public int PartyMaxParticipantCount; | |
public int ReportMaxAmountPerDay; | |
public int BonusPartyMaxParticipantCount; | |
public int ExtraLootBoxPrice; | |
public int AdTimeoutSeconds; | |
public int TutorialBonusScReward; | |
public ProductId TutorialMaleClothProductId; | |
public ProductId TutorialFemaleClothProductId; | |
public ProductId TutorialColourProductId; | |
public string[] ActiveFeatureSwitches; | |
public string HwLandingPageLink; | |
public ProductId[] SkinColours; | |
public ProductId DefaultSkinColour; | |
public ProductId[] DefaultMaleWornItems; | |
public ProductId[] DefaultFemaleWornItems; | |
public EquippedColor[] DefaultEquippedColours; | |
public int DefaultCarpenterBoxHcPrice; | |
public int FurniSellConversionRate; | |
public string RoomPictureBucketUrl; | |
public ConfigurationMsg(HMessage m) | |
{ | |
/// Brief explanation of protocol: | |
/// BigEndian | |
/// all arrays are length-prefixed with a short | |
/// | |
/// integer = 4 byte encoded | |
/// short = 2 byte encoded | |
/// string = char[] | |
/// enum = single byte { ordinal }, occasionally a short but don't worry about that... | |
/// bool = 1 byte 0/1 | |
ClothSellConversionRate = m.ReadInteger(); | |
CraftingPrices = new PriceData[m.ReadShort()]; | |
for (int i = 0; i < CraftingPrices.Length; i++) | |
CraftingPrices[i] = new PriceData() | |
{ | |
Price = m.ReadInteger(), | |
Currency = (CurrencyType)m.ReadByte() | |
}; | |
HcToScConversionRate = m.ReadInteger(); | |
NewLabelDisplayDays = m.ReadInteger(); | |
NameChangePrice = m.ReadInteger(); | |
PartyCreationPrice = m.ReadInteger(); | |
PartyMaxParticipantCount = m.ReadInteger(); | |
ReportMaxAmountPerDay = m.ReadInteger(); | |
BonusPartyMaxParticipantCount = m.ReadInteger(); | |
ExtraLootBoxPrice = m.ReadInteger(); | |
AdTimeoutSeconds = m.ReadInteger(); | |
TutorialBonusScReward = m.ReadInteger(); | |
TutorialMaleClothProductId = new ProductId(m.ReadInteger()); | |
TutorialFemaleClothProductId = new ProductId(m.ReadInteger()); | |
TutorialColourProductId = new ProductId(m.ReadInteger()); | |
ActiveFeatureSwitches = new string[m.ReadInteger()]; | |
for (int i = 0; i < ActiveFeatureSwitches.Length; i++) | |
ActiveFeatureSwitches[i] = m.ReadString(); | |
HwLandingPageLink = m.ReadString(); | |
SkinColours = new ProductId[m.ReadShort()]; | |
for (int i = 0; i < SkinColours.Length; i++) | |
SkinColours[i] = new ProductId(m.ReadInteger()); | |
DefaultSkinColour = new ProductId(m.ReadInteger()); | |
DefaultMaleWornItems = new ProductId[m.ReadShort()]; | |
for (int i = 0; i < DefaultMaleWornItems.Length; i++) | |
DefaultMaleWornItems[i] = new ProductId(m.ReadInteger()); | |
DefaultFemaleWornItems = new ProductId[m.ReadShort()]; | |
for (int i = 0; i < DefaultFemaleWornItems.Length; i++) | |
DefaultFemaleWornItems[i] = new ProductId(m.ReadInteger()); | |
DefaultEquippedColours = new EquippedColor[m.ReadShort()]; | |
for (int i = 0; i < DefaultEquippedColours.Length; i++) | |
DefaultEquippedColours[i] = new EquippedColor() | |
{ | |
Id = m.ReadInteger(), | |
AvatarPart = m.ReadInteger(), | |
Slot = m.ReadInteger(), | |
ColorType = m.ReadByte() | |
}; | |
DefaultCarpenterBoxHcPrice = m.ReadInteger(); | |
FurniSellConversionRate = m.ReadInteger(); | |
RoomPictureBucketUrl = m.ReadString(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment