Advertisement
Guest User

Untitled

a guest
Mar 24th, 2018
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #initclip 28
  2. if (!dofus.LoadConfigModulesList)
  3. {
  4.     if (!dofus)
  5.     {
  6.         _global.dofus = new Object();
  7.     } // end if
  8.     var _loc1 = (_global.dofus.LoadConfigModulesList = function (oAPI)
  9.     {
  10.         super();
  11.         this.initialize(oAPI);
  12.         this.loadModules();
  13.         this.onLoadModulesList()
  14.     }).prototype;
  15.     _loc1.initialize = function (oAPI)
  16.     {
  17.         super.initialize(oAPI);
  18.     };
  19.     _loc1.modulesLoaded = new Array();
  20.     _loc1.loadModules = function()
  21.     {
  22.         var modulesXML = new XML();
  23.         modulesXML.ignoreWhite = true;
  24.         modulesXML.onLoad = function(bSuccess)
  25.         {
  26.             _loc1.onLoadModulesList(bSuccess,this,_loc1.modulesLoaded);
  27.         };
  28.         modulesXML.load("modules/list.xml");
  29.     };
  30.     _loc1.onLoadModulesList = function(bSuccess, xDoc, array)
  31.     {
  32.         if (bSuccess)
  33.         {
  34.             var modules = xDoc.firstChild.childNodes;
  35.             for (var module in modules)
  36.             {
  37.                 var attributes = modules[module].attributes;
  38.                 var mod = {name:attributes.name, path:attributes.path, id:attrubutes.id};
  39.                 array.push(mod);
  40.                 createEmptyMovieClip(mod.name, getNextHighestDepth());
  41.                 loadMovie(mod.path, mod.name);
  42.             }
  43.         }
  44.     };
  45.     ASSetPropFlags(_loc1, null, 1)
  46. } // end if
  47. #endinitclip
  48.  
  49.  
  50. //package core
  51. _loc1.checkNodes = function ()
  52. {
  53.     if (_global.API.gfx.initialize == undefined)
  54.     {
  55.         return (false);
  56.     } // end if
  57.     if (_global.API.kernel.start == undefined)
  58.     {
  59.         return (false);
  60.     } // end if
  61.     if (_global.API.ui.loadUIComponent == undefined)
  62.     {
  63.         return (false);
  64.     } // end if
  65.     if (_global.API.modulesList.loadModules == undefined)
  66.     {
  67.         return (false);
  68.     } // end if
  69.     if (_global.API.modulesList.onLoadModulesList == undefined)
  70.     {
  71.         return (false);
  72.     } // end if
  73.     if (_global.API.modulesList.modulesLoaded == undefined)
  74.     {
  75.         return (false);
  76.     } // end if
  77.     return (true);
  78. };
  79. _loc1.startGame = function ()
  80. {
  81.     _global.API.kernel.start();
  82.     _global.API.modulesList.loadModules();
  83.     _global.API.modulesList.onLoadModulesList();
  84.     _global.API.modulesList.modulesLoaded();
  85. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement