| | |
| | | base.OnInit(package);
|
| | |
|
| | | m_LoadDefaultRes = false;
|
| | |
|
| | | var _package = package as H0406_tagNPCAppear;
|
| | | if (_package != null)
|
| | | int _npcID = 0;
|
| | | if (this is GA_NpcSummonFight)
|
| | | {
|
| | | NpcConfig = Config.Instance.Get<NPCConfig>((int)_package.NPCID);
|
| | | _npcID = (int)(package as H0408_tagPlayerSummonNPCAppear).NPCID;
|
| | | }
|
| | | else if (this is GA_Pet)
|
| | | {
|
| | | _npcID = (int)(package as H0435_tagPetAppear).NPCID;
|
| | | }
|
| | | else
|
| | | {
|
| | | var _package2 = package as H0408_tagPlayerSummonNPCAppear;
|
| | | if (_package2 != null)
|
| | | {
|
| | | NpcConfig = Config.Instance.Get<NPCConfig>((int)_package2.NPCID);
|
| | | }
|
| | | else
|
| | | {
|
| | | return;
|
| | | }
|
| | | _npcID = (int)(package as H0406_tagNPCAppear).NPCID;
|
| | | }
|
| | |
|
| | | if (_npcID == 0)
|
| | | {
|
| | | Debug.LogError("加载异常....");
|
| | | return;
|
| | | }
|
| | |
|
| | | NpcConfig = Config.Instance.Get<NPCConfig>(_npcID);
|
| | |
|
| | | if (NpcConfig == null)
|
| | | {
|
| | | // 报错
|
| | | Debug.LogError("配置异常....: " + _npcID);
|
| | | return;
|
| | | }
|
| | |
|