protected override void OnTick() { //if ( m_Robe.Parent != null || m_Robe.IsLockedDown ) // Stop(); //else if (m_Robe != null && !m_Robe.Deleted) { m_Robe.Delete(); } }
protected override void OnTick() { if (m_Robe.Parent != null || m_Robe.IsLockedDown) { Stop(); } else { m_Robe.Delete(); } }
public override void Resurrect() { bool wasAlive = this.Alive; base.Resurrect(); if (this.Alive && !wasAlive) { Item deathRobe = new DeathRobe(); if (!EquipItem(deathRobe)) deathRobe.Delete(); //24MAR2008 Lucid's Anti Res Kill System *** START *** this.Blessed = true; this.Frozen = true; this.SendGump(new AntiResKillGump()); //24MAR2008 Lucid's Anti Res Kill System *** END *** } }
public override void Resurrect() { bool wasAlive = this.Alive; base.Resurrect(); if ( this.Alive && !wasAlive ) { Item deathRobe = new DeathRobe(); if ( !EquipItem( deathRobe ) ) deathRobe.Delete(); } }
public virtual void Open(Mobile from, bool checkSelfLoot) { if (from.AccessLevel > AccessLevel.Player || from.InRange(this.GetWorldLocation(), 2)) { #region Self Looting bool selfLoot = (checkSelfLoot && (from == m_Owner)); if (selfLoot) { List <Item> items = new List <Item>(this.Items); bool gathered = false; bool didntFit = false; Container pack = from.Backpack; bool checkRobe = true; for (int i = 0; !didntFit && i < items.Count; ++i) { Item item = items[i]; Point3D loc = item.Location; if ((item.Layer == Layer.Hair || item.Layer == Layer.FacialHair) || !item.Movable || !GetRestoreInfo(item, ref loc)) { continue; } if (checkRobe) { DeathRobe robe = from.FindItemOnLayer(Layer.OuterTorso) as DeathRobe; if (robe != null) { if (Core.SE) { robe.Delete(); } else { Map map = from.Map; if (map != null && map != Map.Internal) { robe.MoveToWorld(from.Location, map); } } } } if (m_EquipItems.Contains(item) && from.EquipItem(item)) { gathered = true; } else if (pack != null && pack.CheckHold(from, item, false, true)) { item.Location = loc; pack.AddItem(item); gathered = true; } else { didntFit = true; } } if (gathered && !didntFit) { m_Carved = true; if (ItemID == 0x2006) { ProcessDelta(); SendRemovePacket(); ItemID = Utility.Random(0xECA, 9); // bone graphic Hue = 0; ProcessDelta(); } from.PlaySound(0x3E3); from.SendLocalizedMessage(1062471); // You quickly gather all of your belongings. return; } if (gathered && didntFit) { from.SendLocalizedMessage(1062472); // You gather some of your belongings. The rest remain on the corpse. } } #endregion if (!CheckLoot(from, null)) { return; } /* #region Quests * PlayerMobile player = from as PlayerMobile; * * if ( player != null ) * { * QuestSystem qs = player.Quest; * * if ( qs is UzeraanTurmoilQuest ) * { * GetDaemonBoneObjective obj = qs.FindObjective( typeof( GetDaemonBoneObjective ) ) as GetDaemonBoneObjective; * * if ( obj != null && obj.CorpseWithBone == this && ( !obj.Completed || UzeraanTurmoilQuest.HasLostDaemonBone( player ) ) ) * { * Item bone = new QuestDaemonBone(); * * if ( player.PlaceInBackpack( bone ) ) * { * obj.CorpseWithBone = null; * player.SendLocalizedMessage( 1049341, "", 0x22 ); // You rummage through the bones and find a Daemon Bone! You quickly place the item in your pack. * * if ( !obj.Completed ) * obj.Complete(); * } * else * { * bone.Delete(); * player.SendLocalizedMessage( 1049342, "", 0x22 ); // Rummaging through the bones you find a Daemon Bone, but can't pick it up because your pack is too full. Come back when you have more room in your pack. * } * * return; * } * } * else if ( qs is TheSummoningQuest ) * { * VanquishDaemonObjective obj = qs.FindObjective( typeof( VanquishDaemonObjective ) ) as VanquishDaemonObjective; * * if ( obj != null && obj.Completed && obj.CorpseWithSkull == this ) * { * GoldenSkull sk = new GoldenSkull(); * * if ( player.PlaceInBackpack( sk ) ) * { * obj.CorpseWithSkull = null; * player.SendLocalizedMessage( 1050022 ); // For your valor in combating the devourer, you have been awarded a golden skull. * qs.Complete(); * } * else * { * sk.Delete(); * player.SendLocalizedMessage( 1050023 ); // You find a golden skull, but your backpack is too full to carry it. * } * } * } * } * #endregion */ base.OnDoubleClick(from); if (from != m_Owner) { from.RevealingAction(); } } else { from.SendLocalizedMessage(500446); // That is too far away. return; } }
public override void Resurrect() { bool wasAlive = Alive; base.Resurrect(); if (Alive && !wasAlive) { Item deathRobe = new DeathRobe(); if (!EquipItem(deathRobe)) { deathRobe.Delete(); } } FactionDeath = false; }
public virtual void Open(Mobile from, bool checkSelfLoot) { if (from.AccessLevel > AccessLevel.Player || from.InRange(this.GetWorldLocation(), 2)) { #region Self Looting bool selfLoot = (checkSelfLoot && (from == m_Owner)); if (selfLoot) { if (from is PlayerMobile && from.Client != null && from.Client.Version.IsEnhanced) { PlayerMobile pm = (PlayerMobile)from; pm.Send(new RemoveWaypoint(this.Serial.Value)); pm.CheckKRStartingQuestStep(27); } ArrayList items = new ArrayList(this.Items); bool gathered = false; bool didntFit = false; Container pack = from.Backpack; bool checkRobe = true; for (int i = 0; !didntFit && i < items.Count; ++i) { Item item = (Item)items[i]; Point3D loc = item.Location; if ((item.Layer == Layer.Hair || item.Layer == Layer.FacialHair) || !item.Movable || !GetRestoreInfo(item, ref loc)) { continue; } if (checkRobe) { DeathRobe robe = from.FindItemOnLayer(Layer.OuterTorso) as DeathRobe; if (robe != null) { robe.Delete(); } } if (m_EquipItems.Contains(item) && from.EquipItem(item)) { gathered = true; } else if (pack != null && pack.CheckHold(from, item, false, true)) { item.Location = loc; pack.AddItem(item); gathered = true; } else { didntFit = true; } } if (gathered && !didntFit) { SetFlag(CorpseFlag.Carved, true); if (ItemID == 0x2006) { ProcessDelta(); SendRemovePacket(); ItemID = Utility.Random(0xECA, 9); // bone graphic Hue = 0; Direction = Direction.North; ProcessDelta(); } from.PlaySound(0x3E3); from.SendLocalizedMessage(1062471); // You quickly gather all of your belongings. try { if (from is PlayerMobile && m_InsuredItems != null) { ArrayList bagitems = new ArrayList(from.Backpack.Items); List <Item> insureditems = m_InsuredItems; foreach (Item item in bagitems) { if (insureditems.Contains(item)) { Item move = from.FindItemOnLayer(item.Layer); if (move == null) { from.EquipItem(item); } } } m_InsuredItems = null; } } catch { } return; } if (gathered && didntFit) { from.SendLocalizedMessage(1062472); // You gather some of your belongings. The rest remain on the corpse. } } #endregion if (!CheckLoot(from)) { return; } #region Quests PlayerMobile player = from as PlayerMobile; if (player != null) { QuestSystem qs = player.Quest; if (qs is UzeraanTurmoilQuest) { GetDaemonBoneObjective obj = qs.FindObjective(typeof(GetDaemonBoneObjective)) as GetDaemonBoneObjective; if (obj != null && obj.CorpseWithBone == this && (!obj.Completed || UzeraanTurmoilQuest.HasLostDaemonBone(player))) { Item bone = new QuestDaemonBone(); if (player.PlaceInBackpack(bone)) { obj.CorpseWithBone = null; player.SendLocalizedMessage(1049341, "", 0x22); // You rummage through the bones and find a Daemon Bone! You quickly place the item in your pack. if (!obj.Completed) { obj.Complete(); } } else { bone.Delete(); player.SendLocalizedMessage(1049342, "", 0x22); // Rummaging through the bones you find a Daemon Bone, but can't pick it up because your pack is too full. Come back when you have more room in your pack. } return; } } else if (qs is TheSummoningQuest) { VanquishDaemonObjective obj = qs.FindObjective(typeof(VanquishDaemonObjective)) as VanquishDaemonObjective; if (obj != null && obj.Completed && obj.CorpseWithSkull == this) { GoldenSkull sk = new GoldenSkull(); if (player.PlaceInBackpack(sk)) { obj.CorpseWithSkull = null; player.SendLocalizedMessage(1050022); // For your valor in combating the devourer, you have been awarded a golden skull. qs.Complete(); } else { sk.Delete(); player.SendLocalizedMessage(1050023); // You find a golden skull, but your backpack is too full to carry it. } } } } #endregion if (m_Owner is WeakSkeleton && from is PlayerMobile) { ((PlayerMobile)from).CheckKRStartingQuestStep(20); } base.OnDoubleClick(from); if (from != m_Owner) { from.RevealingAction(); } } else { from.SendLocalizedMessage(500446); // That is too far away. return; } }
public override void Resurrect() { bool wasAlive = this.Alive; base.Resurrect(); if (this.Alive && !wasAlive) { Item deathRobe = new DeathRobe(); if (!EquipItem(deathRobe)) deathRobe.Delete(); } #region GeNova: KR Support if (this.NetState != null && this.NetState.IsKRClient) { List<BaseHealer> listHealers = new List<BaseHealer>(); List<MondainQuester> listQuesters = new List<MondainQuester>(); foreach (Mobile m_mobile in World.Mobiles.Values) { MondainQuester mQuester = m_mobile as MondainQuester; if (mQuester != null) listQuesters.Add(mQuester); BaseHealer mHealer = m_mobile as BaseHealer; if (mHealer != null) listHealers.Add(mHealer); } if (this.Corpse != null) this.NetState.Send(new DisplayWaypoint(this.Corpse.Serial, this.Corpse.X, this.Corpse.Y, this.Corpse.Z, this.Corpse.Map.MapID, 1, this.Name)); foreach (BaseHealer healer in listHealers) this.NetState.Send(new HideWaypoint(healer.Serial)); foreach (MondainQuester quester in listQuesters) { string name = string.Empty; if (quester.Name != null) name += quester.Name; if (quester.Title != null) name += " " + quester.Title; this.Send(new DisplayWaypoint(quester.Serial, quester.X, quester.Y, quester.Z, quester.Map.MapID, 4, name)); } } #endregion }
protected override void OnTick() { m_Robe.Delete(); }
public virtual void Open(Mobile from, bool checkSelfLoot) { if (from.AccessLevel > AccessLevel.Player || from.InRange(this.GetWorldLocation(), 2)) { bool selfLoot = (checkSelfLoot && (from == m_Owner)); if (selfLoot) { ArrayList items = new ArrayList(this.Items); bool gathered = false; bool didntFit = false; Container pack = from.Backpack; bool checkRobe = true; for (int i = 0; !didntFit && i < items.Count; ++i) { Item item = (Item)items[i]; Point3D loc = item.Location; if ((item.Layer == Layer.Hair || item.Layer == Layer.FacialHair) || !item.Movable || !GetRestoreInfo(item, ref loc)) { continue; } if (checkRobe) { DeathRobe robe = from.FindItemOnLayer(Layer.OuterTorso) as DeathRobe; if (robe != null) { robe.Delete(); } } if (m_EquipItems.Contains(item) && from.EquipItem(item)) { gathered = true; } else if (pack != null && pack.CheckHold(from, item, false, true)) { item.Location = loc; pack.AddItem(item); gathered = true; } else { didntFit = true; } } if (gathered && !didntFit) { Delete(); from.PlaySound(0x3E3); from.SendLocalizedMessage(1062471); // You quickly gather all of your belongings. return; } if (gathered && didntFit) { from.SendLocalizedMessage(1062472); // You gather some of your belongings. The rest remain on the corpse. } } if (!CheckLoot(from)) { return; } TeiravonMobile player = from as TeiravonMobile; if (player != null) { QuestSystem qs = player.Quest; if (this.Owner is BaseCreature && player.HasFeat(TeiravonMobile.Feats.Scavenger) && !Scavenged) { Scavenged = true; TAVUtilities.ScavengeLoot(player, this.Owner); } if (qs is UzeraanTurmoilQuest) { GetDaemonBoneObjective obj = qs.FindObjective(typeof(GetDaemonBoneObjective)) as GetDaemonBoneObjective; if (obj != null && obj.CorpseWithBone == this && (!obj.Completed || UzeraanTurmoilQuest.HasLostDaemonBone(player))) { Item bone = new QuestDaemonBone(); if (player.PlaceInBackpack(bone)) { obj.CorpseWithBone = null; player.SendLocalizedMessage(1049341, "", 0x22); // You rummage through the bones and find a Daemon Bone! You quickly place the item in your pack. if (!obj.Completed) { obj.Complete(); } } else { bone.Delete(); player.SendLocalizedMessage(1049342, "", 0x22); // Rummaging through the bones you find a Daemon Bone, but can't pick it up because your pack is too full. Come back when you have more room in your pack. } return; } } else if (qs is TheSummoningQuest) { VanquishDaemonObjective obj = qs.FindObjective(typeof(VanquishDaemonObjective)) as VanquishDaemonObjective; if (obj != null && obj.Completed && obj.CorpseWithSkull == this) { GoldenSkull sk = new GoldenSkull(); if (player.PlaceInBackpack(sk)) { obj.CorpseWithSkull = null; player.SendLocalizedMessage(1050022); // For your valor in combating the devourer, you have been awarded a golden skull. qs.Complete(); } else { sk.Delete(); player.SendLocalizedMessage(1050023); // You find a golden skull, but your backpack is too full to carry it. } } } } base.OnDoubleClick(from); if (from != m_Owner) { from.RevealingAction(); } } else { from.SendLocalizedMessage(500446); // That is too far away. return; } }
public override void Resurrect() { bool wasAlive = this.Alive; if (Mortal && AccessLevel == AccessLevel.Player) { SendMessage("Thy soul was too closely intertwined with thy flesh - thou'rt unable to incorporate a new body."); return; } base.Resurrect(); // Savage kin paint re-application if(this.SavagePaintExpiration != TimeSpan.Zero) { // this.BodyMod = ( this.Female ? 184 : 183 ); this.HueMod = 0; } if ( this.Alive && !wasAlive ) { // restore sight to blinded ghosts Blind = false; // we can see again m_SightExpire = DateTime.MaxValue; // kill timer bool bNewDeathrobe = true; if( this.Backpack != null ) { Item oldDeathrobe = this.Backpack.FindItemByType( typeof( DeathRobe ), false ); if( oldDeathrobe != null ) { bNewDeathrobe = false; EquipItem( oldDeathrobe ); } } if( bNewDeathrobe ) { Item deathRobe = new DeathRobe(); if ( !EquipItem( deathRobe ) ) deathRobe.Delete(); } if ( Inmate ) { //When resrrecting, make sure our counts are reduced TimeSpan deadtime = TimeSpan.FromMinutes(0.0); if( m_InmateLastDeathTime == DateTime.MinValue ) { //effectively 0 deadtime if it's set to minvalue } else { deadtime = DateTime.Now - m_InmateLastDeathTime; } //reduce short term by 4 hours minus half the time spent dead (modulo 8 hours) m_ShortTermElapse -= (TimeSpan.FromHours(4.0) - TimeSpan.FromSeconds( (deadtime.TotalSeconds%28800)/2 ) ); //reduce long term by 20 hours minus half the time spent dead (modulo 40 hours) m_LongTermElapse -= (TimeSpan.FromHours(20.0) - TimeSpan.FromSeconds( (deadtime.TotalSeconds%144000)/2 ) ); } InvalidateMyRunUO(); } }
public virtual void Open(Mobile from, bool checkSelfLoot) { if (from.AccessLevel > AccessLevel.Player || from.InRange(this.GetWorldLocation(), 2)) { #region Self Looting bool selfLoot = (checkSelfLoot && (from == m_Owner)); if (selfLoot) { List <Item> items = new List <Item>(this.Items); bool gathered = false; bool didntFit = false; Container pack = from.Backpack; bool checkRobe = true; for (int i = 0; !didntFit && i < items.Count; ++i) { Item item = items[i]; Point3D loc = item.Location; if (item.Layer == Layer.Hair) { continue; } if (item.Layer == Layer.FacialHair) { continue; } if (!GetRestoreInfo(item, ref loc)) { continue; } if (checkRobe) { DeathRobe robe = from.FindItemOnLayer(Layer.OuterTorso) as DeathRobe; if (robe != null) { if (Core.SE) { robe.Delete(); } else { Map map = from.Map; if (map != null && map != Map.Internal) { robe.MoveToWorld(from.Location, map); } } } } if (m_EquipItems.Contains(item) && from.EquipItem(item)) { gathered = true; } else if (pack != null && pack.CheckHold(from, item, false, true)) { item.Location = loc; pack.AddItem(item); gathered = true; } else { didntFit = true; } } if (gathered && !didntFit) { m_Carved = true; if (ItemID == 0x2006) { ProcessDelta(); SendRemovePacket(); ItemID = Utility.Random(0xECA, 9); // bone graphic Hue = 0; ProcessDelta(); } from.PlaySound(0x3E3); from.SendLocalizedMessage(1062471); // You quickly gather all of your belongings. return; } if (gathered && didntFit) { from.SendLocalizedMessage(1062472); // You gather some of your belongings. The rest remain on the corpse. } } #endregion if (!CheckLoot(from, null)) { return; } base.OnDoubleClick(from); if (from != m_Owner) { from.RevealingAction(); } } else { from.SendLocalizedMessage(500446); // That is too far away. return; } }
public override void Resurrect() { bool wasAlive = this.Alive; base.Resurrect(); if ( this.Alive && !wasAlive ) { Item deathRobe = new DeathRobe(); if ( !this.Backpack.CheckHold( this, deathRobe, false, true ) ) deathRobe.Delete(); else if ( !EquipItem( deathRobe ) ) deathRobe.Delete(); #region Scroll of Alacrity if (this.AcceleratedStart > DateTime.Now) { BuffInfo.AddBuff(this, new BuffInfo(BuffIcon.ArcaneEmpowerment, 1078511, 1078512, this.AcceleratedSkill.ToString())); } #endregion } }
public void GoToPrison() { try { if (m_Player == null || m_Player.Deleted) { return; } Account acct = m_Player.Account as Account; // stable the players pets StablePets(m_Staff, m_Player); // drop holding Item held = m_Player.Holding; if (held != null) { held.ClearBounce(); if (m_Player.Backpack != null) { m_Player.Backpack.DropItem(held); } } m_Player.Holding = null; // move their items to the bank, overload if needed Backpack bag = new Backpack(); ArrayList equip = new ArrayList(m_Player.Items); if (m_Player.Backpack != null) { // count clothing items int WornCount = 0; foreach (Item i in equip) { if (Moongate.RestrictedItem(m_Player, i) == false) { continue; // not clothes } else { WornCount++; } } // Unequip any items being worn foreach (Item i in equip) { if (Moongate.RestrictedItem(m_Player, i) == false) { continue; } else { m_Player.Backpack.DropItem(i); } } // Get a count of all items in the player's backpack. ArrayList items = new ArrayList(m_Player.Backpack.Items); // Drop our new bag in the player's bank m_Player.BankBox.DropItem(bag); // Run through all items in player's pack, move them to the bag we just dropped in the bank foreach (Item i in items) { m_Player.Backpack.RemoveItem(i); bag.DropItem(i); } } // handle imprisoning of logged out players m_Player.MoveToWorld(m_Location, Map.Felucca); if (m_Player.NetState == null) { m_Player.LogoutLocation = m_Location; m_Player.Map = Map.Internal; } // make them an inmate m_Player.Inmate = true; // Give them a Deathrobe, Stinger dagger, and a blank spell book if (m_Player.Alive) { Item robe = new Server.Items.DeathRobe(); if (!m_Player.EquipItem(robe)) { robe.Delete(); } } Item aiStinger = new Server.Items.AIStinger(); if (!m_Player.AddToBackpack(aiStinger)) { aiStinger.Delete(); } Item spellbook = new Server.Items.Spellbook(); if (!m_Player.AddToBackpack(spellbook)) { spellbook.Delete(); } m_Player.ShortTermCriminalCounts += 3; // how long you will stay m_Player.LongTermCriminalCounts++; // how many times you've been to prison if (!m_Player.Alive && m_Player.NetState != null) { m_Player.CloseGump(typeof(Server.Gumps.ResurrectGump)); m_Player.SendGump(new Server.Gumps.ResurrectGump(m_Player, Server.Gumps.ResurrectMessage.Healer)); } int sentence = (int)m_Player.ShortTermCriminalCounts * 4; // decay time in prison is 4 hours per count m_Player.SendMessage("You have been imprisoned for {0} hours.", sentence); m_Staff.SendMessage("{0} has been imprisoned for {1} hours.", m_Player.Name, sentence); LogHelper Logger = new LogHelper("Prison.log", false, true); Logger.Log(LogType.Mobile, m_Player, string.Format("{0}:{1}:{2}:{3}", m_Staff.Name, m_Staff.Location, m_Comment, sentence)); Logger.Finish(); Commands.CommandLogging.WriteLine(m_Staff, "{0} imprisoned {1}(Username: {2}) for {4} hours with reason: {3}.", m_Staff.Name, m_Player.Name, acct.Username, m_Comment, sentence); acct.Comments.Add(new AccountComment(m_Staff.Name, DateTime.Now + "\nTag count: " + (acct.Comments.Count + 1) + "\nImprisoned for " + sentence + " hours. Reason: " + m_Comment)); } catch (Exception ex) { LogHelper.LogException(ex); } }
public virtual void Open(Mobile from, bool checkSelfLoot) { if (from.IsStaff() || from.InRange(GetWorldLocation(), 2)) { #region Self Looting bool selfLoot = (checkSelfLoot && (from == m_Owner)); if (selfLoot) { SetFlag(CorpseFlag.SelfLooted, true); List <Item> items = new List <Item>(Items); bool gathered = false; for (int k = 0; k < EquipItems.Count; ++k) { Item item2 = EquipItems[k]; if (!items.Contains(item2) && item2.IsChildOf(from.Backpack)) { items.Add(item2); gathered = true; } } bool didntFit = false; Container pack = from.Backpack; for (int i = 0; !didntFit && i < items.Count; ++i) { Item item = items[i]; Point3D loc = item.Location; if ((item.Layer == Layer.Hair || item.Layer == Layer.FacialHair) || !item.Movable) { continue; } DeathRobe robe = from.FindItemOnLayer(Layer.OuterTorso) as DeathRobe; if (robe != null) { robe.Delete(); } if (m_EquipItems.Contains(item) && from.EquipItem(item)) { gathered = true; } else if (pack != null && pack.CheckHold(from, item, false, true)) { item.Location = loc; pack.AddItem(item); gathered = true; } else { didntFit = true; } } if (gathered && !didntFit) { SetFlag(CorpseFlag.Carved, true); if (ItemID == 0x2006) { ProcessDelta(); SendRemovePacket(); ItemID = Utility.Random(0xECA, 9); // bone graphic Hue = 0; ProcessDelta(); } from.PlaySound(0x3E3); from.SendLocalizedMessage(1062471); // You quickly gather all of your belongings. items.Clear(); m_EquipItems.Clear(); return; } if (gathered) { from.SendLocalizedMessage(1062472); // You gather some of your belongings. The rest remain on the corpse. } } #endregion if (!CheckLoot(from, null)) { return; } #region Quests PlayerMobile player = from as PlayerMobile; if (player != null) { QuestSystem qs = player.Quest; if (qs is TheSummoningQuest) { VanquishDaemonObjective obj = qs.FindObjective(typeof(VanquishDaemonObjective)) as VanquishDaemonObjective; if (obj != null && obj.Completed && obj.CorpseWithSkull == this) { GoldenSkull sk = new GoldenSkull(); if (player.PlaceInBackpack(sk)) { obj.CorpseWithSkull = null; player.SendLocalizedMessage(1050022); // For your valor in combating the devourer, you have been awarded a golden skull. qs.Complete(); } else { sk.Delete(); player.SendLocalizedMessage(1050023); // You find a golden skull, but your backpack is too full to carry it. } } } } #endregion base.OnDoubleClick(from); } else { from.SendLocalizedMessage(500446); // That is too far away. } }
public override void Resurrect() { bool wasAlive = Alive; base.Resurrect(); if (Alive && !wasAlive) { Item deathRobe = new DeathRobe(); if (!EquipItem(deathRobe)) { deathRobe.Delete(); } #region Enhance Client if (this.NetState != null && this.NetState.IsKRClient) { List<BaseHealer> listHealers = new List<BaseHealer>(); List<MondainQuester> listQuesters = new List<MondainQuester>(); foreach (Mobile m_mobile in World.Mobiles.Values) { MondainQuester mQuester = m_mobile as MondainQuester; if (mQuester != null) listQuesters.Add(mQuester); BaseHealer mHealer = m_mobile as BaseHealer; if (mHealer != null) listHealers.Add(mHealer); } if (this.Corpse != null) this.NetState.Send(new DisplayWaypoint(this.Corpse.Serial, this.Corpse.X, this.Corpse.Y, this.Corpse.Z, this.Corpse.Map.MapID, WaypointType.Corpse, this.Name)); foreach (BaseHealer healer in listHealers) this.NetState.Send(new RemoveWaypoint(healer.Serial)); foreach (MondainQuester quester in listQuesters) { string name = string.Empty; if (quester.Name != null) name += quester.Name; if (quester.Title != null) name += " " + quester.Title; this.Send(new DisplayWaypoint(quester.Serial, quester.X, quester.Y, quester.Z, quester.Map.MapID, WaypointType.QuestGiver, name)); } } #endregion #region Scroll of Alacrity if (AcceleratedStart > DateTime.UtcNow) { BuffInfo.AddBuff(this, new BuffInfo(BuffIcon.ArcaneEmpowerment, 1078511, 1078512, AcceleratedSkill.ToString())); } #endregion } }
public override void Resurrect() { bool wasAlive = Alive; base.Resurrect(); if (Alive && !wasAlive) { Item deathRobe = new DeathRobe(); if (!EquipItem(deathRobe)) { deathRobe.Delete(); } #region Scroll of Alacrity if (AcceleratedStart > DateTime.UtcNow) { BuffInfo.AddBuff(this, new BuffInfo(BuffIcon.ArcaneEmpowerment, 1078511, 1078512, AcceleratedSkill.ToString())); } #endregion } }
/* private static void EquipItem(Item item) { EquipItem(item, false); } private static void EquipItem(Item item, bool mustEquip) { if (!Core.AOS) item.LootType = LootType.Newbied; if (from != null && from.EquipItem(item)) return; Container pack = from.Backpack; if (!mustEquip && pack != null) pack.DropItem(item); else item.Delete(); }*/ /* private static void PackEquipItem(Item item) { PlayerMobile from = this.Mobile; if (!Core.AOS) item.LootType = LootType.Newbied; if (from != null && from.EquipItem(item)) return; Container pack = from.Backpack; if (pack != null) pack.DropItem(item); else item.Delete(); }*/ public override void Resurrect() { bool wasAlive = this.Alive; this.m_ADShieldTime = DateTime.Now; if (this.m_ADShieldTimer != null) { this.StopTimer(); } else { this.m_ADShieldTimer = new ADShieldTimer(this, c_ADShield); this.m_ADShieldTimer.Start(); } this.SendAsciiMessage("Masz 30 sekund na ucieczke nim ktos zauwazy, ze jeszcze zyjesz"); if (this.m_DeathTimer != null) { this.m_DeathTimer.Stop(); this.m_DeathTimer = null; }; //int z = Map.GetAverageZ( this.X, this.Y ); //this.Z = z; if (this.Corpse == null) { this.SendAsciiMessage("Twoje cialo zniknelo ze swiata, zostajesz przeniesiony do miasta startowego"); this.SendGump(new MiastoStartoweGump(this, this)); //this.Location = this.Corpse.Location; this.Frozen = false; } else { this.Location = this.Corpse.Location; this.Frozen = false; #region Self MoveItemsToPackFromCorpse if (this.Corpse.Items.Count != 0) { Container pack = this.Corpse; Container bpack = this.Backpack; if (pack != null && bpack != null) { List<Item> packCorpseItems = new List<Item>(this.Corpse.Items); for (int i = 0; i < packCorpseItems.Count; i++) { Item packCorpseItem = packCorpseItems[i]; //this.PackItem(packCorpseItem); bpack.DropItem(packCorpseItem); } } } #endregion this.Corpse.Delete(); } //Server.Items.Corpse Corpses = new Server.Items.Corpse(); //Server.Items.Corpse.CorpseDelay(this); base.Resurrect(); if ( this.Alive && !wasAlive ) { Item deathRobe = new DeathRobe(); if ( !EquipItem( deathRobe ) ) deathRobe.Delete(); } }
public override void Resurrect() { bool wasAlive = this.Alive; base.Resurrect(); if ( this.Alive && !wasAlive ) { Item deathRobe = new DeathRobe(); if ( !EquipItem( deathRobe ) || (this.Backpack != null && this.Backpack.Items.Count > 125) ) deathRobe.Delete(); } }