public void ChangeAi(NPCScriptBase _this, ObjNPC npc, int nextId) { if (nextId == -1) { return; } var tbAI = Table.GetAI(nextId); if (tbAI == null) { return; } npc.TableAI = tbAI; Logger.Info("guid={0},sceneid={1}", npc.Scene.Guid, npc.Scene.TypeId); SceneServer.Instance.ServerControl.ObjSpeak(npc.EnumAllVisiblePlayerIdExclude(), npc.ObjId, tbAI.EnterSpeak, string.Empty); }