public void Load(SaveGameData p_data)
        {
            m_items.Clear();
            Int32 num = p_data.Get <Int32>("ItemCount", 0);

            for (Int32 i = 0; i < num; i++)
            {
                EDataType    p_type       = (EDataType)p_data.Get <Int32>("Type" + i, 0);
                SaveGameData saveGameData = p_data.Get <SaveGameData>("Item" + i, null);
                if (saveGameData != null)
                {
                    try
                    {
                        BaseItem baseItem = ItemFactory.CreateItem(p_type);
                        baseItem.Load(saveGameData);
                        m_items.Add(baseItem);
                    }
                    catch (Exception ex)
                    {
                        LegacyLogger.Log(ex.ToString());
                    }
                }
            }
            SaveGameData saveGameData2 = p_data.Get <SaveGameData>("UpdateTime", null);

            if (saveGameData2 != null)
            {
                m_updateTime.Load(saveGameData2);
            }
            m_initialItemUpdateDone = p_data.Get <Boolean>("InitialItemUpdateDone", false);
        }
        public override void Load(SaveGameData p_data)
        {
            base.Load(p_data);
            m_partyBuff     = p_data.Get <EPartyBuffs>("PartyBuff", EPartyBuffs.NONE);
            m_special       = p_data.Get <ERechargerSpecial>("Special", ERechargerSpecial.NONE);
            m_rechargerType = p_data.Get <ERechargerType>("RechargerType", ERechargerType.FOUNTAIN);
            SaveGameData saveGameData = p_data.Get <SaveGameData>("LastActivation", null);

            if (saveGameData != null)
            {
                m_lastActivationTime.Load(saveGameData);
            }
        }
Exemple #3
0
 public void Load(SaveGameData p_data)
 {
     m_time.Load(p_data);
     m_calendar.SetDateByPassedTime(m_time.Days);
     UpdateTime(0, ETimeChangeReason.None);
 }