Ins_Mainland.php 1.3 KB

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