// Token: 0x0600010F RID: 271 RVA: 0x0000EA74 File Offset: 0x0000CC74 public virtual void AssignWeaponAnimation(int id) { ItemData itemData = (ItemData)this.database.GetComponent(typeof(ItemData)); PlayerAnimation playerAnimation = (PlayerAnimation)this.player.GetComponent(typeof(PlayerAnimation)); if (!playerAnimation) { this.AssignMecanimAnimation(id); } else { if (itemData.equipment[id].attackCombo != null && itemData.equipment[id].EquipmentType == Equip.EqType.Weapon) { int num = Extensions.get_length(itemData.equipment[id].attackCombo); ((AttackTrigger)this.player.GetComponent(typeof(AttackTrigger))).attackCombo = new AnimationClip[num]; int i = 0; if (num > 0) { while (i < num) { ((AttackTrigger)this.player.GetComponent(typeof(AttackTrigger))).attackCombo[i] = itemData.equipment[id].attackCombo[i]; ((AttackTrigger)this.player.GetComponent(typeof(AttackTrigger))).mainModel.GetComponent <Animation>()[itemData.equipment[id].attackCombo[i].name].layer = 15; i++; } } ((AttackTrigger)this.player.GetComponent(typeof(AttackTrigger))).whileAttack = (whileAtk)UnityBuiltins.parseInt((int)itemData.equipment[id].whileAttack); ((AttackTrigger)this.player.GetComponent(typeof(AttackTrigger))).attackSpeed = itemData.equipment[id].attackSpeed; ((AttackTrigger)this.player.GetComponent(typeof(AttackTrigger))).atkDelay1 = itemData.equipment[id].attackDelay; } if (itemData.equipment[id].idleAnimation) { ((PlayerAnimation)this.player.GetComponent(typeof(PlayerAnimation))).idle = itemData.equipment[id].idleAnimation; } if (itemData.equipment[id].runAnimation) { playerAnimation.run = itemData.equipment[id].runAnimation; } if (itemData.equipment[id].rightAnimation) { playerAnimation.right = itemData.equipment[id].rightAnimation; } if (itemData.equipment[id].leftAnimation) { playerAnimation.left = itemData.equipment[id].leftAnimation; } if (itemData.equipment[id].backAnimation) { playerAnimation.back = itemData.equipment[id].backAnimation; } if (itemData.equipment[id].jumpAnimation) { ((PlayerAnimation)this.player.GetComponent(typeof(PlayerAnimation))).jump = itemData.equipment[id].jumpAnimation; } playerAnimation.AnimationSpeedSet(); } }