Пример #1
0
 public static void SendAuraUpdate(Unit owner, Aura aura)
 {
     if (owner is NPC)
     {
         Asda2CombatHandler.SendNpcBuffedResponse((NPC)owner, aura);
     }
     else
     {
         if (!(owner is Character))
         {
             return;
         }
         Character character = (Character)owner;
         if (!character.CanMove)
         {
             Asda2MovmentHandler.SendEndMoveByFastInstantRegularMoveResponse(character);
         }
         Asda2SpellHandler.SendCharacterBuffedResponse(character, aura);
         if (character.IsInGroup)
         {
             Asda2GroupHandler.SendPartyMemberBuffInfoResponse(character);
         }
         if (character.SoulmateCharacter == null)
         {
             return;
         }
         Asda2SoulmateHandler.SendSoulmateBuffUpdateInfoResponse(character);
     }
 }
Пример #2
0
        public static void SendAuraUpdate(Unit owner, Aura aura)
        {
            if (owner is NPC)
            {
                Asda2CombatHandler.SendNpcBuffedResponse((NPC)owner, aura);
            }
            else if (owner is Character)
            {
                var chr = (Character)owner;
                if (!chr.CanMove)
                {
                    Asda2MovmentHandler.SendEndMoveByFastInstantRegularMoveResponse(chr);
                }
                Asda2SpellHandler.SendCharacterBuffedResponse(chr, aura);
                if (chr.IsInGroup)
                {
                    Asda2GroupHandler.SendPartyMemberBuffInfoResponse(chr);
                }
                if (chr.SoulmateCharacter != null)
                {
                    Asda2SoulmateHandler.SendSoulmateBuffUpdateInfoResponse(chr);
                }
            }

            /*if (!owner.IsAreaActive) return;
             *  using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_AURA_UPDATE))
             *  {
             *          owner.EntityId.WritePacked(packet);
             *
             *          WriteAura(aura, packet);
             *
             *          owner.SendPacketToArea(packet);
             *  }*/
        }