private void OnRunScript(void *pDialog, void *pNWSObjectOwner, void *sScript, void *scriptParams) { dialog = CNWSDialog.FromPointer(pDialog); CurrentScriptType = ScriptType.ActionTaken; runScriptHook.CallOriginal(pDialog, pNWSObjectOwner, sScript, scriptParams); CurrentScriptType = ScriptType.Other; }
private int OnSendDialogReplies(void *pDialog, void *pNWSObjectOwner, uint nPlayerIdGUIOnly) { dialog = CNWSDialog.FromPointer(pDialog); CurrentNodeIndex = 0; stateStack.Push(DialogState.SendReplies); int retVal = sendDialogRepliesHook.CallOriginal(pDialog, pNWSObjectOwner, nPlayerIdGUIOnly); stateStack.Pop(); return(retVal); }
private int OnGetStartEntryOneLiner(void *pDialog, void *pNWSObjectOwner, void *sOneLiner, void *sSound, void *sScript, void *scriptParams) { dialog = CNWSDialog.FromPointer(pDialog); CurrentNodeIndex = 0; stateStack.Push(DialogState.Start); int retVal = getStartEntryOneLinerHook.CallOriginal(pDialog, pNWSObjectOwner, sOneLiner, sSound, sScript, scriptParams); stateStack.Pop(); return(retVal); }
private uint OnGetStartEntry(void *pDialog, void *pNWSObjectOwner) { dialog = CNWSDialog.FromPointer(pDialog); CurrentNodeIndex = 0; stateStack.Push(DialogState.Start); uint retVal = getStartEntryHook.CallOriginal(pDialog, pNWSObjectOwner); stateStack.Pop(); return(retVal); }
private int OnSendDialogEntry(void *pDialog, void *pNWSObjectOwner, uint nPlayerIdGUIOnly, uint iEntry, int bPlayHelloSound) { dialog = CNWSDialog.FromPointer(pDialog); CurrentNodeIndex = 0; stateStack.Push(DialogState.SendEntry); indexEntry = iEntry; int retVal = sendDialogEntryHook.CallOriginal(pDialog, pNWSObjectOwner, nPlayerIdGUIOnly, iEntry, bPlayHelloSound); stateStack.Pop(); return(retVal); }
private int OnHandleReply(void *pDialog, uint nPlayerID, void *pNWSObjectOwner, uint nReplyIndex, int bEscapeDialog, uint currentEntryIndex) { dialog = CNWSDialog.FromPointer(pDialog); CurrentNodeIndex = 0; stateStack.Push(DialogState.HandleReply); indexEntry = currentEntryIndex; indexReply = nReplyIndex; int retVal = handleReplyHook.CallOriginal(pDialog, nPlayerID, pNWSObjectOwner, nReplyIndex, bEscapeDialog, currentEntryIndex); stateStack.Pop(); return(retVal); }
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); }