当前位置: 首页>>代码示例>>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;未经允许,请勿转载。