Ejemplo n.º 1
0
        static Globals()
        {
            mod = NWN2Toolset.NWN2ToolsetMainForm.App.Module;
            repository = mod.Repository;
            items = mod.GetBlueprintCollectionForType(NWN2Toolset.NWN2.Data.Templates.NWN2ObjectType.Item);

            customTlk = new OEIShared.IO.TalkTable.TalkTable();
            customTlk.OpenCustom(OEIShared.Utils.BWLanguages.BWLanguage.English, "alfa_acr02.tlk");

            tdaManager = TwoDAManager.Instance;

            spellschools2da = tdaManager.Get("spellschools");
            nwn2_icons2da = tdaManager.Get("nwn2_icons");
            iprp_spells2da = tdaManager.Get("iprp_spells");

            spells = new NWN2Toolset.NWN2.Rules.CNWSpellArray();
            spells.Load();

            globalItemCollection = NWN2Toolset.NWN2.Data.Blueprints.NWN2GlobalBlueprintManager.GetBlueprintsOfType(NWN2Toolset.NWN2.Data.Templates.NWN2ObjectType.Item);

            iconHash = new Dictionary<string, int>();
            int rowCount = Globals.nwn2_icons2da.RowCount;
            for (int i = 0; i < rowCount; i++)
            {
                string twodaString = Globals.nwn2_icons2da["ICON"][i];
                if (!iconHash.ContainsKey(twodaString))
                {
                    iconHash.Add(twodaString, i);
                }
            }
        }
Ejemplo n.º 2
0
        void ShowTalk(UInt64 sGUID, string nickName, string info, int head, bool cat)
        {
            ResourceItem objUnit = ResourcesManager.Instance.loadImmediate(GameConstDefine.LoadTalk, ResourceType.PREFAB);
            GameObject   obj     = GameObject.Instantiate(objUnit.Asset) as GameObject;

            obj.transform.parent        = TalkTable.transform;
            obj.transform.localPosition = Vector3.zero;
            obj.transform.localScale    = Vector3.one;
            SetVib(nickName, obj, info, head, !cat);
            TaskChat.Add(obj);
            TalkTable.repositionNow = true;
            TalkTable.Reposition();
            ScrollBar.value = 1;
        }