|
@@ -31,7 +31,7 @@ class UserProc {
|
|
|
case CmdCode::cmd_user_completeNewbieGuide: # 6007 提交新手引导步骤
|
|
|
return UserProc::completeNewbieGuide();
|
|
|
// case CmdCode::cmd_user_setNewbieGuideCards: # 6008 发放新手引导所需卡牌
|
|
|
-// return self::SetNewbieGuideCards($req);
|
|
|
+// return self::SetNewbieGuideCards($req);
|
|
|
// case CmdCode::cmd_user_setNewbieGuideOver: # 6009 跳过新手引导
|
|
|
// return UserProc::setNewbieGuideOver();
|
|
|
case CmdCode::cmd_user_setNickname: # 6010 设置/修改玩家昵称
|
|
@@ -42,16 +42,28 @@ class UserProc {
|
|
|
return self::SetUserImage();
|
|
|
case CmdCode::cmd_user_changeUserHeadImg: # 6013 更换玩家头像
|
|
|
return self::SetUserHeadImage();
|
|
|
+
|
|
|
+ case CmdCode::cmd_user_stat_initvolc: # 6014 初始化火山引擎所需数据
|
|
|
+ return self::InitVolcData();
|
|
|
default:
|
|
|
Err(ErrCode::cmd_err);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 6014 初始化火山引擎所需数据
|
|
|
+ */
|
|
|
+ public static function InitVolcData() {
|
|
|
+ list($app_name, $app_package, $app_channel, $app_version, $os_name, $os_version, $device_model, $ab_version, $traffic_type) = req()->paras;
|
|
|
+ VolcUtil::Init($app_name, $app_package, $app_channel, $app_version, $os_name, $os_version, $device_model, $ab_version, $traffic_type);
|
|
|
+ return Resp::ok();
|
|
|
+ }
|
|
|
+
|
|
|
//
|
|
|
// <editor-fold defaultstate="collapsed" desc="玩家信息 修改">
|
|
|
|
|
|
/**
|
|
|
- * [6013]修改玩家头像
|
|
|
+ * [6013]修改玩家头像
|
|
|
*/
|
|
|
static function SetUserHeadImage() {
|
|
|
list($headImage) = req()->paras; # 参数, 新头像
|
|
@@ -61,7 +73,7 @@ class UserProc {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * [6012]修改玩家形象
|
|
|
+ * [6012]修改玩家形象
|
|
|
*/
|
|
|
static function SetUserImage() {
|
|
|
list($image) = req()->paras; # 参数, 新形象
|
|
@@ -71,7 +83,7 @@ class UserProc {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * [6011]修改玩家头像框
|
|
|
+ * [6011]修改玩家头像框
|
|
|
*/
|
|
|
static function SetUserImageBorder() {
|
|
|
list($imgborderId) = req()->paras; # 参数, 新头像框ID
|
|
@@ -81,7 +93,7 @@ class UserProc {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * [6010] 设置/修改玩家昵称
|
|
|
+ * [6010] 设置/修改玩家昵称
|
|
|
*/
|
|
|
static function SetUserNickname() {
|
|
|
list($newname) = req()->paras; # 参数: 新昵称, 头像
|
|
@@ -105,7 +117,7 @@ class UserProc {
|
|
|
//
|
|
|
// <editor-fold defaultstate="collapsed" desc="新手引导">
|
|
|
// /**
|
|
|
-// * [6009] 新手引导 发送n张碎片到玩家身上
|
|
|
+// * [6009] 新手引导 发送n张碎片到玩家身上
|
|
|
// */
|
|
|
// static function SetNewbieGuideCards() {
|
|
|
// Err(ErrCode::function_notopen_msg); # 功能已经废弃 -wg
|
|
@@ -134,7 +146,7 @@ class UserProc {
|
|
|
// }
|
|
|
|
|
|
/**
|
|
|
- * [6009] 增加 设置引导结束的标志位
|
|
|
+ * [6009] 增加 设置引导结束的标志位
|
|
|
*/
|
|
|
public static function setNewbieGuideOver() {
|
|
|
Err(ErrCode::function_notopen_msg); # 功能已经废弃 -wg
|
|
@@ -152,7 +164,7 @@ class UserProc {
|
|
|
|
|
|
/**
|
|
|
* [6007] 更新初始的强制的新手引导阶段步骤
|
|
|
- * 第一阶段的引导
|
|
|
+ * 第一阶段的引导
|
|
|
*/
|
|
|
public static function completeNewbieGuide() {
|
|
|
$guideIndex = req()->paras[0]; # 参数: 新手引导步骤
|
|
@@ -178,7 +190,7 @@ class UserProc {
|
|
|
//
|
|
|
|
|
|
/**
|
|
|
- * 6006 注册新角色
|
|
|
+ * 6006 注册新角色
|
|
|
*/
|
|
|
public static function RegisterNewRole() {
|
|
|
$userID = req()->uid;
|
|
@@ -201,7 +213,7 @@ class UserProc {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 6000 【移动端】 获取分区列表
|
|
|
+ * 6000 【移动端】 获取分区列表
|
|
|
*/
|
|
|
public static function GetZoneList() {
|
|
|
$defaultZone = new Ins_ZoneInfo(1, 0, ""); # 新用户默认分区
|
|
@@ -221,7 +233,7 @@ class UserProc {
|
|
|
if ($zone->isRecommended > 0 && $zone->status == 1) {
|
|
|
$zoneList[] = $zone;
|
|
|
} else {
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
} else {
|
|
|
$zoneList[] = $zone;
|
|
@@ -267,7 +279,7 @@ class UserProc {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 6002 客户端下载常量配置信息
|
|
|
+ * 6002 客户端下载常量配置信息
|
|
|
* @return type
|
|
|
*/
|
|
|
public static function downloadConstInfo() {
|
|
@@ -282,12 +294,12 @@ class UserProc {
|
|
|
return Resp::ok($ret);
|
|
|
}
|
|
|
$constInfo = GameConfig::client(); # 取出来的已经是base64过的压缩数据
|
|
|
- my_Assert($constInfo, ErrCode::err_const_no); # 找不到配置数据
|
|
|
+ my_Assert($constInfo, ErrCode::err_const_no); # 找不到配置数据
|
|
|
return Resp::ok(array('data' => $constInfo));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 6001 客户端登录并返还玩家信息
|
|
|
+ * 6001 客户端登录并返还玩家信息
|
|
|
* @return Resp
|
|
|
*/
|
|
|
public static function loginUserInfo() {
|
|
@@ -305,7 +317,7 @@ class UserProc {
|
|
|
UserProc::updateUserInfo(); # 这一步回存操作只有在 userInfo正常存在的情况下才进行
|
|
|
$resp = Resp::ok($userInfo); # 设置返回值
|
|
|
self::backupUserInfo(); # 数据回写
|
|
|
-
|
|
|
+
|
|
|
AuctionProc::TriggerSettlement(); #结算流拍信息
|
|
|
self::updtateUserZoneInfo(); # 1. 更新玩家分区记录
|
|
|
}
|
|
@@ -313,7 +325,7 @@ class UserProc {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 6003 领取连续登录奖励
|
|
|
+ * 6003 领取连续登录奖励
|
|
|
*/
|
|
|
public static function acceptContiDaysGift() {
|
|
|
$resp = Resp::err(ErrCode::err_method_notimplement);
|
|
@@ -359,7 +371,7 @@ class UserProc {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 检测连续登录状态,重置必要字段[时间戳自动记录]
|
|
|
+ * 检测连续登录状态,重置必要字段[时间戳自动记录]
|
|
|
*/
|
|
|
static function checkContidays($isnew = 0) {
|
|
|
$ret = TimeUtil::tsDay() - TimeUtil::tsDay(req()->userInfo->game->baseInfo->lastLogin); // 对比登录日期
|
|
@@ -377,7 +389,7 @@ class UserProc {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 处理当天第一次登录
|
|
|
+ * 处理当天第一次登录
|
|
|
* @param bool $isnew Description
|
|
|
*/
|
|
|
static function OnNewDay($isnew) {
|
|
@@ -390,7 +402,7 @@ class UserProc {
|
|
|
// <editor-fold defaultstate="collapsed" desc="创建新用户">
|
|
|
|
|
|
/**
|
|
|
- * 创建用户
|
|
|
+ * 创建用户
|
|
|
* @return UserInfoMo
|
|
|
*/
|
|
|
static function createUser($rolename, $gender, $profile_img) {
|
|
@@ -406,7 +418,7 @@ class UserProc {
|
|
|
$userInfo->game->baseInfo->firstLogin = now();
|
|
|
// $userInfo->game->pvp->socre = PVPProc::_getScore_by_uid($req, $req->uid); # 初始化pvp积分
|
|
|
// $userInfo->game->NewbieGuideOver = 1;
|
|
|
-// UserProc::_intiHeroManual($userInfo->game); # 初始化图鉴
|
|
|
+// UserProc::_intiHeroManual($userInfo->game); # 初始化图鉴
|
|
|
#Ps 6006是没有获得到Userinfo到Req中的
|
|
|
UserProc::checkContidays(1); # 每日状态检查
|
|
|
// UserProc::fetchFromInteract($mem, $req); # 从interact拉取数据,Ps.初始化的过程应该还拉取不到什么有效数据
|
|
@@ -419,7 +431,7 @@ class UserProc {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 整理平台玩家记录集
|
|
|
+ * 整理平台玩家记录集
|
|
|
* @param int $isnew
|
|
|
*/
|
|
|
private static function updatePlatUserRecord($isnew = 0) {
|
|
@@ -449,10 +461,10 @@ class UserProc {
|
|
|
// <editor-fold defaultstate="collapsed" desc="读写玩家数据">
|
|
|
|
|
|
/**
|
|
|
- * 玩家数据
|
|
|
+ * 玩家数据
|
|
|
* @param type $zoneid
|
|
|
* @param type $uid
|
|
|
- * @return UserInfoMo
|
|
|
+ * @return UserInfoMo
|
|
|
*/
|
|
|
public static function getUserInfo($zoneid, $uid) {
|
|
|
$key = MemKey_User::Info_hash($zoneid, $uid);
|
|
@@ -472,7 +484,7 @@ class UserProc {
|
|
|
public static function updateUserInfo() {
|
|
|
my_Assert(req(), "req()为空");
|
|
|
my_Assert(req()->userInfo, "[" . req()->cmd . "] 玩家数据正在被清空!" . req()->uid);
|
|
|
- req()->userInfoChanged = TRUE; # 设置回写标志位
|
|
|
+ req()->userInfoChanged = TRUE; # 设置回写标志位
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -495,7 +507,7 @@ class UserProc {
|
|
|
// <editor-fold defaultstate="collapsed" desc="玩家分区记录">
|
|
|
|
|
|
/**
|
|
|
- * 读取玩家的分区记录
|
|
|
+ * 读取玩家的分区记录
|
|
|
* @return Data_UserZoneInfo Description
|
|
|
*/
|
|
|
public static function getUserZoneInfo() {
|