Compare commits

..

1186 Commits

Author SHA1 Message Date
Uleat ad3d065225 Updated/activated EQDictionary code to use the new possessions enumeration 2014-10-10 04:26:54 -04:00
Uleat 66cfb2e32b Added a 'BOTS' converter to supplement Akkadius's recent 'PP' blob converter - updates views/function to reference the proper tables and columns. 2014-10-09 23:54:48 -04:00
Michael Cook (mackal) 3e1c917f11 Fix issues with purchasing raid AAs 2014-10-09 23:30:08 -04:00
JJ ea4c23efcf Establish default order for merchantlist items.
Allow merchants to use 80th slot.
2014-10-09 23:11:18 -04:00
Michael Cook (mackal) c328829610 Fix out of bounds error in SaveCharacterLeadershipAAs 2014-10-09 22:55:28 -04:00
JJ 28ac586ed8 Update info for #suspend 2014-10-09 00:23:54 -04:00
Alex ee71fa0d56 Merge pull request #268 from addtheice/RunQueryToDatabaseQuery_zone_tradeskills
Run query to database query zone tradeskills
2014-10-08 16:31:55 -07:00
Alex f3e04bfe4c Merge pull request #267 from addtheice/RunQueryToDatabaseQuery_zone_raids
Run query to database query zone raids
2014-10-08 16:31:38 -07:00
Alex a8c23d25f3 Merge pull request #266 from addtheice/RunQueryToDatabaseQuery_zone_tasks
Run query to database query zone tasks
2014-10-08 16:31:03 -07:00
Alex 41f2d71c7c Merge pull request #264 from addtheice/RunQueryToDatabaseQuery_zone_groups
SaveGroupLeaderAA converted to QueryDatabase
2014-10-08 16:28:55 -07:00
Arthur Ice e338f801ea DisableRecipe converted to QueryDatabase 2014-10-08 16:05:52 -07:00
Arthur Ice 6221c1f8ab EnableRecipe converted to QueryDatabase 2014-10-08 16:04:19 -07:00
Arthur Ice 5dac9a944b LearnRecipe converted to QueryDatabase 2014-10-08 16:02:30 -07:00
Arthur Ice 97c1c479f9 GetTradeRecipe converted to QueryDatabase 2014-10-08 15:55:12 -07:00
Arthur Ice 21d6865e8c GetTradeRecipe converted to QueryDatabase 2014-10-08 15:43:50 -07:00
Arthur Ice e2894ef2aa SendTradeskillDetails converted to QueryDatabase 2014-10-08 15:05:24 -07:00
Arthur Ice 7656b9b928 TradeskillSearchResults converted to const std::string query instead of const *char query 2014-10-08 15:00:34 -07:00
Arthur Ice 0fde0fbd23 removed unneeded querylength parameter from TradeskillSearchResults 2014-10-08 14:41:34 -07:00
Arthur Ice d5955da08c TradeskillSearchResults converted to QueryDatabase 2014-10-08 14:38:38 -07:00
Arthur Ice e2333e671b HandleautoCombine converted to QueryDatabase 2014-10-08 14:28:40 -07:00
Arthur Ice 1da70ee6ed LoadProximities converted to QueryDatabase 2014-10-08 14:15:43 -07:00
Arthur Ice 0d8cbca016 LoadLists converted to QueryDatabase 2014-10-08 14:11:35 -07:00
Arthur Ice 1a4b794ce4 RemoveTask converted to QueryDatabase 2014-10-08 13:33:22 -07:00
Arthur Ice fca359bf51 DeleteCompletedTaskFromDatabase 2014-10-08 13:22:10 -07:00
Arthur Ice 5f11e91da2 DisableTask converted to QueryDatabase 2014-10-08 13:17:03 -07:00
Arthur Ice 2c275f603a EnableTask converted to QueryDatabase 2014-10-08 13:07:03 -07:00
Arthur Ice ad921d01d8 LoadClientState converted to QueryDatabase 2014-10-08 12:30:08 -07:00
Arthur Ice e3e2b266f2 SaveClientState converted to QueryDatabase 2014-10-08 11:11:33 -07:00
Michael Cook (mackal) e2d52ec3e5 Allow /setstartcity to work if home is set to tutorialb 2014-10-08 13:43:32 -04:00
Michael Cook (mackal) a325380884 Implement mana/hp/end replenishments if logged off for long enough
Default set to on with a default time of 6 hours (21600 seconds)
2014-10-08 03:36:31 -04:00
Michael Cook (mackal) b6294a28cb Minor clean ups to CheckCharCreateInfo 2014-10-08 01:34:36 -04:00
Michael Cook (mackal) 69336d1e53 Minor clean ups to Client::OPCharCreate 2014-10-08 01:34:36 -04:00
Michael Cook (mackal) 2df5506d82 Merge pull request #265 from KayenEQ/Development
Fix for a few spell triggers using correct resist dif
2014-10-08 00:11:42 -04:00
Michael Cook (mackal) 2dacb523fc Rework OPCharCreate logic with tutorial flag
Hopefully resolves issues with toons on Titanium spawning out of bounds
when starting in tutorial.

Resolves setting home bind to tutorial and being out of bounds.
2014-10-07 23:40:13 -04:00
KayenEQ 6474e1353f Fix for a few spell triggers using correct resist dif 2014-10-07 22:54:12 -04:00
Michael Cook (mackal) 45ef740244 Fix issue with Return Home button always being available 2014-10-07 19:02:07 -04:00
Arthur Ice 48299b6024 LoadTasks converted to QueryDatabase 2014-10-07 11:58:22 -07:00
Arthur Ice be7d2e9457 LoadTaskSets converted to QueryDatabase 2014-10-07 11:36:42 -07:00
Arthur Ice a90babbae1 LearnMembers converted to QueryDatabase 2014-10-07 11:26:03 -07:00
Arthur Ice 4b1d3592d4 GetRaidDetails converted to QueryDatabase 2014-10-07 11:21:20 -07:00
Arthur Ice 77cfd116e0 SetRaidDetails converted to QueryDatabase 2014-10-07 11:15:45 -07:00
Arthur Ice 67c8949cd4 LockRaid converted to QueryDatabase 2014-10-07 11:14:02 -07:00
Arthur Ice b66b7a5fd2 RemoveTaidLooter converted to QueryDatabase 2014-10-07 11:10:27 -07:00
Arthur Ice b0d358cda8 AddRaidLooter converted to QueryDatabase 2014-10-07 11:06:43 -07:00
Arthur Ice 8553278759 UpdateLevel converted to QueryDatabase 2014-10-07 11:02:17 -07:00
Arthur Ice 7a3f7602a5 SetRaidLeader converted to QueryDatabase 2014-10-07 10:59:59 -07:00
Arthur Ice 11e08c9b67 SetGroupleader converted to QueryDatabase 2014-10-07 10:55:10 -07:00
Arthur Ice dfcddac2ef MoveMember converted to QueryDatabase 2014-10-07 10:53:20 -07:00
Arthur Ice 73b2987700 DisbandRaid converted to QueryDatabase 2014-10-07 10:47:16 -07:00
Arthur Ice 5781821ab3 RemoveMember converted to QueryDatabase 2014-10-07 10:16:55 -07:00
Arthur Ice 9183541825 AddMember converted to QueryDatabase 2014-10-07 09:58:21 -07:00
Arthur Ice 7870081716 SaveGroupLeaderAA converted to QueryDatabase 2014-10-07 09:21:39 -07:00
Michael Cook (mackal) 2bee906784 Slay Undead to String IDs (and better filtering) 2014-10-06 01:30:01 -04:00
Michael Cook (mackal) cab41487d5 Stop the book showing up while inspecting charms with RoF
Stat display still broken sadly
2014-10-05 22:47:57 -04:00
JJ 66448feece Some updates to #command information. 2014-10-05 21:42:33 -04:00
Uleat 65127ad756 Merge branch 'master' of https://github.com/EQEmu/Server 2014-10-05 19:35:21 -04:00
Michael Cook (mackal) 1261c228a3 Call CalcBonuses for RoF+ augments 2014-10-05 16:13:13 -04:00
Michael Cook (mackal) 5be8e710a9 More restrictive on the temp hack for UF (only spells with numhits) 2014-10-05 15:15:17 -04:00
Michael Cook (mackal) 3ad7ab625d Add temp hack for num hits and UF
Not sure what I screwed up, could of sworn it was working right before,
but that was also 3 AM or something

Rewrote UF's OP_BuffCreate to use the Write* functions which are a bit
more straight forward
2014-10-05 14:46:55 -04:00
Michael Cook (mackal) b6be6c3709 Merge pull request #258 from KayenEQ/Development
Exported to PERL $client->SendSpellAnim(targetid, spellid)
2014-10-05 13:36:33 -04:00
KayenEQ 8ff4e59d20 Fix to allow regular runes to absorn spell damage (except dots). 2014-10-05 07:51:20 -04:00
KayenEQ ad116af59d Merge git://github.com/EQEmu/Server into Development 2014-10-05 07:49:20 -04:00
Uleat fa1fe55e01 Added corpse encode and decode translators 2014-10-05 06:12:33 -04:00
Michael Cook (mackal) 4f2dbb37d2 Confirmed OP_ItemRecastDelay for SoF 2014-10-05 02:28:17 -04:00
Michael Cook (mackal) 7dc1da21f0 Move OP_ItemRecastDelay to after cast
I originally assumed it needed to be sent "while casting"
but it looks like right at the end (where we set the reuse timer)
also works.
2014-10-05 02:18:30 -04:00
Uleat 806a9fbb99 Identified recast timer field in Ti item packet header 2014-10-04 23:38:20 -04:00
Michael Cook (mackal) e753685ceb Implement number of hit indicators for UF and RoF
There is a small display bug with the initial cast of the spell,
but it updates quickly enough that it shouldn't be too noticeable
This still needs to be fixed though

Changed SendBuffDurationPacket to take a Buffs_Struct by reference
to allow more of the data to be obtained without more params

Added Client::SendBuffNumHitPacket(Buffs_Struct &buff, int slot)
2014-10-04 03:23:42 -04:00
KimLS e0e3059498 Turn off user literal error in clang 2014-10-03 14:57:01 -07:00
KimLS 61545beff2 Hunger and thirst clamping within larger ranges 2014-10-03 13:42:39 -07:00
Uleat 16c5ead887 Merge branch 'master' of https://github.com/EQEmu/Server 2014-10-03 16:31:31 -04:00
Uleat 3a270dd96a Moved OP_LootItem slot translation to external handlers in client patch files 2014-10-03 15:05:20 -04:00
Uleat bb2bed7b00 Fixed OP_AugmentInfo packet processing that I broked'd 2014-10-03 02:03:48 -04:00
Michael Cook (mackal) 0438dee22e Rework ZoneDatabase::SavePetInfo -- should be better
Worst case before some something like 96 queries.
2014-10-03 01:37:51 -04:00
Michael Cook (mackal) b3d8e22539 Make ZoneDatabase::FillAAEffects get the data from memory
Note: This should probably be moved out of ZoneDatabase
2014-10-02 22:52:25 -04:00
KayenEQ 968127c414 Exported to PERL $client->SendSpellAnim(targetid, spellid)
This function sends the spell graphic of a spell without actually having to cast the spell.
2014-10-02 22:08:12 -04:00
Uleat 272180ff0f Detached direct packet routing for some older client opcodes 2014-10-02 20:18:54 -04:00
Michael Cook (mackal) 03fed0f42d Some AA updates from PEQ 2014-10-02 14:10:48 -04:00
Michael Cook (mackal) fab091da2d Move OP_ItemRecastDelay to the right spot 2014-10-01 20:52:40 -04:00
Michael Cook (mackal) c7417d4b54 Didn't mean to push those .... 2014-10-01 20:51:47 -04:00
Michael Cook (mackal) d8c6c69450 ITEM and PB slot checks too 2014-10-01 20:50:01 -04:00
Michael Cook (mackal) 1024e327b5 Fix nullptr and item_slot check 2014-10-01 20:48:15 -04:00
Michael Cook (mackal) e38268230f Export SendColoredText to lua 2014-10-01 18:34:26 -04:00
Michael Cook (mackal) c7760d8dae Merge pull request #257 from KayenEQ/Development
Exported to PERL $client->SendColoredText(color, msg)
2014-10-01 18:27:54 -04:00
Michael Cook (mackal) 8d050b8f3f Fix errors in Database::ExpireMail in ucs 2014-10-01 18:06:02 -04:00
Michael Cook (mackal) 7800cbbe96 Initial work on OP_ItemRecastDelay 2014-10-01 16:22:45 -04:00
KayenEQ 50233b9a8c changelog 2014-10-01 13:25:19 -04:00
KayenEQ a722e3f112 Exported to PERL $client->SendColoredText(color, msg) 2014-10-01 13:24:38 -04:00
Michael Cook (mackal) be52d413db Fix bazaar welcome message 2014-10-01 02:11:38 -04:00
Michael Cook (mackal) 1dfd3349b7 Add Master Wu message 2014-10-01 01:15:08 -04:00
Michael Cook (mackal) cf8363f62e Fix another bot SQL error 2014-09-30 19:23:02 -04:00
Michael Cook (mackal) 7326a3ea7a Send the right person's name 2014-09-30 19:20:38 -04:00
Michael Cook (mackal) cb49bae53c Fix already in raid message 2014-09-30 18:41:03 -04:00
Michael Cook (mackal) 31f891dda5 Fix error in GetBotOwnerCharacterID 2014-09-30 18:19:57 -04:00
Uleat 38572fe393 Merge branch 'master' of https://github.com/EQEmu/Server 2014-09-30 16:18:51 -04:00
Uleat 83367ee806 Added clicky items from bags for clients that support it (RoF, currently) 2014-09-30 16:18:25 -04:00
Michael Cook (mackal) f117aafc45 Added some updownsign to some newer formulas 2014-09-30 13:41:42 -04:00
Alex 3e0c1bc02e Merge pull request #243 from addtheice/RunQueryToDatabaseQuery_zone_npc
Run query to database query zone npc
2014-09-29 17:22:53 -07:00
Alex f13a1d6351 Merge pull request #236 from addtheice/RunQueryToDatabaseQuery_zone_bot
Run query to database query zone bot
2014-09-29 17:20:53 -07:00
Michael Cook (mackal) fdde64dcc3 Merge pull request #255 from noudess/master
Update zone.cpp to fix bug in loading merchantlist_temp
2014-09-29 16:57:35 -04:00
Paul Coene f5fa07c8db Update zone.cpp 2014-09-29 16:38:18 -04:00
Michael Cook (mackal) 5ffb6bdee7 Reworked blind running around
This should be more in line with how we do current fearpath stuff
and with live.
2014-09-29 16:32:48 -04:00
Michael Cook (mackal) 8035c6c558 Correct "cure blindness" catch 2014-09-29 16:16:19 -04:00
Michael Cook (mackal) fc1eca0f31 Merge pull request #254 from noudess/master
Changes so that blind effects like those in Flash of Light work.
2014-09-29 14:26:51 -04:00
Michael Cook (mackal) 28e49801b7 Fix issue with newly inserted saylinks not working correctly
Sadly still silly
2014-09-29 03:08:30 -04:00
Michael Cook (mackal) 66c171b61b Add support for post June 18, 2014 Hundred Hands effects
Set Spells:Jun182014HundredHandsRevamp to true if your spell file is newer
2014-09-28 13:27:38 -04:00
Michael Cook (mackal) 3be7d45d36 Revamp attack delays / hastes / slows based on dev quotes
See changelog
2014-09-27 23:14:11 -04:00
Michael Cook (mackal) e5822a0c4a Fix client SetAttackTimer issue
Moved the call to the end of Client::CalcBonuses() since it depends on
Client::CalcHaste() which requires a bunch of others to be called
before it.
2014-09-27 21:37:14 -04:00
KimLS b05dd45d62 Merge branch 'spell_stats' 2014-09-27 14:45:20 -07:00
KimLS 9f64092606 Merge of kayen's PR as well as some fixes i saw 2014-09-27 14:44:48 -07:00
Paul Coene d2acd0505c is_blind works better as an else to the line that handles cure 2014-09-27 17:39:30 -04:00
Paul Coene 05ed577e23 Fixed issue where blind flag was set for beneficial spells like cure.wq 2014-09-27 17:17:12 -04:00
KayenEQ 7831162235 changelog 2014-09-27 16:39:37 -04:00
KayenEQ 8567fd928a Perl Mob function GetSpellStat(spellid, identifier, slot)
indentifier is the spell_new field
slot is used for effectids,base,base2, max ect where 1 = first slot.
Will add a wiki page
2014-09-27 16:12:10 -04:00
Paul Coene 73a23e9f9d Changes so that blind effects like those in Flash of Light work. 2014-09-27 13:00:07 -04:00
KayenEQ f232bf1ccd Fix for commit failure. 2014-09-27 09:21:37 -04:00
KayenEQ acc6926448 Merge git://github.com/EQEmu/Server into Development 2014-09-27 09:20:27 -04:00
Uleat 837ce8ab4a Re-ordered client patch ENCODES and DECODES - snuck in a bitswap change for SoF+ item_struct::Slots translations 2014-09-26 20:51:42 -04:00
Michael Cook (mackal) 2497c719ee Rename Name variable in SendBazaarResults to temp_buffer fixes #253 2014-09-26 12:43:34 -04:00
KayenEQ 31b46efcac Clean up of perl based NPC spell scaling functions.
Added Perl - $npc->GetSpellFocusDMG(), $npc->GetSpellFocusHeal()
2014-09-26 06:56:42 -04:00
KayenEQ 9f3a0a3f95 Merge git://github.com/EQEmu/Server into Development 2014-09-26 06:54:53 -04:00
Michael Cook (mackal) 179400c777 Client::SetClassStartingSkills should now match live 2014-09-26 00:44:51 -04:00
Michael Cook (mackal) 0f12a74074 Add bool EQEmu::IsSpecializedSkill(SkillUseTypes skill) 2014-09-25 21:40:31 -04:00
Michael Cook (mackal) 61b784e96e Add tests for skills utilities 2014-09-25 21:35:17 -04:00
Michael Cook (mackal) 723e5d536a EQEmu::IsTradeskill uint32 to SkillUseTypes 2014-09-25 21:20:59 -04:00
Alex 225929d937 Merge pull request #240 from addtheice/RunQueryToDatabaseQuery_zone_trading
Run query to database query zone trading
2014-09-25 17:26:48 -07:00
Alex 763ed7f7a3 Merge pull request #242 from addtheice/RunQueryToDatabaseQuery_zone_questmgr
Run query to database query zone questmgr
2014-09-25 17:26:22 -07:00
Alex ea6ef4c283 Merge pull request #245 from addtheice/RunQueryToDatabaseQuery_zone_groups
Run query to database query zone groups
2014-09-25 17:26:13 -07:00
Alex e5a0cc9ef7 Merge pull request #251 from KayenEQ/Development
Fix for calculation for SE_ManaAbsorbPercentDamage
2014-09-25 17:25:45 -07:00
Uleat a79ea9b850 Merge branch 'master' of https://github.com/EQEmu/Server 2014-09-25 18:49:17 -04:00
Uleat 039e321dde More re-enumeration prep work 2014-09-25 18:48:58 -04:00
KimLS c57292a9dd Tired of this GLM warning (and we dont even use glm rotate grr) also reworked how I approached that peq entity process crash after thinking about it a bit 2014-09-25 14:54:40 -07:00
KayenEQ 9561a3fd3e Merge git://github.com/EQEmu/Server into Development 2014-09-25 15:15:32 -04:00
KimLS aa021addc1 Fix for potion belt name loading. 2014-09-25 04:00:06 -07:00
Michael Cook (mackal) c0cbbf3a65 World needs to load skill cap data for char creation 2014-09-25 03:14:43 -04:00
Michael Cook (mackal) a73ac9cfe8 Added helper function bool EQEmu::IsTradeskill(uint32 skill)
Returns true if you pass a tradeskill to it, otherwise false
2014-09-24 23:36:27 -04:00
KimLS ec8c46abfe I keep seeing a crash due to an invalidated iter during mob delete every few days, seeing if this fixes it. 2014-09-24 19:47:27 -07:00
KayenEQ b9b92762b5 Merge git://github.com/EQEmu/Server into Development
Conflicts:
	changelog.txt
2014-09-24 20:51:20 -04:00
Uleat 7feb531ff7 Re-ordered server opcodes and handlers to facilitate the export of client patch structs and handlers 2014-09-24 20:23:01 -04:00
Michael Cook (mackal) e67423bba7 Add raid mob message
"This creature would take an army to defeat!"
Colors may be a bit off due to differences in clients
2014-09-24 14:04:17 -04:00
Michael Cook (mackal) 531e4b0207 Fix function signature of Mob::IsRaidTarget() so its actually a virtual 2014-09-24 13:50:18 -04:00
Michael Cook (mackal) 34496c49b4 Add Client::SendColoredText(uint32 color, std::string message)
This will send a message (arbitrary size limit of 512) to the client
of the provided color. The MT colors should work here.
2014-09-24 13:14:20 -04:00
Michael Cook (mackal) a445d7e39f Rename OP_BuffFadeMsg to OP_ColoredText since it is a generic opcode 2014-09-24 12:22:06 -04:00
KimLS 0d12715d77 Data verification utils, not in use yet. Also added ability for lua packet to bypass the translation layer (dangerous) if a writer so desires (useful for quickly trying packet stuff) 2014-09-24 03:58:46 -07:00
akkadius 9878459049 Fix tribute loading/saving for real 2014-09-23 20:16:19 -05:00
akkadius 9be0d3b090 memset size fix to calc current size of 400 bytes for discipline initialization 2014-09-23 19:19:40 -05:00
akkadius 16ba3eb11e Restoring Disciplines to their original load order (Slot)
Tribute uninitialized value database conversion fix
Tribute load fix (Lost in translation)
Changed Tribute 0 value to 0xFFFFFFFF instead of 0
Sanity check for unitialized tribute value on load
2014-09-23 19:12:31 -05:00
akkadius 973aa94cb5 Fix for database schema conversion where character_ table has 0 characters present. This will allow the tables to still be created properly and the old one renamed. 2014-09-23 18:28:17 -05:00
KimLS 4cbccfdce2 Fix for MoveCharacterToZone using zoneid instead of zone_id 2014-09-23 16:02:04 -07:00
KayenEQ a5e6fa3479 Merge git://github.com/EQEmu/Server into Development 2014-09-23 18:58:59 -04:00
akkadius 3712d36867 Fix for the undye command to properly purge character armor dye 2014-09-23 17:54:07 -05:00
KimLS 17291e9977 Merge branch 'master' of github.com:EQEmu/Server 2014-09-23 15:42:48 -07:00
KimLS 15f57e4a4c Rob's broken skill up bug reported fixed 2014-09-23 15:42:20 -07:00
akkadius e58d63bf35 IncrementAA for scripting functions changed to use SaveAA instead of Save 2014-09-23 17:21:08 -05:00
KimLS f89add9f64 Fix for AA conversion 2014-09-23 15:09:33 -07:00
Michael Cook (mackal) e039f6d2c6 Fix AA issue 2014-09-23 17:40:17 -04:00
KimLS 7cef4d8fe9 Fix for spell books on newer clients not playing well with the tricksy new deblob code 2014-09-23 13:39:05 -07:00
KimLS 7b85b09f24 isnan fix for vs2012 2014-09-23 13:04:18 -07:00
akkadius 413538f1b5 Sending the client a spell value that is more inline with what it expects when no spell is set. 2014-09-23 14:40:09 -05:00
KayenEQ c03a70651c SE_ApplySpell and SE_TriggerSpell will now be applied based on which effect slot they are used in (instead of always before all spell effects are checked).
Note: If a spell has multiple SE_TriggerSpell effects within it. Only one will be able to trigger. (If you want multiple spells use SE_ApplySpell)
2014-09-23 09:15:02 -04:00
KayenEQ ec01e6c69b Merge git://github.com/EQEmu/Server into Development 2014-09-23 09:07:14 -04:00
KimLS 11773208df Style cleanup, clamp hunger and thirst values to correct ranges 2014-09-22 16:46:01 -07:00
KayenEQ 1f155690d8 Fix to SE_ApplyEffect - Will now trigger spell from this effect at correct time. 2014-09-22 19:42:59 -04:00
KimLS 36a29dbb9f Fix for creating characters failing at name verification 2014-09-22 15:37:11 -07:00
KayenEQ c160b8716f Kayen: Spell recourse effects / triggerable spell effects will now be applied AFTER the base spells effects have been applied (consistent with live). 2014-09-22 18:02:40 -04:00
KayenEQ 7ffce01260 Merge git://github.com/EQEmu/Server into Development 2014-09-22 17:50:35 -04:00
akkadius 1170b57fd5 Fix starting items for starting_item entries that use slot -1 to find a free slot 2014-09-22 16:23:43 -05:00
akkadius fee8a1214a Putting back in demonstar's lowercase check 2014-09-22 02:52:23 -05:00
akkadius c26a6959e4 #resetaa now covers the function of #resetaa and #refundaa
#resetaa will wipe all AA data, refund the spent points into the available points and send character to character select properly
Removed #refundaa
Removed a lot of debug code for blob conversion
Changed status logging for loads/saves to Debug category
2014-09-22 01:00:28 -05:00
akkadius 837b9b7ec7 NoRentExpired character_ reference 2014-09-21 23:54:52 -05:00
akkadius a5a8bfb0f4 Bye bye commented old junk 2014-09-21 23:48:51 -05:00
akkadius 69bddef5a0 Merge branch 'master' of https://github.com/EQEmu/Server 2014-09-21 23:35:27 -05:00
akkadius 7d242045ec Another merge aftermath overwriting character_data reference to old table 2014-09-21 23:34:53 -05:00
JJ c3035fdf41 Merge branch 'master' of https://github.com/EQEmu/Server 2014-09-21 20:03:09 -04:00
JJ e34c47414f Consistent directory locations under common. 2014-09-21 20:02:01 -04:00
akkadius 909dda7c09 Array iter fix 2014-09-21 19:01:50 -05:00
KimLS 22ab145f19 Merge branch 'master' of github.com:EQEmu/Server 2014-09-21 15:59:24 -07:00
KimLS cd8e30a2ec Bug with MySQLRequestResult 2014-09-21 15:59:02 -07:00
akkadius 03be6b2b6b Debug message adjustments 2014-09-21 16:24:06 -05:00
akkadius cda2217634 .......................................... 2014-09-21 04:26:26 -05:00
KimLS 4525b512ac Build fix plus future travis update 2014-09-21 02:25:05 -07:00
akkadius db0d1116f8 make travis shut up 2014-09-21 04:12:36 -05:00
akkadius 3ef5d8ef0a gcc fix <stdint.h> vs <limits> 2014-09-21 03:43:27 -05:00
akkadius 4ed88e348e Merge aftermath 2014-09-21 02:58:56 -05:00
akkadius ad29fa9cfa Merge remote-tracking branch 'remotes/origin/master' into blob_conversion
Conflicts:
	changelog.txt
	common/database.cpp
	world/client.cpp
	world/zoneserver.cpp
	zone/command.cpp
2014-09-21 02:32:31 -05:00
akkadius 388c4bc574 Fix where if players instance is expired when logging back into it, they will get sent properly to bind. Issue was players player profile instance ID did not match the bind instance ID. 2014-09-21 02:27:57 -05:00
KimLS b4f3993616 Should compile on gcc now 2014-09-20 23:56:04 -07:00
akkadius f9366553a3 Blob changelog.txt 2014-09-21 01:27:05 -05:00
KimLS 9733f04c9c Merge of changelog, how i hate thee 2014-09-20 15:10:33 -07:00
KimLS 7140a2054f Ban and suspend commands now require a reason that is recorded in the DB 2014-09-20 15:09:43 -07:00
Michael Cook (mackal) 1049e48aca Add Spells:SHDProcIDOffByeOne to support newer spell files
In June 2009 SoE stopped doing a +1 to the base for SHD procs
So UF+ spell files were not working, set this to false to support these spell files
2014-09-20 16:58:35 -04:00
Michael Cook (mackal) 33b79a3588 Limit character length to 15 (the client doesn't let you enter more) 2014-09-20 15:59:34 -04:00
Michael Cook (mackal) f82699c39b Fix crash in SendEnterWorld on illegally long names 2014-09-20 15:55:20 -04:00
Michael Cook (mackal) 15eaf4e6d1 Fix issue with not online message from tells 2014-09-20 14:57:15 -04:00
Michael Cook (mackal) 7621882b4e Fix toon names being allowed with lower case starting char 2014-09-20 02:46:04 -04:00
Michael Cook (mackal) 9b70b73759 Correct tell queue related messages 2014-09-19 18:17:42 -04:00
Michael Cook (mackal) 8e43134bda Add Client::Tell_StringID for tell queue messages 2014-09-19 18:16:52 -04:00
akkadius 52608d9b2d Character armor dye save fix 2014-09-18 22:46:28 -05:00
Michael Cook (mackal) d26782b093 Nuke #viewmessages 2014-09-18 22:56:16 -04:00
Michael Cook (mackal) a2368b4ea7 Implement tell queues
Default queue size 20 (World:TellQueueSize)
This doe not play well with multiple sessions and a toon crashes and relogs
Normal tells have issues as well.
2014-09-18 22:55:06 -04:00
Michael Cook (mackal) 3d6bb964df Stop nuking MySQLRequestResult Success flag 2014-09-18 14:59:50 -04:00
Michael Cook (mackal) 347ae1bc34 Fix error in 64f5bfd 2014-09-18 01:29:30 -04:00
Michael Cook (mackal) 64f5bfd5ce Make tell message a bit more understandable. 2014-09-17 23:46:54 -04:00
akkadius 3cb02e3b86 Merge branch 'blob_conversion' of https://github.com/EQEmu/Server into blob_conversion 2014-09-17 20:19:04 -05:00
akkadius 34c3b8628e Merge from master 2014-09-17 20:16:37 -05:00
KimLS 8f921ce919 Merge branch 'blob_conversion' of github.com:EQEmu/Server into blob_conversion 2014-09-17 17:45:53 -07:00
KimLS 6754dfdf6d Small sanity checks that was causing a few errors 2014-09-17 17:45:40 -07:00
akkadius 81722962cf KLS Nazi Grammar Fix 2014-09-17 14:30:19 -05:00
KayenEQ d169d95ab0 Fix for resource tap when gaining/loosing HP. 2014-09-17 12:08:01 -04:00
KayenEQ 63ca4cac5e Fix for calculation for SE_ManaAbsorbPercentDamage 2014-09-17 05:14:10 -04:00
akkadius f30ae9dd5a Some descriptor adjustments 2014-09-17 02:52:13 -05:00
akkadius eb49707779 Changed conversion routine.
At the end of conversion, character_ table will be renamed to character_old so that it does not get hit with trying to convert next world bootup
Added some file logging during the initial conversion routine
2014-09-17 02:47:13 -05:00
Michael Cook (mackal) 86c1420f6e Fix some effect value calcs and implement more
Derived from the client
2014-09-17 00:01:32 -04:00
Uleat 364ed921ce Fix for LoadBuffs() server crash 2014-09-16 22:57:15 -04:00
Michael Cook (mackal) 85e1518856 Implement spell formula 137
This is only used in the BER AA Desperation
2014-09-16 18:35:49 -04:00
akkadius 87bb5deb5c Added quest::crosszonesetentityvariablebynpctypeid(npctype_id, id, m_var)
Added quest::crosszonesignalnpcbynpctypeid(npctype_id, data)
Added $client->GetTaskActivityDoneCount(THIS, TaskID, ActivityID)
2014-09-16 16:03:27 -05:00
Michael Cook (mackal) 11ce399e0d Mob::ProcessSpecialAbilities pass by reference 2014-09-15 20:31:45 -04:00
Michael Cook (mackal) ec0989454d QGlobalCache::LoadBy to pass by reference 2014-09-15 20:11:56 -04:00
Michael Cook (mackal) e9f6031936 Merge pull request #250 from KayenEQ/Development
Nimbus Updates / Other fixes
2014-09-15 18:57:47 -04:00
KayenEQ 03485ef1e0 Nimbus effects will now be reapplied after zoning.
Nimbus effects will now fade when associated buff is removed.
Fix for ReduceAllDamage function.
2014-09-15 16:05:57 -04:00
Michael Cook (mackal) e256175ce6 Style nits 2014-09-14 16:00:18 -04:00
Michael Cook (mackal) 0f662bf70c Fix ZoneDatabase::LoadTraderItem not returning anything valid 2014-09-14 15:58:08 -04:00
Michael Cook (mackal) 4c959159c2 Fix rogues not starting with Thieves' Cant 2014-09-13 03:20:43 -04:00
Michael Cook (mackal) d51241720a Fix attack_delay for real 2014-09-12 13:10:03 -04:00
Michael Cook (mackal) 873d343529 Fix ZoneDatabase::GetNPCType nuking attack_delay changes 2014-09-12 11:57:09 -04:00
Michael Cook (mackal) 95969ce67b Fix ZoneDatabase::GetZoneCFG for real 2014-09-11 18:28:25 -04:00
Michael Cook (mackal) bd5cdf502e Fix ZoneDatabase::GetZoneCFG errors 2014-09-11 18:24:40 -04:00
Michael Cook (mackal) c6a7d5a96c Revert "GetAccountInfoForLogin_result converted to MySQLRequestResult"
This reverts commit 8369570b50.

Conflicts:
	zone/zonedb.h
2014-09-11 16:57:00 -04:00
Michael Cook (mackal) 6bc4ecf390 Revert "LoadFactionValues converted to QueryDatabase"
This reverts commit 2df823d2db.
2014-09-11 16:56:15 -04:00
Michael Cook (mackal) c94ceb5b1d Revert "LoadFactionValues_result converted to MySQLRequestResult"
This reverts commit 2e84781594.
2014-09-11 16:55:58 -04:00
Akkadius e390531dcd Initial character creation escape sequences
Added initial skill/language/bind saves to character creation
2014-09-11 03:14:34 -05:00
Alex bb702335e8 Merge pull request #247 from KayenEQ/Development
Development
2014-09-11 00:21:45 -07:00
Alex 863c0c5b58 Merge pull request #241 from addtheice/RunQueryToDatabaseQuery_zone_titles
Run query to database query zone titles
2014-09-11 00:21:00 -07:00
Alex 76e280da4e Merge pull request #239 from addtheice/RunQueryToDatabaseQuery_zone_waypoints
GetHighestGrid converted to QueryDatabase
2014-09-11 00:19:43 -07:00
Alex bcca35b7b7 Merge pull request #238 from addtheice/RunQueryToDatabaseQuery_zone_guild_mgr
AddItem converted to QueryDatabase
2014-09-11 00:18:57 -07:00
Alex 65abaade88 Merge pull request #237 from addtheice/RunQueryToDatabaseQuery_zone_guild
Run query to database query zone guild
2014-09-11 00:18:21 -07:00
Alex 8020e921aa Merge pull request #234 from addtheice/RunQueryToDatabaseQuery_queryserv_database
Run query to database query queryserv database
2014-09-11 00:17:56 -07:00
Alex f2f5b4c1ad Merge pull request #222 from addtheice/RunQueryToDatabaseQuery_zone_client
Run query to database query zone client
2014-09-11 00:16:37 -07:00
Alex 5c6f9fcdc4 Merge pull request #215 from addtheice/RunQueryToDatabaseQuery_zone_zonedb
Run query to database query zone zonedb
2014-09-11 00:16:15 -07:00
akkadius d7dc733480 Small db changes 2014-09-11 00:44:12 -05:00
KimLS 9e243a2426 bestz will no longer scale off of model size, also it adjusts up less extremely in general. Fixed super duper attack speed on command spawned npcs 2014-09-10 22:33:30 -07:00
Arthur Ice 9a889802d3 merge upstream. yet again 2014-09-09 21:26:26 -07:00
Michael Cook (mackal) 1420987c4c Fix copy paste error 2014-09-10 00:07:16 -04:00
Michael Cook (mackal) ed4d954ba8 Added attackdelay to #npcedit
Also changelog!
2014-09-10 00:05:00 -04:00
Michael Cook (mackal) 881f937a35 Change scale of GetPermaHaste() 2014-09-09 22:50:50 -04:00
Michael Cook (mackal) ed4e762f03 Change NPCs to have their attack delay set in DB
This gives us a much more straight forward way of setting mob
attack delay with respect to live.

The attack_delay column is in 10ths of seconds, just like weapons are
The attack_speed is left for references for now.
2014-09-09 22:42:54 -04:00
Michael Cook (mackal) fa1e33783a Split Mob::SetAttackTimer into Client and NPC methods
This was the easiest way to NPCs delay settings to be sane in the database.
The functions are cleaner since there is no specific logic to change
behavior depending on if they're a client or not.
2014-09-09 22:13:30 -04:00
akkadius 0c38b46bf1 Remove namespace std 2014-09-09 16:15:25 -05: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
Michael Cook (mackal) 2fa31799f6 Port slow fixes to bots 2014-09-09 17:02:05 -04:00
Michael Cook (mackal) 6c3d5c713c Fix slow effect on NPC special attack reuse timers 2014-09-09 15:34:30 -04:00
Michael Cook (mackal) f16beddf6e Increase NPC bash/kick delay by 3 (8 total by default) 2014-09-09 15:32:02 -04:00
Michael Cook (mackal) 506b3ca4a0 Fix slow calculation
Full details: http://www.eqemulator.org/forums/showthread.php?t=38734
2014-09-08 21:43:25 -04:00
KimLS 80242bd250 Strange crash hack/workaround that occured on peq 2014-09-08 17:02:37 -07:00
KimLS 7f7f99cbe3 BestZ will now adjust for model size when used to adjust movement z 2014-09-08 16:45:20 -07:00
KimLS 579294fbf0 Fixed many bugs with partial resist calculations, targets with higher resist should have a more natural curve when it comes to resisting spells 2014-09-08 03:04:22 -07:00
KimLS a3b54e5cae Fix for forage crash 2014-09-07 22:41:42 -07:00
akkadius b392d16808 Fixed ROF Augment item dupe with not checking for available slots properly and adding items to the virtual instance 2014-09-07 05:43:37 -05:00
akkadius 1f9597a9e2 Fix for item dupe via RoF augmenting 2014-09-07 05:35:19 -05: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 a14371ba5c Removed debugging
Added player profile data loading safety net checking
2014-09-07 04:00:56 -05:00
KayenEQ 616e13acac Calc fix for spell power distance mod effect. 2014-09-07 03:43:34 -04:00
KayenEQ b50f660339 Merge git://github.com/EQEmu/Server into Development 2014-09-07 03:40:12 -04: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
KimLS 84310ec8f0 Merge branch 'master' of github.com:EQEmu/Server 2014-09-06 17:09:33 -07:00
KimLS ffed5a9e22 SQL Injection fix on inspect message setting 2014-09-06 16:43:36 -07:00
Michael Cook (mackal) 92c9ff6e53 Fix issue with hpregen in command_npcedit 2014-09-06 17:58:42 -04:00
KimLS 986a424322 Fix for perl api illusion 2014-09-06 14:31:02 -07:00
Uleat c3e7c48939 Fix ItemTimerCheck() range criteria typo 2014-09-06 16:19:32 -04:00
Arthur Ice b2aa3262a9 Update client.cpp
fixed bug with BEGIN_GENERAL to MainCursor being skipped before since it was starting at GENERAL_BAGS_BEGIN
2014-09-06 12:56:35 -07:00
Arthur Ice b1587f0326 Delete client.cpp.orig
not supposed to be in there.
2014-09-06 12:51:50 -07: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
Uleat 281b321237 Changed trade behavior to prioritize all main slots before sub slots 2014-09-06 12:45:45 -04:00
KimLS ba0e4bfc1d Bizarre issue reported with SendIllusionPacket corrupting size in lua, dunno if this fixes it but fingers crossed. 2014-09-05 21:18:35 -07:00
Michael Cook (mackal) 3cda62acf4 Fix changelog [skip ci] 2014-09-05 22:38:32 -04:00
Michael Cook (mackal) 2ef43212e1 Fix size issue with Lua_Mob::SendIllusionPacket
Mob::SendIllusionPacket was expecting the size to be 0xFFFFFFFF
to default rather than -1.0f
2014-09-05 22:36:44 -04:00
Michael Cook (mackal) f69eccc42b Add missing QueryDatabase in ZoneDatabase::AddWPForSpawn 2014-09-05 21:57:34 -04:00
Michael Cook (mackal) a1e425f936 Fix indentation of ZoneDatabase::AddWPForSpawn 2014-09-05 21:57:34 -04:00
Arthur Ice 59618e0038 UnDelegateMarkNPC converted to QueryDatabase 2014-09-05 16:14:28 -07:00
Arthur Ice ef1f1562f0 DelegateMarkNPC converted to QueryDatabase 2014-09-05 16:13:50 -07:00
Arthur Ice 31177b7dc7 UnDelegatePuller converted to QueryDatabase 2014-09-05 16:04:34 -07:00
Arthur Ice 5b7aaff150 UnDelegateMainAssist converted to QueryDatabase 2014-09-05 15:58:21 -07:00
Arthur Ice b525a32b6e UndelegateMainTank converted to QueryDatabase 2014-09-05 15:54:07 -07:00
Arthur Ice 99fe610f72 DelegatePuller converted to QueryDatabase 2014-09-05 15:46:06 -07:00
Arthur Ice b5ec35e672 DelegateMainTank converted to QueryDatabase 2014-09-05 15:27:12 -07:00
Uleat 6186c3d866 Fix for gcc failure - Can't fix stupid! 2014-09-05 16:46:03 -04:00
Uleat 1d0a6bdc71 Fix for losing 2nd and 3rd cursor items after zoning 2014-09-05 16:16:56 -04:00
Arthur Ice 15fa2b371c LearnMembers converted to QueryDatabase 2014-09-05 10:45:36 -07:00
Michael Cook (mackal) da121137e5 Fix logging macros
macros should be fully wrapped in do { ... } while(false) to prevent
any accidental coding issues (like else being eaten!!!)
2014-09-05 13:26:44 -04:00
Michael Cook (mackal) c953f1dee1 Merge pull request #244 from addtheice/merc_stance_fix
Fix iterator on mercstance crash bug
2014-09-05 02:30:13 -04:00
Arthur Ice 32b595afb4 Fix iterator on mercstance crash bug 2014-09-04 23:15:20 -07:00
Arthur Ice 0799b47c9c AddSpawnFromSpawnGroup converted to QueryDatabase 2014-09-04 19:40:19 -07:00
Arthur Ice a216672443 Moved add spawn from spawn group command case (5) from NPCSpawnDB into method AddSpawnFromSpawnGroup 2014-09-04 18:13:23 -07:00
Arthur Ice d755aa48bc DeleteSpawnRemoveFromNPCTypeTable converted to QueryDatabase 2014-09-04 17:15:09 -07:00
Arthur Ice f7ecfe7257 DeleteSpawnLeaveInNPCType converted to QueryDatabase 2014-09-04 17:01:34 -07:00
Arthur Ice 89a0bbb8bf Moved deleting npc spawn command case (3) from NPCSpawnDB into method DeleteSpawnLeaveInNPCTypeTable 2014-09-04 16:35:01 -07:00
Arthur Ice 822c8425bd UpdateNPCTypeAppearance converted to QueryDatabase 2014-09-04 16:13:43 -07:00
Arthur Ice a6b57a3423 Moved updating npc type appearance command case (2) from NPCSpawnDB into method UpdateNPCTypeAppearance 2014-09-04 15:32:41 -07:00
Arthur Ice 6d4f7413a5 AddNewNPCSpawnGroupCommand converted to QueryDatabase 2014-09-04 15:01:42 -07:00
Arthur Ice 3e041052ee Moved add new NPC spawngroup command case (1) from NPCSpawnDB into method AddNewNPCSpawnGroupCommand 2014-09-04 14:47:02 -07:00
Arthur Ice 444174ef57 CreateNewNPCCommand converted to QueryDatabase 2014-09-04 12:26:05 -07:00
Arthur Ice 970f7e01a9 Moved create new NPC command case (0) from NPCSpawnDB into method CreateNewNPCCommand 2014-09-04 10:08:02 -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
Arthur Ice 221c667a23 saylink converted to QueryDatabase 2014-09-03 23:26:09 -07:00
Arthur Ice b710c41c34 clearspawntimers converted to QueryDatabase 2014-09-03 23:17:20 -07:00
Arthur Ice 8825218361 showgrid converted to QueryDatabase 2014-09-03 23:14:16 -07:00
Arthur Ice 1bb5c4e0d8 delglobal converted to QueryDatabase 2014-09-03 23:10:42 -07:00
Arthur Ice 58343480ff InsertQuestGlobal converted to QueryDatabase 2014-09-03 23:07:28 -07:00
Arthur Ice 399bf96a0c RemoveTitle converted to QueryDatabase 2014-09-03 21:05:31 -07:00
Arthur Ice b7c409e11b CheckTitle converted to QueryDatabase 2014-09-03 21:03:00 -07:00
Arthur Ice fd08e9f2ad EnableTitle converted to QueryDatabase 2014-09-03 21:00:15 -07:00
Uleat 37d3daaf9a Client timer issue fix 2014-09-03 23:59:55 -04:00
Arthur Ice 9a4d01da8f CreateNewPlayerSuffix converted to QueryDatabase 2014-09-03 20:57:34 -07:00
Arthur Ice 81cf748b2b CreateNewPlayerTitle converted to QueryDatabase 2014-09-03 20:52:00 -07:00
Michael Cook (mackal) 22742b6a25 Add #shownumhits workaround command to show numhits 2014-09-03 23:50:23 -04:00
Arthur Ice 7d8d96c049 LoadTitles converted to QueryDatabase 2014-09-03 20:45:38 -07:00
Arthur Ice 081905dbc3 SendBuyerResults converted to QueryDatabase 2014-09-03 20:34:07 -07:00
Arthur Ice a8b8f71092 ShowBuyLines converted to QueryDatabase 2014-09-03 20:24:30 -07:00
Arthur Ice 36c1d88eac SendBazaarResults converted to QueryDatabase 2014-09-03 20:18:07 -07:00
Arthur Ice 6eba672013 SendBazaarWelcome converted to QueryDatabase 2014-09-03 19:39:50 -07:00
Arthur Ice 091c8ea5f1 BazaarAuditTrail converted to QueryDatabase 2014-09-03 19:33:20 -07:00
Arthur Ice f5e49441b6 GetHighestGrid converted to QueryDatabase 2014-09-03 19:28:25 -07:00
Arthur Ice 610f3ed37f AddItem converted to QueryDatabase 2014-09-03 19:17:55 -07:00
Arthur Ice f215874486 SetGuildDoor converted to QueryDatabase 2014-09-03 19:10:27 -07:00
Arthur Ice 8e529105cf CheckGuildDoor converted to QueryDatabase 2014-09-03 19:07:49 -07:00
Arthur Ice 95dc0c5fc8 GetEquipmentColor converted to QueryDatabase 2014-09-03 18:49:47 -07:00
Arthur Ice 73c8d3d09d ProcessBoyCommands converted to QueryDatabase 2014-09-03 18:46:41 -07:00
Arthur Ice 049a0bf787 LoadGuildMembership converted to QueryDatabase 2014-09-03 18:41:21 -07:00
Arthur Ice 2095380ba4 SetBotGuildMembership converted to QueryDatabase 2014-09-03 18:31:26 -07:00
Arthur Ice 081192d29e GetBotOwnerCharacterID converted to QueryDatabase 2014-09-03 18:24:30 -07:00
Arthur Ice 2429980fd5 CreatedBotCount converted to QueryDatabase 2014-09-03 18:21:17 -07:00
Arthur Ice 0ac238d762 AllowedBotSpawns converted to QueryDatabase 2014-09-03 18:16:22 -07:00
Arthur Ice 45320fd8ec GetBotGroupLeaderIdByBotGroupName converted to QueryDatabase 2014-09-03 18:13:15 -07:00
Arthur Ice 6d33a13e23 GetBotGroupIdByBotGroupName converted to QueryDatabase 2014-09-03 18:09:53 -07:00
Arthur Ice 52d64d03a6 CanLoadBotGroup converted to QueryDatabase 2014-09-03 18:06:05 -07:00
Arthur Ice fe6e289606 DoesBotGroupNameExist converted to QueryDatabase 2014-09-03 18:01:32 -07:00
Arthur Ice 26569ac51d GetBotGroupListByBotOwnerCharacterId converted to QueryDatabase 2014-09-03 17:57:10 -07:00
Arthur Ice 38d04931ba LoadBotGroup converted to QueryDatabase 2014-09-03 17:52:06 -07:00
Arthur Ice 96cf3d967f DeleteBotGroup converted to QueryDatabase 2014-09-03 17:47:38 -07:00
Arthur Ice 36325226eb SaveBotGroup converted to QueryDatabase 2014-09-03 17:43:18 -07:00
Arthur Ice 6410f52c9c ListSpawnedBots converted to QueryDatabase 2014-09-03 17:36:59 -07:00
Arthur Ice 7ae14fffd0 GetBotList converted to QueryDatabase 2014-09-03 17:32:55 -07:00
Arthur Ice d213e3b106 GetGroupedBotsByGroupID converted to QueryDatabase 2014-09-03 17:26:51 -07:00
Arthur Ice ba612f91c7 LoadBot converted to QueryDatabase 2014-09-03 17:18:50 -07:00
Arthur Ice 8312a8cf3b GetBotIDByBotName converted to QueryDatabase 2014-09-03 17:11:06 -07:00
Arthur Ice 390dcc9a88 GetBotItemsCount converted to QueryDatabase 2014-09-03 17:07:11 -07:00
Arthur Ice cd1b45f0d6 GetBotItemBySlot converted to QueryDatabase 2014-09-03 17:04:21 -07:00
Arthur Ice b8caa5dc31 GetBotItems converted to QueryDatabase 2014-09-03 16:52:18 -07:00
Arthur Ice 53572b4d13 RemoveBotItemBySlot converted to QueryDatabase 2014-09-03 16:43:59 -07:00
Arthur Ice cf0c773002 SetBotItemInSlot converted to QueryDatabase 2014-09-03 16:40:31 -07:00
Arthur Ice 515fe8d9e5 DeleteBot converted to QueryDatabase 2014-09-03 16:31:08 -07:00
Arthur Ice 06d1bd632b SaveTimers converted to QueryDatabase 2014-09-03 16:31:08 -07:00
Arthur Ice 89f34246f0 LoadTimers converted to QueryDatabase 2014-09-03 16:31:08 -07:00
Arthur Ice 7d8e128b5f SaveStance converted to QueryDatabase 2014-09-03 16:31:08 -07:00
Arthur Ice 14c642a3f7 LoadStance converted to QueryDatabase 2014-09-03 16:31:07 -07:00
Arthur Ice a67255475c DeletePetStats converted to QueryDatabase 2014-09-03 16:31:07 -07:00
Arthur Ice 04045dfc27 DeletePetItems converted to QueryDatabase 2014-09-03 16:31:07 -07:00
Arthur Ice 510a51e564 DeletePetBuffs converted to QueryDatabase 2014-09-03 16:31:07 -07:00
Arthur Ice 54b2c50109 SavePetItems converted to QueryDatabase 2014-09-03 16:31:07 -07:00
Arthur Ice fe753f05df SavePetBuffs converted to QueryDatabase 2014-09-03 16:31:07 -07:00
Arthur Ice ab76783f8b SavePetStats converted to QueryDatabase 2014-09-03 16:31:07 -07:00
Arthur Ice 364a51b119 LoadPetItems converted to QueryDatabase 2014-09-03 16:31:07 -07:00
Arthur Ice a486db5e95 LoadPetBuffs converted to QueryDatabase 2014-09-03 16:31:06 -07:00
Arthur Ice c8e7d9e005 LoadPetStats converted to QueryDatabase 2014-09-03 16:31:06 -07:00
Arthur Ice 93aa690a6d GetPetSaveId converted to QueryDatabase 2014-09-03 16:31:06 -07:00
Arthur Ice 87f1f78b67 LoadBuffs converted to QueryDatabase 2014-09-03 16:31:06 -07:00
Arthur Ice 0574a3db86 SaveBuffs converted to QueryDatabase 2014-09-03 16:31:06 -07:00
Arthur Ice 0178f3c9bb Save converted to QueryDatabase 2014-09-03 16:31:06 -07:00
Arthur Ice 9eb3907d45 IsBotNameValid converted to QueryDatabase 2014-09-03 16:31:06 -07:00
SecretsOTheP 891952eb79 Bot fixes for previous commit 2014-09-03 18:34:31 -04:00
SecretsOTheP e6a0b01f37 Identified the routines needed to augment items in RoF. Currently, only Insert and Remove are supported. Swap and Destroy do not work due to missing functions related to the cursor. 2014-09-03 18:25:21 -04:00
Arthur Ice 118c2a9db9 LoadAAs converted to QueryDatabase 2014-09-03 13:49:04 -07:00
SecretsOTheP 64c324a42b changelog.txt 2014-09-02 22:09:38 -04:00
SecretsOTheP f909e76260 Merge branch 'master' of https://github.com/EQEmu/Server 2014-09-02 22:08:47 -04:00
SecretsOTheP b7dfdc5060 Oops. 2014-09-02 22:07:49 -04:00
Uleat e25239a50d Merge branch 'master' of https://github.com/EQEmu/Server 2014-09-02 21:20:06 -04:00
Uleat 76d3edc534 Changed #loc to report the same precision as /loc for Cartesians 2014-09-02 21:19:30 -04:00
SecretsOTheP 7301182b3e Merge branch 'master' of https://github.com/EQEmu/Server
Conflicts:
	changelog.txt
2014-09-02 21:18:30 -04:00
SecretsOTheP 832e5e90d1 Secrets: Identified OP_GuildPromote for RoF clients.
Secrets: Fixed promotion, demotion, transferring a leader and displaying of client ranks in the Rain of Fear client. The rain of fear client, as such, will only have 3 ranks like the other clients, but supports a theoretical 8 ranks later.
Secrets/Akkadius: Fixed an issue involving character name lookup in the new DB code.
2014-09-02 21:16:20 -04:00
Michael Cook (mackal) 7ddaabee30 Merge pull request #235 from addtheice/guild_mgr_patch
Fixed bug with loading failing on Guild bank areas
2014-09-02 16:11:05 -04:00
Arthur Dene Ice 41d57ddab6 Fixed bug with loading failing on Guild bank areas 2014-09-02 12:43:56 -07:00
Michael Cook (mackal) 8dd00f5288 Fix crash issue in zone/hate_list.cpp 2014-09-02 02:39:03 -04:00
Akkadius 0a9222e1ee - 2014-09-01 23:54:15 -05:00
Akkadius e0db3c0b60 Fixed Character select to be loaded from new character data tables 2014-09-01 22:17:06 -05:00
KimLS 15f217b594 Fixed non-conforming sql files. 2014-09-01 15:48:22 -07:00
Michael Cook (mackal) 8422178233 Fix issue with requesting an adventure 2014-09-01 02:58:52 -04:00
Uleat eebe902917 Script update for opcode_handlers.py - changes in file names. 2014-09-01 00:07:21 -04:00
KimLS 04dc593df9 Various bug fixes 2014-08-31 20:27:02 -07: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 8dda7ddd04 Added the following tables to player profile automatic conversion during world bootup:
`character_bind_home`;
`character_alternate_abilities`;
`character_currency`;
`character_data`;
`character_spells`;
`character_memmed_spells`;
`character_disciplines`;
2014-08-31 05:52:36 -05:00
Akkadius 5d8ea5752d Added automatic table creation in conversion process.
More will come when more tables are added
2014-08-31 03:23:42 -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
Michael Cook (mackal) 11ed698642 (noudess) Merchants are more descriptive in their rejections 2014-08-30 01:38:49 -04:00
Arthur Ice 0996570b78 merge from upstream 2014-08-28 15:49:16 -07:00
KimLS ca84040a39 Crash fixes oh my 2014-08-28 03:47:28 -07:00
KimLS 467afc86af Merge branch 'master' of github.com:EQEmu/Server 2014-08-28 03:18:02 -07:00
KimLS 19271f90a4 Crash fixes 2014-08-28 03:17:47 -07:00
Arthur Ice 0a9732a267 LogMerchantTransaction converted to QueryDatabase 2014-08-28 00:10:55 -07:00
Arthur Ice 1bc06c9c24 LogPlayerMove converted to QueryDatabase 2014-08-28 00:05:28 -07:00
Arthur Ice e0acc937b3 LogPlayerDelete converted to QueryDatabase 2014-08-28 00:04:20 -07:00
Arthur Ice 3a10a0129a LogPlayerNPCKill converted to QueryDatabase 2014-08-27 23:53:37 -07:00
Arthur Ice 18dbcf16cc LogPlayerHandin converted to QueryDatabase 2014-08-27 23:52:36 -07:00
Arthur Ice bed8dc7d34 LogPlayerTrade converted to QueryDatabase 2014-08-27 23:52:35 -07:00
Arthur Ice a0fc9844fd AddSpeech converted to QueryDatabase 2014-08-27 23:21:09 -07:00
Michael Cook (mackal) 9d6dc47cf4 Fix crash with MySQLRequestResult::ErrorMessage() 2014-08-28 02:15:37 -04:00
Michael Cook d42d77d3ef Merge pull request #233 from addtheice/master
Fixed crash on expire mail success, messages where switched accidentally
2014-08-28 02:13:27 -04:00
Arthur Ice 9041891557 Fixed crash on expire mail success, messages where switched accidentally 2014-08-27 22:57:03 -07:00
akkadius dedd1fc70d NPC::ModifyNPCStat function bloat cleanup 2014-08-27 14:26:36 -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
Alex 9f4167a65c Merge pull request #230 from addtheice/RunQueryToDatabaseQuery_zone_guild_mgr
Run query to database query zone guild mgr
2014-08-26 17:36:46 -07:00
Alex 085b021587 Merge pull request #226 from addtheice/RunQueryToDatabaseQuery_zone_spawngroup
Run query to database query zone spawngroup
2014-08-26 17:36:17 -07:00
Alex 5a65fd4207 Merge pull request #227 from addtheice/RunQueryToDatabaseQuery_zone_spawn2
Run query to database query zone spawn2
2014-08-26 17:36:03 -07:00
Alex 0f321b3a69 Merge pull request #228 from addtheice/RunQueryToDatabaseQuery_zone_client_packet
Run query to database query zone client packet
2014-08-26 17:35:51 -07:00
Alex 53c7b789f2 Merge pull request #229 from KayenEQ/Development
Added new param  to special attack NPC_NO_CHASE
2014-08-26 17:35:36 -07:00
Alex 850ea7789e Merge pull request #225 from addtheice/RunQueryToDatabaseQuery_zone_spells
SpellGlobalCheck converted to QueryDatabase
2014-08-26 17:35:21 -07:00
Alex c3a3dc19a7 Merge pull request #224 from addtheice/RunQueryToDatabaseQuery_zone_zone
LoadStaticZonePoints converted to QueryDatabase
2014-08-26 17:35:10 -07:00
Alex 2606592f32 Merge pull request #223 from addtheice/RunQueryToDatabaseQuery_zone_doors
Run query to database query zone doors
2014-08-26 17:34:53 -07:00
Alex 5c3791631a Merge pull request #221 from addtheice/RunQueryToDatabaseQuery_ucs_database
Run query to database query ucs database
2014-08-26 17:34:36 -07:00
Alex 4c9108a906 Merge pull request #210 from addtheice/RunQueryToDatabaseQuery_zone_waypoints
Run query to database query zone waypoints
2014-08-26 17:34:23 -07:00
Uleat efbcaf6f64 Merge pull request #231 from EQEmu/trade_stacking
'Smart' Trade Transfers
2014-08-26 19:04:01 -04:00
Uleat 18a4f831be Tweaked QS code for Client::FinishTrade() and QueryServ handlers. 2014-08-26 06:37:40 -04:00
KimLS 6597967acd Changed void* to EQEmu::Any in quest interface. Been meaning to change from void* for a while to a structure that data hides instead. 2014-08-25 22:59:52 -07:00
KimLS 24825677dc Merge branch 'master' of github.com:EQEmu/Server 2014-08-25 22:31:15 -07:00
KimLS 70d5983562 Added eqemu::any 2014-08-25 22:31:02 -07:00
Uleat d4a9fed45e Added QS code to Client::FinishTrade() 2014-08-25 22:29:00 -04:00
Arthur Ice a6b923a22e UpdateItemQuantity converted to QueryDatabase 2014-08-25 15:10:46 -07:00
Arthur Ice 1e87086471 DeleteItem converted to QueryDatabase 2014-08-25 12:43:14 -07:00
Arthur Ice c3fdbfe904 SetPermissions converted to QueryDatabase 2014-08-25 12:33:09 -07:00
Arthur Ice 00852063c2 Promote converted to QueryDatabase 2014-08-25 12:15:06 -07:00
KayenEQ 44dcf7af7d Merge git://github.com/EQEmu/Server into Development 2014-08-25 09:23:23 -04:00
Uleat d525d040fe Merge branch 'master' of https://github.com/EQEmu/Server into trade_stacking 2014-08-24 23:40:15 -04:00
Michael Cook (mackal) 67a774dd9b Remove extra c_str() non-sense now that the bug is fixed 2014-08-24 22:28:37 -04:00
Uleat ff7ff658e0 Merge branch 'master' of https://github.com/EQEmu/Server into trade_stacking
Conflicts:
	changelog.txt
2014-08-24 21:38:01 -04:00
Uleat 6100da75c5 Merge branch 'master' of https://github.com/EQEmu/Server into shutdown_crash 2014-08-24 19:59:34 -04:00
KimLS a612c3c006 Idiot kls missed a file 2014-08-24 16:30:02 -07:00
KimLS 412835d7fa Basic string tests, plus fix for StringFormat returning a std::string that was just very subtley malformed. 2014-08-24 16:26:51 -07:00
Uleat 6a4f7466f0 Merge branch 'master' of https://github.com/EQEmu/Server into shutdown_crash
Conflicts:
	changelog.txt
2014-08-24 19:24:07 -04:00
KayenEQ b3ea7ecd0d Added param to special attack NPC_NO_CHASE
Param 2 = If set will disable LOS check
2014-08-24 19:11:41 -04:00
Arthur Ice 50e6d0d256 Load converted to QueryDatabase 2014-08-24 16:03:48 -07:00
Arthur Ice f948786f6a Handle_OP_GMSearchCorpse converted to QueryDatabase 2014-08-24 14:21:33 -07:00
Arthur Ice 4d0179d525 Handle_OP_SetStartCity converted to QueryDatabase 2014-08-24 14:13:06 -07:00
Arthur Ice c851cd3f12 Handle_OP_ItemLinkClick converted to QueryDatabase 2014-08-24 14:06:52 -07:00
Arthur Ice b6875564d4 GetCondition converted to QueryDatabase 2014-08-24 13:50:23 -07:00
Arthur Ice 0240c61952 LoadSpawnConditions converted to QueryDatabase 2014-08-24 13:31:55 -07:00
Arthur Ice 7864a5285d LoadDBEvent converted to QueryDatabase 2014-08-24 13:19:30 -07:00
Arthur Ice 538921701c UpdatedDBCondition converted to QueryDatabase 2014-08-24 13:19:30 -07:00
Arthur Ice 3cf4d4af1b UpdateDBEvent converted to QueryDatabase 2014-08-24 13:11:17 -07:00
Arthur Ice c70c7e13ec CreateSpawn2 converted to QueryDatabase 2014-08-24 13:07:15 -07:00
Arthur Ice 9980dfe80e LoadSpawn2 converted to QueryDatabase 2014-08-24 13:03:45 -07:00
Arthur Ice 42a51eb373 PopulateZoneSpawnList converted to QueryDatabase 2014-08-24 13:00:39 -07:00
Arthur Ice 932dd836d0 LoadSpawnGroupsByID converted to QueryDatabase 2014-08-24 12:54:06 -07:00
Arthur Ice adf36bf912 LoadSpawnGroups converted to QueryDatabase 2014-08-24 12:46:02 -07:00
Arthur Ice e7ef4b5484 SpellGlobalCheck converted to QueryDatabase 2014-08-24 12:37:44 -07:00
Arthur Ice 3d1521857e LoadStaticZonePoints converted to QueryDatabase 2014-08-24 12:21:16 -07:00
Arthur Ice 9707b53df2 LoadDoors converted to QueryDatabase 2014-08-24 12:14:28 -07:00
Arthur Ice 5d6d489889 GetDoorsDBCountPlusOne converted to QueryDatabase 2014-08-24 12:08:39 -07:00
Arthur Ice 8f4e2e99db GetDoorsCountPlusOne converted to QueryDatabase 2014-08-24 12:04:15 -07:00
Arthur Ice 377c6a87a2 GetDoorsCount converted to QueryDatabase 2014-08-24 11:53:28 -07:00
Alex b36cc3ab08 Merge pull request #209 from addtheice/RunQueryToDatabaseQuery_zone_tribute
Run query to database query zone tribute
2014-08-24 11:18:38 -07:00
Alex 339b8e37a6 Merge pull request #208 from addtheice/RunQueryToDatabaseQuery_zone_trap
Run query to database query zone trap
2014-08-24 11:18:25 -07:00
Alex 8f3e9b4a7a Merge pull request #218 from KayenEQ/Development
Implemented NPC special ability 40 'NPC_CHASE_DISTANCE'
2014-08-24 11:17:52 -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
akkadius 3b048ee8a2 Character creation process crash fix (world) and query cleanup 2014-08-24 07:13:15 -05:00
Uleat 52ae78709b First attempt at fixing zone shutdown crashes. (Mob timer processing accessing released resources.) 2014-08-24 05:42:43 -04:00
Arthur Ice dec290ba96 Merge branch 'master' of git://github.com/EQEmu/Server into RunQueryToDatabaseQuery_ucs_database 2014-08-24 02:07:19 -07:00
akkadius cef1dfd0c0 Query Fix for SendQuery (Temporary) 2014-08-24 02:50:39 -05:00
Arthur Ice 3262bee6c5 ExpeditionSay converted to QueryDatabase 2014-08-23 23:26:45 -07:00
Arthur Ice 2dbd616725 SetAccountFlag converted to QueryDatabase 2014-08-23 23:23:26 -07:00
Arthur Ice eb98563fa1 LoadAccountFlags converted to QueryDatabase 2014-08-23 23:20:55 -07:00
Arthur Ice 7f92e96ae7 TryReward converted to QueryDatabase 2014-08-23 23:15:49 -07:00
Arthur Ice a48138dfd6 SendRewards converted to QueryDatabase 2014-08-23 23:05:58 -07:00
Michael Cook (mackal) 0b486b3f76 strlen to std::string::length
Minor style nits!
2014-08-24 02:02:42 -04:00
Arthur Ice 46980e5260 DiscoverItem converted to QueryDatabase 2014-08-23 22:59:58 -07:00
Arthur Ice 44f9e5495e IsDiscovered converted to QueryDatabase 2014-08-23 22:59:53 -07:00
Arthur Ice 97f59282cf KeyRingAdd converted to QueryDatabase 2014-08-23 22:49:27 -07:00
Michael Cook (mackal) b112dfe860 Fix gcc compile error 2014-08-24 01:48:29 -04:00
Arthur Ice 2a4a5b1beb KeyRingLoad converted to QueryDatabase 2014-08-23 22:46:29 -07:00
Arthur Ice 232d61b983 GetFriendAndIgnore converted to QueryDatabase 2014-08-23 22:34:14 -07:00
akkadius 4e10b77980 2nd Nix fix 2014-08-24 00:28:45 -05:00
Arthur Ice c1469a3a8e RemoveFriendOrIgnore converted to QueryDatabase 2014-08-23 22:22:49 -07:00
Arthur Ice 9d5f427f57 AddFriendOrIgnore converted to QueryDatabase 2014-08-23 22:20:16 -07:00
akkadius cdd1e17348 Cosmetic log fix from merge 2014-08-24 00:17:31 -05:00
Arthur Ice 20e978b676 ExpiredMail converted to QueryDatabase 2014-08-23 22:16:47 -07:00
akkadius 163906e0f0 Nix fix 2014-08-24 00:09:09 -05:00
Arthur Ice c9bd662b57 SetMessageStatus converted to QueryDatabase 2014-08-23 22:07:04 -07:00
Arthur Ice 8529384b00 SendMail converted to QueryDatabase 2014-08-23 22:01:00 -07:00
akkadius 7f89191ffc Changed zone process window title format, example: 'crushbone :: clients: 6 inst_id: 1 inst_ver: 0 :: port: 7015'
Most of the following changes are QueryServ related, fully implemented its original functionality to be able to offload
	intensive or metric based logging to a remote server process that could exist on another server entirely
Implemented Player Event Logging Types (Go to table `qs_player_events`):
		1 = Player_Log_Quest,
		2 = Player_Log_Zoning,
		3 = Player_Log_Deaths,
		4 = Player_Log_Connect_State,
		5 = Player_Log_Levels,
		6 = Player_Log_Keyring_Addition,
		7 = Player_Log_QGlobal_Update,
		8 = Player_Log_Task_Updates,
		9 = Player_Log_AA_Purchases,
		10 = Player_Log_Trade_Skill_Events,
		11 = Player_Log_Issued_Commands,
		12 = Player_Log_Money_Transactions,
		13 = Player_Log_Alternate_Currency_Transactions,
		- All QueryServ logging will be implemented with a front end in EoC 2.0 very soon
Changed all QS Error related logging to 'QUERYSERV__ERROR'
(Natedog) (Crash Fix) Legacy MySQL bug revert for loading AA's COALESCE( from COALESCE (
Implemented Perl Quest objects (LUA still needed to be exported):
	- quest::qs_send_query("MySQL query") - Will send a raw query to the QueryServ process, useful for custom logging
	- quest::qs_player_event(char_id, event_desc); - Will process a quest type event to table `qs_player_events`
Added MySQL Tables:
	- `qs_player_aa_rate_hourly`
	- `qs_player_events`
	- Source table structures from:
		- utils\sql\git\queryserv\required\08_23_2014_player_events_and_player_aa_rate_hourly
		To get the complete QueryServ schema, source from here:
		- utils\sql\git\queryserv\required\Complete_QueryServ_Table_Structures.sql
Added rules for each logging type, source rules here with them enabled by default:
	- utils\sql\git\queryserv\required\Complete_QueryServ_Rules_Enabled.sql
Spawn related logging cleanup
General code cleanup
Added queryserv.cpp and queryserv.h with QueryServ class
2014-08-23 23:59:20 -05:00
Arthur Ice aaf5f8c930 SendBody converted to QueryDatabase 2014-08-23 21:52:07 -07:00
Arthur Ice 2bdc44dfb2 SendHeaders converted to QueryDatabase 2014-08-23 21:48:14 -07:00
Arthur Ice 6e7136ea18 SetChannelOwner converted to QueryDatabase 2014-08-23 21:38:57 -07:00
Arthur Ice 7a507e8d1e SetChannelPassword converted to QueryDatabase 2014-08-23 21:34:27 -07:00
Arthur Ice 76fdfa87c1 LoadChatChannels converted to QueryDatabase 2014-08-23 21:31:26 -07:00
Arthur Ice 19486bac0d GetVariable converted to QueryDatabase 2014-08-23 21:27:18 -07:00
Arthur Ice de47755320 FindCharacter converted to QueryDatabase 2014-08-23 21:24:54 -07:00
Arthur Ice 6b90f883cd VerifyMailKey converted to QueryDatabase 2014-08-23 21:20:07 -07:00
Arthur Ice 5c640b2d40 FindAccount converted to QueryDatabase 2014-08-23 21:16:27 -07:00
Arthur Ice a568a6f194 GetAccountStatus converted to QueryDatabase 2014-08-23 21:10:30 -07:00
KayenEQ 85df09b3f2 Implemented NPC special ability 40 'NPC_CHASE_DISTANCE'
Param 0: Sets max distance you need to be away from an npc for it to chase you.
Param 1: Sets min distance you need to be from npc for it to chase you.
Usage: Ideally used with ranged attack npcs / casters who you DO NOT WANT
to chase you unless you get too close or too far or out of sight.
2014-08-23 03:21:36 -04:00
JJ 16d47a2c47 Revert accident in 089360a3a5. Looks like it was meant for 7-10 instead of 4-10. 2014-08-22 22:28:40 -04:00
Uleat 9a5d2d2bc5 Trade Stacking: BETA 2014-08-22 20:48:11 -04:00
KimLS 3b16c86007 Fix for aa effect loading. 2014-08-22 14:50:13 -07:00
Alex 7c451f8170 Merge pull request #207 from addtheice/RunQueryToDatabaseQuery_zone_zoning
Run query to database query zone zoning
2014-08-22 13:48:17 -07:00
Alex 2e1b75e95b Merge pull request #203 from addtheice/RunQueryToDatabaseQuery_zone_pets
Run query to database query zone pets
2014-08-22 13:47:59 -07:00
Alex 1cd5970649 Merge pull request #201 from addtheice/RunQueryToDatabaseQuery_zone_mob
Run query to database query zone mob
2014-08-22 13:47:48 -07:00
Alex 1bccdf57ee Merge pull request #200 from addtheice/RunQueryToDatabaseQuery_zone_merc
Run query to database query zone merc
2014-08-22 13:47:29 -07:00
Alex d03232ce1b Merge pull request #199 from addtheice/RunQueryToDatabaseQuery_zone_horse
Run query to database query zone horse
2014-08-22 13:47:07 -07:00
KimLS ba6a3ac94b Merge branch 'KayenEQ-Development' 2014-08-22 00:22:21 -07:00
KimLS 85bd837a66 Merge branch 'Development' of https://github.com/KayenEQ/Server into KayenEQ-Development 2014-08-22 00:21:11 -07:00
KimLS 264024e8fc Merge branch 'addtheice-RunQueryToDatabaseQuery_zone_zone' 2014-08-22 00:19:53 -07:00
KimLS 0d09f5d536 Merging zone 2014-08-22 00:19:43 -07:00
KimLS 840f936c2f Merge branch 'addtheice-RunQueryToDatabaseQuery_zone_AA' 2014-08-22 00:18:29 -07:00
KimLS ca380edfc8 Merge branch 'RunQueryToDatabaseQuery_zone_AA' of https://github.com/addtheice/Server into addtheice-RunQueryToDatabaseQuery_zone_AA 2014-08-22 00:17:53 -07:00
KimLS 389fa922e5 Merge branch 'addtheice-RunQueryToDatabaseQuery_zone_petitions' 2014-08-22 00:16:20 -07:00
KimLS f9423b018c Merging petitions. 2014-08-22 00:16:04 -07:00
Alex 05ccab87f3 Merge pull request #217 from KimLS/master
Renamed a bunch of files.
2014-08-22 00:07:10 -07:00
KimLS 27dec16551 Missed a file, thanks NTFS 2014-08-21 23:55:04 -07:00
KimLS 07a2cbe9a5 Renamed zone files 2014-08-21 23:46:01 -07:00
KimLS 4821ed79fb More renames, world should be done 2014-08-21 23:30:09 -07:00
KimLS 5bf49d2ef9 More renames 2014-08-21 23:05:21 -07:00
KimLS cd0824ee71 Moved some around, more renames 2014-08-21 22:43:33 -07:00
KayenEQ 8394cc9e2b Fix for NPC ranged attacks not allowing for multiple hits
if set by special attack 11, also changed paramater 0 (which was
incorrectly set as both 'amount of attacks' and 'min range'
0 = amount attacks
4 = min attack range

Fix to spell directional effect targeting.
2014-08-22 00:35:14 -04:00
KimLS 504a8b19ce Missed Mutex.h 2014-08-21 19:36:50 -07:00
KimLS 0b63eaa25d Got rid of socket_server, why the heck is it still around 2014-08-21 19:34:45 -07: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
KimLS e429260763 Missed eq stream factory 2014-08-21 17:30:00 -07:00
KimLS 06f18225ce Renaming headers is hard work 2014-08-21 17:26:32 -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
KimLS 405884f47d More file renames. 2014-08-21 16:59:32 -07:00
KimLS 6457c00548 Renaming files 2014-08-21 16:44:02 -07:00
Michael Cook (mackal) 2e80e56af1 Fix dangling else statements 2014-08-21 19:17:40 -04:00
Michael Cook (mackal) 0ad4ffe33f Fix error in EQRawApplicationPacket::EQRawApplicationPacket() 2014-08-21 19:02:29 -04: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
Michael Cook (mackal) 16f112a281 Fix some if checks in Mob::CalcFocusEffect() 2014-08-21 18:10:40 -04:00
Michael Cook (mackal) 69944d907d Fix compiler warning in zone/inventory.cpp 2014-08-21 17:59:52 -04:00
Michael Cook (mackal) 663dbf9fc2 Fix incorrect array size on A/B/C/DStackers 2014-08-21 17:56:32 -04:00
Michael Cook (mackal) a4a8a1aba5 Clean up some compiler warnings with Stop_Return 2014-08-21 17:54:49 -04:00
Alex fb84f7f84f Merge pull request #198 from addtheice/RunQueryToDatabaseQuery_zone_forage
Run query to database query zone forage
2014-08-21 14:05:32 -07:00
Alex 1c295453da Merge pull request #197 from addtheice/RunQueryToDatabaseQuery_world_zoneserver
Run query to database query world zoneserver
2014-08-21 14:04:50 -07:00
Alex 8199821343 Merge pull request #196 from addtheice/RunQueryToDatabaseQuery_EQLConfig
Run query to database query eql config
2014-08-21 14:04:32 -07:00
Alex b59e856b33 Merge pull request #194 from addtheice/RunQueryToDatabaseQuery_Object
Run query to database query object
2014-08-21 14:04:06 -07:00
Alex f81acf23a7 Merge pull request #195 from addtheice/RunQueryToDatabaseQuery_QGlobals
Run query to database query q globals
2014-08-21 14:03:57 -07:00
Alex 27eba2e6e9 Merge pull request #214 from KinglyKrab/master
Adds new column to 'merchantlist' table.
2014-08-21 14:02: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
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 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
Arthur Ice 2fd2cd4cec DeleteMerc converted to QueryDatabase 2014-08-20 21:54:28 -07:00
Arthur Ice 17b175daa4 LoadMercBuffs converted to QueryDatabase 2014-08-20 21:46:23 -07:00
Arthur Ice 5cabe109da SaveMercBuffs converted to QueryDatabase 2014-08-20 21:30:51 -07:00
Arthur Ice c6e82448b6 SaveMerc converted to QueryDatabase 2014-08-20 21:17:17 -07:00
Alex 8384ab9d2f Merge pull request #193 from addtheice/RunQueryToDatabaseQuery_MobAI
Run query to database query mob ai
2014-08-20 21:04:27 -07:00
Arthur Ice b846d89b5d LoadCurrentMerc converted to QueryDatabase 2014-08-20 21:04:00 -07:00
Alex d5a5635a14 Merge pull request #192 from addtheice/RunQueryToDatabaseQuery_EQW
Run query to database query eqw
2014-08-20 21:03:44 -07:00
Alex f8dc8be6e6 Merge pull request #191 from addtheice/RunQueryToDatabaseQuery_AdventureManager
Run query to database query adventure manager
2014-08-20 21:03:23 -07:00
Alex 5f9676d1a5 Merge pull request #190 from addtheice/RunQueryToDatabaseQuery_Adventure
Run query to database query adventure
2014-08-20 21:03:01 -07:00
Alex 964c4c83df Merge pull request #189 from addtheice/RunQueryToDatabaseQuery_lfguild
Run query to database query lfguild
2014-08-20 21:02:20 -07:00
Arthur Ice 322cea7342 LoadMercInfo converted to QueryDatabase 2014-08-20 20:58:11 -07:00
Arthur Ice 205e1d404e GetMercType converted to QueryDatabase 2014-08-20 20:50:36 -07:00
Arthur Ice 9769a96ebd GetNPCType converted to QueryDatabase 2014-08-20 20:21:39 -07:00
Arthur Ice 74d3192c2e NoRentExpired converted to QueryDatabase 2014-08-20 19:46:44 -07:00
Arthur Ice 41769a3fa8 UpdateBuyLine converted to QueryDatabase 2014-08-20 19:28:53 -07:00
Arthur Ice a7efa9d4e4 RemoveBuyLine converted to QueryDatabase 2014-08-20 19:20:32 -07:00
Arthur Ice 9ed69999a5 AddBuyLine converted to QueryDatabase 2014-08-20 19:02:28 -07:00
Arthur Ice e19a59b269 DeleteBuyLines converted to QueryDatabase 2014-08-20 18:59:17 -07:00
Arthur Ice d234016224 DeleteTraderItem converted to QueryDatabase 2014-08-20 18:55:42 -07:00
Arthur Ice c160d6d929 DeleteTraderItem converted to QueryDatabase 2014-08-20 18:53:05 -07:00
Arthur Ice 62ad60b4ad UpdateTraderItemPrice converted to QueryDatabase 2014-08-20 18:50:10 -07:00
Arthur Ice d44d7c6bbd UpdateTraderItemCharges converted to QueryDatabase 2014-08-20 18:42:25 -07:00
Arthur Ice efd97bad14 SaveTraderItem converted to QueryDatabase 2014-08-20 18:38:57 -07:00
Arthur Ice bc884f5daf LoadSingleTraderItem converted to QueryDatabase 2014-08-20 18:35:54 -07:00
Arthur Ice 0f47b73a64 LoadTraderItemWithCharges converted to QueryDatabase 2014-08-20 18:22:31 -07:00
Arthur Ice e9c6e96452 LoadTraderItem converted to QueryDatabase 2014-08-20 18:22:18 -07:00
Arthur Ice 09713311f6 DeleteWorldContainer converted to QueryDatabase 2014-08-20 18:16:45 -07:00
Arthur Ice c666d9c553 SaveWorldContainer converted to QueryDatabase 2014-08-20 18:03:02 -07:00
Arthur Ice 3777e8d1ce LoadWorldContainer converted to QueryDatabase 2014-08-20 17:57:44 -07:00
Arthur Ice e60658c684 GetEventLogs converted to QueryDatabase 2014-08-20 17:51:52 -07:00
Arthur Ice 046da9efae SetSpecialAttkFlag converted to QueryDatabase 2014-08-20 17:46:12 -07:00
Arthur Ice 09332f6c26 UpdateBug converted to QueryDatabase 2014-08-20 17:43:16 -07:00
Arthur Ice ce507d891a UpdateBug converted to QueryDatabase 2014-08-20 17:43:16 -07:00
Arthur Ice 96f122f901 logevents converted to QueryDatabase 2014-08-20 17:31:16 -07:00
Arthur Ice 3479525f39 UpdateSpawn2Status converted to QueryDatabase 2014-08-20 17:27:19 -07:00
Arthur Ice 4f9d4b0023 GetSpawnTimeLeft converted to QueryDatabase 2014-08-20 17:25:27 -07:00
Arthur Ice bcdfd32bc0 UpdateSpawn2Timeleft converted to QueryDatabase 2014-08-20 17:21:07 -07:00
Arthur Ice 693dde04e3 GetZoneCFG converted to QueryDatabase 2014-08-20 17:16:30 -07:00
Arthur Ice f1bb019933 SaveZoneCFG converted to QueryDatabase 2014-08-20 16:46:17 -07: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
Arthur Ice f0abaad84f LoadZoneObjects converted to QueryDatabase 2014-08-20 15:37:03 -07:00
Uleat 5946af88a6 Reworked Trade::AddEntity() to allow client-directed movement of stacked items (as close to 'stacking' as I can get it - see changelog.txt) 2014-08-20 18:30:19 -04:00
Arthur Ice fe718a81f3 GetHighestWaypoint converted to QueryDatabase 2014-08-20 15:14:36 -07:00
Arthur Ice 2f30488cd5 GetFreeGrid converted to QueryDatabase 2014-08-20 15:11:12 -07:00
Arthur Ice 8b69de46e9 AddWPForSpawn converted to QueryDatabase 2014-08-20 15:06:53 -07:00
Arthur Ice c466317082 DeleteWaypoint converted to QueryDatabase 2014-08-20 14:49:18 -07:00
Arthur Ice 06b0bd6da4 AddWP converted to QueryDatabase 2014-08-20 14:44:32 -07:00
Arthur Ice 334e29a6d6 ModifyGrid converted to QueryDatabase 2014-08-20 14:40:47 -07:00
Arthur Ice cab0beb77f AssignGrid converted to QueryDatabase 2014-08-20 14:32:04 -07:00
Arthur Ice 5f2db0d1cb GetWaypoints converted to QueryDatabase 2014-08-20 14:09:47 -07:00
Arthur Ice b654729383 GetGridType2 converted to QueryDatabase 2014-08-20 14:03:00 -07:00
Arthur Ice 5fec840f06 AssignWaypoints converted to QueryDatabase 2014-08-20 13:58:36 -07:00
Alex 1b6ccca709 Merge pull request #188 from addtheice/RunQueryToDatabaseQuery_rulesys
Run query to database query rulesys
2014-08-20 13:49:05 -07:00
Alex 957671e649 Merge pull request #187 from KinglyKrab/master
Renames spells_new fields.
2014-08-20 13:48:41 -07:00
Alex 79a9e393d2 Merge pull request #186 from addtheice/RunQueryToDatabaseQuery_client_files_import_main
Run query to database query client files import main
2014-08-20 13:48:24 -07:00
Alex 50c186b608 Merge pull request #185 from addtheice/RunQueryToDatabaseQuery_client_files_main
Run query to database query client files main
2014-08-20 13:47:43 -07:00
Alex 9054b93338 Merge pull request #183 from addtheice/RunQueryToDatabaseQuery_ptimer
Run query to database query ptimer
2014-08-20 13:46:43 -07:00
Alex cf1f03fd5b Merge pull request #181 from addtheice/RunQueryToDatabaseQuery_guild_base
Run query to database query guild base
2014-08-20 13:46:32 -07:00
Arthur Ice 7742273237 LoadTributes converted to QueryDatabase 2014-08-20 13:31:47 -07:00
Arthur Ice 536773db44 LoadTraps converted to QueryDatabase 2014-08-20 13:20:51 -07:00
Arthur Ice cf4145dad4 LoadZoneFlags converted to QueryDatabase 2014-08-20 13:02:27 -07:00
Arthur Ice bc90ab795b ClearZoneFlag converted to QueryDatabase 2014-08-20 12:55:53 -07:00
Arthur Ice 21ba9953f8 SetZoneFlag converted to QueryDatabase 2014-08-20 12:52:41 -07:00
Arthur Ice 1c87a6069a CountAAEffects converted to QueryDatabase 2014-08-20 12:48:10 -07:00
Arthur Ice 9867fdd4d2 CountAAs converted to QueryDatabase 2014-08-20 12:45:41 -07:00
Arthur Ice 64cd589ca3 FillAAEffects converted to QueryDatabase 2014-08-20 12:41:37 -07:00
Arthur Ice 110d22e775 GetAASkillVars converted to QueryDatabase 2014-08-20 12:37:02 -07:00
Arthur Ice 3bc582885b LoadAAs converted to QueryDatabase 2014-08-20 12:21:46 -07:00
Arthur Ice e33e8b713e GetTotalAALevels converted to QueryDatabase 2014-08-20 12:09:59 -07:00
Arthur Ice 4214cf47c2 LoadAAEffects converted to QueryDatabase 2014-08-20 12:05:57 -07:00
Arthur Ice 68115505f8 LoadAAEffects2 converted to QueryDatabase 2014-08-20 12:00:43 -07:00
Michael Cook (mackal) d87c95c1f8 Properly set '-std=c++0x' as a CXX_FLAGS
This fixes an issue with clang compiling C files.
(Note: this does not mean clang is supported yet)

Ideally, this should check the compiler for -std=c++11 support,
then check -std=c++0x if the previous failed, then error if that
fails as well.
2014-08-19 20:06:49 -04:00
Michael Cook cec990716f Merge pull request #204 from af4t/master
No BOTS compile error
2014-08-19 19:51:21 -04:00
af4t f22b26f80f Squashed commit of the following:
commit 5d074ea998
Author: Michael Cook <mcook@mackal.net>
Date:   Thu Jun 5 02:57:56 2014 -0400

    Update LS default entry in example config

commit e9c4613368
Merge: 3690f93 dd73b82
Author: KimLS <KLS@peqtgc.com>
Date:   Wed Jun 4 18:32:48 2014 -0700

    Merge branch 'master' into water_map_v2

commit 3690f93302
Author: KimLS <KLS@peqtgc.com>
Date:   Sat May 31 16:32:15 2014 -0700

    Fix for fear failing, removed #fear command because it was blank anyway, added a cmake command to change the default map/water/path directory

commit dd73b82ec2
Author: KimLS <KLS@peqtgc.com>
Date:   Tue May 27 16:16:06 2014 -0700

    Fix for a problem with global player quests and hasquestsub

commit 8a5405060f
Author: KimLS <KLS@peqtgc.com>
Date:   Fri May 23 17:39:16 2014 -0700

    Fix for string.h missing in water map

commit 83270d0983
Author: KimLS <KLS@peqtgc.com>
Date:   Fri May 23 16:10:23 2014 -0700

    Merge from master stuff

commit fd4343702f
Merge: 0483e8b 5af47c5
Author: KimLS <KLS@peqtgc.com>
Date:   Fri May 23 16:09:46 2014 -0700

    Merge branch 'master' into water_map_v2

commit 0483e8bd1b
Author: KimLS <KLS@peqtgc.com>
Date:   Fri May 23 16:08:02 2014 -0700

    Removed the logging now that the issue is resolved

commit 39cbdbd5c2
Author: KimLS <KLS@peqtgc.com>
Date:   Fri May 23 15:54:26 2014 -0700

    Debug logs for map, also can actually turn perl off on zone

commit 3a2ccd7521
Author: KimLS <KLS@peqtgc.com>
Date:   Wed May 21 17:30:54 2014 -0700

    Added loading of v2 regular maps, also #bestz will report water info even if a reg map failed to load.

commit 8c92271804
Author: KimLS <KLS@peqtgc.com>
Date:   Tue May 20 00:14:26 2014 -0700

    Initial v2 water map format.
2014-08-19 17:07:27 -04:00
akkadius 236d227319 Log merge fix 2014-08-19 10:58:22 -05:00
akkadius a5020a68f0 Implemented a Stop_Return feature (Accidental item handin prevention) that will be symmetrically used with plugin::return_items that I am currently running live testing on EZ before releasing to EQEmu. This does not hurt to have this in the source.
Fixed crash where 'attacker' validation is not being checked
Removed petition console spam that does not follow traditional logging and is useless
Made fix with SympatheticProcChances where it was checking for TempItem->Focus.Effect instead of TempItemAug->Focus.Effect
2014-08-19 10:55:29 -05:00
Arthur Ice c613f362a7 GetBasePetItems converted to QueryDatabase 2014-08-18 22:12:01 -07:00
Arthur Ice 977b28cb9c GetPoweredPetEntry converted to QueryDatabase 2014-08-18 22:02:35 -07:00
Arthur Ice 8b89beb02e MakePoweredPet converted to QueryDatabase 2014-08-18 21:57:29 -07:00
Arthur Ice 748748dda9 RefreshPetitionsFromDB converted to QueryDatabase 2014-08-18 21:46:46 -07:00
Arthur Ice 6364d2c31d UpdatePetitionToDB converted to QueryDatabase 2014-08-18 21:37:17 -07:00
Arthur Ice e618fe87bd DeletePetitionFromDB converted to QueryDatabase 2014-08-18 21:37:17 -07:00
Arthur Ice 4e71330508 InsertQuestGlobal converted to QueryDatabase 2014-08-18 21:16:11 -07:00
Arthur Ice c6091c4f27 DelGlobal converted to QueryDatabase 2014-08-18 21:13:20 -07:00
Arthur Ice 49d231f5dd LoadMercs converted to QueryDatabase 2014-08-18 21:06:04 -07:00
Arthur Ice e907ab4f3e LoadMercTypes converted to QueryDatabase 2014-08-18 21:01:27 -07:00
Arthur Ice 9814a6e5a2 BuildHorseType converted to QueryDatabase 2014-08-18 20:55:28 -07:00
Arthur Ice 65e865a550 GetZoneFishing converted to QueryDatabase 2014-08-18 19:23:40 -07:00
Arthur Ice 9cdf0a7a83 GetZoneForage converted to QueryDatabase 2014-08-18 19:23:39 -07:00
Uleat 43326c1804 Fix for perl scripts passing non-client objects to API handler for MovePC and MovePCInstance. [Fixes #127] 2014-08-18 22:13:15 -04:00
Arthur Ice e2d85337d0 Process converted to QueryDatabase 2014-08-18 18:55:09 -07:00
Arthur Ice c4f1f57f74 SetDynamicCount converted to QueryDatabase 2014-08-18 18:38:51 -07:00
Arthur Ice ab70427b7d DeleteStaticZone converted to QueryDatabase 2014-08-18 18:36:08 -07:00
Arthur Ice 0af394fb96 ChangeStaticZone converted to QueryDatabase 2014-08-18 18:34:15 -07:00
Arthur Ice e4320f98f8 BootStaticZone converted to QueryDatabase 2014-08-18 18:31:20 -07:00
Arthur Ice b5a46735df DeleteLauncher converted to QueryDatabase 2014-08-18 18:28:54 -07:00
Arthur Ice 352d46d2ee CreateLauncher converted to QueryDatabase 2014-08-18 18:25:26 -07:00
Arthur Ice b672475166 LoadSettings converted to QueryDatabase 2014-08-18 18:23:22 -07:00
Arthur Ice 7692793289 Consolidated LoadBy code into new LoadBy method 2014-08-18 18:10:28 -07:00
Arthur Ice 8d909ea8e2 LoadByGlobalContext converted to QueryDatabase 2014-08-18 17:58:51 -07:00
Kinglykrab f7781e6d1d Renames spells_new fields.
field191 => viral_targets
field192 => viral_timer
2014-08-18 20:58:31 -04:00
Arthur Ice 810553de2a LoadByZoneID converted to QueryDatabase 2014-08-18 17:56:36 -07:00
Arthur Ice c6b2b1da4e LoadByCharID converted to QueryDatabase 2014-08-18 17:53:05 -07:00
Arthur Ice 5234eb6fc8 LoadNPCByNPCID converted to QueryDatabase 2014-08-18 17:50:03 -07:00
Arthur Ice d8856a7bae DeleteObject converted to QueryDatabase 2014-08-18 17:37:57 -07:00
Arthur Ice 6ca5fb19f4 LoadGroundSpawns converted to QueryDatabase 2014-08-18 17:35:47 -07:00
Arthur Ice 4d83397506 UpdateObject converted to QueryDatabase 2014-08-18 17:29:19 -07:00
Arthur Ice 3720d9e50f AddObject converted to QueryDatabase 2014-08-18 17:21:27 -07:00
Arthur Ice d73449104a GetMaxNPCSpellsEffectsID converted to QueryDatabase 2014-08-18 17:00:37 -07:00
Arthur Ice 580f32c190 GetNPCSpellsEffects converted to QueryDatabase 2014-08-18 16:57:22 -07:00
Arthur Ice 65cc3a4b0a GetMaxNPCSpellsID converted to QueryDatabase 2014-08-18 16:40:45 -07:00
Arthur Ice 52344bfe24 GetNPCSpells converted to QueryDatabase 2014-08-18 16:34:27 -07:00
Arthur Ice 7b33ef67f2 ResolveBug converted to QueryDatabase 2014-08-18 16:17:07 -07:00
Arthur Ice 9270c45a5e GetBugDetails converted to QueryDatabase 2014-08-18 16:15:47 -07:00
Arthur Ice 34f051ab9a ListBugs converted to QueryDatabase 2014-08-18 16:13:11 -07:00
Arthur Ice a2280d1fe5 CountBugs converted to QueryDatabase 2014-08-18 16:10:39 -07:00
Arthur Ice 042613d234 LoadLeaderboardInfo converted to QueryDatabase 2014-08-18 16:06:20 -07:00
Arthur Ice 8b05eff179 LoadAdventureEntries converted to QueryDatabase 2014-08-18 16:05:22 -07:00
Arthur Ice fcb022b8ae ExpireEntries converted to QueryDatabase 2014-08-18 16:00:32 -07:00
Arthur Ice 41182de4f2 MoveCorpsesToGraveyard converted to QueryDatabase 2014-08-18 15:56:02 -07:00
Arthur Ice 37b45be6d8 LoadAdventureTemplate converted to QueryDatabase 2014-08-18 15:34:41 -07:00
Arthur Ice dd044ca453 ToggleGuild converted to QueryDatabase 2014-08-18 14:56:55 -07:00
Arthur Ice b234c67622 TogglePlayer converted to QueryDatabase 2014-08-18 14:52:38 -07:00
Arthur Ice 529408fca0 LoadDatabase converted to QueryDatabase 2014-08-18 14:45:54 -07:00
Arthur Ice 84e95d9a28 ListRulesets converted to QueryDatabase 2014-08-18 14:36:58 -07:00
Arthur Ice b439881f37 GetRulesetName converted to QueryDatabase 2014-08-18 14:33:27 -07:00
Arthur Ice a75b53f9b0 _FindOrCreateRuleset converted to QueryDatabase 2014-08-18 14:30:13 -07:00
Arthur Ice 85ebb32176 GetRulesetID converted to QueryDatabase 2014-08-18 14:24:58 -07:00
Arthur Ice 6450b08fd6 _SaveRules converted to QueryDatabase 2014-08-18 14:21:12 -07:00
Arthur Ice 0353dcb28c LoadRules converted to QueryDatabase 2014-08-18 14:18:21 -07:00
Arthur Ice 230296e777 ImportBaseData converted to QueryDatabase 2014-08-18 14:05:59 -07:00
Arthur Ice ad987c5531 ImportSkillCaps converted to QueryDatabase 2014-08-18 14:05:06 -07:00
Arthur Ice 503a2c0d04 ImportSpells converted to QueryDatabase 2014-08-18 14:03:53 -07:00
Arthur Ice b7bcd13cbd GetSpellColumns converted to QueryDatabase 2014-08-18 14:02:16 -07:00
Arthur Ice 446da590d8 ExportBaseData converted to QueryDatabase 2014-08-18 13:50:16 -07:00
Arthur Ice 24732eff88 GetSkill converted to QueryDatabase 2014-08-18 13:46:05 -07:00
Arthur Ice b98f8c6262 SkillUsable converted to QueryDatabase 2014-08-18 13:42:25 -07:00
Arthur Ice 11c327e1d7 ExportSpells converted to QueryDatabase 2014-08-18 13:30:55 -07:00
Arthur Ice 1253fa2a25 ClearOffline converted to QueryDatabase 2014-08-18 13:14:46 -07:00
Arthur Ice f052c6004a Clear converted to QueryDatabase 2014-08-18 13:12:52 -07:00
Arthur Ice 3cde8d9af8 Load converted to QueryDatabase 2014-08-18 13:08:05 -07:00
Arthur Ice cbed61db7e Clear converted to QueryDatabase 2014-08-18 13:08:05 -07:00
Arthur Ice e360ba5209 Store converted to QueryDatabase 2014-08-18 12:35:16 -07:00
Arthur Ice fd8dc1214c Load converted to QueryDatabase 2014-08-18 12:34:14 -07:00
Arthur Ice 327fa38232 GetCharInfo converted to QueryDatabase 2014-08-17 12:30:53 -07:00
Arthur Ice 845ed720b3 GetCharInfo converted to QueryDatabase 2014-08-17 12:27:08 -07:00
Arthur Ice ea0c8f86fe GetEntireGuild converted to QueryDatabase 2014-08-17 12:21:57 -07:00
Arthur Ice 76f727b7ff ProcessGuildMember converted to use MySQLRequestRow 2014-08-17 12:21:05 -07:00
Arthur Ice 449d5f9358 Removed large commented out section 2014-08-17 12:13:56 -07:00
Arthur Ice b2ca66267e DoesAccountContainAGuildLeader converted to QueryDatabase 2014-08-17 12:13:27 -07:00
Arthur Ice f292cbc3e7 DBSetPublicNote converted to QueryDatabase 2014-08-17 12:07:43 -07:00
Arthur Ice df705e34ad GetAltFlag converted to QueryDatabase 2014-08-17 12:04:38 -07:00
Arthur Ice 364f133ffd GetBankerFlag converted to QueryDatabase 2014-08-17 12:01:39 -07:00
Arthur Ice c7e2d3b355 DBSetGuild converted to QueryDatabase 2014-08-17 11:57:18 -07:00
Arthur Ice 553d12412b DBSetGuildChannel converted to QueryDatabase 2014-08-17 11:50:10 -07:00
Arthur Ice a701541fce DBSetGuildURL converted to QueryDatabase 2014-08-17 11:48:01 -07:00
Arthur Ice dd06ecf99b DBSetGuildMOTD converted to QueryDatabase 2014-08-17 11:46:03 -07:00
Arthur Ice 9e5fdc50d9 DBSetGuildLeader converted to QueryDatabase 2014-08-17 11:43:45 -07:00
Arthur Ice 80cc6e4ef3 DBSetTributeFlag converted to non len QueryWithLogging 2014-08-17 11:40:28 -07:00
Arthur Ice 34a56f75cf DBSetAltFlag converted to non len QueryWithLogging 2014-08-17 11:40:28 -07:00
Arthur Ice 941f1cc395 DBSetBankerFlag converted to non len QueryWithLogging 2014-08-17 11:40:28 -07:00
Arthur Ice 9eec8f37f5 DBSetGuildRank converted to non len QueryWithLogging 2014-08-17 11:40:27 -07:00
Arthur Ice 1734641d12 DBRenameGuild converted to QueryDatabase 2014-08-17 11:40:22 -07:00
Arthur Ice 3856f7f1e5 DBDeleteGuild converted to QueryDatabase 2014-08-17 11:39:27 -07:00
Arthur Ice 94110dbe52 removed len from QueryWithLogging 2014-08-17 11:39:16 -07:00
Arthur Ice 8a44271b2f QueryWithLogging converted to QueryDatabase 2014-08-17 11:22:05 -07:00
Arthur Ice cca9ddab43 _RunQuery renamed QueryWithLogging 2014-08-17 11:19:56 -07:00
Arthur Ice 7b440bbd9f _GetFeeGuildID converted to QueryDatabase 2014-08-17 11:11:56 -07:00
Arthur Ice a2d4376763 _StoreGuildDB converted to QueryDatabase 2014-08-17 11:08:41 -07:00
Arthur Ice a91b6a0db8 RefreshGuild converted to QueryDatabase 2014-08-17 10:59:24 -07:00
Arthur Ice 22367622be LoadGuilds converted to QueryDatabase 2014-08-17 10:51:08 -07:00
Arthur Ice 87efd22394 Merge https://github.com/EQEmu/Server 2014-08-17 10:39:37 -07:00
Alex 69b7d500d8 Merge pull request #180 from EQEmu/clientupdate
Clientupdate
2014-08-16 22:23:19 -07:00
Uleat 00321126f1 Merge branch 'master' of https://github.com/EQEmu/Server into clientupdate
Conflicts:
	changelog.txt
2014-08-16 18:17:59 -04:00
Uleat 9e1549b61b Fix for invalid handling of heading criteria in Client::Handle_OP_ClientUpdate() 2014-08-16 18:12:21 -04:00
KimLS a85bb6aca6 Cleanup before push 2014-08-16 15:03:01 -07:00
KimLS 9207220238 Merge branch 'DBQuery' 2014-08-16 15:02:19 -07:00
KimLS 539c09adc5 Merge branch 'master' into DBQuery 2014-08-16 15:00:38 -07:00
Uleat 8ef17f2ccd Merge branch 'master' of https://github.com/EQEmu/Server 2014-08-16 17:21:10 -04:00
KimLS 8b08f19628 Merge branch 'master' into DBQuery 2014-08-16 14:12:33 -07:00
Alex adc801a069 Merge pull request #179 from KinglyKrab/master
Fixed GetItemStat making all information it pulls default as uint32.
2014-08-15 22:47:27 -07:00
Kinglykrab 0f5214f481 Fixed GetItemStat making all information it pulls default it uint32. 2014-08-16 01:35:50 -04:00
Alex eb609f2ea4 Merge pull request #178 from KinglyKrab/master
Fixes uint32 max value issue.
2014-08-15 22:00:26 -07:00
Uleat a3069b63df Minor tweaks... 2014-08-16 00:18:19 -04:00
Uleat f7bb763aac Reactivation of wear change updates in Bot::Spawn() until fix can be found. 2014-08-15 16:28:16 -04:00
Kinglykrab bce3b1b961 Edit some uint32 to int32: GetAugmentIDAt, GetItemIDAt, GetItemStat 2014-08-15 04:26:37 -04:00
Michael Cook e2874b2cc6 Update README.md [skip ci] 2014-08-14 15:05:44 -04:00
Uleat dc6e6fd05f Fix for bot chest armor display glitch in SoF+ clients 2014-08-13 14:24:42 -04:00
Michael Cook (mackal) c2282ced0e Some people were having issues with the other one [skip ci] 2014-08-13 13:20:10 -04:00
Michael Cook (mackal) 6badd7e00e Added SQLs from previous commit [skip ci] 2014-08-12 22:51:36 -04:00
Michael Cook 12b9531d8a Merge pull request #177 from clucksoft/raid_ooc_regen
Implemented Raid OOC Regen
2014-08-12 22:46:17 -04:00
Russell Kinasz 1ba4b6fc31 Implemented Raid OOC Regen 2014-08-12 15:18:11 -07:00
KimLS cb3fa2d4a3 Merge branch 'RunQueryToDatabaseQuery_database' of https://github.com/addtheice/Server into DBQuery 2014-08-12 14:51:09 -07:00
Uleat cfd6364999 Re-worked server 'discovery' code to better handle inclusions and exclusions. 2014-08-11 18:55:00 -04:00
Arthur Ice f1b8908c9a Fixed bug with ErrorBuffer being overwritten on non query requests 2014-08-11 13:55:25 -07:00
KimLS 11abc45e3f Merge branch 'RunQueryToDatabaseQuery_database' of https://github.com/addtheice/Server into DBQuery 2014-08-11 12:58:53 -07:00
Arthur Ice 321cf17eac fixed issue with row request on null result 2014-08-10 22:27:25 -07:00
Michael Cook (mackal) 091047d08b Pretty up the read me [skip ci] 2014-08-10 23:07:05 -04:00
Michael Cook f0c46664d2 Merge pull request #176 from KayenEQ/Development
ST_PetMaster target type support added
2014-08-10 23:04:06 -04:00
KayenEQ 8b2dba9715 ST_PetMaster target type support added
Targets pets master. (Works for regular and swarm pets)
2014-08-10 20:13:01 -04:00
KimLS 26ff1ae941 Merge branch 'RunQueryToDatabaseQuery_database' of https://github.com/addtheice/Server into DBQuery 2014-08-10 16:27:59 -07:00
Arthur Ice 12ded4b506 Fixed bug with non row returning queries crashing. 2014-08-10 14:19:35 -07:00
KimLS 2b66af2d91 Merge branch 'RunQueryToDatabaseQuery_database' of https://github.com/addtheice/Server into DBQuery 2014-08-10 13:23:09 -07:00
Michael Cook (mackal) 8940e987c1 Fix some compiler warnings 2014-08-10 15:56:58 -04:00
Michael Cook c02cb2c343 Proper bling instead of copy paste for another [skip ci] 2014-08-10 13:08:50 -04:00
Michael Cook 99b25f42e4 Add Travis-CI bling 2014-08-10 12:42:43 -04:00
Michael Cook a327a0028d Merge pull request #175 from KayenEQ/Development
Rule ArcheryHitPenalty fix for calc mistake from prior update.
2014-08-10 11:01:38 -04:00
KayenEQ 478eb35a3b Rule ArcheryHitPenalty fix for calc mistake from prior update. 2014-08-10 08:37:30 -04:00
KimLS d7eb28c7f8 Travis CI file 2014-08-10 02:45:21 -07:00
Uleat e1996e62b0 Added 'discovery' code for server handlers - still needs some debug/messaging work 2014-08-09 20:59:08 -04:00
Michael Cook bb9f440882 Merge pull request #172 from KayenEQ/Development
Implemented support for spells_new fields InCombat, OutofCombat
2014-08-09 16:53:39 -04:00
KayenEQ b7be8fb625 fix 2014-08-08 15:53:53 -04:00
KayenEQ 2aec190afc Support for spells_new field 'uninterruptable' 2014-08-08 13:42:14 -04:00
Uleat f0496a6f59 Total re-work..not much more can be done until more server handlers are added... 2014-08-07 15:27:30 -04:00
KayenEQ aab3cac29c fix 2014-08-06 06:49:29 -04:00
Uleat 9561f841c4 Tweaked some procedural code and re-worked client opcode reader to standardize hex format (i.e., {0x0abc, 0x0ABC, 0xabc} = 0x0abc) 2014-08-05 16:34:57 -04:00
Uleat 32243aa383 Unix fix... Thanks Demonstar!! 2014-08-04 23:12:28 -04:00
Uleat 13f3c13c0e Added a dev script for cross-referencing server-to-client opcodes 2014-08-04 21:28:56 -04:00
KayenEQ 92a1abbbee fix 2014-08-03 16:36:44 -04:00
KayenEQ 4b7fa0654c fix 2014-08-03 16:32:36 -04:00
KayenEQ f3710856ad min_range field 2014-08-03 16:04:55 -04:00
KayenEQ ef982b9ce2 Implemented 'min_range' field, sets a min range that you must
be away from target for spell to land.
2014-08-03 08:21:47 -04:00
KayenEQ 52d92b7181 Implemented broad support for fields min_dist, min_dist_mod, max_dist, max_dist_mod -
Scales spell power based on targets distance from caster.
This implemented in a broad way to function with spells
that would make sense to scale. Some work will still be needed on this.

Be aware if making custom
spells not everything will work and certain effects just
should not be included (use common sense).
2014-08-02 21:10:44 -04:00
KayenEQ e0e473ce06 Merge git://github.com/EQEmu/Server into Development 2014-08-02 20:40:24 -04:00
KayenEQ 9c92c5dbe4 SQL 2014-08-02 10:43:48 -04:00
KayenEQ b65d3c85b6 Implemented support for spells_new fields InCombat, OutofCombat
Required SQL to rename and add new fields to spells_new table.
2014-08-02 10:42:11 -04:00
Michael Cook 71b7fc57f6 Merge pull request #171 from KayenEQ/Development
Support for spells_new field npc_no_los (simply skips the LOS check for ...
2014-08-01 23:50:28 -04:00
KayenEQ 454f2520c3 Support for spells_new field npc_no_los (simply skips the LOS check for that spell
despite name, no reason to hard code it only for NPC).
2014-08-01 23:35:35 -04:00
Arthur Ice e1e219ae97 Merge upstream 2014-08-01 10:41:26 -07:00
Arthur Ice af57ca3b05 Merge upstream 2014-08-01 10:41:16 -07:00
Arthur Ice a98eeb7be6 Merge remote-tracking branch 'upstream/master' 2014-08-01 10:26:38 -07:00
Uleat cc0f2ac37a Changed a few mis-labeled range starts..no functionality change. 2014-07-31 21:05:43 -04:00
Uleat 842f1fb9c7 Test fix for charm in trader's satchel while trader..thanks demonstar and Derision! ** This may need to be tweaked..but, I was able to test without crashing the client. 2014-07-31 11:41:27 -04:00
Uleat 8b14c21a24 More numeric to constant conversions..should be most of them... Please report any inventory abnormalities. 2014-07-31 07:52:38 -04:00
Arthur Ice 0f6ce6a1f4 Upstream merge 2014-07-30 14:46:02 -07:00
Arthur Ice 7aaf9ae00d Merge remote-tracking branch 'upstream/master' 2014-07-30 14:08:10 -07:00
Uleat e902373ce7 This DOES fix the GCC issue..sorry for the inconvenience! 2014-07-27 23:05:16 -04:00
Uleat 0ad7c4470b GCC fix for last dictionary push (hopefully) 2014-07-27 22:18:17 -04:00
Uleat 36a2d52f1c More 'dictionary' updates..added 'constants' files to client translators..started replacement of hard-coded inventory values. 2014-07-27 20:35:43 -04:00
Michael Cook d0756ff2af Merge pull request #169 from KayenEQ/Development
Updates to npc_spells and npc_types table.
2014-07-24 18:44:18 -04:00
KayenEQ 9fcea56fbf Alllow SE_PetMeleeMitigation to work on swarm pets. 2014-07-24 14:06:15 -04:00
KayenEQ 1b239b7119 Support for AA derived AC bonus. 2014-07-24 11:31:22 -04:00
KayenEQ 83f94da43b Spell Effect for melee mitigation will no longer use same bonus
item shielding effect. Added support for spell effect melee mitigation
to work on as item worn effects and AA.
2014-07-24 11:23:14 -04:00
KayenEQ 0d5a0525cd minor fix 2014-07-23 22:08:47 -04:00
KayenEQ 4f07be2343 Update to how bonuses are calculated in chance to hit code to be
consistent across all relevant effects (treating avoidance
and hit chance bonuses equally).
Rule ArcheryHitPenalty will now calc correctly (Was doing basically nothing)
New field npc_types 'Avoidance' (add avoidance bonus to npc)
Rules for setting min / max chance to hit
2014-07-23 21:24:21 -04:00
KayenEQ 152a7410b6 debug msg removal 2014-07-23 16:57:59 -04:00
KayenEQ 9e4a21d934 Allow negative values for avoidance to work. (debuffs) 2014-07-23 13:13:51 -04:00
KayenEQ 6b107d4197 sql fix 2014-07-21 09:46:36 -04:00
KayenEQ d99f9c1c09 fix for aa pet flurry bonus calc 2014-07-18 17:57:03 -04:00
KayenEQ 089360a3a5 merge 2014-07-18 17:00:39 -04:00
Uleat d7c2d6108f Added the initial references for two new dictionaries - EmuConstants and EQLimits..more to come. 2014-07-16 21:23:16 -04:00
KimLS b7e36feeeb Removed more socket server stuff, changed some of the build stuff. 2014-07-14 15:44:28 -07:00
KimLS 658bf04d0b Merge branch 'master' of github.com:EQEmu/Server 2014-07-14 15:10:28 -07:00
Arthur Ice b43ab783b0 AddReport converted to StringFormat 2014-07-10 22:55:00 -07:00
Arthur Ice be90b4e0cc CheckLogin converted to StringFormat 2014-07-10 22:53:20 -07:00
Arthur Ice b3895f717a GetGuildIDByCharID converted to StringFormat 2014-07-10 22:19:14 -07:00
Arthur Ice 77a5d82de4 GetAdventureStats converted to StringFormat 2014-07-10 22:19:07 -07:00
Arthur Ice a7ac4b8deb UpdateAdventureStatsEntry converted to StringFormat 2014-07-10 22:19:01 -07:00
Arthur Ice 9cd2225f8c GlobalInstane converted to StringFormat 2014-07-10 22:04:58 -07:00
Arthur Ice f2e7f8ec64 SetInstanceDuration converted to StringFormat 2014-07-10 21:30:17 -07:00
Arthur Ice 899c34ff63 AssignRaidToInstance converted to StringFormat 2014-07-10 21:30:11 -07:00
Arthur Ice 79819a85d6 AssignGroupToInstance converted to StringFormat 2014-07-10 21:30:05 -07:00
Arthur Ice e66b4e4a3d GetCharactersInInstance converted to StringFormat 2014-07-10 21:29:59 -07:00
KayenEQ 48c24186d1 sql comment fix 2014-07-10 23:44:03 -04:00
KayenEQ 965bb039be Updates to npc_spells and npc_types table.
Implemented innate defensive and range procs
Implemented ability to fine tune AI casting behavior/timers
Global rules for AI casting behavior/timers
NPC Ranged attack updates, set skill and ammo type in npc_types
Various clean ups in attack related functions.
Other minor fixes.
See Change Log, +required, +optional SQL
2014-07-10 22:46:39 -04:00
Arthur Ice d606d8f4f2 GetInstanceID converted to StringFormat 2014-07-10 17:56:53 -07:00
Arthur Ice a862d9a06d GetInstanceID converted to StringFormat 2014-07-10 17:56:48 -07:00
Arthur Ice c4d9e543e3 GetInstanceVersion converted to StringFormat 2014-07-10 17:56:43 -07:00
Arthur Ice 5104b507bb BuryCorpsesInInstance converted to StringFormat 2014-07-10 17:56:38 -07:00
Arthur Ice cb5cecd0c2 CheckInstanceExists converted to StringFormat 2014-07-10 17:56:33 -07:00
Arthur Ice 77c793166c RemoveClientsFromInstance converted to StringFormat 2014-07-10 17:56:27 -07:00
Arthur Ice e08533c634 RemoveClientFromInstance converted to StringFormat 2014-07-10 17:56:22 -07:00
Arthur Ice 39196efcb3 AddClientToInstance converted to StringFormat 2014-07-10 17:56:17 -07:00
Arthur Ice cc9bef9706 PurgeExpiredInstances converted to StringFormat 2014-07-10 17:56:12 -07:00
Arthur Ice 9d38c6d44e CreateInstance converted to StringFormat 2014-07-10 17:56:07 -07:00
Arthur Ice fb213e6ee5 GetUnusedInstanceID converted to StringFormat 2014-07-10 17:56:02 -07:00
Arthur Ice aafc681034 GetTimeRemainingInstance converted to StringFormat 2014-07-10 17:55:57 -07:00
Arthur Ice 11dc235121 VersionFromInstanceID converted to StringFormat 2014-07-10 17:55:52 -07:00
Arthur Ice cb510e13d1 ZoneIDFromInstanceID converted to StringFormat 2014-07-10 17:55:47 -07:00
Arthur Ice 784b16bd43 CheckInstanceExpired converted to StringFormat 2014-07-10 17:55:42 -07:00
Arthur Ice c6c47aba22 DeleteInstance converted to StringFormat 2014-07-10 17:55:37 -07:00
Arthur Ice 3581b0bf1a CharacterInInstanceGroup converted to StringFormat 2014-07-10 17:55:32 -07:00
Arthur Ice b5f5dae9e8 VerifyZoneInstance converted to StringFormat 2014-07-10 17:55:27 -07:00
Arthur Ice d68fca8e51 GetRaidLeaderName converted to StringFormat 2014-07-10 17:55:22 -07:00
Arthur Ice dc6e5bc48e GetRaidID converted to StringFormat 2014-07-10 17:55:16 -07:00
Arthur Ice 12c15c6db0 ClearRaidDetails converted to StringFormat 2014-07-10 17:55:11 -07:00
Arthur Ice d21c4a58b4 ClearAllRaidDetails converted to StringFormat 2014-07-10 17:55:06 -07:00
Arthur Ice 652b158ca4 ClearAllRaids converted to StringFormat 2014-07-10 17:55:01 -07:00
Arthur Ice 71da40c757 ClearRaid converted to StringFormat 2014-07-10 17:54:56 -07:00
Arthur Ice 3cf9c71c27 SetAgreementFlag converted to StringFormat 2014-07-10 17:54:51 -07:00
Arthur Ice c1b69594e5 GetAgreementFlag converted to StringFormat 2014-07-10 17:54:46 -07:00
Arthur Ice 8e8a21349f ClearGroupLeader converted to StringFormat 2014-07-10 17:05:47 -07:00
Arthur Ice b7fb8fa434 ClearAllGroupLeaders converted to StringFormat 2014-07-10 16:21:46 -07:00
Arthur Ice e3d02cdf40 GetGroupLeadershipInfo converted to StringFormat 2014-07-10 16:18:31 -07:00
Arthur Ice 3b18c4891c SetGroupLeaderName converted to StringFormat 2014-07-10 16:17:14 -07:00
Arthur Ice 0862feeba8 GetGroupLeaderForLogin converted to StringFormat 2014-07-10 15:19:10 -07:00
Arthur Ice 34a7b46163 GetGroupID converted to StringFormat 2014-07-10 15:17:10 -07:00
Arthur Ice 538979716d ClearGroup converted to StringFormat 2014-07-10 15:16:02 -07:00
Arthur Ice ed21229bba ClearAllGroups converted to StringFormat 2014-07-10 15:15:05 -07:00
Arthur Ice 1ec7da0f36 SetGroupID converted to StringFormat 2014-07-10 15:11:44 -07:00
Arthur Ice 61732658f2 SetFirstLogon converted to StringFormat 2014-07-10 15:03:25 -07:00
Arthur Ice 474d5d1340 SetLFG converted to StringFormat 2014-07-10 15:02:39 -07:00
Arthur Ice fdb4e54ff6 SetLoginFlags converted to StringFormat 2014-07-10 15:01:56 -07:00
Arthur Ice bde62709b5 SetLFP converted to StringFormat 2014-07-10 15:01:08 -07:00
Arthur Ice d4aaa93047 GetLiveChar converted to StringFormat 2014-07-10 15:00:05 -07:00
Arthur Ice 4ce7081ace UpdateLiveChar converted to StringFormat 2014-07-10 14:59:16 -07:00
Arthur Ice 6f8e7fc720 GetCharacterInfo converted to StringFormat 2014-07-10 14:58:27 -07:00
Arthur Ice 422f3b1ce9 GetSkillCap converted to StringFormat 2014-07-10 14:57:24 -07:00
Arthur Ice 397e3998ff GetRaceSkill converted to StringFormat 2014-07-10 14:55:57 -07:00
Arthur Ice cff96b23a8 Merge branch 'master' into RunQueryToDatabaseQuery_database
Conflicts:
	changelog.txt
	common/spdat.h
	zone/attack.cpp
	zone/bonuses.cpp
	zone/common.h
	zone/mob.h
	zone/special_attacks.cpp
	zone/spell_effects.cpp
2014-07-10 14:15:05 -07:00
Arthur Ice 40798d38c5 Merge remote-tracking branch 'upstream/master' 2014-07-09 16:40:09 -07:00
Arthur Ice 09ede557b1 SetMQDetectionFlag converted to StringFormat 2014-07-09 16:37:21 -07:00
Arthur Ice 1f15f7ff9a SetHackerFlag converted to StringFormat 2014-07-09 16:35:30 -07:00
JJ a96784aa18 Minor typos. 2014-07-09 19:19:51 -04:00
Arthur Ice 3a2ceab58a CopyCharacter converted to StringFormat 2014-07-08 21:10:04 -07:00
Arthur Ice 84499e43dd MoveCharacterToZone converted to StringFormat 2014-07-08 21:10:04 -07:00
Arthur Ice 2e8ff36ef7 MoveCharacterToZone converted to StringFormat 2014-07-08 21:10:04 -07:00
Arthur Ice 6430a62c86 GetServerType converted to StringFormat 2014-07-08 21:10:04 -07:00
Arthur Ice ec47f8644c CheckUsedName converted to StringFormat 2014-07-08 21:10:04 -07:00
Arthur Ice 8b3afbdf10 UpdateName converted to StringFormat 2014-07-08 21:10:04 -07:00
Arthur Ice 57b11629ce ClearMerchantTemp converted to string 2014-07-08 21:10:04 -07:00
Arthur Ice 396eced36e GetAccountFromID converted to StringFormat 2014-07-08 21:10:03 -07:00
Arthur Ice 66070e9bf6 GetAccountIDFromLSID converted to StringFormat 2014-07-08 21:10:03 -07:00
Arthur Ice 97588fbcf4 AddToNameFilter converted to StringFormat 2014-07-08 21:10:03 -07:00
Arthur Ice d7a98e7655 CheckNameFilter converted to string 2014-07-08 21:10:03 -07:00
Arthur Ice 4804cca0ab GetPEQZone converted to StringFormat 2014-07-08 21:10:03 -07:00
Arthur Ice 0850b1edad LoadZoneNames converted to use string 2014-07-08 21:10:03 -07:00
Arthur Ice c2e5875f02 GetzoneGraveyardID converted to StringFormat 2014-07-08 21:10:03 -07:00
Arthur Ice 56de9072c0 GetZoneLongName converted to StringFormat 2014-07-08 21:10:03 -07:00
Arthur Ice 341121da32 GetSafePoints converted to StringFormat 2014-07-08 21:10:03 -07:00
Arthur Ice 869c041846 GetMiniLoginAccount converted to StringFormat 2014-07-08 21:10:03 -07:00
Arthur Ice 879ab418fd SetVariable converted to StringFormat 2014-07-08 21:10:03 -07:00
Arthur Ice 2ffc77be3d GetAccountName converted to StringFormat 2014-07-08 21:10:03 -07:00
Arthur Ice 2f8cc6e57b GetAccountIDByName converted to StringFormat 2014-07-08 21:10:03 -07:00
Arthur Ice a64ef36d06 GetAccountIDByChar (id) converted to StringFormat 2014-07-08 21:10:03 -07:00
Arthur Ice 85895d01eb GetAccountIDByChar converted to StringFormat 2014-07-08 21:10:02 -07:00
Arthur Ice fa3d8c9720 StoreCharacter partialy converted to StringFormat 2014-07-08 21:10:02 -07:00
Arthur Ice 80a8a1fde3 DeleteCharacter converted to StringFormat 2014-07-08 21:10:02 -07:00
Arthur Ice bf5ce11ff1 ReserveName converted to StringFormat 2014-07-08 21:10:02 -07:00
Arthur Ice 4a10bdb91a SetAccountStatus converted to StringFormat 2014-07-08 21:10:02 -07:00
Arthur Ice 74b73e6f39 SetLocalPassword converted to StringFormat 2014-07-08 21:10:02 -07:00
Arthur Ice d287d9731e changed cerr message to cout on DeleteAccount 2014-07-08 21:10:02 -07:00
Arthur Ice 95c072f692 DeleteAccount converted to StringFormat 2014-07-08 21:10:02 -07:00
Arthur Ice 41f453d5a4 CreateAccount converted to StringFormat 2014-07-08 21:10:02 -07:00
Arthur Ice ddcaf855fe CheckStatus converted to StringFormat 2014-07-08 21:10:02 -07:00
Arthur Ice d943183994 LoginIP converted to StringFormat 2014-07-08 21:10:02 -07:00
Arthur Ice 2424b1d3f1 AddGMIP converted to StringFormat 2014-07-08 21:10:02 -07:00
Arthur Ice a036200369 CheckGMIPs converted to StringFormat 2014-07-08 21:10:02 -07:00
Arthur Ice 0ddceb78ba AddBannedIP converted to StringFormat 2014-07-08 21:10:01 -07:00
Arthur Ice b23fb0e635 CheckBannedIPs converted to StringFormat 2014-07-08 21:10:01 -07:00
Arthur Ice 98ebbd50a1 minor formatting clean up, no functional changes 2014-07-08 21:10:01 -07:00
Arthur Ice c39eb3ca86 Removed unused FetchRowMap 2014-07-08 21:10:01 -07:00
Arthur Ice 2278ec023f GetGroupLeadershipInfo converted to QueryDatabase 2014-07-08 21:10:01 -07:00
Arthur Ice 2afd05de98 GetGroupLeaderForLogin converted to QueryDatabase 2014-07-08 21:10:01 -07:00
Arthur Ice 1655050730 string based QueryDatabase 2014-07-08 21:10:01 -07:00
Arthur Ice 9a30c24654 Added FieldName for column name requests 2014-07-08 21:10:01 -07:00
Arthur Ice 727d8a2bf8 Added LengthOfColumn method because of stupid BLOBs 2014-07-08 21:10:01 -07:00
Arthur Ice cdcb5e0692 renamed GetGuildDBIDByChar to GetGuildIDByChar, converted to QueryDatabase 2014-07-08 21:10:01 -07:00
Arthur Ice 01991f4beb GetAdventureStats converted to QueryDatabase 2014-07-08 21:10:01 -07:00
Arthur Ice 28212ab8f8 UpdateAdventureStatsEntry converted to QueryDatabase 2014-07-08 21:10:01 -07:00
Arthur Ice 22d06bc3d1 GlobalInstance converted to QueryDatabase 2014-07-08 21:10:01 -07:00
Arthur Ice 167ce7829c SetInstanceDuration converted to QueryDatabase 2014-07-08 21:10:01 -07:00
Arthur Ice bb2dc991eb AssignRaidToInstance converted to QueryDatabase 2014-07-08 21:10:01 -07:00
Arthur Ice 989b5d96c5 AssignGroupToInstance converted to QueryDatabase 2014-07-08 21:10:01 -07:00
Arthur Ice 0ea1010e3f GetCharactersInInstance converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice 4f4f9e8eb3 GetUnusedInsanceId converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice d32f16fef5 GetInstanceID (uint32 zone version) converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice 41660240fb GetInstanceID converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice c160059612 GetInstanceVersion converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice c055b20b93 BuryCorpsesInInstance converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice e1b251ee8f CheckInstanceExists converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice e60117cabb AddClientToInstance converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice 3449f5e11c PurgeExpiredInstances converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice 010bc76440 CreateInstance converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice 4b647602b3 GetUnusedInstanceID converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice 9abdf5f4b3 GetTimeRemainingInstance converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice 903a3a9060 VersionFromInstanceID converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice 4541bd5369 ZoneIDFromInstanceID converted to QueryDatabase 2014-07-08 21:09:59 -07:00
Arthur Ice 94e4da9456 CheckInstanceExpired converted to QueryDatabase 2014-07-08 21:09:59 -07:00
Arthur Ice 2f3c1ed169 DeleteInstance converted to QueryDatabase 2014-07-08 21:09:59 -07:00
Arthur Ice 3db115b52f CharacterInInstanceGroup converted to QueryDatabase 2014-07-08 21:09:59 -07:00
Arthur Ice 96c4b283fa VerifyZoneInstance converted to QueryDatabase 2014-07-08 21:09:59 -07:00
Arthur Ice 7dce9d6c8e formatting cleanup, no functional change 2014-07-08 21:09:59 -07:00
Arthur Ice bc46b1371d GetRaidLeaderName converted to QueryDatabase 2014-07-08 21:09:59 -07:00
Arthur Ice 4a09b9b1a0 GetRaidID converted to QueryDatabase 2014-07-08 21:09:59 -07:00
Arthur Ice a08c6c9a00 ClearRaidDetails converted to QueryDatabase 2014-07-08 21:09:59 -07:00
Arthur Ice 9b4491df57 ClearAllRaidDetails converted to QueryDatabase 2014-07-08 21:09:59 -07:00
Arthur Ice e81e47e9c5 Built utility function ClearAllRaidDetails 2014-07-08 21:09:59 -07:00
Arthur Ice 34739b71b3 Converted ClearRaid to QueryDatabase, added ClearAllRaids utility method 2014-07-08 21:09:59 -07:00
Arthur Ice c80f803ba7 SetAgreementFlag converted to QueryDatabase 2014-07-08 21:09:59 -07:00
Arthur Ice 6132fa0cb9 GetAgreementFlag converted to QueryDatabase 2014-07-08 21:09:59 -07:00
Arthur Ice 586e177f98 Created private utility methods ClearAllGroups and ClearAllGroupLeaders 2014-07-08 21:09:58 -07:00
Arthur Ice 695e6f2026 ClearGroupLeader converted to QueryDatabase 2014-07-08 21:09:58 -07:00
Arthur Ice 9bbde71964 SetGroupLeaderName converted to QueryDatabase 2014-07-08 21:09:58 -07:00
Arthur Ice 7a5afd8597 GetZoneName formatting cleanup. much easier to read 2014-07-08 21:09:58 -07:00
Arthur Ice c6f707d95c GetZoneID nullptr and formatting clean up 2014-07-08 21:09:58 -07:00
Arthur Ice b0612f8cdf Converted StoreCharacter to QueryDatabase 2014-07-08 21:09:58 -07:00
Arthur Ice ceccf2b1ca GetGroupID converted to QueryDatabase 2014-07-08 21:09:58 -07:00
Arthur Ice 137b624008 ClearGroup converted to QueryDatabase 2014-07-08 21:09:58 -07:00
Arthur Ice 632b9b9c27 errbuff and Query to query change 2014-07-08 21:09:58 -07:00
Arthur Ice 819de185ef SetGroupID converted to QueryDatabase 2014-07-08 21:09:58 -07:00
Arthur Ice 61abdeb3f7 AddReport converted to QueryDatabase 2014-07-08 21:09:58 -07:00
Arthur Ice cc9267707a SetFirstLogon converted to QueryDatabase 2014-07-08 21:09:58 -07:00
Arthur Ice c82ce7cecc SetLoginFlags and SetLFG converted to QueryDatabase 2014-07-08 21:09:58 -07:00
Arthur Ice 00db7e5c93 SetLFP converted to QueryDatabase 2014-07-08 21:09:57 -07:00
Arthur Ice f0106c90a8 GetLiveChar converted to QueryDatabase 2014-07-08 21:09:57 -07:00
Arthur Ice edf24308fb getZoneLongName converted 0 assign of query to nullptr 2014-07-08 21:09:57 -07:00
KayenEQ 705ffa89bc Update SE_InterruptCasting: Will now work for instant spells (as well as over time). 2014-07-08 21:09:57 -07:00
KayenEQ 8cdcd189f5 Updated SE_BardAEDot to no longer damage target while target is moving (consistent with live) 2014-07-08 21:09:57 -07:00
KayenEQ 9e26ebb9e5 Changed SE_LimitMaxMana to SE_MeleeVulnerability - Weakness/Mitigation verse melee damage
(Despite lives SPA lable as the former it clearly is not what the effect does from all spell examples)
2014-07-08 21:09:57 -07:00
KayenEQ 7b085c8018 Implemented SE_LimitSpellClass - Focus Limits spell to pre defined categories. (3=Cures,3=Offensive, 6=Lifetap) 2014-07-08 21:09:57 -07:00
KayenEQ 41d3b177ea Renamed various Cast on Fade spell effects to more accurately describe their functions.
Missing code from prior commit.
2014-07-08 21:09:57 -07:00
KayenEQ effe2149da Re-Implemented SE_TriggerMeleeThreshold and SE_TriggerSpellThreshold correctly - Trigger spell if owner of buff
takes more than the specified damage amount in a SINGLE hit, then fade the buff.
2014-07-08 21:09:57 -07:00
KayenEQ 9af74e6468 Implemented SE_FactionModPct - Modifies faction gains and losses by percent. 2014-07-08 21:09:56 -07:00
KayenEQ ede9d557a3 Implemented SE_ResourceTap - Coverts a percent of dmg from dmg spells(DD/DoT) to hp/mana/end. 2014-07-08 21:09:56 -07:00
KayenEQ 0be08b7899 Implemented SE_Sanctuary - Places caster at bottom hate list,
effect fades if caster cast spell on targets other than self.
2014-07-08 21:09:56 -07:00
Michael Cook (mackal) 2b204fa756 Hopefully fix compile issue with some VS versions 2014-07-08 21:09:56 -07:00
Arthur Ice 2c78a47a94 Linux compile fixes 2014-07-08 21:09:56 -07:00
KimLS e599820383 Missing return value 2014-07-08 21:09:56 -07:00
Michael Cook (mackal) cc69e81dab Fix case-sensitive issue 2014-07-08 21:09:56 -07:00
KimLS 7048fcc358 Fix for GCC+11 compile 2014-07-08 21:09:56 -07:00
Arthur Ice b169dbd09d UpdateLiveChar converted to QueryDatabase 2014-07-08 21:09:56 -07:00
Arthur Ice f7c637a0d9 Errbuf fix and GetCharacterInfo converted to QueryDatabase 2014-07-08 21:09:56 -07:00
Arthur Ice a054b83b92 GetSkillCap converted to QueryDatabase 2014-07-08 21:09:56 -07:00
Arthur Ice 4eea1e0468 GetRaceSkill converted to QueryDatabase 2014-07-08 21:09:56 -07:00
Arthur Ice 853f1b56e5 SetMQDetectionFlag converted to QueryDatabase 2014-07-08 21:09:56 -07:00
Arthur Ice bf2d65d7e9 SetHackerFlag converted to QueryDatabase 2014-07-08 21:09:55 -07:00
Arthur Ice 7b551f0399 CopyCharacter converted to QueryDatabase 2014-07-08 21:09:55 -07:00
Arthur Ice fdbb166076 MoveCharacterToZone converted to QueryDatabase 2014-07-08 21:09:55 -07:00
Arthur Ice 2fe133fa0e GetServerType converted to QueryDatabase 2014-07-08 21:09:55 -07:00
Arthur Ice 6a59b83d43 StringFormat converted to move semantics 2014-07-08 21:09:55 -07:00
Chris M 9a634a2056 Removing socket server from cmake for now and maintaining it in its own branch until push to master 2014-07-08 21:09:55 -07:00
Chris M d0416d5f35 More Socket Server work. Made Socket server a by default disabled option in the CMake configuration while development is underway. For now, do not use. 2014-07-08 21:09:55 -07:00
Chris M 3e0f6b8520 Initial Socket Server implementation with CMakeLists.txt updated. Socket server will connect to world at this point. 2014-07-08 21:09:55 -07:00
KayenEQ 6877e40b38 Update to SE_AStacker, B, C, D
Will correclty use base value to stack with same type ie (A vs A)
Highest base value will take hold.
2014-07-08 21:09:55 -07:00
KayenEQ 1cd20c65e2 Renamed a few spell effects more appropriately. 2014-07-08 21:09:55 -07:00
KayenEQ 4672f223c1 minor fix 2014-07-08 21:09:55 -07:00
KayenEQ 042f6f3789 Updated SE_WaketheDead , max will now set duration. 2014-07-08 21:09:54 -07:00
KayenEQ 718ba3edbf Implemented SE_PetMeleeMitigation - Bonus applied to pet owner. Gives AC to owner's pet.
Related AA's to be added in a seperate update.
2014-07-08 21:09:54 -07:00
KayenEQ 32d20f22ef Revised Finishing blow so that damage now receives all melee bonus. Support also for this effect if placed on items or spells. 2014-07-08 21:09:54 -07:00
KayenEQ d3ce9792b5 Fix for AA Finishg Blow rank 1-3.
AA Data was missing and incorrectly added to wrong aaid.
Required SQL
2014-07-08 21:09:54 -07:00
KayenEQ 2afa08e361 Implemented SE_Assassinate, SE_AssassinateLevel - Defines assassinate damage and level requirements.
Revised Assassinate mechanic so damage now receives all backstab bonuses, proc chance can be set to either (lives new Proc Per minute
system, or flat chance based on dex (formula updated). Assassinate can now proc from THROW if behind target, various other adjustments.

Required SQL for AA updates
2014-07-08 21:09:54 -07:00
KayenEQ 25c20f0629 Implemented SE_HeadShot, SE_HeadShotLevel - Defines headshot damage and level requirements.
Revised HeadShot mechanic so damage now recieves all archery bonuses, proc chance can be set to either (lives new Proc Per minute
system, or flat chance based on dex (formula updated).

Required SQL for AA data
Optional SQL for rules
2014-07-08 21:09:54 -07:00
KayenEQ 786b8c80fd Udpated SE_ReclaimPet - Correct forumla for mana returned to properly return 75% of actual pet spell mana cost.
Implemented SE_ImprovedReclaimEnergy - Modifies % mana returned from SE_ReclaimPet.
Required SQL update.
2014-07-08 21:09:54 -07:00
KayenEQ 6c4e69a71d Slight change to TryDispel formula for better accuracy.
Live PATCH 5-20-14 Note: "Updated all spells which
use Remove Detrimental and Cancel Beneficial spell
effects to use a new method. The chances for those
spells to affect their targets have not changed unless
otherwise noted"

Support added for new base values to give
a nearly equivelent result.
(Ie. Will work for values pre and post change)
2014-07-08 21:09:54 -07:00
KayenEQ ef79a0607b Update SE_AETaunt - Base value will now determine AE taunt range (This will not result in any change to currently used spells). 2014-07-08 21:09:53 -07:00
KayenEQ fbdc104c12 changelog fix 2014-07-08 21:09:53 -07:00
KayenEQ 34bbb9236e Implemented SE_IllusionOther - Allows next Illusion buff (self only)
cast to be cast on target. (AA ProjectIllusion now uses this)
Run required SLQ to update AA.
2014-07-08 21:09:53 -07:00
KayenEQ 54d1cff546 Implemented SE_MassGroupBuff as spell effect (no longer hard coded for AA
only). Run required SQL to update AA tables.
Updated spells_new field175 -> numhits_type
2014-07-08 21:09:53 -07:00
KayenEQ 4684d92758 Update SE_Taunt - Limit value if present will now add instant hate. 2014-07-08 21:09:53 -07:00
KayenEQ 75fb34934d Implemented SE_StrikeThough (Was incorrectly defined as implemented previously) - Works same as item bonus. 2014-07-08 21:09:53 -07:00
KayenEQ a1f2e1c8fd Updated SE_FadingMemories - Base value will be properly utilized to set % chance for fade effect to work. 2014-07-08 21:09:53 -07:00
KayenEQ dc6154f71f Updated SE_Hate (Renamed from SE_Hate2) to now properly work for instant +/- hate spells. 2014-07-08 21:09:53 -07:00
KimLS b7cc19f983 Removed older AZone build options, use eqemu-zone-utils instead 2014-07-08 21:09:53 -07:00
KayenEQ ee6a4bd244 Implemented an enumerator list for numhits type variables.
Implemented type 4 outgoing spell damage numhits type.
2014-07-08 21:09:52 -07:00
KayenEQ e7051d0289 Fix to SE_BlanaceMana to only check classes in group that have mana. 2014-07-08 21:09:52 -07:00
KimLS 9680f39203 Some potential fixes for clang, not complete 2014-07-08 21:09:52 -07:00
KayenEQ 11918fccbf Update to SE_BalanaceMana, SE_BalanceHP to support limit value which caps max mana/hp that can be taken per player. 2014-07-08 21:09:52 -07:00
KayenEQ 53fb53e822 Kayen: Implemented SE_Metabolism - Modifies food/drink consumption rates. [Data for AA is already in database] 2014-07-08 21:09:52 -07:00
KayenEQ ad31de5f78 SE_NegateAttacks buff stacking optimized. 2014-07-08 21:09:52 -07:00
KayenEQ 6821dc27f5 Update to SE_NegateAttack, 'max' value can now set upper limit of damage absorbed.
DOT ticks will no longer be absorbed.
2014-07-08 21:09:52 -07:00
KayenEQ ef7e107443 Fixes and Updates to spell and melee mitigation runes.
-Fix for calculation error when rune was to be removed.
-Updated to support these spell effect limit values which
give a max amount per hit/spell that can be mitigated.
-Updated to allow support for these spells effects when
the max (rune value) is set to zero, which essentially
gives you unlimited mitigation but typically there is
a limit value set.
2014-07-08 21:09:52 -07:00
KayenEQ 60dcdbd181 minor fix 2014-07-08 21:09:52 -07:00
KayenEQ b732133184 Implemention for SE_Berserk, SE_Vampirism (These are not used on live)
Fix for NPC not receiving spell bonus derived HP regen.
2014-07-08 21:09:51 -07:00
KayenEQ 611f0e2aba Implemented SE_DoubleRiposte 2014-07-08 21:09:51 -07:00
KayenEQ 5a4f80621b Kayen: Implemented SE_AddHateOverTimePct (Modifies +/- your total hate on NPC by percent over time) 2014-07-08 21:09:51 -07:00
KayenEQ 606bd86e3a Implemented SE_AddHatePct (Modifies +/- your total hate on NPC by percent) 2014-07-08 21:09:51 -07:00
KayenEQ 3253f7494e Implemented SE_DamageModifier2 2014-07-08 21:09:51 -07:00
KayenEQ 31a774a92a Implemented SE_AStacker, BStacker, CStacker, DStacker
Effects are buff stacking blockers.
2014-07-08 21:09:51 -07:00
Arthur Ice a0d5e5ad72 CheckUsedName converted to QueryDatabase 2014-07-08 21:09:51 -07:00
Arthur Ice cf8cfd8b17 UpdateName converted to QueryDatabase 2014-07-08 21:09:51 -07:00
Arthur Ice e607f5c079 ClearMerchantTemp converted to QueryDatabase 2014-07-08 21:09:51 -07:00
Arthur Ice 397f7050ef GetAccountFromID converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice e20e5e59b8 GetAccountIDFromLSID converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice 20e40a9a9c AddToNameFilter converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice da2673d35e CheckNameFilter converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice 5c8cd19477 GetPEQZone converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice 2a19a3ced4 LoadZoneNames converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice 24d08857e8 GetZoneGraveyard converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice 329fcc8302 GetZoneGraveyardID converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice 91c8233a71 GetZoneLongName converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice ee696c2122 errbuf fix (again) and GetSafePoints converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice 3dfff739fa GetMiniLoginAccount converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice 6d6746f5a4 SetVariable converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice 74d65f6fda Converted LoadVariables, and LoadVariables_result to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice 87cb659dc2 errbuf issue again 2014-07-08 21:09:50 -07:00
Arthur Ice 4e25f4b68c GetCharName converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice 5ef05d1bb6 GetAccountName converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice 20e80ebb92 errbuff fixed, also moved alphanumeric account check to function in StringUtil 2014-07-08 21:09:49 -07:00
Arthur Ice 9c6b538176 GetAccountIDByName converted to QueryDatabase 2014-07-08 21:09:49 -07:00
Arthur Ice 5e629a3e5c GetAccountIDByChar converted to QueryDatabase 2014-07-08 21:09:49 -07:00
Arthur Ice 0aacecbee5 GetAccountIDByChar converted to QueryDatabase 2014-07-08 21:09:49 -07:00
Arthur Ice 3aacf7df6a DeleteCharacter converted to QueryDatabase 2014-07-08 21:09:49 -07:00
Arthur Ice 3cb7d9e3fe removed printf from DeleteCharacter switched to cerr and cout 2014-07-08 21:09:49 -07:00
Arthur Ice 02b1b5ac0c ReserveName converted to QueryDatabase 2014-07-08 21:09:49 -07:00
Arthur Ice e3de570f29 SetAccountStatus converted to QueryDatabase 2014-07-08 21:09:49 -07:00
Arthur Ice 2e7f7ad477 SetLocalPassword converted to QueryDatabase 2014-07-08 21:09:49 -07:00
Arthur Ice ed6db3e7b0 DeleteAccount converted to QueryDatabase 2014-07-08 21:09:49 -07:00
Arthur Ice 0ab8c2481b CreateAccount converted to QueryDatabase 2014-07-08 21:09:49 -07:00
Arthur Ice 95c82d9968 CheckStatus using QueryDatabase 2014-07-08 21:09:49 -07:00
Arthur Ice 1bfdeeeb16 fixed query release order and converted LoginIP to QueryDatabase 2014-07-08 21:09:49 -07:00
Arthur Ice 418e4ffee8 AddGMIP converted to QueryDatabase 2014-07-08 21:09:48 -07:00
Arthur Ice cbf49b303b CheckGMIPs to QueryDatabase 2014-07-08 21:09:48 -07:00
Arthur Ice 7f135d6e55 AddBannedIP converted to QueryDatabase 2014-07-08 21:09:48 -07:00
Arthur Ice 02f21ad7c9 CheckLogin converted to DatabaseQuery 2014-07-08 21:09:48 -07:00
Arthur Ice e6023a7013 CheckBannedIPs converted to QueryDatabase 2014-07-08 21:09:48 -07:00
Arthur Ice 699b27cecc Added LastInsertID() to MySQLRequestResult 2014-07-08 21:09:48 -07:00
Michael Cook (mackal) 4707e0f858 Inline a few functions that should be 2014-07-08 21:21:44 -04:00
Michael Cook fc721b8ec8 Merge pull request #167 from KayenEQ/Development
Development
2014-07-08 21:18:53 -04:00
KayenEQ 2918f6bc07 removal of debug msg 2014-07-08 18:27:31 -04:00
KayenEQ b27ff80c75 fix for random int -> float error 2014-07-08 08:04:56 -04:00
Alex 0e0dee3d3d Merge pull request #168 from addtheice/mysql_fetch_lengths_interface
Mysql fetch lengths interface
2014-07-07 19:36:08 -07:00
KayenEQ d22d0a8145 Update to how FcBaseEffect focus modifies SE_SkillAttack damage. 2014-07-06 20:13:19 -04:00
Arthur Ice c175369ff6 string based QueryDatabase 2014-07-06 16:15:54 -07:00
Arthur Ice 923adc3ea5 Added FieldName for column name requests 2014-07-06 16:01:10 -07:00
KayenEQ 0e438942e4 Complete revision of SE_SkillProc, SE_LimitToSkill,
SE_SkillProcSuccess (now implemented correctly)
to function more accurately and efficiently, AA supported.
This may need to be updated in the future, if more live
spells readily become avialable to test with.
2014-07-06 18:58:16 -04:00
KimLS 44aa1285ee Merge conflict resolution 2014-07-06 15:24:48 -07:00
KimLS 122d180f02 Changed some headers that seemed to conflict on slightly older versions of msvc 2014-07-06 15:22:58 -07:00
Arthur Ice f3340343ad Merge remote-tracking branch 'upstream/master' 2014-07-06 11:49:26 -07:00
Arthur Ice d514eef59b Added LengthOfColumn method because of stupid BLOBs 2014-07-05 10:20:28 -07:00
KayenEQ 3a4e72e3e7 Merge git://github.com/EQEmu/Server into Development 2014-07-04 23:38:24 -04:00
KayenEQ 58d585e2a6 Updated SE_Sanctuary - Adjust way hate lowering effect worked to be more accurate
Updated SE_SympatheticProc - Revised proc rate formula to be accurate to live.
Sympathetic foci on items with proc rate mod will now benefit from that modifier.
Sympathetic foci can now be placed on AA's (This should always be slot1 in the AA)
Implemented SE_IllusionPersistence- Allows illusions to last until you die or the illusion is forcibly removed.
Added rule 'PreNerftBardAEDot' for SE_BardAEDot to allow it to once again do damage to moving targets. (Set to true)
2014-07-04 23:35:15 -04:00
Michael Cook 9a76df62dd Merge pull request #165 from KayenEQ/Development
Implemented SE_Sanctuary - Places caster at bottom hate list,
2014-07-04 15:59:16 -04:00
KayenEQ fe5416958a Merge branch 'Development' of github.com:KayenEQ/Server into Development 2014-07-04 14:24:49 -04:00
Michael Cook (mackal) 3b9e9ae0fd Hopefully fix compile issue with some VS versions 2014-07-04 13:57:09 -04:00
Arthur Ice 773ab21085 Merge remote-tracking branch 'upstream/master' 2014-07-03 23:38:30 -07:00
KimLS eb62481766 Missing return value 2014-07-03 23:35:19 -07:00
Arthur Ice 6197fb07e1 Merge remote-tracking branch 'upstream/master' 2014-07-03 23:09:19 -07:00
KimLS c9830dff57 Merge branch 'master' of https://github.com/EQEmu/Server into clang 2014-07-03 21:49:39 -07:00
KimLS 192f9f0cb5 Fix for GCC+11 compile 2014-07-03 21:49:14 -07:00
Michael Cook (mackal) e599555ddb Fix case-sensitive issue 2014-07-04 00:46:53 -04:00
Arthur Ice 328cce33b9 Merge remote-tracking branch 'upstream/master' 2014-07-03 19:44:59 -07:00
Alex 127682cc84 Merge pull request #161 from addtheice/DatabaseInterface
Database interface
2014-07-03 19:31:36 -07:00
Arthur Ice 065db3b396 Merge remote-tracking branch 'upstream/master' 2014-07-03 19:20:03 -07:00
Chris M c645b81890 Removing socket server from cmake for now and maintaining it in its own branch until push to master 2014-07-03 18:16:43 -05:00
Arthur Ice 2734307ba2 Added LastInsertID() to MySQLRequestResult 2014-07-03 15:48:17 -07:00
Arthur Ice 53fd5e0a5c Merge remote-tracking branch 'upstream/master' 2014-07-03 15:05:22 -07:00
KayenEQ 5a30d3ed03 Update SE_InterruptCasting: Will now work for instant spells (as well as over time). 2014-07-03 11:37:38 -04:00
KayenEQ 28493488ac Updated SE_BardAEDot to no longer damage target while target is moving (consistent with live) 2014-07-03 11:00:23 -04:00
KayenEQ 0d2127f874 Changed SE_LimitMaxMana to SE_MeleeVulnerability - Weakness/Mitigation verse melee damage
(Despite lives SPA lable as the former it clearly is not what the effect does from all spell examples)
2014-07-03 10:55:59 -04:00
KayenEQ ee741048e9 Implemented SE_LimitSpellClass - Focus Limits spell to pre defined categories. (3=Cures,3=Offensive, 6=Lifetap) 2014-07-03 08:48:27 -04:00
Chris M 90f74d6847 More Socket Server work. Made Socket server a by default disabled option in the CMake configuration while development is underway. For now, do not use. 2014-07-03 03:25:58 -05:00
Chris M a92b4c04e9 Initial Socket Server implementation with CMakeLists.txt updated. Socket server will connect to world at this point. 2014-07-02 22:17:45 -05:00
KayenEQ 8453d5bc48 Renamed various Cast on Fade spell effects to more accurately describe their functions.
Missing code from prior commit.
2014-07-02 21:38:26 -04:00
KayenEQ 542c0913d6 Re-Implemented SE_TriggerMeleeThreshold and SE_TriggerSpellThreshold correctly - Trigger spell if owner of buff
takes more than the specified damage amount in a SINGLE hit, then fade the buff.
2014-07-02 14:00:50 -04:00
KayenEQ 35e72692c1 Implemented SE_FactionModPct - Modifies faction gains and losses by percent. 2014-07-02 11:54:59 -04:00
KayenEQ 4a49a11e73 Implemented SE_ResourceTap - Coverts a percent of dmg from dmg spells(DD/DoT) to hp/mana/end. 2014-07-02 11:18:50 -04:00
KayenEQ ee6d7ae6ba Implemented SE_Sanctuary - Places caster at bottom hate list,
effect fades if caster cast spell on targets other than self.
2014-07-02 08:42:18 -04:00
Michael Cook bd86e70766 Merge pull request #164 from KayenEQ/Development
Updated SE_Hate (Renamed from SE_Hate2) to now properly work for instant...
2014-07-01 23:50:31 -04:00
KayenEQ 5d85a26be1 Update to SE_AStacker, B, C, D
Will correclty use base value to stack with same type ie (A vs A)
Highest base value will take hold.
2014-07-01 17:34:36 -04:00
KayenEQ ede7f9899c Renamed a few spell effects more appropriately. 2014-07-01 16:52:28 -04:00
KayenEQ 3b8993a302 minor fix 2014-07-01 04:55:50 -04:00
KayenEQ c412038db8 Updated SE_WaketheDead , max will now set duration. 2014-07-01 04:53:24 -04:00
KimLS 2ef6d3f93e Removed older AZone build options, use eqemu-zone-utils instead 2014-06-30 14:09:03 -07:00
KayenEQ 5e7d2fd07d Implemented SE_PetMeleeMitigation - Bonus applied to pet owner. Gives AC to owner's pet.
Related AA's to be added in a seperate update.
2014-06-30 16:17:55 -04:00
KayenEQ 8edb73dc3a Revised Finishing blow so that damage now receives all melee bonus. Support also for this effect if placed on items or spells. 2014-06-30 07:18:47 -04:00
KayenEQ 93900086e1 Fix for AA Finishg Blow rank 1-3.
AA Data was missing and incorrectly added to wrong aaid.
Required SQL
2014-06-30 06:34:12 -04:00
KayenEQ 70f10782b0 Implemented SE_Assassinate, SE_AssassinateLevel - Defines assassinate damage and level requirements.
Revised Assassinate mechanic so damage now receives all backstab bonuses, proc chance can be set to either (lives new Proc Per minute
system, or flat chance based on dex (formula updated). Assassinate can now proc from THROW if behind target, various other adjustments.

Required SQL for AA updates
2014-06-29 23:26:22 -04:00
KayenEQ 8a92fada5a Implemented SE_HeadShot, SE_HeadShotLevel - Defines headshot damage and level requirements.
Revised HeadShot mechanic so damage now recieves all archery bonuses, proc chance can be set to either (lives new Proc Per minute
system, or flat chance based on dex (formula updated).

Required SQL for AA data
Optional SQL for rules
2014-06-29 01:10:19 -04:00
KayenEQ ce2a79b63e Udpated SE_ReclaimPet - Correct forumla for mana returned to properly return 75% of actual pet spell mana cost.
Implemented SE_ImprovedReclaimEnergy - Modifies % mana returned from SE_ReclaimPet.
Required SQL update.
2014-06-27 20:55:17 -04:00
KayenEQ 2fb95b00a5 Slight change to TryDispel formula for better accuracy.
Live PATCH 5-20-14 Note: "Updated all spells which
use Remove Detrimental and Cancel Beneficial spell
effects to use a new method. The chances for those
spells to affect their targets have not changed unless
otherwise noted"

Support added for new base values to give
a nearly equivelent result.
(Ie. Will work for values pre and post change)
2014-06-26 10:54:18 -04:00
KayenEQ 1867088e1a Update SE_AETaunt - Base value will now determine AE taunt range (This will not result in any change to currently used spells). 2014-06-26 10:04:21 -04:00
KayenEQ a573e840db changelog fix 2014-06-26 06:45:18 -04:00
KayenEQ 87e7b9c3f0 Implemented SE_IllusionOther - Allows next Illusion buff (self only)
cast to be cast on target. (AA ProjectIllusion now uses this)
Run required SLQ to update AA.
2014-06-26 06:23:27 -04:00
KayenEQ ec35c0d933 Implemented SE_MassGroupBuff as spell effect (no longer hard coded for AA
only). Run required SQL to update AA tables.
Updated spells_new field175 -> numhits_type
2014-06-26 05:40:09 -04:00
KayenEQ 2a48b199d2 Update SE_Taunt - Limit value if present will now add instant hate. 2014-06-25 15:25:22 -04:00
KayenEQ 02e780025d Implemented SE_StrikeThough (Was incorrectly defined as implemented previously) - Works same as item bonus. 2014-06-25 14:41:15 -04:00
KayenEQ 677ba36d55 Updated SE_FadingMemories - Base value will be properly utilized to set % chance for fade effect to work. 2014-06-25 14:31:35 -04:00
KayenEQ b23af6d436 Updated SE_Hate (Renamed from SE_Hate2) to now properly work for instant +/- hate spells. 2014-06-25 14:14:55 -04:00
Michael Cook db798ea4f4 Merge pull request #163 from KayenEQ/Development
Implemented an enumerator list for 'numhits type' variables.
2014-06-24 22:27:37 -04:00
KayenEQ 6ef11777e3 Implemented an enumerator list for numhits type variables.
Implemented type 4 outgoing spell damage numhits type.
2014-06-24 22:04:13 -04:00
Michael Cook a4fe14a3d3 Merge pull request #160 from KayenEQ/Development
Implemented SE_AStacker, BStacker, CStacker, DStacker
2014-06-24 20:51:24 -04:00
KayenEQ 660db94607 Fix to SE_BlanaceMana to only check classes in group that have mana. 2014-06-24 08:24:11 -04:00
KayenEQ aa8195565d Merge git://github.com/EQEmu/Server into Development 2014-06-24 08:19:19 -04:00
KimLS a6589e283b Some potential fixes for clang, not complete 2014-06-23 16:56:37 -07:00
KayenEQ 58175a5442 Update to SE_BalanaceMana, SE_BalanceHP to support limit value which caps max mana/hp that can be taken per player. 2014-06-23 08:37:23 -04:00
KayenEQ 41b190930f Kayen: Implemented SE_Metabolism - Modifies food/drink consumption rates. [Data for AA is already in database] 2014-06-22 23:10:29 -04:00
KayenEQ f28a392f71 SE_NegateAttacks buff stacking optimized. 2014-06-22 15:55:04 -04:00
KayenEQ 8ad9ad578c Update to SE_NegateAttack, 'max' value can now set upper limit of damage absorbed.
DOT ticks will no longer be absorbed.
2014-06-22 10:30:18 -04:00
KayenEQ a4769239fa Fixes and Updates to spell and melee mitigation runes.
-Fix for calculation error when rune was to be removed.
-Updated to support these spell effect limit values which
give a max amount per hit/spell that can be mitigated.
-Updated to allow support for these spells effects when
the max (rune value) is set to zero, which essentially
gives you unlimited mitigation but typically there is
a limit value set.
2014-06-22 06:16:34 -04:00
KayenEQ c20f35b3e8 minor fix 2014-06-21 10:12:24 -04:00
KayenEQ 5a14a85f52 Implemention for SE_Berserk, SE_Vampirism (These are not used on live)
Fix for NPC not receiving spell bonus derived HP regen.
2014-06-20 18:10:29 -04:00
Arthur Ice 3054a4c307 Database interface improvement with stl style iterators 2014-06-18 15:58:26 -07:00
KayenEQ 70476bfb06 Implemented SE_DoubleRiposte 2014-06-18 06:25:14 -04:00
Arthur Dene Ice b3292e1d22 Merge remote-tracking branch 'upstream/master' 2014-06-17 15:28:37 -07:00
KayenEQ a34a69b4c4 Kayen: Implemented SE_AddHateOverTimePct (Modifies +/- your total hate on NPC by percent over time) 2014-06-17 16:08:19 -04:00
KayenEQ aa6af15cb5 Implemented SE_AddHatePct (Modifies +/- your total hate on NPC by percent) 2014-06-17 15:49:56 -04:00
KayenEQ da70a45d22 Implemented SE_DamageModifier2 2014-06-17 15:23:07 -04:00
KayenEQ 57a216cb44 Implemented SE_AStacker, BStacker, CStacker, DStacker
Effects are buff stacking blockers.
2014-06-17 09:45:12 -04:00
Arthur Dene Ice 97e1963674 Merge remote-tracking branch 'upstream/master' 2014-05-28 09:19:26 -07:00
Arthur Dene Ice 2d6670cfe5 Merge remote-tracking branch 'upstream/master' 2014-05-05 16:26:40 -07:00
Arthur Ice 11fbb86f8b merging upstream 2014-03-26 15:17:08 -07:00
Uleat 02d6471c88 Fix for name/account discrepancy in \\zone\inventory.cpp.
Rearranged/condensed code snippets in Client::SummonItem().
Added 'augslotvisible' check to augment validation in C::SI().
2014-03-18 13:57:51 -07:00
Uleat 02633d4b01 ** Fix for RoF clients not displaying Augment Restrictions in the Item Info window.
** Change to Client::SummonItem() to enforce valid item/augment combinations. (Run the optional sql file first, before posting any
SummonItem() failure issues in the forums.)
2014-03-18 13:57:49 -07:00
KayenEQ 95176fc813 Coverted melee and magic runes to use bonuses.
Removed all the old rune flags now that none of them are used.
Fixed issues where runes would not fade properly if damage = remaing rune amount
Fixed issue where runes would stop absorbing damage if you had multiple runes.
2014-03-18 13:57:48 -07:00
ukmeth0d 8571c35e77 Fixed 2H Blunt Animation to match Live
Melee bots (with no mana) will now sit when not full HP and out of combat.
2014-03-18 13:57:47 -07:00
495 changed files with 60896 additions and 55877 deletions
+18
View File
@@ -0,0 +1,18 @@
language: cpp
compiler: gcc
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y libmysqlclient-dev libperl-dev libboost-dev liblua5.1-0-dev zlib1g-dev
script:
- cmake -G "Unix Makefiles" -DEQEMU_BUILD_TESTS=ON -DEQEMU_ENABLE_BOTS=ON
- make
- ./bin/tests
branches:
only:
- master
- stable
notifications:
email: false
irc:
channels: "irc.eqemulator.net#eqemucoders"
os: linux
+41 -19
View File
@@ -1,4 +1,36 @@
#EQEmu Cmake
#EQEmu CMake
#Variables used:
#EQEMU_DISABLE_CRT_SECURE_WARNINGS
#EQEMU_FAST_FLOATINGPOINT
#EQEMU_ENABLE_CRASH_LOGGING
#EQEMU_DISABLE_SAFESEH
#EQEMU_BUILD_MSVC_MP
#EQEMU_DEBUG_LEVEL
#EQEMU_LOG_LEVEL_STATUS
#EQEMU_LOG_LEVEL_NORMAL
#EQEMU_LOG_LEVEL_ERROR
#EQEMU_LOG_LEVEL_DEBUG
#EQEMU_LOG_LEVEL_QUEST
#EQEMU_LOG_LEVEL_COMMANDS
#EQEMU_LOG_LEVEL_CRASH
#EQEMU_STREAM_SEND_RATE
#EQEMU_STREAM_DECAY_RATE
#EQEMU_STREAM_RETRANSMIT_TIMEOUT_MUL
#EQEMU_STREAM_RETRANSMIT_TIMEOUT_MAX
#EQEMU_STREAM_AVERAGE_DELTA_MAX
#EQEMU_STREAM_RETRANSMIT_ACKED_PACKETS
#EQEMU_DEPOP_INVALIDATES_CACHE
#EQEMU_ENABLE_BOTS
#EQEMU_DISABLE_LOGSYS
#EQEMU_COMMANDS_LOGGING
#EQEMU_BUILD_SERVER
#EQEMU_BUILD_LOGIN
#EQEMU_BUILD_TESTS
#EQEMU_BUILD_PERL
#EQEMU_BUILD_LUA
#EQEMU_SANITIZE_LUA_LIBS
#EQEMU_BUILD_CLIENT_FILES
#EQEMU_MAP_DIR
#We set a fairly new version (as of 2013) because I found finding perl was a bit... buggy on older ones
#Can change this if you really want but you should upgrade!
@@ -7,9 +39,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
#FindMySQL is located here so lets make it so CMake can find it
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/" ${CMAKE_MODULE_PATH})
#For checking includes
INCLUDE (CheckIncludeFiles)
#Our project name is EQEmu
PROJECT(EQEmu)
@@ -75,7 +104,7 @@ IF(MSVC)
SET(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO} /SAFESEH:NO")
ENDIF(EQEMU_DISABLE_SAFESEH)
OPTION(EQEMU_BUILD_MSVC_MP "Enable build with multiple processes." TRUE)
OPTION(EQEMU_BUILD_MSVC_MP "Enable build with multiple processes." ON)
IF(EQEMU_BUILD_MSVC_MP)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
ENDIF(EQEMU_BUILD_MSVC_MP)
@@ -105,12 +134,6 @@ IF(UNIX)
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
ENDIF(UNIX)
#use stdint.h types if they exist for this platform (we have to guess otherwise)
CHECK_INCLUDE_FILES(stdint.h HAVE_STDINT_H)
IF(HAVE_STDINT_H)
ADD_DEFINITIONS(-DEQEMU_USE_STDINT)
ENDIF(HAVE_STDINT_H)
#debug level, 5 is default. Most people wont ever change this but it's there if you want to
SET(EQEMU_DEBUG_LEVEL 5 CACHE STRING "EQEmu debug level:
0 - Quiet mode Errors to file Status and Normal ignored
@@ -229,15 +252,17 @@ ENDIF(EQEMU_ENABLE_BOTS)
#What to build
OPTION(EQEMU_BUILD_SERVER "Build the game server." ON)
OPTION(EQEMU_BUILD_LOGIN "Build the login server." OFF)
OPTION(EQEMU_BUILD_AZONE "Build azone utility." OFF)
OPTION(EQEMU_BUILD_TESTS "Build utility tests." OFF)
OPTION(EQEMU_BUILD_PERL "Build Perl parser." ON)
OPTION(EQEMU_BUILD_LUA "Build Lua parser." OFF)
OPTION(EQEMU_BUILD_CLIENT_FILES "Build Client Inport/Export Data Programs." ON)
OPTION(EQEMU_BUILD_LUA "Build Lua parser." ON)
OPTION(EQEMU_BUILD_CLIENT_FILES "Build Client Import/Export Data Programs." ON)
#C++11 stuff
IF(NOT MSVC)
ADD_DEFINITIONS(-std=c++0x)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-reserved-user-defined-literal")
ENDIF()
ENDIF(NOT MSVC)
#Various definitions
@@ -267,6 +292,7 @@ ADD_DEFINITIONS(-DLOG_LEVEL_DEBUG=${EQEMU_LOG_LEVEL_DEBUG})
ADD_DEFINITIONS(-DLOG_LEVEL_QUEST=${EQEMU_LOG_LEVEL_QUEST})
ADD_DEFINITIONS(-DLOG_LEVEL_COMMANDS=${EQEMU_LOG_LEVEL_COMMANDS})
ADD_DEFINITIONS(-DLOG_LEVEL_CRASH=${EQEMU_LOG_LEVEL_CRASH})
ADD_DEFINITIONS(-DGLM_FORCE_RADIANS)
IF(EQEMU_STREAM_RETRANSMIT_ACKED_PACKETS)
ADD_DEFINITIONS(-DRETRANSMIT_ACKED_PACKETS=true)
@@ -319,10 +345,6 @@ IF(EQEMU_BUILD_LOGIN)
ADD_SUBDIRECTORY(loginserver)
ENDIF(EQEMU_BUILD_LOGIN)
IF(EQEMU_BUILD_AZONE)
ADD_SUBDIRECTORY(utils)
ENDIF(EQEMU_BUILD_AZONE)
IF(EQEMU_BUILD_TESTS)
ADD_SUBDIRECTORY(tests)
ENDIF(EQEMU_BUILD_TESTS)
+51 -3
View File
@@ -1,5 +1,53 @@
EQEmu - Custom Game Implementation for EverQuest
EQEmu
===
Dependencies can be obtained at http://eqemu.github.io
[![Build Status](https://travis-ci.org/EQEmu/Server.svg?branch=master)](https://travis-ci.org/EQEmu/Server)
Overview
---
EQEmu is a custom server implementation for EverQuest
Dependencies
---
For Windows: http://eqemu.github.io
Login Server dependencies for Windows/Linux/OSX: http://eqemu.github.io
For Debian based distros (adjust to your local flavor):
- libmysqlclient-dev
- libperl-dev
- liblua5.1-0-dev (5.2 should work as well)
- libboost-dev
Further instructions on building the source can be found on the
[wiki](http://wiki.eqemulator.org/i?M=Wiki).
Bug reports
---
Please use the [issue tracker](https://github.com/EQEmu/Server/issues) provided by GitHub to send us bug
reports or feature requests.
The [EQEmu Forums](http://www.eqemulator.org/forums/) also have forums to submit
bugs/get help with bugs.
Contributions
---
The preferred way to contribute is to fork the repo and submit a pull request on
GitHub. If you need help with your changes, you can always post on the forums or
try IRC. You can also post unified diffs (`git diff` should do the trick) on the
[Server Code Submissions](http://www.eqemulator.org/forums/forumdisplay.php?f=669)
forum, although pull requests will be much quicker and easier on all parties.
Contact
---
- **User IRC Channel**: `#eqemu` on `irc.eqemulator.net`
- **Developer IRC Channel**: `#eqemucoders` on `irc.eqemulator.net`
- [EQEmulator Forums](http://www.eqemulator.org/forums)
- [EQEmulator Wiki](http://wiki.eqemulator.org/i?M=Wiki)
More Information: https://github.com/EQEmu/Server/wiki
+467
View File
@@ -1,5 +1,472 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50)
-------------------------------------------------------
== 10/09/2014 ==
Uleat: Added 'BOTS' conversion code to supplement the database 'PlayerProfile' blob conversion that Akkadius recently implemented.
Note: This automatic conversion uses the view `vwbotcharactermobs` as an update vector. If you need/would like for the converter to run on
previously and/or manually changed code, or just have a need for it to re-run, change the following in the database view and save:
"c.`last_login`," to "c.`timelaston`,"
"c.`zone_id`" to "c.`zoneid`"
"FROM `character_data` AS c" to "FROM `character_old` AS c"
** This will only work if you haven't deleted your `character_old` table **
== 10/07/2014 ==
demonstar55: Identified tutorial flag in all charcreate packets, reworked logic to correctly set homes binds
== 10/05/2014 ==
Uleat: Added Server<->Corpse slot translators needed for re-enumeration (inactive until phased in)
== 10/03/2014 ==
Uleat: Fixed Ti(6.2) OP_AugmentInfo translation that I broke (does not currently need and I mis-read a process)
Uleat: Moved client patch OP_LootItem slot translation to external handlers
== 10/02/2014 ==
Kayen: Exported to PERL $client->SendSpellAnim(targetid, spellid)
This function sends the spell graphic of a spell without actually having to cast the spell.
== 10/02/2014 ==
Uleat: First round of Ti/6.2 translators added - needed for re-enumeration
== 10/01/2014 ==
Kayen: Exported to PERL $client->SendColoredText(color, msg)
demonstar55: Exported SendColoredText to lua
== 09/30/2014 ==
Uleat: Implemented click-casting from bag slots for clients that natively support it (RoF)
== 09/28/2014 ==
demonstar55: Add support for post June 18, 2014 Hundred Hands Effect spells (they changed the formula and stuff)
set Spells:Jun182014HundredHandsRevamp to true if you're using a spell file from June 18, 2014+
== 09/27/2014 ==
Kayen: Implemented perl function $mob->GetSpellStat(spell_id, identifier, slot);
Note: identifier is the stat field in spells_new, slot is used for certain effects like effectid, base,base2, max ect.
Example $mob->GetSpellStat(121, "range"); //Returns spell range
Example $mob->GetSpellStat(121, "effectid", 1); //Returns the the value of effectid1
This will allow you to pull almost all the data for any spell in quest files.
demonstar55: Move the client's SetAttackTimer to the end of Client::CalcBonuses to keep the haste in sync
demonstar55: Correct haste/slow "stacking" rules
demonstar55: Correct SE_AttackSpeed4 to respect unslowable
demonstar55: Make the haste be between 1-225 like the client (<100 = slow, >100 = haste) to ...
demonstar55: Correct Hundred Hands effect and use formula provided by devs
== 09/24/2014 ==
Uleat: Re-ordered server opcodes and handlers to give them some predictability of location (I need this for the inventory re-enumeration.)
demonstar55: Added helper function bool EQEmu::IsTradeskill(uint32 skill)
== 09/23/2014 ==
Kayen: Spell recourse effects will now be applied AFTER the base spells effects have been applied (consistent with live).
Kayen: SE_ApplySpell and SE_TriggerSpell will now be applied based on which effect slot they are used in (instead of always before all spell effects are checked).
Note: If a spell has multiple SE_TriggerSpell effects within it. Only one will be able to trigger. (If you want multiple spells use SE_ApplySpell)
== 09/22/2014 ==
Akkadius: #resetaa now covers the function of #resetaa and #refundaa
- #resetaa will wipe all AA data, refund the spent points into the available points and send character to character select properly
Akkadius: Removed #refundaa
Akkadius: Removed a lot of debug code for blob conversion
Akkadius: Changed status logging for loads/saves to Debug category
== 09/21/2014 ==
Akkadius: Player Profile Blob to Database Conversion
- Summary: HUGE difference in database speeds reads/writes and 1:10 datasize difference
- The new character storage engine unlike the character_ table before, is able to properly index data and make use of
proper MySQL/MariaDB caching optimizations and performance has increased phenominally
PERFORMANCE AND STATISTICS FIGURES (Varies on hardware):
- EZ Server Character data size of 2.6GB `character_` table alone now takes up approx 600MB
- Character Data Loads take approx .03 seconds BEFORE MySQL/MariaDB cache
- Character Data Loads take approx .001-.0035 seconds AFTER MySQL/MariaDB cache
- Character Data Saves take approx .0001 - .003 for any particular save operation
- Database Auto Conversion: When the 'character_' table exists, World boot-up will queue an auto-conversion prompt and convert all of your characters, BACKUP
YOUR DATABASE BEFORE CONVERTING, here is an EASY backup script: http://wiki.eqemulator.org/p?MySQL_DB_Backup_Script
- On auto conversion, the following tables are created automatically:
- Table: `character_skills` - Stores Character Skills
- Table: `character_languages` - Stores Character Language
- Table: `character_bind` - Stores Character Bind point and Home Bind point designated by is_home bool field
- Table: `character_alternate_abilities` - Stores all Character AA
- Table: `character_currency` - Stores all Platinum/Gold/Silver/Copper and character related currencies
- Table: `character_data` - Stores basic character data (Fields from `character_` table migrated to this table)
- Table: `character_spells` - Stores character spells
- Table: `character_memmed_spells` - Stores character memorized spells
- Table: `character_disciplines` - Stores character disciplines
- Table: `character_material` - Stores character armor dye textures
- Table: `character_tribute` - Stores character tributes
- Table: `character_bandolier` - Stores character bandoliers
- Table: `character_inspect_messages` - Stores character inspection messages (Moved from `character_` table)
- Table: `character_leadership_abilities` - Stores character Leadership AAs
- Loads: Majority of Player profile loads now occur at Client::Handle_Connect_OP_ZoneEntry
LoadCharacterFactionValues(uint32 character_id, faction_map & val_list);
LoadCharacterSpellBook(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterMemmedSpells(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterLanguages(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterDisciplines(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterSkills(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterData(uint32 character_id, PlayerProfile_Struct* pp, ExtendedProfile_Struct* m_epp);
LoadCharacterCurrency(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterBindPoint(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterMaterialColor(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterBandolier(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterTribute(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterPotions(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterLeadershipAA(uint32 character_id, PlayerProfile_Struct* pp);
- Saves: Occur all over the code now instead of calling full saves
SaveCharacterBindPoint(uint32 character_id, uint32 zone_id, uint32 instance_id, float x, float y, float z, float heading, uint8 is_home);
SaveCharacterCurrency(uint32 character_id, PlayerProfile_Struct* pp);
SaveCharacterData(uint32 character_id, uint32 account_id, PlayerProfile_Struct* pp, ExtendedProfile_Struct* m_epp);
SaveCharacterAA(uint32 character_id, uint32 aa_id, uint32 current_level);
SaveCharacterSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
SaveCharacterMemorizedSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
SaveCharacterMaterialColor(uint32 character_id, uint32 slot_id, uint32 color);
SaveCharacterSkill(uint32 character_id, uint32 skill_id, uint32 value);
SaveCharacterLanguage(uint32 character_id, uint32 lang_id, uint32 value);
SaveCharacterDisc(uint32 character_id, uint32 slot_id, uint32 disc_id);
SaveCharacterTribute(uint32 character_id, PlayerProfile_Struct* pp);
SaveCharacterBandolier(uint32 character_id, uint8 bandolier_id, uint8 bandolier_slot, uint32 item_id, uint32 icon, const char* bandolier_name);
SaveCharacterPotionBelt(uint32 character_id, uint8 potion_id, uint32 item_id, uint32 icon);
SaveCharacterLeadershipAA(uint32 character_id, PlayerProfile_Struct* pp);
- Deletes:
DeleteCharacterSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
DeleteCharacterMemorizedSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
DeleteCharacterDisc(uint32 character_id, uint32 slot_id);
DeleteCharacterBandolier(uint32 character_id, uint32 band_id);
DeleteCharacterLeadershipAAs(uint32 character_id);
- Now occur all over the code and only trigger when necessary
- 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
- Every time an AA was purchased, a full save was made
- Every time a spell was scribed/swapped, disc was trained
- When a client exists a zone, when a client enters a zone
- NOTE: These amount of excessive saves have caused scalability issues that cause the `character_` table to hang which causes process hangs that affect the whole server
because of the slowness of the `character_` table and the blob not allowing any indexing to occur
- All functions that once depended on the `character_` table are now rewritten to appropriately read from the `character_data` table
- Database query errors that occur during conversion or from and load/save/delete character functions are now leveraged via ThrowDBError and logs now go to
Server_Folder_Root/eqemu_query_error_log.txt (You cannot log errors natively through MySQL)
- DBASYNC IS NOW COMPLETELY REMOVED - This was mainly for Character data async loads/saves and merchantlist loads
- Side implementations:
Perl Exports:
- quest::crosszonesetentityvariablebynpctypeid(npctype_id, id, m_var) - Sets entity variables world wide with specified npctype_id
- quest::crosszonesignalnpcbynpctypeid(npctype_id, data) - Signals all NPC entities world wide with specified npctype_id
- $client->GetTaskActivityDoneCount(TaskID, ActivityID) - Gets task activity done count by task id and activity id for client entity
VIEW TABLE SIZE AFTER CONVERT:
SELECT CONCAT(table_schema, '.', table_name) as table_name,
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows,
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA,
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx,
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size,
ROUND(index_length / data_length, 2) idxfrac
FROM information_schema.TABLES
WHERE `table_name` LIKE 'character_%'
ORDER BY DATA DESC;
== 09/20/2014 ==
demonstar55: Fix crash in SendEnterWorld on illegally long names
demonstar55: The client only lets you enter 15 characters for your name (UF at least)
demonstar55: Add rule Spells:SHDProcIDOffByOne for pre-UF spell file, set to true, UF+ set to false
KLS: #suspend and #ban now have required messages to record the reason for the ban/suspension.
== 09/19/2014 ==
demonstar55: Added Client::Tell_StringID (used in tell queue messages)
demonstar55: Tell queues (and offline) messages now show correctly
demonstar55: Fix starting with capital check
== 09/18/2014==
demonstar55: Implement tell queues
Currently set to a limit of 20 by default (World:TellQueueSize) I was unable to hit the limit on live though (100+)
The required SQL nukes the old tell queue table, which may or may not be in your DB
Optional SQL adds the rule to the DB to allow easy of change
Note: this does not play well with multiple sessions with the same name on (crash and relog and have multiple sessions) but normal tells don't play well either
== 09/16/2014 ==
demonstar55: Implement spell formula 137 (BER AA Desperation)
Uleat (NateDog): Fix for LoadBuffs() crash when a spell with a non-persistent Illusion effect was loaded.
demonstar55: Fix some effect calcs + implement more (derived from the client)
== 09/15/2014 ==
Kayen: Nimbus effects will now be reapplied after zoning and will be removed when associated buff fades.
== 09/13/2014 ==
demonstar55: Fix rogues not having Thieves' Cant
== 09/09/2014 ==
demonstar55: Incrase Mob kick/bash timer by 3
see: http://www.eqemulator.org/forums/showthread.php?t=38734
demonstar55: Fix slow effect on NPC special attack reuse timers
see: http://www.eqemulator.org/forums/showthread.php?t=38734
demonstar55: Slow fixes to bots!
demonstar55: Revamped how NPC attack rate is set
SQL: 2014_09_09_attack_delay.sql
demonstar55: Added attackdelay to #npcedit
== 09/08/2014 ==
demonstar55: Fix slow calc
see: http://www.eqemulator.org/forums/showthread.php?t=38734
== 09/07/2014 ==
Akkadius: Fixed ROF Augment item dupe with not checking for available slots properly and adding items to the virtual instance
== 09/06/2014 ==
Uleat: Tweaked 'Smart' trading code to return main slots before sub slots in stackable and free space search processes. (If enough people ask for it, I'll add an optional rule to allow 'bag packing' - the original implementation behavior)
== 09/05/2014 ==
Uleat: Fix for cursor item loss when zoning. (Thanks to the other devs who traced and fixed the 'macro' issue!)
demonstar55: Fix size getting nuked with lua's SendIllusionPacket
== 09/03/2014 ==
Secrets: Identified the routines needed to augment items in RoF. Currently, only Insert and Remove are supported. Swap and Destroy do not work due to missing functions related to the cursor.
demonstar55: Added work around command to show numhits on your buffs (#shownumhits)
Uleat: Fix for timer issue introduced by Zone::ShutDown() fix.
== 09/02/2014 ==
Secrets: Identified OP_GuildPromote for RoF clients.
Secrets: Fixed promotion, demotion, transferring a leader and displaying of client ranks in the Rain of Fear client. The rain of fear client, as such, will only have 3 ranks like the other clients, but supports a theoretical 8 ranks later.
Secrets/Akkadius: Fixed an issue involving character name lookup in the new DB code.
demonstar55: crash fix checking DivineAura in hate_list.cpp
Secrets: Reverted some code that got in the main branch that shouldn't have gotten there.
Uleat: Changed #loc to report the same precision as /loc for Cartesians
== 08/31/2014 ==
KLS: Fixed a bug in fishing in S3D zones
KLS: Fixed a bug in turnins with new any abstraction
KLS: Fixed a few quest related inconsistencies.
KLS: Added Lua EntityList::ChannelMessage(from, type, msg, language)
== 08/30/2014 ==
demonstar55: (noudess) Merchants should be more descriptive of why they don't sell to you
== 08/26/2014 ==
Uleat: Implemented 'Smart' Player Trade transfers. Trades are processed by containers, stackables and then all remaining. QueryServ logs have been updated to match these transactions.
Note: QueryServ logs previously listed 'Items' on the main entry table. This indicated the number of slots affected and not the actual number of items.
This field now indicates the actual number of items transferred. For non-stackable, the value is '1' and stackable is the number of charges. A _detail_count
property has been added to both 'Trade' and 'Handin' structs to indicate the number of details recorded..though, not tracked..it could be added.
== 08/24/2014 ==
Uleat: Fix (attempted) for zone crashes related to zone shut-down. This change disables all Mob AI and disables/deletes all Mob timers once Zone::ShutDown() is called. More areas will be addressed as reports come in.
Note: Perl and Lua quests tested to work..please post any aberrant behavior. (I finally set my spell-check to US English...)
Akkadius: Character creation process crash fix and query cleanup
Akkadius: 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
- Required SQL: utils\sql\git\required\2014_08_24_character_lookup.sql
== 08/23/2014 ==
Akkadius: Changed zone process window title format, example: 'crushbone :: clients: 6 inst_id: 1 inst_ver: 0 :: port: 7015'
Akkadius: Most of the following changes are QueryServ related, fully implemented its original functionality to be able to offload
intensive or metric based logging to a remote server process that could exist on another server entirely
Akkadius: Implemented Player Event Logging Types (Go to table `qs_player_events`):
1 = Player_Log_Quest,
2 = Player_Log_Zoning,
3 = Player_Log_Deaths,
4 = Player_Log_Connect_State,
5 = Player_Log_Levels,
6 = Player_Log_Keyring_Addition,
7 = Player_Log_QGlobal_Update,
8 = Player_Log_Task_Updates,
9 = Player_Log_AA_Purchases,
10 = Player_Log_Trade_Skill_Events,
11 = Player_Log_Issued_Commands,
12 = Player_Log_Money_Transactions,
13 = Player_Log_Alternate_Currency_Transactions,
- All QueryServ logging will be implemented with a front end in EoC 2.0 very soon
- Architecture page: http://wiki.eqemulator.org/p?QueryServ_Architecture
Akkadius: Changed all QS Error related logging to 'QUERYSERV__ERROR'
Akkadius: (Natedog) (Crash Fix) Legacy MySQL bug revert for loading AA's COALESCE( from COALESCE (
Akkadius: Implemented Perl Quest objects (LUA still needed to be exported):
- quest::qs_send_query("MySQL query") - Will send a raw query to the QueryServ process, useful for custom logging
- quest::qs_player_event(char_id, event_desc); - Will process a quest type event to table `qs_player_events`
Akkadius: Added MySQL Tables
- `qs_player_aa_rate_hourly`
- `qs_player_events`
- Source table structures from:
- utils\sql\git\queryserv\required\08_23_2014_player_events_and_player_aa_rate_hourly
To get the complete QueryServ schema, source from here:
- utils\sql\git\queryserv\required\Complete_QueryServ_Table_Structures.sql
Akkadius: Added rules for each logging type, source rules here with them enabled by default:
- utils\sql\git\queryserv\required\Complete_QueryServ_Rules_Enabled.sql
Akkadius: Spawn related logging cleanup
Akkadius: General code cleanup
Akkadius: More to come for QueryServ
== 08/22/2014 ==
Uleat: Rework of Trade::FinishedTrade() and Trade::ResetTrade() to parse items a little more intelligently.
Trade window items are now sent to client inventory in this order:
- Bags
- Partial stack movements
- All remaining items
If any of these procedures cause any problems, please post them immediately.
== 08/20/2014 ==
Uleat: Rework of Trade::AddEntity() - function used to move items into the trade window. Now accepts argument for 'stack_size' and updates client properly.
Note: I tested trade with Titanium:{SoF,SoD,UF,RoF} in both directions and no client generated an OP_MoveItem event for attempting to place a stackable
onto a partial stack already in the trade window. The only way to achieve stacking is to click on the receiving client. If there is a partial stack remaining
on the cursor after the OP_MoveItem event, and there is room available, the client will generate subsequent events to move the remaining count.
== 08/19/2014 ==
Akkadius: Implemented a Stop_Return feature (Accidental item handin prevention) that will be symmetrically used with plugin::return_items that I am currently running live testing on EZ before releasing to EQEmu. This does not hurt to have this in the source.
Akkadius: Fixed crash where 'attacker' validation is not being checked
Akkadius: Removed petition console spam that does not follow traditional logging and is useless
Akkadius: Made fix with SympatheticProcChances where it was checking for TempItem->Focus.Effect instead of TempItemAug->Focus.Effect
== 08/18/2014 ==
Uleat: Fix for https://github.com/EQEmu/Server/issues/127 -- also activated a remarked action in doors.cpp to eliminate a memory leak.
== 08/16/2014 ==
KLS: (addmoreice) Trying out some unstable DB changes. Do backup your database before trying them as master will be considered unstable for a few days at least.
Uleat (Noudness): Fixed a floating-point comparison error that led to the notorious 'client bounce' (this is not related to the
'mob falling' due to not having maps installed.) This fix also eliminates a sizeable amount of unnecessary out-going packets due
to invalid orientation corrections.
Note: This patch is probably of significant enough importance that admins may wish to manually apply this to older server builds.
The number of packets reduced per second should be approximately (num_stationary_close_clients * (num_close_clients - 1)). This will
likely have the most effect in zones like: Nexus, Bazaar, Guilds (Halls) and RAID INSTANCES - where players don't move around a lot.
== 08/15/2014 ==
Uleat: Reactivated the Bot::Spawn() code for sending post-spawn wear change updates..temporary until I can sort out the proper usage.
== 08/13/2014 ==
Uleat (Kingly_Krab): Fix for bot chest armor graphic glitch. (fix also caused RoF #wc to work properly)
== 08/02/2014 ==
Kayen: Implemented spell_news fields
- npc_no_los (check if LOS is required for spells)
- InCombat, OutofCombat - Used together to restrict spells to only be cast while
in/out of combat (beneficial) or if target is in/out of combat (detrimental).
-min_dist, min_dist_mod, max_dist, max_dist_mod - Scales spell power based on targets distance from caster.
*This will require further work to fully implement but will work with 90% of live spells as is.
*If making custom spells do not include effects that can't be scaled (like a spell trigger)
- min_rage sets minimum distance range that must be away from target.
Required SQL: utils/sql/git/required/2014_08_02_spells_new.sql
== 07/31/2014 ==
Uleat: More inventory slot constant conversions. This should be the bulk of everything..but, due to the size of the server code, there
may be some hidden ones. (client_packet.cpp and the client translators still need a thorough review.)
Note: Please report any abnormal behaviour with inventory-related content..each diff file was reviewed 3 times..but, things CAN be missed.
Uleat: Test fix for client crashes in Bazaar, while actively selling, with a charm in the Trader's Satchel.
== 07/27/2014 ==
Uleat: More updates to the dictionary. Added a 'constants' file for each client translator..these will tie-in to the dictionary. Started
replacement of hard-coded numeric values with a pre-defined constant. This will help in the transition.
== 07/16/2014 ==
Uleat: Initial commit of new client/server 'dictionaries' - work in-progress... Changed equipment slot references to reflect new naming
conventions. Lua enumerations maintain both the old and new names as to not break existing scripts..but, the old names are deprecated.
== 07/14/2014 ==
KLS: Changes to CMake build
-Lua builds by default now
-Common has been renamed common
-Binary files will now be put into ${CMAKE_BINARY_DIR}/bin instead of ${CMAKE_BINARY_DIR}/Bin
The last two are of note to people on non-windows systems as case sensitivity is important. Edit your scripts accordingly, thank you.
== 07/10/2014 ==
Kayen: Updated table npc_spells to now support defensive and ranged procs.
Note: Proc rate modifier work as it does for spell effects (ie 200 = 200% baseline chance modifier)
Table is also now contains 12 AI spell casting variables that can be set to fine tune casting behaviors per spell set.
Global default rules have also been added that can further fine tune all content if no specific variables are set.
Descriptions of new AI casting fields in npc_spells
'fail_recast' AI spell recast time(MS) when an spell is cast but fails (ie stunned)
'engaged_no_sp_recast_min' AI spell recast time(MS) checked when no spell is cast while engaged in combat. (min time in random)
'engaged_no_sp_recast_max' AI spell recast time(MS) checked when no spell is cast while engaged in combat. (max time in random)
'engaged_b_self_chance' Chance during first AI Cast check to do a beneficial spell on self (ie check to heal self)
'engaged_b_other_chance' Chance during second AI Cast check to do a beneficial spell on others.(ie check to heal others)
'engaged_d_chance' 'Chance during third AI Cast check to do a determental spell on others (ie check to nuke others)
'pursue_no_sp_recast_min' AI spell recast time(MS) checked when no spell is cast while chasing target. (min time in random)
'pursue_no_sp_recast_max' AI spell recast time(MS) checked when no spell is cast while chasing target. (max time in random)
'pursue_d_chance' Chance while chasing target to cast a detrimental spell.
'idle_no_sp_recast_min' AI spell recast time(MS) checked when no spell is cast while idle. (min time in random)
'idle_no_sp_recast_max' AI spell recast time(MS) checked when no spell is cast while idle. (max time in random)
'idle_b_chance' Chance to cast a beneficial spell while idle (ie cast heal on self while out of combat).
Kayen: Updated table npc_types, adding field 'ranged_type' and 'ammo_idfile'
'ranged_type' Will set what skill / animation is used when NPC uses a ranged attacked (special ability 11)
'ammo_idfile' Will set what projectile graphic an NPC uses in a ranged attacked (special ability 11) Format IT#### (same as item 'idfile')
(*Set to IT11118 for some fun*)
Added parameters: SPECATK_RANGED_ATK = 11
Param0: Min Ranged distance (default: 25)
Param1: Max Ranged distance (default: 250)
Param2: Percent Chance to Hit modifier
Param3: Percent Total Damage modifier
Kayen: Updated to Chance to Hit code with how bonuses are applied to be consistent for all effects.
Added field to npc_types 'Avoidance' which will modify chance to avoid melee
Added rules to set max and min chance to hit from melee/ranged (Default 95% / 5%)
Required SQL: utils/sql/git/required/2014_07_10_npc_spells.sql
Optional SQL: utils/sql/git/optional/2014_07_10_AICastingRules.sql
== 07/5/2014 ==
Kayen: Updated SE_Sanctuary - Adjust way hate lowering effect worked to be more accurate
Kayen: Updated SE_SympatheticProc - Revised proc rate formula to be accurate to live.
Sympathetic foci on items with proc rate mod will now benefit from that modifier.
Sympathetic foci can now be placed on AA's (This should always be slot1 in the AA)
Kayen: Implemented SE_IllusionPersistence- Allows illusions to last until you die or the illusion is forcibly removed.
Kayen: Added rule 'PreNerftBardAEDot' for SE_BardAEDot to allow it to once again do damage to moving targets. (Set to true)
Kayen: Completely revised SE_SkillProc, SE_LimitToSkill, SE_SkillProcSuccess to overall just work better and more accurately, AA support.
Required SQL: utils/sql/git/required/2014_07_04_AA_Update.sql
== 07/2/2014 ==
Kayen: Implemented SE_Sanctuary - Places caster at bottom hate list, effect fades if caster cast spell on targets other than self.
Kayen: Implemented SE_ResourceTap - Coverts a percent of dmg from dmg spells(DD/DoT) to hp/mana/end.
Kayen: Implemented SE_FactionModPct - Modifies faction gains and losses by percent.
Kayen: Re-Implemented SE_TriggerMeleeThreshold and SE_TriggerSpellThreshold correctly - Trigger spell if owner of buff
takes more than the specified damage amount in a SINGLE hit, then fade the buff.
Kayen: Implemented SE_LimitSpellClass - Focus Limits spell to pre defined categories. (3=Cures,3=Offensive, 6=Lifetap)
Kayen: Changed SE_LimitMaxMana to SE_MeleeVulnerability - Weakness/Mitigation verse melee damage
(Despite lives SPA lable as the former it clearly is not what the effect does from all spell examples)
Kayen: Updated SE_BardAEDot to no longer damage target while target is moving (consistent with live)
Kayen: Update SE_InterruptCasting: Will now work for instant spells (as well as over time).
== 06/25/2014 ==
Kayen: Updated SE_Hate (Renamed from SE_Hate2) to now properly work for instant +/- hate spells.
Kayen: Updated SE_FadingMemories - Base value will be properly utilized to set % chance for fade effect to work.
Kayen: Implemented SE_StrikeThough (Was incorrectly defined as implemented previously) - Works same as item bonus.
Kayen: Update SE_Taunt - Limit value if present will now add instant hate.
Kayen: Implemented SE_MassGroupBuff - Allows next group buff cast to be a MGB (AA now uses this)
Kayen: Implemented SE_IllusionOther - Allows next Illusion buff (self only) cast to be cast on target. (AA now uses this)
Kayen: Update SE_AETaunt - Base value will now determine AE taunt range (This will not result in any change to currently used spells).
Kayen: Udpated SE_ReclaimPet - Correct forumla for mana returned to properly return 75% of actual pet spell mana cost.
Kayen: Implemented SE_ImprovedReclaimEnergy - Modifies % mana returned from SE_ReclaimPet.
Kayen: Implemented SE_HeadShot, SE_HeadShotLevel - Defines headshot damage and level requirements.
Revised HeadShot mechanic so damage now receives all archery bonuses, proc chance can be set to either (lives new Proc Per minute
system, or flat chance based on dex (formula updated).
Kayen: Implemented SE_Assassinate, SE_AssassinateLevel - Defines assassinate damage and level requirements.
Revised Assassinate mechanic so damage now receives all backstab bonuses, proc chance can be set to either (lives new Proc Per minute
system, or flat chance based on dex (formula updated). Assassinate can now proc from THROW if behind target, various other adjustments.
Kayen: Fix to AA Finishing Blow missing aa_effects data, update required SQL.
Revised Finishing blow so that damage now receives all melee bonus. Support also for this effect if placed on items or spells.
Kayen: Implemented SE_PetMeleeMitigation - Bonus applied to pet owner. Gives AC to owner's pet.
Required SQL: utils/sql/git/required/2014_06_25_AA_Update.sql
Optional SQL: utils/sql/git/optiional/2014_06_29_HeadShotRules.sql
== 06/17/2014 ==
Kayen: Implemented SE_AStacker, SE_BStacker, SE_CStacker, SE_DStacker.
These effects when present in buffs prevent each other from stacking,
Any effect with B prevents A, C prevents B, D prevents C.
Kayen: Implemented SE_DamageModifier2 (Stacks with SE_DamageModifier, mods damage by skill type)
Kayen: Implemented SE_AddHatePct (Modifies +/- your total hate on NPC by percent)
Kayen: Implemented SE_AddHateOverTimePct (Modifies +/- your total hate on NPC by percent over time)
Kayen: Implemented SE_DoubleRiposte (Modifies +/- your double riposte chance) *Not used in any live effects
Kayen: Implemented SE_Berserk (Sets client as 'Berserk' giving chance to crippling blow) *Not used in any live effects
Kayen: Implemented SE_Vampirsm (Stackable lifetap from melee effect) *Not used in any live effects
Kayen: Minor fixes to how lifetap from melee effects are calced. Removed arbitrary hard cap of 100%, Negative value will now dmg client.
Kayen: Fix to issue that prevented NPC's from receiving HP Regeneration derived from spell buffs.
Kayen: Fixes and Updates for melee and spell mitigation runes.
Kayen: Update to SE_NegateAttack, 'max' value can now set upper limit of damage absorbed. DOT ticks will no longer be absorbed.
Kayen: Implemented SE_Metabolism - Modifies food/drink consumption rates. [Data for AA is already in database]
Kayen: Update to SE_BalanaceMana, SE_BalanceHP to support limit value which caps max mana/hp that can be taken per player.
== 06/13/2014 ==
Kayen: For table 'npc_spell_effects_entries' setting se_max for damage shield effects (59) will now determine the DS Type (ie burning)
Setting se_max to 1 for SkillDamageTaken effects (127) will allow for stackable mitigation/weakness same as quest function ModSkillDmgTaken.
+2 -2
View File
@@ -11,7 +11,7 @@ ADD_EXECUTABLE(export_client_files ${export_sources} ${export_headers})
INSTALL(TARGETS export_client_files RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
TARGET_LINK_LIBRARIES(export_client_files Common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY})
TARGET_LINK_LIBRARIES(export_client_files common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY})
IF(MSVC)
SET_TARGET_PROPERTIES(export_client_files PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF")
@@ -33,4 +33,4 @@ IF(UNIX)
ADD_DEFINITIONS(-fPIC)
ENDIF(UNIX)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/Bin)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
+60 -65
View File
@@ -19,11 +19,11 @@
#include <stdio.h>
#include "../../common/debug.h"
#include "../../common/shareddb.h"
#include "../../common/EQEmuConfig.h"
#include "../../common/eqemu_config.h"
#include "../../common/platform.h"
#include "../../common/crash.h"
#include "../../common/rulesys.h"
#include "../../common/StringUtil.h"
#include "../../common/string_util.h"
void ExportSpells(SharedDatabase *db);
void ExportSkillCaps(SharedDatabase *db);
@@ -32,7 +32,7 @@ void ExportBaseData(SharedDatabase *db);
int main(int argc, char **argv) {
RegisterExecutablePlatform(ExePlatformClientExport);
set_exception_handler();
LogFile->write(EQEMuLog::Status, "Client Files Export Utility");
if(!EQEmuConfig::LoadConfig()) {
LogFile->write(EQEMuLog::Error, "Unable to load configuration file.");
@@ -52,11 +52,11 @@ int main(int argc, char **argv) {
"database connection");
return 1;
}
ExportSpells(&database);
ExportSkillCaps(&database);
ExportBaseData(&database);
return 0;
}
@@ -69,72 +69,69 @@ void ExportSpells(SharedDatabase *db) {
return;
}
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = "SELECT * FROM spells_new ORDER BY id";
MYSQL_RES *result;
MYSQL_ROW row;
if(db->RunQuery(query, strlen(query), errbuf, &result)) {
while(row = mysql_fetch_row(result)) {
const std::string query = "SELECT * FROM spells_new ORDER BY id";
auto results = db->QueryDatabase(query);
if(results.Success()) {
for (auto row = results.begin(); row != results.end(); ++row) {
std::string line;
unsigned int fields = mysql_num_fields(result);
unsigned int fields = results.ColumnCount();
for(unsigned int i = 0; i < fields; ++i) {
if(i != 0) {
line.push_back('^');
}
line += row[i];
if(row[i] != nullptr) {
line += row[i];
}
}
fprintf(f, "%s\n", line.c_str());
}
mysql_free_result(result);
} else {
LogFile->write(EQEMuLog::Error, "Error in ExportSpells query '%s' %s", query, errbuf);
LogFile->write(EQEMuLog::Error, "Error in ExportSpells query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
}
fclose(f);
}
bool SkillUsable(SharedDatabase *db, int skill_id, int class_id) {
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = nullptr;
MYSQL_RES *result;
MYSQL_ROW row;
bool res = false;
if(db->RunQuery(query, MakeAnyLenString(&query, "SELECT max(cap) FROM skill_caps WHERE class=%d AND skillID=%d",
class_id, skill_id), errbuf, &result)) {
if(row = mysql_fetch_row(result)) {
if(row[0] && atoi(row[0]) > 0) {
res = true;
}
}
mysql_free_result(result);
} else {
LogFile->write(EQEMuLog::Error, "Error in skill_usable query '%s' %s", query, errbuf);
}
safe_delete_array(query);
return res;
bool res = false;
std::string query = StringFormat("SELECT max(cap) FROM skill_caps WHERE class=%d AND skillID=%d",
class_id, skill_id);
auto results = db->QueryDatabase(query);
if(!results.Success()) {
LogFile->write(EQEMuLog::Error, "Error in skill_usable query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}
if (results.RowCount() == 0)
return false;
auto row = results.begin();
if(row[0] && atoi(row[0]) > 0)
return true;
return false;
}
int GetSkill(SharedDatabase *db, int skill_id, int class_id, int level) {
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = nullptr;
MYSQL_RES *result;
MYSQL_ROW row;
int res = 0;
if(db->RunQuery(query, MakeAnyLenString(&query, "SELECT cap FROM skill_caps WHERE class=%d AND skillID=%d AND level=%d",
class_id, skill_id, level), errbuf, &result)) {
if(row = mysql_fetch_row(result)) {
res = atoi(row[0]);
}
mysql_free_result(result);
} else {
LogFile->write(EQEMuLog::Error, "Error in get_skill query '%s' %s", query, errbuf);
}
safe_delete_array(query);
return res;
std::string query = StringFormat("SELECT cap FROM skill_caps WHERE class=%d AND skillID=%d AND level=%d",
class_id, skill_id, level);
auto results = db->QueryDatabase(query);
if (!results.Success()) {
LogFile->write(EQEMuLog::Error, "Error in get_skill query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
return 0;
}
if (results.RowCount() == 0)
return 0;
auto row = results.begin();
return atoi(row[0]);
}
void ExportSkillCaps(SharedDatabase *db) {
@@ -175,27 +172,25 @@ void ExportBaseData(SharedDatabase *db) {
return;
}
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = "SELECT * FROM base_data ORDER BY level, class";
MYSQL_RES *result;
MYSQL_ROW row;
if(db->RunQuery(query, strlen(query), errbuf, &result)) {
while(row = mysql_fetch_row(result)) {
const std::string query = "SELECT * FROM base_data ORDER BY level, class";
auto results = db->QueryDatabase(query);
if(results.Success()) {
for (auto row = results.begin();row != results.end();++row) {
std::string line;
unsigned int fields = mysql_num_fields(result);
for(unsigned int i = 0; i < fields; ++i) {
if(i != 0) {
unsigned int fields = results.ColumnCount();
for(unsigned int rowIndex = 0; rowIndex < fields; ++rowIndex) {
if(rowIndex != 0)
line.push_back('^');
}
line += row[i];
if(row[rowIndex] != nullptr) {
line += row[rowIndex];
}
}
fprintf(f, "%s\n", line.c_str());
}
mysql_free_result(result);
} else {
LogFile->write(EQEMuLog::Error, "Error in ExportBaseData query '%s' %s", query, errbuf);
LogFile->write(EQEMuLog::Error, "Error in ExportBaseData query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
}
fclose(f);
+2 -2
View File
@@ -11,7 +11,7 @@ ADD_EXECUTABLE(import_client_files ${import_sources} ${import_headers})
INSTALL(TARGETS import_client_files RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
TARGET_LINK_LIBRARIES(import_client_files Common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY})
TARGET_LINK_LIBRARIES(import_client_files common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY})
IF(MSVC)
SET_TARGET_PROPERTIES(import_client_files PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF")
@@ -33,4 +33,4 @@ IF(UNIX)
ADD_DEFINITIONS(-fPIC)
ENDIF(UNIX)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/Bin)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
+25 -31
View File
@@ -18,11 +18,11 @@
#include "../../common/debug.h"
#include "../../common/shareddb.h"
#include "../../common/EQEmuConfig.h"
#include "../../common/eqemu_config.h"
#include "../../common/platform.h"
#include "../../common/crash.h"
#include "../../common/rulesys.h"
#include "../../common/StringUtil.h"
#include "../../common/string_util.h"
void ImportSpells(SharedDatabase *db);
void ImportSkillCaps(SharedDatabase *db);
@@ -31,7 +31,7 @@ void ImportBaseData(SharedDatabase *db);
int main(int argc, char **argv) {
RegisterExecutablePlatform(ExePlatformClientImport);
set_exception_handler();
LogFile->write(EQEMuLog::Status, "Client Files Import Utility");
if(!EQEmuConfig::LoadConfig()) {
LogFile->write(EQEMuLog::Error, "Unable to load configuration file.");
@@ -55,26 +55,20 @@ int main(int argc, char **argv) {
ImportSpells(&database);
ImportSkillCaps(&database);
ImportBaseData(&database);
return 0;
}
int GetSpellColumns(SharedDatabase *db) {
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = "DESCRIBE spells_new";
MYSQL_RES *result;
MYSQL_ROW row;
int res = 0;
if(db->RunQuery(query, (uint32)strlen(query), errbuf, &result)) {
while(row = mysql_fetch_row(result)) {
++res;
}
mysql_free_result(result);
} else {
LogFile->write(EQEMuLog::Error, "Error in GetSpellColumns query '%s' %s", query, errbuf);
}
return res;
const std::string query = "DESCRIBE spells_new";
auto results = db->QueryDatabase(query);
if(!results.Success()) {
LogFile->write(EQEMuLog::Error, "Error in GetSpellColumns query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
return 0;
}
return results.RowCount();
}
void ImportSpells(SharedDatabase *db) {
@@ -85,8 +79,8 @@ void ImportSpells(SharedDatabase *db) {
return;
}
std::string delete_sql = "DELETE FROM spells_new";
db->RunQuery(delete_sql.c_str(), (uint32)delete_sql.length());
std::string query = "DELETE FROM spells_new";
db->QueryDatabase(query);
int columns = GetSpellColumns(db);
int spells_imported = 0;
@@ -103,8 +97,8 @@ void ImportSpells(SharedDatabase *db) {
std::string escaped = ::EscapeString(buffer);
auto split = SplitString(escaped, '^');
int line_columns = (int)split.size();
std::string sql;
if(line_columns >= columns) {
sql = "INSERT INTO spells_new VALUES(";
for(int i = 0; i < columns; ++i) {
@@ -140,7 +134,7 @@ void ImportSpells(SharedDatabase *db) {
sql += ");";
}
db->RunQuery(sql.c_str(), (uint32)sql.length());
db->QueryDatabase(sql);
spells_imported++;
if(spells_imported % 1000 == 0) {
@@ -165,27 +159,27 @@ void ImportSkillCaps(SharedDatabase *db) {
}
std::string delete_sql = "DELETE FROM skill_caps";
db->RunQuery(delete_sql.c_str(), (uint32)delete_sql.length());
db->QueryDatabase(delete_sql);
char buffer[2048];
while(fgets(buffer, 2048, f)) {
auto split = SplitString(buffer, '^');
if(split.size() < 4) {
continue;
}
std::string sql;
int class_id, skill_id, level, cap;
class_id = atoi(split[0].c_str());
skill_id = atoi(split[1].c_str());
level = atoi(split[2].c_str());
cap = atoi(split[3].c_str());
StringFormat(sql, "INSERT INTO skill_caps(class, skillID, level, cap) VALUES(%d, %d, %d, %d)",
std::string sql = StringFormat("INSERT INTO skill_caps(class, skillID, level, cap) VALUES(%d, %d, %d, %d)",
class_id, skill_id, level, cap);
db->RunQuery(sql.c_str(), (uint32)sql.length());
db->QueryDatabase(sql);
}
fclose(f);
@@ -201,7 +195,7 @@ void ImportBaseData(SharedDatabase *db) {
}
std::string delete_sql = "DELETE FROM base_data";
db->RunQuery(delete_sql.c_str(), (uint32)delete_sql.length());
db->QueryDatabase(delete_sql);
char buffer[2048];
while(fgets(buffer, 2048, f)) {
@@ -226,12 +220,12 @@ void ImportBaseData(SharedDatabase *db) {
mana_fac = atof(split[8].c_str());
end_fac = atof(split[9].c_str());
StringFormat(sql, "INSERT INTO base_data(level, class, hp, mana, end, unk1, unk2, hp_fac, "
sql = StringFormat("INSERT INTO base_data(level, class, hp, mana, end, unk1, unk2, hp_fac, "
"mana_fac, end_fac) VALUES(%d, %d, %f, %f, %f, %f, %f, %f, %f, %f)",
level, class_id, hp, mana, end, unk1, unk2, hp_fac, mana_fac, end_fac);
db->RunQuery(sql.c_str(), (uint32)sql.length());
db->QueryDatabase(sql);
}
fclose(f);
}
}
+149 -128
View File
@@ -1,76 +1,79 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
SET(common_sources
BasePacket.cpp
base_packet.cpp
classes.cpp
Condition.cpp
condition.cpp
crash.cpp
CRC16.cpp
crc16.cpp
crc32.cpp
database.cpp
dbasync.cpp
dbcore.cpp
debug.cpp
emu_opcodes.cpp
EmuTCPConnection.cpp
EmuTCPServer.cpp
EQDB.cpp
EQDBRes.cpp
emu_tcp_connection.cpp
emu_tcp_server.cpp
eq_dictionary.cpp
eqdb.cpp
eqdb_res.cpp
eqemu_exception.cpp
EQEmuConfig.cpp
EQEMuError.cpp
EQPacket.cpp
EQStream.cpp
EQStreamFactory.cpp
EQStreamIdent.cpp
EQStreamProxy.cpp
eqemu_config.cpp
eqemu_error.cpp
eq_packet.cpp
eq_stream.cpp
eq_stream_factory.cpp
eq_stream_ident.cpp
eq_stream_proxy.cpp
eqtime.cpp
extprofile.cpp
faction.cpp
guild_base.cpp
guilds.cpp
ipc_mutex.cpp
Item.cpp
item.cpp
logsys.cpp
logsys_eqemu.cpp
md5.cpp
memory_mapped_file.cpp
misc.cpp
MiscFunctions.cpp
misc_functions.cpp
moremath.cpp
Mutex.cpp
mutex.cpp
mysql_request_result.cpp
mysql_request_row.cpp
opcode_map.cpp
opcodemgr.cpp
packet_dump.cpp
packet_dump_file.cpp
packet_functions.cpp
perl_EQDB.cpp
perl_EQDBRes.cpp
ProcLauncher.cpp
perl_eqdb.cpp
perl_eqdb_res.cpp
proc_launcher.cpp
ptimer.cpp
races.cpp
rdtsc.cpp
rulesys.cpp
serverinfo.cpp
shareddb.cpp
skills.cpp
spdat.cpp
StringUtil.cpp
StructStrategy.cpp
TCPConnection.cpp
TCPServer.cpp
string_util.cpp
struct_strategy.cpp
tcp_connection.cpp
tcp_server.cpp
timeoutmgr.cpp
timer.cpp
unix.cpp
worldconn.cpp
XMLParser.cpp
xml_parser.cpp
platform.cpp
patches/Client62.cpp
patches/client62.cpp
patches/patches.cpp
patches/SoD.cpp
patches/SoF.cpp
patches/RoF.cpp
patches/Titanium.cpp
patches/Underfoot.cpp
patches/sod.cpp
patches/sof.cpp
patches/rof.cpp
patches/titanium.cpp
patches/underfoot.cpp
SocketLib/Base64.cpp
SocketLib/File.cpp
SocketLib/HttpdCookies.cpp
@@ -90,40 +93,42 @@ SET(common_sources
)
SET(common_headers
BasePacket.h
any.h
base_packet.h
base_data.h
bodytypes.h
breakdowns.h
classes.h
Condition.h
condition.h
crash.h
CRC16.h
crc16.h
crc32.h
data_verification.h
database.h
dbasync.h
dbcore.h
debug.h
deity.h
emu_opcodes.h
emu_oplist.h
EmuTCPConnection.h
EmuTCPServer.h
emu_tcp_connection.h
emu_tcp_server.h
eq_constants.h
eq_dictionary.h
eq_packet_structs.h
EQDB.h
EQDBRes.h
eqdb.h
eqdb_res.h
eqemu_exception.h
EQEmuConfig.h
EQEmuConfig_elements.h
EQEMuError.h
EQPacket.h
EQStream.h
EQStreamFactory.h
EQStreamIdent.h
EQStreamIntf.h
EQStreamLocator.h
EQStreamProxy.h
EQStreamType.h
eqemu_config.h
eqemu_config_elements.h
eqemu_error.h
eq_packet.h
eq_stream.h
eq_stream_factory.h
eq_stream_ident.h
eq_stream_intf.h
eq_stream_locator.h
eq_stream_proxy.h
eq_stream_type.h
eqtime.h
errmsg.h
extprofile.h
@@ -134,7 +139,7 @@ SET(common_headers
guild_base.h
guilds.h
ipc_mutex.h
Item.h
item.h
item_fieldlist.h
item_struct.h
languages.h
@@ -146,16 +151,19 @@ SET(common_headers
md5.h
memory_mapped_file.h
misc.h
MiscFunctions.h
misc_functions.h
moremath.h
Mutex.h
mutex.h
mysql_request_result.h
mysql_request_row.h
op_codes.h
opcode_dispatch.h
opcodemgr.h
packet_dump.h
packet_dump_file.h
packet_functions.h
ProcLauncher.h
platform.h
proc_launcher.h
profiler.h
ptimer.h
queue.h
@@ -169,11 +177,11 @@ SET(common_headers
shareddb.h
skills.h
spdat.h
StringUtil.h
StructStrategy.h
TCPBasicServer.h
TCPConnection.h
TCPServer.h
string_util.h
struct_strategy.h
tcp_basic_server.h
tcp_connection.h
tcp_server.h
timeoutmgr.h
timer.h
types.h
@@ -181,38 +189,44 @@ SET(common_headers
useperl.h
version.h
worldconn.h
XMLParser.h
ZoneNumbers.h
platform.h
patches/Client62.h
patches/Client62_itemfields.h
patches/Client62_ops.h
patches/Client62_structs.h
xml_parser.h
zone_numbers.h
patches/client62.h
patches/client62_constants.h
patches/client62_itemfields.h
patches/client62_ops.h
patches/client62_structs.h
patches/patches.h
patches/SoD.h
patches/SoD_itemfields.h
patches/SoD_ops.h
patches/SoD_structs.h
patches/SoF.h
patches/SoF_itemfields.h
patches/SoF_opcode_list.h
patches/SoF_ops.h
patches/SoF_structs.h
patches/SSDeclare.h
patches/SSDefine.h
patches/SSRegister.h
patches/RoF.h
patches/RoF_itemfields.h
patches/RoF_ops.h
patches/RoF_structs.h
patches/Titanium.h
patches/Titanium_itemfields.h
patches/Titanium_ops.h
patches/Titanium_structs.h
patches/Underfoot.h
patches/Underfoot_itemfields.h
patches/Underfoot_ops.h
patches/Underfoot_structs.h
patches/sod.h
patches/sod_constants.h
patches/sod_itemfields.h
patches/sod_ops.h
patches/sod_structs.h
patches/sof.h
patches/sof_constants.h
patches/sof_itemfields.h
patches/sof_opcode_list.h
patches/sof_ops.h
patches/sof_structs.h
patches/ss_declare.h
patches/ss_define.h
patches/ss_register.h
patches/rof.h
patches/rof_constants.h
patches/rof_itemfields.h
patches/rof_ops.h
patches/rof_structs.h
patches/rof2_constants.h
patches/titanium.h
patches/titanium_constants.h
patches/titanium_itemfields.h
patches/titanium_ops.h
patches/titanium_structs.h
patches/underfoot.h
patches/underfoot_constants.h
patches/underfoot_itemfields.h
patches/underfoot_ops.h
patches/underfoot_structs.h
SocketLib/Base64.h
SocketLib/File.h
SocketLib/HttpdCookies.h
@@ -231,42 +245,49 @@ SET(common_headers
)
SOURCE_GROUP(Patches FILES
patches/Client62.h
patches/Client62_itemfields.h
patches/Client62_ops.h
patches/Client62_structs.h
patches/client62.h
patches/client62_itemfields.h
patches/client62_ops.h
patches/client62_constants.h
patches/client62_structs.h
patches/patches.h
patches/SoD.h
patches/SoD_itemfields.h
patches/SoD_ops.h
patches/SoD_structs.h
patches/SoF.h
patches/SoF_itemfields.h
patches/SoF_opcode_list.h
patches/SoF_ops.h
patches/SoF_structs.h
patches/SSDeclare.h
patches/SSDefine.h
patches/SSRegister.h
patches/RoF.h
patches/RoF_itemfields.h
patches/RoF_ops.h
patches/RoF_structs.h
patches/Titanium.h
patches/Titanium_itemfields.h
patches/Titanium_ops.h
patches/Titanium_structs.h
patches/Underfoot.h
patches/Underfoot_itemfields.h
patches/Underfoot_ops.h
patches/Underfoot_structs.h
patches/Client62.cpp
patches/sod.h
patches/sod_itemfields.h
patches/sod_ops.h
patches/sod_constants.h
patches/sod_structs.h
patches/sof.h
patches/sof_itemfields.h
patches/sof_opcode_list.h
patches/sof_ops.h
patches/sof_constants.h
patches/sof_structs.h
patches/ss_declare.h
patches/ss_define.h
patches/ss_register.h
patches/rof.h
patches/rof_itemfields.h
patches/rof_ops.h
patches/rof_constants.h
patches/rof2_constants.h
patches/rof_structs.h
patches/titanium.h
patches/titanium_itemfields.h
patches/titanium_ops.h
patches/titanium_constants.h
patches/titanium_structs.h
patches/underfoot.h
patches/underfoot_itemfields.h
patches/underfoot_ops.h
patches/underfoot_constants.h
patches/underfoot_structs.h
patches/client62.cpp
patches/patches.cpp
patches/SoD.cpp
patches/SoF.cpp
patches/RoF.cpp
patches/Titanium.cpp
patches/Underfoot.cpp
patches/sod.cpp
patches/sof.cpp
patches/rof.cpp
patches/titanium.cpp
patches/underfoot.cpp
)
SOURCE_GROUP(SocketLib FILES
@@ -311,11 +332,11 @@ SOURCE_GROUP(TinyXML FILES
INCLUDE_DIRECTORIES(Patches SocketLib StackWalker TinyXML)
ADD_LIBRARY(Common ${common_sources} ${common_headers})
ADD_LIBRARY(common ${common_sources} ${common_headers})
IF(UNIX)
ADD_DEFINITIONS(-fPIC)
SET_SOURCE_FILES_PROPERTIES("patches/SoD.cpp" "patches/SoF.cpp" "patches/RoF.cpp" "patches/Underfoot.cpp" PROPERTIES COMPILE_FLAGS -O0)
SET_SOURCE_FILES_PROPERTIES("patches/sod.cpp" "patches/sof.cpp" "patches/rof.cpp" "patches/underfoot.cpp" PROPERTIES COMPILE_FLAGS -O0)
ENDIF(UNIX)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/Bin)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
-405
View File
@@ -1,405 +0,0 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*
* EQStream classes, by Quagmire
*/
#include "../common/debug.h"
#include <iostream>
#include <iomanip>
#ifdef WIN32
#include <process.h>
#else
#include <arpa/inet.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
#include "../common/unix.h"
#define SOCKET_ERROR -1
#endif
#include "EQNetwork.h"
#include "EQStream.h"
#include "../common/packet_dump.h"
#include "../common/packet_dump_file.h"
#include "../common/packet_functions.h"
#include "../common/MiscFunctions.h"
#include "../common/crc32.h"
#include "../common/eq_packet_structs.h"
#define EQN_DEBUG 0
#define EQN_DEBUG_Error 0
#define EQN_DEBUG_Packet 0
#define EQN_DEBUG_Fragment 0
#define EQN_DEBUG_ACK 0
#define EQN_DEBUG_Unknown 0
#define EQN_DEBUG_NewStream 0
#define LOG_PACKETS 0
#define LOG_RAW_PACKETS_OUT 0
#define LOG_RAW_PACKETS_IN 0
//#define PRIORITYTEST
template <typename type> // LO_BYTE
type LO_BYTE (type a) {return (a&=0xff);}
template <typename type> // HI_BYTE
type HI_BYTE (type a) {return (a&=0xff00);}
template <typename type> // LO_WORD
type LO_WORD (type a) {return (a&=0xffff);}
template <typename type> // HI_WORD
type HI_WORD (type a) {return (a&=0xffff0000);}
template <typename type> // HI_LOSWAPshort
type HI_LOSWAPshort (type a) {return (LO_BYTE(a)<<8) | (HI_BYTE(a)>>8);}
template <typename type> // HI_LOSWAPlong
type HI_LOSWAPlong (type x) {return (LO_WORD(a)<<16) | (HIWORD(a)>>16);}
EQStreamServer::EQStreamServer(uint16 iPort) {
RunLoop = false;
pPort = iPort;
pOpen = false;
#ifdef WIN32
WORD version = MAKEWORD (1,1);
WSADATA wsadata;
WSAStartup (version, &wsadata);
#endif
sock = 0;
}
EQStreamServer::~EQStreamServer() {
Close();
RunLoop = false;
MLoopRunning.lock();
MLoopRunning.unlock();
#ifdef WIN32
WSACleanup();
#endif
connection_list.clear();
while (!NewQueue.empty())
NewQueue.pop(); // they're deleted with the list, clear this queue so it doesnt try to delete them again
}
bool EQStreamServer::Open(uint16 iPort) {
LockMutex lock(&MOpen);
if (iPort && pPort != iPort) {
if (pOpen)
return false;
pPort = iPort;
}
if (!RunLoop) {
RunLoop = true;
#ifdef WIN32
_beginthread(EQStreamServerLoop, 0, this);
#else
pthread_t thread;
pthread_create(&thread, NULL, &EQStreamServerLoop, this);
#endif
}
if (pOpen) {
return true;
}
else {
struct sockaddr_in address;
// int reuse_addr = 1;
int bufsize = 64 * 1024; // 64kbyte send/recieve buffers, up from default of 8k
#ifdef WIN32
unsigned long nonblocking = 1;
#endif
/* Setup internet address information.
This is used with the bind() call */
memset((char *) &address, 0, sizeof(address));
address.sin_family = AF_INET;
address.sin_port = htons(pPort);
address.sin_addr.s_addr = htonl(INADDR_ANY);
/* Setting up UDP port for new clients */
sock = socket(AF_INET, SOCK_DGRAM, 0);
if (sock < 0) {
return false;
}
//#ifdef WIN32
// setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *) &reuse_addr, sizeof(reuse_addr));
setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char*) &bufsize, sizeof(bufsize));
setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (char*) &bufsize, sizeof(bufsize));
//#else
// setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &reuse_addr, sizeof(reuse_addr));
// setsockopt(sock, SOL_SOCKET, SO_RCVBUF, &bufsize, sizeof(bufsize));
// setsockopt(sock, SOL_SOCKET, SO_SNDBUF, &bufsize, sizeof(bufsize));
//#endif
if (bind(sock, (struct sockaddr *) &address, sizeof(address)) < 0) {
#ifdef WIN32
closesocket(sock);
#else
close(sock);
#endif
return false;
}
#ifdef WIN32
ioctlsocket (sock, FIONBIO, &nonblocking);
#else
fcntl(sock, F_SETFL, O_NONBLOCK);
#endif
pOpen = true;
return true;
}
}
void EQStreamServer::Close() {
SetOpen(false);
if (sock) {
#ifdef WIN32
closesocket(sock);
#else
close(sock);
#endif
}
sock = 0;
}
bool EQStreamServer::IsOpen() {
MOpen.lock();
bool ret = pOpen;
MOpen.unlock();
return ret;
}
void EQStreamServer::SetOpen(bool iOpen) {
MOpen.lock();
pOpen = iOpen;
MOpen.unlock();
}
void EQStreamServer::Process() {
_CP(EQStreamServer_Process);
if (!IsOpen()) {
if (sock) {
#ifdef WIN32
closesocket(sock);
#else
close(sock);
#endif
sock = 0;
}
return;
}
uchar buffer[1518];
int status;
struct sockaddr_in from;
unsigned int fromlen;
from.sin_family = AF_INET;
fromlen = sizeof(from);
while (1) {
#ifdef WIN32
status = recvfrom(sock, (char *) buffer, sizeof(buffer), 0,(struct sockaddr*) &from, (int *) &fromlen);
#else
status = recvfrom(sock, buffer, sizeof(buffer), 0,(struct sockaddr*) &from, &fromlen);
#endif
if (status >= 1) {
cout << "Got data from recvfrom" << endl;
RecvData(buffer, status, from.sin_addr.s_addr, from.sin_port);
}
else {
break;
}
}
std::map <std::string, EQStream*>::iterator connection;
for (connection = connection_list.begin(); connection != connection_list.end();) {
if (!connection->second) {
connection = connection_list.erase(connection);
continue;
}
EQStream* eqs_data = connection->second;
if (eqs_data->IsFree() && (!eqs_data->CheckNetActive())) {
safe_delete(eqs_data);
connection = connection_list.erase(connection);
} else if (!eqs_data->RunLoop) {
eqs_data->Process(sock);
++connection;
}
}
}
void EQStreamServer::RecvData(uchar* data, uint32 size, uint32 irIP, uint16 irPort) {
/*
CHANGE HISTORY
Version Author Date Comment
1 Unknown Unknown Initial Revision
2 Joolz 05-Jan-2003 Optimised
3 Quagmire 05-Feb-2003 Changed so 2 connection objects wouldnt be created for the same ip/port pair, often happened
*/
// Check for invalid data
if (!data || size <= 4) return;
//if (CRC32::Generate(data, size-4) != ntohl(*((uint32*) &data[size-4]))) {
#if EQN_DEBUG_Error >= 1
//cout << "Incomming Packet failed checksum" << endl;
#endif
//return;
//}
char temp[25];
sprintf(temp,"%lu:%u",(unsigned long)irIP,irPort);
cout << "Data from " << temp << endl;
EQStream* tmp = NULL;
std::map <std::string, EQStream*>::iterator connection;
if ((connection=connection_list.find(temp))!=connection_list.end())
tmp=connection->second;
if(tmp != NULL && tmp->GetrPort() == irPort)
{
tmp->RecvData(data, size);
return;
}
else if(tmp != NULL && tmp->GetrPort() != irPort)
{
printf("Conflicting IPs & Ports: IP %i and Port %i is conflicting with IP %i and Port %i\n",irIP,irPort,tmp->GetrIP(),tmp->GetrPort());
return;
}
if (data[1]==0x01) {
cout << "New EQStream Connection." << endl;
EQStream* tmp = new EQStream(irIP, irPort);
tmp->RecvData(data, size);
connection_list[temp]=tmp;
if (connection_list.find(temp)==connection_list.end()) {
cerr <<"Could not find new connection we just added!" << endl;
}
MNewQueue.lock();
NewQueue.push(tmp);
MNewQueue.unlock();
return;
}
#if EQN_DEBUG >= 4
struct in_addr in;
in.s_addr = irIP;
cout << "WARNING: Stray packet? " << inet_ntoa(in) << ":" << irPort << endl;
#endif
}
EQStream* EQStreamServer::NewQueuePop() {
EQStream* ret = 0;
MNewQueue.lock();
if (!NewQueue.empty()) {
ret = NewQueue.front();
NewQueue.pop();
}
MNewQueue.unlock();
return ret;
}
#ifdef WIN32
void EQStreamServerLoop(void* tmp)
#else
void* EQStreamServerLoop(void* tmp)
#endif
{
#ifdef WIN32
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL);
#endif
EQStreamServer* eqns = (EQStreamServer*) tmp;
eqns->MLoopRunning.lock();
while (eqns->RunLoop) {
{
_CP(EQStreamServerLoop);
eqns->Process();
}
Sleep(1);
}
eqns->MLoopRunning.unlock();
#ifdef WIN32
_endthread();
#else
return 0;
#endif
}
#ifdef WIN32
void EQStreamInLoop(void* tmp)
#else
void* EQStreamInLoop(void* tmp)
#endif
{
EQStream* eqs = (EQStream*) tmp;
#ifdef _DEBUG
if (eqs->ConnectionType != Outgoing) {
ThrowError("EQStreamInLoop: eqs->ConnectionType != Outgoing");
}
#endif
eqs->MLoopRunning.lock();
Timer* tmp_timer = new Timer(100);
tmp_timer->Start();
while (eqs->RunLoop) {
{
_CP(EQStreamInLoop);
if(tmp_timer->Check())
eqs->DoRecvData();
}
Sleep(1);
}
safe_delete(tmp_timer);
eqs->MLoopRunning.unlock();
#ifdef WIN32
_endthread();
#else
return 0;
#endif
}
#ifdef WIN32
void EQStreamOutLoop(void* tmp)
#else
void* EQStreamOutLoop(void* tmp)
#endif
{
EQStream* eqs = (EQStream*) tmp;
#ifdef _DEBUG
if (eqs->ConnectionType != Outgoing) {
ThrowError("EQStreamOutLoop: eqs->ConnectionType != Outgoing");
}
#endif
eqs->MLoopRunning.lock();
Timer* tmp_timer = new Timer(100);
tmp_timer->Start();
while (eqs->RunLoop) {
{
_CP(EQStreamOutLoop);
if(tmp_timer->Check())
eqs->Process(eqs->outsock);
}
Sleep(1);
}
safe_delete(tmp_timer);
eqs->MLoopRunning.unlock();
#ifdef WIN32
_endthread();
#else
return 0;
#endif
}
-120
View File
@@ -1,120 +0,0 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef EQNETWORK_H
#define EQNETWORK_H
#include "../common/debug.h"
//uncomment this to enable the packet profiler. Counts the number
//of each type of packet sent or received on a connection.
#ifdef ZONE
//#define PACKET_PROFILER 1
#endif
#include <string.h>
#include <map>
#include <list>
#include <queue>
#include "../common/types.h"
#include "../common/timer.h"
#include "../common/linked_list.h"
#include "../common/queue.h"
#include "../common/Mutex.h"
#include "../common/packet_functions.h"
#include "EQStream.h"
#ifdef PACKET_PROFILER
#include "../common/rdtsc.h"
#endif
#define EQNC_TIMEOUT 60000
#define NAS_TIMER 100
#define KA_TIMER 400 /* keeps the lag bar constant */
#define MAX_HEADER_SIZE 39 // Quag: 39 is the max header + opcode + crc32 + unknowns size
class EQStreamServer;
class EQStream;
class EQStreamPacket;
class EQStreamFragmentGroupList;
class EQStreamFragmentGroup;
typedef EQStreamServer EQNServer;
typedef EQStream EQNConnection;
typedef EQStreamPacket EQNPacket;
typedef EQStreamFragmentGroupList EQNFragmentGroupList;
typedef EQStreamFragmentGroup EQNFragmentGroup;
#define FLAG_COMPRESSED 0x1000
#define FLAG_COMBINED 0x2000
#define FLAG_ENCRYPTED 0x4000
#define FLAG_IMPLICIT 0x8000
#define FLAG_ALL 0xF000
#define StripFlags(x) (x & ~FLAG_ALL)
// Optimistic compression, used for guessing pre-alloc size on debug output
#define BEST_COMPR_RATIO 300
enum eappCompressed { appNormal, appInflated, appDeflated };
#ifdef WIN32
void EQStreamServerLoop(void* tmp);
void EQStreamInLoop(void* tmp);
void EQStreamOutLoop(void* tmp);
#else
void* EQStreamServerLoop(void* tmp);
void* EQStreamInLoop(void* tmp);
void* EQStreamOutLoop(void* tmp);
#endif
class EQStreamServer {
public:
EQStreamServer(uint16 iPort = 0);
virtual ~EQStreamServer();
bool Open(uint16 iPort = 0); // opens the port
void Close(); // closes the port
void KillAll(); // kills all clients
inline uint16 GetPort() { return pPort; }
EQStream* NewQueuePop();
protected:
#ifdef WIN32
friend void EQStreamServerLoop(void* tmp);
#else
friend void* EQStreamServerLoop(void* tmp);
#endif
void Process();
bool IsOpen();
void SetOpen(bool iOpen);
bool RunLoop;
Mutex MLoopRunning;
private:
void RecvData(uchar* data, uint32 size, uint32 irIP, uint16 irPort);
#ifdef WIN32
SOCKET sock;
#else
int sock;
#endif
uint16 pPort;
bool pOpen;
Mutex MNewQueue;
Mutex MOpen;
std::map<std::string,EQStream*> connection_list;
std::queue<EQStream *> NewQueue;
};
#endif
-1900
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -46,7 +46,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <stdarg.h>
#include "Parse.h"
#include "HTTPSocket.h"
#include "../TCPConnection.h"
#include "../tcp_connection.h"
#include <cstdlib>
#include <cstring>
+1 -1
View File
@@ -42,7 +42,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <map>
#include <string>
#include "../TCPConnection.h"
#include "../tcp_connection.h"
#ifdef SOCKETS_NAMESPACE
+1 -1
View File
@@ -211,7 +211,7 @@ typedef unsigned short port_t;
#endif
#ifdef _THREADSAFE_SOCKETS
#include "Mutex.h"
#include "mutex.h"
#include "Lock.h"
#endif
+190
View File
@@ -0,0 +1,190 @@
/*
* Boost Software License - Version 1.0 - August 17th, 2003
*
* Permission is hereby granted, free of charge, to any person or organization
* obtaining a copy of the software and accompanying documentation covered by
* this license (the "Software") to use, reproduce, display, distribute,
* execute, and transmit the Software, and to prepare derivative works of the
* Software, and to permit third-parties to whom the Software is furnished to
* do so, all subject to the following:
*
* The copyright notices in the Software and this entire statement, including
* the above license grant, this restriction and the following disclaimer,
* must be included in all copies of the Software, in whole or in part, and
* all derivative works of the Software, unless such copies or derivative
* works are solely in the form of machine-executable object code generated by
* a source language processor.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
* SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
* FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
// EQEmu::Any is a modified version of Boost::Any and as such retains the Boost licensing.
#ifndef EQEMU_COMMON_ANY_H
#define EQEMU_COMMON_ANY_H
#include <algorithm>
#include <typeinfo>
namespace EQEmu
{
class Any
{
public:
Any()
: content(nullptr)
{
}
template<typename ValueType>
Any(const ValueType &value)
: content(new Holder<ValueType>(value))
{
}
Any(const Any &other)
: content(other.content ? other.content->clone() : 0)
{
}
~Any()
{
if(content)
delete content;
}
Any& swap(Any &rhs)
{
std::swap(content, rhs.content);
return *this;
}
template<typename ValueType>
Any& operator=(const ValueType &rhs)
{
Any(rhs).swap(*this);
return *this;
}
Any& operator=(Any rhs)
{
rhs.swap(*this);
return *this;
}
bool empty() const
{
return !content;
}
const std::type_info& type() const
{
return content ? content->type() : typeid(void);
}
class Placeholder
{
public:
virtual ~Placeholder()
{
}
virtual const std::type_info& type() const = 0;
virtual Placeholder* clone() const = 0;
};
template<typename ValueType>
class Holder : public Placeholder
{
public:
Holder(const ValueType &value)
: held(value)
{
}
virtual const std::type_info& type() const
{
return typeid(ValueType);
}
virtual Placeholder* clone() const
{
return new Holder(held);
}
ValueType held;
private:
Holder& operator=(const Holder&);
};
private:
template<typename ValueType>
friend ValueType* any_cast(Any*);
template<typename ValueType>
friend ValueType* unsafe_any_cast(Any*);
Placeholder* content;
};
class bad_any_cast : public std::bad_cast
{
public:
virtual const char * what() const throw()
{
return "DBI::bad_any_cast: failed conversion using DBI::any_cast";
}
};
template<typename ValueType>
ValueType* any_cast(Any* operand)
{
return operand &&
operand->type() == typeid(ValueType) ? &static_cast<Any::Holder<ValueType>*>(operand->content)->held : nullptr;
}
template<typename ValueType>
inline const ValueType* any_cast(const Any* operand)
{
return any_cast<ValueType>(const_cast<Any*>(operand));
}
template<typename ValueType>
ValueType any_cast(Any& operand)
{
typedef typename std::remove_reference<ValueType>::type nonref;
nonref* result = any_cast<nonref>(&operand);
if(!result)
throw bad_any_cast();
return *result;
}
template<typename ValueType>
inline ValueType any_cast(const Any& operand)
{
typedef typename std::remove_reference<ValueType>::type nonref;
return any_cast<const nonref&>(const_cast<Any&>(operand));
}
template<typename ValueType>
inline ValueType* unsafe_any_cast(Any* operand)
{
return &static_cast<Any::Holder<ValueType>*>(operand->content)->held;
}
template<typename ValueType>
inline const ValueType* unsafe_any_cast(const Any* operand)
{
return unsafe_any_cast<ValueType>(const_cast<Any*>(operand));
}
}
#endif
@@ -16,7 +16,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "debug.h"
#include "BasePacket.h"
#include "base_packet.h"
#include "misc.h"
#include "packet_dump.h"
+68 -19
View File
@@ -1,27 +1,76 @@
#ifndef CLIENTVERSIONS_H
#define CLIENTVERSIONS_H
static const uint32 BIT_Client62 = 1;
static const uint32 BIT_Titanium = 2;
static const uint32 BIT_SoF = 4;
static const uint32 BIT_SoD = 8;
static const uint32 BIT_Underfoot = 16;
static const uint32 BIT_RoF = 32;
static const uint32 BIT_TitaniumAndEarlier = 3;
static const uint32 BIT_SoFAndLater = 0xFFFFFFFC;
static const uint32 BIT_SoDAndLater = 0xFFFFFFF8;
static const uint32 BIT_UnderfootAndLater = 0xFFFFFFF0;
static const uint32 BIT_RoFAndLater = 0xFFFFFFE0;
static const uint32 BIT_AllClients = 0xFFFFFFFF;
static const uint32 BIT_Client62 = 1;
static const uint32 BIT_Titanium = 2;
static const uint32 BIT_SoF = 4;
static const uint32 BIT_SoD = 8;
static const uint32 BIT_Underfoot = 16;
static const uint32 BIT_RoF = 32;
static const uint32 BIT_RoF2 = 64;
typedef enum {
static const uint32 BIT_TitaniumAndEarlier = 0x00000003;
static const uint32 BIT_SoFAndLater = 0xFFFFFFFC;
static const uint32 BIT_SoDAndLater = 0xFFFFFFF8;
static const uint32 BIT_UnderfootAndLater = 0xFFFFFFF0;
static const uint32 BIT_RoFAndLater = 0xFFFFFFE0;
static const uint32 BIT_RoF2AndLater = 0xFFFFFFC0;
static const uint32 BIT_AllClients = 0xFFFFFFFF;
typedef enum
{
EQClientUnknown = 0,
EQClient62,
EQClientTitanium,
EQClientSoF,
EQClientSoD,
EQClientUnderfoot,
EQClientRoF
EQClient62, // Build: 'Aug 4 2005 15:40:59'
EQClientTitanium, // Build: 'Oct 31 2005 10:33:37'
EQClientSoF, // Build: 'Sep 7 2007 09:11:49'
EQClientSoD, // Build: 'Dec 19 2008 15:22:49'
EQClientUnderfoot, // Build: 'Jun 8 2010 16:44:32'
EQClientRoF, // Build: 'Dec 10 2012 17:35:44'
EQClientRoF2, // Build: 'May 10 2013 23:30:08'
_EQClientCount, // place new clients before this point (preferably, in release/attribute order)
// Values below are not implemented, as yet...
EmuNPC = _EQClientCount,
EmuMerc,
EmuBot,
EmuPet,
_EmuClientCount // array size for EQLimits
} EQClientVersion;
static const char* EQClientVersionName(EQClientVersion version)
{
switch (version)
{
case EQClientUnknown:
return "EQClientUnknown";
case EQClient62:
return "EQClient62";
case EQClientTitanium:
return "EQClientTitanium";
case EQClientSoF:
return "EQClientSoF";
case EQClientSoD:
return "EQClientSoD";
case EQClientUnderfoot:
return "EQClientUnderfoot";
case EQClientRoF:
return "EQClientRoF";
case EQClientRoF2:
return "EQClientRoF2";
case EmuNPC:
return "EmuNPC";
case EmuMerc:
return "EmuMerc";
case EmuBot:
return "EmuBot";
case EmuPet:
return "EmuPet";
default:
return "ERROR: Invalid EQClientVersion";
};
}
#endif /* CLIENTVERSIONS_H */
@@ -17,7 +17,7 @@
*/
#include "debug.h"
#include "Condition.h"
#include "condition.h"
#ifdef _WINDOWS
View File
+48
View File
@@ -0,0 +1,48 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef COMMON_DATA_VERIFICATION_H
#define COMMON_DATA_VERIFICATION_H
#include <algorithm>
namespace EQEmu
{
template <typename T>
T Clamp(const T& value, const T& lower, const T& upper) {
return std::max(lower, std::min(value, upper));
}
template <typename T>
T ClampLower(const T& value, const T& lower) {
return std::max(lower, value);
}
template <typename T>
T ClampUpper(const T& value, const T& upper) {
return std::min(value, upper);
}
template <typename T>
bool ValueWithin(const T& value, const T& lower, const T& upper) {
return value >= lower && value <= upper;
}
}
#endif
+2849 -2242
View File
File diff suppressed because it is too large Load Diff
+26 -15
View File
@@ -26,12 +26,6 @@
#include "dbcore.h"
#include "linked_list.h"
#include "eq_packet_structs.h"
/*#include "EQStream.h"
#include "guilds.h"
#include "MiscFunctions.h"
#include "Mutex.h"
#include "Item.h"
#include "extprofile.h"*/
#include <string>
#include <vector>
#include <map>
@@ -105,10 +99,16 @@ public:
Database(const char* host, const char* user, const char* passwd, const char* database,uint32 port);
bool Connect(const char* host, const char* user, const char* passwd, const char* database,uint32 port);
~Database();
bool ThrowDBError(std::string ErrorMessage, std::string query_title, std::string query);
/*
* General Character Related Stuff
*/
/* Character Creation */
bool SaveCharacterCreate(uint32 character_id, uint32 account_id, PlayerProfile_Struct* pp);
bool MoveCharacterToZone(const char* charname, const char* zonename);
bool MoveCharacterToZone(const char* charname, const char* zonename,uint32 zoneid);
bool MoveCharacterToZone(uint32 iCharID, const char* iZonename);
@@ -118,9 +118,8 @@ public:
bool AddToNameFilter(const char* name);
bool ReserveName(uint32 account_id, char* name);
bool CreateCharacter(uint32 account_id, char* name, uint16 gender, uint16 race, uint16 class_, uint8 str, uint8 sta, uint8 cha, uint8 dex, uint8 int_, uint8 agi, uint8 wis, uint8 face);
bool StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inventory* inv, ExtendedProfile_Struct *ext);
bool StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inventory* inv);
bool DeleteCharacter(char* name);
uint8 CopyCharacter(const char* oldname, const char* newname, uint32 acctid);
/*
* General Information Getting Queries
@@ -130,7 +129,7 @@ public:
uint32 GetAccountIDByChar(const char* charname, uint32* oCharID = 0);
uint32 GetAccountIDByChar(uint32 char_id);
uint32 GetAccountIDByName(const char* accname, int16* status = 0, uint32* lsid = 0);
uint32 GetGuildDBIDByCharID(uint32 char_id);
uint32 GetGuildIDByCharID(uint32 char_id);
void GetAccountName(uint32 accountid, char* name, uint32* oLSAccountID = 0);
void GetCharName(uint32 char_id, char* name);
uint32 GetCharacterInfo(const char* iName, uint32* oAccID = 0, uint32* oZoneID = 0, uint32* oInstanceID = 0,float* oX = 0, float* oY = 0, float* oZ = 0);
@@ -207,6 +206,7 @@ public:
char* GetGroupLeadershipInfo(uint32 gid, char* leaderbuf, char* maintank = nullptr, char* assist = nullptr, char* puller = nullptr, char *marknpc = nullptr,
GroupLeadershipAA_Struct* GLAA = nullptr);
void ClearGroupLeader(uint32 gid = 0);
/*
* Raids
@@ -216,6 +216,8 @@ public:
uint32 GetRaidID(const char* name);
const char *GetRaidLeaderName(uint32 rid);
bool CheckDatabaseConversions();
/*
* Database Variables
*/
@@ -223,7 +225,7 @@ public:
bool SetVariable(const char* varname, const char* varvalue);
bool LoadVariables();
uint32 LoadVariables_MQ(char** query);
bool LoadVariables_result(MYSQL_RES* result);
bool LoadVariables_result(MySQLRequestResult results);
/*
* General Queries
@@ -249,10 +251,6 @@ public:
void SetLoginFlags(uint32 CharID, bool LFP, bool LFG, uint8 firstlogon);
void AddReport(std::string who, std::string against, std::string lines);
protected:
void HandleMysqlError(uint32 errnum);
private:
void DBInitVars();
@@ -262,7 +260,20 @@ private:
uint32 varcache_max;
VarCache_Struct** varcache_array;
uint32 varcache_lastupdate;
/*
* Groups, utility methods.
*/
void ClearAllGroupLeaders();
void ClearAllGroups();
/*
* Raid, utility methods.
*/
void ClearAllRaids();
void ClearAllRaidDetails();
};
bool FetchRowMap(MYSQL_RES *result, std::map<std::string,std::string> &rowmap);
#endif
-669
View File
@@ -1,669 +0,0 @@
#include "debug.h"
#ifdef _WINDOWS
#include <windows.h>
#include <process.h>
#include <winsock2.h>
#endif
#include <iostream>
#include "dbasync.h"
#include "database.h"
#include <errmsg.h>
#include <mysqld_error.h>
#include <limits.h>
#include "dbcore.h"
#include <string.h>
//#include "../common/MiscFunctions.h"
#include "StringUtil.h"
#define ASYNC_LOOP_GRANULARITY 4 //# of ms between checking our work
bool DBAsyncCB_LoadVariables(DBAsyncWork* iWork) {
char errbuf[MYSQL_ERRMSG_SIZE];
MYSQL_RES* result = 0;
DBAsyncQuery* dbaq = iWork->PopAnswer();
if (dbaq->GetAnswer(errbuf, &result))
iWork->GetDB()->LoadVariables_result(result);
else
std::cout << "Error: DBAsyncCB_LoadVariables failed: !GetAnswer: '" << errbuf << "'" << std::endl;
return true;
}
void AsyncLoadVariables(DBAsync *dba, Database *db) {
char* query = 0;
DBAsyncWork* dbaw = new DBAsyncWork(db, &DBAsyncCB_LoadVariables, 0, DBAsync::Read);
dbaw->AddQuery(0, &query, db->LoadVariables_MQ(&query));
dba->AddWork(&dbaw);
}
//we only need to do anything when somebody puts work on the queue
//so instead of checking all the time, we will wait on a condition
//which will get signaled when somebody puts something on the queue
ThreadReturnType DBAsyncLoop(void* tmp) {
DBAsync* dba = (DBAsync*) tmp;
#ifndef WIN32
_log(COMMON__THREADS, "Starting DBAsyncLoop with thread ID %d", pthread_self());
#endif
dba->MLoopRunning.lock();
while (dba->RunLoop()) {
//wait before working so we check the loop condition
//as soon as were done working
dba->CInList.Wait();
//we could check dba->RunLoop() again to see if we
//got turned off while we were waiting
{
dba->Process();
}
}
dba->MLoopRunning.unlock();
#ifndef WIN32
_log(COMMON__THREADS, "Ending DBAsyncLoop with thread ID %d", pthread_self());
#endif
THREAD_RETURN(nullptr);
}
DBAsync::DBAsync(DBcore* iDBC)
: Timeoutable(10000)
{
pDBC = iDBC;
pRunLoop = true;
pNextID = 1;
#ifdef _WINDOWS
_beginthread(DBAsyncLoop, 0, this);
#else
pthread_t thread;
pthread_create(&thread, nullptr, DBAsyncLoop, this);
#endif
}
DBAsync::~DBAsync() {
StopThread();
}
bool DBAsync::StopThread() {
bool ret;
MRunLoop.lock();
ret = pRunLoop;
pRunLoop = false;
MRunLoop.unlock();
//signal the condition so we exit the loop if were waiting
CInList.Signal();
//this effectively waits for the processing thread to finish
MLoopRunning.lock();
MLoopRunning.unlock();
return ret;
}
uint32 DBAsync::AddWork(DBAsyncWork** iWork, uint32 iDelay) {
MInList.lock();
uint32 ret = GetNextID();
if (!(*iWork)->SetWorkID(ret)) {
MInList.unlock();
return 0;
}
InList.Append(*iWork);
(*iWork)->SetStatus(Queued);
if (iDelay)
(*iWork)->pExecuteAfter = Timer::GetCurrentTime() + iDelay;
#if DEBUG_MYSQL_QUERIES >= 2
std::cout << "Adding AsyncWork #" << (*iWork)->GetWorkID() << std::endl;
std::cout << "ExecuteAfter = " << (*iWork)->pExecuteAfter << " (" << Timer::GetCurrentTime() << " + " << iDelay << ")" << std::endl;
#endif
*iWork = 0;
MInList.unlock();
//wake up the processing thread and tell it to get to work.
CInList.Signal();
return ret;
}
bool DBAsync::CancelWork(uint32 iWorkID) {
if (iWorkID == 0)
return false;
#if DEBUG_MYSQL_QUERIES >= 2
std::cout << "DBAsync::CancelWork: " << iWorkID << std::endl;
#endif
MCurrentWork.lock();
if (CurrentWork && CurrentWork->GetWorkID() == iWorkID) {
CurrentWork->Cancel();
MCurrentWork.unlock();
return true;
}
MCurrentWork.unlock();
MInList.lock();
LinkedListIterator<DBAsyncWork*> iterator(InList);
iterator.Reset();
while (iterator.MoreElements()) {
if (iterator.GetData()->GetWorkID() == iWorkID) {
iterator.RemoveCurrent(true);
MInList.unlock();
return true;
}
iterator.Advance();
}
MInList.unlock();
return false;
}
bool DBAsync::RunLoop() {
bool ret;
MRunLoop.lock();
ret = pRunLoop;
MRunLoop.unlock();
return ret;
}
DBAsyncWork* DBAsync::InListPop() {
DBAsyncWork* ret = 0;
MInList.lock();
LinkedListIterator<DBAsyncWork*> iterator(InList);
iterator.Reset();
while (iterator.MoreElements()) {
if (iterator.GetData()->pExecuteAfter <= Timer::GetCurrentTime()) {
ret = iterator.GetData();
#if DEBUG_MYSQL_QUERIES >= 2
std::cout << "Poping AsyncWork #" << ret->GetWorkID() << std::endl;
std::cout << ret->pExecuteAfter << " <= " << Timer::GetCurrentTime() << std::endl;
#endif
iterator.RemoveCurrent(false);
break;
}
iterator.Advance();
}
MInList.unlock();
return ret;
}
DBAsyncWork* DBAsync::InListPopWrite() {
MInList.lock();
LinkedListIterator<DBAsyncWork*> iterator(InList);
DBAsyncWork* ret = 0;
DBAsync::Type tmpType;
iterator.Reset();
while (iterator.MoreElements()) {
tmpType = iterator.GetData()->Type();
if (tmpType == Write || tmpType == Both) {
ret = iterator.GetData();
iterator.RemoveCurrent(false);
break;
}
iterator.Advance();
}
MInList.unlock();
return ret;
}
void DBAsync::AddFQ(DBAsyncFinishedQueue* iDBAFQ) {
MFQList.lock();
DBAsyncFinishedQueue** tmp = new DBAsyncFinishedQueue*;
*tmp = iDBAFQ;
FQList.Append(tmp);
MFQList.unlock();
}
void DBAsync::Process() {
DBAsyncWork* tmpWork;
MCurrentWork.lock();
while ((CurrentWork = InListPop())) {
MCurrentWork.unlock();
//move from queued to executing
Status tmpStatus = CurrentWork->SetStatus(Executing);
if (tmpStatus == Queued) {
//execute the work
ProcessWork(CurrentWork);
tmpWork = CurrentWork;
MCurrentWork.lock();
CurrentWork = 0;
MCurrentWork.unlock();
//move from executing to finished
tmpStatus = tmpWork->SetStatus(DBAsync::Finished);
if (tmpStatus != Executing) {
if (tmpStatus != Canceled) {
std::cout << "Error: Unexpected DBAsyncWork->Status in DBAsync::Process #1" << std::endl;
}
MCurrentWork.lock();
safe_delete(tmpWork);
}
else {
//call callbacks or put results on finished queue
DispatchWork(tmpWork);
Sleep(25);
MCurrentWork.lock();
}
}
else {
if (tmpStatus != Canceled) {
std::cout << "Error: Unexpected DBAsyncWork->Status in DBAsync::Process #2" << std::endl;
}
MCurrentWork.lock();
safe_delete(CurrentWork);
}
}
MCurrentWork.unlock();
}
void DBAsync::CheckTimeout() {
try{
MFQList.lock();
LinkedListIterator<DBAsyncFinishedQueue**> iterator(FQList);
iterator.Reset();
while (iterator.MoreElements()) {
(*iterator.GetData())->CheckTimeouts();
iterator.Advance();
}
MFQList.unlock();
}
catch(...){
}
}
void DBAsync::CommitWrites() {
#if DEBUG_MYSQL_QUERIES >= 2
std::cout << "DBAsync::CommitWrites() called." << std::endl;
#endif
DBAsyncWork* tmpWork;
while ((tmpWork = InListPopWrite())) {
Status tmpStatus = tmpWork->SetStatus(Executing);
if (tmpStatus == Queued) {
ProcessWork(tmpWork);
tmpStatus = tmpWork->SetStatus(DBAsync::Finished);
if (tmpStatus != Executing) {
if (tmpStatus != Canceled) {
std::cout << "Error: Unexpected DBAsyncWork->Status in DBAsync::CommitWrites #1" << std::endl;
}
safe_delete(tmpWork);
}
else {
DispatchWork(tmpWork);
}
}
else {
if (tmpStatus != Canceled) {
std::cout << "Error: Unexpected DBAsyncWork->Status in DBAsync::CommitWrites #2" << std::endl;
}
safe_delete(tmpWork);
}
}
}
void DBAsync::ProcessWork(DBAsyncWork* iWork, bool iSleep) {
DBAsyncQuery* CurrentQuery;
while ((CurrentQuery = iWork->PopQuery())) {
CurrentQuery->Process(pDBC);
iWork->PushAnswer(CurrentQuery);
if (iSleep)
Sleep(1);
}
}
void DBAsync::DispatchWork(DBAsyncWork* iWork) {
//if this work has a callback, call it
//otherwise, stick the work on the finish queue
if (iWork->pCB) {
if (iWork->pCB(iWork))
safe_delete(iWork);
}
else {
if (!iWork->pDBAFQ->Push(iWork))
safe_delete(iWork);
}
}
DBAsyncFinishedQueue::DBAsyncFinishedQueue(uint32 iTimeout) {
pTimeout = iTimeout;
}
DBAsyncFinishedQueue::~DBAsyncFinishedQueue() {
}
void DBAsyncFinishedQueue::CheckTimeouts() {
if (pTimeout == 0xFFFFFFFF)
return;
MLock.lock();
LinkedListIterator<DBAsyncWork*> iterator(list);
iterator.Reset();
while (iterator.MoreElements()) {
if (iterator.GetData()->CheckTimeout(pTimeout))
iterator.RemoveCurrent(true);
iterator.Advance();
}
MLock.unlock();
}
DBAsyncWork* DBAsyncFinishedQueue::Pop() {
DBAsyncWork* ret = 0;
MLock.lock();
ret = list.Pop();
MLock.unlock();
return ret;
}
DBAsyncWork* DBAsyncFinishedQueue::Find(uint32 iWorkID) {
DBAsyncWork* ret = 0;
MLock.lock();
LinkedListIterator<DBAsyncWork*> iterator(list);
iterator.Reset();
while (iterator.MoreElements()) {
if (iterator.GetData()->GetWorkID() == iWorkID) {
ret = iterator.GetData();
iterator.RemoveCurrent(false);
break;
}
iterator.Advance();
}
MLock.unlock();
return ret;
}
DBAsyncWork* DBAsyncFinishedQueue::PopByWPT(uint32 iWPT) {
DBAsyncWork* ret = 0;
MLock.lock();
LinkedListIterator<DBAsyncWork*> iterator(list);
iterator.Reset();
while (iterator.MoreElements()) {
if (iterator.GetData()->WPT() == iWPT) {
ret = iterator.GetData();
iterator.RemoveCurrent(false);
break;
}
iterator.Advance();
}
MLock.unlock();
return ret;
}
bool DBAsyncFinishedQueue::Push(DBAsyncWork* iDBAW) {
if (!this)
return false;
MLock.lock();
list.Append(iDBAW);
MLock.unlock();
return true;
}
DBAsyncWork::DBAsyncWork(Database *db, DBAsyncFinishedQueue* iDBAFQ, uint32 iWPT, DBAsync::Type iType, uint32 iTimeout)
: m_db(db)
{
pstatus = DBAsync::AddingWork;
pType = iType;
pExecuteAfter = 0;
pWorkID = 0;
pDBAFQ = iDBAFQ;
pCB = 0;
pWPT = iWPT;
pQuestionCount = 0;
pAnswerCount = 0;
pTimeout = iTimeout;
pTSFinish = 0;
}
DBAsyncWork::DBAsyncWork(Database *db, DBWorkCompleteCallBack iCB, uint32 iWPT, DBAsync::Type iType, uint32 iTimeout)
: m_db(db)
{
pstatus = DBAsync::AddingWork;
pType = iType;
pExecuteAfter = 0;
pWorkID = 0;
pDBAFQ = 0;
pCB = iCB;
pWPT = iWPT;
pQuestionCount = 0;
pAnswerCount = 0;
pTimeout = iTimeout;
pTSFinish = 0;
}
DBAsyncWork::~DBAsyncWork() {
DBAsyncQuery* dbaq = 0;
while ((dbaq = todo.pop()))
safe_delete(dbaq);
while ((dbaq = done.pop()))
safe_delete(dbaq);
while ((dbaq = todel.pop()))
safe_delete(dbaq);
}
bool DBAsyncWork::AddQuery(DBAsyncQuery** iDBAQ) {
bool ret;
MLock.lock();
if (pstatus != DBAsync::AddingWork)
ret = false;
else {
ret = true;
pQuestionCount++;
todo.push(*iDBAQ);
(*iDBAQ)->pstatus = DBAsync::Queued;
*iDBAQ = 0;
}
MLock.unlock();
return ret;
}
bool DBAsyncWork::AddQuery(uint32 iQPT, char** iQuery, uint32 iQueryLen, bool iGetResultSet, bool iGetErrbuf) {
DBAsyncQuery* DBAQ = new DBAsyncQuery(iQPT, iQuery, iQueryLen, iGetResultSet, iGetErrbuf);
if (AddQuery(&DBAQ))
return true;
else {
safe_delete(DBAQ);
return false;
}
}
bool DBAsyncWork::SetWorkID(uint32 iWorkID) {
bool ret = true;
MLock.lock();
if (pWorkID)
ret = false;
else
pWorkID = iWorkID;
MLock.unlock();
return ret;
}
uint32 DBAsyncWork::GetWorkID() {
uint32 ret;
MLock.lock();
ret = pWorkID;
MLock.unlock();
return ret;
}
uint32 DBAsyncWork::WPT() {
uint32 ret;
MLock.lock();
ret = pWPT;
MLock.unlock();
return ret;
}
DBAsync::Type DBAsyncWork::Type() {
DBAsync::Type ret;
MLock.lock();
ret = pType;
MLock.unlock();
return ret;
}
DBAsyncQuery* DBAsyncWork::PopAnswer() {
DBAsyncQuery* ret;
MLock.lock();
ret = done.pop();
if (ret)
pAnswerCount--;
todel.push(ret);
MLock.unlock();
return ret;
}
bool DBAsyncWork::CheckTimeout(uint32 iFQTimeout) {
if (pTimeout == 0xFFFFFFFF)
return false;
bool ret = false;
MLock.lock();
if (pTimeout > iFQTimeout)
iFQTimeout = pTimeout;
if (Timer::GetCurrentTime() > (pTSFinish + iFQTimeout))
ret = true;
MLock.unlock();
return ret;
}
//sets the work's status to the supplied value and returns
//the revious status
DBAsync::Status DBAsyncWork::SetStatus(DBAsync::Status iStatus) {
DBAsync::Status ret;
MLock.lock();
if (iStatus == DBAsync::Finished)
pTSFinish = Timer::GetCurrentTime();
ret = pstatus;
pstatus = iStatus;
MLock.unlock();
return ret;
}
bool DBAsyncWork::Cancel() {
bool ret;
MLock.lock();
if (pstatus != DBAsync::Finished) {
pstatus = DBAsync::Canceled;
ret = true;
}
else
ret = false;
MLock.unlock();
return ret;
}
bool DBAsyncWork::IsCancled() {
bool ret;
MLock.lock();
ret = (bool) (pstatus == DBAsync::Canceled);
MLock.unlock();
return ret;
}
DBAsyncQuery* DBAsyncWork::PopQuery() {
DBAsyncQuery* ret = 0;
MLock.lock();
ret = todo.pop();
if (ret)
pQuestionCount--;
MLock.unlock();
return ret;
}
void DBAsyncWork::PushAnswer(DBAsyncQuery* iDBAQ) {
MLock.lock();
done.push(iDBAQ);
pAnswerCount++;
MLock.unlock();
}
DBAsyncQuery::DBAsyncQuery(uint32 iQPT, char** iQuery, uint32 iQueryLen, bool iGetResultSet, bool iGetErrbuf) {
if (iQueryLen == 0xFFFFFFFF)
pQueryLen = strlen(*iQuery);
else
pQueryLen = iQueryLen;
pQuery = *iQuery;
*iQuery = 0;
Init(iQPT, iGetResultSet, iGetErrbuf);
}
DBAsyncQuery::DBAsyncQuery(uint32 iQPT, const char* iQuery, uint32 iQueryLen, bool iGetResultSet, bool iGetErrbuf) {
if (iQueryLen == 0xFFFFFFFF)
pQueryLen = strlen(iQuery);
else
pQueryLen = iQueryLen;
pQuery = strn0cpy(new char[pQueryLen+1], iQuery, pQueryLen+1);
Init(iQPT, iGetResultSet, iGetErrbuf);
}
void DBAsyncQuery::Init(uint32 iQPT, bool iGetResultSet, bool iGetErrbuf) {
pstatus = DBAsync::AddingWork;
pQPT = iQPT;
pGetResultSet = iGetResultSet;
pGetErrbuf = iGetErrbuf;
pmysqlsuccess = false;
perrbuf = 0;
perrnum = 0;
presult = 0;
paffected_rows = 0;
plast_insert_id = 0;
}
DBAsyncQuery::~DBAsyncQuery() {
safe_delete_array(perrbuf);
safe_delete_array(pQuery);
if (presult)
mysql_free_result(presult);
}
bool DBAsyncQuery::GetAnswer(char* errbuf, MYSQL_RES** result, uint32* affected_rows, uint32* last_insert_id, uint32* errnum) {
if (pstatus != DBAsync::Finished) {
if (errbuf)
snprintf(errbuf, MYSQL_ERRMSG_SIZE, "Error: Query not finished.");
if (errnum)
*errnum = UINT_MAX;
return false;
}
if (errbuf) {
if (pGetErrbuf) {
if (perrbuf)
strn0cpy(errbuf, perrbuf, MYSQL_ERRMSG_SIZE);
else
snprintf(errbuf, MYSQL_ERRMSG_SIZE, "Error message should've been saved, but hasnt. errno: %u", perrnum);
}
else
snprintf(errbuf, MYSQL_ERRMSG_SIZE, "Error message not saved. errno: %u", perrnum);
}
if (errnum)
*errnum = perrnum;
if (affected_rows)
*affected_rows = paffected_rows;
if (last_insert_id)
*last_insert_id = plast_insert_id;
if (result)
*result = presult;
return pmysqlsuccess;
}
void DBAsyncQuery::Process(DBcore* iDBC) {
pstatus = DBAsync::Executing;
if (pGetErrbuf)
perrbuf = new char[MYSQL_ERRMSG_SIZE];
MYSQL_RES** resultPP = 0;
if (pGetResultSet)
resultPP = &presult;
pmysqlsuccess = iDBC->RunQuery(pQuery, pQueryLen, perrbuf, resultPP, &paffected_rows, &plast_insert_id, &perrnum);
pstatus = DBAsync::Finished;
}
-176
View File
@@ -1,176 +0,0 @@
#ifndef DBASYNC_H
#define DBASYNC_H
#include "../common/dbcore.h"
#include "../common/timeoutmgr.h"
class DBAsyncFinishedQueue;
class DBAsyncWork;
class DBAsyncQuery;
class Database;
// Big daddy that owns the threads and does the work
class DBAsync : private Timeoutable {
public:
enum Status { AddingWork, Queued, Executing, Finished, Canceled };
enum Type { Read, Write, Both };
DBAsync(DBcore* iDBC);
~DBAsync();
bool StopThread();
uint32 AddWork(DBAsyncWork** iWork, uint32 iDelay = 0);
bool CancelWork(uint32 iWorkID);
void CommitWrites();
void AddFQ(DBAsyncFinishedQueue* iDBAFQ);
protected:
//things related to the processing thread:
friend ThreadReturnType DBAsyncLoop(void* tmp);
Mutex MLoopRunning;
Condition CInList;
bool RunLoop();
void Process();
private:
virtual void CheckTimeout();
void ProcessWork(DBAsyncWork* iWork, bool iSleep = true);
void DispatchWork(DBAsyncWork* iWork);
inline uint32 GetNextID() { return pNextID++; }
DBAsyncWork* InListPop();
DBAsyncWork* InListPopWrite(); // Ignores delay
void OutListPush(DBAsyncWork* iDBAW);
Mutex MRunLoop;
bool pRunLoop;
DBcore* pDBC;
uint32 pNextID;
Mutex MInList;
LinkedList<DBAsyncWork*> InList;
Mutex MFQList;
LinkedList<DBAsyncFinishedQueue**> FQList;
// Mutex for outside access to current work & when current work is being changed.
// NOT locked when CurrentWork is being accessed by the DBAsync thread.
// Never change pointer from outside DBAsync thread!
// Only here for access to thread-safe DBAsyncWork functions.
Mutex MCurrentWork;
DBAsyncWork* CurrentWork;
};
/*
DB Work Complete Callback:
This will be called under the DBAsync thread! Never access any non-threadsafe
data/functions/classes. (ie: zone, entitylist, client, etc are not threadsafe)
Function prototype:
return value: true if we should delete the data, false if we should keep it
*/
typedef bool(*DBWorkCompleteCallBack)(DBAsyncWork*);
class DBAsyncFinishedQueue {
public:
DBAsyncFinishedQueue(uint32 iTimeout = 90000);
~DBAsyncFinishedQueue();
DBAsyncWork* Pop();
DBAsyncWork* PopByWPT(uint32 iWPT);
DBAsyncWork* Find(uint32 iWPT);
bool Push(DBAsyncWork* iDBAW);
void CheckTimeouts();
private:
Mutex MLock;
uint32 pTimeout;
LinkedList<DBAsyncWork*> list;
};
// Container class for multiple queries
class DBAsyncWork {
public:
DBAsyncWork(Database *db, DBAsyncFinishedQueue* iDBAFQ, uint32 iWPT = 0, DBAsync::Type iType = DBAsync::Both, uint32 iTimeout = 0);
DBAsyncWork(Database *db, DBWorkCompleteCallBack iCB, uint32 iWPT = 0, DBAsync::Type iType = DBAsync::Both, uint32 iTimeout = 0);
~DBAsyncWork();
bool AddQuery(DBAsyncQuery** iDBAQ);
bool AddQuery(uint32 iQPT, char** iQuery, uint32 iQueryLen = 0xFFFFFFFF, bool iGetResultSet = true, bool iGetErrbuf = true);
uint32 WPT();
DBAsync::Type Type();
// Pops finished queries off the work
DBAsyncQuery* PopAnswer();
uint32 QueryCount();
Database *GetDB() const { return(m_db); }
bool CheckTimeout(uint32 iFQTimeout);
bool SetWorkID(uint32 iWorkID);
uint32 GetWorkID();
protected:
friend class DBAsync;
DBAsync::Status SetStatus(DBAsync::Status iStatus);
bool Cancel();
bool IsCancled();
DBAsyncQuery* PopQuery(); // Get query to be run
void PushAnswer(DBAsyncQuery* iDBAQ); // Push answer back into workset
// not mutex'd cause only to be accessed from dbasync class
uint32 pExecuteAfter;
private:
Mutex MLock;
uint32 pQuestionCount;
uint32 pAnswerCount;
uint32 pWorkID;
uint32 pWPT;
uint32 pTimeout;
uint32 pTSFinish; // timestamp when finished
DBAsyncFinishedQueue* pDBAFQ; //we do now own this pointer
DBWorkCompleteCallBack pCB;
DBAsync::Status pstatus;
DBAsync::Type pType;
MyQueue<DBAsyncQuery> todo;
MyQueue<DBAsyncQuery> done;
MyQueue<DBAsyncQuery> todel;
Database *const m_db; //we do now own this pointer
};
// Container class for the query information
class DBAsyncQuery {
public:
DBAsyncQuery(uint32 iQPT, char** iQuery, uint32 iQueryLen = 0xFFFFFFFF, bool iGetResultSet = true, bool iGetErrbuf = true);
DBAsyncQuery(uint32 iQPT, const char* iQuery, uint32 iQueryLen = 0xFFFFFFFF, bool iGetResultSet = true, bool iGetErrbuf = true);
~DBAsyncQuery();
bool GetAnswer(char* errbuf = 0, MYSQL_RES** result = 0, uint32* affected_rows = 0, uint32* last_insert_id = 0, uint32* errnum = 0);
inline uint32 QPT() { return pQPT; }
protected:
friend class DBAsyncWork;
uint32 pQPT;
friend class DBAsync;
void Process(DBcore* iDBC);
void Init(uint32 iQPT, bool iGetResultSet, bool iGetErrbuf);
DBAsync::Status pstatus;
char* pQuery;
uint32 pQueryLen;
bool pGetResultSet;
bool pGetErrbuf;
bool pmysqlsuccess;
char* perrbuf;
uint32 perrnum;
uint32 paffected_rows;
uint32 plast_insert_id;
MYSQL_RES* presult;
};
void AsyncLoadVariables(DBAsync *dba, Database *db);
#endif
+89 -2
View File
@@ -10,7 +10,7 @@
#include <limits.h>
#include "dbcore.h"
#include <string.h>
#include "../common/MiscFunctions.h"
#include "../common/misc_functions.h"
#include <cstdlib>
#ifdef _WINDOWS
@@ -58,6 +58,93 @@ void DBcore::ping() {
MDatabase.unlock();
}
MySQLRequestResult DBcore::QueryDatabase(std::string query, bool retryOnFailureOnce)
{
return QueryDatabase(query.c_str(), query.length(), retryOnFailureOnce);
}
MySQLRequestResult DBcore::QueryDatabase(const char* query, uint32 querylen, bool retryOnFailureOnce)
{
LockMutex lock(&MDatabase);
// Reconnect if we are not connected before hand.
if (pStatus != Connected)
Open();
// request query. != 0 indicates some kind of error.
if (mysql_real_query(&mysql, query, querylen) != 0)
{
unsigned int errorNumber = mysql_errno(&mysql);
if (errorNumber == CR_SERVER_GONE_ERROR)
pStatus = Error;
// error appears to be a disconnect error, may need to try again.
if (errorNumber == CR_SERVER_LOST || errorNumber == CR_SERVER_GONE_ERROR)
{
if (retryOnFailureOnce)
{
std::cout << "Database Error: Lost connection, attempting to recover...." << std::endl;
MySQLRequestResult requestResult = QueryDatabase(query, querylen, false);
if (requestResult.Success())
{
std::cout << "Reconnection to database successful." << std::endl;
return requestResult;
}
}
pStatus = Error;
char *errorBuffer = new char[MYSQL_ERRMSG_SIZE];
snprintf(errorBuffer, MYSQL_ERRMSG_SIZE, "#%i: %s", mysql_errno(&mysql), mysql_error(&mysql));
std::cout << "DB Query Error #" << mysql_errno(&mysql) << ": " << mysql_error(&mysql) << std::endl;
return MySQLRequestResult(nullptr, 0, 0, 0, 0, (uint32)mysql_errno(&mysql), errorBuffer);
}
char *errorBuffer = new char[MYSQL_ERRMSG_SIZE];
snprintf(errorBuffer, MYSQL_ERRMSG_SIZE, "#%i: %s", mysql_errno(&mysql), mysql_error(&mysql));
#ifdef _EQDEBUG
std::cout << "DB Query Error #" << mysql_errno(&mysql) << ": " << mysql_error(&mysql) << std::endl;
#endif
return MySQLRequestResult(nullptr, 0, 0, 0, 0, mysql_errno(&mysql),errorBuffer);
}
// successful query. get results.
MYSQL_RES* res = mysql_store_result(&mysql);
uint32 rowCount = 0;
if (res != nullptr)
rowCount = (uint32)mysql_num_rows(res);
MySQLRequestResult requestResult(res, (uint32)mysql_affected_rows(&mysql), rowCount, (uint32)mysql_field_count(&mysql), (uint32)mysql_insert_id(&mysql));
#if DEBUG_MYSQL_QUERIES >= 1
if (requestResult.Success())
{
std::cout << "query successful";
if (requestResult.Result())
std::cout << ", " << (int) mysql_num_rows(requestResult.Result()) << " rows returned";
std::cout << ", " << requestResult.RowCount() << " rows affected";
std::cout<< std::endl;
}
else {
std::cout << "QUERY: query FAILED" << std::endl;
}
#endif
return requestResult;
}
bool DBcore::RunQuery(const char* query, uint32 querylen, char* errbuf, MYSQL_RES** result, uint32* affected_rows, uint32* last_insert_id, uint32* errnum, bool retry) {
if (errnum)
*errnum = 0;
@@ -111,7 +198,7 @@ bool DBcore::RunQuery(const char* query, uint32 querylen, char* errbuf, MYSQL_RE
if (affected_rows)
*affected_rows = mysql_affected_rows(&mysql);
if (last_insert_id)
*last_insert_id = mysql_insert_id(&mysql);
*last_insert_id = (uint32)mysql_insert_id(&mysql);
if (result) {
if (*result) {
ret = true;
+7 -3
View File
@@ -4,15 +4,17 @@
#ifdef _WINDOWS
#include <winsock.h>
#include <windows.h>
//#include <winsock.h>
#endif
#include <mysql.h>
#include <string.h>
#include "../common/types.h"
#include "../common/Mutex.h"
#include "../common/mutex.h"
#include "../common/linked_list.h"
#include "../common/queue.h"
#include "../common/timer.h"
#include "../common/Condition.h"
#include "../common/condition.h"
#include "../common/mysql_request_result.h"
class DBcore {
public:
@@ -22,6 +24,8 @@ public:
~DBcore();
eStatus GetStatus() { return pStatus; }
bool RunQuery(const char* query, uint32 querylen, char* errbuf = 0, MYSQL_RES** result = 0, uint32* affected_rows = 0, uint32* last_insert_id = 0, uint32* errnum = 0, bool retry = true);
MySQLRequestResult QueryDatabase(const char* query, uint32 querylen, bool retryOnFailureOnce = true);
MySQLRequestResult QueryDatabase(std::string query, bool retryOnFailureOnce = true);
uint32 DoEscapeString(char* tobuf, const char* frombuf, uint32 fromlen);
void ping();
MYSQL* getMySQL(){ return &mysql; }
+2 -2
View File
@@ -19,8 +19,8 @@
#endif
#include "debug.h"
#include "StringUtil.h"
#include "MiscFunctions.h"
#include "string_util.h"
#include "misc_functions.h"
#include "platform.h"
#ifndef va_copy
+11 -9
View File
@@ -69,7 +69,7 @@
#include "logsys.h"
#include "../common/Mutex.h"
#include "../common/mutex.h"
#include <stdio.h>
#include <stdarg.h>
@@ -80,14 +80,15 @@ public:
~EQEMuLog();
enum LogIDs {
Status = 0, //this must stay the first entry in this list
Normal,
Error,
Debug,
Quest,
Commands,
Crash,
MaxLogID
Status = 0, /* This must stay the first entry in this list */
Normal, /* Normal Logs */
Error, /* Error Logs */
Debug, /* Debug Logs */
Quest, /* Quest Logs */
Commands, /* Issued Comamnds */
Crash, /* Crash Logs */
Save, /* Client Saves */
MaxLogID /* Max, used in functions to get the max log ID */
};
//these are callbacks called for each
@@ -113,6 +114,7 @@ private:
Mutex MOpen;
Mutex MLog[MaxLogID];
FILE* fp[MaxLogID];
/* LogStatus: bitwise variable
1 = output to file
2 = output to stdout
+505 -500
View File
File diff suppressed because it is too large Load Diff
@@ -30,8 +30,8 @@ tremendously.
#include <stdio.h>
#include <iomanip>
#include "EmuTCPConnection.h"
#include "EmuTCPServer.h"
#include "emu_tcp_connection.h"
#include "emu_tcp_server.h"
#include "../common/servertalk.h"
#include "../common/packet_dump.h"
@@ -366,7 +366,6 @@ bool EmuTCPConnection::LineOutQueuePush(char* line) {
safe_delete_array(line);
return(true);
}
}
return(TCPConnection::LineOutQueuePush(line));
@@ -419,7 +418,8 @@ bool EmuTCPConnection::ConnectIP(uint32 irIP, uint16 irPort, char* errbuf) {
sendbuf_used = sendbuf_size;
sendbuf = new uchar[sendbuf_size];
memcpy(sendbuf, "\0**PACKETMODEQS**\r", sendbuf_size);
} else {
}
else {
//default: packetModeZone
safe_delete_array(sendbuf);
sendbuf_size = 20;
@@ -1,7 +1,7 @@
#ifndef EmuTCPCONNECTION_H_
#define EmuTCPCONNECTION_H_
#include "TCPConnection.h"
#include "tcp_connection.h"
#include "timer.h"
//moved out of TCPConnection:: to be more exportable
@@ -1,6 +1,6 @@
#include "debug.h"
#include "EmuTCPServer.h"
#include "EmuTCPConnection.h"
#include "emu_tcp_server.h"
#include "emu_tcp_connection.h"
EmuTCPServer::EmuTCPServer(uint16 iPort, bool iOldFormat)
: TCPServer<EmuTCPConnection>(iPort),
@@ -1,7 +1,7 @@
#ifndef EmuTCPSERVER_H_
#define EmuTCPSERVER_H_
#include "TCPServer.h"
#include "tcp_server.h"
class EmuTCPConnection;
struct EmuTCPNetPacket_Struct;
+159 -93
View File
@@ -138,45 +138,86 @@ enum ItemUseTypes : uint8
};
/*
** Augmentation use types (in-work)
** Augmentation use type bitmasks (1-based)
**
** (ref: dbstr_us.txt)
**
*/
enum AugmentationUseTypes : uint32 {
AugTypeNone = 0, // not 100% sure on this...
AugTypeGeneralSingleStat, /*1^16^1 (General: Single Stat)^0*/
AugTypeGeneralMultipleStat, /*2^16^2 (General: Multiple Stat)^0*/
AugTypeGeneralSpellEffect, /*3^16^3 (General: Spell Effect)^0*/
AugTypeWeaponGeneral, /*4^16^4 (Weapon: General)^0*/
AugTypeWeaponElemDamage, /*5^16^5 (Weapon: Elem Damage)^0*/
AugTypeWeaponBaseDamage, /*6^16^6 (Weapon: Base Damage)^0*/
AugTypeGeneralGroup, /*7^16^7 (General: Group)^0*/
AugTypeGeneralRaid, /*8^16^8 (General: Raid)^0*/
AugTypeGeneralDragonsPoints, /*9^16^9 (General: Dragons Points)^0*/
AugTypeCraftedCommon, /*10^16^10 (Crafted: Common)^0*/
AugTypeCraftedGroup1, /*11^16^11 (Crafted: Group)^0*/
AugTypeCraftedRaid1, /*12^16^12 (Crafted: Raid)^0*/
AugTypeEnergeiacGroup, /*13^16^13 (Energeiac: Group)^0*/
AugTypeEnergeiacRaid, /*14^16^14 (Energeiac: Raid)^0*/
AugTypeEmblem, /*15^16^15 (Emblem)^0*/
AugTypeCraftedGroup2, /*16^16^16 (Crafted: Group)^0*/
AugTypeCraftedRaid2, /*17^16^17 (Crafted: Raid)^0*/
AugTypeUnknown1, /*18^16^18^0*/
AugTypeUnknown2, /*19^16^19^0*/
AugTypeOrnamentation, /*20^16^20 (Ornamentation)^0*/
AugTypeSpecialOrnamentation, /*21^16^21 (Special Ornamentation)^0*/
AugTypeUnknown3, /*22^16^22^0*/
AugTypeUnknown4, /*23^16^23^0*/
AugTypeUnknown5, /*24^16^24^0*/
AugTypeUnknown6, /*25^16^25^0*/
AugTypeUnknown7, /*26^16^26^0*/
AugTypeUnknown8, /*27^16^27^0*/
AugTypeUnknown9, /*28^16^28^0*/
AugTypeUnknown10, /*29^16^29^0*/
AugTypeEpic25, /*30^16^30^0*/
AugTypeTest, /*31^16^Test^0*/ // listed as 31^16^31^0 in 5-10 client
_AugTypeCount
enum AugmentationUseTypeBitmasks : uint32 {
AugUseNone = 0x00000000,
AugUseGeneralSingleStat = 0x00000001, /*1^16^1 (General: Single Stat)^0*/
AugUseGeneralMultipleStat = 0x00000002, /*2^16^2 (General: Multiple Stat)^0*/
AugUseGeneralSpellEffect = 0x00000004, /*3^16^3 (General: Spell Effect)^0*/
AugUseWeaponGeneral = 0x00000008, /*4^16^4 (Weapon: General)^0*/
AugUseWeaponElemDamage = 0x00000010, /*5^16^5 (Weapon: Elem Damage)^0*/
AugUseWeaponBaseDamage = 0x00000020, /*6^16^6 (Weapon: Base Damage)^0*/
AugUseGeneralGroup = 0x00000040, /*7^16^7 (General: Group)^0*/
AugUseGeneralRaid = 0x00000080, /*8^16^8 (General: Raid)^0*/
AugUseGeneralDragonsPoints = 0x00000100, /*9^16^9 (General: Dragons Points)^0*/
AugUseCraftedCommon = 0x00000200, /*10^16^10 (Crafted: Common)^0*/
AugUseCraftedGroup1 = 0x00000400, /*11^16^11 (Crafted: Group)^0*/
AugUseCraftedRaid1 = 0x00000800, /*12^16^12 (Crafted: Raid)^0*/
AugUseEnergeiacGroup = 0x00001000, /*13^16^13 (Energeiac: Group)^0*/
AugUseEnergeiacRaid = 0x00002000, /*14^16^14 (Energeiac: Raid)^0*/
AugUseEmblem = 0x00004000, /*15^16^15 (Emblem)^0*/
AugUseCraftedGroup2 = 0x00008000, /*16^16^16 (Crafted: Group)^0*/
AugUseCraftedRaid2 = 0x00010000, /*17^16^17 (Crafted: Raid)^0*/
AugUseUnknown1 = 0x00020000, /*18^16^18^0*/
AugUseUnknown2 = 0x00040000, /*19^16^19^0*/
AugUseOrnamentation = 0x00080000, /*20^16^20 (Ornamentation)^0*/
AugUseSpecialOrnamentation = 0x00100000, /*21^16^21 (Special Ornamentation)^0*/
AugUseUnknown3 = 0x00200000, /*22^16^22^0*/
AugUseUnknown4 = 0x00400000, /*23^16^23^0*/
AugUseUnknown5 = 0x00800000, /*24^16^24^0*/
AugUseUnknown6 = 0x01000000, /*25^16^25^0*/
AugUseUnknown7 = 0x02000000, /*26^16^26^0*/
AugUseUnknown8 = 0x04000000, /*27^16^27^0*/
AugUseUnknown9 = 0x08000000, /*28^16^28^0*/
AugUseUnknown10 = 0x10000000, /*29^16^29^0*/
AugUseEpic25 = 0x20000000, /*30^16^30^0*/
AugUseTest = 0x40000000, /*31^16^Test^0*/ // listed as 31^16^31^0 in 5-10 client
AugUseAll = 0xFFFFFFFF
};
/*
** Augmentation use types (enumerated)
**
*/
enum AugmentationUseTypes : uint8 {
AugTypeNone = 0,
AugTypeGeneralSingleStat,
AugTypeGeneralMultipleStat,
AugTypeGeneralSpellEffect,
AugTypeWeaponGeneral,
AugTypeWeaponElemDamage,
AugTypeWeaponBaseDamage,
AugTypeGeneralGroup,
AugTypeGeneralRaid,
AugTypeGeneralDragonsPoints,
AugTypeCraftedCommon,
AugTypeCraftedGroup1,
AugTypeCraftedRaid1,
AugTypeEnergeiacGroup,
AugTypeEnergeiacRaid,
AugTypeEmblem,
AugTypeCraftedGroup2,
AugTypeCraftedRaid2,
AugTypeUnknown1,
AugTypeUnknown2,
AugTypeOrnamentation,
AugTypeSpecialOrnamentation,
AugTypeUnknown3,
AugTypeUnknown4,
AugTypeUnknown5,
AugTypeUnknown6,
AugTypeUnknown7,
AugTypeUnknown8,
AugTypeUnknown9,
AugTypeUnknown10,
AugTypeEpic25,
AugTypeTest,
_AugTypeCount,
AugTypeAll = 255
};
/*
@@ -735,10 +776,11 @@ enum MaterialUseSlots : uint8
_MaterialInvalid = 255
};
/*
// Used for worn NPC inventory tracking. NPCs don't use
// augments, so only the basic slots need to be kept track of.
#define MAX_WORN_INVENTORY 22
*/
/*
** Inventory Slot Equipment Enum
@@ -768,73 +810,97 @@ enum MaterialUseSlots : uint8
**
*/
enum InventorySlot
{
////////////////////////
// Equip slots
////////////////////////
#define INVALID_INDEX -1
#define NOT_USED 0
#define NO_ITEM 0
SLOT_CHARM = 0,
SLOT_EAR01 = 1,
SLOT_HEAD = 2,
SLOT_FACE = 3,
SLOT_EAR02 = 4,
SLOT_NECK = 5,
SLOT_SHOULDER = 6,
SLOT_ARMS = 7,
SLOT_BACK = 8,
SLOT_BRACER01 = 9,
SLOT_BRACER02 = 10,
SLOT_RANGE = 11,
SLOT_HANDS = 12,
SLOT_PRIMARY = 13,
SLOT_SECONDARY = 14,
SLOT_RING01 = 15,
SLOT_RING02 = 16,
SLOT_CHEST = 17,
SLOT_LEGS = 18,
SLOT_FEET = 19,
SLOT_WAIST = 20,
SLOT_AMMO = 21,
#define DB_ITEM_CONTAINER_SIZE 255 // probably need to move to database.h
////////////////////////
// All other slots
////////////////////////
SLOT_PERSONAL_BEGIN = 22,
SLOT_PERSONAL_END = 29,
// yes..these are redundant... but, they help to identify and define what is actually being performed
// plus, since they're pre-op's, they don't affect the actual binary size
#define MAP_BEGIN 0
#define MAIN_BEGIN 0
#define SUB_BEGIN 0
#define AUG_BEGIN 0
SLOT_CURSOR = 30,
namespace legacy {
// this is for perl and other legacy systems
SLOT_CURSOR_END = (int16)0xFFFE, // Last item on cursor queue
// Cursor bag slots are 331->340 (10 slots)
typedef enum {
SLOT_CHARM = 0,
SLOT_EAR01 = 1,
SLOT_HEAD = 2,
SLOT_FACE = 3,
SLOT_EAR02 = 4,
SLOT_NECK = 5,
SLOT_SHOULDER = 6,
SLOT_ARMS = 7,
SLOT_BACK = 8,
SLOT_BRACER01 = 9,
SLOT_BRACER02 = 10,
SLOT_RANGE = 11,
SLOT_HANDS = 12,
SLOT_PRIMARY = 13,
SLOT_SECONDARY = 14,
SLOT_RING01 = 15,
SLOT_RING02 = 16,
SLOT_CHEST = 17,
SLOT_LEGS = 18,
SLOT_FEET = 19,
SLOT_WAIST = 20,
SLOT_POWER_SOURCE = 9999,
SLOT_AMMO = 21,
SLOT_GENERAL_1 = 22,
SLOT_GENERAL_2 = 23,
SLOT_GENERAL_3 = 24,
SLOT_GENERAL_4 = 25,
SLOT_GENERAL_5 = 26,
SLOT_GENERAL_6 = 27,
SLOT_GENERAL_7 = 28,
SLOT_GENERAL_8 = 29,
//SLOT_GENERAL_9 = not supported
//SLOT_GENERAL_10 = not supported
SLOT_CURSOR = 30,
SLOT_CURSOR_END = (int16)0xFFFE, // I hope no one is using this...
SLOT_TRADESKILL = 1000,
SLOT_AUGMENT = 1001,
SLOT_INVALID = (int16)0xFFFF,
// Personal Inventory Slots
// Slots 1 through 8 are slots 22->29
// Inventory bag slots are 251->330 (10 slots per bag)
SLOT_POSSESSIONS_BEGIN = 0,
SLOT_POSSESSIONS_END = 30,
// Tribute slots are 400-404? (upper bound unknown)
// storing these in worn item's map
SLOT_EQUIPMENT_BEGIN = 0,
SLOT_EQUIPMENT_END = 21,
// Bank slots
// Bank slots 1 through 16 are slots 2000->2015
// Bank bag slots are 2031->2190
SLOT_PERSONAL_BEGIN = 22,
SLOT_PERSONAL_END = 29,
SLOT_PERSONAL_BAGS_BEGIN = 251,
SLOT_PERSONAL_BAGS_END = 330,
// Shared bank slots
// Shared bank slots 1 through 2 are slots 2500->2501
// Shared bank bag slots are 2531->2550
SLOT_CURSOR_BAG_BEGIN = 331,
SLOT_CURSOR_BAG_END = 340,
// Trade session slots
// Trade slots 1 through 8 are slots 3000->3007
// Trade bag slots are technically 0->79 when passed to client,
// but in our code, we treat them as slots 3100->3179
SLOT_TRIBUTE_BEGIN = 400,
SLOT_TRIBUTE_END = 404,
// Slot used in OP_TradeSkillCombine for world tradeskill containers
SLOT_TRADESKILL = 1000,
SLOT_AUGMENT = 1001,
SLOT_POWER_SOURCE = 9999,
// Value recognized by client for destroying an item
SLOT_INVALID = (int16)0xFFFF
};
SLOT_BANK_BEGIN = 2000,
SLOT_BANK_END = 2023,
SLOT_BANK_BAGS_BEGIN = 2031,
SLOT_BANK_BAGS_END = 2270,
SLOT_SHARED_BANK_BEGIN = 2500,
SLOT_SHARED_BANK_END = 2501,
SLOT_SHARED_BANK_BAGS_BEGIN = 2531,
SLOT_SHARED_BANK_BAGS_END = 2550,
SLOT_TRADE_BEGIN = 3000,
SLOT_TRADE_END = 3007,
SLOT_TRADE_BAGS_BEGIN = 3031,
SLOT_TRADE_BAGS_END = 3110,
SLOT_WORLD_BEGIN = 4000,
SLOT_WORLD_END = 4009
} InventorySlot;
}
#endif
File diff suppressed because it is too large Load Diff
+211
View File
@@ -0,0 +1,211 @@
/*
EQEMu: Everquest Server Emulator
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef EQ_DICTIONARY_H
#define EQ_DICTIONARY_H
#include "types.h"
#include "eq_constants.h"
#include "clientversions.h"
#include <string>
#include "../common/patches/client62_constants.h"
#include "../common/patches/titanium_constants.h"
#include "../common/patches/sof_constants.h"
#include "../common/patches/sod_constants.h"
#include "../common/patches/underfoot_constants.h"
#include "../common/patches/rof_constants.h"
#include "../common/patches/rof2_constants.h"
// *** DO NOT CHANGE without a full understanding of the consequences..the server is set up to use these settings explicitly!! ***
// *** You will cause compilation failures and corrupt your database if partial or incorrect attempts to change them are made!! ***
// Hard-coded values usually indicate that further research is needed and the values given are from the old (known) system
using namespace RoF2::maps; // server inventory maps enumeration (code and database sync'd to reference)
using namespace RoF2::slots; // server possessions slots enumeration (code and database sync'd to reference)
class EmuConstants {
// an immutable value is required to initialize arrays, etc... use this class as a repository for those
public:
// database
static const EQClientVersion CHARACTER_CREATION_CLIENT = EQClientRoF; // adjust according to starting item placement and target client
// inventory
static uint16 InventoryMapSize(int16 map);
//static std::string InventoryLocationName(Location_Struct location);
static std::string InventoryMapName(int16 map);
static std::string InventoryMainName(int16 main);
static std::string InventorySubName(int16 sub);
static std::string InventoryAugName(int16 aug);
// these are currently hard-coded for existing inventory system..do not use in place of special client version handlers until ready
static const uint16 MAP_POSSESSIONS_SIZE = RoF2::consts::MAP_POSSESSIONS_SIZE;
static const uint16 MAP_BANK_SIZE = RoF2::consts::MAP_BANK_SIZE;
static const uint16 MAP_SHARED_BANK_SIZE = RoF2::consts::MAP_SHARED_BANK_SIZE;
static const uint16 MAP_TRADE_SIZE = RoF2::consts::MAP_TRADE_SIZE;
static const uint16 MAP_WORLD_SIZE = RoF2::consts::MAP_WORLD_SIZE;
static const uint16 MAP_LIMBO_SIZE = RoF2::consts::MAP_LIMBO_SIZE;
static const uint16 MAP_TRIBUTE_SIZE = Titanium::consts::MAP_TRIBUTE_SIZE; // server is setup for 'presumed' Titanium value of 5..if Titanium::consts is changed, hard-code this to '5' until server/db is updated
static const uint16 MAP_TROPHY_TRIBUTE_SIZE = 0;
static const uint16 MAP_GUILD_TRIBUTE_SIZE = 0;
static const uint16 MAP_MERCHANT_SIZE = 0;
static const uint16 MAP_DELETED_SIZE = 0;
static const uint16 MAP_CORPSE_SIZE = RoF2::consts::MAP_CORPSE_SIZE; // no bitmask use..limits to size of client corpse window (see EQLimits::InventoryMapSize(MapCorpse, <EQClientVersion))
static const uint16 MAP_BAZAAR_SIZE = Titanium::consts::MAP_BAZAAR_SIZE;
static const uint16 MAP_INSPECT_SIZE = RoF2::consts::MAP_INSPECT_SIZE;
static const uint16 MAP_REAL_ESTATE_SIZE = 0;
static const uint16 MAP_VIEW_MOD_PC_SIZE = NOT_USED;
static const uint16 MAP_VIEW_MOD_BANK_SIZE = NOT_USED;
static const uint16 MAP_VIEW_MOD_SHARED_BANK_SIZE = NOT_USED;
static const uint16 MAP_VIEW_MOD_LIMBO_SIZE = NOT_USED;
static const uint16 MAP_ALT_STORAGE_SIZE = 0;
static const uint16 MAP_ARCHIVED_SIZE = 0;
static const uint16 MAP_MAIL_SIZE = 0;
static const uint16 MAP_GUILD_TROPHY_TRIBUTE_SIZE = 0;
static const uint16 MAP_KRONO_SIZE = RoF::consts::MAP_KRONO_SIZE;
static const uint16 MAP_OTHER_SIZE = 0;
// most of these definitions will go away with the structure-based system..this maintains compatibility for now
// (these are mainly to assign specific values to constants used in conversions and to identify per-client ranges/offsets)
static const int16 EQUIPMENT_BEGIN = RoF2::consts::EQUIPMENT_BEGIN;
static const int16 EQUIPMENT_END = RoF2::consts::EQUIPMENT_END;
static const uint16 EQUIPMENT_SIZE = RoF2::consts::EQUIPMENT_SIZE;
static const int16 GENERAL_BEGIN = RoF2::consts::GENERAL_BEGIN;
static const int16 GENERAL_END = RoF2::consts::GENERAL_END;
static const uint16 GENERAL_SIZE = RoF2::consts::GENERAL_SIZE;
static const int16 GENERAL_BAGS_BEGIN = RoF2::consts::GENERAL_BAGS_BEGIN;
static const int16 GENERAL_BAGS_END_OFFSET = RoF2::consts::GENERAL_BAGS_END_OFFSET;
static const int16 GENERAL_BAGS_END = RoF2::consts::GENERAL_BAGS_END;
static const int16 CURSOR_BAG_BEGIN = RoF2::consts::CURSOR_BAG_BEGIN;
static const int16 CURSOR_BAG_END_OFFSET = RoF2::consts::CURSOR_BAG_END_OFFSET;
static const int16 CURSOR_BAG_END = RoF2::consts::CURSOR_BAG_END;
static const int16 BANK_BEGIN = RoF2::consts::BANK_BEGIN;
static const int16 BANK_END = RoF2::consts::BANK_END;
static const int16 BANK_BAGS_BEGIN = RoF2::consts::BANK_BAGS_BEGIN;
static const int16 BANK_BAGS_END_OFFSET = RoF2::consts::BANK_BAGS_END_OFFSET;
static const int16 BANK_BAGS_END = RoF2::consts::BANK_BAGS_END;
static const int16 SHARED_BANK_BEGIN = RoF2::consts::SHARED_BANK_BEGIN;
static const int16 SHARED_BANK_END = RoF2::consts::SHARED_BANK_END;
static const int16 SHARED_BANK_BAGS_BEGIN = RoF2::consts::SHARED_BANK_BAGS_BEGIN;
static const int16 SHARED_BANK_BAGS_END_OFFSET = RoF2::consts::SHARED_BANK_BAGS_END_OFFSET;
static const int16 SHARED_BANK_BAGS_END = RoF2::consts::SHARED_BANK_BAGS_END;
static const int16 TRADE_BEGIN = RoF2::consts::TRADE_BEGIN;
static const int16 TRADE_END = RoF2::consts::TRADE_END;
static const int16 TRADE_NPC_END = RoF2::consts::TRADE_NPC_END;
static const int16 TRADE_NPC_SIZE = RoF2::consts::TRADE_NPC_SIZE;
static const int16 TRADE_BAGS_BEGIN = RoF2::consts::TRADE_BAGS_BEGIN;
static const int16 TRADE_BAGS_END_OFFSET = RoF2::consts::TRADE_BAGS_END_OFFSET;
static const int16 TRADE_BAGS_END = RoF2::consts::TRADE_BAGS_END;
static const int16 WORLD_BEGIN = RoF2::consts::WORLD_BEGIN;
static const int16 WORLD_END = RoF2::consts::WORLD_END;
static const int16 WORLD_SIZE = MAP_WORLD_SIZE;
static const int16 TRIBUTE_BEGIN = RoF2::consts::TRIBUTE_BEGIN;
static const int16 TRIBUTE_END = RoF2::consts::TRIBUTE_END;
static const int16 TRIBUTE_SIZE = MAP_TRIBUTE_SIZE;
static const int16 CORPSE_BEGIN = RoF2::consts::CORPSE_BEGIN;
static const int16 CORPSE_END = RoF2::consts::CORPSE_END;
static const int16 MATERIAL_BEGIN = Underfoot::consts::MATERIAL_BEGIN;
static const int16 MATERIAL_END = Underfoot::consts::MATERIAL_END;
static const int16 MATERIAL_TINT_END = Underfoot::consts::MATERIAL_TINT_END;
static const int16 MATERIAL_SIZE = Underfoot::consts::MATERIAL_SIZE;
// items
// common and container sizes will not increase until the new 'location' struct is implemented
static const uint16 ITEM_COMMON_SIZE = Underfoot::consts::ITEM_COMMON_SIZE;
static const uint16 ITEM_CONTAINER_SIZE = Underfoot::consts::ITEM_CONTAINER_SIZE;
// player profile
//static const uint32 CLASS_BITMASK = 0; // needs value
//static const uint32 RACE_BITMASK = 0; // needs value
// BANDOLIERS_COUNT sets maximum limit..active limit will need to be handled by the appropriate AA
static const uint32 BANDOLIERS_COUNT = Titanium::consts::BANDOLIERS_COUNT; // count = number of bandolier instances
static const uint32 BANDOLIER_SIZE = Titanium::consts::BANDOLIER_SIZE; // size = number of equipment slots in bandolier instance
static const uint32 POTION_BELT_SIZE = Titanium::consts::POTION_BELT_SIZE;
// legacy-related functions
//static int ServerToPerlSlot(int slot); // encode
//static int PerlToServerSlot(int slot); // decode
};
class EQLimits {
// values should default to a non-beneficial value..unless value conflicts with intended operation
//
// EmuConstants may be used as references..but, not every reference needs to be in EmuConstants (i.e., AllowsEmptyBagInBag(), CoinHasWeight(), etc...)
public:
// client version validation (checks to avoid crashing zone server when accessing reference arrays)
// use this inside of class Client (limits to actual clients)
static bool IsValidClientVersion(uint32 version);
static uint32 ValidateClientVersion(uint32 version);
static EQClientVersion ValidateClientVersion(EQClientVersion version);
// basically..any non-client classes - do not when setting a valid client
static bool IsValidNPCVersion(uint32 version);
static uint32 ValidateNPCVersion(uint32 version);
static EQClientVersion ValidateNPCVersion(EQClientVersion version);
// these are 'universal' - do not when setting a valid client
static bool IsValidMobVersion(uint32 version);
static uint32 ValidateMobVersion(uint32 version);
static EQClientVersion ValidateMobVersion(EQClientVersion version);
// inventory
static uint16 InventoryMapSize(int16 map, uint32 version);
static uint64 PossessionsBitmask(uint32 version);
static uint64 EquipmentBitmask(uint32 version);
static uint64 GeneralBitmask(uint32 version);
static uint64 CursorBitmask(uint32 version);
static bool AllowsEmptyBagInBag(uint32 version);
static bool AllowsClickCastFromBag(uint32 version);
// items
static uint16 ItemCommonSize(uint32 version);
static uint16 ItemContainerSize(uint32 version);
// player profile
static bool CoinHasWeight(uint32 version);
static uint32 BandoliersCount(uint32 version);
static uint32 BandolierSize(uint32 version);
static uint32 PotionBeltSize(uint32 version);
};
#endif /* EQ_LIMITS_H */
/*
Working Notes:
--------------
- full review of client_packet.cpp and client translators needed
*/
+3 -3
View File
@@ -19,10 +19,10 @@
#include <stdio.h>
#include <iostream>
#include <iomanip>
#include "EQPacket.h"
#include "eq_packet.h"
#include "misc.h"
#include "op_codes.h"
#include "CRC16.h"
#include "crc16.h"
#include "platform.h"
#ifndef STATIC_OPCODE
#include "opcodemgr.h"
@@ -476,7 +476,7 @@ EQRawApplicationPacket::EQRawApplicationPacket(const unsigned char *buf, const u
const unsigned char *packet_start = (buf + 3);
const int32 packet_length = len - 3;
safe_delete_array(pBuffer);
if(len >= 0)
if(packet_length >= 0)
{
size = packet_length;
pBuffer = new unsigned char[size];
+11 -8
View File
@@ -18,8 +18,8 @@
#ifndef _EQPACKET_H
#define _EQPACKET_H
#include "BasePacket.h"
#include "EQStreamType.h"
#include "base_packet.h"
#include "eq_stream_type.h"
#include "op_codes.h"
#include "platform.h"
@@ -97,16 +97,15 @@ protected:
};
class EQApplicationPacket : public EQPacket {
// friend class EQProtocolPacket;
friend class EQStream;
public:
EQApplicationPacket() : EQPacket(OP_Unknown,nullptr,0)
EQApplicationPacket() : EQPacket(OP_Unknown, nullptr, 0), opcode_bypass(0)
{ app_opcode_size = GetExecutablePlatform() == ExePlatformUCS ? 1 : 2; }
EQApplicationPacket(const EmuOpcode op) : EQPacket(op,nullptr,0)
EQApplicationPacket(const EmuOpcode op) : EQPacket(op, nullptr, 0), opcode_bypass(0)
{ app_opcode_size = GetExecutablePlatform() == ExePlatformUCS ? 1 : 2; }
EQApplicationPacket(const EmuOpcode op, const uint32 len) : EQPacket(op,nullptr,len)
EQApplicationPacket(const EmuOpcode op, const uint32 len) : EQPacket(op, nullptr, len), opcode_bypass(0)
{ app_opcode_size = GetExecutablePlatform() == ExePlatformUCS ? 1 : 2; }
EQApplicationPacket(const EmuOpcode op, const unsigned char *buf, const uint32 len) : EQPacket(op,buf,len)
EQApplicationPacket(const EmuOpcode op, const unsigned char *buf, const uint32 len) : EQPacket(op, buf, len), opcode_bypass(0)
{ app_opcode_size = GetExecutablePlatform() == ExePlatformUCS ? 1 : 2; }
bool combine(const EQApplicationPacket *rhs);
uint32 serialize (uint16 opcode, unsigned char *dest) const;
@@ -119,12 +118,16 @@ public:
virtual void DumpRawHeader(uint16 seq=0xffff, FILE *to = stdout) const;
virtual void DumpRawHeaderNoTime(uint16 seq=0xffff, FILE *to = stdout) const;
uint16 GetOpcodeBypass() { return opcode_bypass; }
void SetOpcodeBypass(uint16 v) { opcode_bypass = v; }
protected:
uint8 app_opcode_size;
uint16 opcode_bypass;
private:
EQApplicationPacket(const EQApplicationPacket &p) : EQPacket(p.emu_opcode, p.pBuffer, p.size) { app_opcode_size = p.app_opcode_size; }
EQApplicationPacket(const EQApplicationPacket &p) : EQPacket(p.emu_opcode, p.pBuffer, p.size), opcode_bypass(p.opcode_bypass) { app_opcode_size = p.app_opcode_size; }
};
+71 -37
View File
@@ -32,7 +32,8 @@ static const uint32 MAX_MERC_GRADES = 10;
static const uint32 MAX_MERC_STANCES = 10;
static const uint32 BLOCKED_BUFF_COUNT = 20;
#include "eq_constants.h"
//#include "eq_constants.h"
#include "eq_dictionary.h"
/*
** Compiler override to ensure
@@ -533,7 +534,7 @@ struct SpellBuffFade_Struct {
/*007*/ uint8 unknown7;
/*008*/ uint32 spellid;
/*012*/ uint32 duration;
/*016*/ uint32 unknown016;
/*016*/ uint32 num_hits;
/*020*/ uint32 unknown020; //prolly global player ID
/*024*/ uint32 slotid;
/*028*/ uint32 bufffade;
@@ -688,7 +689,7 @@ struct CharCreate_Struct
/*0076*/ uint32 drakkin_heritage; // added for SoF
/*0080*/ uint32 drakkin_tattoo; // added for SoF
/*0084*/ uint32 drakkin_details; // added for SoF
/*0088*/
/*0088*/ uint32 tutorial;
};
/*
@@ -720,12 +721,8 @@ struct Disciplines_Struct {
uint32 values[MAX_PP_DISCIPLINES];
};
static const uint32 TRIBUTE_SLOT_START = 400;
static const uint32 MAX_PLAYER_TRIBUTES = 5;
static const uint32 MAX_PLAYER_BANDOLIER = 4;
static const uint32 MAX_PLAYER_BANDOLIER_ITEMS = 4;
static const uint32 MAX_POTIONS_IN_BELT = 4;
static const uint32 TRIBUTE_NONE = 0xFFFFFFFF;
struct Tribute_Struct {
uint32 tribute;
uint32 tier;
@@ -747,10 +744,10 @@ enum { //bandolier item positions
};
struct Bandolier_Struct {
char name[32];
BandolierItem_Struct items[MAX_PLAYER_BANDOLIER_ITEMS];
BandolierItem_Struct items[EmuConstants::BANDOLIER_SIZE];
};
struct PotionBelt_Struct {
BandolierItem_Struct items[MAX_POTIONS_IN_BELT];
BandolierItem_Struct items[EmuConstants::POTION_BELT_SIZE];
};
struct MovePotionToBelt_Struct {
@@ -803,9 +800,12 @@ struct SuspendedMinion_Struct
** Length: 4308 bytes
** OpCode: 0x006a
*/
static const uint32 MAX_PP_LANGUAGE = 28;
static const uint32 MAX_PP_SPELLBOOK = 480; // Increased to 480 to support SoF
static const uint32 MAX_PP_MEMSPELL = 9;
static const uint32 MAX_PP_LANGUAGE = 28;
static const uint32 MAX_PP_SPELLBOOK = 480; // Set for all functions
static const uint32 MAX_PP_MEMSPELL = 9; // Set to latest client so functions can work right
static const uint32 MAX_PP_REF_SPELLBOOK = 480; // Set for Player Profile size retain
static const uint32 MAX_PP_REF_MEMSPELL = 9; // Set for Player Profile size retain
static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size
static const uint32 MAX_PP_AA_ARRAY = 240;
static const uint32 MAX_GROUP_MEMBERS = 6;
@@ -883,7 +883,7 @@ struct PlayerProfile_Struct
/*0245*/ uint8 guildbanker;
/*0246*/ uint8 unknown0246[6]; //
/*0252*/ uint32 intoxication;
/*0256*/ uint32 spellSlotRefresh[MAX_PP_MEMSPELL]; //in ms
/*0256*/ uint32 spellSlotRefresh[MAX_PP_REF_MEMSPELL]; //in ms
/*0292*/ uint32 abilitySlotRefresh;
/*0296*/ uint8 haircolor; // Player hair color
/*0297*/ uint8 beardcolor; // Player beard color
@@ -922,9 +922,9 @@ struct PlayerProfile_Struct
/*2505*/ uint8 unknown2541[47]; // ?
/*2552*/ uint8 languages[MAX_PP_LANGUAGE];
/*2580*/ uint8 unknown2616[4];
/*2584*/ uint32 spell_book[MAX_PP_SPELLBOOK];
/*2584*/ uint32 spell_book[MAX_PP_REF_SPELLBOOK];
/*4504*/ uint8 unknown4540[128]; // Was [428] all 0xff
/*4632*/ uint32 mem_spells[MAX_PP_MEMSPELL];
/*4632*/ uint32 mem_spells[MAX_PP_REF_MEMSPELL];
/*4668*/ uint8 unknown4704[32]; //
/*4700*/ float y; // Player y position
/*4704*/ float x; // Player x position
@@ -999,7 +999,7 @@ struct PlayerProfile_Struct
/*7212*/ uint32 tribute_points;
/*7216*/ uint32 unknown7252;
/*7220*/ uint32 tribute_active; //1=active
/*7224*/ Tribute_Struct tributes[MAX_PLAYER_TRIBUTES];
/*7224*/ Tribute_Struct tributes[EmuConstants::TRIBUTE_SIZE];
/*7264*/ Disciplines_Struct disciplines;
/*7664*/ uint32 recastTimers[MAX_RECAST_TYPES]; // Timers (GMT of last use)
/*7744*/ char unknown7780[160];
@@ -1026,7 +1026,7 @@ struct PlayerProfile_Struct
/*12800*/ uint32 expAA;
/*12804*/ uint32 aapoints; //avaliable, unspent
/*12808*/ uint8 unknown12844[36];
/*12844*/ Bandolier_Struct bandoliers[MAX_PLAYER_BANDOLIER];
/*12844*/ Bandolier_Struct bandoliers[EmuConstants::BANDOLIERS_COUNT];
/*14124*/ uint8 unknown14160[4506];
/*18630*/ SuspendedMinion_Struct SuspendedMinion; // No longer in use
/*19240*/ uint32 timeentitledonaccount;
@@ -1449,17 +1449,18 @@ struct BulkItemPacket_Struct
struct Consume_Struct
{
/*0000*/ uint32 slot;
/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click
/*0008*/ uint8 c_unknown1[4];
/*0012*/ uint8 type; // 0x01=Food 0x02=Water
/*0013*/ uint8 unknown13[3];
/*0000*/ uint32 slot;
/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click
/*0008*/ uint8 c_unknown1[4];
/*0012*/ uint8 type; // 0x01=Food 0x02=Water
/*0013*/ uint8 unknown13[3];
};
struct DeleteItem_Struct {
/*0000*/ uint32 from_slot;
/*0004*/ uint32 to_slot;
/*0008*/ uint32 number_in_stack;
/*0000*/ uint32 from_slot;
/*0004*/ uint32 to_slot;
/*0008*/ uint32 number_in_stack;
/*0012*/
};
struct MoveItem_Struct
@@ -1467,6 +1468,18 @@ struct MoveItem_Struct
/*0000*/ uint32 from_slot;
/*0004*/ uint32 to_slot;
/*0008*/ uint32 number_in_stack;
/*0012*/
};
// both MoveItem_Struct/DeleteItem_Struct server structures will be changing to a structure-based slot format..this will
// be used for handling SoF/SoD/etc... time stamps sent using the MoveItem_Struct format. (nothing will be done with this
// info at the moment..but, it is forwarded on to the server for handling/future use)
struct ClientTimeStamp_Struct
{
/*0000*/ uint32 from_slot;
/*0004*/ uint32 to_slot;
/*0008*/ uint32 number_in_stack;
/*0012*/
};
//
@@ -2280,10 +2293,13 @@ struct Stun_Struct { // 4 bytes total
};
struct AugmentItem_Struct {
/*00*/ int16 container_slot;
/*02*/ char unknown02[2];
/*04*/ int32 augment_slot;
/*08*/
/*00*/ uint32 container_index;
/*04*/ int32 container_slot;
/*08*/ uint32 augment_index;
/*12*/ int32 augment_slot;
/*16*/ uint32 dest_inst_id; // The unique serial number for the item instance that is being augmented
/*20*/ int32 augment_action; // Guessed - 0 = augment, 1 = remove with distiller, 3 = delete aug
/*24*/
};
// OP_Emote
@@ -3342,8 +3358,8 @@ struct SelectTributeReply_Struct {
struct TributeInfo_Struct {
uint32 active; //0 == inactive, 1 == active
uint32 tributes[MAX_PLAYER_TRIBUTES]; //-1 == NONE
uint32 tiers[MAX_PLAYER_TRIBUTES]; //all 00's
uint32 tributes[EmuConstants::TRIBUTE_SIZE]; //-1 == NONE
uint32 tiers[EmuConstants::TRIBUTE_SIZE]; //all 00's
uint32 tribute_master_id;
};
@@ -3387,7 +3403,7 @@ struct Split_Struct
*/
struct NewCombine_Struct {
/*00*/ int16 container_slot;
/*02*/ char unknown02[2];
/*02*/ int16 guildtribute_slot;
/*04*/
};
@@ -3461,6 +3477,7 @@ struct MerchantList {
int8 level_required;
uint16 alt_currency_cost;
uint32 classes_required;
uint8 probability;
};
struct TempMerchantList {
@@ -4053,7 +4070,7 @@ struct GroupInvite_Struct {
// uint8 unknown128[65];
};
struct BuffFadeMsg_Struct {
struct ColoredText_Struct {
uint32 color;
char msg[1];
};
@@ -4250,6 +4267,13 @@ struct ItemVerifyReply_Struct {
/*012*/
};
struct ItemRecastDelay_Struct {
/*000*/ uint32 recast_delay; // in seconds
/*004*/ uint32 recast_type;
/*008*/ uint32 unknown008;
/*012*/
};
/**
* Shroud yourself. For yourself shrouding, this has your spawnId, spawnStruct,
* bits of your charProfileStruct (no checksum, then charProfile up till
@@ -4288,9 +4312,9 @@ struct ControlBoat_Struct {
struct AugmentInfo_Struct
{
/*000*/ uint32 itemid; // id of the solvent needed
/*004*/ uint8 window; // window to display the information in
/*005*/ uint8 unknown005[67]; // total packet length 72, all the rest were always 00
/*000*/ uint32 itemid; // id of the solvent needed
/*004*/ uint8 window; // window to display the information in
/*005*/ uint8 unknown005[67]; // total packet length 72, all the rest were always 00
/*072*/
};
@@ -4453,6 +4477,14 @@ struct GuildBankPromote_Struct
/*12*/ uint32 Slot2; // Always appears to be the same as Slot for Action code 3
};
struct GuildPromoteStruct {
/*000*/ char target[64];
/*064*/ char name[64];
/*128*/ uint32 rank;
/*132*/ uint32 myrank;
/*136*/
};
struct GuildBankPermissions_Struct
{
/*00*/ uint32 Action; // 6
@@ -4570,11 +4602,13 @@ struct BuffIconEntry_Struct
uint32 buff_slot;
uint32 spell_id;
uint32 tics_remaining;
uint32 num_hits;
};
struct BuffIcon_Struct
{
uint32 entity_id;
uint8 all_buffs;
uint16 count;
BuffIconEntry_Struct entries[0];
};
+10 -52
View File
@@ -17,12 +17,12 @@
*/
#include "debug.h"
#include "EQPacket.h"
#include "EQStream.h"
#include "eq_packet.h"
#include "eq_stream.h"
#include "misc.h"
#include "Mutex.h"
#include "mutex.h"
#include "op_codes.h"
#include "CRC16.h"
#include "crc16.h"
#include "platform.h"
#include <string>
@@ -532,9 +532,12 @@ void EQStream::FastQueuePacket(EQApplicationPacket **p, bool ack_req)
return;
}
uint16 opcode = (*OpMgr)->EmuToEQ(pack->emu_opcode);
_log(NET__APP_TRACE, "Queueing %sacked packet with opcode 0x%x (%s) and length %d", ack_req?"":"non-", opcode, OpcodeManager::EmuToName(pack->emu_opcode), pack->size);
uint16 opcode = 0;
if(pack->GetOpcodeBypass() != 0) {
opcode = pack->GetOpcodeBypass();
} else {
opcode = (*OpMgr)->EmuToEQ(pack->emu_opcode);
}
if (!ack_req) {
NonSequencedPush(new EQProtocolPacket(opcode, pack->pBuffer, pack->size));
@@ -877,43 +880,6 @@ sockaddr_in address;
AddBytesSent(length);
}
/*
commented out since im not sure theres a lot of merit in it.
Really it was bitterness towards allocating a 2k buffer on the stack each call.
Im sure the thought was client side, but even then, they will
likely need a whole thread to call this method, in which case, they should
supply the buffer so we dont re-allocate it each time.
EQProtocolPacket *EQStream::Read(int eq_fd, sockaddr_in *from)
{
int socklen;
int length=0;
EQProtocolPacket *p=nullptr;
char temp[15];
socklen=sizeof(sockaddr);
#ifdef _WINDOWS
length=recvfrom(eq_fd, (char *)_tempBuffer, 2048, 0, (struct sockaddr*)from, (int *)&socklen);
#else
length=recvfrom(eq_fd, _tempBuffer, 2048, 0, (struct sockaddr*)from, (socklen_t *)&socklen);
#endif
if (length>=2) {
p=new EQProtocolPacket(_tempBuffer[1],&_tempBuffer[2],length-2);
uint32 ip=from->sin_addr.s_addr;
sprintf(temp,"%d.%d.%d.%d:%d",
*(unsigned char *)&ip,
*((unsigned char *)&ip+1),
*((unsigned char *)&ip+2),
*((unsigned char *)&ip+3),
ntohs(from->sin_port));
//std::cout << timestamp() << "Data from: " << temp << " OpCode 0x" << std::hex << std::setw(2) << std::setfill('0') << (int)p->opcode << std::dec << std::endl;
//dump_message(p->pBuffer,p->size,timestamp());
}
return p;
}*/
void EQStream::SendSessionResponse()
{
EQProtocolPacket *out=new EQProtocolPacket(OP_SessionResponse,nullptr,sizeof(SessionResponse));
@@ -1101,14 +1067,6 @@ EQProtocolPacket *p=nullptr;
SequencedQueue.clear();
}
MOutboundQueue.unlock();
/*if(uint16(SequencedBase + SequencedQueue.size()) != NextOutSeq) {
_log(NET__ERROR, _L "Out-bound Invalid Sequenced queue: BS %d + SQ %d != NOS %d" __L, SequencedBase, SequencedQueue.size(), NextOutSeq);
}
if(NextSequencedSend > SequencedQueue.size()) {
_log(NET__ERROR, _L "Out-bound Next Send Sequence is beyond the end of the queue NSS %d > SQ %d" __L, NextSequencedSend, SequencedQueue.size());
}*/
//NOTE: we prolly want to reset counters if we are stupposed to do anything after this.
}
void EQStream::PacketQueueClear()
+5 -5
View File
@@ -9,13 +9,13 @@
#ifndef WIN32
#include <netinet/in.h>
#endif
#include "EQStreamType.h"
#include "EQPacket.h"
#include "EQStreamIntf.h"
#include "Mutex.h"
#include "eq_stream_type.h"
#include "eq_packet.h"
#include "eq_stream_intf.h"
#include "mutex.h"
#include "../common/opcodemgr.h"
#include "../common/misc.h"
#include "../common/Condition.h"
#include "../common/condition.h"
#include "../common/timer.h"
#define FLAG_COMPRESSED 0x01
@@ -1,5 +1,5 @@
#include "debug.h"
#include "EQStreamFactory.h"
#include "eq_stream_factory.h"
#ifdef _WINDOWS
#include <winsock.h>
#include <process.h>
@@ -16,7 +16,7 @@
#include <fcntl.h>
#include <iostream>
#include "op_codes.h"
#include "EQStream.h"
#include "eq_stream.h"
#include "logsys.h"
ThreadReturnType EQStreamFactoryReaderLoop(void *eqfs)
@@ -4,8 +4,8 @@
#include <queue>
#include <map>
#include "../common/EQStream.h"
#include "../common/Condition.h"
#include "../common/eq_stream.h"
#include "../common/condition.h"
#include "../common/timeoutmgr.h"
#include "../common/opcodemgr.h"
#include "../common/timer.h"
@@ -1,6 +1,6 @@
#include "debug.h"
#include "EQStreamIdent.h"
#include "EQStreamProxy.h"
#include "eq_stream_ident.h"
#include "eq_stream_proxy.h"
#include "logsys.h"
EQStreamIdentifier::~EQStreamIdentifier() {
@@ -1,7 +1,7 @@
#ifndef EQSTREAMIDENT_H_
#define EQSTREAMIDENT_H_
#include "EQStream.h"
#include "eq_stream.h"
#include "timer.h"
#include <vector>
#include <string>
@@ -1,8 +1,8 @@
#include "debug.h"
#include "EQStreamProxy.h"
#include "EQStream.h"
#include "StructStrategy.h"
#include "eq_stream_proxy.h"
#include "eq_stream.h"
#include "struct_strategy.h"
EQStreamProxy::EQStreamProxy(EQStream *&stream, const StructStrategy *structs, OpcodeManager **opcodes)
@@ -3,7 +3,7 @@
#include "types.h"
#include "EQStreamIntf.h"
#include "eq_stream_intf.h"
class EQStream;
class StructStrategy;
+1 -1
View File
@@ -16,7 +16,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "debug.h"
#include "EQDB.h"
#include "eqdb.h"
#include "database.h"
#include <mysql.h>
#include <cstring>
+1 -1
View File
@@ -22,7 +22,7 @@
#include <vector>
#include <map>
#include "types.h"
#include "EQDBRes.h"
#include "eqdb_res.h"
#include <mysql.h>
//this is the main object exported to perl.
+1 -1
View File
@@ -16,7 +16,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "debug.h"
#include "EQDBRes.h"
#include "eqdb_res.h"
#include <mysql.h>
std::vector<std::string> EQDBRes::fetch_row_array() {
@@ -16,8 +16,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../common/debug.h"
#include "EQEmuConfig.h"
#include "MiscFunctions.h"
#include "eqemu_config.h"
#include "misc_functions.h"
#include <iostream>
#include <sstream>
@@ -18,7 +18,7 @@
#ifndef __EQEmuConfig_H
#define __EQEmuConfig_H
#include "XMLParser.h"
#include "xml_parser.h"
#include "linked_list.h"
struct LoginConfig {
@@ -112,14 +112,14 @@ protected:
#define ELEMENT(name) \
void do_##name(TiXmlElement *ele);
#include "EQEmuConfig_elements.h"
#include "eqemu_config_elements.h"
EQEmuConfig() {
// import the needed handler prototypes
#define ELEMENT(name) \
Handlers[#name]=(ElementHandler)&EQEmuConfig::do_##name;
#include "EQEmuConfig_elements.h"
#include "eqemu_config_elements.h"
// Set sane defaults
@@ -18,10 +18,10 @@
#ifdef _WINDOWS
#include <windows.h>
#endif
#include "EQEMuError.h"
#include "eqemu_error.h"
#include "linked_list.h"
#include "Mutex.h"
#include "MiscFunctions.h"
#include "mutex.h"
#include "misc_functions.h"
#include <stdio.h>
#include <string.h>
#ifdef _WINDOWS
+18 -19
View File
@@ -19,8 +19,7 @@
#define EXTENDED_PROFILE_H
#include "eq_packet_structs.h"
#include "Item.h"
#include "item.h"
#pragma pack(1)
@@ -37,24 +36,24 @@
*/
struct ExtendedProfile_Struct {
// Pet stuff
uint16 pet_id;
uint16 old_pet_hp;
uint16 old_pet_mana;
SpellBuff_Struct pet_buffs[BUFF_COUNT];
uint32 pet_items[_MaterialCount];
char merc_name[64];
uint16 pet_id; /* Not Used */
uint16 old_pet_hp; /* Not Used */
uint16 old_pet_mana; /* Not Used */
SpellBuff_Struct pet_buffs[BUFF_COUNT]; /* Not Used */
uint32 pet_items[_MaterialCount]; /* Not Used */
char merc_name[64]; /* Used */
uint32 aa_effects;
uint32 perAA; //% of exp going to AAs
uint32 expended_aa; // Total of expended AA
uint32 pet_hp;
uint32 pet_mana;
uint32 mercTemplateID;
uint32 mercSuspendedTime;
bool mercIsSuspended;
uint32 mercTimerRemaining;
uint8 mercGender;
int32 mercState;
uint32 aa_effects; /* Used */
uint32 perAA; /* Used: % of exp going to AAs */
uint32 expended_aa; /* Used: Total of expended AA */
uint32 pet_hp; /* Not Used */
uint32 pet_mana; /* Not Used */
uint32 mercTemplateID; /* Not Used */
uint32 mercSuspendedTime; /* Not Used */
bool mercIsSuspended; /* Not Used */
uint32 mercTimerRemaining; /* Not Used */
uint8 mercGender; /* Not Used */
int32 mercState; /* Not Used */
};
#pragma pack()
+279 -588
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -54,6 +54,7 @@ public:
bool SetGuild(uint32 charid, uint32 guild_id, uint8 rank);
bool SetGuildRank(uint32 charid, uint8 rank);
bool SetBankerFlag(uint32 charid, bool is_banker);
bool ForceRankUpdate(uint32 charid);
bool GetAltFlag(uint32 CharID);
bool SetAltFlag(uint32 charid, bool is_alt);
bool GetBankerFlag(uint32 CharID);
@@ -108,7 +109,7 @@ protected:
bool DBSetAltFlag(uint32 charid, bool is_alt);
bool DBSetTributeFlag(uint32 charid, bool enabled);
bool DBSetPublicNote(uint32 charid, const char *note);
bool _RunQuery(char *&query, int len, const char *errmsg);
bool QueryWithLogging(std::string query, const char *errmsg);
// void DBSetPublicNote(uint32 guild_id,char* charname, char* note);
bool LocalDeleteGuild(uint32 guild_id);
+2 -316
View File
@@ -16,7 +16,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../common/debug.h"
#include "MiscFunctions.h"
#include "misc_functions.h"
#include "guilds.h"
#include "database.h"
#include "eq_packet_structs.h"
@@ -24,318 +24,4 @@
#ifndef WIN32
#include <netinet/in.h> //for htonl
#endif
/*
void Database::GetGuildMembers(uint32 guild_id, GuildMember_Struct* gms){
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
MYSQL_RES *result;
MYSQL_ROW row;
uint32 count=0;
uint32 length=0;
if (RunQuery(query, MakeAnyLenString(&query, "Select name,profile,timelaston,guildrank,publicnote from character_ where guild=%i", guild_id), errbuf, &result)) {
safe_delete_array(query);
while( ( row = mysql_fetch_row(result) ) ){
strcpy(gms->member[count].name,row[0]);
length+=strlen(row[0])+strlen(row[4]);
PlayerProfile_Struct* pps=(PlayerProfile_Struct*)row[1];
gms->member[count].level=htonl(pps->level);
gms->member[count].zoneid=(pps->zone_id*256);
gms->member[count].timelaston=htonl(atol(row[2]));
gms->member[count].class_=htonl(pps->class_);
gms->member[count].rank=atoi(row[3]);
strcpy(gms->member[count].publicnote,row[4]);
count++;
}
mysql_free_result(result);
}
else {
LogFile->write(EQEMuLog::Error, "Error in GetGuildMembers query '%s': %s", query, errbuf);
safe_delete_array(query);
}
gms->count=count;
gms->length=length;
}
uint32 Database::NumberInGuild(uint32 guild_id) {
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
MYSQL_RES *result;
MYSQL_ROW row;
if (RunQuery(query, MakeAnyLenString(&query, "Select count(id) from character_ where guild=%i", guild_id), errbuf, &result)) {
safe_delete_array(query);
if (mysql_num_rows(result) == 1) {
row = mysql_fetch_row(result);
uint32 ret = atoi(row[0]);
mysql_free_result(result);
return ret;
}
mysql_free_result(result);
}
else {
LogFile->write(EQEMuLog::Error, "Error in NumberInGuild query '%s': %s", query, errbuf);
safe_delete_array(query);
return 0;
}
return 0;
}
bool Database::SetGuild(char* name, uint32 guild_id, uint8 guildrank) {
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
uint32 affected_rows = 0;
if (RunQuery(query, MakeAnyLenString(&query, "UPDATE character_ SET guild=%i, guildrank=%i WHERE name='%s'", guild_id, guildrank, name), errbuf, 0, &affected_rows)) {
safe_delete_array(query);
if (affected_rows == 1)
return true;
else
return false;
}
else {
LogFile->write(EQEMuLog::Error, "Error in SetGuild query '%s': %s", query, errbuf);
safe_delete_array(query);
return false;
}
return false;
}
bool Database::SetGuild(uint32 charid, uint32 guild_id, uint8 guildrank) {
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
uint32 affected_rows = 0;
if (RunQuery(query, MakeAnyLenString(&query, "UPDATE character_ SET guild=%i, guildrank=%i WHERE id=%i", guild_id, guildrank, charid), errbuf, 0, &affected_rows)) {
safe_delete_array(query);
if (affected_rows == 1)
return true;
else
return false;
}
else {
LogFile->write(EQEMuLog::Error, "Error in SetGuild query '%s': %s", query, errbuf);
safe_delete_array(query);
return false;
}
return false;
}
bool Database::DeleteGuild(uint32 guild_id)
{
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
char *query2 = 0;
uint32 affected_rows = 0;
if (RunQuery(query, MakeAnyLenString(&query, "DELETE FROM guilds WHERE id=%i;", guild_id), errbuf, 0, &affected_rows)) {
safe_delete_array(query);
if (affected_rows == 1) {
if(!RunQuery(query2, MakeAnyLenString(&query2, "update character_ set guild=0,guildrank=0 where guild=%i", guild_id), errbuf, 0, &affected_rows))
LogFile->write(EQEMuLog::Error, "Error in DeleteGuild cleanup query '%s': %s", query2, errbuf);
safe_delete_array(query2);
return true;
}
else
return false;
}
else {
LogFile->write(EQEMuLog::Error, "Error in DeleteGuild query '%s': %s", query, errbuf);
safe_delete_array(query);
return false;
}
return false;
}
bool Database::RenameGuild(uint32 guild_id, const char* name) {
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
uint32 affected_rows = 0;
char buf[65];
DoEscapeString(buf, name, strlen(name)) ;
if (RunQuery(query, MakeAnyLenString(&query, "Update guilds set name='%s' WHERE id=%i;", buf, guild_id), errbuf, 0, &affected_rows)) {
safe_delete_array(query);
if (affected_rows == 1)
return true;
else
return false;
}
else {
LogFile->write(EQEMuLog::Error, "Error in RenameGuild query '%s': %s", query, errbuf);
safe_delete_array(query);
return false;
}
return false;
}
bool Database::EditGuild(uint32 guild_id, uint8 ranknum, GuildRankLevel_Struct* grl)
{
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
int chars = 0;
uint32 affected_rows = 0;
char buf[203];
char buf2[8];
DoEscapeString(buf, grl->rankname, strlen(grl->rankname)) ;
buf2[GUILD_HEAR] = grl->heargu + '0';
buf2[GUILD_SPEAK] = grl->speakgu + '0';
buf2[GUILD_INVITE] = grl->invite + '0';
buf2[GUILD_REMOVE] = grl->remove + '0';
buf2[GUILD_PROMOTE] = grl->promote + '0';
buf2[GUILD_DEMOTE] = grl->demote + '0';
buf2[GUILD_MOTD] = grl->motd + '0';
buf2[GUILD_WARPEACE] = grl->warpeace + '0';
if (ranknum == 0)
chars = MakeAnyLenString(&query, "Update guilds set rank%ititle='%s' WHERE id=%i;", ranknum, buf, guild_id);
else
chars = MakeAnyLenString(&query, "Update guilds set rank%ititle='%s', rank%i='%s' WHERE id=%i;", ranknum, buf, ranknum, buf2, guild_id);
if (RunQuery(query, chars, errbuf, 0, &affected_rows)) {
safe_delete_array(query);
if (affected_rows == 1)
return true;
else
return false;
}
else {
LogFile->write(EQEMuLog::Error, "Error in EditGuild query '%s': %s", query, errbuf);
safe_delete_array(query);
return false;
}
return false;
}
bool Database::GetGuildNameByID(uint32 guild_id, char * name) {
if (!name || !guild_id) return false;
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
MYSQL_RES *result;
MYSQL_ROW row;
if (RunQuery(query, MakeAnyLenString(&query, "select name from guilds where id='%i'", guild_id), errbuf, &result)) {
safe_delete_array(query);
row = mysql_fetch_row(result);
if (row[0])
sprintf(name,"%s",row[0]);
mysql_free_result(result);
return true;
}
else {
LogFile->write(EQEMuLog::Error, "Error in GetGuildNameByID query '%s': %s", query, errbuf);
safe_delete_array(query);
return false;
}
return false;
}
uint32 Database::GetGuildIDbyLeader(uint32 leader)
{
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
MYSQL_RES *result;
MYSQL_ROW row;
if (RunQuery(query, MakeAnyLenString(&query, "SELECT id FROM guilds WHERE leader=%i", leader), errbuf, &result)) {
safe_delete_array(query);
if (mysql_num_rows(result) == 1)
{
row = mysql_fetch_row(result);
uint32 tmp = atoi(row[0]);
mysql_free_result(result);
return tmp;
}
mysql_free_result(result);
}
else {
LogFile->write(EQEMuLog::Error, "Error in Getguild_idbyLeader query '%s': %s", query, errbuf);
safe_delete_array(query);
}
return 0;
}
bool Database::SetGuildLeader(uint32 guild_id, uint32 leader)
{
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
uint32 affected_rows = 0;
if (RunQuery(query, MakeAnyLenString(&query, "UPDATE guilds SET leader=%i WHERE id=%i", leader, guild_id), errbuf, 0, &affected_rows)) {
safe_delete_array(query);
if (affected_rows == 1)
return true;
else
return false;
}
else {
LogFile->write(EQEMuLog::Error, "Error in SetGuildLeader query '%s': %s", query, errbuf);
safe_delete_array(query);
return false;
}
return false;
}
bool Database::SetGuildMOTD(uint32 guild_id, const char* motd) {
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
char* motdbuf = 0;
uint32 affected_rows = 0;
motdbuf = new char[(strlen(motd)*2)+3];
DoEscapeString(motdbuf, motd, strlen(motd)) ;
if (RunQuery(query, MakeAnyLenString(&query, "Update guilds set motd='%s' WHERE id=%i;", motdbuf, guild_id), errbuf, 0, &affected_rows)) {
safe_delete_array(query);
delete motdbuf;
if (affected_rows == 1)
return true;
else
return false;
}
else
{
LogFile->write(EQEMuLog::Error, "Error in SetGuildMOTD query '%s': %s", query, errbuf);
safe_delete_array(query);
delete motdbuf;
return false;
}
return false;
}
string Database::GetGuildMOTD(uint32 guild_id)
{
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
MYSQL_RES *result;
MYSQL_ROW row;
string motd_str;
if (RunQuery(query, MakeAnyLenString(&query, "SELECT motd FROM guilds WHERE id=%i", guild_id), errbuf, &result)) {
safe_delete_array(query);
if (mysql_num_rows(result) == 1) {
row = mysql_fetch_row(result);
if (row[0])
motd_str = row[0];
}
mysql_free_result(result);
}
else {
LogFile->write(EQEMuLog::Error, "Error in GetGuildMOTD query '%s': %s", query, errbuf);
safe_delete_array(query);
}
return motd_str;
}
*/
#endif
File diff suppressed because it is too large Load Diff
+31 -21
View File
@@ -55,21 +55,6 @@ namespace ItemField
};
};
// Indexing positions to the beginning slot_id's for a bucket of slots
#define IDX_EQUIP 0
#define IDX_CURSOR_BAG 331
#define IDX_INV 22
#define IDX_INV_BAG 251
#define IDX_TRIBUTE 400
#define IDX_BANK 2000
#define IDX_BANK_BAG 2031
#define IDX_SHBANK 2500
#define IDX_SHBANK_BAG 2531
#define IDX_TRADE 3000
#define IDX_TRADE_BAG 3031
#define IDX_TRADESKILL 4000
#define MAX_ITEMS_PER_BAG 10
// Specifies usage type for item inside ItemInst
enum ItemInstTypes
{
@@ -136,8 +121,22 @@ public:
// Public Methods
///////////////////////////////
Inventory() { m_version = EQClientUnknown; m_versionset = false; }
~Inventory();
// Inventory v2 creep
bool SetInventoryVersion(EQClientVersion version) {
if (!m_versionset) {
m_version = version;
return (m_versionset = true);
}
else {
return false;
}
}
EQClientVersion GetInventoryVersion() { return m_version; }
static void CleanDirty();
static void MarkDirty(ItemInst *inst);
@@ -147,7 +146,7 @@ public:
inline iter_queue cursor_begin() { return m_cursor.begin(); }
inline iter_queue cursor_end() { return m_cursor.end(); }
inline bool CursorEmpty() { return (m_cursor.size() == 0); }
inline bool CursorEmpty() { return (m_cursor.size() == 0); }
// Retrieve a read-only item from inventory
inline const ItemInst* operator[](int16 slot_id) const { return GetItem(slot_id); }
@@ -187,6 +186,7 @@ public:
// Locate an available inventory slot
int16 FindFreeSlot(bool for_bag, bool try_cursor, uint8 min_size = 0, bool is_arrow = false);
int16 FindFreeSlotForTradeItem(const ItemInst* inst);
// Calculate slot_id for an item within a bag
static int16 CalcSlotId(int16 slot_id); // Calc parent bag's slot_id
@@ -197,6 +197,10 @@ public:
static bool CanItemFitInContainer(const Item_Struct *ItemToTry, const Item_Struct *Container);
// Test for valid inventory casting slot
bool SupportsClickCasting(int16 slot_id);
bool SupportsPotionBeltCasting(int16 slot_id);
// Test whether a given slot can support a container item
static bool SupportsContainers(int16 slot_id);
@@ -243,7 +247,12 @@ protected:
std::map<int16, ItemInst*> m_bank; // Items in character bank
std::map<int16, ItemInst*> m_shbank; // Items in character shared bank
std::map<int16, ItemInst*> m_trade; // Items in a trade session
ItemInstQueue m_cursor; // Items on cursor: FIFO
ItemInstQueue m_cursor; // Items on cursor: FIFO
private:
// Active inventory version
EQClientVersion m_version;
bool m_versionset;
};
class SharedDatabase;
@@ -288,6 +297,7 @@ public:
inline bool IsAugmentable() const { return m_item->AugSlotType[0]!=0 || m_item->AugSlotType[1]!=0 || m_item->AugSlotType[2]!=0 || m_item->AugSlotType[3]!=0 || m_item->AugSlotType[4]!=0; }
bool AvailableWearSlot(uint32 aug_wear_slots) const;
int8 AvailableAugmentSlot(int32 augtype) const;
bool IsAugmentSlotAvailable(int32 augtype, uint8 slot) const;
inline int32 GetAugmentType() const { return m_item->AugType; }
inline bool IsExpendable() const { return ((m_item->Click.Type == ET_Expendable ) || (m_item->ItemType == ItemTypePotion)); }
@@ -380,7 +390,7 @@ public:
bool IsActivated() { return m_activated; }
void SetActivated(bool activated) { m_activated = activated; }
int8 GetEvolveLvl() const { return m_evolveLvl; }
void SetScaling(bool v) { m_scaling = v; }
void SetScaling(bool v) { m_scaling = v; }
void Initialize(SharedDatabase *db = nullptr);
void ScaleItem();
@@ -428,9 +438,9 @@ protected:
//
// Items inside of this item (augs or contents);
std::map<uint8, ItemInst*> m_contents; // Zero-based index: min=0, max=9
std::map<std::string, std::string> m_custom_data;
std::map<std::string, Timer> m_timers;
std::map<uint8, ItemInst*> m_contents; // Zero-based index: min=0, max=9
std::map<std::string, std::string> m_custom_data;
std::map<std::string, Timer> m_timers;
};
class EvolveInfo {
+7 -5
View File
@@ -42,7 +42,8 @@
* Made ya look! Ha!
*/
#include "eq_constants.h"
//#include "eq_constants.h"
#include "eq_dictionary.h"
/*
** Child struct of Item_Struct:
@@ -68,7 +69,8 @@ struct InternalSerializedItem_Struct {
const void * inst;
};
#define MAX_AUGMENT_SLOTS 5
// use EmuConstants::ITEM_COMMON_SIZE
//#define MAX_AUGMENT_SLOTS 5
struct Item_Struct {
bool IsEquipable(uint16 Race, uint16 Class) const;
@@ -180,9 +182,9 @@ struct Item_Struct {
int32 FactionAmt4; // Faction Amt 4
char CharmFile[32]; // ?
uint32 AugType;
uint8 AugSlotType[MAX_AUGMENT_SLOTS]; // LDoN: Augment Slot 1-5 Type
uint8 AugSlotVisible[MAX_AUGMENT_SLOTS]; // LDoN: Augment Slot 1-5 Visible
uint8 AugSlotUnk2[MAX_AUGMENT_SLOTS]; // LDoN: Augment Slot 1-5 Unknown
uint8 AugSlotType[EmuConstants::ITEM_COMMON_SIZE]; // LDoN: Augment Slot 1-5 Type
uint8 AugSlotVisible[EmuConstants::ITEM_COMMON_SIZE]; // LDoN: Augment Slot 1-5 Visible
uint8 AugSlotUnk2[EmuConstants::ITEM_COMMON_SIZE]; // LDoN: Augment Slot 1-5 Unknown
uint32 LDoNTheme;
uint32 LDoNPrice;
uint32 LDoNSold;
+1 -1
View File
@@ -22,7 +22,7 @@
#include <stdio.h>
#include <string.h>
#include "misc.h"
#include "EQPacket.h"
#include "eq_packet.h"
#define LOG_CATEGORY(category) #category ,
+3 -3
View File
@@ -92,8 +92,8 @@ extern void log_raw_packet(LogType type, uint16 seq, const BasePacket *p);
class Mob;
extern void log_message_mob(LogType type, Mob *who, const char *fmt, ...);
#define mlog( type, format, ...) \
if(IsLoggingEnabled()) \
do { \
if(IsLoggingEnabled()) \
if(log_type_info[ type ].enabled) { \
log_message_mob(type, this, format, ##__VA_ARGS__); \
} \
@@ -150,16 +150,16 @@ extern void log_raw_packet(LogType type, uint16 seq, const BasePacket *p);
class Mob;
extern void log_hex_mob(LogType type, Mob *who, const char *data, uint32 length);
#define mhex( type, data, len) \
if(IsLoggingEnabled()) \
do { \
if(IsLoggingEnabled()) \
if(log_type_info[ type ].enabled) { \
log_hex_mob(type, this, data, len); \
} \
} while(false)
extern void log_packet_mob(LogType type, Mob *who, const BasePacket *p);
#define mpkt( type, packet) \
if(IsLoggingEnabled()) \
do { \
if(IsLoggingEnabled()) \
if(log_type_info[ type ].enabled) { \
log_packet_mob(type, this, packet); \
} \
+2 -4
View File
@@ -18,7 +18,7 @@
#include "debug.h"
#include "logsys.h"
#include "StringUtil.h"
#include "string_util.h"
#include <stdarg.h>
#include <stdio.h>
@@ -33,9 +33,7 @@ void log_message(LogType type, const char *fmt, ...) {
}
void log_messageVA(LogType type, const char *fmt, va_list args) {
std::string prefix_buffer;
StringFormat(prefix_buffer, "[%s] ", log_type_info[type].name);
std::string prefix_buffer = StringFormat("[%s] ", log_type_info[type].name);
LogFile->writePVA(EQEMuLog::Debug, prefix_buffer.c_str(), fmt, args);
}
+10 -2
View File
@@ -60,11 +60,18 @@ LOG_TYPE( UCS, PACKETS, DISABLED)
LOG_CATEGORY( QUERYSERV )
LOG_TYPE( QUERYSERV, INIT, ENABLED )
LOG_TYPE( QUERYSERV, ERROR, ENABLED )
LOG_TYPE( QUERYSERV, ERROR, ENABLED )
LOG_TYPE( QUERYSERV, CLIENT, DISABLED )
LOG_TYPE( QUERYSERV, TRACE, DISABLED )
LOG_TYPE( QUERYSERV, PACKETS, DISABLED)
LOG_CATEGORY( SOCKET_SERVER)
LOG_TYPE( SOCKET_SERVER, INIT, ENABLED)
LOG_TYPE( SOCKET_SERVER, ERROR, ENABLED)
LOG_TYPE( SOCKET_SERVER, CLIENT, DISABLED)
LOG_TYPE( SOCKET_SERVER, TRACE, DISABLED)
LOG_TYPE( SOCKET_SERVER, PACKETS, DISABLED)
LOG_CATEGORY( SPAWNS )
LOG_TYPE( SPAWNS, MAIN, DISABLED )
LOG_TYPE( SPAWNS, CONDITIONS, DISABLED )
@@ -101,6 +108,7 @@ LOG_CATEGORY( FACTION )
LOG_CATEGORY( ZONE )
LOG_TYPE( ZONE, GROUND_SPAWNS, DISABLED )
LOG_TYPE( ZONE, SPAWNS, ENABLED)
LOG_TYPE( ZONE, INIT, ENABLED )
LOG_TYPE( ZONE, INIT_ERR, ENABLED )
LOG_TYPE( ZONE, WORLD, ENABLED )
@@ -109,7 +117,7 @@ LOG_TYPE( ZONE, WORLD_TRACE, DISABLED )
LOG_CATEGORY( TASKS )
LOG_TYPE( TASKS, GLOBALLOAD, DISABLED )
LOG_TYPE( TASKS, CLIENTLOAD, DISABLED )
LOG_TYPE( TASKS, CLIENTLOAD, DISABLED )
LOG_TYPE( TASKS, UPDATE, DISABLED )
LOG_TYPE( TASKS, CLIENTSAVE, DISABLED )
LOG_TYPE( TASKS, PACKETS, DISABLED )
+9 -9
View File
@@ -1,13 +1,13 @@
//Mail and Chat Channels
N(OP_MailLogin),
N(OP_Mail),
N(OP_Buddy),
N(OP_ChannelAnnounceJoin),
N(OP_ChannelAnnounceLeave),
N(OP_Buddy),
N(OP_MailHeaderCount),
N(OP_MailHeader),
N(OP_MailSendBody),
N(OP_MailNew),
N(OP_MailDeliveryStatus),
N(OP_MailboxChange),
N(OP_Ignore),
N(OP_Mail),
N(OP_MailboxChange),
N(OP_MailDeliveryStatus),
N(OP_MailHeader),
N(OP_MailHeaderCount),
N(OP_MailLogin),
N(OP_MailNew),
N(OP_MailSendBody),
+1 -1
View File
@@ -9,7 +9,7 @@
*/
#include <string.h> /* for memcpy() */
#include "../common/md5.h"
#include "../common/StringUtil.h"
#include "../common/string_util.h"
#include "../common/seperator.h"
MD5::MD5() {
@@ -16,7 +16,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../common/debug.h"
#include "MiscFunctions.h"
#include "misc_functions.h"
#include <string.h>
#include <time.h>
#include <math.h>
@@ -387,3 +387,26 @@ float EQHtoFloat(int d)
{
return(360.0f - float((d * 360) >> 11));
}
// returns a swapped-bit value for use in client translator and inventory functions
uint32 SwapBits21and22(uint32 mask)
{
static const uint32 BIT21 = 1 << 21;
static const uint32 BIT22 = 1 << 22;
static const uint32 SWAPBITS = (BIT21 | BIT22);
if ((bool)(mask & BIT21) != (bool)(mask & BIT22))
mask ^= SWAPBITS;
return mask;
}
// returns an unset bit 22 value for use in client translators
uint32 Catch22(uint32 mask)
{
static const uint32 KEEPBITS = ~(1 << 22);
mask &= KEEPBITS;
return mask;
}
@@ -102,8 +102,11 @@ int FloatToEQ13(float d);
int NewFloatToEQ13(float d);
int FloatToEQ19(float d);
int FloatToEQH(float d);
uint32 SwapBits21and22(uint32 mask);
uint32 Catch22(uint32 mask);
// macro to catch fp errors (provided by noudness)
#define FCMP(a,b) (fabs(a-b) < FLT_EPSILON)
#define _ITOA_BUFLEN 25
const char *itoa(int num); //not thread safe
+1 -1
View File
@@ -16,7 +16,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../common/debug.h"
#include "../common/Mutex.h"
#include "../common/mutex.h"
#include <iostream>
View File
+139
View File
@@ -0,0 +1,139 @@
#include "mysql_request_result.h"
MySQLRequestResult::MySQLRequestResult()
: m_CurrentRow(), m_OneBeyondRow()
{
ZeroOut();
}
MySQLRequestResult::MySQLRequestResult(MYSQL_RES* result, uint32 rowsAffected, uint32 rowCount, uint32 columnCount, uint32 lastInsertedID, uint32 errorNumber, char *errorBuffer)
: m_CurrentRow(result), m_OneBeyondRow()
{
m_Result = result;
m_RowsAffected = rowsAffected;
m_RowCount = rowCount;
m_ColumnCount = columnCount;
m_LastInsertedID = lastInsertedID;
// If we actually need the column length / fields it will be
// requested at that time, no need to pull it in just to cache it.
// Normal usage would have it as nullptr most likely anyways.
m_ColumnLengths = nullptr;
m_Fields = nullptr;
m_Success = true;
if (errorBuffer != nullptr)
m_Success = false;
m_ErrorNumber = errorNumber;
m_ErrorBuffer = errorBuffer;
}
void MySQLRequestResult::FreeInternals()
{
safe_delete_array(m_ErrorBuffer);
if (m_Result != nullptr)
mysql_free_result(m_Result);
ZeroOut();
}
void MySQLRequestResult::ZeroOut()
{
m_Success = false;
m_Result = nullptr;
m_ErrorBuffer = nullptr;
m_ColumnLengths = nullptr;
m_Fields = nullptr;
m_RowCount = 0;
m_RowsAffected = 0;
m_LastInsertedID = 0;
}
MySQLRequestResult::~MySQLRequestResult()
{
FreeInternals();
}
uint32 MySQLRequestResult::LengthOfColumn(int columnIndex)
{
if (m_ColumnLengths == nullptr && m_Result != nullptr)
m_ColumnLengths = mysql_fetch_lengths(m_Result);
// If someone screws up and tries to get the length of a
// column when no result occured (check Success! argh!)
// then we always return 0. Also applies if mysql screws
// up and can't get the column lengths for whatever reason.
if (m_ColumnLengths == nullptr)
return 0;
// Want to index check to be sure we don't read passed
// the end of the array. Just default to 0 in that case.
// We *shouldn't* need this or the previous checks if all
// interface code is correctly written.
if (columnIndex >= m_ColumnCount)
return 0;
return m_ColumnLengths[columnIndex];
}
const std::string MySQLRequestResult::FieldName(int columnIndex)
{
if (columnIndex >= m_ColumnCount || m_Result == nullptr)
return std::string();
if (m_Fields == nullptr)
m_Fields = mysql_fetch_fields(m_Result);
return std::string(m_Fields[columnIndex].name);
}
MySQLRequestResult::MySQLRequestResult(MySQLRequestResult&& moveItem)
: m_CurrentRow(moveItem.m_CurrentRow), m_OneBeyondRow()
{
m_Result = moveItem.m_Result;
m_ErrorBuffer = moveItem.m_ErrorBuffer;
m_Success = moveItem.m_Success;
m_RowCount = moveItem.m_RowCount;
m_RowsAffected = moveItem.m_RowsAffected;
m_LastInsertedID = moveItem.m_LastInsertedID;
m_ColumnLengths = moveItem.m_ColumnLengths;
m_ColumnCount = moveItem.m_ColumnCount;
m_Fields = moveItem.m_Fields;
// Keeps deconstructor from double freeing
// pre move instance.
moveItem.ZeroOut();
}
MySQLRequestResult& MySQLRequestResult::operator=(MySQLRequestResult&& other)
{
// Assigning something to itself?
// Silly! (but happens)
if (this == &other)
return *this;
FreeInternals();
m_Success = other.m_Success;
m_Result = other.m_Result;
m_ErrorBuffer = other.m_ErrorBuffer;
m_RowCount = other.m_RowCount;
m_RowsAffected = other.m_RowsAffected;
m_LastInsertedID = other.m_LastInsertedID;
m_CurrentRow = other.m_CurrentRow;
m_OneBeyondRow = other.m_OneBeyondRow;
m_ColumnLengths = other.m_ColumnLengths;
m_ColumnCount = other.m_ColumnCount;
m_Fields = other.m_Fields;
// Keeps deconstructor from double freeing
// pre move instance.
other.ZeroOut();
return *this;
}
+63
View File
@@ -0,0 +1,63 @@
#ifndef MYSQL_REQUEST_RESULT_H
#define MYSQL_REQUEST_RESULT_H
#ifdef _WINDOWS
#include <winsock.h>
#include <windows.h>
#endif
#include <mysql.h>
#include "types.h"
#include "mysql_request_row.h"
#include <string>
#include <string.h>
#include <limits.h>
class MySQLRequestResult {
private:
MYSQL_RES* m_Result;
MYSQL_FIELD* m_Fields;
char* m_ErrorBuffer;
unsigned long* m_ColumnLengths;
MySQLRequestRow m_CurrentRow;
MySQLRequestRow m_OneBeyondRow;
bool m_Success;
uint32 m_RowsAffected;
uint32 m_RowCount;
uint32 m_ColumnCount;
uint32 m_LastInsertedID;
uint32 m_ErrorNumber;
public:
MySQLRequestResult(MYSQL_RES* result, uint32 rowsAffected = 0, uint32 rowCount = 0, uint32 columnCount = 0, uint32 lastInsertedID = 0, uint32 errorNumber = 0, char *errorBuffer = nullptr);
MySQLRequestResult();
MySQLRequestResult(MySQLRequestResult&& moveItem);
~MySQLRequestResult();
MySQLRequestResult& operator=(MySQLRequestResult&& other);
bool Success() const { return m_Success;}
std::string ErrorMessage() const {return m_ErrorBuffer ? std::string(m_ErrorBuffer) : std::string("");}
uint32 ErrorNumber() const {return m_ErrorNumber;}
uint32 RowsAffected() const {return m_RowsAffected;}
uint32 RowCount() const {return m_RowCount;}
uint32 ColumnCount() const {return m_ColumnCount;}
uint32 LastInsertedID() const {return m_LastInsertedID;}
// default to 0 index since we mostly use it that way anyways.
uint32 LengthOfColumn(int columnIndex = 0);
const std::string FieldName(int columnIndex);
MySQLRequestRow& begin() { return m_CurrentRow; }
MySQLRequestRow& end() { return m_OneBeyondRow;}
private:
void FreeInternals();
void ZeroOut();
};
#endif
+68
View File
@@ -0,0 +1,68 @@
#include "mysql_request_row.h"
MySQLRequestRow::MySQLRequestRow(const MySQLRequestRow& row)
: m_Result(row.m_Result), m_MySQLRow(row.m_MySQLRow)
{
}
MySQLRequestRow::MySQLRequestRow()
: m_Result(nullptr), m_MySQLRow(nullptr)
{
}
MySQLRequestRow::MySQLRequestRow(MySQLRequestRow&& moveItem)
{
m_Result = moveItem.m_Result;
m_MySQLRow = moveItem.m_MySQLRow;
moveItem.m_Result = nullptr;
moveItem.m_MySQLRow = nullptr;
}
MySQLRequestRow& MySQLRequestRow::operator=(MySQLRequestRow& moveItem)
{
m_Result = moveItem.m_Result;
m_MySQLRow = moveItem.m_MySQLRow;
moveItem.m_Result = nullptr;
moveItem.m_MySQLRow = nullptr;
return *this;
}
MySQLRequestRow::MySQLRequestRow(MYSQL_RES *result)
: m_Result(result)
{
if (result != nullptr)
m_MySQLRow = mysql_fetch_row(result);
else
m_MySQLRow = nullptr;
}
MySQLRequestRow& MySQLRequestRow::operator++()
{
m_MySQLRow = mysql_fetch_row(m_Result);
return *this;
}
MySQLRequestRow MySQLRequestRow::operator++(int)
{
MySQLRequestRow tmp(*this);
operator++();
return tmp;
}
bool MySQLRequestRow::operator==(const MySQLRequestRow& rhs)
{
return m_MySQLRow == rhs.m_MySQLRow;
}
bool MySQLRequestRow::operator!=(const MySQLRequestRow& rhs)
{
return m_MySQLRow != rhs.m_MySQLRow;
}
char* MySQLRequestRow::operator[](int index)
{
return m_MySQLRow[index];
}
+38
View File
@@ -0,0 +1,38 @@
#ifndef MYSQL_REQUEST_ROW_H
#define MYSQL_REQUEST_ROW_H
#ifdef _WINDOWS
#include <winsock.h>
#include <windows.h>
#endif
#include <mysql.h>
#include <iterator>
#include "types.h"
class MySQLRequestRow : public std::iterator<std::input_iterator_tag, MYSQL_ROW>
{
private:
MYSQL_RES* m_Result;
MYSQL_ROW m_MySQLRow;
public:
MySQLRequestRow();
MySQLRequestRow(MYSQL_RES *result);
MySQLRequestRow(const MySQLRequestRow& row);
MySQLRequestRow(MySQLRequestRow&& moveItem);
MySQLRequestRow& operator=(MySQLRequestRow& moveItem);
MySQLRequestRow& operator++();
MySQLRequestRow operator++(int);
bool operator==(const MySQLRequestRow& rhs);
bool operator!=(const MySQLRequestRow& rhs);
char* operator[](int index);
};
#endif
+2 -1
View File
@@ -305,7 +305,8 @@ OUTz(OP_FinishWindow2);
//OUTv(OP_AdventureInfo, strlen(p)+1);
//OUTv(OP_AdventureMerchantResponse, strlen(msg)+2);
OUTv(OP_ItemPacket, ItemPacket_Struct);
OUTv(OP_BuffFadeMsg, BuffFadeMsg_Struct);
OUTv(OP_ColoredText, ColoredText_Struct);
OUTv(OP_ItemRecastDelay, ItemRecastDelay_Struct);
OUTv(OP_FormattedMessage, FormattedMessage_Struct);
OUTv(OP_GuildMemberList, uint32); //variable length, but nasty
OUTv(OP_InterruptCast, InterruptCast_Struct);
+1 -1
View File
@@ -160,7 +160,7 @@ void load_opcode_names()
opcode_map[0x0192]="LiveOP_YellForHelp";
opcode_map[0x00ef]="LiveOP_SafePoint";
opcode_map[0x0157]="LiveOP_Buff";
opcode_map[0x00c0]="LiveOP_BuffFadeMsg";
opcode_map[0x00c0]="LiveOP_ColoredText";
opcode_map[0x0440]="LiveOP_MultiLineMsg";
opcode_map[0x021c]="LiveOP_SpecialMesg";
opcode_map[0x0013]="LiveOP_Consent";
+1 -1
View File
@@ -20,7 +20,7 @@
#define OPCODE_MANAGER_H
#include "types.h"
#include "Mutex.h"
#include "mutex.h"
#include "emu_opcodes.h"
#include <map>
+1 -1
View File
@@ -21,7 +21,7 @@
#include <stdio.h>
#include "packet_dump.h"
#include "EQPacket.h"
#include "eq_packet.h"
#include "../common/servertalk.h"
void DumpPacketAscii(const uchar* buf, uint32 size, uint32 cols, uint32 skip) {
+1 -1
View File
@@ -35,7 +35,7 @@
#include <stdarg.h>
#endif
#include "EQStream.h"
#include "eq_stream.h"
#include "packet_dump_file.h"
void FileDumpPacketAscii(const char* filename, const uchar* buf, uint32 size, uint32 cols, uint32 skip) {
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,8 +1,8 @@
#ifndef CLIENT62_H_
#define CLIENT62_H_
#include "../StructStrategy.h"
#include "../Item.h"
#include "../struct_strategy.h"
#include "../item.h"
class EQStreamIdentifier;
@@ -27,8 +27,8 @@ namespace Client62 {
virtual const EQClientVersion ClientVersion() const;
//magic macro to declare our opcode processors
#include "SSDeclare.h"
#include "Client62_ops.h"
#include "ss_declare.h"
#include "client62_ops.h"
};
+218
View File
@@ -0,0 +1,218 @@
/*
EQEMu: Everquest Server Emulator
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef CLIENT62_CONSTANTS_H_
#define CLIENT62_CONSTANTS_H_
#include "../types.h"
namespace Client62 {
namespace maps {
typedef enum : int16 {
// this needs work to match actual client equivilents
MapPossessions = 0,
MapBank,
MapSharedBank,
MapTrade,
MapWorld,
MapLimbo,
MapTribute,
MapTrophyTribute,
MapGuildTribute,
MapMerchant,
MapDeleted,
MapCorpse,
MapBazaar,
MapInspect,
MapRealEstate,
MapViewMODPC,
MapViewMODBank,
MapViewMODSharedBank,
MapViewMODLimbo,
MapAltStorage,
MapArchived,
MapMail,
MapGuildTrophyTribute,
MapOther,
_MapCount
} InventoryMaps;
}
namespace slots {
typedef enum : int16 {
MainCharm = 0,
MainEar1,
MainHead,
MainFace,
MainEar2,
MainNeck,
MainShoulders,
MainArms,
MainBack,
MainWrist1,
MainWrist2,
MainRange,
MainHands,
MainPrimary,
MainSecondary,
MainFinger1,
MainFinger2,
MainChest,
MainLegs,
MainFeet,
MainWaist,
MainAmmo,
MainGeneral1,
MainGeneral2,
MainGeneral3,
MainGeneral4,
MainGeneral5,
MainGeneral6,
MainGeneral7,
MainGeneral8,
MainCursor,
_MainCount,
_MainEquipmentBegin = MainCharm,
_MainEquipmentEnd = MainAmmo,
_MainEquipmentCount = (_MainEquipmentEnd - _MainEquipmentBegin + 1),
_MainGeneralBegin = MainGeneral1,
_MainGeneralEnd = MainGeneral8,
_MainGeneralCount = (_MainGeneralEnd - _MainGeneralBegin + 1)
} EquipmentSlots;
}
namespace consts {
static const uint16 MAP_POSSESSIONS_SIZE = slots::_MainCount;
static const uint16 MAP_BANK_SIZE = 16;
static const uint16 MAP_SHARED_BANK_SIZE = 2;
static const uint16 MAP_TRADE_SIZE = 8;
static const uint16 MAP_WORLD_SIZE = 10;
static const uint16 MAP_LIMBO_SIZE = 36;
static const uint16 MAP_TRIBUTE_SIZE = 5; // 5 until verified otherwise
static const uint16 MAP_TROPHY_TRIBUTE_SIZE = 0;
static const uint16 MAP_GUILD_TRIBUTE_SIZE = 0;
static const uint16 MAP_MERCHANT_SIZE = 0;
static const uint16 MAP_DELETED_SIZE = 0;
static const uint16 MAP_CORPSE_SIZE = slots::_MainCount;
static const uint16 MAP_BAZAAR_SIZE = 80;
static const uint16 MAP_INSPECT_SIZE = slots::_MainEquipmentCount;
static const uint16 MAP_REAL_ESTATE_SIZE = 0;
static const uint16 MAP_VIEW_MOD_PC_SIZE = MAP_POSSESSIONS_SIZE;
static const uint16 MAP_VIEW_MOD_BANK_SIZE = MAP_BANK_SIZE;
static const uint16 MAP_VIEW_MOD_SHARED_BANK_SIZE = MAP_SHARED_BANK_SIZE;
static const uint16 MAP_VIEW_MOD_LIMBO_SIZE = MAP_LIMBO_SIZE;
static const uint16 MAP_ALT_STORAGE_SIZE = 0;
static const uint16 MAP_ARCHIVED_SIZE = 0;
static const uint16 MAP_MAIL_SIZE = 0;
static const uint16 MAP_GUILD_TROPHY_TRIBUTE_SIZE = 0;
static const uint16 MAP_KRONO_SIZE = NOT_USED;
static const uint16 MAP_OTHER_SIZE = 0;
static const int16 EQUIPMENT_BEGIN = slots::MainCharm;
static const int16 EQUIPMENT_END = slots::MainAmmo;
static const uint16 EQUIPMENT_SIZE = slots::_MainEquipmentCount;
static const int16 GENERAL_BEGIN = slots::MainGeneral1;
static const int16 GENERAL_END = slots::MainGeneral8;
static const uint16 GENERAL_SIZE = slots::_MainGeneralCount;
static const int16 GENERAL_BAGS_BEGIN = 251;
static const int16 GENERAL_BAGS_END_OFFSET = 79;
static const int16 GENERAL_BAGS_END = GENERAL_BAGS_BEGIN + GENERAL_BAGS_END_OFFSET;
static const int16 CURSOR = slots::MainCursor;
static const int16 CURSOR_BAG_BEGIN = 331;
static const int16 CURSOR_BAG_END_OFFSET = 9;
static const int16 CURSOR_BAG_END = CURSOR_BAG_BEGIN + CURSOR_BAG_END_OFFSET;
static const int16 BANK_BEGIN = 2000;
static const int16 BANK_END = 2015;
static const int16 BANK_BAGS_BEGIN = 2031;
static const int16 BANK_BAGS_END_OFFSET = 159;
static const int16 BANK_BAGS_END = BANK_BAGS_BEGIN + BANK_BAGS_END_OFFSET;
static const int16 SHARED_BANK_BEGIN = 2500;
static const int16 SHARED_BANK_END = 2501;
static const int16 SHARED_BANK_BAGS_BEGIN = 2531;
static const int16 SHARED_BANK_BAGS_END_OFFSET = 19;
static const int16 SHARED_BANK_BAGS_END = SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_END_OFFSET;
static const int16 TRADE_BEGIN = 3000;
static const int16 TRADE_END = 3007;
static const int16 TRADE_NPC_END = 3003;
static const int16 TRADE_NPC_SIZE = 4;
static const int16 TRADE_BAGS_BEGIN = 3031;
static const int16 TRADE_BAGS_END_OFFSET = 79;
static const int16 TRADE_BAGS_END = TRADE_BAGS_BEGIN + TRADE_BAGS_END_OFFSET;
static const int16 WORLD_BEGIN = 4000;
static const int16 WORLD_END = 4009;
static const int16 TRIBUTE_BEGIN = 400;
static const int16 TRIBUTE_END = 404;
static const int16 CORPSE_BEGIN = slots::MainGeneral1;
static const int16 CORPSE_END = slots::MainGeneral1 + slots::MainCursor;
static const int16 MATERIAL_BEGIN = MaterialHead;
static const int16 MATERIAL_END = MaterialSecondary;
static const int16 MATERIAL_TINT_END = MaterialFeet;
static const int16 MATERIAL_SIZE = _MaterialCount;
static const uint16 ITEM_COMMON_SIZE = 5;
static const uint16 ITEM_CONTAINER_SIZE = 10;
static const uint32 BANDOLIERS_COUNT = 4; // count = number of bandolier instances
static const uint32 BANDOLIER_SIZE = 4; // size = number of equipment slots in bandolier instance
static const uint32 POTION_BELT_SIZE = 4;
}
namespace limits {
static const bool ALLOWS_EMPTY_BAG_IN_BAG = false;
static const bool ALLOWS_CLICK_CAST_FROM_BAG = false;
static const bool COIN_HAS_WEIGHT = true;
}
}; //end namespace Client62
#endif /*CLIENT62_CONSTANTS_H_*/
/*
Client62 Notes:
** Integer-based inventory **
ok Possessions: 0 - 30 (Corpse: 22 - 52 [Offset 22])
ok [Equipment: 0 - 21]
ok [General: 22 - 29]
ok [Cursor: 30]
ok General Bags: 251 - 330
ok Cursor Bags: 331 - 340
ok Bank: 2000 - 2015
ok Bank Bags: 2031 - 2190
ok Shared Bank: 2500 - 2501
ok Shared Bank Bags: 2531 - 2550
Trade: 3000 - 3007
(Trade Bags: 3031 - 3110 -- server values)
World: 4000 - 4009
*/
@@ -1,36 +1,54 @@
//list of packets we need to encode on the way out:
// out-going packets that require an ENCODE translation:
E(OP_Action)
E(OP_AdventureMerchantSell)
E(OP_ApplyPoison)
E(OP_BazaarSearch)
E(OP_BecomeTrader)
E(OP_CharInventory)
E(OP_DeleteCharge)
E(OP_DeleteItem)
E(OP_DeleteSpawn)
E(OP_GuildMemberLevelUpdate)
E(OP_GuildMemberList)
E(OP_Illusion)
E(OP_ItemLinkResponse)
E(OP_ItemPacket)
E(OP_LeadershipExpUpdate)
E(OP_LootItem)
E(OP_MoveItem)
E(OP_NewSpawn)
E(OP_OnLevelMessage)
E(OP_PetBuffWindow)
E(OP_PlayerProfile)
E(OP_ReadBook)
E(OP_RespondAA)
E(OP_SendAATable)
E(OP_SendCharInfo)
E(OP_LeadershipExpUpdate)
E(OP_PlayerProfile)
E(OP_NewSpawn)
E(OP_ZoneSpawns)
E(OP_ZoneEntry)
E(OP_ItemPacket)
E(OP_ItemLinkResponse)
E(OP_CharInventory)
E(OP_GuildMemberList)
E(OP_ZoneServerReady)
E(OP_GuildMemberLevelUpdate)
E(OP_ReadBook)
E(OP_Illusion)
E(OP_ShopPlayerSell)
E(OP_Track)
E(OP_BazaarSearch)
E(OP_RespondAA)
E(OP_DeleteSpawn)
E(OP_TributeItem)
E(OP_WearChange)
E(OP_Action)
E(OP_BecomeTrader)
E(OP_PetBuffWindow)
E(OP_OnLevelMessage)
//list of packets we need to decode on the way in:
D(OP_SetServerFilter)
E(OP_ZoneEntry)
E(OP_ZoneServerReady)
E(OP_ZoneSpawns)
// incoming packets that require a DECODE translation:
D(OP_AdventureMerchantSell)
D(OP_ApplyPoison)
D(OP_AugmentItem)
D(OP_CastSpell)
D(OP_CharacterCreate)
D(OP_ItemLinkClick)
D(OP_WhoAllRequest)
D(OP_ReadBook)
D(OP_Consume)
D(OP_DeleteItem)
D(OP_FaceChange)
D(OP_ItemLinkClick)
D(OP_LootItem)
D(OP_MoveItem)
D(OP_ReadBook)
D(OP_SetServerFilter)
D(OP_ShopPlayerSell)
D(OP_TradeSkillCombine)
D(OP_TributeItem)
D(OP_WearChange)
D(OP_WhoAllRequest)
#undef E
#undef D

Some files were not shown because too many files have changed in this diff Show More