public void ScriptNameTest() { ScriptAssemblyInfo target = new ScriptAssemblyInfo(); // TODO: 初始化为适当的值 string actual; actual = target.ScriptName; Assert.Inconclusive( "验证此测试方法的正确性。" ); }
/// <summary> /// /// </summary> /// <param name="strScriptName"></param> /// <param name="scriptVersion"></param> /// <returns></returns> public static ScriptAssemblyInfo GetScriptAssemblyInfo(string strScriptName, VersionInfo scriptVersion) { ScriptAssemblyInfo returnValue = null; do { s_LockScriptAssemblyInfos.Enter(); { IEnumerable <ScriptAssemblyInfo> valueEnumerable = null; s_ScriptAssemblyInfos.TryEnumerateValuesForKey(strScriptName, out valueEnumerable); if (valueEnumerable == null) { break; } foreach (ScriptAssemblyInfo scriptAssemblyInfo in valueEnumerable) { if (scriptAssemblyInfo.Version == scriptVersion) { returnValue = scriptAssemblyInfo; break; } } } s_LockScriptAssemblyInfos.Exit(); } while (false); return(returnValue); }
public void VersionTest() { ScriptAssemblyInfo target = new ScriptAssemblyInfo(); // TODO: 初始化为适当的值 VersionInfo actual; actual = target.Version; Assert.Inconclusive( "验证此测试方法的正确性。" ); }
/// <summary> /// /// </summary> /// <param name="strScriptName"></param> /// <returns></returns> public static ScriptAssemblyInfo GetLastNewScriptAssemblyInfo(string strScriptName) { ScriptAssemblyInfo returnMaxValue = null; do { s_LockScriptAssemblyInfos.Enter(); { IEnumerable <ScriptAssemblyInfo> valueEnumerable = null; s_ScriptAssemblyInfos.TryEnumerateValuesForKey(strScriptName, out valueEnumerable); if (valueEnumerable == null) { break; } ScriptAssemblyInfo maxScriptAssemblyInfo = null; VersionInfo compareVersion = null; bool isFirstVersion = true; foreach (ScriptAssemblyInfo scriptAssemblyInfo in valueEnumerable) { if (isFirstVersion == true) { maxScriptAssemblyInfo = scriptAssemblyInfo; compareVersion = scriptAssemblyInfo.Version; isFirstVersion = false; continue; } if (scriptAssemblyInfo.Version > compareVersion) { maxScriptAssemblyInfo = scriptAssemblyInfo; } } returnMaxValue = maxScriptAssemblyInfo; } s_LockScriptAssemblyInfos.Exit(); } while (false); return(returnMaxValue); }
public void ScriptAssemblyInfoConstructorTest() { ScriptAssemblyInfo target = new ScriptAssemblyInfo(); Assert.Inconclusive( "TODO: 实现用来验证目标的代码" ); }
public void AddHashCodeTest() { ScriptAssemblyInfo target = new ScriptAssemblyInfo(); // TODO: 初始化为适当的值 Assembly assembly = null; // TODO: 初始化为适当的值 byte[] byteHashCode = null; // TODO: 初始化为适当的值 target.AddHashCode( assembly, byteHashCode ); Assert.Inconclusive( "无法验证不返回值的方法。" ); }
public void AddScriptAssemblyTest() { ScriptAssemblyInfo target = new ScriptAssemblyInfo(); // TODO: 初始化为适当的值 Assembly scriptAssembly = null; // TODO: 初始化为适当的值 target.AddScriptAssembly( scriptAssembly ); Assert.Inconclusive( "无法验证不返回值的方法。" ); }
public void AddScriptFilesTest() { ScriptAssemblyInfo target = new ScriptAssemblyInfo(); // TODO: 初始化为适当的值 Assembly assembly = null; // TODO: 初始化为适当的值 string[] scriptFiles = null; // TODO: 初始化为适当的值 target.AddScriptFiles( assembly, scriptFiles ); Assert.Inconclusive( "无法验证不返回值的方法。" ); }
/// <summary> /// 编译指定目录的脚本 /// </summary> public static bool Compile( bool bDebug, bool bCache, string strAssemblyDirectory, string strScriptDirectory ) { EnsureDirectory( strAssemblyDirectory ); ScriptAssemblyInfo scriptAssemblyInfo = new ScriptAssemblyInfo(); const string SCRIPT_CONFIG_NAME = "/Scripts.config"; string strAssembliePath = strScriptDirectory + SCRIPT_CONFIG_NAME; if ( File.Exists( strAssembliePath ) == false ) { LOGs.WriteLine( LogMessageType.MSG_ERROR, LanguageString.SingletonInstance.ScriptCompilerString001, strAssembliePath ); return false; } else { // 以下是获取脚本里面的信息 XDocument documentConfig = XDocument.Load( strAssembliePath ); if ( documentConfig == null ) { LOGs.WriteLine( LogMessageType.MSG_ERROR, LanguageString.SingletonInstance.ScriptCompilerString002, strAssembliePath ); return false; } XElement elementRoot = documentConfig.Element( (XName)"Mmose.Script" ); if ( elementRoot == null ) { LOGs.WriteLine( LogMessageType.MSG_ERROR, LanguageString.SingletonInstance.ScriptCompilerString003, strAssembliePath ); return false; } XAttribute attributeScriptName = elementRoot.Attribute( (XName)"ScriptName" ); if ( attributeScriptName == null ) { LOGs.WriteLine( LogMessageType.MSG_ERROR, LanguageString.SingletonInstance.ScriptCompilerString004, strAssembliePath ); return false; } else scriptAssemblyInfo.SetScriptName( attributeScriptName.Value ); XAttribute attributeVersion = elementRoot.Attribute( (XName)"Version" ); if ( attributeVersion == null ) { LOGs.WriteLine( LogMessageType.MSG_ERROR, LanguageString.SingletonInstance.ScriptCompilerString005, strAssembliePath ); return false; } else scriptAssemblyInfo.SetVersion( new VersionInfo( attributeVersion.Value ) ); } // 以下是C#脚本的编译 if ( CompileCSScripts( bDebug, bCache, strAssemblyDirectory, strScriptDirectory, ref scriptAssemblyInfo ) == false ) return false; // 以下是VB脚本的编译 if ( CompileVBScripts( bDebug, bCache, strAssemblyDirectory, strScriptDirectory, ref scriptAssemblyInfo ) == false ) return false; if ( scriptAssemblyInfo.ScriptAssembly.Length <= 0 ) return false; List<MethodInfo> invokeList = new List<MethodInfo>(); foreach ( Assembly assembly in scriptAssemblyInfo.ScriptAssembly ) { Type[] types = assembly.GetTypes(); foreach ( Type type in types ) { // 以下是添加脚本class里面的静态的Initialize方法 if ( type.GetInterface( "INeedInitialize", true ) != null ) { MethodInfo methodInfo = type.GetMethod( "Initialize", BindingFlags.Static | BindingFlags.Public ); if ( methodInfo != null ) invokeList.Add( methodInfo ); } } } // 以下是排序脚本class里面的静态的Initialize方法 invokeList.Sort( new CallPriorityComparer() ); // 以下是调用脚本class里面的静态的Initialize方法 foreach ( var invoke in invokeList ) invoke.Invoke( null, null ); s_LockScriptAssemblyInfos.Enter(); { // 创建新的ScriptAssemblyInfo数组,添加数据,交换数组数据,不需要锁定,没有引用时自动会回收数据 ScriptAssemblyInfo[] tempScriptAssemblyInfoArray = new ScriptAssemblyInfo[s_ScriptAssemblyInfoArray.Length + 1]; for ( int iIndex = 0; iIndex < s_ScriptAssemblyInfoArray.Length; ++iIndex ) tempScriptAssemblyInfoArray[iIndex] = s_ScriptAssemblyInfoArray[iIndex]; tempScriptAssemblyInfoArray[s_ScriptAssemblyInfoArray.Length] = scriptAssemblyInfo; s_ScriptAssemblyInfoArray = tempScriptAssemblyInfoArray; s_ScriptAssemblyInfos.Add( scriptAssemblyInfo.ScriptName, scriptAssemblyInfo ); } s_LockScriptAssemblyInfos.Exit(); return true; }
public void GetHashCodeTest() { ScriptAssemblyInfo target = new ScriptAssemblyInfo(); // TODO: 初始化为适当的值 Assembly assembly = null; // TODO: 初始化为适当的值 byte[] expected = null; // TODO: 初始化为适当的值 byte[] actual; actual = target.GetHashCode( assembly ); Assert.AreEqual( expected, actual ); Assert.Inconclusive( "验证此测试方法的正确性。" ); }
public void SetScriptNameTest() { ScriptAssemblyInfo target = new ScriptAssemblyInfo(); // TODO: 初始化为适当的值 string scriptName = string.Empty; // TODO: 初始化为适当的值 target.SetScriptName( scriptName ); Assert.Inconclusive( "无法验证不返回值的方法。" ); }
/// <summary> /// 编译VB的源码 /// </summary> private static bool CompileVBScripts(bool bDebug, bool bCache, string strAssemblyDirectory, string strScriptDirectory, ref ScriptAssemblyInfo scriptAssemblyInfo) { LOGs.WriteLine(LogMessageType.MSG_INFO, LanguageString.SingletonInstance.ScriptCompilerString010); string[] strFiles = GetScripts(strScriptDirectory, "*.vb"); string strFilePath = strAssemblyDirectory + "/Scripts.VB.dll"; if (strFiles.Length <= 0) { if (bCache && File.Exists(strFilePath)) { Assembly assembly = Assembly.LoadFile(Path.GetFullPath(strFilePath)); scriptAssemblyInfo.AddScriptAssembly(assembly); scriptAssemblyInfo.AddHashCode(assembly, new byte[0]); scriptAssemblyInfo.AddScriptFiles(assembly, strFiles); if (s_AdditionalReferences.Contains(assembly.Location) == false) { s_AdditionalReferences.Add(assembly.Location); s_AdditionalReferenceArray = s_AdditionalReferences.ToArray(); } LOGs.WriteLine(LogMessageType.MSG_INFO, LanguageString.SingletonInstance.ScriptCompilerString011); return(true); } else { LOGs.WriteLine(LogMessageType.MSG_WARNING, LanguageString.SingletonInstance.ScriptCompilerString012); return(true); } } string strHashFilePath = strAssemblyDirectory + "/Scripts.CS.hash"; if (File.Exists(strFilePath)) { if (bCache && File.Exists(strHashFilePath)) { byte[] byteHashCode = GetHashCode(strFilePath, strFiles, bDebug); using (FileStream fileStream = new FileStream(strHashFilePath, FileMode.Open, FileAccess.Read, FileShare.Read)) { using (BinaryReader binaryReader = new BinaryReader(fileStream)) { byte[] bytes = binaryReader.ReadBytes(byteHashCode.Length); if (bytes.Length == byteHashCode.Length) { bool bValid = true; for (int iIndex = 0; iIndex < bytes.Length; ++iIndex) { if (bytes[iIndex] != byteHashCode[iIndex]) { bValid = false; break; } } if (bValid) { Assembly assembly = Assembly.LoadFile(Path.GetFullPath(strFilePath)); scriptAssemblyInfo.AddScriptAssembly(assembly); scriptAssemblyInfo.AddHashCode(assembly, byteHashCode); scriptAssemblyInfo.AddScriptFiles(assembly, strFiles); if (s_AdditionalReferences.Contains(assembly.Location) == false) { s_AdditionalReferences.Add(assembly.Location); s_AdditionalReferenceArray = s_AdditionalReferences.ToArray(); } LOGs.WriteLine(LogMessageType.MSG_INFO, LanguageString.SingletonInstance.ScriptCompilerString013); return(true); } } } } } } DeleteFiles(strAssemblyDirectory, "Scripts.VB*.dll"); using (VBCodeProvider provider = new VBCodeProvider(new Dictionary <string, string>() { { "CompilerVersion", "v3.5" } })) { string strUnusedPath = GetUnusedPath(strAssemblyDirectory, "Scripts.VB"); CompilerParameters compilerParameters = new CompilerParameters(GetReferenceAssemblies(strScriptDirectory), strUnusedPath, bDebug); string strDefines = GetDefines(); if (strDefines != string.Empty) { compilerParameters.CompilerOptions = strDefines; } if (OneServer.HaltOnWarning == true) { compilerParameters.WarningLevel = 4; } CompilerResults compilerResults = provider.CompileAssemblyFromFile(compilerParameters, strFiles); Display(strScriptDirectory, compilerResults); if (compilerResults.Errors.Count > 0) { return(false); } // 开始HashCode byte[] byteHashCode = GetHashCode(strUnusedPath, strFiles, bDebug); using (FileStream fileStream = new FileStream(strHashFilePath, FileMode.Create, FileAccess.Write, FileShare.None)) { using (BinaryWriter binaryWriter = new BinaryWriter(fileStream)) binaryWriter.Write(byteHashCode, 0, byteHashCode.Length); } Assembly assembly = Assembly.LoadFile(Path.GetFullPath(strUnusedPath)); scriptAssemblyInfo.AddScriptAssembly(assembly); scriptAssemblyInfo.AddHashCode(assembly, byteHashCode); scriptAssemblyInfo.AddScriptFiles(assembly, strFiles); if (s_AdditionalReferences.Contains(assembly.Location) == false) { s_AdditionalReferences.Add(assembly.Location); s_AdditionalReferenceArray = s_AdditionalReferences.ToArray(); } return(true); } }
/// <summary> /// 编译指定目录的脚本 /// </summary> public static bool Compile(bool bDebug, bool bCache, string strAssemblyDirectory, string strScriptDirectory) { EnsureDirectory(strAssemblyDirectory); ScriptAssemblyInfo scriptAssemblyInfo = new ScriptAssemblyInfo(); const string SCRIPT_CONFIG_NAME = "/Scripts.config"; string strAssembliePath = strScriptDirectory + SCRIPT_CONFIG_NAME; if (File.Exists(strAssembliePath) == false) { LOGs.WriteLine(LogMessageType.MSG_ERROR, LanguageString.SingletonInstance.ScriptCompilerString001, strAssembliePath); return(false); } else { // 以下是获取脚本里面的信息 XDocument documentConfig = XDocument.Load(strAssembliePath); if (documentConfig == null) { LOGs.WriteLine(LogMessageType.MSG_ERROR, LanguageString.SingletonInstance.ScriptCompilerString002, strAssembliePath); return(false); } XElement elementRoot = documentConfig.Element((XName)"Mmose.Script"); if (elementRoot == null) { LOGs.WriteLine(LogMessageType.MSG_ERROR, LanguageString.SingletonInstance.ScriptCompilerString003, strAssembliePath); return(false); } XAttribute attributeScriptName = elementRoot.Attribute((XName)"ScriptName"); if (attributeScriptName == null) { LOGs.WriteLine(LogMessageType.MSG_ERROR, LanguageString.SingletonInstance.ScriptCompilerString004, strAssembliePath); return(false); } else { scriptAssemblyInfo.SetScriptName(attributeScriptName.Value); } XAttribute attributeVersion = elementRoot.Attribute((XName)"Version"); if (attributeVersion == null) { LOGs.WriteLine(LogMessageType.MSG_ERROR, LanguageString.SingletonInstance.ScriptCompilerString005, strAssembliePath); return(false); } else { scriptAssemblyInfo.SetVersion(new VersionInfo(attributeVersion.Value)); } } // 以下是C#脚本的编译 if (CompileCSScripts(bDebug, bCache, strAssemblyDirectory, strScriptDirectory, ref scriptAssemblyInfo) == false) { return(false); } // 以下是VB脚本的编译 if (CompileVBScripts(bDebug, bCache, strAssemblyDirectory, strScriptDirectory, ref scriptAssemblyInfo) == false) { return(false); } if (scriptAssemblyInfo.ScriptAssembly.Length <= 0) { return(false); } List <MethodInfo> invokeList = new List <MethodInfo>(); foreach (Assembly assembly in scriptAssemblyInfo.ScriptAssembly) { Type[] types = assembly.GetTypes(); foreach (Type type in types) { // 以下是添加脚本class里面的静态的Initialize方法 if (type.GetInterface("INeedInitialize", true) != null) { MethodInfo methodInfo = type.GetMethod("Initialize", BindingFlags.Static | BindingFlags.Public); if (methodInfo != null) { invokeList.Add(methodInfo); } } } } // 以下是排序脚本class里面的静态的Initialize方法 invokeList.Sort(new CallPriorityComparer()); // 以下是调用脚本class里面的静态的Initialize方法 foreach (var invoke in invokeList) { invoke.Invoke(null, null); } s_LockScriptAssemblyInfos.Enter(); { // 创建新的ScriptAssemblyInfo数组,添加数据,交换数组数据,不需要锁定,没有引用时自动会回收数据 ScriptAssemblyInfo[] tempScriptAssemblyInfoArray = new ScriptAssemblyInfo[s_ScriptAssemblyInfoArray.Length + 1]; for (int iIndex = 0; iIndex < s_ScriptAssemblyInfoArray.Length; ++iIndex) { tempScriptAssemblyInfoArray[iIndex] = s_ScriptAssemblyInfoArray[iIndex]; } tempScriptAssemblyInfoArray[s_ScriptAssemblyInfoArray.Length] = scriptAssemblyInfo; s_ScriptAssemblyInfoArray = tempScriptAssemblyInfoArray; s_ScriptAssemblyInfos.Add(scriptAssemblyInfo.ScriptName, scriptAssemblyInfo); } s_LockScriptAssemblyInfos.Exit(); return(true); }
/// <summary> /// 编译VB的源码 /// </summary> private static bool CompileVBScripts( bool bDebug, bool bCache, string strAssemblyDirectory, string strScriptDirectory, ref ScriptAssemblyInfo scriptAssemblyInfo ) { LOGs.WriteLine( LogMessageType.MSG_INFO, LanguageString.SingletonInstance.ScriptCompilerString010 ); string[] strFiles = GetScripts( strScriptDirectory, "*.vb" ); string strFilePath = strAssemblyDirectory + "/Scripts.VB.dll"; if ( strFiles.Length <= 0 ) { if ( bCache && File.Exists( strFilePath ) ) { Assembly assembly = Assembly.LoadFile( Path.GetFullPath( strFilePath ) ); scriptAssemblyInfo.AddScriptAssembly( assembly ); scriptAssemblyInfo.AddHashCode( assembly, new byte[0] ); scriptAssemblyInfo.AddScriptFiles( assembly, strFiles ); if ( s_AdditionalReferences.Contains( assembly.Location ) == false ) { s_AdditionalReferences.Add( assembly.Location ); s_AdditionalReferenceArray = s_AdditionalReferences.ToArray(); } LOGs.WriteLine( LogMessageType.MSG_INFO, LanguageString.SingletonInstance.ScriptCompilerString011 ); return true; } else { LOGs.WriteLine( LogMessageType.MSG_WARNING, LanguageString.SingletonInstance.ScriptCompilerString012 ); return true; } } string strHashFilePath = strAssemblyDirectory + "/Scripts.CS.hash"; if ( File.Exists( strFilePath ) ) { if ( bCache && File.Exists( strHashFilePath ) ) { byte[] byteHashCode = GetHashCode( strFilePath, strFiles, bDebug ); using ( FileStream fileStream = new FileStream( strHashFilePath, FileMode.Open, FileAccess.Read, FileShare.Read ) ) { using ( BinaryReader binaryReader = new BinaryReader( fileStream ) ) { byte[] bytes = binaryReader.ReadBytes( byteHashCode.Length ); if ( bytes.Length == byteHashCode.Length ) { bool bValid = true; for ( int iIndex = 0; iIndex < bytes.Length; ++iIndex ) { if ( bytes[iIndex] != byteHashCode[iIndex] ) { bValid = false; break; } } if ( bValid ) { Assembly assembly = Assembly.LoadFile( Path.GetFullPath( strFilePath ) ); scriptAssemblyInfo.AddScriptAssembly( assembly ); scriptAssemblyInfo.AddHashCode( assembly, byteHashCode ); scriptAssemblyInfo.AddScriptFiles( assembly, strFiles ); if ( s_AdditionalReferences.Contains( assembly.Location ) == false ) { s_AdditionalReferences.Add( assembly.Location ); s_AdditionalReferenceArray = s_AdditionalReferences.ToArray(); } LOGs.WriteLine( LogMessageType.MSG_INFO, LanguageString.SingletonInstance.ScriptCompilerString013 ); return true; } } } } } } DeleteFiles( strAssemblyDirectory, "Scripts.VB*.dll" ); using ( VBCodeProvider provider = new VBCodeProvider( new Dictionary<string, string>() { { "CompilerVersion", "v3.5" } } ) ) { string strUnusedPath = GetUnusedPath( strAssemblyDirectory, "Scripts.VB" ); CompilerParameters compilerParameters = new CompilerParameters( GetReferenceAssemblies( strScriptDirectory ), strUnusedPath, bDebug ); string strDefines = GetDefines(); if ( strDefines != string.Empty ) compilerParameters.CompilerOptions = strDefines; if ( OneServer.HaltOnWarning == true ) compilerParameters.WarningLevel = 4; CompilerResults compilerResults = provider.CompileAssemblyFromFile( compilerParameters, strFiles ); Display( strScriptDirectory, compilerResults ); if ( compilerResults.Errors.Count > 0 ) return false; // 开始HashCode byte[] byteHashCode = GetHashCode( strUnusedPath, strFiles, bDebug ); using ( FileStream fileStream = new FileStream( strHashFilePath, FileMode.Create, FileAccess.Write, FileShare.None ) ) { using ( BinaryWriter binaryWriter = new BinaryWriter( fileStream ) ) binaryWriter.Write( byteHashCode, 0, byteHashCode.Length ); } Assembly assembly = Assembly.LoadFile( Path.GetFullPath( strUnusedPath ) ); scriptAssemblyInfo.AddScriptAssembly( assembly ); scriptAssemblyInfo.AddHashCode( assembly, byteHashCode ); scriptAssemblyInfo.AddScriptFiles( assembly, strFiles ); if ( s_AdditionalReferences.Contains( assembly.Location ) == false ) { s_AdditionalReferences.Add( assembly.Location ); s_AdditionalReferenceArray = s_AdditionalReferences.ToArray(); } return true; } }
public void SetVersionTest() { ScriptAssemblyInfo target = new ScriptAssemblyInfo(); // TODO: 初始化为适当的值 VersionInfo versionInfo = null; // TODO: 初始化为适当的值 target.SetVersion( versionInfo ); Assert.Inconclusive( "无法验证不返回值的方法。" ); }
public void FindTypeByFullNameTest() { ScriptAssemblyInfo target = new ScriptAssemblyInfo(); // TODO: 初始化为适当的值 string strFullName = string.Empty; // TODO: 初始化为适当的值 Type expected = null; // TODO: 初始化为适当的值 Type actual; actual = target.FindTypeByFullName( strFullName ); Assert.AreEqual( expected, actual ); Assert.Inconclusive( "验证此测试方法的正确性。" ); }
/// <summary> /// /// </summary> internal static void InitOnceServer() { ////////////////////////////////////////////////////////////////////////// // 获取最新的脚本编译集 ProcessServer.s_ScriptAssemblyInfo = ScriptCompiler.GetLastNewScriptAssemblyInfo( "Wow.WorldScript" ); if ( ProcessServer.ScriptAssemblyInfo == null ) { LOGs.WriteLine( LogMessageType.MSG_ERROR, "脚本文件内没有找到{0}版本信息!", "Wow.WorldScript" ); return; } ////////////////////////////////////////////////////////////////////////// // 仅仅是预编译脚本 if ( Program.IsOnlyBuildScript == true ) return; ////////////////////////////////////////////////////////////////////////// // 获取配置的信息 LoadWOWConfig(); ////////////////////////////////////////////////////////////////////////// // 开始在编译后的程序集合内获取密码和ZoneClusterWorld配置信息 LoadPassword(); ////////////////////////////////////////////////////////////////////////// // 开始在编译后的程序集合内获取密码, 并初始化SQL InitSQL(); ////////////////////////////////////////////////////////////////////////// // 开始注册协议 // 初始化OpCode的名称 RealmOpCodeName.InitRealmOpCodeName(); WordOpCodeName.InitWordOpCodeName(); // Realm 客户服务端的协议 ProcessServer.RealmPacketHandlers.Register( (ushort)RealmOpCode.CMSG_REGISTER_REALM_RESULT, ProcessNet.REALM_HEAD_SIZE + 4, false, new PacketReceiveCallback( RealmPacketHandlers.Realm_HandleRegisterRealmResult ) ); ProcessServer.RealmPacketHandlers.Register( (ushort)RealmOpCode.CMSG_REQUEST_SESSION_RESULT, ProcessNet.REALM_HEAD_SIZE + 4, false, new PacketReceiveCallback( RealmPacketHandlers.Realm_HandleRequestSessionResult ) ); ProcessServer.RealmPacketHandlers.Register( (ushort)RealmOpCode.CMSG_PONG, ProcessNet.REALM_HEAD_SIZE + 0, false, new PacketReceiveCallback( RealmPacketHandlers.Realm_HandlePong ) ); // World 客户端的协议 ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_PING, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandlePing ) ); // Login ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_AUTH_SESSION, ProcessNet.WORLD_HEAD_SIZE + 6, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAuthSession ) ); ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CHAR_ENUM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCharEnum ) ); ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CHAR_CREATE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCharCreate ) ); ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CHAR_DELETE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCharDelete ) ); ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CHAR_RENAME, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCharRename ) ); ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_PLAYER_LOGIN, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandlePlayerLogin ) ); ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_REALM_SPLIT_STATE_REQUEST, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleRealmSplitStateRequest ) ); // Queries //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_CORPSE_QUERY, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCorpseQuery ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_NAME_QUERY, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleNameQuery ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_QUERY_TIME, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleQueryTime ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CREATURE_QUERY, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCreatureQuery ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GAMEOBJECT_QUERY, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGameObjectQuery ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_PAGE_TEXT_QUERY, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandlePageTextQuery ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_ITEM_NAME_QUERY, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleItemNameQuery ) ); //// Movement //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_MOVE_HEARTBEAT, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_MOVE_WORLDPORT_ACK, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMoveWorldportAck ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_MOVE_JUMP, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_FLY_PITCH_UP_Z, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_FLY_PITCH_DOWN_AFTER_UP, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_MOVE_START_FORWARD, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_MOVE_START_BACKWARD, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_MOVE_SET_FACING, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBasicMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_MOVE_START_STRAFE_LEFT, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_MOVE_START_STRAFE_RIGHT, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_MOVE_STOP_STRAFE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_MOVE_START_TURN_LEFT, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBasicMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_MOVE_START_TURN_RIGHT, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBasicMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_MOVE_STOP_TURN, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBasicMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_MOVE_START_PITCH_UP, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBasicMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_MOVE_START_PITCH_DOWN, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBasicMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_MOVE_STOP_PITCH, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBasicMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_MOVE_SET_RUN_MODE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBasicMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_MOVE_SET_WALK_MODE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBasicMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_MOVE_SET_PITCH, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBasicMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_MOVE_START_SWIM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_MOVE_STOP_SWIM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_MOVE_FALL_LAND, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_MOVE_STOP, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMoveStop ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_MOVE_FLY_START_AND_END, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBasicMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_FLY_PITCH_UP_Z, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBasicMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_FLY_PITCH_DOWN_AFTER_UP, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBasicMovement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_MOVE_TIME_SKIPPED, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMoveTimeSkipped ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_MOVE_NOT_ACTIVE_MOVER, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMoveNotActiveMover ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_SET_ACTIVE_MOVER, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleSetActiveMover ) ); //// ACK //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_MOVE_TELEPORT_ACK, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMoveTeleportAck ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_FORCE_WALK_SPEED_CHANGE_ACK, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAcknowledgement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_MOVE_FEATHER_FALL_ACK, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAcknowledgement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_MOVE_WATER_WALK_ACK, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAcknowledgement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_FORCE_SWIM_BACK_SPEED_CHANGE_ACK, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAcknowledgement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_FORCE_TURN_RATE_CHANGE_ACK, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAcknowledgement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_FORCE_RUN_SPEED_CHANGE_ACK, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAcknowledgement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_FORCE_RUN_BACK_SPEED_CHANGE_ACK, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAcknowledgement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_FORCE_SWIM_SPEED_CHANGE_ACK, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAcknowledgement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_FORCE_MOVE_ROOT_ACK, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAcknowledgement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_FORCE_MOVE_UNROOT_ACK, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAcknowledgement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_MOVE_KNOCK_BACK_ACK, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAcknowledgement ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_MOVE_HOVER_ACK, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAcknowledgement ) ); //// Action Buttons //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_SET_ACTION_BUTTON, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleSetActionButton ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_REPOP_REQUEST, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleRepopRequest ) ); //// Loot //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_AUTOSTORE_LOOT_ITEM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAutostoreLootItem ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_LOOT_MONEY, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleLootMoney ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_LOOT, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleLoot ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_LOOT_RELEASE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleLootRelease ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_LOOT_ROLL, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleLootRoll ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_LOOT_MASTER_GIVE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleLootMasterGive ) ); //// Player Interaction //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_WHO, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleWho ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_LOGOUT_REQUEST, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleLogoutRequest ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_PLAYER_LOGOUT, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandlePlayerLogout ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_LOGOUT_CANCEL, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleLogoutCancel ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_ZONEUPDATE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleZoneUpdate ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_SET_TARGET_OBSOLETE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleSetTarget ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_SET_SELECTION, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleSetSelection ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_STANDSTATECHANGE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleStandStateChange ) ); //// Friends //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_FRIEND_LIST, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleFriendList ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_ADD_FRIEND, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAddFriend ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_DEL_FRIEND, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleDelFriend ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_ADD_IGNORE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAddIgnore ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_DEL_IGNORE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleDelIgnore ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_BUG, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBug ) ); //// Areatrigger //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_AREATRIGGER, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAreaTrigger ) ); // Account Data ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_UPDATE_ACCOUNT_DATA, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleUpdateAccountData ) ); ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_REQUEST_ACCOUNT_DATA, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleRequestAccountData ) ); ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_SET_FACTION_ATWAR, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleSetAtWar ) ); ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_SET_WATCHED_FACTION_INDEX, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleSetWatchedFactionIndex ) ); ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_TOGGLE_PVP, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleTogglePVP ) ); //// Player Interaction //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GAMEOBJ_USE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGameObjectUse ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_PLAYED_TIME, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandlePlayedTime ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_SETSHEATHED, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleSetSheathed ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_MESSAGECHAT, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMessagechat ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_TEXT_EMOTE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleTextEmote ) ); //// Channels //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_JOIN_CHANNEL, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleChannelJoin ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_LEAVE_CHANNEL, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleChannelLeave ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CHANNEL_LIST, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleChannelList ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CHANNEL_PASSWORD, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleChannelPassword ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CHANNEL_SET_OWNER, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleChannelSetOwner ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CHANNEL_OWNER, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleChannelOwner ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CHANNEL_MODERATOR, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleChannelModerator ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CHANNEL_UNMODERATOR, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleChannelUnmoderator ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CHANNEL_MUTE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleChannelMute ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CHANNEL_UNMUTE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleChannelUnmute ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CHANNEL_INVITE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleChannelInvite ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CHANNEL_KICK, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleChannelKick ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CHANNEL_BAN, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleChannelBan ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CHANNEL_UNBAN, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleChannelUnban ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CHANNEL_ANNOUNCEMENTS, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleChannelAnnounce ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CHANNEL_MODERATE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleChannelModerate ) ); ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CHANNEL_NUM_MEMBERS_QUERY, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleChannelNumMembersQuery ) ); //// Groups / Raids //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GROUP_INVITE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGroupInvite ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GROUP_CANCEL, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGroupCancel ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GROUP_ACCEPT, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGroupAccept ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GROUP_DECLINE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGroupDecline ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GROUP_UNINVITE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGroupUninvite ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GROUP_UNINVITE_GUID, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGroupUninviteGuild ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GROUP_SET_LEADER, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGroupSetLeader ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GROUP_DISBAND, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGroupDisband ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_LOOT_METHOD, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleLootMethod ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_MINIMAP_PING, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMinimapPing ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GROUP_RAID_CONVERT, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleConvertGroupToRaid ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GROUP_CHANGE_SUB_GROUP, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGroupChangeSubGroup ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GROUP_ASSISTANT_LEADER, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGroupAssistantLeader ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_REQUEST_RAID_INFO, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleRequestRaidInf ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_RAID_READYCHECK, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleReadyCheck ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_GROUP_SET_PLAYER_ICON, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleSetPlayerIcon ) ); //// LFG System //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_SET_LOOKING_FOR_GROUP_COMMENT, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleSetLookingForGroupComment ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_LOOKING_FOR_GROUP, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMsgLookingForGroup ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_SET_LOOKING_FOR_GROUP, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleSetLookingForGroup ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_ENABLE_AUTOJOIN, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleEnableAutoJoin ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_DISABLE_AUTOJOIN, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleDisableAutoJoin ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_ENABLE_AUTOADD_MEMBERS, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleEnableAutoAddMembers ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_DISABLE_AUTOADD_MEMBERS, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleDisableAutoAddMembers ) ); //// Taxi / NPC Interaction //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_TAXINODE_STATUS_QUERY, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleTaxiNodeStatusQuery ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_TAXIQUERYAVAILABLENODES, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleTaxiQueryAvaibleNodes ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_ACTIVATETAXI, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleActivateTaxi ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_TABARDVENDOR_ACTIVATE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleTabardVendorActivate ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_BANKER_ACTIVATE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBankerActivate ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_BUY_BANK_SLOT, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBuyBankSlot ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_TRAINER_LIST, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleTrainerList ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_TRAINER_BUY_SPELL, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleTrainerBuySpell ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_PETITION_SHOWLIST, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCharterShowList ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_AUCTION_HELLO, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAuctionHello ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GOSSIP_HELLO, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGossipHello ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GOSSIP_SELECT_OPTION, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGossipSelectOption ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_SPIRIT_HEALER_ACTIVATE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleSpiritHealerActivate ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_NPC_TEXT_QUERY, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleNpcTextQuery ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_BINDER_ACTIVATE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBinderActivate ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_ACTIVATE_MULTIPLE_TAXI, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMultipleActivateTaxi ) ); //// Item / Vendors //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_SWAP_INV_ITEM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleSwapInvItem ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_SWAP_ITEM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleSwapItem ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_DESTROYITEM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleDestroyItem ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_AUTOEQUIP_ITEM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAutoEquipItem ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_ITEM_QUERY_SINGLE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleItemQuerySingle ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_SELL_ITEM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleSellItem ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_BUY_ITEM_IN_SLOT, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBuyItemInSlot ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_BUY_ITEM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBuyItem ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_LIST_INVENTORY, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleListInventory ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_AUTOSTORE_BAG_ITEM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAutoStoreBagItem ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_SET_AMMO, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAmmoSet ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_BUYBACK_ITEM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBuyBack ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_SPLIT_ITEM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleSplit ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_READ_ITEM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleReadItem ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_REPAIR_ITEM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleRepairItem ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_AUTOBANK_ITEM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAutoBankItem ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_AUTOSTORE_BANK_ITEM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAutoStoreBankItem ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CANCEL_TEMPORARY_ENCHANTMENT, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCancelTemporaryEnchantment ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_SOCKET_GEMS, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleInsertGem ) ); //// Spell System / Talent System //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_USE_ITEM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleUseItem ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CAST_SPELL, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCastSpell ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CANCEL_CAST, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCancelCast ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CANCEL_AURA, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCancelAura ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CANCEL_CHANNELLING, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCancelChannelling ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CANCEL_AUTO_REPEAT_SPELL, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCancelAutoRepeatSpell ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_LEARN_TALENT, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleLearnTalent ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_UNLEARN_TALENTS, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleUnlearnTalents ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_TALENT_WIPE_CONFIRM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleUnlearnTalents ) ); //// Combat / Duel //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_ATTACKSWING, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAttackSwing ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_ATTACKSTOP, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAttackStop ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_DUEL_ACCEPTED, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleDuelAccepted ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_DUEL_CANCELLED, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleDuelCancelled ) ); //// Trade //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_INITIATE_TRADE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleInitiateTrade ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_BEGIN_TRADE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBeginTrade ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_BUSY_TRADE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBusyTrade ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_IGNORE_TRADE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleIgnoreTrade ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_ACCEPT_TRADE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAcceptTrade ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_UNACCEPT_TRADE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleUnacceptTrade ) ); ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CANCEL_TRADE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCancelTrade ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_SET_TRADE_ITEM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleSetTradeItem ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CLEAR_TRADE_ITEM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleClearTradeItem ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_SET_TRADE_GOLD, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleSetTradeGold ) ); //// Quest System //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_QUESTGIVER_STATUS_QUERY, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleQuestgiverStatusQuery ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_QUESTGIVER_HELLO, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleQuestgiverHello ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_QUESTGIVER_ACCEPT_QUEST, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleQuestgiverAcceptQuest ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_QUESTGIVER_CANCEL, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleQuestgiverCancel ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_QUESTGIVER_CHOOSE_REWARD, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleQuestgiverChooseReward ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_QUESTGIVER_REQUEST_REWARD, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleQuestgiverRequestReward ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_QUEST_QUERY, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleQuestQuery ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_QUESTGIVER_QUERY_QUEST, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleQuestGiverQueryQuest ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_QUESTGIVER_COMPLETE_QUEST, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleQuestgiverCompleteQuest ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_QUESTLOG_REMOVE_QUEST, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleQuestlogRemoveQuest ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_RECLAIM_CORPSE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCorpseReclaim ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_RESURRECT_RESPONSE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleResurrectResponse ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_PUSHQUESTTOPARTY, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandlePushQuestToParty ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_QUEST_PUSH_RESULT, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleQuestPushResult ) ); //// Auction System //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_AUCTION_LIST_ITEMS, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAuctionListItems ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_AUCTION_LIST_BIDDER_ITEMS, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAuctionListBidderItems ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_AUCTION_SELL_ITEM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAuctionSellItem ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_AUCTION_LIST_OWNER_ITEMS, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAuctionListOwnerItems ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_AUCTION_PLACE_BID, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAuctionPlaceBid ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_AUCTION_REMOVE_ITEM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCancelAuction ) ); //// Mail System //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GET_MAIL_LIST, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGetMail ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_ITEM_TEXT_QUERY, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleItemTextQuery ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_SEND_MAIL, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleSendMail ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_MAIL_TAKE_MONEY, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleTakeMoney ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_MAIL_TAKE_ITEM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleTakeItem ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_MAIL_MARK_AS_READ, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMarkAsRead ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_MAIL_RETURN_TO_SENDER, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleReturnToSender ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_MAIL_DELETE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMailDelete ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_QUERY_NEXT_MAIL_TIME, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMailTime ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_MAIL_CREATE_TEXT_ITEM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMailCreateTextItem ) ); //// Guild Query (called when not logged in sometimes) //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GUILD_QUERY, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGuildQuery ) ); //// Guild System //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GUILD_CREATE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCreateGuild ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GUILD_INVITE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleInviteToGuild ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GUILD_ACCEPT, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGuildAccept ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GUILD_DECLINE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGuildDecline ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GUILD_INFO, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGuildInfo ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GUILD_ROSTER, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGuildRoster ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GUILD_PROMOTE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGuildPromote ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GUILD_DEMOTE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGuildDemote ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GUILD_LEAVE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGuildLeave ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GUILD_REMOVE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGuildRemove ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GUILD_DISBAND, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGuildDisband ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GUILD_LEADER, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGuildLeader ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GUILD_MOTD, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGuildMotd ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GUILD_RANK, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGuildRank ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GUILD_ADD_RANK, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGuildAddRank ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GUILD_DEL_RANK, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGuildDelRank ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GUILD_SET_PUBLIC_NOTE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGuildSetPublicNote ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GUILD_SET_OFFICER_NOTE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGuildSetOfficerNote ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_PETITION_BUY, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCharterBuy ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_PETITION_SHOW_SIGNATURES, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCharterShowSignatures ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_TURN_IN_PETITION, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCharterTurnInCharter ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_PETITION_QUERY, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCharterQuery ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_OFFER_PETITION, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCharterOffer ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_PETITION_SIGN, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCharterSign ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_PETITION_RENAME, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCharterRename ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_SAVE_GUILD_EMBLEM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleSaveGuildEmblem ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_SET_GUILD_INFORMATION, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleSetGuildInformation ) ); //// Tutorials //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_TUTORIAL_FLAG, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleTutorialFlag ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_TUTORIAL_CLEAR, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleTutorialClear ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_TUTORIAL_RESET, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleTutorialReset ) ); //// Pets //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_PET_ACTION, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandlePetAction ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_REQUEST_PET_INFO, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandlePetInfo ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_PET_NAME_QUERY, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandlePetNameQuery ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_BUY_STABLE_SLOT, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBuyStableSlot ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_STABLE_PET, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleStablePet ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_UNSTABLE_PET, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleUnstablePet ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_LIST_STABLED_PETS, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleStabledPetList ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_PET_SET_ACTION, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandlePetSetAction ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_PET_RENAME, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandlePetRename ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_PET_ABANDON, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandlePetAbandon ) ); //// Battlegrounds //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_BATTLEFIELD_PORT, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBattlefieldPort ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_BATTLEFIELD_STATUS, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBattlefieldStatus ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_BATTLEFIELD_LIST, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBattlefieldList ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_BATTLEMASTER_HELLO, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBattleMasterHello ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_ARENA_JOIN, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleArenaJoin ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_BATTLEMASTER_JOIN, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBattleMasterJoin ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_LEAVE_BATTLEFIELD, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleLeaveBattlefield ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_AREA_SPIRIT_HEALER_QUERY, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAreaSpiritHealerQuery ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_AREA_SPIRIT_HEALER_QUEUE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleAreaSpiritHealerQueue ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_BATTLEGROUND_PLAYER_POSITIONS, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleBattlegroundPlayerPositions ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_PVP_LOG_DATA, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandlePVPLogData ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_INSPECT_HONOR_STATS, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleInspectHonorStats ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_SET_ACTIONBAR_TOGGLES, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleSetActionBarToggles ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_MOVE_SPLINE_DONE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMoveSplineComplete ) ); //// GM Ticket System //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GMTICKET_CREATE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGMTicketCreate ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GMTICKET_UPDATETEXT, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGMTicketUpdate ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GMTICKET_DELETETICKET, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGMTicketDelete ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GMTICKET_GETTICKET, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGMTicketGetTicket ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GMTICKET_SYSTEMSTATUS, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGMTicketSystemStatus ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_GMTICKETSYSTEM_TOGGLE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleGMTicketToggleSystemStatus ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_UNLEARN_SKILL, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleUnlearnSkill ) ); //// Meeting Stone / Instances //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_MEETINGSTONE_INFO, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMeetingStoneInfo ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_MEETINGSTONE_JOIN, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMeetingStoneJoin ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_MEETINGSTONE_LEAVE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMeetingStoneLeave ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_RESET_INSTANCE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleResetInstance ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_SELF_RES, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleSelfResurrect ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.MSG_RANDOM_ROLL, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleRandomRoll ) ); //// Misc //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_OPEN_ITEM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleOpenItem ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_COMPLETE_CINEMATIC, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleCompleteCinematic ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_MOUNTSPECIAL_ANIM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleMountSpecialAnim ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_TOGGLE_CLOAK, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleToggleCloak ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_TOGGLE_HELM, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleToggleHelm ) ); // voicechat ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_ENABLE_MICROPHONE, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleEnableMicrophone ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_VOICE_CHAT_QUERY, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleVoiceChatQuery ) ); //ProcessServer.WorldPacketHandlers.Register( (ushort)WordOpCode.CMSG_CHANNEL_VOICE_QUERY, ProcessNet.WORLD_HEAD_SIZE + 0, false, new PacketReceiveCallback( WorldPacketHandlers.World_HandleChannelVoiceQuery ) ); ////////////////////////////////////////////////////////////////////////// // 获取ZoneWorld配置信息 LoadZoneClusterWorldConfig(); ////////////////////////////////////////////////////////////////////////// // 开始初始化ZoneClusterServer ProcessServer.WowZoneCluster.InitZoneCluster( ProcessServer.ConfigZoneCluster ); ////////////////////////////////////////////////////////////////////////// // 开始World监听端口 if ( ProcessServer.ConfigInfo.WowConfig.WorldServerHost == string.Empty ) { if ( Program.WorldServerListener.StartServer( ProcessServer.WORLD_SERVER_PORT ) == false ) { LOGs.WriteLine( LogMessageType.MSG_ERROR, "监听(WorldServer)端口:{0} 失败!", ProcessServer.WORLD_SERVER_PORT ); return; } } else { string strHostNamePort = ProcessServer.ConfigInfo.WowConfig.WorldServerHost + ":" + ProcessServer.ConfigInfo.WowConfig.WorldServerPort; if ( Program.WorldServerListener.StartServer( strHostNamePort ) == false ) { LOGs.WriteLine( LogMessageType.MSG_ERROR, "监听(WorldServer)IP地址与端口:{0} 失败!", strHostNamePort ); return; } } }
/// <summary> /// /// </summary> internal static void InitOnceServer() { ////////////////////////////////////////////////////////////////////////// // 获取最新的脚本编译集 s_ScriptAssemblyInfo = ScriptCompiler.GetLastNewScriptAssemblyInfo( "Wow.RealmScript" ); if ( s_ScriptAssemblyInfo == null ) { LOGs.WriteLine( LogMessageType.MSG_ERROR, "脚本文件内没有找到{0}版本信息!", "Wow.RealmScript" ); return; } ////////////////////////////////////////////////////////////////////////// // 获取配置的信息 LoadWowConfig(); ////////////////////////////////////////////////////////////////////////// // 开始在编译后的程序集合内获取密码和ZoneClusterWorld配置信息 LoadPassword(); ////////////////////////////////////////////////////////////////////////// // 开始在编译后的程序集合内获取密码, 并初始化SQL InitSQL(); ////////////////////////////////////////////////////////////////////////// // 开始注册协议 // 初始化OpCode的名称 RealmOpCodeName.InitRealmOpCodeName(); AuthOpCodeName.InitAuthOpCodeName(); // Auth 客户端的协议 AuthPacketHandlers.Register( (ushort)AuthOpCode.SMSG_AUTH_CHALLENGE, ProcessNet.AUTH_ID_SIZE + 33, false, new PacketReceiveCallback( Auth_PacketHandlers.Auth_HandleAuthChallenge ) ); AuthPacketHandlers.Register( (ushort)AuthOpCode.SMSG_AUTH_RECONNECT_CHALLENGE, ProcessNet.AUTH_ID_SIZE + 33, false, new PacketReceiveCallback( Auth_PacketHandlers.Auth_HandleAuthChallenge ) ); AuthPacketHandlers.Register( (ushort)AuthOpCode.SMSG_AUTH_PROOF, ProcessNet.AUTH_ID_SIZE + 74, false, new PacketReceiveCallback( Auth_PacketHandlers.Auth_HandleAuthProof ) ); AuthPacketHandlers.Register( (ushort)AuthOpCode.SMSG_AUTH_RECONNECT_PROOF, ProcessNet.AUTH_ID_SIZE + 74, false, new PacketReceiveCallback( Auth_PacketHandlers.Auth_HandleAuthProof ) ); AuthPacketHandlers.Register( (ushort)AuthOpCode.SMSG_REALM_LIST, ProcessNet.AUTH_ID_SIZE + 4, false, new PacketReceiveCallback( Auth_PacketHandlers.Auth_HandleRealmList ) ); // Realm 客户端的协议 RealmPacketHandlers.Register( (ushort)RealmOpCode.SMSG_REGISTER_REALM, ProcessNet.REALM_HEAD_SIZE + 0, false, new PacketReceiveCallback( Realm_PacketHandlers.Realm_HandleRegisterRealm ) ); RealmPacketHandlers.Register( (ushort)RealmOpCode.SMSG_REQUEST_SESSION, ProcessNet.REALM_HEAD_SIZE + 4, false, new PacketReceiveCallback( Realm_PacketHandlers.Realm_HandleRequestSession ) ); RealmPacketHandlers.Register( (ushort)RealmOpCode.SMSG_PING, ProcessNet.REALM_HEAD_SIZE + 0, false, new PacketReceiveCallback( Realm_PacketHandlers.Realm_HandlePing ) ); RealmPacketHandlers.Register( (ushort)RealmOpCode.SMSG_SQL_EXECUTE, ProcessNet.REALM_HEAD_SIZE + 0, false, new PacketReceiveCallback( Realm_PacketHandlers.Realm_HandleSQLExecute ) ); ////////////////////////////////////////////////////////////////////////// // 获取ZoneWorld配置信息 LoadZoneClusterWorldConfig(); ////////////////////////////////////////////////////////////////////////// // 开始初始化ZoneClusterServer s_WowZoneCluster.InitZoneCluster( s_ConfigZoneClusterWorld ); ////////////////////////////////////////////////////////////////////////// // 开始AuthServer监听端口 if ( s_ConfigInfo.WowConfig.AuthServerHost == string.Empty ) { if ( Program.AuthServerListener.StartServer( AuthServerPort ) == false ) { LOGs.WriteLine( LogMessageType.MSG_ERROR, "监听端口:{0} 失败!", AuthServerPort ); return; } } else { string strHostNamePort = s_ConfigInfo.WowConfig.AuthServerHost + ":" + s_ConfigInfo.WowConfig.AuthServerPort; if ( Program.AuthServerListener.StartServer( strHostNamePort ) == false ) { LOGs.WriteLine( LogMessageType.MSG_ERROR, "监听IP地址与端口:{0} 失败!", strHostNamePort ); return; } } ////////////////////////////////////////////////////////////////////////// // 开始RealmServer监听端口 if ( s_ConfigInfo.WowConfig.RealmServerHost == string.Empty ) { if ( Program.RealmServerListener.StartServer( REALM_SERVER_PORT ) == false ) { LOGs.WriteLine( LogMessageType.MSG_ERROR, "监听端口:{0} 失败!", REALM_SERVER_PORT ); return; } } else { string strHostNamePort = s_ConfigInfo.WowConfig.RealmServerHost + ":" + s_ConfigInfo.WowConfig.RealmServerPort; if ( Program.RealmServerListener.StartServer( strHostNamePort ) == false ) { LOGs.WriteLine( LogMessageType.MSG_ERROR, "监听IP地址与端口:{0} 失败!", strHostNamePort ); return; } } }