public void Destruct()
 {
     this.m_functionData  = null;
     this.m_calendarEvent = null;
     this.m_errorHandler  = null;
     this.m_parameters    = null;
 }
Esempio n. 2
0
        public virtual void Destruct()
        {
            if (this.m_functions != null)
            {
                for (int i = this.m_functions.Size() - 1; i >= 0; i--)
                {
                    this.m_functions[i].Destruct();
                    this.m_functions.Remove(i);
                }

                this.m_functions = null;
            }

            if (this.m_buildingBoostCost != null)
            {
                while (this.m_buildingBoostCost.Size() > 0)
                {
                    this.m_buildingBoostCost[0].Destruct();
                    this.m_buildingBoostCost.Remove(0);
                }

                this.m_troopDiscount = null;
            }

            if (this.m_troopDiscount != null)
            {
                while (this.m_troopDiscount.Size() > 0)
                {
                    this.m_troopDiscount[0].Destruct();
                    this.m_troopDiscount.Remove(0);
                }

                this.m_troopDiscount = null;
            }

            if (this.m_freeTroops != null)
            {
                while (this.m_freeTroops.Size() > 0)
                {
                    this.m_freeTroops[0].Destruct();
                    this.m_freeTroops.Remove(0);
                }

                this.m_freeTroops = null;
            }

            this.m_enabledData = null;
            this.m_useTroops   = null;

            this.m_clashBoxEntryName = null;
            this.m_notificationTid   = null;
            this.m_image             = null;
            this.m_sc           = null;
            this.m_localization = null;

            this.m_eventEntryData = null;
            this.m_targeting      = null;
            this.m_errorHandler   = null;
        }
        public LogicCalendarFunction(LogicCalendarEvent calendarEvent, int idx, LogicJSONObject jsonObject, LogicCalendarErrorHandler errorHandler)
        {
            this.m_parameters = new LogicArrayList <string>();

            this.m_calendarEvent = calendarEvent;
            this.m_errorHandler  = errorHandler;

            this.m_idx = idx;

            this.Load(jsonObject);
        }
        public static LogicCalendarEvent LoadFromJSON(LogicJSONObject jsonObject, LogicCalendarErrorHandler errorHandler)
        {
            LogicJSONNumber    typeObject    = jsonObject.GetJSONNumber("type");
            LogicCalendarEvent calendarEvent = LogicCalendarEventFactory.CreateByType(typeObject.GetIntValue());

            if (errorHandler != null)
            {
                calendarEvent.SetErrorHandler(errorHandler);
            }

            calendarEvent.Init(jsonObject);
            return(calendarEvent);
        }
Esempio n. 5
0
        public LogicCalendarEvent()
        {
            this.m_errorHandler = new LogicCalendarErrorHandler();

            this.m_functions         = new LogicArrayList <LogicCalendarFunction>();
            this.m_buildingBoostCost = new LogicArrayList <LogicDataSlot>();
            this.m_troopDiscount     = new LogicArrayList <LogicDataSlot>();
            this.m_enabledData       = new LogicArrayList <LogicData>();
            this.m_freeTroops        = new LogicArrayList <LogicDataSlot>();
            this.m_useTroops         = new LogicArrayList <LogicCalendarUseTroop>();

            this.m_allianceXpMultiplier           = 1;
            this.m_starBonusMultiplier            = 1;
            this.m_allianceWarWinLootMultiplier   = 1;
            this.m_allianceWarDrawLootMultiplier  = 1;
            this.m_allianceWarLooseLootMultiplier = 1;
        }
Esempio n. 6
0
 public void SetErrorHandler(LogicCalendarErrorHandler errorHandler)
 {
     this.m_errorHandler = errorHandler;
 }