Exemplo n.º 1
0
        private int OnCheckScript(void *pDialog, void *pNWSObjectOwner, void *sActive, void *scriptParams)
        {
            dialog = CNWSDialog.FromPointer(pDialog);

            if (stateStack.Peek() == DialogState.HandleReply)
            {
                stateStack.Pop();
                stateStack.Push(DialogState.SendEntry);

                CNWSDialogEntryArray entries = CNWSDialogEntryArray.FromPointer(dialog.m_pEntries);
                CNWSDialogReplyArray replies = CNWSDialogReplyArray.FromPointer(dialog.m_pReplies);

                indexReply = CNWSDialogLinkReplyArray.FromPointer(entries[(int)indexEntry].m_pReplies)[(int)indexReply].m_nIndex;
                indexEntry = CNWSDialogLinkEntryArray.FromPointer(replies[(int)indexReply].m_pEntries)[CurrentNodeIndex].m_nIndex;
            }

            CurrentScriptType = ScriptType.StartingConditional;
            int retVal = checkScriptHook.CallOriginal(pDialog, pNWSObjectOwner, sActive, scriptParams);

            CurrentNodeIndex++;
            CurrentScriptType = ScriptType.Other;

            return(retVal);
        }
Exemplo n.º 2
0
 public static CNWSDialogLinkEntryArray ToArray(this CNWSDialogLinkEntry pointer)
 {
     return(CNWSDialogLinkEntryArray.FromPointer(pointer));
 }