Exemple #1
0
 void OnLivingRoomClick()
 {
     if (m_RefNpc == null || !(m_RefNpc.m_Occupation == CSConst.potWorker || m_RefNpc.m_Occupation == CSConst.potDoctor))
     {
         return;
     }
     if (m_RefCommon.WorkerCount >= m_RefCommon.WorkerMaxCount)
     {
         return;
     }
     if (m_RefNpc.WorkRoom != m_RefCommon)
     {
         m_RefNpc.TrySetWorkRoom(m_RefCommon);
         //--to do: wait
         //if(GameConfig.IsMultiMode)
         //{
         //    if(m_RefNpc.m_Npc.Netlayer is AiAdNpcNetwork)
         //        ((AiAdNpcNetwork)m_RefNpc.m_Npc.Netlayer).SetClnWorkRoomID(m_RefNpc.WorkRoom.ID);
         //}
         CSUI_MainWndCtrl.ShowStatusBar(CSUtils.GetNoFormatString(UIMsgBoxInfo.mSetWorkRoom.GetString(), m_RefNpc.FullName, CSUtils.GetEntityName(m_RefCommon.m_Type)));
     }
 }