Beispiel #1
0
        void proxy_OnJoinGameResponse(RealmServer.JoinGameResponse packet, ref PacketFlag flag)
        {
            // If this instance receives a join game success packet
            if (packet.Result == RealmServer.JoinGameResult.Sucess)
            {
                try
                {
                    // If this is the active diablo 2 window (active tab or last clicked in overview tab)
                    if (this.proxy.DiabloWindow != null && this.proxy.DiabloWindow.IsActive())
                    {
                        Console.WriteLine(this.proxy.DiabloWindow.KeyOwner + " joined a game, telling hero mercs to join");

                        // loop through all running heromerc plugins to tell them to join the same game
                        foreach (HeroMercPlugin heroMerc in runningPlugins)
                        {
                            // Ignore the current instance as we are already in the game
                            if (heroMerc != this)
                            {
                                // tell the other instance to join the game
                                heroMerc.JoinGame(gameName, gamePassword);
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                }
            }
        }
Beispiel #2
0
        void RealmProxy_OnJoinGameResponse(RealmServer.JoinGameResponse packet, ref PacketFlag flag)
        {
            if (packet.Result == RealmServer.JoinGameResult.Sucess)
            {
                this.GameAddress = packet.GameServerIP;
                this.GamePort    = 4000;

                flag = PacketFlag.PacketFlag_Hidden;

                byte[] patchedBytes = packet.PatchedByteArray();
                this.SendToDiablo(patchedBytes);
            }
        }