private static void CustomRunebookTravel(NetState state, PacketReader pvSrc)
{
int RuneBookSerial = pvSrc.ReadInt32();
byte recall = pvSrc.ReadByte();
var X = pvSrc.ReadInt16();
var Y = pvSrc.ReadInt16();
var mapbyte = Convert.ToInt16(pvSrc.ReadByte());
var runebook = World.FindItem(RuneBookSerial) as Runebook;
var map = Map.Maps[mapbyte];
if (runebook != null && runebook.RootParentEntity == state.Mobile && runebook.Entries != null)
{
var findentry = runebook.Entries.FirstOrDefault(x => x.Location.X == X && x.Location.Y == Y);
if (findentry != null)
{
var portentry = findentry.Location;
var entry = new RunebookEntry(portentry, findentry.Map, "", null);
if (recall == 0)
{
new RecallSpell(state.Mobile, null, entry, null).Cast();
}
else
{
new GateTravelSpell(state.Mobile, null, entry).Cast();
}
}
}
}