Problema creeare caracter

Înainte de a posta o problemă, caută în acest forum și poate găsești rezolvare.
Avatar utilizator
ZuZu93
Nivel 2

Nivel 2
Mesaje: 167
Membru din: 15 Mai 2015, 22:32
Server: Einarbos
Regat: Shinsoo
Aprecieri: 96  
Mulţumiri: 7  
Discord: Copiază ID
Medalii

*Problemă/Întrebare: Salut am instalat un svf clean de pe acest forum... l-am instalat, totul ok. Dar cand sa intru pe el nu ma lasa sa creez caracterul.. ramane caracterul cu mana sus si atat...
Tipologie server(PvM / PvP): Clean
*Resursă folosită: *Link exclusiv J4M* serverfiles/serverfiles-clean-martysama-t75119.html
*ServerFiles utilizat: serverfiles/serverfiles-clean-martysama-t75119.html
*Syserr: Va las syserr DB

Cod: Selectaţi tot

SYSERR: Feb 14 00:34:02 :: pid_init: 
Start of pid: 3992

SYSERR: Feb 14 00:36:08 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:36:20 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:36:22 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:36:24 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:36:57 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:36:59 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:37:01 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:37:07 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:37:09 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:37:22 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:37:26 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:37:29 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:37:44 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:37:50 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:38:32 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:41:32 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:44:07 :: Process: FDWATCH: peer null in event: ident 20
SYSERR: Feb 14 00:44:07 :: Process: FDWATCH: peer null in event: ident 22
SYSERR: Feb 14 00:44:07 :: Process: FDWATCH: peer null in event: ident 21
SYSERR: Feb 14 00:44:25 :: hupsig: SIGHUP, SIGINT, SIGTERM signal has been received. shutting down.
SYSERR: Feb 14 00:44:25 :: pid_deinit: 
End of pid

SYSERR: Feb 14 00:44:29 :: pid_init: 
Start of pid: 4034

SYSERR: Feb 14 00:45:49 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:45:58 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:46:52 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:47:18 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:47:19 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:47:23 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:47:31 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:47:37 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:47:48 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:47:57 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:48:11 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:48:13 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:48:19 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:48:26 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:48:34 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:48:47 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:49:03 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:49:23 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:49:27 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:49:44 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:49:51 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:49:58 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:50:14 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:50:14 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:52:02 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 00:52:12 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:38:51 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:39:11 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:39:21 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:41:07 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:42:37 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:42:45 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:43:29 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:44:19 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:44:24 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:44:50 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:45:06 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:46:32 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:47:19 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:47:20 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:47:23 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:47:48 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:47:50 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:47:52 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:48:09 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:49:05 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:49:06 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:49:07 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:49:08 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:49:12 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:49:31 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:49:37 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:50:05 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:50:10 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:50:38 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:51:06 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:51:09 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:51:41 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:51:44 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:52:31 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:52:31 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:54:24 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 03:55:58 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:10:08 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:10:15 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:10:16 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:10:17 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:10:55 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:10:57 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:10:58 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:11:12 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:11:20 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:12:14 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:12:15 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:12:21 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:13:18 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:13:20 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:13:24 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:13:26 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:13:31 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:13:32 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:14:14 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:15:49 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:17:33 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:18:53 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:20:08 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:22:06 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:22:07 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:22:08 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:23:44 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:24:03 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:26:05 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:26:05 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:26:43 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:27:33 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:29:47 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:30:00 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:30:01 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:30:08 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:31:40 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:33:09 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:34:29 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:35:20 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:35:34 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:35:50 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:35:56 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:35:59 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:36:02 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:36:03 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:36:09 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:36:10 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:36:12 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:36:19 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:36:22 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:36:23 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:36:30 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:36:39 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:36:46 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:36:54 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:36:58 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:37:05 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:37:08 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:37:16 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:39:09 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:42:09 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:45:08 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:48:08 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:51:09 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:54:09 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 08:57:09 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:00:09 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:00:35 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:01:20 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:01:22 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:02:58 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:03:08 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:03:29 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:03:29 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:04:20 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:05:22 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:05:23 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:05:24 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:05:46 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:06:01 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:06:35 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:07:41 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:08:35 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:08:54 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:08:54 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:09:44 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:10:07 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:10:08 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:10:09 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:10:10 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:10:12 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:10:13 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:10:14 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:10:15 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:10:16 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:10:23 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:11:18 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:11:22 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:11:25 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:11:27 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:11:30 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:12:20 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:14:18 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:14:42 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:14:44 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:14:48 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:14:53 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:15:01 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:15:03 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:15:04 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:15:21 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:15:28 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:15:29 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:15:30 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:15:32 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:15:55 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:15:56 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:15:57 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:15:58 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:15:59 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:16:01 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:16:02 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:16:03 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:16:04 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:16:05 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:16:34 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:17:22 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:17:55 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:18:13 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:18:21 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:18:33 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:21:00 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:21:37 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:21:47 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:21:49 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:21:50 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:21:51 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:21:52 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:21:53 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:22:33 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:24:00 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:24:12 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:24:14 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:24:15 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:24:16 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:24:23 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:24:38 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:24:50 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:24:55 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:26:22 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:26:23 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:26:25 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:26:26 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:26:43 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:26:45 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:26:57 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:27:03 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:27:04 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:27:05 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:27:06 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:27:08 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:27:27 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:27:54 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:27:59 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:28:01 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:28:01 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:28:07 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:28:08 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:28:09 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:28:10 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:28:33 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:29:14 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:29:55 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:29:56 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:29:57 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:30:28 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:30:29 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:30:31 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:30:41 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:30:54 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:31:01 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:32:09 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:32:13 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:32:37 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:32:38 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:32:40 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:32:42 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:32:56 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:32:59 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:33:54 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:34:00 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:36:49 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:36:53 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:37:16 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:37:53 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:37:54 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:37:55 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:38:16 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:39:04 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:39:06 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:39:07 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:39:35 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:39:36 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:40:19 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:40:26 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:40:59 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:41:48 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:43:07 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:43:31 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:44:48 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:45:45 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:46:31 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:46:41 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:46:43 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:46:44 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:46:45 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:46:46 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:46:47 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:47:49 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:47:59 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:48:56 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:49:31 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:52:31 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:55:30 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:56:35 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 09:59:40 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 10:02:40 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 10:05:39 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 10:08:40 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 10:11:40 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 10:14:40 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 10:17:40 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 10:20:39 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 10:23:39 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 10:26:40 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 10:29:40 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 10:32:40 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 10:35:40 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 10:38:39 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 10:41:39 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 10:44:40 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 10:47:40 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 10:50:40 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 10:53:40 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 10:56:39 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 10:59:39 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:02:40 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:05:14 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:05:14 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:05:40 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:07:31 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:08:14 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:08:38 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:08:40 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:10:17 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:11:39 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:13:20 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:14:39 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:16:20 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:17:39 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:19:20 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:20:40 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:22:20 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:23:40 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:25:20 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:26:40 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:28:20 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:29:39 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:31:20 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:32:07 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:32:39 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:34:36 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Feb 14 11:35:40 :: Query: cannot find CREATE TABLE `player ` 
SYSERR: Nov 18 17:41:34 :: pid_init: 
Start of pid: 922

SYSERR: Nov 18 17:54:04 :: hupsig: SIGHUP, SIGINT, SIGTERM signal has been received. shutting down.
SYSERR: Nov 18 17:54:04 :: pid_deinit: 
End of pid

SYSERR: Nov 18 17:55:13 :: pid_init: 
Start of pid: 913

SYSERR: Nov 18 18:04:42 :: hupsig: SIGHUP, SIGINT, SIGTERM signal has been received. shutting down.
SYSERR: Nov 18 18:04:42 :: pid_deinit: 
End of pid

SYSERR: Nov 18 18:05:29 :: pid_init: 
Start of pid: 906

SYSERR: Nov 18 18:05:29 :: Start: TABLE_POSTFIX not configured use default
SYSERR: Nov 18 18:08:25 :: hupsig: SIGHUP, SIGINT, SIGTERM signal has been received. shutting down.
SYSERR: Nov 18 18:08:25 :: pid_deinit: 
End of pid

SYSERR: Nov 18 18:10:12 :: pid_init: 
Start of pid: 905
Syserr -Auth

Cod: Selectaţi tot

SYSERR: Feb 14 00:34:06 :: pid_init: 
Start of pid: 3995

SYSERR: Feb 14 00:34:06 :: main: Failed to Load ClientPackageCryptInfo File(package/)
SYSERR: Feb 14 00:44:34 :: pid_init: 
Start of pid: 4037

SYSERR: Feb 14 00:44:34 :: main: Failed to Load ClientPackageCryptInfo File(package/)
SYSERR: Nov 18 17:41:38 :: pid_init: 
Start of pid: 926

SYSERR: Nov 18 17:41:38 :: main: Failed to Load ClientPackageCryptInfo File(package/)
SYSERR: Nov 18 17:54:04 :: hupsig: SIGHUP, SIGINT, SIGTERM signal has been received. shutting down.
SYSERR: Nov 18 17:54:04 :: pid_deinit: 
End of pid

SYSERR: Nov 18 17:55:17 :: pid_init: 
Start of pid: 916

SYSERR: Nov 18 17:55:17 :: main: Failed to Load ClientPackageCryptInfo File(package/)
SYSERR: Nov 18 18:04:42 :: hupsig: SIGHUP, SIGINT, SIGTERM signal has been received. shutting down.
SYSERR: Nov 18 18:04:42 :: pid_deinit: 
End of pid

SYSERR: Nov 18 18:05:33 :: pid_init: 
Start of pid: 909

SYSERR: Nov 18 18:05:33 :: main: Failed to Load ClientPackageCryptInfo File(package/)
SYSERR: Nov 18 18:08:25 :: hupsig: SIGHUP, SIGINT, SIGTERM signal has been received. shutting down.
SYSERR: Nov 18 18:08:25 :: pid_deinit: 
End of pid

SYSERR: Nov 18 18:10:16 :: pid_init: 
Start of pid: 908

SYSERR: Nov 18 18:10:16 :: main: Failed to Load ClientPackageCryptInfo File(package/)
Poză:
*Detalii suplimentare:
Ultima oară modificat 18 Noi 2021, 18:41 de către ZuZu93, modificat de 2 ori în total.
Pentru acest mesaj, ZuZu93 for the post:
Alexutzhhh11
Avatar utilizator
[HF]White
Metin Master

Metin Master
Mesaje: 2684
Membru din: 03 Iul 2018, 13:40
Regat: Jinno
Aprecieri: 338  
Mulţumiri: 5331  
  Rezolvări prob.: 13
Discord: Copiază ID
 Contact:
Medalii

foloseste pastebin pt syserr

nu ai tabelu player in navicat

Query: cannot find CREATE TABLE `player `

sau e corupt
Avatar utilizator
ZuZu93
Nivel 2

Nivel 2
Mesaje: 167
Membru din: 15 Mai 2015, 22:32
Server: Einarbos
Regat: Shinsoo
Aprecieri: 96  
Mulţumiri: 7  
Discord: Copiază ID
Medalii

[HF]White scrie: ↑18 Noi 2021, 18:37 foloseste pastebin pt syserr

nu ai tabelu player in navicat

Query: cannot find CREATE TABLE `player `

sau e corupt
De avut il am... daca e ocupat cum fac?
Avatar utilizator
None221
Nivel 2

Nivel 2
Mesaje: 242
Membru din: 30 Dec 2014, 03:34
Server: In curand
Regat: Jinno
Aprecieri: 48  
Mulţumiri: 1  
Medalii

ZuZu93 scrie: ↑18 Noi 2021, 18:42
[HF]White scrie: ↑18 Noi 2021, 18:37 foloseste pastebin pt syserr

nu ai tabelu player in navicat

Query: cannot find CREATE TABLE `player `

sau e corupt
De avut il am... daca e ocupat cum fac?
click dreapta pe tabel in navicat si pe urma EMPTY Tabel daca nu ma insel, ii poti da si un repair .
Avatar utilizator
computer1123
Nivel 1

Nivel 1
Mesaje: 81
Membru din: 20 Noi 2017, 23:07
Server: diamond
Regat: Chunjo
Aprecieri: 436  
Mulţumiri: 12  
Medalii

database player - tabelul player ...dai click dreapta pe el ..design table si sterge liniile:
part_sash
gem_next_refresh
achievement
current_achievement
has_offline_shop
offline_shop_timeout

daca nu le ai poti incerca sa ii dai permisiunule 777
Avatar utilizator
ZuZu93
Nivel 2

Nivel 2
Mesaje: 167
Membru din: 15 Mai 2015, 22:32
Server: Einarbos
Regat: Shinsoo
Aprecieri: 96  
Mulţumiri: 7  
Discord: Copiază ID
Medalii

computer1123 scrie: ↑18 Noi 2021, 19:38 database player - tabelul player ...dai click dreapta pe el ..design table si sterge liniile:
part_sash
gem_next_refresh
achievement
current_achievement
has_offline_shop
offline_shop_timeout

daca nu le ai poti incerca sa ii dai permisiunule 777
Tot nu merge
Avatar utilizator
Dex
Nivel 3

Nivel 3
Mesaje: 397
Membru din: 07 Mai 2020, 14:32
Regat: Shinsoo
Aprecieri: 137  
Mulţumiri: 486  
Discord: Copiază ID
Medalii

Posteaza-ne din sursa DB ClientManagerPlayer.cpp pe pastebin si fa un dump de la tabelul player din player.
Imagine
Afișează semnătura
Avatar utilizator
LoTTrYY
Membru Club

Membru Club
Mesaje: 363
Membru din: 13 Noi 2020, 15:31
Server: WoG2.net
Regat: Jinno
Aprecieri: 425  
Mulţumiri: 436  
 Contact:
Medalii

Click dreapta pe design , dupa mergi la option si vezi sa fie pe MyAsam si nu InnoDB
Daca doresti un server pvp clasic , cu systeme la zi si un staff matur [Adica eu :))] .. puteti incerca https://wog2.net/ . Va doresc o zi frumoasa in continuare.
Afișează semnătura
Avatar utilizator
computer1123
Nivel 1

Nivel 1
Mesaje: 81
Membru din: 20 Noi 2017, 23:07
Server: diamond
Regat: Chunjo
Aprecieri: 436  
Mulţumiri: 12  
Medalii

ZuZu93 scrie: ↑18 Noi 2021, 19:54
computer1123 scrie: ↑18 Noi 2021, 19:38 database player - tabelul player ...dai click dreapta pe el ..design table si sterge liniile:
part_sash
gem_next_refresh
achievement
current_achievement
has_offline_shop
offline_shop_timeout

daca nu le ai poti incerca sa ii dai permisiunule 777
Tot nu merge
am omis liniile :

gem_items
prestige
Avatar utilizator
ZuZu93
Nivel 2

Nivel 2
Mesaje: 167
Membru din: 15 Mai 2015, 22:32
Server: Einarbos
Regat: Shinsoo
Aprecieri: 96  
Mulţumiri: 7  
Discord: Copiază ID
Medalii

Dex scrie: ↑18 Noi 2021, 19:58 Posteaza-ne din sursa DB ClientManagerPlayer.cpp pe pastebin si fa un dump de la tabelul player din player.

Cod: Selectaţi tot

/*
 Navicat Premium Data Transfer

 Source Server         : Metin2EInarbos
 Source Server Type    : MySQL
 Source Server Version : 50562
 Source Host           : 188.212.103.185:3306
 Source Schema         : player

 Target Server Type    : MySQL
 Target Server Version : 50562
 File Encoding         : 65001

 Date: 18/11/2021 10:21:37
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for player
-- ----------------------------
DROP TABLE IF EXISTS `player`;
CREATE TABLE `player`  (
  `id` int(11) NOT NULL,
  `account_id` int(11) NOT NULL DEFAULT 0,
  `name` varchar(13) CHARACTER SET big5 COLLATE big5_chinese_ci NOT NULL DEFAULT 'NONAME',
  `job` tinyint(2) UNSIGNED NOT NULL DEFAULT 0,
  `voice` tinyint(1) UNSIGNED NOT NULL DEFAULT 0,
  `dir` tinyint(2) NOT NULL DEFAULT 0,
  `x` int(11) NOT NULL DEFAULT 0,
  `y` int(11) NOT NULL DEFAULT 0,
  `z` int(11) NOT NULL DEFAULT 0,
  `map_index` int(11) NOT NULL DEFAULT 0,
  `exit_x` int(11) NOT NULL DEFAULT 0,
  `exit_y` int(11) NOT NULL DEFAULT 0,
  `exit_map_index` int(11) NOT NULL DEFAULT 0,
  `hp` int(11) NOT NULL DEFAULT 0,
  `mp` int(11) NOT NULL DEFAULT 0,
  `stamina` smallint(6) NOT NULL DEFAULT 0,
  `random_hp` smallint(5) UNSIGNED NOT NULL DEFAULT 0,
  `random_sp` smallint(5) UNSIGNED NOT NULL DEFAULT 0,
  `playtime` int(11) NOT NULL DEFAULT 0,
  `level` tinyint(2) UNSIGNED NOT NULL DEFAULT 0,
  `level_step` tinyint(1) NOT NULL DEFAULT 0,
  `st` smallint(3) NOT NULL DEFAULT 0,
  `ht` smallint(3) NOT NULL DEFAULT 0,
  `dx` smallint(3) NOT NULL DEFAULT 0,
  `iq` smallint(3) NOT NULL DEFAULT 0,
  `exp` int(11) NOT NULL DEFAULT 0,
  `gold` bigint(255) NOT NULL DEFAULT 0,
  `gem` int(11) NOT NULL DEFAULT 0,
  `stat_point` smallint(3) NOT NULL DEFAULT 0,
  `skill_point` smallint(3) NOT NULL DEFAULT 0,
  `quickslot` tinyblob NOT NULL,
  `ip` varchar(16) CHARACTER SET big5 COLLATE big5_chinese_ci NOT NULL DEFAULT '0.0.0.0',
  `part_main` smallint(6) NOT NULL DEFAULT 0,
  `part_base` tinyint(4) NOT NULL DEFAULT 0,
  `part_hair` smallint(4) NOT NULL DEFAULT 0,
  `part_sash` smallint(4) UNSIGNED NULL DEFAULT 0,
  `skill_group` tinyint(4) NOT NULL DEFAULT 0,
  `skill_level` blob NOT NULL,
  `alignment` int(11) NOT NULL DEFAULT 0,
  `prestige` int(11) NOT NULL DEFAULT 0,
  `last_play` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `change_name` tinyint(1) NOT NULL DEFAULT 0,
  `mobile` varchar(12) CHARACTER SET big5 COLLATE big5_chinese_ci NOT NULL DEFAULT '',
  `sub_skill_point` smallint(3) NOT NULL DEFAULT 0,
  `stat_reset_count` tinyint(4) NOT NULL DEFAULT 0,
  `horse_hp` smallint(4) NOT NULL DEFAULT 0,
  `horse_stamina` smallint(4) NOT NULL DEFAULT 0,
  `horse_level` tinyint(2) UNSIGNED NOT NULL DEFAULT 0,
  `horse_hp_droptime` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `horse_riding` tinyint(1) NOT NULL DEFAULT 0,
  `horse_skill_point` smallint(3) NOT NULL DEFAULT 0,
  `gem_items` blob NOT NULL,
  `gem_next_refresh` datetime NULL DEFAULT NULL,
  `achievement` blob NULL,
  `current_achievement` int(11) NULL DEFAULT 0,
  `has_offline_shop` int(11) NULL DEFAULT 0,
  `offline_shop_timeout` int(11) NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `name`(`name`) USING BTREE,
  INDEX `account_id_idx`(`account_id`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = big5 COLLATE = big5_chinese_ci ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;

Cod: Selectaţi tot

#include "stdafx.h"

#include "ClientManager.h"

#include "Main.h"
#include "QID.h"
#include "ItemAwardManager.h"
#include "HB.h"
#include "Cache.h"

extern bool g_bHotBackup;

extern std::string g_stLocale;
extern int g_test_server;
extern int g_log;

//
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// !!!!!!!!!!! IMPORTANT !!!!!!!!!!!!
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//
// Check all SELECT syntax on item table before change this function!!!
//
bool CreateItemTableFromRes(MYSQL_RES * res, std::vector<TPlayerItem> * pVec, DWORD dwPID)
{
	if (!res)
	{
		pVec->clear();
		return true;
	}

	int rows;

	if ((rows = mysql_num_rows(res)) <= 0)	// 데이터 없음
	{
		pVec->clear();
		return true;
	}

	pVec->resize(rows);

	for (int i = 0; i < rows; ++i)
	{
		MYSQL_ROW row = mysql_fetch_row(res);
		TPlayerItem & item = pVec->at(i);

		int -cenzurat- = 0;

		// Check all SELECT syntax on item table before change this function!!!
		// Check all SELECT syntax on item table before change this function!!!
		// Check all SELECT syntax on item table before change this function!!!
		str_to_number(item.id, row[-cenzurat-++]);
		str_to_number(item.window, row[-cenzurat-++]);
		str_to_number(item.pos, row[-cenzurat-++]);
		str_to_number(item.count, row[-cenzurat-++]);
		str_to_number(item.vnum, row[-cenzurat-++]);
		str_to_number(item.alSockets[0], row[-cenzurat-++]);
		str_to_number(item.alSockets[1], row[-cenzurat-++]);
		str_to_number(item.alSockets[2], row[-cenzurat-++]);

		for (int j = 0; j < ITEM_ATTRIBUTE_MAX_NUM; j++)
		{
			str_to_number(item.aAttr[j].bType, row[-cenzurat-++]);
			str_to_number(item.aAttr[j].sValue, row[-cenzurat-++]);
		}

		item.owner		= dwPID;
	}

	return true;
}

size_t CreatePlayerSaveQuery(char * pszQuery, size_t querySize, TPlayerTable * pkTab)
{
	size_t queryLen;

	queryLen = snprintf(pszQuery, querySize,
			"UPDATE player%s SET "
			"job = %d, "
			"voice = %d, "
			"dir = %d, "
			"x = %d, "
			"y = %d, "
			"z = %d, "
			"map_index = %d, "
			"exit_x = %ld, "
			"exit_y = %ld, "
			"exit_map_index = %ld, "
			"hp = %d, "
			"mp = %d, "
			"stamina = %d, "
			"random_hp = %d, "
			"random_sp = %d, "
			"playtime = %d, "
			"level = %d, "
			"level_step = %d, "
			"st = %d, "
			"ht = %d, "
			"dx = %d, "
			"iq = %d, "
			"gold = %d, "
			"exp = %u, "
			"stat_point = %d, "
			"skill_point = %d, "
			"sub_skill_point = %d, "
			"stat_reset_count = %d, "
			"ip = '%s', "
			"part_main = %d, "
			"part_hair = %d, "
			"last_play = NOW(), "
			"skill_group = %d, "
			"alignment = %ld, "
			"horse_level = %d, "
			"horse_riding = %d, "
			"horse_hp = %d, "
			"horse_hp_droptime = %u, "
			"horse_stamina = %d, "
			"horse_skill_point = %d, "
			,
		GetTablePostfix(),
		pkTab->job,
		pkTab->voice,
		pkTab->dir,
		pkTab->x,
		pkTab->y,
		pkTab->z,
		pkTab->lMapIndex,
		pkTab->lExitX,
		pkTab->lExitY,
		pkTab->lExitMapIndex,
		pkTab->hp,
		pkTab->sp,
		pkTab->stamina,
		pkTab->sRandomHP,
		pkTab->sRandomSP,
		pkTab->playtime,
		pkTab->level,
		pkTab->level_step,
		pkTab->st,
		pkTab->ht,
		pkTab->dx,
		pkTab->iq,
		pkTab->gold,
		pkTab->exp,
		pkTab->stat_point,
		pkTab->skill_point,
		pkTab->sub_skill_point,
		pkTab->stat_reset_count,
		pkTab->ip,
		pkTab->parts[PART_MAIN],
		pkTab->parts[PART_HAIR],
		pkTab->skill_group,
		pkTab->lAlignment,
		pkTab->horse.bLevel,
		pkTab->horse.bRiding,
		pkTab->horse.sHealth,
		pkTab->horse.dwHorseHealthDropTime,
		pkTab->horse.sStamina,
		pkTab->horse_skill_point);

	// Binary 로 바꾸기 위한 임시 공간
	static char text[8192 + 1];

	CDBManager::instance().EscapeString(text, pkTab->skills, sizeof(pkTab->skills));
	queryLen += snprintf(pszQuery + queryLen, querySize - queryLen, "skill_level = '%s', ", text);

	CDBManager::instance().EscapeString(text, pkTab->quickslot, sizeof(pkTab->quickslot));
	queryLen += snprintf(pszQuery + queryLen, querySize - queryLen, "quickslot = '%s' ", text);

	queryLen += snprintf(pszQuery + queryLen, querySize - queryLen, " WHERE id=%d", pkTab->id);
	return queryLen;
}

CPlayerTableCache * CClientManager::GetPlayerCache(DWORD id)
{
	TPlayerTableCacheMap::iterator it = m_map_playerCache.find(id);

	if (it == m_map_playerCache.end())
		return NULL;

	TPlayerTable* pTable = it->second->Get(false);
	pTable->logoff_interval = GetCurrentTime() - it->second->GetLastUpdateTime();
	return it->second;
}

void CClientManager::PutPlayerCache(TPlayerTable * pNew)
{
	CPlayerTableCache * c;

	c = GetPlayerCache(pNew->id);

	if (!c)
	{
		c = new CPlayerTableCache;
		m_map_playerCache.insert(TPlayerTableCacheMap::value_type(pNew->id, c));
	}

	if (g_bHotBackup)
		PlayerHB::instance().Put(pNew->id);

	c->Put(pNew);
}

/*
 * PLAYER LOAD
 */
void CClientManager::QUERY_PLAYER_LOAD(CPeer * peer, DWORD dwHandle, TPlayerLoadPacket * packet)
{
	CPlayerTableCache * c;
	TPlayerTable * pTab;

	//
	// 한 계정에 속한 모든 캐릭터들 캐쉬처리
	//
	CLoginData * pLoginData = GetLoginDataByAID(packet->account_id);

	if (pLoginData)
	{
		for (int n = 0; n < PLAYER_PER_ACCOUNT; ++n)
			if (pLoginData->GetAccountRef().players[n].dwID != 0)
				DeleteLogoutPlayer(pLoginData->GetAccountRef().players[n].dwID);
	}

	//----------------------------------------------------------------
	// 1. 유저정보가 DBCache 에 존재 : DBCache에서
	// 2. 유저정보가 DBCache 에 없음 : DB에서
	// ---------------------------------------------------------------

	//----------------------------------
	// 1. 유저정보가 DBCache 에 존재 : DBCache에서
	//----------------------------------
	if ((c = GetPlayerCache(packet->player_id)))
	{
		CLoginData * pkLD = GetLoginDataByAID(packet->account_id);

		if (!pkLD || pkLD->IsPlay())
		{
			sys_log(0, "PLAYER_LOAD_ERROR: LoginData %p IsPlay %d", pkLD, pkLD ? pkLD->IsPlay() : 0);
			peer->EncodeHeader(HEADER_DG_PLAYER_LOAD_FAILED, dwHandle, 0);
			return;
		}

		pTab = c->Get();

		pkLD->SetPlay(true);
		SendLoginToBilling(pkLD, true);
		thecore_memcpy(pTab->aiPremiumTimes, pkLD->GetPremiumPtr(), sizeof(pTab->aiPremiumTimes));

		peer->EncodeHeader(HEADER_DG_PLAYER_LOAD_SUCCESS, dwHandle, sizeof(TPlayerTable));
		peer->Encode(pTab, sizeof(TPlayerTable));

		if (packet->player_id != pkLD->GetLastPlayerID())
		{
			TPacketNeedLoginLogInfo logInfo;
			logInfo.dwPlayerID = packet->player_id;

			pkLD->SetLastPlayerID( packet->player_id );

			peer->EncodeHeader( HEADER_DG_NEED_LOGIN_LOG, dwHandle, sizeof(TPacketNeedLoginLogInfo) );
			peer->Encode( &logInfo, sizeof(TPacketNeedLoginLogInfo) );
		}

		char szQuery[1024] = { 0, };

		TItemCacheSet * pSet = GetItemCacheSet(pTab->id);

		sys_log(0, "[PLAYER_LOAD] ID %s pid %d gold %d ", pTab->name, pTab->id, pTab->gold);

		//--------------------------------------------
		// 아이템 & AFFECT & QUEST 로딩 :
		//--------------------------------------------
		// 1) 아이템이 DBCache 에 존재 : DBCache 에서 가져옴
		// 2) 아이템이 DBCache 에 없음 : DB 에서 가져옴

		/////////////////////////////////////////////
		// 1) 아이템이 DBCache 에 존재 : DBCache 에서 가져옴
		/////////////////////////////////////////////
		if (pSet)
		{
			static std::vector<TPlayerItem> s_items;
			s_items.resize(pSet->size());

			DWORD dwCount = 0;
			TItemCacheSet::iterator it = pSet->begin();

			while (it != pSet->end())
			{
				CItemCache * c = *it++;
				TPlayerItem * p = c->Get();

				if (p->vnum) // vnum이 없으면 삭제된 아이템이다.
					thecore_memcpy(&s_items[dwCount++], p, sizeof(TPlayerItem));
			}

			if (g_test_server)
				sys_log(0, "ITEM_CACHE: HIT! %s count: %u", pTab->name, dwCount);

			peer->EncodeHeader(HEADER_DG_ITEM_LOAD, dwHandle, sizeof(DWORD) + sizeof(TPlayerItem) * dwCount);
			peer->EncodeDWORD(dwCount);

			if (dwCount)
				peer->Encode(&s_items[0], sizeof(TPlayerItem) * dwCount);

			// Quest
			snprintf(szQuery, sizeof(szQuery),
					"SELECT dwPID,szName,szState,lValue FROM quest%s WHERE dwPID=%d AND lValue<>0",
					GetTablePostfix(), pTab->id);

			CDBManager::instance().ReturnQuery(szQuery, QID_QUEST, peer->GetHandle(), new ClientHandleInfo(dwHandle,0,packet->account_id));

			// Affect
			snprintf(szQuery, sizeof(szQuery),
					"SELECT dwPID,bType,bApplyOn,lApplyValue,dwFlag,lDuration,lSPCost FROM affect%s WHERE dwPID=%d",
					GetTablePostfix(), pTab->id);
			// @fixme402 ClientHandleInfo+pTab->id
			CDBManager::instance().ReturnQuery(szQuery, QID_AFFECT, peer->GetHandle(), new ClientHandleInfo(dwHandle, pTab->id));
		}
		/////////////////////////////////////////////
		// 2) 아이템이 DBCache 에 없음 : DB 에서 가져옴
		/////////////////////////////////////////////
		else
		{
			snprintf(szQuery, sizeof(szQuery),
					"SELECT id,window+0,pos,count,vnum,socket0,socket1,socket2,attrtype0,attrvalue0,attrtype1,attrvalue1,attrtype2,attrvalue2,attrtype3,attrvalue3,attrtype4,attrvalue4,attrtype5,attrvalue5,attrtype6,attrvalue6 "
					"FROM item%s WHERE owner_id=%d AND (window < %d or window = %d)",
					GetTablePostfix(), pTab->id, SAFEBOX, DRAGON_SOUL_INVENTORY);

			CDBManager::instance().ReturnQuery(szQuery,
					QID_ITEM,
					peer->GetHandle(),
					new ClientHandleInfo(dwHandle, pTab->id));
			snprintf(szQuery, sizeof(szQuery),
					"SELECT dwPID, szName, szState, lValue FROM quest%s WHERE dwPID=%d",
					GetTablePostfix(), pTab->id);

			CDBManager::instance().ReturnQuery(szQuery,
					QID_QUEST,
					peer->GetHandle(),
					new ClientHandleInfo(dwHandle, pTab->id));
			snprintf(szQuery, sizeof(szQuery),
					"SELECT dwPID, bType, bApplyOn, lApplyValue, dwFlag, lDuration, lSPCost FROM affect%s WHERE dwPID=%d",
					GetTablePostfix(), pTab->id);

			CDBManager::instance().ReturnQuery(szQuery,
					QID_AFFECT,
					peer->GetHandle(),
					new ClientHandleInfo(dwHandle, pTab->id));
		}
		//ljw
		//return;
	}
	//----------------------------------
	// 2. 유저정보가 DBCache 에 없음 : DB에서
	//----------------------------------
	else
	{
		sys_log(0, "[PLAYER_LOAD] Load from PlayerDB pid[%d]", packet->player_id);

		char queryStr[QUERY_MAX_LEN];

		//--------------------------------------------------------------
		// 캐릭터 정보 얻어오기 : 무조건 DB에서
		//--------------------------------------------------------------
		snprintf(queryStr, sizeof(queryStr),
				"SELECT "
				"id,name,job,voice,dir,x,y,z,map_index,exit_x,exit_y,exit_map_index,hp,mp,stamina,random_hp,random_sp,playtime,"
				"gold,level,level_step,st,ht,dx,iq,exp,"
				"stat_point,skill_point,sub_skill_point,stat_reset_count,part_base,part_hair,"
				"skill_level,quickslot,skill_group,alignment,mobile,horse_level,horse_riding,horse_hp,horse_hp_droptime,horse_stamina,"
				"UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(last_play),horse_skill_point FROM player%s WHERE id=%d",
				GetTablePostfix(), packet->player_id);

		ClientHandleInfo * pkInfo = new ClientHandleInfo(dwHandle, packet->player_id);
		pkInfo->account_id = packet->account_id;
		CDBManager::instance().ReturnQuery(queryStr, QID_PLAYER, peer->GetHandle(), pkInfo);

		//--------------------------------------------------------------
		// 아이템 가져오기
		//--------------------------------------------------------------
		snprintf(queryStr, sizeof(queryStr),
				"SELECT id,window+0,pos,count,vnum,socket0,socket1,socket2,attrtype0,attrvalue0,attrtype1,attrvalue1,attrtype2,attrvalue2,attrtype3,attrvalue3,attrtype4,attrvalue4,attrtype5,attrvalue5,attrtype6,attrvalue6 "
				"FROM item%s WHERE owner_id=%d AND (window < %d or window = %d)",
				GetTablePostfix(), packet->player_id, SAFEBOX, DRAGON_SOUL_INVENTORY);
		CDBManager::instance().ReturnQuery(queryStr, QID_ITEM, peer->GetHandle(), new ClientHandleInfo(dwHandle, packet->player_id));

		//--------------------------------------------------------------
		// QUEST 가져오기
		//--------------------------------------------------------------
		snprintf(queryStr, sizeof(queryStr),
				"SELECT dwPID,szName,szState,lValue FROM quest%s WHERE dwPID=%d",
				GetTablePostfix(), packet->player_id);
		CDBManager::instance().ReturnQuery(queryStr, QID_QUEST, peer->GetHandle(), new ClientHandleInfo(dwHandle, packet->player_id,packet->account_id));
		//독일 선물 기능에서 item_award테이블에서 login 정보를 얻기위해 account id도 넘겨준다
		//--------------------------------------------------------------
		// AFFECT 가져오기
		//--------------------------------------------------------------
		snprintf(queryStr, sizeof(queryStr),
				"SELECT dwPID,bType,bApplyOn,lApplyValue,dwFlag,lDuration,lSPCost FROM affect%s WHERE dwPID=%d",
				GetTablePostfix(), packet->player_id);
		CDBManager::instance().ReturnQuery(queryStr, QID_AFFECT, peer->GetHandle(), new ClientHandleInfo(dwHandle, packet->player_id));
	}


}
void CClientManager::ItemAward(CPeer * peer,char* login)
{
	char login_t[LOGIN_MAX_LEN + 1] = "";
	strlcpy(login_t,login,LOGIN_MAX_LEN + 1);
	std::set<TItemAward *> * pSet = ItemAwardManager::instance().GetByLogin(login_t);
	if(pSet == NULL)
		return;
	typeof(pSet->begin()) it = pSet->begin();	//taken_time이 NULL인것들 읽어옴
	while(it != pSet->end() )
	{
		TItemAward * pItemAward = *(it++);
		char* whyStr = pItemAward->szWhy;	//why 콜룸 읽기
		char cmdStr[100] = "";	//why콜룸에서 읽은 값을 임시 문자열에 복사해둠
		strcpy(cmdStr,whyStr);	//명령어 얻는 과정에서 토큰쓰면 원본도 토큰화 되기 때문
		char command[20] = "";
		// @fixme203 directly GetCommand instead of strcpy
		GetCommand(cmdStr, command);			// command 얻기
		if( !(strcmp(command,"GIFT") ))	// command 가 GIFT이면
		{
			TPacketItemAwardInfromer giftData;
			strcpy(giftData.login, pItemAward->szLogin);	//로그인 아이디 복사
			strcpy(giftData.command, command);					//명령어 복사
			giftData.vnum = pItemAward->dwVnum;				//아이템 vnum도 복사
			ForwardPacket(HEADER_DG_ITEMAWARD_INFORMER,&giftData,sizeof(TPacketItemAwardInfromer));
		}
	}
}
char* CClientManager::GetCommand(char* str, char* command) // @fixme203
{
	char* tok;

	if( str[0] == '[' )
	{
		tok = strtok(str,"]");
		strcat(command,&tok[1]);
	}

	return command;
}

bool CreatePlayerTableFromRes(MYSQL_RES * res, TPlayerTable * pkTab)
{
	if (mysql_num_rows(res) == 0)	// 데이터 없음
		return false;

	memset(pkTab, 0, sizeof(TPlayerTable));

	MYSQL_ROW row = mysql_fetch_row(res);

	int	col = 0;

	// "id,name,job,voice,dir,x,y,z,map_index,exit_x,exit_y,exit_map_index,hp,mp,stamina,random_hp,random_sp,playtime,"
	// "gold,level,level_step,st,ht,dx,iq,exp,"
	// "stat_point,skill_point,sub_skill_point,stat_reset_count,part_base,part_hair,"
	// "skill_level,quickslot,skill_group,alignment,mobile,horse_level,horse_riding,horse_hp,horse_stamina FROM player%s WHERE id=%d",
	str_to_number(pkTab->id, row[col++]);
	strlcpy(pkTab->name, row[col++], sizeof(pkTab->name));
	str_to_number(pkTab->job, row[col++]);
	str_to_number(pkTab->voice, row[col++]);
	str_to_number(pkTab->dir, row[col++]);
	str_to_number(pkTab->x, row[col++]);
	str_to_number(pkTab->y, row[col++]);
	str_to_number(pkTab->z, row[col++]);
	str_to_number(pkTab->lMapIndex, row[col++]);
	str_to_number(pkTab->lExitX, row[col++]);
	str_to_number(pkTab->lExitY, row[col++]);
	str_to_number(pkTab->lExitMapIndex,  row[col++]);
	str_to_number(pkTab->hp, row[col++]);
	str_to_number(pkTab->sp, row[col++]);
	str_to_number(pkTab->stamina, row[col++]);
	str_to_number(pkTab->sRandomHP, row[col++]);
	str_to_number(pkTab->sRandomSP, row[col++]);
	str_to_number(pkTab->playtime, row[col++]);
	str_to_number(pkTab->gold, row[col++]);
	str_to_number(pkTab->level, row[col++]);
	str_to_number(pkTab->level_step, row[col++]);
	str_to_number(pkTab->st, row[col++]);
	str_to_number(pkTab->ht, row[col++]);
	str_to_number(pkTab->dx, row[col++]);
	str_to_number(pkTab->iq, row[col++]);
	str_to_number(pkTab->exp, row[col++]);
	str_to_number(pkTab->stat_point, row[col++]);
	str_to_number(pkTab->skill_point, row[col++]);
	str_to_number(pkTab->sub_skill_point, row[col++]);
	str_to_number(pkTab->stat_reset_count, row[col++]);
	str_to_number(pkTab->part_base, row[col++]);
	str_to_number(pkTab->parts[PART_HAIR], row[col++]);

	if (row[col])
		thecore_memcpy(pkTab->skills, row[col], sizeof(pkTab->skills));
	else
		memset(&pkTab->skills, 0, sizeof(pkTab->skills));

	col++;

	if (row[col])
		thecore_memcpy(pkTab->quickslot, row[col], sizeof(pkTab->quickslot));
	else
		memset(pkTab->quickslot, 0, sizeof(pkTab->quickslot));

	col++;

	str_to_number(pkTab->skill_group, row[col++]);
	str_to_number(pkTab->lAlignment, row[col++]);

	if (row[col])
	{
		strlcpy(pkTab->szMobile, row[col], sizeof(pkTab->szMobile));
	}

	col++;

	str_to_number(pkTab->horse.bLevel, row[col++]);
	str_to_number(pkTab->horse.bRiding, row[col++]);
	str_to_number(pkTab->horse.sHealth, row[col++]);
	str_to_number(pkTab->horse.dwHorseHealthDropTime, row[col++]);
	str_to_number(pkTab->horse.sStamina, row[col++]);
	str_to_number(pkTab->logoff_interval, row[col++]);
	str_to_number(pkTab->horse_skill_point, row[col++]);

	// reset sub_skill_point
	{
		pkTab->skills[123].bLevel = 0; // SKILL_CREATE

		if (pkTab->level > 9)
		{
			int max_point = pkTab->level - 9;

			int skill_point =
				MIN(20, pkTab->skills[121].bLevel) +	// SKILL_LEADERSHIP			통솔력
				MIN(20, pkTab->skills[124].bLevel) +	// SKILL_MINING				채광
				MIN(10, pkTab->skills[131].bLevel) +	// SKILL_HORSE_SUMMON		말소환
				MIN(20, pkTab->skills[141].bLevel) +	// SKILL_ADD_HP				HP보강
				MIN(20, pkTab->skills[142].bLevel);		// SKILL_RESIST_PENETRATE	관통저항

			pkTab->sub_skill_point = max_point - skill_point;
		}
		else
			pkTab->sub_skill_point = 0;
	}

	return true;
}

void CClientManager::RESULT_COMPOSITE_PLAYER(CPeer * peer, SQLMsg * pMsg, DWORD dwQID)
{
	CQueryInfo * qi = (CQueryInfo *) pMsg->pvUserData;
	std::auto_ptr<ClientHandleInfo> info((ClientHandleInfo *) qi->pvData);

	MYSQL_RES * pSQLResult = pMsg->Get()->pSQLResult;
	if (!pSQLResult)
	{
		sys_err("null MYSQL_RES QID %u", dwQID);
		return;
	}

	switch (dwQID)
	{
		case QID_PLAYER:
			sys_log(0, "QID_PLAYER %u %u", info->dwHandle, info->player_id);
			RESULT_PLAYER_LOAD(peer, pSQLResult, info.get());

			break;

		case QID_ITEM:
			sys_log(0, "QID_ITEM %u", info->dwHandle);
			RESULT_ITEM_LOAD(peer, pSQLResult, info->dwHandle, info->player_id);
			break;

		case QID_QUEST:
			{
				sys_log(0, "QID_QUEST %u", info->dwHandle);
				RESULT_QUEST_LOAD(peer, pSQLResult, info->dwHandle, info->player_id);
				//aid얻기
				ClientHandleInfo*  temp1 = info.get();
				if (temp1 == NULL)
					break;

				CLoginData* pLoginData1 = GetLoginDataByAID(temp1->account_id);	//
				//독일 선물 기능
				if( pLoginData1->GetAccountRef().login == NULL)
					break;
				if( pLoginData1 == NULL )
					break;
				sys_log(0,"info of pLoginData1 before call ItemAwardfunction %d",pLoginData1);
				ItemAward(peer,pLoginData1->GetAccountRef().login);
			}
			break;

		case QID_AFFECT:
			sys_log(0, "QID_AFFECT %u", info->dwHandle);
			// @fixme402 RESULT_AFFECT_LOAD+info->player_id
			RESULT_AFFECT_LOAD(peer, pSQLResult, info->dwHandle, info->player_id);
			break;
			/*
			   case QID_PLAYER_ITEM_QUEST_AFFECT:
			   sys_log(0, "QID_PLAYER_ITEM_QUEST_AFFECT %u", info->dwHandle);
			   RESULT_PLAYER_LOAD(peer, pSQLResult, info->dwHandle);

			   if (!pMsg->Next())
			   {
			   sys_err("RESULT_COMPOSITE_PLAYER: QID_PLAYER_ITEM_QUEST_AFFECT: ITEM FAILED");
			   return;
			   }

			   case QID_ITEM_QUEST_AFFECT:
			   sys_log(0, "QID_ITEM_QUEST_AFFECT %u", info->dwHandle);
			   RESULT_ITEM_LOAD(peer, pSQLResult, info->dwHandle, info->player_id);

			   if (!pMsg->Next())
			   {
			   sys_err("RESULT_COMPOSITE_PLAYER: QID_PLAYER_ITEM_QUEST_AFFECT: QUEST FAILED");
			   return;
			   }

			   case QID_QUEST_AFFECT:
			   sys_log(0, "QID_QUEST_AFFECT %u", info->dwHandle);
			   RESULT_QUEST_LOAD(peer, pSQLResult, info->dwHandle);

			   if (!pMsg->Next())
			   sys_err("RESULT_COMPOSITE_PLAYER: QID_PLAYER_ITEM_QUEST_AFFECT: AFFECT FAILED");
			   else
			   RESULT_AFFECT_LOAD(peer, pSQLResult, info->dwHandle);

			   break;
			   */
	}

}

void CClientManager::RESULT_PLAYER_LOAD(CPeer * peer, MYSQL_RES * pRes, ClientHandleInfo * pkInfo)
{
	TPlayerTable tab;

	if (!CreatePlayerTableFromRes(pRes, &tab))
	{
		peer->EncodeHeader(HEADER_DG_PLAYER_LOAD_FAILED, pkInfo->dwHandle, 0);
		return;
	}

	CLoginData * pkLD = GetLoginDataByAID(pkInfo->account_id);

	if (!pkLD || pkLD->IsPlay())
	{
		sys_log(0, "PLAYER_LOAD_ERROR: LoginData %p IsPlay %d", pkLD, pkLD ? pkLD->IsPlay() : 0);
		peer->EncodeHeader(HEADER_DG_PLAYER_LOAD_FAILED, pkInfo->dwHandle, 0);
		return;
	}

	pkLD->SetPlay(true);
	SendLoginToBilling(pkLD, true);
	thecore_memcpy(tab.aiPremiumTimes, pkLD->GetPremiumPtr(), sizeof(tab.aiPremiumTimes));

	peer->EncodeHeader(HEADER_DG_PLAYER_LOAD_SUCCESS, pkInfo->dwHandle, sizeof(TPlayerTable));
	peer->Encode(&tab, sizeof(TPlayerTable));

	if (tab.id != pkLD->GetLastPlayerID())
	{
		TPacketNeedLoginLogInfo logInfo;
		logInfo.dwPlayerID = tab.id;

		pkLD->SetLastPlayerID( tab.id );

		peer->EncodeHeader( HEADER_DG_NEED_LOGIN_LOG, pkInfo->dwHandle, sizeof(TPacketNeedLoginLogInfo) );
		peer->Encode( &logInfo, sizeof(TPacketNeedLoginLogInfo) );
	}
}

void CClientManager::RESULT_ITEM_LOAD(CPeer * peer, MYSQL_RES * pRes, DWORD dwHandle, DWORD dwPID)
{
	static std::vector<TPlayerItem> s_items;
	//DB에서 아이템 정보를 읽어온다.
	CreateItemTableFromRes(pRes, &s_items, dwPID);
	DWORD dwCount = s_items.size();

	peer->EncodeHeader(HEADER_DG_ITEM_LOAD, dwHandle, sizeof(DWORD) + sizeof(TPlayerItem) * dwCount);
	peer->EncodeDWORD(dwCount);

	//CacheSet을 만든다
	CreateItemCacheSet(dwPID);

	// ITEM_LOAD_LOG_ATTACH_PID
	sys_log(0, "ITEM_LOAD: count %u pid %u", dwCount, dwPID);
	// END_OF_ITEM_LOAD_LOG_ATTACH_PID

	if (dwCount)
	{
		peer->Encode(&s_items[0], sizeof(TPlayerItem) * dwCount);

		for (DWORD i = 0; i < dwCount; ++i)
			PutItemCache(&s_items[i], true); // 로드한 것은 따로 저장할 필요 없으므로, 인자 bSkipQuery에 true를 넣는다.
	}
}

// @fixme402 (RESULT_AFFECT_LOAD +dwRealPID)
void CClientManager::RESULT_AFFECT_LOAD(CPeer * peer, MYSQL_RES * pRes, DWORD dwHandle, DWORD dwRealPID)
{
	int iNumRows;

	if ((iNumRows = mysql_num_rows(pRes)) == 0) // 데이터 없음
	{
		// @fixme402 begin
		static DWORD dwPID;
		static DWORD dwCount = 0; //1;
		static TPacketAffectElement paeTable = {0};

		dwPID = dwRealPID;
		sys_log(0, "AFFECT_LOAD: count %u PID %u RealPID %u", dwCount, dwPID, dwRealPID);

		peer->EncodeHeader(HEADER_DG_AFFECT_LOAD, dwHandle, sizeof(DWORD) + sizeof(DWORD) + sizeof(TPacketAffectElement) * dwCount);
		peer->Encode(&dwPID, sizeof(DWORD));
		peer->Encode(&dwCount, sizeof(DWORD));
		peer->Encode(&paeTable, sizeof(TPacketAffectElement) * dwCount);
		// @fixme402 end
		return;
	}

	static std::vector<TPacketAffectElement> s_elements;
	s_elements.resize(iNumRows);

	DWORD dwPID = 0;

	MYSQL_ROW row;

	for (int i = 0; i < iNumRows; ++i)
	{
		TPacketAffectElement & r = s_elements[i];
		row = mysql_fetch_row(pRes);

		if (dwPID == 0)
			str_to_number(dwPID, row[0]);

		str_to_number(r.dwType, row[1]);
		str_to_number(r.bApplyOn, row[2]);
		str_to_number(r.lApplyValue, row[3]);
		str_to_number(r.dwFlag, row[4]);
		str_to_number(r.lDuration, row[5]);
		str_to_number(r.lSPCost, row[6]);
	}

	sys_log(0, "AFFECT_LOAD: count %d PID %u", s_elements.size(), dwPID);

	DWORD dwCount = s_elements.size();

	peer->EncodeHeader(HEADER_DG_AFFECT_LOAD, dwHandle, sizeof(DWORD) + sizeof(DWORD) + sizeof(TPacketAffectElement) * dwCount);
	peer->Encode(&dwPID, sizeof(DWORD));
	peer->Encode(&dwCount, sizeof(DWORD));
	peer->Encode(&s_elements[0], sizeof(TPacketAffectElement) * dwCount);
}

void CClientManager::RESULT_QUEST_LOAD(CPeer * peer, MYSQL_RES * pRes, DWORD dwHandle, DWORD pid)
{
	int iNumRows;

	if ((iNumRows = mysql_num_rows(pRes)) == 0)
	{
		DWORD dwCount = 0;
		peer->EncodeHeader(HEADER_DG_QUEST_LOAD, dwHandle, sizeof(DWORD));
		peer->Encode(&dwCount, sizeof(DWORD));
		return;
	}

	static std::vector<TQuestTable> s_table;
	s_table.resize(iNumRows);

	MYSQL_ROW row;

	for (int i = 0; i < iNumRows; ++i)
	{
		TQuestTable & r = s_table[i];

		row = mysql_fetch_row(pRes);

		str_to_number(r.dwPID, row[0]);
		strlcpy(r.szName, row[1], sizeof(r.szName));
		strlcpy(r.szState, row[2], sizeof(r.szState));
		str_to_number(r.lValue, row[3]);
	}

	sys_log(0, "QUEST_LOAD: count %d PID %u", s_table.size(), s_table[0].dwPID);

	DWORD dwCount = s_table.size();

	peer->EncodeHeader(HEADER_DG_QUEST_LOAD, dwHandle, sizeof(DWORD) + sizeof(TQuestTable) * dwCount);
	peer->Encode(&dwCount, sizeof(DWORD));
	peer->Encode(&s_table[0], sizeof(TQuestTable) * dwCount);
}

/*
 * PLAYER SAVE
 */
void CClientManager::QUERY_PLAYER_SAVE(CPeer * peer, DWORD dwHandle, TPlayerTable * pkTab)
{
	if (g_test_server)
		sys_log(0, "PLAYER_SAVE: %s", pkTab->name);

	PutPlayerCache(pkTab);
}

typedef std::map<DWORD, time_t> time_by_id_map_t;
static time_by_id_map_t s_createTimeByAccountID;

/*
 * PLAYER CREATE
 */
void CClientManager::__QUERY_PLAYER_CREATE(CPeer *peer, DWORD dwHandle, TPlayerCreatePacket* packet)
{
	char	queryStr[QUERY_MAX_LEN];
	int		queryLen;
	int		player_id;

	// 한 계정에 X초 내로 캐릭터 생성을 할 수 없다.
	time_by_id_map_t::iterator it = s_createTimeByAccountID.find(packet->account_id);

	if (it != s_createTimeByAccountID.end())
	{
		time_t curtime = time(0);

		if (curtime - it->second < 30)
		{
			peer->EncodeHeader(HEADER_DG_PLAYER_CREATE_FAILED, dwHandle, 0);
			return;
		}
	}

	queryLen = snprintf(queryStr, sizeof(queryStr),
			"SELECT pid%u FROM player_index%s WHERE id=%d", packet->account_index + 1, GetTablePostfix(), packet->account_id);

	std::auto_ptr<SQLMsg> pMsg0(CDBManager::instance().DirectQuery(queryStr));

	if (pMsg0->Get()->uiNumRows != 0)
	{
		if (!pMsg0->Get()->pSQLResult)
		{
			peer->EncodeHeader(HEADER_DG_PLAYER_CREATE_FAILED, dwHandle, 0);
			return;
		}

		MYSQL_ROW row = mysql_fetch_row(pMsg0->Get()->pSQLResult);

		DWORD dwPID = 0; str_to_number(dwPID, row[0]);
		if (row[0] && dwPID > 0)
		{
			peer->EncodeHeader(HEADER_DG_PLAYER_CREATE_ALREADY, dwHandle, 0);
			sys_log(0, "ALREADY EXIST AccountChrIdx %d ID %d", packet->account_index, dwPID);
			return;
		}
	}
	else
	{
		peer->EncodeHeader(HEADER_DG_PLAYER_CREATE_FAILED, dwHandle, 0);
		return;
	}

	if (g_stLocale == "sjis")
		snprintf(queryStr, sizeof(queryStr),
			"SELECT COUNT(*) as count FROM player%s WHERE name='%s' collate sjis_japanese_ci",
			GetTablePostfix(), packet->player_table.name);
	else
	snprintf(queryStr, sizeof(queryStr),
			"SELECT COUNT(*) as count FROM player%s WHERE name='%s'", GetTablePostfix(), packet->player_table.name);

	std::auto_ptr<SQLMsg> pMsg1(CDBManager::instance().DirectQuery(queryStr));

	if (pMsg1->Get()->uiNumRows)
	{
		if (!pMsg1->Get()->pSQLResult)
		{
			peer->EncodeHeader(HEADER_DG_PLAYER_CREATE_FAILED, dwHandle, 0);
			return;
		}

		MYSQL_ROW row = mysql_fetch_row(pMsg1->Get()->pSQLResult);

		if (*row[0] != '0')
		{
			sys_log(0, "ALREADY EXIST name %s, row[0] %s query %s", packet->player_table.name, row[0], queryStr);
			peer->EncodeHeader(HEADER_DG_PLAYER_CREATE_ALREADY, dwHandle, 0);
			return;
		}
	}
	else
	{
		peer->EncodeHeader(HEADER_DG_PLAYER_CREATE_FAILED, dwHandle, 0);
		return;
	}

	queryLen = snprintf(queryStr, sizeof(queryStr),
			"INSERT INTO player%s "
			"(id, account_id, name, level, st, ht, dx, iq, "
			"job, voice, dir, x, y, z, "
			"hp, mp, random_hp, random_sp, stat_point, stamina, part_base, part_main, part_hair, gold, playtime, "
			"skill_level, quickslot) "
			"VALUES(0, %u, '%s', %d, %d, %d, %d, %d, "
			"%d, %d, %d, %d, %d, %d, %d, "
			"%d, %d, %d, %d, %d, %d, %d, 0, %d, 0, ",
			GetTablePostfix(),
			packet->account_id, packet->player_table.name, packet->player_table.level, packet->player_table.st, packet->player_table.ht, packet->player_table.dx, packet->player_table.iq,
			packet->player_table.job, packet->player_table.voice, packet->player_table.dir, packet->player_table.x, packet->player_table.y, packet->player_table.z,
			packet->player_table.hp, packet->player_table.sp, packet->player_table.sRandomHP, packet->player_table.sRandomSP, packet->player_table.stat_point, packet->player_table.stamina, packet->player_table.part_base, packet->player_table.part_base, packet->player_table.gold);

	sys_log(0, "PlayerCreate accountid %d name %s level %d gold %d, st %d ht %d job %d",
			packet->account_id,
			packet->player_table.name,
			packet->player_table.level,
			packet->player_table.gold,
			packet->player_table.st,
			packet->player_table.ht,
			packet->player_table.job);

	static char text[4096 + 1];

	CDBManager::instance().EscapeString(text, packet->player_table.skills, sizeof(packet->player_table.skills));
	queryLen += snprintf(queryStr + queryLen, sizeof(queryStr) - queryLen, "'%s', ", text);
	if (g_test_server)
		sys_log(0, "Create_Player queryLen[%d] TEXT[%s]", queryLen, text);

	CDBManager::instance().EscapeString(text, packet->player_table.quickslot, sizeof(packet->player_table.quickslot));
	queryLen += snprintf(queryStr + queryLen, sizeof(queryStr) - queryLen, "'%s')", text);

	std::auto_ptr<SQLMsg> pMsg2(CDBManager::instance().DirectQuery(queryStr));
	if (g_test_server)
		sys_log(0, "Create_Player queryLen[%d] TEXT[%s]", queryLen, text);

	if (pMsg2->Get()->uiAffectedRows <= 0)
	{
		peer->EncodeHeader(HEADER_DG_PLAYER_CREATE_ALREADY, dwHandle, 0);
		sys_log(0, "ALREADY EXIST3 query: %s AffectedRows %lu", queryStr, pMsg2->Get()->uiAffectedRows);
		return;
	}

	player_id = pMsg2->Get()->uiInsertID;

	snprintf(queryStr, sizeof(queryStr), "UPDATE player_index%s SET pid%d=%d WHERE id=%d",
			GetTablePostfix(), packet->account_index + 1, player_id, packet->account_id);
	std::auto_ptr<SQLMsg> pMsg3(CDBManager::instance().DirectQuery(queryStr));

	if (pMsg3->Get()->uiAffectedRows <= 0)
	{
		sys_err("QUERY_ERROR: %s", queryStr);

		snprintf(queryStr, sizeof(queryStr), "DELETE FROM player%s WHERE id=%d", GetTablePostfix(), player_id);
		CDBManager::instance().DirectQuery(queryStr);

		peer->EncodeHeader(HEADER_DG_PLAYER_CREATE_FAILED, dwHandle, 0);
		return;
	}

	TPacketDGCreateSuccess pack;
	memset(&pack, 0, sizeof(pack));

	pack.bAccountCharacterIndex = packet->account_index;

	pack.player.dwID			= player_id;
	strlcpy(pack.player.szName, packet->player_table.name, sizeof(pack.player.szName));
	pack.player.byJob			= packet->player_table.job;
	pack.player.byLevel			= 1;
	pack.player.dwPlayMinutes	= 0;
	pack.player.byST			= packet->player_table.st;
	pack.player.byHT			= packet->player_table.ht;
	pack.player.byDX 			= packet->player_table.dx;
	pack.player.byIQ			= packet->player_table.iq;
	pack.player.wMainPart		= packet->player_table.part_base;
	pack.player.x			= packet->player_table.x;
	pack.player.y			= packet->player_table.y;

	peer->EncodeHeader(HEADER_DG_PLAYER_CREATE_SUCCESS, dwHandle, sizeof(TPacketDGCreateSuccess));
	peer->Encode(&pack, sizeof(TPacketDGCreateSuccess));

	sys_log(0, "7 name %s job %d", pack.player.szName, pack.player.byJob);

	s_createTimeByAccountID[packet->account_id] = time(0);
}

/*
 * PLAYER DELETE
 */
void CClientManager::__QUERY_PLAYER_DELETE(CPeer* peer, DWORD dwHandle, TPlayerDeletePacket* packet)
{
	if (!packet->login[0] || !packet->player_id || packet->account_index >= PLAYER_PER_ACCOUNT)
		return;

	CLoginData * ld = GetLoginDataByLogin(packet->login);

	if (!ld)
	{
		peer->EncodeHeader(HEADER_DG_PLAYER_DELETE_FAILED, dwHandle, 1);
		peer->EncodeBYTE(packet->account_index);
		return;
	}

	TAccountTable & r = ld->GetAccountRef();

	// block for japan
	if (g_stLocale != "sjis")
	{
		if (!IsChinaEventServer())
		{
			if (strlen(r.social_id) < 7 || strncmp(packet->private_code, r.social_id + strlen(r.social_id) - 7, 7))
			{
				sys_log(0, "PLAYER_DELETE FAILED len(%d)", strlen(r.social_id));
				peer->EncodeHeader(HEADER_DG_PLAYER_DELETE_FAILED, dwHandle, 1);
				peer->EncodeBYTE(packet->account_index);
				return;
			}

			CPlayerTableCache * pkPlayerCache = GetPlayerCache(packet->player_id);
			if (pkPlayerCache)
			{
				TPlayerTable * pTab = pkPlayerCache->Get();

				if (pTab->level >= m_iPlayerDeleteLevelLimit)
				{
					sys_log(0, "PLAYER_DELETE FAILED LEVEL %u >= DELETE LIMIT %d", pTab->level, m_iPlayerDeleteLevelLimit);
					peer->EncodeHeader(HEADER_DG_PLAYER_DELETE_FAILED, dwHandle, 1);
					peer->EncodeBYTE(packet->account_index);
					return;
				}

				if (pTab->level < m_iPlayerDeleteLevelLimitLower)
				{
					sys_log(0, "PLAYER_DELETE FAILED LEVEL %u < DELETE LIMIT %d", pTab->level, m_iPlayerDeleteLevelLimitLower);
					peer->EncodeHeader(HEADER_DG_PLAYER_DELETE_FAILED, dwHandle, 1);
					peer->EncodeBYTE(packet->account_index);
					return;
				}
			}
		}
	}

	char szQuery[128];
	snprintf(szQuery, sizeof(szQuery), "SELECT p.id, p.level, p.name FROM player_index%s AS i, player%s AS p WHERE pid%u=%u AND pid%u=p.id",
			GetTablePostfix(), GetTablePostfix(), packet->account_index + 1, packet->player_id, packet->account_index + 1);

	ClientHandleInfo * pi = new ClientHandleInfo(dwHandle, packet->player_id);
	pi->account_index = packet->account_index;

	sys_log(0, "PLAYER_DELETE TRY: %s %d pid%d", packet->login, packet->player_id, packet->account_index + 1);
	CDBManager::instance().ReturnQuery(szQuery, QID_PLAYER_DELETE, peer->GetHandle(), pi);
}

//
// @version	05/06/10 Bang2ni - 플레이어 삭제시 가격정보 리스트 삭제 추가.
//
void CClientManager::__RESULT_PLAYER_DELETE(CPeer *peer, SQLMsg* msg)
{
	CQueryInfo * qi = (CQueryInfo *) msg->pvUserData;
	ClientHandleInfo * pi = (ClientHandleInfo *) qi->pvData;

	if (msg->Get() && msg->Get()->uiNumRows)
	{
		MYSQL_ROW row = mysql_fetch_row(msg->Get()->pSQLResult);

		DWORD dwPID = 0;
		str_to_number(dwPID, row[0]);

		int deletedLevelLimit = 0;
		str_to_number(deletedLevelLimit, row[1]);

		char szName[64];
		strlcpy(szName, row[2], sizeof(szName));

		if (deletedLevelLimit >= m_iPlayerDeleteLevelLimit && !IsChinaEventServer())
		{
			sys_log(0, "PLAYER_DELETE FAILED LEVEL %u >= DELETE LIMIT %d", deletedLevelLimit, m_iPlayerDeleteLevelLimit);
			peer->EncodeHeader(HEADER_DG_PLAYER_DELETE_FAILED, pi->dwHandle, 1);
			peer->EncodeBYTE(pi->account_index);
			return;
		}

		if (deletedLevelLimit < m_iPlayerDeleteLevelLimitLower)
		{
			sys_log(0, "PLAYER_DELETE FAILED LEVEL %u < DELETE LIMIT %d", deletedLevelLimit, m_iPlayerDeleteLevelLimitLower);
			peer->EncodeHeader(HEADER_DG_PLAYER_DELETE_FAILED, pi->dwHandle, 1);
			peer->EncodeBYTE(pi->account_index);
			return;
		}

		char queryStr[QUERY_MAX_LEN];

		snprintf(queryStr, sizeof(queryStr), "INSERT INTO player%s_deleted SELECT * FROM player%s WHERE id=%d",
				GetTablePostfix(), GetTablePostfix(), pi->player_id);
		std::auto_ptr<SQLMsg> pIns(CDBManager::instance().DirectQuery(queryStr));

		if (pIns->Get()->uiAffectedRows == 0 || pIns->Get()->uiAffectedRows == (uint32_t)-1)
		{
			sys_log(0, "PLAYER_DELETE FAILED %u CANNOT INSERT TO player%s_deleted", dwPID, GetTablePostfix());

			peer->EncodeHeader(HEADER_DG_PLAYER_DELETE_FAILED, pi->dwHandle, 1);
			peer->EncodeBYTE(pi->account_index);
			return;
		}

		// 삭제 성공
		sys_log(0, "PLAYER_DELETE SUCCESS %u", dwPID);

		char account_index_string[16];

		snprintf(account_index_string, sizeof(account_index_string), "player_id%d", m_iPlayerIDStart + pi->account_index);

		// 플레이어 테이블을 캐쉬에서 삭제한다.
		CPlayerTableCache * pkPlayerCache = GetPlayerCache(pi->player_id);

		if (pkPlayerCache)
		{
			m_map_playerCache.erase(pi->player_id);
			delete pkPlayerCache;
		}

		// 아이템들을 캐쉬에서 삭제한다.
		TItemCacheSet * pSet = GetItemCacheSet(pi->player_id);

		if (pSet)
		{
			TItemCacheSet::iterator it = pSet->begin();

			while (it != pSet->end())
			{
				CItemCache * pkItemCache = *it++;
				DeleteItemCache(pkItemCache->Get()->id);
			}

			pSet->clear();
			delete pSet;

			m_map_pkItemCacheSetPtr.erase(pi->player_id);
		}

		snprintf(queryStr, sizeof(queryStr), "UPDATE player_index%s SET pid%u=0 WHERE pid%u=%d",
				GetTablePostfix(),
				pi->account_index + 1,
				pi->account_index + 1,
				pi->player_id);

		std::auto_ptr<SQLMsg> pMsg(CDBManager::instance().DirectQuery(queryStr));

		if (pMsg->Get()->uiAffectedRows == 0 || pMsg->Get()->uiAffectedRows == (uint32_t)-1)
		{
			sys_log(0, "PLAYER_DELETE FAIL WHEN UPDATE account table");
			peer->EncodeHeader(HEADER_DG_PLAYER_DELETE_FAILED, pi->dwHandle, 1);
			peer->EncodeBYTE(pi->account_index);
			return;
		}

		snprintf(queryStr, sizeof(queryStr), "DELETE FROM player%s WHERE id=%d", GetTablePostfix(), pi->player_id);
		delete CDBManager::instance().DirectQuery(queryStr);

		snprintf(queryStr, sizeof(queryStr), "DELETE FROM item%s WHERE owner_id=%d AND (window < %d or window = %d)", GetTablePostfix(), pi->player_id, SAFEBOX, DRAGON_SOUL_INVENTORY);
		delete CDBManager::instance().DirectQuery(queryStr);

		snprintf(queryStr, sizeof(queryStr), "DELETE FROM quest%s WHERE dwPID=%d", GetTablePostfix(), pi->player_id);
		CDBManager::instance().AsyncQuery(queryStr);

		snprintf(queryStr, sizeof(queryStr), "DELETE FROM affect%s WHERE dwPID=%d", GetTablePostfix(), pi->player_id);
		CDBManager::instance().AsyncQuery(queryStr);

		snprintf(queryStr, sizeof(queryStr), "DELETE FROM guild_member%s WHERE pid=%d", GetTablePostfix(), pi->player_id);
		CDBManager::instance().AsyncQuery(queryStr);

		// MYSHOP_PRICE_LIST
		snprintf(queryStr, sizeof(queryStr), "DELETE FROM myshop_pricelist%s WHERE owner_id=%d", GetTablePostfix(), pi->player_id);
		CDBManager::instance().AsyncQuery(queryStr);
		// END_OF_MYSHOP_PRICE_LIST

		snprintf(queryStr, sizeof(queryStr), "DELETE FROM messenger_list%s WHERE account='%s' OR companion='%s'", GetTablePostfix(), szName, szName);
		CDBManager::instance().AsyncQuery(queryStr);

		peer->EncodeHeader(HEADER_DG_PLAYER_DELETE_SUCCESS, pi->dwHandle, 1);
		peer->EncodeBYTE(pi->account_index);
	}
	else
	{
		// 삭제 실패
		sys_log(0, "PLAYER_DELETE FAIL NO ROW");
		peer->EncodeHeader(HEADER_DG_PLAYER_DELETE_FAILED, pi->dwHandle, 1);
		peer->EncodeBYTE(pi->account_index);
	}
}

void CClientManager::QUERY_ADD_AFFECT(CPeer * peer, TPacketGDAddAffect * p)
{
	char queryStr[QUERY_MAX_LEN];
	/*
	   snprintf(queryStr, sizeof(queryStr),
	   "INSERT INTO affect%s (dwPID, bType, bApplyOn, lApplyValue, dwFlag, lDuration, lSPCost) "
	   "VALUES(%u, %u, %u, %d, %u, %d, %d) "
	   "ON DUPLICATE KEY UPDATE lApplyValue=%d, dwFlag=%u, lDuration=%d, lSPCost=%d",
	   GetTablePostfix(),
	   p->dwPID,
	   p->elem.dwType,
	   p->elem.bApplyOn,
	   p->elem.lApplyValue,
	   p->elem.dwFlag,
	   p->elem.lDuration,
	   p->elem.lSPCost,
	   p->elem.lApplyValue,
	   p->elem.dwFlag,
	   p->elem.lDuration,
	   p->elem.lSPCost);
	   */
	snprintf(queryStr, sizeof(queryStr),
			"REPLACE INTO affect%s (dwPID, bType, bApplyOn, lApplyValue, dwFlag, lDuration, lSPCost) "
			"VALUES(%u, %u, %u, %ld, %u, %ld, %ld)",
			GetTablePostfix(),
			p->dwPID,
			p->elem.dwType,
			p->elem.bApplyOn,
			p->elem.lApplyValue,
			p->elem.dwFlag,
			p->elem.lDuration,
			p->elem.lSPCost);

	CDBManager::instance().AsyncQuery(queryStr);
}

void CClientManager::QUERY_REMOVE_AFFECT(CPeer * peer, TPacketGDRemoveAffect * p)
{
	char queryStr[QUERY_MAX_LEN];

	snprintf(queryStr, sizeof(queryStr),
			"DELETE FROM affect%s WHERE dwPID=%u AND bType=%u AND bApplyOn=%u",
			GetTablePostfix(), p->dwPID, p->dwType, p->bApplyOn);

	CDBManager::instance().AsyncQuery(queryStr);
}


void CClientManager::QUERY_HIGHSCORE_REGISTER(CPeer* peer, TPacketGDHighscore * data)
{
	char szQuery[128];
	snprintf(szQuery, sizeof(szQuery), "SELECT value FROM highscore%s WHERE board='%s' AND pid = %u", GetTablePostfix(), data->szBoard, data->dwPID);

	sys_log(0, "HEADER_GD_HIGHSCORE_REGISTER: PID %u", data->dwPID);

	ClientHandleInfo * pi = new ClientHandleInfo(0);
	strlcpy(pi->login, data->szBoard, sizeof(pi->login));
	pi->account_id = (DWORD)data->lValue;
	pi->player_id = data->dwPID;
	pi->account_index = (data->cDir > 0);

	CDBManager::instance().ReturnQuery(szQuery, QID_HIGHSCORE_REGISTER, peer->GetHandle(), pi);
}

void CClientManager::RESULT_HIGHSCORE_REGISTER(CPeer * pkPeer, SQLMsg * msg)
{
	CQueryInfo * qi = (CQueryInfo *) msg->pvUserData;
	ClientHandleInfo * pi = (ClientHandleInfo *) qi->pvData;
	//DWORD dwHandle = pi->dwHandle;

	char szBoard[21];
	strlcpy(szBoard, pi->login, sizeof(szBoard));
	int value = (int)pi->account_id;

	SQLResult * res = msg->Get();

	if (res->uiNumRows == 0)
	{
		// 새로운 하이스코어를 삽입
		char buf[256];
		snprintf(buf, sizeof(buf), "INSERT INTO highscore%s VALUES('%s', %u, %d)", GetTablePostfix(), szBoard, pi->player_id, value);
		CDBManager::instance().AsyncQuery(buf);
	}
	else
	{
		if (!res->pSQLResult)
		{
			delete pi;
			return;
		}

		MYSQL_ROW row = mysql_fetch_row(res->pSQLResult);
		if (row && row[0])
		{
			int current_value = 0; str_to_number(current_value, row[0]);
			if (((pi->account_index)&&(current_value >= value)) || ((!pi->account_index)&&(current_value <= value)))
			{
				value = current_value;
			}
			else
			{
				char buf[256];
				snprintf(buf, sizeof(buf), "REPLACE INTO highscore%s VALUES('%s', %u, %d)", GetTablePostfix(), szBoard, pi->player_id, value);
				CDBManager::instance().AsyncQuery(buf);
			}
		}
		else
		{
			char buf[256];
			snprintf(buf, sizeof(buf), "INSERT INTO highscore%s VALUES('%s', %u, %d)", GetTablePostfix(), szBoard, pi->player_id, value);
			CDBManager::instance().AsyncQuery(buf);
		}
	}
	// TODO: 이곳에서 하이스코어가 업데이트 되었는지 체크하여 공지를 뿌려야한다.
	delete pi;
}

void CClientManager::InsertLogoutPlayer(DWORD pid)
{
	TLogoutPlayerMap::iterator it = m_map_logout.find(pid);

	// 존재하지 않을경우 추가
	if (it != m_map_logout.end())
	{
		// 존재할경우 시간만 갱신
		if (g_log)
			sys_log(0, "LOGOUT: Update player time pid(%d)", pid);

		it->second->time = time(0);
		return;
	}

	TLogoutPlayer * pLogout = new TLogoutPlayer;
	pLogout->pid = pid;
	pLogout->time = time(0);
	m_map_logout.insert(std::make_pair(pid, pLogout));

	if (g_log)
		sys_log(0, "LOGOUT: Insert player pid(%d)", pid);
}

void CClientManager::DeleteLogoutPlayer(DWORD pid)
{
	TLogoutPlayerMap::iterator it = m_map_logout.find(pid);

	if (it != m_map_logout.end())
	{
		delete it->second;
		m_map_logout.erase(it);
	}
}

extern int g_iLogoutSeconds;

void CClientManager::UpdateLogoutPlayer()
{
	time_t now = time(0);

	TLogoutPlayerMap::iterator it = m_map_logout.begin();

	while (it != m_map_logout.end())
	{
		TLogoutPlayer* pLogout = it->second;

		if (now - g_iLogoutSeconds > pLogout->time)
		{
			FlushItemCacheSet(pLogout->pid);
			FlushPlayerCacheSet(pLogout->pid);

			delete pLogout;
			m_map_logout.erase(it++);
		}
		else
			++it;
	}
}

void CClientManager::FlushPlayerCacheSet(DWORD pid)
{
	TPlayerTableCacheMap::iterator it = m_map_playerCache.find(pid);

	if (it != m_map_playerCache.end())
	{
		CPlayerTableCache * c = it->second;
		m_map_playerCache.erase(it);

		c->Flush();
		delete c;
	}
}
Închis
Răspunsuri
4
Vizualizări
461
Răspunsuri
4
Vizualizări
670
Răspunsuri
4
Vizualizări
302
Răspunsuri
1
Vizualizări
300

Înapoi la “Probleme rezolvate”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 24 vizitatori