Beispiel #1
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            var version = reader.GetVersion();

            switch (version)
            {
            case 0:
                Entity = reader.ReadMobile <HauntedMomentoEntity>();
                break;
            }
        }
Beispiel #2
0
 protected virtual void InvalidateEntity()
 {
     if (Map == null || Map == Map.Internal || !(RootParent is Mobile) || Parent is BankBox || ((Mobile)RootParent).Hidden)
     {
         if (Entity != null)
         {
             Entity.Delete();
             Entity = null;
         }
     }
     else if (Entity == null || Entity.Deleted)
     {
         Entity = CreateEntity();
     }
 }