具体命令的分析
来源:互联网 发布:蒲公英软件怎么用 编辑:程序博客网 时间:2024/06/08 01:49
var _local6:Command;
if (_arg1){
if ((_arg1 is Class)){
_local6 = (new (_arg1)() as Command);
} else {
_local6 = (_arg1 as Command);
};
_local6.body = _arg2;
this._listeners[_local6] = {};
if (_arg3 != null){
this._listeners[_local6].complete = _arg3;
_local6.addEventListener(CommandEvent.COMPLETE, _arg3, false, _arg5, true);
};
if (_arg4 != null){
this._listeners[_local6].error = _arg4;
_local6.addEventListener(CommandEvent.ERROR, _arg4, false, _arg5, true);
};
};
_local6.addEventListener(CommandEvent.COMPLETE, this.handleCommandEvents, false, _arg5, true);
_local6.addEventListener(CommandEvent.ERROR, this.handleCommandEvents, false, _arg5, true);
_local6.execute();
}
public function harvest(_arg1:int):void{
var onSuccess:* = null;
var onFailed:* = null;
var index:* = _arg1;
onSuccess = function (_arg1:QFAEvent):void{
var _local6:int;
var _local7:*;
_requesting = false;
var _local2:String = (_arg1.data as String);
if ((((_local2 == null)) || ((_local2 == "")))){
return;
};
var _local3:Object = JSON.decode(_local2);
var _local4:DataEvent;
if ((((_local3 == null)) || ((_local3["code"] == 0)))){
_local4 = new DataEvent(EVENT_HARVEST_ERROR);
if (_local3["farmlandIndex"] != undefined){
_local4.data = _local3["farmlandIndex"].toString();
};
dispatchEvent(_local4);
return;
};
if (_local3["status"] != undefined){
_local6 = (_local3["farmlandIndex"] as int);
if ((((_local6 < 0)) || ((_local6 >= _farmJson["farmlandStatus"]["length"])))){
return;
};
_local7 = _farmJson["farmlandStatus"][_local6];
updateLandStatus(_local7, _local3["status"]);
_local4 = new DataEvent(EVENT_HARVEST);
_local4.data = ((_local6.toString() + ",") + _local3["harvest"].toString());
dispatchEvent(_local4);
};
var _local5:Object = (_farmJson["user"] as Object);
if (_local3["money"] != undefined){
_local5["money"] = (_local5["money"] + _local3["money"]);
};
if (_local3["exp"] != undefined){
_local5["exp"] = (_local5["exp"] + _local3["exp"]);
};
};
onFailed = function (_arg1:QFAEvent):void{
_requesting = false;
};
if ((((index < 0)) || ((index >= 24)))){
return;
};
if ((((this._farmJson == null)) || ((this._requesting == true)))){
return;
};
var me:* = (this._farmJson["user"] as Object);
if (me == null){
return;
};
var harvest:* = new CmdHttpRequest();
var postValue:* = {
ownerId:me["uId"],
place:index,
tName:me["userName"],
fName:me["userName"]
};
var url:* = "";
var st:* = Settings.getInstance();
var mode:* = st.mode;
if (mode == "qplus"){
mode = "qzone";
};
var version:* = mode;
if (version == "qzone"){
version = "qzone.qq";
} else {
if (version == "xiaoyou"){
version = st.xymode;
};
};
url = (("http://nc." + version) + ".com/cgi-bin/cgi_farm_plant?mod=farmlandstatus&act=harvest");
url = QzoneJSAPI.addGToken(url);
CommandManager.getInstance().run(harvest, {
url:url,
method:"post",
params:postValue,
complete:onSuccess,
error:onFailed
});
this._requesting = true;
- 具体命令的分析
- __SWI的具体分析
- 命令模式的具体应用
- container_of 宏的具体分析
- 循环队列的具体分析
- Bitmap header的具体分析
- 具体问题具体分析
- 【洛谷P1268】树的重量 具体问题具体分析
- PING命令中TTL的具体含义
- linux下ulimit命令的具体作用
- linux下ulimit命令的具体作用
- PING命令中TTL的具体含义
- PING命令中TTL的具体含义
- vi的具体使用方法与命令
- 黑客常用的DOS命令具体讲解
- cat命令的具体实现代码
- more和less命令的具体区别
- 第三周:具体命令的学习
- 探索Java语言与JVM中的Lambda表达式
- Android listview更改选中时item背景色
- linux查看java jdk安装路径和设置环境变量
- linux内核启动地址 解压缩 启动参数
- ADO 与ADO.NET两种数据访问方式区别
- 具体命令的分析
- ANT简明教程
- WinForm TreeView杂记
- Ext JS4百强应用:store的常用操作 --第9强
- excel文件总是提示“内存不足,无法打开excel,请关闭其他应用程序再试。”解决办法
- 斯坦福机器学习公开课笔记(十五)--[应用]照片OCR技术
- 第三方或自己开发的apk文件编译到系统文件(system.img)中的方法!!!!!
- 【jiasuba】驱动人生2008 一款免费的驱动管理软件
- android基础 - JSON数据解析