CornerSignEventProc.php 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <?php
  2. namespace loyalsoft;
  3. /**
  4. * 枚举: 角标提示类型枚举
  5. */
  6. class OperateEventType extends Enum {
  7. const _Empty = 0; // 空
  8. //
  9. const Task = 100;
  10. const Task_plot = 101; # 任务 剧情任务
  11. const Task_Daily = 102; # 任务 每日任务
  12. //
  13. const Call = 200;
  14. const Call_Warrior = 201; # 召唤 战士
  15. const Call_Magician = 202; # 召唤 法师
  16. const Call_Archer = 203; # 召唤 射手
  17. //
  18. const Bag = 300;
  19. const Bag_Weapon = 301; # 背包 武器
  20. const Bag_Kotodama = 302; # 背包 言灵
  21. const Bag_Fragment = 303; # 背包 碎片
  22. const Bag_Material = 304; # 背包 材料
  23. const Bag_TaskCard = 305; # 背包 任务卡
  24. const Bag_Consume = 306; # 背包 消耗类(蓝屏 血瓶 卷轴等)
  25. //
  26. const Ranking = 400;
  27. const Ranking_PowerReward = 401; # 排行榜 战力榜奖励
  28. const Ranking_ClearanceReward = 402; # 排行榜 通关榜奖励
  29. #
  30. const Mail_New = 500; # 邮件 新邮件
  31. const Notice_New = 600; # 公告 新公告
  32. const Arena_FreeTimes = 700; # 竞技场 可进入
  33. #
  34. const Gift = 800; # 礼包
  35. const Gift_Day = 801; # 每日礼包
  36. #
  37. const Role = 900; # 角色模块
  38. const Role_Attribute = 901; # 角色 属性(有新的可升级的道具)
  39. const Role_YanLing = 902; # 角色 有新言灵
  40. const Role_Weapon = 903; # 角色 有新武器
  41. }
  42. /**
  43. * Description of CornerSignEventProc
  44. *
  45. * @author Administrator
  46. */
  47. class CornerSignEventProc {
  48. // <editor-fold defaultstate="collapsed" desc="礼包">
  49. /**
  50. * 每日礼包提示
  51. */
  52. public static function OnNewDay() {
  53. ctx()->privateData()->cornerSignNotifications[] = OperateEventType::Gift_Day;
  54. }
  55. // </editor-fold>
  56. // <editor-fold defaultstate="collapsed" desc="任务">
  57. /**
  58. * 剧情任务状态有更新(新增/完成)
  59. */
  60. public static function OnTask_Plot_new() {
  61. ctx()->privateData()->cornerSignNotifications[] = OperateEventType::Task_plot;
  62. }
  63. /**
  64. * 每日任务状态有变动(完成)
  65. */
  66. public static function OnTask_Daily_new() {
  67. ctx()->privateData()->cornerSignNotifications[] = OperateEventType::Task_Daily;
  68. }
  69. // </editor-fold>
  70. // <editor-fold defaultstate="collapsed" desc="言灵">
  71. /**
  72. * 言灵召唤状态,解锁新的战士
  73. */
  74. public static function OnCall_Warrior_new() {
  75. ctx()->privateData()->cornerSignNotifications[] = OperateEventType::Call_Warrior;
  76. }
  77. /**
  78. * 言灵召唤状态,解锁新的法师
  79. */
  80. public static function OnCall_Magician_new() {
  81. ctx()->privateData()->cornerSignNotifications[] = OperateEventType::Call_Magician;
  82. }
  83. /**
  84. * 言灵召唤状态,解锁新的射手
  85. */
  86. public static function OnCall_Archer_new() {
  87. ctx()->privateData()->cornerSignNotifications[] = OperateEventType::Call_Archer;
  88. }
  89. // </editor-fold>
  90. // <editor-fold defaultstate="collapsed" desc="背包">
  91. /**
  92. * 包裹--获得新的武器
  93. */
  94. public static function OnBag_new_Weapon() {
  95. ctx()->privateData()->cornerSignNotifications[] = OperateEventType::Bag_Weapon;
  96. }
  97. /**
  98. * 包裹--获得新的言灵
  99. */
  100. public static function OnBag_new_Yanling() {
  101. ctx()->privateData()->cornerSignNotifications[] = OperateEventType::Bag_Kotodama;
  102. }
  103. /**
  104. * 包裹--获得新的碎片
  105. */
  106. public static function OnBag_new_Fragment() {
  107. ctx()->privateData()->cornerSignNotifications[] = OperateEventType::Bag_Fragment;
  108. }
  109. /**
  110. * 包裹--获得新的材料
  111. */
  112. public static function OnBag_new_Material() {
  113. ctx()->privateData()->cornerSignNotifications[] = OperateEventType::Bag_Material;
  114. }
  115. /**
  116. * 包裹--获得新的任务卡
  117. */
  118. public static function OnBag_new_TaskCard() {
  119. ctx()->privateData()->cornerSignNotifications[] = OperateEventType::Bag_TaskCard;
  120. }
  121. /**
  122. * 包裹--获得新的消耗性道具
  123. */
  124. public static function OnBag_new_Consume() {
  125. ctx()->privateData()->cornerSignNotifications[] = OperateEventType::Bag_Consume;
  126. }
  127. // </editor-fold>
  128. /**
  129. * 排行榜--战力奖励状态有变化
  130. */
  131. public static function OnRanking_PowerReward_new() {
  132. ctx()->privateData()->cornerSignNotifications[] = OperateEventType::Ranking_PowerReward;
  133. }
  134. /**
  135. * 排行榜--通关奖励状态有变化--暂时改成等级榜
  136. */
  137. public static function OnRanking_GageReward_new() {
  138. ctx()->privateData()->cornerSignNotifications[] = OperateEventType::Ranking_ClearanceReward;
  139. }
  140. /**
  141. * 邮件系统--有新的邮件
  142. */
  143. public static function OnNewMails() {
  144. if (null != ctx()) {
  145. ctx()->privateData()->cornerSignNotifications[] = OperateEventType::Mail_New;
  146. UserProc::updateUserInfo();
  147. }
  148. }
  149. /**
  150. * 公告有更新
  151. */
  152. public static function OnNotice_new() {
  153. ctx()->privateData()->cornerSignNotifications[] = OperateEventType::Notice_New;
  154. }
  155. /**
  156. * 角色 属性(有新的可升级道具)
  157. */
  158. public static function OnRoleAttribute() {
  159. ctx()->privateData()->cornerSignNotifications[] = OperateEventType::Role_Attribute;
  160. }
  161. /**
  162. * 角色 言灵(有新的可替换/装备言灵)
  163. */
  164. public static function OnRoleYanling() {
  165. ctx()->privateData()->cornerSignNotifications[] = OperateEventType::Role_YanLing;
  166. }
  167. /**
  168. * 角色 武器(有新的可装备/替换武器)
  169. */
  170. public static function OnRoleWeapon() {
  171. ctx()->privateData()->cornerSignNotifications[] = OperateEventType::Role_Weapon;
  172. }
  173. /**
  174. * AAA
  175. */
  176. public static function OnAAA() {
  177. ctx()->privateData()->cornerSignNotifications[] = OperateEventType::Arena_FreeTimes;
  178. }
  179. }