private void StartMovingToVisitBuilding(TAI instance, uint citizenId, ref TCitizen citizen, ushort currentBuilding, ushort visitBuilding)
 {
     if (touristAI.StartMoving(instance, citizenId, ref citizen, currentBuilding, visitBuilding))
     {
         CitizenProxy.SetVisitPlace(ref citizen, citizenId, visitBuilding);
     }
 }
Beispiel #2
0
        private void StartMovingToVisitBuilding(TAI instance, uint citizenId, ref TCitizen citizen, ushort currentBuilding, ushort visitBuilding, bool isVirtual)
        {
            CitizenProxy.SetVisitPlace(ref citizen, citizenId, visitBuilding);
            CitizenProxy.SetVisitBuilding(ref citizen, visitBuilding);

            if (isVirtual)
            {
                CitizenProxy.SetLocation(ref citizen, Citizen.Location.Visit);
                touristAI.AddTouristVisit(instance, citizenId, visitBuilding);
            }
            else
            {
                touristAI.StartMoving(instance, citizenId, ref citizen, currentBuilding, visitBuilding);
            }
        }
Beispiel #3
0
        private bool StartMovingToVisitBuilding(TAI instance, uint citizenId, ref TCitizen citizen, ushort currentBuilding, ushort visitBuilding)
        {
            CitizenProxy.SetVisitPlace(ref citizen, citizenId, visitBuilding);
            if (CitizenProxy.GetVisitBuilding(ref citizen) == 0)
            {
                // Building is full and doesn't accept visitors anymore
                return(false);
            }

            if (!touristAI.StartMoving(instance, citizenId, ref citizen, currentBuilding, visitBuilding))
            {
                CitizenProxy.SetVisitPlace(ref citizen, citizenId, 0);
                return(false);
            }

            return(true);
        }