private static void CreateNotifyEffect(TeamSignalType signalType, Position pos) { string signalPerform = TeamSignalManager.GetSignalPerform(signalType); if (signalType == TeamSignalType.Fire || signalType == TeamSignalType.Defense) { return; } if (string.IsNullOrEmpty(signalPerform)) { return; } SysSkillPerformVo dataById = BaseDataMgr.instance.GetDataById <SysSkillPerformVo>(signalPerform); if (dataById == null) { ClientLogger.Error("cannot found SysSkillPerformVo #" + signalPerform); } else { ResourceHandle resourceHandle = MapManager.Instance.SpawnResourceHandle(dataById.effect_id, new Vector3(pos.x, pos.y, pos.z), Quaternion.identity, 0); if (resourceHandle != null) { resourceHandle.DelayRelease(1.8f); } else { ClientLogger.Error("SpawnEffect failed #" + dataById.effect_id); } } }
public PerformData(string perform_id) { this.performId = perform_id; this.config = BaseDataMgr.instance.GetDataById <SysSkillPerformVo>(perform_id); if (this.config == null) { Debug.LogError("Error performID=" + this.performId); return; } this.Parse(this.config); }
public void ParseTables() { if (!this.isParseTable) { Dictionary <string, object> dicByType = BaseDataMgr.instance.GetDicByType <SysSkillPerformVo>(); if (dicByType == null) { Debug.LogError("==> SysSkillPerformVo is NULL !!"); return; } this.isParseTable = true; this._dataVos.Clear(); Dictionary <string, object> .Enumerator enumerator = dicByType.GetEnumerator(); while (enumerator.MoveNext()) { KeyValuePair <string, object> current = enumerator.Current; string key = current.Key; KeyValuePair <string, object> current2 = enumerator.Current; SysSkillPerformVo perform_vo = current2.Value as SysSkillPerformVo; PerformData value = new PerformData(key, perform_vo); this._dataVos.Add(key, value); } } }
private void Parse(SysSkillPerformVo perform_vo) { if (perform_vo.action_id != "[]") { string[] stringValue = StringUtils.GetStringValue(perform_vo.action_id, '_'); if (stringValue != null) { this.action_type = this.GetActionType(stringValue[0]); if (stringValue.Length > 1) { this.action_index = int.Parse(stringValue[1]); } } } if (perform_vo.effect_type != "[]") { string[] array = StringUtils.SplitVoString(perform_vo.effect_type, "|"); this.effect_type = (PerformType)int.Parse(array[0]); this.GetPerformParam(array); } this.body_dispear = (perform_vo.body_dispear == 1); this.body_dissolve = (perform_vo.body_dissolve == 1); this.body_destroy = (perform_vo.body_destroy == 1); if (StringUtils.CheckValid(perform_vo.use_collider)) { string[] array2 = StringUtils.SplitVoString(perform_vo.use_collider, "|"); this.useCollider = (int.Parse(array2[0]) == 1); this.colliderRangeType = (ColliderRangeType)((array2.Length <= 1) ? 0 : int.Parse(array2[1])); this.colliderParam1 = ((array2.Length <= 2) ? 0f : float.Parse(array2[2])); this.colliderParam2 = ((array2.Length <= 3) ? 0f : float.Parse(array2[3])); } if (perform_vo.effect_pos_offset != "[]") { this.effect_pos_offset = StringUtils.GetStringToFloat(perform_vo.effect_pos_offset, '|'); this.offset_x = ((this.effect_pos_offset == null) ? 0f : this.effect_pos_offset[0]); this.offset_y = ((this.effect_pos_offset == null || this.effect_pos_offset.Length <= 1) ? 0f : this.effect_pos_offset[1]); this.offset_z = ((this.effect_pos_offset == null || this.effect_pos_offset.Length <= 2) ? 0f : this.effect_pos_offset[2]); } if (perform_vo.effect_rotation_offset != "[]") { this.effect_rotation_offset = StringUtils.GetStringToFloat(perform_vo.effect_rotation_offset, '|'); this.offset_rx = ((this.effect_rotation_offset == null) ? 0f : this.effect_rotation_offset[0]); this.offset_ry = ((this.effect_rotation_offset == null || this.effect_rotation_offset.Length <= 1) ? 0f : this.effect_rotation_offset[1]); this.offset_rz = ((this.effect_rotation_offset == null || this.effect_rotation_offset.Length <= 2) ? 0f : this.effect_rotation_offset[2]); } this.endPerformId = "[]"; this.isBeInterruptThenDestroy = true; this.isDeadThenDestroy = true; this.isUseCasterRot = true; this.isUsePool = true; this.particleClose_time = 0f; this.isCloneDmage = false; this.isEndAction = true; this.isLoopSound = false; this.isDamageColliderFollow = true; this.isDamageColliderFollowUnit = false; this.performTagType = TargetTag.All; this.isAffectWeapon = false; this.weaponPosType = 0; this.isForceDisplay = false; if (StringUtils.CheckValid(perform_vo.extra_param)) { string[] stringValue2 = StringUtils.GetStringValue(perform_vo.extra_param, ','); for (int i = 0; i < stringValue2.Length; i++) { if (StringUtils.CheckValid(stringValue2[i])) { string[] array3 = StringUtils.SplitVoString(stringValue2[i], "|"); if (array3[0] == "1") { this.endPerformId = array3[1]; } else if (array3[0] == "2") { if (array3[1] == "1") { this.isBeInterruptThenDestroy = true; } else if (array3[1] == "0") { this.isBeInterruptThenDestroy = false; } } else if (array3[0] == "3") { if (array3[1] == "1") { this.isUseCasterRot = true; } else if (array3[1] == "0") { this.isUseCasterRot = false; } } else if (array3[0] == "4") { if (array3[1] == "1") { this.isDeadThenDestroy = true; } else if (array3[1] == "0") { this.isDeadThenDestroy = false; } } else if (array3[0] == "5") { if (array3[1] == "1") { this.isUsePool = true; } else if (array3[1] == "0") { this.isUsePool = false; } } else if (array3[0] == "6") { this.particleClose_time = float.Parse(array3[1]); } else if (!(array3[0] == "7")) { if (array3[0] == "8") { if (array3[1] == "1") { this.isCloneDmage = true; } else if (array3[1] == "0") { this.isCloneDmage = false; } } else if (array3[0] == "9") { if (array3[1] == "1") { this.isEndAction = true; } else if (array3[1] == "0") { this.isEndAction = false; } } else if (array3[0] == "10") { if (array3[1] == "1") { this.isLoopSound = true; } else if (array3[1] == "0") { this.isLoopSound = false; } } else if (array3[0] == "11") { if (array3[1] == "1") { this.isDamageColliderFollow = true; } else if (array3[1] == "0") { this.isDamageColliderFollow = false; } } else if (array3[0] == "12") { if (array3[1] == "1") { this.isDamageColliderFollowUnit = true; } else if (array3[1] == "0") { this.isDamageColliderFollowUnit = false; } } else if (array3[0] == "13") { this.performTagType = (TargetTag)int.Parse(array3[1]); } else if (array3[0] == "14") { this.isAffectWeapon = true; if (array3.Length > 1) { int num = 0; if (int.TryParse(array3[1], out num)) { this.weaponPosType = num; } } } else if (array3[0] == "15") { this.colliderAnchorType = ColliderAnchorType.centor; if (array3.Length > 1) { int num2 = 0; if (int.TryParse(array3[1], out num2) && num2 == 1) { this.colliderAnchorType = ColliderAnchorType.bottom; } } } else if (array3[0] == "16") { this.eyeRange = float.Parse(array3[1]); } else if (array3[0] == "22") { if (array3[1] == "0") { this.isForceDisplay = false; } else if (array3[1] == "1") { this.isForceDisplay = true; } } } } } } }
public PerformData(string perform_id, SysSkillPerformVo perform_vo) { this.performId = perform_id; this.config = perform_vo; this.Parse(this.config); }