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)); }
public PPopupRequest(MobileCell Target) : this(Target.m_Mobile.Serial) { }
public PAttackRequest(MobileCell Target) : this(Target.m_Mobile.Serial) { }
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; } }