public override bool CheckCast() { if (Factions.Sigil.ExistsOn(Caster)) { Caster.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil } else if (Caster.Criminal) { Caster.SendLocalizedMessage(1005561, "", 0x22); // Thou'rt a criminal and cannot escape so easily. } //else if ( PokerDealer.IsPokerPlayer( Caster ) >= 0 ) // Caster.SendMessage( "You cannot travel while playing poker." ); else if (Items.EventFlag.ExistsOn(Caster)) { Caster.SendLocalizedMessage(1061632); // EventFlag Add by XLX. } else if (SpellHelper.CheckCombat(Caster) || SpellHelper.CheckFactionAggressed(Caster)) { Caster.SendLocalizedMessage(1005564, "", 0x22); // Wouldst thou flee during the heat of battle?? } else if (Server.Misc.WeightOverloading.IsOverloaded(Caster)) { Caster.SendLocalizedMessage(502359, "", 0x22); // Thou art too encumbered to move. } else { return(SpellHelper.CheckTravel(Caster, TravelCheckType.RecallFrom)); } return(false); }
public void Effect(Point3D loc, Map map, bool checkMulti) { Region region = Region.Find(loc, map); CustomRegion customRegion = region as CustomRegion; if (Factions.Sigil.ExistsOn(Caster)) { Caster.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil. } else if (map == null || (!Core.AOS && Caster.Map != map)) { Caster.SendLocalizedMessage(1005569); // You can not recall to another facet. } else if (!SpellHelper.CheckTravel(Caster, TravelCheckType.RecallFrom)) { } else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.RecallTo)) { } else if (map == Map.Felucca && Caster is PlayerMobile && ((PlayerMobile)Caster).Young) { Caster.SendLocalizedMessage(1049543); // You decide against traveling to Felucca while you are still young. } /* * else if ( Caster.Kills >= Mobile.MurderCount && map != Map.Felucca ) * Caster.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there. */ else if (Caster.Criminal) { Caster.SendLocalizedMessage(1005561, "", 0x22); // Thou'rt a criminal and cannot escape so easily. } else if (SpellHelper.CheckCombat(Caster) || SpellHelper.CheckFactionAggressed(Caster)) { Caster.SendLocalizedMessage(1005564, "", 0x22); // Wouldst thou flee during the heat of battle?? } else if (Server.Misc.WeightOverloading.IsOverloaded(Caster)) { Caster.SendLocalizedMessage(502359, "", 0x22); // Thou art too encumbered to move. } else if (customRegion != null && customRegion.Controller.CannotEnter) //Al: Block if CannotEnter is set to true { Caster.SendLocalizedMessage(501942); // That location is blocked. } else if (!map.CanSpawnMobile(loc.X, loc.Y, loc.Z, false)) { Caster.SendLocalizedMessage(501942); // That location is blocked. } else if ((checkMulti && SpellHelper.CheckMulti(loc, map))) { Caster.SendLocalizedMessage(501942); // That location is blocked. } else if (m_Book != null && m_Book.CurCharges <= 0) { Caster.SendLocalizedMessage(502412); // There are no charges left on that item. } else if (CheckSequence()) { BaseCreature.TeleportPets(Caster, loc, map, true); if (m_Book != null) { --m_Book.CurCharges; } Caster.PlaySound(0x1FC); Caster.MoveToWorld(loc, map); Caster.PlaySound(0x1FC); } FinishSequence(); }