当前位置: 首页>>代码示例>>C#>>正文


C# WorldClass.Send方法代码示例

本文整理汇总了C#中WorldServer.Network.WorldClass.Send方法的典型用法代码示例。如果您正苦于以下问题:C# WorldClass.Send方法的具体用法?C# WorldClass.Send怎么用?C# WorldClass.Send使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WorldServer.Network.WorldClass的用法示例。


在下文中一共展示了WorldClass.Send方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: HandleRequestUITime

        public static void HandleRequestUITime(ref PacketReader packet, ref WorldClass session)
        {
            PacketWriter uiTime = new PacketWriter(LegacyMessage.UITime);

            uiTime.WriteUnixTime();
            session.Send(uiTime);
        }
开发者ID:Gargash,项目名称:Arctium,代码行数:7,代码来源:TimeHandler.cs

示例2: HandleLogoutComplete

        public static void HandleLogoutComplete(ref PacketReader packet, ref WorldClass session)
        {
            WorldMgr.DeleteSession(session.Character.Guid);

            PacketWriter logoutComplete = new PacketWriter(LegacyMessage.LogoutComplete);
            session.Send(logoutComplete);
        }
开发者ID:thundergod221,项目名称:Arctium,代码行数:7,代码来源:LogoutHandler.cs

示例3: HandleSendKnownSpells

        public static void HandleSendKnownSpells(ref WorldClass session)
        {
            Character pChar = session.Character;

            var specializationSpells = SpecializationMgr.GetSpecializationSpells(pChar);
            var specializationSpellCount = ((specializationSpells != null) ? specializationSpells.Count : 0);

            var talentSpells = SpecializationMgr.GetTalentSpells(pChar, pChar.ActiveSpecGroup);
            var talentSpellCount = ((talentSpells != null) ? talentSpells.Count : 0);

            int count = pChar.SpellList.Count + specializationSpellCount + talentSpellCount;

            PacketWriter writer = new PacketWriter(ServerMessage.SendKnownSpells);
            BitPack BitPack = new BitPack(writer);

            BitPack.Write(1);
            BitPack.Write(count, 22);
            BitPack.Flush();

            pChar.SpellList.ForEach(spell =>
                writer.WriteUInt32(spell.SpellId));

            if (specializationSpells != null)
                specializationSpells.ForEach(spell => writer.WriteUInt32(spell.Spell));

            if (talentSpells != null)
                talentSpells.ForEach(spell => writer.WriteUInt32(spell));

            session.Send(ref writer);
        }
开发者ID:RashKim,项目名称:Arctium,代码行数:30,代码来源:SpellHandler.cs

示例4: HandleTutorialFlags

        public static void HandleTutorialFlags(ref WorldClass session)
        {
            PacketWriter tutorialFlags = new PacketWriter(LegacyMessage.TutorialFlags);
            for (int i = 0; i < 8; i++)
                tutorialFlags.WriteUInt32(0);

            session.Send(ref tutorialFlags);
        }
开发者ID:MrAndis,项目名称:Arctium,代码行数:8,代码来源:TutorialHandler.cs

示例5: HandleCacheVersion

        public static void HandleCacheVersion(ref WorldClass session)
        {
            PacketWriter cacheVersion = new PacketWriter(ServerMessage.CacheVersion);

            cacheVersion.WriteUInt32(0);

            session.Send(ref cacheVersion);
        }
开发者ID:rodrigoalv,项目名称:Arctium-WoW,代码行数:8,代码来源:MiscHandler.cs

示例6: HandleUpdateClientCacheVersion

        public static void HandleUpdateClientCacheVersion(ref WorldClass session)
        {
            PacketWriter cacheVersion = new PacketWriter(LegacyMessage.UpdateClientCacheVersion);

            cacheVersion.WriteUInt32(0);

            session.Send(cacheVersion);
        }
开发者ID:boredtodeath,项目名称:Arctium,代码行数:8,代码来源:MiscHandler.cs

示例7: HandleUITimeRequest

        public static void HandleUITimeRequest(ref PacketReader packet, WorldClass session)
        {
            PacketWriter uiTime = new PacketWriter(ServerMessage.UITime);

            uiTime.WriteUnixTime();

            session.Send(ref uiTime);
        }
开发者ID:rodrigoalv,项目名称:Arctium-WoW,代码行数:8,代码来源:TimeHandler.cs

示例8: HandleObjectDestroy

        public static void HandleObjectDestroy(ref WorldClass session)
        {
            PacketWriter objectDestroy = new PacketWriter(LegacyMessage.ObjectDestroy);

            objectDestroy.WriteUInt64(session.Character.Guid);
            objectDestroy.WriteUInt8(0);

            session.Send(objectDestroy);
        }
开发者ID:boredtodeath,项目名称:Arctium,代码行数:9,代码来源:ObjectHandler.cs

示例9: HandleMessageOfTheDay

        public static void HandleMessageOfTheDay(ref WorldClass session)
        {
            PacketWriter motd = new PacketWriter(LegacyMessage.MessageOfTheDay);
            motd.WriteUInt32(3);

            motd.WriteCString("Arctium MoP test");
            motd.WriteCString("Welcome to our MoP server test.");
            motd.WriteCString("Your development team =)");
            session.Send(ref motd);
        }
开发者ID:Kinivus,项目名称:Arctium,代码行数:10,代码来源:MiscHandler.cs

示例10: HandlePong

        public static void HandlePong(ref PacketReader packet, ref WorldClass session)
        {
            uint sequence = packet.ReadUInt32();
            uint latency = packet.ReadUInt32();

            PacketWriter pong = new PacketWriter(JAMCCMessage.Pong);
            pong.WriteUInt32(sequence);

            session.Send(pong);
        }
开发者ID:boredtodeath,项目名称:Arctium,代码行数:10,代码来源:MiscHandler.cs

示例11: HandleLogoutComplete

        public static void HandleLogoutComplete(ref PacketReader packet, ref WorldClass session)
        {
            var pChar = session.Character;

            ObjectMgr.SavePositionToDB(pChar);
            WorldMgr.DeleteSession(pChar.Guid);

            PacketWriter logoutComplete = new PacketWriter(LegacyMessage.LogoutComplete);
            session.Send(logoutComplete);
        }
开发者ID:boredtodeath,项目名称:Arctium,代码行数:10,代码来源:LogoutHandler.cs

示例12: HandleLogoutCancel

        public static void HandleLogoutCancel(ref PacketReader packet, WorldClass session)
        {
            cts.Cancel();

            MoveHandler.HandleMoveUnroot(session);

            PacketWriter LogoutCancelAck = new PacketWriter(ServerMessage.LogoutCancelAck);
            session.Send(ref LogoutCancelAck);

            session.Character.setStandState(0);
        }
开发者ID:mansemino,项目名称:Arctium,代码行数:11,代码来源:LogoutHandler.cs

示例13: HandleSendNewTimeSpeed

        public static void HandleSendNewTimeSpeed(ref WorldClass session)
        {
            PacketWriter newTimeSpeed = new PacketWriter(LegacyMessage.SendNewTimeSpeed);

            newTimeSpeed.WritePackedTime();
            newTimeSpeed.WritePackedTime();
            newTimeSpeed.WriteFloat(0.01666667f);
            newTimeSpeed.WriteInt32(0);
            newTimeSpeed.WriteInt32(0);

            session.Send(ref newTimeSpeed);
        }
开发者ID:Mathias1000,项目名称:Arctium,代码行数:12,代码来源:TimeHandler.cs

示例14: HandleAuthChallenge

        public static void HandleAuthChallenge(ref PacketReader packet, ref WorldClass session)
        {
            PacketWriter authChallenge = new PacketWriter(ServerMessage.AuthChallenge, true);

            for (int i = 0; i < 8; i++)
                authChallenge.WriteUInt32(0);

            authChallenge.WriteUInt32((uint)new Random(DateTime.Now.Second).Next(1, 0xFFFFFFF));
            authChallenge.WriteUInt8(1);

            session.Send(ref authChallenge);
        }
开发者ID:australopitheque,项目名称:Arctium,代码行数:12,代码来源:AuthenticationHandler.cs

示例15: HandleRealmSplitStateResponse

        public static void HandleRealmSplitStateResponse(ref PacketReader packet, ref WorldClass session)
        {
            uint realmSplitState = 0;

            PacketWriter realmSplitStateResp = new PacketWriter(LegacyMessage.RealmSplitStateResponse);

            realmSplitStateResp.WriteUInt32(packet.ReadUInt32());
            realmSplitStateResp.WriteUInt32(realmSplitState);
            realmSplitStateResp.WriteCString("01/01/01");

            session.Send(ref realmSplitStateResp);
        }
开发者ID:jesus01,项目名称:Arctium,代码行数:12,代码来源:TimeHandler.cs


注:本文中的WorldServer.Network.WorldClass.Send方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。