NormalEventProc.php 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. <?php
  2. namespace loyalsoft;
  3. /**
  4. * 系统事件处理模块
  5. * @author gwang
  6. */
  7. class NormalEventProc {
  8. /**
  9. * 任务卡-任务步骤进度更新
  10. * @param type $arg1
  11. * @param type $arg2
  12. */
  13. public static function OnTaskCardStep_Process($arg1, $arg2) {
  14. Resp::AddEvent(Enum_EventType::MissionStepProcess, $arg1, $arg2);
  15. }
  16. /**
  17. * 任务卡-任务步骤完成
  18. * @param type $arg1
  19. * @param type $arg2
  20. */
  21. public static function OnTaskCardStep_Complete($arg1, $arg2) {
  22. Resp::AddEvent(Enum_EventType::MissionStepComplete, $arg1, $arg2);
  23. }
  24. /**
  25. * 任务卡-完成
  26. * @param type $arg1
  27. * @param type $arg2
  28. */
  29. public static function OnTaskCard_Finish($arg1, $arg2) {
  30. Resp::AddEvent(Enum_EventType::TaskCardFinished, $arg1, $arg2);
  31. }
  32. //----------------------------
  33. public static function OnHelloWorld($arg1, $arg2) {
  34. Resp::AddEvent(Enum_EventType::HelloWorld, $arg1, $arg2);
  35. }
  36. /**
  37. * 包裹--获得新的道具
  38. * @param type $itemid
  39. * @param type $num
  40. * @param type $cid
  41. */
  42. public static function OnBag_new_Item($itemid, $num, $cid) {
  43. Resp::AddEvent(Enum_EventType::AddItem, "$itemid,$num", $cid);
  44. }
  45. /**
  46. * 包裹--移除道具
  47. * @param type $arg1
  48. * @param type $arg2
  49. */
  50. public static function OnBag_Remove_Item($arg1, $arg2) {
  51. Resp::AddEvent(Enum_EventType::RemoveItem, $arg1, $arg2);
  52. }
  53. /**
  54. * 任务卡包裹--获得新的任务卡
  55. * @param type $arg1
  56. * @param type $arg2
  57. */
  58. public static function OnTaskBag_new_Card($arg1, $arg2) {
  59. Resp::AddEvent(Enum_EventType::AddTaskItem, $arg1, $arg2);
  60. }
  61. //
  62. /**
  63. * 任务卡包裹--移除任务卡
  64. * @param type $arg1
  65. * @param type $arg2
  66. */
  67. public static function OnTaskBag_remove_Card($arg1, $arg2) {
  68. Resp::AddEvent(Enum_EventType::RemoveTaskItem, $arg1, $arg2);
  69. }
  70. /**
  71. * 任务卡-激活
  72. * @param type $arg1
  73. * @param type $arg2
  74. */
  75. public static function OnTaskCard_Actived($arg1, $arg2) {
  76. Resp::AddEvent(Enum_EventType::TaskCardActived, $arg1, $arg2);
  77. }
  78. /**
  79. * 任务卡-领取奖励
  80. * @param type $arg1
  81. * @param type $arg2
  82. */
  83. public static function OnTaskCard_Reward($arg1, $arg2) {
  84. Resp::AddEvent(Enum_EventType::TaskCardReward, $arg1, $arg2);
  85. }
  86. /**
  87. * 剧情-开启一段新对话
  88. * @param type $arg1
  89. * @param type $arg2
  90. */
  91. public static function OnPlot_startNew($arg1, $arg2) {
  92. Resp::AddEvent(Enum_EventType::StartPlot, $arg1, $arg2);
  93. }
  94. /**
  95. * 剧情-开启一段NPC对话
  96. * @param type $arg1
  97. * @param type $arg2
  98. */
  99. public static function OnNpcDialog_startNew($arg1, $arg2) {
  100. Resp::AddEvent(Enum_EventType::NpcDialog, $arg1, $arg2);
  101. }
  102. /**
  103. * 解锁 - 功能建筑
  104. * @param type $arg1 建筑id
  105. * @param type $arg2
  106. */
  107. public static function OnUnlockBuild($arg1, $arg2 = null) {
  108. Resp::AddEvent(Enum_EventType::UnlockBuild, $arg1, $arg2);
  109. }
  110. /**
  111. * 解锁 - 地图
  112. * @param type $arg1 关卡id
  113. * @param type $arg2
  114. */
  115. public static function OnUnlockMap($arg1, $arg2) {
  116. Resp::AddEvent(Enum_EventType::UnlockMap, $arg1, $arg2);
  117. }
  118. /**
  119. * 升级-指挥官
  120. * @param type $arg1 旧等级
  121. * @param type $arg2 新等级
  122. */
  123. public static function OnUserLvlUp($arg1, $arg2) {
  124. Resp::AddEvent(Enum_EventType::UserLvlUP, $arg1, $arg2);
  125. }
  126. /**
  127. * 升级-唤灵师
  128. * @param type $arg1 唤灵师uid
  129. * @param type $arg2 最新等级
  130. */
  131. public static function OnHeroLvlUp($arg1, $arg2) {
  132. Resp::AddEvent(Enum_EventType::HeroLvlUp, $arg1, $arg2);
  133. }
  134. /**
  135. * 突破-唤灵师
  136. * @param type $arg1
  137. * @param type $arg2
  138. */
  139. public static function OnHeroTuPo($arg1, $arg2) {
  140. Resp::AddEvent(Enum_EventType::HeroTuPo, $arg1, $arg2);
  141. }
  142. /**
  143. * 升级-唤灵师
  144. * @param type $arg1 唤灵师uid
  145. * @param type $arg2 最新等级
  146. */
  147. public static function OnWeaponLvlUp($arg1, $arg2) {
  148. Resp::AddEvent(Enum_EventType::WeaponLvUp, $arg1, $arg2);
  149. }
  150. /**
  151. * 突破-唤灵师
  152. * @param type $arg1
  153. * @param type $arg2
  154. */
  155. public static function OnWeaponLvTuPo($arg1, $arg2) {
  156. Resp::AddEvent(Enum_EventType::WeaponTuPo, $arg1, $arg2);
  157. }
  158. /**
  159. * 升级-言灵
  160. * @param type $arg1 唤灵师uid
  161. * @param type $arg2 最新等级
  162. */
  163. public static function OnYanLingLvlUp($arg1, $arg2) {
  164. Resp::AddEvent(Enum_EventType::YanLingLvUp, $arg1, $arg2);
  165. }
  166. /**
  167. * 突破-言灵
  168. * @param type $arg1
  169. * @param type $arg2
  170. */
  171. public static function OnYanLingLvTuPo($arg1, $arg2) {
  172. Resp::AddEvent(Enum_EventType::YanLingTuPo, $arg1, $arg2);
  173. }
  174. /**
  175. * 支付成功
  176. * @param type $arg1
  177. * @param type $arg2
  178. */
  179. public static function OnPaySuccess() {
  180. Resp::AddEvent(Enum_EventType::PaySuccess, null, null);
  181. }
  182. /**
  183. * 体力变化
  184. * @param type $arg1
  185. */
  186. public static function OnTiliChange($arg1) {
  187. Resp::AddEvent(Enum_EventType::TiliChange, $arg1, null);
  188. }
  189. /**
  190. *
  191. * @param type $arg1
  192. */
  193. public static function OnHPMPItemConfigChange() {
  194. Resp::AddEvent(Enum_EventType::HPMPItemConfigChange, null, null);
  195. }
  196. }