public Entity CreateGet(IntPtr baseEntity) { if (baseEntity == IntPtr.Zero) { return(null); } if (m_cache.TryGetValue(baseEntity, out Entity entity) && entity != null) { return(entity); } Entity entityFromPointer = ObjectMgr.CreateEntityFromPointer(baseEntity); if (entityFromPointer != null) { m_cache.Add(baseEntity, entityFromPointer); } return(entityFromPointer); }