Skip to content

Commit

Permalink
Display most recently used character as selected upon login. (ACEmula…
Browse files Browse the repository at this point in the history
  • Loading branch information
OptimShi authored and Mogwai-TheFurry committed Apr 27, 2017
1 parent b8c421f commit 5355361
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 36 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE `character` CHANGE `birth` `lastUpdate` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
72 changes: 38 additions & 34 deletions Database/Updates/Character/updates.txt
Original file line number Diff line number Diff line change
@@ -1,34 +1,38 @@
2/3/2017
--------
- Added four new tables - character_appearance, character_stats, character_skills and character_startup_gear.

2/4/2017
--------
- Added new columns to character_stats table - strengthRanks, enduranceRanks, coordinationRanks, quicknessRanks, focusRanks, selfRanks, healthRanks, staminaRanks, manaRanks, healthCurrent, staminaCurrent, manaCurrent.

2/7/2017
--------
- Added new columns columns to character_stats table - strengthXpSpent, enduranceXpSpent, coordinationXpSpent, quicknessXpSspent, focusXpSpent, selfXpSpent, healthXpSpent, staminaXpSpent, manaXpSpent.
- Removed some columns from character and character_appearance tables - isAdmin, isEnvoy | race, gender.
- Added five new tables - character_properties_bool, character_properties_int, character_properties_bigint, character_properties_double, character_properties_string

2/16/2017
--------
- Changed character table - drop index for name column.
- Added script to activate event_scheduler and create an event for character "deletion" after restore window has expired.
- Added character_friends table for friends list functions.

2/28/2017
--------
- Added characterOptions1 and characterOptions2 fields to character table.

3/16/2017
--------
- Changed column quicknessXpSspent to quicknessXpSpent in character_stats table.
- Added column skillXpSpent to character_skills table.

3/18/2017
--------
- In the in character_stats table the following changes have been made:
-- Changed column coordinationXpSpent to an unsigned int(10) to match other columns and prevent crash.
-- Changed columns healthCurrent, staminaCurrent, manaCurrent to unsigned smallint(2) to prevent crash at higher values.
2/3/2017
--------
- Added four new tables - character_appearance, character_stats, character_skills and character_startup_gear.

2/4/2017
--------
- Added new columns to character_stats table - strengthRanks, enduranceRanks, coordinationRanks, quicknessRanks, focusRanks, selfRanks, healthRanks, staminaRanks, manaRanks, healthCurrent, staminaCurrent, manaCurrent.

2/7/2017
--------
- Added new columns columns to character_stats table - strengthXpSpent, enduranceXpSpent, coordinationXpSpent, quicknessXpSspent, focusXpSpent, selfXpSpent, healthXpSpent, staminaXpSpent, manaXpSpent.
- Removed some columns from character and character_appearance tables - isAdmin, isEnvoy | race, gender.
- Added five new tables - character_properties_bool, character_properties_int, character_properties_bigint, character_properties_double, character_properties_string

2/16/2017
--------
- Changed character table - drop index for name column.
- Added script to activate event_scheduler and create an event for character "deletion" after restore window has expired.
- Added character_friends table for friends list functions.

2/28/2017
--------
- Added characterOptions1 and characterOptions2 fields to character table.

3/16/2017
--------
- Changed column quicknessXpSspent to quicknessXpSpent in character_stats table.
- Added column skillXpSpent to character_skills table.

3/18/2017
--------
- In the in character_stats table the following changes have been made:
-- Changed column coordinationXpSpent to an unsigned int(10) to match other columns and prevent crash.
-- Changed columns healthCurrent, staminaCurrent, manaCurrent to unsigned smallint(2) to prevent crash at higher values.

4/26/2017
---------
- Renamed column character.birth to character.lastUpdate to better reflect its use.
2 changes: 1 addition & 1 deletion Source/ACE.Database/CharacterDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ protected override void InitialisePreparedStatements()
AddPreparedStatement(CharacterPreparedStatement.CharacterSkillsInsert, "INSERT INTO `character_skills` (`id`, `skillId`, `skillStatus`, `skillPoints`) VALUES (?, ?, ?, ?);", MySqlDbType.UInt32, MySqlDbType.UByte, MySqlDbType.UByte, MySqlDbType.UInt16);
AddPreparedStatement(CharacterPreparedStatement.CharacterStartupGearInsert, "INSERT INTO `character_startup_gear` (`id`, `headgearStyle`, `headgearColor`, `headgearHue`, `shirtStyle`, `shirtColor`, `shirtHue`, `pantsStyle`, `pantsColor`, `pantsHue`, `footwearStyle`, `footwearColor`, `footwearHue`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", MySqlDbType.UInt32, MySqlDbType.UInt32, MySqlDbType.UByte, MySqlDbType.Double, MySqlDbType.UByte, MySqlDbType.UByte, MySqlDbType.Double, MySqlDbType.UByte, MySqlDbType.UByte, MySqlDbType.Double, MySqlDbType.UByte, MySqlDbType.UByte, MySqlDbType.Double);
AddPreparedStatement(CharacterPreparedStatement.CharacterDeleteOrRestore, "UPDATE `character` SET `deleteTime` = ?, `deleted` = 0 WHERE `guid` = ?;", MySqlDbType.UInt64, MySqlDbType.UInt32);
AddPreparedStatement(CharacterPreparedStatement.CharacterListSelect, "SELECT `guid`, `name`, `deleteTime` FROM `character` WHERE `accountId` = ? AND `deleted` = 0 ORDER BY `name` ASC;", MySqlDbType.UInt32);
AddPreparedStatement(CharacterPreparedStatement.CharacterListSelect, "SELECT `guid`, `name`, `deleteTime` FROM `character` WHERE `accountId` = ? AND `deleted` = 0 ORDER BY `lastUpdate` DESC;", MySqlDbType.UInt32);
AddPreparedStatement(CharacterPreparedStatement.CharacterFriendInsert, "INSERT INTO `character_friends` (`id`, `friendId`) VALUES (?, ?);", MySqlDbType.UInt32, MySqlDbType.UInt32);
AddPreparedStatement(CharacterPreparedStatement.CharacterFriendDelete, "DELETE FROM `character_friends` WHERE `id` = ? AND `friendId` = ?;", MySqlDbType.UInt32, MySqlDbType.UInt32);
AddPreparedStatement(CharacterPreparedStatement.CharacterFriendsRemoveAll, "DELETE FROM `character_friends` WHERE `id` = ?;", MySqlDbType.UInt32);
Expand Down
3 changes: 2 additions & 1 deletion Source/AppVeyor/MySqlInstall.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" -h localhost -u root -pPassword12! mysql < database\Create\create_mysql.sql
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" -h localhost -u root -pPassword12! ace_auth < database\base\AuthenticationBase.sql
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" -h localhost -u root -pPassword12! ace_character < database\base\CharacterBase.sql
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" -h localhost -u root -pPassword12! ace_world < database\base\WorldBase.sql
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" -h localhost -u root -pPassword12! ace_world < database\base\WorldBase.sql
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" -h localhost -u root -pPassword12! ace_character < database\Updates\Character\01_2017_04_26_CharacterLastUpdate.sql
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# ACEmulator Change Log

### 2017-04-26
[OptimShi]
* Renamed ace_character.character.birth to lastUpdate to better reflect its use. (Birth is already stored in character_properties_int). See Character database update 01_2017_04_26_CharacterLastUpdate.sql
* Changed sort order of character list to use character.lastUpdate instead of alphabetical. Your last used character will now be selected upon a new client instance.

[fantoms]
* Built out the admin `@teleto` command. Use a player's name as the parameter.

Expand Down

0 comments on commit 5355361

Please sign in to comment.