public static void Init() { if (Initialized) { return; } ReqOplParent = PacketHandlers.GetExtendedHandler(0x10); PacketHandlers.RegisterExtended(ReqOplParent.PacketID, ReqOplParent.Ingame, OnQueryProperties); ReqBatchOplParent = PacketHandlers.GetHandler(0xD6); PacketHandlers.Register( ReqBatchOplParent.PacketID, ReqBatchOplParent.Length, ReqBatchOplParent.Ingame, OnBatchQueryProperties); PacketHandlers.Register6017( ReqBatchOplParent.PacketID, ReqBatchOplParent.Length, ReqBatchOplParent.Ingame, OnBatchQueryProperties); OutParent0xD6 = OutgoingPacketOverrides.GetHandler(0xD6); OutgoingPacketOverrides.Register(0xD6, OnEncode0xD6); Initialized = true; }
public static void Init() { if (Initialized) { return; } ReqOplParent = PacketHandlers.GetExtendedHandler(0x10); PacketHandlers.RegisterExtended(ReqOplParent.PacketID, ReqOplParent.Ingame, OnQueryProperties); ReqBatchOplParent = PacketHandlers.GetHandler(0xD6); bool is6017 = (PacketHandlers.Get6017Handler(0xD6) != null); PacketHandlers.Register( ReqBatchOplParent.PacketID, ReqBatchOplParent.Length, ReqBatchOplParent.Ingame, OnBatchQueryProperties); if (is6017) { PacketHandlers.Register6017( ReqBatchOplParent.PacketID, ReqBatchOplParent.Length, ReqBatchOplParent.Ingame, OnBatchQueryProperties); } OutParent0xD6 = OutgoingPacketOverrides.GetHandler(0xD6); OutgoingPacketOverrides.Register(0xD6, true, OnEncode0xD6); Initialized = true; PollTimer.FromSeconds(10.0, FreeCache); }
public static void Configure() { PacketHandlers.RemoveExtendedHandler(0x13); PacketHandlers.RemoveExtendedHandler(0x15); OnPacketReceive handler = new OnPacketReceive(EmptyHandler); PacketHandlers.RegisterExtended(0x13, true, handler); PacketHandlers.RegisterExtended(0x15, true, handler); }
static BaseSmoothMulti() { timespanDictionary = new Dictionary <SpeedCode, TimeSpan>(); timespanDictionary.Add(SpeedCode.One, TimeSpan.FromSeconds(0.50)); timespanDictionary.Add(SpeedCode.Fast, TimeSpan.FromSeconds(0.25)); timespanDictionary.Add(SpeedCode.Medium, TimeSpan.FromSeconds(0.50)); timespanDictionary.Add(SpeedCode.Slow, TimeSpan.FromSeconds(1)); //Activate multi mouse movement request in the packet handlers. PacketHandlers.RegisterExtended(0x33, true, MultiMouseMovementRequest); }
public static void Initialize() { m_HourlyUsage = new int[UsageHours][]; for (int i = 0; i < UsageHours; i++) { m_HourlyUsage[i] = new int[SkillCount]; } m_SkillUsage = new int[SkillCount]; m_TotalUses = 0; Server.Commands.CommandSystem.Register("SkillUsage", AccessLevel.GameMaster, new Server.Commands.CommandEventHandler(Cmd_SkillUsage)); Mobile.SkillCheckLocationHandler = new SkillCheckLocationHandler(Mobile_SkillCheckLocation); Mobile.SkillCheckDirectLocationHandler = new SkillCheckDirectLocationHandler(Mobile_SkillCheckDirectLocation); Mobile.SkillCheckTargetHandler = new SkillCheckTargetHandler(Mobile_SkillCheckTarget); Mobile.SkillCheckDirectTargetHandler = new SkillCheckDirectTargetHandler(Mobile_SkillCheckDirectTarget); SkillInfo.Table[46].GainFactor = 0.00; // Meditation = 46 SkillInfo.Table[47].GainFactor = 0.00; // Stealth = 47 SkillInfo.Table[48].GainFactor = 0.00; // RemoveTrap = 48 SkillInfo.Table[49].GainFactor = 0.00; // Necromancy = 49 SkillInfo.Table[50].GainFactor = 0.00; // Focus = 50 SkillInfo.Table[51].GainFactor = 0.00; // Chivalry = 51 SkillInfo.Table[(int)SkillName.Alchemy].GainFactor = 0.80; SkillInfo.Table[(int)SkillName.AnimalTaming].GainFactor = 0.70; SkillInfo.Table[(int)SkillName.Blacksmith].GainFactor = 0.75; SkillInfo.Table[(int)SkillName.Magery].GainFactor = 0.85; SkillInfo.Table[(int)SkillName.MagicResist].GainFactor = 0.70; SkillInfo.Table[(int)SkillName.Stealing].GainFactor = 0.85; SkillInfo.Table[(int)SkillName.MagicResist].IntGain += 1.0; SkillInfo.Table[(int)SkillName.MagicResist].StrGain = SkillInfo.Table[(int)SkillName.MagicResist].DexGain = 0; SkillInfo.Table[(int)SkillName.Magery].IntGain += 0.75; PacketHandlers.Register(0x3A, 0, true, new OnPacketReceive(ChangeSkillLock)); PacketHandlers.RegisterExtended(0x1A, true, new OnPacketReceive(StatLockChange)); }
public static void Override() { PacketHandlers.RegisterEncoded(0x32, true, new OnEncodedPacketReceive(QuestButton)); PacketHandlers.RegisterExtended(0x2A, true, new OnPacketReceive(HeritageTransform)); }
public static void Initialize() { m_Pending = new Dictionary <NetState, RaceChangeState>(); PacketHandlers.RegisterExtended(0x2A, true, new OnPacketReceive(RaceChangeReply)); }
public static void Override() { PacketHandlers.RegisterEncoded(0x32, true, QuestButton); PacketHandlers.RegisterExtended(0x2A, true, HeritageTransform); }