public PlayerContextData(Mobile m, CTFControl ctfc) { m_Mobile = m; // player that owns this context m_PreGameLocation = m.Location; // starting location of the player (pregame) m_PreGameMap = m.Map; // starting map of the player (pregame) m_ctfc = ctfc; // CTF Controller }
public override void OnAfterDeath(Mobile m) { CTFControl ctfc = this.m_Controller as CTFControl; if (ctfc == null) { return; } ctfc.OnRegionAfterDeath(m); }
public override void OnPlayerAdd(Mobile m) { // player is logging into the region base.OnPlayerAdd(m); CTFControl ctfc = this.m_Controller as CTFControl; if (ctfc != null) { ctfc.OnPlayerAdd(m); } }
public override bool OnDeath(Mobile m) { CTFControl ctfc = this.m_Controller as CTFControl; if (ctfc == null) { return(base.OnDeath(m)); } ctfc.OnDeath(m); return(base.OnDeath(m)); }
public override bool EquipItem(Mobile m, Item item) { bool result = true; CTFControl ctfc = this.m_Controller as CTFControl; if (ctfc != null) { result = ctfc.OnRegionEquipItem(m, item); } return(base.EquipItem(m, item) && result); }
// process CTF commands public override void OnSpeech(SpeechEventArgs e) { CTFControl ctfc = this.m_Controller as CTFControl; if (ctfc != null) { if (ctfc.OnRegionSpeech(e)) { e.Handled = true; } } base.OnSpeech(e); }
public override bool CheckAccessibility(Item i, Mobile m) { CTFControl ctfc = this.m_Controller as CTFControl; if (ctfc != null && m.AccessLevel == AccessLevel.Player) { return(ctfc.OnRegionCheckAccessibility(i, m)); } else { return(base.CheckAccessibility(i, m)); } }
public void Deserialize(GenericReader reader) { int version = reader.ReadInt(); switch (version) { case 3: { m_PreGameMap = reader.ReadMap(); goto case 2; } case 2: { m_Mobile = reader.ReadMobile(); m_ctfc = (CTFControl)reader.ReadItem(); goto case 1; } case 1: { // read the player's return location m_PreGameLocation = reader.ReadPoint3D(); // read the int data int count = reader.ReadInt(); for (int ix = 0; ix < count; ix++) { m_IntData[ix] = reader.ReadInt(); } goto case 0; } case 0: { goto default; } default: break; } // do we need a res? if (RespawnSeconds > 0 && m_Mobile != null && m_Mobile.Deleted == false && !m_Mobile.Alive) { // use the remaining seconds - have a 10 second delay to accomodate for shard up m_RespawnTimer = new RespawnTimer(TimeSpan.FromSeconds(10), this, TimeSpan.FromSeconds(1)); m_RespawnTimer.Start(); } }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); switch (version) { case 1: { m_ctrl = reader.ReadItem() as CTFControl; goto default; } default: break; } }
public void Setup(CTFControl ctrl) { m_ctrl = ctrl; Hue = ctrl.FlagColor; }
public CTFRegion(CTFControl ctfcontrol, Map map) : base(ctfcontrol, map) { Setup(); }
public void Setup(CTFControl ctrl, CTFControl.Team team) { m_ctrl = ctrl; m_team = team; Hue = ctrl.TeamColor(team); }