Beispiel #1
0
 /// <summary>
 /// Tries to purchase a vehicle for client
 /// Is called from event handler
 /// </summary>
 /// <param name="client">Client</param>
 /// <param name="model">Vehicle model</param>
 /// <param name="color1">Vehicle color 1</param>
 /// <param name="color2">Vehicle color 2</param>
 public void TryPurchaseVehicle(Character character, int id, string model, int color1, int color2)
 {
     VehicleShop shop = GetVehicleShopWithId(id);
     if (shop != null)
     {
         shop.PurchaseVehicle(character, model, color1, color2);
     }
     
 }
Beispiel #2
0
        /// <summary>
        /// Tries to purchase a vehicle for client
        /// Is called from event handler
        /// </summary>
        /// <param name="c">Client</param>
        /// <param name="model">Vehicle model</param>
        /// <param name="color1">Vehicle color 1</param>
        /// <param name="color2">Vehicle color 2</param>
        public void TryPurchaseVehicle(Client c, int id, string model, int color1, int color2)
        {
            Character   character = PlayerManager.Instance().GetActiveCharacterForClient(c);
            VehicleShop shop      = GetVehicleShopWithId(id);

            if (shop != null)
            {
                shop.PurchaseVehicle(character, model, color1, color2);
            }
        }