Ejemplo n.º 1
0
    private void SetHouseType(TownHouseSlot slot, TownHouseSlotType type, TownHouse house)
    {
        try
        {
            slot.SetHouse(new VillageHouseInfo()
            {
                Slot = slot.Slot,
                Type = (int)type
            }, house);

            if (slots != null && slots.Length > 0)
            {
                info.UsedSlots = slots.Count(x => x != null && x.SlotType != TownHouseSlotType.Empty && x.SlotType != TownHouseSlotType.Undefined);
            }
        }
        catch
        {
        }
    }
Ejemplo n.º 2
0
    internal void SetHouse(TownHouseSlot slot, TownHouseSlotType type)
    {
        if (slot == null || !slot || buildableTownHouses == null || buildableTownHouses.Length == 0)
        {
            return;
        }

        var house = buildableTownHouses.FirstOrDefault(x => x.Type == type);

        if (house == null || !house)
        {
            return;
        }

        slot.SetHouse(new VillageHouseInfo()
        {
            Slot = slot.Slot,
            Type = (int)type
        }, house);
    }