public int GetDonationLimit(int allianceLevel) { if (allianceLevel > 0) { LogicAllianceLevelData allianceLevelData = LogicDataTables.GetAllianceLevel(allianceLevel); if (allianceLevelData != null) { return(allianceLevelData.GetTroopDonationLimit()); } } return(LogicDataTables.GetGlobals().GetMaxTroopDonationCount()); }
public static int GetMaxUnitDonationCount(int allianceLevel, int unitType) { if (unitType == 1) { return(LogicDataTables.GetGlobals().GetMaxSpellDonationCount()); } if (allianceLevel > 0) { LogicAllianceLevelData allianceLevelData = LogicDataTables.GetAllianceLevel(allianceLevel); if (allianceLevelData != null) { return(allianceLevelData.GetTroopDonationLimit()); } } return(LogicDataTables.GetGlobals().GetMaxTroopDonationCount()); }