Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[9246] Move more values from
data
to own fields.
Now possible (need recheck) glyphs still used form `data`. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
- Loading branch information
Showing
8 changed files
with
168 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
ALTER TABLE character_db_version CHANGE COLUMN required_9136_07_characters_characters required_9246_01_characters_character bit; | ||
|
||
ALTER TABLE characters | ||
ADD COLUMN `arenaPoints` int(10) UNSIGNED NOT NULL default '0' AFTER arena_pending_points, | ||
ADD COLUMN `totalHonorPoints` int(10) UNSIGNED NOT NULL default '0' AFTER arenaPoints, | ||
ADD COLUMN `todayHonorPoints` int(10) UNSIGNED NOT NULL default '0' AFTER totalHonorPoints, | ||
ADD COLUMN `yesterdayHonorPoints` int(10) UNSIGNED NOT NULL default '0' AFTER todayHonorPoints, | ||
ADD COLUMN `totalKills` int(10) UNSIGNED NOT NULL default '0' AFTER yesterdayHonorPoints, | ||
ADD COLUMN `todayKills` smallint(5) UNSIGNED NOT NULL default '0' AFTER totalKills, | ||
ADD COLUMN `yesterdayKills` smallint(5) UNSIGNED NOT NULL default '0' AFTER todayKills, | ||
ADD COLUMN `chosenTitle` int(10) UNSIGNED NOT NULL default '0' AFTER yesterdayKills, | ||
ADD COLUMN `knownCurrencies` bigint(20) UNSIGNED NOT NULL default '0' AFTER chosenTitle, | ||
ADD COLUMN `watchedFaction` int(10) NOT NULL default '0' AFTER knownCurrencies, | ||
ADD COLUMN `drunk` smallint(5) UNSIGNED NOT NULL default '0' AFTER watchedFaction, | ||
ADD COLUMN `health` int(10) UNSIGNED NOT NULL default '0' AFTER drunk, | ||
ADD COLUMN `power1` int(10) UNSIGNED NOT NULL default '0' AFTER health, | ||
ADD COLUMN `power2` int(10) UNSIGNED NOT NULL default '0' AFTER power1, | ||
ADD COLUMN `power3` int(10) UNSIGNED NOT NULL default '0' AFTER power2, | ||
ADD COLUMN `power4` int(10) UNSIGNED NOT NULL default '0' AFTER power3, | ||
ADD COLUMN `power5` int(10) UNSIGNED NOT NULL default '0' AFTER power4, | ||
ADD COLUMN `power6` int(10) UNSIGNED NOT NULL default '0' AFTER power5, | ||
ADD COLUMN `power7` int(10) UNSIGNED NOT NULL default '0' AFTER power6; | ||
|
||
UPDATE characters SET | ||
arenaPoints = arena_pending_points + | ||
SUBSTRING(data, length(SUBSTRING_INDEX(data, ' ', 1278))+2, length(SUBSTRING_INDEX(data, ' ', 1278+1))- length(SUBSTRING_INDEX(data, ' ', 1278)) - 1), | ||
totalHonorPoints = | ||
SUBSTRING(data, length(SUBSTRING_INDEX(data, ' ', 1277))+2, length(SUBSTRING_INDEX(data, ' ', 1277+1))- length(SUBSTRING_INDEX(data, ' ', 1277)) - 1), | ||
todayHonorPoints = | ||
SUBSTRING(data, length(SUBSTRING_INDEX(data, ' ', 1226))+2, length(SUBSTRING_INDEX(data, ' ', 1226+1))- length(SUBSTRING_INDEX(data, ' ', 1226)) - 1), | ||
yesterdayHonorPoints = | ||
SUBSTRING(data, length(SUBSTRING_INDEX(data, ' ', 1227))+2, length(SUBSTRING_INDEX(data, ' ', 1227+1))- length(SUBSTRING_INDEX(data, ' ', 1227)) - 1), | ||
totalKills = | ||
SUBSTRING(data, length(SUBSTRING_INDEX(data, ' ', 1228))+2, length(SUBSTRING_INDEX(data, ' ', 1228+1))- length(SUBSTRING_INDEX(data, ' ', 1228)) - 1), | ||
todayKills = | ||
SUBSTRING(data, length(SUBSTRING_INDEX(data, ' ', 1225))+2, length(SUBSTRING_INDEX(data, ' ', 1225+1))- length(SUBSTRING_INDEX(data, ' ', 1225)) - 1) & 0x0000FFFF, | ||
yesterdayKills = | ||
(SUBSTRING(data, length(SUBSTRING_INDEX(data, ' ', 1225))+2, length(SUBSTRING_INDEX(data, ' ', 1225+1))- length(SUBSTRING_INDEX(data, ' ', 1225)) - 1) & 0xFFFF0000) >> 16, | ||
chosenTitle = | ||
SUBSTRING(data, length(SUBSTRING_INDEX(data, ' ', 321))+2, length(SUBSTRING_INDEX(data, ' ', 321+1))- length(SUBSTRING_INDEX(data, ' ', 321)) - 1), | ||
knownCurrencies = | ||
SUBSTRING(data, length(SUBSTRING_INDEX(data, ' ', 632))+2, length(SUBSTRING_INDEX(data, ' ', 632+1))- length(SUBSTRING_INDEX(data, ' ', 632)) - 1), | ||
watchedFaction = | ||
SUBSTRING(data, length(SUBSTRING_INDEX(data, ' ', 1230))+2, length(SUBSTRING_INDEX(data, ' ', 1230+1))- length(SUBSTRING_INDEX(data, ' ', 1230)) - 1), | ||
drunk = | ||
SUBSTRING(data, length(SUBSTRING_INDEX(data, ' ', 155))+2, length(SUBSTRING_INDEX(data, ' ', 155+1))- length(SUBSTRING_INDEX(data, ' ', 155)) - 1) & 0xFFFE, | ||
health = | ||
SUBSTRING(data, length(SUBSTRING_INDEX(data, ' ', 23))+2, length(SUBSTRING_INDEX(data, ' ', 23+1))- length(SUBSTRING_INDEX(data, ' ', 23)) - 1), | ||
power1 = | ||
SUBSTRING(data, length(SUBSTRING_INDEX(data, ' ', 24))+2, length(SUBSTRING_INDEX(data, ' ', 24+1))- length(SUBSTRING_INDEX(data, ' ', 24)) - 1), | ||
power2 = | ||
SUBSTRING(data, length(SUBSTRING_INDEX(data, ' ', 25))+2, length(SUBSTRING_INDEX(data, ' ', 25+1))- length(SUBSTRING_INDEX(data, ' ', 25)) - 1), | ||
power3 = | ||
SUBSTRING(data, length(SUBSTRING_INDEX(data, ' ', 26))+2, length(SUBSTRING_INDEX(data, ' ', 26+1))- length(SUBSTRING_INDEX(data, ' ', 26)) - 1), | ||
power4 = | ||
SUBSTRING(data, length(SUBSTRING_INDEX(data, ' ', 27))+2, length(SUBSTRING_INDEX(data, ' ', 27+1))- length(SUBSTRING_INDEX(data, ' ', 27)) - 1), | ||
power5 = | ||
SUBSTRING(data, length(SUBSTRING_INDEX(data, ' ', 28))+2, length(SUBSTRING_INDEX(data, ' ', 28+1))- length(SUBSTRING_INDEX(data, ' ', 28)) - 1), | ||
power6 = | ||
SUBSTRING(data, length(SUBSTRING_INDEX(data, ' ', 29))+2, length(SUBSTRING_INDEX(data, ' ', 29+1))- length(SUBSTRING_INDEX(data, ' ', 29)) - 1), | ||
power7 = | ||
SUBSTRING(data, length(SUBSTRING_INDEX(data, ' ', 30))+2, length(SUBSTRING_INDEX(data, ' ', 30+1))- length(SUBSTRING_INDEX(data, ' ', 30)) - 1); | ||
|
||
ALTER TABLE characters | ||
DROP COLUMN arena_pending_points; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#ifndef __REVISION_NR_H__ | ||
#define __REVISION_NR_H__ | ||
#define REVISION_NR "9245" | ||
#define REVISION_NR "9246" | ||
#endif // __REVISION_NR_H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#ifndef __REVISION_SQL_H__ | ||
#define __REVISION_SQL_H__ | ||
#define REVISION_DB_CHARACTERS "required_9136_07_characters_characters" | ||
#define REVISION_DB_CHARACTERS "required_9246_01_characters_character" | ||
#define REVISION_DB_MANGOS "required_9244_02_mangos_spell_chain" | ||
#define REVISION_DB_REALMD "required_9010_01_realmd_realmlist" | ||
#endif // __REVISION_SQL_H__ |
fff1d17
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please explain, you are trying to export all info from field
data
and create separate tables, and the goal is to remove fielddata
?fff1d17
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, goal is remove data field and then resolve need have this crazy client version switch converters.
Ofc, some convertion will still need anyway, nit just because added 3 new '0' values in to middle of
data
.