Exemple #1
0
    public void Recruit()
    {
        if (this.m_charShipmentRec.GarrFollowerID == 0u)
        {
            TroopSlot   troopSlot            = null;
            TroopSlot[] componentsInChildren = this.m_troopSlotsRootObject.GetComponentsInChildren <TroopSlot>(true);
            foreach (TroopSlot troopSlot2 in componentsInChildren)
            {
                if (troopSlot2.IsEmpty())
                {
                    troopSlot = troopSlot2;
                    break;
                }
            }
            if (troopSlot == null)
            {
                return;
            }
            troopSlot.SetPendingCreate();
            this.UpdateRecruitButtonState();
        }
        MobilePlayerCreateShipment mobilePlayerCreateShipment = new MobilePlayerCreateShipment();

        mobilePlayerCreateShipment.CharShipmentID = this.m_charShipmentRec.ID;
        mobilePlayerCreateShipment.NumShipments   = 1;
        Login.instance.SendToMobileServer(mobilePlayerCreateShipment);
        Main.instance.m_UISound.Play_RecruitTroop();
    }
Exemple #2
0
    public void Recruit()
    {
        MobilePlayerCreateShipment mobilePlayerCreateShipment = new MobilePlayerCreateShipment();

        mobilePlayerCreateShipment.CharShipmentID = this.m_charShipmentRec.ID;
        mobilePlayerCreateShipment.NumShipments   = 1;
        Login.instance.SendToMobileServer(mobilePlayerCreateShipment);
        Main.instance.m_UISound.Play_RecruitTroop();
    }
    public void Recruit()
    {
        Debug.Log("Attempting To Recruit! CharShipment ID = " + this.m_shipmentType.CharShipmentID);
        MobilePlayerCreateShipment mobilePlayerCreateShipment = new MobilePlayerCreateShipment();

        mobilePlayerCreateShipment.CharShipmentID = this.m_shipmentType.CharShipmentID;
        mobilePlayerCreateShipment.NumShipments   = 1;
        Login.instance.SendToMobileServer(mobilePlayerCreateShipment);
        Main.instance.m_UISound.Play_RecruitTroop();
    }