GuideProc.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <?php
  2. /*
  3. * To change this license header, choose License Headers in Project Properties.
  4. * To change this template file, choose Tools | Templates
  5. * and open the template in the editor.
  6. */
  7. namespace loyalsoft;
  8. class GuideProc {
  9. /**
  10. * 2.启灵硬引导 隐藏关战斗结算后【启灵功能解锁然后 触发引导】
  11. * @param type $arg1
  12. * @param type $arg2
  13. */
  14. public static function Qingling_EquipWear_Guide_Trigger($funId) {
  15. // $mo = GameConfig::guide_getItem(E_GuideTypeState::HeroChange_Guide, 0);
  16. // $paras0Str = explode(',',$mo->paras0);
  17. if ($funId == 16 && !in_array(E_GuideTypeState::Qingling_Guide, ctx()->privateData(true)->funUnlockRecord_3)) {
  18. ctx()->privateData(true)->funUnlockRecord_3[] = E_GuideTypeState::Qingling_Guide;
  19. }
  20. if ($funId == 14 && !in_array(E_GuideTypeState::EquipWear_Guide, ctx()->privateData(true)->funUnlockRecord_3)) {
  21. ctx()->privateData(true)->funUnlockRecord_3[] = E_GuideTypeState::EquipWear_Guide;
  22. }
  23. }
  24. /**
  25. * 3.坊市硬引导 触发条件为 启灵第一个解锁
  26. * @param type $arg1
  27. * @param type $arg2
  28. */
  29. public static function Shop_Guide_Trigger($evolveMaxId_left) {
  30. if ($evolveMaxId_left == 1 && !in_array(E_GuideTypeState::Shop_Guide, ctx()->privateData(true)->funUnlockRecord_3)) {
  31. ctx()->privateData(true)->funUnlockRecord_3[] = E_GuideTypeState::Shop_Guide;
  32. }
  33. }
  34. /**
  35. * 5.强制进入第一关硬引导 触发条件为“玩家穿戴了首件装备” 实际触发的位置是 穿戴的硬引导一完成就出发 这里写死了
  36. * @param type $arg1
  37. * @param type $arg2
  38. */
  39. public static function GateFight_Guide_Trigger($guideType, $guide_type_forceSave) {
  40. if ($guideType == E_GuideTypeState::EquipWear_Guide && $guide_type_forceSave == true && !in_array(E_GuideTypeState::GateFight_Guide, ctx()->privateData(true)->funUnlockRecord_3)) {
  41. ctx()->privateData(true)->funUnlockRecord_3[] = E_GuideTypeState::GateFight_Guide;
  42. }
  43. }
  44. /**
  45. * 6. 领取新手任务奖励硬引导 触发条件为“玩家进入1次第一关”
  46. * @param type $arg1
  47. * @param type $arg2
  48. */
  49. public static function MainTaskRewardReceived_Guide_Trigger($gateId, $fightNum) {
  50. $mo = GameConfig::guide_getItem(E_GuideTypeState::MainTaskRewardReceived_Guide, 0);
  51. $paras0 = $mo->paras0;
  52. if ($paras0 == $gateId && $fightNum == 1) {
  53. ctx()->privateData(true)->funUnlockRecord_3[] = E_GuideTypeState::MainTaskRewardReceived_Guide;
  54. }
  55. }
  56. /**
  57. * 7.装备升级硬引导 [触发条件 首次获得图纸] 实际的触发校验是 直接判定的那个新手任务的id
  58. * @param type $arg1
  59. * @param type $arg2
  60. */
  61. public static function EquipLvUp_Guide_Trigger($taskId) {
  62. $mo = GameConfig::guide_getItem(E_GuideTypeState::EquipLvUp_Guide, 0);
  63. $paras0 = $mo->paras0;
  64. if ($paras0 == $taskId) {
  65. ctx()->privateData(true)->funUnlockRecord_3[] = E_GuideTypeState::EquipLvUp_Guide;
  66. }
  67. }
  68. /**
  69. * 8 领取第二关第3个章节宝箱硬引导[触发条件为“玩家初次通关第二关”]
  70. * @param type $arg1
  71. * @param type $arg2
  72. */
  73. public static function GateBoxReceived_Guide_Trigger($gateId, $pass) {
  74. $mo = GameConfig::guide_getItem(E_GuideTypeState::GateBoxReceived_Guide, 0);
  75. $paras0 = $mo->paras0;
  76. if ($paras0 == $gateId && ctx()->gates->GateList->$gateId->pass == 0 && $pass == 1) {
  77. ctx()->privateData(true)->funUnlockRecord_3[] = E_GuideTypeState::GateBoxReceived_Guide;
  78. }
  79. }
  80. /**
  81. * 9 角色更换与升星硬引导 触发条件为“玩家领取了第二关第3个章节宝箱”
  82. * @param type $arg1
  83. * @param type $arg2
  84. */
  85. public static function HeroChange_Guide_Trigger($gateId, $boxIndex) {
  86. $mo = GameConfig::guide_getItem(E_GuideTypeState::HeroChange_Guide, 0);
  87. $paras0Str = explode(',', $mo->paras0);
  88. if ($paras0Str[0] == $gateId && $paras0Str[1] == $boxIndex) {
  89. ctx()->privateData(true)->funUnlockRecord_3[] = E_GuideTypeState::HeroChange_Guide;
  90. }
  91. }
  92. }