CornerSignEventProc.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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. }
  29. /**
  30. * Description of CornerSignEventProc
  31. *
  32. * @author Administrator
  33. */
  34. class CornerSignEventProc {
  35. /**
  36. * 每日礼包提示
  37. */
  38. public static function OnNewDay(){
  39. req()->userInfo->game->privateState->cornerSignNotifications[] = OperateEventType::Gift_Day;
  40. }
  41. /**
  42. * 剧情任务状态有更新(新增/完成)
  43. */
  44. public static function OnTask_Plot_new() {
  45. req()->userInfo->game->privateState->cornerSignNotifications[] = OperateEventType::Task_plot;
  46. }
  47. /**
  48. * 每日任务状态有变动(完成)
  49. */
  50. public static function OnTask_Daily_new() {
  51. req()->userInfo->game->privateState->cornerSignNotifications[] = OperateEventType::Task_Daily;
  52. }
  53. /**
  54. * 言灵召唤状态,解锁新的战士
  55. */
  56. public static function OnCall_Warrior_new() {
  57. req()->userInfo->game->privateState->cornerSignNotifications[] = OperateEventType::Call_Warrior;
  58. }
  59. /**
  60. * 言灵召唤状态,解锁新的法师
  61. */
  62. public static function OnCall_Magician_new() {
  63. req()->userInfo->game->privateState->cornerSignNotifications[] = OperateEventType::Call_Magician;
  64. }
  65. /**
  66. * 言灵召唤状态,解锁新的射手
  67. */
  68. public static function OnCall_Archer_new() {
  69. req()->userInfo->game->privateState->cornerSignNotifications[] = OperateEventType::Call_Archer;
  70. }
  71. /**
  72. * 包裹--获得新的武器
  73. */
  74. public static function OnBag_new_Weapon() {
  75. req()->userInfo->game->privateState->cornerSignNotifications[] = OperateEventType::Bag_Weapon;
  76. }
  77. /**
  78. * 包裹--获得新的言灵
  79. */
  80. public static function OnBag_new_Yanling() {
  81. req()->userInfo->game->privateState->cornerSignNotifications[] = OperateEventType::Bag_Kotodama;
  82. }
  83. /**
  84. * 包裹--获得新的碎片
  85. */
  86. public static function OnBag_new_Fragment() {
  87. req()->userInfo->game->privateState->cornerSignNotifications[] = OperateEventType::Bag_Fragment;
  88. }
  89. /**
  90. * 包裹--获得新的材料
  91. */
  92. public static function OnBag_new_Material() {
  93. req()->userInfo->game->privateState->cornerSignNotifications[] = OperateEventType::Bag_Material;
  94. }
  95. /**
  96. * 排行榜--战力奖励状态有变化
  97. */
  98. public static function OnRanking_PowerReward_new() {
  99. req()->userInfo->game->privateState->cornerSignNotifications[] = OperateEventType::Ranking_PowerReward;
  100. }
  101. /**
  102. * 排行榜--通关奖励状态有变化
  103. */
  104. public static function OnRanking_GageReward_new() {
  105. req()->userInfo->game->privateState->cornerSignNotifications[] = OperateEventType::Ranking_ClearanceReward;
  106. }
  107. /**
  108. * 邮件系统--有新的邮件
  109. */
  110. public static function OnNewMails() {
  111. if (isset(req()->userInfo)) {
  112. req()->userInfo->game->privateState->cornerSignNotifications[] = OperateEventType::Mail_New;
  113. UserProc::updateUserInfo();
  114. }
  115. }
  116. /**
  117. * 公告有更新
  118. */
  119. public static function OnNotice_new() {
  120. req()->userInfo->game->privateState->cornerSignNotifications[] = OperateEventType::Notice_New;
  121. }
  122. /**
  123. * AAA
  124. */
  125. public static function OnAAA() {
  126. req()->userInfo->game->privateState->cornerSignNotifications[] = OperateEventType::Arena_FreeTimes;
  127. }
  128. }