|
@@ -64,38 +64,29 @@ class Ins_GateInfo {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 从gateId中提取关卡索引
|
|
|
- * @param type $gateId
|
|
|
+ * 从gateId中提取关卡地图资源类型(前端用)
|
|
|
+ * @param type $gateId 1 无限地图 2 上下地图 3 有限地图
|
|
|
* @return int 0..999
|
|
|
*/
|
|
|
- public static function GateMapIdFromId($gateId) {
|
|
|
- return Ints::Slice($gateId, 1, 3);
|
|
|
+ public static function GateMapRes($gateId) {
|
|
|
+ return Ints::Slice($gateId, 1, 4);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 从gateId中提取地图风格编号
|
|
|
- * @param type $gateId
|
|
|
- * @return int 0..99
|
|
|
- */
|
|
|
- public static function GateMapStyleFromId($gateId) {
|
|
|
- return Ints::Slice($gateId, 4, 2);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 从gateId中提取地图类型
|
|
|
+ * 从gateId中提取关卡难度(挑战关卡分1,2,3)
|
|
|
* @param type $gateId
|
|
|
- * @return int 1 无限地图 2 上下地图 3 有限地图
|
|
|
+ * @return int
|
|
|
*/
|
|
|
- public static function GateMapTypeFromId($gateId) {
|
|
|
- return Ints::Slice($gateId, 6, 1);
|
|
|
+ public static function GateDifficultyFromId($gateId) {
|
|
|
+ return Ints::Slice($gateId, 5, 1);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 从gateId中提取关卡难度(挑战关卡分1,2,3)
|
|
|
+ * 从gateId中提取地图序号(最大999)
|
|
|
* @param type $gateId
|
|
|
* @return int
|
|
|
*/
|
|
|
- public static function GateDifficultyFromId($gateId) {
|
|
|
- return Ints::Slice($gateId, 7, 1);
|
|
|
+ public static function GateMapTypeFromId($gateId) {
|
|
|
+ return Ints::Slice($gateId, 6, 3);
|
|
|
}
|
|
|
}
|