@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | UBE_PLAYER_IS_DEFENDER => array(), |
56 | 56 | ); |
57 | 57 | |
58 | - foreach($this->_container as $player_id => $UBEPlayer) { |
|
58 | + foreach ($this->_container as $player_id => $UBEPlayer) { |
|
59 | 59 | $result[$UBEPlayer->getSide() ? UBE_PLAYER_IS_ATTACKER : UBE_PLAYER_IS_DEFENDER][$player_id] = $UBEPlayer->getDbRow(); |
60 | 60 | } |
61 | 61 | |
@@ -70,8 +70,8 @@ discard block |
||
70 | 70 | */ |
71 | 71 | public function get_first_player_on_side($side) { |
72 | 72 | $result = null; |
73 | - foreach($this->_container as $player_id => $UBEPlayer) { |
|
74 | - if($UBEPlayer->getSide() == $side) { |
|
73 | + foreach ($this->_container as $player_id => $UBEPlayer) { |
|
74 | + if ($UBEPlayer->getSide() == $side) { |
|
75 | 75 | $result = $UBEPlayer; |
76 | 76 | break; |
77 | 77 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | public function get_player_sides() { |
90 | 90 | $result = array(); |
91 | - foreach($this->_container as $player_id => $UBEPlayer) { |
|
91 | + foreach ($this->_container as $player_id => $UBEPlayer) { |
|
92 | 92 | $result[$player_id] = $UBEPlayer->getSide() ? UBE_PLAYER_IS_ATTACKER : UBE_PLAYER_IS_DEFENDER; |
93 | 93 | } |
94 | 94 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | } |
97 | 97 | |
98 | 98 | public function ubeLoadPlayersAndSetSideFromFleetIdList(array $added_fleets, UBEFleetList $fleetList, $side = UBE_PLAYER_IS_DEFENDER) { |
99 | - foreach($added_fleets as $fleet_id) { |
|
99 | + foreach ($added_fleets as $fleet_id) { |
|
100 | 100 | $this->db_load_player_by_id($fleetList[$fleet_id]->owner_id, $side); |
101 | 101 | } |
102 | 102 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | |
71 | 71 | $debris_for_moon = $debris->debris_total(); |
72 | 72 | |
73 | - if(!$debris_for_moon) { |
|
73 | + if (!$debris_for_moon) { |
|
74 | 74 | return; |
75 | 75 | } |
76 | 76 | |
@@ -78,12 +78,12 @@ discard block |
||
78 | 78 | $moon_chance = min($debris_for_moon / UBE_MOON_DEBRIS_PER_PERCENT, UBE_MOON_PERCENT_MAX); // TODO Configure |
79 | 79 | $moon_chance = $moon_chance >= UBE_MOON_PERCENT_MIN ? $moon_chance : 0; |
80 | 80 | $this->create_chance = $moon_chance; |
81 | - if($moon_chance) { |
|
82 | - if($is_simulator || mt_rand(1, 100) <= $moon_chance) { |
|
81 | + if ($moon_chance) { |
|
82 | + if ($is_simulator || mt_rand(1, 100) <= $moon_chance) { |
|
83 | 83 | $this->status = UBE_MOON_CREATE_SUCCESS; |
84 | 84 | $this->moon_diameter = round($is_simulator ? $moon_chance * 150 + 1999 : mt_rand($moon_chance * 100 + 1000, $moon_chance * 200 + 2999)); |
85 | 85 | |
86 | - if($debris_for_moon <= UBE_MOON_DEBRIS_MAX_SPENT) { |
|
86 | + if ($debris_for_moon <= UBE_MOON_DEBRIS_MAX_SPENT) { |
|
87 | 87 | $debris->_reset(); |
88 | 88 | } else { |
89 | 89 | $moon_debris_left_percent = ($debris_for_moon - UBE_MOON_DEBRIS_MAX_SPENT) / $debris_for_moon; |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | */ |
103 | 103 | protected function moon_destroy_try($reapers) { |
104 | 104 | // TODO: $is_simulator |
105 | - if($reapers <= 0) { |
|
105 | + if ($reapers <= 0) { |
|
106 | 106 | return; |
107 | 107 | } |
108 | 108 | |
@@ -120,8 +120,8 @@ discard block |
||
120 | 120 | * @version 2016-02-25 23:42:45 41a4.68 |
121 | 121 | */ |
122 | 122 | public function calculate_moon(UBE $ube) { |
123 | - if(UBE_MOON_EXISTS == $this->status) { |
|
124 | - if($ube->mission_type_id == MT_DESTROY && $ube->combat_result == UBE_COMBAT_RESULT_WIN) { |
|
123 | + if (UBE_MOON_EXISTS == $this->status) { |
|
124 | + if ($ube->mission_type_id == MT_DESTROY && $ube->combat_result == UBE_COMBAT_RESULT_WIN) { |
|
125 | 125 | $reapers = $ube->fleet_list->ube_calculate_attack_reapers(); |
126 | 126 | $this->moon_destroy_try($reapers); |
127 | 127 | } |
@@ -131,12 +131,12 @@ discard block |
||
131 | 131 | } |
132 | 132 | |
133 | 133 | public function report_generate_sql() { |
134 | - return "`ube_report_moon` = " . (int)$this->status . ", |
|
135 | - `ube_report_moon_chance` = " . (int)$this->create_chance . ", |
|
136 | - `ube_report_moon_size` = " . (float)$this->moon_diameter . ", |
|
137 | - `ube_report_moon_reapers` = " . (int)$this->reapers_status . ", |
|
138 | - `ube_report_moon_destroy_chance` = " . (int)$this->destroy_chance . ", |
|
139 | - `ube_report_moon_reapers_die_chance` = " . (int)$this->reaper_die_chance; |
|
134 | + return "`ube_report_moon` = " . (int) $this->status . ", |
|
135 | + `ube_report_moon_chance` = " . (int) $this->create_chance . ", |
|
136 | + `ube_report_moon_size` = " . (float) $this->moon_diameter . ", |
|
137 | + `ube_report_moon_reapers` = " . (int) $this->reapers_status . ", |
|
138 | + `ube_report_moon_destroy_chance` = " . (int) $this->destroy_chance . ", |
|
139 | + `ube_report_moon_reapers_die_chance` = " . (int) $this->reaper_die_chance; |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | public function report_render_moon() { |
@@ -166,11 +166,11 @@ discard block |
||
166 | 166 | * @param $planet_id |
167 | 167 | */ |
168 | 168 | public function db_apply_result($planet_info, $destination_user_id) { |
169 | - if($this->status == UBE_MOON_CREATE_SUCCESS) { |
|
169 | + if ($this->status == UBE_MOON_CREATE_SUCCESS) { |
|
170 | 170 | $moon_row = uni_create_moon($planet_info[PLANET_GALAXY], $planet_info[PLANET_SYSTEM], $planet_info[PLANET_PLANET], $destination_user_id, $this->moon_diameter, '', false); |
171 | 171 | $this->moon_name = $moon_row['name']; |
172 | 172 | unset($moon_row); |
173 | - } elseif($this->status == UBE_MOON_DESTROY_SUCCESS) { |
|
173 | + } elseif ($this->status == UBE_MOON_DESTROY_SUCCESS) { |
|
174 | 174 | db_planet_delete_by_id($planet_info[PLANET_ID]); |
175 | 175 | } |
176 | 176 | } |
@@ -179,14 +179,14 @@ discard block |
||
179 | 179 | global $lang; |
180 | 180 | |
181 | 181 | $text_defender = ''; |
182 | - if($this->status == UBE_MOON_CREATE_SUCCESS) { |
|
182 | + if ($this->status == UBE_MOON_CREATE_SUCCESS) { |
|
183 | 183 | $text_defender .= "{$lang['ube_report_moon_created']} {$this->moon_diameter} {$lang['sys_kilometers_short']}<br /><br />"; |
184 | - } elseif($this->status == UBE_MOON_CREATE_FAILED) { |
|
184 | + } elseif ($this->status == UBE_MOON_CREATE_FAILED) { |
|
185 | 185 | $text_defender .= "{$lang['ube_report_moon_chance']} {$this->create_chance}%<br /><br />"; |
186 | 186 | } |
187 | 187 | |
188 | - if($ube->mission_type_id == MT_DESTROY) { |
|
189 | - if($this->reapers_status == UBE_MOON_REAPERS_NONE) { |
|
188 | + if ($ube->mission_type_id == MT_DESTROY) { |
|
189 | + if ($this->reapers_status == UBE_MOON_REAPERS_NONE) { |
|
190 | 190 | $text_defender .= $lang['ube_report_moon_reapers_none']; |
191 | 191 | } else { |
192 | 192 | $text_defender .= "{$lang['ube_report_moon_reapers_wave']}. {$lang['ube_report_moon_reapers_chance']} {$this->destroy_chance}%. "; |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | * @version 2016-02-25 23:42:45 41a4.68 |
216 | 216 | */ |
217 | 217 | public function ubeInitLoadStatis($destination_planet) { |
218 | - if($destination_planet['planet_type'] == PT_MOON || is_array($moon = db_planet_by_parent($destination_planet['id'], true, '`id`'))) { |
|
218 | + if ($destination_planet['planet_type'] == PT_MOON || is_array($moon = db_planet_by_parent($destination_planet['id'], true, '`id`'))) { |
|
219 | 219 | $this->status = UBE_MOON_EXISTS; |
220 | 220 | $this->moon_diameter = !empty($moon['planet_type']) && $moon['planet_type'] == PT_MOON ? $moon['diameter'] : $destination_planet['diameter']; |
221 | 221 | $this->reapers_status = UBE_MOON_REAPERS_NONE; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function report_render_rounds(&$template_result, UBE $ube) { |
27 | 27 | $round_count = $this->count(); |
28 | - for($round = 1; $round <= $round_count - 1; $round++) { |
|
28 | + for ($round = 1; $round <= $round_count - 1; $round++) { |
|
29 | 29 | $template_result['.']['round'][] = array( |
30 | 30 | 'NUMBER' => $round, |
31 | 31 | '.' => array( |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | */ |
49 | 49 | public function sql_generate_unit_array(array &$sql_perform_ube_report_unit, $ube_report_id, UBEFleetList $UBEFleetList) { |
50 | 50 | $unit_sort_order = 1; |
51 | - foreach($this->_container as $round_number => $UBERound) { |
|
51 | + foreach ($this->_container as $round_number => $UBERound) { |
|
52 | 52 | $outer_prefix = array( |
53 | 53 | $ube_report_id, |
54 | 54 | $round_number, |
@@ -66,9 +66,9 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function db_load_round_list_from_report_row($report_row, UBE $ube) { |
68 | 68 | $query = doquery("SELECT * FROM {{ube_report_unit}} WHERE `ube_report_id` = {$report_row['ube_report_id']} ORDER BY `ube_report_unit_id`"); |
69 | - while($report_unit_row = db_fetch($query)) { |
|
69 | + while ($report_unit_row = db_fetch($query)) { |
|
70 | 70 | $round_number = $report_unit_row['ube_report_unit_round']; |
71 | - if(!isset($this[$round_number])) { |
|
71 | + if (!isset($this[$round_number])) { |
|
72 | 72 | $this[$round_number] = new UBERound(); |
73 | 73 | $this[$round_number]->init_round_from_report_unit_row($report_unit_row); |
74 | 74 | } |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | * @version 2016-02-25 23:42:45 41a4.68 |
37 | 37 | */ |
38 | 38 | public function make_snapshot(UBEFleetList $UBEFleetList) { |
39 | - foreach($UBEFleetList->_container as $fleet_id => $UBEFleet) { |
|
40 | - foreach($UBEFleet->unit_list->_container as $UBEUnit) { |
|
39 | + foreach ($UBEFleetList->_container as $fleet_id => $UBEFleet) { |
|
40 | + foreach ($UBEFleet->unit_list->_container as $UBEUnit) { |
|
41 | 41 | $this->snapshot[$fleet_id][$UBEUnit->unitId] = new UBESnapshotUnit(); |
42 | 42 | $this->snapshot[$fleet_id][$UBEUnit->unitId]->init_from_UBEUnit($UBEUnit); |
43 | 43 | } |
@@ -53,12 +53,12 @@ discard block |
||
53 | 53 | * @version 2016-02-25 23:42:45 41a4.68 |
54 | 54 | */ |
55 | 55 | public function sql_generate_unit_array(array &$sql_perform_ube_report_unit, &$unit_sort_order, UBEFleetList $UBEFleetList, array $outer_prefix) { |
56 | - foreach($this->snapshot as $fleet_id => $fleet_snapshot) { |
|
56 | + foreach ($this->snapshot as $fleet_id => $fleet_snapshot) { |
|
57 | 57 | $inner_prefix = array( |
58 | 58 | $UBEFleetList[$fleet_id]->owner_id, |
59 | 59 | $fleet_id, |
60 | 60 | ); |
61 | - foreach($fleet_snapshot as $unit_id => $unit_snapshot) { |
|
61 | + foreach ($fleet_snapshot as $unit_id => $unit_snapshot) { |
|
62 | 62 | $sql_perform_ube_report_unit[] = array_merge( |
63 | 63 | $outer_prefix, |
64 | 64 | $inner_prefix, |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | UBE_PLAYER_IS_DEFENDER => array(), |
102 | 102 | ); |
103 | 103 | |
104 | - foreach($this->snapshot as $fleet_id => $fleet_snapshot) { |
|
104 | + foreach ($this->snapshot as $fleet_id => $fleet_snapshot) { |
|
105 | 105 | $fleet_owner_id = $ube->fleet_list[$fleet_id]->owner_id; |
106 | 106 | $planet_ube_row = $ube->fleet_list[$fleet_id]->UBE_PLANET; |
107 | 107 | |
@@ -111,13 +111,13 @@ discard block |
||
111 | 111 | 'PLAYER_NAME' => htmlentities($ube->players[$fleet_owner_id]->name, ENT_COMPAT, 'UTF-8'), |
112 | 112 | ); |
113 | 113 | |
114 | - if(is_array($planet_ube_row)) { |
|
114 | + if (is_array($planet_ube_row)) { |
|
115 | 115 | $template_fleet += $planet_ube_row; |
116 | 116 | $template_fleet[PLANET_NAME] = $template_fleet[PLANET_NAME] ? htmlentities($template_fleet[PLANET_NAME], ENT_COMPAT, 'UTF-8') : ''; |
117 | 117 | $template_fleet['PLANET_TYPE_TEXT'] = $lang['sys_planet_type_sh'][$template_fleet['PLANET_TYPE']]; |
118 | 118 | } |
119 | 119 | |
120 | - foreach($fleet_snapshot as $unit_id => $unit_snapshot) { |
|
120 | + foreach ($fleet_snapshot as $unit_id => $unit_snapshot) { |
|
121 | 121 | $template_fleet['.']['ship'][] = $unit_snapshot->report_render_unit($prevSnapshot[$fleet_id][$unit_id]); |
122 | 122 | } |
123 | 123 |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | * @version 41a6.0 |
12 | 12 | */ |
13 | 13 | public static function unit_dump_header() { |
14 | - if(!defined('DEBUG_UBE')) { |
|
14 | + if (!defined('DEBUG_UBE')) { |
|
15 | 15 | return; |
16 | 16 | } |
17 | 17 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | * @version 41a6.0 |
49 | 49 | */ |
50 | 50 | public static function unit_dump(UBEUnit $unit, $desc = '', UBEUnit $before = null) { |
51 | - if(!defined('DEBUG_UBE')) { |
|
51 | + if (!defined('DEBUG_UBE')) { |
|
52 | 52 | return; |
53 | 53 | } |
54 | 54 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | * @version 41a6.0 |
87 | 87 | */ |
88 | 88 | public static function unit_dump_footer() { |
89 | - if(!defined('DEBUG_UBE')) { |
|
89 | + if (!defined('DEBUG_UBE')) { |
|
90 | 90 | return; |
91 | 91 | } |
92 | 92 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | * @return UBEUnit |
102 | 102 | */ |
103 | 103 | public static function unit_dump_defender(UBEUnit $attacking_unit_pool, UBEUnit $defending_unit_pool, $defending_fleet_id) { |
104 | - if(!defined('DEBUG_UBE')) { |
|
104 | + if (!defined('DEBUG_UBE')) { |
|
105 | 105 | return null; |
106 | 106 | } |
107 | 107 | |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | * @version 41a6.0 |
128 | 128 | */ |
129 | 129 | public static function unit_dump_delta(UBEUnit $unit, $field, UBEUnit $before = null) { |
130 | - if(!defined('DEBUG_UBE')) { |
|
130 | + if (!defined('DEBUG_UBE')) { |
|
131 | 131 | return; |
132 | 132 | } |
133 | 133 | |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | print(pretty_number($unit->$field)); |
137 | 137 | print("</td>"); |
138 | 138 | print("<td>"); |
139 | - if(!empty($before)) { |
|
139 | + if (!empty($before)) { |
|
140 | 140 | print('' . pretty_number($unit->$field - $before->$field) . ''); |
141 | 141 | } |
142 | 142 | print("</td>"); |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | |
44 | 44 | public function __clone() { |
45 | - if(static::$_clonable == ArrayAccessV2::CLONE_NONE) { |
|
45 | + if (static::$_clonable == ArrayAccessV2::CLONE_NONE) { |
|
46 | 46 | return; |
47 | 47 | } |
48 | 48 | |
@@ -50,10 +50,10 @@ discard block |
||
50 | 50 | } |
51 | 51 | |
52 | 52 | protected static function _deep_clone(&$array) { |
53 | - foreach($array as &$value) { |
|
54 | - if(is_object($value)) { |
|
53 | + foreach ($array as &$value) { |
|
54 | + if (is_object($value)) { |
|
55 | 55 | $value = clone $value; |
56 | - } elseif(is_array($value) && static::$_clonable == ArrayAccessV2::CLONE_DEEP) { |
|
56 | + } elseif (is_array($value) && static::$_clonable == ArrayAccessV2::CLONE_DEEP) { |
|
57 | 57 | static::_deep_clone($value); |
58 | 58 | } |
59 | 59 | } |
@@ -67,8 +67,8 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public function __call($method_name, array $arguments) { |
69 | 69 | $object_first = reset($this->_container); |
70 | - if($object_first !== false && method_exists($object_first, $method_name)) { |
|
71 | - foreach($this->_container as $unit_id => $object) { |
|
70 | + if ($object_first !== false && method_exists($object_first, $method_name)) { |
|
71 | + foreach ($this->_container as $unit_id => $object) { |
|
72 | 72 | call_user_func_array(array($object, $method_name), $arguments); |
73 | 73 | } |
74 | 74 | } |
@@ -83,8 +83,8 @@ discard block |
||
83 | 83 | */ |
84 | 84 | public function getSumProperty($property_name) { |
85 | 85 | $result = 0.0; |
86 | - foreach($this->_container as $object) { |
|
87 | - if(is_object($object) && property_exists($object, $property_name)) { |
|
86 | + foreach ($this->_container as $object) { |
|
87 | + if (is_object($object) && property_exists($object, $property_name)) { |
|
88 | 88 | $result += $object->$property_name; |
89 | 89 | } |
90 | 90 | } |
@@ -100,8 +100,8 @@ discard block |
||
100 | 100 | * @return mixed |
101 | 101 | */ |
102 | 102 | public function aggregateByMethod($method_name, &$result) { |
103 | - foreach($this->_container as $object) { |
|
104 | - if(is_object($object) && method_exists($object, $method_name)) { |
|
103 | + foreach ($this->_container as $object) { |
|
104 | + if (is_object($object) && method_exists($object, $method_name)) { |
|
105 | 105 | call_user_func(array($object, $method_name), $result); |
106 | 106 | } |
107 | 107 | } |
@@ -37,14 +37,14 @@ discard block |
||
37 | 37 | (!empty($where_safe) ? " WHERE {$where_safe}" : '') . |
38 | 38 | " FOR UPDATE;" |
39 | 39 | ); |
40 | - while($row = db_fetch($query)) { |
|
40 | + while ($row = db_fetch($query)) { |
|
41 | 41 | /** |
42 | 42 | * @var Fleet $fleet |
43 | 43 | */ |
44 | 44 | $fleet = $this->_createElement(); |
45 | 45 | $fleet->dbRowParse($row); |
46 | 46 | |
47 | - if(isset($this[$fleet->dbId])) { |
|
47 | + if (isset($this[$fleet->dbId])) { |
|
48 | 48 | // Нужно ли ???? |
49 | 49 | classSupernova::$debug->error('Fleet list already set'); |
50 | 50 | } |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | * @return static |
171 | 171 | */ |
172 | 172 | public static function dbGetFleetListAndMissileByCoordinates($coordinates, $for_phalanx = false) { |
173 | - if(empty($coordinates) || !is_array($coordinates)) { |
|
173 | + if (empty($coordinates) || !is_array($coordinates)) { |
|
174 | 174 | return array(); |
175 | 175 | } |
176 | 176 | |
@@ -199,8 +199,8 @@ discard block |
||
199 | 199 | * @var Fleet[] $array_of_Fleet |
200 | 200 | */ |
201 | 201 | $array_of_Fleet = array(); |
202 | - if(!empty($fleet_db_list) && $fleet_db_list->count()) { |
|
203 | - foreach($fleet_db_list->_container as $fleet_id => $objFleet) { |
|
202 | + if (!empty($fleet_db_list) && $fleet_db_list->count()) { |
|
203 | + foreach ($fleet_db_list->_container as $fleet_id => $objFleet) { |
|
204 | 204 | $array_of_Fleet[$fleet_id] = $objFleet; |
205 | 205 | } |
206 | 206 | $planet_fleets = flt_get_fleets_to_planet_by_array_of_Fleet($array_of_Fleet); |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | "SELECT * FROM `{{iraks}}`" . |
250 | 250 | (!empty($where) ? " WHERE {$where}" : '') . |
251 | 251 | " FOR UPDATE;"); |
252 | - while($missile_db_row = db_fetch($query)) { |
|
252 | + while ($missile_db_row = db_fetch($query)) { |
|
253 | 253 | /** |
254 | 254 | * @var Fleet $objFleet |
255 | 255 | */ |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | */ |
272 | 272 | public static function dbGetFleetListAndMissileINCOMING($owner_id) { |
273 | 273 | $owner_id_safe = idval($owner_id); |
274 | - if(empty($owner_id_safe)) { |
|
274 | + if (empty($owner_id_safe)) { |
|
275 | 275 | return array(); |
276 | 276 | } |
277 | 277 | |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | */ |
306 | 306 | public static function fleet_count_flying($player_id, $mission_id = 0) { |
307 | 307 | $player_id_safe = idval($player_id); |
308 | - if(!empty($player_id_safe)) { |
|
308 | + if (!empty($player_id_safe)) { |
|
309 | 309 | $mission_id_safe = intval($mission_id); |
310 | 310 | $result = static::db_fleet_count( |
311 | 311 | "`fleet_owner` = {$player_id_safe}" . |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | public static function _init($group_name = '') { |
27 | 27 | parent::_init($group_name); |
28 | 28 | |
29 | - foreach(static::$_group_unit_id_list as $resource_id) { |
|
29 | + foreach (static::$_group_unit_id_list as $resource_id) { |
|
30 | 30 | static::$_group_pnames[$resource_id] = pname_resource_name($resource_id); |
31 | 31 | } |
32 | 32 | |
@@ -48,8 +48,8 @@ discard block |
||
48 | 48 | |
49 | 49 | !is_array($resource_array) ? $resource_array = array() : false; |
50 | 50 | |
51 | - foreach($resource_array as $resource_id => $resource_actual_delta) { |
|
52 | - if(!$resource_actual_delta) { |
|
51 | + foreach ($resource_array as $resource_id => $resource_actual_delta) { |
|
52 | + if (!$resource_actual_delta) { |
|
53 | 53 | // No delta - no changes |
54 | 54 | continue; |
55 | 55 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | * @version 41a6.16 |
24 | 24 | */ |
25 | 25 | protected function db_load_player_by_id($player_id) { |
26 | - if(isset($this[$player_id])) { |
|
26 | + if (isset($this[$player_id])) { |
|
27 | 27 | return; |
28 | 28 | } |
29 | 29 |