Advertisement
Guest User

Untitled

a guest
May 5th, 2015
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 36.51 KB | None | 0 0
  1. // Decompiled by AS3 Sorcerer 1.99
  2. // http://www.as3sorcerer.com/
  3.  
  4. //com.company.assembleegameclient.objects.GameObject
  5.  
  6. package com.company.assembleegameclient.objects{
  7. import flash.filters.ColorMatrixFilter;
  8. import com.company.util.MoreColorUtil;
  9. import com.company.assembleegameclient.util.PixelSelection;
  10. import flash.display.BitmapData;
  11.  
  12. import com.company.assembleegameclient.engine3d._uZ_;
  13. import _0K_m._I_b;
  14. import _0_P_.Animations;
  15. import flash.utils.Dictionary;
  16. import flash.geom.Point;
  17. import flash.geom.Vector3D;
  18. import com.company.ui.SimpleText;
  19. import flash.display.GraphicsBitmapFill;
  20. import flash.display.GraphicsPath;
  21. import flash.geom.Matrix;
  22. import flash.display.GraphicsGradientFill;
  23. import com.company.util.GraphicHelper;
  24. import com.company.assembleegameclient.engine3d._B_5;
  25. import _0_P_._0F_7;
  26. import com.company.util.ConversionUtil;
  27. import com.company.assembleegameclient.util.ConditionEffect;
  28. import _vf.ClientSounds;
  29. import com.company.util.BitmapUtil;
  30. import com.company.assembleegameclient.net.messages.data._Q_0;
  31. import com.company.assembleegameclient.map._X_l;
  32. import com.company.assembleegameclient.map.Square;
  33. import _015._O_P_;
  34. import com.company.assembleegameclient.util._7t;
  35. import _0K_m.ExplosionEffect;
  36. import _0K_m.HitEffect;
  37. import com.company.util.PointUtil;
  38. import flash.filters.GlowFilter;
  39. import flash.display.IGraphicsData;
  40. import com.company.assembleegameclient.map._0D_v;
  41. import com.company.util.AssetLibrary;
  42. import com.company.assembleegameclient.util._J_H_;
  43. import com.company.util._G_;
  44. import com.company.assembleegameclient.util.TextureRedrawer;
  45. import flash.utils.getTimer;
  46. import com.company.assembleegameclient.parameters.Parameters;
  47. import flash.display.GradientType;
  48. import flash.utils.getQualifiedClassName;
  49.  
  50.  
  51. public class GameObject extends BasicObject {
  52.  
  53. private static const _8p:Number = 1E-5;
  54. private static const _cI_:Number = -(_8p);
  55. protected static const _oj:ColorMatrixFilter = new ColorMatrixFilter(MoreColorUtil._0M_l);
  56. public static const _mD_:int = 300;
  57.  
  58. public var props_:ObjectProperties;
  59. public var name_:String;
  60. public var radius_:Number = 0.5;
  61. public var _N_V_:Number = 0;
  62. public var flying_:Boolean = false;
  63. public var _M_r:Number = 0;
  64. public var _W_J_:int = 0;
  65. public var _yN_:PixelSelection = null;
  66. public var texture_:BitmapData = null;
  67. public var mask_:BitmapData = null;
  68. public var _07_:Vector.<_Z_H_> = null;
  69. public var _8J_:_uZ_ = null;
  70. public var effect_:_I_b = null;
  71. public var _09e:Animations = null;
  72. public var _aE_:Boolean = false;
  73. protected var _tm:BitmapData = null;
  74. protected var _qm:Dictionary = null;
  75. public var _L_T_:int = 200;
  76. public var _aY_:int = 200;
  77. public var size_:int = 100;
  78. public var _81:int = -1;
  79. public var _ai:int = 0;
  80. public var _9A_:Vector.<int> = null;
  81. public var _zq:Vector.<int> = null;
  82. public var _9B_:uint = 0;
  83. protected var tex1Id_:int = 0;
  84. protected var tex2Id_:int = 0;
  85. public var _064:Boolean = false;
  86. public var objectType_:int;
  87. private var _og:uint = 1;
  88. private var _dE_:Number = 1;
  89. public var _0F_:int = 0;
  90. public var _07u:BitmapData = null;
  91. public var _B_t:_T_f = null;
  92. public var _O_l:int = -1;
  93. protected var _S_9:int = 0;
  94. protected var _ad:int = -1;
  95. protected var _Z_M_:Point;
  96. protected var _52:Point;
  97. protected var moveVec_:Vector3D;
  98. public var nameText_:SimpleText = null;
  99. public var _U_g:BitmapData = null;
  100. private var _0_r:GraphicsBitmapFill = null;
  101. private var _033:GraphicsPath = null;
  102. protected var bitmapFill_:GraphicsBitmapFill;
  103. protected var path_:GraphicsPath;
  104. protected var vS_:Vector.<Number>;
  105. protected var _0C_q:Vector.<Number>;
  106. protected var _01i:Matrix;
  107. private var _bH_:Vector.<BitmapData> = null;
  108. private var _0G_X_:Vector.<GraphicsBitmapFill> = null;
  109. private var _V_L_:Vector.<GraphicsPath> = null;
  110. protected var _J_4:GraphicsGradientFill = null;
  111. protected var _P_C_:GraphicsPath = null;
  112.  
  113. public function GameObject(_arg1:XML){
  114. var _local4:int;
  115. this.props_ = ObjectLibrary._w8;
  116. this._Z_M_ = new Point();
  117. this._52 = new Point();
  118. this.moveVec_ = new Vector3D();
  119. this.bitmapFill_ = new GraphicsBitmapFill(null, null, false, false);
  120. this.path_ = new GraphicsPath(GraphicHelper._H_2, null);
  121. this.vS_ = new Vector.<Number>();
  122. this._0C_q = new Vector.<Number>();
  123. this._01i = new Matrix();
  124. super();
  125. if (_arg1 == null)
  126. {
  127. return;
  128. };
  129. this.objectType_ = int(_arg1.@type);
  130. this.props_ = ObjectLibrary._020[this.objectType_];
  131. _P_m = (this.props_._0_Z_ > 0);
  132. var _local2:_Z_H_ = ObjectLibrary._V_a[this.objectType_];
  133. this.texture_ = _local2.texture_;
  134. this.mask_ = _local2.mask_;
  135. this._yN_ = _local2._yN_;
  136. this._07_ = _local2._07_;
  137. if (_local2._0L_G_ != null)
  138. {
  139. this.effect_ = _I_b._Y_B_(_local2._0L_G_, this);
  140. };
  141. if (this.texture_ != null)
  142. {
  143. this._dE_ = (this.texture_.height / 8);
  144. };
  145. if (_arg1.hasOwnProperty("Model"))
  146. {
  147. this._8J_ = _B_5._um(String(_arg1.Model));
  148. };
  149. var _local3:_0F_7 = ObjectLibrary._Q_z[this.objectType_];
  150. if (_local3 != null)
  151. {
  152. this._09e = new Animations(_local3);
  153. };
  154. z_ = this.props_.z_;
  155. this.flying_ = this.props_.flying_;
  156. if (_arg1.hasOwnProperty("MaxHitPoints"))
  157. {
  158. this._aY_ = (this._L_T_ = int(_arg1.MaxHitPoints));
  159. };
  160. if (_arg1.hasOwnProperty("Defense"))
  161. {
  162. this._ai = int(_arg1.Defense);
  163. };
  164. if (_arg1.hasOwnProperty("SlotTypes"))
  165. {
  166. this._9A_ = ConversionUtil._04n(_arg1.SlotTypes);
  167. this._zq = new Vector.<int>(this._9A_.length);
  168. _local4 = 0;
  169. while (_local4 < this._zq.length)
  170. {
  171. this._zq[_local4] = -1;
  172. _local4++;
  173. };
  174. };
  175. if (_arg1.hasOwnProperty("Tex1"))
  176. {
  177. this.tex1Id_ = int(_arg1.Tex1);
  178. };
  179. if (_arg1.hasOwnProperty("Tex2"))
  180. {
  181. this.tex2Id_ = int(_arg1.Tex2);
  182. };
  183. this.props_._M_N_();
  184. }
  185. public static function _C_f(_arg1:int, _arg2:int, _arg3:Boolean, _arg4:int):int{
  186. var _local5:int = _arg2;
  187. if (((_arg3) || (!(((_arg4 & ConditionEffect._if_) == 0)))))
  188. {
  189. _local5 = 0;
  190. } else
  191. {
  192. if ((_arg4 & ConditionEffect._3M_) != 0)
  193. {
  194. _local5 = (_local5 * 2);
  195. };
  196. };
  197. var _local6:int = ((_arg1 * 3) / 20);
  198. var _local7:int = Math.max(_local6, (_arg1 - _local5));
  199. if ((_arg4 & ConditionEffect._cV_) != 0)
  200. {
  201. _local7 = 0;
  202. };
  203. return (_local7);
  204. }
  205.  
  206. public function setObjectId(_arg1:int):void{
  207. var _local2:_Z_H_;
  208. objectId_ = _arg1;
  209. if (this._07_ != null)
  210. {
  211. _local2 = this._07_[(objectId_ % this._07_.length)];
  212. this.texture_ = _local2.texture_;
  213. this.mask_ = _local2.mask_;
  214. this._yN_ = _local2._yN_;
  215. };
  216. }
  217. public function _5w(_arg1:int):void{
  218. var _local3:_Z_H_;
  219. var _local2:_Z_H_ = ObjectLibrary._V_a[this.objectType_];
  220. if (_arg1 == 0)
  221. {
  222. _local3 = _local2;
  223. } else
  224. {
  225. _local3 = _local2._0K_J_(_arg1);
  226. if (_local3 == null)
  227. {
  228. return;
  229. };
  230. };
  231. this.texture_ = _local3.texture_;
  232. this.mask_ = _local3.mask_;
  233. this._yN_ = _local3._yN_;
  234. if (this.effect_ != null)
  235. {
  236. map_.removeObj(this.effect_.objectId_);
  237. this.effect_ = null;
  238. };
  239. if (_local3._0L_G_ != null)
  240. {
  241. this.effect_ = _I_b._Y_B_(_local3._0L_G_, this);
  242. if (map_ != null)
  243. {
  244. map_.addObj(this.effect_, x_, y_);
  245. };
  246. };
  247. }
  248. public function setTex1(_arg1:int):void{
  249. if (_arg1 == this.tex1Id_)
  250. {
  251. return;
  252. };
  253. this.tex1Id_ = _arg1;
  254. this._qm = new Dictionary();
  255. this._tm = null;
  256. }
  257. public function setTex2(_arg1:int):void{
  258. if (_arg1 == this.tex2Id_)
  259. {
  260. return;
  261. };
  262. this.tex2Id_ = _arg1;
  263. this._qm = new Dictionary();
  264. this._tm = null;
  265. }
  266. public function _05M_(_arg1:int):void{
  267. ClientSounds.play(this.props_._6x[_arg1]);
  268. }
  269. override public function dispose():void{
  270. var _local1:Object;
  271. var _local2:BitmapData;
  272. var _local3:Dictionary;
  273. var _local4:Object;
  274. var _local5:BitmapData;
  275. super.dispose();
  276. this.texture_ = null;
  277. if (this._tm != null)
  278. {
  279. this._tm.dispose();
  280. this._tm = null;
  281. };
  282. if (this._qm != null)
  283. {
  284. for each (_local1 in this._qm)
  285. {
  286. _local2 = (_local1 as BitmapData);
  287. if (_local2 != null)
  288. {
  289. _local2.dispose();
  290. } else
  291. {
  292. _local3 = (_local1 as Dictionary);
  293. for each (_local4 in _local3)
  294. {
  295. _local5 = (_local4 as BitmapData);
  296. if (_local5 != null)
  297. {
  298. _local5.dispose();
  299. };
  300. };
  301. };
  302. };
  303. this._qm = null;
  304. };
  305. if (this._8J_ != null)
  306. {
  307. this._8J_.dispose();
  308. this._8J_ = null;
  309. };
  310. this._9A_ = null;
  311. this._zq = null;
  312. this.nameText_ = null;
  313. if (this._U_g != null)
  314. {
  315. this._U_g.dispose();
  316. this._U_g = null;
  317. };
  318. this._0_r = null;
  319. this._033 = null;
  320. this.bitmapFill_ = null;
  321. this.path_.commands = null;
  322. this.path_.data = null;
  323. this.vS_ = null;
  324. this._0C_q = null;
  325. this._01i = null;
  326. this._bH_ = null;
  327. this._0G_X_ = null;
  328. this._V_L_ = null;
  329. this._J_4 = null;
  330. if (this._P_C_ != null)
  331. {
  332. this._P_C_.commands = null;
  333. this._P_C_.data = null;
  334. this._P_C_ = null;
  335. };
  336. }
  337. public function _L_S_():Boolean{
  338. return (!(((this._9B_ & ConditionEffect._I_T_) == 0)));
  339. }
  340. public function _hQ_():Boolean{
  341. return (!(((this._9B_ & ConditionEffect._0F_g) == 0)));
  342. }
  343. public function _051():Boolean{
  344. return (!(((this._9B_ & ConditionEffect._sm) == 0)));
  345. }
  346. public function _014():Boolean{
  347. return (!(((this._9B_ & ConditionEffect._q_) == 0)));
  348. }
  349. public function _0I_0():Boolean{
  350. return (!(((this._9B_ & ConditionEffect._02V_) == 0)));
  351. }
  352. public function _0I_e():Boolean{
  353. return (!(((this._9B_ & ConditionEffect._0G_k) == 0)));
  354. }
  355. public function _rL_():Boolean{
  356. return (!(((this._9B_ & ConditionEffect._E_t) == 0)));
  357. }
  358. public function _N_b():Boolean{
  359. return (!(((this._9B_ & ConditionEffect._0E_l) == 0)));
  360. }
  361. public function _8a():Boolean{
  362. return (!(((this._9B_ & ConditionEffect._pE_) == 0)));
  363. }
  364. public function _z1():Boolean{
  365. return (!(((this._9B_ & ConditionEffect._tY_) == 0)));
  366. }
  367. public function _di():Boolean{
  368. return (!(((this._9B_ & ConditionEffect._X_9) == 0)));
  369. }
  370. public function _R_7():Boolean{
  371. return (!(((this._9B_ & ConditionEffect._O_3) == 0)));
  372. }
  373. public function _N_4():Boolean{
  374. return (!(((this._9B_ & ConditionEffect._c_) == 0)));
  375. }
  376. public function _G_D_():Boolean{
  377. return (!(((this._9B_ & ConditionEffect._N_6) == 0)));
  378. }
  379. public function _00c():Boolean{
  380. return (!(((this._9B_ & ConditionEffect._4_) == 0)));
  381. }
  382. public function _07I_():Boolean{
  383. return (!(((this._9B_ & ConditionEffect._00L_) == 0)));
  384. }
  385. public function _L_8():Boolean{
  386. return (!(((this._9B_ & ConditionEffect._X_D_) == 0)));
  387. }
  388. public function isPaused():Boolean{
  389. return (!(((this._9B_ & ConditionEffect._Z_i) == 0)));
  390. }
  391. public function _C_H_():Boolean{
  392. return (!(((this._9B_ & ConditionEffect._O_Y_) == 0)));
  393. }
  394. public function _0C_4():Boolean{
  395. return (!(((this._9B_ & ConditionEffect._0K__) == 0)));
  396. }
  397. public function _c8():Boolean{
  398. return (!(((this._9B_ & ConditionEffect._cV_) == 0)));
  399. }
  400. public function _E_T_():Boolean{
  401. return (!(((this._9B_ & ConditionEffect._3M_) == 0)));
  402. }
  403. public function _093():Boolean{
  404. return (!(((this._9B_ & ConditionEffect._if_) == 0)));
  405. }
  406. public function _0I_b():Boolean{
  407. var _local1:GameObject;
  408. var _local2:int;
  409. var _local3:int;
  410. for each (_local1 in map_.goDict_)
  411. {
  412. if (!(_local1 is Player))
  413. {
  414. if ((_local1 is Character))
  415. {
  416. _local2 = (((x_ > _local1.x_)) ? (x_ - _local1.x_) : (_local1.x_ - x_));
  417. _local3 = (((y_ > _local1.y_)) ? (y_ - _local1.y_) : (_local1.y_ - y_));
  418. if ((((_local2 < 20)) && ((_local3 < 20))))
  419. {
  420. return (false);
  421. };
  422. };
  423. };
  424. };
  425. return (true);
  426. }
  427. public function _include():String{
  428. return ((((((this.name_ == null)) || ((this.name_ == "")))) ? ObjectLibrary._0D_N_[this.objectType_] : this.name_));
  429. }
  430. public function getColor():uint{
  431. return (BitmapUtil._B_n(this.texture_));
  432. }
  433. public function _true():uint{
  434. var _local1:uint = this._og;
  435. this._og = ((this._og + 1) % 128);
  436. return (_local1);
  437. }
  438. public function _F_Y_(_arg1:_Q_0):Number{
  439. var _local2:Number = (_arg1.x_ - x_);
  440. var _local3:Number = (_arg1.y_ - y_);
  441. return (Math.sqrt(((_local2 * _local2) + (_local3 * _local3))));
  442. }
  443. override public function addTo(_arg1:_X_l, _arg2:Number, _arg3:Number):Boolean{
  444. map_ = _arg1;
  445. this._Z_M_.x = (this._52.x = _arg2);
  446. this._Z_M_.y = (this._52.y = _arg3);
  447. if (!this.moveTo(_arg2, _arg3))
  448. {
  449. map_ = null;
  450. return (false);
  451. };
  452. if (this.effect_ != null)
  453. {
  454. map_.addObj(this.effect_, _arg2, _arg3);
  455. };
  456. return (true);
  457. }
  458. override public function removeFromMap():void{
  459. if (((this.props_.static_) && (!((_0H_B_ == null)))))
  460. {
  461. if (_0H_B_.obj_ == this)
  462. {
  463. _0H_B_.obj_ = null;
  464. };
  465. _0H_B_ = null;
  466. };
  467. if (this.effect_ != null)
  468. {
  469. map_.removeObj(this.effect_.objectId_);
  470. };
  471. super.removeFromMap();
  472. this.dispose();
  473. }
  474. public function moveTo(_arg1:Number, _arg2:Number):Boolean{
  475. var _local3:Square = map_.getSquare(_arg1, _arg2);
  476. if (_local3 == null)
  477. {
  478. return (false);
  479. };
  480. x_ = _arg1;
  481. y_ = _arg2;
  482. if (this.props_.static_)
  483. {
  484. if (_0H_B_ != null)
  485. {
  486. _0H_B_.obj_ = null;
  487. };
  488. _local3.obj_ = this;
  489. };
  490. _0H_B_ = _local3;
  491. if (this._8J_ != null)
  492. {
  493. this._8J_.setPosition(x_, y_, 0, this.props_.rotation_);
  494. };
  495. return (true);
  496. }
  497. override public function update(_arg1:int, _arg2:int):Boolean{
  498. var _local4:int;
  499. var _local5:Number;
  500. var _local6:Number;
  501. var _local3:Boolean;
  502. if (!(((this.moveVec_.x == 0)) && ((this.moveVec_.y == 0))))
  503. {
  504. if (this._ad < map_.gs_.gsc_.lastTickId_)
  505. {
  506. this.moveVec_.x = 0;
  507. this.moveVec_.y = 0;
  508. this.moveTo(this._52.x, this._52.y);
  509. } else
  510. {
  511. _local4 = (_arg1 - this._S_9);
  512. _local5 = (this._Z_M_.x + (_local4 * this.moveVec_.x));
  513. _local6 = (this._Z_M_.y + (_local4 * this.moveVec_.y));
  514. this.moveTo(_local5, _local6);
  515. _local3 = true;
  516. };
  517. };
  518. if (this.props_._G_R_ != null)
  519. {
  520. if (!_local3)
  521. {
  522. z_ = this.props_.z_;
  523. this.flying_ = this.props_.flying_;
  524. } else
  525. {
  526. z_ = this.props_._G_R_.z_;
  527. this.flying_ = this.props_._G_R_.flying_;
  528. };
  529. };
  530. return (true);
  531. }
  532. public function _gk(_arg1:Number, _arg2:Number, _arg3:int):void{
  533. this.moveTo(_arg1, _arg2);
  534. this._S_9 = _arg3;
  535. this._52.x = _arg1;
  536. this._52.y = _arg2;
  537. this._Z_M_.x = _arg1;
  538. this._Z_M_.y = _arg2;
  539. this.moveVec_.x = 0;
  540. this.moveVec_.y = 0;
  541. }
  542. public function _0I_u(_arg1:Number, _arg2:Number, _arg3:int, _arg4:int):void{
  543. if (this._ad < map_.gs_.gsc_.lastTickId_)
  544. {
  545. this.moveTo(this._52.x, this._52.y);
  546. };
  547. this._S_9 = map_.gs_.lastUpdate_;
  548. this._52.x = _arg1;
  549. this._52.y = _arg2;
  550. this._Z_M_.x = x_;
  551. this._Z_M_.y = y_;
  552. this.moveVec_.x = ((this._52.x - this._Z_M_.x) / _arg3);
  553. this.moveVec_.y = ((this._52.y - this._Z_M_.y) / _arg3);
  554. this._ad = _arg4;
  555. }
  556. public function damage(_arg1:int, _arg2:int, _arg3:Vector.<uint>, _arg4:Boolean, _arg5:Projectile):void{
  557. var _local7:int;
  558. var _local8:uint;
  559. var _local9:ConditionEffect;
  560. var _local10:Boolean;
  561. if (_arg4)
  562. {
  563. this._aE_ = true;
  564. } else
  565. {
  566. if (_arg3 != null)
  567. {
  568. _local7 = 0;
  569. for each (_local8 in _arg3)
  570. {
  571. _local9 = null;
  572. switch (_local8)
  573. {
  574. case ConditionEffect._0I_2:
  575. break;
  576. case ConditionEffect._xc:
  577. case ConditionEffect._V_H_:
  578. case ConditionEffect._0D_Z_:
  579. case ConditionEffect._vJ_:
  580. case ConditionEffect._030:
  581. case ConditionEffect._2p:
  582. case ConditionEffect._01n:
  583. case ConditionEffect._02w:
  584. case ConditionEffect._o9:
  585. case ConditionEffect._xn:
  586. case ConditionEffect._vH_:
  587. case ConditionEffect._T_q:
  588. case ConditionEffect._K_J_:
  589. case ConditionEffect._iM_:
  590. case ConditionEffect._l0:
  591. case ConditionEffect._Z_A_:
  592. case ConditionEffect._qn:
  593. _local9 = ConditionEffect.effects_[_local8];
  594. break;
  595. case ConditionEffect._V_Z_:
  596. if (this._z1())
  597. {
  598. map_.mapOverlay_.addChild(new _O_P_(this, "Immune", 0xFF0000, 3000));
  599. } else
  600. {
  601. _local9 = ConditionEffect.effects_[_local8];
  602. };
  603. break;
  604. };
  605. if (_local9 != null)
  606. {
  607. if ((this._9B_ | _local9.bit_) != this._9B_)
  608. {
  609. this._9B_ = (this._9B_ | _local9.bit_);
  610. map_.mapOverlay_.addChild(new _O_P_(this, _local9.name_, 0xFF0000, 3000, _local7));
  611. _local7 = (_local7 + 500);
  612. };
  613. };
  614. };
  615. };
  616. };
  617. var _local6:Vector.<uint> = _7t._8W_(this.objectType_, this.texture_, this.props_._U_Q_, this.props_._U_C_);
  618. if (this._aE_)
  619. {
  620. map_.addObj(new ExplosionEffect(_local6, this.size_, 30), x_, y_);
  621. } else
  622. {
  623. if (_arg5 != null)
  624. {
  625. map_.addObj(new HitEffect(_local6, this.size_, 10, _arg5.angle_, _arg5._ko.speed_), x_, y_);
  626. } else
  627. {
  628. map_.addObj(new ExplosionEffect(_local6, this.size_, 10), x_, y_);
  629. };
  630. };
  631. if (_arg2 > 0)
  632. {
  633. _local10 = ((this._093()) || (((!((_arg5 == null))) && (_arg5._ko._N_J_))));
  634. map_.mapOverlay_.addChild(new _O_P_(this, ("-" + _arg2), ((_local10) ? 0x9000FF : 0xFF0000), 1000));
  635. };
  636. if (_arg5 != null)
  637. {
  638. if (map_.player_.objectId_ == objectId_)
  639. {
  640. map_.gs_.gsc_.sendVisibullet(_arg2, _arg5.ownerId_, _arg5.bulletId_);
  641. };
  642. };
  643. }
  644. protected function _T_L_(_arg1:String):SimpleText{
  645. var _local2:SimpleText = new SimpleText(16, 0xFFFFFF, false, 0, 0, "Myriad Pro");
  646. _local2.setBold(true);
  647. _local2.text = _arg1;
  648. _local2.updateMetrics();
  649. return (_local2);
  650. }
  651. protected function generateNameBitmapData(_arg1:SimpleText):BitmapData{
  652. var _local2:BitmapData = new BitmapData(_arg1.width, 64, true, 0);
  653. _local2.draw(_arg1, null);
  654. _local2.applyFilter(_local2, _local2.rect, PointUtil._P_5, new GlowFilter(0, 1, 3, 3, 2, 1));
  655. return (_local2);
  656. }
  657. public function _oL_(_arg1:Vector.<IGraphicsData>, _arg2:_0D_v):void{
  658. if (this._U_g == null)
  659. {
  660. this.nameText_ = this._T_L_(this.name_);
  661. this._U_g = this.generateNameBitmapData(this.nameText_);
  662. this._0_r = new GraphicsBitmapFill(null, new Matrix(), false, false);
  663. this._033 = new GraphicsPath(GraphicHelper._H_2, new Vector.<Number>());
  664. };
  665. var _local3:int = ((this._U_g.width / 2) + 1);
  666. var _local4:int = 30;
  667. var _local5:Vector.<Number> = this._033.data;
  668. _local5.length = 0;
  669. _local5.push((_bY_[0] - _local3), _bY_[1], (_bY_[0] + _local3), _bY_[1], (_bY_[0] + _local3), (_bY_[1] + _local4), (_bY_[0] - _local3), (_bY_[1] + _local4));
  670. this._0_r.bitmapData = this._U_g;
  671. var _local6:Matrix = this._0_r.matrix;
  672. _local6.identity();
  673. _local6.translate(_local5[0], _local5[1]);
  674. _arg1.push(this._0_r);
  675. _arg1.push(this._033);
  676. _arg1.push(GraphicHelper.END_FILL);
  677. }
  678. protected function _1g():BitmapData{
  679. if (this._07u == null)
  680. {
  681. this._07u = AssetLibrary._xK_("lofiChar8x8", int((Math.random() * 239)));
  682. };
  683. return (this._07u);
  684. }
  685. protected function getTexture(_arg1:_0D_v, _arg2:int):BitmapData{
  686. var _local6:Number;
  687. var _local7:int;
  688. var _local8:_J_H_;
  689. var _local9:int;
  690. var _local10:BitmapData;
  691. var _local11:int;
  692. var _local12:BitmapData;
  693. var _local3:BitmapData = this.texture_;
  694. var _local4:int = this.size_;
  695. var _local5:BitmapData;
  696. if (this._yN_ != null)
  697. {
  698. _local6 = 0;
  699. _local7 = PixelSelection._sS_;
  700. if (_arg2 < (this._W_J_ + _mD_))
  701. {
  702. if (!this.props_._D_9)
  703. {
  704. this._N_V_ = this._M_r;
  705. };
  706. _local6 = (((_arg2 - this._W_J_) % _mD_) / _mD_);
  707. _local7 = PixelSelection._E_w;
  708. } else
  709. {
  710. if (((!((this.moveVec_.x == 0))) || (!((this.moveVec_.y == 0)))))
  711. {
  712. _local9 = (0.5 / this.moveVec_.length);
  713. _local9 = (_local9 + (400 - (_local9 % 400)));
  714. if ((((((((this.moveVec_.x > _8p)) || ((this.moveVec_.x < _cI_)))) || ((this.moveVec_.y > _8p)))) || ((this.moveVec_.y < _cI_))))
  715. {
  716. this._N_V_ = Math.atan2(this.moveVec_.y, this.moveVec_.x);
  717. _local7 = PixelSelection._m1;
  718. } else
  719. {
  720. _local7 = PixelSelection._sS_;
  721. };
  722. _local6 = ((_arg2 % _local9) / _local9);
  723. };
  724. };
  725. _local8 = this._yN_.imageFromFacing(this._N_V_, _arg1, _local7, _local6);
  726. _local3 = _local8.image_;
  727. _local5 = _local8.mask_;
  728. } else
  729. {
  730. if (this._09e != null)
  731. {
  732. _local10 = this._09e.getTexture(_arg2);
  733. if (_local10 != null)
  734. {
  735. _local3 = _local10;
  736. };
  737. };
  738. };
  739. if (((this.props_._Z_L_) || (!((this._8J_ == null)))))
  740. {
  741. return (_local3);
  742. };
  743. if (_arg1._kN_)
  744. {
  745. _local11 = (((_local3 == null)) ? 8 : _local3.width);
  746. _local3 = this._1g();
  747. _local5 = null;
  748. _local4 = (this.size_ * Math.min(1.5, (_local11 / _local3.width)));
  749. };
  750. if (this._C_H_())
  751. {
  752. _local3 = _G_._R_9(_local3, _oj);
  753. };
  754. if (this._B_t != null)
  755. {
  756. if (!this._B_t._jQ_(_arg2))
  757. {
  758. _local3 = this._B_t.apply(_local3, _arg2);
  759. } else
  760. {
  761. this._B_t = null;
  762. };
  763. };
  764. if ((((this.tex1Id_ == 0)) && ((this.tex2Id_ == 0))))
  765. {
  766. _local3 = TextureRedrawer.redraw(_local3, _local4, false, 0, 0);
  767. } else
  768. {
  769. _local12 = null;
  770. if (this._qm == null)
  771. {
  772. this._qm = new Dictionary();
  773. } else
  774. {
  775. _local12 = this._qm[_local3];
  776. };
  777. if (_local12 == null)
  778. {
  779. _local12 = TextureRedrawer.resize(_local3, _local5, _local4, false, this.tex1Id_, this.tex2Id_);
  780. _local12 = TextureRedrawer.outlineGlow(_local12, 0, 0);
  781. this._qm[_local3] = _local12;
  782. };
  783. _local3 = _local12;
  784. };
  785. return (_local3);
  786. }
  787. public function _I_a(_arg1:String, _arg2:int):void{
  788. this.texture_ = AssetLibrary._xK_(_arg1, _arg2);
  789. this._dE_ = (this.texture_.height / 8);
  790. }
  791. public function getPortrait():BitmapData{
  792. var _local1:BitmapData;
  793. var _local2:int;
  794. if (this._tm == null)
  795. {
  796. _local1 = (((this.props_._tm)!=null) ? this.props_._tm.getTexture() : this.texture_);
  797. _local2 = ((4 / _local1.width) * 100);
  798. this._tm = TextureRedrawer.resize(_local1, this.mask_, _local2, true, this.tex1Id_, this.tex2Id_);
  799. this._tm = TextureRedrawer.outlineGlow(this._tm, 0, 0);
  800. };
  801. return (this._tm);
  802. }
  803. public function setAttack(_arg1:int, _arg2:Number):void{
  804. this._M_r = _arg2;
  805. this._W_J_ = getTimer();
  806. }
  807. override public function draw(_arg1:Vector.<IGraphicsData>, _arg2:_0D_v, _arg3:int):void{
  808. var _local4:BitmapData = this.getTexture(_arg2, _arg3);
  809. if (this.props_._Z_L_)
  810. {
  811. if (_0H_B_.faces_.length == 0)
  812. {
  813. return;
  814. };
  815. this.path_.data = _0H_B_.faces_[0].face_.vout_;
  816. this.bitmapFill_.bitmapData = _local4;
  817. _0H_B_.baseTexMatrix_.calculateTextureMatrix(this.path_.data);
  818. this.bitmapFill_.matrix = _0H_B_.baseTexMatrix_.tToS_;
  819. _arg1.push(this.bitmapFill_);
  820. _arg1.push(this.path_);
  821. _arg1.push(GraphicHelper.END_FILL);
  822. return;
  823. };
  824. if (this._8J_ != null)
  825. {
  826. this._8J_.draw(_arg1, _arg2, this.props_.color_, _local4);
  827. return;
  828. };
  829. var _local5:int = _local4.width;
  830. var _local6:int = _local4.height;
  831. var _local7:int = (_0H_B_.sink_ + this._0F_);
  832. if ((((_local7 > 0)) && (((this.flying_) || (((!((_0H_B_.obj_ == null))) && (_0H_B_.obj_.props_.protectFromSink_)))))))
  833. {
  834. _local7 = 0;
  835. };
  836. this.vS_.length = 0;
  837. this.vS_.push((_bY_[3] - (_local5 / 2)), ((_bY_[4] - _local6) + _local7), (_bY_[3] + (_local5 / 2)), ((_bY_[4] - _local6) + _local7), (_bY_[3] + (_local5 / 2)), _bY_[4], (_bY_[3] - (_local5 / 2)), _bY_[4]);
  838. this.path_.data = this.vS_;
  839. this.bitmapFill_.bitmapData = _local4;
  840. this._01i.identity();
  841. this._01i.translate(this.vS_[0], this.vS_[1]);
  842. this.bitmapFill_.matrix = this._01i;
  843. _arg1.push(this.bitmapFill_);
  844. _arg1.push(this.path_);
  845. _arg1.push(GraphicHelper.END_FILL);
  846. if (((((!(this.isPaused())) && (!(((this._9B_ & ConditionEffect._06j) == 0))))) && (!(Parameters._0F_o))))
  847. {
  848. this._wz(_arg1, _arg2, _arg3);
  849. };
  850. if (((((this.props_._xg) && (!((this.name_ == null))))) && (!((this.name_.length == 0)))))
  851. {
  852. this._oL_(_arg1, _arg2);
  853. };
  854. }
  855. public function _wz(_arg1:Vector.<IGraphicsData>, _arg2:_0D_v, _arg3:int):void{
  856. var _local9:BitmapData;
  857. var _local10:GraphicsBitmapFill;
  858. var _local11:GraphicsPath;
  859. var _local12:Number;
  860. var _local13:Number;
  861. var _local14:Matrix;
  862. if (this._bH_ == null)
  863. {
  864. this._bH_ = new Vector.<BitmapData>();
  865. this._0G_X_ = new Vector.<GraphicsBitmapFill>();
  866. this._V_L_ = new Vector.<GraphicsPath>();
  867. };
  868. this._bH_.length = 0;
  869. var _local4:int = (_arg3 / 500);
  870. ConditionEffect._a4(this._9B_, this._bH_, _local4);
  871. var _local5:Number = _bY_[3];
  872. var _local6:Number = this.vS_[1];
  873. var _local7:int = this._bH_.length;
  874. var _local8:int;
  875. while (_local8 < _local7)
  876. {
  877. _local9 = this._bH_[_local8];
  878. if (_local8 >= this._0G_X_.length)
  879. {
  880. this._0G_X_.push(new GraphicsBitmapFill(null, new Matrix(), false, false));
  881. this._V_L_.push(new GraphicsPath(GraphicHelper._H_2, new Vector.<Number>()));
  882. };
  883. _local10 = this._0G_X_[_local8];
  884. _local11 = this._V_L_[_local8];
  885. _local10.bitmapData = _local9;
  886. _local12 = ((_local5 - ((_local9.width * _local7) / 2)) + (_local8 * _local9.width));
  887. _local13 = (_local6 - (_local9.height / 2));
  888. _local11.data.length = 0;
  889. _local11.data.push(_local12, _local13, (_local12 + _local9.width), _local13, (_local12 + _local9.width), (_local13 + _local9.height), _local12, (_local13 + _local9.height));
  890. _local14 = _local10.matrix;
  891. _local14.identity();
  892. _local14.translate(_local12, _local13);
  893. _arg1.push(_local10);
  894. _arg1.push(_local11);
  895. _arg1.push(GraphicHelper.END_FILL);
  896. _local8++;
  897. };
  898. }
  899. override public function drawShadow(_arg1:Vector.<IGraphicsData>, _arg2:_0D_v, _arg3:int):void{
  900. if (this._J_4 == null)
  901. {
  902. this._J_4 = new GraphicsGradientFill(GradientType.RADIAL, [this.props_._G_c, this.props_._G_c], [0.5, 0], null, new Matrix());
  903. this._P_C_ = new GraphicsPath(GraphicHelper._H_2, new Vector.<Number>());
  904. };
  905. var _local4:Number = (((this.size_ / 100) * (this.props_._0_Z_ / 100)) * this._dE_);
  906. var _local5:Number = (30 * _local4);
  907. var _local6:Number = (15 * _local4);
  908. this._J_4.matrix.createGradientBox((_local5 * 2), (_local6 * 2), 0, (_bY_[0] - _local5), (_bY_[1] - _local6));
  909. _arg1.push(this._J_4);
  910. this._P_C_.data.length = 0;
  911. this._P_C_.data.push((_bY_[0] - _local5), (_bY_[1] - _local6), (_bY_[0] + _local5), (_bY_[1] - _local6), (_bY_[0] + _local5), (_bY_[1] + _local6), (_bY_[0] - _local5), (_bY_[1] + _local6));
  912. _arg1.push(this._P_C_);
  913. _arg1.push(GraphicHelper.END_FILL);
  914. }
  915. public function toString():String{
  916. return ((((((((((("[" + getQualifiedClassName(this)) + " id: ") + objectId_) + " type: ") + ObjectLibrary._0D_N_[this.objectType_]) + " pos: ") + x_) + ", ") + y_) + "]"));
  917. }
  918.  
  919. }
  920. }//package com.company.assembleegameclient.objects
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement