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


C# RealmPacketIn.ReadBoolean方法代码示例

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


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

示例1: HandleStopWatchingFaction

		public static void HandleStopWatchingFaction(IRealmClient client, RealmPacketIn packet)
		{
		    var reputationIndex = (FactionReputationIndex)packet.ReadInt32();
		    bool isInactive = packet.ReadBoolean();

            client.ActiveCharacter.Reputations.SetInactive(reputationIndex, isInactive);
		}
开发者ID:KroneckerX,项目名称:WCell,代码行数:7,代码来源:FactionHandler.cs

示例2: HandleAddFriend

        public static void HandleAddFriend(IRealmClient client, RealmPacketIn packet)
        {
            Assert.AreEqual(packet.ReadBoolean(), true);
            Assert.AreEqual(packet.ReadCString(), "abc");
            Assert.AreEqual(packet.ReadUInt32(), (uint)345);
            Assert.AreEqual(packet.ReadByte(), 0xFF);

            sentPackets++;
        }
开发者ID:KroneckerX,项目名称:WCell,代码行数:9,代码来源:FakeClientTest.cs

示例3: HandleTogglePvP

		public static void HandleTogglePvP(IRealmClient client, RealmPacketIn packet)
		{
			var chr = client.ActiveCharacter;
			if (packet.ContentLength > 0)
			{
				var pvpFlagState = packet.ReadBoolean();
				chr.SetPvPFlag(pvpFlagState);
				return;
			}
			chr.TogglePvPFlag();
		}
开发者ID:MeaNone,项目名称:WCell,代码行数:11,代码来源:MiscHandler.cs

示例4: HandleBattlemasterJoin

        public static void HandleBattlemasterJoin(IRealmClient client, RealmPacketIn packet)
        {
            var battlemasterGuid = packet.ReadEntityId();
			var bgId = (BattlegroundId)packet.ReadUInt32();
            var instanceId = packet.ReadUInt32();
            var asGroup = packet.ReadBoolean();

			// check to make sure bg id was valid
			if (bgId <= BattlegroundId.None || bgId >= BattlegroundId.End)
				return;

            var chr = client.ActiveCharacter;

			BattlegroundMgr.EnqueuePlayers(chr, bgId, instanceId, asGroup);
        }
开发者ID:ray2006,项目名称:WCell,代码行数:15,代码来源:BattlegroundHandler.cs

示例5: HandleSetAllowLowLevelRaid1

 public static void HandleSetAllowLowLevelRaid1(IRealmClient client, RealmPacketIn packet)
 {
     Character character = client.ActiveCharacter;
     bool allow = packet.ReadBoolean();
     character.IsAllowedLowLevelRaid = allow;
 }
开发者ID:Stika,项目名称:WCell,代码行数:6,代码来源:GroupHandler.cs

示例6: GroupPromoteFlagRequest

        public static void GroupPromoteFlagRequest(IRealmClient client, RealmPacketIn packet)
        {
            var chr = client.ActiveCharacter;
            var member = chr.GroupMember;
            if (member == null)
                return;

            var group = member.Group as RaidGroup;
            if (group == null)
                return;

            byte promotionType = packet.ReadByte();
            bool add = packet.ReadBoolean();
            EntityId targetGuid = packet.ReadEntityId();

            var targetMember = group[targetGuid.Low];

            if (group.CheckAction(member, targetMember, targetMember != null ? targetMember.Name : String.Empty, GroupPrivs.Leader) ==
                GroupResult.NoError)
            {
                if (promotionType == 0)
                {
                    // group.SetMainTank(promotedMember, add);
                }
                else
                {
                    group.MainAssistant = targetMember;
                }

                group.SendUpdate();
            }
        }
开发者ID:Stika,项目名称:WCell,代码行数:32,代码来源:GroupHandler.cs

示例7: ChangeAssistantFlagRequest

        public static void ChangeAssistantFlagRequest(IRealmClient client, RealmPacketIn packet)
        {
            var chr = client.ActiveCharacter;
            var member = chr.GroupMember;

            if (member == null)
                return;

            var group = member.Group as RaidGroup;
            if (group == null)
                return;

            EntityId targetGuid = packet.ReadEntityId();

            var targetMember = group[targetGuid.Low];

            if (group.CheckAction(member, targetMember, targetMember != null ? targetMember.Name : String.Empty, GroupPrivs.Leader)
                == GroupResult.NoError)
            {
                bool isSet = packet.ReadBoolean();
                targetMember.IsAssistant = isSet;
                group.SendUpdate();
            }
        }
开发者ID:Stika,项目名称:WCell,代码行数:24,代码来源:GroupHandler.cs

示例8: HandleRepair

		public static void HandleRepair(IRealmClient client, RealmPacketIn packet)
		{
			var armorerId = packet.ReadEntityId();
			var itemId = packet.ReadEntityId();
			var useGuildFunds = packet.ReadBoolean();

			var armorer = client.ActiveCharacter.Region.GetObject(armorerId) as NPC;
			ArmorerMgr.RepairItem(client, armorer, itemId, useGuildFunds);
		}
开发者ID:NVN,项目名称:WCell,代码行数:9,代码来源:NPCHandler.cs

示例9: HandleSummonResponse

        public static void HandleSummonResponse(IRealmClient client, RealmPacketIn packet)
        {
            var chr = client.ActiveCharacter;
            var request = chr.SummonRequest;
            if (request != null)
            {
                if (request.ExpiryTime > DateTime.Now && chr.MayTeleport)
                {
                    var guid = packet.ReadEntityId();
                    var accept = packet.ReadBoolean();

                    if (accept)
                    {
                        chr.TeleportTo(request.TargetMap, request.TargetPos);
                        chr.Zone = request.TargetZone;
                    }
                }
                chr.CancelSummon(false);
                chr.m_summonRequest = null;
            }
        }
开发者ID:ebakkedahl,项目名称:WCell,代码行数:21,代码来源:CharacterHandler.cs

示例10: HandleTeleport

		public static void HandleTeleport(IRealmClient client, RealmPacketIn packet)
		{
			var isTeleportingOut = packet.ReadBoolean();
		}
开发者ID:KroneckerX,项目名称:WCell,代码行数:4,代码来源:LFGHandler.cs

示例11: HandleAuctionListItems

		public static void HandleAuctionListItems(IRealmClient client, RealmPacketIn packet)
		{
			var chr = client.ActiveCharacter;
			var auctioneerId = packet.ReadEntityId();
			var auctioneer = chr.Map.GetObject(auctioneerId) as NPC;

			var searcher = new AuctionSearch()
			{
				StartIndex = packet.ReadUInt32(),
				Name = packet.ReadCString(),
				LevelRange1 = packet.ReadByte(),
				LevelRange2 = packet.ReadByte(),
				InventoryType = (InventorySlotType)packet.ReadUInt32(),
				ItemClass = (ItemClass)packet.ReadUInt32(),
				ItemSubClass = (ItemSubClass)packet.ReadUInt32(),
				Quality = packet.ReadInt32(),
				IsUsable = packet.ReadBoolean()
			};

			AuctionMgr.Instance.AuctionListItems(chr, auctioneer, searcher);

		}
开发者ID:Zerant,项目名称:WCell,代码行数:22,代码来源:AuctionHandler.cs

示例12: HandleStatusUpdate

 public static void HandleStatusUpdate(IRealmClient client, RealmPacketIn packet)
 {
     var voiceEnabled = packet.ReadBoolean();
     var micEnabled = packet.ReadBoolean();
 }
开发者ID:ebakkedahl,项目名称:WCell,代码行数:5,代码来源:VoiceChatHandler.cs

示例13: HandleGuildBankSwapItems

		public static void HandleGuildBankSwapItems(IRealmClient client, RealmPacketIn packet)
		{
			var bankEntityId = packet.ReadEntityId();
			var isBankToBank = packet.ReadBoolean();

			var toBankTab = (byte)1;
			var toTabSlot = (byte)1;
			var isAutoStore = false;
			var autoStoreCount = (byte)0;
			var bagSlot = (byte)0;
			var slot = (byte)0;
			var unknown1 = (uint)1;
			var fromBankTab = (byte)0;
			var fromTabSlot = (byte)0;
			var itemEntryId = (uint)0;
			var unknown2 = (byte)1;
			var isBankToChar = true;
			var amount = (byte)0;

			if (isBankToBank)
			{
				toBankTab = packet.ReadByte();
				toTabSlot = packet.ReadByte();
				unknown1 = packet.ReadUInt32();
				fromBankTab = packet.ReadByte();
				fromTabSlot = packet.ReadByte();
				itemEntryId = packet.ReadUInt32();
				unknown2 = packet.ReadByte();
				amount = packet.ReadByte();

				if (toTabSlot >= GuildMgr.MAX_BANK_TAB_SLOTS) return;
				if ((toBankTab == fromBankTab) && (toTabSlot == fromTabSlot)) return;
			}
			else
			{
				fromBankTab = packet.ReadByte();
				fromTabSlot = packet.ReadByte();
				itemEntryId = packet.ReadUInt32();
				isAutoStore = packet.ReadBoolean();
				autoStoreCount = (byte)0;
				if (isAutoStore)
				{
					autoStoreCount = packet.ReadByte();
					packet.SkipBytes(5);
				}
				else
				{
					bagSlot = packet.ReadByte();
					slot = packet.ReadByte();
				}
				isBankToChar = packet.ReadBoolean();
				amount = packet.ReadByte();

				if ((fromTabSlot >= GuildMgr.MAX_BANK_TAB_SLOTS) && fromTabSlot != 0xFF) return;
			}

			var chr = client.ActiveCharacter;
			var bank = chr.Map.GetObject(bankEntityId) as GameObject;
			var guild = chr.Guild;

			if (isBankToBank)
			{
				guild.Bank.SwapItemsManualBankToBank(chr, bank, fromBankTab, fromTabSlot, toBankTab,
															 toTabSlot, itemEntryId, amount);
			}
			else if (isBankToChar)
			{
				if (isAutoStore)
				{
					guild.Bank.SwapItemsAutoStoreBankToChar(chr, bank, fromBankTab, fromTabSlot, itemEntryId,
																autoStoreCount);
				}
				else
				{
					guild.Bank.SwapItemsManualBankToChar(chr, bank, fromBankTab, fromTabSlot, bagSlot, slot,
															 itemEntryId, amount);
				}
			}
			else
			{
				if (isAutoStore)
				{
					guild.Bank.SwapItemsAutoStoreCharToBank(chr, bank, fromBankTab, bagSlot, slot, itemEntryId, autoStoreCount);
				}
				else
				{
					guild.Bank.SwapItemsManualCharToBank(chr, bank, bagSlot, slot, itemEntryId, fromBankTab,
															 fromTabSlot, amount);
				}
			}
		}
开发者ID:remixod,项目名称:netServer,代码行数:91,代码来源:GuildHandler.cs

示例14: HandlePort

        public static void HandlePort(IRealmClient client, RealmPacketIn packet)
        {
            // Start 64-bit BGID
            var unk1 = packet.ReadInt16();
            var bgId = (BattlegroundId)packet.ReadUInt32();
            var unk2 = packet.ReadInt16();
            // End BGID

            var join = packet.ReadBoolean();	// whether to join or cancel

            var chr = client.ActiveCharacter;

            if (join)
            {
                var invitation = chr.Battlegrounds.Invitation;
                if (invitation != null && invitation.Team.Battleground != null)
                {
                    var bg = invitation.Team.Battleground;
                    //if (bg.GetTeam(chr).IsFull)
                    //{
                    //    // already full
                    //    chr.Battlegrounds.Cancel(invitation);
                    //    chr.SendBattlegroundError(BattlegroundJoinError.);
                    //}
                    if (bg.Template.Id == bgId)
                    {
                        // valid request
                        bg.TeleportInside(chr);
                    }
                }
            }
            else
            {
                chr.Battlegrounds.CancelRelation(bgId);
            }
        }
开发者ID:ray2006,项目名称:WCell,代码行数:36,代码来源:BattlegroundHandler.cs

示例15: HandleProposalResponse

		public static void HandleProposalResponse(IRealmClient client, RealmPacketIn packet)
		{
			var lfgGroupId = packet.ReadUInt32();
			var accept = packet.ReadBoolean();
		}
开发者ID:KroneckerX,项目名称:WCell,代码行数:5,代码来源:LFGHandler.cs


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