Browse Source

Merge remote-tracking branch 'github/master'

Gesche 1 year ago
parent
commit
5965d138a1

+ 25
- 5
data/locales/pt.lua View File

@@ -10,11 +10,15 @@ locale = {
10 10
   -- As traduções devem vir sempre em ordem alfabética.
11 11
   translation = {
12 12
     ["%d of experience per hour"] = "%d de experiência por hora",
13
+    ["%s has finished the request"] = "%s finalizou o pedido",
14
+    ["%s has logged in."] = "%s entrou.",
15
+    ["%s has logged out."] = "%s saiu.",
13 16
     ["%s of experience left"] = "%s de experiência faltando",
14 17
     ["%s: (use object on target)"] = "%s: (usar objeto no alvo)",
15 18
     ["%s: (use object on yourself)"] = "%s: (usar objeto em si)",
16 19
     ["%s: (use object with crosshair)"] = "%s: (usar objeto com mira)",
17 20
     ["%s: (use object)"] = "%s: (usar objeto)",
21
+    ["(ERROR %d)"] = "(ERRO %d)",
18 22
     ["1a) Offensive Name"] = "1a) Nome ofensivo",
19 23
     ["1b) Invalid Name Format"] = "1b) Nome com formato inválido",
20 24
     ["1c) Unsuitable Name"] = "1c) Nome não adequado",
@@ -38,6 +42,8 @@ locale = {
38 42
     ["Account name"] = "Nome da conta",
39 43
     ["Account Status"] = "Estado da Conta",
40 44
     ["Action"] = "Ação",
45
+    ["Activate ignorelist"] = "Ativar lista ignorada",
46
+    ["Activate whitelist"] = "Ativar lista branca",
41 47
     ["Add new server"] = "Adicionar novo servidor",
42 48
     ["Add new VIP"] = "Adicionar nova VIP",
43 49
     ["Add to VIP list"] = "Adicionar a lista VIP",
@@ -46,17 +52,18 @@ locale = {
46 52
     ["Addon 2"] = "Addon 2",
47 53
     ["Addon 3"] = "Addon 3",
48 54
     ["Adjust volume"] = "Ajustar volume",
49
-    ["Alas! Brave adventurer, you have met a sad fate.\nBut do not despair, for the gods will bring you back\ninto this world in exchange for a small sacrifice\n\nSimply click on Ok to resume your journeys!"] = false,
50 55
     ["All modules and scripts were reloaded."] = "Todos módulos e scripts foram recarregados.",
51 56
     ["All"] = "Todos",
52 57
     ["Allow auto chase override"] = "Permitir sobrescrever o modo de perseguição",
58
+    ["Allow VIPs to message you"] = "Permitir que VIPs te mandem mensagem",
59
+    ["Allowed Players"] = "Jogadores com permissão",
53 60
     ["Also known as dash in tibia community, recommended\nfor playing characters with high speed"] = "Também conhecido como dash na comunidade tibiana, recomendado\npara jogar com personagem que possuam velocidade alta",
54 61
     ["Ambient light: %s%%"] = "Luz ambiente: %s%%",
55 62
     ["Amount"] = "Quantidade",
56 63
     ["Anonymous"] = "Anônimo",
57 64
     ["Any"] = "Qualquer",
58
-    ["Are you sure you want to logout?"] = "Você tem certeza que quer sair?",
59 65
     ["Attack"] = "Atacar",
66
+    ["Auction End"] = "Fim do Leilão",
60 67
     ["Audio"] = "Áudio",
61 68
     ["Author"] = "Autor",
62 69
     ["Auto login selected character on next charlist load"] = "Entrar automaticamente com o personagem quando reabrir a lista de personagens",
@@ -68,6 +75,7 @@ locale = {
68 75
     ["Banishment + Final Warning"] = "Banimento + Aviso final",
69 76
     ["Banishment"] = "Banimento",
70 77
     ["Battle"] = "Batalha",
78
+    ["Browse Field"] = "Navegar Campo",
71 79
     ["Browse"] = "Navegar",
72 80
     ["Bug report sent."] = "Reporte de bug enviado.",
73 81
     ["Button Assign"] = "Selecionar botão",
@@ -75,12 +83,14 @@ locale = {
75 83
     ["Buy Offers"] = "Ofertas de compra",
76 84
     ["Buy with backpack"] = "Comprar com mochila",
77 85
     ["Buy"] = "Comprar",
86
+    ["Buyer Name"] = "Nome do Comprador",
78 87
     ["Cancel"] = "Cancelar",
79 88
     ["Cannot login while already in game."] = "Não é possivel logar enquanto já estiver jogando.",
80 89
     ["Cap"] = "Cap",
81 90
     ["Capacity"] = "Capacidade",
82 91
     ["Center"] = "Centro",
83 92
     ["Change language"] = "Trocar língua",
93
+    ["Channel appended to %s"] = "Canais acrescentados a %s",
84 94
     ["Channels"] = "Canais",
85 95
     ["Character List"] = "Lista de personagens",
86 96
     ["Classic control"] = "Controle clássico",
@@ -88,6 +98,7 @@ locale = {
88 98
     ["Clear Messages"] = "Limpar mensagens",
89 99
     ["Clear object"] = "Limpar objeto",
90 100
     ["Client needs update."] = "O client do jogo precisa ser atualizado",
101
+    ["Client Version"] = "Versão do Client",
91 102
     ["Close this channel"] = "Fechar esse canal",
92 103
     ["Close"] = "Fechar",
93 104
     ["Club Fighting"] = "Combate com Porrete",
@@ -96,35 +107,44 @@ locale = {
96 107
     ["Connecting to game server..."] = "Conectando no servidor do jogo...",
97 108
     ["Connecting to login server..."] = "Conectando no servidor de autenticação...",
98 109
     ["Connection Error"] = "Erro de Conexão",
110
+    ["Connection failed the server address does not exist."] = "Conexão falhou, servidor não existe.",
111
+    ["Connection failed."] = "Conexão falhou.",
112
+    ["Connection refused the server might be offline or restarting.\nPlease try again later."] = "Conexão recusada, servidor pode estar offline ou reiniciando. Por favor, tente novamente mais tarde.",
113
+    ["Connection timed out. Either your network is failing or the server is offline."] = "Conexão encerrada por tempo limite. Sua rede está falhando, ou o servidor está offline.",
99 114
     ["Console"] = "Console",
100 115
     ["Cooldown"] = "Cooldown",
101 116
     ["Cooldowns"] = "Cooldowns",
102 117
     ["Copy message"] = "Copiar mensagem",
103 118
     ["Copy name"] = "Copiar nome",
104 119
     ["Copy Name"] = "Copiar Nome",
120
+    ["Copy"] = "Copiar",
105 121
     ["Create Map Mark"] = "Criar marca no mapa",
106 122
     ["Create mark"] = "Criar marca",
107 123
     ["Create New Offer"] = "Criar nova oferta",
108 124
     ["Create Offer"] = "Criar oferta",
109 125
     ["Current hotkey to add: %s"] = "Atalho atual para adicionar: %s",
110
-    ["Current hotkeys:"] = "Atalhos atuais",
126
+    ["Critical Hit Chance"] = "Chance de acerto crítico",
127
+    ["Critical Hit Damage"] = "Dano de acerto crítico",
128
+    ["Current hotkeys"] = "Atalhos atuais",
111 129
     ["Current Offers"] = "Ofertas atuais",
112 130
     ["Default"] = "Padrão",
113 131
     ["Delete mark"] = "Deletar marca",
114 132
     ["Description"] = "Descrição",
115
-    ["Description:"] = "Descrição",
116 133
     ["Destructive Behaviour"] = "Comportamento destrutivo",
117 134
     ["Detail"] = "Detalhe",
118 135
     ["Details"] = "Detalhes",
136
+    ["Disable chat mode allow to walk using ASDW"] = "Desativar modo de chat permite andar usando ASDW",
119 137
     ["Disable Shared Experience"] = "Desativar experiência compartilhada",
120 138
     ["Dismount"] = "Desmontar",
121 139
     ["Display connection speed to the server (milliseconds)"] = "Exibir a velocidade de conexão com o servidor (milisegundos)",
122 140
     ["Display creature health bars"] = "Exibir barras de vida das criaturas",
123 141
     ["Display creature names"] = "Exibir nomes das criaturas",
142
+    ["Display player mana bar"] = "Exibir barra de mana",
124 143
     ["Display text messages"] = "Exibir mensagens de texto",
125 144
     ["Distance Fighting"] = "Combate a Distância",
126
-    ["Don't stretch or shrink Game Window"] = "Não esticar ou contrair a janela do game",
145
+    ["Don\'t stretch or shrink Game Window"] = "Não esticar ou contrair a janela do game",
127 146
     ["Druid"] = "Druid",
147
+    ["Edit %s"] = "Editar %s",
128 148
     ["Edit hotkey text:"] = "Editar texto do atalho",
129 149
     ["Edit List"] = "Editar lista",
130 150
     ["Edit Text"] = "Editar Texto",

+ 126
- 37
modules/client_locales/neededtranslations.lua View File

@@ -21,40 +21,47 @@ neededTranslations = {
21 21
   "4c) False Report to Gamemaster",
22 22
   "Accept",
23 23
   "Account name",
24
-  "Account Status:",
25
-  "Action:",
24
+  "Account Status",
25
+  "Action",
26
+  "Activate ignorelist",
27
+  "Activate whitelist",
26 28
   "Add",
29
+  "Add new server",
27 30
   "Add new VIP",
28 31
   "Addon 1",
29 32
   "Addon 2",
30 33
   "Addon 3",
31 34
   "Add to VIP list",
32 35
   "Adjust volume",
33
-  "Alas! Brave adventurer, you have met a sad fate.\nBut do not despair, for the gods will bring you back\ninto this world in exchange for a small sacrifice\n\nSimply click on Ok to resume your journeys!",
34 36
   "All",
35 37
   "All modules and scripts were reloaded.",
36 38
   "Allow auto chase override",
37
-  "Also known as dash in tibia community, recommended\nfor playing characters with high speed",
39
+  "Allowed Players",
40
+  "Allow VIPs to message you",
38 41
   "Ambient light: %s%%",
39
-  "Amount:",
40 42
   "Amount",
41 43
   "Anonymous",
42
-  "Are you sure you want to logout?",
44
+  "Any",
43 45
   "Attack",
46
+  "Auction End",
47
+  "Audio",
48
+  "Authenticator Token",
44 49
   "Author",
45 50
   "Autoload",
46 51
   "Autoload priority",
47 52
   "Auto login",
48 53
   "Auto login selected character on next charlist load",
49 54
   "Axe Fighting",
50
-  "Balance:",
55
+  "Balance",
51 56
   "Banishment",
52 57
   "Banishment + Final Warning",
53 58
   "Battle",
54 59
   "Browse",
60
+  "Browse Field",
55 61
   "Bug report sent.",
56 62
   "Button Assign",
57 63
   "Buy",
64
+  "Buyer Name",
58 65
   "Buy Now",
59 66
   "Buy Offers",
60 67
   "Buy with backpack",
@@ -63,6 +70,8 @@ neededTranslations = {
63 70
   "Cap",
64 71
   "Capacity",
65 72
   "Center",
73
+  "Change language",
74
+  "Channel appended to %s",
66 75
   "Channels",
67 76
   "Character List",
68 77
   "Classic control",
@@ -70,15 +79,23 @@ neededTranslations = {
70 79
   "Clear Messages",
71 80
   "Clear object",
72 81
   "Client needs update.",
82
+  "Client Version",
73 83
   "Close",
74 84
   "Close this channel",
75 85
   "Club Fighting",
76 86
   "Combat Controls",
77
-  "Comment:",
87
+  "Comment",
78 88
   "Connecting to game server...",
79 89
   "Connecting to login server...",
90
+  "Connection Error",
91
+  "Connection failed.",
92
+  "Connection failed, the server address does not exist.",
93
+  "Connection refused, the server might be offline or restarting.\nPlease try again later.",
94
+  "Connection timed out. Either your network is failing or the server is offline.",
80 95
   "Console",
96
+  "Cooldown",
81 97
   "Cooldowns",
98
+  "Copy",
82 99
   "Copy message",
83 100
   "Copy name",
84 101
   "Copy Name",
@@ -86,53 +103,72 @@ neededTranslations = {
86 103
   "Create mark",
87 104
   "Create New Offer",
88 105
   "Create Offer",
89
-  "Current hotkeys:",
106
+  "Critical Hit Chance",
107
+  "Critical Hit Damage",
108
+  "Current hotkeys",
90 109
   "Current hotkey to add: %s",
91 110
   "Current Offers",
92 111
   "Default",
93 112
   "Delete mark",
94
-  "Description:",
95 113
   "Description",
96 114
   "Destructive Behaviour",
97 115
   "Detail",
98 116
   "Details",
117
+  "Disable chat mode, allow to walk using ASDW",
118
+  "Disable chat mode, allow to walk using ASDW",
99 119
   "Disable Shared Experience",
100 120
   "Dismount",
101 121
   "Display connection speed to the server (milliseconds)",
122
+  "Display creature health bars",
123
+  "Display creature names",
124
+  "Display player mana bar",
125
+  "Display text messages",
102 126
   "Distance Fighting",
127
+  "%d of experience per hour",
103 128
   "Don\'t stretch/shrink Game Window",
104
-  "Edit hotkey text:",
129
+  "Druid",
130
+  "Edit hotkey text",
105 131
   "Edit List",
132
+  "Edit %s",
106 133
   "Edit Text",
107
-  "Enable music",
134
+  "Edit VIP list entry",
135
+  "Enable audio",
136
+  "Enable chat mode",
137
+  "Enable dash walking",
138
+  "Enable lights",
139
+  "Enable music sound",
108 140
   "Enable Shared Experience",
109 141
   "Enable smart walking",
110 142
   "Enable vertical synchronization",
111
-  "Enable walk booster",
112 143
   "Enter Game",
113 144
   "Enter one name per line.",
114 145
   "Enter with your account again to update your client.",
115 146
   "Error",
116 147
   "Error",
148
+  "(ERROR %d)",
117 149
   "Excessive Unjustified Player Killing",
118 150
   "Exclude from private chat",
119 151
   "Exit",
120 152
   "Experience",
121 153
   "Filter list to match your level",
122 154
   "Filter list to match your vocation",
123
-  "Find:",
155
+  "Filters",
156
+  "Find",
124 157
   "Fishing",
125 158
   "Fist Fighting",
126 159
   "Follow",
127 160
   "Force Exit",
161
+  "Formula",
128 162
   "For Your Information",
129 163
   "Free Account",
130 164
   "Fullscreen",
131 165
   "Game",
132 166
   "Game framerate limit: %s",
167
+  "Global ignore settings",
168
+  "Global whitelist settings",
133 169
   "Graphics",
134 170
   "Graphics card driver not detected",
135
-  "Graphics Engine:",
171
+  "Group",
136 172
   "Head",
137 173
   "Healing",
138 174
   "Health Info",
@@ -146,43 +182,50 @@ neededTranslations = {
146 182
   "Hide spells for higher exp. levels",
147 183
   "Hide spells for other vocations",
148 184
   "Hit Points",
149
-  "Hold left mouse button to navigate\nScroll mouse middle button to zoom\nRight mouse button to create map marks",
185
+  "Hold left mouse button to navigate\nScroll mouse middle button to zoom\nRight mouse button to create map marks\nPress Ctrl+Shift+M to view the entire game map",
186
+  "Host",
187
+  "Hotkey delay: %dms",
188
+  "Hotkey delay: %sms",
150 189
   "Hotkeys",
151 190
   "If you shut down the program, your character might stay in the game.\nClick on 'Logout' to ensure that you character leaves the game properly.\nClick on 'Exit' if you want to exit the program without logging out your character.",
152 191
   "Ignore",
153 192
   "Ignore capacity",
154
-  "Ignored players:",
193
+  "Ignored Players",
155 194
   "Ignore equipped",
156 195
   "Ignore List",
157 196
   "Ignore players",
158 197
   "Ignore Private Messages",
159 198
   "Ignore Yelling",
160 199
   "Interface framerate limit: %s",
200
+  "Invalid authentification token.",
161 201
   "Inventory",
162 202
   "Invite to Party",
163 203
   "Invite to private chat",
164 204
   "IP Address Banishment",
205
+  "Item Name",
165 206
   "Item Offers",
166 207
   "It is empty.",
167 208
   "Join %s\'s Party",
209
+  "Knight",
168 210
   "Leave Party",
169 211
   "Level",
212
+  "Life Leech Amount",
213
+  "Life Leech Chance",
170 214
   "Lifetime Premium Account",
171 215
   "Limits FPS to 60",
172 216
   "List of items that you're able to buy",
173 217
   "List of items that you're able to sell",
174 218
   "Load",
175
-  "Logging out...",
176 219
   "Login",
177 220
   "Login Error",
178 221
   "Login Error",
179 222
   "Logout",
180 223
   "Look",
181 224
   "Magic Level",
182
-  "Make sure that your client uses\nthe correct game protocol version",
225
+  "Make sure that your client uses\nthe correct game client version",
183 226
   "Mana",
184
-  "Manage hotkeys:",
185 227
   "Market",
228
+  "Market Error",
186 229
   "Market Offers",
187 230
   "Message of the day",
188 231
   "Message to ",
@@ -193,11 +236,14 @@ neededTranslations = {
193 236
   "Mount",
194 237
   "Move Stackable Item",
195 238
   "Move up",
239
+  "Music volume: %d",
196 240
   "My Offers",
197
-  "Name:",
241
+  "Name",
198 242
   "Name Report",
199 243
   "Name Report + Banishment",
200 244
   "Name Report + Banishment + Final Warning",
245
+  "New Server",
246
+  "Next level in %d hours and %d minutes",
201 247
   "No",
202 248
   "No graphics card detected, everything will be drawn using the CPU,\nthus the performance will be really bad.\nPlease update your graphics driver to have a better performance.",
203 249
   "No item selected.",
@@ -205,39 +251,47 @@ neededTranslations = {
205 251
   "No Outfit",
206 252
   "No statement has been selected.",
207 253
   "Notation",
254
+  "Notify-Login",
208 255
   "NPC Trade",
209 256
   "Offer History",
210 257
   "Offers",
211
-  "Offer Type:",
258
+  "Offer Type",
212 259
   "Offline Training",
213 260
   "Ok",
214 261
   "on %s.\n",
215 262
   "Open",
216
-  "Open a private message channel:",
263
+  "Open a private message channel",
217 264
   "Open charlist automatically when starting client",
218 265
   "Open in new window",
219 266
   "Open new channel",
267
+  "Open purse",
268
+  "Open PvP",
269
+  "Open PvP Situations",
220 270
   "Options",
221 271
   "Overview",
272
+  "Paladin",
222 273
   "Pass Leadership to %s",
223 274
   "Password",
224
-  "Piece Price:",
225
-  "Please enter a character name:",
275
+  "Piece Price",
276
+  "Please enter a character name",
226 277
   "Please, press the key you wish to add onto your hotkeys manager",
227 278
   "Please Select",
279
+  "Please state the rule violation in one clear sentence and wait for a reply from a gamemaster. Please note that your message will disappear if you close the channel.",
228 280
   "Please use this dialog to only report bugs. Do not report rule violations here!",
229 281
   "Please wait",
282
+  "Please wait patiently for a gamemaster to reply",
230 283
   "Port",
231
-  "Position:",
232
-  "Position: %i %i %i",
284
+  "Position",
285
+  "Premium",
233 286
   "Premium Account (%s) days left",
234
-  "Price:",
287
+  "Price",
235 288
   "Primary",
289
+  "Process",
236 290
   "Protocol",
237 291
   "Quest Log",
238 292
   "Randomize",
239 293
   "Randomize characters outfit",
240
-  "Reason:",
294
+  "Reason",
241 295
   "Refresh",
242 296
   "Refresh Offers",
243 297
   "Regeneration Time",
@@ -245,31 +299,46 @@ neededTranslations = {
245 299
   "Reload All",
246 300
   "Remember account and password when starts client",
247 301
   "Remember password",
302
+  "Remove ",
248 303
   "Remove",
249 304
   "Remove %s",
250 305
   "Report Bug",
306
+  "Report Rule",
307
+  "Report Rule Violation",
251 308
   "Reserved for more functionality later.",
309
+  "Reset All",
252 310
   "Reset Market",
311
+  "Reset selection, filters & search",
253 312
   "Revoke %s\'s Invitation",
254 313
   "Rotate",
255 314
   "Rule Violation",
315
+  "Rule Violations",
256 316
   "Save",
257 317
   "Save Messages",
258
-  "Search:",
318
+  "Search",
259 319
   "Search all items",
260 320
   "Secondary",
321
+  "Select",
322
+  "Select all",
261 323
   "Select object",
262 324
   "Select Outfit",
263 325
   "Select your language",
264 326
   "Sell",
327
+  "Sell All",
328
+  "Seller Name",
265 329
   "Sell Now",
266 330
   "Sell Offers",
267 331
   "Send",
268 332
   "Send automatically",
269 333
   "Send Message",
270 334
   "Server",
335
+  "Server list",
336
+  "Server List",
271 337
   "Server Log",
272 338
   "Set Outfit",
339
+  "%s has finished the request",
340
+  "%s has logged in.",
341
+  "%s has logged out.",
273 342
   "Shielding",
274 343
   "Show all items",
275 344
   "Show connection ping",
@@ -286,8 +355,15 @@ neededTranslations = {
286 355
   "Show status messages in console",
287 356
   "Show Text",
288 357
   "Show timestamps in console",
358
+  "Show Top Menu",
289 359
   "Show your depot items only",
290 360
   "Skills",
361
+  "Skull Time",
362
+  "%s of experience left",
363
+  "Sorcerer",
364
+  "Sort by name",
365
+  "Sort by status",
366
+  "Sort by type",
291 367
   "Soul",
292 368
   "Soul Points",
293 369
   "Special",
@@ -295,9 +371,10 @@ neededTranslations = {
295 371
   "Spell Cooldowns",
296 372
   "Spell List",
297 373
   "Stamina",
298
-  "Statement:",
374
+  "Statement",
299 375
   "Statement Report",
300 376
   "Statistics",
377
+  "Stay logged during session",
301 378
   "Stop Attack",
302 379
   "Stop Follow",
303 380
   "Support",
@@ -308,17 +385,23 @@ neededTranslations = {
308 385
   "Sword Fighting",
309 386
   "Terminal",
310 387
   "There is no way.",
311
-  "Title",
312
-  "Total Price:",
388
+  "This offer is 25%% above the average market price",
389
+  "This offer is 25%% below the average market price",
390
+  "Total Price",
313 391
   "Trade",
314 392
   "Trade with ...",
315 393
   "Trying to reconnect in %s seconds.",
394
+  "Turn delay: %dms",
395
+  "Turn delay: %sms",
396
+  "Two-Factor Authentification",
397
+  "Type",
316 398
   "Unable to load dat file, please place a valid dat in '%s'",
317 399
   "Unable to load spr file, please place a valid spr in '%s'",
318
-  "Unable to logout.",
319 400
   "Unignore",
401
+  "Unjustified Points",
320 402
   "Unload",
321 403
   "Update needed",
404
+  "Update needed",
322 405
   "Use",
323 406
   "Use on target",
324 407
   "Use on yourself",
@@ -329,7 +412,8 @@ neededTranslations = {
329 412
   "Vocation",
330 413
   "Waiting List",
331 414
   "Website",
332
-  "Weight:",
415
+  "Weight",
416
+  "Will boost your walk on high speed characters",
333 417
   "Will detect when to use diagonal step based on the\nkeys you are pressing",
334 418
   "With crosshair",
335 419
   "Yes",
@@ -358,8 +442,13 @@ neededTranslations = {
358 442
   "You must enter a comment.",
359 443
   "You must enter a valid server address and port.",
360 444
   "You must select a character to login!",
361
-  "Your Capacity:",
445
+  "You must select an action.",
446
+  "You must select a reason.",
447
+  "Your Capacity",
448
+  "Your client needs updating, try redownloading it.",
449
+  "Your connection has been lost.\nEither your network or the server went down.",
362 450
   "You read the following, written by \n%s\n",
363 451
   "You read the following, written on \n%s.\n",
364
-  "Your Money:",
452
+  "Your Money",
453
+  "Your request has been closed",
365 454
 }

+ 30
- 22
modules/client_stats/stats.lua View File

@@ -65,33 +65,33 @@ function onConnect(protocol)
65 65
   end
66 66
 
67 67
   local post = ''
68
-  post = post .. 'uid='                .. UUID
68
+  post = post .. 'uid='                .. urlencode(UUID)
69 69
   post = post .. '&report_delay='      .. REPORT_DELAY
70
-  post = post .. '&os='                .. g_app.getOs()
71
-  post = post .. '&graphics_vendor='   .. g_graphics.getVendor()
72
-  post = post .. '&graphics_renderer=' .. g_graphics.getRenderer()
73
-  post = post .. '&graphics_version='  .. g_graphics.getVersion()
74
-  post = post .. '&painter_engine='    .. g_graphics.getPainterEngine()
75
-  post = post .. '&fps='               .. g_app.getBackgroundPaneFps()
76
-  post = post .. '&max_fps='           .. g_app.getBackgroundPaneMaxFps()
77
-  post = post .. '&fullscreen='        .. tostring(g_window.isFullscreen())
78
-  post = post .. '&window_width='      .. g_window.getWidth()
79
-  post = post .. '&window_height='     .. g_window.getHeight()
80
-  post = post .. '&player_name='       .. g_game.getCharacterName()
81
-  post = post .. '&world_name='        .. g_game.getWorldName()
82
-  post = post .. '&otserv_host='       .. G.host
70
+  post = post .. '&os='                .. urlencode(g_app.getOs())
71
+  post = post .. '&graphics_vendor='   .. urlencode(g_graphics.getVendor())
72
+  post = post .. '&graphics_renderer=' .. urlencode(g_graphics.getRenderer())
73
+  post = post .. '&graphics_version='  .. urlencode(g_graphics.getVersion())
74
+  post = post .. '&painter_engine='    .. urlencode(g_graphics.getPainterEngine())
75
+  post = post .. '&fps='               .. urlencode(g_app.getBackgroundPaneFps())
76
+  post = post .. '&max_fps='           .. urlencode(g_app.getBackgroundPaneMaxFps())
77
+  post = post .. '&fullscreen='        .. urlencode(tostring(g_window.isFullscreen()))
78
+  post = post .. '&window_width='      .. urlencode(g_window.getWidth())
79
+  post = post .. '&window_height='     .. urlencode(g_window.getHeight())
80
+  post = post .. '&player_name='       .. urlencode(g_game.getCharacterName())
81
+  post = post .. '&world_name='        .. urlencode(g_game.getWorldName())
82
+  post = post .. '&otserv_host='       .. urlencode(G.host)
83 83
   post = post .. '&otserv_port='       .. G.port
84
-  post = post .. '&otserv_protocol='   .. g_game.getProtocolVersion()
85
-  post = post .. '&otserv_client='     .. g_game.getClientVersion()
86
-  post = post .. '&build_version='     .. g_app.getVersion()
87
-  post = post .. '&build_revision='    .. g_app.getBuildRevision()
88
-  post = post .. '&build_commit='      .. g_app.getBuildCommit()
89
-  post = post .. '&build_date='        .. g_app.getBuildDate()
84
+  post = post .. '&otserv_protocol='   .. urlencode(g_game.getProtocolVersion())
85
+  post = post .. '&otserv_client='     .. urlencode(g_game.getClientVersion())
86
+  post = post .. '&build_version='     .. urlencode(g_app.getVersion())
87
+  post = post .. '&build_revision='    .. urlencode(g_app.getBuildRevision())
88
+  post = post .. '&build_commit='      .. urlencode(g_app.getBuildCommit())
89
+  post = post .. '&build_date='        .. urlencode(g_app.getBuildDate())
90 90
   post = post .. '&display_width='     .. g_window.getDisplayWidth()
91 91
   post = post .. '&display_height='    .. g_window.getDisplayHeight()
92
-  post = post .. '&cpu='               .. g_platform.getCPUName()
92
+  post = post .. '&cpu='               .. urlencode(g_platform.getCPUName())
93 93
   post = post .. '&mem='               .. g_platform.getTotalSystemMemory()
94
-  post = post .. '&os_name='           .. g_platform.getOSName()
94
+  post = post .. '&os_name='           .. urlencode(g_platform.getOSName())
95 95
   post = post .. getAdditionalData()
96 96
 
97 97
   local message = ''
@@ -121,3 +121,11 @@ end
121 121
 function onError(protocol, message, code)
122 122
   pdebug('Could not send statistics: ' .. message)
123 123
 end
124
+
125
+function urlencode(str)
126
+    local encodeChar=function(chr)
127
+	    return string.format("%%%X",string.byte(chr))
128
+    end
129
+	local output, t = string.gsub(str,"[^%w]",encodeChar)
130
+	return output
131
+end

+ 1
- 1
modules/game_console/channelswindow.otui View File

@@ -25,7 +25,7 @@ MainWindow
25 25
 
26 26
   Label
27 27
     id: openPrivateChannelWithLabel
28
-    !text: tr('Open a private message channel:')
28
+    !text: tr('Open a private message channel') .. ':'
29 29
     anchors.left: parent.left
30 30
     anchors.right: parent.right
31 31
     anchors.bottom: next.top

+ 2
- 2
modules/game_console/communicationwindow.otui View File

@@ -35,7 +35,7 @@ MainWindow
35 35
     width: 180
36 36
 
37 37
   Label
38
-    !text: tr('Ignored Players:')
38
+    !text: tr('Ignored Players') .. ':'
39 39
     anchors.left: parent.left
40 40
     anchors.top: prev.bottom
41 41
     margin-top: 10
@@ -108,7 +108,7 @@ MainWindow
108 108
     width: 180
109 109
 
110 110
   Label
111
-    !text: tr('Allowed Players:')
111
+    !text: tr('Allowed Players') .. ':'
112 112
     anchors.top: prev.bottom
113 113
     anchors.left: prev.left
114 114
     margin-top: 10

+ 4
- 4
modules/game_console/console.lua View File

@@ -1202,15 +1202,15 @@ function loadCommunicationSettings()
1202 1202
 
1203 1203
   local ignoreNode = g_settings.getNode('IgnorePlayers')
1204 1204
   if ignoreNode then
1205
-    for i = 1, #ignoreNode do
1206
-      table.insert(communicationSettings.ignoredPlayers, ignoreNode[i])
1205
+    for _, player in pairs(ignoreNode) do
1206
+      table.insert(communicationSettings.ignoredPlayers, player)
1207 1207
     end
1208 1208
   end
1209 1209
 
1210 1210
   local whitelistNode = g_settings.getNode('WhitelistedPlayers')
1211 1211
   if whitelistNode then
1212
-    for i = 1, #whitelistNode do
1213
-      table.insert(communicationSettings.whitelistedPlayers, whitelistNode[i])
1212
+    for _, player in pairs(whitelistNode) do
1213
+      table.insert(communicationSettings.whitelistedPlayers, player)
1214 1214
     end
1215 1215
   end
1216 1216
 

+ 2
- 2
modules/game_hotkeys/hotkeys_manager.otui View File

@@ -18,7 +18,7 @@ MainWindow
18 18
 
19 19
   Label
20 20
     id: currentHotkeysLabel
21
-    !text: tr('Current hotkeys:')
21
+    !text: tr('Current hotkeys') .. ':'
22 22
     anchors.left: parent.left
23 23
     anchors.right: parent.right
24 24
     anchors.top: parent.top
@@ -70,7 +70,7 @@ MainWindow
70 70
 
71 71
   Label
72 72
     id: hotKeyTextLabel
73
-    !text: tr('Edit hotkey text:')
73
+    !text: tr('Edit hotkey text') .. ':'
74 74
     enable: false
75 75
     anchors.left: parent.left
76 76
     anchors.right: parent.right

+ 1
- 1
modules/game_viplist/addvip.otui View File

@@ -5,7 +5,7 @@ MainWindow
5 5
   @onEscape: modules.game_viplist.destroyAddWindow()
6 6
 
7 7
   Label
8
-    !text: tr('Please enter a character name:')
8
+    !text: tr('Please enter a character name') .. ':'
9 9
     anchors.top: parent.top
10 10
     anchors.left: parent.left
11 11
     anchors.right: parent.right

+ 1
- 1
modules/game_viplist/viplist.lua View File

@@ -335,7 +335,7 @@ function onVipStateChange(id, state)
335 335
   onAddVip(id, name, state, description, iconId, notify)
336 336
 
337 337
   if notify and state ~= VipState.Pending then
338
-    modules.game_textmessage.displayFailureMessage(tr('%s has logged %s.', name, (state == VipState.Online and 'in' or 'out')))
338
+    modules.game_textmessage.displayFailureMessage(state == VipState.Online and tr('%s has logged in.', name) or tr('%s has logged out.', name))
339 339
   end
340 340
 end
341 341
 

+ 4
- 3
src/client/thingtypemanager.cpp View File

@@ -199,11 +199,12 @@ void ThingTypeManager::loadOtb(const std::string& file)
199 199
             root->skip(128); // description
200 200
         }
201 201
 
202
+        BinaryTreeVec children = root->getChildren();
202 203
         m_reverseItemTypes.clear();
203
-        m_itemTypes.resize(root->getChildren().size() + 1, m_nullItemType);
204
-        m_reverseItemTypes.resize(root->getChildren().size() + 1, m_nullItemType);
204
+        m_itemTypes.resize(children.size() + 1, m_nullItemType);
205
+        m_reverseItemTypes.resize(children.size() + 1, m_nullItemType);
205 206
 
206
-        for(const BinaryTreePtr& node : root->getChildren()) {
207
+        for(const BinaryTreePtr& node : children) {
207 208
             ItemTypePtr itemType(new ItemType);
208 209
             itemType->unserialize(node);
209 210
             addItemType(itemType);

+ 1
- 0
src/framework/luafunctions.cpp View File

@@ -814,6 +814,7 @@ void Application::registerLuaFunctions()
814 814
     // OutputMessage
815 815
     g_lua.registerClass<OutputMessage>();
816 816
     g_lua.bindClassStaticFunction<OutputMessage>("create", []{ return OutputMessagePtr(new OutputMessage); });
817
+    g_lua.bindClassMemberFunction<OutputMessage>("setBuffer", &OutputMessage::setBuffer);
817 818
     g_lua.bindClassMemberFunction<OutputMessage>("getBuffer", &OutputMessage::getBuffer);
818 819
     g_lua.bindClassMemberFunction<OutputMessage>("reset", &OutputMessage::reset);
819 820
     g_lua.bindClassMemberFunction<OutputMessage>("addU8", &OutputMessage::addU8);

+ 5
- 5
src/framework/net/inputmessage.cpp View File

@@ -38,11 +38,11 @@ void InputMessage::reset()
38 38
 void InputMessage::setBuffer(const std::string& buffer)
39 39
 {
40 40
     int len = buffer.size();
41
-    checkWrite(MAX_HEADER_SIZE + len);
42
-    memcpy(m_buffer + MAX_HEADER_SIZE, buffer.c_str(), len);
43
-    m_readPos = MAX_HEADER_SIZE;
44
-    m_headerPos = MAX_HEADER_SIZE;
45
-    m_messageSize = len;
41
+    reset();
42
+    checkWrite(len);
43
+    memcpy((char*)(m_buffer + m_readPos), buffer.c_str(), len);
44
+    m_readPos += len;
45
+    m_messageSize += len;
46 46
 }
47 47
 
48 48
 uint8 InputMessage::getU8()

+ 10
- 0
src/framework/net/outputmessage.cpp View File

@@ -35,6 +35,16 @@ void OutputMessage::reset()
35 35
     m_messageSize = 0;
36 36
 }
37 37
 
38
+void OutputMessage::setBuffer(const std::string& buffer)
39
+{
40
+    int len = buffer.size();
41
+    reset();
42
+    checkWrite(len);
43
+    memcpy((char*)(m_buffer + m_writePos), buffer.c_str(), len);
44
+    m_writePos += len;
45
+    m_messageSize += len;
46
+}
47
+
38 48
 void OutputMessage::addU8(uint8 value)
39 49
 {
40 50
     checkWrite(1);

+ 1
- 0
src/framework/net/outputmessage.h View File

@@ -40,6 +40,7 @@ public:
40 40
 
41 41
     void reset();
42 42
 
43
+    void setBuffer(const std::string& buffer);
43 44
     std::string getBuffer() { return std::string((char*)m_buffer + m_headerPos, m_messageSize); }
44 45
 
45 46
     void addU8(uint8 value);

+ 44
- 8
src/framework/util/crypt.cpp View File

@@ -326,22 +326,45 @@ void Crypt::rsaGenerateKey(int bits, int e)
326 326
 
327 327
 void Crypt::rsaSetPublicKey(const std::string& n, const std::string& e)
328 328
 {
329
+#if OPENSSL_VERSION_NUMBER < 0x10100005L
329 330
     BN_dec2bn(&m_rsa->n, n.c_str());
330 331
     BN_dec2bn(&m_rsa->e, e.c_str());
331
-
332 332
     // clear rsa cache
333
-    if(m_rsa->_method_mod_n) { BN_MONT_CTX_free(m_rsa->_method_mod_n); m_rsa->_method_mod_n = NULL; }
333
+    if(m_rsa->_method_mod_n) {
334
+        BN_MONT_CTX_free(m_rsa->_method_mod_n);
335
+        m_rsa->_method_mod_n = nullptr;
336
+    }
337
+#else
338
+    BIGNUM *bn = nullptr, *be = nullptr;
339
+    BN_dec2bn(&bn, n.c_str());
340
+    BN_dec2bn(&be, e.c_str());
341
+    RSA_set0_key(m_rsa, bn, be, nullptr);
342
+#endif
334 343
 }
335 344
 
336 345
 void Crypt::rsaSetPrivateKey(const std::string& p, const std::string& q, const std::string& d)
337 346
 {
347
+#if OPENSSL_VERSION_NUMBER < 0x10100005L
338 348
     BN_dec2bn(&m_rsa->p, p.c_str());
339 349
     BN_dec2bn(&m_rsa->q, q.c_str());
340 350
     BN_dec2bn(&m_rsa->d, d.c_str());
341
-
342 351
     // clear rsa cache
343
-    if(m_rsa->_method_mod_p) { BN_MONT_CTX_free(m_rsa->_method_mod_p); m_rsa->_method_mod_p = NULL; }
344
-    if(m_rsa->_method_mod_q) { BN_MONT_CTX_free(m_rsa->_method_mod_q); m_rsa->_method_mod_q = NULL; }
352
+    if(m_rsa->_method_mod_p) {
353
+        BN_MONT_CTX_free(m_rsa->_method_mod_p);
354
+        m_rsa->_method_mod_p = nullptr;
355
+    }
356
+    if(m_rsa->_method_mod_q) {
357
+        BN_MONT_CTX_free(m_rsa->_method_mod_q);
358
+        m_rsa->_method_mod_q = nullptr;
359
+    }
360
+#else
361
+    BIGNUM *bp = nullptr, *bq = nullptr, *bd = nullptr;
362
+    BN_dec2bn(&bp, p.c_str());
363
+    BN_dec2bn(&bq, q.c_str());
364
+    BN_dec2bn(&bd, d.c_str());
365
+    RSA_set0_key(m_rsa, nullptr, nullptr, bd);
366
+    RSA_set0_factors(m_rsa, bp, bq);
367
+#endif
345 368
 }
346 369
 
347 370
 bool Crypt::rsaCheckKey()
@@ -352,15 +375,29 @@ bool Crypt::rsaCheckKey()
352 375
         BN_CTX_start(ctx);
353 376
 
354 377
         BIGNUM *r1 = BN_CTX_get(ctx), *r2 = BN_CTX_get(ctx);
378
+#if OPENSSL_VERSION_NUMBER < 0x10100005L
355 379
         BN_mod(m_rsa->dmp1, m_rsa->d, r1, ctx);
356 380
         BN_mod(m_rsa->dmq1, m_rsa->d, r2, ctx);
357
-
358 381
         BN_mod_inverse(m_rsa->iqmp, m_rsa->q, m_rsa->p, ctx);
382
+#else
383
+        const BIGNUM *dmp1_c = nullptr, *d = nullptr, *dmq1_c = nullptr, *iqmp_c = nullptr, *q = nullptr, *p = nullptr;
384
+
385
+        RSA_get0_key(m_rsa, nullptr, nullptr, &d);
386
+        RSA_get0_factors(m_rsa, &p, &q);
387
+        RSA_get0_crt_params(m_rsa, &dmp1_c, &dmq1_c, &iqmp_c);
388
+
389
+        BIGNUM *dmp1 = BN_dup(dmp1_c), *dmq1 = BN_dup(dmq1_c), *iqmp = BN_dup(iqmp_c);
390
+
391
+        BN_mod(dmp1, d, r1, ctx);
392
+        BN_mod(dmq1, d, r2, ctx);
393
+        BN_mod_inverse(iqmp, q, p, ctx);
394
+        RSA_set0_crt_params(m_rsa, dmp1, dmq1, iqmp);
395
+#endif
359 396
         return true;
360 397
     }
361 398
     else {
362 399
         ERR_load_crypto_strings();
363
-        g_logger.error(stdext::format("RSA check failed - %s", ERR_error_string(ERR_get_error(), NULL)));
400
+        g_logger.error(stdext::format("RSA check failed - %s", ERR_error_string(ERR_get_error(), nullptr)));
364 401
         return false;
365 402
     }
366 403
 }
@@ -383,4 +420,3 @@ int Crypt::rsaGetSize()
383 420
 {
384 421
     return RSA_size(m_rsa);
385 422
 }
386
-

+ 2
- 2
vc14/otclient.vcxproj View File

@@ -91,7 +91,7 @@
91 91
       <PreprocessorDefinitions>$(PREPROCESSOR_DEFS);_SCL_SECURE_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
92 92
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
93 93
       <Optimization>Disabled</Optimization>
94
-      <EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
94
+      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
95 95
     </ClCompile>
96 96
     <Link>
97 97
       <TargetMachine>MachineX86</TargetMachine>
@@ -112,7 +112,7 @@
112 112
     <ClCompile>
113 113
       <PreprocessorDefinitions>$(PREPROCESSOR_DEFS);%(PreprocessorDefinitions)</PreprocessorDefinitions>
114 114
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
115
-      <EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
115
+      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
116 116
       <Optimization>MaxSpeed</Optimization>
117 117
       <IntrinsicFunctions>true</IntrinsicFunctions>
118 118
       <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>

Loading…
Cancel
Save