// Token: 0x06001B4E RID: 6990 RVA: 0x000945B0 File Offset: 0x000929B0 public ItemWeaponAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { this.bladeID = data.readByte("BladeID"); this.range = data.readSingle("Range"); this.playerDamageMultiplier = new PlayerDamageMultiplier(data.readSingle("Player_Damage"), data.readSingle("Player_Leg_Multiplier"), data.readSingle("Player_Arm_Multiplier"), data.readSingle("Player_Spine_Multiplier"), data.readSingle("Player_Skull_Multiplier")); this.zombieDamageMultiplier = new ZombieDamageMultiplier(data.readSingle("Zombie_Damage"), data.readSingle("Zombie_Leg_Multiplier"), data.readSingle("Zombie_Arm_Multiplier"), data.readSingle("Zombie_Spine_Multiplier"), data.readSingle("Zombie_Skull_Multiplier")); this.animalDamageMultiplier = new AnimalDamageMultiplier(data.readSingle("Animal_Damage"), data.readSingle("Animal_Leg_Multiplier"), data.readSingle("Animal_Spine_Multiplier"), data.readSingle("Animal_Skull_Multiplier")); this.barricadeDamage = data.readSingle("Barricade_Damage"); this.structureDamage = data.readSingle("Structure_Damage"); this.vehicleDamage = data.readSingle("Vehicle_Damage"); this.resourceDamage = data.readSingle("Resource_Damage"); if (data.has("Object_Damage")) { this.objectDamage = data.readSingle("Object_Damage"); } else { this.objectDamage = this.resourceDamage; } this.durability = data.readSingle("Durability"); this.wear = data.readByte("Wear"); if (this.wear < 1) { this.wear = 1; } this.isInvulnerable = data.has("Invulnerable"); }
public ItemMeleeAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { this._use = (AudioClip)bundle.load("Use"); this._strength = data.readSingle("Strength"); this._weak = data.readSingle("Weak"); if ((double)this.weak < 0.01) { this._weak = 0.5f; } this._strong = data.readSingle("Strong"); if ((double)this.strong < 0.01) { this._strong = 0.33f; } this._stamina = data.readByte("Stamina"); this._isRepair = data.has("Repair"); this._isRepeated = data.has("Repeated"); this._isLight = data.has("Light"); if (data.has("Alert_Radius")) { this.alertRadius = data.readSingle("Alert_Radius"); } else { this.alertRadius = 8f; } bundle.unload(); }
public ItemTacticalAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { this._tactical = (GameObject)bundle.load("Tactical"); this._isLaser = data.has("Laser"); this._isLight = data.has("Light"); this._isRangefinder = data.has("Rangefinder"); this._isMelee = data.has("Melee"); bundle.unload(); }
public ItemThrowableAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { this._use = (AudioClip)bundle.load("Use"); this._throwable = (GameObject)bundle.load("Throwable"); this._explosion = data.readUInt16("Explosion"); this._isExplosive = data.has("Explosive"); this._isFlash = data.has("Flash"); this._isSticky = data.has("Sticky"); bundle.unload(); }
public ItemMaskAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { if (!Dedicator.isDedicated) { this._mask = (GameObject)bundle.load("Mask"); } if (!this.isPro) { this._proofRadiation = data.has("Proof_Radiation"); this._isEarpiece = data.has("Earpiece"); } bundle.unload(); }
public ItemBarricadeAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { if (!Dedicator.isDedicated) { this._barricade = (GameObject)bundle.load("Barricade"); } this._clip = (GameObject)bundle.load("Clip"); this._nav = (GameObject)bundle.load("Nav"); this._use = (AudioClip)bundle.load("Use"); this._build = (EBuild)Enum.Parse(typeof(EBuild), data.readString("Build"), true); this._health = data.readUInt16("Health"); this._range = data.readSingle("Range"); this._radius = data.readSingle("Radius"); this._offset = data.readSingle("Offset"); this._explosion = data.readUInt16("Explosion"); this._isLocked = data.has("Locked"); this._isVulnerable = data.has("Vulnerable"); this._bypassClaim = data.has("Bypass_Claim"); this._isRepairable = !data.has("Unrepairable"); this._proofExplosion = data.has("Proof_Explosion"); this._isUnpickupable = data.has("Unpickupable"); this._isSalvageable = !data.has("Unsalvageable"); this._isSaveable = !data.has("Unsaveable"); bundle.unload(); }
public ItemConsumeableAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { this._use = (AudioClip)bundle.load("Use"); this._health = data.readByte("Health"); this._food = data.readByte("Food"); this._water = data.readByte("Water"); this._virus = data.readByte("Virus"); this._disinfectant = data.readByte("Disinfectant"); this._energy = data.readByte("Energy"); this._vision = data.readByte("Vision"); this._warmth = data.readUInt32("Warmth"); this._hasBleeding = data.has("Bleeding"); this._hasBroken = data.has("Broken"); this._hasAid = data.has("Aid"); this.foodConstrainsWater = (this.food >= this.water); }
// Token: 0x06001915 RID: 6421 RVA: 0x0005BBA0 File Offset: 0x00059FA0 public Asset(Bundle bundle, Data data, Local localization, ushort id) { if (bundle != null) { this.name = bundle.name; } else { this.name = "Asset_" + id; } this.id = id; this.canUse = true; if (data != null) { this.hash = data.hash; if (data.has("Asset_Origin_Override")) { this.assetOrigin = (EAssetOrigin)Enum.Parse(typeof(EAssetOrigin), data.readString("Asset_Origin_Override"), true); } } else { this.hash = new byte[20]; } }
// Token: 0x06001AA8 RID: 6824 RVA: 0x00094F80 File Offset: 0x00093380 public ItemGlassesAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { if (!Dedicator.isDedicated) { this._glasses = (GameObject)bundle.load("Glasses"); } if (data.has("Vision")) { this._vision = (ELightingVision)Enum.Parse(typeof(ELightingVision), data.readString("Vision"), true); } else { this._vision = ELightingVision.NONE; } this.isBlindfold = data.has("Blindfold"); bundle.unload(); }
public ItemClothingAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { if (this.isPro) { this._armor = 1f; } else { this._armor = data.readSingle("Armor"); if ((double)this.armor < 0.01) { this._armor = 1f; } this._proofWater = data.has("Proof_Water"); this._proofFire = data.has("Proof_Fire"); } }
public SkinAsset(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._isPattern = data.has("Pattern"); this._hasSight = data.has("Sight"); this._hasTactical = data.has("Tactical"); this._hasGrip = data.has("Grip"); this._hasBarrel = data.has("Barrel"); this._hasMagazine = data.has("Magazine"); if (!Dedicator.isDedicated) { this._primarySkin = (Material)bundle.load("Skin_Primary"); this._secondarySkins = new Dictionary <ushort, Material>(); ushort num = data.readUInt16("Secondary_Skins"); for (ushort num2 = 0; num2 < num; num2 += 1) { ushort num3 = data.readUInt16("Secondary_" + num2); if (!this.secondarySkins.ContainsKey(num3)) { this.secondarySkins.Add(num3, (Material)bundle.load("Skin_Secondary_" + num3)); } } this._attachmentSkin = (Material)bundle.load("Skin_Attachment"); this._tertiarySkin = (Material)bundle.load("Skin_Tertiary"); } bundle.unload(); }
public ItemBarrelAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { this._shoot = (AudioClip)bundle.load("Shoot"); this._barrel = (GameObject)bundle.load("Barrel"); this._isBraked = data.has("Braked"); this._isSilenced = data.has("Silenced"); this._volume = data.readSingle("Volume"); this._durability = data.readByte("Durability"); if (data.has("Ballistic_Drop")) { this._ballisticDrop = data.readSingle("Ballistic_Drop"); } else { this._ballisticDrop = 1f; } bundle.unload(); }
public ItemSentryAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { if (data.has("Mode")) { this._sentryMode = (ESentryMode)Enum.Parse(typeof(ESentryMode), data.readString("Mode"), true); } else { this._sentryMode = ESentryMode.NEUTRAL; } }
// Token: 0x06001B09 RID: 6921 RVA: 0x00096D54 File Offset: 0x00095154 public ItemShirtAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { if (!Dedicator.isDedicated) { this._shirt = (Texture2D)bundle.load("Shirt"); this._emission = (Texture2D)bundle.load("Emission"); this._metallic = (Texture2D)bundle.load("Metallic"); } this._ignoreHand = data.has("Ignore_Hand"); bundle.unload(); }
public ItemSightAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { this._sight = (GameObject)bundle.load("Sight"); if (data.has("Vision")) { this._vision = (ELightingVision)Enum.Parse(typeof(ELightingVision), data.readString("Vision"), true); } else { this._vision = ELightingVision.NONE; } if (data.has("Zoom")) { this._zoom = 90f / (float)data.readByte("Zoom"); } else { this._zoom = 90f; } this._isHolographic = data.has("Holographic"); bundle.unload(); }
// Token: 0x06001C53 RID: 7251 RVA: 0x0009AAE8 File Offset: 0x00098EE8 public ObjectNPCAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { this.npcName = localization.format("Character"); this.npcName = ItemTool.filterRarityRichText(this.npcName); this.shirt = data.readUInt16("Shirt"); this.pants = data.readUInt16("Pants"); this.hat = data.readUInt16("Hat"); this.backpack = data.readUInt16("Backpack"); this.vest = data.readUInt16("Vest"); this.mask = data.readUInt16("Mask"); this.glasses = data.readUInt16("Glasses"); this.face = data.readByte("Face"); this.hair = data.readByte("Hair"); this.beard = data.readByte("Beard"); this.skin = Palette.hex(data.readString("Color_Skin")); this.color = Palette.hex(data.readString("Color_Hair")); this.isBackward = data.has("Backward"); this.primary = data.readUInt16("Primary"); this.secondary = data.readUInt16("Secondary"); this.tertiary = data.readUInt16("Tertiary"); if (data.has("Equipped")) { this.equipped = (ESlotType)Enum.Parse(typeof(ESlotType), data.readString("Equipped"), true); } else { this.equipped = ESlotType.NONE; } this.dialogue = data.readUInt16("Dialogue"); if (data.has("Pose")) { this.pose = (ENPCPose)Enum.Parse(typeof(ENPCPose), data.readString("Pose"), true); } else { this.pose = ENPCPose.STAND; } if (data.has("Pose_Lean")) { this.poseLean = data.readSingle("Pose_Lean"); } if (data.has("Pose_Pitch")) { this.posePitch = data.readSingle("Pose_Pitch"); } else { this.posePitch = 90f; } if (data.has("Pose_Head_Offset")) { this.poseHeadOffset = data.readSingle("Pose_Head_Offset"); } else if (this.pose == ENPCPose.CROUCH) { this.poseHeadOffset = 0.1f; } }
public ItemStorageAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { this._storage_x = data.readByte("Storage_X"); if (this.storage_x < 1) { this._storage_x = 1; } this._storage_y = data.readByte("Storage_Y"); if (this.storage_y < 1) { this._storage_y = 1; } this._isDisplay = data.has("Display"); }
public ItemTrapAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { this._range2 = data.readSingle("Range2"); this._playerDamage = data.readSingle("Player_Damage"); this._zombieDamage = data.readSingle("Zombie_Damage"); this._animalDamage = data.readSingle("Animal_Damage"); this._barricadeDamage = data.readSingle("Barricade_Damage"); this._structureDamage = data.readSingle("Structure_Damage"); this._vehicleDamage = data.readSingle("Vehicle_Damage"); this._resourceDamage = data.readSingle("Resource_Damage"); if (data.has("Object_Damage")) { this._objectDamage = data.readSingle("Object_Damage"); } else { this._objectDamage = this.resourceDamage; } this._explosion2 = data.readUInt16("Explosion2"); this._isBroken = data.has("Broken"); this._isExplosive = data.has("Explosive"); this.damageTires = data.has("Damage_Tires"); }
// Token: 0x06001B33 RID: 6963 RVA: 0x000971E4 File Offset: 0x000955E4 public ItemThrowableAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { this._use = (AudioClip)bundle.load("Use"); this._throwable = (GameObject)bundle.load("Throwable"); this._explosion = data.readUInt16("Explosion"); this._isExplosive = data.has("Explosive"); this._isFlash = data.has("Flash"); this._isSticky = data.has("Sticky"); this._explodeOnImpact = data.has("Explode_On_Impact"); if (data.has("Fuse_Length")) { this._fuseLength = data.readSingle("Fuse_Length"); } else if (this.isExplosive || this.isFlash) { this._fuseLength = 2.5f; } else { this._fuseLength = 180f; } bundle.unload(); }
// Token: 0x06001AD9 RID: 6873 RVA: 0x000965B0 File Offset: 0x000949B0 public ItemMagazineAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { this._magazine = (GameObject)bundle.load("Magazine"); this._pellets = data.readByte("Pellets"); if (this.pellets < 1) { this._pellets = 1; } this._stuck = data.readByte("Stuck"); this._range = data.readSingle("Range"); this.playerDamage = data.readSingle("Player_Damage"); this.zombieDamage = data.readSingle("Zombie_Damage"); this.animalDamage = data.readSingle("Animal_Damage"); this.barricadeDamage = data.readSingle("Barricade_Damage"); this.structureDamage = data.readSingle("Structure_Damage"); this.vehicleDamage = data.readSingle("Vehicle_Damage"); this.resourceDamage = data.readSingle("Resource_Damage"); this._explosion = data.readUInt16("Explosion"); if (data.has("Object_Damage")) { this.objectDamage = data.readSingle("Object_Damage"); } else { this.objectDamage = this.resourceDamage; } this._tracer = data.readUInt16("Tracer"); this._impact = data.readUInt16("Impact"); this._speed = data.readSingle("Speed"); if (this.speed < 0.01f) { this._speed = 1f; } this._isExplosive = data.has("Explosive"); this._deleteEmpty = data.has("Delete_Empty"); bundle.unload(); }
public MythicAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { if (id < 500 && !bundle.hasResource && !data.has("Bypass_ID_Limit")) { throw new NotSupportedException("ID < 500"); } if (!Dedicator.isDedicated) { this._systemArea = (GameObject)bundle.load("System_Area"); this._systemHook = (GameObject)bundle.load("System_Hook"); this._systemFirst = (GameObject)bundle.load("System_First"); this._systemThird = (GameObject)bundle.load("System_Third"); } bundle.unload(); }
// Token: 0x06001D2C RID: 7468 RVA: 0x0009D240 File Offset: 0x0009B640 public VendorAsset(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.vendorName = localization.format("Name"); this.vendorName = ItemTool.filterRarityRichText(this.vendorName); this.vendorDescription = localization.format("Description"); this.vendorDescription = ItemTool.filterRarityRichText(this.vendorDescription); this.buying = new VendorBuying[(int)data.readByte("Buying")]; byte b = 0; while ((int)b < this.buying.Length) { ushort newID = data.readUInt16("Buying_" + b + "_ID"); uint newCost = data.readUInt32("Buying_" + b + "_Cost"); INPCCondition[] array = new INPCCondition[(int)data.readByte("Buying_" + b + "_Conditions")]; NPCTool.readConditions(data, localization, "Buying_" + b + "_Condition_", array, string.Concat(new object[] { "vendor ", id, " buying ", b })); this.buying[(int)b] = new VendorBuying(b, newID, newCost, array); b += 1; } this.selling = new VendorSelling[(int)data.readByte("Selling")]; byte b2 = 0; while ((int)b2 < this.selling.Length) { ushort newID2 = data.readUInt16("Selling_" + b2 + "_ID"); uint newCost2 = data.readUInt32("Selling_" + b2 + "_Cost"); INPCCondition[] array2 = new INPCCondition[(int)data.readByte("Selling_" + b2 + "_Conditions")]; NPCTool.readConditions(data, localization, "Selling_" + b2 + "_Condition_", array2, string.Concat(new object[] { "vendor ", id, " selling ", b2 })); this.selling[(int)b2] = new VendorSelling(b2, newID2, newCost2, array2); b2 += 1; } bundle.unload(); }
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: 0x06001A67 RID: 6759 RVA: 0x00093D44 File Offset: 0x00092144 public ItemCaliberAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { this._calibers = new ushort[(int)data.readByte("Calibers")]; byte b = 0; while ((int)b < this.calibers.Length) { this._calibers[(int)b] = data.readUInt16("Caliber_" + b); b += 1; } this._recoil_x = data.readSingle("Recoil_X"); if ((double)this.recoil_x < 0.01) { this._recoil_x = 1f; } this._recoil_y = data.readSingle("Recoil_Y"); if ((double)this.recoil_y < 0.01) { this._recoil_y = 1f; } this._spread = data.readSingle("Spread"); if ((double)this.spread < 0.01) { this._spread = 1f; } this._sway = data.readSingle("Sway"); if ((double)this.sway < 0.01) { this._sway = 1f; } this._shake = data.readSingle("Shake"); if ((double)this.shake < 0.01) { this._shake = 1f; } this._damage = data.readSingle("Damage"); if ((double)this.damage < 0.01) { this._damage = 1f; } this._firerate = data.readByte("Firerate"); this._isPaintable = data.has("Paintable"); }
// Token: 0x06001A71 RID: 6769 RVA: 0x00094408 File Offset: 0x00092808 public ItemChargeAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { this._range2 = data.readSingle("Range2"); this.playerDamage = data.readSingle("Player_Damage"); this.zombieDamage = data.readSingle("Zombie_Damage"); this.animalDamage = data.readSingle("Animal_Damage"); this.barricadeDamage = data.readSingle("Barricade_Damage"); this.structureDamage = data.readSingle("Structure_Damage"); this.vehicleDamage = data.readSingle("Vehicle_Damage"); this.resourceDamage = data.readSingle("Resource_Damage"); if (data.has("Object_Damage")) { this.objectDamage = data.readSingle("Object_Damage"); } else { this.objectDamage = this.resourceDamage; } this._explosion2 = data.readUInt16("Explosion2"); }
public ItemStructureAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { if (!Dedicator.isDedicated) { this._structure = (GameObject)bundle.load("Structure"); } this._clip = (GameObject)bundle.load("Clip"); this._nav = (GameObject)bundle.load("Nav"); this._use = (AudioClip)bundle.load("Use"); this._construct = (EConstruct)Enum.Parse(typeof(EConstruct), data.readString("Construct"), true); this._health = data.readUInt16("Health"); this._range = data.readSingle("Range"); this._explosion = data.readUInt16("Explosion"); this._isVulnerable = data.has("Vulnerable"); this._isRepairable = !data.has("Unrepairable"); this._proofExplosion = data.has("Proof_Explosion"); this._isUnpickupable = data.has("Unpickupable"); this._isSalvageable = !data.has("Unsalvageable"); this._isSaveable = !data.has("Unsaveable"); bundle.unload(); }
public ItemGripAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { this._grip = (GameObject)bundle.load("Grip"); this._isBipod = data.has("Bipod"); 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"); } }
// Token: 0x060018FE RID: 6398 RVA: 0x0008CD50 File Offset: 0x0008B150 public AnimalAsset(Bundle bundle, Data data, Local localization, ushort id) : base(bundle, data, localization, id) { if (id < 50 && !bundle.hasResource && !data.has("Bypass_ID_Limit")) { throw new NotSupportedException("ID < 50"); } this._animalName = localization.format("Name"); this._client = (GameObject)bundle.load("Animal_Client"); this._server = (GameObject)bundle.load("Animal_Server"); this._dedicated = (GameObject)bundle.load("Animal_Dedicated"); this._ragdoll = (GameObject)bundle.load("Ragdoll"); if (this.client == null) { Assets.errors.Add(this.animalName + " is missing client data. Highly recommended to fix."); } if (this.server == null) { Assets.errors.Add(this.animalName + " is missing server data. Highly recommended to fix."); } if (this.dedicated == null) { Assets.errors.Add(this.animalName + " is missing dedicated data. Highly recommended to fix."); } if (this.ragdoll == null) { Assets.errors.Add(this.animalName + " is missing ragdoll data. Highly recommended to fix."); } this._speedRun = data.readSingle("Speed_Run"); this._speedWalk = data.readSingle("Speed_Walk"); this._behaviour = (EAnimalBehaviour)Enum.Parse(typeof(EAnimalBehaviour), data.readString("Behaviour"), true); this._health = data.readUInt16("Health"); this._regen = data.readSingle("Regen"); if (!data.has("Regen")) { this._regen = 10f; } this._damage = data.readByte("Damage"); this._meat = data.readUInt16("Meat"); this._pelt = data.readUInt16("Pelt"); this._rewardID = data.readUInt16("Reward_ID"); if (data.has("Reward_Min")) { this._rewardMin = data.readByte("Reward_Min"); } else { this._rewardMin = 3; } if (data.has("Reward_Max")) { this._rewardMax = data.readByte("Reward_Max"); } else { this._rewardMax = 4; } this._roars = new AudioClip[(int)data.readByte("Roars")]; byte b = 0; while ((int)b < this.roars.Length) { this.roars[(int)b] = (AudioClip)bundle.load("Roar_" + b); b += 1; } this._panics = new AudioClip[(int)data.readByte("Panics")]; byte b2 = 0; while ((int)b2 < this.panics.Length) { this.panics[(int)b2] = (AudioClip)bundle.load("Panic_" + b2); b2 += 1; } this._rewardXP = data.readUInt32("Reward_XP"); bundle.unload(); }
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(); }