public void OnTalk(uint npcID) { string scriptfile = GetNpcScriptFile(npcID); if (scriptfile != "") { CGameScript pScript = CScriptLuaMgr.Inst.CreateScript(scriptfile, true); if (pScript != null) { pScript.GetStoreFunction("OnTalk" + npcID.ToString()); pScript.RunFunction(0, 0); } } }
public void OnQuestTalk(uint questid, int step) { uint npcid = CQuestMgr.Inst.GetTalkNPCTypeID(); string scriptfile = GetNpcScriptFile(npcid); if (scriptfile != "") { CGameScript pScript = CScriptLuaMgr.Inst.CreateScript(scriptfile, true); if (pScript != null) { pScript.GetStoreFunction("OnQuestTalk" + npcid.ToString()); pScript.PushUint(questid); pScript.PushInt(step); pScript.RunFunction(2, 0); } } }