本帖最后由 wxiong1984 于 2009-10-30 13:56 编辑
感谢【傱今苡後】提供的QQ号码。
首先我们测试带有BUG的牧场放蚊子
发现post地址为:newmc.php?mod=cgi_demolish_pasture
post了以下内容:
farmTime 1256805954 //时间
num 2 //这是放的蚊子数目
type 1
uId 1 //用户ID
返回信息:没有收集到。
接下来测试了正常的牧场放蚊子
post地址为:xxxxxxxxxxxxxxxxxx/cgi-bin/cgi_demolish_pasture
post了以下内容:
farmTime 1256805005
num 1
type 1
uId 123456
放蚊子的返回信息:
{"cId":1,"leftnum":24,"num":1,"total":1}
需要控制的内容 leftnum 可能这个事坐标,多次测试发现值应该为11,12,13,14 21,22,23,24 total:改用户一共牧场里已经有几只蚊子
接下来多次尝试放蚊子,发现以下内容
farmTime 1256805005
num 7 //7只蚊子
type 1
uId 123456
{"cId":1,"leftnum":11,"num":7,"total":8}
这里当快速点击防蚊子的时候,FLASH不是每次提交的,而是把数据记录下来再一起提交的。这个没什么大关系,反正有值传过来的
接下来,我们测试了正常的拍蚊子:
post地址为:xxxxxxxxxxxxxxxxxx/cgi-bin/cgi_help_pasture
farmTime 1256805456
num 1
pos 1
type 1
uId 123456
拍死蚊子的返回信息:
{"addExp":0,"cId":1,"num":1,"pos":1}
//addexp 增加经验值 num:拍死的数目
待编辑。。。。
需要讨论的问题:
1,不知道蚊子会不会影响动物的生长
2,蚊子的数据放到哪里(这点很重要,要控制在启动时界面里能显示出来)
3,放文字和拍蚊子对朋友和自己分别得积分以及其他影响
4,控制每天一共放蚊子的数量(和积分挂钩就必须要这点)
5,放蚊子和拍蚊子产生的牧场日志
。
。
。
突然想起了蚊子的显示问题,我们要再回去研究一下进入用户界面显示出动物,蚊子等的地方
http://mc.qzone.qq.com/cgi-bin/cgi_enter?
farmTime 1256809283
flag 1
uId 123456
蚊子4只,左右各两:
- {"a":1,"animal":[{"buyTime":1256777359,"cId":1005,"growTime":31923,"growTimeNext":5877,"hungry":0,"serial":1,"status":1,"statusNext":2,"totalCome":0},{"buyTime":1256691841,"cId":1503,"growTime":117441,"growTimeNext":31753,"hungry":0,"serial":2,"status":5,"statusNext":3,"totalCome":10},{"buyTime":1256516980,"cId":1005,"growTime":292302,"growTimeNext":9061,"hungry":0,"serial":3,"status":5,"statusNext":3,"totalCome":0},{"buyTime":1256691841,"cId":1503,"growTime":117441,"growTimeNext":31750,"hungry":0,"serial":4,"status":5,"statusNext":3,"totalCome":10},{"buyTime":1256516980,"cId":1005,"growTime":292302,"growTimeNext":9056,"hungry":0,"serial":5,"status":5,"statusNext":3,"totalCome":0},{"buyTime":1256656936,"cId":1503,"growTime":152346,"growTimeNext":31747,"hungry":0,"serial":6,"status":5,"statusNext":3,"totalCome":10},{"buyTime":1256777359,"cId":1005,"growTime":31923,"growTimeNext":5877,"hungry":0,"serial":7,"status":1,"statusNext":2,"totalCome":0}],"animalFood":144,"badinfo":[{"mynum":0,"num":4,"type":1}],"c":0,"items":{"1":{"itemId":10111},"2":{"itemId":10222},"3":{"itemId":10331},"4":{"itemId":10441}},"stealflag":{"1005":0,"1503":3},"task":{"taskFlag":0,"taskId":10},"user":{"exp":7539,"money":164523,"uId":123456}}
复制代码 没有蚊子:
- {"a":1,"animal":[{"buyTime":1256130654,"cId":1005,"growTime":313200,"growTimeNext":0,"hungry":0,"serial":1,"status":6,"statusNext":6,"totalCome":0},{"buyTime":1256544815,"cId":1005,"growTime":128927,"growTimeNext":29486,"hungry":0,"serial":2,"status":5,"statusNext":3,"totalCome":28},{"buyTime":1256544821,"cId":1503,"growTime":100127,"growTimeNext":22281,"hungry":0,"serial":3,"status":5,"statusNext":3,"totalCome":14},{"buyTime":1256544821,"cId":1503,"growTime":100127,"growTimeNext":22279,"hungry":0,"serial":4,"status":5,"statusNext":3,"totalCome":14},{"buyTime":1256130662,"cId":1503,"growTime":230400,"growTimeNext":57600,"hungry":1,"serial":6,"status":3,"statusNext":6,"totalCome":7}],"animalFood":2,"badinfo":[{"mynum":0,"num":0,"type":1}],"c":0,"items":{"1":{"itemId":10111},"2":{"itemId":10221},"3":{"itemId":10331},"4":{"itemId":10441}},"stealflag":{"1005":2,"1503":2},"task":{"taskFlag":0,"taskId":10},"user":{"exp":7491,"money":39507,"uId":123456}}
复制代码 大家一起分析吧
答案找到了:显示蚊子的返回信息
"badinfo":[{"mynum":0,"num":4,"type":1}],
//num 地里有几只蚊子
接下来:
接受放蚊子信息,操作数据库,加分加经验控制,写入日志
接受拍蚊子信息,操作数据库,加分加经验控制,写入日志
在if ( $_REQUEST['mod'] == "cgi_enter" || $_REQUEST['mod'] == "cgi_enter?" )里添加输出"badinfo":[{"mynum":0,"num":4,"type":1}],的过程- //放蚊子
- if ( $_REQUEST['mod'] == "cgi_demolish_pasture" )
- {
- //这里主要是写接受数据并处理数据
- echo "放蚊子返回信息";
- }
- //拍蚊子
- if ( $_REQUEST['mod'] == "cgi_help_pasture" )
- {
- //这里主要是写接受数据并处理数据
- echo "拍蚊子返回信息";
- }
- if ( $_REQUEST['mod'] == "cgi_enter" || $_REQUEST['mod'] == "cgi_enter?" )
- {
- //这里主要是写接受数据并处理数据
- echo "显示蚊子返回信息";
- }
复制代码 大家有不同建议的,以及愿意写修复代码的,都参与一下,有人决定写了就在此帖表明一下,免得许多人做重复工作。
最新编辑:
增加了一点注释
以上内容了应用软件:httpwatch6.0破解版 进行分析的
████【开心农场】牧场放蚊子BUG已完成--BY-残月
------BY 残月 QQ:40700507
QQ群号:30042275
欢迎各类IT精英加入本群。
本人其他帖子:
【开心农场】牧场放蚊子BUG已完成--BY-残月 https://discuz.dismall.com/viewth ... p;extra=&page=1
【开心农场】牧场放蚊子BUG修复分析帖--BY-残月 https://discuz.dismall.com/thread-1464123-1-1.html
【本地农场】==【昼夜奋战解决了狗不咬人的问题】== https://discuz.dismall.com/thread-1462082-1-2.html
【本地农场】【unescape码加密与解密】https://discuz.dismall.com/thread-1460043-1-1.html
【开心农场】修复交流贴=【已修复牧场反复偷取的问题-】https://discuz.dismall.com/thread-1461663-1-1.html
【开心农场】牧场放蚊子BUG修复分析帖https://discuz.dismall.com/thread-1464123-1-1.html
【httpwatch6.0破解版下载】https://discuz.dismall.com/thread-1464257-1-1.html
实现附带版权的【站内日志转载】功能【增加了图片转载】https://discuz.dismall.com/thread-1451760-1-1.html |