示例#1
0
    public void TrySetProcessingIndex(int index)
    {
        if (processingIndex == index)
        {
            return;
        }

        if (index >= 0)
        {
            //--to do: can't work
            if (!CanProcess)
            {
                CSUtils.ShowCannotWorkReason(CannotWorkReason, FullName);
                return;
            }
        }
        if (PeGameMgr.IsMulti)
        {
            if ((AiAdNpcNetwork)NetworkInterface.Get(ID) != null)
            {
                ((AiAdNpcNetwork)NetworkInterface.Get(ID)).RPCServer(EPacketType.PT_CL_CLN_SetProcessingIndex, index);
            }
        }
        else
        {
            ProcessingIndex = index;
        }
    }
示例#2
0
 public bool CheckNpcState(CSPersonnel trainerNpc)
 {
     if (!trainerNpc.CanTrain)
     {
         CSUtils.ShowCannotWorkReason(trainerNpc.CannotWorkReason, trainerNpc.FullName);
         return(false);
     }
     return(true);
 }
示例#3
0
 public bool CheckNpcState(CSPersonnel _instructorNpc, CSPersonnel _traineeNpc)
 {
     if (!_instructorNpc.CanTrain)
     {
         CSUtils.ShowCannotWorkReason(_instructorNpc.CannotWorkReason, _instructorNpc.FullName);
         return(false);
     }
     if (!_traineeNpc.CanTrain)
     {
         CSUtils.ShowCannotWorkReason(_traineeNpc.CannotWorkReason, _traineeNpc.FullName);
         return(false);
     }
     return(true);
 }