| | |
| | | #region npc
|
| | | public int NpcID
|
| | | {
|
| | | get; private set;
|
| | | get; set;
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | |
|
| | | MapModel _model = ModelCenter.Instance.GetModel<MapModel>();
|
| | | GActor _npc = null;
|
| | |
|
| | | // 加入判断是否世界BOSS判断
|
| | | WorldBossConfig _worldBoss = Config.Instance.Get<WorldBossConfig>(npcID);
|
| | |
|
| | | if (_findLocation)
|
| | | {
|
| | | var _mapConfig = Config.Instance.Get<MapConfig>(_npcLocation.mapId);
|
| | | // 中立地图
|
| | | if (_mapConfig.Camp == 5 && _worldBoss != null)
|
| | | {
|
| | | if (_npcLocation.mapId == PlayerDatas.Instance.baseData.MapID)
|
| | | {
|
| | | Send_WorldTransfer(_npcLocation.mapId,
|
| | | new Vector3(_hero.Pos.x * 2, 0, _hero.Pos.z * 2),
|
| | | MapTransferType.WorldTransport, 0, npcID);
|
| | | }
|
| | | else
|
| | | {
|
| | | Send_WorldTransfer(_npcLocation.mapId,
|
| | | new Vector3(_mapConfig.BornPoints[0].x, 0, _mapConfig.BornPoints[0].y),
|
| | | MapTransferType.WorldTransport, 0, npcID);
|
| | | }
|
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | | FairyGrabBossConfig _fairyBoss = Config.Instance.Get<FairyGrabBossConfig>(npcID);
|
| | | bool _isBoss = _worldBoss != null || _fairyBoss != null;
|
| | | if (_isBoss && _findLocation)
|
| | |
| | | {
|
| | | if (_config.NPCType == (int)E_NpcType.OpenWorldMap)
|
| | | {
|
| | | if (!WindowCenter.Instance.CheckOpen<WorldMapWin>())
|
| | | if (!WindowCenter.Instance.IsOpen<WorldMapWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<WorldMapWin>();
|
| | | if (_hero.State == E_ActorState.AutoRun)
|