Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Thursday, July 04, 2019 |
| | | // [ Date ]: Friday, July 05, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | public readonly int NextItemID;
|
| | | public readonly int NPCID;
|
| | | public readonly Vector3 Rotation;
|
| | | public readonly float scale; |
| | | public readonly float scale;
|
| | | public readonly Vector3 RawImgPos; |
| | | |
| | | public SpiritWeaponConfig() |
| | | { |
| | |
| | |
|
| | | Rotation=tables[9].Vector3Parse();
|
| | |
|
| | | float.TryParse(tables[10],out scale); |
| | | float.TryParse(tables[10],out scale); |
| | |
|
| | | RawImgPos=tables[11].Vector3Parse(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | fileFormatVersion: 2 |
| | | guid: ddd7764ed0b6a9c41b3c3e2b91efa8c8 |
| | | timeCreated: 1562249090 |
| | | timeCreated: 1562318273 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | } |
| | | } |
| | | |
| | | public bool HasDropItem() |
| | | { |
| | | return m_DropItemList.Count > 0; |
| | | } |
| | | |
| | | public void Update() |
| | | { |
| | | var _hero = PlayerDatas.Instance.hero; |
| | |
| | | }
|
| | | }
|
| | |
|
| | | private SFXController m_ReikiEffect;
|
| | |
|
| | | protected override void OnMainModelLoaded()
|
| | | {
|
| | | RequestMissionSign();
|
| | |
| | | int _secondaryId = _ids.Length > 1 ? int.Parse(_ids[1]) : -1;
|
| | | int _horseId = _ids.Length > 2 ? int.Parse(_ids[2]) : -1;
|
| | | int _wingId = _ids.Length > 3 ? int.Parse(_ids[3]) : -1;
|
| | | int _reikiId = _ids.Length > 4 ? int.Parse(_ids[4]) : -1;
|
| | |
|
| | | // Debug.LogFormat("weapon: {0}, secondary: {1}, horse: {2}, wing: {3}", _weaponId, _secondaryId, _horseId, _weaponId);
|
| | |
|
| | |
| | | if (_horseId > 0)
|
| | | {
|
| | | SetEquipHorse(_horseId);
|
| | | }
|
| | |
|
| | | if (ReikiRootEffectConfig.Has(_reikiId))
|
| | | {
|
| | | if (m_ReikiEffect)
|
| | | {
|
| | | SFXPlayUtility.Instance.Release(m_ReikiEffect);
|
| | | m_ReikiEffect = null;
|
| | | }
|
| | | var _config = ReikiRootEffectConfig.Get(_reikiId);
|
| | | m_ReikiEffect = SFXPlayUtility.Instance.PlayBattleEffect(_config.effect, Root, 1);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | protected override void OnUnit()
|
| | | {
|
| | | if (m_ReikiEffect)
|
| | | {
|
| | | SFXPlayUtility.Instance.Release(m_ReikiEffect);
|
| | | m_ReikiEffect = null;
|
| | | }
|
| | |
|
| | | if (m_WeaponModel)
|
| | | {
|
| | | var _prefab = InstanceResourcesLoader.LoadModelRes(m_WeaponID);
|
| | |
| | |
|
| | | SystemSetting.Instance.qualityLevelChangeEvent -= OnGameQualityChange;
|
| | | dungeonModel.updateMissionEvent -= CheckAncientHeadUp;
|
| | |
|
| | | RlsLingGenEffect();
|
| | | base.OnUnit();
|
| | | }
|
| | |
|
| | |
| | | return;
|
| | | }
|
| | | RlsLingGenEffect();
|
| | | if (!LingGenNode)
|
| | | {
|
| | | LingGenNode = new GameObject();
|
| | | GameObject.DontDestroyOnLoad(LingGenNode);
|
| | | }
|
| | | var _config = ReikiRootEffectConfig.Get(id);
|
| | | var _sfx = SFXPlayUtility.Instance.PlayBattleEffect(_config.effect, LingGenNode.transform, 1);
|
| | | lingGenEffectList.Add(_sfx);
|
| | | var _effectConfig = EffectConfig.Get(_config.effect);
|
| | | if (_effectConfig.fxName.EndsWith("09")
|
| | | || _effectConfig.fxName.EndsWith("10")
|
| | | || _effectConfig.fxName.EndsWith("11"))
|
| | | {
|
| | | var _sfx = SFXPlayUtility.Instance.PlayBattleEffect(_config.effect, Root, 1);
|
| | | lingGenEffectList.Add(_sfx);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (!LingGenNode)
|
| | | {
|
| | | LingGenNode = new GameObject();
|
| | | GameObject.DontDestroyOnLoad(LingGenNode);
|
| | | }
|
| | |
|
| | | var _sfx = SFXPlayUtility.Instance.PlayBattleEffect(_config.effect, LingGenNode.transform, 1);
|
| | | lingGenEffectList.Add(_sfx);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | using H2Engine; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | |
| | | } |
| | | |
| | | public Vector3 lastDeadPos { get; set; } |
| | | |
| | | private bool HasStartCheck = false; |
| | | public void NpcDead(int eventID, GActor npc, int npcID) |
| | | { |
| | | if (eventID < 0 || npc == null) |
| | |
| | | lastDeadPos = npc.Pos; |
| | | } |
| | | |
| | | private IEnumerator DoWaitFakePickup() |
| | | { |
| | | yield return WaitingForSecondConst.WaitMS500; |
| | | while (ClientDropItemUtility.Instance.HasDropItem()) |
| | | { |
| | | yield return null; |
| | | } |
| | | |
| | | CA225_tagCMClientTaskCount _a225 = new CA225_tagCMClientTaskCount |
| | | { |
| | | CountID = 10001 |
| | | }; |
| | | GameNetSystem.Instance.SendInfo(_a225); |
| | | } |
| | | |
| | | public void Handle_0820(H0820_tagMissionDict package) |
| | | { |
| | | if (package.DictKey.Equals("gonpc")) |
| | | { |
| | | MapTransferUtility.Instance.MoveToNPC((int)package.DictValue); |
| | | } |
| | | |
| | | m_ReadyRemoveTriggerList.Clear(); |
| | | |
| | | foreach (var _triggerID in m_TriggerIDToMissionIDDict.Keys) |
| | |
| | | m_TriggerIDToMissionIDDict.Remove(_id); |
| | | } |
| | | |
| | | |
| | | if (package.DictKey.Equals("riggerID")) |
| | | { |
| | | int _triggerID = (int)package.DictValue; |
| | |
| | | { |
| | | SnxxzGame.Instance.StartCoroutine(DelayUnTrigger(_removeTriggerID)); |
| | | } |
| | | SnxxzGame.Instance.StartCoroutine(DoWaitFakePickup()); |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | m_EventHandlerDict.Add(_refreshEvent.GetEventID(), _refreshEvent); |
| | | } |
| | | HasStartCheck = false; |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(SpiritWeaponConfig); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 0, 11, 0); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 0, 12, 0); |
| | | |
| | | |
| | | |
| | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "NPCID", _g_get_NPCID); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "Rotation", _g_get_Rotation); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "scale", _g_get_scale); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "RawImgPos", _g_get_RawImgPos); |
| | | |
| | | |
| | | |
| | |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_RawImgPos(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | SpiritWeaponConfig gen_to_be_invoked = (SpiritWeaponConfig)translator.FastGetCSObj(L, 1); |
| | | translator.PushUnityEngineVector3(L, gen_to_be_invoked.RawImgPos); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | [SerializeField] Button m_Goto;
|
| | | [SerializeField] RawImage[] m_RawWeapons;
|
| | | [SerializeField, Header("武器角度,职业1,2,3")] Vector3[] m_WeaponAngles;
|
| | | [SerializeField] float[] m_WeaponScales;
|
| | |
|
| | | FairyLeagueModel model { get { return ModelCenter.Instance.GetModel<FairyLeagueModel>(); } }
|
| | | #region Built-in
|
| | |
| | | var job = PlayerDatas.Instance.baseData.Job;
|
| | | var _rawImage = m_RawWeapons[0];
|
| | | var _angle = m_WeaponAngles[0];
|
| | | var _scale = m_WeaponScales[0];
|
| | | var _weaponId = model.leagueNoticeWeapons.ContainsKey(job) ? model.leagueNoticeWeapons[job] : 0;
|
| | | if (_weaponId == 0)
|
| | | {
|
| | |
| | | {
|
| | | _rawImage = m_RawWeapons[i];
|
| | | _angle = m_WeaponAngles[i];
|
| | | _scale = m_WeaponScales[i];
|
| | | }
|
| | | }
|
| | |
|
| | | var config = ItemConfig.Get(_weaponId);
|
| | | UI3DModelExhibition.Instance.ShowEquipment(config.ChangeOrd, _angle, 1f, _rawImage);
|
| | | var spiritConfig = SpiritWeaponConfig.Get(_weaponId);
|
| | |
|
| | | UI3DModelExhibition.Instance.ShowEquipment(config.ChangeOrd, spiritConfig != null ? spiritConfig.Rotation : _angle,
|
| | | _scale, _rawImage);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | |
| | | List<int[]> priorityTaskChains = new List<int[]>(); |
| | | |
| | | List<int> allowAutoTaskMapIds = new List<int>(); |
| | | |
| | | private float mainTaskAutoWaitTime = 0f; |
| | | public readonly TaskWait taskWait = new TaskWait(); |
| | | |
| | |
| | | TaskAutoLv = int.Parse(Task_Auto.Numerical1); |
| | | TaskAutoTime = int.Parse(Task_Auto.Numerical2); |
| | | mainTaskAutoWaitTime = int.Parse(Task_Auto.Numerical3) / 1000f; |
| | | var mapIds = ConfigParse.GetMultipleStr<int>(Task_Auto.Numerical4); |
| | | if (mapIds != null && mapIds.Length > 0)
|
| | | {
|
| | | allowAutoTaskMapIds.AddRange(mapIds);
|
| | | } |
| | | |
| | | FairyAuTaskCount_Day = int.Parse(FuncConfigConfig.Get("RunTaskCnt").Numerical1.Split('|')[1].Split('_')[1]); |
| | | FairyAuTaskCount_Round = int.Parse(FuncConfigConfig.Get("RunTaskCnt").Numerical2.Split('|')[1].Split('_')[1]); |
| | | |
| | |
| | | { |
| | | try |
| | | { |
| | | if (!allowAutoTaskMapIds.Contains(PlayerDatas.Instance.baseData.MapID))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | var _hero = PlayerDatas.Instance.hero;
|
| | | if (_hero != null)
|
| | | {
|
| | | if (MapArea.IsInMapArea(_hero.CurMapArea, MapArea.E_Type.Boss))
|
| | | {
|
| | | return;
|
| | | }
|
| | | } |
| | | |
| | | if (MainTaskDic.ContainsKey(_taskID))//主线任务 |
| | | { |
| | | if (MainTaskDic[_taskID].MissionState == 0 || MainTaskDic[_taskID].MissionState == 3) |