Ins_Mainland.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. namespace loyalsoft;
  3. /**
  4. * 八大陆数据 extends Object
  5. * 困难难度不会垮大陆关联, 只在本大陆中同一个区域或者不同区域之间互相关联(此系采访策划后答复)
  6. * @deprecated since 2022.3 换开放地图版转 Info_NewMap->Ins_FootHold
  7. * @version
  8. * 1.0.0 八大陆数据 at 2021年3月2日14:37:51 -gwang
  9. * @author gwang (mail@wanggangzero.cn)
  10. * @copyright ? 2017-2-14, SJZ LoyalSoft Corporation & gwang. All rights reserved.
  11. */
  12. class Ins_Mainland extends Object_ext {
  13. /**
  14. * @var int 当前大陆id
  15. */
  16. public $landId;
  17. /**
  18. * 普通关卡
  19. */
  20. public $normal;
  21. /**
  22. * 困难关卡
  23. */
  24. public $hard;
  25. /**
  26. * 精英关卡
  27. */
  28. public $elite;
  29. function __construct($arg = null) {
  30. if (null === $arg) {
  31. $this->normal = new \stdClass();
  32. $this->hard = new \stdClass();
  33. $this->elite = new \stdClass;
  34. } else {
  35. parent::__construct($arg);
  36. }
  37. }
  38. public function getZoneMos() {
  39. $ldc = GameConfig::gate_mainland_getItem($this->landId);
  40. $zidArr = explode(',', $ldc->containZones);
  41. $ret = array();
  42. $w = (array) GameConfig::gate_zone();
  43. array_walk($w, function ($v, $k) use ($zidArr, &$ret) {
  44. if (in_array($k, $zidArr)) {
  45. $ret[] = $v;
  46. }
  47. });
  48. return $ret;
  49. }
  50. }