//---------------------------------------------------------------------
        // remove数据
        Task IGrainDCacheSlave.removeFromSlave(string key)
        {
            if (!HaveChild)
            {
                MapCache.Remove(key);
            }
            else
            {
                for (int i = 1; i <= Count; i++)
                {
                    SB.Clear();
                    SB.Append(MasterName);
                    SB.Append("_");
                    SB.Append(GrainDCache.SLAVE_MAP_NAME);
                    SB.Append("_");
                    SB.Append(CurDeep + 1);
                    SB.Append("_");
                    SB.Append(i);
                    var grain_slave = this.GrainFactory.GetGrain <IGrainDCacheSlave>(SB.ToString());
                    grain_slave.removeFromSlave(key);
                }
            }

            return(TaskDone.Done);
        }
Beispiel #2
0
 public void Remap()
 {
     MapCache.Remove(MainPlayer.ActiveCharacter.CurrentMap);
     if (!_tryLoadMap())
     {
         throw new FileLoadException("Unable to load remapped map file!");
     }
     ActiveMapRenderer.SetActiveMap(MapCache[MainPlayer.ActiveCharacter.CurrentMap]);
 }
Beispiel #3
0
        public void Remap()
        {
            MapCache.Remove(MainPlayer.ActiveCharacter.CurrentMap);
            if (!_tryLoadMap(-1, true))
            {
                EOGame.Instance.DoShowLostConnectionDialogAndReturnToMainMenu();
                return;
            }

            EOGame.Instance.Hud.AddChat(ChatTab.Local, GetString(EOResourceID.STRING_SERVER), GetString(EOResourceID.SERVER_MESSAGE_MAP_MUTATION), ChatIcon.Exclamation, ChatColor.Server);
            EOGame.Instance.Hud.AddChat(ChatTab.System, GetString(EOResourceID.STRING_SERVER), GetString(EOResourceID.SERVER_MESSAGE_MAP_MUTATION), ChatIcon.Exclamation, ChatColor.Server);

            ActiveMapRenderer.SetActiveMap(MapCache[MainPlayer.ActiveCharacter.CurrentMap]);
        }
Beispiel #4
0
        //---------------------------------------------------------------------
        // remove数据
        Task IGrainDCacheMaster.removeFromMasteSlave(string key)
        {
            if (MapCache.ContainsKey(key))
            {
                MapCache.Remove(key);
            }

            for (int i = 1; i <= SlaveCount; i++)
            {
                SB.Clear();
                SB.Append(MasterName);
                SB.Append("_");
                SB.Append(GrainDCache.SLAVE_MAP_NAME);
                SB.Append("_");
                SB.Append(GrainDCache.SLAVE_ROOT_DEEP);
                SB.Append("_");
                SB.Append(i);
                var grain_slave = this.GrainFactory.GetGrain <IGrainDCacheSlave>(SB.ToString());
                grain_slave.removeFromSlave(key);
            }

            return(TaskDone.Done);
        }
Beispiel #5
0
        //---------------------------------------------------------------------
        // remove数据
        Task IGrainDCacheMap.removeFromMap(string key)
        {
            MapCache.Remove(key);

            return(TaskDone.Done);
        }