Advertisement
Guest User

Untitled

a guest
Mar 30th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #initclip 255
  2. var _loc1 = _global.dofus.datacenter.MonsterGroup.prototype;
  3. _loc1.__set__name = function(value)
  4. {
  5.     this._aNamesList = new Array();
  6.     var _loc3 = value.split(",");
  7.     var _loc4 = -1;
  8.  
  9.     while (++_loc4, _loc4 < _loc3.length)
  10.     {
  11.         var _loc5 = this.api.lang.getMonstersText(_loc3[_loc4]);
  12.         this._aNamesList.push(_loc5.n);
  13.         if (_loc5.a != -1)
  14.         {
  15.             this._nAlignmentIndex = _loc5.a;
  16.         }
  17.         // end if  
  18.     }
  19.     //return (this.name());
  20. };
  21. _loc1.__get__name = function()
  22. {
  23.     return (this.getName());
  24. };
  25. _loc1.getName = function(sEndChar)
  26. {
  27.     sEndChar = sEndChar == undefined ? ("\n") : (sEndChar);
  28.     var _loc3 = new Array();
  29.     var _loc4 = -1;
  30.  
  31.     while (++_loc4, _loc4 < this._aLevelsList.length)
  32.     {
  33.         _loc3.push({level:Number(this._aLevelsList[_loc4]), name:this._aNamesList[_loc4]});
  34.     }
  35.     _loc3.sortOn(["level"],Array.DESCENDING | Array.NUMERIC);
  36.     var _loc5 = new String();
  37.     var _loc6 = -1;
  38.  
  39.     while (++_loc6, _loc6 < _loc3.length)
  40.     {
  41.         var _loc7 = _loc3[_loc6];
  42.         _loc5 = _loc5 + (_loc7.name + " (" + _loc7.level + ")" + sEndChar);
  43.     }
  44.     return (_loc5);
  45. };
  46. _loc1.alertChatText = function()
  47. {
  48.     var _loc2 = this.api.datacenter.Map;
  49.     return ("Groupe niveau " + this.totalLevel + " en " + _loc2.x + "," + _loc2.y + " : <br/>" + this.getName("<br/>"));
  50. };
  51. _loc1.__set__Level = function(value)
  52. {
  53.     this._aLevelsList = value.split(",");
  54.     //return (this.Level());
  55. };
  56. _loc1.__get__totalLevel = function()
  57. {
  58.     var _loc2 = 0;
  59.     var _loc3 = -1;
  60.  
  61.     while (++_loc3, _loc3 < this._aLevelsList.length)
  62.     {
  63.         _loc2 = _loc2 + Number(this._aLevelsList[_loc3]);
  64.     }
  65.     return (_loc2);
  66. };
  67. _loc1.__get__bonusValue = function()
  68. {
  69.     return (this._nBonusValue);
  70. };
  71. _loc1.__get__totalExp = function()
  72. {
  73.     return (this._nTotalExp);
  74. };
  75. _loc1.__set__totalExp = function(nValue)
  76. {
  77.     this._nTotalExp = nValue;
  78. };
  79. _loc1.__get__alignment = function()
  80. {
  81.     return (new dofus.datacenter.Alignment(this._nAlignmentIndex, 0));
  82. };
  83.  
  84. _loc1.addProperty("alignment",_loc1.__get__alignment,function ()
  85. {
  86.  
  87. });
  88. _loc1.addProperty("name",_loc1.__get__name,_loc1.__set__name);
  89. _loc1.addProperty("bonusValue",_loc1.__get__bonusValue,function ()
  90. {
  91.  
  92. });
  93. _loc1.addProperty("totalLevel",_loc1.__get__totalLevel,function ()
  94. {
  95.  
  96. });
  97. _loc1.addProperty("Level",function ()
  98. {
  99.  
  100. },_loc1.__set__Level);
  101. _loc1.addProperty("totalExp",_loc1.__get__totalExp,_loc1.__set__totalExp);
  102. ASSetPropFlags(_loc1,null,1);
  103. _loc1._sDefaultAnimation = "static";
  104. _loc1._bAllDirections = false;
  105. _loc1._bForceWalk = true;
  106. _loc1._nAlignmentIndex = -1;
  107. #endinitclip
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement