Commit Graph

395 Commits

Author SHA1 Message Date
Arthur Ice 2aa287fe3c Merge 2014-12-05 20:16:13 -08:00
Arthur Ice 100eca203f GetClosestZonePoint converted to xyz_location 2014-12-05 17:57:07 -08:00
Arthur Ice 523562c152 GetClosestZonePoint converted to xyz_location (id version) 2014-12-02 21:46:16 -08:00
Arthur Ice f00cddd67e graveyard_x(), graveyard_y(), graveyard_z(), and graveyard_heading() converted to GetGraveyardPoint() 2014-12-02 21:00:31 -08:00
Arthur Ice 14608c972a SetGraveyard to xyz_header 2014-12-01 23:34:41 -08:00
Arthur Ice c3333a46c9 pgraveyard_x, pgraveyard_y, pgraveyard_z, and pgraveyard_heading converted to xyz_heading as m_Graveyard 2014-12-01 23:12:19 -08:00
Arthur Ice 40ec1f805f psafe_x, psafe_y, and psafe_z replaced with xyz_location m_SafePoint 2014-12-01 22:35:46 -08:00
Arthur Ice f5a94ed07b IsSpellBlocked converted to use xyz_location 2014-12-01 16:00:48 -08:00
Arthur Ice b06647b763 Zone::GetSpellBlockedMessage convered to use IsWithinAxisAlignedBox 2014-12-01 15:48:59 -08:00
Michael Cook (mackal) 395be050a3 Switch random function to std::mt19937
Added class EQEmu::Random
Functions:
EQEmu::Random::Int(int low, int high)
EQEmu::Random::Real(double low, double high)
EQEmu::Random::Roll(int required)
EQEmu::Random::Roll(double required)
EQEmu::Random::Reseed()

For zone, you will access the random object through the zone object
ex.
	zone->random.Int(0, 100);

Int returns a random int between low and high
Real returns a random double between low and high
Roll(int) returns true if Int(0, 99) < required is true
Roll(double) returns true if Real(0.0, 1.0) <= required is true
2014-12-01 18:13:12 -05:00
Arthur Ice fb9d76f851 GetSpellBlockedMessage converted to xyz_location 2014-12-01 14:16:53 -08:00
Arthur Ice 81d2e7d242 xdiff, ydiff, and zdiff in ZoneSpellsBlocked converted to xyz_location m_Difference 2014-12-01 13:32:19 -08:00
Arthur Ice 2fe80d32f9 ZoneSpellsBlocked converted x,y, and z to m_Location as xyz_location 2014-12-01 13:05:40 -08:00
Arthur Ice 54bc1b06e4 NPC constructor converted to use xyz_heading 2014-11-30 17:32:11 -08:00
akkadius ad9c0df552 #include and forward declaration cleanup of
client.cpp net.cpp questmgr.cpp zone.cpp zone.h
2014-11-29 03:12:34 -06:00
Akkadius 111fb84041 Moved zonedatabase functions out of corpse.cpp
Conversion portion mostly complete
Some header readability cleanup
Some function renaming
Struct renaming
Many variable renaming
MySQL error log for all of QueryDatabase
Corpse table renaming
Corpse table field renaming
Most corpse database functions redone
2014-11-22 17:55:48 -06:00
KimLS c506e33018 Fixed merge 2014-11-18 21:12:48 -08:00
JJ 2e8d7b09af Temp merchant items could duplicate slots also... 2014-11-16 19:04:15 -05:00
JJ 9c22de9eb2 Not an error if there isn't merchant data to load... 2014-11-12 19:50:53 -05:00
Trevius b4e4d94061 Fixed dynamic merchant list loading. Allows any merchant to be used in any zone. 2014-11-06 21:41:51 -06:00
JJ acab4dd443 Fix for duplicate merchant items when same merchant types are in same spawngroup. 2014-11-01 13:37:06 -04:00
KimLS 15cec40ed5 Fix for issue #270, fix for temp merchant lists not loading correctly, fix for ah redundant getadventurestats code. 2014-10-13 15:59:11 -07:00
JJ ea4c23efcf Establish default order for merchantlist items.
Allow merchants to use 80th slot.
2014-10-09 23:11:18 -04:00
Paul Coene f5fa07c8db Update zone.cpp 2014-09-29 16:38:18 -04:00
akkadius 54c89d69f6 Merge remote-tracking branch 'remotes/origin/master' into blob_conversion
Conflicts:
	common/database.cpp
	common/mysql_request_result.h
	common/shareddb.cpp
2014-09-07 04:11:09 -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
Arthur Ice 32b595afb4 Fix iterator on mercstance crash bug 2014-09-04 23:15:20 -07: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
Uleat 37d3daaf9a Client timer issue fix 2014-09-03 23:59:55 -04: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
Alex c3a3dc19a7 Merge pull request #224 from addtheice/RunQueryToDatabaseQuery_zone_zone
LoadStaticZonePoints converted to QueryDatabase
2014-08-26 17:35:10 -07:00
Arthur Ice 3d1521857e LoadStaticZonePoints converted to QueryDatabase 2014-08-24 12:21:16 -07:00
Uleat 52ae78709b First attempt at fixing zone shutdown crashes. (Mob timer processing accessing released resources.) 2014-08-24 05:42:43 -04:00
KimLS 0d09f5d536 Merging zone 2014-08-22 00:19:43 -07:00
KimLS 07a2cbe9a5 Renamed zone files 2014-08-21 23:46:01 -07:00
KimLS 7fc21b9e3a Tons of renames 2014-08-21 19:33:02 -07:00
Kinglykrab 8b19c76e89 Adds new column to 'merchantlist' table.
Adds 'probability' after 'classes_required', valid values are 0 to 100.
2014-08-21 04:05:45 -04:00
Arthur Ice 5a6373c429 UpdateHotzone converted to QueryDatabase 2014-08-20 16:39:07 -07:00
Arthur Ice 19e04a1875 LoadTickItems converted to QueryDatabase 2014-08-20 16:34:35 -07:00
Arthur Ice 029314ec7f LoadNPCEmotes converted to QueryDatabase 2014-08-20 16:31:05 -07:00
Arthur Ice cee4a3f475 LoadAdventureFlavor converted to QueryDatabase 2014-08-20 16:27:12 -07:00
Arthur Ice 2bc58a97bc LoadAlternateCurrencies converted to QueryDatabase 2014-08-20 16:24:05 -07:00
Arthur Ice 2eb270376f LoadVeteranRewards converted to QueryDatabase 2014-08-20 16:20:46 -07:00
Arthur Ice 5e858678e9 LoadLDoNTrapEntries converted QueryDatabase 2014-08-20 16:15:55 -07:00
Arthur Ice 12a59853b5 LoadLDoNTraps converted to QueryDatabase 2014-08-20 16:08:20 -07:00
Arthur Ice 971c3f633f GetDecayTimes converted to QueryDatabase 2014-08-20 16:05:09 -07:00
Arthur Ice 826f7d0efd LoadMercSpells converted to QueryDatabase 2014-08-20 16:00:36 -07:00
Arthur Ice 5da5e9b5de LoadLevelEXPMods converted to QueryDatabase 2014-08-20 15:57:04 -07:00
Arthur Ice 7a3c05a41f LoadMercTemplates converted to QueryDatabase 2014-08-20 15:53:02 -07:00
Arthur Ice 01382e87a0 LoadNewMerchantData converted to QueryDatabase 2014-08-20 15:37:09 -07:00