@@ -80,7 +80,7 @@ |
||
80 | 80 | * @since 5.0.0 |
81 | 81 | */ |
82 | 82 | public function offsetUnset($offset) { |
83 | - if($this->offsetExists($offset)) { |
|
83 | + if ($this->offsetExists($offset)) { |
|
84 | 84 | parent::offsetUnset($this->offsetGet($offset)); |
85 | 85 | } |
86 | 86 | } |
@@ -15,7 +15,7 @@ |
||
15 | 15 | } |
16 | 16 | |
17 | 17 | public static function build($callable) { |
18 | - if(is_array($callable) && count($callable) == 2 && is_object($callable[0])) { |
|
18 | + if (is_array($callable) && count($callable) == 2 && is_object($callable[0])) { |
|
19 | 19 | return new static($callable); |
20 | 20 | } else { |
21 | 21 | return false; |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * @return bool |
41 | 41 | */ |
42 | 42 | public function exists($varName, $accessor) { |
43 | - return isset($this->accessors[$varName . $accessor]); |
|
43 | + return isset($this->accessors[$varName.$accessor]); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | /** |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | if (empty($callable)) { |
59 | 59 | return; |
60 | 60 | } elseif (!is_callable($callable)) { |
61 | - throw new \Exception('Error assigning callable in ' . get_called_class() . '::set()! Callable typed [' . $accessor . '] is not a callable or not accessible in the scope'); |
|
61 | + throw new \Exception('Error assigning callable in '.get_called_class().'::set()! Callable typed ['.$accessor.'] is not a callable or not accessible in the scope'); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | // Converting method array-callable to closure |
@@ -68,13 +68,13 @@ discard block |
||
68 | 68 | // $callable = $method->getClosure($callable[0]); |
69 | 69 | // } |
70 | 70 | |
71 | - if($invoker = Invoker::build($callable)) { |
|
71 | + if ($invoker = Invoker::build($callable)) { |
|
72 | 72 | $callable = $invoker; |
73 | 73 | } |
74 | 74 | |
75 | - $this->accessors[$varName . $accessor] = $callable; |
|
76 | - if($shared) { |
|
77 | - $this->shared[$varName . $accessor] = true; |
|
75 | + $this->accessors[$varName.$accessor] = $callable; |
|
76 | + if ($shared) { |
|
77 | + $this->shared[$varName.$accessor] = true; |
|
78 | 78 | } |
79 | 79 | } |
80 | 80 | |
@@ -100,13 +100,13 @@ discard block |
||
100 | 100 | */ |
101 | 101 | public function execute($varName, $accessor, $params) { |
102 | 102 | if (!$this->exists($varName, $accessor)) { |
103 | - throw new \Exception("No [{$accessor}] accessor found for variable [{$varName}] on " . get_called_class() . "::" . __METHOD__); |
|
103 | + throw new \Exception("No [{$accessor}] accessor found for variable [{$varName}] on ".get_called_class()."::".__METHOD__); |
|
104 | 104 | } |
105 | 105 | |
106 | - $functionName = $varName . $accessor; |
|
106 | + $functionName = $varName.$accessor; |
|
107 | 107 | |
108 | - if(isset($this->shared[$functionName])) { |
|
109 | - if(!array_key_exists($functionName, $this->executed)) { |
|
108 | + if (isset($this->shared[$functionName])) { |
|
109 | + if (!array_key_exists($functionName, $this->executed)) { |
|
110 | 110 | $this->executed[$functionName] = call_user_func_array($this->accessors[$functionName], $params); |
111 | 111 | } |
112 | 112 | return $this->executed[$functionName]; |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $source_planet = &$mission_data->src_planet; |
19 | 19 | $destination_planet = &$mission_data->dst_planet; |
20 | 20 | |
21 | - if(empty($destination_planet['id_owner'])) { |
|
21 | + if (empty($destination_planet['id_owner'])) { |
|
22 | 22 | $objFleet->markReturnedAndSave(); |
23 | 23 | |
24 | 24 | return $result; |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | $fleet_resources[RES_DEUTERIUM], classLocale::$lang['Deuterium']); |
34 | 34 | DBStaticMessages::msg_send_simple_message($objFleet->target_owner_id, '', $objFleet->time_arrive_to_target, MSG_TYPE_TRANSPORT, classLocale::$lang['sys_mess_tower'], classLocale::$lang['sys_mess_transport'], $Message); |
35 | 35 | |
36 | - if($objFleet->target_owner_id <> $objFleet->playerOwnerId) { |
|
36 | + if ($objFleet->target_owner_id <> $objFleet->playerOwnerId) { |
|
37 | 37 | DBStaticMessages::msg_send_simple_message($objFleet->playerOwnerId, '', $objFleet->time_arrive_to_target, MSG_TYPE_TRANSPORT, classLocale::$lang['sys_mess_tower'], classLocale::$lang['sys_mess_transport'], $Message); |
38 | 38 | } |
39 | 39 |
@@ -14,7 +14,6 @@ |
||
14 | 14 | * |
15 | 15 | * @param Fleet $objFleet |
16 | 16 | * @param bool $start |
17 | - * @param null $result |
|
18 | 17 | * |
19 | 18 | * @return mixed |
20 | 19 | */ |
@@ -23,15 +23,11 @@ discard block |
||
23 | 23 | // ------------------------------------------------------------------ |
24 | 24 | function flt_flyingFleetsSort($a, $b) { |
25 | 25 | // Сравниваем время флотов - кто раньше, тот и первый обрабатывается |
26 | - return $a['fleet_time'] > $b['fleet_time'] ? 1 : ($a['fleet_time'] < $b['fleet_time'] ? -1 : |
|
27 | - // Если время - одинаковое, сравниваем события флотов |
|
26 | + return $a['fleet_time'] > $b['fleet_time'] ? 1 : ($a['fleet_time'] < $b['fleet_time'] ? -1 : // Если время - одинаковое, сравниваем события флотов |
|
28 | 27 | // Если события - одинаковые, то флоты равны |
29 | - ($a['fleet_event'] == $b['fleet_event'] ? 0 : |
|
30 | - // Если события разные - первыми считаем прибывающие флоты |
|
31 | - ($a['fleet_event'] == EVENT_FLT_ARRIVE ? 1 : ($b['fleet_event'] == EVENT_FLT_ARRIVE ? -1 : |
|
32 | - // Если нет прибывающих флотов - дальше считаем флоты, которые закончили миссию |
|
33 | - ($a['fleet_event'] == EVENT_FLT_ACOMPLISH ? 1 : ($b['fleet_event'] == EVENT_FLT_ACOMPLISH ? -1 : |
|
34 | - // Если нет флотов, закончивших задание - остались возвращающиеся флоты, которые равны между собой |
|
28 | + ($a['fleet_event'] == $b['fleet_event'] ? 0 : // Если события разные - первыми считаем прибывающие флоты |
|
29 | + ($a['fleet_event'] == EVENT_FLT_ARRIVE ? 1 : ($b['fleet_event'] == EVENT_FLT_ARRIVE ? -1 : // Если нет прибывающих флотов - дальше считаем флоты, которые закончили миссию |
|
30 | + ($a['fleet_event'] == EVENT_FLT_ACOMPLISH ? 1 : ($b['fleet_event'] == EVENT_FLT_ACOMPLISH ? -1 : // Если нет флотов, закончивших задание - остались возвращающиеся флоты, которые равны между собой |
|
35 | 31 | // TODO: Добавить еще проверку по ID флота и/или времени запуска - что бы обсчитывать их в порядке запуска |
36 | 32 | ( |
37 | 33 | 0 // Вообще сюда доходить не должно - будет отсекаться на равенстве событий |
@@ -49,13 +45,13 @@ discard block |
||
49 | 45 | $handler = fopen('event.log', 'a+'); |
50 | 46 | } |
51 | 47 | |
52 | - fwrite($handler, date(FMT_DATE_TIME_SQL, time()) . ' ' . $msg . "\r\n"); |
|
48 | + fwrite($handler, date(FMT_DATE_TIME_SQL, time()).' '.$msg."\r\n"); |
|
53 | 49 | } |
54 | 50 | |
55 | 51 | // ------------------------------------------------------------------ |
56 | 52 | function flt_flying_fleet_handler($skip_fleet_update = false) { |
57 | 53 | if (true) { |
58 | - if(!defined('IN_AJAX')) { |
|
54 | + if (!defined('IN_AJAX')) { |
|
59 | 55 | print('<div style="color: red; font-size: 300%">Fleet handler is disabled</div>'); |
60 | 56 | pdump('Fleet handler is disabled'); |
61 | 57 | } |
@@ -181,7 +177,7 @@ discard block |
||
181 | 177 | MT_EXPLORE => 'flt_mission_explore', |
182 | 178 | ); |
183 | 179 | foreach ($missions_used as $mission_id => $cork) { |
184 | - require_once(SN_ROOT_PHYSICAL . "includes/includes/{$mission_files[$mission_id]}" . DOT_PHP_EX); |
|
180 | + require_once(SN_ROOT_PHYSICAL."includes/includes/{$mission_files[$mission_id]}".DOT_PHP_EX); |
|
185 | 181 | } |
186 | 182 | |
187 | 183 | //log_file('Обработка миссий'); |
@@ -248,7 +244,7 @@ discard block |
||
248 | 244 | $objMission->fleet_event = $fleet_event['fleet_event']; |
249 | 245 | |
250 | 246 | // Fleet that have planet destination is returned |
251 | - if($mission_data['dst_planet'] && empty($objMission->dst_planet['id_owner'])) { |
|
247 | + if ($mission_data['dst_planet'] && empty($objMission->dst_planet['id_owner'])) { |
|
252 | 248 | $objFleet->markReturnedAndSave(); |
253 | 249 | sn_db_transaction_commit(); |
254 | 250 | continue; |
@@ -16,10 +16,10 @@ discard block |
||
16 | 16 | $RecyclerCapacity = 0; |
17 | 17 | $OtherFleetCapacity = 0; |
18 | 18 | |
19 | - foreach($objFleet->shipsIterator() as $unit_id => $unit) { |
|
20 | - if(in_array($unit_id, Fleet::$snGroupFleet)) { |
|
19 | + foreach ($objFleet->shipsIterator() as $unit_id => $unit) { |
|
20 | + if (in_array($unit_id, Fleet::$snGroupFleet)) { |
|
21 | 21 | $capacity = get_unit_param($unit_id, P_CAPACITY) * $unit->count; |
22 | - if(in_array($unit_id, Fleet::$snGroupRecyclers)) { |
|
22 | + if (in_array($unit_id, Fleet::$snGroupRecyclers)) { |
|
23 | 23 | $RecyclerCapacity += $capacity; |
24 | 24 | } else { |
25 | 25 | $OtherFleetCapacity += $capacity; |
@@ -28,33 +28,33 @@ discard block |
||
28 | 28 | } |
29 | 29 | |
30 | 30 | $fleet_resources_amount = $objFleet->resourcesGetTotal(); |
31 | - if($fleet_resources_amount > $OtherFleetCapacity) { |
|
31 | + if ($fleet_resources_amount > $OtherFleetCapacity) { |
|
32 | 32 | // Если во флоте есть другие корабли И количество ресурсов больше, чем их ёмкость трюмов - значит часть этих ресурсов лежит в трюмах переработчиков |
33 | 33 | // Уменьшаем ёмкость переработчиков на указанную величину |
34 | 34 | $RecyclerCapacity -= ($fleet_resources_amount - $OtherFleetCapacity); |
35 | 35 | } |
36 | 36 | |
37 | 37 | $resources_recycled = array(); |
38 | - if(($destination_planet["debris_metal"] + $destination_planet["debris_crystal"]) <= $RecyclerCapacity) { |
|
38 | + if (($destination_planet["debris_metal"] + $destination_planet["debris_crystal"]) <= $RecyclerCapacity) { |
|
39 | 39 | $resources_recycled[RES_METAL] = $destination_planet["debris_metal"]; |
40 | 40 | $resources_recycled[RES_CRYSTAL] = $destination_planet["debris_crystal"]; |
41 | 41 | } else { |
42 | - if(($destination_planet["debris_metal"] > $RecyclerCapacity / 2) && |
|
42 | + if (($destination_planet["debris_metal"] > $RecyclerCapacity / 2) && |
|
43 | 43 | ($destination_planet["debris_crystal"] > $RecyclerCapacity / 2) |
44 | 44 | ) { |
45 | 45 | $resources_recycled[RES_METAL] = $RecyclerCapacity / 2; |
46 | 46 | $resources_recycled[RES_CRYSTAL] = $RecyclerCapacity / 2; |
47 | 47 | } else { |
48 | - if($destination_planet["debris_metal"] > $destination_planet["debris_crystal"]) { |
|
48 | + if ($destination_planet["debris_metal"] > $destination_planet["debris_crystal"]) { |
|
49 | 49 | $resources_recycled[RES_CRYSTAL] = $destination_planet["debris_crystal"]; |
50 | - if($destination_planet["debris_metal"] > ($RecyclerCapacity - $resources_recycled[RES_CRYSTAL])) { |
|
50 | + if ($destination_planet["debris_metal"] > ($RecyclerCapacity - $resources_recycled[RES_CRYSTAL])) { |
|
51 | 51 | $resources_recycled[RES_METAL] = $RecyclerCapacity - $resources_recycled[RES_CRYSTAL]; |
52 | 52 | } else { |
53 | 53 | $resources_recycled[RES_METAL] = $destination_planet["debris_metal"]; |
54 | 54 | } |
55 | 55 | } else { |
56 | 56 | $resources_recycled[RES_METAL] = $destination_planet["debris_metal"]; |
57 | - if($destination_planet["debris_crystal"] > ($RecyclerCapacity - $resources_recycled[RES_METAL])) { |
|
57 | + if ($destination_planet["debris_crystal"] > ($RecyclerCapacity - $resources_recycled[RES_METAL])) { |
|
58 | 58 | $resources_recycled[RES_CRYSTAL] = $RecyclerCapacity - $resources_recycled[RES_METAL]; |
59 | 59 | } else { |
60 | 60 | $resources_recycled[RES_CRYSTAL] = $destination_planet["debris_crystal"]; |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | function flt_mission_relocate($mission_data) { |
13 | 13 | $objFleet = $mission_data->fleet; |
14 | 14 | $destination_planet = &$mission_data->dst_planet; |
15 | - if($objFleet->playerOwnerId != $destination_planet['id_owner']) { |
|
15 | + if ($objFleet->playerOwnerId != $destination_planet['id_owner']) { |
|
16 | 16 | $objFleet->markReturnedAndSave(); |
17 | 17 | |
18 | 18 | return; |
@@ -25,9 +25,9 @@ discard block |
||
25 | 25 | $fleet_resources[RES_METAL], classLocale::$lang['Metal'], |
26 | 26 | $fleet_resources[RES_CRYSTAL], classLocale::$lang['Crystal'], |
27 | 27 | $fleet_resources[RES_DEUTERIUM], classLocale::$lang['Deuterium'] |
28 | - ) . '<br />' . classLocale::$lang['sys_relocate_mess_user']; |
|
29 | - foreach($objFleet->shipsIterator() as $ship_id => $ship) { |
|
30 | - $Message .= classLocale::$lang['tech'][$ship_id] . ' - ' . $ship->count . '<br />'; |
|
28 | + ).'<br />'.classLocale::$lang['sys_relocate_mess_user']; |
|
29 | + foreach ($objFleet->shipsIterator() as $ship_id => $ship) { |
|
30 | + $Message .= classLocale::$lang['tech'][$ship_id].' - '.$ship->count.'<br />'; |
|
31 | 31 | } |
32 | 32 | DBStaticMessages::msg_send_simple_message( |
33 | 33 | $objFleet->playerOwnerId, '', $objFleet->time_arrive_to_target, MSG_TYPE_TRANSPORT, classLocale::$lang['sys_mess_qg'], classLocale::$lang['sys_stay_mess_stay'], $Message |
@@ -38,8 +38,8 @@ discard block |
||
38 | 38 | |
39 | 39 | // Game type constants starts with GAME_ |
40 | 40 | define('GAME_SUPERNOVA', 0); |
41 | -define('GAME_OGAME' , 1); |
|
42 | -define('GAME_BLITZ' , 2); |
|
41 | +define('GAME_OGAME', 1); |
|
42 | +define('GAME_BLITZ', 2); |
|
43 | 43 | |
44 | 44 | // Date & time range constants |
45 | 45 | define('DATE_FOREVER', 2000000000); |
@@ -52,27 +52,27 @@ discard block |
||
52 | 52 | define('PERIOD_YEAR', PERIOD_DAY * 365); |
53 | 53 | define('PERIOD_FOREVER', PERIOD_YEAR * 100); |
54 | 54 | |
55 | -define('PERIOD_MINUTE_2' , PERIOD_MINUTE * 2); |
|
56 | -define('PERIOD_MINUTE_3' , PERIOD_MINUTE * 3); |
|
57 | -define('PERIOD_MINUTE_5' , PERIOD_MINUTE * 5); |
|
55 | +define('PERIOD_MINUTE_2', PERIOD_MINUTE * 2); |
|
56 | +define('PERIOD_MINUTE_3', PERIOD_MINUTE * 3); |
|
57 | +define('PERIOD_MINUTE_5', PERIOD_MINUTE * 5); |
|
58 | 58 | define('PERIOD_MINUTE_10', PERIOD_MINUTE * 10); |
59 | -define('PERIOD_DAY_3' , PERIOD_DAY * 3); |
|
60 | -define('PERIOD_WEEK_2' , PERIOD_WEEK * 2); |
|
61 | -define('PERIOD_MONTH_2' , PERIOD_MONTH * 2); |
|
62 | -define('PERIOD_MONTH_3' , PERIOD_MONTH * 3); |
|
59 | +define('PERIOD_DAY_3', PERIOD_DAY * 3); |
|
60 | +define('PERIOD_WEEK_2', PERIOD_WEEK * 2); |
|
61 | +define('PERIOD_MONTH_2', PERIOD_MONTH * 2); |
|
62 | +define('PERIOD_MONTH_3', PERIOD_MONTH * 3); |
|
63 | 63 | |
64 | 64 | define('FONT_SIZE_PERCENT_MIN', 56.25); |
65 | 65 | define('FONT_SIZE_PERCENT_DEFAULT', 68.75); |
66 | 66 | define('FONT_SIZE_PERCENT_MAX', 131.25); |
67 | 67 | define('FONT_SIZE_PERCENT_STEP', 12.5); |
68 | -define('FONT_SIZE_PERCENT_DEFAULT_STRING', FONT_SIZE_PERCENT_DEFAULT . '%'); |
|
68 | +define('FONT_SIZE_PERCENT_DEFAULT_STRING', FONT_SIZE_PERCENT_DEFAULT.'%'); |
|
69 | 69 | |
70 | 70 | define('FONT_SIZE_PIXELS_BROWSER_BASE', 16); |
71 | 71 | define('FONT_SIZE_PIXELS_MIN', 9); |
72 | 72 | define('FONT_SIZE_PIXELS_DEFAULT', 11); |
73 | 73 | define('FONT_SIZE_PIXELS_MAX', 21); |
74 | 74 | define('FONT_SIZE_PIXELS_STEP', 1); |
75 | -define('FONT_SIZE_PIXELS_DEFAULT_STRING', FONT_SIZE_PIXELS_DEFAULT . 'px'); |
|
75 | +define('FONT_SIZE_PIXELS_DEFAULT_STRING', FONT_SIZE_PIXELS_DEFAULT.'px'); |
|
76 | 76 | |
77 | 77 | define('DEFAULT_PICTURE_EXTENSION_DOTTED', '.jpg'); |
78 | 78 | |
@@ -115,25 +115,25 @@ discard block |
||
115 | 115 | define('SN_SYS_SEC_CHARS_ALLOWED', 'ABCDEFGHJKLMNPQRSTUVWXYZabcdefghkmnpqrstuvwxyz0123456789'); |
116 | 116 | |
117 | 117 | // Mot qui sont interdit a la saisie ! |
118 | -$ListCensure = array ( '/</', '/>/', '/script/i', '/doquery/i', '/http/i', '/javascript/i'); |
|
118 | +$ListCensure = array('/</', '/>/', '/script/i', '/doquery/i', '/http/i', '/javascript/i'); |
|
119 | 119 | |
120 | 120 | // Confirmation record types |
121 | -define('CONFIRM_REGISTRATION' , 1); |
|
121 | +define('CONFIRM_REGISTRATION', 1); |
|
122 | 122 | define('CONFIRM_PASSWORD_RESET', 2); |
123 | -define('CONFIRM_DELETE' , 3); |
|
123 | +define('CONFIRM_DELETE', 3); |
|
124 | 124 | |
125 | 125 | define('AFFILIATE_MM_TO_REFERRAL_DM', 2); |
126 | 126 | |
127 | 127 | // Ally diplomacy statuses |
128 | -define('ALLY_DIPLOMACY_SELF' , 'self'); |
|
129 | -define('ALLY_DIPLOMACY_NEUTRAL' , 'neutral'); |
|
130 | -define('ALLY_DIPLOMACY_WAR' , 'war'); |
|
131 | -define('ALLY_DIPLOMACY_PEACE' , 'peace'); |
|
128 | +define('ALLY_DIPLOMACY_SELF', 'self'); |
|
129 | +define('ALLY_DIPLOMACY_NEUTRAL', 'neutral'); |
|
130 | +define('ALLY_DIPLOMACY_WAR', 'war'); |
|
131 | +define('ALLY_DIPLOMACY_PEACE', 'peace'); |
|
132 | 132 | define('ALLY_DIPLOMACY_CONFEDERATION', 'confederation'); |
133 | -define('ALLY_DIPLOMACY_FEDERATION' , 'federation'); |
|
134 | -define('ALLY_DIPLOMACY_UNION' , 'union'); |
|
135 | -define('ALLY_DIPLOMACY_MASTER' , 'master'); |
|
136 | -define('ALLY_DIPLOMACY_SLAVE' , 'slave'); |
|
133 | +define('ALLY_DIPLOMACY_FEDERATION', 'federation'); |
|
134 | +define('ALLY_DIPLOMACY_UNION', 'union'); |
|
135 | +define('ALLY_DIPLOMACY_MASTER', 'master'); |
|
136 | +define('ALLY_DIPLOMACY_SLAVE', 'slave'); |
|
137 | 137 | |
138 | 138 | define('ALLY_PROPOSE_SENT', 0); |
139 | 139 | define('ALLY_PROPOSE_DENIED', 1); |
@@ -142,13 +142,13 @@ discard block |
||
142 | 142 | define('ALLY_REQUEST_DENIED', 1); |
143 | 143 | |
144 | 144 | // Quest types |
145 | -define('QUEST_TYPE_BUILD' , 1); |
|
145 | +define('QUEST_TYPE_BUILD', 1); |
|
146 | 146 | define('QUEST_TYPE_RESEARCH', 2); |
147 | -define('QUEST_TYPE_COMBAT' , 3); |
|
147 | +define('QUEST_TYPE_COMBAT', 3); |
|
148 | 148 | |
149 | -define('QUEST_STATUS_NOT_STARTED' , 0); |
|
150 | -define('QUEST_STATUS_STARTED' , 1); |
|
151 | -define('QUEST_STATUS_COMPLETE' , 2); |
|
149 | +define('QUEST_STATUS_NOT_STARTED', 0); |
|
150 | +define('QUEST_STATUS_STARTED', 1); |
|
151 | +define('QUEST_STATUS_COMPLETE', 2); |
|
152 | 152 | |
153 | 153 | define('TYPE_EMPTY', ''); |
154 | 154 | define('TYPE_INTEGER', 'integer'); |
@@ -160,21 +160,21 @@ discard block |
||
160 | 160 | |
161 | 161 | // *** Combat-related constants |
162 | 162 | // *** Mission Type constants starts with MT_ |
163 | -define('MT_NONE' , 0); |
|
164 | -define('MT_EXPLORE' , 15); |
|
165 | -define('MT_COLONIZE' , 7); |
|
166 | -define('MT_RECYCLE' , 8); |
|
163 | +define('MT_NONE', 0); |
|
164 | +define('MT_EXPLORE', 15); |
|
165 | +define('MT_COLONIZE', 7); |
|
166 | +define('MT_RECYCLE', 8); |
|
167 | 167 | |
168 | -define('MT_RELOCATE' , 4); |
|
168 | +define('MT_RELOCATE', 4); |
|
169 | 169 | |
170 | -define('MT_TRANSPORT', 3); |
|
171 | -define('MT_HOLD' , 5); |
|
170 | +define('MT_TRANSPORT', 3); |
|
171 | +define('MT_HOLD', 5); |
|
172 | 172 | |
173 | -define('MT_MISSILE' , 10); |
|
174 | -define('MT_SPY' , 6); |
|
175 | -define('MT_ATTACK' , 1); |
|
176 | -define('MT_ACS' , 2); |
|
177 | -define('MT_DESTROY' , 9); |
|
173 | +define('MT_MISSILE', 10); |
|
174 | +define('MT_SPY', 6); |
|
175 | +define('MT_ATTACK', 1); |
|
176 | +define('MT_ACS', 2); |
|
177 | +define('MT_DESTROY', 9); |
|
178 | 178 | // 11, 12, 13, 14, 16... |
179 | 179 | |
180 | 180 | // *** Planet Target constants starts with PT_ |
@@ -182,49 +182,49 @@ discard block |
||
182 | 182 | define('PT_ALL', 0); |
183 | 183 | define('PT_PLANET', 1); |
184 | 184 | define('PT_DEBRIS', 2); |
185 | -define('PT_MOON' , 3); |
|
185 | +define('PT_MOON', 3); |
|
186 | 186 | |
187 | 187 | // *** Unit locations - shows db table where unit belong |
188 | 188 | // Also cache indexes |
189 | -define('LOC_NONE', -1); |
|
189 | +define('LOC_NONE', -1); |
|
190 | 190 | define('LOC_UNIVERSE', 0); |
191 | -define('LOC_PLANET', 1); |
|
192 | -define('LOC_DEBRIS', 2); // Translates to `planets` table planet_type = 1, `debris_*` fields |
|
193 | -define('LOC_MOON', 3); // Translates to `planets` table planet_type = 3 |
|
194 | -define('LOC_USER', 4); |
|
195 | -define('LOC_FLEET', 5); |
|
196 | -define('LOC_ALLY', 6); |
|
197 | -define('LOC_UNIT_NUMERIC', 7); |
|
198 | -define('LOC_UNIT_LIST', 8); |
|
191 | +define('LOC_PLANET', 1); |
|
192 | +define('LOC_DEBRIS', 2); // Translates to `planets` table planet_type = 1, `debris_*` fields |
|
193 | +define('LOC_MOON', 3); // Translates to `planets` table planet_type = 3 |
|
194 | +define('LOC_USER', 4); |
|
195 | +define('LOC_FLEET', 5); |
|
196 | +define('LOC_ALLY', 6); |
|
197 | +define('LOC_UNIT_NUMERIC', 7); |
|
198 | +define('LOC_UNIT_LIST', 8); |
|
199 | 199 | |
200 | 200 | // ТОЛЬКО ВНУТРЕНЕЕ!!! |
201 | -define('LOC_UNIT', 'LOC_UNIT'); |
|
202 | -define('LOC_QUE', 'LOC_QUE'); |
|
203 | -define('LOC_LOCATION','LOC_LOCATION'); |
|
204 | -define('LOC_LOCKS','LOC_LOCKS'); |
|
201 | +define('LOC_UNIT', 'LOC_UNIT'); |
|
202 | +define('LOC_QUE', 'LOC_QUE'); |
|
203 | +define('LOC_LOCATION', 'LOC_LOCATION'); |
|
204 | +define('LOC_LOCKS', 'LOC_LOCKS'); |
|
205 | 205 | |
206 | 206 | // *** Caching masks |
207 | -define('CACHE_NOTHING' , 0); |
|
208 | -define('CACHE_FLEET' , 1); |
|
209 | -define('CACHE_PLANET' , 2); |
|
210 | -define('CACHE_USER' , 4); |
|
211 | -define('CACHE_SOURCE' , 8); |
|
207 | +define('CACHE_NOTHING', 0); |
|
208 | +define('CACHE_FLEET', 1); |
|
209 | +define('CACHE_PLANET', 2); |
|
210 | +define('CACHE_USER', 4); |
|
211 | +define('CACHE_SOURCE', 8); |
|
212 | 212 | define('CACHE_DESTINATION', 16); |
213 | -define('CACHE_EVENT' , 32); |
|
213 | +define('CACHE_EVENT', 32); |
|
214 | 214 | |
215 | -define('CACHE_USER_SRC' , CACHE_USER | CACHE_SOURCE); |
|
216 | -define('CACHE_USER_DST' , CACHE_USER | CACHE_DESTINATION); |
|
215 | +define('CACHE_USER_SRC', CACHE_USER | CACHE_SOURCE); |
|
216 | +define('CACHE_USER_DST', CACHE_USER | CACHE_DESTINATION); |
|
217 | 217 | define('CACHE_PLANET_SRC', CACHE_PLANET | CACHE_SOURCE); |
218 | 218 | define('CACHE_PLANET_DST', CACHE_PLANET | CACHE_DESTINATION); |
219 | -define('CACHE_COMBAT' , CACHE_FLEET | CACHE_PLANET | CACHE_USER | CACHE_SOURCE | CACHE_DESTINATION); |
|
219 | +define('CACHE_COMBAT', CACHE_FLEET | CACHE_PLANET | CACHE_USER | CACHE_SOURCE | CACHE_DESTINATION); |
|
220 | 220 | |
221 | -define('CACHE_ALL' , CACHE_FLEET | CACHE_PLANET | CACHE_USER | CACHE_SOURCE | CACHE_DESTINATION | CACHE_EVENT); |
|
221 | +define('CACHE_ALL', CACHE_FLEET | CACHE_PLANET | CACHE_USER | CACHE_SOURCE | CACHE_DESTINATION | CACHE_EVENT); |
|
222 | 222 | |
223 | -define('CACHE_NONE' , CACHE_NOTHING); // Alias for me |
|
223 | +define('CACHE_NONE', CACHE_NOTHING); // Alias for me |
|
224 | 224 | |
225 | 225 | // *** Event types |
226 | 226 | define('EVENT_FLEET_ARRIVE', 1); |
227 | -define('EVENT_FLEET_STAY' , 2); |
|
227 | +define('EVENT_FLEET_STAY', 2); |
|
228 | 228 | define('EVENT_FLEET_RETURN', 3); |
229 | 229 | |
230 | 230 | // *** Constants for changing DM |
@@ -279,10 +279,10 @@ discard block |
||
279 | 279 | |
280 | 280 | |
281 | 281 | // Operation error status HARDCODE! |
282 | -define('ERR_NONE' , 0); // No error |
|
283 | -define('ERR_WARNING' , 1); // There is warning - something altering normal operation process |
|
284 | -define('ERR_ERROR' , 2); // There is error - something permits operation from process |
|
285 | -define('ERR_HACK' , 4); // Operation is qualified as hack attempt |
|
282 | +define('ERR_NONE', 0); // No error |
|
283 | +define('ERR_WARNING', 1); // There is warning - something altering normal operation process |
|
284 | +define('ERR_ERROR', 2); // There is error - something permits operation from process |
|
285 | +define('ERR_HACK', 4); // Operation is qualified as hack attempt |
|
286 | 286 | // New GLOBAL operation results |
287 | 287 | //define('RESULT_DEFAULT' , 0); // Default result - all went OK or result really doesn't matter |
288 | 288 | //define('RESULT_WARNING' , 1); |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | define('SN_PAYMENT_REQUEST_OK', 0); |
303 | 303 | define('SN_PAYMENT_REQUEST_ERROR_UNIT_AMOUNT', 1); |
304 | 304 | define('SN_PAYMENT_REQUEST_ERROR_PAYLINK_UNSUPPORTED', 2); |
305 | -define('SN_PAYMENT_REQUEST_IP_WRONG', 3); // Неправильный IP входящей системы - обычно хак |
|
305 | +define('SN_PAYMENT_REQUEST_IP_WRONG', 3); // Неправильный IP входящей системы - обычно хак |
|
306 | 306 | define('SN_PAYMENT_REQUEST_COMMAND_UNSUPPORTED', 4); // Неподдерживаемая команда - обычно хак |
307 | 307 | define('SN_PAYMENT_REQUEST_SIGNATURE_INVALID', 5); // Неправильная подпись или не сошлась контрольная сумма - обычно хак |
308 | 308 | define('SN_MODULE_DISABLED', 6); // Модуль отключен // УНИВЕРСАЛЬНЫЙ ОТВЕТ! |
@@ -575,16 +575,16 @@ discard block |
||
575 | 575 | //define('F_DEVICE_ID', 'F_DEVICE_ID'); |
576 | 576 | //define('F_DEVICE_CYPHER', 'F_DEVICE_CYPHER'); |
577 | 577 | |
578 | -define('F_PROVIDER_ID', 'F_PROVIDER_ID'); |
|
578 | +define('F_PROVIDER_ID', 'F_PROVIDER_ID'); |
|
579 | 579 | // define('F_PROVIDER_LIST', 'F_PROVIDER_LIST'); |
580 | 580 | |
581 | 581 | define('F_IMPERSONATE_STATUS', 'F_IMPERSONATE_STATUS'); |
582 | 582 | define('F_IMPERSONATE_OPERATOR', 'F_IMPERSONATE_OPERATOR'); |
583 | 583 | |
584 | -define('F_LOGIN_STATUS', 'F_LOGIN_STATUS'); |
|
584 | +define('F_LOGIN_STATUS', 'F_LOGIN_STATUS'); |
|
585 | 585 | define('F_LOGIN_MESSAGE', 'F_LOGIN_MESSAGE'); |
586 | 586 | |
587 | -define('F_PLAYER_REGISTER_STATUS', 'F_PLAYER_REGISTER_STATUS'); |
|
587 | +define('F_PLAYER_REGISTER_STATUS', 'F_PLAYER_REGISTER_STATUS'); |
|
588 | 588 | define('F_PLAYER_REGISTER_MESSAGE', 'F_PLAYER_REGISTER_MESSAGE'); |
589 | 589 | |
590 | 590 | define('F_USER_ID', 'F_USER_ID'); |
@@ -628,69 +628,69 @@ discard block |
||
628 | 628 | |
629 | 629 | |
630 | 630 | // Option groups |
631 | -define('OPT_ALL', 0); |
|
632 | -define('OPT_MESSAGE', 1); |
|
631 | +define('OPT_ALL', 0); |
|
632 | +define('OPT_MESSAGE', 1); |
|
633 | 633 | define('OPT_UNIVERSE', 2); |
634 | 634 | define('OPT_INTERFACE', 3); |
635 | 635 | |
636 | 636 | // Message classes |
637 | -define('MSG_TYPE_OUTBOX' , -1); |
|
638 | -define('MSG_TYPE_SPY' , 0); |
|
639 | -define('MSG_TYPE_PLAYER' , 1); |
|
640 | -define('MSG_TYPE_ALLIANCE' , 2); |
|
641 | -define('MSG_TYPE_COMBAT' , 3); |
|
642 | -define('MSG_TYPE_RECYCLE' , 4); |
|
643 | -define('MSG_TYPE_TRANSPORT', 5); |
|
644 | -define('MSG_TYPE_ADMIN' , 6); |
|
645 | -define('MSG_TYPE_EXPLORE' , 15); |
|
646 | -define('MSG_TYPE_QUE' , 99); |
|
647 | -define('MSG_TYPE_NEW' , 100); |
|
637 | +define('MSG_TYPE_OUTBOX', -1); |
|
638 | +define('MSG_TYPE_SPY', 0); |
|
639 | +define('MSG_TYPE_PLAYER', 1); |
|
640 | +define('MSG_TYPE_ALLIANCE', 2); |
|
641 | +define('MSG_TYPE_COMBAT', 3); |
|
642 | +define('MSG_TYPE_RECYCLE', 4); |
|
643 | +define('MSG_TYPE_TRANSPORT', 5); |
|
644 | +define('MSG_TYPE_ADMIN', 6); |
|
645 | +define('MSG_TYPE_EXPLORE', 15); |
|
646 | +define('MSG_TYPE_QUE', 99); |
|
647 | +define('MSG_TYPE_NEW', 100); |
|
648 | 648 | |
649 | 649 | // Attack verification statuses |
650 | -define('FLIGHT_NO_RESULT' , -2); |
|
651 | -define('FLIGHT_ALLOWED_NEW' , -1); |
|
650 | +define('FLIGHT_NO_RESULT', -2); |
|
651 | +define('FLIGHT_ALLOWED_NEW', -1); |
|
652 | 652 | //define('FLIGHT_DO_NOTHING' , 0); |
653 | -define('FLIGHT_ALLOWED' , 0); |
|
654 | -define('FLIGHT_VECTOR_NO_TARGET' , 1); |
|
655 | -define('FLIGHT_PLAYER_OWN' , 2); |
|
656 | -define('FLIGHT_MISSION_IMPOSSIBLE' , 3); |
|
657 | -define('FLIGHT_MISSION_HOLD_NO_ALLY_DEPOSIT' , 4); |
|
658 | -define('FLIGHT_MISSION_RECYCLE_NO_DEBRIS' , 5); |
|
659 | -define('FLIGHT_PLAYER_VACATION' , 6); |
|
660 | -define('FLIGHT_PLAYER_SAME_IP' , 7); |
|
661 | -define('FLIGHT_PLAYER_BUFFING' , 8); |
|
662 | -define('FLIGHT_PLAYER_ADMIN' , 9); |
|
663 | -define('FLIGHT_PLAYER_NOOB' , 10); |
|
664 | -define('FLIGHT_PLAYER_VACATION_OWN' , 11); |
|
665 | -define('FLIGHT_MISSION_MISSILE_NO_SILO' , 12); |
|
666 | -define('FLIGHT_MISSION_MISSILE_NO_MISSILES' , 13); |
|
667 | -define('FLIGHT_SHIPS_NO_SHIPS' , 14); |
|
668 | -define('FLIGHT_FLEET_NO_SLOTS' , 15); |
|
669 | -define('FLIGHT_SHIPS_NOT_ENOUGH_OR_RESOURCES' , 16); |
|
670 | -define('FLIGHT_SHIPS_NO_RECYCLERS' , 17); |
|
671 | -define('FLIGHT_MISSION_SPY_NO_SPIES' , 18); |
|
672 | -define('FLIGHT_SHIPS_NO_COLONIZER' , 19); |
|
673 | -define('FLIGHT_MISSION_MISSILE_TOO_FAR' , 20); |
|
674 | -define('FLIGHT_MISSION_MISSILE_WRONG_STRUCTURE' , 21); |
|
675 | -define('FLIGHT_RESOURCES_FUEL_NOT_ENOUGH' , 22); |
|
676 | -define('FLIGHT_RESOURCES_NOT_ENOUGH' , 23); |
|
677 | -define('FLIGHT_MISSION_ACS_NOT_EXISTS' , 24); |
|
678 | -define('FLIGHT_MISSION_ACS_MISSTARGET' , 25); |
|
679 | -define('FLIGHT_FLEET_SPEED_WRONG' , 26); |
|
680 | -define('FLIGHT_MISSION_ACS_TOO_LATE' , 27); |
|
681 | -define('FLIGHT_MISSION_ATTACK_BASHING' , 28); |
|
682 | -define('FLIGHT_MISSION_ATTACK_BASHING_WAR_DELAY' , 29); |
|
683 | -define('FLIGHT_MISSION_ACS_WRONG_TARGET' , 30); |
|
684 | -define('FLIGHT_VECTOR_SAME_SOURCE' , 31); |
|
653 | +define('FLIGHT_ALLOWED', 0); |
|
654 | +define('FLIGHT_VECTOR_NO_TARGET', 1); |
|
655 | +define('FLIGHT_PLAYER_OWN', 2); |
|
656 | +define('FLIGHT_MISSION_IMPOSSIBLE', 3); |
|
657 | +define('FLIGHT_MISSION_HOLD_NO_ALLY_DEPOSIT', 4); |
|
658 | +define('FLIGHT_MISSION_RECYCLE_NO_DEBRIS', 5); |
|
659 | +define('FLIGHT_PLAYER_VACATION', 6); |
|
660 | +define('FLIGHT_PLAYER_SAME_IP', 7); |
|
661 | +define('FLIGHT_PLAYER_BUFFING', 8); |
|
662 | +define('FLIGHT_PLAYER_ADMIN', 9); |
|
663 | +define('FLIGHT_PLAYER_NOOB', 10); |
|
664 | +define('FLIGHT_PLAYER_VACATION_OWN', 11); |
|
665 | +define('FLIGHT_MISSION_MISSILE_NO_SILO', 12); |
|
666 | +define('FLIGHT_MISSION_MISSILE_NO_MISSILES', 13); |
|
667 | +define('FLIGHT_SHIPS_NO_SHIPS', 14); |
|
668 | +define('FLIGHT_FLEET_NO_SLOTS', 15); |
|
669 | +define('FLIGHT_SHIPS_NOT_ENOUGH_OR_RESOURCES', 16); |
|
670 | +define('FLIGHT_SHIPS_NO_RECYCLERS', 17); |
|
671 | +define('FLIGHT_MISSION_SPY_NO_SPIES', 18); |
|
672 | +define('FLIGHT_SHIPS_NO_COLONIZER', 19); |
|
673 | +define('FLIGHT_MISSION_MISSILE_TOO_FAR', 20); |
|
674 | +define('FLIGHT_MISSION_MISSILE_WRONG_STRUCTURE', 21); |
|
675 | +define('FLIGHT_RESOURCES_FUEL_NOT_ENOUGH', 22); |
|
676 | +define('FLIGHT_RESOURCES_NOT_ENOUGH', 23); |
|
677 | +define('FLIGHT_MISSION_ACS_NOT_EXISTS', 24); |
|
678 | +define('FLIGHT_MISSION_ACS_MISSTARGET', 25); |
|
679 | +define('FLIGHT_FLEET_SPEED_WRONG', 26); |
|
680 | +define('FLIGHT_MISSION_ACS_TOO_LATE', 27); |
|
681 | +define('FLIGHT_MISSION_ATTACK_BASHING', 28); |
|
682 | +define('FLIGHT_MISSION_ATTACK_BASHING_WAR_DELAY', 29); |
|
683 | +define('FLIGHT_MISSION_ACS_WRONG_TARGET', 30); |
|
684 | +define('FLIGHT_VECTOR_SAME_SOURCE', 31); |
|
685 | 685 | define('FLIGHT_RESOURCES_FORBIDDEN', 32); |
686 | -define('FLIGHT_MISSION_TRANSPORT_EMPTY_CARGO' , 33); |
|
687 | -define('FLIGHT_SHIPS_NOT_ONLY_SPIES' , 34); |
|
688 | -define('FLIGHT_FLEET_TOO_FAR' , 35); |
|
689 | -define('FLIGHT_FLEET_OVERLOAD' , 36); |
|
690 | -define('FLIGHT_MISSION_UNKNOWN' , 37); |
|
691 | -define('FLIGHT_SHIPS_UNIT_WRONG' , 38); |
|
692 | -define('FLIGHT_SHIPS_UNMOVABLE' , 39); |
|
693 | -define('FLIGHT_SHIPS_NEGATIVE' , 40); |
|
686 | +define('FLIGHT_MISSION_TRANSPORT_EMPTY_CARGO', 33); |
|
687 | +define('FLIGHT_SHIPS_NOT_ONLY_SPIES', 34); |
|
688 | +define('FLIGHT_FLEET_TOO_FAR', 35); |
|
689 | +define('FLIGHT_FLEET_OVERLOAD', 36); |
|
690 | +define('FLIGHT_MISSION_UNKNOWN', 37); |
|
691 | +define('FLIGHT_SHIPS_UNIT_WRONG', 38); |
|
692 | +define('FLIGHT_SHIPS_UNMOVABLE', 39); |
|
693 | +define('FLIGHT_SHIPS_NEGATIVE', 40); |
|
694 | 694 | define('FLIGHT_RESOURCES_NEGATIVE', 41); |
695 | 695 | define('FLIGHT_MISSION_MORATORIUM', 42); |
696 | 696 | define('FLIGHT_PLAYER_CHILD_PROTECTION', 43); |
@@ -735,12 +735,12 @@ discard block |
||
735 | 735 | |
736 | 736 | |
737 | 737 | // *** Races - Homeworlds |
738 | -define('RACE_NONE' , 0); |
|
739 | -define('RACE_EARTH' , 1); |
|
740 | -define('RACE_MOON' , 2); |
|
741 | -define('RACE_MERCURY' , 3); |
|
742 | -define('RACE_VENUS' , 4); |
|
743 | -define('RACE_MARS' , 5); |
|
738 | +define('RACE_NONE', 0); |
|
739 | +define('RACE_EARTH', 1); |
|
740 | +define('RACE_MOON', 2); |
|
741 | +define('RACE_MERCURY', 3); |
|
742 | +define('RACE_VENUS', 4); |
|
743 | +define('RACE_MARS', 5); |
|
744 | 744 | define('RACE_ASTEROID', 6); |
745 | 745 | // define('MARKET_INFO' , 7); |
746 | 746 | |
@@ -748,115 +748,115 @@ discard block |
||
748 | 748 | |
749 | 749 | // *** Market variables |
750 | 750 | // === Market blocks |
751 | -define('MARKET_ENTRY' , 0); |
|
752 | -define('MARKET_RESOURCES' , 1); |
|
753 | -define('MARKET_SCRAPPER' , 2); |
|
754 | -define('MARKET_STOCKMAN' , 3); |
|
755 | -define('MARKET_EXCHANGE' , 4); |
|
756 | -define('MARKET_BANKER' , 5); |
|
757 | -define('MARKET_PAWNSHOP' , 6); |
|
758 | -define('MARKET_INFO' , 7); |
|
751 | +define('MARKET_ENTRY', 0); |
|
752 | +define('MARKET_RESOURCES', 1); |
|
753 | +define('MARKET_SCRAPPER', 2); |
|
754 | +define('MARKET_STOCKMAN', 3); |
|
755 | +define('MARKET_EXCHANGE', 4); |
|
756 | +define('MARKET_BANKER', 5); |
|
757 | +define('MARKET_PAWNSHOP', 6); |
|
758 | +define('MARKET_INFO', 7); |
|
759 | 759 | |
760 | 760 | // === Market error statuses |
761 | -define('MARKET_NOTHING' , 0); |
|
762 | -define('MARKET_DEAL' , 1); |
|
763 | -define('MARKET_DEAL_TRADE' , 2); |
|
764 | -define('MARKET_NO_DM' , 3); |
|
765 | -define('MARKET_NO_RESOURCES' , 4); |
|
766 | -define('MARKET_ZERO_DEAL' , 5); |
|
767 | -define('MARKET_NO_SHIPS' , 6); |
|
768 | -define('MARKET_NOT_A_SHIP' , 7); |
|
769 | -define('MARKET_NO_STOCK' , 8); |
|
770 | -define('MARKET_ZERO_RES_STOCK' , 9); |
|
771 | -define('MARKET_NEGATIVE_SHIPS' , 10); |
|
772 | -define('MARKET_ZERO_RES' , 11); |
|
773 | - |
|
774 | -define('MARKET_INFO_PLAYER' , 12); |
|
775 | -define('MARKET_INFO_WRONG' , 11); |
|
761 | +define('MARKET_NOTHING', 0); |
|
762 | +define('MARKET_DEAL', 1); |
|
763 | +define('MARKET_DEAL_TRADE', 2); |
|
764 | +define('MARKET_NO_DM', 3); |
|
765 | +define('MARKET_NO_RESOURCES', 4); |
|
766 | +define('MARKET_ZERO_DEAL', 5); |
|
767 | +define('MARKET_NO_SHIPS', 6); |
|
768 | +define('MARKET_NOT_A_SHIP', 7); |
|
769 | +define('MARKET_NO_STOCK', 8); |
|
770 | +define('MARKET_ZERO_RES_STOCK', 9); |
|
771 | +define('MARKET_NEGATIVE_SHIPS', 10); |
|
772 | +define('MARKET_ZERO_RES', 11); |
|
773 | + |
|
774 | +define('MARKET_INFO_PLAYER', 12); |
|
775 | +define('MARKET_INFO_WRONG', 11); |
|
776 | 776 | define('MARKET_INFO_PLAYER_NOT_FOUND', 13); |
777 | -define('MARKET_INFO_PLAYER_WRONG' , 14); |
|
778 | -define('MARKET_INFO_PLAYER_SAME' , 15); |
|
777 | +define('MARKET_INFO_PLAYER_WRONG', 14); |
|
778 | +define('MARKET_INFO_PLAYER_SAME', 15); |
|
779 | 779 | |
780 | 780 | |
781 | 781 | |
782 | 782 | |
783 | 783 | // *** Mercenary/talent bonus types |
784 | -define('BONUS_NONE' , 0); // No bonus |
|
785 | -define('BONUS_PERCENT' , 1); // Percent on base value |
|
786 | -define('BONUS_ADD' , 2); // Add |
|
787 | -define('BONUS_ABILITY' , 3); // Some ability |
|
788 | -define('BONUS_MULTIPLY', 4); // Multiply by value |
|
789 | -define('BONUS_PERCENT_CUMULATIVE' , 5); // Cumulative percent on base value |
|
790 | -define('BONUS_PERCENT_DEGRADED' , 6); // Bonus amount degraded with increase as pow(bonus, level) (?) |
|
791 | -define('BONUS_SPEED', 7); // Speed bonus |
|
784 | +define('BONUS_NONE', 0); // No bonus |
|
785 | +define('BONUS_PERCENT', 1); // Percent on base value |
|
786 | +define('BONUS_ADD', 2); // Add |
|
787 | +define('BONUS_ABILITY', 3); // Some ability |
|
788 | +define('BONUS_MULTIPLY', 4); // Multiply by value |
|
789 | +define('BONUS_PERCENT_CUMULATIVE', 5); // Cumulative percent on base value |
|
790 | +define('BONUS_PERCENT_DEGRADED', 6); // Bonus amount degraded with increase as pow(bonus, level) (?) |
|
791 | +define('BONUS_SPEED', 7); // Speed bonus |
|
792 | 792 | |
793 | 793 | // *** Action constant (build should be replaced with ACTION) |
794 | -define('BUILD_CREATE' , 1); |
|
794 | +define('BUILD_CREATE', 1); |
|
795 | 795 | define('BUILD_DESTROY', -1); |
796 | 796 | define('BUILD_AUTOCONVERT', 2); |
797 | 797 | |
798 | -define('ACTION_SELL' , -1); |
|
799 | -define('ACTION_NOTHING' , 0); |
|
800 | -define('ACTION_BUY' , 1); |
|
801 | -define('ACTION_USE' , 2); |
|
802 | -define('ACTION_DELETE' , 3); |
|
798 | +define('ACTION_SELL', -1); |
|
799 | +define('ACTION_NOTHING', 0); |
|
800 | +define('ACTION_BUY', 1); |
|
801 | +define('ACTION_USE', 2); |
|
802 | +define('ACTION_DELETE', 3); |
|
803 | 803 | |
804 | 804 | // *** Check unit availability codes |
805 | -define('BUILD_ALLOWED' , 0); // HARDCODED! DO NOT CHANGE! |
|
805 | +define('BUILD_ALLOWED', 0); // HARDCODED! DO NOT CHANGE! |
|
806 | 806 | define('BUILD_REQUIRE_NOT_MEET', 1); |
807 | -define('BUILD_AMOUNT_WRONG' , 2); |
|
808 | -define('BUILD_QUE_WRONG' , 3); |
|
809 | -define('BUILD_QUE_UNIT_WRONG' , 4); |
|
810 | -define('BUILD_INDESTRUCTABLE' , 5); |
|
811 | -define('BUILD_NO_RESOURCES' , 6); |
|
812 | -define('BUILD_NO_UNITS' , 7); |
|
813 | -define('BUILD_UNIT_BUSY' , 8); |
|
814 | -define('BUILD_QUE_FULL' , 9); |
|
815 | -define('BUILD_SILO_FULL' ,10); |
|
816 | -define('BUILD_MAX_REACHED' ,11); |
|
817 | -define('BUILD_SECTORS_NONE' ,12); |
|
807 | +define('BUILD_AMOUNT_WRONG', 2); |
|
808 | +define('BUILD_QUE_WRONG', 3); |
|
809 | +define('BUILD_QUE_UNIT_WRONG', 4); |
|
810 | +define('BUILD_INDESTRUCTABLE', 5); |
|
811 | +define('BUILD_NO_RESOURCES', 6); |
|
812 | +define('BUILD_NO_UNITS', 7); |
|
813 | +define('BUILD_UNIT_BUSY', 8); |
|
814 | +define('BUILD_QUE_FULL', 9); |
|
815 | +define('BUILD_SILO_FULL', 10); |
|
816 | +define('BUILD_MAX_REACHED', 11); |
|
817 | +define('BUILD_SECTORS_NONE', 12); |
|
818 | 818 | define('BUILD_AUTOCONVERT_AVAILABLE', 13); |
819 | 819 | |
820 | 820 | |
821 | 821 | // *** Que types |
822 | 822 | define('QUE_STRUCTURES', 1); |
823 | -define('QUE_HANGAR' , 4); |
|
824 | -define('QUE_RESEARCH' , 7); |
|
825 | -define('QUE_MERCENARY' , 600); // UNIT_MERCENARIES |
|
823 | +define('QUE_HANGAR', 4); |
|
824 | +define('QUE_RESEARCH', 7); |
|
825 | +define('QUE_MERCENARY', 600); // UNIT_MERCENARIES |
|
826 | 826 | // *** Subque types |
827 | -define('SUBQUE_PLANET' , 1); |
|
828 | -define('SUBQUE_MOON' , 3); |
|
829 | -define('SUBQUE_FLEET' , 4); |
|
830 | -define('SUBQUE_DEFENSE' , 6); |
|
827 | +define('SUBQUE_PLANET', 1); |
|
828 | +define('SUBQUE_MOON', 3); |
|
829 | +define('SUBQUE_FLEET', 4); |
|
830 | +define('SUBQUE_DEFENSE', 6); |
|
831 | 831 | define('SUBQUE_RESEARCH', 7); |
832 | 832 | |
833 | 833 | // *** Que items |
834 | -define('QI_UNIT_ID' , 0); |
|
835 | -define('QI_AMOUNT' , 1); |
|
836 | -define('QI_TIME' , 2); |
|
837 | -define('QI_MODE' , 3); |
|
838 | -define('QI_QUE_ID' , 4); |
|
839 | -define('QI_QUE_TYPE' , 4); |
|
840 | -define('QI_PLANET_ID' , 5); |
|
834 | +define('QI_UNIT_ID', 0); |
|
835 | +define('QI_AMOUNT', 1); |
|
836 | +define('QI_TIME', 2); |
|
837 | +define('QI_MODE', 3); |
|
838 | +define('QI_QUE_ID', 4); |
|
839 | +define('QI_QUE_TYPE', 4); |
|
840 | +define('QI_PLANET_ID', 5); |
|
841 | 841 | |
842 | 842 | |
843 | 843 | // *** Units |
844 | 844 | |
845 | 845 | // *** Sort options |
846 | -define('SORT_ASCENDING' , 0); |
|
846 | +define('SORT_ASCENDING', 0); |
|
847 | 847 | define('SORT_DESCENDING', 1); |
848 | 848 | |
849 | -define('SORT_ID' , 0); |
|
850 | -define('SORT_LOCATION' , 1); |
|
851 | -define('SORT_NAME' , 2); |
|
852 | -define('SORT_SIZE' , 3); |
|
853 | -define('SORT_EMAIL' , 4); |
|
854 | -define('SORT_IP' , 5); |
|
849 | +define('SORT_ID', 0); |
|
850 | +define('SORT_LOCATION', 1); |
|
851 | +define('SORT_NAME', 2); |
|
852 | +define('SORT_SIZE', 3); |
|
853 | +define('SORT_EMAIL', 4); |
|
854 | +define('SORT_IP', 5); |
|
855 | 855 | define('SORT_TIME_REGISTERED', 6); |
856 | 856 | define('SORT_TIME_LAST_VISIT', 7); |
857 | -define('SORT_TIME_BAN_UNTIL' , 8); |
|
858 | -define('SORT_REFERRAL_COUNT' , 9); |
|
859 | -define('SORT_REFERRAL_DM' , 10); |
|
857 | +define('SORT_TIME_BAN_UNTIL', 8); |
|
858 | +define('SORT_REFERRAL_COUNT', 9); |
|
859 | +define('SORT_REFERRAL_DM', 10); |
|
860 | 860 | |
861 | 861 | |
862 | 862 | define('HULL_SIZE_TINY', 1); |
@@ -1000,10 +1000,10 @@ discard block |
||
1000 | 1000 | |
1001 | 1001 | // === Artifacts |
1002 | 1002 | define('UNIT_ARTIFACTS', 1000); |
1003 | -define('ART_LHC', 1001); // Additional moon chance |
|
1004 | -define('ART_RCD_SMALL', 1002); // Rapid Colony Deployment - Set of buildings up to 10th level - 10/14/ 3/0 - 405 DM |
|
1005 | -define('ART_RCD_MEDIUM', 1003); // Rapid Colony Deployment - Set of buildings up to 15th level - 15/20/ 8/0 - 4704 DM |
|
1006 | -define('ART_RCD_LARGE', 1004); // Rapid Colony Deployment - Set of buildings up to 20th level - 20/25/10/1 - 39790 DM |
|
1003 | +define('ART_LHC', 1001); // Additional moon chance |
|
1004 | +define('ART_RCD_SMALL', 1002); // Rapid Colony Deployment - Set of buildings up to 10th level - 10/14/ 3/0 - 405 DM |
|
1005 | +define('ART_RCD_MEDIUM', 1003); // Rapid Colony Deployment - Set of buildings up to 15th level - 15/20/ 8/0 - 4704 DM |
|
1006 | +define('ART_RCD_LARGE', 1004); // Rapid Colony Deployment - Set of buildings up to 20th level - 20/25/10/1 - 39790 DM |
|
1007 | 1007 | define('ART_HEURISTIC_CHIP', 1005); // Speed up research |
1008 | 1008 | define('ART_NANO_BUILDER', 1006); // Speed up building |
1009 | 1009 | define('ART_NANO_CONSTRUCTOR', 1007); // RESERVED Speed up hangar constructions |
@@ -1074,18 +1074,18 @@ discard block |
||
1074 | 1074 | define('UNIT_AWARD_MEDAL_BLITZ_R0_PLACE1', 2201); // Блиц-сервер, участник 0-го раунда, 1-е место |
1075 | 1075 | define('UNIT_AWARD_MEDAL_BLITZ_R0_PLACE2', 2202); // Блиц-сервер, участник 0-го раунда, 2-е место |
1076 | 1076 | define('UNIT_AWARD_MEDAL_BLITZ_R0_PLACE3', 2203); // Блиц-сервер, участник 0-го раунда, 3-е место |
1077 | -define('UNIT_AWARD_MEDAL_2016_WOMEN_DAY_BEST', 2204); // Медаль Лучшему Кавалеру за максимум потраченной ММ/максимум одаренных женщин Женщине от Мужчины во время ивента 8 марта 2016 года |
|
1077 | +define('UNIT_AWARD_MEDAL_2016_WOMEN_DAY_BEST', 2204); // Медаль Лучшему Кавалеру за максимум потраченной ММ/максимум одаренных женщин Женщине от Мужчины во время ивента 8 марта 2016 года |
|
1078 | 1078 | |
1079 | 1079 | define('UNIT_AWARD_MEMORY', 2300); // Памятные знаки за существование и участие - например "4 года в игре". "Был онлайн в новогоднюю ночь 2013". итд |
1080 | -define('UNIT_AWARD_MEMORY_IMMORTAL', 2301); // Бессмертный |
|
1081 | -define('UNIT_AWARD_MEMORY_2015_WOMEN_DAY', 2302); // Значек за подарок Женщине от Мужчины во время ивента 8 марта 2015 года |
|
1080 | +define('UNIT_AWARD_MEMORY_IMMORTAL', 2301); // Бессмертный |
|
1081 | +define('UNIT_AWARD_MEMORY_2015_WOMEN_DAY', 2302); // Значек за подарок Женщине от Мужчины во время ивента 8 марта 2015 года |
|
1082 | 1082 | define('UNIT_AWARD_MEMORY_BLITZ_R0', 2303); // Блиц-сервер, участник 0-го раунда |
1083 | 1083 | define('UNIT_AWARD_MEMORY_SUPER_BORN_2015_SIMPLE', 2304); // День Рождения СН |
1084 | 1084 | define('UNIT_AWARD_MEMORY_SUPER_BORN_2015_BRONZE', 2305); // День Рождения СН |
1085 | 1085 | define('UNIT_AWARD_MEMORY_SUPER_BORN_2015_SILVER', 2306); // День Рождения СН |
1086 | 1086 | define('UNIT_AWARD_MEMORY_SUPER_BORN_2015_GOLD', 2307); // День Рождения СН |
1087 | 1087 | define('UNIT_AWARD_MEMORY_SUPER_BORN_2015_PLATINUM', 2308); // День Рождения СН |
1088 | -define('UNIT_AWARD_MEMORY_2016_WOMEN_DAY', 2309); // Значек за подарок Женщине от Мужчины во время ивента 8 марта 2016 года |
|
1088 | +define('UNIT_AWARD_MEMORY_2016_WOMEN_DAY', 2309); // Значек за подарок Женщине от Мужчины во время ивента 8 марта 2016 года |
|
1089 | 1089 | |
1090 | 1090 | define('UNIT_AWARD_PENNANT', 2400); // Переходящий вымпел - индикация статуса на сервере: "Топ-1", "Топ", "Сабтоп", "Самый большой флот" итд |
1091 | 1091 | define('UNIT_AWARD_BADGE', 2600); // Бейджики/значки за ачивки - например, "Построил 1000 кораблей" |
@@ -1182,7 +1182,7 @@ discard block |
||
1182 | 1182 | |
1183 | 1183 | define('UNIT_NEXT', 4000); // !!! Next unit start on 4000 !!! |
1184 | 1184 | |
1185 | -define('GROUP_PART', 800000); |
|
1185 | +define('GROUP_PART', 800000); |
|
1186 | 1186 | // Зарезервировано для запчастей: 800.001 - 899.999 |
1187 | 1187 | // define('GROUP_PART_HULL', 801000); // Корпуса - 1000 штук |
1188 | 1188 | // define('GROUP_PART_ARMOR', 802000); // Броня - 1000 штук |
@@ -1458,32 +1458,32 @@ discard block |
||
1458 | 1458 | |
1459 | 1459 | |
1460 | 1460 | // define('NICK_ID', -1); |
1461 | -define('NICK_HTML', 0); |
|
1462 | - |
|
1463 | -define('NICK_FIRST', 1); |
|
1464 | -define('NICK_RACE', 1000); |
|
1465 | -define('NICK_GENDER', 2000); |
|
1466 | -define('NICK_AWARD', 3000); |
|
1467 | -define('NICK_VACATION', 3500); |
|
1468 | -define('NICK_BIRTHSDAY', 4000); |
|
1469 | -define('NICK_PREMIUM', 5000); |
|
1470 | -define('NICK_AUTH_LEVEL', 6000); |
|
1471 | - |
|
1472 | -define('NICK_HIGHLIGHT', 6300); |
|
1473 | -define('NICK_CLASS', 6450); |
|
1474 | - |
|
1475 | -define('NICK_NICK_CLASS', 6600); |
|
1476 | -define('NICK_NICK', 7000); |
|
1461 | +define('NICK_HTML', 0); |
|
1462 | + |
|
1463 | +define('NICK_FIRST', 1); |
|
1464 | +define('NICK_RACE', 1000); |
|
1465 | +define('NICK_GENDER', 2000); |
|
1466 | +define('NICK_AWARD', 3000); |
|
1467 | +define('NICK_VACATION', 3500); |
|
1468 | +define('NICK_BIRTHSDAY', 4000); |
|
1469 | +define('NICK_PREMIUM', 5000); |
|
1470 | +define('NICK_AUTH_LEVEL', 6000); |
|
1471 | + |
|
1472 | +define('NICK_HIGHLIGHT', 6300); |
|
1473 | +define('NICK_CLASS', 6450); |
|
1474 | + |
|
1475 | +define('NICK_NICK_CLASS', 6600); |
|
1476 | +define('NICK_NICK', 7000); |
|
1477 | 1477 | define('NICK_NICK_CLASS_END', 7300); |
1478 | 1478 | |
1479 | -define('NICK_ALLY_CLASS', 7600); |
|
1480 | -define('NICK_ALLY', 8000); |
|
1479 | +define('NICK_ALLY_CLASS', 7600); |
|
1480 | +define('NICK_ALLY', 8000); |
|
1481 | 1481 | define('NICK_ALLY_CLASS_END', 8300); |
1482 | 1482 | |
1483 | -define('NICK_CLASS_END', 8450); |
|
1484 | -define('NICK_HIGHLIGHT_END', 8600); |
|
1483 | +define('NICK_CLASS_END', 8450); |
|
1484 | +define('NICK_HIGHLIGHT_END', 8600); |
|
1485 | 1485 | |
1486 | -define('NICK_LAST', 9999); |
|
1486 | +define('NICK_LAST', 9999); |
|
1487 | 1487 | |
1488 | 1488 | // Настройки игрока |
1489 | 1489 | define('PLAYER_OPTION_MENU_SORT', 1); |
@@ -1576,8 +1576,8 @@ discard block |
||
1576 | 1576 | define('LOG_ONLIINE_AGGREGATE_PERIOD_MINUTE_10', 1); |
1577 | 1577 | |
1578 | 1578 | define('BLITZ_REGISTER_DISABLED', 0); |
1579 | -define('BLITZ_REGISTER_OPEN' , 1); |
|
1580 | -define('BLITZ_REGISTER_CLOSED' , 2); |
|
1579 | +define('BLITZ_REGISTER_OPEN', 1); |
|
1580 | +define('BLITZ_REGISTER_CLOSED', 2); |
|
1581 | 1581 | define('BLITZ_REGISTER_SHOW_LOGIN', 3); |
1582 | 1582 | define('BLITZ_REGISTER_DISCLOSURE_NAMES', 4); |
1583 | 1583 |
@@ -75,7 +75,7 @@ |
||
75 | 75 | $this->rowOperator = $gc->dbGlobalRowOperator; |
76 | 76 | $this->accessors = new Accessors(); |
77 | 77 | |
78 | - if(property_exists($this, 'newProperties') && !empty($this->newProperties)) { |
|
78 | + if (property_exists($this, 'newProperties') && !empty($this->newProperties)) { |
|
79 | 79 | $this->extendProperties($this->newProperties); |
80 | 80 | } |
81 | 81 | } |