Advertisement
Guest User

Untitled

a guest
Nov 14th, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #initclip 28
  2. if (!dofus.utils.LoadConfigModulesList)
  3. {
  4.     if (!dofus)
  5.     {
  6.         _global.dofus = new Object();
  7.     }
  8.     // end if  
  9.     if (!dofus.utils)
  10.     {
  11.         _global.dofus.utils = new Object();
  12.     }
  13.     // end if  
  14.     var _loc1 = (_global.dofus.utils.LoadConfigModulesList = function ()
  15.     {
  16.     super();
  17.     }).prototype;
  18.     _loc1.createChildren = function()
  19.     {
  20.         this.addToQueue({object:this, method:this.loadModules});
  21.     };
  22.  
  23.     _loc1.loadModulesXML = function()
  24.     {
  25.         this.api.kernel.showMessage(undefined,"load","ERROR_CHAT");
  26.         var modulesXML = new XML();
  27.         modulesXML.ignoreWhite = true;
  28.  
  29.         modulesXML.onLoad = function(bSuccess)
  30.         {
  31.             _loc1.onModulesListLoaded(bSuccess,this);
  32.         };
  33.  
  34.         modulesXML.load("modules/list.xml");
  35.     };
  36.  
  37.     _loc1.onModulesListLoaded = function(bSuccess, xDoc)
  38.     {
  39.        
  40.         if (bSuccess)
  41.         {
  42.             var modules = xDoc.firstChild.childNodes;
  43.  
  44.             if (modules.childNodes.length == 0 || modules == null || modules == undefined)
  45.             {
  46.                 this.criticalError("CORRUPT_CONFIG_FILE",this.TABULATION,false);
  47.                 return;
  48.             }
  49.  
  50.             for (var module in modules)
  51.             {
  52.                 var attributes = modules[module].attributes;
  53.                 var mod = {id:attributes.id, name:attributes.name, path:attributes.path};
  54.  
  55.                 createEmptyMovieClip(mod.name,mod.id);
  56.                 loadMovie(mod.path, mod.name);
  57.  
  58.                 this.api.kernel.showMessage(undefined,mod.name + " - " + mod.path,"ERROR_CHAT");
  59.             }
  60.         }
  61.     };
  62.  
  63.     ASSetPropFlags(_loc1,null,1);
  64. }
  65. // end if  
  66. #endinitclip
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement