コード例 #1
0
ファイル: battle.php プロジェクト: AdrianMarceau/mmrpg-world
 if (isset($this_playerinfo['player_robots'])) {
     $this_preset_robots = $this_playerinfo['player_robots'];
 }
 $this_playerinfo['player_robots'] = array();
 // Update this player's name if this is a player battle
 if ($this_battle->get_flag('player_battle')) {
     $temp_name = !empty($this_userinfo['user_name_public']) ? $this_userinfo['user_name_public'] : $this_userinfo['user_name'];
     $this_playerinfo['player_name'] = $temp_name;
 }
 // Update this player's items if they exist in the session
 if (isset($_SESSION['GAME']['values']['battle_items'])) {
     $temp_items = $_SESSION['GAME']['values']['battle_items'];
     $this_playerinfo['player_items'] = $temp_items;
 }
 // Collect the target player's preset info from the battle
 $target_preset_player = $this_battle->get_target_player();
 if (!empty($target_preset_player)) {
     $target_playerinfo = array_merge($target_preset_player, $target_playerinfo);
 }
 // Collect the target player's preset robots from the battle
 $target_preset_robots = array();
 if (isset($target_playerinfo['player_robots'])) {
     $target_preset_robots = $target_playerinfo['player_robots'];
 }
 $target_playerinfo['player_robots'] = array();
 //echo '<pre>$this_battleinfo = '."\n".print_r($this_battleinfo, true).'</pre>'."\n";
 //echo '<pre>$this_playerinfo = '."\n".print_r($this_playerinfo, true).'</pre>'."\n";
 //echo '<pre>$this_preset_robots = '."\n".print_r($this_preset_robots, true).'</pre>'."\n";
 //echo '<pre>$target_playerinfo = '."\n".print_r($target_playerinfo, true).'</pre>'."\n";
 //echo '<pre>$target_preset_robots = '."\n".print_r($target_preset_robots, true).'</pre>'."\n";
 // Load the object data for this field from the session