Fish_FishCFG.h 2.1 KB

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