搜索
 找回密码
 加入

重建一些AI缺失的源代码

ctgwglzc 2012-2-8 01:42:13 2572
12
返回列表 发新帖
ctgwglzc
2009-9-22 01:42:50
楼主
MagicType2Set.cpp
  1. // MagicType2Set.cpp : implementation file
  2. //

  3. #include "stdafx.h"
  4. #include "server.h"
  5. #include "MagicType2Set.h"

  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif

  11. /////////////////////////////////////////////////////////////////////////////
  12. // CMagicType2Set

  13. IMPLEMENT_DYNAMIC(CMagicType2Set, CRecordset)

  14. CMagicType2Set::CMagicType2Set(CDatabase* pdb)
  15.     : CRecordset(pdb)
  16. {
  17.     //{{AFX_FIELD_INIT(CMagicType2Set)
  18.     m_iNum = 0;
  19.     m_Name = _T("");
  20.     m_Description = _T("");
  21.     m_HitType = 0;
  22.     m_HitRate = 0;
  23.     m_AddDamage = 0;
  24.     m_AddRange = 0;
  25.     m_NeedArrow = 0;
  26.     m_AddDamagePlus = 0;
  27.     m_nFields = 9;
  28.     //}}AFX_FIELD_INIT
  29.     m_nDefaultType = snapshot;
  30. }


  31. CString CMagicType2Set::GetDefaultConnect()
  32. {
  33.     return _T("ODBC;DSN=kn_online;UID=knight;PWD=knight");
  34. }

  35. CString CMagicType2Set::GetDefaultSQL()
  36. {
  37.     return _T("[dbo].[MAGIC_TYPE2]");
  38. }

  39. void CMagicType2Set::DoFieldExchange(CFieldExchange* pFX)
  40. {
  41.     //{{AFX_FIELD_MAP(CMagicType2Set)
  42.     pFX->SetFieldType(CFieldExchange::outputColumn);
  43.     RFX_Long(pFX, _T("[iNum]"), m_iNum);
  44.     RFX_Text(pFX, _T("[Name]"), m_Name);
  45.     RFX_Text(pFX, _T("[Description]"), m_Description);
  46.     RFX_Byte(pFX, _T("[HitType]"), m_HitType);
  47.     RFX_Int(pFX, _T("[HitRate]"), m_HitRate);
  48.     RFX_Int(pFX, _T("[AddDamage]"), m_AddDamage);
  49.     RFX_Byte(pFX, _T("[NeedArrow]"), m_NeedArrow);
  50.     RFX_Int(pFX, _T("[AddDamagePlus]"), m_AddDamagePlus);
  51.     //}}AFX_FIELD_MAP
  52. }

  53. /////////////////////////////////////////////////////////////////////////////
  54. // CMagicType2Set diagnostics

  55. #ifdef _DEBUG
  56. void CMagicType2Set::AssertValid() const
  57. {
  58.     CRecordset::AssertValid();
  59. }

  60. void CMagicType2Set::Dump(CDumpContext& dc) const
  61. {
  62.     CRecordset::Dump(dc);
  63. }
  64. #endif //_DEBUG
复制代码
ctgwglzc
2009-9-22 01:43:17
楼主
点击查看详情
MagicType3Set.cpp
  1. // MagicType3Set.cpp : implementation file
  2. //

  3. #include "stdafx.h"
  4. #include "server.h"
  5. #include "MagicType3Set.h"

  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif

  11. /////////////////////////////////////////////////////////////////////////////
  12. // CMagicType3Set

  13. IMPLEMENT_DYNAMIC(CMagicType3Set, CRecordset)

  14. CMagicType3Set::CMagicType3Set(CDatabase* pdb)
  15.     : CRecordset(pdb)
  16. {
  17.     //{{AFX_FIELD_INIT(CMagicType3Set)
  18.     m_iNum = 0;
  19.     m_Name = _T("");
  20.     m_Description = _T("");
  21.     m_DirectType = 0;
  22.     m_FirstDamage = 0;
  23.     m_EndDamage = 0;
  24.     m_TimeDamage = 0;
  25.     m_Duration = 0;
  26.     m_Attribute = 0;
  27.     m_Radius = 0;
  28.     m_Angle = 0;

  29.     m_nFields = 11;
  30.     //}}AFX_FIELD_INIT
  31.     m_nDefaultType = snapshot;
  32. }


  33. CString CMagicType3Set::GetDefaultConnect()
  34. {
  35.     return _T("ODBC;DSN=kn_online;UID=knight;PWD=knight");
  36. }

  37. CString CMagicType3Set::GetDefaultSQL()
  38. {
  39.     return _T("[dbo].[MAGIC_TYPE3]");
  40. }

  41. void CMagicType3Set::DoFieldExchange(CFieldExchange* pFX)
  42. {
  43.     //{{AFX_FIELD_MAP(CMagicType3Set)
  44.     pFX->SetFieldType(CFieldExchange::outputColumn);
  45.     RFX_Long(pFX, _T("[iNum]"), m_iNum);
  46.     RFX_Text(pFX, _T("[Name]"), m_Name);
  47.     RFX_Text(pFX, _T("[Description]"), m_Description);
  48.     RFX_Byte(pFX, _T("[DirectType]"), m_DirectType);
  49.     RFX_Int(pFX, _T("[FirstDamage]"), m_FirstDamage);
  50.     RFX_Int(pFX, _T("[EndDamage]"), m_EndDamage);
  51.     RFX_Int(pFX, _T("[TimeDamage]"), m_TimeDamage);
  52.     RFX_Byte(pFX, _T("[Duration]"), m_Duration);
  53.     RFX_Byte(pFX, _T("[Attribute]"), m_Attribute);
  54.     RFX_Byte(pFX, _T("[Radius]"), m_Radius);
  55.     RFX_Int(pFX, _T("[Angle]"), m_Angle);

  56.     //}}AFX_FIELD_MAP
  57. }

  58. /////////////////////////////////////////////////////////////////////////////
  59. // CMagicType3Set diagnostics

  60. #ifdef _DEBUG
  61. void CMagicType3Set::AssertValid() const
  62. {
  63.     CRecordset::AssertValid();
  64. }

  65. void CMagicType3Set::Dump(CDumpContext& dc) const
  66. {
  67.     CRecordset::Dump(dc);
  68. }
  69. #endif //_DEBUG
复制代码
arbies
2009-9-22 12:42:50
都是数据库读取的代码,有没有其他核心点的呢(我想我们的要求是不是太高了~~)
ctgwglzc
2009-9-22 18:04:30
楼主
都是数据库读取的代码,有没有其他核心点的呢(我想我们的要求是不是太高了~~)
arbies 发表于 2009-9-22 12:42

AIServer.7z
arbies
2009-9-23 17:19:28
AIServer.7z
ctgwglzc 发表于 2009-9-22 18:04

缺的还是缺,而且这代码的版本好像比较旧了,现在的服务器应该有许多地方改进了。
gjbation1
2009-10-17 21:19:26
我也想知道...
gjbation1
2009-10-17 21:19:55
我也想知道...
868466
2009-10-17 21:25:16
对于一般人没用。
poloba
2012-2-8 01:42:13
这个应该支持一下
12
高级模式
游客