CornerSignEventProc.php 4.8 KB

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