Compare commits

...

703 Commits

Author SHA1 Message Date
Uleat b224142b2a Inventory V2 - Added ItemSlot Structures 2014-12-05 19:35:30 -05:00
Uleat 60563aead6 Added MapKrono entry to RoF2::InventoryMaps enumeration 2014-12-05 19:33:25 -05:00
Michael Cook (mackal) a201a3e837 Added Shroud ops for UF 2014-12-05 16:26:55 -05:00
Michael Cook (mackal) 2d070ff1c0 OP_Untargetable for SoF 2014-12-05 15:59:03 -05:00
Michael Cook (mackal) 4e257d43b2 OP_CrystalCreate and OP_CrystalReclaim for SoF 2014-12-05 14:40:41 -05:00
Michael Cook (mackal) 7cb1a2e7e4 OP_DzChooseZone for RoF and UF 2014-12-05 14:29:54 -05:00
Michael Cook (mackal) e2bc79401b OP_ShroudClearAA for RoF, UF, and SoF
This should actually be usable to just straight clear AA data
2014-12-05 14:13:05 -05:00
Michael Cook (mackal) 26589835e5 OP_PVPStats for Underfoot 2014-12-05 14:00:51 -05:00
Michael Cook (mackal) e65bf63e51 Fix OP_GMEmoteWorld for SoD 2014-12-05 13:56:20 -05:00
Michael Cook (mackal) f6bddb9502 OP_IncreaseStats for SoF 2014-12-05 13:23:37 -05:00
KayenEQ d071bd2e7c Merge pull request #312 from KayenEQ/Development
Range attack functions clean up, prevent possible nullptr checks.
2014-12-05 04:11:15 -05:00
KayenEQ 921433f998 Range attack clean up, prevent possible nullptr checks. 2014-12-05 03:47:41 -05:00
Michael Cook (mackal) 48be7c508d OP_PlayMP3 for SoF 2014-12-05 02:48:54 -05:00
Trevius f1260a598d Merge branch 'master' of https://github.com/EQEmu/Server 2014-12-04 23:07:23 -06:00
Trevius 36c945a77c Updated a large number of RoF2 opcodes. 2014-12-04 23:06:43 -06:00
Michael Cook (mackal) 0a8f3554e9 Merge branch 'master' into random 2014-12-04 13:07:32 -05:00
Trevius af42af7869 Initial addition of the RoF2 client from May 10th 2013 (currently available on Steam as the F2P client).
RoF2 is disabled by default, but you can enable by editing /common/patches/patches.cpp (see comments)
2014-12-04 02:13:01 -06:00
KayenEQ 65dcfd55a7 Merge pull request #309 from KayenEQ/Development
Max Range attack calculation fix.
2014-12-04 02:58:28 -05:00
KayenEQ 052b41fbb2 Ranged attacks will now much more accurately calculate max distance server side
via accounting for differences in attacker/target size. This
fixes a very common issue of player hitting range attack and
nothing happening due to server improperly calculating
max range.
2014-12-04 02:40:51 -05:00
Michael Cook (mackal) 5998cf8a3c Merge branch 'master' into random 2014-12-03 17:04:58 -05:00
Michael Cook (mackal) fc282f86c0 Rework raid invite handling, shouldn't break rsay being invited to raid anymore 2014-12-03 17:04:26 -05:00
Michael Cook (mackal) 804421095a Fix DB manifest 2014-12-03 16:55:43 -05:00
Michael Cook (mackal) bc53ca3b71 Merge branch 'master' into random 2014-12-03 16:13:39 -05:00
Akkadius ff5eb54331 Merge pull request #307 from KayenEQ/Development
Projectile code fix.
2014-12-03 11:53:53 -06:00
Michael Cook (mackal) 23698c1373 Merge branch 'master' into random 2014-12-02 14:39:00 -05:00
Trevius 0a0260b75b Merge branch 'master' of https://github.com/EQEmu/Server 2014-12-02 13:13:50 -06:00
Michael Cook (mackal) 9636ef3499 Update to new random functions 2014-12-02 14:09:14 -05:00
Michael Cook (mackal) dc0eb0f6b5 Merge branch 'master' into random
Conflicts:
	zone/command.cpp
	zone/merc.cpp
2014-12-02 14:05:55 -05:00
Michael Cook (mackal) 525eb518f6 Crash fix, this check got removed accidentally 2014-12-02 13:44:23 -05:00
KayenEQ 70dd447156 Fix for error introduced in projectile update for throwing/archery
to do hit chance check 2x resulting in much greater chance to miss.
2014-12-02 03:42:35 -05:00
Trevius 52eb4d2d4e Fixed Mercenary Depop Crash in Windows. 2014-12-02 00:07:09 -06:00
Trevius 24ea7a0d45 Mercenaries now spawn as the same Gender and Size of the Merchant they are purchased from.
Mercenaries now spawn with randomized facial features when purchased.
Setting a lastname for NPCs will now override any hard coded lastname (such as GM Trainers).
2014-12-01 19:54:01 -06:00
Michael Cook (mackal) faaebc2806 Merge branch 'master' into random 2014-12-01 19:51:02 -05:00
Michael Cook (mackal) 6f867ebca3 Add license info 2014-12-01 19:50:05 -05:00
Michael Cook (mackal) cbadd8bde1 Merge pull request #306 from addtheice/warning_removal
Lua, perl, boost, zlib, mysql, and glm include files are now being inclu...
2014-12-01 19:48:50 -05:00
Michael Cook (mackal) 395be050a3 Switch random function to std::mt19937
Added class EQEmu::Random
Functions:
EQEmu::Random::Int(int low, int high)
EQEmu::Random::Real(double low, double high)
EQEmu::Random::Roll(int required)
EQEmu::Random::Roll(double required)
EQEmu::Random::Reseed()

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

Int returns a random int between low and high
Real returns a random double between low and high
Roll(int) returns true if Int(0, 99) < required is true
Roll(double) returns true if Real(0.0, 1.0) <= required is true
2014-12-01 18:13:12 -05:00
Michael Cook (mackal) a59cdc2c89 Merge pull request #304 from KayenEQ/Development
Implemented archery projectiles to do damage on impact.
2014-12-01 16:30:26 -05:00
Arthur Ice c98964a9e8 Lua, perl, boost, zlib, mysql, and glm include files are now being included marked as system (library) files. warnings for these libraries are now suppressed 2014-12-01 10:33:57 -08:00
Akkadius 1054bfe476 command.cpp #include cleanup
command.h #include cleanup
command.h forward declarations
2014-11-30 20:32:00 -06:00
Michael Cook (mackal) 7198e670ae Clang bots compile fix 2014-11-30 18:56:01 -05:00
Michael Cook (mackal) 4a7984f04d Fix clang compile error 2014-11-30 18:32:45 -05:00
Akkadius c0b546921e Merge pull request #297 from addtheice/warning_suppress
Warning suppress
2014-11-30 15:54:23 -06:00
Michael Cook (mackal) de84065cde Fix some debug statements 2014-11-30 02:32:11 -05:00
KayenEQ 8dfd61bbcf fix 2014-11-30 01:58:23 -05:00
KayenEQ e04496188b Spell Projectiles have been revamped to use new system. 2014-11-30 01:43:51 -05:00
KayenEQ 705dd4d7df Merge git://github.com/EQEmu/Server into Development 2014-11-30 00:19:49 -05:00
akkadius 0d0917b779 Temporary revert of net.cpp to wave 1 of cleanups 2014-11-29 23:12:09 -06:00
KayenEQ ad2fd9e4d5 update to projectile move check 2014-11-29 21:10:51 -05:00
KayenEQ e8ae28b439 Merge git://github.com/EQEmu/Server into Development 2014-11-29 20:56:13 -05:00
akkadius fde9517247 mob.cpp #include cleanup
mob.h declarations
mob.h #include cleanup
2014-11-29 16:55:35 -06:00
akkadius 4a597a2b38 tradeskills.cpp #include cleanup 2014-11-29 16:48:48 -06:00
akkadius 34b1950820 forage.cpp #include cleanup 2014-11-29 16:46:43 -06:00
akkadius 5562030594 guild.cpp #include cleanup
spell_effects.cpp #include cleanup
2014-11-29 16:43:19 -06:00
akkadius 9821c7da65 zoning.cpp #include cleanup 2014-11-29 16:32:49 -06:00
akkadius c7a79d81ca pets.cpp #include cleanup 2014-11-29 16:28:48 -06:00
akkadius f5ba442ba6 spells.cpp #include cleanup 2014-11-29 15:59:24 -06:00
akkadius 2d052a7a28 mod_functions.cpp #include cleanup 2014-11-29 15:56:51 -06:00
akkadius 3577ff5a81 waypoints.cpp #include cleanup 2014-11-29 15:53:17 -06:00
akkadius 88984a3960 petitions.cpp #include cleanup
petititons.h #include cleanup
2014-11-29 15:44:09 -06:00
akkadius 6d52f3c02a aa.cpp #include cleanup
aa.h #include cleanup
2014-11-29 15:08:16 -06:00
akkadius cb6948b6fd npc.cpp #include cleanup
entity.cpp #include cleanup
2014-11-29 15:02:34 -06:00
akkadius ad603fd213 loottable.cpp #include fix, previously reliant on npc.h to get to loottable.h
npc.cpp #include cleanup
npc.h #include cleanup and forward declaration
2014-11-29 14:39:27 -06:00
akkadius b06fec6ad0 attack.cpp #include cleanup 2014-11-29 14:11:16 -06:00
akkadius 7db731a47d net.cpp #include cleanup
net.cpp forward declaration
2014-11-29 14:07:40 -06:00
akkadius 35e9c3ad98 special_attacks.cpp #include clean 2014-11-29 05:22:27 -06:00
akkadius 904ae416c5 Small world server cleanup 2014-11-29 05:01:49 -06:00
akkadius 4faca5543a net.h cleanup 2014-11-29 04:56:42 -06:00
akkadius 5d5c3fbfd1 database.h forward declaration
database.cpp #include house-keeping
2014-11-29 04:30:03 -06:00
akkadius 251e940fe8 zonedb.h forward declarations
zonedb.cpp #include cleanup
2014-11-29 04:18:18 -06:00
akkadius e833f457a1 inventory.cpp #include clean/remove 2014-11-29 04:08:37 -06:00
akkadius 6d763256f1 client_mods.cpp cleanup 2014-11-29 04:04:49 -06:00
akkadius 8da864bada command.cpp #include cleanup
command.h forward declaration
2014-11-29 03:54:25 -06:00
akkadius 82e96d7014 client_packet.cpp #include cleanup 2014-11-29 03:48:26 -06:00
akkadius 700de3f518 questmgr.h forward declarations
client_process.cpp #include removals
2014-11-29 03:24:48 -06:00
akkadius ad9c0df552 #include and forward declaration cleanup of
client.cpp net.cpp questmgr.cpp zone.cpp zone.h
2014-11-29 03:12:34 -06:00
KayenEQ ca3b5a3221 Merge git://github.com/EQEmu/Server into Development
Conflicts:
	changelog.txt
2014-11-29 03:22:11 -05:00
Trevius 8cd19670ab Minor improvement to last commit. 2014-11-28 20:30:35 -06:00
Trevius 84fa042c75 Fixed a zone crash related to numhits for spells.
Fixed a query related to group leaders logging in.
Fixed a world crash related to attempting to join an adventure with Mercenaries.
2014-11-28 20:23:42 -06:00
KayenEQ 3d83f647bf Implemented projectile on impact for Throwing 2014-11-28 07:08:28 -05:00
KayenEQ 67863e364b fix 2014-11-28 05:46:23 -05:00
KayenEQ ac0933719a Sanity check added before calculating distance. 2014-11-28 05:42:36 -05:00
Michael Cook (mackal) b7c19e4034 Fix model_name in RoF Arrow_Struct 2014-11-28 02:19:45 -05:00
KayenEQ 94a0cb3522 Merge git://github.com/EQEmu/Server into Development 2014-11-28 01:07:55 -05:00
KayenEQ 28ad768c0a fixes 2014-11-28 01:05:57 -05:00
akkadius baa7a1feb9 Disabling file check for db_updater.pl temporarily to force update the update script for users. Will leave it this way for a few weeks and the nre-enable it because the latest one supports automatic update checking 2014-11-27 23:24:32 -06:00
KayenEQ 6b45b2bc52 Fix for better ammo slot sync check. 2014-11-27 23:14:49 -05:00
Michael Cook cf1370b9e2 Spelling matters! 2014-11-27 22:56:40 -05:00
Michael Cook (mackal) 6f67577115 Crash fixes 2014-11-27 22:30:44 -05:00
KayenEQ 191aa575f8 Projectiles (ie Arrows) fired from an archery attacks will do damage upon
actually hitting the target, instead of instantly when fired. Consistent
with live.

Optional SQL added to disable this.

Throwing will be implemented in a future update.
2014-11-27 22:12:13 -05:00
Natedog2012 4e3842b9d8 Detransformation of mold type ornamentations. 2014-11-27 16:14:04 -05:00
Akkadius f0881d4aa9 Self patching db_update script for when new versions come out 2014-11-27 00:03:49 -06:00
Akkadius 521106e286 Renamed back the db_update.pl file 2014-11-27 00:01:26 -06:00
Akkadius 12ea532a7a Renamed db_update.pl to db_updater.pl 2014-11-26 23:50:08 -06:00
Akkadius 98c21635c2 db_update.pl self update routine
Some linux adjustments
2014-11-26 23:45:08 -06:00
Michael Cook (mackal) c465b8c8c3 Merge pull request #303 from af4t/master
Typo?
2014-11-26 21:06:41 -05:00
Uleat cfa05587fc Added versioning for required ornament inventory sql 2014-11-26 21:05:43 -05:00
af4t 56a96dc817 Typo? 2014-11-26 19:55:46 -05:00
Michael Cook (mackal) 32a034bd58 Flipped logic wrong :P 2014-11-26 19:12:04 -05:00
Michael Cook (mackal) 2814130aad Fix for compilers w/o C++11 uniform initialization 2014-11-26 19:04:20 -05:00
Michael Cook (mackal) c5c778f575 Minor bug fixes 2014-11-26 18:29:07 -05:00
Natedog2012 daec5bde66 Item Transformation now works! 2014-11-26 17:23:04 -05:00
Michael Cook (mackal) ee7f88d247 Merge pull request #301 from KayenEQ/Development
Fix for numhits counter being decreased 2x for Outgoing Hit Success from...
2014-11-26 15:27:43 -05:00
Akkadius 5c5cde7fe5 Database::GetGroupLeaderForLogin fix 2014-11-26 00:31:50 -06:00
Akkadius 08e787da59 Replaced atoll with more appropriate macro atoul 2014-11-26 00:24:31 -06:00
Akkadius b43cfa126f Renamed SetPKItem to SetPlayerKillItemID
Renamed AllowMobLoot to AllowPlayerLoot
Renamed DepopCorpse (PC) to DepopPlayerCorpse
Renamed GetPKItem to GetPlayerKillItem
Renamed Corpse class variable 'orgname' to 'corpse_name'
Renamed CompleteRezz to CompleteResurrection
Renamed GetDBID to GetCorpseDBID

Removed CorpseToServerSlot as it is unnecessary
Removed ServerToCorpseSlot as it is unnecessary

Reogrganized corpse.h header
2014-11-25 23:54:59 -06:00
Akkadius fbaae2b1e4 Renamed Corpse::LoadFromDBData to Corpse* Corpse::LoadCharacterCorpseEntity
Corpse Private class descriptors added
General cleanup
2014-11-25 23:17:08 -06:00
Akkadius 0598f7e87c Fixed an issue that has surfaced with new code behaving how it should, breaking old code. Naked corpses were not despawning on their decay timers because of incorrect return logic on a database function
Removed ClearCorpseItems as it is no longer necessary as corpses deleted items appropriately when they are removed from the corpse
General cleanup of functions and variables in corpse code
2014-11-25 22:47:50 -06:00
Trevius b4862dea45 Compile Fix and fix to prevent Mercenaries from being set as Group Leader. 2014-11-25 02:54:02 -06:00
Trevius 09e13d0034 Spells that modify model size are now limited to 2 size adjustments from the base size. 2014-11-25 02:22:58 -06:00
Trevius bee04c1b53 Merge branch 'master' of https://github.com/EQEmu/Server 2014-11-24 02:36:13 -06:00
Trevius 2fbe6b304c Added Rule NPC:EnableMeritBasedFaction (disabled by default) - Allows faction gain to work similar to experience. 2014-11-24 02:32:33 -06:00
Akkadius 02e82f1cfc Fix for bot build 2014-11-24 02:06:51 -06:00
Akkadius a2bef4d999 Merge branch 'master' of https://github.com/EQEmu/Server 2014-11-24 02:02:31 -06:00
Akkadius 50a69a8e20 Finish of automatic corpse convert routine 2014-11-24 01:53:21 -06:00
Akkadius a5207b58e1 Added namespace Convert:: to contain all of the player profile and corpse related structs so that when any of the structs change else where in the code, it does not break the conversion scripts. These are self contained structs just for the conversion scripts. 2014-11-24 01:12:12 -06:00
Akkadius 3c2b8d13b9 Restructure and refactoring of database convert/upgrade check routine, breaking out to individual functions 2014-11-23 23:46:06 -06:00
Trevius 2f1191b263 Fixing my Swarm Pet "fix". 2014-11-23 23:17:57 -06:00
Akkadius e4f45d7b35 Removed DBCore::RunQuery
Converted last corpse.cpp function that mixed database code with corpse code
2014-11-23 22:57:46 -06:00
KayenEQ f4d024fd47 Swarm pets will no longer assist owners if special ability '34' IMMUNE_AGGRO
is set.
2014-11-23 23:44:14 -05:00
Akkadius c30850f00a Rest of ZoneDB Corpse functions converted to new API 2014-11-23 22:33:57 -06:00
Akkadius ce248d83d6 Corpse Class Private scope variables renamed for understandability across the source
Removed ThrowDBError from the source
Implemented MySQL query error log at the root of the MySQL API
Readability changes
2014-11-23 21:37:42 -06:00
KayenEQ 3ca282abfa Fix for numhits counter not working where buffslot was 0 in some situations. 2014-11-23 22:06:15 -05:00
KayenEQ 5c0fbac7b0 Removal of 2x numhits outgoing hit success call from special attack. 2014-11-23 21:41:05 -05:00
KayenEQ ce4c6b0c8a string 2014-11-23 20:52:24 -05:00
Akkadius 6b67c3736b Increased Max charge or stack count on corpses to uint16 (Beyond 1k)
Fixed the deletion of items so that they occur immediately when removed from corpse instead of clicking 'Done'
Fixed loading of item tints and other fields since atoi caps at 2147483647
2014-11-23 19:51:01 -06:00
KayenEQ 3266ed98e6 Fix for target type 39 GroupNoPets.
Should no longer take hold on a pet if your targeting it when
casting spell.
2014-11-23 20:48:07 -05:00
KayenEQ 5970b0ee41 Fix for numhits counter being decreased 2x for Outgoing Hit Success from client melee attacks. 2014-11-23 20:19:54 -05:00
Akkadius 3b51aebb51 More load and delete changes for corpses 2014-11-23 17:49:56 -06:00
Akkadius 12ceac4c02 Corpses properly loading now 2014-11-23 15:55:38 -06:00
Akkadius 7fa1256c5d ... 2014-11-23 01:04:50 -06:00
Akkadius f328853251 More restructures, non-working state 2014-11-22 23:28:20 -06:00
Akkadius d1b0564698 Changing corpse loading structure 2014-11-22 18:43:23 -06:00
Akkadius 111fb84041 Moved zonedatabase functions out of corpse.cpp
Conversion portion mostly complete
Some header readability cleanup
Some function renaming
Struct renaming
Many variable renaming
MySQL error log for all of QueryDatabase
Corpse table renaming
Corpse table field renaming
Most corpse database functions redone
2014-11-22 17:55:48 -06:00
Trevius 79a70271d5 Crash fix for Swarm Pets. 2014-11-22 12:53:49 -06:00
KimLS 1ca397f426 Lua parser: script_init.lua for zones will now follow script_init_v[0-9]+\.lua similar to player quests. 2014-11-22 03:20:39 -08:00
Trevius d49426f763 Merge branch 'master' of https://github.com/EQEmu/Server 2014-11-22 00:27:40 -06:00
Trevius c5a90adb39 Grouping with Mercenaries is considerably less buggy. 2014-11-22 00:22:12 -06:00
Michael Cook (mackal) 3573686976 Fix issue with PendingTranslocateData 2014-11-21 22:50:08 -05:00
Michael Cook (mackal) cab071b544 Merge pull request #299 from KayenEQ/Development
Fix to remove double CastSpell call from use disc function.
2014-11-21 16:51:14 -05:00
KayenEQ f1701aae9f Fix to remove double CastSpell calls from use disc function. 2014-11-20 05:53:59 -05:00
KayenEQ 96a0cc37e0 Merge git://github.com/EQEmu/Server into Development 2014-11-20 05:05:29 -05:00
KayenEQ 2330285b04 revert 2014-11-20 05:05:15 -05:00
Michael Cook (mackal) ac463fe9aa Fix RoF Raid opcodes 2014-11-20 01:10:24 -05:00
Arthur Ice fdd78e41da warning from library file SocketLib\Mime.cpp disabled 2014-11-19 21:22:37 -08:00
Arthur Ice 4ad8500a3e luabind now compiles with warnings disabled for this library 2014-11-19 21:01:57 -08:00
Trevius b5c6b47639 Minor Merc Correction. 2014-11-19 22:52:49 -06:00
Trevius 62e22d1aea Mercenaries now Dismiss, Suspend, Unsuspend, and Die correctly. 2014-11-19 22:46:15 -06:00
Trevius 1973a065c5 Merge branch 'master' of https://github.com/EQEmu/Server 2014-11-19 22:43:55 -06:00
Trevius 6c5248b9a9 Mercenaries now Dismiss, Suspend, Unsuspend, and Die correctly. 2014-11-19 22:43:19 -06:00
Michael Cook (mackal) 1ed9c3082c Add see invis check to tracking packet 2014-11-19 15:00:09 -05:00
Michael Cook (mackal) 37936b63c4 Merge pull request #295 from Leere/getrecipefix
Fix for GetTradeRecipe results variable overload instead of reuse
2014-11-19 14:26:04 -05:00
Akkadius 4a83b4acb9 PEQ AA Download option 4 implemented - http://i.imgur.com/OBrIOCM.png 2014-11-19 02:40:33 -06:00
Leere e7681f1b49 Fix for GetTradeRecipe results variable overload instead of reuse 2014-11-19 09:40:08 +01:00
Akkadius 4f38dba334 Upload of peq_aa_tables.sql for db management interface 2014-11-19 02:30:59 -06:00
Akkadius 67a9779d5b Slight fixes to upgrade logic - If you ran updates manually yourself, and you don't have a local version that matches the binary version yet. It will go through and get you up to date.
Manifest changes - Removed AA 'Required' updates. We will soon have an option to pull them down from PEQ in the prompt menu
2014-11-19 02:16:48 -06:00
KayenEQ 5b85aa6550 Fix to allow discipline reuse timers to be set on client correclty
and therefore have the client return the time remaining instead
of the server.

Hopefully may resolve some bugs reselated to discipline use.
2014-11-19 00:39:42 -05:00
KayenEQ 6a5b3ef4fe Merge git://github.com/EQEmu/Server into Development 2014-11-19 00:19:57 -05:00
KimLS 9570412991 Added special ability functions to perl, removed some of the less used commands (and a few duplicates) 2014-11-18 21:17:03 -08:00
KimLS c506e33018 Fixed merge 2014-11-18 21:12:48 -08:00
Trevius 8f32a9949b Fixed bad formatting of client.h and merc.h caused by my last commit. 2014-11-18 17:32:59 -06:00
Michael Cook (mackal) d7e05de556 Merge pull request #292 from KayenEQ/Development
Updated swarm pet AI to be consistent with live.
2014-11-18 15:04:08 -05:00
KayenEQ 1e13d43b71 Merge git://github.com/EQEmu/Server into Development 2014-11-18 04:46:14 -05:00
Trevius a6b9e6cb3c Trevius: Mercenaries can now zone once again. 2014-11-18 01:02:11 -06:00
Michael Cook (mackal) 0b44f58518 Correct OP_AugmentInfo reply
This fixes the display issue for RoF
SoF/SoD/UF still won't show the charm info on Adventurer's Stone,
probably a client bug.
2014-11-17 16:41:37 -05:00
Akkadius c749155ad2 Fix for invalid input error when script is ran from world during bootup. 2014-11-16 21:37:47 -06:00
Akkadius 9d6248886c Turn off potential warning garbage for different versions of perl 2014-11-16 21:22:09 -06:00
Akkadius de16db5a2f db_update.pl DB upgrade script - Linux Fixes 2014-11-16 21:00:19 -06:00
Akkadius 251d4fa3e3 Implemented Automatic Database update and versioning system
Created database revision define, this is located in version.h in common #define CURRENT_BINARY_DATABASE_VERSION 9057
	- This revision define will need to be incremented each time a database update is made
	- Along with a revision define increment, you will need to update the db_update manifest located in:
		- https://raw.githubusercontent.com/EQEmu/Server/master/utils/sql/db_update_manifest.txt
		- An entry needs to be made at the bottom of the manifest, the entry is quite simple
		- Example: 9057|2014_11_13_spells_new_updates.sql|SHOW COLUMNS FROM `spells_new` LIKE 'disallow_sit'|empty|
			- This latest example is checking to see if the spells_new table contains the column 'disallow_sit', if its empty, the update needs to be ran
				- More examples of match types below:
		# Example: Version|Filename.sql|Query_to_Check_Condition_For_Needed_Update|match type|text to match
		#	0 = Database Version
		#	1 = Filename.sql
		#	2 = Query_to_Check_Condition_For_Needed_Update
		#	3 = Match Type - If condition from match type to Value 4 is true, update will flag for needing to be ran
		#		contains = If query results contains text from 4th value
		#		match = If query results matches text from 4th value
		#		missing = If query result is missing text from 4th value
		#		empty = If the query results in no results
		#		not_empty = If the query is not empty
		#	4 = Text to match
	- The manifest contains all database updates 'Required' to be made to the schema, and it will contain a working backport all the way back to SVN -
		currently it is tested and backported through the beginning of our Github repo
	- On world bootup or standalone run of db_update.pl, users will be prompted with a simple menu that we will expand upon later:

		============================================================
			   EQEmu: Automatic Database Upgrade Check
		============================================================
				Operating System is: MSWin32
				(Windows) MySQL is in system path
				Path = C:\Program Files\MariaDB 10.0\bin/mysql
		============================================================
				Binary Database Version: (9057)
				Local Database Version: (9057)

				Database up to Date: Continuing World Bootup...
		============================================================
		Retrieving latest database manifest...
        URL:    https://raw.githubusercontent.com/EQEmu/Server/master/utils/sql/db_update_manifest.txt
        Saved:  db_update/db_update_manifest.txt

Database Management Menu (Please Select):
        1) Backup Database - (Saves to Backups folder)
                Ideal to perform before performing updates
        2) Backup Database Compressed - (Saves to Backups folder)
                Ideal to perform before performing updates
        3) Check for pending Database updates
                Stages updates for automatic upgrade...
        0) Exit

Created db_update.pl, placed in utils/scripts folder, used for the automatic database update routine (Linux/Windows)
	- db_update.pl script created db_version table if not created, if old one is present it will remove it
Created db_dumper.pl, placed in utils/scripts folder, used for the automatic database update routine backups and standalone backups (Linux/Windows)
World will now check the db_update.pl script on bootup, if the db_update.pl script is not present, it will fetch it remotely before running -
	when db_update.pl is done running, world will continue with bootup
world.exe db_version - will report database binary version
2014-11-16 19:26:59 -06:00
Akkadius 9324bdf107 db_update.pl update 2014-11-16 19:04:33 -06:00
Akkadius e3e63efd68 SQL Source update fixes for newer DB versions 2014-11-16 18:32:13 -06:00
Akkadius 071367b6a9 db_update.pl update
db_update_manifest.txt update
2014_09_20_ban_messages.sql fix for non PEQ account tables missing expansion column
2014-11-16 18:17:04 -06:00
JJ 2e8d7b09af Temp merchant items could duplicate slots also... 2014-11-16 19:04:15 -05:00
Akkadius eee65b8c22 Special Abilities column fix for older updates and newer database engines for the automatic database updater.
db_update.pl changes
Manifest update
2014-11-16 17:48:50 -06:00
Michael Cook (mackal) e11fa4a278 Fix issue with ControlBoat_Struct and OP_BoardBoat 2014-11-16 17:42:15 -05:00
KayenEQ 650aa566b0 Fix for perl CastSpell function so it will use a spells innate resist diff
settings if no override value is put in the function.

Due to recent changes in
how we defined that variable it would set it to 0 resist diff by default
when called from perl.
2014-11-16 09:37:26 -05:00
Akkadius bd48efcdd5 db_update.pl changes 2014-11-16 05:31:19 -06:00
Akkadius 9ac79f1071 Manifest changes, initial db_update script upload. Source changes on its way. 2014-11-16 05:09:58 -06:00
KayenEQ fc48a109fd SUB EVENT CAST ON will now be parsed in player.pl
(note: exports $spell_id)
2014-11-16 05:46:46 -05:00
Akkadius 0017951a74 Manifest update, removal of duplicate AA SQL update file 2014-11-16 00:10:09 -06:00
Akkadius 959319f91f Uploading utility script db_dumper.pl - Cross platform database dumper utility that supports compression
############################################################
#::: Script: DB_Dumper.pl
#::: Purpose: Utility to easily manage database backups and compress.
#:::	Export Individual DB Tables...
#:::	Export specific databases...
#::: 	Built for both Windows and Linux
#::: Windows uses WinRar or 7-Zip for compression
#::: Linux uses tar for compression
#::: Author: Akkadius
############################################################
2014-11-15 23:29:37 -06:00
KayenEQ 41cbe5fb01 i hate the change log 2014-11-15 23:42:10 -05:00
KayenEQ 71d72a02a9 Merge git://github.com/EQEmu/Server into Development 2014-11-15 23:41:22 -05:00
KayenEQ 01c580224d Implemented NPC Special Ability 41 'Allow To Tank', gives NPC opportunity to take aggro over a client in melee range. 2014-11-15 23:40:13 -05:00
Uleat 0355af310d Non-buggy fix for OP_ShopPlayerBuy (thanks Natedog!) 2014-11-15 23:16:24 -05:00
KayenEQ 94231b62a3 Updated swarm pet AI to be consistent with live.
*OLD AI: Swarm pet would lock on to target until target died, then depop as soon as target died.

*NEW AI: Swarm pet will attack cast on target, NOT perma locked it can change targets if attacked
by something else that generate more hate. When target dies swarm pet will follow owner, if owner is
attacked by something else the swarm pet will attack it (until duration timer despawns the pet).

Updated perl quest function: MakeTempPet(Tspell_id, name=nullptr, duration=0, target=nullptr, sticktarg=0)
Implemented perl quest function:  Mob::TypesTempPet(npctypesid, name=nullptr, duration=0, follow=0, target=nullptr, sticktarg=0)
Note: 'sticktarg' field will cause the swarm pet to use the OLD AI

Rule to use OLD AI only - default is disabled.
Optional SQL: utils/sql/git/optional/2014_11_15_SwarmPetTargetLock.sql
2014-11-15 23:01:26 -05:00
Akkadius fe364a0798 Initial upload of db_update_manifest.txt 2014-11-15 21:53:33 -06:00
Michael Cook (mackal) 30922afd08 Remove scaling hack for client 62 (untested) 2014-11-15 01:01:57 -05:00
Michael Cook (mackal) 73e398b0f4 Remove scaling hack for SoD 2014-11-15 01:00:38 -05:00
Michael Cook (mackal) 10ae97e42f Remove scaling hack for SoF 2014-11-15 00:54:21 -05:00
Michael Cook (mackal) 96242f6c5e Remove scaling hack for Titanium 2014-11-15 00:29:56 -05:00
Michael Cook (mackal) 5dc3a5ab20 Also stop using hack on UF 2014-11-15 00:08:16 -05:00
Michael Cook (mackal) 44bfdfebc2 Correct charm scaling for RoF
Other clients should actually work the same as well
2014-11-14 23:45:56 -05:00
SecretsOTheP d33b320436 I accidentally the whole Uleat 2014-11-14 18:29:30 -05:00
SecretsOTheP 51b6db977f Identified object size and solidtype as flags. Exported them as functions to Perl. 2014-11-14 18:22:06 -05:00
Uleat e02e6099aa Merge branch 'master' of https://github.com/EQEmu/Server 2014-11-14 17:58:12 -05:00
Uleat 8e20f3e7dc Updated #peekinv to use MakeItemLink (per Natedog's suggestion) 2014-11-14 17:57:55 -05:00
JJ 5434c47d1f Merge pull request #291 from KayenEQ/Development
Support for spell field to determine if a spell can be blocked or not.
2014-11-14 07:31:39 -05:00
KayenEQ cbc8e652b9 fix 2014-11-14 00:34:17 -05:00
KayenEQ 4a26466b2b add 2014-11-14 00:26:14 -05:00
KayenEQ 6c7a4edae3 Support for spell field to determine if a spell can be blocked or not.
Numerous other spell fields defined.

Required sql added for updating spells_new field definations.
2014-11-14 00:23:26 -05:00
JJ 8c8cec29d4 Merge pull request #290 from KayenEQ/Development
Implemented target type (44) Beams
2014-11-13 22:38:19 -05:00
KayenEQ 9de4f84f22 Merge git://github.com/EQEmu/Server into Development
Conflicts:
	changelog.txt
2014-11-13 21:49:10 -05:00
KayenEQ 563a39c2d9 Spell field defined that determines if must be sneaking to use this ability.
This is handled by client under normal conditions, however if you
force cast this effect in situations like 'procs' you can cause
zone crashes, therefore a failsafe check is added in 'SpellOnTarget'
2014-11-13 21:45:19 -05:00
Uleat 741eca17f4 Added exclusion check for PlayerLogMerchantTransactions partial stack purchase logging 2014-11-13 13:17:29 -05:00
KayenEQ b32f59a40d Further support for spell field 'aemaxtargets' 2014-11-13 06:00:01 -05:00
KayenEQ 352d6fd83c Support for all remaining known spell target types.
Implemented target type (32) AE Target HateList
Implemented target type (36) Area Client Only
Implemented target type (37) Area PC Only
Implemented target type (39) Group No Pet
2014-11-13 05:19:01 -05:00
KayenEQ 738fa38047 Implemented target type (50) which excludes players pets from target AE's. 2014-11-13 02:46:22 -05:00
KayenEQ fabe93e548 Implemented target type (44) 'Beams' (which projects an AE infront of caster with a specified length and width).
Clean up of target type direction code, implemented use of aemaxtargets field for it.
2014-11-13 02:25:18 -05:00
Uleat 16f72be898 Added remarked #pragma comments around the OPGMTraining problem code (more for a reminder..but, can be enabled if you are having crash issues involving the for-loop) 2014-11-12 23:41:38 -05:00
JJ 9c22de9eb2 Not an error if there isn't merchant data to load... 2014-11-12 19:50:53 -05:00
Uleat f0f5262e3e Updated 'GMTrainee' structs to reflect the proper size of skills (100) 2014-11-12 18:17:03 -05:00
cavedude00 8594148496 Fixed npc_types_tint not being loaded properly. 2014-11-12 11:29:10 -08:00
JJ dd869695c4 Merge pull request #288 from KayenEQ/Development
optimization for how do endurance upkeep for discs
2014-11-12 04:41:07 -05:00
KayenEQ 7943a73cfb code fix 2014-11-12 02:03:24 -05:00
KayenEQ 59bcd031c8 Added a simple check to prevent DoEnduranceUpkeep (1 sec persistent timer)
from constantly checking when client has no endurance drain effects.
This was running 24/7 for all classes.
2014-11-12 01:54:21 -05:00
Uleat 22cc86e6a0 Removed type qualifier for SkillUseTypes enum 2014-11-11 18:01:21 -05:00
Uleat a763fc08b6 Merge branch 'master' of https://github.com/EQEmu/Server
Conflicts:
	changelog.txt
2014-11-11 00:14:18 -05:00
Uleat 8ae234aedf Real fix for GM trainer crash..evidently the problem went deeper than an undefined condition... 2014-11-11 00:11:44 -05:00
JJ 793487b825 Yellow faction messages. 2014-11-10 22:11:23 -05:00
Uleat bb5ae7447d Fix for GM Trainer crashing server (undefined behavior on enum cast) 2014-11-10 21:41:39 -05:00
JJ 0370156179 Fix changelog. [skip ci] 2014-11-10 10:52:17 -05:00
JJ 39cab761eb Merge pull request #287 from KayenEQ/Development
Implemented support for using target rings from item clicks
2014-11-10 10:39:29 -05:00
KayenEQ 720e80377e Merge git://github.com/EQEmu/Server into Development
Conflicts:
	changelog.txt
	common/eq_packet_structs.h
	common/patches/underfoot_structs.h
	common/spdat.h
	zone/effects.cpp
	zone/mob.cpp
	zone/spells.cpp
2014-11-10 10:22:50 -05:00
KayenEQ 3d44050959 Implemented support for using target rings from item clicks.
(Thanks again to Lecht for the help)
2014-11-10 10:11:29 -05:00
JJ d5efa0f23c Manual merge of TargetRing pull request #286. 2014-11-10 10:00:53 -05:00
KayenEQ e63b310058 Merge git://github.com/EQEmu/Server into Development
Conflicts:
	changelog.txt
2014-11-10 09:42:59 -05:00
JJ 384d8c6167 Merge pull request #285 from addtheice/legacy_removal
Removed two unused functions
2014-11-10 00:47:55 -05:00
JJ d23608964e Implement new Live-like faction adjustment message through optional rule. 2014-11-09 23:54:01 -05:00
KayenEQ d656db843a Implemented spell Target Type (45) 'Target Rings' on Underfoot.
Thanks to Lecht for figuring out op code side of it.
2014-11-09 22:37:12 -05:00
Arthur Ice 0ed1e539ae Removed two unused functions 2014-11-09 15:12:31 -08:00
SecretsOTheP d8a8b8e6dc Merge branch 'master' of https://github.com/EQEmu/Server 2014-11-09 03:40:59 -05:00
SecretsOTheP 77f0e7919e Indentation fix. Ornamentation Augments are integrated now. 2014-11-09 03:40:33 -05:00
Natedog2012 587ddc0fdd fix for copy paste error that linux didnt like 2014-11-09 03:33:58 -05:00
Natedog2012 efdc177b78 Implement RoF + UF ornament augmentation.. thanks for the help Drajor! 2014-11-09 03:33:58 -05:00
KimLS 275e1144ad Missed the actual sql 2014-11-08 15:22:54 -08:00
KimLS d987ccf289 Added transactions for corpse creation, added sql to fix a bug in raid member saving in some situations, fixed a bug in encounters 2014-11-08 15:22:03 -08:00
KimLS fe7774ab75 Merge branch 'master' of github.com:EQEmu/Server 2014-11-08 15:18:52 -08:00
Michael Cook (mackal) 19e6a6909f Merge pull request #283 from KayenEQ/Development
Mez spells will no longer attempt memblur each tic, just on initial cast...
2014-11-08 02:21:32 -05:00
KayenEQ 4446a1ed08 Mez spells will no longer attempt memblur each tic, just on initial cast.
reverted change to calcmaxhp due to potential overflow issues.
2014-11-08 02:07:05 -05:00
Trevius b4e4d94061 Fixed dynamic merchant list loading. Allows any merchant to be used in any zone. 2014-11-06 21:41:51 -06:00
Michael Cook (mackal) f81f8ea5d6 Merge pull request #282 from KayenEQ/Development
Fix for CalcMaxHP
2014-11-06 21:57:16 -05:00
Michael Cook (mackal) 7476ae2a82 Tracking default order should now be correct
Reworked the tracking packet creation, should be better
2014-11-06 21:48:42 -05:00
KayenEQ 0c4a32246b Fix for CalcMaxHP 2014-11-06 21:00:03 -05:00
Michael Cook (mackal) b8b43c7149 Merge pull request #281 from KayenEQ/Development
Fix to SE_PercentHeal to allow it to work if no max value set.
2014-11-06 02:47:06 -05:00
KayenEQ b4286b87db Fix to SE_PercentHeal to allow it to work if no max value set. 2014-11-06 01:30:05 -05:00
KimLS cb0d5ac7d0 Merge branch 'master' of github.com:EQEmu/Server 2014-11-04 21:01:43 -08:00
KimLS 957f05860b Small changes to encounter stuff 2014-11-04 21:01:20 -08:00
SecretsOTheP d4139b98e3 Linux fix. 2014-11-03 23:01:55 -05:00
SecretsOTheP 29d614421f int16/32 mismatch fixes. see changelog.txt 2014-11-03 22:43:00 -05:00
SecretsOTheP beff1caf4f Merc/bot fix changelog.txt 2014-11-03 19:30:41 -05:00
SecretsOTheP 29ec6db345 because fuck you mercs and bots 2014-11-03 19:30:11 -05:00
SecretsOTheP 8efc652c10 Fixed overflow on AC and ATK values that can go out of range. 2014-11-03 19:14:58 -05:00
SecretsOTheP 29079a7ec2 changelog.txt 2014-11-03 16:47:26 -05:00
SecretsOTheP 3ac0f1506c Fixed melee lifetap overflows - Because being healed for uint16s is not cool. 2014-11-03 16:45:36 -05:00
JJ 38f1e8847c Make output of GetCharactersInInstance for perl more user-friendly. 2014-11-03 12:35:07 -05:00
Akkadius cff9e05626 Weird text characters making it into commit 2014-11-02 22:43:08 -06:00
Akkadius 29a36008d1 Tell queue sanity checks 2014-11-02 22:37:16 -06:00
Akkadius 51958b991c Cleaner way to handle out of range and swaps 2014-11-02 22:30:29 -06:00
Akkadius 771279128d Added out of range checking for Spell Save/Loads 2014-11-02 21:16:04 -06:00
JJ 385d70b294 Merge pull request #279 from KayenEQ/Development
Minor code and warning fixes.
2014-11-02 22:01:03 -05:00
JJ 4bd41b3678 Export of additional instance functions to perl as per #128.
Change QuestManager RemoveAllFromInstance function to use existing function to remove all clients from instance.
2014-11-02 20:43:47 -05:00
KayenEQ 527293d2f2 Merge git://github.com/EQEmu/Server into Development 2014-11-02 20:14:59 -05:00
KayenEQ d754e24a02 Minor code and compiler warning fixes. 2014-11-02 20:14:44 -05:00
Michael Cook (mackal) b4576435e3 Size check on ServerOP_ChannelMessage 2014-11-02 18:50:02 -05:00
Michael Cook (mackal) 5e1500c93b Merge pull request #278 from KayenEQ/Development
Revert for checking buffs if virus, couple of spells don't require a buff.
2014-11-02 18:48:02 -05:00
KayenEQ c9073b10a1 Revert for checking buffs if virus, a couple of spells don't require a buff. 2014-11-02 18:34:22 -05:00
JJ a9f7af59a2 Merge pull request #277 from KayenEQ/Development
Few more minor compiler warnings and code clean up.
2014-11-02 09:00:23 -05:00
KayenEQ 728399e372 Make sure virus is an actual buff before starting timer 2014-11-02 05:35:09 -05:00
KayenEQ 51a3302288 Few more minor compilier warnings and code clean up. 2014-11-02 00:43:01 -04:00
JJ 5decde0af9 (RicardoCampos) End looting before zoning. 2014-11-02 00:10:19 -04:00
JJ 3620ac4eaf Merge pull request #276 from KayenEQ/Development
Fixed compiler warnings and clean up of some code in spell_effects.cpp
2014-11-01 23:34:03 -04:00
JJ 43e906e3c8 Manual merge of new faction system (#256).
Clean up some personal signatures.
2014-11-01 23:27:23 -04:00
KayenEQ 39bb2aa811 minor clear up of 2handstaff block effect code. 2014-11-01 20:57:26 -04:00
JJ acab4dd443 Fix for duplicate merchant items when same merchant types are in same spawngroup. 2014-11-01 13:37:06 -04:00
Trevius 45ff2cddb7 Fixed potential crash related to Pets/Mercs buffs when targeting themselves. 2014-11-01 11:50:55 -05:00
KimLS 1619324d06 Small bug fixes with encounters, also added eq.load_encounter_with_data(encounter_name, data_string) and unload as well. Allows you to send a message via the encounter system load 2014-10-31 22:09:09 -07:00
KayenEQ 7b0045290d Fixed most of the compiler warnings and cleaned up some code in spells_effects.cpp 2014-10-31 22:40:49 -04:00
KayenEQ 441ddf233a Merge git://github.com/EQEmu/Server into Development 2014-10-31 21:47:20 -04:00
KayenEQ 306c641c72 merge 2014-10-31 21:47:07 -04:00
Michael Cook (mackal) b417e23d97 Allow to set/del qglobals in encounters scripts 2014-10-31 00:02:05 -04:00
KimLS 481492cb59 Fixed SQL to be current date, also it will no longer rely on a field that we removed from the db [skip ci] 2014-10-30 19:38:13 -07:00
Michael Cook (mackal) d3fbd026b4 Fix error with commit 2014-10-30 22:08:45 -04:00
Michael Cook (mackal) 2d77adeeb8 Merge pull request #273 from KayenEQ/Development
Allow npc_types field 'special_abilities' to be set as null in database.
2014-10-30 22:01:55 -04:00
KayenEQ f84130fc7c fix 2014-10-30 21:40:46 -04:00
KayenEQ 57f8f61094 code optimization 2014-10-30 21:22:53 -04:00
KayenEQ 5ec0b9993a Merge git://github.com/EQEmu/Server into Development 2014-10-30 19:51:22 -04:00
Uleat 65cb049a38 Added Client::InterrogateInventory() and command #interrogateinv to manually invoke it. (GM's - use #interrogateinv help) 2014-10-28 11:35:26 -04:00
KayenEQ 3247137ef2 Added swarm pet checks to viral spreading function. 2014-10-27 02:20:25 -04:00
KayenEQ adb8175654 Support for spells_new field 'viral_range' 2014-10-26 02:05:36 -04:00
KayenEQ 5afd6b8628 Added 'hit chance' extra attack option can be applied to future special attacks ect. 2014-10-24 23:36:02 -04:00
KayenEQ 4cb6a5635e Merge git://github.com/EQEmu/Server into Development 2014-10-24 23:28:15 -04:00
KimLS b54411e533 Fix for not loading some account data on character load 2014-10-24 19:05:04 -07:00
Michael Cook (mackal) 7f85d8c8a2 Optional SQL to add AA Quick Draw 2014-10-24 01:06:07 -04:00
Uleat c95b18da85 Fixed stacking issue in world tradeskill containers. (Added #peekinv world) 2014-10-22 22:57:20 -04:00
Michael Cook (mackal) a062c27e1a Take into account endurance bonuses from AAs 2014-10-22 22:27:51 -04:00
Michael Cook (mackal) c5df59a2f0 Merge pull request #274 from RicardoCampos/Development
Bugfix: Corpse stays locked when looting fails
2014-10-22 22:01:53 -04:00
RicardoCampos d538b48fbc Merge remote-tracking branch 'origin/master' into Development 2014-10-21 22:51:53 +01:00
RicardoCampos 0a27273d64 Bugfix: Corpse stays locked when looting fails
If looting fails either because of cooldown or there are items on your
cursor, the client is sent an end loot packet- the client releases the
corpse but no one else can loot. This simply resets BeingLootedBy in
this instance.
2014-10-21 22:48:42 +01:00
KayenEQ 22170527c4 Small update to prior commit. 2014-10-21 14:24:25 -04:00
KayenEQ f0f920d0e8 Fix for bug with Discipline recast timers preventing them from
working properly if you used a focus effect to reduce recast time
to zero.

(Specifically the recast timer failed to reset in the situation
where you had already used the disc WIHTOUT the focus applied, then applied
the focus and tried to have it reduced).
2014-10-21 14:14:35 -04:00
KayenEQ 193f7b0fe3 Fix so NPC don't ghost when casting spells from scripts while moving. 2014-10-20 01:16:08 -04:00
Michael Cook (mackal) c81491f97e Inspect buffs rank 1 will now show NPC buffs in target window (SoD+) 2014-10-20 01:05:38 -04:00
KayenEQ bb91265b2b Allow npc_types field 'special_abilities' to be set as null in database.
Changed due to issues when trying to copy npcs or remove abilities from
the field directly in the dataabase.
2014-10-20 00:36:13 -04:00
Uleat affb735c38 Merge branch 'master' of https://github.com/EQEmu/Server 2014-10-19 22:31:04 -04:00
Uleat 3db2332821 Missed one! 2014-10-19 22:30:45 -04:00
Michael Cook (mackal) a6ae2ca635 Switch Inspect Buffs to use the OP code
Client 6.2 is SOL until someone find the op for that client
2014-10-19 22:30:11 -04:00
Michael Cook (mackal) 466eecacc4 Implement Group Inspect Buffs for raids 2014-10-19 18:34:43 -04:00
Michael Cook (mackal) a327c91bac Implement group mentoring while in raids (SoF+ only)
Note: This does not allow the raid leader to share raid leader XP
and since the raid leader doesn't gain group leadership, they can't
share that either.
2014-10-19 17:20:07 -04:00
Uleat cef2aa64d9 Fixed server<->corpse translators to reflect what actually needs to be translated (should not have affected anything in the old configuration) 2014-10-19 15:03:11 -04:00
Uleat 69a124e11f Updated #peekinv to display item links properly in RoF clients 2014-10-19 11:39:35 -04:00
Michael Cook (mackal) 3f056462d6 Enable gaining of group leadership while in raids
Note: raid leaders can only gain raid leadership, so they won't
ever gain group leadership while leading a raid, even if they don't
end up gaining group due to the restrictions.

From what I can tell, this should be in line with live
2014-10-18 13:27:33 -04:00
Michael Cook (mackal) e8eb774458 Implement group mentor, leadership exp sharing (SoF+ only)
Currently only works in normal groups
Some decisions: the EXP will be rounded in the favor of the group leader
No idea how live actually handles it.
2014-10-18 00:17:46 -04:00
Uleat 223d06645d Added clarification to 'drop_bots.sql' notes for cases of failed script 2014-10-17 21:04:29 -04:00
Michael Cook (mackal) 2db5dc2ed7 ndle Leadership with leader change in RaidCommandMoveGroup 2014-10-17 15:10:43 -04:00
Michael Cook (mackal) 6d95fc2547 Handle Leadership with leader change in RaidCommandDisband 2014-10-17 15:05:47 -04:00
Michael Cook (mackal) b10062452a Fix issue with moving a group leader in a raid
Moving a group leader to the ungrouped section was not correctly
finding an appropriate new group leader.
2014-10-17 01:06:27 -04:00
Michael Cook (mackal) 9c72533264 Fix issue with raidMakeLeader packets 2014-10-16 19:23:32 -04:00
Uleat f805ddf319 Merge branch 'master' of https://github.com/EQEmu/Server 2014-10-16 19:20:49 -04:00
Uleat 2267881d52 Fixed BOTS auto-convert code and load/drop scripts. Added a sql for fixing an existing database that was auto-converted incorrectly (located in ../bots/deprecated) 2014-10-16 19:16:52 -04:00
Michael Cook (mackal) 7ca23d14c7 Remove debug statement 2014-10-16 17:01:06 -04:00
KimLS 4cf845e6ff Workaround for FreeBSD not having std::to_string 2014-10-16 01:16:38 -07:00
KimLS 9c6ab05659 Removed PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP ifdef, we dont use it anyway and it was failing on FreeBSD gcc49 2014-10-16 01:05:43 -07:00
KimLS 0f9cfc0615 Very new versions of gcc appear to have now cleaned up yet another header leaking out 2014-10-15 22:15:24 -07:00
JJ 6028dbb4e5 hateborne: grid assign match fix. 2014-10-15 22:31:44 -04:00
JJ fc8cb2b5b7 Manual merge of 4e3826228d in #269. 2014-10-15 22:12:57 -04:00
JJ 594657f2c7 Manual merge for 0c3e51963b in pull request #269. 2014-10-15 22:08:27 -04:00
JJ 09e1155a26 Merge pull request #261 from addtheice/RunQueryToDatabaseQuery_common_shareddb
Run query to database query common shareddb
2014-10-15 21:37:33 -04:00
Uleat e824f81670 Merge branch 'master' of https://github.com/EQEmu/Server
Conflicts:
	changelog.txt
2014-10-15 19:50:35 -04:00
Uleat 69c0405004 Updated both load and drop sqls for bots..added a 'deprecated' load for pre-pp blob conversion databases..the auto-conversion code will catch this if the server
is updated to a newer version. (Had a really nice load script coded..but, the supported version of MySQL doesn't support 'TEMPORARY' procedures, nor commit commands from
'PREPARE(d)' statements... :( )
2014-10-15 07:49:39 -04:00
Michael Cook (mackal) e38abaa32a Optimize EntityList::UnMarkNPC
Going over the group_list is much better than hitting the same group
up to 5 unnecessary times
2014-10-14 22:50:09 -04:00
Michael Cook (mackal) c002f834d4 Correct misidentified OP_MarkNPC (RoF,SoD,SoF,UF) [skip ci] 2014-10-14 17:20:19 -04:00
Michael Cook (mackal) e53a91f5c3 Added some previous unidentified (still unhandled) UF opcodes
Didn't want them to get lost ;)
2014-10-14 00:01:51 -04:00
Michael Cook (mackal) ef5e93b71b Add debug log to Client::Handle_OP_DoGroupLeadershipAbility 2014-10-13 23:24:25 -04:00
Michael Cook (mackal) 6f00a69850 Raid Leadership RoF 2014-10-13 22:55:57 -04:00
Michael Cook (mackal) 41938fbe72 Raid leadership SoD 2014-10-13 22:54:57 -04:00
Michael Cook (mackal) d1561c28d9 Raid Leadership SoF 2014-10-13 22:53:41 -04:00
Michael Cook (mackal) be0621de42 Partial implementation of leadership in raids
Currently working: stat bonuses and client side only effects
Currently not working: Mark NPC and others that need more server side work

Currently only tested on UF, Ti and 62 may work, but not tested
SoF, SoD, and RoF need packet translators, which are most likely the same as UF
2014-10-13 21:36:59 -04:00
KimLS 15cec40ed5 Fix for issue #270, fix for temp merchant lists not loading correctly, fix for ah redundant getadventurestats code. 2014-10-13 15:59:11 -07:00
Akkadius ea734c90b5 Fix for LDON Character Stat load 2014-10-12 22:57:49 -05:00
Michael Cook (mackal) 6c5b569c29 Raid MOTD for SoF 2014-10-11 02:07:49 -04:00
Michael Cook (mackal) e5f3f4c552 Raid MOTD for SoD 2014-10-11 02:03:49 -04:00
Michael Cook (mackal) f097eaf3cd Raid MOTD for RoF 2014-10-11 01:54:54 -04:00
Alex 48eba3c092 Merge pull request #260 from addtheice/RunQueryToDatabaseQuery_world_worlddb
Run query to database query world worlddb
2014-10-10 22:44:14 -07:00
Alex bdba6219ac Merge pull request #259 from addtheice/RunQueryToDatabaseQuery_zone_command
Run query to database query zone command
2014-10-10 22:43:07 -07:00
Alex d86912a7bb Merge pull request #262 from addtheice/RunQueryToDatabaseQuery_zone_client
Run query to database query zone client
2014-10-10 22:42:45 -07:00
Alex 362366a333 Merge pull request #263 from addtheice/RunQueryToDatabaseQuery_queryserv_database
GeneralQueryReceive converted to QueryDatabase
2014-10-10 22:42:04 -07:00
Michael Cook (mackal) 35049d530e Implement Raid MOTD for UF
Don't forget to source 2014_10_11_RaidMOTD.sql

SoD and RoF implementations still to come
2014-10-11 01:14:11 -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
Arthur Ice 0438042844 GeneralQueryReceive converted to QueryDatabase 2014-10-07 09:02:13 -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
Arthur Ice f4203d0621 command_mysql converted to QueryDatabase 2014-10-04 15:49:55 -07:00
Arthur Ice bf6b9aaef8 command_object converted to QueryDatabase 2014-10-04 15:49:55 -07:00
Arthur Ice d5f5b38d26 command_advnpcspawn converted to QueryDatabase 2014-10-04 15:49:55 -07:00
Arthur Ice 6a078279eb command_flagedit converted to QueryDatabase 2014-10-04 15:49:55 -07:00
Arthur Ice a61b930bd9 command_qglobal converted to QueryDatabase 2014-10-04 15:49:55 -07:00
Arthur Ice 6be2f6a7e4 command_npcedit converted to QueryDatabase 2014-10-04 15:49:55 -07:00
Arthur Ice 1d08b1687f command_ban converted to QueryDatabase 2014-10-04 15:49:54 -07:00
Arthur Ice e2382137e6 command_repop converted to QueryDatabase 2014-10-04 15:49:54 -07:00
Arthur Ice f1039ab0e9 command_revoke converted to QueryDatabase 2014-10-04 15:49:54 -07:00
Arthur Ice ce3532aa19 command_suspend converted to QueryDatabase 2014-10-04 15:49:54 -07:00
Arthur Ice 1b1c5b5f9f ExpeditionSay converted to QueryDatabase 2014-10-04 15:29:02 -07:00
Arthur Ice 9c3f1937a7 SetAccountFlag converted to QueryDatabase 2014-10-04 15:24:11 -07:00
Arthur Ice 81a641c96c LoadAccountFlags converted to QueryDatabase 2014-10-04 15:21:05 -07:00
Arthur Ice 037df28b7c TryReward converted to QueryDatabase 2014-10-04 15:14:50 -07:00
Arthur Ice fe1c67b8b4 SendRewards converted to QueryDatabase 2014-10-04 14:55:55 -07:00
Arthur Ice c7c9218210 DiscoverItem converted to QueryDatabase 2014-10-04 14:46:19 -07:00
Arthur Ice 6d6516d80d IsDiscovered converted to QueryDatabase 2014-10-04 14:43:02 -07:00
Arthur Ice 528f16bdaf SetBotInspectMessage converted to QueryDatabase 2014-10-04 14:24:29 -07:00
Arthur Ice 64641a3390 GetBotInspectMessage converted to QueryDatabase 2014-10-04 14:23:53 -07:00
Arthur Ice 74b8f38030 LoadLootDrops converted to QueryDatabase 2014-10-04 14:22:27 -07:00
Arthur Ice c7faf8a03c LoadLootTables converted to QueryDatabase 2014-10-04 14:21:25 -07:00
Arthur Ice aa9601352d GetLootDropInfo converted to QueryDatabase 2014-10-04 14:20:46 -07:00
Arthur Ice 81b9d9a57e LoadBaseData converted to QueryDatabase 2014-10-04 14:19:04 -07:00
Arthur Ice cecd9b89ba GetMaxBaseDataLevel converted to QueryDatabase 2014-10-04 14:18:11 -07:00
Arthur Ice 938322a3d1 LoadSpells converted to QueryDatabase 2014-10-04 14:16:54 -07:00
Arthur Ice 1c04dccf53 GetMaxSpellID converted to QueryDatabase 2014-10-04 14:16:00 -07:00
Arthur Ice 0622f02470 LoadDamageShieldTypes converted to queryDatabase 2014-10-04 14:14:27 -07:00
Arthur Ice 1366774931 LoadSkillCaps converted to QueryDatabase 2014-10-04 14:13:05 -07:00
Arthur Ice 5cbae2b833 GetcommandSettings converted to QueryDatabase 2014-10-04 14:12:16 -07:00
Arthur Ice c12805acce DeleteStalePlayerBackups converted to QueryDatabase 2014-10-04 14:11:40 -07:00
Arthur Ice e2c84c5f39 DeleteStalePlayerCorpses converted to QueryDatabase 2014-10-04 14:10:57 -07:00
Arthur Ice e19db3f447 LoadNPCFactionLists converted to QueryDatabase 2014-10-04 14:10:00 -07:00
Arthur Ice 7d0b316e74 GetFactionListInfo converted to QueryDatabase 2014-10-04 14:08:53 -07:00
Arthur Ice 0ef428d286 GetBook converted to QueryDatabase 2014-10-04 14:07:55 -07:00
Arthur Ice 2a73a572d3 LoadItems converted to QueryDatabase 2014-10-04 14:06:37 -07:00
Arthur Ice 638d121b75 GetItemsCount converted to QueryDatabase 2014-10-04 14:05:07 -07:00
Arthur Ice 3b75d4fa8f GetInventory char_id, inv) converted to QueryDatabase 2014-10-04 14:04:19 -07:00
Arthur Ice cb897786bc GetInventory(account_id, name, inv) converted to QueryDatabase 2014-10-04 14:02:43 -07:00
Arthur Ice aa780ceb8c GetSharedBank converted to QueryDatabase 2014-10-04 13:55:43 -07:00
Arthur Ice 4a3f94e688 SetStartingItems converted to QueryDatabase 2014-10-04 13:54:33 -07:00
Arthur Ice 211b3a135e SetSharedPlatinum converted to QueryDatabase 2014-10-04 13:53:28 -07:00
Arthur Ice cbce5e5eb6 GetSharedPlatinum converted to QueryDatabase 2014-10-04 13:50:01 -07:00
Arthur Ice a3347579e6 SaveInventory converted into 4 methods, converted to QueryDatabase 2014-10-04 13:45:50 -07:00
Arthur Ice 2fbd170188 VerifyInventory converted to QueryDatabase 2014-10-04 13:32:01 -07:00
Arthur Ice 95208eb24e SaveCursor 2014-10-04 13:31:06 -07:00
Arthur Ice bcf282da91 SetGMSpeed converted to QueryDatabase 2014-10-04 13:27:26 -07:00
Arthur Ice edc2567b10 GetGMSpeed converted to QueryDatabase 2014-10-04 13:26:45 -07:00
Arthur Ice b379bdd36e SetHideMe converted to QueryDatabase 2014-10-04 13:23:52 -07:00
Arthur Ice eeb9a6ab65 LoadCharacterCreateCombos converted to QueryDatabase 2014-10-04 12:51:58 -07:00
Arthur Ice c4de954b15 LoadCharacterCreateAllocations converted to QueryDatabase 2014-10-04 12:51:58 -07:00
Arthur Ice 2d8e9bf058 GetCharacterLevel converted to QueryDatabase 2014-10-04 12:51:58 -07:00
Arthur Ice 0b352ff0f7 SetMailKey converted to QueryDatabase
fix SetMailKey
2014-10-04 12:51:54 -07:00
Arthur Ice 28ec84a6c9 GetLauncherList converted to QueryDatabase 2014-10-04 12:37:19 -07:00
Arthur Ice 7f5f805c10 GetStartZoneSoF converted to QueryDatabase 2014-10-04 12:36:04 -07:00
Arthur Ice b3789c261b GetStartZone converted to QueryDatabase 2014-10-04 12:34:44 -07:00
Arthur Ice d86fc1c141 command_spawnfix converted to QueryDatabase 2014-10-04 10:16:26 -07:00
Arthur Ice accedf7184 command_listpetition converted to QueryDatabase 2014-10-04 10:12:39 -07:00
Arthur Ice 5f5fba1117 command_findzone converted to QueryDatabase 2014-10-04 10:09:20 -07:00
Arthur Ice 61cd48ff44 command_findnpctype converted to QueryDatabase 2014-10-04 10:07:25 -07:00
Arthur Ice ca2c2ccfac command_delpetition converted to QueryDatabase 2014-10-04 10:04:39 -07:00
Arthur Ice 905a264744 command_petitioninfo converted to QueryDatabase 2014-10-04 10:03:07 -07:00
Arthur Ice 114d0ae11b command_viewpetition converted to QueryDatabase 2014-10-04 10:01:59 -07:00
Arthur Ice 4d768474e8 command_setfaction converted to QueryDatabase 2014-10-04 09:58:55 -07: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
akkadius 52608d9b2d Character armor dye save fix 2014-09-18 22:46:28 -05: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
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
Akkadius e390531dcd Initial character creation escape sequences
Added initial skill/language/bind saves to character creation
2014-09-11 03:14:34 -05:00
akkadius d7dc733480 Small db changes 2014-09-11 00:44:12 -05: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
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
Akkadius 4c12d31e4a Removed command character backup
Changed all remaining references from the character_ table to the character_data
2014-09-06 22:35:19 -05:00
Akkadius e50cf5c4be - Ported inspect_messages to character_inspect_messages
- Ported character leadership abilities to character_leadership_abilities
- Removed player profile debug printing
- Refactored total time entitled on account to load from the sum of time_played from all characters in character_data
2014-09-06 21:50:29 -05:00
akkadius ca7dd7d741 - Improved speed of character database conversion x1000 by changing query style
- Adjusted AA MySQL saves for 100x speed increase
- Removed StoreCharacter lookup methods as they will no longer be necessary
- Some other cleanup
2014-09-06 13:53:54 -05:00
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
Arthur Ice 15fa2b371c LearnMembers converted to QueryDatabase 2014-09-05 10:45:36 -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 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 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
Arthur Ice 118c2a9db9 LoadAAs converted to QueryDatabase 2014-09-03 13:49:04 -07: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
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
Akkadius 5cf748d135 Initial work 2014-08-27 09:55:39 -05:00
240 changed files with 72960 additions and 50988 deletions
+3 -1
View File
@@ -8,7 +8,9 @@ script:
- make
- ./bin/tests
branches:
only: master
only:
- master
- stable
notifications:
email: false
irc:
+15 -10
View File
@@ -24,8 +24,8 @@
#EQEMU_DISABLE_LOGSYS
#EQEMU_COMMANDS_LOGGING
#EQEMU_BUILD_SERVER
#EQEMU_BUILD_LOGIN
#EQEMU_BUILD_TESTS
#EQEMU_BUILD_LOGIN
#EQEMU_BUILD_TESTS
#EQEMU_BUILD_PERL
#EQEMU_BUILD_LUA
#EQEMU_SANITIZE_LUA_LIBS
@@ -103,7 +103,7 @@ IF(MSVC)
SET(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /SAFESEH:NO")
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." ON)
IF(EQEMU_BUILD_MSVC_MP)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
@@ -115,7 +115,7 @@ IF(MSVC)
STRING(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
ENDIF(${flag_var} MATCHES "/MD")
ENDFOREACH(flag_var)
ADD_DEFINITIONS(-DNOMINMAX)
ELSE(MSVC)
#Normally set by perl but we don't use the perl flags anymore so we set it.
@@ -126,6 +126,7 @@ ENDIF(MSVC)
IF(UNIX)
IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
ADD_DEFINITIONS(-DFREEBSD)
ADD_DEFINITIONS(-D_GLIBCXX_USE_C99)
SET(FREEBSD TRUE)
ENDIF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
IF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
@@ -259,7 +260,10 @@ OPTION(EQEMU_BUILD_CLIENT_FILES "Build Client Import/Export Data Programs." ON)
#C++11 stuff
IF(NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -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
@@ -289,6 +293,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)
@@ -301,26 +306,26 @@ FIND_PACKAGE(ZLIB REQUIRED)
FIND_PACKAGE(MySQL REQUIRED)
IF(EQEMU_BUILD_PERL)
FIND_PACKAGE(PerlLibs REQUIRED)
INCLUDE_DIRECTORIES("${PERL_INCLUDE_PATH}")
INCLUDE_DIRECTORIES(SYSTEM "${PERL_INCLUDE_PATH}")
ENDIF(EQEMU_BUILD_PERL)
IF(EQEMU_BUILD_LUA)
FIND_PACKAGE(EQLua51 REQUIRED)
SET(Boost_USE_STATIC_LIBS OFF)
SET(Boost_USE_MULTITHREADED ON)
SET(Boost_USE_MULTITHREADED ON)
SET(Boost_USE_STATIC_RUNTIME OFF)
SET(BOOST_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/boost")
FIND_PACKAGE(Boost REQUIRED)
INCLUDE_DIRECTORIES("${LUA_INCLUDE_DIR}" "${Boost_INCLUDE_DIRS}" "luabind")
INCLUDE_DIRECTORIES(SYSTEM "${LUA_INCLUDE_DIR}" "${Boost_INCLUDE_DIRS}" "luabind")
OPTION(EQEMU_SANITIZE_LUA_LIBS "Sanitize Lua Libraries (Remove OS and IO standard libraries from being able to run)." ON)
IF(EQEMU_SANITIZE_LUA_LIBS)
ADD_DEFINITIONS(-DSANITIZE_LUA_LIBS)
ENDIF(EQEMU_SANITIZE_LUA_LIBS)
ENDIF(EQEMU_BUILD_LUA)
INCLUDE_DIRECTORIES("${ZLIB_INCLUDE_DIRS}" "${MySQL_INCLUDE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/common/glm/glm")
INCLUDE_DIRECTORIES(SYSTEM "${ZLIB_INCLUDE_DIRS}" "${MySQL_INCLUDE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/common/glm/glm")
IF(EQEMU_BUILD_LUA)
ADD_SUBDIRECTORY(luabind)
+370
View File
@@ -1,5 +1,375 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50)
-------------------------------------------------------
== 12/04/2014 ==
Kayen: Ranged attacks will now more accurately check MAX firing range, fixing the issue where you would
hit ranged attack and nothing would happpen due to incorrect server side range checks.
Trevius: Initial addition of the RoF2 client from May 10th 2013 (currently available on Steam as the F2P client).
Trevius: RoF2 is disabled by default, but you can enable by editing /common/patches/patches.cpp (see comments)
== 12/01/2014 ==
Trevius: Mercenaries now spawn as the same Gender and Size of the Merchant they are purchased from.
Trevius: Mercenaries now spawn with randomized facial features when purchased.
Trevius: Setting a lastname for NPCs will now override any hard coded lastname (such as GM Trainers).
Required SQL: utils/sql/git/required/2014_12_01_mercs_table_update.sql
== 11/28/2014 ==
Trevius: Fixed a zone crash related to numhits for spells.
Trevius: Fixed a query related to group leaders logging in.
Trevius (Natedog): Fixed a world crash related to attempting to join an adventure with Mercenaries.
== 11/27/2014 ==
Kayen: Projectiles (ie Arrows) fired from archery will now do damage upon impact instead of instantly (consistent w/ live).
Optional SQL: utils/sql/git/optional/2014_11_27_ProjectileDmgOnImpact.sql
== 11/25/2014 ==
Trevius: Spells that modify model size are now limited to 2 size adjustments from the base size.
Trevius: Fix to prevent Mercenaries from being set as Group Leader.
== 11/24/2014 ==
Trevius: Added Rule NPC:EnableMeritBasedFaction (disabled by default) - Allows faction gain to work similar to experience.
== 11/22/2014 ==
Trevius: Grouping with Mercenaries is now considerably less buggy.
Trevius: Fixed an issue with Spell Globals related to high Character IDs.
Trevius: Crash fix for Swarm Pets.
== 11/19/2014 ==
Trevius: Mercenaries now Dismiss, Suspend, Unsuspend, and Die correctly.
== 11/18/2014 ==
Trevius: Mercenaries can now zone once again.
== 11/17/2014 ==
demonstar55: Correct OP_AugmentInfo reply. This fixes RoF display issue with Adventurer's Stone. Still issues with UF/SoF/SoD though.
== 11/16/2014 ==
demonstar55: fix size issue with ControlBoat_Struct and exploit fix in OP_BoardBoat
Akkadius: Implemented Automatic Database update and versioning system
Akkadius: Created database revision define, this is located in version.h in common #define CURRENT_BINARY_DATABASE_VERSION 9057
- This revision define will need to be incremented each time a database update is made
- Along with a revision define increment, you will need to update the db_update manifest located in:
- https://raw.githubusercontent.com/EQEmu/Server/master/utils/sql/db_update_manifest.txt
- An entry needs to be made at the bottom of the manifest, the entry is quite simple
- Example: 9057|2014_11_13_spells_new_updates.sql|SHOW COLUMNS FROM `spells_new` LIKE 'disallow_sit'|empty|
- This latest example is checking to see if the spells_new table contains the column 'disallow_sit', if its empty, the update needs to be ran
- More examples of match types below:
# Example: Version|Filename.sql|Query_to_Check_Condition_For_Needed_Update|match type|text to match
# 0 = Database Version
# 1 = Filename.sql
# 2 = Query_to_Check_Condition_For_Needed_Update
# 3 = Match Type - If condition from match type to Value 4 is true, update will flag for needing to be ran
# contains = If query results contains text from 4th value
# match = If query results matches text from 4th value
# missing = If query result is missing text from 4th value
# empty = If the query results in no results
# not_empty = If the query is not empty
# 4 = Text to match
- The manifest contains all database updates 'Required' to be made to the schema, and it will contain a working backport all the way back to SVN -
currently it is tested and backported through the beginning of our Github repo
- On world bootup or standalone run of db_update.pl, users will be prompted with a simple menu that we will expand upon later:
============================================================
EQEmu: Automatic Database Upgrade Check
============================================================
Operating System is: MSWin32
(Windows) MySQL is in system path
Path = C:\Program Files\MariaDB 10.0\bin/mysql
============================================================
Binary Database Version: (9057)
Local Database Version: (9057)
Database up to Date: Continuing World Bootup...
============================================================
Retrieving latest database manifest...
URL: https://raw.githubusercontent.com/EQEmu/Server/master/utils/sql/db_update_manifest.txt
Saved: db_update/db_update_manifest.txt
Database Management Menu (Please Select):
1) Backup Database - (Saves to Backups folder)
Ideal to perform before performing updates
2) Backup Database Compressed - (Saves to Backups folder)
Ideal to perform before performing updates
3) Check for pending Database updates
Stages updates for automatic upgrade...
0) Exit
Akkadius: Created db_update.pl, placed in utils/scripts folder, used for the automatic database update routine (Linux/Windows)
- db_update.pl script created db_version table if not created, if old one is present it will remove it
Akkadius: Created db_dumper.pl, placed in utils/scripts folder, used for the automatic database update routine backups and standalone backups (Linux/Windows)
Akkadius: World will now check the db_update.pl script on bootup, if the db_update.pl script is not present, it will fetch it remotely before running -
when db_update.pl is done running, world will continue with bootup
== 11/15/2014 ==
Uleat(Natedog): A better fix for OP_ShopPlayerBuy - doesn't cause the issues that I introduced
Kayen: Implemented NPC Special Ability 41 'Allow To Tank', gives NPC opportunity to take aggro over a client in melee range.
Kayen: Updated swarm pet AI to be consistent with live.
*OLD AI: Swarm pet would lock on to target until target died, then depop as soon as target died.
*NEW AI: Swarm pet will attack cast on target, NOT perma locked it can change targets if attacked
by something else that generate more hate. When target dies swarm pet will follow owner, if owner is
attacked by something else the swarm pet will attack it (until duration timer despawns the pet).
Kayen: Updated perl quest function: MakeTempPet(Tspell_id, name=nullptr, duration=0, target=nullptr, sticktarg=0)
Kayen: Implemented perl quest function: Mob::TypesTempPet(npctypesid, name=nullptr, duration=0, follow=0, target=nullptr, sticktarg=0)
Note: 'sticktarg' field will cause the swarm pet to use the OLD AI
Rule to use OLD AI only - default is disabled.
Optional SQL: utils/sql/git/optional/2014_11_15_SwarmPetTargetLock.sql
== 11/14/2014 ==
Secrets: Identified object size and solidtype as flags. Exported them as functions to Perl.
demonstar55: Don't use the hack for charms that doesn't work on RoF
demonstar55: UF too
demonstar55: Tit
demonstar55: SoF
demonstar55: SoD
demonstar55: 62 (untested)
== 11/13/2014 ==
Kayen: Implemented target type (44) 'Beams' (which projects an AE infront of caster with a specified length and width).
Kayen: Implemented target type (32) AE Target HateList
Kayen: Implemented target type (36) Area Client Only
Kayen: Implemented target type (37) Area PC Only
Kayen: Implemented target type (39) Group No Pet
Uleat: PlayerLogMerchantTransactions does not support partial stack purchase logging at this time
== 11/12/2014 ==
Uleat: Changed 'GMTrainee' struct to reflect the actual client hard-coded max skill count (100) - applies to all currently supported clients (6.2->RoF)
== 11/11/2014 ==
Uleat: Third attempt at a fix for GM trainer zone crashes... (this is starting to look like a KLS fix...)
== 11/10/2014 ==
Uleat: Fix for GM Trainer crashing server (really!)
JJ: Yellow faction messages.
== 11/09/2014 ==
Kayen: Implemented support for spell target type (45) 'Target Rings' on Underfoot (does work earlier expansions). Thanks to Lecht for figuring out the op_code side.
JJ: Implement new Live-like faction adjustment message using rule Client:UseLiveFactionMessage.
Optional SQL: utils/sql/git/optional/2014_11_09_LiveFactionMessages.sql
== 11/06/2014 ==
demonstar55: Tracking default sort will now be correct order
Trevius: Fixed dynamic merchant list loading. Allows any merchant to be used in any zone.
== 11/03/2014 ==
Secrets: Fixed an overflow in melee lifetap calculations (int16 vs int32)
Secrets: Fixed overflow on AC and ATK values that can go out of range.
Secrets: Merc/Bot fixes for previous updates.
Secrets: Changed a lot of int16s for stat-related functions to int32 because they were causing combat formula overflows (int16/int32 mismatch).
Secrets: Linux fix?
== 11/02/2014 ==
Akkadius: Added out of range checking for Spell Save/Loads
== 11/01/2014 ==
Trevius: Fixed potential crash related to Pets/Mercs buffs when targeting themselves.
JJ: (noudess) Revamped faction system. See https://github.com/EQEmu/Server/pull/256
== 10/28/2014 ==
Uleat: Added Client::InterrogateInventory(). Can be invoked by #interrogateinv and is also called when Handle_OP_MoveItem() calls for SwapItemResync()
== 10/22/2014 ==
Uleat: Fix for stacking items in a world object..added a new command option: #peekinv world - will show world container contents, if one is in use by target.
== 10/20/2014 ==
demonstar55: Inspect Buffs rank 1 will now show NPC buffs in target window (SoD+)
== 10/19/2014 ==
Uleat: Updated command #peekinv to display item links properly in RoF clients
demonstar55: Group Mentoring in raids
demonstar55: Inspect Buffs (text only version) works in raid groups
demonstar55: Make use of the Inspect Buffs op/packet. 62 SOL until someone finds its op
== 10/18/2014==
demonstar55: Implement group mentor, sharing leadership exp (SoF+ only)
demonstar55: Add gaining of group leadership while in raids
== 10/16/2014 ==
Uleat: Fixed the auto-conversion view naming error and renamed the views in the script files. Added a fix sql for databases that auto-converted.
Fix SQL: ../sql/git/bots/deprecated/2014_10_16_Lower_Case_View_Fix.sql
== 10/15/2014 ==
Uleat: Cleaned up load/drop bots sqls, added '../utils/sql/git/bots/deprecated' and '../deprecated/load_bots_old.sql' (use this file on pre-player blob conversion databases.)
Notes: I modifed the behavior of both load and drop bots to fail on the first operation if their modifications have been performed already.
'load_bots.sql' will explicitly add bot schema, while 'drop_bots.sql' will explicitly drop it. I also added a few lines to change
a few altered tables back to their original state - as of the date in the file.
== 10/13/2014 ==
demonstar55: Partially implement leadership and raids
Currently working: client side only effects and stat bonuses.
Not working: Mark NPC, and other stuff that need extra server side support
Currently only UF tested (Tit and 62 may just work, others need packet work)
== 10/12/2014 ==
Akkadius: Fix for LDON Character Stat load
== 10/11/2014 ==
demonstar55: Implement Raid MOTD for UF
Don't forget 2014_10_11_RaidMOTD.sql!
== 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)
+19 -4
View File
@@ -8,7 +8,6 @@ SET(common_sources
crc16.cpp
crc32.cpp
database.cpp
dbasync.cpp
dbcore.cpp
debug.cpp
emu_opcodes.cpp
@@ -56,8 +55,9 @@ SET(common_sources
rulesys.cpp
serverinfo.cpp
shareddb.cpp
skills.cpp
spdat.cpp
string_util.cpp
string_util.cpp
struct_strategy.cpp
tcp_connection.cpp
tcp_server.cpp
@@ -72,6 +72,7 @@ SET(common_sources
patches/sod.cpp
patches/sof.cpp
patches/rof.cpp
patches/rof2.cpp
patches/titanium.cpp
patches/underfoot.cpp
SocketLib/Base64.cpp
@@ -103,8 +104,8 @@ SET(common_headers
crash.h
crc16.h
crc32.h
data_verification.h
database.h
dbasync.h
dbcore.h
debug.h
deity.h
@@ -168,6 +169,7 @@ SET(common_headers
ptimer.h
queue.h
races.h
random.h
rdtsc.h
rulesys.h
ruletypes.h
@@ -216,6 +218,11 @@ SET(common_headers
patches/rof_itemfields.h
patches/rof_ops.h
patches/rof_structs.h
patches/rof2.h
patches/rof2_constants.h
patches/rof2_itemfields.h
patches/rof2_ops.h
patches/rof2_structs.h
patches/titanium.h
patches/titanium_constants.h
patches/titanium_itemfields.h
@@ -269,6 +276,11 @@ SOURCE_GROUP(Patches FILES
patches/rof_ops.h
patches/rof_constants.h
patches/rof_structs.h
patches/rof2.h
patches/rof2_itemfields.h
patches/rof2_ops.h
patches/rof2_constants.h
patches/rof2_structs.h
patches/titanium.h
patches/titanium_itemfields.h
patches/titanium_ops.h
@@ -284,6 +296,7 @@ SOURCE_GROUP(Patches FILES
patches/sod.cpp
patches/sof.cpp
patches/rof.cpp
patches/rof2.cpp
patches/titanium.cpp
patches/underfoot.cpp
)
@@ -334,7 +347,9 @@ 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("SocketLib/Mime.cpp" PROPERTY COMPILE_FLAGS -Wno-unused-result)
SET_SOURCE_FILES_PROPERTIES("patches/sod.cpp" "patches/sof.cpp" "patches/rof.cpp" "patches/rof2.cpp" "patches/underfoot.cpp" PROPERTIES COMPILE_FLAGS -O0)
ENDIF(UNIX)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
-47
View File
@@ -290,50 +290,3 @@ const char* GetEQClassName(uint8 class_, uint8 level) {
}
}
uint32 GetArrayEQClass(uint8 eqclass) {
switch (eqclass) {
case WARRIOR:
return WARRIOR;
case CLERIC:
return CLERIC;
case PALADIN:
return PALADIN;
case RANGER:
return RANGER;
case SHADOWKNIGHT:
return SHADOWKNIGHT;
case DRUID:
return DRUID;
case MONK:
return MONK;
case BARD:
return BARD;
case ROGUE:
return ROGUE;
case SHAMAN:
return SHAMAN;
case NECROMANCER:
return NECROMANCER;
case WIZARD:
return WIZARD;
case MAGICIAN:
return MAGICIAN;
case ENCHANTER:
return ENCHANTER;
case BEASTLORD:
return BEASTLORD;
case BERSERKER:
return BERSERKER;
default:
return 0;
}
}
uint8 GetEQArrayEQClass(uint8 eqclass) {
if (eqclass >= WARRIOR && eqclass <= BERSERKER)
return eqclass - WARRIOR;
if (eqclass >= WARRIORGM && eqclass <= BERSERKERGM)
return eqclass - WARRIORGM;
return WARRIOR;
}
-2
View File
@@ -86,7 +86,5 @@
#define call_1 65536
const char* GetEQClassName(uint8 class_, uint8 level = 0);
uint32 GetArrayEQClass(uint8 eqclass);
uint8 GetEQArrayEQClass(uint8 eqclass);
#endif
+39 -5
View File
@@ -17,7 +17,8 @@ static const uint32 BIT_RoFAndLater = 0xFFFFFFE0;
static const uint32 BIT_RoF2AndLater = 0xFFFFFFC0;
static const uint32 BIT_AllClients = 0xFFFFFFFF;
typedef enum {
typedef enum
{
EQClientUnknown = 0,
EQClient62, // Build: 'Aug 4 2005 15:40:59'
EQClientTitanium, // Build: 'Oct 31 2005 10:33:37'
@@ -26,17 +27,50 @@ typedef enum {
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 */
+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
+2269 -548
View File
File diff suppressed because it is too large Load Diff
+429 -23
View File
@@ -26,12 +26,6 @@
#include "dbcore.h"
#include "linked_list.h"
#include "eq_packet_structs.h"
/*#include "eq_stream.h"
#include "guilds.h"
#include "misc_functions.h"
#include "mutex.h"
#include "item.h"
#include "extprofile.h"*/
#include <string>
#include <vector>
#include <map>
@@ -47,6 +41,7 @@ class SpawnGroupList;
class Petition;
class Client;
class Merc;
class MySQLRequestResult;
struct Combine_Struct;
//struct Faction;
//struct FactionMods;
@@ -74,21 +69,15 @@ uint8 eventid;
EventLogDetails_Struct eld[255];
};
// Added By Hogie
// INSERT into variables (varname,value) values('decaytime [minlevel] [maxlevel]','[number of seconds]');
// IE: decaytime 1 54 = Levels 1 through 54
// decaytime 55 100 = Levels 55 through 100
// It will always put the LAST time for the level (I think) from the Database
struct npcDecayTimes_Struct {
uint16 minlvl;
uint16 maxlvl;
uint32 seconds;
};
// Added By Hogie -- End
struct VarCache_Struct {
char varname[26]; // varname is char(25) in database
char varname[26];
char value[0];
};
@@ -99,6 +88,411 @@ struct ExtendedProfile_Struct;
struct GuildMember_Struct;
class PTimerList;
#pragma pack(1)
/* Conversion Structs */
namespace Convert {
struct BindStruct {
/*000*/ uint32 zoneId;
/*004*/ float x;
/*008*/ float y;
/*012*/ float z;
/*016*/ float heading;
};
struct Color_Struct
{
union
{
struct
{
uint8 blue;
uint8 green;
uint8 red;
uint8 use_tint; // if there's a tint this is FF
} rgb;
uint32 color;
};
};
struct AA_Array
{
uint32 AA;
uint32 value;
};
struct SpellBuff_Struct
{
/*000*/ uint8 slotid; //badly named... seems to be 2 for a real buff, 0 otherwise
/*001*/ uint8 level;
/*002*/ uint8 bard_modifier;
/*003*/ uint8 effect; //not real
/*004*/ uint32 spellid;
/*008*/ uint32 duration;
/*012*/ uint32 counters;
/*016*/ uint32 player_id; //'global' ID of the caster, for wearoff messages
/*020*/
};
struct Tribute_Struct {
uint32 tribute;
uint32 tier;
};
struct Disciplines_Struct {
uint32 values[MAX_PP_DISCIPLINES];
};
struct GroupLeadershipAA_Struct {
union {
struct {
uint32 groupAAMarkNPC;
uint32 groupAANPCHealth;
uint32 groupAADelegateMainAssist;
uint32 groupAADelegateMarkNPC;
uint32 groupAA4;
uint32 groupAA5;
uint32 groupAAInspectBuffs;
uint32 groupAA7;
uint32 groupAASpellAwareness;
uint32 groupAAOffenseEnhancement;
uint32 groupAAManaEnhancement;
uint32 groupAAHealthEnhancement;
uint32 groupAAHealthRegeneration;
uint32 groupAAFindPathToPC;
uint32 groupAAHealthOfTargetsTarget;
uint32 groupAA15;
};
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
};
};
struct RaidLeadershipAA_Struct {
union {
struct {
uint32 raidAAMarkNPC;
uint32 raidAANPCHealth;
uint32 raidAADelegateMainAssist;
uint32 raidAADelegateMarkNPC;
uint32 raidAA4;
uint32 raidAA5;
uint32 raidAA6;
uint32 raidAASpellAwareness;
uint32 raidAAOffenseEnhancement;
uint32 raidAAManaEnhancement;
uint32 raidAAHealthEnhancement;
uint32 raidAAHealthRegeneration;
uint32 raidAAFindPathToPC;
uint32 raidAAHealthOfTargetsTarget;
uint32 raidAA14;
uint32 raidAA15;
};
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
};
};
struct LeadershipAA_Struct {
union {
struct {
Convert::GroupLeadershipAA_Struct group;
Convert::RaidLeadershipAA_Struct raid;
};
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
};
};
typedef struct
{
/*00*/ char Name[64];
/*64*/ uint32 Level;
/*68*/ uint32 Race;
/*72*/ uint32 Class;
/*76*/ uint32 Zone;
/*80*/ uint32 Time;
/*84*/ uint32 Points;
/*88*/
} PVPStatsEntry_Struct;
struct BandolierItem_Struct {
uint32 item_id;
uint32 icon;
char item_name[64];
};
struct Bandolier_Struct {
char name[32];
Convert::BandolierItem_Struct items[EmuConstants::BANDOLIER_SIZE];
};
struct PotionBelt_Struct {
Convert::BandolierItem_Struct items[EmuConstants::POTION_BELT_SIZE];
};
struct SuspendedMinion_Struct
{
/*000*/ uint16 SpellID;
/*002*/ uint32 HP;
/*006*/ uint32 Mana;
/*010*/ Convert::SpellBuff_Struct Buffs[BUFF_COUNT];
/*510*/ uint32 Items[_MaterialCount];
/*546*/ char Name[64];
/*610*/
};
struct PlayerProfile_Struct {
/*0000*/ uint32 checksum; // Checksum from CRC32::SetEQChecksum
/*0004*/ char name[64]; // Name of player sizes not right
/*0068*/ char last_name[32]; // Last name of player sizes not right
/*0100*/ uint32 gender; // Player Gender - 0 Male, 1 Female
/*0104*/ uint32 race; // Player race
/*0108*/ uint32 class_; // Player class
/*0112*/ uint32 unknown0112; //
/*0116*/ uint32 level; // Level of player (might be one byte)
/*0120*/ Convert::BindStruct binds[5]; // Bind points (primary is first, home city is fifth)
/*0220*/ uint32 deity; // deity
/*0224*/ uint32 guild_id;
/*0228*/ uint32 birthday; // characters bday
/*0232*/ uint32 lastlogin; // last login or zone time
/*0236*/ uint32 timePlayedMin; // in minutes
/*0240*/ uint8 pvp;
/*0241*/ uint8 level2; //no idea why this is here, but thats how it is on live
/*0242*/ uint8 anon; // 2=roleplay, 1=anon, 0=not anon
/*0243*/ uint8 gm;
/*0244*/ uint8 guildrank;
/*0245*/ uint8 guildbanker;
/*0246*/ uint8 unknown0246[6]; //
/*0252*/ uint32 intoxication;
/*0256*/ uint32 spellSlotRefresh[MAX_PP_REF_MEMSPELL]; //in ms
/*0292*/ uint32 abilitySlotRefresh;
/*0296*/ uint8 haircolor; // Player hair color
/*0297*/ uint8 beardcolor; // Player beard color
/*0298*/ uint8 eyecolor1; // Player left eye color
/*0299*/ uint8 eyecolor2; // Player right eye color
/*0300*/ uint8 hairstyle; // Player hair style
/*0301*/ uint8 beard; // Beard type
/*0302*/ uint8 ability_time_seconds; //The following four spots are unknown right now.....
/*0303*/ uint8 ability_number; //ability used
/*0304*/ uint8 ability_time_minutes;
/*0305*/ uint8 ability_time_hours; //place holder
/*0306*/ uint8 unknown0306[6]; // @bp Spacer/Flag?
/*0312*/ uint32 item_material[_MaterialCount]; // Item texture/material of worn/held items
/*0348*/ uint8 unknown0348[44];
/*0392*/ Convert::Color_Struct item_tint[_MaterialCount];
/*0428*/ Convert::AA_Array aa_array[MAX_PP_AA_ARRAY];
/*2348*/ float unknown2384; //seen ~128, ~47
/*2352*/ char servername[32]; // length probably not right
/*2384*/ char title[32]; // length might be wrong
/*2416*/ char suffix[32]; // length might be wrong
/*2448*/ uint32 guildid2; //
/*2452*/ uint32 exp; // Current Experience
/*2456*/ uint32 unknown2492;
/*2460*/ uint32 points; // Unspent Practice points
/*2464*/ uint32 mana; // current mana
/*2468*/ uint32 cur_hp; // current hp
/*2472*/ uint32 unknown2508; // 0x05
/*2476*/ uint32 STR; // Strength
/*2480*/ uint32 STA; // Stamina
/*2484*/ uint32 CHA; // Charisma
/*2488*/ uint32 DEX; // Dexterity
/*2492*/ uint32 INT; // Intelligence
/*2496*/ uint32 AGI; // Agility
/*2500*/ uint32 WIS; // Wisdom
/*2504*/ uint8 face; // Player face
/*2505*/ uint8 unknown2541[47]; // ?
/*2552*/ uint8 languages[MAX_PP_LANGUAGE];
/*2580*/ uint8 unknown2616[4];
/*2584*/ uint32 spell_book[MAX_PP_REF_SPELLBOOK];
/*4504*/ uint8 unknown4540[128]; // Was [428] all 0xff
/*4632*/ uint32 mem_spells[MAX_PP_REF_MEMSPELL];
/*4668*/ uint8 unknown4704[32]; //
/*4700*/ float y; // Player y position
/*4704*/ float x; // Player x position
/*4708*/ float z; // Player z position
/*4712*/ float heading; // Direction player is facing
/*4716*/ uint8 unknown4752[4]; //
/*4720*/ int32 platinum; // Platinum Pieces on player
/*4724*/ int32 gold; // Gold Pieces on player
/*4728*/ int32 silver; // Silver Pieces on player
/*4732*/ int32 copper; // Copper Pieces on player
/*4736*/ int32 platinum_bank; // Platinum Pieces in Bank
/*4740*/ int32 gold_bank; // Gold Pieces in Bank
/*4744*/ int32 silver_bank; // Silver Pieces in Bank
/*4748*/ int32 copper_bank; // Copper Pieces in Bank
/*4752*/ int32 platinum_cursor; // Platinum on cursor
/*4756*/ int32 gold_cursor; // Gold on cursor
/*4760*/ int32 silver_cursor; // Silver on cursor
/*4764*/ int32 copper_cursor; // Copper on cursor
/*4768*/ int32 platinum_shared; // Platinum shared between characters
/*4772*/ uint8 unknown4808[24];
/*4796*/ uint32 skills[MAX_PP_SKILL]; // [400] List of skills // 100 dword buffer
/*5196*/ uint8 unknown5132[184];
/*5380*/ uint32 pvp2; //
/*5384*/ uint32 unknown5420; //
/*5388*/ uint32 pvptype; //
/*5392*/ uint32 unknown5428; //
/*5396*/ uint32 ability_down; // Guessing
/*5400*/ uint8 unknown5436[8]; //
/*5408*/ uint32 autosplit; //not used right now
/*5412*/ uint8 unknown5448[8];
/*5420*/ uint32 zone_change_count; // Number of times user has zoned in their career (guessing)
/*5424*/ uint8 unknown5460[16]; //
/*5440*/ uint32 drakkin_heritage; //
/*5444*/ uint32 drakkin_tattoo; //
/*5448*/ uint32 drakkin_details; //
/*5452*/ uint32 expansions; // expansion setting, bit field of expansions avaliable
/*5456*/ int32 toxicity; //from drinking potions, seems to increase by 3 each time you drink
/*5460*/ char unknown5496[16]; //
/*5476*/ int32 hunger_level;
/*5480*/ int32 thirst_level;
/*5484*/ uint32 ability_up;
/*5488*/ char unknown5524[16];
/*5504*/ uint16 zone_id; // Current zone of the player
/*5506*/ uint16 zoneInstance; // Instance ID
/*5508*/ Convert::SpellBuff_Struct buffs[BUFF_COUNT]; // Buffs currently on the player
/*6008*/ char groupMembers[6][64];//
/*6392*/ char unknown6428[656];
/*7048*/ uint32 entityid;
/*7052*/ uint32 leadAAActive;
/*7056*/ uint32 unknown7092;
/*7060*/ int32 ldon_points_guk; //client uses these as signed
/*7064*/ int32 ldon_points_mir;
/*7068*/ int32 ldon_points_mmc;
/*7072*/ int32 ldon_points_ruj;
/*7076*/ int32 ldon_points_tak;
/*7080*/ int32 ldon_points_available;
/*7084*/ int32 ldon_wins_guk;
/*7088*/ int32 ldon_wins_mir;
/*7092*/ int32 ldon_wins_mmc;
/*7096*/ int32 ldon_wins_ruj;
/*7100*/ int32 ldon_wins_tak;
/*7104*/ int32 ldon_losses_guk;
/*7108*/ int32 ldon_losses_mir;
/*7112*/ int32 ldon_losses_mmc;
/*7116*/ int32 ldon_losses_ruj;
/*7120*/ int32 ldon_losses_tak;
/*7124*/ uint8 unknown7160[72];
/*7196*/ uint32 tribute_time_remaining; //in miliseconds
/*7200*/ uint32 showhelm;
/*7204*/ uint32 career_tribute_points;
/*7208*/ uint32 unknown7244;
/*7212*/ uint32 tribute_points;
/*7216*/ uint32 unknown7252;
/*7220*/ uint32 tribute_active; //1=active
/*7224*/ Convert::Tribute_Struct tributes[EmuConstants::TRIBUTE_SIZE];
/*7264*/ Convert::Disciplines_Struct disciplines;
/*7664*/ uint32 recastTimers[MAX_RECAST_TYPES]; // Timers (GMT of last use)
/*7744*/ char unknown7780[160];
/*7904*/ uint32 endurance;
/*7908*/ uint32 group_leadership_exp; //0-1000
/*7912*/ uint32 raid_leadership_exp; //0-2000
/*7916*/ uint32 group_leadership_points;
/*7920*/ uint32 raid_leadership_points;
/*7924*/ Convert::LeadershipAA_Struct leader_abilities;
/*8052*/ uint8 unknown8088[132];
/*8184*/ uint32 air_remaining;
/*8188*/ uint32 PVPKills;
/*8192*/ uint32 PVPDeaths;
/*8196*/ uint32 PVPCurrentPoints;
/*8200*/ uint32 PVPCareerPoints;
/*8204*/ uint32 PVPBestKillStreak;
/*8208*/ uint32 PVPWorstDeathStreak;
/*8212*/ uint32 PVPCurrentKillStreak;
/*8216*/ Convert::PVPStatsEntry_Struct PVPLastKill;
/*8304*/ Convert::PVPStatsEntry_Struct PVPLastDeath;
/*8392*/ uint32 PVPNumberOfKillsInLast24Hours;
/*8396*/ Convert::PVPStatsEntry_Struct PVPRecentKills[50];
/*12796*/ uint32 aapoints_spent;
/*12800*/ uint32 expAA;
/*12804*/ uint32 aapoints; //avaliable, unspent
/*12808*/ uint8 unknown12844[36];
/*12844*/ Convert::Bandolier_Struct bandoliers[EmuConstants::BANDOLIERS_COUNT];
/*14124*/ uint8 unknown14160[4506];
/*18630*/ Convert::SuspendedMinion_Struct SuspendedMinion; // No longer in use
/*19240*/ uint32 timeentitledonaccount;
/*19244*/ Convert::PotionBelt_Struct potionbelt; //there should be 3 more of these
/*19532*/ uint8 unknown19568[8];
/*19540*/ uint32 currentRadCrystals; // Current count of radiant crystals
/*19544*/ uint32 careerRadCrystals; // Total count of radiant crystals ever
/*19548*/ uint32 currentEbonCrystals;// Current count of ebon crystals
/*19552*/ uint32 careerEbonCrystals; // Total count of ebon crystals ever
/*19556*/ uint8 groupAutoconsent; // 0=off, 1=on
/*19557*/ uint8 raidAutoconsent; // 0=off, 1=on
/*19558*/ uint8 guildAutoconsent; // 0=off, 1=on
/*19559*/ uint8 unknown19595[5]; // ***Placeholder (6/29/2005)
/*19564*/ uint32 RestTimer;
/*19568*/
};
namespace player_lootitem_temp
{
struct ServerLootItem_Struct_temp {
uint32 item_id;
int16 equipSlot;
uint8 charges;
uint16 lootslot;
uint32 aug1;
uint32 aug2;
uint32 aug3;
uint32 aug4;
uint32 aug5;
};
}
struct DBPlayerCorpse_Struct_temp {
uint32 crc;
bool locked;
uint32 itemcount;
uint32 exp;
float size;
uint8 level;
uint8 race;
uint8 gender;
uint8 class_;
uint8 deity;
uint8 texture;
uint8 helmtexture;
uint32 copper;
uint32 silver;
uint32 gold;
uint32 plat;
Color_Struct item_tint[9];
uint8 haircolor;
uint8 beardcolor;
uint8 eyecolor1;
uint8 eyecolor2;
uint8 hairstyle;
uint8 face;
uint8 beard;
uint32 drakkin_heritage;
uint32 drakkin_tattoo;
uint32 drakkin_details;
player_lootitem_temp::ServerLootItem_Struct_temp items[0];
};
namespace classic_db_temp {
struct DBPlayerCorpse_Struct_temp {
uint32 crc;
bool locked;
uint32 itemcount;
uint32 exp;
float size;
uint8 level;
uint8 race;
uint8 gender;
uint8 class_;
uint8 deity;
uint8 texture;
uint8 helmtexture;
uint32 copper;
uint32 silver;
uint32 gold;
uint32 plat;
Color_Struct item_tint[9];
uint8 haircolor;
uint8 beardcolor;
uint8 eyecolor1;
uint8 eyecolor2;
uint8 hairstyle;
uint8 face;
uint8 beard;
player_lootitem_temp::ServerLootItem_Struct_temp items[0];
};
}
}
#pragma pack()
class Database : public DBcore {
public:
Database();
@@ -106,9 +500,14 @@ public:
bool Connect(const char* host, const char* user, const char* passwd, const char* database,uint32 port);
~Database();
/*
* 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 +517,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
@@ -175,8 +573,7 @@ public:
* Adventure related.
*/
void UpdateAdventureStatsEntry(uint32 char_id, uint8 theme, bool win);
bool GetAdventureStats(uint32 char_id, uint32 &guk_w, uint32 &mir_w, uint32 &mmc_w, uint32 &ruj_w, uint32 &tak_w,
uint32 &guk_l, uint32 &mir_l, uint32 &mmc_l, uint32 &ruj_l, uint32 &tak_l);
bool GetAdventureStats(uint32 char_id, AdventureStats_Struct *as);
/*
* Account Related
@@ -205,7 +602,7 @@ public:
void SetGroupLeaderName(uint32 gid, const char* name);
char* GetGroupLeadershipInfo(uint32 gid, char* leaderbuf, char* maintank = nullptr, char* assist = nullptr, char* puller = nullptr, char *marknpc = nullptr,
GroupLeadershipAA_Struct* GLAA = nullptr);
char *mentoree = nullptr, int *mentor_percent = nullptr, GroupLeadershipAA_Struct* GLAA = nullptr);
void ClearGroupLeader(uint32 gid = 0);
@@ -216,6 +613,18 @@ public:
void ClearRaidDetails(uint32 rid = 0);
uint32 GetRaidID(const char* name);
const char *GetRaidLeaderName(uint32 rid);
void GetGroupLeadershipInfo(uint32 gid, uint32 rid, char* maintank = nullptr, char* assist = nullptr, char* puller = nullptr, char *marknpc = nullptr,
char *mentoree = nullptr, int *mentor_percent = nullptr, GroupLeadershipAA_Struct* GLAA = nullptr);
void GetRaidLeadershipInfo(uint32 rid, char* maintank = nullptr, char* assist = nullptr, char* puller = nullptr, char *marknpc = nullptr,
RaidLeadershipAA_Struct* RLAA = nullptr);
void SetRaidGroupLeaderInfo(uint32 gid, uint32 rid);
void ClearRaidLeader(uint32 gid = 0xFFFFFFFF, uint32 rid = 0);
/* Database Conversions*/
bool CheckDatabaseConversions();
bool CheckDatabaseConvertPPDeblob();
bool CheckDatabaseConvertCorpseDeblob();
bool CheckDatabaseConvertBotsPostPPDeblob();
/*
* Database Variables
@@ -250,10 +659,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();
@@ -277,6 +682,7 @@ private:
*/
void ClearAllRaids();
void ClearAllRaidDetails();
void ClearAllRaidLeaders();
};
#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/misc_functions.h"
#include "string_util.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
+20 -87
View File
@@ -4,6 +4,7 @@
#include <winsock2.h>
#endif
#include <fstream>
#include <iostream>
#include <errmsg.h>
#include <mysqld_error.h>
@@ -113,6 +114,16 @@ MySQLRequestResult DBcore::QueryDatabase(const char* query, uint32 querylen, boo
#ifdef _EQDEBUG
std::cout << "DB Query Error #" << mysql_errno(&mysql) << ": " << mysql_error(&mysql) << std::endl;
#endif
/* Implement Logging at the Root */
if (mysql_errno(&mysql) > 0 && strlen(query) > 0){
std::cout << "\n[MYSQL ERR] " << mysql_errno(&mysql) << ": " << mysql_error(&mysql) << " [Query]: \n" << query << "\n" << std::endl;
/* Write to log file */
std::ofstream log("eqemu_query_error_log.txt", std::ios_base::app | std::ios_base::out);
log << "[MYSQL ERR] " << mysql_error(&mysql) << "\n" << query << "\n";
log.close();
}
return MySQLRequestResult(nullptr, 0, 0, 0, 0, mysql_errno(&mysql),errorBuffer);
}
@@ -126,7 +137,6 @@ MySQLRequestResult DBcore::QueryDatabase(const char* query, uint32 querylen, boo
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())
{
@@ -145,93 +155,16 @@ MySQLRequestResult DBcore::QueryDatabase(const char* query, uint32 querylen, boo
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;
if (errbuf)
errbuf[0] = 0;
bool ret = false;
LockMutex lock(&MDatabase);
if (pStatus != Connected)
Open();
void DBcore::TransactionBegin() {
QueryDatabase("START TRANSACTION");
}
if (mysql_real_query(&mysql, query, querylen)) {
if (mysql_errno(&mysql) == CR_SERVER_GONE_ERROR)
pStatus = Error;
if (mysql_errno(&mysql) == CR_SERVER_LOST || mysql_errno(&mysql) == CR_SERVER_GONE_ERROR) {
if (retry) {
std::cout << "Database Error: Lost connection, attempting to recover...." << std::endl;
ret = RunQuery(query, querylen, errbuf, result, affected_rows, last_insert_id, errnum, false);
if (ret)
std::cout << "Reconnection to database successful." << std::endl;
}
else {
pStatus = Error;
if (errnum)
*errnum = mysql_errno(&mysql);
if (errbuf)
snprintf(errbuf, MYSQL_ERRMSG_SIZE, "#%i: %s", mysql_errno(&mysql), mysql_error(&mysql));
std::cout << "DB Query Error #" << mysql_errno(&mysql) << ": " << mysql_error(&mysql) << std::endl;
ret = false;
}
}
else {
if (errnum)
*errnum = mysql_errno(&mysql);
if (errbuf)
snprintf(errbuf, 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
ret = false;
}
}
else {
if (result && mysql_field_count(&mysql)) {
*result = mysql_store_result(&mysql);
#ifdef _EQDEBUG
DBMemLeak::Alloc(*result, query);
#endif
}
else if (result)
*result = 0;
if (affected_rows)
*affected_rows = mysql_affected_rows(&mysql);
if (last_insert_id)
*last_insert_id = (uint32)mysql_insert_id(&mysql);
if (result) {
if (*result) {
ret = true;
}
else {
#ifdef _EQDEBUG
std::cout << "DB Query Error: No Result" << std::endl;
#endif
if (errnum)
*errnum = UINT_MAX;
if (errbuf)
strcpy(errbuf, "DBcore::RunQuery: No Result");
ret = false;
}
}
else {
ret = true;
}
}
#if DEBUG_MYSQL_QUERIES >= 1
if (ret) {
std::cout << "query successful";
if (result && (*result))
std::cout << ", " << (int) mysql_num_rows(*result) << " rows returned";
if (affected_rows)
std::cout << ", " << (*affected_rows) << " rows affected";
std::cout<< std::endl;
}
else {
std::cout << "QUERY: query FAILED" << std::endl;
}
#endif
return ret;
void DBcore::TransactionCommit() {
QueryDatabase("COMMIT");
}
void DBcore::TransactionRollback() {
QueryDatabase("ROLLBACK");
}
uint32 DBcore::DoEscapeString(char* tobuf, const char* frombuf, uint32 fromlen) {
+3 -1
View File
@@ -23,9 +23,11 @@ public:
DBcore();
~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);
void TransactionBegin();
void TransactionCommit();
void TransactionRollback();
uint32 DoEscapeString(char* tobuf, const char* frombuf, uint32 fromlen);
void ping();
MYSQL* getMySQL(){ return &mysql; }
+10 -8
View File
@@ -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
+507 -502
View File
File diff suppressed because it is too large Load Diff
+24
View File
@@ -968,4 +968,28 @@ namespace legacy {
} InventorySlot;
}
#pragma pack(1) // will be used in packets as well as other inventory-related systems
struct ItemSlot_Struct
{
int16 indexMap;
int16 unknown02;
int16 indexMain;
int16 indexSub;
int16 indexAug;
int16 unknown01;
};
struct ItemSlotShort_Struct
{
int16 indexMain;
int16 indexSub;
int16 indexAug;
int16 unknown01;
};
#pragma pack()
static const uint32 MAX_SPELL_DB_ID_VAL = 65535;
#endif
+52 -32
View File
@@ -539,7 +539,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*Underfoot*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*RoF*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*NPC*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*Merc*/ EmuConstants::MAP_POSSESSIONS_SIZE,
@@ -554,7 +554,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ EmuConstants::MAP_BANK_SIZE,
/*Underfoot*/ EmuConstants::MAP_BANK_SIZE,
/*RoF*/ EmuConstants::MAP_BANK_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::MAP_BANK_SIZE,
/*NPC*/ NOT_USED,
/*Merc*/ NOT_USED,
@@ -569,7 +569,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ EmuConstants::MAP_SHARED_BANK_SIZE,
/*Underfoot*/ EmuConstants::MAP_SHARED_BANK_SIZE,
/*RoF*/ EmuConstants::MAP_SHARED_BANK_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::MAP_SHARED_BANK_SIZE,
/*NPC*/ NOT_USED,
/*Merc*/ NOT_USED,
@@ -584,7 +584,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ EmuConstants::MAP_TRADE_SIZE,
/*Underfoot*/ EmuConstants::MAP_TRADE_SIZE,
/*RoF*/ EmuConstants::MAP_TRADE_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::MAP_TRADE_SIZE,
/*NPC*/ 4,
/*Merc*/ 4,
@@ -599,7 +599,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ EmuConstants::MAP_WORLD_SIZE,
/*Underfoot*/ EmuConstants::MAP_WORLD_SIZE,
/*RoF*/ EmuConstants::MAP_WORLD_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::MAP_WORLD_SIZE,
/*NPC*/ NOT_USED,
/*Merc*/ NOT_USED,
@@ -614,7 +614,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ EmuConstants::MAP_LIMBO_SIZE,
/*Underfoot*/ EmuConstants::MAP_LIMBO_SIZE,
/*RoF*/ EmuConstants::MAP_LIMBO_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::MAP_LIMBO_SIZE,
/*NPC*/ NOT_USED,
/*Merc*/ NOT_USED,
@@ -629,7 +629,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ EmuConstants::MAP_TRIBUTE_SIZE,
/*Underfoot*/ EmuConstants::MAP_TRIBUTE_SIZE,
/*RoF*/ EmuConstants::MAP_TRIBUTE_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::MAP_TRIBUTE_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
@@ -644,7 +644,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_TROPHY_TRIBUTE_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::MAP_TROPHY_TRIBUTE_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
@@ -659,7 +659,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_GUILD_TRIBUTE_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::MAP_GUILD_TRIBUTE_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
@@ -674,7 +674,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_MERCHANT_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::MAP_MERCHANT_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
@@ -689,7 +689,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_DELETED_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::MAP_DELETED_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
@@ -704,7 +704,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ SoD::consts::MAP_CORPSE_SIZE,
/*Underfoot*/ Underfoot::consts::MAP_CORPSE_SIZE,
/*RoF*/ RoF::consts::MAP_CORPSE_SIZE,
/*RoF2*/ 0,
/*RoF2*/ RoF2::consts::MAP_CORPSE_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
@@ -719,7 +719,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ EmuConstants::MAP_BAZAAR_SIZE,
/*Underfoot*/ EmuConstants::MAP_BAZAAR_SIZE,
/*RoF*/ EmuConstants::MAP_BAZAAR_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::MAP_BAZAAR_SIZE,
/*NPC*/ 0, // this may need to be 'EmuConstants::MAP_BAZAAR_SIZE' if offline client traders respawn as an npc
/*Merc*/ 0,
@@ -734,7 +734,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ SoD::consts::MAP_INSPECT_SIZE,
/*Underfoot*/ Underfoot::consts::MAP_INSPECT_SIZE,
/*RoF*/ RoF::consts::MAP_INSPECT_SIZE,
/*RoF2*/ 0,
/*RoF2*/ RoF2::consts::MAP_INSPECT_SIZE,
/*NPC*/ NOT_USED,
/*Merc*/ NOT_USED,
@@ -749,7 +749,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_REAL_ESTATE_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::MAP_REAL_ESTATE_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
@@ -764,7 +764,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_VIEW_MOD_PC_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::MAP_VIEW_MOD_PC_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
@@ -779,7 +779,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_VIEW_MOD_BANK_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::MAP_VIEW_MOD_BANK_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
@@ -794,7 +794,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_VIEW_MOD_SHARED_BANK_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::MAP_VIEW_MOD_SHARED_BANK_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
@@ -809,7 +809,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_VIEW_MOD_LIMBO_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::MAP_VIEW_MOD_LIMBO_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
@@ -824,7 +824,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_ALT_STORAGE_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::MAP_ALT_STORAGE_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
@@ -839,7 +839,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_ARCHIVED_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::MAP_ARCHIVED_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
@@ -854,7 +854,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_MAIL_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::MAP_MAIL_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
@@ -869,7 +869,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_GUILD_TROPHY_TRIBUTE_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::MAP_GUILD_TROPHY_TRIBUTE_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
@@ -884,7 +884,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ NOT_USED,
/*Underfoot*/ NOT_USED,
/*RoF*/ EmuConstants::MAP_KRONO_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::MAP_KRONO_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
@@ -899,7 +899,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_OTHER_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::MAP_OTHER_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
@@ -1012,7 +1012,7 @@ bool EQLimits::AllowsEmptyBagInBag(uint32 version) {
/*SoD*/ SoD::limits::ALLOWS_EMPTY_BAG_IN_BAG,
/*Underfoot*/ Underfoot::limits::ALLOWS_EMPTY_BAG_IN_BAG,
/*RoF*/ RoF::limits::ALLOWS_EMPTY_BAG_IN_BAG,
/*RoF2*/ false,
/*RoF2*/ RoF2::limits::ALLOWS_EMPTY_BAG_IN_BAG,
/*NPC*/ false,
/*Merc*/ false,
@@ -1024,6 +1024,26 @@ bool EQLimits::AllowsEmptyBagInBag(uint32 version) {
//return local[ValidateMobVersion(version)];
}
bool EQLimits::AllowsClickCastFromBag(uint32 version) {
static const bool local[_EmuClientCount] = {
/*Unknown*/ false,
/*62*/ Client62::limits::ALLOWS_CLICK_CAST_FROM_BAG,
/*Titanium*/ Titanium::limits::ALLOWS_CLICK_CAST_FROM_BAG,
/*SoF*/ SoF::limits::ALLOWS_CLICK_CAST_FROM_BAG,
/*SoD*/ SoD::limits::ALLOWS_CLICK_CAST_FROM_BAG,
/*Underfoot*/ Underfoot::limits::ALLOWS_CLICK_CAST_FROM_BAG,
/*RoF*/ RoF::limits::ALLOWS_CLICK_CAST_FROM_BAG,
/*RoF2*/ RoF2::limits::ALLOWS_CLICK_CAST_FROM_BAG,
/*NPC*/ false,
/*Merc*/ false,
/*Bot*/ false,
/*Pet*/ false
};
return local[ValidateMobVersion(version)];
}
// items
uint16 EQLimits::ItemCommonSize(uint32 version) {
static const uint16 local[_EmuClientCount] = {
@@ -1034,7 +1054,7 @@ uint16 EQLimits::ItemCommonSize(uint32 version) {
/*SoD*/ EmuConstants::ITEM_COMMON_SIZE,
/*Underfoot*/ EmuConstants::ITEM_COMMON_SIZE,
/*RoF*/ EmuConstants::ITEM_COMMON_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::ITEM_COMMON_SIZE,
/*NPC*/ EmuConstants::ITEM_COMMON_SIZE,
/*Merc*/ EmuConstants::ITEM_COMMON_SIZE,
@@ -1054,7 +1074,7 @@ uint16 EQLimits::ItemContainerSize(uint32 version) {
/*SoD*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*Underfoot*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*RoF*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*NPC*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*Merc*/ EmuConstants::ITEM_CONTAINER_SIZE,
@@ -1074,7 +1094,7 @@ bool EQLimits::CoinHasWeight(uint32 version) {
/*SoD*/ SoD::limits::COIN_HAS_WEIGHT,
/*Underfoot*/ Underfoot::limits::COIN_HAS_WEIGHT,
/*RoF*/ RoF::limits::COIN_HAS_WEIGHT,
/*RoF2*/ true,
/*RoF2*/ RoF::limits::COIN_HAS_WEIGHT,
/*NPC*/ true,
/*Merc*/ true,
@@ -1094,7 +1114,7 @@ uint32 EQLimits::BandoliersCount(uint32 version) {
/*SoD*/ EmuConstants::BANDOLIERS_COUNT,
/*Underfoot*/ EmuConstants::BANDOLIERS_COUNT,
/*RoF*/ EmuConstants::BANDOLIERS_COUNT,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::BANDOLIERS_COUNT,
/*NPC*/ NOT_USED,
/*Merc*/ NOT_USED,
@@ -1114,7 +1134,7 @@ uint32 EQLimits::BandolierSize(uint32 version) {
/*SoD*/ EmuConstants::BANDOLIER_SIZE,
/*Underfoot*/ EmuConstants::BANDOLIER_SIZE,
/*RoF*/ EmuConstants::BANDOLIER_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::BANDOLIER_SIZE,
/*NPC*/ NOT_USED,
/*Merc*/ NOT_USED,
@@ -1134,7 +1154,7 @@ uint32 EQLimits::PotionBeltSize(uint32 version) {
/*SoD*/ EmuConstants::POTION_BELT_SIZE,
/*Underfoot*/ EmuConstants::POTION_BELT_SIZE,
/*RoF*/ EmuConstants::POTION_BELT_SIZE,
/*RoF2*/ 0,
/*RoF2*/ EmuConstants::POTION_BELT_SIZE,
/*NPC*/ NOT_USED,
/*Merc*/ NOT_USED,
+2 -1
View File
@@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "../common/patches/sod_constants.h"
#include "../common/patches/underfoot_constants.h"
#include "../common/patches/rof_constants.h"
//#include "../common/patches/rof2_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!! ***
@@ -184,6 +184,7 @@ public:
static uint64 CursorBitmask(uint32 version);
static bool AllowsEmptyBagInBag(uint32 version);
static bool AllowsClickCastFromBag(uint32 version);
// items
static uint16 ItemCommonSize(uint32 version);
+9 -6
View File
@@ -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; }
};
+156 -53
View File
@@ -478,7 +478,11 @@ struct CastSpell_Struct
uint32 spell_id;
uint32 inventoryslot; // slot for clicky item, 0xFFFF = normal cast
uint32 target_id;
uint8 cs_unknown[4];
uint32 cs_unknown1;
uint32 cs_unknown2;
float y_pos;
float x_pos;
float z_pos;
};
struct SpellEffect_Struct
@@ -534,7 +538,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;
@@ -597,8 +601,8 @@ struct GMTrainee_Struct
{
/*000*/ uint32 npcid;
/*004*/ uint32 playerid;
/*008*/ uint32 skills[73];
/*300*/ uint8 unknown300[148];
/*008*/ uint32 skills[PACKET_SKILL_ARRAY_SIZE];
/*408*/ uint8 unknown408[40];
/*448*/
};
@@ -689,7 +693,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;
};
/*
@@ -759,14 +763,62 @@ struct MovePotionToBelt_Struct {
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
static const uint32 MAX_RAID_LEADERSHIP_AA_ARRAY = 16;
static const uint32 MAX_LEADERSHIP_AA_ARRAY = (MAX_GROUP_LEADERSHIP_AA_ARRAY+MAX_RAID_LEADERSHIP_AA_ARRAY);
struct LeadershipAA_Struct {
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
};
struct GroupLeadershipAA_Struct {
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
union {
struct {
uint32 groupAAMarkNPC;
uint32 groupAANPCHealth;
uint32 groupAADelegateMainAssist;
uint32 groupAADelegateMarkNPC;
uint32 groupAA4;
uint32 groupAA5;
uint32 groupAAInspectBuffs;
uint32 groupAA7;
uint32 groupAASpellAwareness;
uint32 groupAAOffenseEnhancement;
uint32 groupAAManaEnhancement;
uint32 groupAAHealthEnhancement;
uint32 groupAAHealthRegeneration;
uint32 groupAAFindPathToPC;
uint32 groupAAHealthOfTargetsTarget;
uint32 groupAA15;
};
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
};
};
struct RaidLeadershipAA_Struct {
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
union {
struct {
uint32 raidAAMarkNPC;
uint32 raidAANPCHealth;
uint32 raidAADelegateMainAssist;
uint32 raidAADelegateMarkNPC;
uint32 raidAA4;
uint32 raidAA5;
uint32 raidAA6;
uint32 raidAASpellAwareness;
uint32 raidAAOffenseEnhancement;
uint32 raidAAManaEnhancement;
uint32 raidAAHealthEnhancement;
uint32 raidAAHealthRegeneration;
uint32 raidAAFindPathToPC;
uint32 raidAAHealthOfTargetsTarget;
uint32 raidAA14;
uint32 raidAA15;
};
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
};
};
struct LeadershipAA_Struct {
union {
struct {
GroupLeadershipAA_Struct group;
RaidLeadershipAA_Struct raid;
};
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
};
};
/**
@@ -779,17 +831,18 @@ struct BindStruct {
/*008*/ float y;
/*012*/ float z;
/*016*/ float heading;
/*020*/
/*020*/ uint32 instance_id;
/*024*/
};
struct SuspendedMinion_Struct
{
/*000*/ uint16 SpellID;
/*002*/ uint32 HP;
/*006*/ uint32 Mana;
/*010*/ SpellBuff_Struct Buffs[BUFF_COUNT];
/*510*/ uint32 Items[_MaterialCount];
/*546*/ char Name[64];
/*000*/ uint16 SpellID;
/*002*/ uint32 HP;
/*006*/ uint32 Mana;
/*010*/ SpellBuff_Struct Buffs[BUFF_COUNT];
/*510*/ uint32 Items[_MaterialCount];
/*546*/ char Name[64];
/*610*/
};
@@ -800,10 +853,13 @@ 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_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size
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 = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
static const uint32 MAX_PP_AA_ARRAY = 240;
static const uint32 MAX_GROUP_MEMBERS = 6;
static const uint32 MAX_RECAST_TYPES = 20;
@@ -880,7 +936,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
@@ -919,9 +975,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
@@ -1446,17 +1502,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
@@ -1464,16 +1521,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 forwards it on to the server for handling/future use)
// 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;
/*0000*/ uint32 from_slot;
/*0004*/ uint32 to_slot;
/*0008*/ uint32 number_in_stack;
/*0012*/
};
//
@@ -2177,6 +2236,12 @@ struct GroupLeaderChange_Struct
/*128*/ char Unknown128[20];
};
struct GroupMentor_Struct {
/*000*/ int percent;
/*004*/ char name[64];
/*068*/
};
struct FaceChange_Struct {
/*000*/ uint8 haircolor;
/*001*/ uint8 beardcolor;
@@ -2599,6 +2664,17 @@ struct Translocate_Struct {
/*088*/ uint32 Complete;
};
struct PendingTranslocate_Struct
{
uint32 zone_id;
uint16 instance_id;
float heading;
float x;
float y;
float z;
uint32 spell_id;
};
struct Sacrifice_Struct {
/*000*/ uint32 CasterID;
/*004*/ uint32 TargetID;
@@ -3397,7 +3473,7 @@ struct Split_Struct
*/
struct NewCombine_Struct {
/*00*/ int16 container_slot;
/*02*/ char unknown02[2];
/*02*/ int16 guildtribute_slot;
/*04*/
};
@@ -3908,6 +3984,11 @@ struct MarkNPC_Struct
/*08**/ char Name[64];
};
struct InspectBuffs_Struct {
/*000*/ uint32 spell_id[BUFF_COUNT];
/*100*/ uint32 tics_remaining[BUFF_COUNT];
};
struct RaidGeneral_Struct {
/*00*/ uint32 action; //=10
/*04*/ char player_name[64]; //should both be the player's name
@@ -3923,6 +4004,19 @@ struct RaidAddMember_Struct {
/*139*/ uint8 flags[5]; //no idea if these are needed...
};
struct RaidMOTD_Struct {
/*000*/ RaidGeneral_Struct general; // leader_name and action only used
/*136*/ char motd[0]; // max size is 1024, but reply is variable
};
struct RaidLeadershipUpdate_Struct {
/*000*/ uint32 action;
/*004*/ char player_name[64];
/*068*/ char leader_name[64];
/*132*/ GroupLeadershipAA_Struct group; //unneeded
/*196*/ RaidLeadershipAA_Struct raid;
/*260*/ char Unknown260[128]; //unverified
};
struct RaidAdd_Struct {
/*000*/ uint32 action; //=0
@@ -4064,7 +4158,7 @@ struct GroupInvite_Struct {
// uint8 unknown128[65];
};
struct BuffFadeMsg_Struct {
struct ColoredText_Struct {
uint32 color;
char msg[1];
};
@@ -4261,6 +4355,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
@@ -4294,14 +4395,14 @@ typedef struct {
struct ControlBoat_Struct {
/*000*/ uint32 boatId; // entitylist id of the boat
/*004*/ bool TakeControl; // 01 if taking control, 00 if releasing it
/*007*/ // no idea what these last three bytes represent
/*007*/ char unknown[3]; // no idea what these last three bytes represent
};
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*/ uint32 window; // window to display the information in
/*008*/ char augment_info[64]; // the reply has the text here
/*072*/
};
@@ -4589,11 +4690,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];
};
@@ -5106,17 +5209,17 @@ struct MercenaryMerchantResponse_Struct {
};
struct ServerLootItem_Struct {
uint32 item_id;
int16 equipSlot;
uint8 charges;
uint16 lootslot;
uint32 aug1;
uint32 aug2;
uint32 aug3;
uint32 aug4;
uint32 aug5;
uint8 minlevel;
uint8 maxlevel;
uint32 item_id; // uint32 item_id;
int16 equip_slot; // int16 equip_slot;
uint16 charges; // uint8 charges;
uint16 lootslot; // uint16 lootslot;
uint32 aug_1; // uint32 aug_1;
uint32 aug_2; // uint32 aug_2;
uint32 aug_3; // uint32 aug_3;
uint32 aug_4; // uint32 aug_4;
uint32 aug_5; // uint32 aug_5;
uint8 min_level; //
uint8 max_level; //
};
//Found in client near a ref to the string:
+6 -48
View File
@@ -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()
+17 -18
View File
@@ -21,7 +21,6 @@
#include "eq_packet_structs.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()
+3 -3
View File
@@ -47,7 +47,7 @@ const char *FactionValueToString(FACTION_VALUE fv) {
//o--------------------------------------------------------------
//| Name: CalculateFaction; rembrant, Dec. 16, 2001
//| Name: CalculateFaction; Dec. 16, 2001
//o--------------------------------------------------------------
//| Notes: Returns the faction message value.
//| Modify these values to taste.
@@ -69,7 +69,7 @@ FACTION_VALUE CalculateFaction(FactionMods* fm, int32 tmpCharacter_value)
return FACTION_INDIFFERENT;
}
// neotokyo: this function should check if some races have more than one race define
// this function should check if some races have more than one race define
bool IsOfEqualRace(int r1, int r2)
{
if (r1 == r2)
@@ -88,7 +88,7 @@ bool IsOfEqualRace(int r1, int r2)
return false;
}
// neotokyo: trolls endure ogres, dark elves, ...
// trolls endure ogres, dark elves, ...
bool IsOfIndiffRace(int r1, int r2)
{
if (r1 == r2)
+7 -6
View File
@@ -163,7 +163,7 @@ enum { //timer settings, all in milliseconds
CombatEventTimer_expire = 12000,
Tribute_duration = 600000,
ZoneTimerResolution = 3, //sleep time between zone main loop runs (milliseconds)
FeignMemoryDuration = 120000, // EverHood - Duration player must feign death to clear zonewide agro.
FeignMemoryDuration = 120000, // Duration player must feign death to clear zonewide agro.
EnragedTimer = 360000,
EnragedDurationTimer = 10000
};
@@ -208,12 +208,12 @@ enum { //some random constants
//chance ratio that a
#define THREATENLY_ARRGO_CHANCE 32 // 32/128 (25%) chance that a mob will arrgo on con Threatenly
// max factions per npc faction list
//max factions per npc faction list
#define MAX_NPC_FACTIONS 20
//value caps
#define MAX_FACTION 1500
#define MIN_FACTION -1500
//individual faction pool
#define MAX_PERSONAL_FACTION 1200
#define MIN_PERSONAL_FACTION -3000
//The Level Cap:
//#define LEVEL_CAP RuleI(Character, MaxLevel) //hard cap is 127
@@ -261,7 +261,8 @@ enum {
commandChangeFlags = 200, //ability to set/refresh flags
commandBanPlayers = 100, //can set bans on players
commandChangeDatarate = 201, //edit client's data rate
commandZoneToCoords = 0 //can #zone with coords
commandZoneToCoords = 0, //can #zone with coords
commandInterrogateInv = 100 //below this == only log on error state and self-only target dump
};
//default states for logging flag on NPCs and clients (having NPCs on by default is prolly a bad idea)
+4 -4
View File
@@ -756,7 +756,7 @@ bool BaseGuildManager::DBSetGuild(uint32 charid, uint32 guild_id, uint8 rank) {
std::string query;
if(guild_id != GUILD_NONE) {
query = StringFormat("REPLACE INTO guild_members (char_id,guild_id,rank) VALUES(%d,%d,%d)", charid, guild_id, rank);
query = StringFormat("REPLACE INTO guild_members (char_id,guild_id,rank,public_note) VALUES(%d,%d,%d,'')", charid, guild_id, rank);
auto results = m_db->QueryDatabase(query);
if (!results.Success()) {
@@ -897,10 +897,10 @@ bool BaseGuildManager::QueryWithLogging(std::string query, const char *errmsg) {
" FROM vwBotCharacterMobs AS c LEFT JOIN vwGuildMembers AS g ON c.id=g.char_id AND c.mobtype = g.mobtype "
#else
#define GuildMemberBaseQuery \
"SELECT c.id,c.name,c.class,c.level,c.timelaston,c.zoneid," \
"SELECT c.id,c.name,c.class,c.level,c.last_login,c.zone_id," \
" g.guild_id,g.rank,g.tribute_enable,g.total_tribute,g.last_tribute," \
" g.banker,g.public_note,g.alt " \
" FROM character_ AS c LEFT JOIN guild_members AS g ON c.id=g.char_id "
" FROM `character_data` AS c LEFT JOIN guild_members AS g ON c.id=g.char_id "
#endif
static void ProcessGuildMember(MySQLRequestRow row, CharGuildInfo &into) {
//fields from `characer_`
@@ -1241,7 +1241,7 @@ BaseGuildManager::GuildInfo::GuildInfo() {
uint32 BaseGuildManager::DoesAccountContainAGuildLeader(uint32 AccountID)
{
std::string query = StringFormat("SELECT guild_id FROM guild_members WHERE char_id IN "
"(SELECT id FROM character_ WHERE account_id = %i) AND rank = 2",
"(SELECT id FROM `character_data` WHERE account_id = %i) AND rank = 2",
AccountID);
auto results = m_db->QueryDatabase(query);
if (!results.Success())
+1 -315
View File
@@ -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
+93
View File
@@ -911,6 +911,30 @@ bool Inventory::CanItemFitInContainer(const Item_Struct *ItemToTry, const Item_S
return true;
}
bool Inventory::SupportsClickCasting(int16 slot_id)
{
// there are a few non-potion items that identify as ItemTypePotion..so, we still need to ubiquitously include the equipment range
if ((uint16)slot_id <= EmuConstants::GENERAL_END || slot_id == MainPowerSource)
{
return true;
}
else if (slot_id >= EmuConstants::GENERAL_BAGS_BEGIN && slot_id <= EmuConstants::GENERAL_BAGS_END)
{
if (EQLimits::AllowsClickCastFromBag(m_version))
return true;
}
return false;
}
bool Inventory::SupportsPotionBeltCasting(int16 slot_id)
{
if ((uint16)slot_id <= EmuConstants::GENERAL_END || slot_id == MainPowerSource || (slot_id >= EmuConstants::GENERAL_BAGS_BEGIN && slot_id <= EmuConstants::GENERAL_BAGS_END))
return true;
return false;
}
// Test whether a given slot can support a container item
bool Inventory::SupportsContainers(int16 slot_id)
{
@@ -1388,6 +1412,8 @@ ItemInst::ItemInst(const Item_Struct* item, int16 charges) {
m_scaledItem = nullptr;
m_evolveInfo = nullptr;
m_scaling = false;
m_ornamenticon = 0;
m_ornamentidfile = 0;
}
ItemInst::ItemInst(SharedDatabase *db, uint32 item_id, int16 charges) {
@@ -1410,6 +1436,8 @@ ItemInst::ItemInst(SharedDatabase *db, uint32 item_id, int16 charges) {
m_scaledItem = nullptr;
m_evolveInfo = nullptr;
m_scaling = false;
m_ornamenticon = 0;
m_ornamentidfile = 0;
}
ItemInst::ItemInst(ItemInstTypes use_type) {
@@ -1427,6 +1455,8 @@ ItemInst::ItemInst(ItemInstTypes use_type) {
m_scaledItem = nullptr;
m_evolveInfo = nullptr;
m_scaling = false;
m_ornamenticon = 0;
m_ornamentidfile = 0;
}
// Make a copy of an ItemInst object
@@ -1477,6 +1507,8 @@ ItemInst::ItemInst(const ItemInst& copy)
m_evolveInfo = nullptr;
m_scaling = copy.m_scaling;
m_ornamenticon = copy.m_ornamenticon;
m_ornamentidfile = copy.m_ornamentidfile;
}
// Clean up container contents
@@ -1750,6 +1782,67 @@ ItemInst* ItemInst::GetAugment(uint8 slot) const
return nullptr;
}
ItemInst* ItemInst::GetOrnamentationAug(int ornamentationAugtype) const
{
for (int i = AUG_BEGIN; i < EmuConstants::ITEM_COMMON_SIZE; i++) {
if (GetAugment(i) && m_item->AugSlotType[i] == ornamentationAugtype) {
const char *item_IDFile = GetAugment(i)->GetItem()->IDFile;
if (strncmp(item_IDFile, "IT64", strlen(item_IDFile)) == 0 || strncmp(item_IDFile, "IT63", strlen(item_IDFile)) == 0)
continue;
return this->GetAugment(i);
}
}
return nullptr;
}
bool ItemInst::CanTransform(const Item_Struct *ItemToTry, const Item_Struct *Container, bool AllowAll) {
if (!ItemToTry || !Container) return false;
if (ItemToTry->ItemType == ItemTypeArrow || strnlen(Container->CharmFile, 30) == 0)
return false;
if (AllowAll && strncasecmp(Container->CharmFile, "ITEMTRANSFIGSHIELD", 18) && strncasecmp(Container->CharmFile, "ITEMTransfigBow", 15)) {
switch (ItemToTry->ItemType) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 35:
case 45:
return true;
}
}
static std::map<std::string, int> types;
types["itemtransfig1hp"] = 2;
types["itemtransfig1hs"] = 0;
types["itemtransfig2hb"] = 4;
types["itemtransfig2hp"] = 35;
types["itemtransfig2hs"] = 1;
types["itemtransfigblunt"] = 3;
types["itemtransfigbow"] = 5;
types["itemtransfighth"] = 45;
types["itemtransfigshield"] = 8;
types["itemtransfigslashing"] = 0;
auto i = types.find(MakeLowerString(Container->CharmFile));
if (i != types.end() && i->second == ItemToTry->ItemType)
return true;
static std::map<std::string, int> typestwo;
typestwo["itemtransfigblunt"] = 4;
typestwo["itemtransfigslashing"] = 1;
i = typestwo.find(MakeLowerString(Container->CharmFile));
if (i != typestwo.end() && i->second == ItemToTry->ItemType)
return true;
return false;
}
uint32 ItemInst::GetAugmentItemID(uint8 slot) const
{
uint32 id = NO_ITEM;
+34 -3
View File
@@ -121,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);
@@ -132,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); }
@@ -183,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);
@@ -229,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;
@@ -306,7 +329,9 @@ public:
void DeleteAugment(uint8 slot);
ItemInst* RemoveAugment(uint8 index);
bool IsAugmented();
ItemInst* GetOrnamentationAug(int ornamentationAugtype) const;
static bool CanTransform(const Item_Struct *ItemToTry, const Item_Struct *Container, bool AllowAll = false);
// Has attack/delay?
bool IsWeapon() const;
bool IsAmmo() const;
@@ -368,6 +393,10 @@ public:
void SetActivated(bool activated) { m_activated = activated; }
int8 GetEvolveLvl() const { return m_evolveLvl; }
void SetScaling(bool v) { m_scaling = v; }
uint32 GetOrnamentationIcon() const { return m_ornamenticon; }
void SetOrnamentIcon(uint32 ornament_icon) { m_ornamenticon = ornament_icon; }
uint32 GetOrnamentationIDFile() const { return m_ornamentidfile; }
void SetOrnamentationIDFile(uint32 ornament_idfile) { m_ornamentidfile = ornament_idfile; }
void Initialize(SharedDatabase *db = nullptr);
void ScaleItem();
@@ -412,6 +441,8 @@ protected:
Item_Struct* m_scaledItem;
EvolveInfo* m_evolveInfo;
bool m_scaling;
uint32 m_ornamenticon;
uint32 m_ornamentidfile;
//
// Items inside of this item (augs or contents);
+1
View File
@@ -169,6 +169,7 @@ F(bardlevel)
F(questitemflag)
F(svcorruption)
F(purity)
F(evolvinglevel)
F(backstabdmg)
F(dsmitigation)
F(heroic_str)
+1
View File
@@ -217,6 +217,7 @@ struct Item_Struct {
// Begin SoF Fields
int32 SVCorruption;
uint32 Purity;
uint8 EvolvingLevel;
uint32 BackstabDmg;
uint32 DSMitigation;
int32 HeroicStr;
+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),
+23 -154
View File
@@ -54,20 +54,6 @@
#include <errno.h>
#endif
static bool WELLRNG_init = false;
static int state_i = 0;
static unsigned int STATE[R];
static unsigned int z0, z1, z2;
unsigned int (*WELLRNG19937)(void);
static unsigned int case_1 (void);
static unsigned int case_2 (void);
static unsigned int case_3 (void);
static unsigned int case_4 (void);
static unsigned int case_5 (void);
static unsigned int case_6 (void);
uint32 rnd_hash(time_t t, clock_t c);
void oneseed(const uint32 seed);
void CoutTimestamp(bool ms) {
time_t rawtime;
struct tm* gmt_t;
@@ -179,41 +165,6 @@ const char * itoa(int num, char* a,int b) {
}
#endif
/*
* generate a random integer in the range low-high this
* should be used instead of the rand()%limit method
*/
int MakeRandomInt(int low, int high)
{
if(low >= high)
return(low);
//return (rand()%(high-low+1) + (low));
if(!WELLRNG_init) {
WELLRNG_init = true;
oneseed( rnd_hash( time(nullptr), clock() ) );
WELLRNG19937 = case_1;
}
unsigned int randomnum = ((WELLRNG19937)());
if(randomnum == 0xffffffffUL)
return high;
return int ((randomnum / (double)0xffffffffUL) * (high - low + 1) + low);
}
double MakeRandomFloat(double low, double high)
{
if(low >= high)
return(low);
//return (rand() / (double)RAND_MAX * (high - low) + low);
if(!WELLRNG_init) {
WELLRNG_init = true;
oneseed( rnd_hash( time(nullptr), clock() ) );
WELLRNG19937 = case_1;
}
return ((WELLRNG19937)() / (double)0xffffffffUL * (high - low) + low);
}
uint32 rnd_hash( time_t t, clock_t c )
{
// Get a uint32 from t and c
@@ -239,111 +190,6 @@ uint32 rnd_hash( time_t t, clock_t c )
return ( h1 + differ++ ) ^ h2;
}
void oneseed( const uint32 seed )
{
// Initialize generator state with seed
// See Knuth TAOCP Vol 2, 3rd Ed, p.106 for multiplier.
// In previous versions, most significant bits (MSBs) of the seed affect
// only MSBs of the state array. Modified 9 Jan 2002 by Makoto Matsumoto.
register int j = 0;
STATE[j] = seed & 0xffffffffUL;
for (j = 1; j < R; j++)
{
STATE[j] = ( 1812433253UL * ( STATE[j-1] ^ (STATE[j-1] >> 30) ) + j ) & 0xffffffffUL;
}
}
// WELL RNG code
/* ***************************************************************************** */
/* Copyright: Francois Panneton and Pierre L'Ecuyer, University of Montreal */
/* Makoto Matsumoto, Hiroshima University */
/* Notice: This code can be used freely for personal, academic, */
/* or non-commercial purposes. For commercial purposes, */
/* please contact P. L'Ecuyer at: lecuyer@iro.UMontreal.ca */
/* A modified "maximally equidistributed" implementation */
/* by Shin Harase, Hiroshima University. */
/* ***************************************************************************** */
unsigned int case_1 (void){
// state_i == 0
z0 = (VRm1Under & MASKL) | (VRm2Under & MASKU);
z1 = MAT0NEG (-25, V0) ^ MAT0POS (27, VM1);
z2 = MAT3POS (9, VM2) ^ MAT0POS (1, VM3);
newV1 = z1 ^ z2;
newV0Under = MAT1 (z0) ^ MAT0NEG (-9, z1) ^ MAT0NEG (-21, z2) ^ MAT0POS (21, newV1);
state_i = R - 1;
WELLRNG19937 = case_3;
return (STATE[state_i] ^ (newVM2Over & BITMASK));
}
static unsigned int case_2 (void){
// state_i == 1
z0 = (VRm1 & MASKL) | (VRm2Under & MASKU);
z1 = MAT0NEG (-25, V0) ^ MAT0POS (27, VM1);
z2 = MAT3POS (9, VM2) ^ MAT0POS (1, VM3);
newV1 = z1 ^ z2;
newV0 = MAT1 (z0) ^ MAT0NEG (-9, z1) ^ MAT0NEG (-21, z2) ^ MAT0POS (21, newV1);
state_i = 0;
WELLRNG19937 = case_1;
return (STATE[state_i] ^ (newVM2 & BITMASK));
}
static unsigned int case_3 (void){
// state_i+M1 >= R
z0 = (VRm1 & MASKL) | (VRm2 & MASKU);
z1 = MAT0NEG (-25, V0) ^ MAT0POS (27, VM1Over);
z2 = MAT3POS (9, VM2Over) ^ MAT0POS (1, VM3Over);
newV1 = z1 ^ z2;
newV0 = MAT1 (z0) ^ MAT0NEG (-9, z1) ^ MAT0NEG (-21, z2) ^ MAT0POS (21, newV1);
state_i--;
if (state_i + M1 < R)
WELLRNG19937 = case_5;
return (STATE[state_i] ^ (newVM2Over & BITMASK));
}
static unsigned int case_4 (void){
// state_i+M3 >= R
z0 = (VRm1 & MASKL) | (VRm2 & MASKU);
z1 = MAT0NEG (-25, V0) ^ MAT0POS (27, VM1);
z2 = MAT3POS (9, VM2) ^ MAT0POS (1, VM3Over);
newV1 = z1 ^ z2;
newV0 = MAT1 (z0) ^ MAT0NEG (-9, z1) ^ MAT0NEG (-21, z2) ^ MAT0POS (21, newV1);
state_i--;
if (state_i + M3 < R)
WELLRNG19937 = case_6;
return (STATE[state_i] ^ (newVM2 & BITMASK));
}
static unsigned int case_5 (void){
// state_i+M2 >= R
z0 = (VRm1 & MASKL) | (VRm2 & MASKU);
z1 = MAT0NEG (-25, V0) ^ MAT0POS (27, VM1);
z2 = MAT3POS (9, VM2Over) ^ MAT0POS (1, VM3Over);
newV1 = z1 ^ z2;
newV0 = MAT1 (z0) ^ MAT0NEG (-9, z1) ^ MAT0NEG (-21, z2) ^ MAT0POS (21, newV1);
state_i--;
if (state_i + M2 < R)
WELLRNG19937 = case_4;
return (STATE[state_i] ^ (newVM2Over & BITMASK));
}
static unsigned int case_6 (void){
// 2 <= state_i <= (R - M3 - 1)
z0 = (VRm1 & MASKL) | (VRm2 & MASKU);
z1 = MAT0NEG (-25, V0) ^ MAT0POS (27, VM1);
z2 = MAT3POS (9, VM2) ^ MAT0POS (1, VM3);
newV1 = z1 ^ z2;
newV0 = MAT1 (z0) ^ MAT0NEG (-9, z1) ^ MAT0NEG (-21, z2) ^ MAT0POS (21, newV1);
state_i--;
if (state_i == 1)
WELLRNG19937 = case_2;
return (STATE[state_i] ^ (newVM2 & BITMASK));
}
// end WELL RNG code
float EQ13toFloat(int d)
{
return ( float(d)/float(1<<2));
@@ -387,3 +233,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;
}
+2
View File
@@ -102,6 +102,8 @@ 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)
+3
View File
@@ -32,6 +32,7 @@ MySQLRequestResult::MySQLRequestResult(MYSQL_RES* result, uint32 rowsAffected, u
void MySQLRequestResult::FreeInternals()
{
safe_delete_array(m_ErrorBuffer);
if (m_Result != nullptr)
@@ -100,6 +101,7 @@ MySQLRequestResult::MySQLRequestResult(MySQLRequestResult&& moveItem)
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
@@ -127,6 +129,7 @@ MySQLRequestResult& MySQLRequestResult::operator=(MySQLRequestResult&& other)
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
+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";
+1230 -979
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#ifndef CLIENT62_CONSTANTS_H_
#define CLIENT62_CONSTANTS_H_
#include "../common/types.h"
#include "../types.h"
namespace Client62 {
namespace maps {
@@ -180,6 +180,7 @@ namespace Client62 {
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;
}
+45 -27
View File
@@ -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
+93 -35
View File
@@ -406,7 +406,7 @@ struct CastSpell_Struct
uint32 spell_id;
uint32 inventoryslot; // slot for clicky item, 0xFFFF = normal cast
uint32 target_id;
uint8 cs_unknown[4];
uint8 cs_unknown[4];
};
/*
@@ -472,8 +472,8 @@ struct GMTrainee_Struct
{
/*000*/ uint32 npcid;
/*004*/ uint32 playerid;
/*008*/ uint32 skills[73];
/*300*/ uint8 unknown300[148];
/*008*/ uint32 skills[PACKET_SKILL_ARRAY_SIZE];
/*408*/ uint8 unknown408[40];
/*448*/
};
@@ -558,7 +558,7 @@ struct CharCreate_Struct
/*0128*/ uint32 face;
/*0132*/ uint32 eyecolor1; //its possiable we could have these switched
/*0136*/ uint32 eyecolor2; //since setting one sets the other we really can't check
/*0140*/ uint32 unknown140;
/*0140*/ uint32 tutorial; //assumptions are bad! But guessed
};
/*
@@ -611,14 +611,62 @@ struct PotionBelt_Struct {
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
static const uint32 MAX_RAID_LEADERSHIP_AA_ARRAY = 16;
static const uint32 MAX_LEADERSHIP_AA_ARRAY = (MAX_GROUP_LEADERSHIP_AA_ARRAY+MAX_RAID_LEADERSHIP_AA_ARRAY);
struct LeadershipAA_Struct {
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
};
struct GroupLeadershipAA_Struct {
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
union {
struct {
uint32 groupAAMarkNPC;
uint32 groupAANPCHealth;
uint32 groupAADelegateMainAssist;
uint32 groupAADelegateMarkNPC;
uint32 groupAA4;
uint32 groupAA5;
uint32 groupAAInspectBuffs;
uint32 groupAA7;
uint32 groupAASpellAwareness;
uint32 groupAAOffenseEnhancement;
uint32 groupAAManaEnhancement;
uint32 groupAAHealthEnhancement;
uint32 groupAAHealthRegeneration;
uint32 groupAAFindPathToPC;
uint32 groupAAHealthOfTargetsTarget;
uint32 groupAA15;
};
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
};
};
struct RaidLeadershipAA_Struct {
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
union {
struct {
uint32 raidAAMarkNPC;
uint32 raidAANPCHealth;
uint32 raidAADelegateMainAssist;
uint32 raidAADelegateMarkNPC;
uint32 raidAA4;
uint32 raidAA5;
uint32 raidAA6;
uint32 raidAASpellAwareness;
uint32 raidAAOffenseEnhancement;
uint32 raidAAManaEnhancement;
uint32 raidAAHealthEnhancement;
uint32 raidAAHealthRegeneration;
uint32 raidAAFindPathToPC;
uint32 raidAAHealthOfTargetsTarget;
uint32 raidAA14;
uint32 raidAA15;
};
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
};
};
struct LeadershipAA_Struct {
union {
struct {
GroupLeadershipAA_Struct group;
RaidLeadershipAA_Struct raid;
};
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
};
};
/*
@@ -630,7 +678,7 @@ struct RaidLeadershipAA_Struct {
static const uint32 MAX_PP_LANGUAGE = 28;
static const uint32 MAX_PP_SPELLBOOK = 400;
static const uint32 MAX_PP_MEMSPELL = 9;
static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
static const uint32 MAX_PP_AA_ARRAY = 240;
static const uint32 MAX_GROUP_MEMBERS = 6;
struct PlayerProfile_Struct
@@ -1148,19 +1196,27 @@ 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;
/*0012*/
};
struct MoveItem_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*/
};
//
@@ -1362,12 +1418,6 @@ struct CombatAbility_Struct {
uint32 m_skill;
};
struct DeleteItem_Struct {
/*0000*/ uint32 from_slot;
/*0004*/ uint32 to_slot;
/*0008*/ uint32 number_in_stack;
};
//Instill Doubt
struct Instill_Doubt_Struct {
uint8 i_id;
@@ -1521,6 +1571,14 @@ struct Adventure_Purchase_Struct {
/*008*/ uint32 variable;
};
struct Adventure_Sell_Struct {
/*000*/ uint32 unknown000; //0x01
/*004*/ uint32 npcid;
/*008*/ uint32 slot;
/*012*/ uint32 charges;
/*016*/ uint32 sell_price;
};
struct AdventurePoints_Update_Struct {
/*000*/ uint32 ldon_available_points; // Total available points
/*004*/ uint8 unkown_apu004[20];
@@ -2524,10 +2582,10 @@ struct TributeInfo_Struct {
};
struct TributeItem_Struct {
uint32 slot;
uint32 quantity;
uint32 tribute_master_id;
int32 tribute_points;
uint32 slot;
uint32 quantity;
uint32 tribute_master_id;
int32 tribute_points;
};
struct TributePoint_Struct {
@@ -2563,7 +2621,7 @@ struct Split_Struct
*/
struct NewCombine_Struct {
/*00*/ int16 container_slot;
/*02*/ char unknown02[2];
/*02*/ int16 guildtribute_slot;
/*04*/
};
@@ -2969,7 +3027,7 @@ struct GroupInvite_Struct {
// uint8 unknown128[65];
};
struct BuffFadeMsg_Struct {
struct ColoredText_Struct {
uint32 color;
char msg[1];
};
@@ -3076,6 +3134,11 @@ struct AnnoyingZoneUnknown_Struct {
uint32 value; //always 4
};
struct ApplyPoison_Struct {
uint32 inventorySlot;
uint32 success;
};
struct GuildMemberUpdate_Struct {
/*00*/ uint32 guild_id; //not sure
/*04*/ char member_name[64];
@@ -3084,11 +3147,6 @@ struct GuildMemberUpdate_Struct {
/*72*/ uint32 unknown072;
};
}; //end namespace structs
}; //end namespace Client62
+3 -1
View File
@@ -8,7 +8,7 @@
#include "sof.h"
#include "sod.h"
#include "rof.h"
//#include "rof2.h"
#include "rof2.h"
void RegisterAllPatches(EQStreamIdentifier &into) {
Client62::Register(into);
@@ -17,6 +17,7 @@ void RegisterAllPatches(EQStreamIdentifier &into) {
SoD::Register(into);
Underfoot::Register(into);
RoF::Register(into);
// Uncomment the line below to enable RoF2 Client
//RoF2::Register(into);
}
@@ -27,5 +28,6 @@ void ReloadAllPatches() {
SoD::Reload();
Underfoot::Reload();
RoF::Reload();
// Uncomment the line below to enable RoF2 Client
//RoF2::Reload();
}
+5027 -4771
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+37
View File
@@ -0,0 +1,37 @@
#ifndef RoF2_H_
#define RoF2_H_
#include "../struct_strategy.h"
class EQStreamIdentifier;
namespace RoF2 {
//these are the only public member of this namespace.
extern void Register(EQStreamIdentifier &into);
extern void Reload();
//you should not directly access anything below..
//I just dont feel like making a seperate header for it.
class Strategy : public StructStrategy {
public:
Strategy();
protected:
virtual std::string Describe() const;
virtual const EQClientVersion ClientVersion() const;
//magic macro to declare our opcode processors
#include "ss_declare.h"
#include "rof2_ops.h"
};
};
#endif /*RoF2_H_*/
+217
View File
@@ -0,0 +1,217 @@
/*
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 RoF2_CONSTANTS_H_
#define RoF2_CONSTANTS_H_
#include "../types.h"
namespace RoF2 {
namespace maps {
typedef enum : int16 {
MapPossessions = 0,
MapBank,
MapSharedBank,
MapTrade,
MapWorld,
MapLimbo,
MapTribute,
MapTrophyTribute,
MapGuildTribute,
MapMerchant,
MapDeleted,
MapCorpse,
MapBazaar,
MapInspect,
MapRealEstate,
MapViewMODPC,
MapViewMODBank,
MapViewMODSharedBank,
MapViewMODLimbo,
MapAltStorage,
MapArchived,
MapMail,
MapGuildTrophyTribute,
MapKrono,
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,
MainPowerSource,
MainAmmo,
MainGeneral1,
MainGeneral2,
MainGeneral3,
MainGeneral4,
MainGeneral5,
MainGeneral6,
MainGeneral7,
MainGeneral8,
MainGeneral9,
MainGeneral10,
MainCursor,
_MainCount,
_MainEquipmentBegin = MainCharm,
_MainEquipmentEnd = MainAmmo,
_MainEquipmentCount = (_MainEquipmentEnd - _MainEquipmentBegin + 1),
_MainGeneralBegin = MainGeneral1,
_MainGeneralEnd = MainGeneral10,
_MainGeneralCount = (_MainGeneralEnd - _MainGeneralBegin + 1)
} EquipmentSlots;
}
namespace consts {
static const uint16 MAP_POSSESSIONS_SIZE = slots::_MainCount;
static const uint16 MAP_BANK_SIZE = 24;
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 = 0; //?
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 = 200;
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;
// most of these definitions will go away with the structure-based system..this maintains compatibility for now
// (bag slots and main slots beyond Possessions are assigned for compatibility with current server coding)
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::MainGeneral10;
static const uint16 GENERAL_SIZE = slots::_MainGeneralCount;
static const int16 GENERAL_BAGS_BEGIN = 251;
static const int16 GENERAL_BAGS_END_OFFSET = 99;
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 = 351;
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 = 2023;
static const int16 BANK_BAGS_BEGIN = 2031;
static const int16 BANK_BAGS_END_OFFSET = 239;
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_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 uint16 ITEM_COMMON_SIZE = 6;
static const uint16 ITEM_CONTAINER_SIZE = 255; // 255; (server max will be 255..unsure what actual client is - test)
static const uint32 BANDOLIERS_COUNT = 20; // 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 = 5;
}
namespace limits {
static const bool ALLOWS_EMPTY_BAG_IN_BAG = true;
static const bool ALLOWS_CLICK_CAST_FROM_BAG = true;
static const bool COIN_HAS_WEIGHT = false;
}
}; //end namespace RoF2
#endif /*RoF2_CONSTANTS_H_*/
/*
RoF2 Notes:
** Structure-based inventory **
ok Possessions: ( 0, { 0 .. 33 }, -1, -1 ) (Corpse: { 23 .. 56 } [Offset 23])
ok [Equipment: ( 0, { 0 .. 22 }, -1, -1 )]
ok [General: ( 0, { 23 .. 32 }, -1, -1 )]
ok [Cursor: ( 0, 33, -1, -1 )]
General Bags: ( 0, { 23 .. 32 }, { 0 .. (maxsize - 1) }, -1 )
Cursor Bags: ( 0, 33, { 0 .. (maxsize - 1) }, -1 )
Bank: ( 1, { 0 .. 23 }, -1, -1 )
Bank Bags: ( 1, { 0 .. 23 }, { 0 .. (maxsize - 1)}, -1 )
Shared Bank: ( 2, { 0 .. 1 }, -1, -1 )
Shared Bank Bags: ( 2, { 0 .. 1 }, { 0 .. (maxsize - 1) }, -1 )
Trade: ( 3, { 0 .. 8 }, -1, -1 )
(Trade Bags: 3031 - 3110 -- server values)
World: ( 4, { 0 .. 10 }, -1, -1 )
*/
+439
View File
@@ -0,0 +1,439 @@
/*
These fields must be in the order of how they are serialized!
*/
#define NEW_TRY
#ifdef NEW_TRY
//* 000 */ I(ItemClass) // Leave this one off on purpose
/* 001 */ S(Name)
/* 002 */ S(Lore)
//* 003 */ C("")//lorefile - Newly Added - Field is Null
/* 004 */ S(IDFile)
/* 005 */ I(ID)
/* 006 */ I(Weight)
/* 007 */ I(NoRent)
/* 008 */ I(NoDrop)
/* 009 */ I(Size)
/* 010 */ I(Slots)
/* 011 */ I(Price)
/* 012 */ I(Icon)
/* 013 */ C("0")//UNK013
/* 014 */ C("0")//UNK014
/* 015 */ I(BenefitFlag)
/* 016 */ I(Tradeskills)
/* 017 */ I(CR)
/* 018 */ I(DR)
/* 019 */ I(PR)
/* 020 */ I(MR)
/* 021 */ I(FR)
/* 022 */ C("0")//svcorruption - Newly Added
/* 023 */ I(AStr)
/* 024 */ I(ASta)
/* 025 */ I(AAgi)
/* 026 */ I(ADex)
/* 027 */ I(ACha)
/* 028 */ I(AInt)
/* 029 */ I(AWis)
/* 030 */ I(HP)
/* 031 */ I(Mana)
/* 032 */ I(Endur) //endur - Relocated
/* 033 */ I(AC)
/* 034 */ I(Classes)//classes - Relocated
/* 035 */ I(Races)//races - Relocated
/* 036 */ I(Deity)
/* 037 */ I(SkillModValue)
/* 038 */ C("0")//UNK038 - Default is 0
/* 039 */ I(SkillModType)
/* 040 */ I(BaneDmgRace)
/* 041 */ I(BaneDmgBody)//banedmgbody - Relocated
/* 042 */ I(BaneDmgRaceAmt)//banedmgraceamt - Relocated
/* 043 */ I(BaneDmgAmt)//banedmgamt - Relocated
/* 044 */ I(Magic)
/* 045 */ I(CastTime_)
/* 046 */ I(ReqLevel)
/* 047 */ I(RecLevel)//reclevel - Relocated
/* 048 */ I(RecSkill)//recskill - Relocated
/* 049 */ I(BardType)
/* 050 */ I(BardValue)
/* 051 */ I(Light)
/* 052 */ I(Delay)
/* 053 */ I(ElemDmgType)
/* 054 */ I(ElemDmgAmt)
/* 055 */ I(Range)
/* 056 */ I(Damage)
/* 057 */ I(Color)
/* 058 */ I(ItemType)
/* 059 */ I(Material)
/* 060 */ C("0")//UNK060 - Default is 0
/* 061 */ C("0")//UNK061 - Default is 0
/* 062 */ F(SellRate)
/* 063 */ I(CombatEffects)
/* 064 */ I(Shielding)
/* 065 */ I(StunResist)
/* 066 */ I(StrikeThrough)
/* 067 */ I(ExtraDmgSkill)
/* 068 */ I(ExtraDmgAmt)
/* 069 */ I(SpellShield)
/* 070 */ I(Avoidance)
/* 071 */ I(Accuracy)
/* 072 */ I(CharmFileID)
/* 073 */ I(FactionMod1)//Swapped these so Faction Amt comes after each Faction Mod
/* 074 */ I(FactionAmt1)//Swapped these so Faction Amt comes after each Faction Mod
/* 075 */ I(FactionMod2)//Swapped these so Faction Amt comes after each Faction Mod
/* 076 */ I(FactionAmt2)//Swapped these so Faction Amt comes after each Faction Mod
/* 077 */ I(FactionMod3)//Swapped these so Faction Amt comes after each Faction Mod
/* 078 */ I(FactionAmt3)//Swapped these so Faction Amt comes after each Faction Mod
/* 079 */ I(FactionMod4)//Swapped these so Faction Amt comes after each Faction Mod
/* 080 */ I(FactionAmt4)//Swapped these so Faction Amt comes after each Faction Mod
/* 081 */ S(CharmFile)
/* 082 */ I(AugType)
/* 083 */ I(AugRestrict)//augrestrict - Relocated
/* 084 */ I(AugDistiller)//augdistiller - Relocated
/* 085 */ I(AugSlotType[0])
/* 086 */ I(AugSlotVisible[0])//augslot1visible - Default 1
/* 087 */ C("0")//augslot1unk2 - Newly Added - Default 0
/* 088 */ I(AugSlotType[1])
/* 089 */ I(AugSlotVisible[1])
/* 090 */ C("0")//augslot2unk2 - Newly Added
/* 091 */ I(AugSlotType[2])
/* 092 */ I(AugSlotVisible[2])
/* 093 */ C("0")//augslot3unk2 - Newly Added
/* 094 */ I(AugSlotType[3])
/* 095 */ I(AugSlotVisible[3])
/* 096 */ C("0")//augslot4unk2 - Newly Added
/* 097 */ I(AugSlotType[4])
/* 098 */ I(AugSlotVisible[4])
/* 099 */ C("0")//augslot5unk2 - Newly Added
/* 100 */ I(PointType)//pointtype - Relocated
/* 101 */ I(LDoNTheme)
/* 102 */ I(LDoNPrice)
/* 103 */ C("70")//UNK098 - Newly Added - Default 70, but some are set to 0
/* 104 */ I(LDoNSold)
/* 105 */ I(BagType)
/* 106 */ I(BagSlots)
/* 107 */ I(BagSize)
/* 108 */ I(BagWR)
/* 109 */ I(Book)
/* 110 */ I(BookType)
/* 111 */ S(Filename)
/* 112 */ I(LoreGroup)
/* 113 */ I(ArtifactFlag)
/* 114 */ C("0")//I(PendingLoreFlag)?//UNK109 - Default 0, but a few are 1
/* 115 */ I(Favor)
/* 116 */ I(GuildFavor)//guildfavor - Relocated
/* 117 */ I(FVNoDrop)
/* 118 */ I(DotShielding)
/* 119 */ I(Attack)
/* 120 */ I(Regen)
/* 121 */ I(ManaRegen)
/* 122 */ I(EnduranceRegen)
/* 123 */ I(Haste)
/* 124 */ I(DamageShield)
/* 125 */ C("-1") //UNK120 - Default is -1
/* 126 */ C("0") //UNK121 - Default is 0
/* 127 */ I(Attuneable)
/* 128 */ I(NoPet)
/* 129 */ C("0") //UNK124 - Default 0, but a few are 1
/* 130 */ I(PotionBelt)
/* 131 */ C("0") //potionbeltslots - Default 0, but a few are 1
/* 132 */ I(StackSize)
/* 133 */ I(NoTransfer)
/* 134 */ I(Stackable)//UNK129 - Default is 0, but some are much higher
/* 135 */ I(QuestItemFlag)//questitemflag - Default is 0 (off), flag on = 1
/* 136 */ C("0")//UNK131 - Default is 0, but there is an item set to 1
/* 137 */ C("0")//UNK132 - Default is 0? 0000000000000000000?
/* 138 */ I(Click.Effect)
/* 139 */ I(Click.Type)
/* 140 */ I(Click.Level2)
/* 141 */ I(Click.Level)
/* 142 */ I(MaxCharges)//maxcharges - Relocated
/* 143 */ I(CastTime_)//casttime - Relocated - Note Duplicate Entries for CastTime_ and none for CastTime
/* 144 */ I(RecastDelay)//recastdelay - Relocated
/* 145 */ I(RecastType)//recasttype - Relocated
/* 146 */ C("0")//clickunk5 - Newly Added - Default is 0
/* 147 */ C("")//clickname - Newly Added - Default is Null
/* 148 */ C("-1")//clickunk7 - Newly Added - Default is -1, but some set to 0 and some much higher
/* 149 */ I(Proc.Effect)
/* 150 */ I(Proc.Type)
/* 151 */ I(Proc.Level2)
/* 152 */ I(Proc.Level)
/* 153 */ C("0")//procunk1 - Newly Added - Default is 0, but some set to -1 and 1
/* 154 */ C("0")//procunk2 - Newly Added - Default is 0
/* 155 */ C("0")//procunk3 - Newly Added - Default is 0
/* 156 */ C("0")//procunk4 - Newly Added - Default is 0
/* 157 */ I(ProcRate)//procrate - Relocated
/* 158 */ C("")//procname - Newly Added - Default is Null
/* 159 */ C("-1")//procunk7 - Newly Added - Default is -1, but some set to 0
/* 160 */ I(Worn.Effect)
/* 161 */ I(Worn.Type)
/* 162 */ I(Worn.Level2)
/* 163 */ I(Worn.Level)
/* 164 */ C("0")//wornunk1 - Newly Added - Default is 0
/* 165 */ C("0")//wornunk2 - Newly Added - Default is 0
/* 166 */ C("0")//wornunk3 - Newly Added - Default is 0
/* 167 */ C("0")//wornunk4 - Newly Added - Default is 0
/* 168 */ C("0")//wornunk5 - Newly Added - Default is 0
/* 169 */ C("")//wornname - Newly Added - Default is Null
/* 170 */ C("-1")//wornunk7 - Newly Added - Default is -1, but some set to 0
/* 171 */ I(Focus.Effect)
/* 172 */ I(Focus.Type)
/* 173 */ I(Focus.Level2)
/* 174 */ I(Focus.Level)
/* 175 */ C("0")//focusunk1 - Newly Added - Default is 0
/* 176 */ C("0")//focusunk2 - Newly Added - Default is 0
/* 177 */ C("0")//focusunk3 - Newly Added - Default is 0
/* 178 */ C("0")//focusunk4 - Newly Added - Default is 0
/* 179 */ C("0")//focusunk5 - Newly Added - Default is 0
/* 180 */ C("")//focusname - Newly Added - Default is Null
/* 181 */ C("-1")//focusunk7 - Newly Added - Default is -1, but some set to 0
/* 182 */ I(Scroll.Effect)
/* 183 */ I(Scroll.Type)
/* 184 */ I(Scroll.Level2)
/* 185 */ I(Scroll.Level)
/* 186 */ C("0")//scrollunk1 - Renumber this***
/* 187 */ C("0")//scrollunk2 - Newly Added - Default is 0
/* 188 */ C("0")//scrollunk3 - Newly Added - Default is 0
/* 189 */ C("0")//scrollunk4 - Newly Added - Default is 0
/* 190 */ C("0")//scrollunk5 - Newly Added - Default is 0
/* 191 */ C("")//scrollname - Newly Added - Default is Null
/* 192 */ C("-1")//scrollunk7 - Newly Added - Default is -1, but some set to 0
/* 193 */ C("0")//UNK193 - Default is 0
/* 194 */ C("0")//purity - Newly Added - Default is 0, but some go up to 75
/* 195 */ C("0")//dsmitigation - Newly Added - Default is 0, but some are up to 2
/* 196 */ C("0")//heroic_str - Newly Added - Default is 0
/* 197 */ C("0")//heroic_int - Newly Added - Default is 0
/* 198 */ C("0")//heroic_wis - Newly Added - Default is 0
/* 199 */ C("0")//heroic_agi - Newly Added - Default is 0
/* 200 */ C("0")//heroic_dex - Newly Added - Default is 0
/* 201 */ C("0")//heroic_sta - Newly Added - Default is 0
/* 202 */ C("0")//heroic_cha - Newly Added - Default is 0
/* 203 */ C("0")//HeroicSvPoison - Newly Added - Default is 0
/* 204 */ C("0")//HeroicSvMagic - Newly Added - Default is 0
/* 205 */ C("0")//HeroicSvFire - Newly Added - Default is 0
/* 206 */ C("0")//HeroicSvDisease - Newly Added - Default is 0
/* 207 */ C("0")//HeroicSvCold - Newly Added - Default is 0
/* 208 */ C("0")//HeroicSvCorruption - Newly Added - Default is 0
/* 209 */ C("0")//healamt - Newly Added - Default is 0, but some are up to 9
/* 210 */ C("0")//spelldmg - Newly Added - Default is 0, but some are up to 9
/* 211 */ C("0")//clairvoyance - Newly Added - Default is 0, but some are up to 10
/* 212 */ C("0")//backstabdmg - Newly Added - Default is 0, but some are up to 65
//* 213 */ C("0")//evolvinglevel - Newly Added - Default is 0, but some are up to 7
//* 214 */ C("0")//MaxPower - Newly Added
//* 215 */ C("0")//Power - Newly Added
//This doesn't appear to be used /* 102 */ S(verified)//verified
//This doesn't appear to be used /* 102 */ S(serialized)//created
//Unsure where this goes right now (or if it is even used) /* 108 */ I(SummonedFlag)
#else
/* 000 */ //I(ItemClass) Leave this one off on purpose
/* 001 */ S(Name)
/* 002 */ S(Lore)
/* 003 */ C("") //LoreFile?
/* 003 */ S(IDFile)
/* 004 */ I(ID)
/* 005 */ I(Weight)
/* 006 */ I(NoRent)
/* 007 */ I(NoDrop)
/* 008 */ I(Size)
/* 009 */ I(Slots)
/* 010 */ I(Price)
/* 011 */ I(Icon)
/* 013 */ C("0")
/* 014 */ C("0")
/* 014 */ I(BenefitFlag)
/* 015 */ I(Tradeskills)
/* 016 */ I(CR)
/* 017 */ I(DR)
/* 018 */ I(PR)
/* 019 */ I(MR)
/* 020 */ I(FR)
C("0") //svcorruption
/* 021 */ I(AStr)
/* 022 */ I(ASta)
/* 023 */ I(AAgi)
/* 024 */ I(ADex)
/* 025 */ I(ACha)
/* 026 */ I(AInt)
/* 027 */ I(AWis)
/* 028 */ I(HP)
/* 029 */ I(Mana)
I(Endur)
/* 030 */ I(AC)
/* 052 */ I(Classes)
/* 053 */ I(Races)
/* 031 */ I(Deity)
/* 032 */ I(SkillModValue)
/* 033 */ C("0")
/* 034 */ I(SkillModType)
/* 035 */ I(BaneDmgRace)
/* 037 */ I(BaneDmgBody)
/* 036 */ I(BaneDmgRaceAmt)
/* 036 */ I(BaneDmgAmt)
/* 038 */ I(Magic)
/* 039 */ I(CastTime_)
/* 040 */ I(ReqLevel)
/* 045 */ I(RecLevel)
/* 046 */ I(RecSkill)
/* 041 */ I(BardType)
/* 042 */ I(BardValue)
/* 043 */ I(Light)
/* 044 */ I(Delay)
/* 047 */ I(ElemDmgType)
/* 048 */ I(ElemDmgAmt)
/* 049 */ I(Range)
/* 050 */ I(Damage)
/* 051 */ I(Color)
/* 056 */ I(ItemType)
/* 057 */ I(Material)
/* 060 */ C("0")
/* 061 */ C("0")
/* 058 */ F(SellRate)
/* 063 */ I(CombatEffects)
/* 064 */ I(Shielding)
/* 065 */ I(StunResist)
/* 059 */ //C("0")
/* 061 */ //C("0")
/* 066 */ I(StrikeThrough)
/* 067 */ I(ExtraDmgSkill)
/* 068 */ I(ExtraDmgAmt)
/* 069 */ I(SpellShield)
/* 070 */ I(Avoidance)
/* 071 */ I(Accuracy)
/* 072 */ I(CharmFileID)
/* 073 */ I(FactionMod1)
/* 077 */ I(FactionAmt1)
/* 074 */ I(FactionMod2)
/* 078 */ I(FactionAmt2)
/* 075 */ I(FactionMod3)
/* 079 */ I(FactionAmt3)
/* 076 */ I(FactionMod4)
/* 080 */ I(FactionAmt4)
/* 081 */ S(CharmFile)
/* 082 */ I(AugType)
/* 082 */ I(AugRestrict)
/* 082 */ I(AugDistiller)
/* 083 */ I(AugSlotType[0])
/* 084 */ I(AugSlotVisible[0])
/* 084 */ I(AugSlotUnk2[0])
/* 085 */ I(AugSlotType[1])
/* 086 */ I(AugSlotVisible[1])
/* 086 */ I(AugSlotUnk2[1])
/* 087 */ I(AugSlotType[2])
/* 088 */ I(AugSlotVisible[2])
/* 088 */ I(AugSlotUnk2[2])
/* 089 */ I(AugSlotType[3])
/* 090 */ I(AugSlotVisible[3])
/* 090 */ I(AugSlotUnk2[3])
/* 091 */ I(AugSlotType[4])
/* 092 */ I(AugSlotVisible[4])
/* 092 */ I(AugSlotUnk2[4])
/* 093 */ I(PointType)
/* 093 */ I(LDoNTheme)
/* 094 */ I(LDoNPrice)
/* 094 */ C("0")
/* 095 */ I(LDoNSold)
/* 096 */ I(BagType)
/* 097 */ I(BagSlots)
/* 098 */ I(BagSize)
/* 099 */ I(BagWR)
/* 100 */ I(Book)
/* 101 */ I(BookType)
/* 102 */ S(Filename)
/* 105 */ I(LoreGroup)
/* 106 */ //I(PendingLoreFlag)
/* 107 */ I(ArtifactFlag)
/* 094 */ C("0")
/* 108 */ //I(SummonedFlag)
/* 109 */ I(Favor)
/* 121 */ I(GuildFavor)
/* 110 */ I(FVNoDrop)
/* 112 */ I(DotShielding)
/* 113 */ I(Attack)
/* 114 */ I(Regen)
/* 115 */ I(ManaRegen)
/* 116 */ I(EnduranceRegen)
/* 117 */ I(Haste)
/* 118 */ I(DamageShield)
/* 120 */ C("0")
/* 121 */ C("0")
/* 125 */ I(Attuneable)
/* 126 */ I(NoPet)
/* 124 */ C("0")
/* 129 */ I(PotionBelt)
/* 130 */ I(PotionBeltSlots)
/* 131 */ I(StackSize)
/* 132 */ I(NoTransfer)
/* 129 */ C("0")
/* 132 */ I(QuestItemFlag)
/* 131 */ C("0")
/* 132 */ C("00000000000000000000000000000000000000")
/* 134 */ I(Click.Effect)
/* 135 */ I(Click.Type)
/* 136 */ I(Click.Level2)
/* 137 */ I(Click.Level)
/* 055 */ I(MaxCharges)
/* 060 */ I(CastTime)
/* 119 */ I(RecastDelay)
/* 120 */ I(RecastType)
/* 138 */ C("0") //clickunk5 (prolly ProcRate)
/* 138 */ C("") //clickunk6
/* 138 */ C("-1") //clickunk7
/* 139 */ I(Proc.Effect)
/* 140 */ I(Proc.Type)
/* 141 */ I(Proc.Level2)
/* 142 */ I(Proc.Level)
/* 143 */ C("0") //procunk1 (prolly MaxCharges)
/* 143 */ C("0") //procunk2 (prolly CastTime)
/* 143 */ C("0") //procunk3 (prolly RecastDelay)
/* 143 */ C("0") //procunk4 (prolly RecastType)
/* 062 */ I(ProcRate)
/* 143 */ C("") //procunk6
/* 143 */ C("-1") //procunk7
/* 144 */ I(Worn.Effect)
/* 145 */ I(Worn.Type)
/* 146 */ I(Worn.Level2)
/* 147 */ I(Worn.Level)
/* 143 */ C("0") //wornunk1 (prolly MaxCharges)
/* 143 */ C("0") //wornunk2 (prolly CastTime)
/* 143 */ C("0") //wornunk3 (prolly RecastDelay)
/* 143 */ C("0") //wornunk4 (prolly RecastType)
/* 143 */ C("0") //wornunk5 (prolly ProcRate)
/* 143 */ C("") //wornunk6
/* 143 */ C("-1") //wornunk7
/* 149 */ I(Focus.Effect)
/* 150 */ I(Focus.Type)
/* 151 */ I(Focus.Level2)
/* 152 */ I(Focus.Level)
/* 143 */ C("0") //focusunk1 (prolly MaxCharges)
/* 143 */ C("0") //focusunk2 (prolly CastTime)
/* 143 */ C("0") //focusunk3 (prolly RecastDelay)
/* 143 */ C("0") //focusunk4 (prolly RecastType)
/* 143 */ C("0") //focusunk5 (prolly ProcRate)
/* 143 */ C("") //focusunk6
/* 143 */ C("-1") //focusunk7
/* 154 */ I(Scroll.Effect)
/* 155 */ I(Scroll.Type)
/* 156 */ I(Scroll.Level2)
/* 157 */ I(Scroll.Level)
/* 143 */ C("0") //scrollunk1 (prolly MaxCharges)
/* 143 */ C("0") //scrollunk2 (prolly CastTime)
/* 143 */ C("0") //scrollunk3 (prolly RecastDelay)
/* 143 */ C("0") //scrollunk4 (prolly RecastType)
/* 143 */ C("0") //scrollunk5 (prolly ProcRate)
/* 143 */ C("") //scrollunk6
/* 143 */ C("-1") //scrollunk7
/* 193 */ C("0") //Power Source Capacity
/* 194 */ C("0") //purity
#endif
#undef I
#undef C
#undef S
#undef F
+173
View File
@@ -0,0 +1,173 @@
// out-going packets that require an ENCODE translation:
// Begin RoF2 Encodes
// incoming packets that require a DECODE translation:
// Begin RoF2 Decodes
// End RoF2 Encodes/Decodes
// These require Encodes/Decodes for RoF, so they do for RoF2 as well
// Begin RoF Encodes
E(OP_Action)
E(OP_AdventureMerchantSell)
E(OP_AltCurrency)
E(OP_AltCurrencySell)
E(OP_Animation)
E(OP_ApplyPoison)
E(OP_AugmentInfo)
E(OP_Barter)
E(OP_BazaarSearch)
E(OP_BeginCast)
E(OP_BlockedBuffs)
E(OP_Buff)
E(OP_BuffCreate)
E(OP_CancelTrade)
E(OP_CastSpell)
E(OP_ChannelMessage)
E(OP_CharInventory)
E(OP_ClickObjectAction)
E(OP_ClientUpdate)
E(OP_Consider)
E(OP_Damage)
E(OP_DeleteCharge)
E(OP_DeleteItem)
E(OP_DeleteSpawn)
E(OP_DisciplineUpdate)
E(OP_DzCompass)
E(OP_DzExpeditionEndsWarning)
E(OP_DzExpeditionInfo)
E(OP_DzExpeditionList)
E(OP_DzJoinExpeditionConfirm)
E(OP_DzLeaderStatus)
E(OP_DzMemberList)
E(OP_ExpansionInfo)
E(OP_GMLastName)
E(OP_GMTrainSkillConfirm)
E(OP_GroundSpawn)
E(OP_GroupCancelInvite)
E(OP_GroupFollow)
E(OP_GroupFollow2)
E(OP_GroupInvite)
E(OP_GroupUpdate)
E(OP_GuildMemberList)
E(OP_GuildMemberUpdate)
E(OP_GuildsList)
E(OP_HPUpdate)
E(OP_Illusion)
E(OP_InspectBuffs)
E(OP_InspectRequest)
E(OP_InterruptCast)
E(OP_ItemLinkResponse)
E(OP_ItemPacket)
E(OP_ItemVerifyReply)
E(OP_LeadershipExpUpdate)
E(OP_LogServer)
E(OP_LootItem)
E(OP_ManaChange)
E(OP_MercenaryDataResponse)
E(OP_MercenaryDataUpdate)
E(OP_MoveItem)
E(OP_NewSpawn)
E(OP_NewZone)
E(OP_OnLevelMessage)
//E(OP_OpenNewTasksWindow)
E(OP_PetBuffWindow)
E(OP_PlayerProfile)
E(OP_RaidJoin)
E(OP_RaidUpdate)
E(OP_ReadBook)
E(OP_RecipeAutoCombine)
E(OP_RemoveBlockedBuffs)
E(OP_RequestClientZoneChange)
E(OP_RespondAA)
E(OP_RezzRequest)
E(OP_SendAATable)
E(OP_SendCharInfo)
E(OP_SendMembership)
E(OP_SendZonepoints)
E(OP_SetGuildRank)
E(OP_ShopPlayerBuy)
E(OP_ShopPlayerSell)
E(OP_ShopRequest)
E(OP_SkillUpdate)
E(OP_SomeItemPacketMaybe)
E(OP_SpawnAppearance)
E(OP_SpawnDoor)
E(OP_Stun)
E(OP_TargetBuffs)
E(OP_TaskDescription)
E(OP_TaskHistoryReply)
E(OP_Track)
E(OP_Trader)
E(OP_TraderBuy)
E(OP_TributeInfo)
E(OP_TributeItem)
E(OP_VetRewardsAvaliable)
E(OP_WearChange)
E(OP_WhoAllResponse)
E(OP_ZoneChange)
E(OP_ZoneEntry)
E(OP_ZonePlayerToBind)
E(OP_ZoneServerInfo)
E(OP_ZoneSpawns)
// Begin RoF Decodes
D(OP_AdventureMerchantSell)
D(OP_AltCurrencySell)
D(OP_AltCurrencySellSelection)
D(OP_ApplyPoison)
D(OP_AugmentInfo)
D(OP_AugmentItem)
D(OP_BazaarSearch)
D(OP_BlockedBuffs)
D(OP_Buff)
D(OP_BuffRemoveRequest)
D(OP_CastSpell)
D(OP_ChannelMessage)
D(OP_CharacterCreate)
D(OP_ClientUpdate)
D(OP_Consider)
D(OP_ConsiderCorpse)
D(OP_Consume)
D(OP_Damage)
D(OP_DeleteItem)
D(OP_EnvDamage)
D(OP_FaceChange)
D(OP_FindPersonRequest)
D(OP_GMLastName)
D(OP_GroupCancelInvite)
D(OP_GroupDisband)
D(OP_GroupFollow)
D(OP_GroupFollow2)
D(OP_GroupInvite)
D(OP_GroupInvite2)
D(OP_GuildDemote)
D(OP_GuildRemove)
D(OP_GuildStatus)
D(OP_InspectRequest)
D(OP_ItemLinkClick)
D(OP_ItemVerifyRequest)
D(OP_LoadSpellSet)
D(OP_LootItem)
D(OP_MoveItem)
D(OP_PetCommands)
D(OP_RaidInvite)
D(OP_ReadBook)
D(OP_RecipeAutoCombine)
D(OP_RemoveBlockedBuffs)
D(OP_RezzAnswer)
D(OP_Save)
D(OP_SetServerFilter)
D(OP_ShopPlayerBuy)
D(OP_ShopPlayerSell)
D(OP_ShopRequest)
D(OP_Trader)
D(OP_TraderBuy)
D(OP_TradeSkillCombine)
D(OP_TributeItem)
D(OP_WhoAllRequest)
D(OP_ZoneChange)
D(OP_ZoneEntry)
// End RoF Encodes/Decodes
#undef E
#undef D
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#ifndef RoF_CONSTANTS_H_
#define RoF_CONSTANTS_H_
#include "../common/types.h"
#include "../types.h"
namespace RoF {
namespace maps {
@@ -184,6 +184,7 @@ namespace RoF {
namespace limits {
static const bool ALLOWS_EMPTY_BAG_IN_BAG = true;
static const bool ALLOWS_CLICK_CAST_FROM_BAG = true;
static const bool COIN_HAS_WEIGHT = false;
}
+142 -142
View File
@@ -1,162 +1,162 @@
//list of packets we need to encode on the way out:
E(OP_SendCharInfo)
E(OP_ZoneServerInfo)
E(OP_SendAATable)
E(OP_PlayerProfile)
E(OP_ZoneEntry)
E(OP_CharInventory)
E(OP_NewZone)
E(OP_SpawnDoor)
E(OP_GroundSpawn)
E(OP_SendZonepoints)
E(OP_NewSpawn)
E(OP_ZoneSpawns)
E(OP_ItemLinkResponse)
E(OP_ItemPacket)
E(OP_GuildMemberList)
E(OP_Illusion)
E(OP_ManaChange)
E(OP_ClientUpdate)
E(OP_LeadershipExpUpdate)
E(OP_ExpansionInfo)
E(OP_LogServer)
E(OP_Damage)
E(OP_Buff)
// out-going packets that require an ENCODE translation:
E(OP_Action)
E(OP_Consider)
E(OP_CancelTrade)
E(OP_ShopPlayerSell)
E(OP_DeleteItem)
E(OP_ItemVerifyReply)
E(OP_DeleteCharge)
E(OP_MoveItem)
//E(OP_OpenNewTasksWindow)
E(OP_BazaarSearch)
E(OP_Trader)
E(OP_TraderBuy)
E(OP_LootItem)
E(OP_TributeItem)
E(OP_SomeItemPacketMaybe)
E(OP_ReadBook)
E(OP_Stun)
E(OP_ZonePlayerToBind)
E(OP_AdventureMerchantSell)
E(OP_RaidUpdate)
E(OP_RaidJoin)
E(OP_VetRewardsAvaliable)
E(OP_InspectRequest)
E(OP_GroupInvite)
E(OP_GroupFollow)
E(OP_GroupFollow2)
E(OP_GroupUpdate)
E(OP_GroupCancelInvite)
E(OP_WhoAllResponse)
E(OP_Track)
E(OP_ShopPlayerBuy)
E(OP_PetBuffWindow)
E(OP_OnLevelMessage)
E(OP_Barter)
E(OP_AltCurrency)
E(OP_AltCurrencySell)
E(OP_Animation)
E(OP_ApplyPoison)
E(OP_AugmentInfo)
E(OP_Barter)
E(OP_BazaarSearch)
E(OP_BeginCast)
E(OP_BlockedBuffs)
E(OP_Buff)
E(OP_BuffCreate)
E(OP_CancelTrade)
E(OP_CastSpell)
E(OP_ChannelMessage)
E(OP_GuildsList)
E(OP_CharInventory)
E(OP_ClickObjectAction)
E(OP_ClientUpdate)
E(OP_Consider)
E(OP_Damage)
E(OP_DeleteCharge)
E(OP_DeleteItem)
E(OP_DeleteSpawn)
E(OP_DisciplineUpdate)
E(OP_DzCompass)
E(OP_DzExpeditionEndsWarning)
E(OP_DzExpeditionInfo)
E(OP_DzCompass)
E(OP_DzMemberList)
E(OP_DzExpeditionList)
E(OP_DzLeaderStatus)
E(OP_DzJoinExpeditionConfirm)
E(OP_TargetBuffs)
E(OP_BuffCreate)
E(OP_SpawnAppearance)
E(OP_RespondAA)
E(OP_DisciplineUpdate)
E(OP_AltCurrencySell)
E(OP_AltCurrency)
E(OP_RequestClientZoneChange)
E(OP_ZoneChange)
E(OP_WearChange)
E(OP_ShopRequest)
E(OP_CastSpell)
E(OP_InterruptCast)
E(OP_SendMembership)
E(OP_Animation)
E(OP_HPUpdate)
E(OP_BlockedBuffs)
E(OP_RemoveBlockedBuffs)
E(OP_DeleteSpawn)
E(OP_ClickObjectAction)
E(OP_RecipeAutoCombine)
E(OP_GMTrainSkillConfirm)
E(OP_SkillUpdate)
E(OP_TributeInfo)
E(OP_TaskHistoryReply)
E(OP_TaskDescription)
E(OP_SetGuildRank)
E(OP_MercenaryDataUpdate)
E(OP_MercenaryDataResponse)
E(OP_GuildMemberUpdate)
E(OP_DzLeaderStatus)
E(OP_DzMemberList)
E(OP_ExpansionInfo)
E(OP_GMLastName)
E(OP_BeginCast)
E(OP_GMTrainSkillConfirm)
E(OP_GroundSpawn)
E(OP_GroupCancelInvite)
E(OP_GroupFollow)
E(OP_GroupFollow2)
E(OP_GroupInvite)
E(OP_GroupUpdate)
E(OP_GuildMemberList)
E(OP_GuildMemberUpdate)
E(OP_GuildsList)
E(OP_HPUpdate)
E(OP_Illusion)
E(OP_InspectBuffs)
E(OP_InspectRequest)
E(OP_InterruptCast)
E(OP_ItemLinkResponse)
E(OP_ItemPacket)
E(OP_ItemVerifyReply)
E(OP_LeadershipExpUpdate)
E(OP_LogServer)
E(OP_LootItem)
E(OP_ManaChange)
E(OP_MercenaryDataResponse)
E(OP_MercenaryDataUpdate)
E(OP_MoveItem)
E(OP_NewSpawn)
E(OP_NewZone)
E(OP_OnLevelMessage)
//E(OP_OpenNewTasksWindow)
E(OP_PetBuffWindow)
E(OP_PlayerProfile)
E(OP_RaidJoin)
E(OP_RaidUpdate)
E(OP_ReadBook)
E(OP_RecipeAutoCombine)
E(OP_RemoveBlockedBuffs)
E(OP_RequestClientZoneChange)
E(OP_RespondAA)
E(OP_RezzRequest)
//list of packets we need to decode on the way in:
D(OP_SetServerFilter)
D(OP_CharacterCreate)
D(OP_ItemLinkClick)
D(OP_ConsiderCorpse)
D(OP_Consider)
D(OP_ClientUpdate)
D(OP_MoveItem)
D(OP_WhoAllRequest)
E(OP_SendAATable)
E(OP_SendCharInfo)
E(OP_SendMembership)
E(OP_SendZonepoints)
E(OP_SetGuildRank)
E(OP_ShopPlayerBuy)
E(OP_ShopPlayerSell)
E(OP_ShopRequest)
E(OP_SkillUpdate)
E(OP_SomeItemPacketMaybe)
E(OP_SpawnAppearance)
E(OP_SpawnDoor)
E(OP_Stun)
E(OP_TargetBuffs)
E(OP_TaskDescription)
E(OP_TaskHistoryReply)
E(OP_Track)
E(OP_Trader)
E(OP_TraderBuy)
E(OP_TributeInfo)
E(OP_TributeItem)
E(OP_VetRewardsAvaliable)
E(OP_WearChange)
E(OP_WhoAllResponse)
E(OP_ZoneChange)
E(OP_ZoneEntry)
E(OP_ZonePlayerToBind)
E(OP_ZoneServerInfo)
E(OP_ZoneSpawns)
// incoming packets that require a DECODE translation:
D(OP_AdventureMerchantSell)
D(OP_AltCurrencySell)
D(OP_AltCurrencySellSelection)
D(OP_ApplyPoison)
D(OP_AugmentInfo)
D(OP_AugmentItem)
D(OP_BazaarSearch)
D(OP_BlockedBuffs)
D(OP_Buff)
D(OP_ShopPlayerSell)
D(OP_Consume)
D(OP_BuffRemoveRequest)
D(OP_CastSpell)
D(OP_Save)
D(OP_ItemVerifyRequest)
D(OP_GroupInvite)
D(OP_GroupInvite2)
D(OP_ChannelMessage)
D(OP_CharacterCreate)
D(OP_ClientUpdate)
D(OP_Consider)
D(OP_ConsiderCorpse)
D(OP_Consume)
D(OP_Damage)
D(OP_DeleteItem)
D(OP_EnvDamage)
D(OP_FaceChange)
D(OP_FindPersonRequest)
D(OP_GMLastName)
D(OP_GroupCancelInvite)
D(OP_GroupDisband)
D(OP_GroupFollow)
D(OP_GroupFollow2)
D(OP_GroupDisband)
D(OP_GroupCancelInvite)
D(OP_FindPersonRequest)
D(OP_TraderBuy)
D(OP_LootItem)
D(OP_TributeItem)
D(OP_ReadBook)
D(OP_AugmentInfo)
D(OP_FaceChange)
D(OP_AdventureMerchantSell)
D(OP_TradeSkillCombine)
D(OP_RaidInvite)
D(OP_InspectRequest)
D(OP_ShopPlayerBuy)
D(OP_BazaarSearch)
D(OP_LoadSpellSet)
D(OP_ApplyPoison)
D(OP_Damage)
D(OP_EnvDamage)
D(OP_ChannelMessage)
D(OP_DeleteItem)
D(OP_AugmentItem)
D(OP_PetCommands)
D(OP_BuffRemoveRequest)
D(OP_AltCurrencySellSelection)
D(OP_AltCurrencySell)
D(OP_ZoneChange)
D(OP_ZoneEntry)
D(OP_ShopRequest)
D(OP_BlockedBuffs)
D(OP_RemoveBlockedBuffs)
D(OP_RecipeAutoCombine)
D(OP_GroupInvite)
D(OP_GroupInvite2)
D(OP_GuildDemote)
D(OP_GuildRemove)
D(OP_GuildStatus)
D(OP_Trader)
D(OP_GMLastName)
D(OP_InspectRequest)
D(OP_ItemLinkClick)
D(OP_ItemVerifyRequest)
D(OP_LoadSpellSet)
D(OP_LootItem)
D(OP_MoveItem)
D(OP_PetCommands)
D(OP_RaidInvite)
D(OP_ReadBook)
D(OP_RecipeAutoCombine)
D(OP_RemoveBlockedBuffs)
D(OP_RezzAnswer)
D(OP_Save)
D(OP_SetServerFilter)
D(OP_ShopPlayerBuy)
D(OP_ShopPlayerSell)
D(OP_ShopRequest)
D(OP_Trader)
D(OP_TraderBuy)
D(OP_TradeSkillCombine)
D(OP_TributeItem)
D(OP_WhoAllRequest)
D(OP_ZoneChange)
D(OP_ZoneEntry)
#undef E
#undef D
+141 -34
View File
@@ -112,7 +112,7 @@ static const uint32 MAX_NUMBER_GUILDS = 1500;
static const uint32 MAX_PP_LANGUAGE = 32; // was 25
static const uint32 MAX_PP_SPELLBOOK = 720; // was 480
static const uint32 MAX_PP_MEMSPELL = 16; // was 12
static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
static const uint32 MAX_PP_AA_ARRAY = 300;
static const uint32 MAX_PP_DISCIPLINES = 200; // was 100
static const uint32 MAX_GROUP_MEMBERS = 6;
@@ -712,7 +712,8 @@ struct SpellBuffFade_Struct_Live {
/*012*/ uint32 spellid;
/*016*/ uint32 duration;
/*020*/ uint32 playerId; // Global player ID?
/*024*/ uint8 unknown0028[68];
/*024*/ uint32 num_hits;
/*028*/ uint8 unknown0028[64];
/*092*/ uint32 slotid;
/*096*/ uint32 bufffade;
/*100*/
@@ -726,7 +727,7 @@ struct SpellBuffFade_Struct {
/*007*/ uint8 unknown7;
/*008*/ uint32 spellid;
/*012*/ uint32 duration;
/*016*/ uint32 unknown016;
/*016*/ uint32 num_hits;
/*020*/ uint32 unknown020; // Global player ID?
/*024*/ uint32 playerId; // Player id who cast the buff
/*028*/ uint32 slotid;
@@ -741,12 +742,33 @@ struct BuffRemoveRequest_Struct
/*08*/
};
#if 0
// not in use
struct BuffIconEntry_Struct {
/*000*/ uint32 buff_slot;
/*004*/ uint32 spell_id;
/*008*/ uint32 tics_remaining;
/*012*/ uint32 num_hits;
// char name[0]; caster name is also here sometimes
// uint8 unknownend; 1 when single, 0 when all opposite of all_buffs?
};
// not in use
struct BuffIcon_Struct {
/*000*/ uint32 entity_id;
/*004*/ uint32 unknown004;
/*008*/ uint8 all_buffs; // 1 when updating all buffs, 0 when doing one
/*009*/ uint16 count;
/*011*/ BuffIconEntry_Struct entires[0];
};
#endif
struct GMTrainee_Struct
{
/*000*/ uint32 npcid;
/*004*/ uint32 playerid;
/*008*/ uint32 skills[73];
/*300*/ uint8 unknown300[148];
/*008*/ uint32 skills[PACKET_SKILL_ARRAY_SIZE];
/*408*/ uint8 unknown408[40];
/*448*/
};
@@ -893,14 +915,62 @@ struct PotionBelt_Struct {
BandolierItem_Struct items[MAX_POTIONS_IN_BELT];
};
struct LeadershipAA_Struct {
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
};
struct GroupLeadershipAA_Struct {
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
union {
struct {
uint32 groupAAMarkNPC;
uint32 groupAANPCHealth;
uint32 groupAADelegateMainAssist;
uint32 groupAADelegateMarkNPC;
uint32 groupAA4;
uint32 groupAA5;
uint32 groupAAInspectBuffs;
uint32 groupAA7;
uint32 groupAASpellAwareness;
uint32 groupAAOffenseEnhancement;
uint32 groupAAManaEnhancement;
uint32 groupAAHealthEnhancement;
uint32 groupAAHealthRegeneration;
uint32 groupAAFindPathToPC;
uint32 groupAAHealthOfTargetsTarget;
uint32 groupAA15;
};
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
};
};
struct RaidLeadershipAA_Struct {
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
union {
struct {
uint32 raidAAMarkNPC;
uint32 raidAANPCHealth;
uint32 raidAADelegateMainAssist;
uint32 raidAADelegateMarkNPC;
uint32 raidAA4;
uint32 raidAA5;
uint32 raidAA6;
uint32 raidAASpellAwareness;
uint32 raidAAOffenseEnhancement;
uint32 raidAAManaEnhancement;
uint32 raidAAHealthEnhancement;
uint32 raidAAHealthRegeneration;
uint32 raidAAFindPathToPC;
uint32 raidAAHealthOfTargetsTarget;
uint32 raidAA14;
uint32 raidAA15;
};
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
};
};
struct LeadershipAA_Struct {
union {
struct {
GroupLeadershipAA_Struct group;
RaidLeadershipAA_Struct raid;
};
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
};
};
/**
@@ -1678,7 +1748,7 @@ struct BulkItemPacket_Struct
struct Consume_Struct
{
/*000*/ ItemSlotStruct slot;
/*000*/ ItemSlotStruct slot;
/*012*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click
/*016*/ uint32 type; // 0x01=Food 0x02=Water
/*020*/ uint32 c_unknown1; // Seen 2
@@ -1711,17 +1781,17 @@ struct ItemProperties_Struct {
};
struct DeleteItem_Struct {
/*0000*/ ItemSlotStruct from_slot;
/*0004*/ ItemSlotStruct to_slot;
/*0008*/ uint32 number_in_stack;
/*0012*/
/*0000*/ ItemSlotStruct from_slot;
/*0012*/ ItemSlotStruct to_slot;
/*0024*/ uint32 number_in_stack;
/*0028*/
};
struct MoveItem_Struct {
/*0000*/ ItemSlotStruct from_slot;
/*0004*/ ItemSlotStruct to_slot;
/*0008*/ uint32 number_in_stack;
/*0012*/
/*0000*/ ItemSlotStruct from_slot;
/*0012*/ ItemSlotStruct to_slot;
/*0024*/ uint32 number_in_stack;
/*0028*/
};
//
@@ -2045,7 +2115,7 @@ struct Merchant_Sell_Struct {
struct Merchant_Purchase_Struct {
/*000*/ uint32 npcid; // Merchant NPC's entity id
/*004*/ MainInvItemSlotStruct itemslot;
/*004*/ MainInvItemSlotStruct itemslot;
/*012*/ uint32 quantity;
/*016*/ uint32 price;
/*020*/
@@ -2403,6 +2473,11 @@ struct GroupFollow_Struct { // Live Follow Struct
/*0152*/
};
struct InspectBuffs_Struct {
/*000*/ uint32 spell_id[BUFF_COUNT];
/*168*/ uint32 tics_remaining[BUFF_COUNT];
};
struct LFG_Struct {
/*000*/ uint32 unknown000;
/*004*/ uint32 value; // 0x00 = off 0x01 = on
@@ -3488,10 +3563,10 @@ struct TributeInfo_Struct {
struct TributeItem_Struct
{
/*00*/ ItemSlotStruct slot;
/*12*/ uint32 quantity;
/*16*/ uint32 tribute_master_id;
/*20*/ int32 tribute_points;
/*00*/ ItemSlotStruct slot;
/*12*/ uint32 quantity;
/*16*/ uint32 tribute_master_id;
/*20*/ int32 tribute_points;
/*24*/
};
@@ -3527,7 +3602,7 @@ struct Split_Struct
*/
struct NewCombine_Struct {
/*00*/ ItemSlotStruct container_slot;
/*12*/ ItemSlotStruct unknown_slot; // Slot type is 8?
/*12*/ ItemSlotStruct guildtribute_slot; // Slot type is 8? (MapGuildTribute = 8 -U)
/*24*/
};
@@ -3972,6 +4047,21 @@ struct RaidAddMember_Struct {
/*139*/ uint8 flags[5]; //no idea if these are needed...
};
struct RaidMOTD_Struct {
/*000*/ RaidGeneral_Struct general; // leader_name and action only used
/*140*/ char motd[0]; // max size 1024, but reply is variable
};
struct RaidLeadershipUpdate_Struct {
/*000*/ uint32 action;
/*004*/ char player_name[64];
/*068*/ uint32 Unknown068;
/*072*/ char leader_name[64];
/*136*/ GroupLeadershipAA_Struct group; //unneeded
/*200*/ RaidLeadershipAA_Struct raid;
/*264*/ char Unknown264[128];
};
struct RaidAdd_Struct {
/*000*/ uint32 action; //=0
/*004*/ char player_name[64]; //should both be the player's name
@@ -4079,7 +4169,8 @@ struct Arrow_Struct {
/*070*/ uint8 unknown070;
/*071*/ uint8 item_type;
/*072*/ uint8 skill;
/*073*/ char model_name[43];
/*073*/ uint8 unknown073[16];
/*089*/ char model_name[27];
/*116*/
};
@@ -4106,7 +4197,7 @@ struct GMToggle_Struct {
uint32 toggle;
};
struct BuffFadeMsg_Struct {
struct ColoredText_Struct {
uint32 color;
char msg[1]; //was 1
/*0???*/ uint8 paddingXXX[3]; // always 0's
@@ -4306,7 +4397,7 @@ struct ItemSerializationHeader
/*030*/ uint16 unknown013; // 0xffff
/*032*/ uint32 price;
/*036*/ uint32 merchant_slot; //1 if not a merchant item
/*040*/ uint32 unknown020; //0
/*040*/ uint32 scaled_value; //0
/*044*/ uint32 instance_id; //unique instance id if not merchant item, else is merchant slot
/*048*/ uint32 unknown028; //0
/*052*/ uint32 last_cast_time; // Unix Time from PP of last cast for this recast type if recast delay > 0
@@ -4315,8 +4406,24 @@ struct ItemSerializationHeader
/*064*/ uint32 unknown044; // 0
/*068*/ uint32 unknown048; // 0
/*072*/ uint32 unknown052; // 0
/*076*/ uint32 unknown056; // 0
/*080*/ uint8 unknown060; // 0
uint8 isEvolving;
};
struct EvolvingItem {
uint8 unknown001;
uint8 unknown002;
uint8 unknown003;
uint8 unknown004;
int32 evoLevel;
double progress;
uint8 Activated;
int32 evomaxlevel;
uint8 unknown005[4];
};
struct ItemSerializationHeaderFinish
{
uint16 ornamentIcon;
/*081*/ uint8 unknown061; // 0 - Add Evolving Item struct if this isn't set to 0?
/*082*/ uint8 unknown062; // 0
/*083*/ uint32 unknowna1; // 0xffffffff
@@ -4585,10 +4692,10 @@ struct ItemQuaternaryBodyStruct
struct AugmentInfo_Struct
{
/*000*/ uint32 itemid; // id of the solvent needed
/*004*/ uint8 window; // window to display the information in
/*005*/ uint8 unknown005[71]; // total packet length 76, all the rest were always 00
/*076*/
/*000*/ uint32 itemid; // id of the solvent needed
/*004*/ uint32 window; // window to display the information in
/*008*/ char augment_info[64]; // total packet length 76, all the rest were always 00
/*072*/ uint32 unknown072;
};
struct VeteranRewardItem
+3284 -3159
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#ifndef SoD_CONSTANTS_H_
#define SoD_CONSTANTS_H_
#include "../common/types.h"
#include "../types.h"
namespace SoD {
namespace maps {
@@ -181,6 +181,7 @@ namespace SoD {
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 = false;
}
+99 -100
View File
@@ -1,117 +1,116 @@
//list of packets we need to encode on the way out:
E(OP_SendCharInfo)
E(OP_ZoneServerInfo)
E(OP_SendAATable)
E(OP_PlayerProfile)
E(OP_ZoneEntry)
E(OP_CharInventory)
E(OP_NewZone)
E(OP_SpawnDoor)
E(OP_GroundSpawn)
E(OP_SendZonepoints)
E(OP_NewSpawn)
E(OP_ZoneSpawns)
E(OP_ItemLinkResponse)
E(OP_ItemPacket)
E(OP_GuildMemberList)
E(OP_Illusion)
E(OP_ManaChange)
E(OP_ClientUpdate)
E(OP_LeadershipExpUpdate)
E(OP_ExpansionInfo)
E(OP_LogServer)
E(OP_Damage)
E(OP_Buff)
// out-going packets that require an ENCODE translation:
E(OP_Action)
E(OP_Consider)
E(OP_CancelTrade)
E(OP_ShopPlayerSell)
E(OP_DeleteItem)
E(OP_ItemVerifyReply)
E(OP_DeleteCharge)
E(OP_MoveItem)
E(OP_OpenNewTasksWindow)
E(OP_BazaarSearch)
E(OP_Trader)
E(OP_TraderBuy)
E(OP_LootItem)
E(OP_TributeItem)
E(OP_SomeItemPacketMaybe)
E(OP_ReadBook)
E(OP_Stun)
E(OP_ZonePlayerToBind)
E(OP_AdventureMerchantSell)
E(OP_RaidUpdate)
E(OP_RaidJoin)
E(OP_VetRewardsAvaliable)
E(OP_InspectRequest)
E(OP_GroupInvite)
E(OP_GroupFollow)
E(OP_GroupFollow2)
E(OP_GroupUpdate)
E(OP_GroupCancelInvite)
E(OP_WhoAllResponse)
E(OP_Track)
E(OP_ShopPlayerBuy)
E(OP_PetBuffWindow)
E(OP_OnLevelMessage)
E(OP_Barter)
E(OP_AltCurrencySell)
E(OP_ApplyPoison)
E(OP_AugmentInfo)
E(OP_Barter)
E(OP_BazaarSearch)
E(OP_Buff)
E(OP_CancelTrade)
E(OP_CharInventory)
E(OP_ClientUpdate)
E(OP_Consider)
E(OP_Damage)
E(OP_DeleteCharge)
E(OP_DeleteItem)
E(OP_DzCompass)
E(OP_DzExpeditionEndsWarning)
E(OP_DzExpeditionInfo)
E(OP_DzCompass)
E(OP_DzMemberList)
E(OP_DzExpeditionList)
E(OP_DzLeaderStatus)
E(OP_DzJoinExpeditionConfirm)
E(OP_TargetBuffs)
E(OP_AltCurrencySell)
E(OP_WearChange)
E(OP_DzLeaderStatus)
E(OP_DzMemberList)
E(OP_ExpansionInfo)
E(OP_GroundSpawn)
E(OP_GroupCancelInvite)
E(OP_GroupFollow)
E(OP_GroupFollow2)
E(OP_GroupInvite)
E(OP_GroupUpdate)
E(OP_GuildMemberList)
E(OP_Illusion)
E(OP_InspectRequest)
E(OP_ItemLinkResponse)
E(OP_ItemPacket)
E(OP_ItemVerifyReply)
E(OP_LeadershipExpUpdate)
E(OP_LogServer)
E(OP_LootItem)
E(OP_ManaChange)
E(OP_MercenaryDataResponse)
E(OP_MercenaryDataUpdate)
//list of packets we need to decode on the way in:
D(OP_SetServerFilter)
D(OP_CharacterCreate)
D(OP_ItemLinkClick)
D(OP_ConsiderCorpse)
D(OP_Consider)
D(OP_ClientUpdate)
D(OP_MoveItem)
D(OP_WhoAllRequest)
E(OP_MoveItem)
E(OP_NewSpawn)
E(OP_NewZone)
E(OP_OnLevelMessage)
E(OP_OpenNewTasksWindow)
E(OP_PetBuffWindow)
E(OP_PlayerProfile)
E(OP_RaidJoin)
E(OP_RaidUpdate)
E(OP_ReadBook)
E(OP_SendAATable)
E(OP_SendCharInfo)
E(OP_SendZonepoints)
E(OP_ShopPlayerBuy)
E(OP_ShopPlayerSell)
E(OP_SomeItemPacketMaybe)
E(OP_SpawnDoor)
E(OP_Stun)
E(OP_TargetBuffs)
E(OP_Track)
E(OP_Trader)
E(OP_TraderBuy)
E(OP_TributeItem)
E(OP_VetRewardsAvaliable)
E(OP_WearChange)
E(OP_WhoAllResponse)
E(OP_ZoneEntry)
E(OP_ZonePlayerToBind)
E(OP_ZoneServerInfo)
E(OP_ZoneSpawns)
// incoming packets that require a DECODE translation:
D(OP_AdventureMerchantSell)
D(OP_AltCurrencySell)
D(OP_AltCurrencySellSelection)
D(OP_ApplyPoison)
D(OP_AugmentInfo)
D(OP_AugmentItem)
D(OP_BazaarSearch)
D(OP_Buff)
D(OP_ShopPlayerSell)
D(OP_Consume)
D(OP_Bug)
D(OP_CastSpell)
D(OP_Save)
D(OP_ItemVerifyRequest)
D(OP_GroupInvite)
D(OP_GroupInvite2)
D(OP_CharacterCreate)
D(OP_ClientUpdate)
D(OP_Consider)
D(OP_ConsiderCorpse)
D(OP_Consume)
D(OP_DeleteItem)
D(OP_FaceChange)
D(OP_FindPersonRequest)
D(OP_GroupCancelInvite)
D(OP_GroupDisband)
D(OP_GroupFollow)
D(OP_GroupFollow2)
D(OP_GroupDisband)
D(OP_GroupCancelInvite)
D(OP_FindPersonRequest)
D(OP_TraderBuy)
D(OP_LootItem)
D(OP_TributeItem)
D(OP_ReadBook)
D(OP_AugmentInfo)
D(OP_FaceChange)
D(OP_AdventureMerchantSell)
D(OP_TradeSkillCombine)
D(OP_RaidInvite)
D(OP_GroupInvite)
D(OP_GroupInvite2)
D(OP_InspectRequest)
D(OP_WearChange)
D(OP_ShopPlayerBuy)
D(OP_BazaarSearch)
D(OP_ItemLinkClick)
D(OP_ItemVerifyRequest)
D(OP_LoadSpellSet)
D(OP_ApplyPoison)
D(OP_DeleteItem)
D(OP_AugmentItem)
D(OP_Bug)
D(OP_AltCurrencySellSelection)
D(OP_AltCurrencySell)
D(OP_LootItem)
D(OP_MoveItem)
D(OP_RaidInvite)
D(OP_ReadBook)
D(OP_Save)
D(OP_SetServerFilter)
D(OP_ShopPlayerBuy)
D(OP_ShopPlayerSell)
D(OP_TraderBuy)
D(OP_TradeSkillCombine)
D(OP_TributeItem)
D(OP_WearChange)
D(OP_WhoAllRequest)
#undef E
#undef D
+94 -31
View File
@@ -519,7 +519,7 @@ struct CastSpell_Struct
uint32 spell_id;
uint32 inventoryslot; // slot for clicky item, 0xFFFF = normal cast
uint32 target_id;
uint8 cs_unknown[4];
uint8 cs_unknown[4];
};
/*
@@ -576,8 +576,8 @@ struct GMTrainee_Struct
{
/*000*/ uint32 npcid;
/*004*/ uint32 playerid;
/*008*/ uint32 skills[73];
/*300*/ uint8 unknown300[148];
/*008*/ uint32 skills[PACKET_SKILL_ARRAY_SIZE];
/*408*/ uint8 unknown408[40];
/*448*/
};
@@ -711,14 +711,62 @@ struct PotionBelt_Struct {
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
static const uint32 MAX_RAID_LEADERSHIP_AA_ARRAY = 16;
static const uint32 MAX_LEADERSHIP_AA_ARRAY = (MAX_GROUP_LEADERSHIP_AA_ARRAY+MAX_RAID_LEADERSHIP_AA_ARRAY);
struct LeadershipAA_Struct {
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
};
struct GroupLeadershipAA_Struct {
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
union {
struct {
uint32 groupAAMarkNPC;
uint32 groupAANPCHealth;
uint32 groupAADelegateMainAssist;
uint32 groupAADelegateMarkNPC;
uint32 groupAA4;
uint32 groupAA5;
uint32 groupAAInspectBuffs;
uint32 groupAA7;
uint32 groupAASpellAwareness;
uint32 groupAAOffenseEnhancement;
uint32 groupAAManaEnhancement;
uint32 groupAAHealthEnhancement;
uint32 groupAAHealthRegeneration;
uint32 groupAAFindPathToPC;
uint32 groupAAHealthOfTargetsTarget;
uint32 groupAA15;
};
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
};
};
struct RaidLeadershipAA_Struct {
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
union {
struct {
uint32 raidAAMarkNPC;
uint32 raidAANPCHealth;
uint32 raidAADelegateMainAssist;
uint32 raidAADelegateMarkNPC;
uint32 raidAA4;
uint32 raidAA5;
uint32 raidAA6;
uint32 raidAASpellAwareness;
uint32 raidAAOffenseEnhancement;
uint32 raidAAManaEnhancement;
uint32 raidAAHealthEnhancement;
uint32 raidAAHealthRegeneration;
uint32 raidAAFindPathToPC;
uint32 raidAAHealthOfTargetsTarget;
uint32 raidAA14;
uint32 raidAA15;
};
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
};
};
struct LeadershipAA_Struct {
union {
struct {
GroupLeadershipAA_Struct group;
RaidLeadershipAA_Struct raid;
};
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
};
};
/**
@@ -744,7 +792,7 @@ struct BindStruct {
static const uint32 MAX_PP_LANGUAGE = 25; //
static const uint32 MAX_PP_SPELLBOOK = 480; // Confirmed 60 pages on Live now
static const uint32 MAX_PP_MEMSPELL = 10; //was 9 now 10 on Live
static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
static const uint32 MAX_PP_AA_ARRAY = 300; //was 299
static const uint32 MAX_GROUP_MEMBERS = 6;
static const uint32 MAX_RECAST_TYPES = 20;
@@ -1469,11 +1517,11 @@ 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];
/*0016*/
};
@@ -1503,17 +1551,17 @@ struct ItemProperties_Struct {
};
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
{
/*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*/
};
@@ -3090,10 +3138,10 @@ struct TributeInfo_Struct {
};
struct TributeItem_Struct {
uint32 slot;
uint32 quantity;
uint32 tribute_master_id;
int32 tribute_points;
uint32 slot;
uint32 quantity;
uint32 tribute_master_id;
int32 tribute_points;
};
struct TributePoint_Struct {
@@ -3129,7 +3177,7 @@ struct Split_Struct
*/
struct NewCombine_Struct {
/*00*/ int16 container_slot;
/*02*/ char unknown02[2];
/*02*/ int16 guildtribute_slot;
/*04*/
};
@@ -3562,6 +3610,21 @@ struct RaidAddMember_Struct {
/*139*/ uint8 flags[5]; //no idea if these are needed...
};
struct RaidMOTD_Struct {
/*000*/ RaidGeneral_Struct general; // leader_name and action only used
/*140*/ char motd[0]; // max size 1024, but reply is variable
};
struct RaidLeadershipUpdate_Struct {
/*000*/ uint32 action;
/*004*/ char player_name[64];
/*068*/ uint32 Unknown068;
/*072*/ char leader_name[64];
/*136*/ GroupLeadershipAA_Struct group; //unneeded
/*200*/ RaidLeadershipAA_Struct raid;
/*264*/ char Unknown264[128];
};
struct RaidAdd_Struct {
/*000*/ uint32 action; //=0
/*004*/ char player_name[64]; //should both be the player's name
@@ -3693,7 +3756,7 @@ struct GMToggle_Struct {
uint32 toggle;
};
struct BuffFadeMsg_Struct {
struct ColoredText_Struct {
uint32 color;
char msg[1]; //was 1
/*0???*/ uint8 paddingXXX[3]; // always 0's
@@ -3868,7 +3931,7 @@ struct ItemSerializationHeader
/*008*/ uint32 slot;
/*012*/ uint32 price;
/*016*/ uint32 merchant_slot; //1 if not a merchant item
/*020*/ uint32 unknown020; //0
/*020*/ uint32 scaled_value; //0
/*024*/ uint32 instance_id; //unique instance id if not merchant item, else is merchant slot
/*028*/ uint32 unknown028; //0
/*032*/ uint32 last_cast_time; // Unix Time from PP of last cast for this recast type if recast delay > 0
@@ -4109,10 +4172,10 @@ struct ItemQuaternaryBodyStruct
struct AugmentInfo_Struct
{
/*000*/ uint32 itemid; // id of the solvent needed
/*004*/ uint8 window; // window to display the information in
/*005*/ uint8 unknown005[71]; // total packet length 76, all the rest were always 00
/*076*/
/*000*/ uint32 itemid; // id of the solvent needed
/*004*/ uint32 window; // window to display the information in
/*008*/ char augment_info[64]; // total packet length 76, all the rest were always 00
/*072*/ uint32 unknown072;
};
struct VeteranRewardItem
+2894 -2752
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#ifndef SoF_CONSTANTS_H_
#define SoF_CONSTANTS_H_
#include "../common/types.h"
#include "../types.h"
namespace SoF {
namespace maps {
@@ -181,6 +181,7 @@ namespace SoF {
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;
}
+1 -1
View File
@@ -187,7 +187,7 @@
0x1ee9,
0x7f5d, OP_CastSpell
0x0659, OP_ManaChange
0x3bc7, OP_BuffFadeMsg
0x3bc7, OP_ColoredText
0x3209,
0x6a93, OP_MemorizeSpell
0x1237,
+82 -83
View File
@@ -1,100 +1,99 @@
//list of packets we need to encode on the way out:
E(OP_SendCharInfo)
E(OP_ZoneServerInfo)
E(OP_SendAATable)
E(OP_PlayerProfile)
E(OP_ZoneEntry)
E(OP_CharInventory)
E(OP_NewZone)
E(OP_SpawnDoor)
E(OP_GroundSpawn)
E(OP_SendZonepoints)
E(OP_NewSpawn)
E(OP_ZoneSpawns)
E(OP_ItemLinkResponse)
E(OP_ItemPacket)
E(OP_GuildMemberList)
E(OP_Illusion)
E(OP_ManaChange)
E(OP_ClientUpdate)
E(OP_LeadershipExpUpdate)
E(OP_ExpansionInfo)
E(OP_LogServer)
E(OP_Damage)
E(OP_Buff)
// out-going packets that require an ENCODE translation:
E(OP_Action)
E(OP_Consider)
E(OP_CancelTrade)
E(OP_ShopPlayerSell)
E(OP_DeleteItem)
E(OP_ItemVerifyReply)
E(OP_DeleteCharge)
E(OP_MoveItem)
E(OP_OpenNewTasksWindow)
E(OP_BazaarSearch)
E(OP_Trader)
E(OP_TraderBuy)
E(OP_LootItem)
E(OP_TributeItem)
E(OP_SomeItemPacketMaybe)
E(OP_ReadBook)
E(OP_Stun)
E(OP_ZonePlayerToBind)
E(OP_AdventureMerchantSell)
E(OP_RaidUpdate)
E(OP_RaidJoin)
E(OP_VetRewardsAvaliable)
E(OP_InspectRequest)
E(OP_Track)
E(OP_DeleteSpawn)
E(OP_AltCurrencySell)
E(OP_ApplyPoison)
E(OP_AugmentInfo)
E(OP_BazaarSearch)
E(OP_BecomeTrader)
E(OP_Buff)
E(OP_CancelTrade)
E(OP_CharInventory)
E(OP_ClientUpdate)
E(OP_Consider)
E(OP_Damage)
E(OP_DeleteCharge)
E(OP_DeleteItem)
E(OP_DeleteSpawn)
E(OP_DzCompass)
E(OP_DzExpeditionEndsWarning)
E(OP_DzExpeditionInfo)
E(OP_DzCompass)
E(OP_DzMemberList)
E(OP_DzExpeditionList)
E(OP_DzLeaderStatus)
E(OP_DzJoinExpeditionConfirm)
E(OP_BecomeTrader)
E(OP_PetBuffWindow)
E(OP_DzLeaderStatus)
E(OP_DzMemberList)
E(OP_ExpansionInfo)
E(OP_GroundSpawn)
E(OP_GuildMemberList)
E(OP_Illusion)
E(OP_InspectRequest)
E(OP_ItemLinkResponse)
E(OP_ItemPacket)
E(OP_ItemVerifyReply)
E(OP_LeadershipExpUpdate)
E(OP_LogServer)
E(OP_LootItem)
E(OP_ManaChange)
E(OP_MoveItem)
E(OP_NewSpawn)
E(OP_NewZone)
E(OP_OnLevelMessage)
E(OP_AltCurrencySell)
E(OP_OpenNewTasksWindow)
E(OP_PetBuffWindow)
E(OP_PlayerProfile)
E(OP_RaidJoin)
E(OP_RaidUpdate)
E(OP_ReadBook)
E(OP_SendAATable)
E(OP_SendCharInfo)
E(OP_SendZonepoints)
E(OP_ShopPlayerSell)
E(OP_SomeItemPacketMaybe)
E(OP_SpawnDoor)
E(OP_Stun)
E(OP_Track)
E(OP_Trader)
E(OP_TraderBuy)
E(OP_TributeItem)
E(OP_VetRewardsAvaliable)
E(OP_WearChange)
//list of packets we need to decode on the way in:
D(OP_SetServerFilter)
D(OP_CharacterCreate)
D(OP_ItemLinkClick)
D(OP_ConsiderCorpse)
D(OP_Consider)
D(OP_ClientUpdate)
D(OP_MoveItem)
D(OP_WhoAllRequest)
E(OP_ZoneEntry)
E(OP_ZonePlayerToBind)
E(OP_ZoneServerInfo)
E(OP_ZoneSpawns)
// incoming packets that require a DECODE translation:
D(OP_AdventureMerchantSell)
D(OP_AltCurrencySell)
D(OP_AltCurrencySellSelection)
D(OP_ApplyPoison)
D(OP_AugmentInfo)
D(OP_AugmentItem)
D(OP_Buff)
D(OP_ShopPlayerSell)
D(OP_Consume)
D(OP_CastSpell)
D(OP_Save)
D(OP_ItemVerifyRequest)
D(OP_CharacterCreate)
D(OP_ClientUpdate)
D(OP_Consider)
D(OP_ConsiderCorpse)
D(OP_Consume)
D(OP_DeleteItem)
D(OP_FaceChange)
D(OP_FindPersonRequest)
D(OP_GroupFollow)
D(OP_GroupFollow2)
D(OP_FindPersonRequest)
D(OP_TraderBuy)
D(OP_LootItem)
D(OP_TributeItem)
D(OP_ReadBook)
D(OP_AugmentInfo)
D(OP_FaceChange)
D(OP_AdventureMerchantSell)
D(OP_TradeSkillCombine)
D(OP_RaidInvite)
D(OP_InspectRequest)
D(OP_ItemLinkClick)
D(OP_ItemVerifyRequest)
D(OP_LootItem)
D(OP_MoveItem)
D(OP_RaidInvite)
D(OP_ReadBook)
D(OP_Save)
D(OP_SetServerFilter)
D(OP_ShopPlayerSell)
D(OP_TraderBuy)
D(OP_TradeSkillCombine)
D(OP_TributeItem)
D(OP_WearChange)
D(OP_ApplyPoison)
D(OP_DeleteItem)
D(OP_AugmentItem)
D(OP_AltCurrencySellSelection)
D(OP_AltCurrencySell)
D(OP_WhoAllRequest)
#undef E
#undef D
+94 -31
View File
@@ -497,7 +497,7 @@ struct CastSpell_Struct
uint32 spell_id;
uint32 inventoryslot; // slot for clicky item, 0xFFFF = normal cast
uint32 target_id;
uint8 cs_unknown[4];
uint8 cs_unknown[4];
};
/*
@@ -554,8 +554,8 @@ struct GMTrainee_Struct
{
/*000*/ uint32 npcid;
/*004*/ uint32 playerid;
/*008*/ uint32 skills[73];
/*300*/ uint8 unknown300[148];
/*008*/ uint32 skills[PACKET_SKILL_ARRAY_SIZE];
/*408*/ uint8 unknown408[40];
/*448*/
};
@@ -689,14 +689,62 @@ struct PotionBelt_Struct {
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
static const uint32 MAX_RAID_LEADERSHIP_AA_ARRAY = 16;
static const uint32 MAX_LEADERSHIP_AA_ARRAY = (MAX_GROUP_LEADERSHIP_AA_ARRAY+MAX_RAID_LEADERSHIP_AA_ARRAY);
struct LeadershipAA_Struct {
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
};
struct GroupLeadershipAA_Struct {
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
union {
struct {
uint32 groupAAMarkNPC;
uint32 groupAANPCHealth;
uint32 groupAADelegateMainAssist;
uint32 groupAADelegateMarkNPC;
uint32 groupAA4;
uint32 groupAA5;
uint32 groupAAInspectBuffs;
uint32 groupAA7;
uint32 groupAASpellAwareness;
uint32 groupAAOffenseEnhancement;
uint32 groupAAManaEnhancement;
uint32 groupAAHealthEnhancement;
uint32 groupAAHealthRegeneration;
uint32 groupAAFindPathToPC;
uint32 groupAAHealthOfTargetsTarget;
uint32 groupAA15;
};
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
};
};
struct RaidLeadershipAA_Struct {
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
union {
struct {
uint32 raidAAMarkNPC;
uint32 raidAANPCHealth;
uint32 raidAADelegateMainAssist;
uint32 raidAADelegateMarkNPC;
uint32 raidAA4;
uint32 raidAA5;
uint32 raidAA6;
uint32 raidAASpellAwareness;
uint32 raidAAOffenseEnhancement;
uint32 raidAAManaEnhancement;
uint32 raidAAHealthEnhancement;
uint32 raidAAHealthRegeneration;
uint32 raidAAFindPathToPC;
uint32 raidAAHealthOfTargetsTarget;
uint32 raidAA14;
uint32 raidAA15;
};
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
};
};
struct LeadershipAA_Struct {
union {
struct {
GroupLeadershipAA_Struct group;
RaidLeadershipAA_Struct raid;
};
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
};
};
/**
@@ -722,7 +770,7 @@ struct BindStruct {
static const uint32 MAX_PP_LANGUAGE = 25; //
static const uint32 MAX_PP_SPELLBOOK = 480; // Confirmed 60 pages on Live now
static const uint32 MAX_PP_MEMSPELL = 10; //was 9 now 10 on Live
static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
static const uint32 MAX_PP_AA_ARRAY = 300; //was 299
static const uint32 MAX_GROUP_MEMBERS = 6;
static const uint32 MAX_RECAST_TYPES = 20;
@@ -1445,11 +1493,11 @@ 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];
/*0016*/
};
@@ -1479,17 +1527,17 @@ struct ItemProperties_Struct {
};
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
{
/*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*/
};
@@ -2953,10 +3001,10 @@ struct TributeInfo_Struct {
};
struct TributeItem_Struct {
uint32 slot;
uint32 quantity;
uint32 tribute_master_id;
int32 tribute_points;
uint32 slot;
uint32 quantity;
uint32 tribute_master_id;
int32 tribute_points;
};
struct TributePoint_Struct {
@@ -2992,7 +3040,7 @@ struct Split_Struct
*/
struct NewCombine_Struct {
/*00*/ int16 container_slot;
/*02*/ char unknown02[2];
/*02*/ int16 guildtribute_slot;
/*04*/
};
@@ -3425,6 +3473,21 @@ struct RaidAddMember_Struct {
/*139*/ uint8 flags[5]; //no idea if these are needed...
};
struct RaidMOTD_Struct {
/*000*/ RaidGeneral_Struct general; // leader_name and action only used
/*140*/ char motd[0]; // max size 1024, but reply is variable
};
struct RaidLeadershipUpdate_Struct {
/*000*/ uint32 action;
/*004*/ char player_name[64];
/*068*/ uint32 Unknown068;
/*072*/ char leader_name[64];
/*136*/ GroupLeadershipAA_Struct group; //unneeded
/*200*/ RaidLeadershipAA_Struct raid;
/*264*/ char Unknown264[128];
};
struct RaidAdd_Struct {
/*000*/ uint32 action; //=0
/*004*/ char player_name[64]; //should both be the player's name
@@ -3556,7 +3619,7 @@ struct GMToggle_Struct {
uint32 toggle;
};
struct BuffFadeMsg_Struct {
struct ColoredText_Struct {
uint32 color;
char msg[1]; //was 1
/*0???*/ uint8 paddingXXX[3]; // always 0's
@@ -3726,7 +3789,7 @@ struct ItemSerializationHeader
uint32 slot;
uint32 price;
uint32 merchant_slot; //1 if not a merchant item
uint32 unknown020; //0
uint32 scaled_value; //0
uint32 instance_id; //unique instance id if not merchant item, else is merchant slot
uint32 unknown028; //0
uint32 last_cast_time; // Unix Time from PP of last cast for this recast type if recast delay > 0
@@ -3963,10 +4026,10 @@ struct ItemQuaternaryBodyStruct
struct AugmentInfo_Struct
{
/*000*/ uint32 itemid; // id of the solvent needed
/*004*/ uint8 window; // window to display the information in
/*005*/ uint8 unknown005[71]; // total packet length 76, all the rest were always 00
/*076*/
/*000*/ uint32 itemid; // id of the solvent needed
/*004*/ uint32 window; // window to display the information in
/*008*/ char augment_info[64]; // total packet length 76, all the rest were always 00
/*072*/ uint32 unknown072;
};
struct VeteranRewardItem
+1655 -1391
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#ifndef Titanium_CONSTANTS_H_
#define Titanium_CONSTANTS_H_
#include "../common/types.h"
#include "../types.h"
namespace Titanium {
namespace maps {
@@ -180,6 +180,7 @@ namespace Titanium {
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;
}
+58 -40
View File
@@ -1,53 +1,71 @@
//list of packets we need to encode on the way out:
E(OP_SendCharInfo)
E(OP_SendAATable)
E(OP_LeadershipExpUpdate)
E(OP_PlayerProfile)
E(OP_NewSpawn)
E(OP_ZoneSpawns)
E(OP_ZoneEntry)
E(OP_CharInventory)
E(OP_ItemLinkResponse)
E(OP_ItemPacket)
// out-going packets that require an ENCODE translation:
E(OP_Action)
E(OP_AdventureMerchantSell)
E(OP_ApplyPoison)
E(OP_BazaarSearch)
E(OP_GuildMemberList)
E(OP_ZoneServerReady)
E(OP_GuildMemberLevelUpdate)
E(OP_Trader)
E(OP_TraderBuy)
E(OP_ReadBook)
E(OP_Illusion)
E(OP_VetRewardsAvaliable)
E(OP_InspectRequest)
E(OP_InspectAnswer)
E(OP_Track)
E(OP_RespondAA)
E(OP_BecomeTrader)
E(OP_CharInventory)
E(OP_DeleteCharge)
E(OP_DeleteItem)
E(OP_DeleteSpawn)
E(OP_WearChange)
E(OP_DzCompass)
E(OP_DzExpeditionEndsWarning)
E(OP_DzExpeditionInfo)
E(OP_DzCompass)
E(OP_DzMemberList)
E(OP_DzExpeditionList)
E(OP_DzLeaderStatus)
E(OP_DzJoinExpeditionConfirm)
E(OP_Action)
E(OP_BecomeTrader)
E(OP_PetBuffWindow)
E(OP_OnLevelMessage)
E(OP_DzLeaderStatus)
E(OP_DzMemberList)
E(OP_GuildMemberLevelUpdate)
E(OP_GuildMemberList)
E(OP_Illusion)
E(OP_InspectAnswer)
E(OP_InspectRequest)
E(OP_ItemLinkResponse)
E(OP_ItemPacket)
E(OP_LeadershipExpUpdate)
E(OP_LFGuild)
//list of packets we need to decode on the way in:
D(OP_SetServerFilter)
E(OP_LootItem)
E(OP_MoveItem)
E(OP_OnLevelMessage)
E(OP_PetBuffWindow)
E(OP_PlayerProfile)
E(OP_NewSpawn)
E(OP_ReadBook)
E(OP_RespondAA)
E(OP_SendCharInfo)
E(OP_SendAATable)
E(OP_ShopPlayerSell)
E(OP_Track)
E(OP_Trader)
E(OP_TraderBuy)
E(OP_TributeItem)
E(OP_VetRewardsAvaliable)
E(OP_WearChange)
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_TraderBuy)
D(OP_WhoAllRequest)
D(OP_ReadBook)
D(OP_Consume)
D(OP_DeleteItem)
D(OP_FaceChange)
D(OP_InspectRequest)
D(OP_InspectAnswer)
D(OP_WearChange)
D(OP_InspectRequest)
D(OP_ItemLinkClick)
D(OP_LFGuild)
D(OP_LootItem)
D(OP_MoveItem)
D(OP_ReadBook)
D(OP_SetServerFilter)
D(OP_ShopPlayerSell)
D(OP_TraderBuy)
D(OP_TradeSkillCombine)
D(OP_TributeItem)
D(OP_WearChange)
D(OP_WhoAllRequest)
#undef E
#undef D
+93 -30
View File
@@ -419,7 +419,7 @@ struct CastSpell_Struct
uint32 spell_id;
uint32 inventoryslot; // slot for clicky item, 0xFFFF = normal cast
uint32 target_id;
uint8 cs_unknown[4];
uint8 cs_unknown[4];
};
/*
@@ -485,8 +485,8 @@ struct GMTrainee_Struct
{
/*000*/ uint32 npcid;
/*004*/ uint32 playerid;
/*008*/ uint32 skills[73];
/*300*/ uint8 unknown300[148];
/*008*/ uint32 skills[PACKET_SKILL_ARRAY_SIZE];
/*408*/ uint8 unknown408[40];
/*448*/
};
@@ -565,7 +565,7 @@ struct CharCreate_Struct
/*0064*/ uint32 face; // Could be unknown0076
/*0068*/ uint32 eyecolor1; //its possiable we could have these switched
/*0073*/ uint32 eyecolor2; //since setting one sets the other we really can't check
/*0076*/ uint32 unknown0076; // Could be face
/*0076*/ uint32 tutorial;
/*0080*/
};
@@ -619,14 +619,62 @@ struct PotionBelt_Struct {
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
static const uint32 MAX_RAID_LEADERSHIP_AA_ARRAY = 16;
static const uint32 MAX_LEADERSHIP_AA_ARRAY = (MAX_GROUP_LEADERSHIP_AA_ARRAY+MAX_RAID_LEADERSHIP_AA_ARRAY);
struct LeadershipAA_Struct {
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
};
struct GroupLeadershipAA_Struct {
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
union {
struct {
uint32 groupAAMarkNPC;
uint32 groupAANPCHealth;
uint32 groupAADelegateMainAssist;
uint32 groupAADelegateMarkNPC;
uint32 groupAA4;
uint32 groupAA5;
uint32 groupAAInspectBuffs;
uint32 groupAA7;
uint32 groupAASpellAwareness;
uint32 groupAAOffenseEnhancement;
uint32 groupAAManaEnhancement;
uint32 groupAAHealthEnhancement;
uint32 groupAAHealthRegeneration;
uint32 groupAAFindPathToPC;
uint32 groupAAHealthOfTargetsTarget;
uint32 groupAA15;
};
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
};
};
struct RaidLeadershipAA_Struct {
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
union {
struct {
uint32 raidAAMarkNPC;
uint32 raidAANPCHealth;
uint32 raidAADelegateMainAssist;
uint32 raidAADelegateMarkNPC;
uint32 raidAA4;
uint32 raidAA5;
uint32 raidAA6;
uint32 raidAASpellAwareness;
uint32 raidAAOffenseEnhancement;
uint32 raidAAManaEnhancement;
uint32 raidAAHealthEnhancement;
uint32 raidAAHealthRegeneration;
uint32 raidAAFindPathToPC;
uint32 raidAAHealthOfTargetsTarget;
uint32 raidAA14;
uint32 raidAA15;
};
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
};
};
struct LeadershipAA_Struct {
union {
struct {
GroupLeadershipAA_Struct group;
RaidLeadershipAA_Struct raid;
};
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
};
};
/**
@@ -652,7 +700,7 @@ struct BindStruct {
static const uint32 MAX_PP_LANGUAGE = 28;
static const uint32 MAX_PP_SPELLBOOK = 400;
static const uint32 MAX_PP_MEMSPELL = 9;
static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
static const uint32 MAX_PP_AA_ARRAY = 240;
static const uint32 MAX_GROUP_MEMBERS = 6;
static const uint32 MAX_RECAST_TYPES = 20;
@@ -1217,19 +1265,27 @@ 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;
/*0012*/
};
struct MoveItem_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*/
};
//
@@ -1431,12 +1487,6 @@ struct CombatAbility_Struct {
uint32 m_skill;
};
struct DeleteItem_Struct {
/*0000*/ uint32 from_slot;
/*0004*/ uint32 to_slot;
/*0008*/ uint32 number_in_stack;
};
//Instill Doubt
struct Instill_Doubt_Struct {
uint8 i_id;
@@ -1590,6 +1640,14 @@ struct Adventure_Purchase_Struct {
/*008*/ uint32 variable;
};
struct Adventure_Sell_Struct {
/*000*/ uint32 unknown000; //0x01
/*004*/ uint32 npcid;
/*008*/ uint32 slot;
/*012*/ uint32 charges;
/*016*/ uint32 sell_price;
};
struct AdventurePoints_Update_Struct {
/*000*/ uint32 ldon_available_points; // Total available points
/*004*/ uint8 unkown_apu004[20];
@@ -2583,10 +2641,10 @@ struct TributeInfo_Struct {
};
struct TributeItem_Struct {
uint32 slot;
uint32 quantity;
uint32 tribute_master_id;
int32 tribute_points;
uint32 slot;
uint32 quantity;
uint32 tribute_master_id;
int32 tribute_points;
};
struct TributePoint_Struct {
@@ -2622,7 +2680,7 @@ struct Split_Struct
*/
struct NewCombine_Struct {
/*00*/ int16 container_slot;
/*02*/ char unknown02[2];
/*02*/ int16 guildtribute_slot;
/*04*/
};
@@ -3046,7 +3104,7 @@ struct GroupInvite_Struct {
// uint8 unknown128[65];
};
struct BuffFadeMsg_Struct {
struct ColoredText_Struct {
uint32 color;
char msg[1];
};
@@ -3154,6 +3212,11 @@ struct AnnoyingZoneUnknown_Struct {
uint32 value; //always 4
};
struct ApplyPoison_Struct {
uint32 inventorySlot;
uint32 success;
};
struct GuildMemberUpdate_Struct {
/*000*/ uint32 guild_id; //not sure
/*004*/ char member_name[64];
+3681 -3499
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#ifndef Underfoot_CONSTANTS_H_
#define Underfoot_CONSTANTS_H_
#include "../common/types.h"
#include "../types.h"
namespace Underfoot {
namespace maps {
@@ -181,6 +181,7 @@ namespace Underfoot {
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 = false;
}
+109 -109
View File
@@ -1,128 +1,128 @@
//list of packets we need to encode on the way out:
E(OP_SendCharInfo)
E(OP_ZoneServerInfo)
E(OP_SendAATable)
E(OP_PlayerProfile)
E(OP_ZoneEntry)
E(OP_CharInventory)
E(OP_NewZone)
E(OP_SpawnDoor)
E(OP_GroundSpawn)
E(OP_SendZonepoints)
E(OP_NewSpawn)
E(OP_ZoneSpawns)
E(OP_ItemLinkResponse)
E(OP_ItemPacket)
E(OP_GuildMemberList)
E(OP_Illusion)
E(OP_ManaChange)
E(OP_ClientUpdate)
E(OP_LeadershipExpUpdate)
E(OP_ExpansionInfo)
E(OP_LogServer)
E(OP_Damage)
E(OP_Buff)
// out-going packets that require an ENCODE translation:
E(OP_Action)
E(OP_Consider)
E(OP_CancelTrade)
E(OP_ShopPlayerSell)
E(OP_DeleteItem)
E(OP_ItemVerifyReply)
E(OP_DeleteCharge)
E(OP_MoveItem)
E(OP_OpenNewTasksWindow)
E(OP_BazaarSearch)
E(OP_Trader)
E(OP_TraderBuy)
E(OP_LootItem)
E(OP_TributeItem)
E(OP_SomeItemPacketMaybe)
E(OP_ReadBook)
E(OP_Stun)
E(OP_ZonePlayerToBind)
E(OP_AdventureMerchantSell)
E(OP_RaidUpdate)
E(OP_RaidJoin)
E(OP_VetRewardsAvaliable)
E(OP_InspectRequest)
E(OP_GroupInvite)
E(OP_GroupFollow)
E(OP_GroupFollow2)
E(OP_GroupUpdate)
E(OP_GroupCancelInvite)
E(OP_WhoAllResponse)
E(OP_Track)
E(OP_ShopPlayerBuy)
E(OP_PetBuffWindow)
E(OP_OnLevelMessage)
E(OP_Barter)
E(OP_AltCurrency)
E(OP_AltCurrencySell)
E(OP_ApplyPoison)
E(OP_AugmentInfo)
E(OP_Barter)
E(OP_BazaarSearch)
E(OP_Buff)
E(OP_BuffCreate)
E(OP_CancelTrade)
E(OP_ChannelMessage)
E(OP_GuildsList)
E(OP_CharInventory)
E(OP_ClientUpdate)
E(OP_Consider)
E(OP_Damage)
E(OP_DeleteCharge)
E(OP_DeleteItem)
E(OP_DisciplineUpdate)
E(OP_DzCompass)
E(OP_DzExpeditionEndsWarning)
E(OP_DzExpeditionInfo)
E(OP_DzCompass)
E(OP_DzMemberList)
E(OP_DzExpeditionList)
E(OP_DzLeaderStatus)
E(OP_DzJoinExpeditionConfirm)
E(OP_TargetBuffs)
E(OP_BuffCreate)
E(OP_SpawnAppearance)
E(OP_RespondAA)
E(OP_DisciplineUpdate)
E(OP_AltCurrencySell)
E(OP_AltCurrency)
E(OP_WearChange)
E(OP_DzLeaderStatus)
E(OP_DzMemberList)
E(OP_ExpansionInfo)
E(OP_GroundSpawn)
E(OP_GroupCancelInvite)
E(OP_GroupFollow)
E(OP_GroupFollow2)
E(OP_GroupInvite)
E(OP_GroupUpdate)
E(OP_GuildMemberList)
E(OP_GuildsList)
E(OP_Illusion)
E(OP_InspectBuffs)
E(OP_InspectRequest)
E(OP_ItemLinkResponse)
E(OP_ItemPacket)
E(OP_ItemVerifyReply)
E(OP_LeadershipExpUpdate)
E(OP_LogServer)
E(OP_LootItem)
E(OP_ManaChange)
E(OP_MercenaryDataResponse)
E(OP_MercenaryDataUpdate)
//list of packets we need to decode on the way in:
D(OP_SetServerFilter)
D(OP_CharacterCreate)
D(OP_ItemLinkClick)
D(OP_ConsiderCorpse)
D(OP_Consider)
D(OP_ClientUpdate)
D(OP_MoveItem)
D(OP_WhoAllRequest)
E(OP_MoveItem)
E(OP_NewSpawn)
E(OP_NewZone)
E(OP_OnLevelMessage)
E(OP_OpenNewTasksWindow)
E(OP_PetBuffWindow)
E(OP_PlayerProfile)
E(OP_RaidJoin)
E(OP_RaidUpdate)
E(OP_ReadBook)
E(OP_RespondAA)
E(OP_SendAATable)
E(OP_SendCharInfo)
E(OP_SendZonepoints)
E(OP_ShopPlayerBuy)
E(OP_ShopPlayerSell)
E(OP_SomeItemPacketMaybe)
E(OP_SpawnAppearance)
E(OP_SpawnDoor)
E(OP_Stun)
E(OP_TargetBuffs)
E(OP_Track)
E(OP_Trader)
E(OP_TraderBuy)
E(OP_TributeItem)
E(OP_VetRewardsAvaliable)
E(OP_WearChange)
E(OP_WhoAllResponse)
E(OP_ZoneEntry)
E(OP_ZonePlayerToBind)
E(OP_ZoneServerInfo)
E(OP_ZoneSpawns)
// incoming packets that require a DECODE translation:
D(OP_AdventureMerchantSell)
D(OP_AltCurrencySell)
D(OP_AltCurrencySellSelection)
D(OP_ApplyPoison)
D(OP_AugmentInfo)
D(OP_AugmentItem)
D(OP_BazaarSearch)
D(OP_Buff)
D(OP_ShopPlayerSell)
D(OP_Consume)
D(OP_BuffRemoveRequest)
D(OP_CastSpell)
D(OP_Save)
D(OP_ItemVerifyRequest)
D(OP_GroupInvite)
D(OP_GroupInvite2)
D(OP_ChannelMessage)
D(OP_CharacterCreate)
D(OP_ClientUpdate)
D(OP_Consider)
D(OP_ConsiderCorpse)
D(OP_Consume)
D(OP_Damage)
D(OP_DeleteItem)
D(OP_EnvDamage)
D(OP_FaceChange)
D(OP_FindPersonRequest)
D(OP_GroupCancelInvite)
D(OP_GroupDisband)
D(OP_GroupFollow)
D(OP_GroupFollow2)
D(OP_GroupDisband)
D(OP_GroupCancelInvite)
D(OP_FindPersonRequest)
D(OP_TraderBuy)
D(OP_LootItem)
D(OP_TributeItem)
D(OP_ReadBook)
D(OP_AugmentInfo)
D(OP_FaceChange)
D(OP_AdventureMerchantSell)
D(OP_TradeSkillCombine)
D(OP_RaidInvite)
D(OP_GroupInvite)
D(OP_GroupInvite2)
D(OP_InspectRequest)
D(OP_WearChange)
D(OP_ShopPlayerBuy)
D(OP_BazaarSearch)
D(OP_ItemLinkClick)
D(OP_ItemVerifyRequest)
D(OP_LoadSpellSet)
D(OP_ApplyPoison)
D(OP_Damage)
D(OP_EnvDamage)
D(OP_ChannelMessage)
D(OP_DeleteItem)
D(OP_AugmentItem)
D(OP_LootItem)
D(OP_MoveItem)
D(OP_PetCommands)
D(OP_BuffRemoveRequest)
D(OP_AltCurrencySellSelection)
D(OP_AltCurrencySell)
D(OP_RaidInvite)
D(OP_ReadBook)
D(OP_Save)
D(OP_SetServerFilter)
D(OP_ShopPlayerBuy)
D(OP_ShopPlayerSell)
D(OP_TraderBuy)
D(OP_TradeSkillCombine)
D(OP_TributeItem)
D(OP_WearChange)
D(OP_WhoAllRequest)
#undef E
#undef D
+162 -52
View File
@@ -519,7 +519,11 @@ struct CastSpell_Struct
uint32 spell_id;
uint32 inventoryslot; // slot for clicky item, 0xFFFF = normal cast
uint32 target_id;
uint32 cs_unknown[5];
uint32 cs_unknown1;
uint32 cs_unknown2;
float y_pos;
float x_pos;
float z_pos;
};
/*
@@ -564,7 +568,7 @@ struct SpellBuffFade_Struct_Underfoot {
/*008*/ float unknown008;
/*012*/ uint32 spellid;
/*016*/ uint32 duration;
/*020*/ uint32 unknown016;
/*020*/ uint32 num_hits;
/*024*/ uint32 playerId; // Global player ID?
/*028*/ uint32 unknown020;
/*032*/ uint8 unknown0028[48];
@@ -589,6 +593,25 @@ struct SpellBuffFade_Struct {
/*036*/
};
#if 0
struct BuffIconEntry_Struct {
/*000*/ uint32 buff_slot;
/*004*/ uint32 spell_id;
/*008*/ uint32 tics_remaining;
/*012*/ uint32 num_hits;
// char name[0]; caster name is also here sometimes
// uint8 unknownend; 1 when single, 0 when all opposite of all_buffs?
};
struct BuffIcon_Struct {
/*000*/ uint32 entity_id;
/*004*/ uint32 unknown004;
/*008*/ uint8 all_buffs; // 1 when updating all buffs, 0 when doing one
/*009*/ uint16 count;
/*011*/ BuffIconEntry_Struct entires[0];
};
#endif
struct BuffRemoveRequest_Struct
{
/*00*/ uint32 SlotID;
@@ -600,8 +623,8 @@ struct GMTrainee_Struct
{
/*000*/ uint32 npcid;
/*004*/ uint32 playerid;
/*008*/ uint32 skills[73];
/*300*/ uint8 unknown300[148];
/*008*/ uint32 skills[PACKET_SKILL_ARRAY_SIZE];
/*408*/ uint8 unknown408[40];
/*448*/
};
@@ -735,14 +758,62 @@ struct PotionBelt_Struct {
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
static const uint32 MAX_RAID_LEADERSHIP_AA_ARRAY = 16;
static const uint32 MAX_LEADERSHIP_AA_ARRAY = (MAX_GROUP_LEADERSHIP_AA_ARRAY+MAX_RAID_LEADERSHIP_AA_ARRAY);
struct LeadershipAA_Struct {
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
};
struct GroupLeadershipAA_Struct {
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
union {
struct {
uint32 groupAAMarkNPC;
uint32 groupAANPCHealth;
uint32 groupAADelegateMainAssist;
uint32 groupAADelegateMarkNPC;
uint32 groupAA4;
uint32 groupAA5;
uint32 groupAAInspectBuffs;
uint32 groupAA7;
uint32 groupAASpellAwareness;
uint32 groupAAOffenseEnhancement;
uint32 groupAAManaEnhancement;
uint32 groupAAHealthEnhancement;
uint32 groupAAHealthRegeneration;
uint32 groupAAFindPathToPC;
uint32 groupAAHealthOfTargetsTarget;
uint32 groupAA15;
};
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
};
};
struct RaidLeadershipAA_Struct {
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
union {
struct {
uint32 raidAAMarkNPC;
uint32 raidAANPCHealth;
uint32 raidAADelegateMainAssist;
uint32 raidAADelegateMarkNPC;
uint32 raidAA4;
uint32 raidAA5;
uint32 raidAA6;
uint32 raidAASpellAwareness;
uint32 raidAAOffenseEnhancement;
uint32 raidAAManaEnhancement;
uint32 raidAAHealthEnhancement;
uint32 raidAAHealthRegeneration;
uint32 raidAAFindPathToPC;
uint32 raidAAHealthOfTargetsTarget;
uint32 raidAA14;
uint32 raidAA15;
};
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
};
};
struct LeadershipAA_Struct {
union {
struct {
GroupLeadershipAA_Struct group;
RaidLeadershipAA_Struct raid;
};
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
};
};
/**
@@ -766,9 +837,9 @@ struct BindStruct {
** OpCode: 0x006a
*/
static const uint32 MAX_PP_LANGUAGE = 25; //
static const uint32 MAX_PP_SPELLBOOK = 480; // Confirmed 60 pages on Underfoot now
static const uint32 MAX_PP_SPELLBOOK = 720; // Confirmed 60 pages on Underfoot now
static const uint32 MAX_PP_MEMSPELL = 10; //was 9 now 10 on Underfoot
static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
static const uint32 MAX_PP_AA_ARRAY = 300; //was 299
static const uint32 MAX_GROUP_MEMBERS = 6;
static const uint32 MAX_RECAST_TYPES = 20;
@@ -879,7 +950,6 @@ struct PlayerProfile_Struct
/*04216*/ uint8 face; // Player face - Actually uint32?
/*04217*/ uint8 unknown04217[147]; // was [175]
/*04364*/ uint32 spell_book[MAX_PP_SPELLBOOK]; // List of the Spells in spellbook 720 = 90 pages [2880] was [1920]
/*06284*/ uint8 unknown06284[960]; // Spacer for the end of the book for now (pages 60 to 90)
/*07244*/ uint32 mem_spells[MAX_PP_MEMSPELL]; // List of spells memorized
/*07284*/ uint8 unknown07284[28]; //#### uint8 unknown04396[32]; in Titanium ####[28]
/*07312*/ uint32 platinum; // Platinum Pieces on player
@@ -1506,11 +1576,11 @@ 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];
/*0016*/
};
@@ -1540,17 +1610,17 @@ struct ItemProperties_Struct {
};
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
{
/*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*/
};
@@ -2100,6 +2170,14 @@ struct GroupFollow_Struct { // Underfoot Follow Struct
/*0152*/
};
struct InspectBuffs_Struct {
/*000*/ uint32 spell_id[BUFF_COUNT];
/*100*/ uint32 filler100[5]; // BUFF_COUNT is really 30...
/*120*/ uint32 tics_remaining[BUFF_COUNT];
/*220*/ uint32 filler220[5]; // BUFF_COUNT is really 30...
};
struct LFG_Struct {
/*000*/ uint32 unknown000;
/*004*/ uint32 value; // 0x00 = off 0x01 = on
@@ -3130,10 +3208,10 @@ struct TributeInfo_Struct {
};
struct TributeItem_Struct {
uint32 slot;
uint32 quantity;
uint32 tribute_master_id;
int32 tribute_points;
uint32 slot;
uint32 quantity;
uint32 tribute_master_id;
int32 tribute_points;
};
struct TributePoint_Struct {
@@ -3169,7 +3247,7 @@ struct Split_Struct
*/
struct NewCombine_Struct {
/*00*/ int16 container_slot;
/*02*/ char unknown02[2];
/*02*/ int16 guildtribute_slot;
/*04*/
};
@@ -3605,6 +3683,21 @@ struct RaidAddMember_Struct {
/*139*/ uint8 flags[5]; //no idea if these are needed...
};
struct RaidMOTD_Struct {
/*000*/ RaidGeneral_Struct general; // leader_name and action only used
/*140*/ char motd[0]; // max size 1024, but reply is variable
};
struct RaidLeadershipUpdate_Struct {
/*000*/ uint32 action;
/*004*/ char player_name[64];
/*068*/ uint32 Unknown068;
/*072*/ char leader_name[64];
/*136*/ GroupLeadershipAA_Struct group; //unneeded
/*200*/ RaidLeadershipAA_Struct raid;
/*264*/ char Unknown264[128];
};
struct RaidAdd_Struct {
/*000*/ uint32 action; //=0
/*004*/ char player_name[64]; //should both be the player's name
@@ -3736,7 +3829,7 @@ struct GMToggle_Struct {
uint32 toggle;
};
struct BuffFadeMsg_Struct {
struct ColoredText_Struct {
uint32 color;
char msg[1]; //was 1
/*0???*/ uint8 paddingXXX[3]; // always 0's
@@ -3912,25 +4005,42 @@ struct ItemVerifyReply_Struct {
struct ItemSerializationHeader
{
/*000*/ uint32 stacksize;
/*004*/ uint32 unknown004;
/*008*/ uint32 slot;
/*012*/ uint32 price;
/*016*/ uint32 merchant_slot; //1 if not a merchant item
/*020*/ uint32 unknown020; //0
/*024*/ uint32 instance_id; //unique instance id if not merchant item, else is merchant slot
/*028*/ uint32 unknown028; //0
/*032*/ uint32 last_cast_time; // Unix Time from PP of last cast for this recast type if recast delay > 0
/*036*/ uint32 charges; //Total Charges an item has (-1 for unlimited)
/*040*/ uint32 inst_nodrop; // 1 if the item is no drop (attuned items)
/*044*/ uint32 unknown044; //0
/*048*/ uint32 unknown048; //0
/*052*/ uint32 unknown052; //0
/*056*/ uint32 unknown056; //0
/*060*/ uint8 unknown060; //0
/*061*/ uint8 unknown061; //0 - Add Evolving Item struct if this isn't set to 0?
/*062*/ uint8 unknown062; // New to Underfoot
/*063*/ uint8 ItemClass; //0, 1, or 2
/*000*/ uint32 stacksize;
/*004*/ uint32 unknown004;
/*008*/ uint32 slot;
/*012*/ uint32 price;
/*016*/ uint32 merchant_slot; //1 if not a merchant item
/*020*/ uint32 scaled_value; //0
/*024*/ uint32 instance_id; //unique instance id if not merchant item, else is merchant slot
/*028*/ uint32 unknown028; //0
/*032*/ uint32 last_cast_time; // Unix Time from PP of last cast for this recast type if recast delay > 0
/*036*/ uint32 charges; //Total Charges an item has (-1 for unlimited)
/*040*/ uint32 inst_nodrop; // 1 if the item is no drop (attuned items)
/*044*/ uint32 unknown044; //0
/*048*/ uint32 unknown048; //0
/*052*/ uint32 unknown052; //0
/*056*/ uint8 isEvolving; //0 // If 1 Add evolving item data in between Header and HeaderFinish
};
struct EvolvingItem {
uint8 unknown001;
uint8 unknown002;
uint8 unknown003;
uint8 unknown004;
int32 evoLevel;
double progress;
uint8 Activated;
int32 evomaxlevel;
uint8 unknown02[4];
};
struct ItemSerializationHeaderFinish
{
uint16 ornamentIcon;
/*060*/ uint8 unknown060; //0
/*061*/ uint8 unknown061; //0 -
/*062*/ uint8 isCopied; // New to Underfoot // Copied flag on item
/*063*/ uint8 ItemClass; //0, 1, or 2
};
struct ItemBodyStruct
@@ -4161,10 +4271,10 @@ struct ItemQuaternaryBodyStruct
struct AugmentInfo_Struct
{
/*000*/ uint32 itemid; // id of the solvent needed
/*004*/ uint8 window; // window to display the information in
/*005*/ uint8 unknown005[71]; // total packet length 76, all the rest were always 00
/*076*/
/*000*/ uint32 itemid; // id of the solvent needed
/*004*/ uint32 window; // window to display the information in
/*008*/ char augment_info[64]; // total packet length 76, all the rest were always 00
/*072*/ uint32 unknown072;
};
struct VeteranRewardItem
+84
View File
@@ -0,0 +1,84 @@
/* 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 __random_h__
#define __random_h__
#include <random>
#include <utility>
/* This uses mt19937 seeded with the std::random_device
* The idea is to have this be included as a member of another class
* so mocking out for testing is easier
* If you need to reseed random.Reseed()
* Eventually this should be derived from an abstract base class
*/
namespace EQEmu {
class Random {
public:
// AKA old MakeRandomInt
const int Int(int low, int high)
{
if (low > high)
std::swap(low, high);
return std::uniform_int_distribution<int>(low, high)(m_gen); // [low, high]
}
// AKA old MakeRandomFloat
const double Real(double low, double high)
{
if (low > high)
std::swap(low, high);
return std::uniform_real_distribution<double>(low, high)(m_gen); // [low, high)
}
// example Roll(50) would have a 50% success rate
// Roll(100) 100%, etc
// valid values 0-100 (well, higher works too but ...)
const bool Roll(const int required)
{
return Int(0, 99) < required;
}
// valid values 0.0 - 1.0
const bool Roll(const double required)
{
return Real(0.0, 1.0) <= required;
}
void Reseed()
{
// We could do the seed_seq thing here too if we need better seeding
// but that is mostly overkill for us, so just seed once
std::random_device rd;
m_gen.seed(rd());
}
Random()
{
Reseed();
}
private:
std::mt19937 m_gen;
};
}
#endif /* !__random_h__ */
+13 -4
View File
@@ -100,6 +100,7 @@ RULE_BOOL ( Character, KeepLevelOverMax, false) // Don't delevel a character tha
RULE_INT ( Character, FoodLossPerUpdate, 35) // How much food/water you lose per stamina update
RULE_INT ( Character, BaseInstrumentSoftCap, 36) // Softcap for instrument mods, 36 commonly referred to as "3.6" as well.
RULE_INT ( Character, BaseRunSpeedCap, 158) // Base Run Speed Cap, on live it's 158% which will give you a runspeed of 1.580 hard capped to 225.
RULE_INT ( Character, OrnamentationAugmentType, 20) //Ornamentation Augment Type
RULE_CATEGORY_END()
RULE_CATEGORY( Mercs )
@@ -123,7 +124,6 @@ RULE_INT ( Guild, PlayerCreationLimit, 1) // Only allow use of the UF+ window i
RULE_INT ( Guild, PlayerCreationRequiredStatus, 0) // Required admin status.
RULE_INT ( Guild, PlayerCreationRequiredLevel, 0) // Required Level of the player attempting to create the guild.
RULE_INT ( Guild, PlayerCreationRequiredTime, 0) // Required Time Entitled On Account (in Minutes) to create the guild.
RULE_CATEGORY_END()
RULE_CATEGORY( Skills )
@@ -201,6 +201,8 @@ RULE_INT ( Zone, EbonCrystalItemID, 40902)
RULE_INT ( Zone, RadiantCrystalItemID, 40903)
RULE_BOOL ( Zone, LevelBasedEXPMods, false) // Allows you to use the level_exp_mods table in consideration to your players EXP hits
RULE_INT ( Zone, WeatherTimer, 600) // Weather timer when no duration is available
RULE_BOOL ( Zone, EnableLoggedOffReplenishments, true)
RULE_INT ( Zone, MinOfflineTimeToReplenishments, 21600) // 21600 seconds is 6 Hours
RULE_CATEGORY_END()
RULE_CATEGORY( Map )
@@ -245,7 +247,6 @@ RULE_INT ( Pathing, CullNodesFromStart, 1) // Checks LOS from Start point to se
RULE_INT ( Pathing, CullNodesFromEnd, 1) // Checks LOS from End point to second to last node for this many nodes and removes last node if there is LOS
RULE_REAL ( Pathing, CandidateNodeRangeXY, 400) // When searching for path start/end nodes, only nodes within this range will be considered.
RULE_REAL ( Pathing, CandidateNodeRangeZ, 10) // When searching for path start/end nodes, only nodes within this range will be considered.
RULE_CATEGORY_END()
RULE_CATEGORY( Watermap )
@@ -322,7 +323,8 @@ RULE_INT ( Spells, AI_IdleNoSpellMinRecast, 500) // AI spell recast time(MS) che
RULE_INT ( Spells, AI_IdleNoSpellMaxRecast, 2000) // AI spell recast time(MS) check when no spell is cast while chasing target. (max time in random)
RULE_INT ( Spells, AI_IdleBeneficialChance, 100) // Chance while idle to do a beneficial spell on self or others.
RULE_BOOL ( Spells, SHDProcIDOffByOne, true) // pre June 2009 SHD spell procs were off by 1, they stopped doing this in June 2009 (so UF+ spell files need this false)
RULE_BOOL ( Spells, Jun182014HundredHandsRevamp, false) // this should be true for if you import a spell file newer than June 18, 2014
RULE_BOOL ( Spells, SwarmPetTargetLock, false) // Use old method of swarm pets target locking till target dies then despawning.
RULE_CATEGORY_END()
RULE_CATEGORY( Combat )
@@ -417,6 +419,7 @@ RULE_INT ( Combat, ArcheryBonusChance, 50)
RULE_INT ( Combat, BerserkerFrenzyStart, 35)
RULE_INT ( Combat, BerserkerFrenzyEnd, 45)
RULE_BOOL ( Combat, OneProcPerWeapon, true) //If enabled, One proc per weapon per round
RULE_BOOL ( Combat, ProjectileDmgOnImpact, true) //If enabled, projectiles (ie arrows) will hit on impact, instead of instantly.
RULE_CATEGORY_END()
RULE_CATEGORY( NPC )
@@ -435,6 +438,7 @@ RULE_BOOL ( NPC, SmartLastFightingDelayMoving, true)
RULE_BOOL ( NPC, ReturnNonQuestNoDropItems, false) // Returns NO DROP items on NPCs that don't have an EVENT_TRADE sub in their script
RULE_INT ( NPC, StartEnrageValue, 9) // % HP that an NPC will begin to enrage
RULE_BOOL ( NPC, LiveLikeEnrage, false) // If set to true then only player controlled pets will enrage
RULE_BOOL ( NPC, EnableMeritBasedFaction, false) // If set to true, faction will given in the same way as experience (solo/group/raid)
RULE_CATEGORY_END()
RULE_CATEGORY ( Aggro )
@@ -502,7 +506,6 @@ RULE_INT ( Merchant, PricePenaltyPct, 4) // Determines maximum price penalty fro
RULE_REAL( Merchant, ChaBonusMod, 3.45) // Determines CHA cap, from 104 CHA. 3.45 is 132 CHA at apprehensive. 0.34 is 400 CHA at apprehensive.
RULE_REAL ( Merchant, ChaPenaltyMod, 1.52) // Determines CHA bottom, up to 102 CHA. 1.52 is 37 CHA at apprehensive. 0.98 is 0 CHA at apprehensive.
RULE_BOOL ( Merchant, EnableAltCurrencySell, true) // Enables the ability to resell items to alternate currency merchants
RULE_CATEGORY_END()
RULE_CATEGORY ( Bazaar )
@@ -584,6 +587,12 @@ RULE_CATEGORY( Inventory )
RULE_BOOL ( Inventory, EnforceAugmentRestriction, true) // Forces augment slot restrictions
RULE_BOOL ( Inventory, EnforceAugmentUsability, true) // Forces augmented item usability
RULE_BOOL ( Inventory, EnforceAugmentWear, true) // Forces augment wear slot validation
RULE_BOOL ( Inventory, DeleteTransformationMold, true) //False if you want mold to last forever
RULE_BOOL ( Inventory, AllowAnyWeaponTransformation, false) //Weapons can use any weapon transformation
RULE_CATEGORY_END()
RULE_CATEGORY( Client )
RULE_BOOL( Client, UseLiveFactionMessage, false) // Allows players to see faction adjustments like Live
RULE_CATEGORY_END()
#undef RULE_CATEGORY
+25 -6
View File
@@ -104,6 +104,7 @@
#define ServerOP_GroupFollow 0x0110
#define ServerOP_GroupFollowAck 0x0111
#define ServerOP_GroupCancelInvite 0x0112
#define ServerOP_RaidMOTD 0x0113
#define ServerOP_InstanceUpdateTime 0x014F
#define ServerOP_AdventureRequest 0x0150
@@ -180,13 +181,15 @@
#define ServerOP_CZMessagePlayer 0x4008
#define ServerOP_ReloadWorld 0x4009
#define ServerOP_QSPlayerLogTrades 0x4010
#define ServerOP_QSPlayerLogHandins 0x4011
#define ServerOP_QSPlayerLogNPCKills 0x4012
#define ServerOP_QSPlayerLogDeletes 0x4013
#define ServerOP_QSPlayerLogMoves 0x4014
#define ServerOP_QSPlayerLogTrades 0x4010
#define ServerOP_QSPlayerLogHandins 0x4011
#define ServerOP_QSPlayerLogNPCKills 0x4012
#define ServerOP_QSPlayerLogDeletes 0x4013
#define ServerOP_QSPlayerLogMoves 0x4014
#define ServerOP_QSPlayerLogMerchantTransactions 0x4015
#define ServerOP_QSSendQuery 0x4016
#define ServerOP_QSSendQuery 0x4016
#define ServerOP_CZSignalNPC 0x4017
#define ServerOP_CZSetEntityVariableByNPCTypeID 0x4018
/* Query Serv Generic Packet Flag/Type Enumeration */
enum { QSG_LFGuild = 0 };
@@ -852,6 +855,11 @@ struct ServerRaidMessage_Struct {
char message[0];
};
struct ServerRaidMOTD_Struct {
uint32 rid;
char motd[0];
};
struct ServerLFGMatchesRequest_Struct {
uint32 FromID;
uint8 QuerierLevel;
@@ -1094,6 +1102,11 @@ struct CZClientSignal_Struct {
uint32 data;
};
struct CZNPCSignal_Struct {
uint32 npctype_id;
uint32 data;
};
struct CZClientSignalByName_Struct {
char Name[64];
uint32 data;
@@ -1235,6 +1248,12 @@ struct CZMessagePlayer_Struct {
char Message[512];
};
struct CZSetEntVarByNPCTypeID_Struct {
uint32 npctype_id;
char id[256];
char m_var[256];
};
struct ReloadWorld_Struct{
uint32 Option;
};
+1222 -1451
View File
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -40,13 +40,9 @@ public:
bool SetGMSpeed(uint32 account_id, uint8 gmspeed);
uint8 GetGMSpeed(uint32 account_id);
bool SetHideMe(uint32 account_id, uint8 hideme);
bool GetPlayerProfile(uint32 account_id, char* name, PlayerProfile_Struct* pp, Inventory* inv, ExtendedProfile_Struct *ext, char* current_zone = 0, uint32 *current_instance = 0);
bool SetPlayerProfile(uint32 account_id, uint32 charid, PlayerProfile_Struct* pp, Inventory* inv, ExtendedProfile_Struct *ext, uint32 current_zone, uint32 current_instance, uint8 MaxXTargets);
uint32 SetPlayerProfile_MQ(char** query, uint32 account_id, uint32 charid, PlayerProfile_Struct* pp, Inventory* inv, ExtendedProfile_Struct *ext, uint32 current_zone, uint32 current_instance, uint8 MaxXTargets);
int32 DeleteStalePlayerCorpses();
int32 DeleteStalePlayerBackups();
void GetPlayerInspectMessage(char* playername, InspectMessage_Struct* message);
void SetPlayerInspectMessage(char* playername, const InspectMessage_Struct* message);
void LoadCharacterInspectMessage(uint32 character_id, InspectMessage_Struct* message);
void SaveCharacterInspectMessage(uint32 character_id, const InspectMessage_Struct* message);
void GetBotInspectMessage(uint32 botid, InspectMessage_Struct* message);
void SetBotInspectMessage(uint32 botid, const InspectMessage_Struct* message);
bool GetCommandSettings(std::map<std::string,uint8> &commands);
@@ -57,6 +53,10 @@ public:
*/
bool SaveCursor(uint32 char_id, std::list<ItemInst*>::const_iterator &start, std::list<ItemInst*>::const_iterator &end);
bool SaveInventory(uint32 char_id, const ItemInst* inst, int16 slot_id);
bool DeleteSharedBankSlot(uint32 char_id, int16 slot_id);
bool DeleteInventorySlot(uint32 char_id, int16 slot_id);
bool UpdateInventorySlot(uint32 char_id, const ItemInst* inst, int16 slot_id);
bool UpdateSharedBankSlot(uint32 char_id, const ItemInst* inst, int16 slot_id);
bool VerifyInventory(uint32 account_id, int16 slot_id, const ItemInst* inst);
bool GetSharedBank(uint32 id, Inventory* inv, bool is_charid);
int32 GetSharedPlatinum(uint32 account_id);
+56
View File
@@ -0,0 +1,56 @@
/* 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
*/
#include "types.h"
#include "skills.h"
bool EQEmu::IsTradeskill(SkillUseTypes skill)
{
switch (skill) {
case SkillFishing:
case SkillMakePoison:
case SkillTinkering:
case SkillResearch:
case SkillAlchemy:
case SkillBaking:
case SkillTailoring:
case SkillBlacksmithing:
case SkillFletching:
case SkillBrewing:
case SkillPottery:
case SkillJewelryMaking:
return true;
default:
return false;
}
}
bool EQEmu::IsSpecializedSkill(SkillUseTypes skill)
{
// this could be a simple if, but if this is more portable if any IDs change (probably won't)
// or any other specialized are added (also unlikely)
switch (skill) {
case SkillSpecializeAbjure:
case SkillSpecializeAlteration:
case SkillSpecializeConjuration:
case SkillSpecializeDivination:
case SkillSpecializeEvocation:
return true;
default:
return false;
}
}
+13 -3
View File
@@ -30,7 +30,7 @@
**
** (ref: eqstr_us.txt [05-10-2013])
*/
enum SkillUseTypes : uint32
enum SkillUseTypes
{
/*13855*/ Skill1HBlunt = 0,
/*13856*/ Skill1HSlashing,
@@ -108,6 +108,7 @@ enum SkillUseTypes : uint32
/*13869*/ SkillBerserking,
/*13902*/ SkillTaunt,
/*05837*/ SkillFrenzy, // This appears to be the only listed one not grouped with the others
/*00000*/ _EmuSkillCount // move to last position of active enumeration labels
// SoF+ specific skills
// /*03670*/ SkillRemoveTraps,
@@ -124,7 +125,6 @@ enum SkillUseTypes : uint32
// Support values
// /*-----*/ _SkillServerArraySize = _SkillCount_RoF2, // Should reflect last client '_SkillCount'
/*-----*/ _SkillPacketArraySize = 100, // Currently supported clients appear to iterate full 100 dword buffer range
// Superfluous additions to SkillUseTypes..server-use only
// /*-----*/ ExtSkillGenericTradeskill = 100
@@ -152,7 +152,7 @@ enum SkillUseTypes : uint32
NOTE: Disregard this until it is sorted out
I changed (tradeskill==75) to ExtSkillGenericTradeskill in tradeskills.cpp for both instances. If it's a pseudo-enumeration of
an AA ability, then use the 'ExtSkill' ('ExtentedSkill') prefix with a value >= 100. (current implementation)
an AA ability, then use the 'ExtSkill' ('ExtendedSkill') prefix with a value >= 100. (current implementation)
We probably need to recode ALL of the skill checks to use the new Skill2HPiercing and ensure that the animation value is
properly changed in the patch files. As far as earlier clients using this new skill, it can be done, but we just need to ensure
@@ -163,6 +163,7 @@ enum SkillUseTypes : uint32
In addition to the above re-coding, we're probably going to need to rework the database pp blob to reserve space for the current
100-dword buffer allocation. This way, we can just add new ones without having to rework it each time.
(Wasn't done for this in particular..but, thanks Akkadius!)
-U
*/
@@ -171,6 +172,9 @@ enum SkillUseTypes : uint32
// temporary until it can be sorted out...
#define HIGHEST_SKILL SkillFrenzy
// server profile does not reflect this yet..so, prefixed with 'PACKET_'
#define PACKET_SKILL_ARRAY_SIZE 100
// TODO: add string return for skill names
/*
@@ -260,4 +264,10 @@ typedef enum {
#define HIGHEST_SKILL FRENZY
*/
// for skill related helper functions
namespace EQEmu {
bool IsTradeskill(SkillUseTypes skill);
bool IsSpecializedSkill(SkillUseTypes skill);
}
#endif
+18 -7
View File
@@ -119,7 +119,7 @@ typedef enum {
/* 29 */ // NOT USED
/* 30 */ // NOT USED
/* 31 */ // NOT USED
/* 32 */ ST_AECaster2 = 0x20, //ae caster hatelist maybe?
/* 32 */ ST_AETargetHateList = 0x20,
/* 33 */ ST_HateList = 0x21,
/* 34 */ ST_LDoNChest_Cursed = 0x22,
/* 35 */ ST_Muramite = 0x23, //only works on special muramites
@@ -131,10 +131,13 @@ typedef enum {
/* 41 */ ST_Group = 0x29,
/* 42 */ ST_Directional = 0x2a, //ae around this target between two angles
/* 43 */ ST_GroupClientAndPet = 0x2b,
/* 44 */ //ST_Beam = 0x2c, //like directional but facing in front of you always
/* 45 */ //ST_Ring = 0x2d, // Like a mix of PB ae + rain spell(has ae duration)
/* 44 */ ST_Beam = 0x2c,
/* 45 */ ST_Ring = 0x2d,
/* 46 */ ST_TargetsTarget = 0x2e, // uses the target of your target
/* 47 */ ST_PetMaster = 0x2f, // uses the master as target
/* 48 */ // UNKNOWN
/* 49 */ // NOT USED
/* 50 */ ST_TargetAENoPlayersPets = 0x32,
} SpellTargetType;
typedef enum {
@@ -673,7 +676,7 @@ struct SPDat_Spell_Struct
/* 122 */ //uint32 TravelType;
/* 123 */ uint16 SpellAffectIndex;
/* 124 */ int8 disallow_sit; // 124: high-end Yaulp spells (V, VI, VII, VIII [Rk 1, 2, & 3], & Gallenite's Bark of Fury
/* 125 */ // 125: Words of the Skeptic
/* 125 */ int8 diety_agnostic;// 125: Words of the Skeptic
/* 126 */ int8 deities[16]; // Deity check. 201 - 216 per http://www.eqemulator.net/wiki/wikka.php?wakka=DeityList
// -1: Restrict to Deity; 1: Restrict to Deity, but only used on non-Live (Test Server "Blessing of ...") spells; 0: Don't restrict
/* 142 */ // 142: between 0 & 100
@@ -697,6 +700,7 @@ struct SPDat_Spell_Struct
/* 162 */ int bonushate;
/* 163 */
/* 164 */ // for most spells this appears to mimic ResistDiff
/* 165 */ bool ldon_trap; //Flag found on all LDON trap / chest related spells.
/* 166 */ int EndurCost;
/* 167 */ int8 EndurTimerIndex;
/* 168 */ bool IsDisciplineBuff; //Will goto the combat window when cast
@@ -709,9 +713,14 @@ struct SPDat_Spell_Struct
/* 178 */ int pvpresistcalc;
/* 179 */ int pvpresistcap;
/* 180 */ int spell_category;
/* 181 */
/* 181 */ //unknown - likely buff duration related
/* 182 */ //unknown - likely buff duration related
/* 183 */
/* 184 */
/* 185 */ int8 can_mgb; // 0=no, -1 or 1 = yes
/* 186 */ int dispel_flag;
/* 187 */ //int npc_category;
/* 188 */ //int npc_usefulness;
/* 189 */ int MinResist;
/* 190 */ int MaxResist;
/* 191 */ uint8 viral_targets;
@@ -719,14 +728,16 @@ struct SPDat_Spell_Struct
/* 193 */ int NimbusEffect;
/* 194 */ float directional_start; //Cone Start Angle:
/* 195 */ float directional_end; // Cone End Angle:
/* 196 */
/* 196 */ bool sneak; // effect can only be used if sneaking (rogue 'Daggerfall' ect)
/* 197 */ bool not_extendable;
/* 198- 199 */
/* 200 */ bool suspendable; // buff is suspended in suspended buff zones
/* 201 */ int viral_range;
/* 202 */
/* 203 */ //int songcap; // individual song cap (how live currently does it, not implemented)
/* 204 - 206 */
/* 204 */
/* 205 */ bool no_block;
/* 206 */
/* 207 */ int spellgroup;
/* 208 */ int rank; //increments AA effects with same name
/* 209 */ int powerful_flag; // Need more investigation to figure out what to call this, for now we know -1 makes charm spells not break before their duration is complete, it does alot more though
+5
View File
@@ -17,6 +17,11 @@ StructStrategy::StructStrategy() {
}
void StructStrategy::Encode(EQApplicationPacket **p, EQStream *dest, bool ack_req) const {
if((*p)->GetOpcodeBypass() != 0) {
PassEncoder(p, dest, ack_req);
return;
}
EmuOpcode op = (*p)->GetOpcode();
Encoder proc = encoders[op];
proc(p, dest, ack_req);
-3
View File
@@ -18,9 +18,6 @@
#ifndef _WINDOWS
#ifndef __UNIX_H__
#define __UNIX_H__
#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP {0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, __LOCK_INITIALIZER}
#endif
#include <unistd.h>
typedef int SOCKET;
+8
View File
@@ -23,6 +23,14 @@
#define EQEMU_PROTOCOL_VERSION "0.3.10"
#define CURRENT_VERSION "1.0.0"
/*
Everytime a Database SQL is added to Github,
increment CURRENT_BINARY_DATABASE_VERSION number and make sure you update the manifest
Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
*/
#define CURRENT_BINARY_DATABASE_VERSION 9059
#define COMPILE_DATE __DATE__
#define COMPILE_TIME __TIME__
#ifndef WIN32
+1 -1
View File
@@ -389,7 +389,7 @@ void Client::GenerateKey()
'6', '7', '8', '9'
};
key.append((const char*)&key_selection[MakeRandomInt(0, 35)], 1);
key.append((const char*)&key_selection[random.Int(0, 35)], 1);
count++;
}
}
+3
View File
@@ -22,6 +22,7 @@
#include "../common/opcodemgr.h"
#include "../common/eq_stream_type.h"
#include "../common/eq_stream_factory.h"
#include "../common/random.h"
#ifndef WIN32
#include "eq_crypto_api.h"
#endif
@@ -129,6 +130,8 @@ public:
* Gets the connection for this client.
*/
EQStream *GetConnection() { return connection; }
EQEmu::Random random;
private:
EQStream *connection;
ClientVersion version;
+6 -1
View File
@@ -21,7 +21,7 @@ SET(lb_sources
)
SET(lb_headers
)
ADD_LIBRARY(luabind ${lb_sources} ${lb_headers})
@@ -29,6 +29,11 @@ ADD_LIBRARY(luabind ${lb_sources} ${lb_headers})
IF(UNIX)
ADD_DEFINITIONS(-fPIC)
set_source_files_properties(${lb_sources} PROPERTY COMPILE_FLAGS -Wno-deprecated-declarations)
ENDIF(UNIX)
IF(MSVC)
set_source_files_properties(${lb_sources} PROPERTY COMPILE_FLAGS " /W0 " )
ENDIF(MSVC)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
+1
View File
@@ -28,6 +28,7 @@
#include <luabind/config.hpp>
#include <luabind/detail/instance_holder.hpp>
#include <luabind/detail/ref.hpp>
#include <cstdlib>
namespace luabind { namespace detail
{
+10 -11
View File
@@ -349,17 +349,16 @@ void Database::GeneralQueryReceive(ServerPacket *pack) {
/*
These are general queries passed from anywhere in zone instead of packing structures and breaking them down again and again
*/
char *Query = nullptr;
Query = new char[pack->ReadUInt32() + 1];
pack->ReadString(Query);
char errbuf[MYSQL_ERRMSG_SIZE];
char* query = 0;
uint32 lastid = 0;
if (!RunQuery(query, MakeAnyLenString(&query, Query), errbuf, 0, 0, &lastid)) {
_log(QUERYSERV__ERROR, "Failed Delete Log Record Insert: %s", errbuf);
_log(QUERYSERV__ERROR, "%s", query);
char *queryBuffer = new char[pack->ReadUInt32() + 1];
pack->ReadString(queryBuffer);
std::string query(queryBuffer);
auto results = QueryDatabase(query);
if (!results.Success()) {
_log(QUERYSERV__ERROR, "Failed Delete Log Record Insert: %s", results.ErrorMessage().c_str());
_log(QUERYSERV__ERROR, "%s", query.c_str());
}
safe_delete_array(query);
safe_delete(pack);
safe_delete(Query);
safe_delete(queryBuffer);
}
+4
View File
@@ -8,18 +8,22 @@ SET(tests_sources
SET(tests_headers
atobool_test.h
data_verification_test.h
fixed_memory_test.h
fixed_memory_variable_test.h
hextoi_32_64_test.h
ipc_mutex_test.h
memory_mapped_file_test.h
string_util_test.h
skills_util_test.h
)
ADD_EXECUTABLE(tests ${tests_sources} ${tests_headers})
TARGET_LINK_LIBRARIES(tests common cppunit)
INSTALL(TARGETS tests RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
IF(MSVC)
SET_TARGET_PROPERTIES(tests PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF")
TARGET_LINK_LIBRARIES(tests "Ws2_32.lib")
+108
View File
@@ -0,0 +1,108 @@
/* 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 __EQEMU_TESTS_DATA_VERIFICATION_H
#define __EQEMU_TESTS_DATA_VERIFICATION_H
#include "cppunit/cpptest.h"
#include "../common/data_verification.h"
class DataVerificationTest : public Test::Suite {
typedef void(DataVerificationTest::*TestFunction)(void);
public:
DataVerificationTest() {
TEST_ADD(DataVerificationTest::Clamp);
TEST_ADD(DataVerificationTest::ClampUpper);
TEST_ADD(DataVerificationTest::ClampLower);
TEST_ADD(DataVerificationTest::ValueWithin);
}
~DataVerificationTest() {
}
private:
void Clamp() {
float value_f = 500.0f;
int value_i = 500;
float vf1 = EQEmu::Clamp(value_f, 0.0f, 1000.0f);
float vf2 = EQEmu::Clamp(value_f, 0.0f, 250.0f);
float vf3 = EQEmu::Clamp(value_f, 750.0f, 1000.0f);
int vi1 = EQEmu::Clamp(value_i, 0, 1000);
int vi2 = EQEmu::Clamp(value_i, 0, 250);
int vi3 = EQEmu::Clamp(value_i, 750, 1000);
TEST_ASSERT_EQUALS(vf1, 500.0f);
TEST_ASSERT_EQUALS(vf2, 250.0f);
TEST_ASSERT_EQUALS(vf3, 750.0f);
TEST_ASSERT_EQUALS(vi1, 500);
TEST_ASSERT_EQUALS(vi2, 250);
TEST_ASSERT_EQUALS(vi3, 750);
}
void ClampUpper() {
float value_f = 500.0f;
int value_i = 500;
float vf1 = EQEmu::ClampUpper(value_f, 1000.0f);
float vf2 = EQEmu::ClampUpper(value_f, 250.0f);
int vi1 = EQEmu::ClampUpper(value_i, 1000);
int vi2 = EQEmu::ClampUpper(value_i, 250);
TEST_ASSERT_EQUALS(vf1, 500.0f);
TEST_ASSERT_EQUALS(vf2, 250.0f);
TEST_ASSERT_EQUALS(vi1, 500);
TEST_ASSERT_EQUALS(vi2, 250);
}
void ClampLower() {
float value_f = 500.0f;
int value_i = 500;
float vf1 = EQEmu::ClampLower(value_f, 0.0f);
float vf2 = EQEmu::ClampLower(value_f, 750.0f);
int vi1 = EQEmu::ClampLower(value_i, 0);
int vi2 = EQEmu::ClampLower(value_i, 750);
TEST_ASSERT_EQUALS(vf1, 500.0f);
TEST_ASSERT_EQUALS(vf2, 750.0f);
TEST_ASSERT_EQUALS(vi1, 500);
TEST_ASSERT_EQUALS(vi2, 750);
}
void ValueWithin() {
float value_f = 500.0f;
int value_i = 500;
TEST_ASSERT(EQEmu::ValueWithin(value_f, 0.0f, 1000.0f));
TEST_ASSERT(!EQEmu::ValueWithin(value_f, 0.0f, 400.0f));
TEST_ASSERT(!EQEmu::ValueWithin(value_f, 600.0f, 900.0f));
TEST_ASSERT(EQEmu::ValueWithin(value_i, 0, 1000));
TEST_ASSERT(!EQEmu::ValueWithin(value_i, 0, 400));
TEST_ASSERT(!EQEmu::ValueWithin(value_i, 600, 900));
}
};
#endif
+4
View File
@@ -27,6 +27,8 @@
#include "atobool_test.h"
#include "hextoi_32_64_test.h"
#include "string_util_test.h"
#include "data_verification_test.h"
#include "skills_util_test.h"
int main() {
try {
@@ -40,6 +42,8 @@ int main() {
tests.add(new atoboolTest());
tests.add(new hextoi_32_64_Test());
tests.add(new StringUtilTest());
tests.add(new DataVerificationTest());
tests.add(new SkillsUtilsTest());
tests.run(*output, true);
} catch(...) {
return -1;
+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 __EQEMU_TESTS_SKILLS_UTILS_H
#define __EQEMU_TESTS_SKILLS_UTILS_H
#include "cppunit/cpptest.h"
#include "../common/skills.h"
class SkillsUtilsTest: public Test::Suite {
typedef void(SkillsUtilsTest::*TestFunction)(void);
public:
SkillsUtilsTest() {
TEST_ADD(SkillsUtilsTest::IsTradeskill);
TEST_ADD(SkillsUtilsTest::IsSpecializedSkill);
}
~SkillsUtilsTest() {
}
private:
void IsTradeskill() {
TEST_ASSERT(EQEmu::IsTradeskill(SkillPottery));
TEST_ASSERT(!EQEmu::IsTradeskill(SkillParry));
}
void IsSpecializedSkill() {
TEST_ASSERT(EQEmu::IsSpecializedSkill(SkillSpecializeConjuration));
TEST_ASSERT(!EQEmu::IsSpecializedSkill(SkillConjuration))
}
};
#endif
+2 -2
View File
@@ -23,7 +23,7 @@
#include "../common/string_util.h"
class StringUtilTest : public Test::Suite {
typedef void(IPCMutexTest::*TestFunction)(void);
typedef void(StringUtilTest::*TestFunction)(void);
public:
StringUtilTest() {
TEST_ADD(StringUtilTest::StringFormatTest);
@@ -35,7 +35,7 @@ public:
}
private:
void StringFormatTest() {
void StringFormatTest() {
const char* fmt = "Test: %c %d %4.2f";
char c = 'a';
int i = 2014;
+6 -6
View File
@@ -139,7 +139,7 @@ int Database::FindAccount(const char *characterName, Client *client) {
client->ClearCharacters();
std::string query = StringFormat("SELECT `id`, `account_id`, `level` "
"FROM `character_` WHERE `name` = '%s' LIMIT 1",
"FROM `character_data` WHERE `name` = '%s' LIMIT 1",
characterName);
auto results = QueryDatabase(query);
if (!results.Success()) {
@@ -159,7 +159,7 @@ int Database::FindAccount(const char *characterName, Client *client) {
_log(UCS__TRACE, "Account ID for %s is %i", characterName, accountID);
query = StringFormat("SELECT `id`, `name`, `level` FROM `character_` "
query = StringFormat("SELECT `id`, `name`, `level` FROM `character_data` "
"WHERE `account_id` = %i AND `name` != '%s'",
accountID, characterName);
results = QueryDatabase(query);
@@ -174,7 +174,7 @@ int Database::FindAccount(const char *characterName, Client *client) {
bool Database::VerifyMailKey(std::string characterName, int IPAddress, std::string MailKey) {
std::string query = StringFormat("SELECT `mailkey` FROM `character_` WHERE `name`='%s' LIMIT 1",
std::string query = StringFormat("SELECT `mailkey` FROM `character_data` WHERE `name`='%s' LIMIT 1",
characterName.c_str());
auto results = QueryDatabase(query);
if (!results.Success()) {
@@ -202,7 +202,7 @@ bool Database::VerifyMailKey(std::string characterName, int IPAddress, std::stri
int Database::FindCharacter(const char *characterName) {
char *safeCharName = RemoveApostrophes(characterName);
std::string query = StringFormat("SELECT `id` FROM `character_` WHERE `name`='%s' LIMIT 1", safeCharName);
std::string query = StringFormat("SELECT `id` FROM `character_data` WHERE `name`='%s' LIMIT 1", safeCharName);
auto results = QueryDatabase(query);
if (!results.Success()) {
_log(UCS__ERROR, "FindCharacter failed. %s %s", query.c_str(), results.ErrorMessage().c_str());
@@ -523,9 +523,9 @@ void Database::ExpireMail() {
time(nullptr) - RuleI(Mail, ExpireTrash));
results = QueryDatabase(query);
if(results.Success())
_log(UCS__ERROR, "Error expiring trash messages, %s %s", query.c_str(), results.ErrorMessage().c_str());
else
_log(UCS__INIT, "Expired %i trash messages.", results.RowsAffected());
else
_log(UCS__ERROR, "Error expiring trash messages, %s %s", query.c_str(), results.ErrorMessage().c_str());
}
+1 -1
View File
@@ -147,7 +147,7 @@ OP_Begging=0x13e7 # ShowEQ 10/27/05
OP_InspectRequest=0x775d # ShowEQ 10/27/05
OP_Action2=0x0000
OP_BeginCast=0x3990 # ShowEQ 10/27/05
OP_BuffFadeMsg=0x0b2d # ShowEQ 10/27/05
OP_ColoredText=0x0b2d # ShowEQ 10/27/05
OP_Consent=0x1081 # ShowEQ 10/27/05
OP_LFGCommand=0x68ac # ShowEQ 10/27/05
OP_LFGGetMatchesRequest=0x022f # ShowEQ 10/27/05
+1 -1
View File
@@ -150,7 +150,7 @@ OP_InspectRequest=0x2403
OP_Action2=0x0000 # ShowEQ 06/29/05
OP_BeginCast=0x3990 # ShowEQ 06/29/05
OP_WhoAllRequest=0x5cdd # ShowEQ 06/29/05
OP_BuffFadeMsg=0x4bc6 # ShowEQ 06/29/05
OP_ColoredText=0x4bc6 # ShowEQ 06/29/05
OP_Consent=0x1081 # ShowEQ 06/29/05
OP_LFGCommand=0x022f # ShowEQ 06/29/05
OP_LFGGetMatchesRequest=0x6f82 # ShowEQ 06/29/05
+12 -5
View File
@@ -94,6 +94,7 @@ OP_ClearBlockedBuffs=0x5d3c
OP_WorldObjectsSent=0x7fa8
OP_SendExpZonein=0x25ab
OP_SendAATable=0x7791
OP_ShroudClearAA=0x422e
OP_RespondAA=0x379d
OP_UpdateAA=0x504f
OP_SendAAStats=0x3d1c
@@ -166,7 +167,7 @@ OP_InspectRequest=0x23f1
OP_InspectAnswer=0x5794
OP_InspectMessageUpdate=0x3064
OP_BeginCast=0x17ff
OP_BuffFadeMsg=0x41cb
OP_ColoredText=0x41cb
OP_ConsentResponse=0x183d
OP_MemorizeSpell=0x2fac
OP_SwapSpell=0x4736
@@ -289,8 +290,10 @@ OP_LeadershipExpToggle=0x3ea6
OP_LeadershipExpUpdate=0x6922
OP_PurchaseLeadershipAA=0x1962
OP_UpdateLeadershipAA=0x56aa
OP_MarkNPC=0x2d9f
OP_MarkNPC=0x1a6c
OP_MarkRaidNPC=0x2d9f #unimplemented
OP_ClearNPCMarks=0x0d2d
OP_ClearRaidNPCMarks=0x433a #unimplemented
OP_DelegateAbility=0x7820
OP_SetGroupTarget=0x118a
OP_Charm=0x7118
@@ -365,7 +368,7 @@ OP_DzLeaderStatus=0x4021
OP_DzExpeditionEndsWarning=0x32eb
OP_DzMemberList=0x348f
OP_DzCompass=0x0e01 # Was 0x4f09
OP_DzChooseZone=0x0000 # Maybe 0x29d6
OP_DzChooseZone=0x6e5e # Maybe 0x29d6
# New Opcodes
OP_SpawnPositionUpdate=0x0000 # Actually OP_MobUpdate ?
@@ -498,6 +501,8 @@ OP_GroupRoles=0x047c
OP_GroupMakeLeader=0x4129
OP_DoGroupLeadershipAbility=0x17d7
OP_GroupLeadershipAAUpdate=0x6567
OP_GroupMentor=0x56DB
OP_InspectBuffs=0x01f3
# LFG/LFP Opcodes
OP_LFGCommand=0x4463
@@ -510,8 +515,8 @@ OP_LFGAppearance=0x0000
OP_LFGResponse=0x0000
# Raid Opcodes
OP_RaidInvite=0x1bd1
OP_RaidUpdate=0x548e
OP_RaidInvite=0x5fb2
OP_RaidUpdate=0x1bd1
OP_RaidJoin=0x0000
# Button-push commands
@@ -653,3 +658,5 @@ OP_RAWOutOfSession=0x0000
# we need to document the differences between these packets to make identifying them easier
OP_Some3ByteHPUpdate=0x0000 # initial HP update for mobs
OP_InitialHPUpdate=0x0000
OP_ItemRecastDelay=0x57ed
+660
View File
@@ -0,0 +1,660 @@
# ShowEQ Import Notes:
# ZERO THE FILE first
# perl -pi -e 's/0x[0-9a-fA-F]{4}/0x0000/g' opcodes.conf
# Unknown Mapping:
# OP_Action2 -> OP_Damage
# OP_EnvDamage -> OP_Damage ---> might have been a one time mistake
# Name Differences:
# OP_CancelInvite -> OP_GroupCancelInvite
# OP_GMFind -> OP_FindPersonRequest
# OP_CommonMessage -> OP_ChannelMessage
OP_Unknown=0x0000
OP_ExploreUnknown=0x0000 # used for unknown explorer
# world packets
# Required to reach Char Select:
OP_SendLoginInfo=0x7a09
OP_ApproveWorld=0x7499
OP_LogServer=0x7ceb
OP_SendCharInfo=0x00d2
OP_ExpansionInfo=0x590d
OP_GuildsList=0x0000
OP_EnterWorld=0x578f
OP_PostEnterWorld=0x6259
OP_World_Client_CRC1=0x12cc
OP_World_Client_CRC2=0x0f13
OP_SendSpellChecksum=0x0000
OP_SendSkillCapsChecksum=0x0000
# Character Select Related:
OP_SendMaxCharacters=0x5475
OP_SendMembership=0x7acc
OP_SendMembershipDetails=0x057b
OP_CharacterCreateRequest=0x6773
OP_CharacterCreate=0x6bbf
OP_DeleteCharacter=0x1808
OP_RandomNameGenerator=0x5954
OP_ApproveName=0x56a2
OP_MOTD=0x0c22
OP_SetChatServer=0x1bc5
OP_SetChatServer2=0x7eec
OP_ZoneServerInfo=0x4c44
OP_WorldComplete=0x4493
OP_WorldUnknown001=0x2301
OP_FloatListThing=0x46c6
# Reasons for Disconnect:
OP_ZoneUnavail=0x4cb4
OP_WorldClientReady=0x23c1
OP_CharacterStillInZone=0x0000
OP_WorldChecksumFailure=0x0000
OP_WorldLoginFailed=0x0000
OP_WorldLogout=0x0000
OP_WorldLevelTooHigh=0x0000
OP_CharInacessable=0x0000
OP_UserCompInfo=0x0000
OP_SendExeChecksum=0x0000
OP_SendBaseDataChecksum=0x0000
# Zone in opcodes
OP_AckPacket=0x471d
OP_ZoneEntry=0x5089
OP_ReqNewZone=0x7887
OP_NewZone=0x1795
OP_ZoneSpawns=0x5237
OP_PlayerProfile=0x6506
OP_TimeOfDay=0x5070
OP_LevelUpdate=0x1eec
OP_Stamina=0x2a79
OP_RequestClientZoneChange=0x3fcf
OP_ZoneChange=0x2d18
OP_LockoutTimerInfo=0x0000
OP_ZoneServerReady=0x0000
OP_ZoneInUnknown=0x0000
OP_LogoutReply=0x0000
OP_PreLogoutReply=0x0000
# Required to fully log in
OP_SpawnAppearance=0x0971
OP_ChangeSize=0x4707
OP_TributeUpdate=0x5961
OP_TributeTimer=0x073d
OP_SendTributes=0x729b
OP_SendGuildTributes=0x1877
OP_TributeInfo=0x4254
OP_Weather=0x661e
OP_ReqClientSpawn=0x35fa
OP_SpawnDoor=0x7291
OP_GroundSpawn=0x6fca
OP_SendZonepoints=0x69a4
OP_BlockedBuffs=0x3033
OP_RemoveBlockedBuffs=0x0de7
OP_ClearBlockedBuffs=0x34cb
OP_WorldObjectsSent=0x5ae2
OP_SendExpZonein=0x5f8e
OP_SendAATable=0x66b5
OP_RespondAA=0x7a27
OP_UpdateAA=0x66f0
OP_SendAAStats=0x43c8
OP_AAExpUpdate=0x7d14
OP_ExpUpdate=0x20ed
OP_HPUpdate=0x2828
OP_ManaChange=0x5467
OP_TGB=0x0876
OP_SpecialMesg=0x083
OP_GuildMemberList=0x12a6
OP_GuildMOTD=0x3e13
OP_CharInventory=0x5ca6
OP_WearChange=0x7994
OP_ClientUpdate=0x7dfc
OP_ClientReady=0x345d
OP_SetServerFilter=0x444d
# Guild Opcodes - Disabled until crashes are resolved in RoF
OP_GetGuildMOTD=0x36e0
OP_GetGuildMOTDReply=0x4f1f
OP_GuildMemberUpdate=0x69b9
OP_GuildInvite=0x7099
OP_GuildRemove=0x1444
OP_GuildPeace=0x67e3
OP_SetGuildMOTD=0x0b0b
OP_GuildList=0x6279
OP_GuildWar=0x1ffb
OP_GuildLeader=0x7e09
OP_GuildDelete=0x3708
OP_GuildInviteAccept=0x7053
OP_GuildDemote=0x2d4e
OP_GuildPromote=0x0000
OP_GuildPublicNote=0x5053
OP_GuildManageBanker=0x748f
OP_GuildBank=0x5134
OP_SetGuildRank=0x0b9c
OP_GuildUpdateURLAndChannel=0x2958
OP_GuildStatus=0x7326
OP_GuildCreate=0x76d9
OP_GuildMemberLevelUpdate=0x0000 # Unused?
OP_ZoneGuildList=0x0000 # Unused?
OP_GetGuildsList=0x0000 # Unused?
OP_LFGuild=0x0000
OP_GuildManageRemove=0x0000
OP_GuildManageAdd=0x0000
OP_GuildManageStatus=0x0000
# GM/Guide Opcodes
OP_GMServers=0x08c1
OP_GMBecomeNPC=0x3ae1
OP_GMZoneRequest=0x62ac
OP_GMZoneRequest2=0x7e1a
OP_GMGoto=0x7d8e
OP_GMSearchCorpse=0x357c
OP_GMHideMe=0x79c5
OP_GMDelCorpse=0x607e
OP_GMApproval=0x6db5
OP_GMToggle=0x2097
OP_GMSummon=0x486f
OP_GMEmoteZone=0x1cfd
OP_GMEmoteWorld=0x458e
OP_GMFind=0x4a8f
OP_GMKick=0x26a7
OP_GMKill=0x51d3
OP_GMNameChange=0x035f
OP_GMLastName=0x46ce
# Misc Opcodes
OP_InspectRequest=0x57bc
OP_InspectAnswer=0x71ac
OP_InspectMessageUpdate=0x4d25
OP_BeginCast=0x318f
OP_ColoredText=0x43af
OP_ConsentResponse=0x384a
OP_MemorizeSpell=0x217c
OP_SwapSpell=0x0efa
OP_CastSpell=0x1287
OP_Consider=0x742b
OP_FormattedMessage=0x1024
OP_SimpleMessage=0x213f
OP_Buff=0x659c
OP_Illusion=0x312a
OP_MoneyOnCorpse=0x5f44
OP_RandomReply=0x106b
OP_DenyResponse=0x2382
OP_SkillUpdate=0x04c
OP_GMTrainSkillConfirm=0x4b64
OP_RandomReq=0x7b10
OP_Death=0x6517
OP_GMTraining=0x1966
OP_GMEndTraining=0x4d6b
OP_GMTrainSkill=0x2a85
OP_Animation=0x7177
OP_Begging=0x6703
OP_Consent=0x1fd1
OP_ConsentDeny=0x7a45
OP_AutoFire=0x241e
OP_PetCommands=0x0159
OP_DeleteSpell=0x52e5
OP_Surname=0x0423
OP_ClearSurname=0x3fb0
OP_FaceChange=0x5578
OP_SenseHeading=0x260a
OP_Action=0x744c
OP_ConsiderCorpse=0x5204
OP_HideCorpse=0x49e1
OP_CorpseDrag=0x0904
OP_CorpseDrop=0x7037
OP_Bug=0x73f4
OP_Feedback=0x5602
OP_Report=0x1414
OP_Damage=0x6f15
OP_ChannelMessage=0x2b2d
OP_Assist=0x4478
OP_AssistGroup=0x27f8
OP_MoveCoin=0x0bcf
OP_ZonePlayerToBind=0x0ecb
OP_KeyRing=0x6857
OP_WhoAllRequest=0x674b
OP_WhoAllResponse=0x51b8
OP_FriendsWho=0x3956
OP_ConfirmDelete=0x43a3
OP_Logout=0x4ac6
OP_Rewind=0x1745
OP_TargetCommand=0x58e2
OP_Hide=0x67fe
OP_Jump=0x31f4
OP_Camp=0x28ec
OP_Emote=0x373b
OP_SetRunMode=0x009f
OP_BankerChange=0x791e
OP_TargetMouse=0x075d
OP_MobHealth=0x37b1
OP_InitialMobHealth=0x0000 # Unused?
OP_TargetHoTT=0x0272
OP_XTargetResponse=0x672f
OP_XTargetRequest=0x45be
OP_XTargetAutoAddHaters=0x792c
OP_TargetBuffs=0x4f4b
OP_BuffCreate=0x3377
OP_BuffRemoveRequest=0x64f2
OP_DeleteSpawn=0x7280
OP_AutoAttack=0x109d
OP_AutoAttack2=0x3526
OP_Consume=0x4b70
OP_MoveItem=0x32ee
OP_DeleteItem=0x18ad
OP_DeleteCharge=0x01b8
OP_ItemPacket=0x368e
OP_ItemLinkResponse=0x70c0
OP_ItemLinkClick=0x4cef
OP_ItemPreview=0x6b5c
OP_NewSpawn=0x6097
OP_Track=0x17e5
OP_TrackTarget=0x0029
OP_TrackUnknown=0x4577
OP_ClickDoor=0x3a8f
OP_MoveDoor=0x08e8
OP_RemoveAllDoors=0x700c
OP_EnvDamage=0x51fd
OP_BoardBoat=0x4211
OP_Forage=0x5306
OP_LeaveBoat=0x7617
OP_ControlBoat=0x0ae7
OP_SafeFallSuccess=0x2219
OP_RezzComplete=0x760d
OP_RezzRequest=0x3c21
OP_RezzAnswer=0x701c
OP_Shielding=0x48c1
OP_RequestDuel=0x3af1
OP_MobRename=0x2c57
OP_AugmentItem=0x661b
OP_WeaponEquip1=0x34a7
OP_WeaponEquip2=0x559a
OP_WeaponUnequip2=0x2d25
OP_ApplyPoison=0x31e6
OP_Save=0x4a39
OP_TestBuff=0x7cb8
OP_CustomTitles=0x100e
OP_Split=0x3a54
OP_YellForHelp=0x4e56
OP_LoadSpellSet=0x261d
OP_Bandolier=0x7677
OP_PotionBelt=0x1a3e
OP_DuelResponse=0x6a46
OP_DuelResponse2=0x68d3
OP_SaveOnZoneReq=0x600d
OP_ReadBook=0x72df
OP_Dye=0x23b9
OP_InterruptCast=0x048c
OP_AAAction=0x424e
OP_LeadershipExpToggle=0x6c55
OP_LeadershipExpUpdate=0x2797
OP_PurchaseLeadershipAA=0x0026
OP_UpdateLeadershipAA=0x026
OP_MarkNPC=0x5a58
OP_MarkRaidNPC=0x74bd #unimplemented
OP_ClearNPCMarks=0x2003
OP_ClearRaidNPCMarks=0x20d3 #unimplemented
OP_DelegateAbility=0x76b8
OP_SetGroupTarget=0x2814
OP_Charm=0x5d92
OP_Stun=0x36a4
OP_SendFindableNPCs=0x7e62
OP_FindPersonRequest=0x5cea
OP_FindPersonReply=0x7e58
OP_Sound=0x1a30
OP_PetBuffWindow=0x5882
OP_LevelAppearance=0x3bc9
OP_Translocate=0x6580
OP_Sacrifice=0x1821
OP_PopupResponse=0x08a6
OP_OnLevelMessage=0x4d6e
OP_AugmentInfo=0x0afb
OP_Petition=0x3de3
OP_SomeItemPacketMaybe=0x747c
OP_PVPStats=0x4b15
OP_PVPLeaderBoardRequest=0x04aa
OP_PVPLeaderBoardReply=0x071f
OP_PVPLeaderBoardDetailsRequest=0x3707
OP_PVPLeaderBoardDetailsReply=0x25b7
OP_RestState=0x000f
OP_RespawnWindow=0x28bc
OP_LDoNButton=0x5327
OP_SetStartCity=0x6326
OP_VoiceMacroIn=0x17fd
OP_VoiceMacroOut=0x409a
OP_ItemViewUnknown=0x465b
OP_VetRewardsAvaliable=0x590e
OP_VetClaimRequest=0x1126
OP_VetClaimReply=0x16d4
OP_DisciplineUpdate=0x759e
OP_DisciplineTimer=0x6989
OP_BecomeCorpse=0x0000 # Unused?
OP_Action2=0x0000 # Unused?
OP_MobUpdate=0x2c84
OP_NPCMoveUpdate=0x5892
OP_CameraEffect=0x127f
OP_SpellEffect=0x5936
OP_RemoveNimbusEffect=0x7b1e
OP_AltCurrency=0x62ab
OP_AltCurrencyMerchantRequest=0x61cb
OP_AltCurrencyMerchantReply=0x5409
OP_AltCurrencyPurchase=0x0165
OP_AltCurrencySell=0x74ec
OP_AltCurrencySellSelection=0x3788
OP_AltCurrencyReclaim=0x3899
OP_CrystalCountUpdate=0x467f
OP_CrystalCreate=0x7aee
OP_CrystalReclaim=0x2439
OP_Untargetable=0x053c
OP_IncreaseStats=0x70a3
OP_Weblink=0x6f4b
OP_OpenContainer=0x0000
OP_Marquee=0x0000
OP_ItemRecastDelay=0x15a9
#OP_OpenInventory=0x0000 # Likely does not exist in RoF -U
OP_DzQuit=0x205f
OP_DzListTimers=0x0398
OP_DzAddPlayer=0x59ca
OP_DzRemovePlayer=0x4701
OP_DzSwapPlayer=0x1abc
OP_DzMakeLeader=0x405b
OP_DzPlayerList=0x543d
OP_DzJoinExpeditionConfirm=0x14c6
OP_DzJoinExpeditionReply=0x7f4b
OP_DzExpeditionInfo=0x4f7e
OP_DzExpeditionList=0x9119
OP_DzMemberStatus=0xb2e3
OP_DzLeaderStatus=0x32f0
OP_DzExpeditionEndsWarning=0x7e94
OP_DzMemberList=0x3de9
OP_DzCompass=0x3e0e
OP_DzChooseZone=0x0000
# New Opcodes
OP_SpawnPositionUpdate=0x0000 # Actually OP_MobUpdate ?
OP_ManaUpdate=0x3791
OP_EnduranceUpdate=0x5f42
OP_MobManaUpdate=0x2404
OP_MobEnduranceUpdate=0x1c81
# Mercenary Opcodes
OP_MercenaryDataUpdateRequest=0x7b89
OP_MercenaryDataUpdate=0x61a4
OP_MercenaryDataRequest=0x11c1
OP_MercenaryDataResponse=0x72ce
OP_MercenaryHire=0x7169
OP_MercenaryDismiss=0x6e83
OP_MercenaryTimerRequest=0x31e4
OP_MercenaryTimer=0x0763
OP_MercenaryUnknown1=0x5d26
OP_MercenaryCommand=0x27f2
OP_MercenarySuspendRequest=0x4407
OP_MercenarySuspendResponse=0x6f03
OP_MercenaryUnsuspendResponse=0x27a0
# Looting
OP_LootRequest=0x0adf
OP_EndLootRequest=0x30f7
OP_LootItem=0x4dc9
OP_LootComplete=0x55c4
# bazaar trader stuff:
OP_BazaarSearch=0x39d6
OP_TraderDelItem=0x0000
OP_BecomeTrader=0x61b3
OP_TraderShop=0x31df
OP_Trader=0x4ef5
OP_TraderBuy=0x0000
OP_Barter=0x243a
OP_ShopItem=0x0000
OP_BazaarInspect=0x0000
OP_Bazaar=0x0000
OP_TraderItemUpdate=0x0000
# pc/npc trading
OP_TradeRequest=0x77b5
OP_TradeAcceptClick=0x69e2
OP_TradeRequestAck=0x14bf
OP_TradeCoins=0x4206
OP_FinishTrade=0x3993
OP_CancelTrade=0x354c
OP_TradeMoneyUpdate=0x68c2
OP_MoneyUpdate=0x640c
OP_TradeBusy=0x5505
# Sent after canceling trade or after closing tradeskill object
OP_FinishWindow=0x7349
OP_FinishWindow2=0x40ef
# Sent on Live for what seems to be item existance verification
# Ex. Before Right Click Effect happens from items
OP_ItemVerifyRequest=0x189c
OP_ItemVerifyReply=0x097b
# merchant stuff
OP_ShopPlayerSell=0x0000
OP_ShopRequest=0x4fed
OP_ShopEnd=0x30a8
OP_ShopEndConfirm=0x3196
OP_ShopPlayerBuy=0x0ddd
OP_ShopDelItem=0x724f
# tradeskill stuff:
OP_ClickObject=0x4aa1
OP_ClickObjectAction=0x0c1e
OP_ClearObject=0x7a11
OP_RecipeDetails=0x40d7
OP_RecipesFavorite=0x71b1
OP_RecipesSearch=0x1db6
OP_RecipeReply=0x6e02
OP_RecipeAutoCombine=0x6261
OP_TradeSkillCombine=0x579a
# Tribute Packets:
OP_OpenGuildTributeMaster=0x378d
OP_OpenTributeMaster=0x7666
OP_SelectTribute=0x79fc
OP_TributeItem=0x4f3e
OP_TributeMoney=0x58fb
OP_TributeToggle=0x241d
OP_TributePointUpdate=0x5300
OP_TributeNPC=0x0000
OP_GuildTributeInfo=0x0000
OP_OpenTributeReply=0x0000
OP_GuildTributeStatus=0x0000
# Adventure packets:
OP_LeaveAdventure=0x5d18
OP_AdventureFinish=0x400f
OP_AdventureInfoRequest=0x3cb0
OP_AdventureInfo=0x4c54
OP_AdventureRequest=0x2c6c
OP_AdventureDetails=0x5648
OP_AdventureData=0x7171
OP_AdventureUpdate=0x1b01
OP_AdventureMerchantRequest=0x6922
OP_AdventureMerchantResponse=0x3e47
OP_AdventureMerchantPurchase=0x5b72
OP_AdventureMerchantSell=0x2f9b
OP_AdventurePointsUpdate=0x65c3
OP_AdventureStatsRequest=0x5a62
OP_AdventureStatsReply=0x2370
OP_AdventureLeaderboardRequest=0x7093
OP_AdventureLeaderboardReply=0x7f79
# Group Opcodes
OP_GroupDisband=0x4c10
OP_GroupInvite=0x6110
OP_GroupFollow=0x1649
OP_GroupUpdate=0x3abb
OP_GroupUpdateB=0x6194
OP_GroupCancelInvite=0x0000
OP_GroupAcknowledge=0x7323
OP_GroupDelete=0x0f6c
OP_CancelInvite=0x2a50
OP_GroupFollow2=0x2060
OP_GroupInvite2=0x32c2
OP_GroupDisbandYou=0x1ae5
OP_GroupDisbandOther=0x74da
OP_GroupLeaderChange=0x21b4
OP_GroupRoles=0x70e2
OP_GroupMakeLeader=0x4229
OP_DoGroupLeadershipAbility=0x1fb5
OP_GroupLeadershipAAUpdate=0x02cf
OP_GroupMentor=0x3342
OP_InspectBuffs=0x486c
# LFG/LFP Opcodes
OP_LFGCommand=0x6060
OP_LFGGetMatchesRequest=0x0340
OP_LFGGetMatchesResponse=0x5048
OP_LFPGetMatchesRequest=0x4d7d
OP_LFPGetMatchesResponse=0x22c6
OP_LFPCommand=0x49a9
OP_LFGAppearance=0x0000
OP_LFGResponse=0x0000
# Raid Opcodes
OP_RaidInvite=0x55ac
OP_RaidUpdate=0x3973
OP_RaidJoin=0x0000
# Button-push commands
OP_Taunt=0x2703
OP_CombatAbility=0x3eba
OP_SenseTraps=0x02af
OP_PickPocket=0x39e8
OP_DisarmTraps=0x78bf
OP_Disarm=0x5ec8
OP_Sneak=0x5d55
OP_Fishing=0x1e2a
OP_InstillDoubt=0x640e
OP_FeignDeath=0x52fa
OP_Mend=0x0ecf
OP_Bind_Wound=0x0386
OP_LDoNOpen=0x3d5c
# Task packets
OP_TaskDescription=0x3714
OP_TaskActivity=0x08d3
OP_CompletedTasks=0x4eba
OP_TaskActivityComplete=0x5e19
OP_AcceptNewTask=0x0a23
OP_CancelTask=0x39f0
OP_TaskMemberList=0x5727
OP_OpenNewTasksWindow=0x48a2
OP_AvaliableTask=0x36e8
OP_TaskHistoryRequest=0x5f1c
OP_TaskHistoryReply=0x3d05
OP_DeclineAllTasks=0x0000
# Title opcodes
OP_NewTitlesAvailable=0x0d32
OP_RequestTitles=0x6344
OP_SendTitleList=0x2d08
OP_SetTitle=0x6527
OP_SetTitleReply=0x4c21
# mail opcodes
OP_Command=0x0000
OP_MailboxHeader=0x0000
OP_MailHeader=0x0000
OP_MailBody=0x0000
OP_NewMail=0x0000
OP_SentConfirm=0x0000
########### Below this point should not be needed ###########
# This section are all unknown in Titanium
OP_ForceFindPerson=0x0000
OP_LocInfo=0x0000
OP_ReloadUI=0x0000
OP_ItemName=0x0000
OP_ItemLinkText=0x0000
OP_MultiLineMsg=0x0000
OP_MendHPUpdate=0x0000
OP_TargetReject=0x0000
OP_SafePoint=0x0000
OP_ApproveZone=0x0000
OP_ZoneComplete=0x0000
OP_ClientError=0x0000
OP_DumpName=0x0000
OP_Heartbeat=0x0000
OP_CrashDump=0x0000
OP_LoginComplete=0x0000
# discovered opcodes not yet used:
OP_PickLockSuccess=0x0000
OP_PlayMP3=0x0000
OP_ReclaimCrystals=0x0000
OP_DynamicWall=0x0000
OP_OpenDiscordMerchant=0x0000
OP_DiscordMerchantInventory=0x0000
OP_GiveMoney=0x0000
OP_RequestKnowledgeBase=0x0000
OP_KnowledgeBase=0x0000
OP_SlashAdventure=0x0000 # /adventure
OP_BecomePVPPrompt=0x0000
OP_MoveLogRequest=0x0000 # gone I think
OP_MoveLogDisregard=0x0000 # gone I think
# named unknowns, to make looking for real unknown easier
OP_AnnoyingZoneUnknown=0x0000
OP_Some6ByteHPUpdate=0x0000 seems to happen when you target group members
OP_QueryResponseThing=0x0000
# realityincarnate: these are just here to stop annoying several thousand byte packet dumps
#OP_LoginUnknown1=0x46d3 # OP_SendSpellChecksum
#OP_LoginUnknown2=0x040b # OP_SendSkillCapsChecksum
# Petition Opcodes
OP_PetitionSearch=0x0000 search term for petition
OP_PetitionSearchResults=0x0000 (list of?) matches from search
OP_PetitionSearchText=0x0000 text results of search
OP_PetitionUpdate=0x0000
OP_PetitionCheckout=0x0000
OP_PetitionCheckIn=0x0000
OP_PetitionQue=0x0000
OP_PetitionUnCheckout=0x0000
OP_PetitionDelete=0x0000
OP_DeletePetition=0x0000
OP_PetitionResolve=0x0000
OP_PDeletePetition=0x0000
OP_PetitionBug=0x0000
OP_PetitionRefresh=0x0000
OP_PetitionCheckout2=0x0000
OP_PetitionViewPetition=0x0000
# Login opcodes
OP_SessionReady=0x0000
OP_Login=0x0000
OP_ServerListRequest=0x0000
OP_PlayEverquestRequest=0x0000
OP_PlayEverquestResponse=0x0000
OP_ChatMessage=0x0000
OP_LoginAccepted=0x0000
OP_ServerListResponse=0x0000
OP_Poll=0x0000
OP_EnterChat=0x0000
OP_PollResponse=0x0000
# raw opcodes
OP_RAWSessionRequest=0x0000
OP_RAWSessionResponse=0x0000
OP_RAWCombined=0x0000
OP_RAWSessionDisconnect=0x0000
OP_RAWKeepAlive=0x0000
OP_RAWSessionStatRequest=0x0000
OP_RAWSessionStatResponse=0x0000
OP_RAWPacket=0x0000
OP_RAWFragment=0x0000
OP_RAWOutOfOrderAck=0x0000
OP_RAWAck=0x0000
OP_RAWAppCombined=0x0000
OP_RAWOutOfSession=0x0000
# we need to document the differences between these packets to make identifying them easier
OP_Some3ByteHPUpdate=0x0000 # initial HP update for mobs
OP_InitialHPUpdate=0x0000
+11 -6
View File
@@ -158,7 +158,7 @@ OP_GMApproval=0x72fa # C
OP_GMToggle=0x7566 # C
OP_GMSummon=0x596d # C
OP_GMEmoteZone=0x3e7c # C
OP_GMEmoteWorld=0x3e7c # C
OP_GMEmoteWorld=0x5298 # C
OP_GMFind=0x6e27 # C
OP_GMKick=0x799c # C
OP_GMKill=0x6685 # C
@@ -168,7 +168,7 @@ OP_GMLastName=0x3563 # C
OP_InspectAnswer=0x4938 # C
OP_Action2=0x7e4d # C OP_Damage?
OP_BeginCast=0x0d5a # C
OP_BuffFadeMsg=0x569a # C
OP_ColoredText=0x569a # C
OP_ConsentResponse=0x6e47 # C
OP_MemorizeSpell=0x8543 # C
OP_SwapSpell=0x3fd2 # C
@@ -288,8 +288,10 @@ OP_LeadershipExpToggle=0x34c5 # C
OP_LeadershipExpUpdate=0x69d0 # C
OP_PurchaseLeadershipAA=0x07b3 # C
OP_UpdateLeadershipAA=0x6948 # C
OP_MarkNPC=0x0d4b # C
OP_MarkNPC=0x695c # C
OP_MarkRaidNPC=0x0d4b # C
OP_ClearNPCMarks=0x5033 # C
OP_ClearRaidNPCMarks=0x5f55 # C
OP_DoGroupLeadershipAbility=0x540b # C
OP_GroupLeadershipAAUpdate=0x0c33
OP_DelegateAbility=0x0322 # C
@@ -367,7 +369,7 @@ OP_DzExpeditionEndsWarning=0x1879
OP_DzExpeditionList=0x3657
OP_DzMemberList=0x74e4
OP_DzCompass=0x35d3
OP_DzChooseZone=0xd8a
OP_DzChooseZone=0x0d8a
#0x1d99 was grouped with these too but I don't really know it's purpose.
# New Opcodes
@@ -484,6 +486,8 @@ OP_GroupDisbandOther=0x162d
OP_GroupLeaderChange=0x7545
OP_GroupRoles=0x6b67
OP_GroupMakeLeader=0x6087
OP_GroupMentor=0x1224
OP_InspectBuffs=0x66bf
# LFG/LFP Opcodes
OP_LFGCommand=0x3288 # C
OP_LFGGetMatchesRequest=0x5613 # C
@@ -576,7 +580,6 @@ OP_MultiLineMsg=0x0000 #
OP_MendHPUpdate=0x0000 #
OP_TargetReject=0x0000 #
OP_SafePoint=0x0000 #
OP_IncreaseStats=0x0000 #
OP_ApproveZone=0x0000 #
OP_ZoneComplete=0x0000 #
OP_ClientError=0x0000 #
@@ -659,4 +662,6 @@ OP_RAWOutOfSession=0x0000 #
# we need to document the differences between these packets to make identifying them easier
OP_Some3ByteHPUpdate=0x0000 # initial HP update for mobs
OP_InitialHPUpdate=0x0000 #
OP_InitialHPUpdate=0x0000 #
OP_ItemRecastDelay=0x15c4
+14 -4
View File
@@ -85,6 +85,7 @@ OP_TaskActivity=0x2E60 #SEQ 12/04/08
OP_CompletedTasks=0x75AC #Derision 2009
OP_Weather=0x70A5 #SEQ 12/04/08
OP_SendAATable=0x6F05 #Trevius 12/20/08
OP_ShroudClearAA=0x71b9
OP_UpdateAA=0x45D2 #Trevius 12/20/08
OP_RespondAA=0x4426 #Trevius 12/20/08
OP_ReqClientSpawn=0x014C #SEQ 12/04/08
@@ -164,7 +165,7 @@ OP_GMLastName=0x0375 #/lastname <Name> <New Surname>
OP_InspectAnswer=0x084F #SEQ 12/04/08
OP_Action2=0x0EF2 #SEQ 12/04/08
OP_BeginCast=0x5A50 #SEQ 12/04/08
OP_BuffFadeMsg=0x3BC7 #SEQ 12/04/08
OP_ColoredText=0x3BC7 #SEQ 12/04/08
OP_ConsentResponse=0x4D30 #SEQ 12/04/08
OP_MemorizeSpell=0x6A93 #SEQ 12/04/08
OP_SwapSpell=0x1418 #SEQ 12/04/08
@@ -281,8 +282,10 @@ OP_LeadershipExpToggle=0x24D4 #Xinu 02/20/09
OP_LeadershipExpUpdate=0x58b6 #Derision 2009
OP_PurchaseLeadershipAA=0x1408 #Derision 2009
OP_UpdateLeadershipAA=0x7abf #Derision 2009
OP_MarkNPC=0x00c6 #Derision 2009
OP_MarkNPC=0x4697 #Derision 2009
OP_MarkRaidNPC=0x00c6
OP_ClearNPCMarks=0x2ff2 #
OP_ClearRaidNPCMarks=0x56a9 #
OP_DoGroupLeadershipAbility=0x5a64 #Derision 2009
OP_DelegateAbility=0x57e3 #Derision 2009
OP_SetGroupTarget=0x1651 #Derision 2009
@@ -329,6 +332,7 @@ OP_InspectMessageUpdate=0x67e9 # C
OP_OpenInventory=0x66c8
OP_OpenContainer=0x10e3
OP_Marquee=0x2f75
OP_Untargetable=0x3e36
#expedition
OP_DzQuit=0x20d6
@@ -450,6 +454,8 @@ OP_GroupDelete=0x0000 #
OP_CancelInvite=0x596C #Trevius 03/02/09
OP_GroupFollow2=0x59D4 #Xinu 02/20/09
OP_GroupInvite2=0x07F6 #Xinu 02/20/09
OP_GroupMentor=0x9EF3
OP_InspectBuffs=0x3547
#LFG/LFP Opcodes
OP_LFGCommand=0x5D81 #Trevius 01/16/09
@@ -526,7 +532,7 @@ OP_MultiLineMsg=0x0000 #
OP_MendHPUpdate=0x0000 #
OP_TargetReject=0x0000 #
OP_SafePoint=0x0000 #
OP_IncreaseStats=0x0000 #
OP_IncreaseStats=0x5ecb #
OP_ApproveZone=0x0000 #
OP_ZoneComplete=0x0000 #
OP_ClientError=0x0000 #
@@ -540,9 +546,11 @@ OP_PickLockSuccess=0x0000 #
OP_VetRewardsAvaliable=0x044b #
OP_VetClaimRequest=0x7503
OP_VetClaimReply=0x01e1
OP_PlayMP3=0x0000 #
OP_PlayMP3=0x0d1c #
OP_ReclaimCrystals=0x0000 #
OP_CrystalCountUpdate=0x64C1 #
OP_CrystalCreate=0x65e2
OP_CrystalReclaim=0x0730
OP_DynamicWall=0x0000 #
OP_OpenDiscordMerchant=0x0000 #
OP_DiscordMerchantInventory=0x0000 #
@@ -615,6 +623,8 @@ OP_RAWOutOfSession=0x0000 #
OP_Some3ByteHPUpdate=0x0000 #initial HP update for mobs
OP_InitialHPUpdate=0x0000 #
OP_ItemRecastDelay=0x0ada
# Opcodes from the client that are currently Unknowns:
# 0x3E85 - Sent when Guild Management window is opened
+3 -1
View File
@@ -154,7 +154,7 @@ OP_InspectRequest=0x775d # ShowEQ 10/27/05
OP_InspectAnswer=0x2403 # ShowEQ 10/27/05
OP_Action2=0x0000
OP_BeginCast=0x3990 # ShowEQ 10/27/05
OP_BuffFadeMsg=0x0b2d # ShowEQ 10/27/05
OP_ColoredText=0x0b2d # ShowEQ 10/27/05
OP_Consent=0x1081 # ShowEQ 10/27/05
OP_ConsentDeny=0x4e8c # ShowEQ 10/27/05
OP_ConsentResponse=0x6380 # ShowEQ 10/27/05
@@ -420,6 +420,8 @@ OP_RaidJoin=0x1f21 # ShowEQ 10/27/05
OP_RaidInvite=0x5891 # ShowEQ 10/27/05
OP_RaidUpdate=0x1f21 # EQEmu 06/29/05
OP_InspectBuffs=0x4FB6
OP_ZoneComplete=0x0000
OP_ItemLinkText=0x0000
+24 -4
View File
@@ -88,6 +88,7 @@ OP_TaskActivity=0x31f3 # C
OP_CompletedTasks=0x687f # C
OP_Weather=0x4658 # V
OP_SendAATable=0x6ef9 # V
OP_ShroudClearAA=0x2cd4
OP_UpdateAA=0x7bf6 # V
OP_RespondAA=0x1fbd # C 0x2bad
OP_ReqClientSpawn=0x69cd # V
@@ -168,7 +169,7 @@ OP_GMLastName=0x7bfb # C
OP_InspectAnswer=0x0c2b # C
OP_BeginCast=0x0d5a # C
OP_BuffFadeMsg=0x71bf # C
OP_ColoredText=0x71bf # C
OP_ConsentResponse=0x0e87 # C
OP_MemorizeSpell=0x3887 # C
OP_SwapSpell=0x5805 # C
@@ -292,8 +293,10 @@ OP_LeadershipExpToggle=0x5033 # C
OP_LeadershipExpUpdate=0x074f # C
OP_PurchaseLeadershipAA=0x5f55 # C
OP_UpdateLeadershipAA=0x77ed # C
OP_MarkNPC=0x3ec7 # C
OP_MarkNPC=0x66bf
OP_MarkRaidNPC=0x3ec7 # C
OP_ClearNPCMarks=0x5c29 # C
OP_ClearRaidNPCMarks=0x2af4
OP_DoGroupLeadershipAbility=0x0068 # C
OP_GroupLeadershipAAUpdate=0x167b # C
OP_DelegateAbility=0x6e58 # C
@@ -313,7 +316,7 @@ OP_OnLevelMessage=0x24cb # C
OP_AugmentInfo=0x31b1 # C
OP_Petition=0x31d1 # C
OP_SomeItemPacketMaybe=0x2c27 # C
OP_PVPStats=0x0000 #
OP_PVPStats=0x5272 #
OP_PVPLeaderBoardRequest=0x4973 # C
OP_PVPLeaderBoardReply=0x3842 # C
OP_PVPLeaderBoardDetailsRequest=0x6c75 # C
@@ -371,7 +374,17 @@ OP_DzExpeditionEndsWarning=0x6ac2
OP_DzExpeditionList=0x70d8
OP_DzMemberList=0x15c4
OP_DzCompass=0x01cb
OP_DzChooseZone=0x0000
OP_DzChooseZone=0x65e1
#shroud
OP_ShroudSelectionWindow=0x72ad
OP_ShroudRequestStats=0x488b
OP_ShroudRespondStats=0x1910
OP_ShroudSelect=0x45d7
OP_ShroudSelectCancel=0x666d
OP_ShroudProgress=0x6016 # This clears current progress and sets
OP_ShroudProgress2=0x66b4 # This just sets progress
OP_Shroud=0x1643
# New Opcodes
OP_SpawnPositionUpdate=0x4656 # C
@@ -487,6 +500,8 @@ OP_GroupDisbandOther=0x49f6 # C
OP_GroupLeaderChange=0x0c33 # C
OP_GroupRoles=0x116d # C
OP_GroupMakeLeader=0x5851
OP_GroupMentor=0x292f
OP_InspectBuffs=0x105b
# LFG/LFP Opcodes
OP_LFGCommand=0x2c38 # C
@@ -654,3 +669,8 @@ OP_RAWOutOfSession=0x0000 #
# we need to document the differences between these packets to make identifying them easier
OP_Some3ByteHPUpdate=0x0000 # initial HP update for mobs
OP_InitialHPUpdate=0x0000 #
OP_ItemRecastDelay=0x82d7
# unhandled
OP_ShieldGroup=0x23a1
+214
View File
@@ -0,0 +1,214 @@
#!/usr/bin/perl
############################################################
#::: Script: DB_Dumper.pl
#::: Purpose: Utility to easily manage database backups and compress.
#::: Export Individual DB Tables...
#::: Export specific databases...
#::: Built for both Windows and Linux
#::: Windows uses WinRar or 7-Zip for compression
#::: Linux uses tar for compression
#::: Author: Akkadius
############################################################
$localdrive = "C:"; #::: Where Windows and all Install Programs are...
$linesep = "---------------------------------------";
use POSIX qw(strftime);
my $date = strftime "%m-%d-%Y", localtime;
print "\nTodays Date: " . $date . "\n";
use Config;
print "Operating System is: $Config{osname}\n";
if($Config{osname}=~/linux/i){ $OS = "Linux"; }
if($Config{osname}=~/Win|MS/i){ $OS = "Windows"; }
if(!$ARGV[0]){
print "\nERROR! Need arguments\n\n";
print "#::: Help :::#\n";
print "######################################################\n\n";
print "Arguments\n";
print " loc=\"C:\\File Location\" - File path location to backup...\n";
print " database=\"dbname\" - Manually specify databasename, default is database in eqemu_config.xml\n";
print " tables=\"table1,table2,table3\" - Manually specify tables, default is to dump all tables from database\n";
print " compress - Compress Database with 7-ZIP, will fallback to WinRAR depending on what is installed (Must be installed to default program dir)...\n";
print ' Example: perl DB_Dumper.pl Loc="E:\Backups"' . "\n\n";
print "######################################################\n";
exit;
}
#::: CONFIG VARIABLES - Parsed from eqemu_config.xml
my $confile = "eqemu_config.xml"; #default
open(F, "<$confile") or die "Unable to open config: $confile - This must be in your EQEmu Server Folder with your XML config\n";
my $indb = 0;
while(<F>) {
s/\r//g;
if(/<database>/i) { $indb = 1; }
next unless($indb == 1);
if(/<\/database>/i) { $indb = 0; last; }
if(/<host>(.*)<\/host>/i) { $host = $1; }
elsif(/<username>(.*)<\/username>/i) { $user = $1; }
elsif(/<password>(.*)<\/password>/i) { $pass = $1; }
elsif(/<db>(.*)<\/db>/i) { $db = $1; }
}
$Debug = 0;
print "Arguments\n" if $Debug;
$n = 0;
while($ARGV[$n]){
print $n . ': ' . $ARGV[$n] . "\n" if $Debug;
if($ARGV[$n]=~/compress/i){
print "Compression SET\n";
$Compress = 1;
}
if($ARGV[$n]=~/database=/i){
@DB_NAME = split('=', $ARGV[$n]);
print "Database is " . $DB_NAME[1] . "\n";
$db = $DB_NAME[1];
}
if($ARGV[$n]=~/loc=/i){
@B_LOC = split('=', $ARGV[$n]);
print "Backup Directory: " . $B_LOC[1] . "\n";
}
if($ARGV[$n]=~/tables=/i){
@Tables = split('=', $ARGV[$n]); @TList = split(',', $Tables[1]);
foreach my $tables (@TList){
$t_tables .= $tables . " ";
$t_tables_l .= $tables . "_";
$t_tables_p .= $tables . "\n";
}
print "Backing up tables: \n\n############################\n" . $t_tables_p . "############################\n\n";
}
$n++;
}
#::: Check for Backup Directory existence, if doesn't exist then create...
if (-d $B_LOC[1]) {
print "Directory currently exists... Adding files to it...\n\n";
}
elsif($B_LOC[1] ne ""){
print "Directory does NOT exist! Creating...\n\n";
mkdir($B_LOC[1]) or die 'Failed to create folder, maybe created the folder manually at "' . $B_LOC[1]. '" ?';
}
else{
print "No save location specified... Saving to folder script is running in...\n";
}
if($B_LOC[1] ne ""){
if($OS eq "Windows"){ $file_app = "\\"; }
if($OS eq "Linux"){ $file_app = "/"; }
}
else {
$file_app = "";
}
if($t_tables ne ""){
$tables_f_l = substr($t_tables_l, 0, 20) . '...';
$target_file = '' . $tables_f_l . ' ' . $date . '';
print "Performing table based backup...\n";
#::: Backup Database...
print "Backing up Database " . $db . "... \n\n";
$cmd = 'mysqldump -u' . $user . ' --max_allowed_packet=512M --password="' . $pass . '" ' . $db . ' ' . $t_tables . ' > "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.sql"';
printcmd($cmd);
system($cmd);
}
else{ #::: Entire DB Backup
$target_file = '' . $db . ' ' . $date . '';
#::: Backup Database...
print "Backing up Database " . $db . "... \n\n";
$cmd = 'mysqldump -u' . $user . ' --max_allowed_packet=512M --password="' . $pass . '" ' . $db . ' > "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.sql"';
printcmd($cmd);
system($cmd);
}
#::: Get File Size
$fileloc = '' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.sql';
$filesize = -s $fileloc;
if($filesize < 1000){ print "\n" . 'Error occurred... exiting...' . "\n\n"; exit; }
print "Backup DONE... DB Backup File Size '" . $filesize . "' (" . get_filesize_str($fileloc) . ")\n\n";
#::: WinRar Get, check compression flag
if($Compress == 1){
if($OS eq "Windows"){
if(-d $localdrive . "\\Program Files\\7-Zip"){
print " ::: You have 7-Zip installed as 64 Bit...\n\n";
$S_ZIP = $localdrive . "\\Program Files\\7-Zip";
}
elsif(-d $localdrive . "\\Program Files (x86)\\7-Zip"){
print " ::: You have 7-Zip installed as 32 Bit...\n\n";
$S_ZIP = $localdrive . "\\Program Files (x86)\\7-Zip";
}
elsif(-d $localdrive . "\\Program Files (x86)\\WinRAR"){
print " ::: You have WinRAR installed as 32 Bit...\n\n";
$WinRar = $localdrive . "\\Program Files (x86)\\WinRAR";
}
elsif(-d $localdrive . "\\Program Files\\WinRAR"){
print " ::: You have WinRAR installed as 64 Bit...\n\n";
$WinRar = $localdrive . "\\Program Files\\WinRAR";
}
else{
print "No WinRAR installed... Will not compress...\n";
}
if($S_ZIP ne ""){
print "Compressing Database with 7-ZIP... \n\n";
$cmd = '"' . $S_ZIP . '\\7z" a -t7z -m0=lzma -mx=9 "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.7z" "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.sql" ';
printcmd($cmd);
system($cmd);
print "\nDeleting RAW .sql Dump... \n\n";
$cmd = 'del "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.sql" ';
printcmd($cmd);
system($cmd);
$final_file = $target_file . ".7z";
}
elsif($WinRar ne ""){
print "Compressing Database with WinRAR... \n";
$cmd = '"' . $WinRar . '\\rar" a "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.rar" "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.sql" ';
printcmd($cmd);
system($cmd);
print "\nDeleting RAW .sql Dump... \n\n";
$cmd = 'del "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.sql" ';
printcmd($cmd);
system($cmd);
$final_file = $target_file . ".rar";
}
}
if($OS eq "Linux"){
print "Compressing Database with Tarball... \n";
$cmd = 'tar -zcvf "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.tar.gz" "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.sql" ';
printcmd($cmd);
system($cmd);
print "\nDeleting RAW .sql Dump... \n\n";
$cmd = 'rm "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.sql" ';
printcmd($cmd);
system($cmd);
$final_file = $target_file . ".tar.gz";
}
}
#::: Get Final File Location for display
if($B_LOC[1] ne ""){ $final_loc = $B_LOC[1] . '' . $file_app . ""; }
else{
if($OS eq "Windows"){
$final_loc = `echo %cd%`;
}
elsif($OS eq "Linux"){
$final_loc = `pwd`;
}
}
print "Final file located: " . $final_loc . "" . $final_file . "\n\n";
sub printcmd{
print "--- CMD --- \n" . $_[0] . "\n" . $linesep . "\n\n";
}
sub get_filesize_str{
my $file = shift();
my $size = (stat($file))[7] || die "stat($file): $!\n";
if ($size > 1099511627776) { return sprintf("%.2f TiB", $size / 1099511627776); }
elsif ($size > 1073741824) { return sprintf("%.2f GiB", $size / 1073741824); }
elsif ($size > 1048576) { return sprintf("%.2f MiB", $size / 1048576); }
elsif ($size > 1024) { return sprintf("%.2f KiB", $size / 1024); }
else { return "$size byte" . ($size == 1 ? "" : "s"); }
}

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