· 7 years ago · Nov 04, 2018, 07:42 PM
1//-- 11/4/2018 -- 19:34:17 UTC ======== 11/4/2018 -- 20:34:17 Local-- yo_1.4.4.5 --
2ECHO 2018-11-04 20:34:17.703 {} <> [0] Processor Init:
3ECHO 2018-11-04 20:34:17.703 {} <> [0] Features detected: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC MTRR SEP PGE MCA CMOV PAT PSE36 CLFLUSH DTS ACPI MMX FXSR SSE SSE2 SS HT TM PBE PNI PCLMUL DTS64 MONITOR DS_CPL VMX SMX EST TM2 SSSE3 CX16 XTPR PDCM SSE4_1 SSE4_2 SYSCALL XD POPCNT AES XSAVE OSXSAVE AVX RDTSCP LM LAHF_LM CONSTANT_TSC F16C RDRAND X2APIC
4ECHO 2018-11-04 20:34:17.703 {} <> [0] GenuineIntel, Ivy Bridge (Core i5)
5ECHO 2018-11-04 20:34:17.703 {} <> [0] MP detected [4 cores, 4 logical, 1 physical]
6ECHO 2018-11-04 20:34:17.703 {} <> [0]
7ECHO 2018-11-04 20:34:17.703 {} <> [0] Intel(R) Core(TM) i5-3550 CPU @ 3.30GHz, ~3.30 Ghz
8ECHO 2018-11-04 20:34:17.703 {} <> [0] Initializing platform...
9ECHO 2018-11-04 20:34:17.703 {} <> [0] Done
10ECHO 2018-11-04 20:34:17.766 {} <> [0]
11ECHO 2018-11-04 20:34:17.766 {} <> [0] --------- Loading DIRS ---------
12INFO 2018-11-04 20:34:17.766 {} <> [0] vyo_1.4.4.5
13ECHO 2018-11-04 20:34:17.766 {} <> [0]
14ECHO 2018-11-04 20:34:17.828 {01} <onStart> [0]
15--------- Initializing Directory: scripts ---------
16ECHO 2018-11-04 20:34:17.828 {02} <initServer> [0]
17--------- Initializing LiF Server: Server Scripts ---------
18ECHO 2018-11-04 20:34:17.844 {02} <initServer> [0] Loading CmConfiguration
19ECHO 2018-11-04 20:34:17.844 {02} <initServer> [0] Init of DB interface
20INFO 2018-11-04 20:34:17.844 {03} <checkServerIdLockFile> [0] Renaming log file name from 'logs/2018-11-04/S0_SRV438_2018-11-04-20-34-17_p2852.log' to 'logs/2018-11-04/S1_SRV438_2018-11-04-20-34-17_p2852.log'...
21//-- 11/4/2018 -- 19:34:17 UTC ======== 11/4/2018 -- 20:34:17 Local-- yo_1.4.4.5 --
22INFO 2018-11-04 20:34:17.844 {03} <checkServerIdLockFile> [0] Log file name successfully renamed!
23INFO 2018-11-04 20:34:17.844 {02} <initServer> [0] WORLD_ID=1
24WARN 2018-11-04 20:34:17.844 {02} <initServer> [0] DB::RS(1 ms) SHOW DATABASES LIKE 'lif_1';
25WARN 2018-11-04 20:34:17.844 {02} <initServer> [0] DB::noRS(0 ms) USE `lif_1`;
26WARN 2018-11-04 20:34:17.984 {02} <initServer> [0] DB::mNoRS(134 ms) DROP TABLE IF EXISTS `_patch_execute_status`; CREATE TABLE `_patch_execute_status`( ^`Value` tinyint unsigned NOT NULL DEFAULT 0 ) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci; INSERT INTO `_patch_execute_status` () VALUES ();
27ECHO 2018-11-04 20:34:17.984 {02} <initServer> [0] Patching database [1/2]...
28WARN 2018-11-04 20:34:17.984 {02} <initServer> [0] DB::noRS(0 ms) USE `lif_1`;
29WARN 2018-11-04 20:34:18.000 {02} <initServer> [0] DB::mNoRS(15 ms)
30-- NOTE: do not use DELIMITER here
31-- NOTE: do not use DEFINER for stored procedures and functions here
32
33DROP PROCEDURE IF EXISTS _transferSkill;
34CREATE PROCEDURE _transferSkill(
35^IN `in_oldSkillTypeID` INT UNSIGNED,
36^IN `in_newSkillTypeID` INT UNSIGNED
37)
38BEGIN
39
40-- allocate needed skill with 0 values at first.
41-- don't use "insert ... select on duplicate key update" here - it is not so safe for replication.
42insert into skills_new (CharacterID, SkillTypeID, SkillAmount, LockStatus)
43^select c.ID, in_newSkillTypeID as SkillTypeID, 0 as newSkillAmount, 1 as newLockStatus
44^^from `character` c
45^^join skills s on s.CharacterID = c.ID
46^^where s.SkillTypeID = in_oldSkillTypeID
47^^^and !exists(select * from skills_new sn where sn.CharacterID = c.ID and sn.SkillTypeID = in_newSkillTypeID)
48^^order by c.ID;
49
50-- transfer skill values
51update skills_new sn
52^join skills s on sn.CharacterID = s.CharacterID and sn.SkillTypeID = in_newSkillTypeID and s.SkillTypeID = in_oldSkillTypeID
53^set sn.SkillAmount = (sn.SkillAmount + s.SkillAmount);
54
55-- empty old skill values
56update skills
57^set SkillAmount = 0
58^where SkillTypeID = in_oldSkillTypeID;
59
60-- allocate child skills, if our skill has value >= 30
61insert into skills_new (CharacterID, SkillTypeID, SkillAmount, LockStatus)
62^select sn.CharacterID, stn.ID, 0 as newSkillAmount, 1 as newLockStatus
63^from skill_type_new stn
64^join skills_new sn on sn.SkillTypeID = stn.Parent
65^where stn.Parent = in_newSkillTypeID
66^^and sn.SkillAmount >= 30*10000000
67^^and !exists(select * from skills_new sn2 where sn2.CharacterID = sn.CharacterID and sn2.SkillTypeID = stn.ID);
68
69-- distribute skills with value > 100 to first child skill with value < 100
70-- (we can't use ORDER BY and LIMIT in multiple-table update. Also, we can't use LIMIT in subqueries due to MariaDB compatibility reasons)
71update skills_new sn
72-- select sn.SkillAmount as oldVal, (sn.SkillAmount + (sn_base.SkillAmount - 100*10000000)) as newVal, sn.* from skills_new sn
73^join skill_type_new stn on stn.ID = sn.SkillTypeID
74^-- join skills_new sn_base on sn_base.SkillTypeID = stn.Parent and sn_base.CharacterID = sn.CharacterID -- we can't use updated table in subquery, so implicitly copy it into a temporary table
75^join (select SkillTypeID, CharacterID, SkillAmount from skills_new where SkillTypeID = in_newSkillTypeID) as sn_base
76^^on sn_base.SkillTypeID = stn.Parent and sn_base.CharacterID = sn.CharacterID
77^set sn.SkillAmount = (sn.SkillAmount + (sn_base.SkillAmount - 100*10000000))
78^where sn_base.SkillAmount > 100*10000000
79^^-- and sn.SkillAmount < 100*10000000
80^^-- and stn.Parent = 1
81^^and stn.ID in
82^^(
83^^^select min(stn2.ID)
84^^^from skill_type_new stn2
85^^^-- join skills_new sn2 on sn2.SkillTypeID = stn2.ID -- we can't use updated table in subquery, so implicitly copy it into a temporary table
86^^^join (select SkillTypeID, CharacterID, SkillAmount from skills_new where SkillAmount < 100*10000000) as sn2
87^^^^on sn2.SkillTypeID = stn2.ID
88^^^where stn2.Parent = in_newSkillTypeID
89^^^^and sn2.CharacterID = sn.CharacterID
90^^^^-- and sn2.SkillAmount < 100*10000000
91^^);
92^-- order by stn.ID
93^-- limit 1
94
95-- cap skill values at 100
96update skills_new
97^set SkillAmount = 100*10000000
98^where SkillAmount > 100*10000000;
99
100END;
101
102DROP FUNCTION IF EXISTS _getMaxSkillValue;
103CREATE FUNCTION `_getMaxSkillValue`(
104^`in_parentSkillValue` INT UNSIGNED
105)
106^RETURNS INT UNSIGNED
107BEGIN
108^declare skillAmountMult INT UNSIGNED DEFAULT 10000000;
109
110^if(in_parentSkillValue < 30*skillAmountMult) then
111^^return 0;
112^elseif(in_parentSkillValue < 60*skillAmountMult) then
113^^return (30*skillAmountMult - 1);
114^end if;
115
116^return 100*skillAmountMult;
117END;
118
119DROP PROCEDURE IF EXISTS _transferSkillStraight;
120CREATE PROCEDURE _transferSkillStraight(
121^IN `in_oldSkillTypeID` INT UNSIGNED,
122^IN `in_newSkillTypeID` INT UNSIGNED
123)
124BEGIN
125
126declare skillAmountMult INT UNSIGNED DEFAULT 10000000;
127
128-- allocate needed skill with 0 values at first.
129-- don't use "insert ... select on duplicate key update" here - it is not so safe for replication.
130insert into skills_new (CharacterID, SkillTypeID, SkillAmount, LockStatus)
131^select c.ID, in_newSkillTypeID as SkillTypeID, 0 as newSkillAmount, 1 as newLockStatus
132^^from `character` c
133^^join skills s on s.CharacterID = c.ID
134^^where s.SkillTypeID = in_oldSkillTypeID
135^^^and !exists(select * from skills_new sn where sn.CharacterID = c.ID and sn.SkillTypeID = in_newSkillTypeID)
136^^order by c.ID;
137
138-- transfer skill values
139update skills_new sn
140^join skills s
141^^on sn.CharacterID = s.CharacterID
142^^and sn.SkillTypeID = in_newSkillTypeID
143^^and s.SkillTypeID = in_oldSkillTypeID
144^set sn.SkillAmount = (sn.SkillAmount + s.SkillAmount);
145
146-- empty old skill values
147update skills
148^set SkillAmount = 0
149^where SkillTypeID = in_oldSkillTypeID;
150
151-- allocate child skills, if our skill has value >= 30
152insert into skills_new (CharacterID, SkillTypeID, SkillAmount, LockStatus)
153^select sn.CharacterID, stn.ID, 0 as newSkillAmount, 1 as newLockStatus
154^from skill_type_new stn
155^join skills_new sn on sn.SkillTypeID = stn.Parent
156^where stn.Parent = in_newSkillTypeID
157^^and sn.SkillAmount >= 30*skillAmountMult
158^^and !exists(select * from skills_new sn2 where sn2.CharacterID = sn.CharacterID and sn2.SkillTypeID = stn.ID);
159
160-- cap skill values at 100
161update skills_new
162^set SkillAmount = 100*10000000
163^where SkillAmount > 100*10000000;
164
165END;
166
167
168DROP PROCEDURE IF EXISTS _transferSkillToSkillChainLimit;
169CREATE PROCEDURE _transferSkillToSkillChainLimit(
170^IN `in_oldSkillTypeID` INT UNSIGNED,
171^IN `in_newBaseSkillTypeID` INT UNSIGNED,
172^IN `in_skillAmountLimit` INT UNSIGNED
173)
174BEGIN
175
176declare skillAmountMult INT UNSIGNED DEFAULT 10000000;
177declare skillAmountLimit INT UNSIGNED DEFAULT least(greatest(in_skillAmountLimit, 30), 100); -- clamp skill amount limit at 100
178declare newBaseSkillTypeID INT UNSIGNED DEFAULT in_newBaseSkillTypeID; -- currently used parent skill in skill chain
179
180if(in_skillAmountLimit < 30 or in_skillAmountLimit > 100) then
181^SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'in_skillAmountLimit should be between 30 and 100';
182end if;
183
184while newBaseSkillTypeID is not nu
185WARN 2018-11-04 20:34:18.000 {02} <initServer> [0] DB::RS(0 ms) SELECT `Value` FROM `_patch_execute_status` LIMIT 1;
186ERRR 2018-11-04 20:34:18.000 {02} <initServer> [0] CmServerInfoManager::_applyDbPatch() - validation of patch file execution failed
187ERRR 2018-11-04 20:34:18.000 {02} <initServer> [0] [line #1165] CmServerInfoManager::initLocalWorld() - can't access to db for world id=1
188ERRR 2018-11-04 20:34:18.000 {02} <initServer> [0] Fatal: Can't init local world (id=1). Terminating.
189quit() -- quit requested!
190ECHO 2018-11-04 20:34:18.000 {} <> [0] Engine initialized...
191ECHO 2018-11-04 20:34:18.031 {} <> [0] Thread pool initialized, threads: 3
192WARN 2018-11-04 20:34:18.031 {} <> [0] Warning - Last tick took 626 (>64) ms!
193core/scripts/server/server.cs (0): Unable to find function destroyWorld
194INFO 2018-11-04 20:34:18.031 {01} <onExit> [1] The server has been shut down!
195ECHO 2018-11-04 20:34:18.031 {} <<Thread>> [] Thread worker terminated [T:WorkerThread2:7484]
196ECHO 2018-11-04 20:34:18.031 {} <<Thread>> [] Thread worker terminated [T:WorkerThread1:4300]
197ECHO 2018-11-04 20:34:18.031 {} <<Thread>> [] Thread worker terminated [T:WorkerThread0:6748]
198ECHO 2018-11-04 20:34:18.031 {} <> [1] Thread pool shut down