| using System; |
| using System; |
| using System.Collections; |
| using System.Collections; |
| using System.Collections.Generic; |
| using System.Collections.Generic; |
| using UnityEngine; |
| using UnityEngine; |
| |
| |
| public class SpawnAbility : MonoBehaviour, IProjectile |
| public class SpawnAbility : MonoBehaviour, IProjectile |
| { |
| { |
| . | |
| public void Awake() |
| |
| { |
| |
| if (this.m_spawnOnAwake) |
| |
| { |
| |
| base.StartCoroutine("Spawn"); |
| |
| } |
| |
| } |
| |
| |
| public void Setup(Character owner, Vector3 velocity, float hitNoise, HitData hitData, ItemDrop.ItemData item, ItemDrop.ItemData ammo) |
| public void Setup(Character owner, Vector3 velocity, float hitNoise, HitData hitData, ItemDrop.ItemData item, ItemDrop.ItemData ammo) |
| { |
| { |
| this.m_owner = owner; |
| this.m_owner = owner; |
| this.m_weapon = item; |
| this.m_weapon = item; |
| base.StartCoroutine("Spawn"); |
| base.StartCoroutine("Spawn"); |
| } |
| } |
| |
| |
| public string GetTooltipString(int itemQuality) |
| public string GetTooltipString(int itemQuality) |
| { |
| { |
| return ""; |
| return ""; |
| } |
| } |
| |
| |
| private IEnumerator Spawn() |
| private IEnumerator Spawn() |
| { |
| { |
| if (this.m_initialSpawnDelay > 0f) |
| if (this.m_initialSpawnDelay > 0f) |
| { |
| { |
| yield return new WaitForSeconds(this.m_initialSpawnDelay); |
| yield return new WaitForSeconds(this.m_initialSpawnDelay); |
| } |
| } |
| int toSpawn = UnityEngine.Random.Range(this.m_minToSpawn, this.m_maxToSpawn); |
| int toSpawn = UnityEngine.Random.Range(this.m_minToSpawn, this.m_maxToSpawn); |
| . | Skills skills = this.m_owner.GetSkills(); |
| Skills skills = (this.m_owner ? this.m_owner.GetSkills() : null); |
| int num; |
| int num; |
| for (int i = 0; i < toSpawn; i = num) |
| for (int i = 0; i < toSpawn; i = num) |
| { |
| { |
| Vector3 targetPosition = base.transform.position; |
| Vector3 targetPosition = base.transform.position; |
| bool foundSpawnPoint = false; |
| bool foundSpawnPoint = false; |
| int tries = ((this.m_targetType == SpawnAbility.TargetType.RandomPathfindablePosition) ? 5 : 1); |
| int tries = ((this.m_targetType == SpawnAbility.TargetType.RandomPathfindablePosition) ? 5 : 1); |
| int j = 0; |
| int j = 0; |
| . | while (j < tries && !(foundSpawnPoint = this.FindTarget(out targetPosition))) |
| while (j < tries && !(foundSpawnPoint = this.FindTarget(out targetPosition, i, toSpawn))) |
| { |
| { |
| if (this.m_targetType == SpawnAbility.TargetType.RandomPathfindablePosition) |
| if (this.m_targetType == SpawnAbility.TargetType.RandomPathfindablePosition) |
| { |
| { |
| if (j == tries - 1) |
| if (j == tries - 1) |
| { |
| { |
| Terminal.LogWarning(string.Format("SpawnAbility failed to pathfindable target after {0} tries, defaulting to transform position.", tries)); |
| Terminal.LogWarning(string.Format("SpawnAbility failed to pathfindable target after {0} tries, defaulting to transform position.", tries)); |
| targetPosition = base.transform.position; |
| targetPosition = base.transform.position; |
| foundSpawnPoint = true; |
| foundSpawnPoint = true; |
| } |
| } |
| else |
| else |
| { |
| { |
| Terminal.Log("SpawnAbility failed to pathfindable target, waiting before retry."); |
| Terminal.Log("SpawnAbility failed to pathfindable target, waiting before retry."); |
| yield return new WaitForSeconds(0.2f); |
| yield return new WaitForSeconds(0.2f); |
| } |
| } |
| } |
| } |
| num = j; |
| num = j; |
| j = num + 1; |
| j = num + 1; |
| } |
| } |
| if (!foundSpawnPoint) |
| if (!foundSpawnPoint) |
| { |
| { |
| Terminal.LogWarning("SpawnAbility failed to find spawn point, aborting spawn."); |
| Terminal.LogWarning("SpawnAbility failed to find spawn point, aborting spawn."); |
| } |
| } |
| else |
| else |
| { |
| { |
| Vector3 spawnPoint = targetPosition; |
| Vector3 spawnPoint = targetPosition; |
| if (this.m_targetType != SpawnAbility.TargetType.RandomPathfindablePosition) |
| if (this.m_targetType != SpawnAbility.TargetType.RandomPathfindablePosition) |
| { |
| { |
| Vector3 vector = (this.m_spawnAtTarget ? targetPosition : base.transform.position); |
| Vector3 vector = (this.m_spawnAtTarget ? targetPosition : base.transform.position); |
| Vector2 vector2 = UnityEngine.Random.insideUnitCircle * this.m_spawnRadius; |
| Vector2 vector2 = UnityEngine.Random.insideUnitCircle * this.m_spawnRadius; |
| . | |
| if (this.m_circleSpawn) |
| |
| { |
| |
| vector2 = this.GetCirclePoint(i, toSpawn) * this.m_spawnRadius; |
| |
| } |
| spawnPoint = vector + new Vector3(vector2.x, 0f, vector2.y); |
| spawnPoint = vector + new Vector3(vector2.x, 0f, vector2.y); |
| if (this.m_snapToTerrain) |
| if (this.m_snapToTerrain) |
| { |
| { |
| float num2; |
| float num2; |
| ZoneSystem.instance.GetSolidHeight(spawnPoint, out num2, this.m_getSolidHeightMargin); |
| ZoneSystem.instance.GetSolidHeight(spawnPoint, out num2, this.m_getSolidHeightMargin); |
| spawnPoint.y = num2; |
| spawnPoint.y = num2; |
| } |
| } |
| spawnPoint.y += this.m_spawnGroundOffset; |
| spawnPoint.y += this.m_spawnGroundOffset; |
| if (Mathf.Abs(spawnPoint.y - vector.y) > 100f) |
| if (Mathf.Abs(spawnPoint.y - vector.y) > 100f) |
| { |
| { |
| . | goto IL_592; |
| goto IL_61F; |
| } |
| } |
| } |
| } |
| GameObject prefab = this.m_spawnPrefab[UnityEngine.Random.Range(0, this.m_spawnPrefab.Length)]; |
| GameObject prefab = this.m_spawnPrefab[UnityEngine.Random.Range(0, this.m_spawnPrefab.Length)]; |
| if (this.m_maxSpawned <= 0 || SpawnSystem.GetNrOfInstances(prefab) < this.m_maxSpawned) |
| if (this.m_maxSpawned <= 0 || SpawnSystem.GetNrOfInstances(prefab) < this.m_maxSpawned) |
| { |
| { |
| this.m_preSpawnEffects.Create(spawnPoint, Quaternion.identity, null, 1f, -1); |
| this.m_preSpawnEffects.Create(spawnPoint, Quaternion.identity, null, 1f, -1); |
| if (this.m_preSpawnDelay > 0f) |
| if (this.m_preSpawnDelay > 0f) |
| { |
| { |
| yield return new WaitForSeconds(this.m_preSpawnDelay); |
| yield return new WaitForSeconds(this.m_preSpawnDelay); |
| } |
| } |
| Terminal.Log("SpawnAbility spawning a " + prefab.name); |
| Terminal.Log("SpawnAbility spawning a " + prefab.name); |
| GameObject gameObject = UnityEngine.Object.Instantiate<GameObject>(prefab, spawnPoint, Quaternion.Euler(0f, UnityEngine.Random.value * 3.1415927f * 2f, 0f)); |
| GameObject gameObject = UnityEngine.Object.Instantiate<GameObject>(prefab, spawnPoint, Quaternion.Euler(0f, UnityEngine.Random.value * 3.1415927f * 2f, 0f)); |
| ZNetView component = gameObject.GetComponent<ZNetView>(); |
| ZNetView component = gameObject.GetComponent<ZNetView>(); |
| Projectile component2 = gameObject.GetComponent<Projectile>(); |
| Projectile component2 = gameObject.GetComponent<Projectile>(); |
| if (component2) |
| if (component2) |
| { |
| { |
| this.SetupProjectile(component2, targetPosition); |
| this.SetupProjectile(component2, targetPosition); |
| } |
| } |
| . | if (this.m_copySkill != Skills.SkillType.None && this.m_copySkillToRandomFactor > 0f) |
| if (this.m_randomYRotation) |
| { |
| { |
| . | component.GetZDO().Set(ZDOVars.s_randomSkillFactor, 1f + skills.GetSkillLevel(this.m_copySkill) * this.m_copySkillToRandomFactor); |
| gameObject.transform.Rotate(Vector3.up, (float)UnityEngine.Random.Range(-180, 180)); |
| } |
| } |
| . | if (this.m_levelUpSettings.Count > 0) |
| if (skills) |
| { |
| { |
| . | Character component3 = gameObject.GetComponent<Character>(); |
| if (this.m_copySkill != Skills.SkillType.None && this.m_copySkillToRandomFactor > 0f) |
| if (component3 != null) |
| |
| { |
| { |
| . | int k = this.m_levelUpSettings.Count - 1; |
| component.GetZDO().Set(ZDOVars.s_randomSkillFactor, 1f + skills.GetSkillLevel(this.m_copySkill) * this.m_copySkillToRandomFactor); |
| while (k >= 0) |
| } |
| |
| if (this.m_levelUpSettings.Count > 0) |
| |
| { |
| |
| Character component3 = gameObject.GetComponent<Character>(); |
| |
| if (component3 != null) |
| { |
| { |
| . | SpawnAbility.LevelUpSettings levelUpSettings = this.m_levelUpSettings[k]; |
| int k = this.m_levelUpSettings.Count - 1; |
| if (skills.GetSkillLevel(levelUpSettings.m_skill) >= (float)levelUpSettings.m_skillLevel) |
| while (k >= 0) |
| { |
| { |
| . | component3.SetLevel(levelUpSettings.m_setLevel); |
| SpawnAbility.LevelUpSettings levelUpSettings = this.m_levelUpSettings[k]; |
| int num3 = (this.m_setMaxInstancesFromWeaponLevel ? this.m_weapon.m_quality : levelUpSettings.m_maxSpawns); |
| if (skills.GetSkillLevel(levelUpSettings.m_skill) >= (float)levelUpSettings.m_skillLevel) |
| if (num3 > 0) |
| |
| { |
| { |
| . | component.GetZDO().Set(ZDOVars.s_maxInstances, num3, false); |
| component3.SetLevel(levelUpSettings.m_setLevel); |
| |
| int num3 = (this.m_setMaxInstancesFromWeaponLevel ? this.m_weapon.m_quality : levelUpSettings.m_maxSpawns); |
| |
| if (num3 > 0) |
| |
| { |
| |
| component.GetZDO().Set(ZDOVars.s_maxInstances, num3, false); |
| |
| break; |
| |
| } |
| break; |
| break; |
| } |
| } |
| . | break; |
| else |
| } |
| { |
| else |
| k--; |
| { |
| } |
| k--; |
| |
| } |
| } |
| } |
| } |
| } |
| } |
| } |
| } |
| if (this.m_commandOnSpawn) |
| if (this.m_commandOnSpawn) |
| { |
| { |
| Tameable component4 = gameObject.GetComponent<Tameable>(); |
| Tameable component4 = gameObject.GetComponent<Tameable>(); |
| if (component4 != null) |
| if (component4 != null) |
| { |
| { |
| Humanoid humanoid = this.m_owner as Humanoid; |
| Humanoid humanoid = this.m_owner as Humanoid; |
| if (humanoid != null) |
| if (humanoid != null) |
| { |
| { |
| component4.Command(humanoid, false); |
| component4.Command(humanoid, false); |
| if (humanoid == Player.m_localPlayer) |
| if (humanoid == Player.m_localPlayer) |
| { |
| { |
| Game.instance.IncrementPlayerStat(PlayerStatType.SkeletonSummons, 1f); |
| Game.instance.IncrementPlayerStat(PlayerStatType.SkeletonSummons, 1f); |
| } |
| } |
| } |
| } |
| } |
| } |
| } |
| } |
| if (this.m_wakeUpAnimation) |
| if (this.m_wakeUpAnimation) |
| { |
| { |
| ZSyncAnimation component5 = gameObject.GetComponent<ZSyncAnimation>(); |
| ZSyncAnimation component5 = gameObject.GetComponent<ZSyncAnimation>(); |
| if (component5 != null) |
| if (component5 != null) |
| { |
| { |
| component5.SetBool("wakeup", true); |
| component5.SetBool("wakeup", true); |
| } |
| } |
| } |
| } |
| BaseAI component6 = gameObject.GetComponent<BaseAI>(); |
| BaseAI component6 = gameObject.GetComponent<BaseAI>(); |
| if (component6 != null) |
| if (component6 != null) |
| { |
| { |
| if (this.m_alertSpawnedCreature) |
| if (this.m_alertSpawnedCreature) |
| { |
| { |
| component6.Alert(); |
| component6.Alert(); |
| } |
| } |
| BaseAI baseAI = this.m_owner.GetBaseAI(); |
| BaseAI baseAI = this.m_owner.GetBaseAI(); |
| if (component6.m_aggravatable && baseAI && baseAI.m_aggravatable) |
| if (component6.m_aggravatable && baseAI && baseAI.m_aggravatable) |
| { |
| { |
| component6.SetAggravated(baseAI.IsAggravated(), BaseAI.AggravatedReason.Damage); |
| component6.SetAggravated(baseAI.IsAggravated(), BaseAI.AggravatedReason.Damage); |
| } |
| } |
| if (this.m_passiveAggressive) |
| if (this.m_passiveAggressive) |
| { |
| { |
| component6.m_passiveAggresive = true; |
| component6.m_passiveAggresive = true; |
| } |
| } |
| } |
| } |
| . | |
| this.SetupAoe(gameObject.GetComponent<Character>(), spawnPoint); |
| this.m_spawnEffects.Create(spawnPoint, Quaternion.identity, null, 1f, -1); |
| this.m_spawnEffects.Create(spawnPoint, Quaternion.identity, null, 1f, -1); |
| if (this.m_spawnDelay > 0f) |
| if (this.m_spawnDelay > 0f) |
| { |
| { |
| yield return new WaitForSeconds(this.m_spawnDelay); |
| yield return new WaitForSeconds(this.m_spawnDelay); |
| } |
| } |
| targetPosition = default(Vector3); |
| targetPosition = default(Vector3); |
| spawnPoint = default(Vector3); |
| spawnPoint = default(Vector3); |
| prefab = null; |
| prefab = null; |
| } |
| } |
| } |
| } |
| . | IL_592: |
| IL_61F: |
| num = i + 1; |
| num = i + 1; |
| } |
| } |
| . | UnityEngine.Object.Destroy(base.gameObject); |
| if (!this.m_spawnOnAwake) |
| |
| { |
| |
| UnityEngine.Object.Destroy(base.gameObject); |
| |
| } |
| yield break; |
| yield break; |
| } |
| } |
| |
| |
| . | |
| private Vector3 GetRandomConeDirection() |
| |
| { |
| |
| float num = (float)UnityEngine.Random.Range(0, 360); |
| |
| float num2 = UnityEngine.Random.Range(this.m_randomAngleMin, this.m_randomAngleMax); |
| |
| return Quaternion.AngleAxis(num, Vector3.up) * new Vector3(Mathf.Sin(num2), Mathf.Cos(num2), 0f); |
| |
| } |
| |
| |
| private void SetupProjectile(Projectile projectile, Vector3 targetPoint) |
| private void SetupProjectile(Projectile projectile, Vector3 targetPoint) |
| { |
| { |
| . | Vector3 vector = (targetPoint - projectile.transform.position).normalized; |
| Vector3 vector = (this.m_randomDirection ? this.GetRandomConeDirection() : (targetPoint - projectile.transform.position).normalized); |
| Vector3 vector2 = Vector3.Cross(vector, Vector3.up); |
| Vector3 vector2 = Vector3.Cross(vector, Vector3.up); |
| Quaternion quaternion = Quaternion.AngleAxis(UnityEngine.Random.Range(-this.m_projectileAccuracy, this.m_projectileAccuracy), Vector3.up); |
| Quaternion quaternion = Quaternion.AngleAxis(UnityEngine.Random.Range(-this.m_projectileAccuracy, this.m_projectileAccuracy), Vector3.up); |
| vector = Quaternion.AngleAxis(UnityEngine.Random.Range(-this.m_projectileAccuracy, this.m_projectileAccuracy), vector2) * vector; |
| vector = Quaternion.AngleAxis(UnityEngine.Random.Range(-this.m_projectileAccuracy, this.m_projectileAccuracy), vector2) * vector; |
| vector = quaternion * vector; |
| vector = quaternion * vector; |
| . | projectile.Setup(this.m_owner, vector * this.m_projectileVelocity, -1f, null, null, null); |
| float num = ((this.m_projectileVelocityMax > 0f) ? UnityEngine.Random.Range(this.m_projectileVelocity, this.m_projectileVelocityMax) : this.m_projectileVelocity); |
| |
| projectile.Setup(this.m_owner, vector * num, -1f, null, null, null); |
| |
| } |
| |
| |
| |
| private void SetupAoe(Character owner, Vector3 targetPoint) |
| |
| { |
| |
| if (this.m_aoePrefab == null || owner == null) |
| |
| { |
| |
| return; |
| |
| } |
| |
| Aoe component = UnityEngine.Object.Instantiate<GameObject>(this.m_aoePrefab, targetPoint, Quaternion.identity).GetComponent<Aoe>(); |
| |
| if (component == null) |
| |
| { |
| |
| return; |
| |
| } |
| |
| component.Setup(owner, Vector3.zero, -1f, null, null, null); |
| } |
| } |
| |
| |
| . | private bool FindTarget(out Vector3 point) |
| private bool FindTarget(out Vector3 point, int i, int spawnCount) |
| { |
| { |
| point = Vector3.zero; |
| point = Vector3.zero; |
| switch (this.m_targetType) |
| switch (this.m_targetType) |
| { |
| { |
| case SpawnAbility.TargetType.ClosestEnemy: |
| case SpawnAbility.TargetType.ClosestEnemy: |
| { |
| { |
| if (this.m_owner == null) |
| if (this.m_owner == null) |
| { |
| { |
| return false; |
| return false; |
| } |
| } |
| Character character = BaseAI.FindClosestEnemy(this.m_owner, base.transform.position, this.m_maxTargetRange); |
| Character character = BaseAI.FindClosestEnemy(this.m_owner, base.transform.position, this.m_maxTargetRange); |
| if (character != null) |
| if (character != null) |
| { |
| { |
| point = character.transform.position; |
| point = character.transform.position; |
| return true; |
| return true; |
| } |
| } |
| return false; |
| return false; |
| } |
| } |
| case SpawnAbility.TargetType.RandomEnemy: |
| case SpawnAbility.TargetType.RandomEnemy: |
| { |
| { |
| if (this.m_owner == null) |
| if (this.m_owner == null) |
| { |
| { |
| return false; |
| return false; |
| } |
| } |
| Character character2 = BaseAI.FindRandomEnemy(this.m_owner, base.transform.position, this.m_maxTargetRange); |
| Character character2 = BaseAI.FindRandomEnemy(this.m_owner, base.transform.position, this.m_maxTargetRange); |
| if (character2 != null) |
| if (character2 != null) |
| { |
| { |
| point = character2.transform.position; |
| point = character2.transform.position; |
| return true; |
| return true; |
| } |
| } |
| return false; |
| return false; |
| } |
| } |
| case SpawnAbility.TargetType.Caster: |
| case SpawnAbility.TargetType.Caster: |
| if (this.m_owner == null) |
| if (this.m_owner == null) |
| { |
| { |
| return false; |
| return false; |
| } |
| } |
| point = this.m_owner.transform.position; |
| point = this.m_owner.transform.position; |
| return true; |
| return true; |
| case SpawnAbility.TargetType.Position: |
| case SpawnAbility.TargetType.Position: |
| point = base.transform.position; |
| point = base.transform.position; |
| return true; |
| return true; |
| case SpawnAbility.TargetType.RandomPathfindablePosition: |
| case SpawnAbility.TargetType.RandomPathfindablePosition: |
| { |
| { |
| . | |
| if (this.m_owner == null) |
| |
| { |
| |
| return false; |
| |
| } |
| List<Vector3> list = new List<Vector3>(); |
| List<Vector3> list = new List<Vector3>(); |
| Vector2 vector = UnityEngine.Random.insideUnitCircle.normalized * UnityEngine.Random.Range(this.m_spawnRadius / 2f, this.m_spawnRadius); |
| Vector2 vector = UnityEngine.Random.insideUnitCircle.normalized * UnityEngine.Random.Range(this.m_spawnRadius / 2f, this.m_spawnRadius); |
| point = base.transform.position + new Vector3(vector.x, 2f, vector.y); |
| point = base.transform.position + new Vector3(vector.x, 2f, vector.y); |
| float num; |
| float num; |
| ZoneSystem.instance.GetSolidHeight(point, out num, 2); |
| ZoneSystem.instance.GetSolidHeight(point, out num, 2); |
| point.y = num; |
| point.y = num; |
| if (Pathfinding.instance.GetPath(this.m_owner.transform.position, point, list, this.m_targetWhenPathfindingType, true, false, true)) |
| if (Pathfinding.instance.GetPath(this.m_owner.transform.position, point, list, this.m_targetWhenPathfindingType, true, false, true)) |
| { |
| { |
| Terminal.Log(string.Format("SpawnAbility found path target, distance: {0}", Vector3.Distance(base.transform.position, list[0]))); |
| Terminal.Log(string.Format("SpawnAbility found path target, distance: {0}", Vector3.Distance(base.transform.position, list[0]))); |
| point = list[list.Count - 1]; |
| point = list[list.Count - 1]; |
| return true; |
| return true; |
| } |
| } |
| return false; |
| return false; |
| } |
| } |
| default: |
| default: |
| return false; |
| return false; |
| } |
| } |
| } |
| } |
| |
| |
| . | |
| private Vector2 GetCirclePoint(int i, int spawnCount) |
| |
| { |
| |
| float num = (float)i / (float)spawnCount; |
| |
| float num2 = Mathf.Sin(num * 3.1415927f * 2f); |
| |
| float num3 = Mathf.Cos(num * 3.1415927f * 2f); |
| |
| return new Vector2(num2, num3); |
| |
| } |
| |
| |
| [Header("Spawn")] |
| [Header("Spawn")] |
| public GameObject[] m_spawnPrefab; |
| public GameObject[] m_spawnPrefab; |
| |
| |
| . | |
| public bool m_spawnOnAwake; |
| |
| |
| public bool m_alertSpawnedCreature = true; |
| public bool m_alertSpawnedCreature = true; |
| |
| |
| public bool m_passiveAggressive; |
| public bool m_passiveAggressive; |
| |
| |
| public bool m_spawnAtTarget = true; |
| public bool m_spawnAtTarget = true; |
| |
| |
| public int m_minToSpawn = 1; |
| public int m_minToSpawn = 1; |
| |
| |
| public int m_maxToSpawn = 1; |
| public int m_maxToSpawn = 1; |
| |
| |
| public int m_maxSpawned = 3; |
| public int m_maxSpawned = 3; |
| |
| |
| public float m_spawnRadius = 3f; |
| public float m_spawnRadius = 3f; |
| |
| |
| . | |
| public bool m_circleSpawn; |
| |
| |
| public bool m_snapToTerrain = true; |
| public bool m_snapToTerrain = true; |
| |
| |
| . | |
| [global::Tooltip("Used to give random Y rotations to things like AOEs that aren't circular")] |
| |
| public bool m_randomYRotation; |
| |
| |
| public float m_spawnGroundOffset; |
| public float m_spawnGroundOffset; |
| |
| |
| public int m_getSolidHeightMargin = 1000; |
| public int m_getSolidHeightMargin = 1000; |
| |
| |
| public float m_initialSpawnDelay; |
| public float m_initialSpawnDelay; |
| |
| |
| public float m_spawnDelay; |
| public float m_spawnDelay; |
| |
| |
| public float m_preSpawnDelay; |
| public float m_preSpawnDelay; |
| |
| |
| public bool m_commandOnSpawn; |
| public bool m_commandOnSpawn; |
| |
| |
| public bool m_wakeUpAnimation; |
| public bool m_wakeUpAnimation; |
| |
| |
| public Skills.SkillType m_copySkill; |
| public Skills.SkillType m_copySkill; |
| |
| |
| public float m_copySkillToRandomFactor; |
| public float m_copySkillToRandomFactor; |
| |
| |
| public bool m_setMaxInstancesFromWeaponLevel; |
| public bool m_setMaxInstancesFromWeaponLevel; |
| |
| |
| public List<SpawnAbility.LevelUpSettings> m_levelUpSettings; |
| public List<SpawnAbility.LevelUpSettings> m_levelUpSettings; |
| |
| |
| public SpawnAbility.TargetType m_targetType; |
| public SpawnAbility.TargetType m_targetType; |
| |
| |
| public Pathfinding.AgentType m_targetWhenPathfindingType = Pathfinding.AgentType.Humanoid; |
| public Pathfinding.AgentType m_targetWhenPathfindingType = Pathfinding.AgentType.Humanoid; |
| |
| |
| public float m_maxTargetRange = 40f; |
| public float m_maxTargetRange = 40f; |
| |
| |
| public EffectList m_spawnEffects = new EffectList(); |
| public EffectList m_spawnEffects = new EffectList(); |
| |
| |
| public EffectList m_preSpawnEffects = new EffectList(); |
| public EffectList m_preSpawnEffects = new EffectList(); |
| |
| |
| . | |
| [global::Tooltip("Used for the troll summoning staff, to spawn an AOE that's friendly to the spawned creature.")] |
| |
| public GameObject m_aoePrefab; |
| |
| |
| [Header("Projectile")] |
| [Header("Projectile")] |
| public float m_projectileVelocity = 10f; |
| public float m_projectileVelocity = 10f; |
| |
| |
| . | |
| public float m_projectileVelocityMax; |
| |
| |
| public float m_projectileAccuracy = 10f; |
| public float m_projectileAccuracy = 10f; |
| . | |
| |
| |
| public bool m_randomDirection; |
| |
| |
| |
| public float m_randomAngleMin; |
| |
| |
| |
| public float m_randomAngleMax; |
| |
| |
| private Character m_owner; |
| private Character m_owner; |
| |
| |
| private ItemDrop.ItemData m_weapon; |
| private ItemDrop.ItemData m_weapon; |
| |
| |
| public enum TargetType |
| public enum TargetType |
| { |
| { |
| ClosestEnemy, |
| ClosestEnemy, |
| RandomEnemy, |
| RandomEnemy, |
| Caster, |
| Caster, |
| Position, |
| Position, |
| RandomPathfindablePosition |
| RandomPathfindablePosition |
| } |
| } |
| |
| |
| [Serializable] |
| [Serializable] |
| public class LevelUpSettings |
| public class LevelUpSettings |
| { |
| { |
| public Skills.SkillType m_skill; |
| public Skills.SkillType m_skill; |
| |
| |
| public int m_skillLevel; |
| public int m_skillLevel; |
| |
| |
| public int m_setLevel; |
| public int m_setLevel; |
| |
| |
| public int m_maxSpawns; |
| public int m_maxSpawns; |
| } |
| } |
| } |
| } |
| |
| |