Fish_FishCFG.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. #pragma once
  2. #include <map>
  3. struct Fish_FishCFGData
  4. {
  5. //key
  6. int mID;
  7. //鱼名字
  8. std::string mFishName;
  9. //模型ID
  10. int mModelID;
  11. //分数
  12. int mScore;
  13. //玩法鱼分值
  14. int mFishPoints;
  15. //魔石
  16. std::vector<int> mDimensity;
  17. //鱼类型
  18. int mType;
  19. //掉落钻石
  20. int mDropGem;
  21. //显示半径
  22. int mShowRadius;
  23. //层
  24. int mLayer;
  25. //渔网能击中
  26. bool mCanNetHit;
  27. //死亡效果
  28. std::vector<int> mServerDieParam;
  29. //死亡效果参数
  30. std::vector<float> mDieEffectParam;
  31. //死亡特效
  32. int mDieEffect;
  33. //屏幕震动
  34. bool mShockScreen;
  35. //掉落金币(ID,数量)
  36. int mDropGold;
  37. //效果类型
  38. int mEffectType;
  39. //金币转盘
  40. int mGoldPlate;
  41. //全屏转盘
  42. int mScreenPlate;
  43. //死亡声音
  44. std::vector<int> mDieSoundID;
  45. //显示图鉴
  46. bool mShowBook;
  47. //图鉴图标
  48. std::string mBookIcon;
  49. //图鉴比例
  50. float mBookScale;
  51. //图片名字
  52. std::string mBookName;
  53. //图鉴信息
  54. std::string mBookInfo;
  55. //是否boss
  56. bool mIsBOSS;
  57. //是否可被冰冻
  58. bool mIsFrozen;
  59. //是否话费鱼
  60. bool mIsLottery;
  61. //显示星星
  62. bool mShowStar;
  63. //半径
  64. float mRadius;
  65. //显示道具
  66. int mDisplayItem;
  67. //道具泡泡偏移
  68. std::vector<int> mItemBubble;
  69. //聊天泡泡
  70. std::vector<int> mChatBubble;
  71. //泡泡偏移
  72. std::vector<int> mChatOffset;
  73. //道具泡泡缩放
  74. float mItemBubbleScale;
  75. //能否被炸弹击中
  76. bool mCanBomb;
  77. //显示序号
  78. int mShowIndex;
  79. //显示类型1-普通鱼 2-黄金 3-特殊 4-boss 5-玩法鱼
  80. int mShowType;
  81. //显示分数
  82. std::string mShowScore;
  83. //红鱼,全屏炸弹随机范围
  84. int mBombRange;
  85. //能否被被弹头击中
  86. std::string mCanHitByBulletHead;
  87. //鱼分数类型:1正常分数,取Score字段;2浮动倍率,取BombRange,Score字段;3变倍鱼取TimesRange字段;4钻头虾变倍
  88. int mScoreType;
  89. //变倍鱼倍数以及概率
  90. std::vector<int> mTimesRange;
  91. //点杀点送分值
  92. int mKillAndSendScore;
  93. };
  94. class Fish_FishCFG
  95. {
  96. public:
  97. private:
  98. static std::auto_ptr<Fish_FishCFG> msSingleton;
  99. public:
  100. int GetCount();
  101. const Fish_FishCFGData* GetData(int ID);
  102. const std::map<int, Fish_FishCFGData>& GetMapData();
  103. void Load();
  104. void LoadLua();
  105. void Reload();
  106. static Fish_FishCFG* GetSingleton();
  107. static void Release();
  108. private:
  109. std::map<int, Fish_FishCFGData> mMapData;
  110. };