|
@@ -57,17 +57,18 @@ class UserProc {
|
|
|
Err(ErrCode::cmd_err);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/*
|
|
|
* 6016 删除角色
|
|
|
*/
|
|
|
- public static function deleteUserUId(){
|
|
|
+
|
|
|
+ public static function deleteUserUId() {
|
|
|
$mem = gMem();
|
|
|
-
|
|
|
+
|
|
|
$uid = req()->uid;
|
|
|
$zoneid = req()->zoneid;
|
|
|
$list = array();
|
|
|
-
|
|
|
+
|
|
|
$zoneKey = MemKey_User::Union_PlayedZoneInfo_normal($uid);
|
|
|
$list[] = $zoneKey;
|
|
|
$publicKey = MemKey_User::Union_PublicState_hash($uid);
|
|
@@ -86,20 +87,20 @@ class UserProc {
|
|
|
$list[] = $PVP_DefensiveLogKey;
|
|
|
$SigKey = MemKey_User::Sig($zoneid, $uid);
|
|
|
$list[] = $SigKey;
|
|
|
-
|
|
|
+
|
|
|
$CurIdKey = MemKey_User::Mail_CurId_int($zoneid, $uid);
|
|
|
$list[] = $CurIdKey;
|
|
|
$SysRecordKey = MemKey_User::Mail_SysRecord_set($zoneid, $uid);
|
|
|
$list[] = $SysRecordKey;
|
|
|
$QueueKey = MemKey_User::Mail_Queue_hash($zoneid, $uid);
|
|
|
$list[] = $QueueKey;
|
|
|
-
|
|
|
+
|
|
|
foreach ($list as $key) {
|
|
|
- if($mem->exists($key)){
|
|
|
+ if ($mem->exists($key)) {
|
|
|
$mem->delete($key);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return Resp::ok();
|
|
|
}
|
|
|
|
|
@@ -339,7 +340,7 @@ class UserProc {
|
|
|
/**
|
|
|
* 6000 【移动端】 获取分区列表
|
|
|
*/
|
|
|
- public static function GetZoneList() {
|
|
|
+ public static function GetZoneList() {
|
|
|
$defaultZone = new Ins_ZoneInfo(1, 0, ""); # 新用户默认分区
|
|
|
$bGetRecommended = false;
|
|
|
if (count(req()->paras) > 0) { # 是否只拉取推荐分区
|
|
@@ -457,9 +458,9 @@ class UserProc {
|
|
|
}
|
|
|
return $resp;
|
|
|
}
|
|
|
-
|
|
|
- public static function newFieldSupplement(&$game) {
|
|
|
- if(!StlUtil::dictHasProperty($game->store,'storage')){
|
|
|
+
|
|
|
+ public static function newFieldSupplement(&$game) {
|
|
|
+ if (!StlUtil::dictHasProperty($game->store, 'storage')) {
|
|
|
$key = 1;
|
|
|
$key2 = 2;
|
|
|
|
|
@@ -467,8 +468,8 @@ class UserProc {
|
|
|
$game->store->storage->$key = new Ins_storage();
|
|
|
$game->store->storage->$key2 = new Ins_storage();
|
|
|
}
|
|
|
-
|
|
|
- if($game->store->storage == null){
|
|
|
+
|
|
|
+ if ($game->store->storage == null) {
|
|
|
$key = 1;
|
|
|
$key2 = 2;
|
|
|
|
|
@@ -476,51 +477,50 @@ class UserProc {
|
|
|
$game->store->storage->$key = new Ins_storage();
|
|
|
$game->store->storage->$key2 = new Ins_storage();
|
|
|
}
|
|
|
-
|
|
|
- if(!StlUtil::dictHasProperty($game->store,'battleItem')){
|
|
|
+
|
|
|
+ if (!StlUtil::dictHasProperty($game->store, 'battleItem')) {
|
|
|
$game->store->battleItem = ObjectInit();
|
|
|
}
|
|
|
-
|
|
|
- if($game->store->battleItem == null){
|
|
|
+
|
|
|
+ if ($game->store->battleItem == null) {
|
|
|
$game->store->battleItem = ObjectInit();
|
|
|
}
|
|
|
-
|
|
|
- if(!StlUtil::dictHasProperty($game->newMap,'huichengquanRecord')){
|
|
|
+
|
|
|
+ if (!StlUtil::dictHasProperty($game->newMap, 'huichengquanRecord')) {
|
|
|
$game->newMap->huichengquanRecord = ObjectInit();
|
|
|
}
|
|
|
-
|
|
|
- if(is_array($game->newMap->huichengquanRecord)){
|
|
|
+
|
|
|
+ if (is_array($game->newMap->huichengquanRecord)) {
|
|
|
$game->newMap->huichengquanRecord = ObjectInit();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
$dixiachengId = 503001;
|
|
|
- if(!StlUtil::dictHasProperty($game->newMap->unlockedFootholds, $dixiachengId)){
|
|
|
+ if (!StlUtil::dictHasProperty($game->newMap->unlockedFootholds, $dixiachengId)) {
|
|
|
$mo = GameConfig::gate_getItem($dixiachengId);
|
|
|
$footHold = new Ins_FootHold();
|
|
|
$footHold->mapId = $mo->gateId;
|
|
|
$footHold->curMapType = $mo->mapType;
|
|
|
- $game->newMap->unlockedFootholds->$dixiachengId = $footHold;
|
|
|
- }
|
|
|
-
|
|
|
+ $game->newMap->unlockedFootholds->$dixiachengId = $footHold;
|
|
|
+ }
|
|
|
+
|
|
|
foreach ($game->newMap->unlockedFootholds as $mapid => $val) {
|
|
|
- if($val->mapId != $mapid){
|
|
|
+ if ($val->mapId != $mapid) {
|
|
|
$game->newMap->unlockedFootholds->$mapid->mapId = $mapid;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- if(!StlUtil::dictHasProperty($game->newMap, 'curFootholdId')){
|
|
|
+
|
|
|
+ if (!StlUtil::dictHasProperty($game->newMap, 'curFootholdId')) {
|
|
|
$game->newMap->curFootholdId = $game->newMap->curMapId;
|
|
|
}
|
|
|
-
|
|
|
- if($game->newMap->lastMapId == 0){
|
|
|
+
|
|
|
+ if ($game->newMap->lastMapId == 0) {
|
|
|
$game->newMap->lastMapId = 503099;
|
|
|
}
|
|
|
-
|
|
|
- if(!StlUtil::dictHasProperty($game->store, 'dailyTask_HandOver')){
|
|
|
+
|
|
|
+ if (!StlUtil::dictHasProperty($game->store, 'dailyTask_HandOver')) {
|
|
|
$game->store->dailyTask_HandOver = 0;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -779,7 +779,7 @@ class UserProc {
|
|
|
* version 1.0.0 Mysql storagef 1. 分表不做了, 2. 存储过程不用了 3. 先能用再说
|
|
|
*/
|
|
|
public static function backupUserInfoMongo() {
|
|
|
- $collectionName = "ylsj2019.userInfoBack"; # 表名
|
|
|
+ $collectionName = "userInfoBack"; # 表名
|
|
|
$key = MemKey_User::Info_hash(req()->zoneid, req()->uid);
|
|
|
$doc = array('key' => $key, # # 最新文档
|
|
|
'ts' => TimeUtil::dtCurrent(), # # 更新时间
|