Esempio n. 1
0
 public static MobileCell Instantiate(Mobile m)
 {
     if (m_InstancePool.Count > 0)
     {
         MobileCell cell = (MobileCell)m_InstancePool.Dequeue();
         cell.m_Mobile = m;
         cell.m_Z      = (sbyte)m.Z;
         return(cell);
     }
     return(new MobileCell(m));
 }
Esempio n. 2
0
 public PPopupRequest(MobileCell Target) : this(Target.m_Mobile.Serial)
 {
 }
Esempio n. 3
0
 public PAttackRequest(MobileCell Target)
     : this(Target.m_Mobile.Serial)
 {
 }
Esempio n. 4
0
 public void GetStats(object obj, out int z, out int treshold, out int type, out int tiebreaker)
 {
     if (obj is MobileCell)
     {
         MobileCell cell = (MobileCell)obj;
         z        = cell.Z;
         treshold = 2;
         type     = 3;
         if (cell.m_Mobile.Player)
         {
             tiebreaker = 0x40000000;
         }
         else
         {
             tiebreaker = cell.Serial;
         }
     }
     else if (obj is LandTile)
     {
         LandTile tile = (LandTile)obj;
         z          = tile.SortZ;
         treshold   = 0;
         type       = 0;
         tiebreaker = 0;
     }
     else if (obj is DynamicItem)
     {
         int         num;
         DynamicItem item = (DynamicItem)obj;
         z = item.Z;
         if (Map.m_ItemFlags[item.ID & 0x3fff][TileFlag.Background])
         {
             num = 0;
         }
         else
         {
             num = 1;
         }
         treshold   = (item.Height == 0) ? num : (num + 1);
         type       = ((item.ID & 0x3fff) == 0x2006) ? 4 : 2;
         tiebreaker = item.Serial;
     }
     else if (obj is StaticItem)
     {
         int        num2;
         StaticItem item2 = (StaticItem)obj;
         z = item2.Z;
         if (Map.m_ItemFlags[item2.ID & 0x3fff][TileFlag.Background])
         {
             num2 = 0;
         }
         else
         {
             num2 = 1;
         }
         treshold   = (item2.Height == 0) ? num2 : (num2 + 1);
         type       = 1;
         tiebreaker = item2.m_SortInfluence;
     }
     else
     {
         z          = 0;
         treshold   = 0;
         type       = 0;
         tiebreaker = 0;
     }
 }
Esempio n. 5
0
 public PAttackRequest(MobileCell Target) : this(Target.m_Mobile.Serial)
 {
 }
Esempio n. 6
0
 public PPopupRequest(MobileCell Target)
     : this(Target.m_Mobile.Serial)
 {
 }