コード例 #1
0
        private void Stop()
        {
            if (_isDisableItemMove)
            {
                FuncEnableItemMove();
            }

            _binBuf = null;
        }
コード例 #2
0
ファイル: NpcSvr.cs プロジェクト: Dia/ScriptLib
 public bool Start()
 {
     BinBuf = new BinBuf();
     if (BinBuf.Load("scriptbin\\npc.bin"))
     {
         RunEvent(0, 0, 0, 0, 0);
         return(true);
     }
     else
     {
         MessageBox.Show("LoadScript : failure", "error", 0);
         return(false);
     }
 }
コード例 #3
0
 internal void Run(BinBuf binBuf, int pcId, int npcId, int act)
 {
     _npcId  = npcId;
     _binBuf = binBuf;
     if (npcId > 0)
     {
         var npc = NpcMgr.Get(npcId);
         if (npc != null)
         {
             var actionScriptPos = npc.GetActionScriptPos(act);
             if (actionScriptPos > 0)
             {
                 var success = Interpreter.Run(binBuf, actionScriptPos, false) == false;
                 // Ok, we got the line now and Interpreter.Run will set the position the the npc.bin buffer, but who executes the dialog?
             }
         }
     }
 }