Exemplo n.º 1
0
        private void a(int A_0, int A_1)
        {
            if (A_0 == 0 || A_1 == 0)
            {
                return;
            }
            LotroMe me = this.EntityManager.Me as LotroMe;

            if (me == null || me.BasePtr != A_1)
            {
                return;
            }
            LotroEntity lotroEntity1             = (LotroEntity)null;
            ReadOnlyCollection <Entity> entities = this.EntityManager.Entities;
            int count = entities.Count;

            for (int index = 0; index < count; ++index)
            {
                LotroEntity lotroEntity2 = entities[index] as LotroEntity;
                if (lotroEntity2 != null && lotroEntity2.BasePtr == A_0)
                {
                    lotroEntity1 = lotroEntity2;
                    break;
                }
            }
            if (lotroEntity1 == null || lotroEntity1.Type == LotroEntity.LotroEntityType.PLAYER || (double)lotroEntity1.DistanceTo((Entity)me) > 40.0)
            {
                return;
            }
            Console.WriteLine(lotroEntity1.FullName + " is attacking us (" + (object)me.MyId + ")");
            this.EntityManager.AddAttacker((Entity)lotroEntity1);
        }
Exemplo n.º 2
0
 private void b()
 {
     lock (this.m_attackerLock)
     {
         if (this.m_attackersList.Count == 0)
         {
             return;
         }
         LotroMe local_0 = this.m_me as LotroMe;
         if (local_0 == null)
         {
             return;
         }
         if (!local_0.CombatActive)
         {
             this.m_attackersList.Clear();
         }
         else
         {
             for (int local_1 = this.m_attackersList.Count - 1; local_1 >= 0; --local_1)
             {
                 LotroEntity local_2 = this.m_attackersList[local_1] as LotroEntity;
                 if (local_2 != null && (!local_2.CombatActive || local_2.IsInvalid || (local_2.Dead || (double)local_2.DistanceTo((Entity)local_0) > 60.0)))
                 {
                     this.m_attackersList.RemoveAt(local_1);
                 }
             }
         }
     }
 }