當前位置: 首頁>>代碼示例>>C#>>正文


C# Unit.SendPacketToArea方法代碼示例

本文整理匯總了C#中WCell.RealmServer.Entities.Unit.SendPacketToArea方法的典型用法代碼示例。如果您正苦於以下問題:C# Unit.SendPacketToArea方法的具體用法?C# Unit.SendPacketToArea怎麽用?C# Unit.SendPacketToArea使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WCell.RealmServer.Entities.Unit的用法示例。


在下文中一共展示了Unit.SendPacketToArea方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: SendAllAuras

		public static void SendAllAuras(Unit owner)
		{
			using (var packet = CreateAllAuraPacket(owner))
			{
				owner.SendPacketToArea(packet);
			}
		}
開發者ID:Skizot,項目名稱:WCell,代碼行數:7,代碼來源:AuraHandler.cs

示例2: SendAllAuras

 public static void SendAllAuras(Unit owner)
 {
     if (!owner.IsAreaActive) return;
     using (var packet = CreateAllAuraPacket(owner))
     {
         owner.SendPacketToArea(packet);
     }
 }
開發者ID:ebakkedahl,項目名稱:WCell,代碼行數:8,代碼來源:AuraHandler.cs

示例3: SendCombatStart

		public static void SendCombatStart(Unit unit, Unit opponent, bool includeSelf)
		{
			using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_ATTACKSTART, 16))
			{
				packet.Write(unit.EntityId);
				packet.Write(opponent.EntityId);

				unit.SendPacketToArea(packet, includeSelf);
			}
		}
開發者ID:MeaNone,項目名稱:WCell,代碼行數:10,代碼來源:CombatHandler.cs

示例4: SendAuraUpdate

		public static void SendAuraUpdate(Unit owner, Aura aura)
		{
			using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_AURA_UPDATE))
			{
				owner.EntityId.WritePacked(packet);

				WriteAura(aura, packet);

				owner.SendPacketToArea(packet);
			}
		}
開發者ID:Skizot,項目名稱:WCell,代碼行數:11,代碼來源:AuraHandler.cs

示例5: SendCombatStop

        public static void SendCombatStop(Unit attacker, Unit opponent, int extraArg)
        {
            using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_ATTACKSTOP, 22))
            {
                attacker.EntityId.WritePacked(packet);

                if (opponent != null)
                {
                    opponent.EntityId.WritePacked(packet);
                }
                else
                {
                    packet.Write((byte)0); // null packed guid mask
                }

                packet.Write(extraArg);

                attacker.SendPacketToArea(packet, true);
            }
        }
開發者ID:pallmall,項目名稱:WCell,代碼行數:20,代碼來源:CombatHandler.cs

示例6: SendWinner

		public static void SendWinner(DuelWin win, Unit winner, INamed loser)
		{
			using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_DUEL_WINNER))
			{
				packet.Write((byte)win);
				packet.Write(winner.Name);
				packet.Write(loser.Name);

				winner.SendPacketToArea(packet);
			}
		}
開發者ID:ray2006,項目名稱:WCell,代碼行數:11,代碼來源:DuelHandler.cs

示例7: SendRemoveAura

        public static void SendRemoveAura(Unit owner, Aura aura)
        {
            using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_AURA_UPDATE))
            {
                owner.EntityId.WritePacked(packet);
                packet.Write(aura.Index);

                // a spellid of 0 tells the client to remove the aura
                packet.Write(0);

                owner.SendPacketToArea(packet);
            }
        }
開發者ID:ebakkedahl,項目名稱:WCell,代碼行數:13,代碼來源:AuraHandler.cs

示例8: SendPowerUpdate

		public static void SendPowerUpdate(Unit unit, PowerType type, int value)
		{
			using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_POWER_UPDATE, 17))
			{
				unit.EntityId.WritePacked(packet);
				packet.Write((byte)type);
				packet.Write(value);

				unit.SendPacketToArea(packet, true);
			}
		}
開發者ID:remixod,項目名稱:netServer,代碼行數:11,代碼來源:MiscHandler.cs

示例9: SendHealthUpdate

		public static void SendHealthUpdate(Unit unit, int health)
		{
			using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_HEALTH_UPDATE, 13))
			{
				unit.EntityId.WritePacked(packet);
				packet.Write(health);

				unit.SendPacketToArea(packet, true);
			}
		}
開發者ID:remixod,項目名稱:netServer,代碼行數:10,代碼來源:MiscHandler.cs

示例10: SendHealLog

		public static void SendHealLog(WorldObject caster, Unit target, uint spellId, int value, bool critical)
		{
			using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_SPELLHEALLOG, 25))
			{
				target.EntityId.WritePacked(packet);
				caster.EntityId.WritePacked(packet);

				packet.Write(spellId);
				packet.Write(value);
				packet.Write((uint)0);		// overheal
				packet.Write((byte)(critical ? 1 : 0));
				packet.Write((byte)0);		// unused
				packet.Write(0);			// unknown wotlk

				target.SendPacketToArea(packet, true);
			}
		}
開發者ID:pallmall,項目名稱:WCell,代碼行數:17,代碼來源:CombatLogHandler.cs


注:本文中的WCell.RealmServer.Entities.Unit.SendPacketToArea方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。