示例#1
0
    public void DropMercenary(MercenaryIdentity id)
    {
        MercenaryLogicData mercenaryData = LogicController.Instance.GetMercenaryData(id);

        this.m_Buildings[mercenaryData.CampID.buildingType][mercenaryData.CampID.buildingNO].DropMercenary(id);
        this.AssignArmies();
    }
示例#2
0
    public void HireMercenary(MercenaryIdentity id, BuildingIdentity campID)
    {
        MercenaryData data = new MercenaryData();

        data.CampID     = campID;
        data.ConfigData = ConfigInterface.Instance.MercenaryConfigHelper.GetMercenaryData(id.mercenaryType);
        MercenaryLogicData logicData = new MercenaryLogicData(data);

        if (!this.m_Mercenaries.ContainsKey(id.mercenaryType))
        {
            this.m_Mercenaries.Add(id.mercenaryType, new Dictionary <int, MercenaryLogicData>());
        }
        this.m_Mercenaries[id.mercenaryType].Add(id.mercenaryNO, logicData);
    }