CornerSignEventProc.php 6.3 KB

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