525 Commits

Author SHA1 Message Date
Michael Cook (mackal)
c94ceb5b1d Revert "LoadFactionValues_result converted to MySQLRequestResult"
This reverts commit 2e847815943ec146d95983cb3282f8a03655a129.
2014-09-11 16:55:58 -04:00
akkadius
899cf32e6b Added some DB logging to catch any potential query errors, this logs to eqemu_query_error_log.txt at the root folder, currently no rule toggling for this
Corrected some character name reservation logic
Adjusted telnet console so it does not throw 'Command Unknown' when simply hitting enter key
Adjusted System MSG for worldshutdown to use minutes instead of seconds
Added warning for when Shared platinum is disabled at the rule level for players to NOT put platinum in the shared bank when they insert platinum in the shared platinum slot
Changed a place in the code where disciplines were trained, someone had uint16 allocated to CharacterID and this was causing issues for characters with large ID's in the database
Added a fix for bind points getting overwritten with invalid zone data, setting everything to 0,0,0,0 - Since I've added this change I've had no issues for players
Fixed some spell book swap logic in the code, removed swap function.
Fixed issue with guild ranks not loading properly
Commented out some of the non-working tell-que code
Took out some of the auto increment settings in the auto database conversion that don't affect anything anyways
Added some additional escape string sequences for queries that needed them
Added ThrowDBError logging to catch any potential query issues with saves or load functions
2014-09-09 16:03:24 -05:00
akkadius
a14371ba5c Removed debugging
Added player profile data loading safety net checking
2014-09-07 04:00:56 -05:00
Akkadius
4c12d31e4a Removed command character backup
Changed all remaining references from the character_ table to the character_data
2014-09-06 22:35:19 -05:00
Akkadius
e50cf5c4be - Ported inspect_messages to character_inspect_messages
- Ported character leadership abilities to character_leadership_abilities
- Removed player profile debug printing
- Refactored total time entitled on account to load from the sum of time_played from all characters in character_data
2014-09-06 21:50:29 -05:00
akkadius
ca7dd7d741 - Improved speed of character database conversion x1000 by changing query style
- Adjusted AA MySQL saves for 100x speed increase
- Removed StoreCharacter lookup methods as they will no longer be necessary
- Some other cleanup
2014-09-06 13:53:54 -05:00
Akkadius
4432c07081 State of Commit: Testable if you ask me (Akkadius) what you need to do
- Need to convert a list of functions and columns and should be ready to start intensive testing phase
 - All preliminary tests show things working great

- All of player profile is saved and loaded from the database
- DBAsync has been completely removed from all code
	- Removed zone/dbasync.cpp/.h
	- Removed common/dbasync.cpp/.h
	- Removed dbasync from cmake commmon and zone
- Cleaned up a ton of functions
- Added several tables to world CheckDatabaseConversions script:
	- `character_skills`
	- `character_languages`
	- `character_bind`
	- `character_alternate_abilities`
	- `character_currency`
	- `character_data`
	- `character_spells`
	- `character_memmed_spells`
	- `character_disciplines`
	- `character_material`
	- `character_tribute`
	- `character_bandolier`
	- `character_potionbelt`
- Character select now loads from `character_data`
- Character creation now creates to `character_data`
- Updated function Database::UpdateName to use `character_data`
- Updated function Database::CheckUsedName to use `character_data`
- Updated function Database::MoveCharacterToZone to use `character_data`
- Updated function Database::SetLoginFlags to use `character_data`
- Updated function Database::SetFirstLogon to use `character_data`
- Updated function Database::SetLFG to use `character_data`
- Removed CopyCharacter functions and commands, to be recreated later since it never worked to begin with
- Removed SharedDatabase::SetPlayerProfile
- Trimmed down redundant case switch statements for World sendpackets to QueryServ
- Added Character Methods to Database class:
	Loads:
		bool	LoadCharacterBandolier(uint32 character_id, PlayerProfile_Struct* pp);
		bool	LoadCharacterTribute(uint32 character_id, PlayerProfile_Struct* pp);
		bool	LoadCharacterPotions(uint32 character_id, PlayerProfile_Struct* pp);
	Saves:
		bool	SaveCharacterBindPoint(uint32 character_id, uint32 zone_id, uint32 instance_id, float x, float y, float z, float heading, uint8 is_home);
		bool	SaveCharacterCurrency(uint32 character_id, PlayerProfile_Struct* pp);
		bool	SaveCharacterData(uint32 character_id, uint32 account_id, PlayerProfile_Struct* pp);
		bool	SaveCharacterAA(uint32 character_id, uint32 aa_id, uint32 current_level);
		bool	SaveCharacterSpellSwap(uint32 character_id, uint32 spell_id, uint32 from_slot, uint32 to_slot);
		bool	SaveCharacterSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
		bool	SaveCharacterMemorizedSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
		bool	SaveCharacterMaterialColor(uint32 character_id, uint32 slot_id, uint32 color);
		bool	SaveCharacterSkill(uint32 character_id, uint32 skill_id, uint32 value);
		bool	SaveCharacterLanguage(uint32 character_id, uint32 lang_id, uint32 value);
		bool	SaveCharacterDisc(uint32 character_id, uint32 slot_id, uint32 disc_id);
		bool	SaveCharacterTribute(uint32 character_id, PlayerProfile_Struct* pp);
		bool	SaveCharacterBandolier(uint32 character_id, uint8 bandolier_id, uint8 bandolier_slot, uint32 item_id, uint32 icon, const char* bandolier_name);
		bool	SaveCharacterPotionBelt(uint32 character_id, uint8 potion_id, uint32 item_id, uint32 icon);
	Deletes:
		bool	DeleteCharacterSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
		bool	DeleteCharacterMemorizedSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
		bool	DeleteCharacterDisc(uint32 character_id, uint32 slot_id);
		bool	DeleteCharacterBandolier(uint32 character_id, uint32 band_id);
2014-09-04 07:24:17 -05:00
Akkadius
e0db3c0b60 Fixed Character select to be loaded from new character data tables 2014-09-01 22:17:06 -05:00
Akkadius
e0a99730e5 pp revert 2014-08-31 21:58:04 -05:00
Akkadius
6497bdf45a More stuff 2014-08-31 21:31:44 -05:00
Akkadius
ca430e2494 Fix void Database::GetCharName(uint32 char_id, char* name)
Increased MAX_PP_SPELLBOOK to 720 for UF/RoF
Increased MAX_PP_MEMSPELL to 12
Implemented up to 12 spell slots
Fix for public_note default value in bool BaseGuildManager::DBSetGuild(uint32 charid, uint32 guild_id, uint8 rank)
Updated all CastSpell entries to use the appropriate slot type defines located now in zone/common.h
Fixed Guild Loading from character_data
Fixed #guild list
Refactored Merchantlist loading
Refactored Temp Merchantlist loading
Gutted most of dbasync

Added:
LoadCharacterSpellBook(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterMemmedSpells(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterLanguages(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterBindPoint(uint32 character_id, PlayerProfile_Struct* pp);
SaveCharacterSpellSwap(uint32 character_id, uint32 spell_id, uint32 from_slot, uint32 to_slot);
SaveCharacterSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
SaveCharacterMemorizedSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
DeleteCharacterSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
DeleteCharacterMemorizedSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);

Removed Zone::LoadTempMerchantData_result(MYSQL_RES* result)
Removed Zone::LoadMerchantData_result(MYSQL_RES* result)
Removed SharedDatabase::GetPlayerProfile
Removed SharedDatabase::SetPlayerProfile
Removed SharedDatabase::SetPlayerProfile_MQ
Removed Zone::DBAWComplete(uint8 workpt_b1, DBAsyncWork* dbaw) from zone.cpp
2014-08-31 17:52:43 -05:00
Akkadius
f8439fd6e6 Made many adjustments to character load code.
Removed bool Client::FinishConnState2(DBAsyncWork* dbaw)
Removed all async character loads
Removed bool	GetAccountInfoForLogin
Removed bool	GetAccountInfoForLogin_result
Removed bool	GetCharacterInfoForLogin_result
Removed bool	GetCharacterInfoForLogin

Added:
bool	LoadCharacterFactionValues(uint32 character_id, faction_map & val_list);
bool	LoadCharacterDisciplines(uint32 character_id, PlayerProfile_Struct* pp);
bool	LoadCharacterSkills(uint32 character_id, PlayerProfile_Struct* pp);
2014-08-31 07:52:52 -05:00
akkadius
4071d88290 At point of commit:
Basic character data, currency and AA are being loaded/saved from the database, currently working on the rest right now.
- Character blob removed from load for testing. Lots of cleanup yet to be done so don't judge code yet.

Saves:
- Two FULL saves when looting a corpse, this has been reduced to just currency saves on initial loot and trimmed to one save since AddToMoneyPP did it already
- Every time a player moves coin with any situation (Splits/Trades/Merchant/Skills/Bank Coin Exchange/Coin Moves), a full save is made, this is now just a currency save
- Every time a player skilled up at a skill vendor, a full blob save hit was made, this is not just a currency hit
2014-08-31 02:53:59 -05:00
Akkadius
5cf748d135 Initial work 2014-08-27 09:55:39 -05:00
Arthur Ice
9ddb56088e merge from master 2014-08-26 18:49:15 -07:00
akkadius
633583c266 Created character_lookup table for applications that mirrors all character_ table fields minus blob fields for application lookups
- A 2.4GB character_ table will take 7 seconds to query on a SSD versus .1s on the character_lookup table
	- This also causes applications like Magelo to burst reads of the entire character table because of the blob fields that come with the reads, as much as 500-600MB/s even if a indexed id filter is provided
	- This field is synchronized on player save and has 0.001s DB hit
	- When we split out from the blob, ideally this table can be removed, but it really does no harm in mirroring data when a 2.6GB character table mirrors everything subtracting blob data down to 8MB
	- Required SQL: utils\sql\git\required\2014_08_24_character_lookup.sql
2014-08-24 08:52:14 -05:00
KimLS
7fc21b9e3a Tons of renames 2014-08-21 19:33:02 -07:00
Arthur Ice
8369570b50 GetAccountInfoForLogin_result converted to MySQLRequestResult 2014-08-21 17:35:04 -07:00
Arthur Ice
9ff0c414c1 LoadFactionData converted to QueryDatabase 2014-08-21 17:17:27 -07:00
Arthur Ice
850d1e7c28 SetCharacterFactionLevel converted to QueryDatabase 2014-08-21 17:08:31 -07:00
Arthur Ice
2df823d2db LoadFactionValues converted to QueryDatabase 2014-08-21 17:04:08 -07:00
Arthur Ice
2e84781594 LoadFactionValues_result converted to MySQLRequestResult 2014-08-21 17:00:50 -07:00
Arthur Ice
833227f7f6 LoadPetInfo converted to QueryDatabase 2014-08-21 15:58:11 -07:00
Arthur Ice
e731cfd48d RemoveTempFactions converted to QueryDatabase 2014-08-21 15:32:20 -07:00
Arthur Ice
cf7574d9b8 SavePetInfo converted to QueryDatabase 2014-08-21 15:30:27 -07:00
Arthur Ice
10d384f131 LoadBuffs converted to QueryDatabase 2014-08-21 13:54:18 -07:00
Arthur Ice
00b8c8ce47 SaveBuffs converted to QueryDatabase 2014-08-21 13:42:02 -07:00
Arthur Ice
cab43f41be UpdateAltCurrencyValues converted to QueryDatabase 2014-08-21 13:36:01 -07:00
Arthur Ice
fc0d589f12 LoadAltCurrencyValues converted to QueryDatabase 2014-08-21 13:34:19 -07:00
Arthur Ice
743175d4ff InsertDoor converted to QueryDatabase 2014-08-21 13:26:38 -07:00
Arthur Ice
b497b07fed QGlobalPurge converted to QueryDatabase 2014-08-21 13:22:21 -07:00
Arthur Ice
aab5ed2267 ListAllInstances converted to QueryDatabase 2014-08-21 13:19:37 -07:00
Arthur Ice
46c9fe46e9 UpdateKarma converted to QueryDatabase 2014-08-21 13:09:43 -07:00
Arthur Ice
e8c92c6fcc GetKarma converted to QueryDatabase 2014-08-21 13:09:43 -07:00
Arthur Ice
765eaf7f4f getZoneShutDownDelay converted to QueryDatabase 2014-08-21 12:51:09 -07:00
Arthur Ice
699c8cc1eb LoadBlockedSpells converted to QueryDatabase 2014-08-21 12:46:52 -07:00
Arthur Ice
5839921e08 GetBlockedSpellsCount converted to QueryDatabase 2014-08-21 12:39:38 -07:00
Arthur Ice
a3bde6e1f1 RaidGroupCount converted to QueryDatabase 2014-08-21 12:35:33 -07:00
Arthur Ice
0ece5bf178 GroupCount converted to QueryDatabase 2014-08-21 12:30:06 -07:00
Arthur Ice
fbefad9eaf RefreshGroupFromDB converted to QueryDatabase 2014-08-21 12:25:32 -07:00
Arthur Ice
351a7a52fe GetCharacterInfoForLogin removed, unused, unsupported 2014-08-21 12:01:22 -07:00
Arthur Ice
8441ffda31 GetAccountInfoForLogin removed, unused, unsupported 2014-08-21 11:52:15 -07:00
Arthur Ice
e79747c919 SetZoneTZ converted to QueryDatabase 2014-08-20 23:26:41 -07:00
Arthur Ice
8525d819c1 GetZoneTZ converted to QueryDatabase 2014-08-20 23:13:59 -07:00
Arthur Ice
fe600bb084 Removed Get/SetServerFilters, unused and unsupported 2014-08-20 23:07:19 -07:00
Arthur Ice
babaff1985 GetUseCFGSafeCoords converted to QueryDatabase 2014-08-20 22:14:40 -07:00
Arthur Ice
909ca5440d UpdateZoneSafeCoords converted to QueryDatabase 2014-08-20 22:11:14 -07:00
Arthur Ice
e25f64d03b SaveMerchantTemp converted to QueryDatabase 2014-08-20 22:06:56 -07:00
Arthur Ice
2df66bd625 GetGridType converted to QueryDatabase 2014-08-20 22:04:40 -07:00
Arthur Ice
2028a5846c LoadMercEquipment converted to QueryDatabase 2014-08-20 22:00:00 -07:00