ComData.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. using CommonAI.Zone;
  2. using CommonAI.Zone.Helper;
  3. using CommonLang.Property;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. namespace CommonAI.Data
  9. {
  10. //同步玩家信息类型
  11. public abstract class UnitAttrMaskType : PlayerEvent
  12. {
  13. public const ulong MASK_ALL = 0xFFFFFFFFFFFFFFFF;
  14. public const ulong MASK_MAX_HP = 1 << 0;
  15. public const ulong MASK_MOVE_SPEED = 1 << 1;
  16. public const ulong MASK_HP_REBORN = 1 << 2;
  17. //同步Attribute
  18. public const ulong MASK_HP_PER = 1 << 3;
  19. public const ulong MASK_ATTACK = 1 << 4;
  20. public const ulong MASK_ATTACK_PER = 1 << 5;
  21. public const ulong MASK_DEF = 1 << 6;
  22. public const ulong MASK_DEF_PER = 1 << 7;
  23. public const ulong MASK_IGNORE_DEFENSE_PER = 1 << 8;
  24. public const ulong MASK_CRIT_RATE = 1 << 9;
  25. public const ulong MASK_CRIT_DAMAGE = 1 << 10;
  26. public const ulong MASK_INCALLDAMAGE = 1 << 11;
  27. public const ulong MASK_ALL_DAMAGE_REDUCE = 1 << 12;
  28. public const ulong MASK_CTRLTIME_REDUCE = 1 << 13;
  29. public const ulong MASK_SKILL_CD = 1 << 14;
  30. public const ulong MASK_HEALEFFECT = 1 << 15;
  31. public const ulong MASK_HEALEDEFFECT = 1 << 16;
  32. public const ulong MASK_SKILLDAMAGE = 1 << 17;
  33. public const ulong MASK_ATTACK_SPEED = 1 << 18;
  34. public const ulong MASK_CONTROL_UP = 1 << 19;
  35. public const ulong MASK_RES_CRIT_RATE = 1 << 20; //抗暴率
  36. //public const ulong MASK_GODMAIN_DEFENSE = 1 << 21;
  37. //元素攻击 & 防御
  38. public const ulong MASK_GOLD_ATTACK = 1 << 22;
  39. public const ulong MASK_GOLD_DEFENSE = 1 << 23;
  40. public const ulong MASK_WOOD_ATTACK = 1 << 24;
  41. public const ulong MASK_WOOD_DEFENSE = 1 << 25;
  42. public const ulong MASK_WATER_ATTACK = 1 << 26;
  43. public const ulong MASK_WATER_DEFENSE = 1 << 27;
  44. public const ulong MASK_FIRE_ATTACK = 1 << 28;
  45. public const ulong MASK_FIRE_DEFENSE = 1 << 29;
  46. public const ulong MASK_SOIL_ATTACK = 1 << 30;
  47. public const ulong MASK_SOIL_DEFENSE = 1L << 31;
  48. public const ulong MASK_TOBOSS_CRIT_RATE = 1L << 32;
  49. public const ulong MASK_TOBOSS_CRIT_DAMAGE = 1L << 33;
  50. public const ulong MASK_GOLD_RESTRAINT = 1L << 34;
  51. public const ulong MASK_WOOD_RESTRAINT = 1L << 35;
  52. public const ulong MASK_WATER_RESTRAINT = 1L << 36;
  53. public const ulong MASK_FIRE_RESTRAINT = 1L << 37;
  54. public const ulong MASK_SOIL_RESTRAINT = 1L << 38;
  55. public const ulong MASK_GOLD_RESIST = 1L << 39;
  56. public const ulong MASK_WOOD_RESIST = 1L << 40;
  57. public const ulong MASK_WATER_RESIST = 1L << 41;
  58. public const ulong MASK_FIRE_RESIST = 1L << 42;
  59. public const ulong MASK_SOIL_RESIST = 1L << 43;
  60. public const ulong MASK_PVP_KILLVALUE = 1L << 44;
  61. public const ulong MASK_YAOQI_LEVEL = 1L << 45;
  62. public const ulong MASK_NORMAL_ATK_LEECH = 1L << 46;
  63. public const ulong MASK_ACTIVE_ATK_LEECH = 1L << 47;
  64. public const ulong MASK_ARTIFACTMAIN_PER = 1L << 48;
  65. public const ulong MASK_FIELD_BOSS_DAMAGEADD = 1L << 49;
  66. //玩家真实最大生命值(暂时仅角色面板显示)
  67. public const ulong MASK_MAX_HP_EXT = 1L << 50;
  68. public const ulong MASK_DUNGEON_MONETER_DAMAGEADD = 1L << 51;
  69. //移动速度加成
  70. public const ulong MASK_MOVE_SPEED_ADDITION = 1L << 52;
  71. //命格克制
  72. public const ulong MASK_MONSTER_RESTRAINT_1 = 1L << 53;
  73. public const ulong MASK_MONSTER_RESTRAINT_2 = 1L << 54;
  74. public const ulong MASK_MONSTER_RESTRAINT_3 = 1L << 55;
  75. public const ulong MASK_MONSTER_RESTRAINT_4 = 1L << 56;
  76. public const ulong MASK_MONSTER_RESTRAINT_5 = 1L << 57;
  77. //// 猎妖属性
  78. public const ulong MASK_MONSTER_ATK = 1L << 58;
  79. public const ulong MASK_MONSTER_DEF = 1L << 59;
  80. public const ulong MASK_MONSTER_ATK_PER = 1L << 60;
  81. public const ulong MASK_MONSTER_DEF_PER = 1L << 61;
  82. }
  83. //技能释放状态
  84. public enum SkillCanLauchType : byte
  85. {
  86. All, // 所有技能
  87. OnlyBaseSkill, // 只能释放普攻
  88. None, // 不能释放技能
  89. }
  90. //伤害类型
  91. public enum DamageType : byte
  92. {
  93. Damage, //伤害.
  94. Heal, //治愈.
  95. None, //无伤.
  96. Modify, //自定义.
  97. }
  98. //卡牌强化叠层类型
  99. public enum CardLayerType : byte
  100. {
  101. None, // 默认值
  102. Replace, // 所有强化只有一个,其他会被替换
  103. Layers, // 所有强化只有一个,累计叠层
  104. }
  105. public enum BattleStatus : byte
  106. {
  107. None = 0,
  108. ReadyBattle = 1,
  109. PVE = 10,
  110. PVP = 11,
  111. }
  112. //技能数据
  113. public class SkillLevelData
  114. {
  115. public XmdsSkillType skillType;
  116. public int SkillLevel;
  117. public int TalentSkillLevel1;
  118. public int TalentSkillLevel2;
  119. public int TalentSkillLevel3;
  120. //public int skillTime;
  121. }
  122. // 地图类型
  123. public enum SceneType : byte
  124. {
  125. Normal = 1, //野外.
  126. Dungeon = 2, //副本.
  127. DanTiao = 3, //单挑王.
  128. JJC = 4, //竞技场.
  129. CrossServer = 5, //跨服.
  130. MengZhan = 6, //盟战.
  131. GuildDungeon = 7, //公会副本.
  132. WorldBoss = 8, //世界BOSS.
  133. HUANJING = 9, //剧情场景
  134. FiveVFive = 10, //5v5
  135. GoblinTower = 11, //镇妖塔
  136. SourceDungeon = 12, //资源副本
  137. HaoYueJing = 13, //皓月镜
  138. GuildBoss = 14, //工会Boss
  139. SecretDungeon = 15, //秘境夺宝
  140. FightLevelUltra = 16, //极限副本
  141. GuildFortPve = 17, //工会据点采集地图
  142. GuildFortPvp = 18, //工会据点战斗地图
  143. UnderGroundPlace = 19, //boss地宫
  144. DIALY_RECHARGE_DUNGEON = 20, //每日充值副本
  145. PickLotus = 21, //采莲
  146. AbyssDungeon = 22, //深渊
  147. CrossReadyArea = 23, //跨服备战区
  148. ROBBERY = 24, // 渡劫
  149. DEVIL = 25, // 成魔
  150. GuildFun=26, //公会功能地图
  151. WeekendStart = 27, //星瀚殿
  152. ZhanYao_YaoYu = 28, //斩妖-妖域
  153. FishBoss = 29,
  154. RESOURCE_DUNGEON_MINERAL = 30, // 资源副本采矿图
  155. BACKRESURRECT_AREA = 31,
  156. NEW_HAND_SHI_LIAN_AREA = 32, // 新手血色试炼场景
  157. WEEKEND_UnderGroundPlace_BOSS = 33, //周末封魔地图
  158. //有时间限制,并且地图需要消耗指定道具
  159. CONSUME_LIMITTIME_AREA = 34, //天之涯,海之角,蓬莱岛场景
  160. DUJIE_DAZUO = 35,
  161. //挂机地图
  162. WIDE_HOOK = 36,
  163. SHI_MEN_POS = 37,
  164. MOUNTAINKING_PRISON = 38, //山大王监狱
  165. //100+跨服场景
  166. CROSS_SERVER_NEW = 100, // 新跨服野外场景
  167. NCS_MutilCross = 101, // 新跨服-多无名镇
  168. NCS_DoubleCross = 102, // 新跨服-双服无名镇
  169. NCS_FengShen = 103, // 新跨服-封神战
  170. NCS_FengShenResure=104, // 封神战-复活区
  171. CROSS_BOSS = 105, // 跨服boss场景
  172. CROSS_WILDAREA = 106, // 跨服野外场景,灵域
  173. CROSS_DEVIL = 107, // 跨服野外场景,成魔
  174. }
  175. /// <summary>
  176. /// PK模式.决定玩家攻击判定.100以内保留,100+代表Server模式的特殊服务器id
  177. /// </summary>
  178. public enum PKMode : byte
  179. {
  180. Peace = 0, //和平模式(该模式下不能攻击其他任何玩家,被攻击也不能还手).
  181. Justice = 1,//善恶模式(只能攻击PK值>0的玩家).
  182. force = 2, //阵营模式(只能攻击和自己不同阵营的玩家).
  183. Guild = 3, //公会模式(只能攻击不是自己公会/家族的玩家).
  184. Team = 4, //组队模式(只能攻击对外意外的玩家).
  185. Server = 5, //本服模式(只能攻击其他服务器的玩家。这个模式只在连服生效).
  186. All = 6 //全体模式(攻击自己及队友以外的玩家等价于队友模式).
  187. }
  188. public enum JSGCustomOpType : byte
  189. {
  190. UpdateAutoBattleFlag = 0, //更新自动战斗模式
  191. }
  192. public enum XmdsUnitPro : byte
  193. {
  194. [DescAttribute("None为默认值", "职业")]
  195. None = 0, //木有.
  196. [DescAttribute("战士", "职业")]
  197. Sword = 1, //苍狼.
  198. //Assassin = 2, //御剑.
  199. [DescAttribute("法师", "职业")]
  200. Magic = 3, //逸仙.
  201. //Hunter = 4, //神箭.
  202. [DescAttribute("治疗", "职业")]
  203. Priest = 5, //灵狐.
  204. [DescAttribute("上限标记", "职业")]
  205. Max,
  206. }
  207. // 天命类型: 金木土水火
  208. public enum UnitFateType : sbyte
  209. {
  210. Random=-1,
  211. None = 0,
  212. One = 1,
  213. Two = 2,
  214. Three = 3,
  215. Four = 4,
  216. Five = 5,
  217. }
  218. /// <summary>
  219. /// PK值,记录玩家PK行为.
  220. /// </summary>
  221. public enum PKLevel : byte
  222. {
  223. White = 0,
  224. Black = 1,
  225. Yellow = 2,
  226. Red = 3,
  227. }
  228. public class GlobalData
  229. {
  230. //默认攻速值
  231. public static readonly int DEFAULT_ATTACK_SPEED = 10000;
  232. //bot刷新频率
  233. public static readonly short BOT_UPDATE_INTERVAL = 5000;
  234. //ZoneUpdate慢刷新倍数
  235. public static readonly short ZONE_UPDATE_SLOW = 10;
  236. public static readonly Random gRandom = new Random();
  237. //游戏中概率基础
  238. public static readonly int RATE_BASE = 10000;
  239. //定力系统相关常量
  240. public static readonly int SHIELD_RECOVER_TIME = 10; // 回满需要次数
  241. public static readonly int SHIELD_RECOVER_INTERVAL = 500; // 恢复间隔
  242. public static readonly int SHIELD_BREAK_BUFF = 920000; // 破定状态buff
  243. public static readonly int SHIELD_BREAK_HOLDTIME = 6000; // 破定时间
  244. //测试配置
  245. public static bool GAME_BS_TEST = false;
  246. }
  247. public class GSCreateAreaData
  248. {
  249. public int value1;
  250. public int value2;
  251. }
  252. //释放法术个人数据
  253. public class JSGCreateSpellData
  254. {
  255. public int mMaxSpellCount;
  256. }
  257. public enum SummonType : byte
  258. {
  259. none = 0,
  260. guard = 1, // 自卫
  261. guardMaster = 2, // 守卫主人
  262. attack = 3, // 上来就干
  263. MoveToMaster = 4, // 往上冲
  264. AwaitMaster = 5, // 原地等待或者增益master
  265. }
  266. //神器元素类型
  267. public enum ArtifactType : int
  268. {
  269. None = -1, //无效值
  270. Gold, //金
  271. Wood, //木
  272. Soil, //土
  273. Water, //水
  274. Fire //火
  275. }
  276. //位置坐标变更类型
  277. public enum XYModifyType : byte
  278. {
  279. [DescAttribute("绑定施法者方向")]
  280. Relative = 0,
  281. [DescAttribute("绝对坐标更改")]
  282. Absolutely = 1,
  283. }
  284. // 伤害来源 - 用户特殊处理显示上的逻辑
  285. public enum DamageSource : byte
  286. {
  287. Def = 0, // 2021.8.8前所有旧版伤害逻辑
  288. RemedyPoison = 1, // 特殊处理,治疗毒
  289. }
  290. // 卡牌类型
  291. public enum CardType : byte
  292. {
  293. QingLong = 0,
  294. ZhuQue = 1,
  295. BaiHu = 2,
  296. XuanWu = 3,
  297. Max = 4, // 无(两仪)
  298. }
  299. //
  300. }