关于网狐架设的游戏服务启动时的数据库错误提示!80分 [问题点数:80分,结帖人ywx41769]

Bbs1
本版专家分:0
结帖率 100%
Bbs4
本版专家分:1582
Bbs8
本版专家分:42492
Blank
红花 2010年7月 C/C++大版内专家分月排行榜第一
2010年6月 C/C++大版内专家分月排行榜第一
2010年4月 C/C++大版内专家分月排行榜第一
Blank
蓝花 2010年5月 C/C++大版内专家分月排行榜第三
2010年3月 C/C++大版内专家分月排行榜第三
2010年1月 C/C++大版内专家分月排行榜第三
遇到“无效的授权说明”这种错误问题的兄弟来一下! 已经找了大把贴子了,没有能解决的
用vb连接sqlserver2000,用以下语句能正常访问: cn.Open "Provider=SQLOLEDB;Data Source=localhost;User ID=sa;Password=
网狐游戏启动失败
表没打开
网狐服务组件加载失败,创建游戏房间失败的原因之一
<em>网狐</em>创建<em>服务</em>端报<em>服务</em>组件加载失败,创建<em>游戏</em>房间失败的原因之一 报错如下图 解决方法:配置子<em>游戏</em>的工程属性,如下图: 1、首先要确保子<em>游戏</em>的字符集和框架是一样的 2、把c/c++下面的预处理删掉unicode,如图
网狐游戏数据库文档
用户<em>数据库</em>:QPAccountsDB <em>数据库</em>内容: 存储用户相关的全局信息,包括用户的 ID 号码、账号名字、昵称、登录密码、二级密码、头像(自定义头像)、经验数值、魅力数值、<em>游戏</em>的管理权限、登录次数、注册地址、最后登录地址等用户属性信息。还包括是否允许登录,IP限制,<em>游戏</em>ID的保留与分配等表。 <em>数据库</em>表结构: 表AccountsFace(用户自定义头像表) 该表用于存放用户自定义图像和上传图像的时候相关资料 由以下字段组成:  ID:用户自定义头像的记录索引。自增长主键  UserID:使用该头像的用户的UserID  CustomFace:用户自定义头像(由程序转换为2进制保存)  InsertTime:用户上传该头像的时间  InsertAddr:用户上传该头像的IP地址  InsertMachine:用户上传该头像所用电脑的机器码
网狐棋牌游戏服务网狐客户端 网狐数据库 网狐架设文档 ---数据库下载
最近总是有人问我要<em>网狐</em>棋牌<em>游戏</em>,我在这里给大家提供下载。 欢迎加我的QQ进行棋牌技术交流:149086705 先解压<em>数据库</em>压缩包,执行<em>数据库</em>脚本中的一键安装,之后附加<em>游戏</em><em>数据库</em>,把平台 <em>服务</em>端 客户端压缩包文件全部解压放在一个目录即可以按照文档说明进行<em>架设</em>了。 现在开源真是大势所趋,开源正以爆炸的速度传播着IT业的新技术,开源比封闭源代码更能加速社会创新,开源是新生代的商业模式,唯有开源才能更快更强更好的占领市场,开源改变了旧有的商业模式,催生了新的商业模式,改变了过去以卖产品的方式向以卖<em>服务</em>的方式,加速了产品推广上市的进程,对于一个菜鸟来说,加速了学习进入的门槛,对于市场加剧了竞争更加白热化,让每一个Actor们整天感觉到总有一张无形的鞭子时时刻刻总在催促着研发->创新->生产->上市->研发->->创新->生产->上市,在这个时代不在让人感觉到辛辛苦苦开发了一个新产品就可以永远坐享其成了,而要不断创新不断加速跑!让社会上的每个个体力量缩短了从不会到成专家的时间,让社会的每个个体都最大限度了投入到了市场竞争产品竞争研发竞争中,开源让每个Actor的压力加大,故能开发每个个体的创新力量,你不免要说这样的话会导致市场混乱,竞争无序,无法培育集团力量,很难做大做强,但是弊端可以避免,可以控制,大企业没有利润,可以不介入而选择高端的基础研发或者是大投入高风险高回报,通过整合兼并,收购等方式,社会无论怎么运行,最终每个行业总会出现向微软这样的巨人企业,这不仅仅是政府能够管制得了的,不是发几个钱所能完事的,垄断会永远存在,垄断也能加速社会进步,竞争白热化也能加速创新,各有各的长,各有各的短,微软很成功,linux也有伟大,微软是linux的假想敌永远存在,linux是微软永不堕落的一个无形的鞭子,正因为两个阵营的永远存在世界才有如此的精彩! 但是对于我们菜鸟新手,刚入门的时候分析一些现在正在应用的开源的商业程序,能够快速的融入市场竞争,因为你会大大的降低学习成本,大大缩短学习光阴,<em>网狐</em>源码带给我们的不仅仅是一个产品,更是上万元的高额的培训费用所不能买到的实战经验,学习C++从<em>网狐</em>源码开始!我很感谢现代社会,开源社会!一个资源无穷丰富的社会! 现在的编程语言经过这么多年的发展,大浪淘沙,C++更加稳固你不可替代的地位,c++因为其是C语言的扩展这一特性,C和C++因为是各种操作系统的语言,以其最紧密的兼容操作系统,所以其永远不会过时,无论编程语言发展之初还是Java、Dotnet的FrameWork时代C++都显示了其强大的生命力,时代再变,而C++的地位永远不会变,无论操作系统是windows 2000 ,windows2003,windows xp,vista,windows7 都能很好的兼容,<em>网狐</em>采用的就是这种语言而被我推崇。<em>网狐</em>又以开源的豁达精神而引领各大棋牌<em>游戏</em>、棋牌软件厂商,显示出了强大的生命力,在这个开源共享,加速成长的软件即<em>服务</em>的时代,开源必胜! 现在的开源到了总爆发的时刻,更受到经济危机的推波助澜,开源与自由总是紧密相连,追求自由是历史的潮流,任何人都不可能改变的,linux是伟大的,那么<em>网狐</em>也是伟大的,基于此考虑<em>网狐</em>下个版本已经开始设计跨平台了,<em>网狐</em>现在请了Linux<em>服务</em>端高人正在设计,未来开源之势更加愈演愈烈,这个世界真是越来越疯狂了,让我们拭目以待吧!
网狐游戏 五子棋游戏
<em>网狐</em><em>游戏</em>6.6版本 五子棋<em>游戏</em>组件代码
v6603网狐游戏服务启动配置方法
v6603<em>网狐</em><em>游戏</em><em>服务</em>启动配置方法
研究网狐读取数据库字段
最近在研究<em>网狐</em>如何从<em>数据库</em>读取到想要的字段,主要针对的是在线时长PlayTimeCount,想通过该值来制作一个玩家达到一定<em>游戏</em>时长,就可以获得一次抽奖机会的效果。 一、首先从代码入手,查找关键字PlayTimeCount,发现只有读取到客户端的数据,存储到TreasureDB<em>数据库</em>中,并且他还有分为<em>游戏</em>在线总时长存储在表GameScoreInfo和每次在线时长存储在表RecordDra
网狐棋牌数据库完整文件
<em>网狐</em><em>数据库</em>完整的文件
项目启动是服务器报错和数据库连接不上
-
游戏服务器与客户端数据同步问题
如果一张地图上面有100个人,其中50个人在不停的移动,那<em>服务</em>器要把这50个人的坐标高频率的发送给100个客户端,是这样吗?100个人中,每个人都要发送50个人的坐标吗?
网狐登录出现尝试了所有的服务器都无法成功连接服务
-
网狐棋牌游戏服务网狐客户端 网狐数据库 网狐架设文档 --客户端3下载
最近总是有人问我要<em>网狐</em>棋牌<em>游戏</em>,我在这里给大家提供下载。 欢迎加我的QQ进行棋牌技术交流:149086705 先解压<em>数据库</em>压缩包,执行<em>数据库</em>脚本中的一键安装,之后附加<em>游戏</em><em>数据库</em>,把平台 <em>服务</em>端 客户端压缩包文件全部解压放在一个目录即可以按照文档说明进行<em>架设</em>了。 现在开源真是大势所趋,开源正以爆炸的速度传播着IT业的新技术,开源比封闭源代码更能加速社会创新,开源是新生代的商业模式,唯有开源才能更快更强更好的占领市场,开源改变了旧有的商业模式,催生了新的商业模式,改变了过去以卖产品的方式向以卖<em>服务</em>的方式,加速了产品推广上市的进程,对于一个菜鸟来说,加速了学习进入的门槛,对于市场加剧了竞争更加白热化,让每一个Actor们整天感觉到总有一张无形的鞭子时时刻刻总在催促着研发->创新->生产->上市->研发->->创新->生产->上市,在这个时代不在让人感觉到辛辛苦苦开发了一个新产品就可以永远坐享其成了,而要不断创新不断加速跑!让社会上的每个个体力量缩短了从不会到成专家的时间,让社会的每个个体都最大限度了投入到了市场竞争产品竞争研发竞争中,开源让每个Actor的压力加大,故能开发每个个体的创新力量,你不免要说这样的话会导致市场混乱,竞争无序,无法培育集团力量,很难做大做强,但是弊端可以避免,可以控制,大企业没有利润,可以不介入而选择高端的基础研发或者是大投入高风险高回报,通过整合兼并,收购等方式,社会无论怎么运行,最终每个行业总会出现向微软这样的巨人企业,这不仅仅是政府能够管制得了的,不是发几个钱所能完事的,垄断会永远存在,垄断也能加速社会进步,竞争白热化也能加速创新,各有各的长,各有各的短,微软很成功,linux也有伟大,微软是linux的假想敌永远存在,linux是微软永不堕落的一个无形的鞭子,正因为两个阵营的永远存在世界才有如此的精彩! 但是对于我们菜鸟新手,刚入门的时候分析一些现在正在应用的开源的商业程序,能够快速的融入市场竞争,因为你会大大的降低学习成本,大大缩短学习光阴,<em>网狐</em>源码带给我们的不仅仅是一个产品,更是上万元的高额的培训费用所不能买到的实战经验,学习C++从<em>网狐</em>源码开始!我很感谢现代社会,开源社会!一个资源无穷丰富的社会! 现在的编程语言经过这么多年的发展,大浪淘沙,C++更加稳固你不可替代的地位,c++因为其是C语言的扩展这一特性,C和C++因为是各种操作系统的语言,以其最紧密的兼容操作系统,所以其永远不会过时,无论编程语言发展之初还是Java、Dotnet的FrameWork时代C++都显示了其强大的生命力,时代再变,而C++的地位永远不会变,无论操作系统是windows 2000 ,windows2003,windows xp,vista,windows7 都能很好的兼容,<em>网狐</em>采用的就是这种语言而被我推崇。<em>网狐</em>又以开源的豁达精神而引领各大棋牌<em>游戏</em>、棋牌软件厂商,显示出了强大的生命力,在这个开源共享,加速成长的软件即<em>服务</em>的时代,开源必胜! 现在的开源到了总爆发的时刻,更受到经济危机的推波助澜,开源与自由总是紧密相连,追求自由是历史的潮流,任何人都不可能改变的,linux是伟大的,那么<em>网狐</em>也是伟大的,基于此考虑<em>网狐</em>下个版本已经开始设计跨平台了,<em>网狐</em>现在请了Linux<em>服务</em>端高人正在设计,未来开源之势更加愈演愈烈,这个世界真是越来越疯狂了,让我们拭目以待吧!
网狐棋牌游戏服务网狐客户端 网狐数据库 网狐架设文档 --工具与开发文档下载
最近总是有人问我要<em>网狐</em>棋牌<em>游戏</em>,我在这里给大家提供下载。 欢迎加我的QQ进行棋牌技术交流:149086705 先解压<em>数据库</em>压缩包,执行<em>数据库</em>脚本中的一键安装,之后附加<em>游戏</em><em>数据库</em>,把平台 <em>服务</em>端 客户端压缩包文件全部解压放在一个目录即可以按照文档说明进行<em>架设</em>了。 现在开源真是大势所趋,开源正以爆炸的速度传播着IT业的新技术,开源比封闭源代码更能加速社会创新,开源是新生代的商业模式,唯有开源才能更快更强更好的占领市场,开源改变了旧有的商业模式,催生了新的商业模式,改变了过去以卖产品的方式向以卖<em>服务</em>的方式,加速了产品推广上市的进程,对于一个菜鸟来说,加速了学习进入的门槛,对于市场加剧了竞争更加白热化,让每一个Actor们整天感觉到总有一张无形的鞭子时时刻刻总在催促着研发->创新->生产->上市->研发->->创新->生产->上市,在这个时代不在让人感觉到辛辛苦苦开发了一个新产品就可以永远坐享其成了,而要不断创新不断加速跑!让社会上的每个个体力量缩短了从不会到成专家的时间,让社会的每个个体都最大限度了投入到了市场竞争产品竞争研发竞争中,开源让每个Actor的压力加大,故能开发每个个体的创新力量,你不免要说这样的话会导致市场混乱,竞争无序,无法培育集团力量,很难做大做强,但是弊端可以避免,可以控制,大企业没有利润,可以不介入而选择高端的基础研发或者是大投入高风险高回报,通过整合兼并,收购等方式,社会无论怎么运行,最终每个行业总会出现向微软这样的巨人企业,这不仅仅是政府能够管制得了的,不是发几个钱所能完事的,垄断会永远存在,垄断也能加速社会进步,竞争白热化也能加速创新,各有各的长,各有各的短,微软很成功,linux也有伟大,微软是linux的假想敌永远存在,linux是微软永不堕落的一个无形的鞭子,正因为两个阵营的永远存在世界才有如此的精彩! 但是对于我们菜鸟新手,刚入门的时候分析一些现在正在应用的开源的商业程序,能够快速的融入市场竞争,因为你会大大的降低学习成本,大大缩短学习光阴,<em>网狐</em>源码带给我们的不仅仅是一个产品,更是上万元的高额的培训费用所不能买到的实战经验,学习C++从<em>网狐</em>源码开始!我很感谢现代社会,开源社会!一个资源无穷丰富的社会! 现在的编程语言经过这么多年的发展,大浪淘沙,C++更加稳固你不可替代的地位,c++因为其是C语言的扩展这一特性,C和C++因为是各种操作系统的语言,以其最紧密的兼容操作系统,所以其永远不会过时,无论编程语言发展之初还是Java、Dotnet的FrameWork时代C++都显示了其强大的生命力,时代再变,而C++的地位永远不会变,无论操作系统是windows 2000 ,windows2003,windows xp,vista,windows7 都能很好的兼容,<em>网狐</em>采用的就是这种语言而被我推崇。<em>网狐</em>又以开源的豁达精神而引领各大棋牌<em>游戏</em>、棋牌软件厂商,显示出了强大的生命力,在这个开源共享,加速成长的软件即<em>服务</em>的时代,开源必胜! 现在的开源到了总爆发的时刻,更受到经济危机的推波助澜,开源与自由总是紧密相连,追求自由是历史的潮流,任何人都不可能改变的,linux是伟大的,那么<em>网狐</em>也是伟大的,基于此考虑<em>网狐</em>下个版本已经开始设计跨平台了,<em>网狐</em>现在请了Linux<em>服务</em>端高人正在设计,未来开源之势更加愈演愈烈,这个世界真是越来越疯狂了,让我们拭目以待吧!
网狐荣耀棋牌搭建、架设技巧 游戏房间连接失败处理
棋牌<em>架设</em>中肯定会存在大大小小的难题,今天给大家分享在<em>架设</em>中出现 <em>游戏</em>房间连接失败处理,怎么处理。 输入帐号密码,能进入大厅,大厅下载<em>游戏</em>也正常,当子<em>游戏</em>下载安装完运行时候就提示上面的错误。 从后台找到客户端,又找到<em>服务</em>端也没解决。 无意中翻看<em>数据库</em>发现了解决方法。   打开<em>数据库</em>,QPPlatformDB--DataBaseInfo表 DBInfoID的值 和<em>服务</em>端的ServerPara
网狐游戏 牛牛游戏代码
<em>网狐</em><em>游戏</em>6.6版本 牛牛<em>游戏</em>代码里面包括<em>游戏</em>客户端和<em>服务</em>端
网狐游戏 诈金花游戏
<em>网狐</em><em>游戏</em>6.6版本 <em>游戏</em>客户组件诈金花<em>游戏</em>
网狐登录服务器与协调服务器连接问题
连接协调<em>服务</em>器后 过几秒自动断开与协调<em>服务</em>器的连接? 找了半天都不知道问题出在哪里,那位大神了解<em>网狐</em>6603这套源码,请帮我找找源因,因为我的源码是从网上到处找的也不知是不是内核引擎问题还是什么?
运行时,sa登录失败测试连接成功
运行时,sa登录失败测试连接成功
关于网狐6603的:游戏已经开始了,现在不能进入游戏桌。如何破解?
<em>网狐</em>一般<em>游戏</em>都有个时间限制,就是空闲时间,<em>游戏</em>时间和结算时间,但玩家只能在空闲时间方可进入<em>游戏</em>,其他时间都会弹出提示:<em>游戏</em>已经开始了,现在不能进入。 但对一个即玩即走的棋牌<em>游戏</em>来说,这样的限制对用户
Eclipse 启动 Server 出现 用户 'sa' 登录失败 怎么解决?
<em>错误提示</em>如下: -com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@d89019f -- Acquisition Attempt Fa
测试连接成功,运行显示’sa'登录失败
在VB6.0 中通过选择Microsoft Active Data Object 2.7Library,配置文件DSN,配置完测试是连接通的,但是在运行VB6.0访问时,显示实时错误,用户'sa'登录
网狐数据库
<em>网狐</em><em>数据库</em>
网狐牛牛游戏vs2003
<em>网狐</em>牛牛<em>游戏</em>vs2003
网狐游戏关系图
<em>网狐</em><em>游戏</em>关系图-+清晰+让你更加容易理解这个<em>游戏</em>的<em>架设</em>
网狐游戏安装教程十部
本教程是针对大部分网友关心的问题进行的讲解,不可能面面俱到,只起到一个引导作用,再深入的问题只能在使用过程中一点一点的摸索。我也是从一点也不知道这个程序到最后<em>架设</em>成功。我相信我们的网友的能力一定比我强。呵呵!有问题欢迎交流。
用户 'sa' 登录失败
用户 'sa' 登录失败。 说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Data.S
关于网狐游戏问题从账号登录不能进游戏
-
数据库引擎外挂服务启动失败是什么原因造成的?
这个有人知道怎么解决吗?我试过网上说的那些方法, TCP/IP 协议启用了,TCP:1433端口也添加了, 开启了SQL Server Browser<em>服务</em>, SQL Server也启用了TCP/IP和
网狐 中心服务器 ADO 错误:0x80004005,[DBNETLIB][ConnectionOpen (Connect()).]SQL Server 不存在或拒绝访问。【第二次修改13-11-2】
【 2012-12-0310:44:06 】ADO 错误:0x80004005,[DBNETLIB][ConnectionOpen(Connect()).]SQL Server 不存在或拒绝访问。 【 2012-12-0310:44:06 】<em>游戏</em>列表加载失败 【 2012-12-0310:44:06 】调度引擎外挂<em>服务</em>启动失败 【 2012-12-0310:44:06 】中心<em>服务</em>启动失败
数据库启动服务失败
E:\mysql-5.6.24-win32\bin>mysqld --console 2018-08-22 11:10:19 0 gethostname failed, using 'localhos
网狐游戏源码--斗地主
<em>网狐</em><em>游戏</em>源码,用VS NET 2003编译无错, 要全部的网站源码和<em>游戏</em>代码可加我QQ,898114195
网狐游戏内核
<em>网狐</em><em>游戏</em><em>服务</em>端打包工具,意见管理子<em>游戏</em>资源。稳定运营内核!
网狐游戏登陆异常
问题 :<em>网狐</em><em>游戏</em>登陆异常? 原因:客户端访问http与<em>服务</em>端地址不一致。 解决办法:访问网页地址,完全好使。设置端口,问题====解决。
关于架设电子邮件服务的问题
我想问一下在网站上提供自己的电子邮件<em>服务</em>,那些软件比较合适,具体怎么使用有没有人能不嫌麻烦的告诉我
调度程序初始化失败的原因
-
关于“[DBNETLIB][ConnectionWrite (send()).]General network error"的解决
最近需要用Excel生成一系列的图表,数据自然是通过sql server取得的。问题是这个excel有近50张图表,每个图表都要通过DB connection去取数据。问题来了,在refresh all的时候常常会遇到 “[DBNETLIB][ConnectionWrite (send()).]General network error. Check your network documen...
网狐 中心服务器 ADO 错误:0x80004005,[DBNETLIB]
<em>网狐</em> 中心<em>服务</em>器 ADO 错误:0x80004005,[DBNETLIB][ConnectionOpen (Connect()).]SQL Server 不存在或拒绝访问。 【 2013-12-0310:44:06 】ADO 错误:0x80004005,[DBNETLIB][ConnectionOpen(Connect()).]SQL Server 不存在或拒绝访问。 【 2013-12-
网狐棋牌,协调服务器打开便会报错
公司之前用的是vs2003,现在想升级成vs2013.我升级之后把一些错误改掉之后能生成成功了,但是三个<em>服务</em>器都打不开了是什么原因?
不是简单的“无效的授权说明”
用户已经在用的三层结构的系统在运行中<em>服务</em>器上出现严重问题,某个关键函数中的TADOQuery.Open失败,在系统日志中查到错误信息是 “无效的授权说明”。网上已经许多用户问过一样的问题,但答案都不符
网狐游戏源码C++
<em>网狐</em><em>游戏</em>源码 <em>游戏</em><em>服务</em>端源码 可以用来学习 C++
[网狐]游戏添加方法
李逵劈鱼为例 1.后台添加<em>游戏</em>,模块标识和<em>游戏</em>标识一直,标识不能随意修改只能默认 修改标识,容易出现 <em>服务</em>器加载组建失败,创建<em>游戏</em>房间失败 2。配置资源解析失败。请检查 <em>数据库</em>QPPlatformDB。DataBaseInfo中的DBUSER和DBPASSWORD用户名和密码不正确 缺少lkpy_config_ID.xml这个配置文件ID要与房间号码匹配
网狐荣耀版游戏启动时出现“正在初始化组件”启动失败
【 2017-11-10 08:35:33 】[ <em>游戏</em> ] 房间参数加载成功 【 2017-11-10 08:35:35 】正在初始化组件... 【 2017-11-10 08:36:41 】<em>服务</em>启动失败 【 2017-11-10 08:36:41 】<em>服务</em>停止成功 这样的问题有两个原因造成 一、开发库是否正确,不正确,重新生成开发库。 二、<em>游戏</em>kindid设置是否正确,不正确修改。 这两...
网狐游戏资料
<em>网狐</em><em>游戏</em><em>服务</em>器结构资料,入门帮助
2000启动时错误提示
为什么2000<em>启动时</em>老有<em>错误提示</em>(***程序初始化错误),如何删除掉呢??rn好象我也没有安装那个程序!!98下有个msconfg,2000下有什么类似的命令吗??
adoQuery执行Open的时候提示"无效的授权说明",ADOConn连接SQL2005
说明下; ADOConn 使用属性配置的ConnectionString 运行没有问题! 但是如果用代码给ADOConn 的ConnectionString 写进去连接信息,就抱错! 说明的是: 1)
无效的授权说明
无效的授权说明 当使用变量作为连接<em>数据库</em>的字符串时,可能会出现此类情况! 自动创建的窗体已经在连接<em>数据库</em>里的某个表,而<em>数据库</em>却还没有连接,就会出现此类情况! 将默认的连接<em>数据库</em>字符串保留在控件里,然后用ini文件里的字符串替换掉控件里的就行了....
SYBASE12启动时,出现错误提示
我把SYBASE11。5卸载后按上了SYBASE12,启动成功了,但是想进一步看MASTER,TMPDB等库时看不了,也没有任何提示。大家能帮帮忙吗?
windows2003关闭启动时错误提示
windows2003关闭<em>启动时</em>的<em>错误提示</em> ,是个小注册表。
Tomcat启动时出现的错误提示
请各位大虾帮忙看一下,rn这种提示,怎么解决?rn上午为止正常启动,所有web正常跑起来的,rn也没有改动什么地方,突然出现这种提示!!rnrn2008/05/14 14:35:48 org.apache.coyote.http11.Http11Protocol initrn情報: Coyote HTTP/1.1をポート9000で初期化しますrnサービス Tomcat-Standalone を起動しますrnApache Tomcat/4.1.30rnWebappClassLoader: validateJarFile(C:\JAVA\workspace\JB\WEB-INF\lib\servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.classrnlog4j:ERROR setFile(null,true) call failed.rnjava.io.FileNotFoundException: N:\WEB-INF\log\jb.log (指定されたパスが見つかりません。)rn at java.io.FileOutputStream.openAppend(Native Method)rn at java.io.FileOutputStream.(Unknown Source)rn at java.io.FileOutputStream.(Unknown Source)rn at org.apache.log4j.FileAppender.setFile(FileAppender.java:272)rn at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:151)rn at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:206)rn at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:247)rn at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:210)rn at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:140)rn at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:153)rn at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:415)rn at org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:384)rn at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:783)rn at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:666)rn at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:616)rn at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:584)rn at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:687)rn at jp.co.johso.log.SuperLogger.init(SuperLogger.java:91)rn at jp.co.johso.log.SuperLogger.checkInit(SuperLogger.java:619)rn at jp.co.johso.log.SuperLogger.info(SuperLogger.java:211)rn at org.sssr.business.common.role.RoleStarter.init(RoleStarter.java:72)rn at org.sssr.servlet.ContextStarter.contextInitialized(ContextStarter.java:66)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3276)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:3618)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:754)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363)rn at org.apache.catalina.core.StandardService.start(StandardService.java:497)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:512)rn at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)rn at org.apache.catalina.startup.Catalina.process(Catalina.java:180)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)rnlog4j:ERROR Either File or DatePattern options are not set for appender [DAILY].rnrole.xml Reading successrnロール制御を開始します。rnWebappClassLoader: validateJarFile(C:\JAVA\workspace\JB\WEB-INF\lib\servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.classrnlog4j:ERROR setFile(null,true) call failed.rnjava.io.FileNotFoundException: N:\WEB-INF\log\jb.log (指定されたパスが見つかりません。)rn at java.io.FileOutputStream.openAppend(Native Method)rn at java.io.FileOutputStream.(Unknown Source)rn at java.io.FileOutputStream.(Unknown Source)rn at org.apache.log4j.FileAppender.setFile(FileAppender.java:272)rn at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:151)rn at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:206)rn at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:247)rn at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:210)rn at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:140)rn at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:153)rn at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:415)rn at org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:384)rn at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:783)rn at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:666)rn at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:616)rn at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:584)rn at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:687)rn at jp.co.johso.log.SuperLogger.init(SuperLogger.java:91)rn at jp.co.johso.log.SuperLogger.checkInit(SuperLogger.java:619)rn at jp.co.johso.log.SuperLogger.info(SuperLogger.java:211)rn at org.sssr.business.common.role.RoleStarter.init(RoleStarter.java:72)rn at org.sssr.servlet.ContextStarter.contextInitialized(ContextStarter.java:66)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3276)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:3618)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:754)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363)rn at org.apache.catalina.core.StandardService.start(StandardService.java:497)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:512)rn at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)rn at org.apache.catalina.startup.Catalina.process(Catalina.java:180)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)rnlog4j:ERROR Either File or DatePattern options are not set for appender [DAILY].rnrole.xml Reading successrnロール制御を開始します。rn2008/05/14 14:36:06 org.apache.struts.util.PropertyMessageResources rn情報: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=truern2008/05/14 14:36:06 org.apache.struts.util.PropertyMessageResources rn情報: Initializing, config='org.apache.struts.action.ActionResources', returnNull=truern2008/05/14 14:36:07 org.apache.struts.util.PropertyMessageResources rn情報: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=truern2008/05/14 14:36:09 org.apache.coyote.http11.Http11Protocol startrn情報: Coyote HTTP/1.1をポート 9000 で起動しますrn2008/05/14 14:36:09 org.apache.jk.common.ChannelSocket initrn情報: JK2: ajp13 listening on /0.0.0.0:8009rn2008/05/14 14:36:09 org.apache.jk.server.JkMain startrn情報: Jk running ID=0 time=0/156 config=C:\JAVA\Tomcat 4.1\conf\jk2.propertiesrn
网狐316荣耀手机版架设
1 先按info文件夹教程配置好环境,这里主要提一下教程里面没有的2 cocos创建项目3 替换frameworks的文件,vs打开项目,在CocosProject.exe的class文件夹加入编译文件,添加相关路径,编译时QR_Encode.cpp\QrNode.cpp\QR_Encode.h\QrNode.h要转成utf-8格式,否则会报错。4 新建lua工程5 编译调试6 修改文件\clie...
网狐网络棋牌系统—架设录像2
<em>网狐</em> <em>架设</em> 教程 一共两个教程,安装步骤够详细了吧!
Win2KServer启动时错误提示:系统启动时至少有一个服务或启动程序启动时错误
查看系统事件,发现有两处<em>错误提示</em>日志:rn1。<em>服务</em>器的注册表关键字LanmanServer\Parameters 中的数值 MaxMpxCt 无效。该数值会被忽略,处理会继续进行。rn2。由于下列错误,hooksys <em>服务</em>启动失败: 系统找不到指定的路径。rnrn一次我在任务管理器中Kill一些进程,结果产生错误1和2。我查注册表没有找到MaxMpxCt。hooksys倒是查到一大堆,但是不知道是什么程序用的,因此不敢乱动。rn请问lanmanServer、hooksys是干什么用的?MaxMpxCt数值的用处?我该怎么解决上述的错误呢? rn
网狐游戏 四国军旗游戏代码
<em>网狐</em><em>游戏</em>.6版本 四国军旗<em>游戏</em>代码
网狐游戏 赖子斗地主游戏
<em>网狐</em><em>游戏</em>6.6版本 赖子斗地主<em>游戏</em>组件代码
80分扑克游戏
绿色完善的<em>80分</em>扑克<em>游戏</em>。无插件,安全的娱乐。
网狐游戏 关牌游戏组件
<em>网狐</em><em>游戏</em>6.6版本 <em>游戏</em>客户组件关牌<em>游戏</em>
网狐游戏大厅代码关系图
<em>网狐</em>棋牌<em>游戏</em>大厅的代码关系图 装这个软件也要了解的
网狐棋牌游戏跑得快游戏源码
#include "StdAfx.h" #include "TableFrameSink.h" ////////////////////////////////////////////////////////////////////////// //静态变量 const WORD CTableFrameSink::m_wPlayerCount=GAME_PLAYER; //<em>游戏</em>人数 const enStartMode CTableFrameSink::m_GameStartMode=enStartMode_FullReady; //开始模式 ////////////////////////////////////////////////////////////////////////// //构造函数 CTableFrameSink::CTableFrameSink() { //组件变量 m_pITableFrame=NULL; m_pGameServiceOption=NULL; return; } //析构函数 CTableFrameSink::~CTableFrameSink(void) { } //接口查询 void * __cdecl CTableFrameSink::QueryInterface(const IID & Guid, DWORD dwQueryVer) { QUERYINTERFACE(ITableFrameSink,Guid,dwQueryVer); QUERYINTERFACE_IUNKNOWNEX(ITableFrameSink,Guid,dwQueryVer); return NULL; } //初始化 bool __cdecl CTableFrameSink::InitTableFrameSink(IUnknownEx * pIUnknownEx) { //查询接口 ASSERT(pIUnknownEx!=NULL); m_pITableFrame=QUERY_OBJECT_PTR_INTERFACE(pIUnknownEx,ITableFrame); if (m_pITableFrame==NULL) return false; //获取参数 m_pGameServiceOption=m_pITableFrame->GetGameServiceOption(); ASSERT(m_pGameServiceOption!=NULL); return true; } //复位桌子 void __cdecl CTableFrameSink::RepositTableFrameSink() { TRACE("CTableFrameSink::RepositTableFrameSink"); return; } //开始模式 enStartMode __cdecl CTableFrameSink::GetGameStartMode() { return m_GameStartMode; } //<em>游戏</em>状态 bool __cdecl CTableFrameSink::IsUserPlaying(WORD wChairID) { return true; } //<em>游戏</em>开始 bool __cdecl CTableFrameSink::OnEventGameStart() { TRACE("OnEventGameStart"); //设置状态 m_pITableFrame->SetGameStatus(GS_PLAYING); int nIndex=m_GameLogic.StartANewGame(); for(int i=0;iSendUserData(pUser,MSG_SET_INITPISA,(void *)&tInit,sizeof(struct tagSetInitPisa)); m_pITableFrame->SendTableData(i,MSG_SET_INITPISA,(void *)&tInit,sizeof(struct tagSetInitPisa)); m_pITableFrame->SendLookonData(i,MSG_SET_INITPISA,(void *)&tInit,sizeof(struct tagSetInitPisa)); } //设置有黑桃3的人先出牌 struct tagSetFocus focus; focus.bClean=TRUE; focus.nFoucsId=nIndex; SendUserDataToAll(MSG_SET_FOCUS,(void *)&focus,sizeof(focus)); //清零最后的出牌记录 m_GameLogic.EmptyLastCardInfo(); return true; } //<em>游戏</em>结束 wChairID为最先出完的人 bool __cdecl CTableFrameSink::OnEventGameEnd(WORD wChairID, IServerUserItem * pIServerUserItem, BYTE cbReason) { switch (cbReason) { case GER_NORMAL: //常规结束 { //定义变量 struct tagGameEnd GameEnd; memset(&GameEnd,0,sizeof(GameEnd)); //变量定义 LONG lCellScore=m_pGameServiceOption->lCellScore; tagScoreInfo ScoreInfo[m_wPlayerCount]; memset(&ScoreInfo,0,sizeof(ScoreInfo)); //统计积分 for (WORD i=0;iwServerType&GAME_GENRE_GOLD) { if (GameEnd.lGameScore[wChairID]>=100L) { LONG lTax=GameEnd.lGameScore[wChairID]*m_pGameServiceOption->wRevenue/100L; GameEnd.lGameTax+=lTax; ScoreInfo[wChairID].lRevenue=lTax; GameEnd.lGameScore[wChairID]=GameEnd.lGameScore[wChairID]-lTax; } } //发送信息 SendUserDataToAll(MSG_GAME_END,&GameEnd,sizeof(GameEnd)); m_pITableFrame->SendLookonData(INVALID_CHAIR,MSG_GAME_END,&GameEnd,sizeof(GameEnd)); for (WORD i=0;i0L)?enScoreKind_Win:enScoreKind_Lost; m_pITableFrame->WriteUserScore(i,ScoreInfo[i].lScore,ScoreInfo[i].lRevenue,ScoreInfo[i].ScoreKind); } //m_pITableFrame->WriteTableScore(ScoreInfo,m_wPlayerCount,GameEnd.lGameTax); //结束<em>游戏</em> m_pITableFrame->ConcludeGame(); return true; } case GER_USER_LEFT: //用户强退 { //效验参数 ASSERT(pIServerUserItem!=NULL); ASSERT(wChairIDlCellScore;//逃跑扣20倍积分 //发送信息 SendUserDataToAll(MSG_GAME_END,&GameEnd,sizeof(GameEnd)); m_pITableFrame->SendLookonData(INVALID_CHAIR,MSG_GAME_END,&GameEnd,sizeof(GameEnd)); //修改积分 tagScoreInfo ScoreInfo; memset(&ScoreInfo,0,sizeof(ScoreInfo)); ScoreInfo.ScoreKind=enScoreKind_Draw; ScoreInfo.lScore=GameEnd.lGameScore[wChairID]; m_pITableFrame->WriteUserScore(wChairID,ScoreInfo.lScore,0L,ScoreInfo.ScoreKind); //结束<em>游戏</em> m_pITableFrame->ConcludeGame(); return true; } } ASSERT(FALSE); return false; } //发送场景 bool __cdecl CTableFrameSink::SendGameScene(WORD wChiarID, IServerUserItem * pIServerUserItem, BYTE bGameStatus, bool bSendSecret) { //TRACE("CTableFrameSink::SendGameScene:ChairID:%d,GameStatus:%d",wChiarID,bGameStatus); return m_pITableFrame->SendGameScene(pIServerUserItem,NULL,0); //效验结果 //ASSERT(FALSE); return true; //return false; } //定时器事件 bool __cdecl CTableFrameSink::OnTimerMessage(WORD wTimerID, WPARAM wBindParam) { return false; } //<em>游戏</em>消息处理 bool __cdecl CTableFrameSink::OnGameMessage(WORD wSubCmdID, const void * pDataBuffer, WORD wDataSize, IServerUserItem * pIServerUserItem) { TRACE("CTableFrameSink::OnGameMessage,SubCmdID:%d",wSubCmdID); //玩家提交的pass或者出牌操作 if (wSubCmdID==MSG_SET_OUTPISA) { ASSERT(wDataSize==sizeof(struct tagSetOutPisa)); if (wDataSize!=sizeof(struct tagSetOutPisa)) return false; struct tagSetOutPisa *pOut=(struct tagSetOutPisa *)pDataBuffer; ASSERT(pOut!=NULL); pOut->nChairId=pIServerUserItem->GetChairID(); TRACE("收到用户:%d的出牌消息\n",pOut->nChairId); //如果玩家pass if (pOut->nCount==0) { //如果是玩家开始出的牌,玩家不允许pass if (m_GameLogic.IsUserBegin(pOut->nChairId)) { //Pass出错,返回出错信息 struct tagOutPisaMsg out; memset(&out,0,sizeof(out)); out.nResult=1; strcpy(out.chErrMsg,"不能Pass自己出的牌!"); m_pITableFrame->SendUserData(pIServerUserItem,MSG_OUTPISA_MSG,(void *)&out,sizeof(out)); } else { //通知各个玩家该玩家pass struct tagSetOtherPisa pisa; pisa.nChairId=pOut->nChairId; pisa.nCount=0; SendUserDataToAll(MSG_SET_OTHERPISA,(void *)&pisa,sizeof(pisa)); //设置下一个玩家为焦点 int index=(pOut->nChairId+1)%m_wPlayerCount; TRACE("设置下一个%d为焦点\n",index); struct tagSetFocus focus; //如果已经Pass轮回到发牌者 focus.bClean=m_GameLogic.IsUserBegin(index)?TRUE:FALSE; focus.nFoucsId=index; SendUserDataToAll(MSG_SET_FOCUS,(void *)&focus,sizeof(focus)); } } else { if (m_GameLogic.IsUserBegin(pOut->nChairId)) m_GameLogic.EmptyLastCardInfo(); if (m_GameLogic.IsBiggerThanLastCard(pOut)) { //通知玩家出牌通过 struct tagOutPisaMsg out; memset(&out,0,sizeof(out)); out.nResult=0; m_pITableFrame->SendUserData(pIServerUserItem,MSG_OUTPISA_MSG,(void *)&out,sizeof(out)); //通知各个玩家出了什么牌 struct tagSetOtherPisa pisa; pisa.nChairId=pOut->nChairId; pisa.nCount=pOut->nCount; for(int i=0;inCount;i++) pisa.tOutPisa[i]=pOut->tOutPisa[i]; SendUserDataToAll(MSG_SET_OTHERPISA,(void *)&pisa,sizeof(pisa)); //更新最后出牌信息 if (!m_GameLogic.SaveLastCard(pOut)) { //表示该玩家已经出完他的牌了,完成<em>游戏</em> OnEventGameEnd(pOut->nChairId,NULL,GER_NORMAL); } else { //设置下一个玩家为焦点 int index=(pOut->nChairId+1)%m_wPlayerCount; TRACE("设置下一个%d为焦点\n",index); struct tagSetFocus focus; focus.bClean=FALSE; focus.nFoucsId=index; SendUserDataToAll(MSG_SET_FOCUS,(void *)&focus,sizeof(focus)); } } else { //出牌出错,返回出错信息 struct tagOutPisaMsg out; memset(&out,0,sizeof(out)); out.nResult=1; strncpy(out.chErrMsg,m_GameLogic.GetCompareError(),sizeof(out.chErrMsg)-1); m_pITableFrame->SendUserData(pIServerUserItem,MSG_OUTPISA_MSG,(void *)&out,sizeof(out)); } } return true; } else { TRACE("Warning:receive other gamemessage."); } return true; } //框架消息处理 bool __cdecl CTableFrameSink::OnFrameMessage(WORD wSubCmdID, const void * pDataBuffer, WORD wDataSize, IServerUserItem * pIServerUserItem) { //m_GameLogic.StartANewGame(); //TRACE("CTableFrameSink::OnFrameMessage:SubCmdID:%d",wSubCmdID); //return true; return false; } ////////////////////////////////////////////////////////////////////////// //向所有玩家发送的消息 void CTableFrameSink::SendUserDataToAll(WORD wSubCmdId,void *pBuffer,int nLen) { m_pITableFrame->SendTableData(INVALID_CHAIR,wSubCmdId,pBuffer,nLen); // IServerUserItem *pUserItem; /* for(int i=0;iGetServerUserItem(i); //ASSERT(pUserItem!=NULL); //m_pITableFrame->SendUserData(pUserItem,wSubCmdId,pBuffer,nLen); m_pITableFrame->SendTableData(i,wSubCmdId,pBuffer,nLen); }*/ }
网狐游戏代理系统 V1.0
基于<em>网狐</em><em>游戏</em>框架的代理系统,可进行<em>游戏</em>会员管理,<em>游戏</em>难度设置等。工具需在安装有<em>网狐</em><em>游戏</em>的<em>服务</em>器上运行安装。
网狐-添加子游戏-1
创建房间时,指定DLL时,出现。解决办法:点击项目属性,选择配置属性-&amp;gt;常规,将这里的选项调整成和能正常加载到的DLL一样。我的之前项目的平台工具集都是2012(v110),新建的是2013的,就不能正常加载...
网狐游戏 机器人代码
我有<em>网狐</em>棋牌<em>游戏</em>源码(包括内核源码),6.5版本,只是缺少 机器人代码 ,大家谁有吗?可以发给我看看吗?rnrn可以用内核源码和大家交换下,呵呵,当然谁想要,一定也会给你发。只是急着要机器人代码。QQ:1114933531,在线等,rnrn随时联系
网狐棋牌游戏斗地主游戏源码
#include "StdAfx.h" #include "TableFrameSink.h" ////////////////////////////////////////////////////////////////////////// //静态变量 const WORD CTableFrameSink::m_wPlayerCount=GAME_PLAYER; //<em>游戏</em>人数 const enStartMode CTableFrameSink::m_GameStartMode=enStartMode_FullReady; //开始模式 //宏定义 #define GOOD_CARD_PERCENT 4 //好牌概率 ////////////////////////////////////////////////////////////////////////// //构造函数 CTableFrameSink::CTableFrameSink() { //<em>游戏</em>变量 m_wBombTime=1; m_bLandScore=0; m_wFirstUser=0; m_wBankerUser=INVALID_CHAIR; m_wCurrentUser=INVALID_CHAIR; memset(m_bScoreInfo,0,sizeof(m_bScoreInfo)); //运行信息 m_bTurnCardCount=0; m_wTurnWiner=INVALID_CHAIR; memset(m_bTurnCardData,0,sizeof(m_bTurnCardData)); memset(m_bUserTrustee, 0, sizeof( m_bUserTrustee ) ); //扑克信息 memset(m_bBackCard,0,sizeof(m_bBackCard)); memset(m_bCardCount,0,sizeof(m_bCardCount)); memset(m_bOutCardCount,0,sizeof(m_bOutCardCount)); memset(m_bHandCardData,0,sizeof(m_bHandCardData)); //组件变量 m_pITableFrame=NULL; m_pGameServiceOption=NULL; return; } //析构函数 CTableFrameSink::~CTableFrameSink(void) { } //接口查询 void * __cdecl CTableFrameSink::QueryInterface(const IID & Guid, DWORD dwQueryVer) { QUERYINTERFACE(ITableFrameSink,Guid,dwQueryVer); QUERYINTERFACE(ITableUserAction,Guid,dwQueryVer); QUERYINTERFACE_IUNKNOWNEX(ITableFrameSink,Guid,dwQueryVer); return NULL; } //初始化 bool __cdecl CTableFrameSink::InitTableFrameSink(IUnknownEx * pIUnknownEx) { //查询接口 ASSERT(pIUnknownEx!=NULL); m_pITableFrame=QUERY_OBJECT_PTR_INTERFACE(pIUnknownEx,ITableFrame); if (m_pITableFrame==NULL) return false; //获取参数 m_pGameServiceOption=m_pITableFrame->GetGameServiceOption(); ASSERT(m_pGameServiceOption!=NULL); return true; } //用户坐下 bool __cdecl CTableFrameSink::OnActionUserSitDown(WORD wChairID,IServerUserItem * pIServerUserItem, bool bLookonUser) { //历史积分 if (bLookonUser==false) m_HistoryScore.OnEventUserEnter(wChairID); return true; } //用户起立 bool __cdecl CTableFrameSink::OnActionUserStandUp(WORD wChairID,IServerUserItem * pIServerUserItem, bool bLookonUser) { //历史积分 if (bLookonUser==false) m_HistoryScore.OnEventUserLeave(wChairID); return true; } //复位桌子 void __cdecl CTableFrameSink::RepositTableFrameSink() { //<em>游戏</em>变量 m_wBombTime=1; m_bLandScore=0; m_wBankerUser=INVALID_CHAIR; m_wCurrentUser=INVALID_CHAIR; memset(m_bScoreInfo,0,sizeof(m_bScoreInfo)); //运行信息 m_bTurnCardCount=0; m_wTurnWiner=INVALID_CHAIR; memset(m_bTurnCardData,0,sizeof(m_bTurnCardData)); memset(m_bUserTrustee, 0, sizeof( m_bUserTrustee ) ); //扑克信息 memset(m_bBackCard,0,sizeof(m_bBackCard)); memset(m_bCardCount,0,sizeof(m_bCardCount)); memset(m_bOutCardCount,0,sizeof(m_bOutCardCount)); memset(m_bHandCardData,0,sizeof(m_bHandCardData)); return; } //开始模式 enStartMode __cdecl CTableFrameSink::GetGameStartMode() { return m_GameStartMode; } //<em>游戏</em>状态 bool __cdecl CTableFrameSink::IsUserPlaying(WORD wChairID) { return true; } //<em>游戏</em>开始 bool __cdecl CTableFrameSink::OnEventGameStart() { //设置状态 m_pITableFrame->SetGameStatus(GS_WK_SCORE); BYTE cbSendGoodCard = rand () % GOOD_CARD_PERCENT ; BYTE cbAndroidUserCount = 0 ; WORD wAndroidUser[ GAME_PLAYER ] = {0}; //机器人个数 for ( WORD wChairID = 0; wChairID < GAME_PLAYER; ++wChairID ) { IServerUserItem *pServerUserItem = m_pITableFrame->GetServerUserItem( wChairID ) ; if ( pServerUserItem->IsAndroidUser() ) { wAndroidUser[ cbAndroidUserCount ] = ( wChairID ) ; ++cbAndroidUserCount ; } } WORD wHaveGoodCardAndroidUser = INVALID_CHAIR ; if ( 0 < cbAndroidUserCount ) wHaveGoodCardAndroidUser = wAndroidUser[ rand() % cbAndroidUserCount ] ; //发送好牌 if ( 1 == cbSendGoodCard && wHaveGoodCardAndroidUser != INVALID_CHAIR ) { //混乱扑克 BYTE bRandCard[54]; m_GameLogic.RandCardList( bRandCard, sizeof( bRandCard ) / sizeof( bRandCard[ 0 ] ) ); BYTE cbGoodCard[ NORMAL_COUNT ] ; m_GameLogic.GetGoodCardData( cbGoodCard ) ; //抽取好牌 m_GameLogic.RemoveGoodCardData( cbGoodCard, NORMAL_COUNT, bRandCard, FULL_COUNT ) ; //分发扑克 CopyMemory( m_bHandCardData[ wHaveGoodCardAndroidUser ], cbGoodCard, NORMAL_COUNT ) ; m_bCardCount[ wHaveGoodCardAndroidUser ] = 17; for ( WORD i = 0, j = 0; i < m_wPlayerCount; i++ ) { if ( i != wHaveGoodCardAndroidUser ) { m_bCardCount[ i ] = 17; CopyMemory( &m_bHandCardData[ i ], &bRandCard[ j * 17 ], sizeof( BYTE ) * 17 ); ++j ; } } CopyMemory( m_bBackCard, &bRandCard[ 34 ], sizeof( m_bBackCard ) ); m_GameLogic.SortCardList( m_bBackCard, 3, ST_ORDER ); } else { //混乱扑克 BYTE bRandCard[ 54 ]; m_GameLogic.RandCardList( bRandCard, sizeof( bRandCard ) / sizeof( bRandCard[ 0 ] ) ); //分发扑克 for ( WORD i = 0; i < m_wPlayerCount; i++ ) { m_bCardCount[ i ] = 17; CopyMemory( &m_bHandCardData[ i ], &bRandCard[ i * m_bCardCount[ i ] ], sizeof( BYTE ) * m_bCardCount[ i ] ); } CopyMemory( m_bBackCard, &bRandCard[ 51 ], sizeof( m_bBackCard ) ); m_GameLogic.SortCardList( m_bBackCard, 3, ST_ORDER ); } //设置用户 m_wCurrentUser = rand() % GAME_PLAYER; m_wFirstUser=m_wCurrentUser; //发送扑克 CMD_S_SendAllCard SendAllCard ; SendAllCard.wCurrentUser = m_wCurrentUser ; //手上扑克 CopyMemory( SendAllCard.bCardData, m_bHandCardData, sizeof( m_bHandCardData ) ) ; //底牌扑克 CopyMemory( SendAllCard.bBackCardData, m_bBackCard, 3 ) ; for ( WORD i = 0; i < m_wPlayerCount; i++ ) { m_pITableFrame->SendTableData( i, SUB_S_SEND_CARD, &SendAllCard, sizeof( SendAllCard ) ); m_pITableFrame->SendLookonData( i, SUB_S_SEND_CARD, &SendAllCard, sizeof( SendAllCard ) ); } //排列扑克 for ( WORD i = 0; i < m_wPlayerCount; i++ ) { m_GameLogic.SortCardList( m_bHandCardData[ i ], m_bCardCount[ i ], ST_ORDER ); } return true; } //<em>游戏</em>结束 bool __cdecl CTableFrameSink::OnEventGameEnd( WORD wChairID, IServerUserItem * pIServerUserItem, BYTE cbReason ) { switch ( cbReason ) { case GER_DISMISS: //<em>游戏</em>解散 { //效验参数 ASSERT( pIServerUserItem != NULL ); ASSERT( wChairID < m_wPlayerCount ); //构造数据 CMD_S_GameEnd GameEnd; memset( &GameEnd, 0, sizeof( GameEnd ) ); //剩余扑克 BYTE bCardPos = 0; for ( WORD i = 0; i < m_wPlayerCount; i++ ) { GameEnd.bCardCount[ i ] = m_bCardCount[ i ]; CopyMemory( &GameEnd.bCardData[ bCardPos ], m_bHandCardData[ i ], m_bCardCount[ i ] * sizeof( BYTE ) ); bCardPos += m_bCardCount[ i ]; } //发送信息 m_pITableFrame->SendTableData( INVALID_CHAIR, SUB_S_GAME_END, &GameEnd, sizeof( GameEnd ) ); m_pITableFrame->SendLookonData( INVALID_CHAIR, SUB_S_GAME_END, &GameEnd, sizeof( GameEnd ) ); //结束<em>游戏</em> m_pITableFrame->ConcludeGame(); return true; } case GER_NORMAL: //常规结束 { //定义变量 CMD_S_GameEnd GameEnd; ZeroMemory( &GameEnd, sizeof( GameEnd ) ); //剩余扑克 BYTE bCardPos = 0; for ( WORD i = 0; i < m_wPlayerCount; i++ ) { GameEnd.bCardCount[ i ] = m_bCardCount[ i ]; CopyMemory( &GameEnd.bCardData[ bCardPos ], m_bHandCardData[ i ], m_bCardCount[ i ] * sizeof( BYTE ) ); bCardPos += m_bCardCount[ i ]; } //变量定义 LONG lCellScore = m_pGameServiceOption->lCellScore; bool bLandWin = ( m_bCardCount[ m_wBankerUser ] == 0 ) ? true : false; //春天判断 if ( wChairID == m_wBankerUser ) { WORD wUser1 = ( m_wBankerUser + 1 ) % GAME_PLAYER; WORD wUser2 = ( m_wBankerUser + 2 ) % GAME_PLAYER; if ( ( m_bOutCardCount[ wUser1 ] == 0 ) && ( m_bOutCardCount[ wUser2 ] == 0 ) ) m_wBombTime *= 2; } else { if ( m_bOutCardCount[ m_wBankerUser ] == 1 ) m_wBombTime *= 2; } //炸弹限制 m_wBombTime = __min( m_wBombTime, 16 ); //<em>游戏</em>积分 LONG lScore=0; LONG lRevenue=0; enScoreKind ScoreKind; //统计积分 for ( WORD i = 0; i < m_wPlayerCount; i++ ) { lScore=0; lRevenue=0; //统计积分 if ( i == m_wBankerUser ) { lScore = m_wBombTime * m_bLandScore * lCellScore * ( ( bLandWin == true ) ? 2 : -2 ); GameEnd.lGameScore[ i ] = m_wBombTime * m_bLandScore * lCellScore * ( ( bLandWin == true ) ? 2 : -2 ); } else { lScore = m_wBombTime * m_bLandScore * lCellScore * ( ( bLandWin == true ) ? -1 : 1 ); GameEnd.lGameScore[ i ] = m_wBombTime * m_bLandScore * lCellScore * ( ( bLandWin == true ) ? -1 : 1 ); } //胜利类型 ScoreKind=(GameEnd.lGameScore[i]>0L)?enScoreKind_Win:enScoreKind_Lost; //计算税收 if (m_pGameServiceOption->wServerType==GAME_GENRE_GOLD) { if (GameEnd.lGameScore[i]>=100L) { //计算税收 GameEnd.lGameTax+= (GameEnd.lGameScore[i]*m_pGameServiceOption->wRevenue/100L); lRevenue = (GameEnd.lGameScore[i]*m_pGameServiceOption->wRevenue/100L); //积分调整 lScore=lScore-lRevenue; GameEnd.lGameScore[i]=GameEnd.lGameScore[i]-lRevenue; } } //修改分数 m_pITableFrame->WriteUserScore(i,lScore,lRevenue,ScoreKind); //历史积分 m_HistoryScore.OnEventUserScore(i,GameEnd.lGameScore[i]); } //发送信息 m_pITableFrame->SendTableData(INVALID_CHAIR,SUB_S_GAME_END,&GameEnd,sizeof(GameEnd)); m_pITableFrame->SendLookonData(INVALID_CHAIR,SUB_S_GAME_END,&GameEnd,sizeof(GameEnd)); //切换用户 m_wFirstUser=wChairID; //结束<em>游戏</em> m_pITableFrame->ConcludeGame(); return true; } case GER_USER_LEFT: //用户强退 { //效验参数 ASSERT(pIServerUserItem!=NULL); ASSERT(wChairIDlCellScore*3; GameEnd.lGameScore[i]=-m_wBombTime*m_bLandScore*m_pGameServiceOption->lCellScore*3; } else if (m_pGameServiceOption->wServerType==GAME_GENRE_GOLD) { //统计积分 //ScoreKind=enScoreKind_Win; //lScore=(m_wBombTime*m_bLandScore*m_pGameServiceOption->lCellScore*4)/2; //GameEnd.lGameScore[i]=(m_wBombTime*m_bLandScore*m_pGameServiceOption->lCellScore*4)/2; ////计算税收 //if (lScore>=100L) //{ // //计算税收 // GameEnd.lGameTax+=GameEnd.lGameScore[i]*m_pGameServiceOption->cbRevenue/100L; // lRevenue = GameEnd.lGameScore[i]*m_pGameServiceOption->cbRevenue/100L; // //积分调整 // lScore=lScore-lRevenue ; // GameEnd.lGameScore[i]=GameEnd.lGameScore[i]-lRevenue ; //} } //写入积分 m_pITableFrame->WriteUserScore(i,lScore,lRevenue,ScoreKind); //历史积分 m_HistoryScore.OnEventUserScore(i,GameEnd.lGameScore[i]); } //发送信息 m_pITableFrame->SendTableData(INVALID_CHAIR,SUB_S_GAME_END,&GameEnd,sizeof(GameEnd)); m_pITableFrame->SendLookonData(INVALID_CHAIR,SUB_S_GAME_END,&GameEnd,sizeof(GameEnd)); //结束<em>游戏</em> m_pITableFrame->ConcludeGame(); return true; } } ASSERT(FALSE); return false; } //发送场景 bool __cdecl CTableFrameSink::SendGameScene(WORD wChiarID, IServerUserItem * pIServerUserItem, BYTE cbGameStatus, bool bSendSecret) { switch (cbGameStatus) { case GS_WK_FREE: //空闲状态 { //构造数据 CMD_S_StatusFree StatusFree; memset(&StatusFree,0,sizeof(StatusFree)); //设置变量 StatusFree.lBaseScore=m_pGameServiceOption->lCellScore; //历史积分 for (WORD i=0;ilTurnScore; StatusFree.lCollectScore[i]=pHistoryScore->lCollectScore; } //发送场景 return m_pITableFrame->SendGameScene(pIServerUserItem,&StatusFree,sizeof(StatusFree)); } case GS_WK_SCORE: //叫分状态 { //构造数据 CMD_S_StatusScore StatusScore; memset(&StatusScore,0,sizeof(StatusScore)); //设置变量 StatusScore.bLandScore=m_bLandScore; StatusScore.wCurrentUser=m_wCurrentUser; StatusScore.lBaseScore=m_pGameServiceOption->lCellScore; CopyMemory(StatusScore.bScoreInfo,m_bScoreInfo,sizeof(m_bScoreInfo)); // CopyMemory(StatusScore.bCardData,m_bHandCardData[wChiarID],m_bCardCount[wChiarID]); CopyMemory(StatusScore.bCardData,m_bHandCardData, sizeof(m_bHandCardData)*sizeof(BYTE)); CopyMemory( StatusScore.bUserTrustee, m_bUserTrustee, sizeof( m_bUserTrustee ) ); //历史积分 for (WORD i=0;ilTurnScore; StatusScore.lCollectScore[i]=pHistoryScore->lCollectScore; } //发送场景 return m_pITableFrame->SendGameScene(pIServerUserItem,&StatusScore,sizeof(StatusScore)); } case GS_WK_PLAYING: //<em>游戏</em>状态 { //构造数据 CMD_S_StatusPlay StatusPlay; memset(&StatusPlay,0,sizeof(StatusPlay)); //设置变量 StatusPlay.wBombTime=m_wBombTime; StatusPlay.wLandUser=m_wBankerUser; StatusPlay.wCurrentUser=m_wCurrentUser; StatusPlay.wLastOutUser=m_wTurnWiner; StatusPlay.bLandScore=m_bLandScore; StatusPlay.bTurnCardCount=m_bTurnCardCount; StatusPlay.lBaseScore=m_pGameServiceOption->lCellScore; CopyMemory(StatusPlay.bBackCard,m_bBackCard,sizeof(m_bBackCard)); CopyMemory(StatusPlay.bCardCount,m_bCardCount,sizeof(m_bCardCount)); CopyMemory(StatusPlay.bTurnCardData,m_bTurnCardData,sizeof(BYTE)*m_bTurnCardCount); // CopyMemory(StatusPlay.bCardData,m_bHandCardData[wChiarID],sizeof(BYTE)*m_bCardCount[wChiarID]); CopyMemory(StatusPlay.bCardData,m_bHandCardData,sizeof(BYTE)*sizeof(m_bHandCardData)); CopyMemory( StatusPlay.bUserTrustee, m_bUserTrustee, sizeof( m_bUserTrustee ) ); //历史积分 for (WORD i=0;ilTurnScore; StatusPlay.lCollectScore[i]=pHistoryScore->lCollectScore; } //发送场景 return m_pITableFrame->SendGameScene(pIServerUserItem,&StatusPlay,sizeof(StatusPlay)); } } return false; } //定时器事件 bool __cdecl CTableFrameSink::OnTimerMessage(WORD wTimerID, WPARAM wBindParam) { return false; } //<em>游戏</em>消息处理 bool __cdecl CTableFrameSink::OnGameMessage(WORD wSubCmdID, const void * pDataBuffer, WORD wDataSize, IServerUserItem * pIServerUserItem) { switch (wSubCmdID) { case SUB_C_LAND_SCORE: //用户叫分 { //效验数据 ASSERT(wDataSize==sizeof(CMD_C_LandScore)); if (wDataSize!=sizeof(CMD_C_LandScore)) return false; //用户效验 tagServerUserData * pUserData=pIServerUserItem->GetUserData(); if (pUserData->cbUserStatus!=US_PLAY) return true; //消息处理 CMD_C_LandScore * pLandScore=(CMD_C_LandScore *)pDataBuffer; return OnUserLandScore(pUserData->wChairID,pLandScore->bLandScore); } case SUB_C_OUT_CART: //用户出牌 { //变量定义 CMD_C_OutCard * pOutCard=(CMD_C_OutCard *)pDataBuffer; WORD wHeadSize=sizeof(CMD_C_OutCard)-sizeof(pOutCard->bCardData); //效验数据 ASSERT(wDataSize>=wHeadSize); if (wDataSizebCardCount*sizeof(pOutCard->bCardData[0]))); if (wDataSize!=(wHeadSize+pOutCard->bCardCount*sizeof(pOutCard->bCardData[0]))) return false; //用户效验 tagServerUserData * pUserData=pIServerUserItem->GetUserData(); if (pUserData->cbUserStatus!=US_PLAY) return true; //消息处理 return OnUserOutCard(pUserData->wChairID,pOutCard->bCardData,pOutCard->bCardCount); } case SUB_C_PASS_CARD: { //用户效验 tagServerUserData * pUserData=pIServerUserItem->GetUserData(); if (pUserData->cbUserStatus!=US_PLAY) return true; //消息处理 return OnUserPassCard(pUserData->wChairID); } case SUB_C_TRUSTEE: //玩家托管 { //效验数据 ASSERT(wDataSize==sizeof(CMD_C_UserTrustee)); if (wDataSize != sizeof(CMD_C_UserTrustee)) return false; CMD_C_UserTrustee *pUserTrustee = ( CMD_C_UserTrustee * )pDataBuffer; m_bUserTrustee[ pUserTrustee->wUserChairID ] = pUserTrustee->bTrustee; m_pITableFrame->SendTableData(INVALID_CHAIR,SUB_C_TRUSTEE, (void*)pDataBuffer,wDataSize); m_pITableFrame->SendLookonData(INVALID_CHAIR,SUB_C_TRUSTEE, (void*)pDataBuffer,wDataSize); return true; } } return true; } //框架消息处理 bool __cdecl CTableFrameSink::OnFrameMessage(WORD wSubCmdID, const void * pDataBuffer, WORD wDataSize, IServerUserItem * pIServerUserItem) { return false; } //叫分事件 bool CTableFrameSink::OnUserLandScore(WORD wChairID, BYTE bLandScore) { //效验状态 if (m_pITableFrame->GetGameStatus()!=GS_WK_SCORE) return true; if (wChairID!=m_wCurrentUser) return false; //效验参数 if (((bLandScore>3)&&(bLandScore!=255))||(bLandScoreGetServerUserItem(wChairID) ; if(pServerUserItem->IsAndroidUser()) { wAndroidUser[cbAndroidUserCount] = (wChairID) ; ++cbAndroidUserCount ; } } WORD wHaveGoodCardAndroidUser = INVALID_CHAIR ; if(cbAndroidUserCount>0) wHaveGoodCardAndroidUser = wAndroidUser[rand()%cbAndroidUserCount] ; //发送好牌 if( 0 == cbSendGoodCard && wHaveGoodCardAndroidUser!=INVALID_CHAIR) { //混乱扑克 BYTE bRandCard[54]; m_GameLogic.RandCardList(bRandCard,sizeof(bRandCard)/sizeof(bRandCard[0])); BYTE cbGoodCard[NORMAL_COUNT] ; m_GameLogic.GetGoodCardData(cbGoodCard) ; //抽取好牌 m_GameLogic.RemoveGoodCardData(cbGoodCard, NORMAL_COUNT, bRandCard, FULL_COUNT ) ; //分发扑克 CopyMemory(m_bHandCardData[wHaveGoodCardAndroidUser], cbGoodCard, NORMAL_COUNT) ; m_bCardCount[wHaveGoodCardAndroidUser]=17; for (WORD i=0, j=0;iSendTableData(i,SUB_S_SEND_CARD,&SendAllCard,sizeof(SendAllCard)); m_pITableFrame->SendLookonData(i,SUB_S_SEND_CARD,&SendAllCard,sizeof(SendAllCard)); } //排列扑克 for (WORD i=0;iSetGameStatus(GS_WK_PLAYING); //发送底牌 m_bCardCount[m_wBankerUser]=20; CopyMemory(&m_bHandCardData[m_wBankerUser][17],m_bBackCard,sizeof(m_bBackCard)); m_GameLogic.SortCardList(m_bHandCardData[m_wBankerUser],m_bCardCount[m_wBankerUser],ST_ORDER); //出牌信息 m_bTurnCardCount=0; m_wTurnWiner=m_wBankerUser; m_wCurrentUser=m_wBankerUser; //发送消息 CMD_S_GameStart GameStart; GameStart.wLandUser=m_wBankerUser; GameStart.bLandScore=m_bLandScore; GameStart.wCurrentUser=m_wCurrentUser; CopyMemory(GameStart.bBackCard,m_bBackCard,sizeof(m_bBackCard)); m_pITableFrame->SendTableData(INVALID_CHAIR,SUB_S_GAME_START,&GameStart,sizeof(GameStart)); m_pITableFrame->SendLookonData(INVALID_CHAIR,SUB_S_GAME_START,&GameStart,sizeof(GameStart)); return true; } //设置用户 m_wCurrentUser=(wChairID+1)%m_wPlayerCount; //发送消息 CMD_S_LandScore LandScore; LandScore.bLandUser=wChairID; LandScore.bLandScore=bLandScore; LandScore.wCurrentUser=m_wCurrentUser; LandScore.bCurrentScore=m_bLandScore; m_pITableFrame->SendTableData(INVALID_CHAIR,SUB_S_LAND_SCORE,&LandScore,sizeof(LandScore)); m_pITableFrame->SendLookonData(INVALID_CHAIR,SUB_S_LAND_SCORE,&LandScore,sizeof(LandScore)); return true; } //用户出牌 bool CTableFrameSink::OnUserOutCard(WORD wChairID, BYTE bCardData[], BYTE bCardCount) { //效验状态 if (m_pITableFrame->GetGameStatus()!=GS_WK_PLAYING) return true; if (wChairID!=m_wCurrentUser) return false; //排序扑克 m_GameLogic.SortCardList(bCardData, bCardCount, ST_ORDER); //类型判断 BYTE bCardType=m_GameLogic.GetCardType(bCardData,bCardCount); if (bCardType==CT_ERROR) return false; //更随出牌 if (m_bTurnCardCount==0) m_bTurnCardCount=bCardCount; else if (m_GameLogic.CompareCard(m_bTurnCardData,bCardData,m_bTurnCardCount,bCardCount)==false) return false; //删除扑克 if (m_GameLogic.RemoveCard(bCardData,bCardCount,m_bHandCardData[wChairID],m_bCardCount[wChairID])==false) return false; m_bCardCount[wChairID]-=bCardCount; //出牌记录 m_bTurnCardCount=bCardCount; m_bOutCardCount[wChairID]++; CopyMemory(m_bTurnCardData,bCardData,sizeof(BYTE)*bCardCount); //炸弹判断 if ((bCardType==CT_BOMB_CARD)||(bCardType==CT_MISSILE_CARD)) m_wBombTime*=2; //切换用户 m_wTurnWiner=wChairID; if (m_bCardCount[wChairID]!=0) { if (bCardType!=CT_MISSILE_CARD) m_wCurrentUser=(m_wCurrentUser+1)%m_wPlayerCount; } else m_wCurrentUser=INVALID_CHAIR; //构造数据 CMD_S_OutCard OutCard; OutCard.bCardCount=bCardCount; OutCard.wOutCardUser=wChairID; OutCard.wCurrentUser=m_wCurrentUser; CopyMemory(OutCard.bCardData,m_bTurnCardData,m_bTurnCardCount*sizeof(BYTE)); //发送数据 WORD wSendSize=sizeof(OutCard)-sizeof(OutCard.bCardData)+OutCard.bCardCount*sizeof(BYTE); m_pITableFrame->SendTableData(INVALID_CHAIR,SUB_S_OUT_CARD,&OutCard,wSendSize); m_pITableFrame->SendLookonData(INVALID_CHAIR,SUB_S_OUT_CARD,&OutCard,wSendSize); //出牌最大 if (bCardType==CT_MISSILE_CARD) m_bTurnCardCount=0; //结束判断 if (m_wCurrentUser==INVALID_CHAIR) OnEventGameEnd(wChairID,NULL,GER_NORMAL); return true; } //用户放弃 bool CTableFrameSink::OnUserPassCard(WORD wChairID) { //效验状态 if (m_pITableFrame->GetGameStatus()!=GS_WK_PLAYING) return true; if ((wChairID!=m_wCurrentUser)||(m_bTurnCardCount==0)) return false; //设置变量 m_wCurrentUser=(m_wCurrentUser+1)%m_wPlayerCount; if (m_wCurrentUser==m_wTurnWiner) m_bTurnCardCount=0; //发送数据 CMD_S_PassCard PassCard; PassCard.wPassUser=wChairID; PassCard.wCurrentUser=m_wCurrentUser; PassCard.bNewTurn=(m_bTurnCardCount==0)?TRUE:FALSE; m_pITableFrame->SendTableData(INVALID_CHAIR,SUB_S_PASS_CARD,&PassCard,sizeof(PassCard)); m_pITableFrame->SendLookonData(INVALID_CHAIR,SUB_S_PASS_CARD,&PassCard,sizeof(PassCard)); return true; } //////////////////////////////////////////////////////////////////////////
网狐游戏休闲网站系统
<em>网狐</em><em>游戏</em>休闲网站系统,<em>网狐</em>网站源码,带<em>数据库</em>脚本,带编译源码,完整无错版
网狐游戏控制完美版.zip
<em>网狐</em><em>游戏</em>控制完美版,后台控制,带教程,详细的教程,一定可以让你做好你的网站
网狐棋牌游戏挖坑游戏源码
#include "StdAfx.h" #include "TableFrameSink.h" ////////////////////////////////////////////////////////////////////////// //静态变量 const WORD CTableFrameSink::m_wPlayerCount=GAME_PLAYER; //<em>游戏</em>人数 const enStartMode CTableFrameSink::m_GameStartMode=enStartMode_FullReady; //开始模式 ////////////////////////////////////////////////////////////////////////// //构造函数 CTableFrameSink::CTableFrameSink() { //<em>游戏</em>变量 m_bCavernScore=0; m_wFirstUser=INVALID_CHAIR; m_wCavernUser=INVALID_CHAIR; m_wCurrentUser=INVALID_CHAIR; memset(m_bScoreInfo,0,sizeof(m_bScoreInfo)); //运行信息 m_bCount1=0; m_bCount2=0; m_bCount3=0; m_bTurnCardCount=0; m_wTurnWiner=INVALID_CHAIR; memset(m_bTurnCardData,0,sizeof(m_bTurnCardData)); //扑克信息 memset(m_bBackCard,0,sizeof(m_bBackCard)); memset(m_bCardCount,0,sizeof(m_bCardCount)); memset(m_bHandCardData,0,sizeof(m_bHandCardData)); //组件变量 m_pITableFrame=NULL; m_pGameServiceOption=NULL; return; } //析构函数 CTableFrameSink::~CTableFrameSink(void) { } //接口查询 void * __cdecl CTableFrameSink::QueryInterface(const IID & Guid, DWORD dwQueryVer) { QUERYINTERFACE(ITableFrameSink,Guid,dwQueryVer); QUERYINTERFACE_IUNKNOWNEX(ITableFrameSink,Guid,dwQueryVer); return NULL; } //初始化 bool __cdecl CTableFrameSink::InitTableFrameSink(IUnknownEx * pIUnknownEx) { //查询接口 ASSERT(pIUnknownEx!=NULL); m_pITableFrame=QUERY_OBJECT_PTR_INTERFACE(pIUnknownEx,ITableFrame); if (m_pITableFrame==NULL) return false; //获取参数 m_pGameServiceOption=m_pITableFrame->GetGameServiceOption(); ASSERT(m_pGameServiceOption!=NULL); return true; } //复位桌子 void __cdecl CTableFrameSink::RepositTableFrameSink() { //<em>游戏</em>变量 m_bCavernScore=0; m_wFirstUser=INVALID_CHAIR; m_wCavernUser=INVALID_CHAIR; m_wCurrentUser=INVALID_CHAIR; memset(m_bScoreInfo,0,sizeof(m_bScoreInfo)); //运行信息 m_bCount1=0; m_bCount2=0; m_bCount3=0; m_bTurnCardCount=0; m_wTurnWiner=INVALID_CHAIR; memset(m_bTurnCardData,0,sizeof(m_bTurnCardData)); //扑克信息 memset(m_bBackCard,0,sizeof(m_bBackCard)); memset(m_bCardCount,0,sizeof(m_bCardCount)); memset(m_bHandCardData,0,sizeof(m_bHandCardData)); return; } //开始模式 enStartMode __cdecl CTableFrameSink::GetGameStartMode() { return m_GameStartMode; } //<em>游戏</em>状态 bool __cdecl CTableFrameSink::IsUserPlaying(WORD wChairID) { return true; } //<em>游戏</em>开始 bool __cdecl CTableFrameSink::OnEventGameStart() { //设置状态 m_pITableFrame->SetGameStatus(GS_WK_SCORE); //混乱扑克 BYTE bRandCard[52]; m_GameLogic.RandCardList(bRandCard,sizeof(bRandCard)/sizeof(bRandCard[0])); //分发扑克 for (WORD i=0;i=4)&&(bCardValue=0;j--) { if (m_GameLogic.GetCardValue(m_bHandCardData[i][j])>bBaseValue) break; if (m_bHandCardData[i][j]==bFlagCard) { bFind=true; m_wFirstUser=i; m_wCurrentUser=i; break; } } if (bFind==true) break; } ASSERT(bFind==true); //发送扑克 CMD_S_SendCard SendCard; SendCard.wCurrentUser=m_wCurrentUser; for (WORD i=0;iSendTableData(i,SUB_S_SEND_CARD,&SendCard,sizeof(SendCard)); m_pITableFrame->SendLookonData(i,SUB_S_SEND_CARD,&SendCard,sizeof(SendCard)); } return true; } //<em>游戏</em>结束 bool __cdecl CTableFrameSink::OnEventGameEnd(WORD wChairID, IServerUserItem * pIServerUserItem, BYTE cbReason) { switch (cbReason) { case GER_DISMISS: //<em>游戏</em>解散 { //效验参数 ASSERT(pIServerUserItem!=NULL); ASSERT(wChairIDSendTableData(INVALID_CHAIR,SUB_S_GAME_END,&GameEnd,sizeof(GameEnd)); m_pITableFrame->SendLookonData(INVALID_CHAIR,SUB_S_GAME_END,&GameEnd,sizeof(GameEnd)); //结束<em>游戏</em> m_pITableFrame->ConcludeGame(); return true; } case GER_NORMAL: //常规结束 { //定义变量 CMD_S_GameEnd GameEnd; memset(&GameEnd,0,sizeof(GameEnd)); tagScoreInfo ScoreInfo[m_wPlayerCount]; memset(&ScoreInfo,0,sizeof(ScoreInfo)); LONG lTax=0; //剩余扑克 BYTE bCardPos=0; for (WORD i=0;ilCellScore; bool bCavernWin=(m_bCardCount[m_wCavernUser]==0)?true:false; //统计积分 for (WORD i=0;iwServerType&GAME_GENRE_GOLD) { for (WORD i=0;i=100L) { lTax=GameEnd.lGameScore[i] *m_pGameServiceOption->wRevenue /100L; GameEnd.lGameTax+=lTax; GameEnd.lGameScore[i]-=lTax; } } } //发送信息 m_pITableFrame->SendTableData(INVALID_CHAIR,SUB_S_GAME_END,&GameEnd,sizeof(GameEnd)); m_pITableFrame->SendLookonData(INVALID_CHAIR,SUB_S_GAME_END,&GameEnd,sizeof(GameEnd)); //修改积分 for (WORD i=0;i0L)?enScoreKind_Win:enScoreKind_Lost; m_pITableFrame->WriteUserScore(i,ScoreInfo[i].lScore ,ScoreInfo[i].lRevenue ,ScoreInfo[i].ScoreKind ); } //m_pITableFrame->WriteTableScore(ScoreInfo,m_wPlayerCount,GameEnd.lGameTax); //结束<em>游戏</em> m_pITableFrame->ConcludeGame(); return true; } case GER_USER_LEFT: //用户强退 { //效验参数 ASSERT(pIServerUserItem!=NULL); ASSERT(wChairIDlCellScore; //剩余扑克 BYTE bCardPos=0; for (WORD i=0;iSendTableData(INVALID_CHAIR,SUB_S_GAME_END,&GameEnd,sizeof(GameEnd)); m_pITableFrame->SendLookonData(INVALID_CHAIR,SUB_S_GAME_END,&GameEnd,sizeof(GameEnd)); //修改积分 tagScoreInfo ScoreInfo; ZeroMemory(&ScoreInfo,sizeof(ScoreInfo)); ScoreInfo.ScoreKind=enScoreKind_Draw; ScoreInfo.lScore=GameEnd.lGameScore[wChairID]; m_pITableFrame->WriteUserScore(wChairID,ScoreInfo.lScore ,ScoreInfo.lRevenue ,ScoreInfo.ScoreKind ); //结束<em>游戏</em> m_pITableFrame->ConcludeGame(); return true; } } ASSERT(FALSE); return false; } //发送场景 bool __cdecl CTableFrameSink::SendGameScene(WORD wChiarID, IServerUserItem * pIServerUserItem, BYTE cbGameStatus, bool bSendSecret) { switch (cbGameStatus) { case GS_WK_FREE: //空闲状态 { //构造数据 CMD_S_StatusFree StatusFree; memset(&StatusFree,0,sizeof(StatusFree)); //设置变量 StatusFree.lBaseScore=m_pGameServiceOption->lCellScore; //发送场景 return m_pITableFrame->SendGameScene(pIServerUserItem,&StatusFree,sizeof(StatusFree)); } case GS_WK_SCORE: //叫分状态 { //构造数据 CMD_S_StatusScore StatusScore; memset(&StatusScore,0,sizeof(StatusScore)); //设置变量 StatusScore.bCavernScore=m_bCavernScore; StatusScore.wCurrentUser=m_wCurrentUser; StatusScore.lBaseScore=m_pGameServiceOption->lCellScore; CopyMemory(StatusScore.bScoreInfo,m_bScoreInfo,sizeof(m_bScoreInfo)); CopyMemory(StatusScore.bCardData,m_bHandCardData[wChiarID],m_bCardCount[wChiarID]); //发送场景 return m_pITableFrame->SendGameScene(pIServerUserItem,&StatusScore,sizeof(StatusScore)); } case GS_WK_PLAYING: //<em>游戏</em>状态 { //构造数据 CMD_S_StatusPlay StatusPlay; memset(&StatusPlay,0,sizeof(StatusPlay)); //设置变量 StatusPlay.wLastOutUser=m_wTurnWiner; StatusPlay.wCavernUser=m_wCavernUser; StatusPlay.wCurrentUser=m_wCurrentUser; StatusPlay.bCavernScore=m_bCavernScore; StatusPlay.bTurnCardCount=m_bTurnCardCount; StatusPlay.lBaseScore=m_pGameServiceOption->lCellScore; CopyMemory(StatusPlay.bBackCard,m_bBackCard,sizeof(m_bBackCard)); CopyMemory(StatusPlay.bCardCount,m_bCardCount,sizeof(m_bCardCount)); CopyMemory(StatusPlay.bTurnCardData,m_bTurnCardData,sizeof(BYTE)*m_bTurnCardCount); CopyMemory(StatusPlay.bCardData,m_bHandCardData[wChiarID],sizeof(BYTE)*m_bCardCount[wChiarID]); //发送场景 return m_pITableFrame->SendGameScene(pIServerUserItem,&StatusPlay,sizeof(StatusPlay)); } } return false; } //定时器事件 bool __cdecl CTableFrameSink::OnTimerMessage(WORD wTimerID, WPARAM wBindParam) { return false; } //<em>游戏</em>消息处理 bool __cdecl CTableFrameSink::OnGameMessage(WORD wSubCmdID, const void * pDataBuffer, WORD wDataSize, IServerUserItem * pIServerUserItem) { switch (wSubCmdID) { case SUB_C_CAVERN_SCORE: //用户叫分 { //效验数据 ASSERT(wDataSize==sizeof(CMD_C_CavernScore)); if (wDataSize!=sizeof(CMD_C_CavernScore)) return false; //用户效验 tagServerUserData * pUserData=pIServerUserItem->GetUserData(); if (pUserData->cbUserStatus!=US_PLAY) return true; //消息处理 CMD_C_CavernScore * pCavernScore=(CMD_C_CavernScore *)pDataBuffer; return OnUserCavernScore(pUserData->wChairID,pCavernScore->bCavernScore); } case SUB_C_OUT_CART: //用户出牌 { //变量定义 CMD_C_OutCard * pOutCard=(CMD_C_OutCard *)pDataBuffer; WORD wHeadSize=sizeof(CMD_C_OutCard)-sizeof(pOutCard->bCardData); //效验数据 ASSERT(wDataSize>=wHeadSize); if (wDataSizebCardCount*sizeof(pOutCard->bCardData[0]))); if (wDataSize!=(wHeadSize+pOutCard->bCardCount*sizeof(pOutCard->bCardData[0]))) return false; //用户效验 tagServerUserData * pUserData=pIServerUserItem->GetUserData(); if (pUserData->cbUserStatus!=US_PLAY) return true; //消息处理 return OnUserOutCard(pUserData->wChairID,pOutCard->bCardData,pOutCard->bCardCount); } case SUB_C_PASS_CARD: { //用户效验 tagServerUserData * pUserData=pIServerUserItem->GetUserData(); if (pUserData->cbUserStatus!=US_PLAY) return true; //消息处理 return OnUserPassCard(pUserData->wChairID); } } return true; } //框架消息处理 bool __cdecl CTableFrameSink::OnFrameMessage(WORD wSubCmdID, const void * pDataBuffer, WORD wDataSize, IServerUserItem * pIServerUserItem) { return false; } //叫分事件 bool CTableFrameSink::OnUserCavernScore(WORD wChairID, BYTE bCavernScore) { //效验状态 if (m_pITableFrame->GetGameStatus()!=GS_WK_SCORE) return true; if (wChairID!=m_wCurrentUser) return false; //效验参数 if (((bCavernScore>3)&&(bCavernScore!=255))||(bCavernScoreSetGameStatus(GS_WK_PLAYING); //发送底牌 m_bCardCount[m_wCavernUser]=20; CopyMemory(&m_bHandCardData[m_wCavernUser][16],m_bBackCard,sizeof(m_bBackCard)); m_GameLogic.SortCardList(m_bHandCardData[m_wCavernUser],m_bCardCount[m_wCavernUser]); //出牌信息 m_bTurnCardCount=0; m_wTurnWiner=m_wFirstUser; m_wCurrentUser=m_wFirstUser; //发送消息 CMD_S_GameStart GameStart; GameStart.wCavernUser=m_wCavernUser; GameStart.bCavernScore=m_bCavernScore; GameStart.wCurrentUser=m_wCurrentUser; CopyMemory(GameStart.bBackCard,m_bBackCard,sizeof(m_bBackCard)); m_pITableFrame->SendTableData(INVALID_CHAIR,SUB_S_GAME_START,&GameStart,sizeof(GameStart)); m_pITableFrame->SendLookonData(INVALID_CHAIR,SUB_S_GAME_START,&GameStart,sizeof(GameStart)); return true; } //设置用户 m_wCurrentUser=(wChairID+1)%m_wPlayerCount; //发送消息 CMD_S_CavernScore CavernScore; CavernScore.bCavernUser=wChairID; CavernScore.bCavernScore=bCavernScore; CavernScore.wCurrentUser=m_wCurrentUser; CavernScore.bCurrentScore=m_bCavernScore; m_pITableFrame->SendTableData(INVALID_CHAIR,SUB_S_CAVERN_SCORE,&CavernScore,sizeof(CavernScore)); m_pITableFrame->SendLookonData(INVALID_CHAIR,SUB_S_CAVERN_SCORE,&CavernScore,sizeof(CavernScore)); return true; } //用户出牌 bool CTableFrameSink::OnUserOutCard(WORD wChairID, BYTE bCardData[], BYTE bCardCount) { //效验状态 if (m_pITableFrame->GetGameStatus()!=GS_WK_PLAYING) return true; if (wChairID!=m_wCurrentUser) return false; //类型判断 BYTE bCardType=m_GameLogic.GetCardType(bCardData,bCardCount); if (bCardType==CT_INVALID) return false; //更随出牌 if (m_bTurnCardCount!=0) { if (m_bTurnCardCount!=bCardCount) return false; if (m_GameLogic.CompareCard(bCardData,m_bTurnCardData,m_bTurnCardCount)==false) return false; } else m_bTurnCardCount=bCardCount; //删除扑克 if (m_GameLogic.RemoveCard(bCardData,bCardCount,m_bHandCardData[wChairID],m_bCardCount[wChairID])==false) return false; m_bCardCount[wChairID]-=bCardCount; //大牌判断 bool bMostest=false; BYTE bLogicValue=m_GameLogic.GetCardValue(bCardData[0]); if ((bLogicValue==3)||((bLogicValue==13)&&(bCardType>=CT_ONE_LINE))) bMostest=true; else if ((bLogicValue==2)&&((m_bCount3+bCardCount)>4)) bMostest=true; else if ((bLogicValue==1)&&((m_bCount2+bCardCount)>4)&&((m_bCount3+bCardCount)>4)) bMostest=true; else if ((bLogicValue==1)&&((m_bCount1+bCardCount)>4)&&((m_bCount2+bCardCount)>4)&&((m_bCount3+bCardCount)>4)) bMostest=true; //出牌记录 for (BYTE i=0;iSendTableData(INVALID_CHAIR,SUB_S_OUT_CARD,&OutCard,wSendSize); m_pITableFrame->SendLookonData(INVALID_CHAIR,SUB_S_OUT_CARD,&OutCard,wSendSize); //出牌最大 if (bMostest==true) m_bTurnCardCount=0; //判断结束<em>游戏</em> if (m_wCurrentUser==INVALID_CHAIR) OnEventGameEnd(wChairID,NULL,GER_NORMAL); return true; } //用户放弃 bool CTableFrameSink::OnUserPassCard(WORD wChairID) { //效验状态 if (m_pITableFrame->GetGameStatus()!=GS_WK_PLAYING) return true; if ((wChairID!=m_wCurrentUser)||(m_bTurnCardCount==0)) return false; //设置变量 m_wCurrentUser=(m_wCurrentUser+1)%m_wPlayerCount; if (m_wCurrentUser==m_wTurnWiner) m_bTurnCardCount=0; //发送数据 CMD_S_PassCard PassCard; PassCard.wPassUser=wChairID; PassCard.wCurrentUser=m_wCurrentUser; PassCard.bNewTurn=(m_bTurnCardCount==0)?TRUE:FALSE; m_pITableFrame->SendTableData(INVALID_CHAIR,SUB_S_PASS_CARD,&PassCard,sizeof(PassCard)); m_pITableFrame->SendLookonData(INVALID_CHAIR,SUB_S_PASS_CARD,&PassCard,sizeof(PassCard)); return true; } //////////////////////////////////////////////////////////////////////////
网狐棋牌游戏牛牛游戏源码
<em>网狐</em>棋牌<em>游戏</em>源码-牛牛<em>游戏</em>需要更多请联系QQ:327432877 #include "Stdafx.h" #include "AndroidUserItemSink.h" ////////////////////////////////////////////////////////////////////////// //辅助时间 #define TIME_LESS 1 //最少时间 //<em>游戏</em>时间 #define TIME_USER_CALL_BANKER 2 //叫庄定时器 #define TIME_USER_START_GAME 3 //开始定时器 #define TIME_USER_ADD_SCORE 3 //下注定时器 #define TIME_USER_OPEN_CARD 12 //摊牌定时器 //<em>游戏</em>时间 #define IDI_START_GAME (IDI_ANDROID_ITEM_SINK+0) //开始时间 #define IDI_CALL_BANKER (IDI_ANDROID_ITEM_SINK+1) //叫庄时间 #define IDI_USER_ADD_SCORE (IDI_ANDROID_ITEM_SINK+2) //下注时间 #define IDI_OPEN_CARD (IDI_ANDROID_ITEM_SINK+3) //开牌时间 ////////////////////////////////////////////////////////////////////////// //构造函数 CAndroidUserItemSink::CAndroidUserItemSink() { m_lTurnMaxScore = 0; ZeroMemory(m_HandCardData,sizeof(m_HandCardData)); //接口变量 m_pIAndroidUserItem=NULL; return; } //析构函数 CAndroidUserItemSink::~CAndroidUserItemSink() { } //接口查询 void * __cdecl CAndroidUserItemSink::QueryInterface(REFGUID Guid, DWORD dwQueryVer) { QUERYINTERFACE(IAndroidUserItemSink,Guid,dwQueryVer); QUERYINTERFACE_IUNKNOWNEX(IAndroidUserItemSink,Guid,dwQueryVer); return NULL; } //初始接口 bool __cdecl CAndroidUserItemSink::InitUserItemSink(IUnknownEx * pIUnknownEx) { //查询接口 m_pIAndroidUserItem=GET_OBJECTPTR_INTERFACE(pIUnknownEx,IAndroidUserItem); if (m_pIAndroidUserItem==NULL) return false; return true; } //重置接口 bool __cdecl CAndroidUserItemSink::RepositUserItemSink() { m_lTurnMaxScore = 0; ZeroMemory(m_HandCardData,sizeof(m_HandCardData)); return true; } //时间消息 bool __cdecl CAndroidUserItemSink::OnEventTimer(UINT nTimerID) { switch (nTimerID) { case IDI_START_GAME: //开始定时器 { //发送准备 m_pIAndroidUserItem->SendUserReady(NULL,0); return true; } case IDI_CALL_BANKER: //叫庄定时 { //设置变量 CMD_C_CallBanker CallBanker; CallBanker.bBanker = 0; //发送信息 m_pIAndroidUserItem->SendSocketData(SUB_C_CALL_BANKER,&CallBanker,sizeof(CallBanker)); return true; } case IDI_USER_ADD_SCORE: //加注定时 { //可下注筹码 LONG lUserMaxScore[GAME_PLAYER]; ZeroMemory(lUserMaxScore,sizeof(lUserMaxScore)); LONG lTemp=m_lTurnMaxScore; for (WORD i=0;i0)lTemp/=2; lUserMaxScore[i]=__max(lTemp,1L); } //发送消息 CMD_C_AddScore AddScore; AddScore.lScore=lUserMaxScore[rand()%4]; m_pIAndroidUserItem->SendSocketData(SUB_C_ADD_SCORE,&AddScore,sizeof(AddScore)); return true; } case IDI_OPEN_CARD: //开牌定时 { //发送消息 CMD_C_OxCard OxCard; OxCard.bOX=(m_GameLogic.GetCardType(m_HandCardData,MAX_COUNT)>0)?TRUE:FALSE; m_pIAndroidUserItem->SendSocketData(SUB_C_OPEN_CARD,&OxCard,sizeof(OxCard)); return true; } } return false; } //<em>游戏</em>消息 bool __cdecl CAndroidUserItemSink::OnEventGameMessage(WORD wSubCmdID, void * pData, WORD wDataSize) { switch (wSubCmdID) { case SUB_S_CALL_BANKER: //用户叫庄 { //消息处理 return OnSubCallBanker(pData,wDataSize); } case SUB_S_GAME_START: //<em>游戏</em>开始 { //消息处理 return OnSubGameStart(pData,wDataSize); } case SUB_S_ADD_SCORE: //用户下注 { //消息处理 return OnSubAddScore(pData,wDataSize); } case SUB_S_SEND_CARD: //发牌消息 { //消息处理 return OnSubSendCard(pData,wDataSize); } case SUB_S_OPEN_CARD: //用户摊牌 { //消息处理 return OnSubOpenCard(pData,wDataSize); } case SUB_S_PLAYER_EXIT: //用户强退 { //消息处理 return OnSubPlayerExit(pData,wDataSize); } case SUB_S_GAME_END: //<em>游戏</em>结束 {
网狐2008系统—服务组件
VC7.1开发,可以下载试试。 声明:本人未调试过!
网狐棋牌游戏百家乐游戏源码
#include "StdAfx.h" #include "TableFrameSink.h" ////////////////////////////////////////////////////////////////////////// //常量定义 #define SEND_COUNT 8 //发送次数 //索引定义 #define INDEX_PLAYER 0 //闲家索引 #define INDEX_BANKER 1 //庄家索引 //下注时间 #define IDI_PLACE_JETTON 1 //下注时间 #ifdef _DEBUG #define TIME_PLACE_JETTON 30 //下注时间 #else #define TIME_PLACE_JETTON 25 //下注时间 #endif //结束时间 #define IDI_GAME_END 2 //结束时间 #ifdef _DEBUG #define TIME_GAME_END 13 //结束时间 #else #define TIME_GAME_END 13 //结束时间 #endif ////////////////////////////////////////////////////////////////////////// //静态变量 const WORD CTableFrameSink::m_wPlayerCount=GAME_PLAYER; //<em>游戏</em>人数 const enStartMode CTableFrameSink::m_GameStartMode=enStartMode_TimeControl; //开始模式 ////////////////////////////////////////////////////////////////////////// //替代结构 struct tagReplaceCard { BYTE cbCardCount[2]; //扑克数目 BYTE cbTableCardArray[2][3]; //桌面扑克 }; //平家代替 tagReplaceCard CardTieWinCard[]= { 3,3,0x12,0x05,0x00,0x22,0x25,0x32, 3,3,0x11,0x05,0x00,0x14,0x2B,0x32, 3,3,0x1A,0x2B,0x3D,0x1C,0x3C,0x0B, 3,3,0x27,0x2D,0x00,0x01,0x39,0x3D, 3,3,0x3C,0x28,0x00,0x12,0x15,0x01, }; //庄家代替 tagReplaceCard CardBankerWinCard[]= { 3,3,0x17,0x1A,0x05,0x36,0x0D,0x1C, 3,3,0x17,0x03,0x3A,0x1C,0x1A,0x34, 3,3,0x11,0x0D,0x1D,0x35,0x32,0x00, 3,3,0x18,0x29,0x00,0x22,0x16,0x00, 3,3,0x38,0x1A,0x00,0x25,0x04,0x00, }; //闲家代替 tagReplaceCard CardPlayerWinCard[]= { 3,3,0x37,0x3D,0x00,0x31,0x3D,0x0D, 3,3,0x16,0x24,0x08,0x03,0x3D,0x00, 3,3,0x0B,0x39,0x00,0x09,0x35,0x00, 3,3,0x2C,0x08,0x00,0x02,0x15,0x00, 3,3,0x16,0x33,0x00,0x1A,0x27,0x00, }; ////////////////////////////////////////////////////////////////////////// //构造函数 CTableFrameSink::CTableFrameSink() { //下注信息 m_lTieScore=0L; m_lBankerScore=0L; m_lPlayerScore=0L; m_lTieSamePointScore=0L; m_lBankerKingScore=0L; m_lPlayerKingScore=0L; //库存变量 m_lStockScore=0; m_lDesPer = 0 ; m_lFreezeScore=0L; //状态变量 m_dwJettonTime=0L; //下注信息 ZeroMemory(m_lUserTieScore,sizeof(m_lUserTieScore)); ZeroMemory(m_lUserBankerScore,sizeof(m_lUserBankerScore)); ZeroMemory(m_lUserPlayerScore,sizeof(m_lUserPlayerScore)); ZeroMemory(m_lUserTieSamePointScore,sizeof(m_lUserTieSamePointScore)); ZeroMemory(m_lUserBankerKingScore,sizeof(m_lUserBankerKingScore)); ZeroMemory(m_lUserPlayerKingScore,sizeof(m_lUserPlayerKingScore)); //玩家成绩 ZeroMemory(m_lUserWinScore, sizeof(m_lUserWinScore)); ZeroMemory(m_lUserReturnScore, sizeof(m_lUserReturnScore)); ZeroMemory(m_lUserRevenue, sizeof(m_lUserRevenue)); //扑克信息 ZeroMemory(m_cbCardCount,sizeof(m_cbCardCount)); ZeroMemory(m_cbTableCardArray,sizeof(m_cbTableCardArray)); //庄家变量 m_lApplyBankerCondition = 100000000; ZeroMemory( &m_CurrentBanker, sizeof( m_CurrentBanker ) ); m_cbBankerTimer=0; m_lBankerWinScore = 0; m_bCancelBanker=false; //组件变量 m_pITableFrame=NULL; m_pGameServiceOption=NULL; m_pITableFrameControl=NULL; //<em>游戏</em>记录 ZeroMemory(m_GameRecordArrary, sizeof(m_GameRecordArrary)); m_nRecordFirst=0; m_nRecordLast=0; //读取配置 TCHAR szPath[MAX_PATH]=TEXT(""); GetCurrentDirectory(sizeof(szPath),szPath); //读取配置 TCHAR szFileName[MAX_PATH]; _snprintf(szFileName,sizeof(szFileName),TEXT("%s\\BaccaratConfig.ini"),szPath); //读取分数 m_lApplyBankerCondition = GetPrivateProfileInt( TEXT("BankerCondition"), TEXT("Score"), 10000000, szFileName ); m_lAreaLimitScore = GetPrivateProfileInt( TEXT("BankerCondition"), TEXT("AreaLimitScore"), 1000000000, szFileName ); return; } //析构函数 CTableFrameSink::~CTableFrameSink(void) { } //接口查询 void * __cdecl CTableFrameSink::QueryInterface(const IID & Guid, DWORD dwQueryVer) { QUERYINTERFACE(ITableFrameSink,Guid,dwQueryVer); QUERYINTERFACE(ITableUserAction,Guid,dwQueryVer); QUERYINTERFACE_IUNKNOWNEX(ITableFrameSink,Guid,dwQueryVer); return NULL; } //初始化 bool __cdecl CTableFrameSink::InitTableFrameSink(IUnknownEx * pIUnknownEx) { //查询接口 ASSERT(pIUnknownEx!=NULL); m_pITableFrame=QUERY_OBJECT_PTR_INTERFACE(pIUnknownEx,ITableFrame); if (m_pITableFrame==NULL) return false; //控制接口 m_pITableFrameControl=QUERY_OBJECT_PTR_INTERFACE(pIUnknownEx,ITableFrameControl); if (m_pITableFrameControl==NULL) return false; //获取参数 m_pGameServiceOption=m_pITableFrame->GetGameServiceOption(); ASSERT(m_pGameServiceOption!=NULL); //配置参数 TCHAR buffer[MAX_PATH]; if (GetCurrentDirectory(sizeof(buffer), buffer)) { CString strIniFileName ; CString szDir = buffer; if(szDir.Right(1) != "\\") szDir += "\\"; szDir += "BaccaratConfig.ini"; strIniFileName= szDir ; if(!strIniFileName.IsEmpty()) { //库存数目 CString StockScore ; GetPrivateProfileString(TEXT("StockScore"), TEXT("StockScore"), NULL, StockScore.GetBuffer(64), 64, strIniFileName) ; StockScore.ReleaseBuffer() ; m_lStockScore = atol(LPCTSTR(StockScore)) ; //递减比率 CString DesPer ; GetPrivateProfileString(TEXT("DesPer"), TEXT("DesPer"), NULL, DesPer.GetBuffer(64), 64, strIniFileName) ; DesPer.ReleaseBuffer() ; m_lDesPer = atol(LPCTSTR(DesPer)) ; } if(m_lDesPerSetGameStatus(GS_PLAYING); //发送扑克 DispatchTableCard(); //变量定义 CMD_S_GameStart GameStart; ZeroMemory(&GameStart,sizeof(GameStart)); //构造数据 CopyMemory(GameStart.cbCardCount,m_cbCardCount,sizeof(m_cbCardCount)); CopyMemory(GameStart.cbTableCardArray,m_cbTableCardArray,sizeof(m_cbTableCardArray)); GameStart.lApplyBankerCondition = m_lApplyBankerCondition; //发送数据 m_pITableFrame->SendTableData(INVALID_CHAIR,SUB_S_GAME_START,&GameStart,sizeof(GameStart)); m_pITableFrame->SendLookonData(INVALID_CHAIR,SUB_S_GAME_START,&GameStart,sizeof(GameStart)); //计算分数 CalculateScore(); return true; } //<em>游戏</em>结束 bool __cdecl CTableFrameSink::OnEventGameEnd(WORD wChairID, IServerUserItem * pIServerUserItem, BYTE cbReason) { switch (cbReason) { case GER_NORMAL: //常规结束 { //结束消息 CMD_S_GameEnd GameEnd; ZeroMemory(&GameEnd,sizeof(GameEnd)); GameEnd.nBankerTime = m_cbBankerTimer; GameEnd.lBankerTotalScore = m_lBankerWinScore; //推断玩家 DeduceWinner(GameEnd.cbWinner, GameEnd.cbKingWinner); //写入积分 for ( WORD wUserChairID = 0; wUserChairID < GAME_PLAYER; ++wUserChairID ) { IServerUserItem *pIServerUserItem = m_pITableFrame->GetServerUserItem(wUserChairID); if ( pIServerUserItem == NULL ) continue; //胜利类型 enScoreKind ScoreKind=(m_lUserWinScore[wUserChairID]>0L)?enScoreKind_Win:enScoreKind_Lost; //写入积分 if (m_lUserWinScore[wUserChairID]!=0L) m_pITableFrame->WriteUserScore(wUserChairID,m_lUserWinScore[wUserChairID], m_lUserRevenue[wUserChairID], ScoreKind); //庄家判断 if ( m_CurrentBanker.dwUserID == pIServerUserItem->GetUserID() ) m_CurrentBanker.lUserScore = pIServerUserItem->GetUserScore()->lScore; } //发送积分 GameEnd.cbTimeLeave=TIME_PLACE_JETTON; if ( m_CurrentBanker.dwUserID != 0 ) GameEnd.lBankerTreasure = m_CurrentBanker.lUserScore; for ( WORD wUserIndex = 0; wUserIndex < GAME_PLAYER; ++wUserIndex ) { IServerUserItem *pIServerUserItem = m_pITableFrame->GetServerUserItem(wUserIndex); if ( pIServerUserItem == NULL ) continue; //发送消息 GameEnd.lMeMaxScore=pIServerUserItem->GetUserScore()->lScore; m_pITableFrame->SendTableData(wUserIndex,SUB_S_GAME_END,&GameEnd,sizeof(GameEnd)); m_pITableFrame->SendLookonData(wUserIndex,SUB_S_GAME_END,&GameEnd,sizeof(GameEnd)); } //庄家判断 if ( m_CurrentBanker.dwUserID != 0 ) { //获取用户 IServerUserItem * pIServerUserItem=m_pITableFrame->GetServerUserItem(m_CurrentBanker.wChairID); if (pIServerUserItem) { //积分判断 if ( pIServerUserItem->GetUserScore()->lScore < m_lApplyBankerCondition ) { //玩家下庄 OnUserApplyBanker( pIServerUserItem->GetUserData(), false ); } } } //结束<em>游戏</em> m_pITableFrame->ConcludeGame(); return true; } case GER_USER_LEFT: //用户离开 { //胜利类型 enScoreKind ScoreKind=(m_lUserWinScore[wChairID]>0L)?enScoreKind_Win:enScoreKind_Lost; //写入积分 if (m_lUserWinScore[wChairID]!=0L) m_pITableFrame->WriteUserScore(wChairID,m_lUserWinScore[wChairID], m_lUserRevenue[wChairID], ScoreKind); return true; } } return false; } //发送场景 bool __cdecl CTableFrameSink::SendGameScene(WORD wChiarID, IServerUserItem * pIServerUserItem, BYTE cbGameStatus, bool bSendSecret) { switch (cbGameStatus) { case GS_FREE: //空闲状态 { //发送记录 WORD wBufferSize=0; BYTE cbBuffer[4096]; int nIndex = m_nRecordFirst; while ( nIndex != m_nRecordLast ) { if ((wBufferSize+sizeof(tagServerGameRecord))>sizeof(cbBuffer)) { m_pITableFrame->SendUserData(pIServerUserItem,SUB_S_SEND_RECORD,cbBuffer,wBufferSize); wBufferSize=0; } CopyMemory(cbBuffer+wBufferSize,&m_GameRecordArrary[nIndex],sizeof(tagServerGameRecord)); wBufferSize+=sizeof(tagServerGameRecord); nIndex = (nIndex+1) % MAX_SCORE_HISTORY; } if (wBufferSize>0) m_pITableFrame->SendUserData(pIServerUserItem,SUB_S_SEND_RECORD,cbBuffer,wBufferSize); //构造数据 CMD_S_StatusFree StatusFree; ZeroMemory(&StatusFree,sizeof(StatusFree)); //下注信息 StatusFree.lTieScore=m_lTieScore; StatusFree.lBankerScore=m_lBankerScore; StatusFree.lPlayerScore=m_lPlayerScore; StatusFree.lTieSamePointScore = m_lTieSamePointScore; StatusFree.lBankerKingScore = m_lBankerKingScore; StatusFree.lPlayerKingScore = m_lPlayerKingScore; StatusFree.lAreaLimitScore = m_lAreaLimitScore; //庄家信息 StatusFree.lApplyBankerCondition = m_lApplyBankerCondition; //下注信息 if (pIServerUserItem->GetUserStatus()!=US_LOOKON) { StatusFree.lMeTieScore=m_lUserTieScore[wChiarID]; StatusFree.lMeBankerScore=m_lUserBankerScore[wChiarID]; StatusFree.lMePlayerScore=m_lUserPlayerScore[wChiarID]; StatusFree.lMeTieKingScore = m_lUserTieSamePointScore[wChiarID]; StatusFree.lMeBankerKingScore = m_lUserBankerKingScore[wChiarID]; StatusFree.lMePlayerKingScore = m_lUserPlayerKingScore[wChiarID]; StatusFree.lMeMaxScore=pIServerUserItem->GetUserScore()->lScore; } if ( m_CurrentBanker.dwUserID != 0 ) { StatusFree.cbBankerTime = m_cbBankerTimer; StatusFree.lCurrentBankerScore = m_lBankerWinScore; StatusFree.wCurrentBankerChairID = m_CurrentBanker.wChairID; StatusFree.lBankerTreasure = m_CurrentBanker.lUserScore; } else StatusFree.wCurrentBankerChairID = INVALID_CHAIR; //全局信息 DWORD dwPassTime=(DWORD)time(NULL)-m_dwJettonTime; StatusFree.cbTimeLeave=(BYTE)(TIME_PLACE_JETTON-__min(dwPassTime,TIME_PLACE_JETTON)); //发送场景 bool bSuccess = m_pITableFrame->SendGameScene(pIServerUserItem,&StatusFree,sizeof(StatusFree)); //发送申请者 SendApplyUser( pIServerUserItem ); return bSuccess; } case GS_PLAYING: //<em>游戏</em>状态 { //构造数据 CMD_S_StatusPlay StatusPlay; ZeroMemory(&StatusPlay,sizeof(StatusPlay)); //下注信息 StatusPlay.lTieScore=m_lTieScore; StatusPlay.lBankerScore=m_lBankerScore; StatusPlay.lPlayerScore=m_lPlayerScore; StatusPlay.lTieSamePointScore = m_lTieSamePointScore; StatusPlay.lBankerKingScore = m_lBankerKingScore; StatusPlay.lPlayerKingScore = m_lPlayerKingScore; StatusPlay.lAreaLimitScore = m_lAreaLimitScore; //庄家信息 StatusPlay.lApplyBankerCondition = m_lApplyBankerCondition; //下注信息 if (pIServerUserItem->GetUserStatus()!=US_LOOKON) { StatusPlay.lMeTieScore=m_lUserTieScore[wChiarID]; StatusPlay.lMeBankerScore=m_lUserBankerScore[wChiarID]; StatusPlay.lMePlayerScore=m_lUserPlayerScore[wChiarID]; StatusPlay.lMeTieKingScore = m_lUserTieSamePointScore[wChiarID]; StatusPlay.lMeBankerKingScore = m_lUserBankerKingScore[wChiarID]; StatusPlay.lMePlayerKingScore = m_lUserPlayerKingScore[wChiarID]; StatusPlay.lMeMaxScore=pIServerUserItem->GetUserScore()->lScore; } if ( m_CurrentBanker.dwUserID != 0 ) { StatusPlay.cbBankerTime = m_cbBankerTimer; StatusPlay.lCurrentBankerScore = m_lBankerWinScore; StatusPlay.wCurrentBankerChairID = m_CurrentBanker.wChairID; StatusPlay.lBankerTreasure = m_CurrentBanker.lUserScore; } else StatusPlay.wCurrentBankerChairID = INVALID_CHAIR; //扑克信息 CopyMemory(StatusPlay.cbCardCount,m_cbCardCount,sizeof(m_cbCardCount)); CopyMemory(StatusPlay.cbTableCardArray,m_cbTableCardArray,sizeof(m_cbTableCardArray)); //发送申请者 SendApplyUser( pIServerUserItem ); //发送场景 return m_pITableFrame->SendGameScene(pIServerUserItem,&StatusPlay,sizeof(StatusPlay)); } } return false; } //定时器事件 bool __cdecl CTableFrameSink::OnTimerMessage(WORD wTimerID, WPARAM wBindParam) { switch (wTimerID) { case IDI_PLACE_JETTON: //下注时间 { //变量定义 LONGLONG lIncrease=LONGLONG(m_lStockScore*m_lDesPer/100.); //设置库存 if (m_lTieScore+m_lBankerScore+m_lPlayerScore) { m_lStockScore-=lIncrease; m_lFreezeScore+=lIncrease; } //开始<em>游戏</em> m_pITableFrameControl->StartGame(); //设置时间 m_pITableFrame->SetGameTimer(IDI_GAME_END,TIME_GAME_END*1000,1,0L); return true; } case IDI_GAME_END: //结束<em>游戏</em> { //结束<em>游戏</em> OnEventGameEnd(INVALID_CHAIR,NULL,GER_NORMAL); //下庄判断 if ( m_bCancelBanker && m_CurrentBanker.dwUserID != 0 ) { //获取玩家 IServerUserItem *pServerUserItem = m_pITableFrame->GetServerUserItem( m_CurrentBanker.wChairID ); //重置变量 m_cbBankerTimer = 0; m_lBankerWinScore=0; ZeroMemory( &m_CurrentBanker, sizeof( m_CurrentBanker ) ); m_bCancelBanker=false; //发送消息 SendChangeBankerMsg(); //删除庄家 if ( pServerUserItem ) OnUserApplyBanker( pServerUserItem->GetUserData(), false ); } //设置时间 m_dwJettonTime=(DWORD)time(NULL); m_pITableFrame->SetGameTimer(IDI_PLACE_JETTON,TIME_PLACE_JETTON*1000,1,0L); //轮换庄家 ChangeBanker(); //庄家信息 if ( m_CurrentBanker.dwUserID != 0 ) { CMD_S_ChangeUserScore ChangeUserScore; ZeroMemory( &ChangeUserScore, sizeof( ChangeUserScore ) ); ChangeUserScore.wCurrentBankerChairID = m_CurrentBanker.wChairID; ChangeUserScore.lCurrentBankerScore = m_lBankerWinScore; ChangeUserScore.cbBankerTime = m_cbBankerTimer; ChangeUserScore.lScore = m_CurrentBanker.lUserScore; ChangeUserScore.wChairID = m_CurrentBanker.wChairID; m_pITableFrame->SendTableData( INVALID_CHAIR,SUB_S_CHANGE_USER_SCORE,&ChangeUserScore,sizeof(ChangeUserScore)); m_pITableFrame->SendLookonData( INVALID_CHAIR,SUB_S_CHANGE_USER_SCORE,&ChangeUserScore,sizeof(ChangeUserScore)); } //切换判断 if ( m_cbBankerTimer == 0 ) { //发送消息 SendChangeBankerMsg(); } return true; } } return false; } //<em>游戏</em>消息处理 bool __cdecl CTableFrameSink::OnGameMessage(WORD wSubCmdID, const void * pDataBuffer, WORD wDataSize, IServerUserItem * pIServerUserItem) { switch (wSubCmdID) { case SUB_C_PLACE_JETTON: //用户加注 { //效验数据 ASSERT(wDataSize==sizeof(CMD_C_PlaceJetton)); if (wDataSize!=sizeof(CMD_C_PlaceJetton)) return false; //用户效验 tagServerUserData * pUserData=pIServerUserItem->GetUserData(); if (pUserData->cbUserStatus!=US_SIT) return true; //消息处理 CMD_C_PlaceJetton * pPlaceJetton=(CMD_C_PlaceJetton *)pDataBuffer; return OnUserPlaceJetton(pUserData->wChairID,pPlaceJetton->cbJettonArea,pPlaceJetton->lJettonScore); } case SUB_C_APPLY_BANKER: //申请做庄 { //效验数据 ASSERT(wDataSize==sizeof(CMD_C_ApplyBanker)); if (wDataSize!=sizeof(CMD_C_ApplyBanker)) return false; //用户效验 tagServerUserData * pUserData=pIServerUserItem->GetUserData(); if (pUserData->cbUserStatus!=US_SIT) return true; //消息处理 CMD_C_ApplyBanker * pApplyBanker=(CMD_C_ApplyBanker *)pDataBuffer; return OnUserApplyBanker( pUserData, pApplyBanker->bApplyBanker ); } } return false; } //框架消息处理 bool __cdecl CTableFrameSink::OnFrameMessage(WORD wSubCmdID, const void * pDataBuffer, WORD wDataSize, IServerUserItem * pIServerUserItem) { return false; } //用户坐下 bool __cdecl CTableFrameSink::OnActionUserSitDown(WORD wChairID, IServerUserItem * pIServerUserItem, bool bLookonUser) { //设置时间 if ((bLookonUser==false)&&(m_dwJettonTime==0L)) { m_dwJettonTime=(DWORD)time(NULL); m_pITableFrame->SetGameTimer(IDI_PLACE_JETTON,TIME_PLACE_JETTON,1,NULL); } return true; } //用户起来 bool __cdecl CTableFrameSink::OnActionUserStandUp(WORD wChairID, IServerUserItem * pIServerUserItem, bool bLookonUser) { //记录成绩 if (bLookonUser==false) { //状态判断 if ( m_pITableFrame->GetGameStatus() != GS_PLAYING ) { //变量定义 LONG lScore=0; LONG lRevenue=0; enScoreKind ScoreKind; //库存统计 m_lStockScore+=( m_lUserTieScore[wChairID] + m_lUserBankerScore[wChairID] + m_lUserPlayerScore[wChairID] + m_lUserBankerKingScore[wChairID] + m_lUserPlayerKingScore[wChairID] + m_lUserTieSamePointScore[wChairID]); //统计成绩 lScore=-( m_lUserTieScore[wChairID] + m_lUserBankerScore[wChairID] + m_lUserPlayerScore[wChairID] + m_lUserBankerKingScore[wChairID] + m_lUserPlayerKingScore[wChairID] + m_lUserTieSamePointScore[wChairID]); //置零变量 m_lUserTieScore[wChairID] = 0; m_lUserBankerScore[wChairID] = 0; m_lUserPlayerScore[wChairID] = 0; m_lUserBankerKingScore[wChairID] = 0 ; m_lUserPlayerKingScore[wChairID] = 0; m_lUserTieSamePointScore[wChairID] = 0; //写入积分 if (lScore!=0L) { //写入积分 ScoreKind=enScoreKind_Flee; m_pITableFrame->WriteUserScore(pIServerUserItem, lScore,lRevenue, ScoreKind); } } //存在判断 for ( INT_PTR nUserIdx = 0; nUserIdx < m_ApplyUserArrary.GetCount(); ++nUserIdx ) { tagApplyUserInfo ApplyUserInfo = m_ApplyUserArrary[ nUserIdx ]; if ( ApplyUserInfo.dwUserID == pIServerUserItem->GetUserID() ) { //删除玩家 m_ApplyUserArrary.RemoveAt( nUserIdx ); //构造变量 CMD_S_ApplyBanker ApplyBanker; CopyMemory( ApplyBanker.szAccount, pIServerUserItem->GetAccounts(), sizeof( ApplyBanker.szAccount ) ); ApplyBanker.lScore = pIServerUserItem->GetUserScore()->lScore; ApplyBanker.bApplyBanker = false; //发送消息 m_pITableFrame->SendTableData(INVALID_CHAIR, SUB_S_APPLY_BANKER, &ApplyBanker, sizeof( ApplyBanker ) ); m_pITableFrame->SendLookonData(INVALID_CHAIR, SUB_S_APPLY_BANKER, &ApplyBanker, sizeof( ApplyBanker ) ); //当前判断 if ( ApplyUserInfo.dwUserID == m_CurrentBanker.dwUserID ) { //重置变量 ZeroMemory( &m_CurrentBanker, sizeof( m_CurrentBanker ) ); m_cbBankerTimer=0; m_lBankerWinScore=0; //发送消息 SendChangeBankerMsg(); } } } } return true; } //加注事件 bool CTableFrameSink::OnUserPlaceJetton(WORD wChairID, BYTE cbJettonArea, LONG lJettonScore) { //效验参数 ASSERT((cbJettonArea0L)); if ((cbJettonArea>ID_TONG_DIAN_PING)||(lJettonScoreGetGameStatus()==GS_FREE); if (m_pITableFrame->GetGameStatus()!=GS_FREE) return true; //庄家判断 if ( m_CurrentBanker.dwUserID != 0 && m_CurrentBanker.wChairID == wChairID ) return true; if ( m_CurrentBanker.dwUserID == 0 ) return true; //变量定义 IServerUserItem * pIServerUserItem=m_pITableFrame->GetServerUserItem(wChairID); LONG lJettonCount=m_lUserTieScore[wChairID]+m_lUserBankerScore[wChairID]+m_lUserPlayerScore[wChairID]+ m_lUserTieSamePointScore[wChairID] + m_lUserPlayerKingScore[wChairID] + m_lUserBankerKingScore[wChairID]; LONG lUserScore = pIServerUserItem->GetUserScore()->lScore; if ( lUserScore < lJettonCount + lJettonScore ) return true; //合法验证 if ( ID_XIAN_JIA == cbJettonArea ) { if ( GetMaxPlayerScore(wChairID) < lJettonScore ) return true; //保存下注 m_lPlayerScore += lJettonScore; m_lUserPlayerScore[wChairID] += lJettonScore; } else if ( ID_XIAN_TIAN_WANG == cbJettonArea ) { if ( GetMaxPlayerKingScore(wChairID) SendTableData(INVALID_CHAIR,SUB_S_PLACE_JETTON,&PlaceJetton,sizeof(PlaceJetton)); m_pITableFrame->SendLookonData(INVALID_CHAIR,SUB_S_PLACE_JETTON,&PlaceJetton,sizeof(PlaceJetton)); return true; } //发送扑克 bool CTableFrameSink::DispatchTableCard() { //#ifdef _DEBUG // //平家胜利 // BYTE cbIndex=0; // CopyMemory(m_cbCardCount,CardTieWinCard[cbIndex].cbCardCount,sizeof(m_cbCardCount)); // CopyMemory(m_cbTableCardArray,CardTieWinCard[cbIndex].cbTableCardArray,sizeof(m_cbTableCardArray)); //#else // m_GameLogic.RandCardList(m_cbTableCardArray[0],sizeof(m_cbTableCardArray)/sizeof(m_cbTableCardArray[0][0])); //#endif m_GameLogic.RandCardList(m_cbTableCardArray[0],sizeof(m_cbTableCardArray)/sizeof(m_cbTableCardArray[0][0])); //首次发牌 m_cbCardCount[INDEX_PLAYER]=2; m_cbCardCount[INDEX_BANKER]=2; //计算点数 BYTE cbBankerCount=m_GameLogic.GetCardListPip(m_cbTableCardArray[INDEX_BANKER],m_cbCardCount[INDEX_BANKER]); BYTE cbPlayerTwoCardCount = m_GameLogic.GetCardListPip(m_cbTableCardArray[INDEX_PLAYER],m_cbCardCount[INDEX_PLAYER]); //闲家补牌 BYTE cbPlayerThirdCardValue = 0 ; //第三张牌点数 if(cbPlayerTwoCardCountcbBankerCount) lPayoffScore=m_lTieScore+m_lBankerScore-m_lPlayerScore; else if (cbPlayerCountUserScoreInfo.lScore < m_lApplyBankerCondition ) return true; //保存玩家 if ( bApplyBanker ) { //存在判断 for ( INT_PTR nUserIdx = 0; nUserIdx < m_ApplyUserArrary.GetCount(); ++nUserIdx ) { tagApplyUserInfo ApplyUserInfo = m_ApplyUserArrary[ nUserIdx ]; if ( ApplyUserInfo.dwUserID == pUserData->dwUserID ) return true; } //构造信息 tagApplyUserInfo ApplyUserInfo; ApplyUserInfo.dwUserID = pUserData->dwUserID; ApplyUserInfo.lUserScore = pUserData->UserScoreInfo.lScore; ApplyUserInfo.wChairID = pUserData->wChairID; //插入玩家 INT_PTR nUserCount = m_ApplyUserArrary.GetCount(); m_ApplyUserArrary.InsertAt( nUserCount, ApplyUserInfo ); //构造变量 CMD_S_ApplyBanker ApplyBanker; CopyMemory( ApplyBanker.szAccount, pUserData->szAccounts, sizeof( ApplyBanker.szAccount ) ); ApplyBanker.lScore = pUserData->UserScoreInfo.lScore+pUserData->lStorageScore; ApplyBanker.bApplyBanker = true; //发送消息 m_pITableFrame->SendTableData(INVALID_CHAIR, SUB_S_APPLY_BANKER, &ApplyBanker, sizeof( ApplyBanker ) ); m_pITableFrame->SendLookonData(INVALID_CHAIR, SUB_S_APPLY_BANKER, &ApplyBanker, sizeof( ApplyBanker ) ); return true; } else //取消申请 { //存在判断 for ( INT_PTR nUserIdx = 0; nUserIdx < m_ApplyUserArrary.GetCount(); ++nUserIdx ) { tagApplyUserInfo ApplyUserInfo = m_ApplyUserArrary[ nUserIdx ]; if ( ApplyUserInfo.dwUserID == pUserData->dwUserID ) { //当前判断 if ( m_CurrentBanker.dwUserID == ApplyUserInfo.dwUserID ) { m_bCancelBanker = true; continue; } //删除玩家 m_ApplyUserArrary.RemoveAt( nUserIdx ); //构造变量 CMD_S_ApplyBanker ApplyBanker; CopyMemory( ApplyBanker.szAccount, pUserData->szAccounts, sizeof( ApplyBanker.szAccount ) ); ApplyBanker.lScore = pUserData->UserScoreInfo.lScore; ApplyBanker.bApplyBanker = false; //发送消息 m_pITableFrame->SendTableData(INVALID_CHAIR, SUB_S_APPLY_BANKER, &ApplyBanker, sizeof( ApplyBanker ) ); m_pITableFrame->SendLookonData(INVALID_CHAIR, SUB_S_APPLY_BANKER, &ApplyBanker, sizeof( ApplyBanker ) ); return true; } } return true; } return true; } //发送庄家 void CTableFrameSink::SendApplyUser( IServerUserItem *pRcvServerUserItem ) { for ( INT_PTR nUserIdx = 0; nUserIdx < m_ApplyUserArrary.GetCount(); ++nUserIdx ) { tagApplyUserInfo ApplyUserInfo = m_ApplyUserArrary[ nUserIdx ]; //获取玩家 IServerUserItem *pServerUserItem = m_pITableFrame->GetServerUserItem( ApplyUserInfo.wChairID ); if ( ! pServerUserItem ) continue; //构造变量 CMD_S_ApplyBanker ApplyBanker; CopyMemory( ApplyBanker.szAccount, pServerUserItem->GetAccounts(), sizeof( ApplyBanker.szAccount ) ); ApplyBanker.lScore = pServerUserItem->GetUserScore()->lScore; ApplyBanker.bApplyBanker = true; //发送消息 m_pITableFrame->SendUserData( pRcvServerUserItem, SUB_S_APPLY_BANKER, &ApplyBanker, sizeof( ApplyBanker ) ); } } //更换庄家 void CTableFrameSink::ChangeBanker() { //读取配置 TCHAR szPath[MAX_PATH]=TEXT(""); GetCurrentDirectory(sizeof(szPath),szPath); //读取配置 TCHAR szFileName[MAX_PATH]; _snprintf(szFileName,sizeof(szFileName),TEXT("%s\\BaccaratConfig.ini"),szPath); //读取分数 m_lApplyBankerCondition = GetPrivateProfileInt( TEXT("BankerCondition"), TEXT("Score"), 10000000, szFileName ); m_lAreaLimitScore = GetPrivateProfileInt( TEXT("BankerCondition"), TEXT("AreaLimitScore"), 1000000000, szFileName ); //递增次数 m_cbBankerTimer++; //轮庄判断 if ( m_CurrentBanker.dwUserID != 0 ) { //轮换判断 bool bChangeBanker = false; IServerUserItem *pBankerUserItem = m_pITableFrame->GetServerUserItem(m_CurrentBanker.wChairID); LONG lBankerScore = pBankerUserItem->GetUserScore()->lScore+pBankerUserItem->GetUserData()->lStorageScore; for ( WORD wApplyUserIndex = 0; wApplyUserIndex < m_ApplyUserArrary.GetCount(); ++wApplyUserIndex ) { tagApplyUserInfo &ApplyUserInfo = m_ApplyUserArrary[ wApplyUserIndex ]; IServerUserItem *pApplyUserItem = m_pITableFrame->GetServerUserItem(ApplyUserInfo.wChairID); LONG lApplyUserScore = pApplyUserItem->GetUserScore()->lScore+pApplyUserItem->GetUserData()->lStorageScore; if ( lBankerScore < lApplyUserScore ) { bChangeBanker = true; break; } } //次数判断 if ( bChangeBanker && 20 GetServerUserItem( m_CurrentBanker.wChairID ); OnUserApplyBanker( pServerUserItem->GetUserData(), false ) ; //重新赋值 ZeroMemory( &m_CurrentBanker, sizeof( m_CurrentBanker ) ); while( ! m_ApplyUserArrary.IsEmpty() ) { m_CurrentBanker = m_ApplyUserArrary[ 0 ]; //合法判断 if ( m_CurrentBanker.lUserScore < m_lApplyBankerCondition ) { ZeroMemory( &m_CurrentBanker, sizeof( m_CurrentBanker ) ); //获取玩家 IServerUserItem *pServerUserItem = m_pITableFrame->GetServerUserItem( m_ApplyUserArrary[ 0 ].wChairID ); if ( pServerUserItem ) OnUserApplyBanker( pServerUserItem->GetUserData(), false ); } else break; } } } else if ( 0 < m_ApplyUserArrary.GetCount() ) { while( ! m_ApplyUserArrary.IsEmpty() ) { m_CurrentBanker = m_ApplyUserArrary[ 0 ]; //合法判断 if ( m_CurrentBanker.lUserScore < m_lApplyBankerCondition ) { ZeroMemory( &m_CurrentBanker, sizeof( m_CurrentBanker ) ); //获取玩家 IServerUserItem *pServerUserItem = m_pITableFrame->GetServerUserItem( m_ApplyUserArrary[ 0 ].wChairID ); if ( pServerUserItem ) OnUserApplyBanker( pServerUserItem->GetUserData(), false ); } else break; } m_cbBankerTimer = 0; m_lBankerWinScore=0; m_bCancelBanker = false; } } //轮换庄家 void CTableFrameSink::SendChangeBankerMsg() { CMD_S_ChangeBanker ChangeBanker; for ( WORD wChairID = 0; wChairID < GAME_PLAYER; ++wChairID ) { IServerUserItem *pSeverUserItem = m_pITableFrame->GetServerUserItem( wChairID ); if ( ! pSeverUserItem ) continue; ZeroMemory( &ChangeBanker, sizeof( ChangeBanker ) ); if ( m_CurrentBanker.dwUserID != 0 ) { ChangeBanker.wChairID = m_CurrentBanker.wChairID; ChangeBanker.lBankerTreasure = m_CurrentBanker.lUserScore; } else { ChangeBanker.wChairID = INVALID_CHAIR; } ChangeBanker.lBankerScore = m_CurrentBanker.lUserScore; ChangeBanker.cbBankerTime = m_cbBankerTimer; //我的下注 m_pITableFrame->SendTableData( wChairID, SUB_S_CHANGE_BANKER, &ChangeBanker, sizeof( ChangeBanker ) ); m_pITableFrame->SendLookonData( wChairID, SUB_S_CHANGE_BANKER, &ChangeBanker, sizeof( ChangeBanker ) ); } } //用户断线 bool __cdecl CTableFrameSink::OnActionUserOffLine(WORD wChairID, IServerUserItem * pIServerUserItem) { return true; } //最大下注 LONG CTableFrameSink::GetMaxPlayerScore(WORD wChairID) { //其他区域 LONG lOtherAreaScore = m_lBankerScore+ m_lTieScore+ m_lTieSamePointScore+ m_lBankerKingScore; IServerUserItem *pServerUserItem = m_pITableFrame->GetServerUserItem(wChairID); //最大下注 LONG lMaxPlayerScore = m_CurrentBanker.lUserScore+lOtherAreaScore; lMaxPlayerScore -= (m_lPlayerScore+m_lPlayerKingScore*2); //已下注额 LONG lNowJetton = 0; lNowJetton += m_lUserPlayerScore[wChairID]; lNowJetton += m_lUserPlayerKingScore[wChairID]; lNowJetton += m_lUserBankerScore[wChairID]; lNowJetton += m_lUserTieScore[wChairID]; lNowJetton += m_lUserTieSamePointScore[wChairID]; lNowJetton += m_lUserBankerKingScore[wChairID]; //我的下注 LONG lMeLessScore = pServerUserItem->GetUserScore()->lScore - lNowJetton; ASSERT(lMeLessScore >= 0 ); lMeLessScore = max(lMeLessScore, 0); //最大下注 LONG lMaxJetton = min(lMaxPlayerScore, lMeLessScore); LONG lAreaLimit = m_lAreaLimitScore - m_lPlayerScore; lMaxJetton = min(lMaxJetton, lAreaLimit); return lMaxJetton; } //最大下注 LONG CTableFrameSink::GetMaxPlayerKingScore(WORD wChairID) { //其他区域 LONG lOtherAreaScore = m_lBankerScore+ m_lTieScore+ m_lTieSamePointScore+ m_lBankerKingScore; IServerUserItem *pServerUserItem = m_pITableFrame->GetServerUserItem(wChairID); //最大下注 LONG lMaxPlayerScore = m_CurrentBanker.lUserScore+lOtherAreaScore; lMaxPlayerScore -= (m_lPlayerScore+m_lPlayerKingScore*2); //已下注额 LONG lNowJetton = 0; lNowJetton += m_lUserPlayerScore[wChairID]; lNowJetton += m_lUserPlayerKingScore[wChairID]; lNowJetton += m_lUserBankerScore[wChairID]; lNowJetton += m_lUserTieScore[wChairID]; lNowJetton += m_lUserTieSamePointScore[wChairID]; lNowJetton += m_lUserBankerKingScore[wChairID]; //我的下注 LONG lMeLessScore = pServerUserItem->GetUserScore()->lScore - lNowJetton; ASSERT(lMeLessScore >= 0 ); lMeLessScore = max(lMeLessScore, 0); //最大下注 LONG lMaxJetton = min(lMaxPlayerScore/2, lMeLessScore); LONG lAreaLimit = m_lAreaLimitScore - m_lPlayerKingScore; lMaxJetton = min(lMaxJetton, lAreaLimit); return lMaxJetton; } //最大下注 LONG CTableFrameSink::GetMaxBankerScore(WORD wChairID) { //其他区域 LONG lOtherAreaScore = m_lPlayerScore + m_lPlayerKingScore + m_lTieSamePointScore+ m_lTieScore; IServerUserItem *pServerUserItem = m_pITableFrame->GetServerUserItem(wChairID); //最大下注 LONG lMaxPlayerScore = lOtherAreaScore + m_CurrentBanker.lUserScore; lMaxPlayerScore -= (m_lBankerScore+m_lBankerKingScore*2); //已下注额 LONG lNowJetton = 0; lNowJetton += m_lUserPlayerScore[wChairID]; lNowJetton += m_lUserPlayerKingScore[wChairID]; lNowJetton += m_lUserBankerScore[wChairID]; lNowJetton += m_lUserTieScore[wChairID]; lNowJetton += m_lUserTieSamePointScore[wChairID]; lNowJetton += m_lUserBankerKingScore[wChairID]; //我的下注 LONG lMeLessScore = pServerUserItem->GetUserScore()->lScore - lNowJetton; ASSERT(lMeLessScore >= 0 ); lMeLessScore = max(lMeLessScore, 0); //最大下注 LONG lMaxJetton = min(lMaxPlayerScore, lMeLessScore); LONG lAreaLimit = m_lAreaLimitScore - m_lBankerScore; lMaxJetton = min(lMaxJetton, lAreaLimit); return lMaxJetton; } //最大下注 LONG CTableFrameSink::GetMaxBankerKingScore(WORD wChairID) { //其他区域 LONG lOtherAreaScore = m_lPlayerScore + m_lPlayerKingScore + m_lTieSamePointScore+ m_lTieScore; IServerUserItem *pServerUserItem = m_pITableFrame->GetServerUserItem(wChairID); //最大下注 LONG lMaxPlayerScore = lOtherAreaScore + m_CurrentBanker.lUserScore; lMaxPlayerScore -= (m_lBankerScore+m_lBankerKingScore*2); //已下注额 LONG lNowJetton = 0; lNowJetton += m_lUserPlayerScore[wChairID]; lNowJetton += m_lUserPlayerKingScore[wChairID]; lNowJetton += m_lUserBankerScore[wChairID]; lNowJetton += m_lUserTieScore[wChairID]; lNowJetton += m_lUserTieSamePointScore[wChairID]; lNowJetton += m_lUserBankerKingScore[wChairID]; //我的下注 LONG lMeLessScore = pServerUserItem->GetUserScore()->lScore - lNowJetton; ASSERT(lMeLessScore >= 0 ); lMeLessScore = max(lMeLessScore, 0); //最大下注 LONG lMaxJetton = min(lMaxPlayerScore/2, lMeLessScore); LONG lAreaLimit = m_lAreaLimitScore - m_lBankerKingScore; lMaxJetton = min(lMaxJetton, lAreaLimit); return lMaxJetton; } //最大下注 LONG CTableFrameSink::GetMaxTieScore(WORD wChairID) { IServerUserItem *pServerUserItem = m_pITableFrame->GetServerUserItem(wChairID); //最大下注 LONG lMaxTieScore = m_CurrentBanker.lUserScore; lMaxTieScore -= (m_lTieScore * 8 + m_lTieSamePointScore * 33); //已下注额 LONG lNowJetton = 0; lNowJetton += m_lUserPlayerScore[wChairID]; lNowJetton += m_lUserPlayerKingScore[wChairID]; lNowJetton += m_lUserBankerScore[wChairID]; lNowJetton += m_lUserTieScore[wChairID]; lNowJetton += m_lUserTieSamePointScore[wChairID]; lNowJetton += m_lUserBankerKingScore[wChairID]; //我的下注 LONG lMeLessScore = pServerUserItem->GetUserScore()->lScore - lNowJetton; ASSERT(lMeLessScore >= 0 ); lMeLessScore = max(lMeLessScore, 0); //最大下注 LONG lMaxJetton = min(lMaxTieScore/8, lMeLessScore); LONG lAreaLimit = m_lAreaLimitScore - m_lTieScore; lMaxJetton = min(lMaxJetton, lAreaLimit); return lMaxJetton; } //最大下注 LONG CTableFrameSink::GetMaxTieKingScore(WORD wChairID) { IServerUserItem *pServerUserItem = m_pITableFrame->GetServerUserItem(wChairID); //最大下注 LONG lMaxTieScore = m_CurrentBanker.lUserScore; lMaxTieScore -= (m_lTieScore * 8 + m_lTieSamePointScore * 33); //已下注额 LONG lNowJetton = 0; lNowJetton += m_lUserPlayerScore[wChairID]; lNowJetton += m_lUserPlayerKingScore[wChairID]; lNowJetton += m_lUserBankerScore[wChairID]; lNowJetton += m_lUserTieScore[wChairID]; lNowJetton += m_lUserTieSamePointScore[wChairID]; lNowJetton += m_lUserBankerKingScore[wChairID]; //我的下注 LONG lMeLessScore = pServerUserItem->GetUserScore()->lScore - lNowJetton; ASSERT(lMeLessScore >= 0 ); lMeLessScore = max(lMeLessScore, 0); //最大下注 LONG lMaxJetton = min(lMaxTieScore/33, lMeLessScore); LONG lAreaLimit = m_lAreaLimitScore - m_lTieSamePointScore; lMaxJetton = min(lMaxJetton, lAreaLimit); return lMaxJetton; } //计算得分 void CTableFrameSink::CalculateScore() { //结束消息 CMD_S_GameScore GameScore; ZeroMemory(&GameScore,sizeof(GameScore)); //变量定义 LONG cbRevenue=m_pGameServiceOption->wRevenue; //计算牌点 BYTE cbPlayerCount=m_GameLogic.GetCardListPip(m_cbTableCardArray[INDEX_PLAYER],m_cbCardCount[INDEX_PLAYER]); BYTE cbBankerCount=m_GameLogic.GetCardListPip(m_cbTableCardArray[INDEX_BANKER],m_cbCardCount[INDEX_BANKER]); //推断玩家 DeduceWinner(GameScore.cbWinner, GameScore.cbKingWinner); //<em>游戏</em>记录 tagServerGameRecord &GameRecord = m_GameRecordArrary[m_nRecordLast]; GameRecord.cbBankerCount = cbBankerCount; GameRecord.cbPlayerCount = cbPlayerCount; GameRecord.lBankerScore = m_lBankerScore; GameRecord.lPlayerScore = m_lPlayerScore; GameRecord.lTieScore = m_lTieScore; GameRecord.wWinner = GameScore.cbWinner; //移动下标 m_nRecordLast = (m_nRecordLast+1) % MAX_SCORE_HISTORY; if ( m_nRecordLast == m_nRecordFirst ) m_nRecordFirst = (m_nRecordFirst+1) % MAX_SCORE_HISTORY; //庄家总量 LONG lBankerWinScore = 0; //玩家成绩 ZeroMemory(m_lUserWinScore, sizeof(m_lUserWinScore)); ZeroMemory(m_lUserReturnScore, sizeof(m_lUserReturnScore)); ZeroMemory(m_lUserRevenue, sizeof(m_lUserRevenue)); LONG lUserLostScore[GAME_PLAYER]; ZeroMemory(lUserLostScore, sizeof(lUserLostScore)); //玩家下注 LONG *pUserScore[] = {NULL, m_lUserPlayerScore, m_lUserTieScore, m_lUserBankerScore, m_lUserPlayerKingScore, m_lUserBankerKingScore, m_lUserTieSamePointScore}; //区域倍率 BYTE cbMultiple[] = {0, 1, 8, 1, 2, 2, 33}; //计算积分 for (WORD i=0;iGetServerUserItem(i); if (pIServerUserItem==NULL) continue; for ( WORD wAreaIndex = ID_XIAN_JIA; wAreaIndex < m_lUserWinScore[i] ) { m_lUserRevenue[i] = m_lUserWinScore[i]*cbRevenue/100L; m_lUserWinScore[i] -= m_lUserRevenue[i]; } //总的分数 m_lUserWinScore[i] += lUserLostScore[i]; } //庄家成绩 if ( m_CurrentBanker.dwUserID != 0 ) { WORD wBankerChairID = m_CurrentBanker.wChairID; m_lUserWinScore[wBankerChairID] = lBankerWinScore; //计算税收 if ( 0 < m_lUserWinScore[wBankerChairID] ) { m_lUserRevenue[wBankerChairID] = m_lUserWinScore[wBankerChairID]*cbRevenue/100L; m_lUserWinScore[wBankerChairID] -= m_lUserRevenue[wBankerChairID]; lBankerWinScore = m_lUserWinScore[wBankerChairID]; } IServerUserItem *pBankerUserItem = m_pITableFrame->GetServerUserItem(wBankerChairID); //累计积分 m_lBankerWinScore += lBankerWinScore; } //买注总量 GameScore.lDrawTieScore=m_lTieScore; GameScore.lDrawBankerScore=m_lBankerScore; GameScore.lDrawPlayerScore=m_lPlayerScore; GameScore.lDrawTieSamPointScore = m_lTieSamePointScore; GameScore.lDrawBankerKingScore = m_lBankerKingScore; GameScore.lDrawPlayerKingScore = m_lPlayerKingScore; GameScore.lBankerScore = lBankerWinScore; //发送积分 for ( WORD wUserIndex = 0; wUserIndex < GAME_PLAYER; ++wUserIndex ) { IServerUserItem *pIServerUserItem = m_pITableFrame->GetServerUserItem(wUserIndex); if ( pIServerUserItem == NULL ) continue; //我的下注 GameScore.lMeTieScore=m_lUserTieScore[wUserIndex]; GameScore.lMeBankerScore=m_lUserBankerScore[wUserIndex]; GameScore.lMePlayerScore=m_lUserPlayerScore[wUserIndex]; GameScore.lMeTieKingScore = m_lUserTieSamePointScore[wUserIndex]; GameScore.lMeBankerKingScore = m_lUserBankerKingScore[wUserIndex]; GameScore.lMePlayerKingScore = m_lUserPlayerKingScore[wUserIndex]; //发送消息 GameScore.lMeGameScore=m_lUserWinScore[wUserIndex]; GameScore.lMeReturnScore = m_lUserReturnScore[wUserIndex]; m_pITableFrame->SendTableData(wUserIndex,SUB_S_GAME_SCORE,&GameScore,sizeof(GameScore)); m_pITableFrame->SendLookonData(wUserIndex,SUB_S_GAME_SCORE,&GameScore,sizeof(GameScore)); } return ; } //推断赢家 void CTableFrameSink::DeduceWinner(BYTE &cbWinner, BYTE &cbKingWinner) { cbWinner = 0; cbKingWinner = 0; //计算牌点 BYTE cbPlayerCount=m_GameLogic.GetCardListPip(m_cbTableCardArray[INDEX_PLAYER],m_cbCardCount[INDEX_PLAYER]); BYTE cbBankerCount=m_GameLogic.GetCardListPip(m_cbTableCardArray[INDEX_BANKER],m_cbCardCount[INDEX_BANKER]); //胜利玩家 if (cbPlayerCount==cbBankerCount) { cbWinner=ID_PING_JIA; //同点平判断 bool bAllPointSame = false; if ( m_cbCardCount[INDEX_PLAYER] == m_cbCardCount[INDEX_BANKER] ) { for (WORD wCardIndex = 0; wCardIndex < m_cbCardCount[INDEX_PLAYER]; ++wCardIndex ) { BYTE cbBankerValue = m_GameLogic.GetCardValue(m_cbTableCardArray[INDEX_BANKER][wCardIndex]); BYTE cbPlayerValue = m_GameLogic.GetCardValue(m_cbTableCardArray[INDEX_PLAYER][wCardIndex]); if ( cbBankerValue != cbPlayerValue ) break; } if ( wCardIndex == m_cbCardCount[INDEX_PLAYER] ) bAllPointSame = true; } if ( bAllPointSame ) cbKingWinner = ID_TONG_DIAN_PING; } else if (cbPlayerCount<cbBankerCount) { cbWinner=ID_ZHUANG_JIA; //天王判断 if ( cbBankerCount == 8 || cbBankerCount == 9 ) cbKingWinner = ID_ZHUANG_TIAN_WANG; } else { cbWinner=ID_XIAN_JIA; //天王判断 if ( cbPlayerCount == 8 || cbPlayerCount == 9 ) cbKingWinner = ID_XIAN_TIAN_WANG; } } //////////////////////////////////////////////////////////////////////////
网狐棋牌游戏国际象棋游戏源码
#include "StdAfx.h" #include "TableFrameSink.h" ////////////////////////////////////////////////////////////////////////// //宏定义 #define GAME_CLOCK 600 //<em>游戏</em>局时 ////////////////////////////////////////////////////////////////////////// //静态变量 const WORD CTableFrameSink::m_wPlayerCount=GAME_PLAYER; //<em>游戏</em>人数 const enStartMode CTableFrameSink::m_GameStartMode=enStartMode_AllReady; //开始模式 ////////////////////////////////////////////////////////////////////////// //构造函数 CTableFrameSink::CTableFrameSink() { //时间变量 m_dwLastClock=0L; memset(m_wLeftClock,0,sizeof(m_wLeftClock)); //用户状态 m_wBlackUser=0; m_wCurrentUser=INVALID_CHAIR; memset(m_cbBegStatus,0,sizeof(m_cbBegStatus)); memset(m_cbPeaceCount,0,sizeof(m_cbPeaceCount)); memset(m_cbRegretCount,0,sizeof(m_cbRegretCount)); //组件变量 m_pITableFrame=NULL; m_pGameServiceOption=NULL; return; } //析构函数 CTableFrameSink::~CTableFrameSink(void) { } //接口查询 void * __cdecl CTableFrameSink::QueryInterface(const IID & Guid, DWORD dwQueryVer) { QUERYINTERFACE(ITableFrameSink,Guid,dwQueryVer); QUERYINTERFACE_IUNKNOWNEX(ITableFrameSink,Guid,dwQueryVer); return NULL; } //初始化 bool __cdecl CTableFrameSink::InitTableFrameSink(IUnknownEx * pIUnknownEx) { //查询接口 ASSERT(pIUnknownEx!=NULL); m_pITableFrame=QUERY_OBJECT_PTR_INTERFACE(pIUnknownEx,ITableFrame); if (m_pITableFrame==NULL) return false; //获取参数 m_pGameServiceOption=m_pITableFrame->GetGameServiceOption(); ASSERT(m_pGameServiceOption!=NULL); return true; } //复位桌子 void __cdecl CTableFrameSink::RepositTableFrameSink() { //时间变量 m_dwLastClock=0L; memset(m_wLeftClock,0,sizeof(m_wLeftClock)); //用户状态 m_wCurrentUser=INVALID_CHAIR; memset(m_cbBegStatus,0,sizeof(m_cbBegStatus)); memset(m_cbPeaceCount,0,sizeof(m_cbPeaceCount)); memset(m_cbRegretCount,0,sizeof(m_cbRegretCount)); return; } //开始模式 enStartMode __cdecl CTableFrameSink::GetGameStartMode() { return m_GameStartMode; } //<em>游戏</em>状态 bool __cdecl CTableFrameSink::IsUserPlaying(WORD wChairID) { return true; } //<em>游戏</em>开始 bool __cdecl CTableFrameSink::OnEventGameStart() { //设置变量 m_wCurrentUser=m_wBlackUser; m_dwLastClock=(DWORD)time(NULL); m_wLeftClock[0]=m_wLeftClock[1]=GAME_CLOCK; //重置棋盘 m_GameLogic.ResetChessBorad(); //设置状态 m_pITableFrame->SetGameStatus(GS_PLAYING); //发送开始 CMD_S_GameStart GameStart; GameStart.wGameClock=GAME_CLOCK; GameStart.wBlackUser=m_wBlackUser; m_pITableFrame->SendTableData(INVALID_CHAIR,SUB_S_GAME_START,&GameStart,sizeof(GameStart)); m_pITableFrame->SendLookonData(INVALID_CHAIR,SUB_S_GAME_START,&GameStart,sizeof(GameStart)); return true; } //<em>游戏</em>结束 bool __cdecl CTableFrameSink::OnEventGameEnd(WORD wChairID, IServerUserItem * pIServerUserItem, BYTE cbReason) { switch (cbReason) { case GER_NORMAL: //常规结束 { //变量定义 CMD_S_GameEnd GameEnd; GameEnd.wWinUser=wChairID; //计算分差 LONG lUserScore[2]; IServerUserItem * pIServerUserItem1=m_pITableFrame->GetServerUserItem(0); IServerUserItem * pIServerUserItem2=m_pITableFrame->GetServerUserItem(1); lUserScore[0]=pIServerUserItem1->GetUserData()->UserScoreInfo.lScore; lUserScore[1]=pIServerUserItem2->GetUserData()->UserScoreInfo.lScore; LONG lScoreMargin=(lUserScore[0]>lUserScore[1])?(lUserScore[0]-lUserScore[1]):(lUserScore[1]-lUserScore[0]); //计算积分 if (wChairID!=INVALID_CHAIR) { //赢棋算分 WORD wWinUser=wChairID; WORD wLostUser=(wChairID+1)%GAME_PLAYER; if (lScoreMargin=lUserScore[wLostUser]) { GameEnd.lUserScore[wWinUser]=10L-lScoreMargin/10L; GameEnd.lUserScore[wLostUser]=-GameEnd.lUserScore[wWinUser]; } else { GameEnd.lUserScore[wWinUser]=10L+lScoreMargin/10L; GameEnd.lUserScore[wLostUser]=-GameEnd.lUserScore[wWinUser]; } } else if (lScoreMarginWriteUserScore((WORD)0, GameEnd.lUserScore[0], 0, wWinUser == 0 ? enScoreKind_Win : enScoreKind_Lost ); m_pITableFrame->WriteUserScore((WORD)1, GameEnd.lUserScore[1], 0, wWinUser == 1 ? enScoreKind_Win : enScoreKind_Lost ); } else { //和棋算分 if (lScoreMarginWriteUserScore((WORD)0, GameEnd.lUserScore[0], 0, enScoreKind_Draw ); m_pITableFrame->WriteUserScore((WORD)1, GameEnd.lUserScore[1], 0, enScoreKind_Draw ); } //发送消息 m_pITableFrame->SendTableData(INVALID_CHAIR,SUB_S_GAME_END,&GameEnd,sizeof(GameEnd)); m_pITableFrame->SendLookonData(INVALID_CHAIR,SUB_S_GAME_END,&GameEnd,sizeof(GameEnd)); //结束<em>游戏</em> m_pITableFrame->ConcludeGame(); //切换用户 m_wBlackUser=(m_wBlackUser+1)%GAME_PLAYER; return true; } case GER_USER_LEFT: //用户强退 { //更改积分 LONG lScore = -30L; m_pITableFrame->WriteUserScore(wChairID,lScore, 0, enScoreKind_Flee); //发送消息 CMD_S_GameEnd GameEnd; memset(&GameEnd,0,sizeof(GameEnd)); GameEnd.wWinUser=INVALID_CHAIR; GameEnd.lUserScore[wChairID]=lScore; //发送消息 m_pITableFrame->SendTableData(INVALID_CHAIR,SUB_S_GAME_END,&GameEnd,sizeof(GameEnd)); m_pITableFrame->SendLookonData(INVALID_CHAIR,SUB_S_GAME_END,&GameEnd,sizeof(GameEnd)); //结束<em>游戏</em> m_pITableFrame->ConcludeGame(); //切换用户 m_wBlackUser=(m_wBlackUser+1)%GAME_PLAYER; return true; } } //效验结果 ASSERT(FALSE); return false; } //发送场景 bool __cdecl CTableFrameSink::SendGameScene(WORD wChiarID, IServerUserItem * pIServerUserItem, BYTE cbGameStation, bool bSendSecret) { switch (cbGameStation) { case GS_FREE: //空闲状态 { //构造数据 CMD_S_StatusFree StatusFree; memset(&StatusFree,0,sizeof(StatusFree)); StatusFree.wBlackUser=m_wBlackUser; //发送场景 return m_pITableFrame->SendGameScene(pIServerUserItem,&StatusFree,sizeof(StatusFree)); } case GS_PLAYING: //<em>游戏</em>状态 { //发送棋谱 WORD wBufferSize=0; BYTE cbBuffer[SOCKET_PACKET]; for (INT_PTR i=0;isizeof(cbBuffer)) { m_pITableFrame->SendUserData(pIServerUserItem,SUB_S_CHESS_MANUAL,cbBuffer,wBufferSize); wBufferSize=0; } CopyMemory(cbBuffer+wBufferSize,&m_GameLogic.m_ChessManualInfo[i],sizeof(tagChessManual)); wBufferSize+=sizeof(tagChessManual); } if (wBufferSize>0) m_pITableFrame->SendUserData(pIServerUserItem,SUB_S_CHESS_MANUAL,cbBuffer,wBufferSize); //构造场景 CMD_S_StatusPlay StatusPlay; memset(&StatusPlay,0,sizeof(StatusPlay)); //设置场景 StatusPlay.wGameClock=GAME_CLOCK; StatusPlay.wBlackUser=m_wBlackUser; StatusPlay.wCurrentUser=m_wCurrentUser; CopyMemory(StatusPlay.cbBegStatus,m_cbBegStatus,sizeof(m_cbBegStatus)); CopyMemory(StatusPlay.ChessItemArray,m_GameLogic.m_ChessItem,sizeof(StatusPlay.ChessItemArray)); CopyMemory(StatusPlay.wChessStepCount,m_GameLogic.m_wStepCount,sizeof(StatusPlay.wChessStepCount)); //时间变量 for (WORD i=0;iwUserClock) StatusPlay.wLeftClock[i]=m_wLeftClock[i]-wUserClock; } else StatusPlay.wLeftClock[i]=m_wLeftClock[i]; } //发送场景 return m_pITableFrame->SendGameScene(pIServerUserItem,&StatusPlay,sizeof(StatusPlay)); } } return false; } //定时器事件 bool __cdecl CTableFrameSink::OnTimerMessage(WORD wTimerID, WPARAM wBindParam) { return false; } //<em>游戏</em>消息处理 bool __cdecl CTableFrameSink::OnGameMessage(WORD wSubCmdID, const void * pDataBuffer, WORD wDataSize, IServerUserItem * pIServerUserItem) { switch (wSubCmdID) { case SUB_C_MOVE_CHESS: //移动棋子 { //效验数据 ASSERT(wDataSize==sizeof(CMD_C_MoveChess)); if (wDataSize!=sizeof(CMD_C_MoveChess)) return false; //用户效验 tagServerUserData * pUserData=pIServerUserItem->GetUserData(); if (pUserData->cbUserStatus!=US_PLAY) return true; //消息处理 CMD_C_MoveChess * pMoveChess=(CMD_C_MoveChess *)pDataBuffer; return OnUserMoveChess(pUserData->wChairID,pMoveChess->cbXSourcePos,pMoveChess->cbYSourcePos,pMoveChess->cbXTargetPos,pMoveChess->cbYTargetPos,pMoveChess->cbSwitchChess); } case SUB_C_REGRET_REQ: //悔棋请求 { //用户效验 tagServerUserData * pUserData=pIServerUserItem->GetUserData(); if (pUserData->cbUserStatus!=US_PLAY) return true; //消息处理 return OnUserRegretReq(pUserData->wChairID); } case SUB_C_REGRET_ANSWER: //悔棋应答 { //效验数据 ASSERT(wDataSize==sizeof(CMD_C_RegretAnswer)); if (wDataSize!=sizeof(CMD_C_RegretAnswer)) return false; //用户效验 tagServerUserData * pUserData=pIServerUserItem->GetUserData(); if (pUserData->cbUserStatus!=US_PLAY) return true; //消息处理 CMD_C_RegretAnswer * pRegretAnswer=(CMD_C_RegretAnswer *)pDataBuffer; return OnUserRegretAnswer(pUserData->wChairID,pRegretAnswer->cbApprove); } case SUB_C_PEACE_REQ: //求和请求 { //用户效验 tagServerUserData * pUserData=pIServerUserItem->GetUserData(); if (pUserData->cbUserStatus!=US_PLAY) return true; //消息处理 return OnUserPeaceReq(pUserData->wChairID); } case SUB_C_PEACE_ANSWER: //求和应答 { //效验数据 ASSERT(wDataSize==sizeof(CMD_C_PeaceAnswer)); if (wDataSize!=sizeof(CMD_C_PeaceAnswer)) return false; //用户效验 tagServerUserData * pUserData=pIServerUserItem->GetUserData(); if (pUserData->cbUserStatus!=US_PLAY) return true; //消息处理 CMD_C_PeaceAnswer * pPeaceAnswer=(CMD_C_PeaceAnswer *)pDataBuffer; return OnUserPeaceAnswer(pUserData->wChairID,pPeaceAnswer->cbApprove); } case SUB_C_GIVEUP_REQ: //认输请求 { //用户效验 tagServerUserData * pUserData=pIServerUserItem->GetUserData(); if (pUserData->cbUserStatus!=US_PLAY) return true; //消息处理 return OnUserGiveUp(pUserData->wChairID); } } return false; } //框架消息处理 bool __cdecl CTableFrameSink::OnFrameMessage(WORD wSubCmdID, const void * pDataBuffer, WORD wDataSize, IServerUserItem * pIServerUserItem) { return false; } //移动棋子 bool CTableFrameSink::OnUserMoveChess(WORD wChairID, BYTE cbXSourcePos, BYTE cbYSourcePos, BYTE cbXTargetPos, BYTE cbYTargetPos, BYTE cbSwitchChess) { //<em>游戏</em>状态 if (m_pITableFrame->GetGameStatus()!=GS_PLAYING) return true; //效验参数 ASSERT((cbXSourcePos=8)||(cbYSourcePos>=8)) return false; if ((cbXTargetPos>=8)||(cbYTargetPos>=8)) return false; //效验用户 ASSERT(m_wCurrentUser==wChairID); if (m_wCurrentUser!=wChairID) return false; //点棋判断 BYTE cbUserColor=(wChairID==m_wBlackUser)?BLACK_CHESS:WHITE_CHESS; const tagChessItem * pSourceChessItem=m_GameLogic.GetChessItem(cbXSourcePos,cbYSourcePos); ASSERT((pSourceChessItem!=NULL)&&(pSourceChessItem->cbColor==cbUserColor)); if ((pSourceChessItem==NULL)||(pSourceChessItem->cbColor!=cbUserColor)) return false; //移动棋子 if (m_GameLogic.IsWalkLegality(cbXSourcePos,cbYSourcePos,cbXTargetPos,cbYTargetPos)==false) return false; if (m_GameLogic.MoveChess(cbXSourcePos,cbYSourcePos,cbXTargetPos,cbYTargetPos,cbSwitchChess)==enMoveType_Error) return false; //结束判断 bool bGameEnd=m_GameLogic.IsGameFinish((m_wCurrentUser==m_wBlackUser)?WHITE_CHESS:BLACK_CHESS); //计算时间 DWORD dwNowClock=(DWORD)time(NULL); WORD wUseClock=(WORD)(dwNowClock-m_dwLastClock); m_dwLastClock=dwNowClock; m_wLeftClock[m_wCurrentUser]-=__min(wUseClock,m_wLeftClock[m_wCurrentUser]); //切换用户 m_wCurrentUser=(m_wCurrentUser+1)%GAME_PLAYER; //构造数据 CMD_S_MoveChess MoveChess; MoveChess.cbXSourcePos=cbXSourcePos; MoveChess.cbYSourcePos=cbYSourcePos; MoveChess.cbXTargetPos=cbXTargetPos; MoveChess.cbYTargetPos=cbYTargetPos; MoveChess.cbSwitchChess=cbSwitchChess; MoveChess.wCurrentUser=m_wCurrentUser; CopyMemory(MoveChess.wLeftClock,m_wLeftClock,sizeof(MoveChess.wLeftClock)); //发送消息 m_pITableFrame->SendTableData(INVALID_CHAIR,SUB_S_MOVE_CHESS,&MoveChess,sizeof(MoveChess)); m_pITableFrame->SendLookonData(INVALID_CHAIR,SUB_S_MOVE_CHESS,&MoveChess,sizeof(MoveChess)); //结束<em>游戏</em> if (bGameEnd==true) OnEventGameEnd(wChairID,NULL,GER_NORMAL); return true; } //悔棋请求 bool CTableFrameSink::OnUserRegretReq(WORD wChairID) { //<em>游戏</em>状态 if (m_pITableFrame->GetGameStatus()!=GS_PLAYING) return true; //状态判断 if ((m_cbBegStatus[wChairID]&GU_WAIT_REGRET)!=0) return false; if (m_GameLogic.GetStepCount((wChairID==m_wBlackUser)?BLACK_CHESS:WHITE_CHESS)==0) return false; //判断次数 if (m_cbRegretCount[wChairID]==5) { //发送消息 CMD_S_RegretFaile RegretFaile; RegretFaile.cbFaileReason=FR_COUNT_LIMIT; m_pITableFrame->SendTableData(wChairID,SUB_S_REGRET_FAILE,&RegretFaile,sizeof(RegretFaile)); //系统消息 LPCTSTR pszMessage=TEXT("你已经请求 [ 悔棋 ] 超过 5 次了,不能再次悔棋。"); IServerUserItem * pIServerUserItem=m_pITableFrame->GetServerUserItem(wChairID); m_pITableFrame->SendGameMessage(pIServerUserItem,pszMessage,SMT_INFO); return true; } //设置变量 m_cbRegretCount[wChairID]++; m_cbBegStatus[wChairID]|=GU_WAIT_REGRET; //发送消息 m_pITableFrame->SendTableData((wChairID+1)%GAME_PLAYER,SUB_S_REGRET_REQ); return true; } //悔棋应答 bool CTableFrameSink::OnUserRegretAnswer(WORD wChairID, BYTE cbApprove) { //<em>游戏</em>状态 if (m_pITableFrame->GetGameStatus()!=GS_PLAYING) return true; //状态判断 WORD wRegretUser=(wChairID+1)%GAME_PLAYER; if ((m_cbBegStatus[wRegretUser]&GU_WAIT_REGRET)==0) return false; //设置变量 m_cbBegStatus[wRegretUser]&=~GU_WAIT_REGRET; //消息处理 if (cbApprove==FALSE) { CMD_S_RegretFaile RegretFaile; RegretFaile.cbFaileReason=FR_PLAYER_OPPOSE; m_pITableFrame->SendTableData(wRegretUser,SUB_S_REGRET_FAILE,&RegretFaile,sizeof(RegretFaile)); return true; } //构造数据 CMD_S_RegretResult RegretResult; memset(&RegretResult,0,sizeof(RegretResult)); //计算次数 WORD wStepCount=m_GameLogic.GetStepCount((wRegretUser==m_wBlackUser)?BLACK_CHESS:WHITE_CHESS); if (wStepCount>0) RegretResult.cbRegretCount++; wStepCount=m_GameLogic.GetStepCount((wChairID==m_wBlackUser)?BLACK_CHESS:WHITE_CHESS); if ((wRegretUser==m_wCurrentUser)&&(wStepCount>0)) RegretResult.cbRegretCount++; //悔棋操作 m_GameLogic.RegretChess(RegretResult.cbRegretCount); //计算时间 DWORD dwNowClock=(DWORD)time(NULL); WORD wUseClock=(WORD)(dwNowClock-m_dwLastClock); m_wLeftClock[m_wCurrentUser]-=__min(wUseClock,m_wLeftClock[m_wCurrentUser]); CopyMemory(RegretResult.wLeftClock,m_wLeftClock,sizeof(RegretResult.wLeftClock)); //切换用户 m_wCurrentUser=(m_wCurrentUser+RegretResult.cbRegretCount)%GAME_PLAYER; RegretResult.wRegretUser=wRegretUser; RegretResult.wCurrentUser=m_wCurrentUser; //发送消息 m_pITableFrame->SendTableData(INVALID_CHAIR,SUB_S_REGRET_RESULT,&RegretResult,sizeof(RegretResult)); m_pITableFrame->SendLookonData(INVALID_CHAIR,SUB_S_REGRET_RESULT,&RegretResult,sizeof(RegretResult)); return true; } //求和请求 bool CTableFrameSink::OnUserPeaceReq(WORD wChairID) { //<em>游戏</em>状态 if (m_pITableFrame->GetGameStatus()!=GS_PLAYING) return true; //用户状态 ASSERT((m_cbBegStatus[wChairID]&GU_WAIT_PEACE)==0); if ((m_cbBegStatus[wChairID]&GU_WAIT_PEACE)!=0) return false; //求和次数 if (m_cbPeaceCount[wChairID]>=3) { LPCTSTR pszMessage=TEXT("你的 [ 求和 ] 次数已经超过 3 次了,请求不能处理。"); IServerUserItem * pIServerUserItem=m_pITableFrame->GetServerUserItem(wChairID); m_pITableFrame->SendGameMessage(pIServerUserItem,pszMessage,SMT_INFO); return true; } //设置变量 m_cbPeaceCount[wChairID]++; m_cbBegStatus[wChairID]|=GU_WAIT_PEACE; //发送消息 m_pITableFrame->SendTableData((wChairID+1)%GAME_PLAYER,SUB_S_PEACE_REQ); return true; } //求和应答 bool CTableFrameSink::OnUserPeaceAnswer(WORD wChairID, BYTE cbApprove) { //<em>游戏</em>状态 if (m_pITableFrame->GetGameStatus()!=GS_PLAYING) return true; //用户状态 WORD wPeaceUser=(wChairID+1)%GAME_PLAYER; if ((m_cbBegStatus[wPeaceUser]&GU_WAIT_PEACE)==0) return true; //设置变量 m_cbBegStatus[wPeaceUser]&=~GU_WAIT_PEACE; //消息处理 if (cbApprove==FALSE) m_pITableFrame->SendTableData(wPeaceUser,SUB_S_PEACE_ANSWER); else OnEventGameEnd(INVALID_CHAIR,NULL,GER_NORMAL); return true; } //认输事件 bool CTableFrameSink::OnUserGiveUp(WORD wChairID) { //<em>游戏</em>状态 if (m_pITableFrame->GetGameStatus()!=GS_PLAYING) return true; //结束<em>游戏</em> OnEventGameEnd((wChairID+1)%GAME_PLAYER,NULL,GER_NORMAL); return true; } //////////////////////////////////////////////////////////////////////////
网狐游戏源码--港式五张
<em>网狐</em><em>游戏</em>源码,用VS NET 2003编译无错, 要全部的网站源码和<em>游戏</em>代码可加我QQ,898114195
Axis Soap服务架设
Axis1 Soap<em>服务</em>的<em>架设</em> 1.用java写接口   2.使用Java 2 wsdl生成wsdl文件   把接口和接口中所有用到的所有的类的字节码放到该目录下(自己建目录com/..)   双击bat就会产生wsdl。   3.使用wsdl 2 java生成Soap<em>服务</em>代码   生成的wsdl的参数名称是自动生成的,而不是在java接口中自己定义的参数名称。需要手...
tomcat服务架设问题
我想把我们公司平台的<em>服务</em><em>架设</em>到 tomcat 里 需要做哪些步骤呢?
如何架设游戏服务
我有一套棋牌<em>游戏</em>的代码,请问如何<em>架设</em><em>游戏</em><em>服务</em>器。
游戏架设软件fsgs
大家若是星际迷的话应该经常联机吧?在局域网还好办,但在Internet那怎么办呢?其实我们可以使用一个叫做FSGS(Free Standard Game Server)的软件来搭建战网。这个软件不但支持《星际争霸》它还同时支持《C&C》、《魔兽争霸》《雷神之锤》等<em>游戏</em>。现在就让我来介绍一下它的设置吧
网狐6602数据库脚本
<em>网狐</em>6602<em>数据库</em>脚本,绝对完整
NFS7.2服务架设
此配置SOP,主要用于redhat 7.2版的系统配置nfs<em>服务</em>配置说明。
IIS_For_WIN2003 架设 服务的软件
IIS_For_WIN2003 <em>架设</em> <em>服务</em>的软件
架设 VPN 服务
购买 VPN Server  https://cloud.digitalocean.com 需要写入一个 SSH 公钥 MAC 生成公钥方式  ssh-keygen -t rsa -C "xxx@163.com" Server 启动以后:用窗口连接到Server ssh root@192.168.xxx.xxx 回车输入密码;(这里的密码是生成 SSH 时候设置的密码) Ser
架设MTProxy服务
MTP项目地址:https://github.com/TelegramMessenger/MTProxy 按照readme操作就可以,为方便大家快速使用,可参考以下命令直接执行: git clone https://github.com/TelegramMessenger/MTProxy cd MTProxy make &amp;amp;amp;&amp;amp;amp; cd objs/bin curl -s https://...
鸟哥服务架设
linux<em>服务</em>器配置全程实录.pdf ,<em>关于</em>dns、vsftp、apache、php、磁盘处理。
每次Win2003启动时都有错误提示???
在系统<em>启动时</em>至少有一个<em>服务</em>或驱动程序产生错误。rn详细信息,请使用事件查看器查看事件日志。rn不知道是哪个<em>服务</em>的问题???
网狐678数据库
<em>网狐</em>678<em>数据库</em>,直接附加<em>数据库</em>即可!
[网狐]6603数据库说明
QPAccountsDB 用户<em>数据库</em> QPGameMatchDB   QPGameScoreDB   QPNativeWebDB   QPPlatformDB 平台<em>数据库</em> QPPlatformManagerDB   QPRecordDB           QPTreasureDB 金币数
网狐荣耀数据库
<em>网狐</em>荣耀<em>数据库</em><em>网狐</em>荣耀<em>数据库</em><em>网狐</em>荣耀<em>数据库</em><em>网狐</em>荣耀<em>数据库</em><em>网狐</em>荣耀<em>数据库</em>
tomcat启动时错误提示 ssh程序
log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester.sax).rnlog4j:WARN Please initialize the log4j system properly.rnlog4j:WARN custom level class [# è?????INFO??§??????????????????] not found.rn2009-6-26 17:24:16 org.apache.catalina.core.StandardContext startrn严重: Error listenerStartrn2009-6-26 17:24:16 org.apache.catalina.core.StandardContext startrn严重: Context [/telecom] startup failed due to previous errorsrn 1610 [ INFO][[localhost].[/telecom]] Shutting down Log4Jrn2009-6-26 17:24:16 org.apache.coyote.http11.Http11BaseProtocol startrnrn请问可能是什么原因,是少了包,还是配置问题,或者其他?
网狐 数据库存储过程解密
搭建<em>网狐</em><em>数据库</em>,一般都是直接刷<em>数据库</em>文件,.bak, mdf,等。 刷完发现储存过程都是加密的。 基于上面做二次开发,避免不了要修改存储过程,所以就要对存储过程进行解密。下面是我亲测可解开的步骤: 1,要有解密脚本
关于DHCP服务架设的问题,请帮忙?
目前我们研究院内部局域网采用固定ip的方式,比较混乱,分配一个网段是172。30。5。。。因为以后还会增加人员,我想改善一下,全部搞成自动获取的方式。如何<em>架设</em>dhcp<em>服务</em>器,专门管理研究院内部的机器,再通过交换机练到公司的大网上?
Tomcat服务启动时的问题
1:如何让Tomcat<em>服务</em>成为一个NT<em>服务</em>?rn2:我在执行Start Tomcat时,那个DOS窗口总是在那里,不会自动关闭,也不会显示完成,我手动关闭之后,Tomcat<em>服务</em>也被关掉了.rn
启动时服务问题?
<em>启动时</em>要显示驱动或<em>服务</em>出错(要等很久时间,烦啊)rn看了事件查看说是ftp,ill,smtp有问题。我在<em>服务</em>中禁止了这些<em>服务</em>还是不行。rnrn问题的开始好象是因为我在注册表的run中删loadqm这个任务。rn现在该怎么办呢?
数据库错误提示
用ADOQuery执行delete和update的SQL语句时,总出现“期待参数是1”的<em>错误提示</em>。rn大家知道是什么问题吗?我想我的SQL语句是没有错的。
Dubbo服务启动时检测
dubbo缺省值会在<em>启动时</em>检测依赖的<em>服务</em>是否可用,不可用时会抛出异常,阻止spring初始化完成,以便能及早发现问题。默认情况下check=true. 可以通过ckeck=’false’关闭检查。如下所示关闭check时,启动过程中不报错。在方法调用时报错。 http://www.springf
linux 内核编程下载
linux 内核编程,很好的一本linux内核编程参考书 相关下载链接:[url=//download.csdn.net/download/lhj0711010212/4383810?utm_source=bbsseo]//download.csdn.net/download/lhj0711010212/4383810?utm_source=bbsseo[/url]
Sybase Control Center安装使用手册下载
Sybase Control Center安装使用手册 相关下载链接:[url=//download.csdn.net/download/userhr/4951370?utm_source=bbsseo]//download.csdn.net/download/userhr/4951370?utm_source=bbsseo[/url]
facebook主机文件下载
最新可用的hosts文件列表,具体功能包括: 可访问Google大多数服务(含Google+国内服务器,YouTube视频仅IPv6支持) 可访问Facebook(需https访问) 可访问twitter(仅IPv6访问) 可访问Wiki 屏蔽Adobe激活服务器(支持CS6) 屏蔽Parallels Desktop 7激活服务器 加速Google Drive服务访问 加速苹果服务访问 加速Flickr与Dropbox服务访问 提供恶意网站和病毒网站屏蔽的最新列表 更新日期:2013-1-31 相关下载链接:[url=//download.csdn.net/download/fuzhouwqw/5068854?utm_source=bbsseo]//download.csdn.net/download/fuzhouwqw/5068854?utm_source=bbsseo[/url]
相关热词 c# 线程顺序 c#昨天当前时间 c# 多进程 锁 c#mysql图片存取 c# ocx 委托事件 c# 读取类的属性和值 c# out 使用限制 c#获取url的id c#怎么进行分页查询 c# update 集合
我们是很有底线的