/d2
_as3_getlocal <2>
//d3
_as3_getlocal <3>
//d1
_as3_getlocal <1>
//d3
_as3_getlocal <3>
//66 81 25
_as3_getproperty attackData
//66 82 25
_as3_getproperty attack
//d3
_as3_getlocal <3>
//66 81 25
_as3_getproperty attackData
//66 aa 62
_as3_getproperty recharge
Without a source view of your code, this is all I could come up with
/d2
_as3_getlocal <2>
//d3
_as3_getlocal <3>
//d1
_as3_getlocal <1>
//02
_as3_getlocal <3>
//02 02 02
_as3_getproperty attackData
//02 02 02
_as3_getproperty attack
//d3
_as3_getlocal <3>
//66 81 25
_as3_getproperty attackData
//66 aa 62
_as3_getproperty recharge
here is the code. =)
+++++++++++++++++++++++++++++++++++++++++
code 1
package com.progrestar.game.fight.building
{
import com.progrestar.cas.signal.*;
import com.progrestar.common.util.*;
import com.progrestar.common.util.abstract.types.*;
import com.progrestar.game.data.*;
import com.progrestar.game.fight.core.*;
import com.progrestar.game.fight.dto.*;
import com.progrestar.game.lib.*;
import com.progrestar.game.lib.building.*;
import com.progrestar.game.map.objects.buildings.*;
import com.progrestar.game.unit.model.*;
import com.progrestar.game.world.location.*;
import com.progrestar.game.world.location.map.*;
public class BattleBuildingInstance extends BattleObjectInstance implements IBuildingInstance
{
private var _interactive:InteractiveMapObject;
private var _flip:Boolean;
private var _completed:Boolean;
private var _selected:Boolean;
private var _level:int = 0;
private var _signal:BuildingSignal;
private var _effect:BuildingEffectState;
public function BattleBuildingInstance(param1:MapModel, param2:BuildingDto)
{
_interactive = new InteractiveMapObject();
_signal = new BuildingSignal();
_flip = param2.flip;
_completed = param2.completed;
_level = param2.level;
var _loc_3:* = param1.battleController.battleData.desc.defender;
super(param1, param2.objectId, param2.typeId, param2.position, _loc_3.link.player, param1.battleController.battleData.desc.specs);
_effect = new BuildingEffectState(_signal.effects);
_signal.stateChanged = stateChanged as ConstantSignal;
_signal.hpReduced = hpChanged as ConstantSignal;
return;
}// end function
public function get focusChanged() : ConstantSignal
{
return _interactive.focusChanged;
}// end function
public function get selectChanged() : ConstantSignal
{
return _interactive.selectChanged;
}// end function
override public function release() : void
{
super.release();
_interactive.release();
_interactive = null;
_signal.release();
_signal = null;
_effect.release();
_effect = null;
return;
}// end function
public function getRecoveryTimeLeft() : Number
{
return 0;
}// end function
public function set selected(param1:Boolean) : void
{
if (_selected == param1)
{
return;
}
_selected = param1;
signal.selected.dispatch();
return;
}// end function
override public function setAttackTarget(param1:BattleObjectInstance) : void
{
if (param1 != null)
{
if (libItem.isTurret)
{
setDirection(Direction.getDirection(area.centerX, area.centerY, param1.area.centerX, param1.area.centerY));
}
}
super.setAttackTarget(param1);
return;
}// end function
public function get flip() : Boolean
{
return _flip;
}// end function
public function get effect() : BuildingEffectState
{
return _effect;
}// end function
public function get signal() : BuildingSignal
{
return _signal;
}// end function
public function get flipChanged() : ISignal
{
return _signal.flipChanged;
}// end function
public function get positionChanged() : ISignal
{
return _signal.positionChanged;
}// end function
public function get built() : Boolean
{
return _completed;
}// end function
public function get level() : int
{
return _level;
}// end function
public function get factory() : ProductionFactory
{
return null;
}// end function
public function get location() : LocationLink
{
return map.battleController.battleData.desc.defender.link;
}// end function
public function get libItem() : BuildingLibItem
{
return libData as BuildingLibItem;
}// end function
public function get levelLibItem() : BuildingLevelLibItem
{
return levelData as BuildingLevelLibItem;
}// end function
override public function getAttackPower(param1:BattleObjectInstance) : int
{
return _specsCache.getBuildingAttack(this, param1 as BattleUnitInstance);
}// end function
public function get isWall() : Boolean
{
return typeLabel == "wall";
}// end function
override protected function updateLibs() : void
{
if (levelData != null)
{
return;
}
var _loc_2:* = BuildingLib.instance.getById(typeId);
var _loc_3:* = BuildingLevelLib.instance.getByTypeId(typeId, _level);
Assert.isTrue(_loc_2 && _loc_3, "Невалидный объект строения: id" + typeId + "level:" + _level);
var _loc_1:* = _specsCache.getBuildingHealth(_loc_3);
setData(_loc_2, _loc_3, _loc_1, _loc_3.attackData.attack * _loc_3.attackData.recharge);
setDirection(_loc_2.isTurret ? (Direction.getRandomDirection()) : (1));
return;
}// end function
public function get clientObjectId() : int
{
return id;
}// end function
}
}
code 2
package com.progrestar.game.fight.building
{
import com.progrestar.cas.signal.*;
import com.progrestar.common.util.*;
import com.progrestar.common.util.abstract.types.*;
import com.progrestar.game.data.*;
import com.progrestar.game.fight.core.*;
import com.progrestar.game.fight.dto.*;
import com.progrestar.game.lib.*;
import com.progrestar.game.lib.building.*;
import com.progrestar.game.map.objects.buildings.*;
import com.progrestar.game.unit.model.*;
import com.progrestar.game.world.location.*;
import com.progrestar.game.world.location.map.*;
public class BattleBuildingInstance extends BattleObjectInstance implements IBuildingInstance
{
private var _interactive:InteractiveMapObject;
private var _flip:Boolean;
private var _completed:Boolean;
private var _selected:Boolean;
private var _level:int = 0;
private var _signal:BuildingSignal;
private var _effect:BuildingEffectState;
public function BattleBuildingInstance(param1:MapModel, param2:BuildingDto)
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//5d c1 6e
_as3_findpropstrict com.progrestar.game.data::InteractiveMapObject
//4a c1 6e 00
_as3_constructprop com.progrestar.game.data::InteractiveMapObject(param count:0)
//5e e6 8c 01
_as3_findproperty com.progrestar.game.fight.building:BattleBuildingInstance::_interactive
//2b
_as3_swap
//61 e6 8c 01
_as3_setproperty com.progrestar.game.fight.building:BattleBuildingInstance::_interactive
//5d e0 3d
_as3_findpropstrict com.progrestar.game.map.objects.buildings::BuildingSignal
//4a e0 3d 00
_as3_constructprop com.progrestar.game.map.objects.buildings::BuildingSignal(param count:0)
//5e ec 8c 01
_as3_findproperty com.progrestar.game.fight.building:BattleBuildingInstance::_signal
//2b
_as3_swap
//61 ec 8c 01
_as3_setproperty com.progrestar.game.fight.building:BattleBuildingInstance::_signal
//d2
_as3_getlocal <2>
//66 e5 24
_as3_getproperty flip
//5e e8 8c 01
_as3_findproperty com.progrestar.game.fight.building:BattleBuildingInstance::_flip
//2b
_as3_swap
//61 e8 8c 01
_as3_setproperty com.progrestar.game.fight.building:BattleBuildingInstance::_flip
//d2
_as3_getlocal <2>
//66 22
_as3_getproperty completed
//5e e9 8c 01
_as3_findproperty com.progrestar.game.fight.building:BattleBuildingInstance::_completed
//2b
_as3_swap
//61 e9 8c 01
_as3_setproperty com.progrestar.game.fight.building:BattleBuildingInstance::_completed
//d2
_as3_getlocal <2>
//66 8b 07
_as3_getproperty level
//5e eb 8c 01
_as3_findproperty com.progrestar.game.fight.building:BattleBuildingInstance::_level
//2b
_as3_swap
//61 eb 8c 01
_as3_setproperty com.progrestar.game.fight.building:BattleBuildingInstance::_level
//d1
_as3_getlocal <1>
//66 88 21
_as3_getproperty battleController
//66 8a 21
_as3_getproperty battleData
//66 8e 21
_as3_getproperty desc
//66 df 5c
_as3_getproperty com.progrestar.game.fight.dto:IBattleDesc::defender
//80 ed 76
_as3_coerce com.progrestar.game.fight.dto::IUserDesc
//d7
_as3_setlocal <3>
//d0
_as3_getlocal <0>
//d1
_as3_getlocal <1>
//d2
_as3_getlocal <2>
//66 f1 63
_as3_getproperty objectId
//d2
_as3_getlocal <2>
//66 f1 6d
_as3_getproperty typeId
//d2
_as3_getlocal <2>
//66 f0 05
_as3_getproperty position
//d3
_as3_getlocal <3>
//66 eb 42
_as3_getproperty com.progrestar.game.fight.dto:IUserDesc::link
//66 93 2b
_as3_getproperty player
//d1
_as3_getlocal <1>
//66 88 21
_as3_getproperty battleController
//66 8a 21
_as3_getproperty battleData
//66 8e 21
_as3_getproperty desc
//66 ec 76
_as3_getproperty com.progrestar.game.fight.dto:IBattleDesc::specs
//49 06
_as3_constructsuper (param count:6)
//5d df 3d
_as3_findpropstrict com.progrestar.game.world.location.map::BuildingEffectState
//60 ec 8c 01
_as3_getlex com.progrestar.game.fight.building:BattleBuildingInstance::_signal
//66 f3 08
_as3_getproperty effects
//4a df 3d 01
_as3_constructprop com.progrestar.game.world.location.map::BuildingEffectState(param count:1)
//5e ed 8c 01
_as3_findproperty com.progrestar.game.fight.building:BattleBuildingInstance::_effect
//2b
_as3_swap
//61 ed 8c 01
_as3_setproperty com.progrestar.game.fight.building:BattleBuildingInstance::_effect
//60 ec 8c 01
_as3_getlex com.progrestar.game.fight.building:BattleBuildingInstance::_signal
//60 fc 3d
_as3_getlex stateChanged
//60 97 07
_as3_getlex com.progrestar.cas.signal::ConstantSignal
//87
_as3_astypelate
//61 fc 3d
_as3_setproperty stateChanged
//60 ec 8c 01
_as3_getlex com.progrestar.game.fight.building:BattleBuildingInstance::_signal
//60 b4 72
_as3_getlex hpChanged
//60 97 07
_as3_getlex com.progrestar.cas.signal::ConstantSignal
//87
_as3_astypelate
//61 e2 6f
_as3_setproperty hpReduced
//47
_as3_returnvoid
}// end function
public function get focusChanged() : ConstantSignal
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//60 e6 8c 01
_as3_getlex com.progrestar.game.fight.building:BattleBuildingInstance::_interactive
//66 c3 3d
_as3_getproperty focusChanged
//48
_as3_returnvalue
}// end function
public function get selectChanged() : ConstantSignal
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//60 e6 8c 01
_as3_getlex com.progrestar.game.fight.building:BattleBuildingInstance::_interactive
//66 c4 3d
_as3_getproperty selectChanged
//48
_as3_returnvalue
}// end function
override public function release() : void
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//d0
_as3_getlocal <0>
//4e ff 06 00
_as3_callsupervoid release(param count:0)
//60 e6 8c 01
_as3_getlex com.progrestar.game.fight.building:BattleBuildingInstance::_interactive
//4f ff 06 00
_as3_callpropvoid release(param count:0)
//20
_as3_pushnull
//5e e6 8c 01
_as3_findproperty com.progrestar.game.fight.building:BattleBuildingInstance::_interactive
//2b
_as3_swap
//61 e6 8c 01
_as3_setproperty com.progrestar.game.fight.building:BattleBuildingInstance::_interactive
//60 ec 8c 01
_as3_getlex com.progrestar.game.fight.building:BattleBuildingInstance::_signal
//4f ff 06 00
_as3_callpropvoid release(param count:0)
//20
_as3_pushnull
//5e ec 8c 01
_as3_findproperty com.progrestar.game.fight.building:BattleBuildingInstance::_signal
//2b
_as3_swap
//61 ec 8c 01
_as3_setproperty com.progrestar.game.fight.building:BattleBuildingInstance::_signal
//60 ed 8c 01
_as3_getlex com.progrestar.game.fight.building:BattleBuildingInstance::_effect
//4f ff 06 00
_as3_callpropvoid release(param count:0)
//20
_as3_pushnull
//5e ed 8c 01
_as3_findproperty com.progrestar.game.fight.building:BattleBuildingInstance::_effect
//2b
_as3_swap
//61 ed 8c 01
_as3_setproperty com.progrestar.game.fight.building:BattleBuildingInstance::_effect
//47
_as3_returnvoid
}// end function
public function getRecoveryTimeLeft() : Number
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//24 00
_as3_pushbyte 0
//48
_as3_returnvalue
}// end function
public function set selected(param1:Boolean) : void
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//60 ea 8c 01
_as3_getlex com.progrestar.game.fight.building:BattleBuildingInstance::_selected
//d1
_as3_getlocal <1>
//14 01 00 00
_as3_ifne offset: 1
//47
_as3_returnvoid
//d1
_as3_getlocal <1>
//5e ea 8c 01
_as3_findproperty com.progrestar.game.fight.building:BattleBuildingInstance::_selected
//2b
_as3_swap
//61 ea 8c 01
_as3_setproperty com.progrestar.game.fight.building:BattleBuildingInstance::_selected
//60 a3 23
_as3_getlex signal
//66 fc 19
_as3_getproperty selected
//4f 97 01 00
_as3_callpropvoid dispatch(param count:0)
//47
_as3_returnvoid
}// end function
override public function setAttackTarget(param1:BattleObjectInstance) : void
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//d1
_as3_getlocal <1>
//20
_as3_pushnull
//13 33 00 00
_as3_ifeq offset: 51
//60 ea 12
_as3_getlex libItem
//66 e4 1d
_as3_getproperty isTurret
//12 29 00 00
_as3_iffalse offset: 41
//5d b1 72
_as3_findpropstrict setDirection
//60 9f 3e
_as3_getlex com.progrestar.common.util.abstract.types::Direction
//60 d6 07
_as3_getlex area
//66 b0 5f
_as3_getproperty com.progrestar.framework.core.types:IArea2D::centerX
//60 d6 07
_as3_getlex area
//66 b1 5f
_as3_getproperty com.progrestar.framework.core.types:IArea2D::centerY
//d1
_as3_getlocal <1>
//66 d6 07
_as3_getproperty area
//66 b0 5f
_as3_getproperty com.progrestar.framework.core.types:IArea2D::centerX
//d1
_as3_getlocal <1>
//66 d6 07
_as3_getproperty area
//66 b1 5f
_as3_getproperty com.progrestar.framework.core.types:IArea2D::centerY
//46 ee 8c 01 04
_as3_callproperty getDirection(param count:4)
//4f b1 72 01
_as3_callpropvoid setDirection(param count:1)
//d0
_as3_getlocal <0>
//d1
_as3_getlocal <1>
//4e a0 62 01
_as3_callsupervoid setAttackTarget(param count:1)
//47
_as3_returnvoid
}// end function
public function get flip() : Boolean
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//60 e8 8c 01
_as3_getlex com.progrestar.game.fight.building:BattleBuildingInstance::_flip
//48
_as3_returnvalue
}// end function
public function get effect() : BuildingEffectState
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//60 ed 8c 01
_as3_getlex com.progrestar.game.fight.building:BattleBuildingInstance::_effect
//48
_as3_returnvalue
}// end function
public function get signal() : BuildingSignal
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//60 ec 8c 01
_as3_getlex com.progrestar.game.fight.building:BattleBuildingInstance::_signal
//48
_as3_returnvalue
}// end function
public function get flipChanged() : ISignal
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//60 ec 8c 01
_as3_getlex com.progrestar.game.fight.building:BattleBuildingInstance::_signal
//66 fd 3d
_as3_getproperty flipChanged
//48
_as3_returnvalue
}// end function
public function get positionChanged() : ISignal
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//60 ec 8c 01
_as3_getlex com.progrestar.game.fight.building:BattleBuildingInstance::_signal
//66 fe 3d
_as3_getproperty positionChanged
//48
_as3_returnvalue
}// end function
public function get built() : Boolean
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//60 e9 8c 01
_as3_getlex com.progrestar.game.fight.building:BattleBuildingInstance::_completed
//48
_as3_returnvalue
}// end function
public function get level() : int
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//60 eb 8c 01
_as3_getlex com.progrestar.game.fight.building:BattleBuildingInstance::_level
//48
_as3_returnvalue
}// end function
public function get factory() : ProductionFactory
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//20
_as3_pushnull
//48
_as3_returnvalue
}// end function
public function get location() : LocationLink
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//60 ba 1b
_as3_getlex map
//66 88 21
_as3_getproperty battleController
//66 8a 21
_as3_getproperty battleData
//66 8e 21
_as3_getproperty desc
//66 df 5c
_as3_getproperty com.progrestar.game.fight.dto:IBattleDesc::defender
//66 eb 42
_as3_getproperty com.progrestar.game.fight.dto:IUserDesc::link
//48
_as3_returnvalue
}// end function
public function get libItem() : BuildingLibItem
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//60 ca 72
_as3_getlex libData
//60 88 12
_as3_getlex com.progrestar.game.lib.building::BuildingLibItem
//87
_as3_astypelate
//48
_as3_returnvalue
}// end function
public function get levelLibItem() : BuildingLevelLibItem
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//60 a1 62
_as3_getlex levelData
//60 e0 11
_as3_getlex com.progrestar.game.lib.building::BuildingLevelLibItem
//87
_as3_astypelate
//48
_as3_returnvalue
}// end function
override public function getAttackPower(param1:BattleObjectInstance) : int
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//60 c0 72
_as3_getlex com.progrestar.game.fight.core:BattleObjectInstance::_specsCache
//d0
_as3_getlocal <0>
//d1
_as3_getlocal <1>
//60 9c 6a
_as3_getlex com.progrestar.game.unit.model::BattleUnitInstance
//87
_as3_astypelate
//46 ef 8c 01 02
_as3_callproperty com.progrestar.game.fight.data:ISpecsCache::getBuildingAttack(param count:2)
//48
_as3_returnvalue
}// end function
public function get isWall() : Boolean
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//2c a3 53
_as3_pushstring "wall"
//60 c8 72
_as3_getlex typeLabel
//ab
_as3_equals
//48
_as3_returnvalue
}// end function
override protected function updateLibs() : void
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//60 a1 62
_as3_getlex levelData
//20
_as3_pushnull
//13 01 00 00
_as3_ifeq offset: 1
//47
_as3_returnvoid
//60 86 12
_as3_getlex com.progrestar.game.lib.building::BuildingLib
//66 99 01
_as3_getproperty instance
//60 f1 6d
_as3_getlex typeId
//46 e4 25 01
_as3_callproperty getById(param count:1)
//80 88 12
_as3_coerce com.progrestar.game.lib.building::BuildingLibItem
//d6
_as3_setlocal <2>
//60 f4 1d
_as3_getlex com.progrestar.game.lib.building::BuildingLevelLib
//66 99 01
_as3_getproperty instance
//60 f1 6d
_as3_getlex typeId
//60 eb 8c 01
_as3_getlex com.progrestar.game.fight.building:BattleBuildingInstance::_level
//46 be 44 02
_as3_callproperty getByTypeId(param count:2)
//80 e0 11
_as3_coerce com.progrestar.game.lib.building::BuildingLevelLibItem
//d7
_as3_setlocal <3>
//60 b5 01
_as3_getlex com.progrestar.common.util::Assert
//d2
_as3_getlocal <2>
//2a
_as3_dup
//12 03 00 00
_as3_iffalse offset: 3
//29
_as3_pop
//d3
_as3_getlocal <3>
//82
_as3_coerce_a
//2c 8d a3 01
_as3_pushstring "Невалидный объект строения: id"
//60 f1 6d
_as3_getlex typeId
//a0
_as3_add
//2c 8e a3 01
_as3_pushstring "level:"
//a0
_as3_add
//60 eb 8c 01
_as3_getlex com.progrestar.game.fight.building:BattleBuildingInstance::_level
//a0
_as3_add
//4f b6 01 02
_as3_callpropvoid isTrue(param count:2)
//60 c0 72
_as3_getlex com.progrestar.game.fight.core:BattleObjectInstance::_specsCache
//d3
_as3_getlocal <3>
//46 f0 8c 01 01
_as3_callproperty com.progrestar.game.fight.data:ISpecsCache::getBuildingHealth(param count:1)
//73
_as3_convert_i
//d5
_as3_setlocal <1>
//5d cb 72
_as3_findpropstrict com.progrestar.game.fight.core:BattleObjectInstance::setData
//d2
_as3_getlocal <2>
//d3
_as3_getlocal <3>
//d1
_as3_getlocal <1>
//d3
_as3_getlocal <3>
//66 81 25
_as3_getproperty attackData
//66 82 25
_as3_getproperty attack
//d3
_as3_getlocal <3>
//66 81 25
_as3_getproperty attackData
//66 aa 62
_as3_getproperty recharge
//a2
_as3_multiply
//4f cb 72 04
_as3_callpropvoid com.progrestar.game.fight.core:BattleObjectInstance::setData(param count:4)
//5d b1 72
_as3_findpropstrict setDirection
//d2
_as3_getlocal <2>
//66 e4 1d
_as3_getproperty isTurret
//12 0b 00 00
_as3_iffalse offset: 11
//60 9f 3e
_as3_getlex com.progrestar.common.util.abstract.types::Direction
//46 a0 3e 00
_as3_callproperty getRandomDirection(param count:0)
//10 03 00 00
_as3_jump offset: 3
//24 01
_as3_pushbyte 1
//82
_as3_coerce_a
//4f b1 72 01
_as3_callpropvoid setDirection(param count:1)
//47
_as3_returnvoid
}// end function
public function get clientObjectId() : int
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//60 a6 09
_as3_getlex id
//48
_as3_returnvalue
}// end function
}
}