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; } }
public bool CheckNpcState(CSPersonnel trainerNpc) { if (!trainerNpc.CanTrain) { CSUtils.ShowCannotWorkReason(trainerNpc.CannotWorkReason, trainerNpc.FullName); return(false); } return(true); }
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); }