123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- <?php
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- namespace loyalsoft;
- /**
- * Description of Ins_GateInfo
- *
- * @author c'y'zhao
- */
- class Ins_GateInfo extends Object_ext {
- public $GateId = 0;
- /**
- * 0: 未领取,1: 五分钟奖励已领取 ,2: 十分钟奖励已领取, 3: 通关奖励已领取
- */
- #[ArrayType]
- public $FirstReward = array();
- /**
- * 坚持生存的最长时间(单位秒)
- * @var type
- */
- public $MaxSeconds = 0;
- /**
- * 1:通关
- * @param type $arg
- */
- public $pass = 0;
- /**
- * 本关剧情是否已经播放过 0:没有 1:有
- * @var type
- */
- public $plotStart = 0;
- /**
- * 本关挑战次数
- * @var type
- */
- public $fightNum = 0;
- /**
- * 失败次数
- * @var type
- */
- public $fightNum_fail = 0;
- /**
- * 0/1/2/3 (0未挑战, 1/2/3代表已经通过的挑战)
- * @var int
- */
- public $tz_state = 0;
- /**
- * 0/1/2/3/4/5/6 挑战奖励(一次性)领取记录
- * @var int
- */
- public $tz_rewards = 0;
- /**
- * @return bool 是否主线关卡
- */
- public function IsMainPlotGate() {
- return self::GateTypeFromId($this->GateId) == 1;
- }
- /**
- * @return /sm_gate 模板数据
- */
- public function mo() {
- return GameConfig::gate_getItem($this->GateId);
- }
- /**
- * 从gateId中提取关卡类型
- * @param type $gateId
- * @return int 1 主线剧情, 2 主线挑战, 9 爬塔挑战
- */
- public static function GateTypeFromId($gateId) {
- return Ints::Slice($gateId, 0, 1);
- }
- // /**
- // * 从gateId中提取关卡地图资源类型(前端用)
- // * @param type $gateId 1 无限地图 2 上下地图 3 有限地图
- // * @return int 0..999
- // */
- // public static function GateMapRes($gateId) {
- // return Ints::Slice($gateId, 1, 4);
- // }
- // /**
- // * 从gateId中提取关卡难度(挑战关卡分1,2,3)
- // * @param type $gateId
- // * @return int
- // */
- // public static function GateDifficultyFromId($gateId) {
- // return Ints::Slice($gateId, 5, 1);
- // }
- /**
- * 关卡序号(最大999)
- * @param type $gateId
- * @return int
- */
- public static function gateNum($gateId) {
- return $gateId % 1000;
- // return Ints::Slice($gateId, 6, 3);
- }
- }
|