Ins_Gem.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. /**
  9. * Description of Ins_Gem
  10. *
  11. * @author c'y'zhao
  12. */
  13. class Ins_Gem extends Object_ext {
  14. /**
  15. * 索引id
  16. * @var type
  17. */
  18. public $uid = 0;
  19. /**
  20. * 配置表id
  21. * @var type
  22. */
  23. public $typeId = 0;
  24. /**
  25. * 词条
  26. * @var type
  27. */
  28. public $predicateId = 0;
  29. /**
  30. * 是否已经被锁 0:没有 1:锁
  31. * @var type
  32. */
  33. public $isUnlock = 0;
  34. /**
  35. * 新得到的宝石有绿点提示,点一下才会消除
  36. * @var type
  37. */
  38. public $isNew = 0;
  39. /**
  40. * 构造函数
  41. * @param type $args
  42. */
  43. public function __construct($args = null) {
  44. if($args !=null){
  45. parent::__construct($args);
  46. }
  47. }
  48. /**
  49. * 配置
  50. * @return sm_gem
  51. */
  52. public function mo() {
  53. $mo = GameConfig::gem_getItem($this->typeId);
  54. my_Assert(null != $mo, ErrCode::err_const_no);
  55. return $mo;
  56. }
  57. /**
  58. *
  59. * @return sm_predicate
  60. */
  61. public function predicateMo() {
  62. $mo = GameConfig::predicate_getItem($this->predicateId);
  63. my_Assert(null != $mo, ErrCode::err_const_no);
  64. return $mo;
  65. }
  66. }