123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- <?php
- namespace loyalsoft;
- /**
- * 玩家的英雄的实体数据
- */
- class UserHeroModel {
- /**
- * 唯一的英雄ID
- * @var string
- */
- public $uid;
- /**
- * 英雄的模板ID
- * @var string
- */
- public $typeId;
- /**
- * 英雄的当前等级
- * @var int
- */
- public $level;
- /**
- * 英雄当前等阶
- * @var string
- */
- public $grade;
- /**
- * 英雄的收集的当前等级满级的累计经验值
- * @var int
- */
- public $maxXp;
- /**
- * 英雄的当前总经验值
- * @var int
- */
- public $xp;
- /**
- * 当前等阶 默认是0.
- * 0= 绿 1=蓝 2= 红 3= 紫 4= 橙 5
- * @var int
- */
- public $strengthLevel;
- /**
- * 当前星级 默认是0星
- * @var int
- */
- public $curStar;
- /**
- * 当前神血的 血脉等级 默认是0
- * @var int
- */
- public $curBloodId;
- /**
- * 当前卡牌的锁定状态
- * true = 锁定
- * @var bool
- */
- public $isLocked;
- /**
- *
- * @var object
- */
- public $skills;
- /**
- * 子技能列表(已解锁子技能id)
- * @var dic<int,[]int>
- */
- public $subSkills;
- /**
- *
- * @var object
- */
- public $equip;
- /**
- * 当前主线的好感度进度
- * @var object
- */
- public $curMainFavor;
- /**
- * 所有的已经拥有的好感度进度
- * @var array
- */
- public $favors;
- /**
- *
- * 构造函数
- */
- public function __construct() {
- $this->level = 1;
- $this->xp = 0;
- $this->maxXp = 0;
- $this->strengthLevel = 0;
- $this->curBloodId = 0;
- $this->curStar = 0;
- $this->isLocked = false;
- $this->curMainFavor = 'E';
- $this->favors = ArrayInit();
- $this->favors[] = 'E';
- $this->grade = "D";
- //-----------初始化技能的默认数据
- $this->skills = ObjectInit();
- $temp = ObjectInit();
- $temp->normalSkill = JsonUtil::decode('{"level":1}');
- $temp->manuSkill1 = JsonUtil::decode('{"level":1}');
- $temp->manuSkill2 = JsonUtil::decode('{"level":1}');
- $temp->manuSkill3 = JsonUtil::decode('{"level":1}');
- $temp->passiveSkill = JsonUtil::decode('{"level":1}');
- $temp->captainSkill = JsonUtil::decode('{"level":1}');
- $this->skills = $temp;
- $this->subSkills = ObjectInit();
- //----初始化装备的默认数据
- $this->equip = ObjectInit();
- $tempEq = ObjectInit();
- $tempEq->weapon = JsonUtil::decode('{"itemuid":0}');
- $tempEq->armor = JsonUtil::decode('{"itemuid":0}');
- $tempEq->ring = JsonUtil::decode('{"itemuid":0}');
- $this->equip = $tempEq;
- }
- }
|