//private bool m_AdminInUse; public TownStone(POMI Pomi) : base(0xED4) { m_Pomi = Pomi; m_Citoyens = new ArrayList(); m_Candidats = new ArrayList(); m_HLL = new ArrayList(); m_Allies = new ArrayList(); m_Paix = new ArrayList(); m_Guerre = new ArrayList(); m_Neutre = new ArrayList(); m_Maire = null; m_Conseiller = null; m_Ambassadeur = null; m_Capitaine = null; m_Gardes = new ArrayList(); m_gardes_pnj = new ArrayList(); m_MaireCloak = null; m_ConseillerCloak = null; m_AmbassadeurCloak = null; m_CapitaineCloak = null; m_CapitaineBook = null; m_GardeCloak = new ArrayList(); Name = "Pierre de ville"; m_Nom = "Sans nom"; m_Votants = new ArrayList(); m_Elections = new ArrayList(); m_Resultats = new ArrayList(); m_ElecDelay = TimeSpan.FromDays(14.0); m_EndDate = DateTime.Now + m_ElecDelay; m_ElecTimer = new ElectionTimer(this, m_ElecDelay); m_ElecTimer.Start(); m_MaxDistance = 100; //m_AdminInUse = false; }
//private bool m_AdminInUse; public TownStone(POMI Pomi) : base( 0xED4 ) { m_Pomi = Pomi; m_Citoyens = new ArrayList(); m_Candidats = new ArrayList(); m_HLL = new ArrayList(); m_Allies = new ArrayList(); m_Paix = new ArrayList(); m_Guerre = new ArrayList(); m_Neutre = new ArrayList(); m_Maire = null; m_Conseiller = null; m_Ambassadeur = null; m_Capitaine = null; m_Gardes = new ArrayList(); m_gardes_pnj = new ArrayList(); m_MaireCloak = null; m_ConseillerCloak = null; m_AmbassadeurCloak = null; m_CapitaineCloak = null; m_CapitaineBook = null; m_GardeCloak = new ArrayList(); Name = "Pierre de ville"; m_Nom = "Sans nom"; m_Votants = new ArrayList(); m_Elections = new ArrayList(); m_Resultats = new ArrayList(); m_ElecDelay = TimeSpan.FromDays( 14.0 ); m_EndDate = DateTime.Now + m_ElecDelay; m_ElecTimer = new ElectionTimer(this, m_ElecDelay); m_ElecTimer.Start(); m_MaxDistance = 100; //m_AdminInUse = false; }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); switch (version) { case 1: { m_VilleRace = (VilleRaciale)reader.ReadByte(); goto case 0; } case 0: { m_Citoyens = reader.ReadMobileList(); m_Candidats = reader.ReadMobileList(); m_HLL = reader.ReadMobileList(); m_Gardes = reader.ReadMobileList(); m_gardes_pnj = reader.ReadItemList(); m_Maire = (PlayerMobile)reader.ReadMobile(); m_Conseiller = (PlayerMobile)reader.ReadMobile(); m_Ambassadeur = (PlayerMobile)reader.ReadMobile(); m_Capitaine = (PlayerMobile)reader.ReadMobile(); m_Pomi = (POMI)reader.ReadItem(); m_MaireCloak = (PomiCloak)reader.ReadItem(); m_ConseillerCloak = (PomiCloak)reader.ReadItem(); m_AmbassadeurCloak = (PomiCloak)reader.ReadItem(); m_CapitaineCloak = (PomiCloak)reader.ReadItem(); m_CapitaineBook = (CapitaineBook)reader.ReadItem(); m_GardeCloak = reader.ReadItemList(); m_Nom = reader.ReadString(); m_Charte0 = reader.ReadString(); m_Charte1 = reader.ReadString(); m_Charte2 = reader.ReadString(); m_Charte3 = reader.ReadString(); m_Charte4 = reader.ReadString(); m_Charte5 = reader.ReadString(); m_Charte6 = reader.ReadString(); m_Charte7 = reader.ReadString(); m_Votants = reader.ReadMobileList(); m_Elections = reader.ReadMobileList(); m_Resultats = reader.ReadMobileList(); m_EndDate = reader.ReadDateTime(); m_ElecTimer = new ElectionTimer(this, m_EndDate - DateTime.Now); m_ElecTimer.Start(); m_ElecDelay = reader.ReadTimeSpan(); m_MaxDistance = reader.ReadInt(); m_Allies = reader.ReadItemList(); m_Paix = reader.ReadItemList(); m_Guerre = reader.ReadItemList(); m_Neutre = reader.ReadItemList(); m_Box = (TownBox)reader.ReadItem(); break; } } }
public CapitaineBookGump(PlayerMobile from, TownStone town, CapitaineBook book) : base(20, 30) { m_Town = town; m_book = book; int i; AddPage(0); AddBackground(0, 0, 420, 430, 5054); AddBackground(10, 10, 400, 410, 3000); AddLabel(150, 10, 0, "Livre du Capitaine"); AddLabel(130 + ((143 - (town.Nom.Length * 8)) / 2), 30, 0, town.Nom); if (m_Town.Gardes.Count < 10) { AddLabel(40, 75, 0, "Nommer un Garde"); AddButton(20, 75, 2714, 2715, 1, GumpButtonType.Reply, 0); } if (m_Town.GardesPNJ.Count > 0) { AddLabel(250, 75, 0, "Rayon :"); AddTextEntry(300, 75, 100, 20, 0x384, 1, String.Format("{0}", ((GuardSpawner)(m_Town.GardesPNJ[0])).RangeHome)); AddButton(340, 75, 2714, 2715, 2, GumpButtonType.Reply, 0); } i = 0; foreach (PlayerMobile mobile in m_Town.Gardes) { AddLabel(40, 120 + i * 30, 0, mobile.Name); AddButton(15, 120 + i * 30, 0xA94, 0xA95, 100 + i, GumpButtonType.Reply, 0); try { AddLabel(220, 120 + i * 30, 0, String.Format("{0} {1}", ((GuardSpawner)(m_Town.GardesPNJ[i])).Name, ((GuardSpawner)(m_Town.GardesPNJ[i])).Location)); AddButton(200, 120 + i * 30, 0xA94, 0xA95, 250 + i, GumpButtonType.Reply, 0); } catch { AddLabel(220, 120 + i * 30, 0, "Ajouter Garde PNJ"); AddButton(200, 120 + i * 30, 2714, 2715, 200 + i, GumpButtonType.Reply, 0); } i++; } }
public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); switch ( version ) { case 1: { m_VilleRace = (VilleRaciale)reader.ReadByte(); goto case 0; } case 0: { m_Citoyens = reader.ReadMobileList(); m_Candidats = reader.ReadMobileList(); m_HLL = reader.ReadMobileList(); m_Gardes = reader.ReadMobileList(); m_gardes_pnj = reader.ReadItemList(); m_Maire = (PlayerMobile)reader.ReadMobile(); m_Conseiller = (PlayerMobile)reader.ReadMobile(); m_Ambassadeur = (PlayerMobile)reader.ReadMobile(); m_Capitaine = (PlayerMobile)reader.ReadMobile(); m_Pomi = (POMI)reader.ReadItem(); m_MaireCloak = (PomiCloak)reader.ReadItem(); m_ConseillerCloak = (PomiCloak)reader.ReadItem(); m_AmbassadeurCloak = (PomiCloak)reader.ReadItem(); m_CapitaineCloak = (PomiCloak)reader.ReadItem(); m_CapitaineBook = (CapitaineBook)reader.ReadItem(); m_GardeCloak = reader.ReadItemList(); m_Nom = reader.ReadString(); m_Charte0 = reader.ReadString(); m_Charte1 = reader.ReadString(); m_Charte2 = reader.ReadString(); m_Charte3 = reader.ReadString(); m_Charte4 = reader.ReadString(); m_Charte5 = reader.ReadString(); m_Charte6 = reader.ReadString(); m_Charte7 = reader.ReadString(); m_Votants = reader.ReadMobileList(); m_Elections = reader.ReadMobileList(); m_Resultats = reader.ReadMobileList(); m_EndDate = reader.ReadDateTime(); m_ElecTimer = new ElectionTimer(this, m_EndDate - DateTime.Now); m_ElecTimer.Start(); m_ElecDelay = reader.ReadTimeSpan(); m_MaxDistance = reader.ReadInt(); m_Allies = reader.ReadItemList(); m_Paix = reader.ReadItemList(); m_Guerre = reader.ReadItemList(); m_Neutre = reader.ReadItemList(); m_Box = (TownBox)reader.ReadItem(); break; } } }
public void NouveauConseil() { if(m_MaireCloak != null) m_MaireCloak.Delete(); m_MaireCloak = null; if(m_Conseiller != null) m_Conseiller.Title = null; m_Conseiller = null; if(m_ConseillerCloak != null) m_ConseillerCloak.Delete(); m_ConseillerCloak = null; if(m_Ambassadeur != null) m_Ambassadeur.Title = null; m_Ambassadeur = null; if(m_AmbassadeurCloak != null) m_AmbassadeurCloak.Delete(); m_AmbassadeurCloak = null; if(m_Capitaine != null) m_Capitaine.Title = null; m_Capitaine = null; if(m_CapitaineCloak != null) m_CapitaineCloak.Delete(); m_CapitaineCloak = null; if(m_CapitaineBook != null) m_CapitaineBook.Delete(); m_CapitaineBook = null; foreach(PlayerMobile GardePlayer in m_Gardes) GardePlayer.Title = null; m_Gardes.Clear(); foreach(GuardSpawner guard in m_gardes_pnj) guard.Delete(); m_gardes_pnj.Clear(); foreach(PomiCloak cloak in m_GardeCloak) cloak.Delete(); m_GardeCloak.Clear(); m_Votants.Clear(); m_Elections.Clear(); m_Resultats.Clear(); }
public void NouveauConseil() { if (m_MaireCloak != null) { m_MaireCloak.Delete(); } m_MaireCloak = null; if (m_Conseiller != null) { m_Conseiller.Title = null; } m_Conseiller = null; if (m_ConseillerCloak != null) { m_ConseillerCloak.Delete(); } m_ConseillerCloak = null; if (m_Ambassadeur != null) { m_Ambassadeur.Title = null; } m_Ambassadeur = null; if (m_AmbassadeurCloak != null) { m_AmbassadeurCloak.Delete(); } m_AmbassadeurCloak = null; if (m_Capitaine != null) { m_Capitaine.Title = null; } m_Capitaine = null; if (m_CapitaineCloak != null) { m_CapitaineCloak.Delete(); } m_CapitaineCloak = null; if (m_CapitaineBook != null) { m_CapitaineBook.Delete(); } m_CapitaineBook = null; foreach (PlayerMobile GardePlayer in m_Gardes) { GardePlayer.Title = null; } m_Gardes.Clear(); foreach (GuardSpawner guard in m_gardes_pnj) { guard.Delete(); } m_gardes_pnj.Clear(); foreach (PomiCloak cloak in m_GardeCloak) { cloak.Delete(); } m_GardeCloak.Clear(); m_Votants.Clear(); m_Elections.Clear(); m_Resultats.Clear(); }