|
@@ -698,16 +698,9 @@ class PVPProc {
|
|
|
* @return type
|
|
|
*/
|
|
|
private static function GetPlayerInfosForPVP($mem, $zoneid, $retUidsWithScore) {
|
|
|
- $retUids = array_keys($retUidsWithScore);
|
|
|
- $keysOfUserInfo = array_map(function($u)use($zoneid) {
|
|
|
- return MemKey_User::Info_hash($zoneid, $u);
|
|
|
- }, $retUids);
|
|
|
- $arrUserInfos = $mem->getMulti($keysOfUserInfo);
|
|
|
$arr = ArrayInit();
|
|
|
- $i = 0;
|
|
|
- foreach ($arrUserInfos as $userGameInfo) { # 遍历
|
|
|
- isEditor() && $userGameInfo = new UserGameModel; # 语法辅助
|
|
|
- $uid = $retUids[$i++]; # 当前UID
|
|
|
+ foreach ($retUidsWithScore as $uid => $score) {
|
|
|
+ $userGameInfo = UserProc::getUserInfo($mem, $zoneid, $uid); # 玩家数据
|
|
|
$teamConfig = $userGameInfo->pvp->defTeam; # 防守阵容
|
|
|
$heros = new \stdClass(); # 英雄集合
|
|
|
foreach ($teamConfig->heros as $i => $hid) {
|
|
@@ -726,11 +719,12 @@ class PVPProc {
|
|
|
'equipment' => array("equipments" => my_null_default($userGameInfo->game->store->equipment, new \stdClass())), # 武器
|
|
|
'yanling' => array("items" => my_null_default($userGameInfo->game->store->yanling, new \stdClass())), # 言灵
|
|
|
'heros' => my_null_default($heros, new \stdClass()), # # 英雄集合
|
|
|
- 'score' => $retUidsWithScore[$uid], # # 积分
|
|
|
+ 'score' => $score, # # 积分
|
|
|
'fpower' => $fpower, # # 总战力
|
|
|
);
|
|
|
$arr[$uid] = $adversary;
|
|
|
}
|
|
|
+
|
|
|
if (count($arr) <= 0) {
|
|
|
$arr = null;
|
|
|
}
|