CornerSignEventProc.php 5.1 KB

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