コード例 #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
ファイル: Aura.cs プロジェクト: 0xFh/Asda2-Project
        /// <summary>
        /// Removes all of this Aura's occupied fields
        /// </summary>
        protected void RemoveFromClient()
        {
            if (!IsVisible)
            {
                return;
            }
            var character = Owner as Character;
            var owner     = Owner as NPC;

            if (owner != null)
            {
                Asda2CombatHandler.SendMonstrStateChangedResponse(owner, Asda2NpcState.Ok);
            }
            if (character != null)
            {
                Asda2SpellHandler.SendBuffEndedResponse(character, Spell.RealId);
                if (character.IsInGroup)
                {
                    Asda2GroupHandler.SendPartyMemberBuffInfoResponse(character);
                }
                if (character.SoulmateCharacter != null)
                {
                    Asda2SoulmateHandler.SendSoulmateBuffUpdateInfoResponse(character);
                }
            }

            //AuraHandler.SendRemoveAura(m_auras.Owner, this);
        }
コード例 #3
0
ファイル: Aura.cs プロジェクト: 0xFh/Asda2-Project
        /// <summary>Removes all of this Aura's occupied fields</summary>
        protected void RemoveFromClient()
        {
            if (!IsVisible)
            {
                return;
            }
            Character owner1 = Owner as Character;
            NPC       owner2 = Owner as NPC;

            if (owner2 != null)
            {
                Asda2CombatHandler.SendMonstrStateChangedResponse(owner2, Asda2NpcState.Ok);
            }
            if (owner1 == null)
            {
                return;
            }
            Asda2SpellHandler.SendBuffEndedResponse(owner1, Spell.RealId);
            if (owner1.IsInGroup)
            {
                Asda2GroupHandler.SendPartyMemberBuffInfoResponse(owner1);
            }
            if (owner1.SoulmateCharacter == null)
            {
                return;
            }
            Asda2SoulmateHandler.SendSoulmateBuffUpdateInfoResponse(owner1);
        }
コード例 #4
0
ファイル: AuraHandler.cs プロジェクト: 0xFh/Asda2-Project
        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);
             *  }*/
        }