GuideProc.php 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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() {
  40. $arr = StlUtil::dictToArray(ctx()->store->equipLocation);
  41. if(ctx()->baseInfo->guide_type == E_GuideTypeState::Shop_Guide && count($arr) == 1 && !in_array(E_GuideTypeState::GateFight_Guide, ctx()->privateData(true)->funUnlockRecord_3)){
  42. ctx()->privateData(true)->funUnlockRecord_3[] = E_GuideTypeState::GateFight_Guide;
  43. }
  44. // if ($guideType == E_GuideTypeState::EquipWear_Guide && $guide_type_forceSave == true && !in_array(E_GuideTypeState::GateFight_Guide, ctx()->privateData(true)->funUnlockRecord_3)) {
  45. // ctx()->privateData(true)->funUnlockRecord_3[] = E_GuideTypeState::GateFight_Guide;
  46. // }
  47. }
  48. /**
  49. * 6. 领取新手任务奖励硬引导 触发条件为“玩家进入1次第一关”
  50. * @param type $arg1
  51. * @param type $arg2
  52. */
  53. public static function MainTaskRewardReceived_Guide_Trigger($gateId, $fightNum) {
  54. $mo = GameConfig::guide_getItem(E_GuideTypeState::MainTaskRewardReceived_Guide, 0);
  55. $paras0 = $mo->paras0;
  56. if ($paras0 == $gateId && $fightNum == 1) {
  57. ctx()->privateData(true)->funUnlockRecord_3[] = E_GuideTypeState::MainTaskRewardReceived_Guide;
  58. }
  59. }
  60. /**
  61. * 7.装备升级硬引导 [触发条件 首次获得图纸] 实际的触发校验是 直接判定的那个新手任务的id
  62. * @param type $arg1
  63. * @param type $arg2
  64. */
  65. public static function EquipLvUp_Guide_Trigger($taskId) {
  66. $mo = GameConfig::guide_getItem(E_GuideTypeState::EquipLvUp_Guide, 0);
  67. $paras0 = $mo->paras0;
  68. if ($paras0 == $taskId) {
  69. ctx()->privateData(true)->funUnlockRecord_3[] = E_GuideTypeState::EquipLvUp_Guide;
  70. }
  71. }
  72. /**
  73. * 8 领取第二关第3个章节宝箱硬引导[触发条件为“玩家初次通关第二关”]
  74. * @param type $arg1
  75. * @param type $arg2
  76. */
  77. public static function GateBoxReceived_Guide_Trigger($gateId, $pass) {
  78. $mo = GameConfig::guide_getItem(E_GuideTypeState::GateBoxReceived_Guide, 0);
  79. $paras0 = $mo->paras0;
  80. if ($paras0 == $gateId && ctx()->gates->GateList->$gateId->pass == 0 && $pass == 1) {
  81. ctx()->privateData(true)->funUnlockRecord_3[] = E_GuideTypeState::GateBoxReceived_Guide;
  82. }
  83. }
  84. /**
  85. * 9 角色更换与升星硬引导 触发条件为“玩家领取了第二关第3个章节宝箱”
  86. * @param type $arg1
  87. * @param type $arg2
  88. */
  89. public static function HeroChange_Guide_Trigger($gateId, $boxIndex) {
  90. $mo = GameConfig::guide_getItem(E_GuideTypeState::HeroChange_Guide, 0);
  91. $paras0Str = explode(',', $mo->paras0);
  92. if ($paras0Str[0] == $gateId && $paras0Str[1] == $boxIndex) {
  93. ctx()->privateData(true)->funUnlockRecord_3[] = E_GuideTypeState::HeroChange_Guide;
  94. }
  95. }
  96. }