ShadowMob pullNewOrCached( CanonMob cm ) { if( _objects.ContainsKey( cm.id ) ) return _objects[cm.id]; ShadowMob sm = new ShadowMob( this, cm ); _objects[cm.id] = sm; return sm; }
/// <summary> /// Checks for a time slot during which we can update to the canon database, and if we /// get one, update. If someone else is doing it, we have to wait. /// </summary> /// <returns>True if we updated</returns> public bool tryMerge( ShadowMob mob ) { // If this came in by way of a mob, add it to the update list. if( mob != null ) _updates[mob.id] = mob; // Check to see if we have a valid slot on the canon world for updating. CanonWorld.MergeToken token = _canon.getMergeToken(); if( token != null ) { mergeCommon( token ); return true; } else return false; }