Exemplo n.º 1
0
        private void CheckPlayVoice(DBDialogContent.DialogContentInfo dialogContentInfo)
        {
            if (mDialogInfo == null || mDialogInfo.mType != DBDialog.EDialogType.IST_DialogBox)
            {
                return;
            }

            if (dialogContentInfo == null || dialogContentInfo.mObjectType != DBDialogContent.EDialogObjectType.DOT_Other)
            {
                return;
            }

            if (mDialogInfo.mId == mPlayingVoiceDialogId)
            {
                return;
            }

            if (mOtherPlayer == null || !mOtherPlayer.IsNpc())
            {
                return;
            }

            NpcPlayer npc = (NpcPlayer)mOtherPlayer;

            if (npc != null)
            {
                mPlayingVoiceDialogId = mDialogInfo.mId;
                npc.PlayRandomVoice();
            }
        }
Exemplo n.º 2
0
        static int _m_PlayRandomVoice(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            NpcPlayer __cl_gen_to_be_invoked = (NpcPlayer)translator.FastGetCSObj(L, 1);


            try {
                {
                    int __cl_gen_ret = __cl_gen_to_be_invoked.PlayRandomVoice(  );
                    LuaAPI.xlua_pushinteger(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }