public QuestAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { if (id < 2000 && !bundle.hasResource && !data.has("Bypass_ID_Limit")) { throw new NotSupportedException("ID < 2000"); } this.questName = localization.format("Name"); this.questName = ItemTool.filterRarityRichText(this.questName); this.questDescription = localization.format("Description"); this.questDescription = ItemTool.filterRarityRichText(this.questDescription); this.conditions = new INPCCondition[(int)data.readByte("Conditions")]; NPCTool.readConditions(data, localization, "Condition_", this.conditions); this.rewards = new INPCReward[(int)data.readByte("Rewards")]; NPCTool.readRewards(data, localization, "Reward_", this.rewards); bundle.unload(); }
// Token: 0x06001A26 RID: 6694 RVA: 0x00092038 File Offset: 0x00090438 public ItemAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { this.isPro = data.has("Pro"); if (id < 2000 && !bundle.hasResource && !this.isPro && !data.has("Bypass_ID_Limit")) { throw new NotSupportedException("ID < 2000"); } if (!this.isPro) { this._itemName = localization.format("Name"); this._itemDescription = localization.format("Description"); this._itemDescription = ItemTool.filterRarityRichText(this.itemDescription); } this.type = (EItemType)Enum.Parse(typeof(EItemType), data.readString("Type"), true); if (data.has("Rarity")) { this.rarity = (EItemRarity)Enum.Parse(typeof(EItemRarity), data.readString("Rarity"), true); } else { this.rarity = EItemRarity.COMMON; } if (this.isPro) { if (this.type == EItemType.SHIRT) { this._proPath = "/Shirts"; } else if (this.type == EItemType.PANTS) { this._proPath = "/Pants"; } else if (this.type == EItemType.HAT) { this._proPath = "/Hats"; } else if (this.type == EItemType.BACKPACK) { this._proPath = "/Backpacks"; } else if (this.type == EItemType.VEST) { this._proPath = "/Vests"; } else if (this.type == EItemType.MASK) { this._proPath = "/Masks"; } else if (this.type == EItemType.GLASSES) { this._proPath = "/Glasses"; } else if (this.type == EItemType.KEY) { this._proPath = "/Keys"; } else if (this.type == EItemType.BOX) { this._proPath = "/Boxes"; } this._proPath = this._proPath + "/" + this.name; } this.size_x = data.readByte("Size_X"); if (this.size_x < 1) { this.size_x = 1; } this.size_y = data.readByte("Size_Y"); if (this.size_y < 1) { this.size_y = 1; } this.size_z = data.readSingle("Size_Z"); this.size2_z = data.readSingle("Size2_Z"); this.amount = data.readByte("Amount"); if (this.amount < 1) { this.amount = 1; } this.countMin = data.readByte("Count_Min"); if (this.countMin < 1) { this.countMin = 1; } this.countMax = data.readByte("Count_Max"); if (this.countMax < 1) { this.countMax = 1; } if (data.has("Quality_Min")) { this.qualityMin = data.readByte("Quality_Min"); } else { this.qualityMin = 10; } if (data.has("Quality_Max")) { this.qualityMax = data.readByte("Quality_Max"); } else { this.qualityMax = 90; } this.isBackward = data.has("Backward"); this.useable = data.readString("Useable"); this.isUseable = !string.IsNullOrEmpty(this.useable); if (this.isUseable) { this._equip = (AudioClip)bundle.load("Equip"); if (!this.isPro) { GameObject gameObject = (GameObject)bundle.load("Animations"); if (gameObject != null) { Animation component = gameObject.GetComponent <Animation>(); this._animations = new AnimationClip[component.GetClipCount()]; int num = 0; IEnumerator enumerator = component.GetEnumerator(); try { while (enumerator.MoveNext()) { object obj = enumerator.Current; AnimationState animationState = (AnimationState)obj; this.animations[num] = animationState.clip; num++; } } finally { IDisposable disposable; if ((disposable = (enumerator as IDisposable)) != null) { disposable.Dispose(); } } } else { this._animations = new AnimationClip[0]; } } } string text = data.readString("Slot"); if (text == null) { this.slot = ESlotType.NONE; } else { this.slot = (ESlotType)Enum.Parse(typeof(ESlotType), text, true); } if (!Dedicator.isDedicated || this.type == EItemType.GUN || this.type == EItemType.MELEE) { this._item = (GameObject)bundle.load("Item"); if (this.item == null) { throw new NotSupportedException("Missing item gameobject"); } if (this.item.transform.FindChild("Icon") != null && this.item.transform.FindChild("Icon").GetComponent <Camera>() != null) { Assets.errors.Add(this.itemName + " icon has a camera attached!"); } if (id < 2000 && (this.type == EItemType.GUN || this.type == EItemType.MELEE) && this.item.transform.FindChild("Stat_Tracker") == null) { Assets.errors.Add(this.itemName + " missing stat tracker hook!"); } } byte b = data.readByte("Blueprints"); byte b2 = data.readByte("Actions"); this._blueprints = new List <Blueprint>((int)b); this._actions = new List <Action>((int)b2); for (byte b3 = 0; b3 < b; b3 += 1) { if (!data.has("Blueprint_" + b3 + "_Type")) { throw new NotSupportedException("Missing blueprint type"); } EBlueprintType newType = (EBlueprintType)Enum.Parse(typeof(EBlueprintType), data.readString("Blueprint_" + b3 + "_Type"), true); byte b4 = data.readByte("Blueprint_" + b3 + "_Supplies"); if (b4 < 1) { b4 = 1; } BlueprintSupply[] array = new BlueprintSupply[(int)b4]; byte b5 = 0; while ((int)b5 < array.Length) { ushort newID = data.readUInt16(string.Concat(new object[] { "Blueprint_", b3, "_Supply_", b5, "_ID" })); bool newCritical = data.has(string.Concat(new object[] { "Blueprint_", b3, "_Supply_", b5, "_Critical" })); byte b6 = data.readByte(string.Concat(new object[] { "Blueprint_", b3, "_Supply_", b5, "_Amount" })); if (b6 < 1) { b6 = 1; } array[(int)b5] = new BlueprintSupply(newID, newCritical, b6); b5 += 1; } byte b7 = data.readByte("Blueprint_" + b3 + "_Outputs"); BlueprintOutput[] array2; if (b7 > 0) { array2 = new BlueprintOutput[(int)b7]; byte b8 = 0; while ((int)b8 < array2.Length) { ushort newID2 = data.readUInt16(string.Concat(new object[] { "Blueprint_", b3, "_Output_", b8, "_ID" })); byte b9 = data.readByte(string.Concat(new object[] { "Blueprint_", b3, "_Output_", b8, "_Amount" })); if (b9 < 1) { b9 = 1; } array2[(int)b8] = new BlueprintOutput(newID2, b9); b8 += 1; } } else { array2 = new BlueprintOutput[1]; ushort num2 = data.readUInt16("Blueprint_" + b3 + "_Product"); if (num2 == 0) { num2 = id; } byte b10 = data.readByte("Blueprint_" + b3 + "_Products"); if (b10 < 1) { b10 = 1; } array2[0] = new BlueprintOutput(num2, b10); } ushort newTool = data.readUInt16("Blueprint_" + b3 + "_Tool"); bool newToolCritical = data.has("Blueprint_" + b3 + "_Tool_Critical"); ushort newBuild = data.readUInt16("Blueprint_" + b3 + "_Build"); byte b11 = data.readByte("Blueprint_" + b3 + "_Level"); EBlueprintSkill newSkill = EBlueprintSkill.NONE; if (b11 > 0) { newSkill = (EBlueprintSkill)Enum.Parse(typeof(EBlueprintSkill), data.readString("Blueprint_" + b3 + "_Skill"), true); } bool newTransferState = data.has("Blueprint_" + b3 + "_State_Transfer"); string newMap = data.readString("Blueprint_" + b3 + "_Map"); INPCCondition[] array3 = new INPCCondition[(int)data.readByte("Blueprint_" + b3 + "_Conditions")]; NPCTool.readConditions(data, localization, "Blueprint_" + b3 + "_Condition_", array3, string.Concat(new object[] { "item ", id, " blueprint ", b3 })); INPCReward[] array4 = new INPCReward[(int)data.readByte("Blueprint_" + b3 + "_Rewards")]; NPCTool.readRewards(data, localization, "Blueprint_" + b3 + "_Reward_", array4, string.Concat(new object[] { "item ", id, " blueprint ", b3 })); this.blueprints.Add(new Blueprint(id, b3, newType, array, array2, newTool, newToolCritical, newBuild, b11, newSkill, newTransferState, newMap, array3, array4)); } for (byte b12 = 0; b12 < b2; b12 += 1) { if (!data.has("Action_" + b12 + "_Type")) { throw new NotSupportedException("Missing action type"); } EActionType newType2 = (EActionType)Enum.Parse(typeof(EActionType), data.readString("Action_" + b12 + "_Type"), true); byte b13 = data.readByte("Action_" + b12 + "_Blueprints"); if (b13 < 1) { b13 = 1; } ActionBlueprint[] array5 = new ActionBlueprint[(int)b13]; byte b14 = 0; while ((int)b14 < array5.Length) { byte newID3 = data.readByte(string.Concat(new object[] { "Action_", b12, "_Blueprint_", b14, "_Index" })); bool newLink = data.has(string.Concat(new object[] { "Action_", b12, "_Blueprint_", b14, "_Link" })); array5[(int)b14] = new ActionBlueprint(newID3, newLink); b14 += 1; } string newText = data.readString("Action_" + b12 + "_Text"); string newTooltip = data.readString("Action_" + b12 + "_Tooltip"); string newKey = data.readString("Action_" + b12 + "_Key"); ushort num3 = data.readUInt16("Action_" + b12 + "_Source"); if (num3 == 0) { num3 = id; } this.actions.Add(new Action(num3, newType2, array5, newText, newTooltip, newKey)); } if (b2 == 0) { bool flag = false; byte b15 = 0; while ((int)b15 < this.blueprints.Count) { Blueprint blueprint = this.blueprints[(int)b15]; if (blueprint.type == EBlueprintType.REPAIR) { Action item = new Action(id, EActionType.BLUEPRINT, new ActionBlueprint[] { new ActionBlueprint(b15, true) }, null, null, "Repair"); this.actions.Insert(0, item); } else if (blueprint.type == EBlueprintType.AMMO) { flag = true; } else if (blueprint.supplies.Length == 1 && blueprint.supplies[0].id == id) { Action item2 = new Action(id, EActionType.BLUEPRINT, new ActionBlueprint[] { new ActionBlueprint(b15, this.type == EItemType.GUN || this.type == EItemType.MELEE) }, null, null, "Salvage"); this.actions.Add(item2); } b15 += 1; } if (flag) { List <ActionBlueprint> list = new List <ActionBlueprint>(); byte b16 = 0; while ((int)b16 < this.blueprints.Count) { Blueprint blueprint2 = this.blueprints[(int)b16]; if (blueprint2.type == EBlueprintType.AMMO) { ActionBlueprint item3 = new ActionBlueprint(b16, true); list.Add(item3); } b16 += 1; } Action item4 = new Action(id, EActionType.BLUEPRINT, list.ToArray(), null, null, "Refill"); this.actions.Add(item4); } } this._shouldVerifyHash = !data.has("Bypass_Hash_Verification"); this.overrideShowQuality = data.has("Override_Show_Quality"); if (!Dedicator.isDedicated) { this._albedoBase = (Texture2D)bundle.load("Albedo_Base"); this._metallicBase = (Texture2D)bundle.load("Metallic_Base"); this._emissionBase = (Texture2D)bundle.load("Emission_Base"); } }
public DialogueAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { if (id < 2000 && !bundle.hasResource && !data.has("Bypass_ID_Limit")) { throw new NotSupportedException("ID < 2000"); } this.messages = new DialogueMessage[(int)data.readByte("Messages")]; byte b = 0; while ((int)b < this.messages.Length) { DialoguePage[] array = new DialoguePage[(int)data.readByte("Message_" + b + "_Pages")]; byte b2 = 0; while ((int)b2 < array.Length) { string text = localization.format(string.Concat(new object[] { "Message_", b, "_Page_", b2 })); text = ItemTool.filterRarityRichText(text); array[(int)b2] = new DialoguePage(text); b2 += 1; } byte[] array2 = new byte[(int)data.readByte("Message_" + b + "_Responses")]; byte b3 = 0; while ((int)b3 < array2.Length) { array2[(int)b3] = data.readByte(string.Concat(new object[] { "Message_", b, "_Response_", b3 })); b3 += 1; } ushort newPrev = data.readUInt16("Message_" + b + "_Prev"); INPCCondition[] array3 = new INPCCondition[(int)data.readByte("Message_" + b + "_Conditions")]; NPCTool.readConditions(data, localization, "Message_" + b + "_Condition_", array3); INPCReward[] array4 = new INPCReward[(int)data.readByte("Message_" + b + "_Rewards")]; NPCTool.readRewards(data, localization, "Message_" + b + "_Reward_", array4); this.messages[(int)b] = new DialogueMessage(b, array, array2, newPrev, array3, array4); b += 1; } this.responses = new DialogueResponse[(int)data.readByte("Responses")]; byte b4 = 0; while ((int)b4 < this.responses.Length) { byte[] array5 = new byte[(int)data.readByte("Response_" + b4 + "_Messages")]; byte b5 = 0; while ((int)b5 < array5.Length) { array5[(int)b5] = data.readByte(string.Concat(new object[] { "Response_", b4, "_Message_", b5 })); b5 += 1; } ushort newDialogue = data.readUInt16("Response_" + b4 + "_Dialogue"); ushort newQuest = data.readUInt16("Response_" + b4 + "_Quest"); ushort newVendor = data.readUInt16("Response_" + b4 + "_Vendor"); string text2 = localization.format("Response_" + b4); text2 = ItemTool.filterRarityRichText(text2); INPCCondition[] array6 = new INPCCondition[(int)data.readByte("Response_" + b4 + "_Conditions")]; NPCTool.readConditions(data, localization, "Response_" + b4 + "_Condition_", array6); INPCReward[] array7 = new INPCReward[(int)data.readByte("Response_" + b4 + "_Rewards")]; NPCTool.readRewards(data, localization, "Response_" + b4 + "_Reward_", array7); this.responses[(int)b4] = new DialogueResponse(b4, array5, newDialogue, newQuest, newVendor, text2, array6, array7); b4 += 1; } bundle.unload(); }
public ObjectAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { if (id < 2000 && !bundle.hasResource && !data.has("Bypass_ID_Limit")) { throw new NotSupportedException("ID < 2000"); } this._objectName = localization.format("Name"); this.type = (EObjectType)Enum.Parse(typeof(EObjectType), data.readString("Type"), true); if (this.type == EObjectType.NPC) { if (Dedicator.isDedicated) { this._modelGameObject = (GameObject)Resources.Load("Characters/NPC_Server"); } else { this._modelGameObject = (GameObject)Resources.Load("Characters/NPC_Client"); } this.useScale = true; this.interactability = EObjectInteractability.NPC; } else if (this.type == EObjectType.DECAL) { float num = data.readSingle("Decal_X"); float num2 = data.readSingle("Decal_Y"); float num3 = 1f; if (data.has("Decal_LOD_Bias")) { num3 = data.readSingle("Decal_LOD_Bias"); } Texture2D texture2D = (Texture2D)bundle.load("Decal"); this._modelGameObject = Object.Instantiate <GameObject>(Resources.Load <GameObject>("Materials/Decal_Template")); this._modelGameObject.hideFlags = 61; Object.DontDestroyOnLoad(this._modelGameObject); BoxCollider component = this.modelGameObject.GetComponent <BoxCollider>(); component.size = new Vector3(num2, num, 1f); Decal component2 = this.modelGameObject.transform.FindChild("Decal").GetComponent <Decal>(); Material material = Object.Instantiate <Material>(component2.material); material.name = "Decal_Deferred"; material.hideFlags = 52; material.SetTexture("_MainTex", texture2D); component2.material = material; component2.lodBias = num3; component2.transform.localScale = new Vector3(num, num2, 1f); MeshRenderer component3 = this.modelGameObject.transform.FindChild("Mesh").GetComponent <MeshRenderer>(); Material material2 = Object.Instantiate <Material>(component3.sharedMaterial); material2.name = "Decal_Forward"; material2.hideFlags = 52; material2.SetTexture("_MainTex", texture2D); component3.sharedMaterial = material2; component3.transform.localScale = new Vector3(num2, num, 1f); this.useScale = true; } else { if (Dedicator.isDedicated) { this._modelGameObject = (GameObject)bundle.load("Clip"); if (this.modelGameObject == null && this.type != EObjectType.SMALL) { Debug.LogError(this.objectName + " is missing collision data. Highly recommended to fix."); } } else { this._modelGameObject = (GameObject)bundle.load("Object"); if (this.modelGameObject == null) { throw new NotSupportedException("Missing object gameobject"); } this._skyboxGameObject = (GameObject)bundle.load("Skybox"); } if (this.modelGameObject != null) { if (Mathf.Abs(this.modelGameObject.transform.localScale.x - 1f) > 0.01f || Mathf.Abs(this.modelGameObject.transform.localScale.y - 1f) > 0.01f || Mathf.Abs(this.modelGameObject.transform.localScale.z - 1f) > 0.01f) { this.useScale = false; Assets.errors.Add(this.objectName + " should have a scale of one."); } else { this.useScale = true; } Transform transform = this.modelGameObject.transform.FindChild("Block"); if (transform != null && transform.GetComponent <Collider>() != null && transform.GetComponent <Collider>().sharedMaterial == null) { Assets.errors.Add(this.objectName + " has a clip object but no physics material."); } Transform transform2 = this.modelGameObject.transform.FindChild("Model_0"); if (this.type == EObjectType.SMALL) { if (!this.modelGameObject.CompareTag("Small")) { Assets.errors.Add(this.objectName + " is set up as small, but is not tagged as small."); } if (this.modelGameObject.layer != LayerMasks.SMALL) { Assets.errors.Add(this.objectName + " is set up as small, but is not layered as small."); } if (transform2 != null) { if (!transform2.CompareTag("Small")) { Assets.errors.Add(this.objectName + " is set up as small, but is not tagged as small."); } if (transform2.gameObject.layer != LayerMasks.SMALL) { Assets.errors.Add(this.objectName + " is set up as small, but is not layered as small."); } } } else if (this.type == EObjectType.MEDIUM) { if (!this.modelGameObject.CompareTag("Medium")) { Assets.errors.Add(this.objectName + " is set up as medium, but is not tagged as medium."); } if (this.modelGameObject.layer != LayerMasks.MEDIUM) { Assets.errors.Add(this.objectName + " is set up as medium, but is not layered as medium."); } if (transform2 != null) { if (!transform2.CompareTag("Medium")) { Assets.errors.Add(this.objectName + " is set up as medium, but is not tagged as medium."); } if (transform2.gameObject.layer != LayerMasks.MEDIUM) { Assets.errors.Add(this.objectName + " is set up as medium, but is not layered as medium."); } } } else if (this.type == EObjectType.LARGE) { if (!this.modelGameObject.CompareTag("Large")) { Assets.errors.Add(this.objectName + " is set up as large, but is not tagged as large."); } if (this.modelGameObject.layer != LayerMasks.LARGE) { Assets.errors.Add(this.objectName + " is set up as large, but is not layered as large."); } if (transform2 != null) { if (!transform2.CompareTag("Large")) { Assets.errors.Add(this.objectName + " is set up as large, but is not tagged as large."); } if (transform2.gameObject.layer != LayerMasks.LARGE) { Assets.errors.Add(this.objectName + " is set up as large, but is not layered as large."); } } } } this._navGameObject = (GameObject)bundle.load("Nav"); if (this.navGameObject == null && this.type == EObjectType.LARGE) { Assets.errors.Add(this.objectName + " is missing navigation data. Highly recommended to fix."); } if (this.navGameObject != null) { if (!this.navGameObject.CompareTag("Navmesh")) { Assets.errors.Add(this.objectName + " is set up as navmesh, but is not tagged as navmesh."); } if (this.navGameObject.layer != LayerMasks.NAVMESH) { Assets.errors.Add(this.objectName + " is set up as navmesh, but is not layered as navmesh."); } } this._slotsGameObject = (GameObject)bundle.load("Slots"); this._triggersGameObject = (GameObject)bundle.load("Triggers"); this.isSnowshoe = data.has("Snowshoe"); if (data.has("Chart")) { this.chart = (EObjectChart)Enum.Parse(typeof(EObjectChart), data.readString("Chart"), true); } else { this.chart = EObjectChart.NONE; } this.isFuel = data.has("Fuel"); this.isRefill = data.has("Refill"); this.isSoft = data.has("Soft"); this.isCollisionImportant = data.has("Collision_Important"); if (this.isFuel || this.isRefill) { Assets.errors.Add(this.objectName + " is using the legacy fuel/water system."); } if (data.has("LOD")) { this.lod = (EObjectLOD)Enum.Parse(typeof(EObjectLOD), data.readString("LOD"), true); this.lodBias = data.readSingle("LOD_Bias"); if (this.lodBias < 0.01f) { this.lodBias = 1f; } this.lodCenter = data.readVector3("LOD_Center"); this.lodSize = data.readVector3("LOD_Size"); } if (data.has("Interactability")) { this.interactability = (EObjectInteractability)Enum.Parse(typeof(EObjectInteractability), data.readString("Interactability"), true); this.interactabilityRemote = data.has("Interactability_Remote"); this.interactabilityDelay = data.readSingle("Interactability_Delay"); this.interactabilityReset = data.readSingle("Interactability_Reset"); if (data.has("Interactability_Hint")) { this.interactabilityHint = (EObjectInteractabilityHint)Enum.Parse(typeof(EObjectInteractabilityHint), data.readString("Interactability_Hint"), true); } this.interactabilityEmission = data.has("Interactability_Emission"); if (this.interactability == EObjectInteractability.NOTE) { ushort num4 = data.readUInt16("Interactability_Text_Lines"); StringBuilder stringBuilder = new StringBuilder(); for (ushort num5 = 0; num5 < num4; num5 += 1) { string value = localization.format("Interactability_Text_Line_" + num5); stringBuilder.AppendLine(value); } this.interactabilityText = stringBuilder.ToString(); } else { this.interactabilityText = localization.read("Interact"); } if (data.has("Interactability_Power")) { this.interactabilityPower = (EObjectInteractabilityPower)Enum.Parse(typeof(EObjectInteractabilityPower), data.readString("Interactability_Power"), true); } else { this.interactabilityPower = EObjectInteractabilityPower.NONE; } if (data.has("Interactability_Editor")) { this.interactabilityEditor = (EObjectInteractabilityEditor)Enum.Parse(typeof(EObjectInteractabilityEditor), data.readString("Interactability_Editor"), true); } else { this.interactabilityEditor = EObjectInteractabilityEditor.NONE; } if (data.has("Interactability_Nav")) { this.interactabilityNav = (EObjectInteractabilityNav)Enum.Parse(typeof(EObjectInteractabilityNav), data.readString("Interactability_Nav"), true); } else { this.interactabilityNav = EObjectInteractabilityNav.NONE; } this.interactabilityDrops = new ushort[(int)data.readByte("Interactability_Drops")]; byte b = 0; while ((int)b < this.interactabilityDrops.Length) { this.interactabilityDrops[(int)b] = data.readUInt16("Interactability_Drop_" + b); b += 1; } this.interactabilityRewardID = data.readUInt16("Interactability_Reward_ID"); this.interactabilityEffect = data.readUInt16("Interactability_Effect"); this.interactabilityConditions = new INPCCondition[(int)data.readByte("Interactability_Conditions")]; NPCTool.readConditions(data, localization, "Interactability_Condition_", this.interactabilityConditions); this.interactabilityRewards = new INPCReward[(int)data.readByte("Interactability_Rewards")]; NPCTool.readRewards(data, localization, "Interactability_Reward_", this.interactabilityRewards); this.interactabilityResource = data.readUInt16("Interactability_Resource"); this.interactabilityResourceState = BitConverter.GetBytes(this.interactabilityResource); } else { this.interactability = EObjectInteractability.NONE; this.interactabilityPower = EObjectInteractabilityPower.NONE; this.interactabilityEditor = EObjectInteractabilityEditor.NONE; } if (this.interactability == EObjectInteractability.RUBBLE) { this.rubble = EObjectRubble.DESTROY; this.rubbleReset = data.readSingle("Interactability_Reset"); this.rubbleHealth = data.readUInt16("Interactability_Health"); this.rubbleEffect = data.readUInt16("Interactability_Effect"); this.rubbleFinale = data.readUInt16("Interactability_Finale"); this.rubbleRewardID = data.readUInt16("Interactability_Reward_ID"); this.rubbleRewardXP = data.readUInt32("Interactability_Reward_XP"); this.rubbleIsVulnerable = !data.has("Interactability_Invulnerable"); this.rubbleProofExplosion = data.has("Interactability_Proof_Explosion"); } else if (data.has("Rubble")) { this.rubble = (EObjectRubble)Enum.Parse(typeof(EObjectRubble), data.readString("Rubble"), true); this.rubbleReset = data.readSingle("Rubble_Reset"); this.rubbleHealth = data.readUInt16("Rubble_Health"); this.rubbleEffect = data.readUInt16("Rubble_Effect"); this.rubbleFinale = data.readUInt16("Rubble_Finale"); this.rubbleRewardID = data.readUInt16("Rubble_Reward_ID"); this.rubbleRewardXP = data.readUInt32("Rubble_Reward_XP"); this.rubbleIsVulnerable = !data.has("Rubble_Invulnerable"); this.rubbleProofExplosion = data.has("Rubble_Proof_Explosion"); if (data.has("Rubble_Editor")) { this.rubbleEditor = (EObjectRubbleEditor)Enum.Parse(typeof(EObjectRubbleEditor), data.readString("Rubble_Editor"), true); } else { this.rubbleEditor = EObjectRubbleEditor.ALIVE; } } if (data.has("Foliage")) { this.foliage = new AssetReference <FoliageInfoCollectionAsset>(new Guid(data.readString("Foliage"))); } this.useWaterHeightTransparentSort = data.has("Use_Water_Height_Transparent_Sort"); if (data.has("Material_Palette")) { this.materialPalette = new AssetReference <MaterialPaletteAsset>(data.readGUID("Material_Palette")); } if (data.has("Landmark_Quality")) { this.landmarkQuality = (EGraphicQuality)Enum.Parse(typeof(EGraphicQuality), data.readString("Landmark_Quality"), true); } else { this.landmarkQuality = EGraphicQuality.LOW; } } this.conditions = new INPCCondition[(int)data.readByte("Conditions")]; NPCTool.readConditions(data, localization, "Condition_", this.conditions); bundle.unload(); }