public override void Deserialize(GenericReader reader) { base.Deserialize(reader); reader.ReadInt(); int c = reader.ReadInt(); for (int i = 0; i < c; i++) { Mobile m = reader.ReadMobile(); DateTime dt = reader.ReadDateTime(); if (m != null && dt > DateTime.UtcNow) { PlantDelayTable[m] = dt; } } if (Map == Map.Felucca) { FelInstance = this; } else if (Map == Map.Trammel) { TramInstance = this; } else { Delete(); } }
public override void Delete() { if (Owner != null && PlantStatus < PlantStatus.DecorativePlant) { MaginciaPlantSystem.OnPlantDelete(Owner, Map); } base.Delete(); }
public static void Initialize() { if (Enabled) { if (FelInstance == null) { FelInstance = new MaginciaPlantSystem(); FelInstance.MoveToWorld(new Point3D(3715, 2049, 5), Map.Felucca); } if (TramInstance == null) { TramInstance = new MaginciaPlantSystem(); TramInstance.MoveToWorld(new Point3D(3715, 2049, 5), Map.Trammel); } } }
public static void Initialize() { if (Enabled) { if (m_FelInstance == null) { m_FelInstance = new MaginciaPlantSystem(); m_FelInstance.MoveToWorld(new Point3D(3715, 2049, 5), Map.Felucca); } if (m_TramInstance == null) { m_TramInstance = new MaginciaPlantSystem(); m_TramInstance.MoveToWorld(new Point3D(3715, 2049, 5), Map.Trammel); } } }
public override bool PlantSeed(Mobile from, Seed seed) { if (!MaginciaPlantSystem.CheckDelay(from) || !CheckLocation(from, seed) || !base.PlantSeed(from, seed)) { return(false); } if (m_Timer != null) { m_Timer.Stop(); m_Timer = null; } Owner = from; Planted = DateTime.UtcNow; MaginciaPlantSystem.OnPlantPlanted(from, from.Map); return(true); }
public static bool CheckDelay(Mobile from) { MaginciaPlantSystem system = null; Map map = from.Map; if (map == Map.Trammel) { system = TramInstance; } else if (map == Map.Felucca) { system = FelInstance; } if (system == null) { from.SendLocalizedMessage(1150457); // The ground here is not good for gardening. return(false); } return(system.CheckPlantDelay(from)); }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); int c = reader.ReadInt(); for (int i = 0; i < c; i++) { Mobile m = reader.ReadMobile(); DateTime dt = reader.ReadDateTime(); if (m != null && dt > DateTime.UtcNow) m_PlantDelayTable[m] = dt; } if (this.Map == Map.Felucca) m_FelInstance = this; else if (this.Map == Map.Trammel) m_TramInstance = this; else Delete(); }