|
@@ -5,6 +5,7 @@ namespace loyalsoft;
|
|
|
/**
|
|
|
* 玩家关卡地图数据
|
|
|
* @author gwang
|
|
|
+ * @deprecated since 2022.3 换开放地图版转 Info_NewMap->Ins_FootHold
|
|
|
* @version
|
|
|
* 1.0.0 Created at 2021年3月2日14:32:52 关卡分三层处理 大陆->区域->关卡.
|
|
|
*/
|
|
@@ -15,7 +16,7 @@ class Info_Map extends Object_ext {
|
|
|
* @var dict<int,Ins_Mainland>
|
|
|
*/
|
|
|
public $mainlands;
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 战斗关卡记录--1.记录剧情关卡记录;2.副本唤灵师关卡 3.副本武器关卡 4.副本言灵关卡
|
|
|
* @param type $arg
|
|
@@ -33,7 +34,6 @@ class Info_Map extends Object_ext {
|
|
|
// foreach ($arr as $key) {
|
|
|
// $this->battleRecord->$key = array();
|
|
|
// }
|
|
|
-
|
|
|
// 直接初始化8个大陆的基本数据
|
|
|
$this->mainlands = ObjectInit();
|
|
|
foreach (GameConfig::gate_mainland() as $id => $land) {
|
|
@@ -57,46 +57,47 @@ class Info_Map extends Object_ext {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public function addBattleRecord($gateId) {
|
|
|
- if(!in_array($gateId,$this->battleRecord)){
|
|
|
- if(strlen($gateId) == 8 && substr($gateId,0,3) == 2001){
|
|
|
+ public function addBattleRecord($gateId) {
|
|
|
+ if (!in_array($gateId, $this->battleRecord)) {
|
|
|
+ if (strlen($gateId) == 8 && substr($gateId, 0, 3) == 2001) {
|
|
|
$type = Enum_TargetStatistics::HuanLingShiGateId_ComUserNum;
|
|
|
- } elseif (strlen($gateId) == 8 && substr($gateId,0,3) == 2002) {
|
|
|
+ } elseif (strlen($gateId) == 8 && substr($gateId, 0, 3) == 2002) {
|
|
|
$type = Enum_TargetStatistics::WeaponGateId_ComUserNum;
|
|
|
- } elseif (strlen($gateId) == 8 && substr($gateId,0,3) == 2003) {
|
|
|
+ } elseif (strlen($gateId) == 8 && substr($gateId, 0, 3) == 2003) {
|
|
|
$type = Enum_TargetStatistics::YanLingGateId_ComUserNum;
|
|
|
} else {
|
|
|
$type = Enum_TargetStatistics::storyGateId_ComUserNum;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
$arr = $this->battleRecord;
|
|
|
$arr[] = $gateId;
|
|
|
- $this->battleRecord= $arr;
|
|
|
+ $this->battleRecord = $arr;
|
|
|
StatisticsProc::TargetStatistics($type, $gateId);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- public function addBattleNumRecord($gateId,$ret) {
|
|
|
- if(strlen($gateId) == 8 && substr($gateId,0,3) == 2001){
|
|
|
- $type = Enum_TargetStatistics::HuanLingShiGateId_BattleNum;
|
|
|
- } elseif (strlen($gateId) == 8 && substr($gateId,0,3) == 2002) {
|
|
|
- $type = Enum_TargetStatistics::WeaponGateId_BattleNum;
|
|
|
- } elseif (strlen($gateId) == 8 && substr($gateId,0,3) == 2003) {
|
|
|
- $type = Enum_TargetStatistics::YanLingGateId_BattleNum;
|
|
|
- } else {
|
|
|
- $type = Enum_TargetStatistics::storyGateId_BattleNum;
|
|
|
- }
|
|
|
- $battleNum = 0;
|
|
|
+
|
|
|
+ public function addBattleNumRecord($gateId, $ret) {
|
|
|
+ if (strlen($gateId) == 8 && substr($gateId, 0, 3) == 2001) {
|
|
|
+ $type = Enum_TargetStatistics::HuanLingShiGateId_BattleNum;
|
|
|
+ } elseif (strlen($gateId) == 8 && substr($gateId, 0, 3) == 2002) {
|
|
|
+ $type = Enum_TargetStatistics::WeaponGateId_BattleNum;
|
|
|
+ } elseif (strlen($gateId) == 8 && substr($gateId, 0, 3) == 2003) {
|
|
|
+ $type = Enum_TargetStatistics::YanLingGateId_BattleNum;
|
|
|
+ } else {
|
|
|
+ $type = Enum_TargetStatistics::storyGateId_BattleNum;
|
|
|
+ }
|
|
|
+ $battleNum = 0;
|
|
|
+ $passNum = 0;
|
|
|
+ if ($ret == true) {
|
|
|
+ $battleNum = 1;
|
|
|
+ $passNum = 1;
|
|
|
+ } else {
|
|
|
+ $battleNum = 1;
|
|
|
$passNum = 0;
|
|
|
- if($ret == true){
|
|
|
- $battleNum = 1;
|
|
|
- $passNum = 1;
|
|
|
- } else {
|
|
|
- $battleNum = 1;
|
|
|
- $passNum = 0;
|
|
|
- }
|
|
|
-
|
|
|
- $ctx = $battleNum."/".$passNum;
|
|
|
- StatisticsProc::TargetStatistics($type, $gateId,$ctx);
|
|
|
+ }
|
|
|
+
|
|
|
+ $ctx = $battleNum . "/" . $passNum;
|
|
|
+ StatisticsProc::TargetStatistics($type, $gateId, $ctx);
|
|
|
}
|
|
|
+
|
|
|
}
|