mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 17:26:30 +00:00
Compare commits
601 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a3f21cc9ea | |||
| 3c9e6d913a | |||
| 153e587cea | |||
| fbb13ec416 | |||
| e7785d5693 | |||
| 23bc535e23 | |||
| d04d6750a2 | |||
| 9c08d6f25b | |||
| f8d000d660 | |||
| b2c6bb4df5 | |||
| 542d0795c4 | |||
| c3b7f6d0bf | |||
| 21e53a3cd0 | |||
| 2d24237aac | |||
| 750e65f847 | |||
| 3ce99d9f00 | |||
| 598196329d | |||
| 31cc6f63d6 | |||
| bbfacd902c | |||
| 5cfb3111a6 | |||
| 5b674f23bd | |||
| 81cadf3bb2 | |||
| 54c28117a8 | |||
| 79f9433dfa | |||
| 67a95b59a7 | |||
| 09b9d398e2 | |||
| 3dd0d43e96 | |||
| 8d1fe63e77 | |||
| 3fa72218a4 | |||
| f3f034d948 | |||
| bd364a4049 | |||
| 41b1634199 | |||
| 0159e1cc72 | |||
| ab372b0f6b | |||
| 14d09485eb | |||
| 8cd6416754 | |||
| 4fad93824b | |||
| fe70834a6b | |||
| 17b5cc1fa5 | |||
| 04ce4f66ed | |||
| 5b24cbde5d | |||
| 3555791e1f | |||
| 262bcf5c29 | |||
| 226a49cb42 | |||
| bf3d9b2d02 | |||
| 3d229e1da1 | |||
| df5d58f43d | |||
| 37d22e17a3 | |||
| 999650d368 | |||
| 09bbfbcc31 | |||
| f26b7a4adc | |||
| becd7b5c24 | |||
| d559e9da10 | |||
| 2690d8fed8 | |||
| 7d13475bac | |||
| 2ab280bef0 | |||
| 15af28720a | |||
| 5213e4c7d4 | |||
| 12d7f242b4 | |||
| 7ac597270b | |||
| 05ca4669a9 | |||
| a7cbe2f60e | |||
| 52d79f89a9 | |||
| a8a1c3f809 | |||
| 24bae49401 | |||
| bf239f9691 | |||
| 666513c4ab | |||
| 1b2df18cea | |||
| b1be667884 | |||
| 91ae6a6613 | |||
| 303f056075 | |||
| ec9af74dc9 | |||
| a49e3d6471 | |||
| 9ae585dd81 | |||
| 0ee3168241 | |||
| 3fd40e9449 | |||
| c61c275221 | |||
| 7a6d5d46f4 | |||
| 14a5ff399a | |||
| 31907382c8 | |||
| 5c6492bc0f | |||
| 0968ce0d60 | |||
| 171474f1d2 | |||
| 3383f65ff7 | |||
| 7621bf47c8 | |||
| 72ed770037 | |||
| 4e8a03f7b4 | |||
| 602381ebec | |||
| e098836934 | |||
| ce3fc0f2c3 | |||
| 9adfe5b9ff | |||
| b423ad0d80 | |||
| 9a157fa028 | |||
| 7db82a3b14 | |||
| 056725b9bd | |||
| 8bbf099636 | |||
| a884639534 | |||
| 8f67df1f4f | |||
| f851b1a3b4 | |||
| b41bb8e179 | |||
| d9633dfee4 | |||
| 46b19e8e6f | |||
| f0f5c41c30 | |||
| 08c2f73e37 | |||
| 9f4604ec3e | |||
| 8177f7d9bb | |||
| 4ec3fda59d | |||
| e3c8b75259 | |||
| d62a449f9c | |||
| d043c38f71 | |||
| 5b8ad902ce | |||
| ef16522473 | |||
| fe21564659 | |||
| e3173d04d4 | |||
| 92d4468326 | |||
| 0f32f780a9 | |||
| 955514c20f | |||
| ed717add29 | |||
| a7b159fe65 | |||
| 38651258fc | |||
| 4605540955 | |||
| c83bc038f3 | |||
| d3dff3760a | |||
| 9e49b2ae0f | |||
| a81212e1b4 | |||
| 57d75572b2 | |||
| d1abe4a332 | |||
| cd11d7d1af | |||
| 3d1bb6bd08 | |||
| e9c1681e2c | |||
| 5dbbc5f21c | |||
| ef8b4754ea | |||
| a13694c859 | |||
| 51eaf25ea0 | |||
| 592f9a9cb9 | |||
| 409dc3ad35 | |||
| f8f783fa46 | |||
| 1d1382cb12 | |||
| 68680ac9d8 | |||
| df1d499da6 | |||
| a6a056ad0d | |||
| b1f14e1e29 | |||
| 1999982e6a | |||
| b0ad9524bc | |||
| d8519bc270 | |||
| da9792160d | |||
| dc308e2ecb | |||
| 984a009fbb | |||
| 5d61cf5bcf | |||
| 2db6464d14 | |||
| c17ac67296 | |||
| 37e87e8cef | |||
| e300f82c28 | |||
| 05cb9d56c2 | |||
| ac0cba64f9 | |||
| 0b3b3fdc88 | |||
| 104a0998ce | |||
| cdf0d5deb0 | |||
| 36300d6df1 | |||
| 3d54a4edcb | |||
| 31de6a63cc | |||
| ae81ab8a12 | |||
| 7033d9d919 | |||
| 905e3acab3 | |||
| 2c6e11b464 | |||
| 9aba993888 | |||
| f614c35f6e | |||
| 8f21b01b7e | |||
| 591fa003c6 | |||
| f3e09abf22 | |||
| 18e6e5e5e2 | |||
| 698a814fc3 | |||
| fb820f4fec | |||
| 0d84a73e9f | |||
| b92d6c57a1 | |||
| 8c6fefa33e | |||
| e03a90b05d | |||
| c030e1ce8d | |||
| 7e49a21b3b | |||
| 9e824876ba | |||
| 891fa0411c | |||
| a4fda2a951 | |||
| ffdc933ce0 | |||
| e3f15de1f8 | |||
| 6cef5c6beb | |||
| da08a622f1 | |||
| 50a67c76e7 | |||
| 0a4ccb11aa | |||
| af4a432745 | |||
| df86e644f4 | |||
| 80ff535215 | |||
| 30157a37a2 | |||
| f5827174ee | |||
| 1d19bd11d0 | |||
| 6a2be94282 | |||
| 630ea0d3c6 | |||
| 55e78cd8e9 | |||
| a13e32498a | |||
| 18693998b9 | |||
| 908a7061cf | |||
| 648078d76c | |||
| 06279b18a3 | |||
| f53b95d141 | |||
| e680a0f704 | |||
| 019586abbd | |||
| 8f5ba05e75 | |||
| 427fb08561 | |||
| 343c23cc6c | |||
| ac0332c020 | |||
| c1fbfc0f44 | |||
| d305d67279 | |||
| 3cc7d0db63 | |||
| 1b1d8700ae | |||
| 6994157184 | |||
| bf25c65868 | |||
| 6311d82095 | |||
| 491cabfe8b | |||
| fddb6f67ab | |||
| 26985496d1 | |||
| ab0f883191 | |||
| 538ff873ee | |||
| d0e6bb6e07 | |||
| 6cbb4bcf47 | |||
| d99df2540d | |||
| f5a0b994dc | |||
| 246f770e8f | |||
| 95efc3a66c | |||
| baf9336617 | |||
| 0ab0c5c117 | |||
| c482738d79 | |||
| a4c9fa6a65 | |||
| bb8fc17189 | |||
| b61c7d0b14 | |||
| 0d9af27a03 | |||
| 3e50491619 | |||
| de92c277e0 | |||
| ffbc913b9d | |||
| 286bfa7af6 | |||
| b5e324af83 | |||
| d9e0708331 | |||
| a121675161 | |||
| bbd2796ea4 | |||
| 5a08e0ffd9 | |||
| 3dec02881a | |||
| 04c8fe7d2c | |||
| e8d80a436e | |||
| 3447c86562 | |||
| 71e641c882 | |||
| cb1d0a0bef | |||
| 34ffb5b908 | |||
| e7e379c71b | |||
| b3842ba72a | |||
| a3c16ecdbe | |||
| 72e7465e16 | |||
| 4af996e359 | |||
| 462dea67e1 | |||
| e23fd269d5 | |||
| 06e2f76c05 | |||
| b1f97712f1 | |||
| cbe53951f8 | |||
| 66f253553a | |||
| 7f4ce3faf5 | |||
| a29177de9e | |||
| a15df2ec2c | |||
| cbb7090615 | |||
| b9fefc95e8 | |||
| 60406ebcc1 | |||
| a6f5571750 | |||
| aabf7b9b5a | |||
| aa56e8aac4 | |||
| db7f0cc977 | |||
| 95064947b6 | |||
| 714464481f | |||
| 6abed18eb9 | |||
| 752821f22b | |||
| 409bad8108 | |||
| 97999a63b7 | |||
| fe968f83a3 | |||
| 9545684883 | |||
| 6e0cba566f | |||
| 16fa32e65b | |||
| e3e20a947b | |||
| d1f7448b25 | |||
| d62ceaefcc | |||
| ec548874cc | |||
| 9a225bc396 | |||
| 101002d635 | |||
| 04f4fd652b | |||
| 1cb79c8c1f | |||
| 195bc03645 | |||
| 3438247904 | |||
| 9f01d14c64 | |||
| 7071b27183 | |||
| bfd07b1010 | |||
| 8b5dd58e96 | |||
| decaadfe7d | |||
| e29ec16759 | |||
| 16642b7c4c | |||
| 2188be24e4 | |||
| 70b9ff384c | |||
| 56babc1801 | |||
| 3ba199e052 | |||
| 8496bf16ff | |||
| e86fca3aff | |||
| 46cbd147b5 | |||
| 05ed623056 | |||
| c90a436db3 | |||
| 1e865a5246 | |||
| 343c41bb18 | |||
| a5b19d0c0d | |||
| c263c4ef07 | |||
| 7b5ea9e99c | |||
| 013f7cfd21 | |||
| 379ef7eed3 | |||
| 329c9c8d98 | |||
| 4fa8c89e5c | |||
| 19b6a96063 | |||
| 6079b34a2a | |||
| 4cb7d9a352 | |||
| b04844aa94 | |||
| b15ada974f | |||
| e2587b78f5 | |||
| 06dfba3c81 | |||
| 8aa942cd27 | |||
| a9070b1327 | |||
| 745510ea75 | |||
| f6d721dd72 | |||
| 0503e85fd3 | |||
| 0232f4f672 | |||
| 56d355935b | |||
| d260bb5cd4 | |||
| 4816c1fc9a | |||
| 50469b858b | |||
| 64998a398d | |||
| 9a3af63f65 | |||
| 5679f45f5b | |||
| 66c0da85e6 | |||
| 4246e4f79b | |||
| 90dc7a4e38 | |||
| bf28354301 | |||
| 5f1141dfb1 | |||
| 5b03fba463 | |||
| 0efd0c5f73 | |||
| 2947e3f39f | |||
| 77974c83d7 | |||
| d0bb3047f0 | |||
| 739b1bfaa3 | |||
| fb308eaa01 | |||
| 7c40bcff53 | |||
| ec87656d58 | |||
| 159ba9f487 | |||
| d8fe5124ff | |||
| fa337d441e | |||
| ea1ae1a0a4 | |||
| 95ea61114a | |||
| 585e5830f7 | |||
| bfb77803d8 | |||
| 364ab42c49 | |||
| 89183cf8b7 | |||
| aaa116d97c | |||
| 4360021fc9 | |||
| b7b233d46f | |||
| 5c43f2d80e | |||
| ed9b6db369 | |||
| dd0d15e134 | |||
| 29d6817019 | |||
| 46bb559af1 | |||
| 031a37baa1 | |||
| 62a4ce76b6 | |||
| d85e6ae495 | |||
| 32c4c360bd | |||
| f2a075d432 | |||
| 2dee62c850 | |||
| db380944ac | |||
| 28c5b32624 | |||
| 6db350790e | |||
| 3f8ff1373c | |||
| d6ee505c63 | |||
| e84b2ba224 | |||
| 4de9b2c53e | |||
| 385823461b | |||
| 85c28185a2 | |||
| 25de25a777 | |||
| 357a92dfee | |||
| 35c83db432 | |||
| f7cc1053f1 | |||
| d5864aea3e | |||
| 2b2d6e1ef5 | |||
| f99523dc48 | |||
| 69913c0897 | |||
| 75694e8797 | |||
| 24856b6a2d | |||
| a70291f20f | |||
| 6e1a5eac94 | |||
| 37b87e98f4 | |||
| 55d2e9b842 | |||
| 3afc5d0890 | |||
| f6b6fcc2c5 | |||
| 5039aa07a5 | |||
| 8048239a81 | |||
| ecdc0f7096 | |||
| 2c3107fbe9 | |||
| c2b31bd6e2 | |||
| a8ba563632 | |||
| 4065df7930 | |||
| 0b06044dce | |||
| 93464e3963 | |||
| 8dd18a43a0 | |||
| afe42ccdaf | |||
| f5a7117bdf | |||
| 696c02c0f0 | |||
| 6daf207323 | |||
| f67cd057f3 | |||
| 0789d10d3e | |||
| a07149919d | |||
| f9f3a8f3bd | |||
| 1def512b4c | |||
| b85d5a6d98 | |||
| 94fabc87f0 | |||
| d3afde1aa1 | |||
| 5a0d2b527b | |||
| 3d64878e60 | |||
| 26772b721c | |||
| 3c95545ea3 | |||
| ae5689ffb4 | |||
| e894e96404 | |||
| ed5715ccd9 | |||
| 7f9af238f8 | |||
| fd1e425abc | |||
| 35c1eccbe1 | |||
| 69f06f736c | |||
| 48fb483de6 | |||
| 8ce2921e3d | |||
| f06a9b3dce | |||
| 3efc925264 | |||
| a8db4532d0 | |||
| ab35f8b842 | |||
| ef3cf099b8 | |||
| 00cfe2d25f | |||
| 7a4c9b36a8 | |||
| 488c4941d2 | |||
| 97dc0a84dd | |||
| f01c890966 | |||
| 50de63117d | |||
| 4e4d82857c | |||
| 039e0fbb83 | |||
| e1a02455d8 | |||
| c1c9ec2790 | |||
| e90e141a79 | |||
| 38d3f9b7c0 | |||
| 7d62b208ca | |||
| 27f6826fd3 | |||
| 051f9ffab9 | |||
| bdb083eac7 | |||
| 4b93ef0a98 | |||
| e86d11250b | |||
| e5746c3b2e | |||
| 6a7ea65dd0 | |||
| 68df09a570 | |||
| d53d569020 | |||
| 1d12f92934 | |||
| e89fa01d89 | |||
| 4c49397ef6 | |||
| 8dc8e53218 | |||
| d0fbbed20d | |||
| 33407ee0da | |||
| c81a5e0783 | |||
| 66fec40169 | |||
| 60f2d14caa | |||
| 538d6a2a33 | |||
| f26dce39c3 | |||
| acb5bb3e3e | |||
| 16125c38af | |||
| 69db67efe5 | |||
| 37ecc69088 | |||
| d68a3b191e | |||
| 64cf613189 | |||
| f3da7773d3 | |||
| 7c9bd80c1e | |||
| 2bae779a9b | |||
| e862994716 | |||
| f612f8be42 | |||
| ef2c17748e | |||
| 4c4b0aba0c | |||
| 4decdb3e4d | |||
| 6b3078d0f7 | |||
| 3a4b341ad6 | |||
| 2a2ce6da5d | |||
| 239c478f31 | |||
| f6c62af82e | |||
| 84db0ec2c5 | |||
| 345f3d6301 | |||
| de5170c5cb | |||
| 7674b3a077 | |||
| 11e017ccb9 | |||
| bda4fcfb26 | |||
| a7fd9312d0 | |||
| 3963897fe4 | |||
| f42b0351fd | |||
| 37cb9f00f6 | |||
| 343b781e74 | |||
| f428a8a56a | |||
| cd9a7f1d5d | |||
| 83548ee405 | |||
| 5f588934a9 | |||
| 1f5dcb6965 | |||
| 5f111f159b | |||
| 527ee56fb2 | |||
| 8396f19e85 | |||
| aadc4b5e6b | |||
| ccb5427b45 | |||
| 8983f3c5dc | |||
| 9349d5d473 | |||
| ae6ceddab7 | |||
| 84c90715be | |||
| aeff31ba7a | |||
| f431e820ef | |||
| c41521c310 | |||
| f437232db1 | |||
| 3ed43d50f2 | |||
| 7cd613e5f2 | |||
| 921136c987 | |||
| d4df2e7351 | |||
| 9cf553232d | |||
| 6cb2fdd737 | |||
| bbf4d19de3 | |||
| 02cedce54e | |||
| 871fcd1fc8 | |||
| 7457d832f8 | |||
| a9ff407657 | |||
| 1ba7f0cd65 | |||
| 56fcabc119 | |||
| 402353affa | |||
| bc196f2e50 | |||
| 148eaf7048 | |||
| b44da7c13a | |||
| 4b57f69cba | |||
| 542d454fe0 | |||
| 3d61df253d | |||
| dcd276a5ce | |||
| bacaf6453e | |||
| 860ee81a38 | |||
| bcec9501b7 | |||
| 37b46d1289 | |||
| 54de212214 | |||
| a64343689c | |||
| 3e0af2928b | |||
| a5d79b25db | |||
| cb8843926c | |||
| 59ec184208 | |||
| 9a010a90a9 | |||
| 3d6fe8acba | |||
| 02ec76d2aa | |||
| 8615df0a03 | |||
| 951f3239f1 | |||
| fe630bf7ca | |||
| 1a2537f5d8 | |||
| 7b04b9ef4a | |||
| 30b516e7bd | |||
| c72749790d | |||
| 05780a9316 | |||
| 3889da7301 | |||
| 57ebfd2675 | |||
| b10187f9de | |||
| af99db7287 | |||
| 306ecf003a | |||
| 2b2ebc75b0 | |||
| 83bb10b32b | |||
| d9bdcf2aec | |||
| 3e25a3df5c | |||
| 73e91be281 | |||
| 471d7ec42d | |||
| 1b6974ade3 | |||
| c1a6a23e06 | |||
| 9ec299247c | |||
| 79549ba330 | |||
| 4b15121f70 | |||
| c29219f214 | |||
| 51d8f00418 | |||
| e843f66135 | |||
| 542dc16752 | |||
| 62888170b0 | |||
| ca0b26f89f | |||
| cd8cd90a38 | |||
| ae3c98c692 | |||
| 767dfaef70 | |||
| c07fe35908 | |||
| ea8f81feec | |||
| a38417bf54 | |||
| 0f54984966 | |||
| 6c1af93f58 | |||
| 16895910e4 | |||
| b155a603aa | |||
| ecc9e41ab2 | |||
| 2a74d04635 | |||
| a089820464 | |||
| 579efe83af | |||
| a37a811014 | |||
| 0ecc702612 | |||
| a144ecd21b | |||
| 772fa200ac |
@@ -30,6 +30,7 @@
|
|||||||
#EQEMU_BUILD_LUA
|
#EQEMU_BUILD_LUA
|
||||||
#EQEMU_SANITIZE_LUA_LIBS
|
#EQEMU_SANITIZE_LUA_LIBS
|
||||||
#EQEMU_BUILD_CLIENT_FILES
|
#EQEMU_BUILD_CLIENT_FILES
|
||||||
|
#EQEMU_USE_MAP_MMFS
|
||||||
#EQEMU_MAP_DIR
|
#EQEMU_MAP_DIR
|
||||||
|
|
||||||
#We set a fairly new version (as of 2013) because I found finding perl was a bit... buggy on older ones
|
#We set a fairly new version (as of 2013) because I found finding perl was a bit... buggy on older ones
|
||||||
@@ -275,6 +276,11 @@ IF(EQEMU_BUILD_LUA)
|
|||||||
ADD_DEFINITIONS(-DLUA_EQEMU)
|
ADD_DEFINITIONS(-DLUA_EQEMU)
|
||||||
ENDIF(EQEMU_BUILD_LUA)
|
ENDIF(EQEMU_BUILD_LUA)
|
||||||
|
|
||||||
|
OPTION(EQEMU_USE_MAP_MMFS "Create and use Zone Map MMF files." OFF)
|
||||||
|
IF(EQEMU_USE_MAP_MMFS)
|
||||||
|
ADD_DEFINITIONS(-DUSE_MAP_MMFS)
|
||||||
|
ENDIF(EQEMU_USE_MAP_MMFS)
|
||||||
|
|
||||||
SET(EQEMU_MAP_DIR "./Maps" CACHE STRING "The dir that maps, water maps, and paths are located in.")
|
SET(EQEMU_MAP_DIR "./Maps" CACHE STRING "The dir that maps, water maps, and paths are located in.")
|
||||||
|
|
||||||
ADD_DEFINITIONS(-DEQDEBUG=${EQEMU_DEBUG_LEVEL})
|
ADD_DEFINITIONS(-DEQDEBUG=${EQEMU_DEBUG_LEVEL})
|
||||||
|
|||||||
@@ -1,53 +1,59 @@
|
|||||||
EQEmu
|
# EQEmulator Core Server
|
||||||
===
|
|Travis CI (Linux)|Appveyor (Windows) |
|
||||||
|
|:---:|:---:|
|
||||||
|
|[](https://travis-ci.org/EQEmu/Server) |[](https://ci.appveyor.com/project/KimLS/server/branch/master) |
|
||||||
|
|
||||||
[](https://travis-ci.org/EQEmu/Server)
|
***
|
||||||
|
|
||||||
Overview
|
**EQEmulator is a custom completely from-scratch open source server implementation for EverQuest built mostly on C++**
|
||||||
---
|
* MySQL/MariaDB is used as the database engine (over 200+ tables)
|
||||||
|
* Perl and LUA are both supported scripting languages for NPC/Player/Quest oriented events
|
||||||
|
* Open source database (Project EQ) has content up to expansion GoD (included in server installs)
|
||||||
|
* Game server environments and databases can be heavily customized to create all new experiences
|
||||||
|
* Hundreds of Quests/events created and maintained by Project EQ
|
||||||
|
|
||||||
EQEmu is a custom server implementation for EverQuest
|
## Server Installs
|
||||||
|
||Windows|Linux|
|
||||||
|
|:---:|:---:|:---:|
|
||||||
|
|**Install Count**|||
|
||||||
|
### > Windows
|
||||||
|
* [Easy Install](http://wiki.eqemulator.org/p?Akkas_PEQ_Server_Installer&frm=Main#from-scratch-installation-instructions-windows)
|
||||||
|
* [Advanced Setup](http://wiki.eqemulator.org/p?Complete_Windows-based_Server_Setup_Guide)
|
||||||
|
|
||||||
Dependencies
|
### > Debian/Ubuntu
|
||||||
---
|
|
||||||
|
|
||||||
For Windows: http://eqemu.github.io
|
> wget --no-check-certificate https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/linux_installer/install.sh -O install.sh && chmod 755 install.sh && ./install.sh
|
||||||
|
|
||||||
Login Server dependencies for Windows/Linux/OSX: http://eqemu.github.io
|
### > CentOS/Fedora
|
||||||
|
|
||||||
For Debian based distros (adjust to your local flavor):
|
> curl -O https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/linux_installer/install.sh install.sh && chmod 755 install.sh && ./install.sh
|
||||||
|
|
||||||
- libmysqlclient-dev
|
## Supported Clients
|
||||||
- libperl-dev
|
|
||||||
- liblua5.1-0-dev (5.2 should work as well)
|
|
||||||
- libboost-dev
|
|
||||||
|
|
||||||
Further instructions on building the source can be found on the
|
|Titanium Edition|Secrets of Faydwer|Seeds of Destruction|Underfoot|Rain of Fear|
|
||||||
[wiki](http://wiki.eqemulator.org/i?M=Wiki).
|
|:---:|:---:|:---:|:---:|:---:|
|
||||||
|
|<img src="http://i.imgur.com/hrwDxoM.jpg" height="150">|<img src="http://i.imgur.com/cRDW5tn.png" height="150">|<img src="http://i.imgur.com/V48kuVn.jpg" height="150">|<img src="http://i.imgur.com/IJQ0XMa.jpg" height="150">|<img src="http://i.imgur.com/OMpHkKa.png" height="100">|
|
||||||
|
|
||||||
Bug reports
|
## Bug Reports <img src="http://i.imgur.com/daf1Vjw.png" height="20">
|
||||||
---
|
* Please use the [issue tracker](https://github.com/EQEmu/Server/issues) provided by GitHub to send us bug
|
||||||
|
|
||||||
Please use the [issue tracker](https://github.com/EQEmu/Server/issues) provided by GitHub to send us bug
|
|
||||||
reports or feature requests.
|
reports or feature requests.
|
||||||
|
* The [EQEmu Forums](http://www.eqemulator.org/forums/) are also a place to submit and get help with bugs.
|
||||||
|
|
||||||
The [EQEmu Forums](http://www.eqemulator.org/forums/) also have forums to submit
|
## Contributions <img src="http://image.flaticon.com/icons/png/512/25/25231.png" width="20">
|
||||||
bugs/get help with bugs.
|
|
||||||
|
|
||||||
Contributions
|
* The preferred way to contribute is to fork the repo and submit a pull request on
|
||||||
---
|
|
||||||
|
|
||||||
The preferred way to contribute is to fork the repo and submit a pull request on
|
|
||||||
GitHub. If you need help with your changes, you can always post on the forums or
|
GitHub. If you need help with your changes, you can always post on the forums or
|
||||||
try IRC. You can also post unified diffs (`git diff` should do the trick) on the
|
try Discord. You can also post unified diffs (`git diff` should do the trick) on the
|
||||||
[Server Code Submissions](http://www.eqemulator.org/forums/forumdisplay.php?f=669)
|
[Server Code Submissions](http://www.eqemulator.org/forums/forumdisplay.php?f=669)
|
||||||
forum, although pull requests will be much quicker and easier on all parties.
|
forum, although pull requests will be much quicker and easier on all parties.
|
||||||
|
|
||||||
Contact
|
## Contact <img src="http://gamerescape.com/wp-content/uploads/2015/06/discord.png" height="20">
|
||||||
---
|
|
||||||
- **User IRC Channel**: `#eqemu` on `irc.eqemulator.net`
|
|
||||||
- **Developer IRC Channel**: `#eqemucoders` on `irc.eqemulator.net`
|
|
||||||
|
|
||||||
|
- Discord Channel: https://discord.gg/QHsm7CD
|
||||||
|
- **User Discord Channel**: `#general`
|
||||||
|
- **Developer Discord Channel**: `#eqemucoders`
|
||||||
|
|
||||||
|
Resources
|
||||||
|
---
|
||||||
- [EQEmulator Forums](http://www.eqemulator.org/forums)
|
- [EQEmulator Forums](http://www.eqemulator.org/forums)
|
||||||
- [EQEmulator Wiki](http://wiki.eqemulator.org/i?M=Wiki)
|
- [EQEmulator Wiki](http://wiki.eqemulator.org/i?M=Wiki)
|
||||||
|
|
||||||
|
|||||||
+471
-134
File diff suppressed because it is too large
Load Diff
+14
-24
@@ -3,7 +3,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
|||||||
SET(common_sources
|
SET(common_sources
|
||||||
base_packet.cpp
|
base_packet.cpp
|
||||||
classes.cpp
|
classes.cpp
|
||||||
client_version.cpp
|
|
||||||
condition.cpp
|
condition.cpp
|
||||||
crash.cpp
|
crash.cpp
|
||||||
crc16.cpp
|
crc16.cpp
|
||||||
@@ -19,6 +18,7 @@ SET(common_sources
|
|||||||
emu_opcodes.cpp
|
emu_opcodes.cpp
|
||||||
emu_tcp_connection.cpp
|
emu_tcp_connection.cpp
|
||||||
emu_tcp_server.cpp
|
emu_tcp_server.cpp
|
||||||
|
emu_versions.cpp
|
||||||
eqdb.cpp
|
eqdb.cpp
|
||||||
eqdb_res.cpp
|
eqdb_res.cpp
|
||||||
eqemu_exception.cpp
|
eqemu_exception.cpp
|
||||||
@@ -35,12 +35,14 @@ SET(common_sources
|
|||||||
faction.cpp
|
faction.cpp
|
||||||
guild_base.cpp
|
guild_base.cpp
|
||||||
guilds.cpp
|
guilds.cpp
|
||||||
inventory_version.cpp
|
inventory_profile.cpp
|
||||||
|
inventory_slot.cpp
|
||||||
ipc_mutex.cpp
|
ipc_mutex.cpp
|
||||||
item.cpp
|
item_data.cpp
|
||||||
item_struct.cpp
|
item_instance.cpp
|
||||||
light_source.cpp
|
light_source.cpp
|
||||||
md5.cpp
|
md5.cpp
|
||||||
|
memory_buffer.cpp
|
||||||
memory_mapped_file.cpp
|
memory_mapped_file.cpp
|
||||||
misc.cpp
|
misc.cpp
|
||||||
misc_functions.cpp
|
misc_functions.cpp
|
||||||
@@ -68,6 +70,7 @@ SET(common_sources
|
|||||||
struct_strategy.cpp
|
struct_strategy.cpp
|
||||||
tcp_connection.cpp
|
tcp_connection.cpp
|
||||||
tcp_server.cpp
|
tcp_server.cpp
|
||||||
|
textures.cpp
|
||||||
timeoutmgr.cpp
|
timeoutmgr.cpp
|
||||||
timer.cpp
|
timer.cpp
|
||||||
unix.cpp
|
unix.cpp
|
||||||
@@ -111,7 +114,6 @@ SET(common_headers
|
|||||||
base_data.h
|
base_data.h
|
||||||
bodytypes.h
|
bodytypes.h
|
||||||
classes.h
|
classes.h
|
||||||
client_version.h
|
|
||||||
condition.h
|
condition.h
|
||||||
crash.h
|
crash.h
|
||||||
crc16.h
|
crc16.h
|
||||||
@@ -127,6 +129,7 @@ SET(common_headers
|
|||||||
emu_oplist.h
|
emu_oplist.h
|
||||||
emu_tcp_connection.h
|
emu_tcp_connection.h
|
||||||
emu_tcp_server.h
|
emu_tcp_server.h
|
||||||
|
emu_versions.h
|
||||||
eq_constants.h
|
eq_constants.h
|
||||||
eq_packet_structs.h
|
eq_packet_structs.h
|
||||||
eqdb.h
|
eqdb.h
|
||||||
@@ -154,17 +157,19 @@ SET(common_headers
|
|||||||
global_define.h
|
global_define.h
|
||||||
guild_base.h
|
guild_base.h
|
||||||
guilds.h
|
guilds.h
|
||||||
inventory_version.h
|
inventory_profile.h
|
||||||
|
inventory_slot.h
|
||||||
ipc_mutex.h
|
ipc_mutex.h
|
||||||
item.h
|
item_data.h
|
||||||
item_fieldlist.h
|
item_fieldlist.h
|
||||||
item_struct.h
|
item_instance.h
|
||||||
languages.h
|
languages.h
|
||||||
light_source.h
|
light_source.h
|
||||||
linked_list.h
|
linked_list.h
|
||||||
loottable.h
|
loottable.h
|
||||||
mail_oplist.h
|
mail_oplist.h
|
||||||
md5.h
|
md5.h
|
||||||
|
memory_buffer.h
|
||||||
memory_mapped_file.h
|
memory_mapped_file.h
|
||||||
misc.h
|
misc.h
|
||||||
misc_functions.h
|
misc_functions.h
|
||||||
@@ -199,6 +204,7 @@ SET(common_headers
|
|||||||
tcp_basic_server.h
|
tcp_basic_server.h
|
||||||
tcp_connection.h
|
tcp_connection.h
|
||||||
tcp_server.h
|
tcp_server.h
|
||||||
|
textures.h
|
||||||
timeoutmgr.h
|
timeoutmgr.h
|
||||||
timer.h
|
timer.h
|
||||||
types.h
|
types.h
|
||||||
@@ -210,37 +216,29 @@ SET(common_headers
|
|||||||
zone_numbers.h
|
zone_numbers.h
|
||||||
patches/patches.h
|
patches/patches.h
|
||||||
patches/sod.h
|
patches/sod.h
|
||||||
# patches/sod_itemfields.h
|
|
||||||
patches/sod_limits.h
|
patches/sod_limits.h
|
||||||
patches/sod_ops.h
|
patches/sod_ops.h
|
||||||
patches/sod_structs.h
|
patches/sod_structs.h
|
||||||
patches/sof.h
|
patches/sof.h
|
||||||
# patches/sof_itemfields.h
|
|
||||||
patches/sof_limits.h
|
patches/sof_limits.h
|
||||||
# patches/sof_opcode_list.h
|
|
||||||
patches/sof_ops.h
|
patches/sof_ops.h
|
||||||
patches/sof_structs.h
|
patches/sof_structs.h
|
||||||
patches/ss_declare.h
|
patches/ss_declare.h
|
||||||
patches/ss_define.h
|
patches/ss_define.h
|
||||||
patches/ss_register.h
|
patches/ss_register.h
|
||||||
patches/rof.h
|
patches/rof.h
|
||||||
# patches/rof_itemfields.h
|
|
||||||
patches/rof_limits.h
|
patches/rof_limits.h
|
||||||
patches/rof_ops.h
|
patches/rof_ops.h
|
||||||
patches/rof_structs.h
|
patches/rof_structs.h
|
||||||
patches/rof2.h
|
patches/rof2.h
|
||||||
# patches/rof2_itemfields.h
|
|
||||||
patches/rof2_limits.h
|
patches/rof2_limits.h
|
||||||
patches/rof2_ops.h
|
patches/rof2_ops.h
|
||||||
patches/rof2_structs.h
|
patches/rof2_structs.h
|
||||||
patches/titanium.h
|
patches/titanium.h
|
||||||
# patches/titanium_itemfields_a.h
|
|
||||||
# patches/titanium_itemfields_b.h
|
|
||||||
patches/titanium_limits.h
|
patches/titanium_limits.h
|
||||||
patches/titanium_ops.h
|
patches/titanium_ops.h
|
||||||
patches/titanium_structs.h
|
patches/titanium_structs.h
|
||||||
patches/uf.h
|
patches/uf.h
|
||||||
# patches/uf_itemfields.h
|
|
||||||
patches/uf_limits.h
|
patches/uf_limits.h
|
||||||
patches/uf_ops.h
|
patches/uf_ops.h
|
||||||
patches/uf_structs.h
|
patches/uf_structs.h
|
||||||
@@ -264,37 +262,29 @@ SET(common_headers
|
|||||||
SOURCE_GROUP(Patches FILES
|
SOURCE_GROUP(Patches FILES
|
||||||
patches/patches.h
|
patches/patches.h
|
||||||
patches/sod.h
|
patches/sod.h
|
||||||
# patches/sod_itemfields.h
|
|
||||||
patches/sod_limits.h
|
patches/sod_limits.h
|
||||||
patches/sod_ops.h
|
patches/sod_ops.h
|
||||||
patches/sod_structs.h
|
patches/sod_structs.h
|
||||||
patches/sof.h
|
patches/sof.h
|
||||||
# patches/sof_itemfields.h
|
|
||||||
patches/sof_limits.h
|
patches/sof_limits.h
|
||||||
# patches/sof_opcode_list.h
|
|
||||||
patches/sof_ops.h
|
patches/sof_ops.h
|
||||||
patches/sof_structs.h
|
patches/sof_structs.h
|
||||||
patches/ss_declare.h
|
patches/ss_declare.h
|
||||||
patches/ss_define.h
|
patches/ss_define.h
|
||||||
patches/ss_register.h
|
patches/ss_register.h
|
||||||
patches/rof.h
|
patches/rof.h
|
||||||
# patches/rof_itemfields.h
|
|
||||||
patches/rof_limits.h
|
patches/rof_limits.h
|
||||||
patches/rof_ops.h
|
patches/rof_ops.h
|
||||||
patches/rof_structs.h
|
patches/rof_structs.h
|
||||||
patches/rof2.h
|
patches/rof2.h
|
||||||
# patches/rof2_itemfields.h
|
|
||||||
patches/rof2_limits.h
|
patches/rof2_limits.h
|
||||||
patches/rof2_ops.h
|
patches/rof2_ops.h
|
||||||
patches/rof2_structs.h
|
patches/rof2_structs.h
|
||||||
patches/titanium.h
|
patches/titanium.h
|
||||||
# patches/titanium_itemfields_a.h
|
|
||||||
# patches/titanium_itemfields_b.h
|
|
||||||
patches/titanium_limits.h
|
patches/titanium_limits.h
|
||||||
patches/titanium_ops.h
|
patches/titanium_ops.h
|
||||||
patches/titanium_structs.h
|
patches/titanium_structs.h
|
||||||
patches/uf.h
|
patches/uf.h
|
||||||
# patches/uf_itemfields.h
|
|
||||||
patches/uf_limits.h
|
patches/uf_limits.h
|
||||||
patches/uf_ops.h
|
patches/uf_ops.h
|
||||||
patches/uf_structs.h
|
patches/uf_structs.h
|
||||||
|
|||||||
@@ -1,128 +0,0 @@
|
|||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
|
|
||||||
Copyright (C) 2001-2016 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
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "client_version.h"
|
|
||||||
|
|
||||||
|
|
||||||
bool EQEmu::versions::IsValidClientVersion(ClientVersion client_version)
|
|
||||||
{
|
|
||||||
if (client_version <= ClientVersion::Unknown || client_version > LastClientVersion)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
EQEmu::versions::ClientVersion EQEmu::versions::ValidateClientVersion(ClientVersion client_version)
|
|
||||||
{
|
|
||||||
if (client_version <= ClientVersion::Unknown || client_version > LastClientVersion)
|
|
||||||
return ClientVersion::Unknown;
|
|
||||||
|
|
||||||
return client_version;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char* EQEmu::versions::ClientVersionName(ClientVersion client_version)
|
|
||||||
{
|
|
||||||
switch (client_version) {
|
|
||||||
case ClientVersion::Unknown:
|
|
||||||
return "Unknown Version";
|
|
||||||
case ClientVersion::Client62:
|
|
||||||
return "Client 6.2";
|
|
||||||
case ClientVersion::Titanium:
|
|
||||||
return "Titanium";
|
|
||||||
case ClientVersion::SoF:
|
|
||||||
return "SoF";
|
|
||||||
case ClientVersion::SoD:
|
|
||||||
return "SoD";
|
|
||||||
case ClientVersion::UF:
|
|
||||||
return "UF";
|
|
||||||
case ClientVersion::RoF:
|
|
||||||
return "RoF";
|
|
||||||
case ClientVersion::RoF2:
|
|
||||||
return "RoF2";
|
|
||||||
default:
|
|
||||||
return "Invalid Version";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32 EQEmu::versions::ConvertClientVersionToClientVersionBit(ClientVersion client_version)
|
|
||||||
{
|
|
||||||
switch (client_version) {
|
|
||||||
case ClientVersion::Unknown:
|
|
||||||
case ClientVersion::Client62:
|
|
||||||
return bit_Unknown;
|
|
||||||
case ClientVersion::Titanium:
|
|
||||||
return bit_Titanium;
|
|
||||||
case ClientVersion::SoF:
|
|
||||||
return bit_SoF;
|
|
||||||
case ClientVersion::SoD:
|
|
||||||
return bit_SoD;
|
|
||||||
case ClientVersion::UF:
|
|
||||||
return bit_UF;
|
|
||||||
case ClientVersion::RoF:
|
|
||||||
return bit_RoF;
|
|
||||||
case ClientVersion::RoF2:
|
|
||||||
return bit_RoF2;
|
|
||||||
default:
|
|
||||||
return bit_Unknown;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
EQEmu::versions::ClientVersion EQEmu::versions::ConvertClientVersionBitToClientVersion(uint32 client_version_bit)
|
|
||||||
{
|
|
||||||
switch (client_version_bit) {
|
|
||||||
case (uint32)static_cast<unsigned int>(ClientVersion::Unknown) :
|
|
||||||
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::Client62) - 1)) :
|
|
||||||
return ClientVersion::Unknown;
|
|
||||||
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::Titanium) - 1)) :
|
|
||||||
return ClientVersion::Titanium;
|
|
||||||
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::SoF) - 1)) :
|
|
||||||
return ClientVersion::SoF;
|
|
||||||
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::SoD) - 1)) :
|
|
||||||
return ClientVersion::SoD;
|
|
||||||
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::UF) - 1)) :
|
|
||||||
return ClientVersion::UF;
|
|
||||||
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::RoF) - 1)) :
|
|
||||||
return ClientVersion::RoF;
|
|
||||||
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::RoF2) - 1)) :
|
|
||||||
return ClientVersion::RoF2;
|
|
||||||
default:
|
|
||||||
return ClientVersion::Unknown;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32 EQEmu::versions::ConvertClientVersionToExpansion(ClientVersion client_version)
|
|
||||||
{
|
|
||||||
switch (client_version) {
|
|
||||||
case ClientVersion::Unknown:
|
|
||||||
case ClientVersion::Client62:
|
|
||||||
case ClientVersion::Titanium:
|
|
||||||
return 0x000007FFU;
|
|
||||||
case ClientVersion::SoF:
|
|
||||||
return 0x00007FFFU;
|
|
||||||
case ClientVersion::SoD:
|
|
||||||
return 0x0000FFFFU;
|
|
||||||
case ClientVersion::UF:
|
|
||||||
return 0x0001FFFFU;
|
|
||||||
case ClientVersion::RoF:
|
|
||||||
case ClientVersion::RoF2:
|
|
||||||
return 0x000FFFFFU;
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
|
|
||||||
Copyright (C) 2001-2016 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_CLIENT_VERSION_H
|
|
||||||
#define COMMON_CLIENT_VERSION_H
|
|
||||||
|
|
||||||
#include "types.h"
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
|
|
||||||
namespace EQEmu
|
|
||||||
{
|
|
||||||
namespace versions {
|
|
||||||
enum class ClientVersion {
|
|
||||||
Unknown = 0,
|
|
||||||
Client62, // Build: 'Aug 4 2005 15:40:59'
|
|
||||||
Titanium, // Build: 'Oct 31 2005 10:33:37'
|
|
||||||
SoF, // Build: 'Sep 7 2007 09:11:49'
|
|
||||||
SoD, // Build: 'Dec 19 2008 15:22:49'
|
|
||||||
UF, // Build: 'Jun 8 2010 16:44:32'
|
|
||||||
RoF, // Build: 'Dec 10 2012 17:35:44'
|
|
||||||
RoF2 // Build: 'May 10 2013 23:30:08'
|
|
||||||
};
|
|
||||||
|
|
||||||
enum ClientVersionBit : uint32 {
|
|
||||||
bit_Unknown = 0,
|
|
||||||
bit_Client62 = 0x00000001, // unsupported (placeholder for scripts)
|
|
||||||
bit_Titanium = 0x00000002,
|
|
||||||
bit_SoF = 0x00000004,
|
|
||||||
bit_SoD = 0x00000008,
|
|
||||||
bit_UF = 0x00000010,
|
|
||||||
bit_RoF = 0x00000020,
|
|
||||||
bit_RoF2 = 0x00000040,
|
|
||||||
bit_TitaniumAndEarlier = 0x00000003,
|
|
||||||
bit_SoFAndEarlier = 0x00000007,
|
|
||||||
bit_SoDAndEarlier = 0x0000000F,
|
|
||||||
bit_UFAndEarlier = 0x0000001F,
|
|
||||||
bit_RoFAndEarlier = 0x0000003F,
|
|
||||||
bit_SoFAndLater = 0xFFFFFFFC,
|
|
||||||
bit_SoDAndLater = 0xFFFFFFF8,
|
|
||||||
bit_UFAndLater = 0xFFFFFFF0,
|
|
||||||
bit_RoFAndLater = 0xFFFFFFE0,
|
|
||||||
bit_RoF2AndLater = 0xFFFFFFC0,
|
|
||||||
bit_AllClients = 0xFFFFFFFF
|
|
||||||
};
|
|
||||||
|
|
||||||
static const ClientVersion LastClientVersion = ClientVersion::RoF2;
|
|
||||||
static const size_t ClientVersionCount = (static_cast<size_t>(LastClientVersion) + 1);
|
|
||||||
|
|
||||||
extern bool IsValidClientVersion(ClientVersion client_version);
|
|
||||||
extern ClientVersion ValidateClientVersion(ClientVersion client_version);
|
|
||||||
extern const char* ClientVersionName(ClientVersion client_version);
|
|
||||||
extern uint32 ConvertClientVersionToClientVersionBit(ClientVersion client_version);
|
|
||||||
extern ClientVersion ConvertClientVersionBitToClientVersion(uint32 client_version_bit);
|
|
||||||
extern uint32 ConvertClientVersionToExpansion(ClientVersion client_version);
|
|
||||||
|
|
||||||
} /*versions*/
|
|
||||||
|
|
||||||
} /*EQEmu*/
|
|
||||||
|
|
||||||
#endif /*COMMON_CLIENT_VERSION_H*/
|
|
||||||
+23
-16
@@ -1,5 +1,6 @@
|
|||||||
/* EQEMu: Everquest Server Emulator
|
/* EQEMu: Everquest Server Emulator
|
||||||
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -15,34 +16,40 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COMMON_DATA_VERIFICATION_H
|
#ifndef COMMON_DATA_VERIFICATION_H
|
||||||
#define COMMON_DATA_VERIFICATION_H
|
#define COMMON_DATA_VERIFICATION_H
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
||||||
namespace EQEmu
|
namespace EQEmu
|
||||||
{
|
{
|
||||||
|
template <typename T>
|
||||||
template <typename T>
|
T Clamp(const T& value, const T& lower, const T& upper) {
|
||||||
T Clamp(const T& value, const T& lower, const T& upper) {
|
|
||||||
return std::max(lower, std::min(value, upper));
|
return std::max(lower, std::min(value, upper));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T ClampLower(const T& value, const T& lower) {
|
T ClampLower(const T& value, const T& lower) {
|
||||||
return std::max(lower, value);
|
return std::max(lower, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T ClampUpper(const T& value, const T& upper) {
|
T ClampUpper(const T& value, const T& upper) {
|
||||||
return std::min(value, upper);
|
return std::min(value, upper);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
bool ValueWithin(const T& value, const T& lower, const T& upper) {
|
bool ValueWithin(const T& value, const T& lower, const T& upper) {
|
||||||
return value >= lower && value <= upper;
|
return value >= lower && value <= upper;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
template <typename T1, typename T2, typename T3>
|
||||||
|
bool ValueWithin(const T1& value, const T2& lower, const T3& upper) {
|
||||||
|
return value >= (T1)lower && value <= (T1)upper;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
} /*EQEmu*/
|
||||||
|
|
||||||
|
#endif /*COMMON_DATA_VERIFICATION_H*/
|
||||||
|
|||||||
+38
-6
@@ -307,6 +307,7 @@ bool Database::DeleteCharacter(char *name) {
|
|||||||
query = StringFormat("DELETE FROM `quest_globals` WHERE `charid` = '%d'", charid); QueryDatabase(query);
|
query = StringFormat("DELETE FROM `quest_globals` WHERE `charid` = '%d'", charid); QueryDatabase(query);
|
||||||
query = StringFormat("DELETE FROM `character_activities` WHERE `charid` = '%d'", charid); QueryDatabase(query);
|
query = StringFormat("DELETE FROM `character_activities` WHERE `charid` = '%d'", charid); QueryDatabase(query);
|
||||||
query = StringFormat("DELETE FROM `character_enabledtasks` WHERE `charid` = '%d'", charid); QueryDatabase(query);
|
query = StringFormat("DELETE FROM `character_enabledtasks` WHERE `charid` = '%d'", charid); QueryDatabase(query);
|
||||||
|
query = StringFormat("DELETE FROM `character_tasks` WHERE `charid` = '%d'", charid); QueryDatabase(query);
|
||||||
query = StringFormat("DELETE FROM `completed_tasks` WHERE `charid` = '%d'", charid); QueryDatabase(query);
|
query = StringFormat("DELETE FROM `completed_tasks` WHERE `charid` = '%d'", charid); QueryDatabase(query);
|
||||||
query = StringFormat("DELETE FROM `friends` WHERE `charid` = '%d'", charid); QueryDatabase(query);
|
query = StringFormat("DELETE FROM `friends` WHERE `charid` = '%d'", charid); QueryDatabase(query);
|
||||||
query = StringFormat("DELETE FROM `mail` WHERE `charid` = '%d'", charid); QueryDatabase(query);
|
query = StringFormat("DELETE FROM `mail` WHERE `charid` = '%d'", charid); QueryDatabase(query);
|
||||||
@@ -627,9 +628,9 @@ bool Database::SaveCharacterCreate(uint32 character_id, uint32 account_id, Playe
|
|||||||
/* Save Bind Points */
|
/* Save Bind Points */
|
||||||
query = StringFormat("REPLACE INTO `character_bind` (id, zone_id, instance_id, x, y, z, heading, slot)"
|
query = StringFormat("REPLACE INTO `character_bind` (id, zone_id, instance_id, x, y, z, heading, slot)"
|
||||||
" VALUES (%u, %u, %u, %f, %f, %f, %f, %i), "
|
" VALUES (%u, %u, %u, %f, %f, %f, %f, %i), "
|
||||||
"(%u, %u, %u, %f, %f, %f, %f, %i), ",
|
"(%u, %u, %u, %f, %f, %f, %f, %i), "
|
||||||
"(%u, %u, %u, %f, %f, %f, %f, %i), ",
|
"(%u, %u, %u, %f, %f, %f, %f, %i), "
|
||||||
"(%u, %u, %u, %f, %f, %f, %f, %i), ",
|
"(%u, %u, %u, %f, %f, %f, %f, %i), "
|
||||||
"(%u, %u, %u, %f, %f, %f, %f, %i)",
|
"(%u, %u, %u, %f, %f, %f, %f, %i)",
|
||||||
character_id, pp->binds[0].zoneId, 0, pp->binds[0].x, pp->binds[0].y, pp->binds[0].z, pp->binds[0].heading, 0,
|
character_id, pp->binds[0].zoneId, 0, pp->binds[0].x, pp->binds[0].y, pp->binds[0].z, pp->binds[0].heading, 0,
|
||||||
character_id, pp->binds[1].zoneId, 0, pp->binds[1].x, pp->binds[1].y, pp->binds[1].z, pp->binds[1].heading, 1,
|
character_id, pp->binds[1].zoneId, 0, pp->binds[1].x, pp->binds[1].y, pp->binds[1].z, pp->binds[1].heading, 1,
|
||||||
@@ -638,6 +639,13 @@ bool Database::SaveCharacterCreate(uint32 character_id, uint32 account_id, Playe
|
|||||||
character_id, pp->binds[4].zoneId, 0, pp->binds[4].x, pp->binds[4].y, pp->binds[4].z, pp->binds[4].heading, 4
|
character_id, pp->binds[4].zoneId, 0, pp->binds[4].x, pp->binds[4].y, pp->binds[4].z, pp->binds[4].heading, 4
|
||||||
); results = QueryDatabase(query);
|
); results = QueryDatabase(query);
|
||||||
|
|
||||||
|
/* HoTT Ability */
|
||||||
|
if(RuleB(Character, GrantHoTTOnCreate))
|
||||||
|
{
|
||||||
|
query = StringFormat("INSERT INTO `character_leadership_abilities` (id, slot, rank) VALUES (%u, %i, %i)", character_id, 14, 1);
|
||||||
|
results = QueryDatabase(query);
|
||||||
|
}
|
||||||
|
|
||||||
/* Save Skills */
|
/* Save Skills */
|
||||||
int firstquery = 0;
|
int firstquery = 0;
|
||||||
for (int i = 0; i < MAX_PP_SKILL; i++){
|
for (int i = 0; i < MAX_PP_SKILL; i++){
|
||||||
@@ -672,7 +680,7 @@ bool Database::SaveCharacterCreate(uint32 character_id, uint32 account_id, Playe
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* This only for new Character creation storing */
|
/* This only for new Character creation storing */
|
||||||
bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inventory* inv) {
|
bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, EQEmu::InventoryProfile* inv) {
|
||||||
uint32 charid = 0;
|
uint32 charid = 0;
|
||||||
char zone[50];
|
char zone[50];
|
||||||
float x, y, z;
|
float x, y, z;
|
||||||
@@ -701,7 +709,7 @@ bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inven
|
|||||||
/* Insert starting inventory... */
|
/* Insert starting inventory... */
|
||||||
std::string invquery;
|
std::string invquery;
|
||||||
for (int16 i = EQEmu::legacy::EQUIPMENT_BEGIN; i <= EQEmu::legacy::BANK_BAGS_END;) {
|
for (int16 i = EQEmu::legacy::EQUIPMENT_BEGIN; i <= EQEmu::legacy::BANK_BAGS_END;) {
|
||||||
const ItemInst* newinv = inv->GetItem(i);
|
const EQEmu::ItemInstance* newinv = inv->GetItem(i);
|
||||||
if (newinv) {
|
if (newinv) {
|
||||||
invquery = StringFormat("INSERT INTO `inventory` (charid, slotid, itemid, charges, color) VALUES (%u, %i, %u, %i, %u)",
|
invquery = StringFormat("INSERT INTO `inventory` (charid, slotid, itemid, charges, color) VALUES (%u, %i, %u, %i, %u)",
|
||||||
charid, i, newinv->GetItem()->ID, newinv->GetCharges(), newinv->GetColor());
|
charid, i, newinv->GetItem()->ID, newinv->GetCharges(), newinv->GetColor());
|
||||||
@@ -709,7 +717,7 @@ bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inven
|
|||||||
auto results = QueryDatabase(invquery);
|
auto results = QueryDatabase(invquery);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == EQEmu::legacy::SlotCursor) {
|
if (i == EQEmu::inventory::slotCursor) {
|
||||||
i = EQEmu::legacy::GENERAL_BAGS_BEGIN;
|
i = EQEmu::legacy::GENERAL_BAGS_BEGIN;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -2136,3 +2144,27 @@ bool Database::SaveTime(int8 minute, int8 hour, int8 day, int8 month, int16 year
|
|||||||
return results.Success();
|
return results.Success();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Database::GetIPExemption(std::string account_ip) {
|
||||||
|
std::string query = StringFormat("SELECT `exemption_amount` FROM `ip_exemptions` WHERE `exemption_ip` = '%s'", account_ip.c_str());
|
||||||
|
auto results = QueryDatabase(query);
|
||||||
|
|
||||||
|
if (results.Success() && results.RowCount() > 0) {
|
||||||
|
auto row = results.begin();
|
||||||
|
return atoi(row[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return RuleI(World, MaxClientsPerIP);
|
||||||
|
}
|
||||||
|
|
||||||
|
int Database::GetInstanceID(uint32 char_id, uint32 zone_id) {
|
||||||
|
std::string query = StringFormat("SELECT instance_list.id FROM instance_list INNER JOIN instance_list_player ON instance_list.id = instance_list_player.id WHERE instance_list.zone = '%i' AND instance_list_player.charid = '%i'", zone_id, char_id);
|
||||||
|
auto results = QueryDatabase(query);
|
||||||
|
|
||||||
|
if (results.Success() && results.RowCount() > 0) {
|
||||||
|
auto row = results.begin();
|
||||||
|
return atoi(row[0]);;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|||||||
+10
-2
@@ -37,10 +37,14 @@
|
|||||||
//atoi is not uint32 or uint32 safe!!!!
|
//atoi is not uint32 or uint32 safe!!!!
|
||||||
#define atoul(str) strtoul(str, nullptr, 10)
|
#define atoul(str) strtoul(str, nullptr, 10)
|
||||||
|
|
||||||
class Inventory;
|
|
||||||
class MySQLRequestResult;
|
class MySQLRequestResult;
|
||||||
class Client;
|
class Client;
|
||||||
|
|
||||||
|
namespace EQEmu
|
||||||
|
{
|
||||||
|
class InventoryProfile;
|
||||||
|
}
|
||||||
|
|
||||||
struct EventLogDetails_Struct {
|
struct EventLogDetails_Struct {
|
||||||
uint32 id;
|
uint32 id;
|
||||||
char accountname[64];
|
char accountname[64];
|
||||||
@@ -109,7 +113,7 @@ public:
|
|||||||
bool SaveCharacterCreate(uint32 character_id, uint32 account_id, PlayerProfile_Struct* pp);
|
bool SaveCharacterCreate(uint32 character_id, uint32 account_id, PlayerProfile_Struct* pp);
|
||||||
bool SetHackerFlag(const char* accountname, const char* charactername, const char* hacked);
|
bool SetHackerFlag(const char* accountname, const char* charactername, const char* hacked);
|
||||||
bool SetMQDetectionFlag(const char* accountname, const char* charactername, const char* hacked, const char* zone);
|
bool SetMQDetectionFlag(const char* accountname, const char* charactername, const char* hacked, const char* zone);
|
||||||
bool StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inventory* inv);
|
bool StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, EQEmu::InventoryProfile* inv);
|
||||||
bool UpdateName(const char* oldname, const char* newname);
|
bool UpdateName(const char* oldname, const char* newname);
|
||||||
|
|
||||||
/* General Information Queries */
|
/* General Information Queries */
|
||||||
@@ -187,6 +191,10 @@ public:
|
|||||||
void GetAccountFromID(uint32 id, char* oAccountName, int16* oStatus);
|
void GetAccountFromID(uint32 id, char* oAccountName, int16* oStatus);
|
||||||
void SetAgreementFlag(uint32 acctid);
|
void SetAgreementFlag(uint32 acctid);
|
||||||
|
|
||||||
|
int GetIPExemption(std::string account_ip);
|
||||||
|
|
||||||
|
int GetInstanceID(uint32 char_id, uint32 zone_id);
|
||||||
|
|
||||||
|
|
||||||
/* Groups */
|
/* Groups */
|
||||||
|
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ namespace Convert {
|
|||||||
/*002*/ uint32 HP;
|
/*002*/ uint32 HP;
|
||||||
/*006*/ uint32 Mana;
|
/*006*/ uint32 Mana;
|
||||||
/*010*/ Convert::SpellBuff_Struct Buffs[BUFF_COUNT];
|
/*010*/ Convert::SpellBuff_Struct Buffs[BUFF_COUNT];
|
||||||
/*510*/ uint32 Items[EQEmu::legacy::MaterialCount];
|
/*510*/ uint32 Items[EQEmu::textures::materialCount];
|
||||||
/*546*/ char Name[64];
|
/*546*/ char Name[64];
|
||||||
/*610*/
|
/*610*/
|
||||||
};
|
};
|
||||||
@@ -227,9 +227,9 @@ namespace Convert {
|
|||||||
/*0304*/ uint8 ability_time_minutes;
|
/*0304*/ uint8 ability_time_minutes;
|
||||||
/*0305*/ uint8 ability_time_hours; //place holder
|
/*0305*/ uint8 ability_time_hours; //place holder
|
||||||
/*0306*/ uint8 unknown0306[6]; // @bp Spacer/Flag?
|
/*0306*/ uint8 unknown0306[6]; // @bp Spacer/Flag?
|
||||||
/*0312*/ uint32 item_material[EQEmu::legacy::MaterialCount]; // Item texture/material of worn/held items
|
/*0312*/ uint32 item_material[EQEmu::textures::materialCount]; // Item texture/material of worn/held items
|
||||||
/*0348*/ uint8 unknown0348[44];
|
/*0348*/ uint8 unknown0348[44];
|
||||||
/*0392*/ Convert::Color_Struct item_tint[EQEmu::legacy::MaterialCount];
|
/*0392*/ Convert::Color_Struct item_tint[EQEmu::textures::materialCount];
|
||||||
/*0428*/ Convert::AA_Array aa_array[MAX_PP_AA_ARRAY];
|
/*0428*/ Convert::AA_Array aa_array[MAX_PP_AA_ARRAY];
|
||||||
/*2348*/ float unknown2384; //seen ~128, ~47
|
/*2348*/ float unknown2384; //seen ~128, ~47
|
||||||
/*2352*/ char servername[32]; // length probably not right
|
/*2352*/ char servername[32]; // length probably not right
|
||||||
@@ -472,31 +472,18 @@ bool Database::CheckDatabaseConversions() {
|
|||||||
CheckDatabaseConvertPPDeblob();
|
CheckDatabaseConvertPPDeblob();
|
||||||
CheckDatabaseConvertCorpseDeblob();
|
CheckDatabaseConvertCorpseDeblob();
|
||||||
|
|
||||||
/* Fetch Automatic Upgrade Script */
|
/* Fetch EQEmu Server script */
|
||||||
if (!std::ifstream("eqemu_update.pl")){
|
if (!std::ifstream("eqemu_server.pl")){
|
||||||
std::cout << "Pulling down automatic database upgrade script..." << std::endl;
|
std::cout << "Pulling down automatic database upgrade script..." << std::endl;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
system("perl -MLWP::UserAgent -e \"require LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_proxy; my $response = $ua->get('https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/eqemu_update.pl'); if ($response->is_success){ open(FILE, '> eqemu_update.pl'); print FILE $response->decoded_content; close(FILE); }\"");
|
system("perl -MLWP::UserAgent -e \"require LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_proxy; my $response = $ua->get('https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/eqemu_server.pl'); if ($response->is_success){ open(FILE, '> eqemu_server.pl'); print FILE $response->decoded_content; close(FILE); }\"");
|
||||||
#else
|
#else
|
||||||
system("wget --no-check-certificate -O eqemu_update.pl https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/eqemu_update.pl");
|
system("wget --no-check-certificate -O eqemu_server.pl https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/eqemu_server.pl");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* Run EQEmu Server script (Checks for database updates) */
|
||||||
Automatic (Database) Upgrade Script
|
system("perl eqemu_server.pl ran_from_world");
|
||||||
Script: eqemu_update.pl V 1 - the number that world passes to the script will
|
|
||||||
force the script to check for a newer version to update itself with
|
|
||||||
eqemu_update.pl ran_from_world - won't bring up a menu if your database versions match
|
|
||||||
eqemu_update.pl - ran standalone will bring up a menu prompt
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Check for a new version of this script, the arg passed
|
|
||||||
would have to be higher than the copy they have downloaded
|
|
||||||
locally and they will re fetch */
|
|
||||||
system("perl eqemu_update.pl V 14");
|
|
||||||
|
|
||||||
/* Run Automatic Database Upgrade Script */
|
|
||||||
system("perl eqemu_update.pl ran_from_world");
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1416,7 +1403,7 @@ bool Database::CheckDatabaseConvertPPDeblob(){
|
|||||||
if (rquery != ""){ results = QueryDatabase(rquery); }
|
if (rquery != ""){ results = QueryDatabase(rquery); }
|
||||||
/* Run Material Color Convert */
|
/* Run Material Color Convert */
|
||||||
first_entry = 0; rquery = "";
|
first_entry = 0; rquery = "";
|
||||||
for (i = 0; i < EQEmu::legacy::MaterialCount; i++){
|
for (i = EQEmu::textures::textureBegin; i < EQEmu::textures::materialCount; i++){
|
||||||
if (pp->item_tint[i].color > 0){
|
if (pp->item_tint[i].color > 0){
|
||||||
if (first_entry != 1){
|
if (first_entry != 1){
|
||||||
rquery = StringFormat("REPLACE INTO `character_material` (id, slot, blue, green, red, use_tint, color) VALUES (%u, %u, %u, %u, %u, %u, %u)", character_id, i, pp->item_tint[i].rgb.blue, pp->item_tint[i].rgb.green, pp->item_tint[i].rgb.red, pp->item_tint[i].rgb.use_tint, pp->item_tint[i].color);
|
rquery = StringFormat("REPLACE INTO `character_material` (id, slot, blue, green, red, use_tint, color) VALUES (%u, %u, %u, %u, %u, %u, %u)", character_id, i, pp->item_tint[i].rgb.blue, pp->item_tint[i].rgb.green, pp->item_tint[i].rgb.red, pp->item_tint[i].rgb.use_tint, pp->item_tint[i].color);
|
||||||
|
|||||||
+109
-3
@@ -22,9 +22,7 @@
|
|||||||
|
|
||||||
#include "eq_limits.h"
|
#include "eq_limits.h"
|
||||||
#include "emu_legacy.h"
|
#include "emu_legacy.h"
|
||||||
#include "inventory_version.h"
|
#include "emu_versions.h"
|
||||||
//#include "deity.h"
|
|
||||||
//#include "say_link.h"
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
@@ -37,6 +35,79 @@ namespace EQEmu
|
|||||||
//using namespace RoF2::invbag;
|
//using namespace RoF2::invbag;
|
||||||
//using namespace RoF2::invaug;
|
//using namespace RoF2::invaug;
|
||||||
|
|
||||||
|
enum : int16 { typeInvalid = -1, slotInvalid = -1, containerInvalid = -1, socketInvalid = -1 }; // temporary
|
||||||
|
enum : int16 { typeBegin = 0, slotBegin = 0, containerBegin = 0, socketBegin = 0 }; // temporary
|
||||||
|
|
||||||
|
enum PossessionsSlots : int16 { // temporary
|
||||||
|
slotCharm = 0,
|
||||||
|
slotEar1,
|
||||||
|
slotHead,
|
||||||
|
slotFace,
|
||||||
|
slotEar2,
|
||||||
|
slotNeck, // 5
|
||||||
|
slotShoulders,
|
||||||
|
slotArms,
|
||||||
|
slotBack,
|
||||||
|
slotWrist1,
|
||||||
|
slotWrist2, // 10
|
||||||
|
slotRange,
|
||||||
|
slotHands,
|
||||||
|
slotPrimary,
|
||||||
|
slotSecondary,
|
||||||
|
slotFinger1, // 15
|
||||||
|
slotFinger2,
|
||||||
|
slotChest,
|
||||||
|
slotLegs,
|
||||||
|
slotFeet,
|
||||||
|
slotWaist, // 20
|
||||||
|
slotPowerSource = 9999,
|
||||||
|
slotAmmo = 21,
|
||||||
|
slotGeneral1,
|
||||||
|
slotGeneral2,
|
||||||
|
slotGeneral3,
|
||||||
|
slotGeneral4, // 25
|
||||||
|
slotGeneral5,
|
||||||
|
slotGeneral6,
|
||||||
|
slotGeneral7,
|
||||||
|
slotGeneral8,
|
||||||
|
slotCursor, // 30
|
||||||
|
slotCount
|
||||||
|
};
|
||||||
|
|
||||||
|
enum InventoryTypes : int16 { // temporary
|
||||||
|
typePossessions = 0,
|
||||||
|
typeBank,
|
||||||
|
typeSharedBank,
|
||||||
|
typeTrade,
|
||||||
|
typeWorld,
|
||||||
|
typeLimbo, // 5
|
||||||
|
typeTribute,
|
||||||
|
typeTrophyTribute,
|
||||||
|
typeGuildTribute,
|
||||||
|
typeMerchant,
|
||||||
|
typeDeleted, // 10
|
||||||
|
typeCorpse,
|
||||||
|
typeBazaar,
|
||||||
|
typeInspect,
|
||||||
|
typeRealEstate,
|
||||||
|
typeViewMODPC, // 15
|
||||||
|
typeViewMODBank,
|
||||||
|
typeViewMODSharedBank,
|
||||||
|
typeViewMODLimbo,
|
||||||
|
typeAltStorage,
|
||||||
|
typeArchived, // 20
|
||||||
|
typeMail,
|
||||||
|
typeGuildTrophyTribute,
|
||||||
|
typeKrono,
|
||||||
|
typeOther,
|
||||||
|
typeCount
|
||||||
|
};
|
||||||
|
|
||||||
|
static int16 SlotCount(int16 type_index) { return 0; } // temporary
|
||||||
|
|
||||||
|
const int16 ContainerCount = 10; // temporary
|
||||||
|
const int16 SocketCount = 6; // temporary
|
||||||
|
|
||||||
} /*inventory*/
|
} /*inventory*/
|
||||||
|
|
||||||
namespace constants {
|
namespace constants {
|
||||||
@@ -45,8 +116,43 @@ namespace EQEmu
|
|||||||
|
|
||||||
const size_t SayLinkBodySize = RoF2::constants::SayLinkBodySize;
|
const size_t SayLinkBodySize = RoF2::constants::SayLinkBodySize;
|
||||||
|
|
||||||
|
const int LongBuffs = RoF2::constants::LongBuffs;
|
||||||
|
const int ShortBuffs = RoF2::constants::ShortBuffs;
|
||||||
|
const int DiscBuffs = RoF2::constants::DiscBuffs;
|
||||||
|
const int TotalBuffs = RoF2::constants::TotalBuffs;
|
||||||
|
const int NPCBuffs = RoF2::constants::NPCBuffs;
|
||||||
|
const int PetBuffs = RoF2::constants::PetBuffs;
|
||||||
|
const int MercBuffs = RoF2::constants::MercBuffs;
|
||||||
|
|
||||||
} /*constants*/
|
} /*constants*/
|
||||||
|
|
||||||
|
enum class CastingSlot : uint32 {
|
||||||
|
Gem1 = 0,
|
||||||
|
Gem2 = 1,
|
||||||
|
Gem3 = 2,
|
||||||
|
Gem4 = 3,
|
||||||
|
Gem5 = 4,
|
||||||
|
Gem6 = 5,
|
||||||
|
Gem7 = 6,
|
||||||
|
Gem8 = 7,
|
||||||
|
Gem9 = 8,
|
||||||
|
Gem10 = 9,
|
||||||
|
Gem11 = 10,
|
||||||
|
Gem12 = 11,
|
||||||
|
MaxGems = 12,
|
||||||
|
Ability = 20, // HT/LoH for Tit
|
||||||
|
PotionBelt = 21, // Tit uses a different slot for PB
|
||||||
|
Item = 22,
|
||||||
|
Discipline = 23,
|
||||||
|
AltAbility = 0xFF
|
||||||
|
};
|
||||||
|
|
||||||
} /*EQEmu*/
|
} /*EQEmu*/
|
||||||
|
|
||||||
#endif /*COMMON_EMU_CONSTANTS_H*/
|
#endif /*COMMON_EMU_CONSTANTS_H*/
|
||||||
|
|
||||||
|
/* hack list to prevent circular references
|
||||||
|
|
||||||
|
eq_limits.h:EQEmu::inventory::LookupEntry::InventoryTypeSize[n];
|
||||||
|
|
||||||
|
*/
|
||||||
|
|||||||
+15
-108
@@ -61,8 +61,6 @@ namespace EQEmu
|
|||||||
SLOT_GENERAL_6 = 27,
|
SLOT_GENERAL_6 = 27,
|
||||||
SLOT_GENERAL_7 = 28,
|
SLOT_GENERAL_7 = 28,
|
||||||
SLOT_GENERAL_8 = 29,
|
SLOT_GENERAL_8 = 29,
|
||||||
//SLOT_GENERAL_9 = not supported
|
|
||||||
//SLOT_GENERAL_10 = not supported
|
|
||||||
SLOT_CURSOR = 30,
|
SLOT_CURSOR = 30,
|
||||||
SLOT_CURSOR_END = (int16)0xFFFE, // I hope no one is using this...
|
SLOT_CURSOR_END = (int16)0xFFFE, // I hope no one is using this...
|
||||||
SLOT_TRADESKILL = 1000,
|
SLOT_TRADESKILL = 1000,
|
||||||
@@ -96,89 +94,8 @@ namespace EQEmu
|
|||||||
SLOT_WORLD_END = 4009
|
SLOT_WORLD_END = 4009
|
||||||
};
|
};
|
||||||
|
|
||||||
enum InventoryTypes : int16 {
|
|
||||||
TypePossessions = 0,
|
|
||||||
TypeBank,
|
|
||||||
TypeSharedBank,
|
|
||||||
TypeTrade,
|
|
||||||
TypeWorld,
|
|
||||||
TypeLimbo, // 5
|
|
||||||
TypeTribute,
|
|
||||||
TypeTrophyTribute,
|
|
||||||
TypeGuildTribute,
|
|
||||||
TypeMerchant,
|
|
||||||
TypeDeleted, // 10
|
|
||||||
TypeCorpse,
|
|
||||||
TypeBazaar,
|
|
||||||
TypeInspect,
|
|
||||||
TypeRealEstate,
|
|
||||||
TypeViewMODPC, // 15
|
|
||||||
TypeViewMODBank,
|
|
||||||
TypeViewMODSharedBank,
|
|
||||||
TypeViewMODLimbo,
|
|
||||||
TypeAltStorage,
|
|
||||||
TypeArchived, // 20
|
|
||||||
TypeMail,
|
|
||||||
TypeGuildTrophyTribute,
|
|
||||||
TypeKrono,
|
|
||||||
TypeOther,
|
|
||||||
TypeCount
|
|
||||||
};
|
|
||||||
|
|
||||||
enum PossessionsSlots : int16 {
|
|
||||||
SlotCharm = 0,
|
|
||||||
SlotEar1,
|
|
||||||
SlotHead,
|
|
||||||
SlotFace,
|
|
||||||
SlotEar2,
|
|
||||||
SlotNeck, // 5
|
|
||||||
SlotShoulders,
|
|
||||||
SlotArms,
|
|
||||||
SlotBack,
|
|
||||||
SlotWrist1,
|
|
||||||
SlotWrist2, // 10
|
|
||||||
SlotRange,
|
|
||||||
SlotHands,
|
|
||||||
SlotPrimary,
|
|
||||||
SlotSecondary,
|
|
||||||
SlotFinger1, // 15
|
|
||||||
SlotFinger2,
|
|
||||||
SlotChest,
|
|
||||||
SlotLegs,
|
|
||||||
SlotFeet,
|
|
||||||
SlotWaist, // 20
|
|
||||||
SlotPowerSource = 9999, // temp
|
|
||||||
SlotAmmo = 21, // temp
|
|
||||||
SlotGeneral1,
|
|
||||||
SlotGeneral2,
|
|
||||||
SlotGeneral3,
|
|
||||||
SlotGeneral4, // 25
|
|
||||||
SlotGeneral5,
|
|
||||||
SlotGeneral6,
|
|
||||||
SlotGeneral7,
|
|
||||||
SlotGeneral8,
|
|
||||||
//SlotGeneral9,
|
|
||||||
//SlotGeneral10,
|
|
||||||
SlotCursor, // 30
|
|
||||||
SlotCount
|
|
||||||
};
|
|
||||||
|
|
||||||
enum MaterialSlots : uint8 {
|
|
||||||
MaterialHead = 0,
|
|
||||||
MaterialChest,
|
|
||||||
MaterialArms,
|
|
||||||
MaterialWrist,
|
|
||||||
MaterialHands,
|
|
||||||
MaterialLegs, // 5
|
|
||||||
MaterialFeet,
|
|
||||||
MaterialPrimary,
|
|
||||||
MaterialSecondary,
|
|
||||||
MaterialCount,
|
|
||||||
MaterialInvalid = 255
|
|
||||||
};
|
|
||||||
|
|
||||||
// these are currently hard-coded for existing inventory system..do not use in place of special client version handlers until ready
|
// these are currently hard-coded for existing inventory system..do not use in place of special client version handlers until ready
|
||||||
static const uint16 TYPE_POSSESSIONS_SIZE = SlotCount;
|
static const uint16 TYPE_POSSESSIONS_SIZE = 31;
|
||||||
static const uint16 TYPE_BANK_SIZE = 24;
|
static const uint16 TYPE_BANK_SIZE = 24;
|
||||||
static const uint16 TYPE_SHARED_BANK_SIZE = 2;
|
static const uint16 TYPE_SHARED_BANK_SIZE = 2;
|
||||||
static const uint16 TYPE_TRADE_SIZE = 8;
|
static const uint16 TYPE_TRADE_SIZE = 8;
|
||||||
@@ -189,14 +106,14 @@ namespace EQEmu
|
|||||||
static const uint16 TYPE_GUILD_TRIBUTE_SIZE = 0;
|
static const uint16 TYPE_GUILD_TRIBUTE_SIZE = 0;
|
||||||
static const uint16 TYPE_MERCHANT_SIZE = 0;
|
static const uint16 TYPE_MERCHANT_SIZE = 0;
|
||||||
static const uint16 TYPE_DELETED_SIZE = 0;
|
static const uint16 TYPE_DELETED_SIZE = 0;
|
||||||
static const uint16 TYPE_CORPSE_SIZE = SlotCount; // no bitmask use..limits to size of client corpse window (see EQLimits::InventoryMapSize(MapCorpse, <EQClientVersion))
|
static const uint16 TYPE_CORPSE_SIZE = 31; // no bitmask use..limits to size of client corpse window (see EQLimits::InventoryMapSize(MapCorpse, <EQClientVersion))
|
||||||
static const uint16 TYPE_BAZAAR_SIZE = 80;
|
static const uint16 TYPE_BAZAAR_SIZE = 80;
|
||||||
static const uint16 TYPE_INSPECT_SIZE = 22;
|
static const uint16 TYPE_INSPECT_SIZE = 22;
|
||||||
static const uint16 TYPE_REAL_ESTATE_SIZE = 0;
|
static const uint16 TYPE_REAL_ESTATE_SIZE = 0;
|
||||||
static const uint16 TYPE_VIEW_MOD_PC_SIZE = 0;//NOT_USED;
|
static const uint16 TYPE_VIEW_MOD_PC_SIZE = 0;
|
||||||
static const uint16 TYPE_VIEW_MOD_BANK_SIZE = 0;//NOT_USED;
|
static const uint16 TYPE_VIEW_MOD_BANK_SIZE = 0;
|
||||||
static const uint16 TYPE_VIEW_MOD_SHARED_BANK_SIZE = 0;//NOT_USED;
|
static const uint16 TYPE_VIEW_MOD_SHARED_BANK_SIZE = 0;
|
||||||
static const uint16 TYPE_VIEW_MOD_LIMBO_SIZE = 0;//NOT_USED;
|
static const uint16 TYPE_VIEW_MOD_LIMBO_SIZE = 0;
|
||||||
static const uint16 TYPE_ALT_STORAGE_SIZE = 0;
|
static const uint16 TYPE_ALT_STORAGE_SIZE = 0;
|
||||||
static const uint16 TYPE_ARCHIVED_SIZE = 0;
|
static const uint16 TYPE_ARCHIVED_SIZE = 0;
|
||||||
static const uint16 TYPE_MAIL_SIZE = 0;
|
static const uint16 TYPE_MAIL_SIZE = 0;
|
||||||
@@ -206,12 +123,12 @@ namespace EQEmu
|
|||||||
|
|
||||||
// most of these definitions will go away with the structure-based system..this maintains compatibility for now
|
// most of these definitions will go away with the structure-based system..this maintains compatibility for now
|
||||||
// (these are mainly to assign specific values to constants used in conversions and to identify per-client ranges/offsets)
|
// (these are mainly to assign specific values to constants used in conversions and to identify per-client ranges/offsets)
|
||||||
static const int16 EQUIPMENT_BEGIN = SlotCharm;
|
static const int16 EQUIPMENT_BEGIN = 0;
|
||||||
static const int16 EQUIPMENT_END = SlotAmmo;
|
static const int16 EQUIPMENT_END = 21;
|
||||||
static const uint16 EQUIPMENT_SIZE = 22; // does not account for 'Power Source' - used mainly for npc equipment arrays
|
static const uint16 EQUIPMENT_SIZE = 22; // does not account for 'Power Source' - used mainly for npc equipment arrays
|
||||||
|
|
||||||
static const int16 GENERAL_BEGIN = SlotGeneral1;
|
static const int16 GENERAL_BEGIN = 22;
|
||||||
static const int16 GENERAL_END = SlotGeneral8;
|
static const int16 GENERAL_END = 29;
|
||||||
static const uint16 GENERAL_SIZE = 8;
|
static const uint16 GENERAL_SIZE = 8;
|
||||||
static const int16 GENERAL_BAGS_BEGIN = 251;
|
static const int16 GENERAL_BAGS_BEGIN = 251;
|
||||||
static const int16 GENERAL_BAGS_END_OFFSET = 79;
|
static const int16 GENERAL_BAGS_END_OFFSET = 79;
|
||||||
@@ -249,27 +166,17 @@ namespace EQEmu
|
|||||||
static const int16 TRIBUTE_SIZE = TYPE_TRIBUTE_SIZE;
|
static const int16 TRIBUTE_SIZE = TYPE_TRIBUTE_SIZE;
|
||||||
|
|
||||||
static const int16 CORPSE_BEGIN = 22;
|
static const int16 CORPSE_BEGIN = 22;
|
||||||
//static const int16 CORPSE_END = RoF::consts::CORPSE_END; // not ready for use
|
|
||||||
|
|
||||||
static const int16 MATERIAL_BEGIN = MaterialHead;
|
|
||||||
static const int16 MATERIAL_END = MaterialSecondary;
|
|
||||||
static const int16 MATERIAL_TINT_END = MaterialFeet;
|
|
||||||
static const int16 MATERIAL_SIZE = MaterialCount;
|
|
||||||
|
|
||||||
// items
|
|
||||||
// common and container sizes will not increase until the new 'location' struct is implemented
|
|
||||||
static const uint16 ITEM_COMMON_SIZE = 6;//RoF::consts::ITEM_COMMON_SIZE;
|
|
||||||
static const uint16 ITEM_CONTAINER_SIZE = 10;//Titanium::consts::ITEM_CONTAINER_SIZE;
|
|
||||||
|
|
||||||
// BANDOLIERS_SIZE sets maximum limit..active limit will need to be handled by the appropriate AA or spell (or item?)
|
// BANDOLIERS_SIZE sets maximum limit..active limit will need to be handled by the appropriate AA or spell (or item?)
|
||||||
static const size_t BANDOLIERS_SIZE = 20;//RoF2::consts::BANDOLIERS_SIZE; // number of bandolier instances
|
static const size_t BANDOLIERS_SIZE = 20; // number of bandolier instances
|
||||||
static const size_t BANDOLIER_ITEM_COUNT = 4;//RoF2::consts::BANDOLIER_ITEM_COUNT; // number of equipment slots in bandolier instance
|
static const size_t BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance
|
||||||
|
|
||||||
// POTION_BELT_SIZE sets maximum limit..active limit will need to be handled by the appropriate AA or spell (or item?)
|
// POTION_BELT_SIZE sets maximum limit..active limit will need to be handled by the appropriate AA or spell (or item?)
|
||||||
static const size_t POTION_BELT_ITEM_COUNT = 5;//RoF2::consts::POTION_BELT_ITEM_COUNT;
|
static const size_t POTION_BELT_ITEM_COUNT = 5;
|
||||||
|
|
||||||
static const size_t TEXT_LINK_BODY_LENGTH = 56;//RoF2::consts::TEXT_LINK_BODY_LENGTH;
|
static const size_t TEXT_LINK_BODY_LENGTH = 56;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* COMMON_EMU_LEGACY_H */
|
#endif /* COMMON_EMU_LEGACY_H */
|
||||||
|
|||||||
+56
-8
@@ -27,29 +27,77 @@
|
|||||||
|
|
||||||
namespace EntityLimits
|
namespace EntityLimits
|
||||||
{
|
{
|
||||||
namespace npc {
|
namespace NPC {
|
||||||
enum : int { Invalid = -1, Null, Safety };
|
enum : int { Invalid = -1, Null, Safety };
|
||||||
|
|
||||||
enum : bool { False = false, True = true };
|
enum : bool { False = false, True = true };
|
||||||
}
|
|
||||||
|
|
||||||
namespace merc {
|
const size_t InvTypeTradeSize = 4;
|
||||||
|
|
||||||
|
} /*NPC*/
|
||||||
|
|
||||||
|
namespace NPCMerchant {
|
||||||
enum : int { Invalid = -1, Null, Safety };
|
enum : int { Invalid = -1, Null, Safety };
|
||||||
|
|
||||||
enum : bool { False = false, True = true };
|
enum : bool { False = false, True = true };
|
||||||
}
|
|
||||||
|
|
||||||
namespace bot {
|
const size_t InvTypeTradeSize = 4;
|
||||||
|
|
||||||
|
} /*NPCMerchant*/
|
||||||
|
|
||||||
|
namespace Merc {
|
||||||
enum : int { Invalid = -1, Null, Safety };
|
enum : int { Invalid = -1, Null, Safety };
|
||||||
|
|
||||||
enum : bool { False = false, True = true };
|
enum : bool { False = false, True = true };
|
||||||
}
|
|
||||||
|
|
||||||
namespace pet {
|
const size_t InvTypeTradeSize = 4;
|
||||||
|
|
||||||
|
} /*Merc*/
|
||||||
|
|
||||||
|
namespace Bot {
|
||||||
enum : int { Invalid = -1, Null, Safety };
|
enum : int { Invalid = -1, Null, Safety };
|
||||||
|
|
||||||
enum : bool { False = false, True = true };
|
enum : bool { False = false, True = true };
|
||||||
}
|
|
||||||
|
const size_t InvTypeTradeSize = 8;
|
||||||
|
|
||||||
|
} /*Bot*/
|
||||||
|
|
||||||
|
namespace ClientPet {
|
||||||
|
enum : int { Invalid = -1, Null, Safety };
|
||||||
|
|
||||||
|
enum : bool { False = false, True = true };
|
||||||
|
|
||||||
|
const size_t InvTypeTradeSize = 4;
|
||||||
|
|
||||||
|
} /*Pet*/
|
||||||
|
|
||||||
|
namespace NPCPet {
|
||||||
|
enum : int { Invalid = -1, Null, Safety };
|
||||||
|
|
||||||
|
enum : bool { False = false, True = true };
|
||||||
|
|
||||||
|
const size_t InvTypeTradeSize = 4;
|
||||||
|
|
||||||
|
} /*Pet*/
|
||||||
|
|
||||||
|
namespace MercPet {
|
||||||
|
enum : int { Invalid = -1, Null, Safety };
|
||||||
|
|
||||||
|
enum : bool { False = false, True = true };
|
||||||
|
|
||||||
|
const size_t InvTypeTradeSize = 4;
|
||||||
|
|
||||||
|
} /*Pet*/
|
||||||
|
|
||||||
|
namespace BotPet {
|
||||||
|
enum : int { Invalid = -1, Null, Safety };
|
||||||
|
|
||||||
|
enum : bool { False = false, True = true };
|
||||||
|
|
||||||
|
const size_t InvTypeTradeSize = 4;
|
||||||
|
|
||||||
|
} /*Pet*/
|
||||||
|
|
||||||
}; /*EntityLimits*/
|
}; /*EntityLimits*/
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,9 @@ N(OP_AdventureRequest),
|
|||||||
N(OP_AdventureStatsReply),
|
N(OP_AdventureStatsReply),
|
||||||
N(OP_AdventureStatsRequest),
|
N(OP_AdventureStatsRequest),
|
||||||
N(OP_AdventureUpdate),
|
N(OP_AdventureUpdate),
|
||||||
|
N(OP_AggroMeterLockTarget),
|
||||||
|
N(OP_AggroMeterTargetInfo),
|
||||||
|
N(OP_AggroMeterUpdate),
|
||||||
N(OP_AltCurrency),
|
N(OP_AltCurrency),
|
||||||
N(OP_AltCurrencyMerchantReply),
|
N(OP_AltCurrencyMerchantReply),
|
||||||
N(OP_AltCurrencyMerchantRequest),
|
N(OP_AltCurrencyMerchantRequest),
|
||||||
@@ -64,6 +67,7 @@ N(OP_BuffRemoveRequest),
|
|||||||
N(OP_Bug),
|
N(OP_Bug),
|
||||||
N(OP_CameraEffect),
|
N(OP_CameraEffect),
|
||||||
N(OP_Camp),
|
N(OP_Camp),
|
||||||
|
N(OP_CancelSneakHide),
|
||||||
N(OP_CancelTask),
|
N(OP_CancelTask),
|
||||||
N(OP_CancelTrade),
|
N(OP_CancelTrade),
|
||||||
N(OP_CastSpell),
|
N(OP_CastSpell),
|
||||||
@@ -288,6 +292,7 @@ N(OP_LFGuild),
|
|||||||
N(OP_LFPCommand),
|
N(OP_LFPCommand),
|
||||||
N(OP_LFPGetMatchesRequest),
|
N(OP_LFPGetMatchesRequest),
|
||||||
N(OP_LFPGetMatchesResponse),
|
N(OP_LFPGetMatchesResponse),
|
||||||
|
N(OP_LinkedReuse),
|
||||||
N(OP_LoadSpellSet),
|
N(OP_LoadSpellSet),
|
||||||
N(OP_LocInfo),
|
N(OP_LocInfo),
|
||||||
N(OP_LockoutTimerInfo),
|
N(OP_LockoutTimerInfo),
|
||||||
|
|||||||
@@ -0,0 +1,370 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "emu_versions.h"
|
||||||
|
|
||||||
|
|
||||||
|
bool EQEmu::versions::IsValidClientVersion(ClientVersion client_version)
|
||||||
|
{
|
||||||
|
if (client_version <= ClientVersion::Unknown || client_version > LastClientVersion)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::versions::ClientVersion EQEmu::versions::ValidateClientVersion(ClientVersion client_version)
|
||||||
|
{
|
||||||
|
if (client_version <= ClientVersion::Unknown || client_version > LastClientVersion)
|
||||||
|
return ClientVersion::Unknown;
|
||||||
|
|
||||||
|
return client_version;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* EQEmu::versions::ClientVersionName(ClientVersion client_version)
|
||||||
|
{
|
||||||
|
switch (client_version) {
|
||||||
|
case ClientVersion::Unknown:
|
||||||
|
return "Unknown Version";
|
||||||
|
case ClientVersion::Client62:
|
||||||
|
return "Client 6.2";
|
||||||
|
case ClientVersion::Titanium:
|
||||||
|
return "Titanium";
|
||||||
|
case ClientVersion::SoF:
|
||||||
|
return "SoF";
|
||||||
|
case ClientVersion::SoD:
|
||||||
|
return "SoD";
|
||||||
|
case ClientVersion::UF:
|
||||||
|
return "UF";
|
||||||
|
case ClientVersion::RoF:
|
||||||
|
return "RoF";
|
||||||
|
case ClientVersion::RoF2:
|
||||||
|
return "RoF2";
|
||||||
|
default:
|
||||||
|
return "Invalid Version";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 EQEmu::versions::ConvertClientVersionToClientVersionBit(ClientVersion client_version)
|
||||||
|
{
|
||||||
|
switch (client_version) {
|
||||||
|
case ClientVersion::Unknown:
|
||||||
|
case ClientVersion::Client62:
|
||||||
|
return bit_Unknown;
|
||||||
|
case ClientVersion::Titanium:
|
||||||
|
return bit_Titanium;
|
||||||
|
case ClientVersion::SoF:
|
||||||
|
return bit_SoF;
|
||||||
|
case ClientVersion::SoD:
|
||||||
|
return bit_SoD;
|
||||||
|
case ClientVersion::UF:
|
||||||
|
return bit_UF;
|
||||||
|
case ClientVersion::RoF:
|
||||||
|
return bit_RoF;
|
||||||
|
case ClientVersion::RoF2:
|
||||||
|
return bit_RoF2;
|
||||||
|
default:
|
||||||
|
return bit_Unknown;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::versions::ClientVersion EQEmu::versions::ConvertClientVersionBitToClientVersion(uint32 client_version_bit)
|
||||||
|
{
|
||||||
|
switch (client_version_bit) {
|
||||||
|
case (uint32)static_cast<unsigned int>(ClientVersion::Unknown) :
|
||||||
|
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::Client62) - 1)) :
|
||||||
|
return ClientVersion::Unknown;
|
||||||
|
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::Titanium) - 1)) :
|
||||||
|
return ClientVersion::Titanium;
|
||||||
|
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::SoF) - 1)) :
|
||||||
|
return ClientVersion::SoF;
|
||||||
|
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::SoD) - 1)) :
|
||||||
|
return ClientVersion::SoD;
|
||||||
|
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::UF) - 1)) :
|
||||||
|
return ClientVersion::UF;
|
||||||
|
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::RoF) - 1)) :
|
||||||
|
return ClientVersion::RoF;
|
||||||
|
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::RoF2) - 1)) :
|
||||||
|
return ClientVersion::RoF2;
|
||||||
|
default:
|
||||||
|
return ClientVersion::Unknown;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 EQEmu::versions::ConvertClientVersionToExpansion(ClientVersion client_version)
|
||||||
|
{
|
||||||
|
switch (client_version) {
|
||||||
|
case ClientVersion::Unknown:
|
||||||
|
case ClientVersion::Client62:
|
||||||
|
case ClientVersion::Titanium:
|
||||||
|
return 0x000007FFU;
|
||||||
|
case ClientVersion::SoF:
|
||||||
|
return 0x00007FFFU;
|
||||||
|
case ClientVersion::SoD:
|
||||||
|
return 0x0000FFFFU;
|
||||||
|
case ClientVersion::UF:
|
||||||
|
return 0x0001FFFFU;
|
||||||
|
case ClientVersion::RoF:
|
||||||
|
case ClientVersion::RoF2:
|
||||||
|
return 0x000FFFFFU;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::versions::IsValidMobVersion(MobVersion mob_version)
|
||||||
|
{
|
||||||
|
if (mob_version <= MobVersion::Unknown || mob_version > LastMobVersion)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::versions::IsValidPCMobVersion(MobVersion mob_version)
|
||||||
|
{
|
||||||
|
if (mob_version <= MobVersion::Unknown || mob_version > LastPCMobVersion)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::versions::IsValidNonPCMobVersion(MobVersion mob_version)
|
||||||
|
{
|
||||||
|
if (mob_version <= LastPCMobVersion || mob_version > LastNonPCMobVersion)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::versions::IsValidOfflinePCMobVersion(MobVersion mob_version)
|
||||||
|
{
|
||||||
|
if (mob_version <= LastNonPCMobVersion || mob_version > LastOfflinePCMobVersion)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::versions::MobVersion EQEmu::versions::ValidateMobVersion(MobVersion mob_version)
|
||||||
|
{
|
||||||
|
if (mob_version <= MobVersion::Unknown || mob_version > LastMobVersion)
|
||||||
|
return MobVersion::Unknown;
|
||||||
|
|
||||||
|
return mob_version;
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::versions::MobVersion EQEmu::versions::ValidatePCMobVersion(MobVersion mob_version)
|
||||||
|
{
|
||||||
|
if (mob_version <= MobVersion::Unknown || mob_version > LastPCMobVersion)
|
||||||
|
return MobVersion::Unknown;
|
||||||
|
|
||||||
|
return mob_version;
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::versions::MobVersion EQEmu::versions::ValidateNonPCMobVersion(MobVersion mob_version)
|
||||||
|
{
|
||||||
|
if (mob_version <= LastPCMobVersion || mob_version > LastNonPCMobVersion)
|
||||||
|
return MobVersion::Unknown;
|
||||||
|
|
||||||
|
return mob_version;
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::versions::MobVersion EQEmu::versions::ValidateOfflinePCMobVersion(MobVersion mob_version)
|
||||||
|
{
|
||||||
|
if (mob_version <= LastNonPCMobVersion || mob_version > LastOfflinePCMobVersion)
|
||||||
|
return MobVersion::Unknown;
|
||||||
|
|
||||||
|
return mob_version;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* EQEmu::versions::MobVersionName(MobVersion mob_version)
|
||||||
|
{
|
||||||
|
switch (mob_version) {
|
||||||
|
case MobVersion::Unknown:
|
||||||
|
return "Unknown Version";
|
||||||
|
case MobVersion::Client62:
|
||||||
|
return "Client 6.2";
|
||||||
|
case MobVersion::Titanium:
|
||||||
|
return "Titanium";
|
||||||
|
case MobVersion::SoF:
|
||||||
|
return "SoF";
|
||||||
|
case MobVersion::SoD:
|
||||||
|
return "SoD";
|
||||||
|
case MobVersion::UF:
|
||||||
|
return "UF";
|
||||||
|
case MobVersion::RoF:
|
||||||
|
return "RoF";
|
||||||
|
case MobVersion::RoF2:
|
||||||
|
return "RoF2";
|
||||||
|
case MobVersion::NPC:
|
||||||
|
return "NPC";
|
||||||
|
case MobVersion::NPCMerchant:
|
||||||
|
return "NPC Merchant";
|
||||||
|
case MobVersion::Merc:
|
||||||
|
return "Merc";
|
||||||
|
case MobVersion::Bot:
|
||||||
|
return "Bot";
|
||||||
|
case MobVersion::ClientPet:
|
||||||
|
return "Client Pet";
|
||||||
|
case MobVersion::NPCPet:
|
||||||
|
return "NPC Pet";
|
||||||
|
case MobVersion::MercPet:
|
||||||
|
return "Merc Pet";
|
||||||
|
case MobVersion::BotPet:
|
||||||
|
return "Bot Pet";
|
||||||
|
case MobVersion::OfflineTitanium:
|
||||||
|
return "Offline Titanium";
|
||||||
|
case MobVersion::OfflineSoF:
|
||||||
|
return "Offline SoF";
|
||||||
|
case MobVersion::OfflineSoD:
|
||||||
|
return "Offline SoD";
|
||||||
|
case MobVersion::OfflineUF:
|
||||||
|
return "Offline UF";
|
||||||
|
case MobVersion::OfflineRoF:
|
||||||
|
return "Offline RoF";
|
||||||
|
case MobVersion::OfflineRoF2:
|
||||||
|
return "Offline RoF2";
|
||||||
|
default:
|
||||||
|
return "Invalid Version";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::versions::ClientVersion EQEmu::versions::ConvertMobVersionToClientVersion(MobVersion mob_version)
|
||||||
|
{
|
||||||
|
switch (mob_version) {
|
||||||
|
case MobVersion::Unknown:
|
||||||
|
case MobVersion::Client62:
|
||||||
|
return ClientVersion::Unknown;
|
||||||
|
case MobVersion::Titanium:
|
||||||
|
return ClientVersion::Titanium;
|
||||||
|
case MobVersion::SoF:
|
||||||
|
return ClientVersion::SoF;
|
||||||
|
case MobVersion::SoD:
|
||||||
|
return ClientVersion::SoD;
|
||||||
|
case MobVersion::UF:
|
||||||
|
return ClientVersion::UF;
|
||||||
|
case MobVersion::RoF:
|
||||||
|
return ClientVersion::RoF;
|
||||||
|
case MobVersion::RoF2:
|
||||||
|
return ClientVersion::RoF2;
|
||||||
|
default:
|
||||||
|
return ClientVersion::Unknown;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::versions::MobVersion EQEmu::versions::ConvertClientVersionToMobVersion(ClientVersion client_version)
|
||||||
|
{
|
||||||
|
switch (client_version) {
|
||||||
|
case ClientVersion::Unknown:
|
||||||
|
case ClientVersion::Client62:
|
||||||
|
return MobVersion::Unknown;
|
||||||
|
case ClientVersion::Titanium:
|
||||||
|
return MobVersion::Titanium;
|
||||||
|
case ClientVersion::SoF:
|
||||||
|
return MobVersion::SoF;
|
||||||
|
case ClientVersion::SoD:
|
||||||
|
return MobVersion::SoD;
|
||||||
|
case ClientVersion::UF:
|
||||||
|
return MobVersion::UF;
|
||||||
|
case ClientVersion::RoF:
|
||||||
|
return MobVersion::RoF;
|
||||||
|
case ClientVersion::RoF2:
|
||||||
|
return MobVersion::RoF2;
|
||||||
|
default:
|
||||||
|
return MobVersion::Unknown;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::versions::MobVersion EQEmu::versions::ConvertPCMobVersionToOfflinePCMobVersion(MobVersion mob_version)
|
||||||
|
{
|
||||||
|
switch (mob_version) {
|
||||||
|
case MobVersion::Titanium:
|
||||||
|
return MobVersion::OfflineTitanium;
|
||||||
|
case MobVersion::SoF:
|
||||||
|
return MobVersion::OfflineSoF;
|
||||||
|
case MobVersion::SoD:
|
||||||
|
return MobVersion::OfflineSoD;
|
||||||
|
case MobVersion::UF:
|
||||||
|
return MobVersion::OfflineUF;
|
||||||
|
case MobVersion::RoF:
|
||||||
|
return MobVersion::OfflineRoF;
|
||||||
|
case MobVersion::RoF2:
|
||||||
|
return MobVersion::OfflineRoF2;
|
||||||
|
default:
|
||||||
|
return MobVersion::Unknown;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::versions::MobVersion EQEmu::versions::ConvertOfflinePCMobVersionToPCMobVersion(MobVersion mob_version)
|
||||||
|
{
|
||||||
|
switch (mob_version) {
|
||||||
|
case MobVersion::OfflineTitanium:
|
||||||
|
return MobVersion::Titanium;
|
||||||
|
case MobVersion::OfflineSoF:
|
||||||
|
return MobVersion::SoF;
|
||||||
|
case MobVersion::OfflineSoD:
|
||||||
|
return MobVersion::SoD;
|
||||||
|
case MobVersion::OfflineUF:
|
||||||
|
return MobVersion::UF;
|
||||||
|
case MobVersion::OfflineRoF:
|
||||||
|
return MobVersion::RoF;
|
||||||
|
case MobVersion::OfflineRoF2:
|
||||||
|
return MobVersion::RoF2;
|
||||||
|
default:
|
||||||
|
return MobVersion::Unknown;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::versions::ClientVersion EQEmu::versions::ConvertOfflinePCMobVersionToClientVersion(MobVersion mob_version)
|
||||||
|
{
|
||||||
|
switch (mob_version) {
|
||||||
|
case MobVersion::OfflineTitanium:
|
||||||
|
return ClientVersion::Titanium;
|
||||||
|
case MobVersion::OfflineSoF:
|
||||||
|
return ClientVersion::SoF;
|
||||||
|
case MobVersion::OfflineSoD:
|
||||||
|
return ClientVersion::SoD;
|
||||||
|
case MobVersion::OfflineUF:
|
||||||
|
return ClientVersion::UF;
|
||||||
|
case MobVersion::OfflineRoF:
|
||||||
|
return ClientVersion::RoF;
|
||||||
|
case MobVersion::OfflineRoF2:
|
||||||
|
return ClientVersion::RoF2;
|
||||||
|
default:
|
||||||
|
return ClientVersion::Unknown;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::versions::MobVersion EQEmu::versions::ConvertClientVersionToOfflinePCMobVersion(ClientVersion client_version)
|
||||||
|
{
|
||||||
|
switch (client_version) {
|
||||||
|
case ClientVersion::Titanium:
|
||||||
|
return MobVersion::OfflineTitanium;
|
||||||
|
case ClientVersion::SoF:
|
||||||
|
return MobVersion::OfflineSoF;
|
||||||
|
case ClientVersion::SoD:
|
||||||
|
return MobVersion::OfflineSoD;
|
||||||
|
case ClientVersion::UF:
|
||||||
|
return MobVersion::OfflineUF;
|
||||||
|
case ClientVersion::RoF:
|
||||||
|
return MobVersion::OfflineRoF;
|
||||||
|
case ClientVersion::RoF2:
|
||||||
|
return MobVersion::OfflineRoF2;
|
||||||
|
default:
|
||||||
|
return MobVersion::Unknown;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 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_EMU_VERSIONS_H
|
||||||
|
#define COMMON_EMU_VERSIONS_H
|
||||||
|
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
|
||||||
|
namespace EQEmu
|
||||||
|
{
|
||||||
|
namespace versions {
|
||||||
|
enum class ClientVersion {
|
||||||
|
Unknown = 0,
|
||||||
|
Client62, // Build: 'Aug 4 2005 15:40:59'
|
||||||
|
Titanium, // Build: 'Oct 31 2005 10:33:37'
|
||||||
|
SoF, // Build: 'Sep 7 2007 09:11:49'
|
||||||
|
SoD, // Build: 'Dec 19 2008 15:22:49'
|
||||||
|
UF, // Build: 'Jun 8 2010 16:44:32'
|
||||||
|
RoF, // Build: 'Dec 10 2012 17:35:44'
|
||||||
|
RoF2 // Build: 'May 10 2013 23:30:08'
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ClientVersionBit : uint32 {
|
||||||
|
bit_Unknown = 0,
|
||||||
|
bit_Client62 = 0x00000001, // unsupported (placeholder for scripts)
|
||||||
|
bit_Titanium = 0x00000002,
|
||||||
|
bit_SoF = 0x00000004,
|
||||||
|
bit_SoD = 0x00000008,
|
||||||
|
bit_UF = 0x00000010,
|
||||||
|
bit_RoF = 0x00000020,
|
||||||
|
bit_RoF2 = 0x00000040,
|
||||||
|
bit_TitaniumAndEarlier = 0x00000003,
|
||||||
|
bit_SoFAndEarlier = 0x00000007,
|
||||||
|
bit_SoDAndEarlier = 0x0000000F,
|
||||||
|
bit_UFAndEarlier = 0x0000001F,
|
||||||
|
bit_RoFAndEarlier = 0x0000003F,
|
||||||
|
bit_SoFAndLater = 0xFFFFFFFC,
|
||||||
|
bit_SoDAndLater = 0xFFFFFFF8,
|
||||||
|
bit_UFAndLater = 0xFFFFFFF0,
|
||||||
|
bit_RoFAndLater = 0xFFFFFFE0,
|
||||||
|
bit_RoF2AndLater = 0xFFFFFFC0,
|
||||||
|
bit_AllClients = 0xFFFFFFFF
|
||||||
|
};
|
||||||
|
|
||||||
|
const ClientVersion LastClientVersion = ClientVersion::RoF2;
|
||||||
|
const size_t ClientVersionCount = (static_cast<size_t>(LastClientVersion) + 1);
|
||||||
|
|
||||||
|
bool IsValidClientVersion(ClientVersion client_version);
|
||||||
|
ClientVersion ValidateClientVersion(ClientVersion client_version);
|
||||||
|
const char* ClientVersionName(ClientVersion client_version);
|
||||||
|
uint32 ConvertClientVersionToClientVersionBit(ClientVersion client_version);
|
||||||
|
ClientVersion ConvertClientVersionBitToClientVersion(uint32 client_version_bit);
|
||||||
|
uint32 ConvertClientVersionToExpansion(ClientVersion client_version);
|
||||||
|
|
||||||
|
|
||||||
|
enum class MobVersion {
|
||||||
|
Unknown = 0,
|
||||||
|
Client62,
|
||||||
|
Titanium,
|
||||||
|
SoF,
|
||||||
|
SoD,
|
||||||
|
UF,
|
||||||
|
RoF,
|
||||||
|
RoF2,
|
||||||
|
NPC,
|
||||||
|
NPCMerchant,
|
||||||
|
Merc,
|
||||||
|
Bot,
|
||||||
|
ClientPet,
|
||||||
|
NPCPet,
|
||||||
|
MercPet,
|
||||||
|
BotPet,
|
||||||
|
OfflineTitanium,
|
||||||
|
OfflineSoF,
|
||||||
|
OfflineSoD,
|
||||||
|
OfflineUF,
|
||||||
|
OfflineRoF,
|
||||||
|
OfflineRoF2
|
||||||
|
};
|
||||||
|
|
||||||
|
const MobVersion LastMobVersion = MobVersion::OfflineRoF2;
|
||||||
|
const MobVersion LastPCMobVersion = MobVersion::RoF2;
|
||||||
|
const MobVersion LastNonPCMobVersion = MobVersion::BotPet;
|
||||||
|
const MobVersion LastOfflinePCMobVersion = MobVersion::OfflineRoF2;
|
||||||
|
const size_t MobVersionCount = (static_cast<size_t>(LastMobVersion) + 1);
|
||||||
|
|
||||||
|
bool IsValidMobVersion(MobVersion mob_version);
|
||||||
|
bool IsValidPCMobVersion(MobVersion mob_version);
|
||||||
|
bool IsValidNonPCMobVersion(MobVersion mob_version);
|
||||||
|
bool IsValidOfflinePCMobVersion(MobVersion mob_version);
|
||||||
|
|
||||||
|
MobVersion ValidateMobVersion(MobVersion mob_version);
|
||||||
|
MobVersion ValidatePCMobVersion(MobVersion mob_version);
|
||||||
|
MobVersion ValidateNonPCMobVersion(MobVersion mob_version);
|
||||||
|
MobVersion ValidateOfflinePCMobVersion(MobVersion mob_version);
|
||||||
|
|
||||||
|
const char* MobVersionName(MobVersion mob_version);
|
||||||
|
ClientVersion ConvertMobVersionToClientVersion(MobVersion mob_version);
|
||||||
|
MobVersion ConvertClientVersionToMobVersion(ClientVersion client_version);
|
||||||
|
MobVersion ConvertPCMobVersionToOfflinePCMobVersion(MobVersion mob_version);
|
||||||
|
MobVersion ConvertOfflinePCMobVersionToPCMobVersion(MobVersion mob_version);
|
||||||
|
ClientVersion ConvertOfflinePCMobVersionToClientVersion(MobVersion mob_version);
|
||||||
|
MobVersion ConvertClientVersionToOfflinePCMobVersion(ClientVersion client_version);
|
||||||
|
|
||||||
|
} /*versions*/
|
||||||
|
|
||||||
|
} /*EQEmu*/
|
||||||
|
|
||||||
|
#endif /*COMMON_EMU_VERSIONS_H*/
|
||||||
@@ -516,15 +516,6 @@ static const uint8 SkillDamageTypes[EQEmu::skills::HIGHEST_SKILL + 1] = // chang
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define INVALID_INDEX -1
|
#define INVALID_INDEX -1
|
||||||
#define NOT_USED 0
|
|
||||||
#define NO_ITEM 0
|
|
||||||
|
|
||||||
// yes..these are redundant... but, they help to identify and define what is actually being performed
|
|
||||||
// plus, since they're pre-op's, they don't affect the actual binary size
|
|
||||||
#define TYPE_BEGIN 0
|
|
||||||
#define SLOT_BEGIN 0
|
|
||||||
#define SUB_INDEX_BEGIN 0
|
|
||||||
#define AUG_INDEX_BEGIN 0
|
|
||||||
|
|
||||||
static const uint32 MAX_SPELL_DB_ID_VAL = 65535;
|
static const uint32 MAX_SPELL_DB_ID_VAL = 65535;
|
||||||
|
|
||||||
|
|||||||
+931
-469
File diff suppressed because it is too large
Load Diff
+35
-14
@@ -20,9 +20,10 @@
|
|||||||
#ifndef COMMON_EQ_LIMITS_H
|
#ifndef COMMON_EQ_LIMITS_H
|
||||||
#define COMMON_EQ_LIMITS_H
|
#define COMMON_EQ_LIMITS_H
|
||||||
|
|
||||||
|
#include "emu_legacy.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "eq_constants.h"
|
#include "eq_constants.h"
|
||||||
#include "inventory_version.h"
|
#include "emu_versions.h"
|
||||||
#include "../common/patches/titanium_limits.h"
|
#include "../common/patches/titanium_limits.h"
|
||||||
#include "../common/patches/sof_limits.h"
|
#include "../common/patches/sof_limits.h"
|
||||||
#include "../common/patches/sod_limits.h"
|
#include "../common/patches/sod_limits.h"
|
||||||
@@ -34,30 +35,50 @@
|
|||||||
namespace EQEmu
|
namespace EQEmu
|
||||||
{
|
{
|
||||||
namespace constants {
|
namespace constants {
|
||||||
extern size_t CharacterCreationLimit(versions::ClientVersion client_version);
|
class LookupEntry {
|
||||||
|
public:
|
||||||
|
size_t CharacterCreationLimit;
|
||||||
|
int LongBuffs;
|
||||||
|
int ShortBuffs;
|
||||||
|
int DiscBuffs;
|
||||||
|
int TotalBuffs;
|
||||||
|
int NPCBuffs;
|
||||||
|
int PetBuffs;
|
||||||
|
int MercBuffs;
|
||||||
|
};
|
||||||
|
|
||||||
|
const LookupEntry* Lookup(versions::ClientVersion client_version);
|
||||||
|
|
||||||
} /*constants*/
|
} /*constants*/
|
||||||
|
|
||||||
namespace inventory {
|
namespace inventory {
|
||||||
extern uint16 InventoryTypeSize(versions::InventoryVersion inventory_version, int16 inv_type);
|
class LookupEntry {
|
||||||
extern uint64 PossessionsBitmask(versions::InventoryVersion inventory_version);
|
public:
|
||||||
|
size_t InventoryTypeSize[25]; // should reflect EQEmu::inventory::typeCount referenced in emu_constants.h
|
||||||
|
|
||||||
extern bool AllowEmptyBagInBag(versions::InventoryVersion inventory_version);
|
uint64 PossessionsBitmask;
|
||||||
extern bool AllowClickCastFromBag(versions::InventoryVersion inventory_version);
|
size_t ItemBagSize;
|
||||||
|
size_t ItemAugSize;
|
||||||
|
|
||||||
extern uint16 ItemAugSize(versions::InventoryVersion inventory_version);
|
bool AllowEmptyBagInBag;
|
||||||
extern uint16 ItemBagSize(versions::InventoryVersion inventory_version);
|
bool AllowClickCastFromBag;
|
||||||
|
bool ConcatenateInvTypeLimbo;
|
||||||
|
bool AllowOverLevelEquipment;
|
||||||
|
};
|
||||||
|
|
||||||
extern bool ConcatenateInvTypeLimbo(versions::InventoryVersion inventory_version);
|
const LookupEntry* Lookup(versions::MobVersion mob_version);
|
||||||
|
|
||||||
extern bool AllowOverLevelEquipment(versions::InventoryVersion inventory_version);
|
|
||||||
|
|
||||||
} /*inventory*/
|
} /*inventory*/
|
||||||
|
|
||||||
namespace profile {
|
namespace behavior {
|
||||||
extern bool CoinHasWeight(versions::InventoryVersion inventory_version);
|
class LookupEntry {
|
||||||
|
public:
|
||||||
|
bool CoinHasWeight;
|
||||||
|
};
|
||||||
|
|
||||||
} /*profile*/
|
const LookupEntry* Lookup(versions::MobVersion mob_version);
|
||||||
|
|
||||||
|
} /*behavior*/
|
||||||
|
|
||||||
} /*EQEmu*/
|
} /*EQEmu*/
|
||||||
|
|
||||||
|
|||||||
+88
-139
@@ -25,15 +25,17 @@
|
|||||||
#include <list>
|
#include <list>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "../common/version.h"
|
#include "../common/version.h"
|
||||||
//#include "../common/item_struct.h"
|
#include "emu_constants.h"
|
||||||
|
#include "textures.h"
|
||||||
|
|
||||||
|
|
||||||
static const uint32 BUFF_COUNT = 25;
|
static const uint32 BUFF_COUNT = 25;
|
||||||
|
static const uint32 PET_BUFF_COUNT = 30;
|
||||||
static const uint32 MAX_MERC = 100;
|
static const uint32 MAX_MERC = 100;
|
||||||
static const uint32 MAX_MERC_GRADES = 10;
|
static const uint32 MAX_MERC_GRADES = 10;
|
||||||
static const uint32 MAX_MERC_STANCES = 10;
|
static const uint32 MAX_MERC_STANCES = 10;
|
||||||
static const uint32 BLOCKED_BUFF_COUNT = 20;
|
static const uint32 BLOCKED_BUFF_COUNT = 20;
|
||||||
|
|
||||||
#include "emu_constants.h"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Compiler override to ensure
|
** Compiler override to ensure
|
||||||
@@ -125,37 +127,7 @@ struct LDoNTrapTemplate
|
|||||||
|
|
||||||
// All clients translate the character select information to some degree
|
// All clients translate the character select information to some degree
|
||||||
|
|
||||||
struct Color_Struct
|
struct CharSelectEquip : EQEmu::textures::Texture_Struct, EQEmu::textures::Tint_Struct {};
|
||||||
{
|
|
||||||
union {
|
|
||||||
struct {
|
|
||||||
uint8 Blue;
|
|
||||||
uint8 Green;
|
|
||||||
uint8 Red;
|
|
||||||
uint8 UseTint; // if there's a tint this is FF
|
|
||||||
} RGB;
|
|
||||||
uint32 Color;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
struct EquipStruct
|
|
||||||
{
|
|
||||||
uint32 Material;
|
|
||||||
uint32 Unknown1;
|
|
||||||
uint32 EliteMaterial;
|
|
||||||
uint32 HeroForgeModel;
|
|
||||||
uint32 Material2; // Same as material?
|
|
||||||
};
|
|
||||||
|
|
||||||
struct CharSelectEquip
|
|
||||||
{
|
|
||||||
uint32 Material;
|
|
||||||
uint32 Unknown1;
|
|
||||||
uint32 EliteMaterial;
|
|
||||||
uint32 HeroForgeModel;
|
|
||||||
uint32 Material2;
|
|
||||||
Color_Struct Color;
|
|
||||||
};
|
|
||||||
|
|
||||||
// RoF2-based hybrid struct
|
// RoF2-based hybrid struct
|
||||||
struct CharacterSelectEntry_Struct
|
struct CharacterSelectEntry_Struct
|
||||||
@@ -170,7 +142,7 @@ struct CharacterSelectEntry_Struct
|
|||||||
uint16 Instance;
|
uint16 Instance;
|
||||||
uint8 Gender;
|
uint8 Gender;
|
||||||
uint8 Face;
|
uint8 Face;
|
||||||
CharSelectEquip Equip[9];
|
CharSelectEquip Equip[EQEmu::textures::materialCount];
|
||||||
uint8 Unknown15; // Seen FF
|
uint8 Unknown15; // Seen FF
|
||||||
uint8 Unknown19; // Seen FF
|
uint8 Unknown19; // Seen FF
|
||||||
uint32 DrakkinTattoo;
|
uint32 DrakkinTattoo;
|
||||||
@@ -279,22 +251,7 @@ struct Spawn_Struct {
|
|||||||
/*0189*/ uint32 petOwnerId; // If this is a pet, the spawn id of owner
|
/*0189*/ uint32 petOwnerId; // If this is a pet, the spawn id of owner
|
||||||
/*0193*/ uint8 guildrank; // 0=normal, 1=officer, 2=leader
|
/*0193*/ uint8 guildrank; // 0=normal, 1=officer, 2=leader
|
||||||
/*0194*/ uint8 unknown0194[3];
|
/*0194*/ uint8 unknown0194[3];
|
||||||
/*0197*/ union
|
/*0197*/ EQEmu::TextureProfile equipment;
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
/*0000*/ EquipStruct equip_helmet; // Equipment: Helmet visual
|
|
||||||
/*0000*/ EquipStruct equip_chest; // Equipment: Chest visual
|
|
||||||
/*0000*/ EquipStruct equip_arms; // Equipment: Arms visual
|
|
||||||
/*0000*/ EquipStruct equip_bracers; // Equipment: Wrist visual
|
|
||||||
/*0000*/ EquipStruct equip_hands; // Equipment: Hands visual
|
|
||||||
/*0000*/ EquipStruct equip_legs; // Equipment: Legs visual
|
|
||||||
/*0000*/ EquipStruct equip_feet; // Equipment: Boots visual
|
|
||||||
/*0000*/ EquipStruct equip_primary; // Equipment: Main visual
|
|
||||||
/*0000*/ EquipStruct equip_secondary; // Equipment: Off visual
|
|
||||||
} equip;
|
|
||||||
/*0000*/ EquipStruct equipment[EQEmu::legacy::MaterialCount];
|
|
||||||
};
|
|
||||||
/*0233*/ float runspeed; // Speed when running
|
/*0233*/ float runspeed; // Speed when running
|
||||||
/*0036*/ uint8 afk; // 0=no, 1=afk
|
/*0036*/ uint8 afk; // 0=no, 1=afk
|
||||||
/*0238*/ uint32 guildID; // Current guild
|
/*0238*/ uint32 guildID; // Current guild
|
||||||
@@ -325,22 +282,7 @@ union
|
|||||||
/*0340*/ uint32 spawnId; // Spawn Id
|
/*0340*/ uint32 spawnId; // Spawn Id
|
||||||
/*0344*/ uint8 unknown0344[3];
|
/*0344*/ uint8 unknown0344[3];
|
||||||
/*0347*/ uint8 IsMercenary;
|
/*0347*/ uint8 IsMercenary;
|
||||||
/*0348*/ union
|
/*0348*/ EQEmu::TintProfile equipment_tint;
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
/*0348*/ Color_Struct color_helmet; // Color of helmet item
|
|
||||||
/*0352*/ Color_Struct color_chest; // Color of chest item
|
|
||||||
/*0356*/ Color_Struct color_arms; // Color of arms item
|
|
||||||
/*0360*/ Color_Struct color_bracers; // Color of bracers item
|
|
||||||
/*0364*/ Color_Struct color_hands; // Color of hands item
|
|
||||||
/*0368*/ Color_Struct color_legs; // Color of legs item
|
|
||||||
/*0372*/ Color_Struct color_feet; // Color of feet item
|
|
||||||
/*0376*/ Color_Struct color_primary; // Color of primary item
|
|
||||||
/*0380*/ Color_Struct color_secondary; // Color of secondary item
|
|
||||||
} equipment_colors;
|
|
||||||
/*0348*/ Color_Struct colors[EQEmu::legacy::MaterialCount]; // Array elements correspond to struct equipment_colors above
|
|
||||||
};
|
|
||||||
/*0384*/ uint8 lfg; // 0=off, 1=lfg on
|
/*0384*/ uint8 lfg; // 0=off, 1=lfg on
|
||||||
/*0385*/
|
/*0385*/
|
||||||
|
|
||||||
@@ -445,7 +387,19 @@ struct MemorizeSpell_Struct {
|
|||||||
uint32 slot; // Spot in the spell book/memorized slot
|
uint32 slot; // Spot in the spell book/memorized slot
|
||||||
uint32 spell_id; // Spell id (200 or c8 is minor healing, etc)
|
uint32 spell_id; // Spell id (200 or c8 is minor healing, etc)
|
||||||
uint32 scribing; // 1 if memorizing a spell, set to 0 if scribing to book, 2 if un-memming
|
uint32 scribing; // 1 if memorizing a spell, set to 0 if scribing to book, 2 if un-memming
|
||||||
uint32 unknown12;
|
uint32 reduction; // lower reuse
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Linked Spell Reuse Timer
|
||||||
|
** Length: 12
|
||||||
|
** Comes before the OP_Memorize
|
||||||
|
** Live (maybe TDS steam) has an extra DWORD after timer_id
|
||||||
|
*/
|
||||||
|
struct LinkedSpellReuseTimer_Struct {
|
||||||
|
uint32 timer_id; // Timer ID of the spell
|
||||||
|
uint32 end_time; // timestamp of when it will be ready
|
||||||
|
uint32 start_time; // timestamp of when it started
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -478,10 +432,11 @@ struct DeleteSpell_Struct
|
|||||||
|
|
||||||
struct ManaChange_Struct
|
struct ManaChange_Struct
|
||||||
{
|
{
|
||||||
uint32 new_mana; // New Mana AMount
|
/*00*/ uint32 new_mana; // New Mana AMount
|
||||||
uint32 stamina;
|
/*04*/ uint32 stamina;
|
||||||
uint32 spell_id;
|
/*08*/ uint32 spell_id;
|
||||||
uint32 unknown12;
|
/*12*/ uint8 keepcasting; // won't stop the cast. Change mana while casting?
|
||||||
|
/*13*/ uint8 padding[3]; // client doesn't read it, garbage data seems like
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SwapSpell_Struct
|
struct SwapSpell_Struct
|
||||||
@@ -547,30 +502,28 @@ struct SpawnAppearance_Struct
|
|||||||
// this is used inside profile
|
// this is used inside profile
|
||||||
struct SpellBuff_Struct
|
struct SpellBuff_Struct
|
||||||
{
|
{
|
||||||
/*000*/ uint8 slotid; //badly named... seems to be 2 for a real buff, 0 otherwise
|
/*000*/ uint8 effect_type; // 0 = no buff, 2 = buff, 4 = inverse affects of buff
|
||||||
/*001*/ uint8 level;
|
/*001*/ uint8 level;
|
||||||
/*002*/ uint8 bard_modifier;
|
/*002*/ uint8 bard_modifier;
|
||||||
/*003*/ uint8 effect; //not real
|
/*003*/ uint8 unknown003; // MQ2 used to call this "damage shield" -- don't see client referencing it, so maybe server side DS type tracking? -- OSX client calls this "activated"
|
||||||
/*004*/ uint32 spellid;
|
/*004*/ uint32 spellid;
|
||||||
/*008*/ int32 duration;
|
/*008*/ int32 duration;
|
||||||
/*012*/ uint32 counters;
|
/*012*/ uint32 counters; // single book keeping value (counters, rune/vie)
|
||||||
/*016*/ uint32 player_id; //'global' ID of the caster, for wearoff messages
|
/*016*/ uint32 player_id; // caster ID, pretty sure just zone ID
|
||||||
/*020*/
|
// extra stuff for newer packets
|
||||||
|
/*020*/ uint32 num_hits;
|
||||||
|
/*024*/ float y; // referenced by SPA 441
|
||||||
|
/*028*/ float x; // unsure if all buffs get them
|
||||||
|
/*032*/ float z; // as valid data
|
||||||
|
/*036*/
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SpellBuffFade_Struct {
|
struct SpellBuffPacket_Struct {
|
||||||
/*000*/ uint32 entityid;
|
/*000*/ uint32 entityid;
|
||||||
/*004*/ uint8 slot;
|
/*004*/ SpellBuff_Struct buff;
|
||||||
/*005*/ uint8 level;
|
/*040*/ uint32 slotid;
|
||||||
/*006*/ uint8 effect;
|
/*044*/ uint32 bufffade;
|
||||||
/*007*/ uint8 unknown7;
|
/*048*/
|
||||||
/*008*/ uint32 spellid;
|
|
||||||
/*012*/ int32 duration;
|
|
||||||
/*016*/ uint32 num_hits;
|
|
||||||
/*020*/ uint32 unknown020; //prolly global player ID
|
|
||||||
/*024*/ uint32 slotid;
|
|
||||||
/*028*/ uint32 bufffade;
|
|
||||||
/*032*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Underfoot & later struct.
|
// Underfoot & later struct.
|
||||||
@@ -583,8 +536,8 @@ struct BuffRemoveRequest_Struct
|
|||||||
|
|
||||||
struct PetBuff_Struct {
|
struct PetBuff_Struct {
|
||||||
/*000*/ uint32 petid;
|
/*000*/ uint32 petid;
|
||||||
/*004*/ uint32 spellid[BUFF_COUNT+5];
|
/*004*/ uint32 spellid[PET_BUFF_COUNT];
|
||||||
/*124*/ int32 ticsremaining[BUFF_COUNT+5];
|
/*124*/ int32 ticsremaining[PET_BUFF_COUNT];
|
||||||
/*244*/ uint32 buffcount;
|
/*244*/ uint32 buffcount;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -881,7 +834,7 @@ struct SuspendedMinion_Struct
|
|||||||
/*002*/ uint32 HP;
|
/*002*/ uint32 HP;
|
||||||
/*006*/ uint32 Mana;
|
/*006*/ uint32 Mana;
|
||||||
/*010*/ SpellBuff_Struct Buffs[BUFF_COUNT];
|
/*010*/ SpellBuff_Struct Buffs[BUFF_COUNT];
|
||||||
/*510*/ uint32 Items[EQEmu::legacy::MaterialCount];
|
/*510*/ EQEmu::TextureMaterialProfile Items;
|
||||||
/*546*/ char Name[64];
|
/*546*/ char Name[64];
|
||||||
/*610*/
|
/*610*/
|
||||||
};
|
};
|
||||||
@@ -895,7 +848,7 @@ struct SuspendedMinion_Struct
|
|||||||
*/
|
*/
|
||||||
static const uint32 MAX_PP_LANGUAGE = 28;
|
static const uint32 MAX_PP_LANGUAGE = 28;
|
||||||
static const uint32 MAX_PP_SPELLBOOK = 480; // Set for all functions
|
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_MEMSPELL = static_cast<uint32>(EQEmu::CastingSlot::MaxGems); // Set to latest client so functions can work right -- 12
|
||||||
static const uint32 MAX_PP_REF_SPELLBOOK = 480; // Set for Player Profile size retain
|
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_REF_MEMSPELL = 9; // Set for Player Profile size retain
|
||||||
|
|
||||||
@@ -976,7 +929,7 @@ struct PlayerProfile_Struct
|
|||||||
/*0245*/ uint8 guildbanker;
|
/*0245*/ uint8 guildbanker;
|
||||||
/*0246*/ uint8 unknown0246[6]; //
|
/*0246*/ uint8 unknown0246[6]; //
|
||||||
/*0252*/ uint32 intoxication;
|
/*0252*/ uint32 intoxication;
|
||||||
/*0256*/ uint32 spellSlotRefresh[MAX_PP_REF_MEMSPELL]; //in ms
|
/*0256*/ uint32 spellSlotRefresh[MAX_PP_MEMSPELL]; //in ms
|
||||||
/*0292*/ uint32 abilitySlotRefresh;
|
/*0292*/ uint32 abilitySlotRefresh;
|
||||||
/*0296*/ uint8 haircolor; // Player hair color
|
/*0296*/ uint8 haircolor; // Player hair color
|
||||||
/*0297*/ uint8 beardcolor; // Player beard color
|
/*0297*/ uint8 beardcolor; // Player beard color
|
||||||
@@ -989,9 +942,9 @@ struct PlayerProfile_Struct
|
|||||||
/*0304*/ uint8 ability_time_minutes;
|
/*0304*/ uint8 ability_time_minutes;
|
||||||
/*0305*/ uint8 ability_time_hours; //place holder
|
/*0305*/ uint8 ability_time_hours; //place holder
|
||||||
/*0306*/ uint8 unknown0306[6]; // @bp Spacer/Flag?
|
/*0306*/ uint8 unknown0306[6]; // @bp Spacer/Flag?
|
||||||
/*0312*/ uint32 item_material[EQEmu::legacy::MaterialCount]; // Item texture/material of worn/held items
|
/*0312*/ EQEmu::TextureMaterialProfile item_material; // Item texture/material of worn/held items
|
||||||
/*0348*/ uint8 unknown0348[44];
|
/*0348*/ uint8 unknown0348[44];
|
||||||
/*0392*/ Color_Struct item_tint[EQEmu::legacy::MaterialCount];
|
/*0392*/ EQEmu::TintProfile item_tint;
|
||||||
/*0428*/ AA_Array aa_array[MAX_PP_AA_ARRAY];
|
/*0428*/ AA_Array aa_array[MAX_PP_AA_ARRAY];
|
||||||
/*2348*/ float unknown2384; //seen ~128, ~47
|
/*2348*/ float unknown2384; //seen ~128, ~47
|
||||||
/*2352*/ char servername[32]; // length probably not right
|
/*2352*/ char servername[32]; // length probably not right
|
||||||
@@ -1017,7 +970,7 @@ struct PlayerProfile_Struct
|
|||||||
/*2580*/ uint8 unknown2616[4];
|
/*2580*/ uint8 unknown2616[4];
|
||||||
/*2584*/ uint32 spell_book[MAX_PP_REF_SPELLBOOK];
|
/*2584*/ uint32 spell_book[MAX_PP_REF_SPELLBOOK];
|
||||||
/*4504*/ uint8 unknown4540[128]; // Was [428] all 0xff
|
/*4504*/ uint8 unknown4540[128]; // Was [428] all 0xff
|
||||||
/*4632*/ uint32 mem_spells[MAX_PP_REF_MEMSPELL];
|
/*4632*/ uint32 mem_spells[MAX_PP_MEMSPELL];
|
||||||
/*4668*/ uint8 unknown4704[32]; //
|
/*4668*/ uint8 unknown4704[32]; //
|
||||||
/*4700*/ float y; // Player y position
|
/*4700*/ float y; // Player y position
|
||||||
/*4704*/ float x; // Player x position
|
/*4704*/ float x; // Player x position
|
||||||
@@ -1226,7 +1179,7 @@ struct WearChange_Struct{
|
|||||||
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
|
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
|
||||||
/*014*/ uint32 hero_forge_model; // New to VoA
|
/*014*/ uint32 hero_forge_model; // New to VoA
|
||||||
/*018*/ uint32 unknown18; // New to RoF
|
/*018*/ uint32 unknown18; // New to RoF
|
||||||
/*022*/ Color_Struct color;
|
/*022*/ EQEmu::textures::Tint_Struct color;
|
||||||
/*026*/ uint8 wear_slot_id;
|
/*026*/ uint8 wear_slot_id;
|
||||||
/*027*/
|
/*027*/
|
||||||
};
|
};
|
||||||
@@ -1522,7 +1475,7 @@ enum ItemPacketType
|
|||||||
ItemPacketLoot = 0x66,
|
ItemPacketLoot = 0x66,
|
||||||
ItemPacketTrade = 0x67,
|
ItemPacketTrade = 0x67,
|
||||||
ItemPacketCharInventory = 0x69,
|
ItemPacketCharInventory = 0x69,
|
||||||
ItemPacketSummonItem = 0x6A,
|
ItemPacketLimbo = 0x6A,
|
||||||
ItemPacketWorldContainer = 0x6B,
|
ItemPacketWorldContainer = 0x6B,
|
||||||
ItemPacketTributeItem = 0x6C,
|
ItemPacketTributeItem = 0x6C,
|
||||||
ItemPacketGuildTribute = 0x6D,
|
ItemPacketGuildTribute = 0x6D,
|
||||||
@@ -1536,15 +1489,15 @@ enum ItemPacketType
|
|||||||
// ItemPacketTradeView = /*101*/ 0x65,
|
// ItemPacketTradeView = /*101*/ 0x65,
|
||||||
// ItemPacketLoot = /*102*/ 0x66,
|
// ItemPacketLoot = /*102*/ 0x66,
|
||||||
// ItemPacketTrade = /*103*/ 0x67,
|
// ItemPacketTrade = /*103*/ 0x67,
|
||||||
// ItemPacketCharInventory = /*105*/ 0x69,
|
// ItemPacketCharInventory = /*105*/ 0x69, // 105 looks like raw item packet (no appearance update) thru shared bank..110, possibly possessions with appearance update
|
||||||
// ItemPacketLimbo = /*106*/ 0x6A, // name change
|
// ItemPacketLimbo = /*106*/ 0x6A,
|
||||||
// ItemPacketWorldContainer = /*107*/ 0x6B,
|
// ItemPacketWorldContainer = /*107*/ 0x6B,
|
||||||
// ItemPacketTributeItem = /*108*/ 0x6C,
|
// ItemPacketTributeItem = /*108*/ 0x6C,
|
||||||
// ItemPacketGuildTribute = /*109*/ 0x6D, // missing from EQEmu
|
// ItemPacketGuildTribute = /*109*/ 0x6D, // missing from EQEmu
|
||||||
// ItemPacket10 = /*110*/ 0x6E,
|
// ItemPacket10 = /*110*/ 0x6E,
|
||||||
// ItemPacket11 = /*111*/ 0x6F, // UF+ (equipment slots only) (RoF+ checks '(WORD*)slot + 4 != -1' [(WORD*)]slot + 2 would be bag index - if used) (guess)
|
// ItemPacket11 = /*111*/ 0x6F, // UF+ (equipment slots only) (RoF+ checks '(WORD*)slot + 4 != -1' [(WORD*)]slot + 2 would be bag index - if used) (guess) (appearance (over-level) items?)
|
||||||
// ItemPacket12 = /*112*/ 0x70, // RoF+ (causes stat update) (could be TrophyTribute and GuildTrophyTribute together - two case methodology - is it checking for GuildID?)
|
// ItemPacket12 = /*112*/ 0x70, // RoF+ (causes stat update) (could be TrophyTribute and GuildTrophyTribute together - two case methodology - is it checking for GuildID?)
|
||||||
// ItemPacketRecovery = /*113*/ 0x71, (same handler as merchant..exception: parameter is '1' versus merchant '0' looks like tab id)
|
// ItemPacketMerchantRecovery = /*113*/ 0x71,
|
||||||
// ItemPacket14 = /*115*/ 0x73, (real estate/moving crate?)
|
// ItemPacket14 = /*115*/ 0x73, (real estate/moving crate?)
|
||||||
// ItemPacket__ = /*xxx*/ 0xXX // switch 'default' - all clients
|
// ItemPacket__ = /*xxx*/ 0xXX // switch 'default' - all clients
|
||||||
//};
|
//};
|
||||||
@@ -1690,7 +1643,7 @@ struct LootingItem_Struct {
|
|||||||
/*002*/ uint32 looter;
|
/*002*/ uint32 looter;
|
||||||
/*004*/ uint16 slot_id;
|
/*004*/ uint16 slot_id;
|
||||||
/*006*/ uint8 unknown3[2];
|
/*006*/ uint8 unknown3[2];
|
||||||
/*008*/ uint32 auto_loot;
|
/*008*/ int32 auto_loot;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GuildManageStatus_Struct{
|
struct GuildManageStatus_Struct{
|
||||||
@@ -1981,8 +1934,7 @@ struct Merchant_Sell_Struct {
|
|||||||
/*004*/ uint32 playerid; // Player's entity id
|
/*004*/ uint32 playerid; // Player's entity id
|
||||||
/*008*/ uint32 itemslot;
|
/*008*/ uint32 itemslot;
|
||||||
uint32 unknown12;
|
uint32 unknown12;
|
||||||
/*016*/ uint8 quantity; // Already sold
|
/*016*/ uint32 quantity;
|
||||||
/*017*/ uint8 Unknown016[3];
|
|
||||||
/*020*/ uint32 price;
|
/*020*/ uint32 price;
|
||||||
};
|
};
|
||||||
struct Merchant_Purchase_Struct {
|
struct Merchant_Purchase_Struct {
|
||||||
@@ -2119,7 +2071,7 @@ struct AdventureLeaderboard_Struct
|
|||||||
/*struct Item_Shop_Struct {
|
/*struct Item_Shop_Struct {
|
||||||
uint16 merchantid;
|
uint16 merchantid;
|
||||||
uint8 itemtype;
|
uint8 itemtype;
|
||||||
EQEmu::Item_Struct item;
|
EQEmu::ItemData item;
|
||||||
uint8 iss_unknown001[6];
|
uint8 iss_unknown001[6];
|
||||||
};*/
|
};*/
|
||||||
|
|
||||||
@@ -2145,7 +2097,7 @@ struct Illusion_Struct { //size: 256 - SoF
|
|||||||
/*092*/ uint32 drakkin_heritage; //
|
/*092*/ uint32 drakkin_heritage; //
|
||||||
/*096*/ uint32 drakkin_tattoo; //
|
/*096*/ uint32 drakkin_tattoo; //
|
||||||
/*100*/ uint32 drakkin_details; //
|
/*100*/ uint32 drakkin_details; //
|
||||||
/*104*/ uint32 armor_tint[EQEmu::legacy::MaterialCount]; //
|
/*104*/ EQEmu::TintProfile armor_tint; //
|
||||||
/*140*/ uint8 eyecolor1; // Field Not Identified in any Illusion Struct
|
/*140*/ uint8 eyecolor1; // Field Not Identified in any Illusion Struct
|
||||||
/*141*/ uint8 eyecolor2; // Field Not Identified in any Illusion Struct
|
/*141*/ uint8 eyecolor2; // Field Not Identified in any Illusion Struct
|
||||||
/*142*/ uint8 unknown138[114]; //
|
/*142*/ uint8 unknown138[114]; //
|
||||||
@@ -2291,6 +2243,7 @@ struct GroupFollow_Struct { // SoF Follow Struct
|
|||||||
/*0132*/
|
/*0132*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// this is generic struct
|
||||||
struct GroupLeaderChange_Struct
|
struct GroupLeaderChange_Struct
|
||||||
{
|
{
|
||||||
/*000*/ char Unknown000[64];
|
/*000*/ char Unknown000[64];
|
||||||
@@ -2543,6 +2496,7 @@ struct BookRequest_Struct {
|
|||||||
uint8 window; // where to display the text (0xFF means new window)
|
uint8 window; // where to display the text (0xFF means new window)
|
||||||
uint8 type; //type: 0=scroll, 1=book, 2=item info.. prolly others.
|
uint8 type; //type: 0=scroll, 1=book, 2=item info.. prolly others.
|
||||||
uint32 invslot; // Only used in Sof and later clients;
|
uint32 invslot; // Only used in Sof and later clients;
|
||||||
|
int16 subslot; // The subslot inside of a bag if it is inside one.
|
||||||
char txtfile[20];
|
char txtfile[20];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2556,23 +2510,25 @@ struct BookRequest_Struct {
|
|||||||
*/
|
*/
|
||||||
struct Object_Struct {
|
struct Object_Struct {
|
||||||
/*00*/ uint32 linked_list_addr[2];// They are, get this, prev and next, ala linked list
|
/*00*/ uint32 linked_list_addr[2];// They are, get this, prev and next, ala linked list
|
||||||
/*08*/ uint16 size; //
|
/*08*/ float size; //
|
||||||
/*10*/ uint16 solidtype; //
|
/*10*/ uint16 solidtype; //
|
||||||
/*12*/ uint32 drop_id; // Unique object id for zone
|
/*12*/ uint32 drop_id; // Unique object id for zone
|
||||||
/*16*/ uint16 zone_id; // Redudant, but: Zone the object appears in
|
/*16*/ uint16 zone_id; // Redudant, but: Zone the object appears in
|
||||||
/*18*/ uint16 zone_instance; //
|
/*18*/ uint16 zone_instance; //
|
||||||
/*20*/ uint32 unknown020; //
|
/*20*/ uint32 unknown020; //
|
||||||
/*24*/ uint32 unknown024; //
|
/*24*/ uint32 unknown024; //
|
||||||
/*28*/ float heading; // heading
|
/*28*/ float tilt_x;
|
||||||
/*32*/ float z; // z coord
|
/*32*/ float tilt_y;
|
||||||
/*36*/ float x; // x coord
|
/*36*/ float heading; // heading
|
||||||
/*40*/ float y; // y coord
|
/*40*/ float z; // z coord
|
||||||
/*44*/ char object_name[32]; // Name of object, usually something like IT63_ACTORDEF
|
/*44*/ float x; // x coord
|
||||||
/*76*/ uint32 unknown076; //
|
/*76*/ float y; // y coord
|
||||||
/*80*/ uint32 object_type; // Type of object, not directly translated to OP_OpenObject
|
/*80*/ char object_name[32]; // Name of object, usually something like IT63_ACTORDEF
|
||||||
/*84*/ uint32 unknown084; //set to 0xFF
|
/*84*/ uint32 unknown076; //
|
||||||
/*88*/ uint32 spawn_id; // Spawn Id of client interacting with object
|
/*88*/ uint32 object_type; // Type of object, not directly translated to OP_OpenObject
|
||||||
/*92*/
|
/*92*/ uint32 unknown084; //set to 0xFF
|
||||||
|
uint32 spawn_id; // Spawn Id of client interacting with object
|
||||||
|
|
||||||
};
|
};
|
||||||
// 01 = generic drop, 02 = armor, 19 = weapon
|
// 01 = generic drop, 02 = armor, 19 = weapon
|
||||||
//[13:40] and 0xff seems to be indicative of the tradeskill/openable items that end up returning the old style item type in the OP_OpenObject
|
//[13:40] and 0xff seems to be indicative of the tradeskill/openable items that end up returning the old style item type in the OP_OpenObject
|
||||||
@@ -3415,27 +3371,6 @@ struct PetitionBug_Struct{
|
|||||||
char text[1028];
|
char text[1028];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DyeStruct
|
|
||||||
{
|
|
||||||
union
|
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
struct Color_Struct head;
|
|
||||||
struct Color_Struct chest;
|
|
||||||
struct Color_Struct arms;
|
|
||||||
struct Color_Struct wrists;
|
|
||||||
struct Color_Struct hands;
|
|
||||||
struct Color_Struct legs;
|
|
||||||
struct Color_Struct feet;
|
|
||||||
struct Color_Struct primary; // you can't actually dye this
|
|
||||||
struct Color_Struct secondary; // or this
|
|
||||||
}
|
|
||||||
dyes;
|
|
||||||
struct Color_Struct dye[EQEmu::legacy::MaterialCount];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ApproveZone_Struct {
|
struct ApproveZone_Struct {
|
||||||
char name[64];
|
char name[64];
|
||||||
uint32 zoneid;
|
uint32 zoneid;
|
||||||
@@ -3584,6 +3519,20 @@ struct RecipeAutoCombine_Struct {
|
|||||||
// f5 ff ff ff in 'you dont have all the stuff' reply
|
// f5 ff ff ff in 'you dont have all the stuff' reply
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// this is the "value#a" data
|
||||||
|
enum EParticlePoint {
|
||||||
|
eDefault,
|
||||||
|
eChest,
|
||||||
|
eHead,
|
||||||
|
eLeftHand,
|
||||||
|
eRigthHand,
|
||||||
|
eLeftFoot,
|
||||||
|
eRightFood,
|
||||||
|
eLeftEye,
|
||||||
|
eRightEye,
|
||||||
|
eMouth
|
||||||
|
};
|
||||||
|
|
||||||
struct LevelAppearance_Struct { //Sends a little graphic on level up
|
struct LevelAppearance_Struct { //Sends a little graphic on level up
|
||||||
uint32 spawn_id;
|
uint32 spawn_id;
|
||||||
uint32 parm1;
|
uint32 parm1;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
//this is the only part of an EQStream that is seen by the application.
|
//this is the only part of an EQStream that is seen by the application.
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "client_version.h" // inv2 watch
|
#include "emu_versions.h"
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
ESTABLISHED,
|
ESTABLISHED,
|
||||||
|
|||||||
+25
-32
@@ -123,26 +123,21 @@ void EQEmuLogSys::LoadLogSettingsDefaults()
|
|||||||
|
|
||||||
std::string EQEmuLogSys::FormatOutMessageString(uint16 log_category, const std::string &in_message)
|
std::string EQEmuLogSys::FormatOutMessageString(uint16 log_category, const std::string &in_message)
|
||||||
{
|
{
|
||||||
std::string category_string;
|
std::string ret;
|
||||||
if (log_category > 0 && Logs::LogCategoryName[log_category])
|
ret.push_back('[');
|
||||||
category_string = StringFormat("[%s] ", Logs::LogCategoryName[log_category]);
|
ret.append(Logs::LogCategoryName[log_category]);
|
||||||
return StringFormat("%s%s", category_string.c_str(), in_message.c_str());
|
ret.push_back(']');
|
||||||
|
ret.push_back(' ');
|
||||||
|
ret.append(in_message);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EQEmuLogSys::ProcessGMSay(uint16 debug_level, uint16 log_category, const std::string &message)
|
void EQEmuLogSys::ProcessGMSay(uint16 debug_level, uint16 log_category, const std::string &message)
|
||||||
{
|
{
|
||||||
/* Check if category enabled for process */
|
|
||||||
if (log_settings[log_category].log_to_gmsay == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* Enabling Netcode based GMSay output creates a feedback loop that ultimately ends in a crash */
|
/* Enabling Netcode based GMSay output creates a feedback loop that ultimately ends in a crash */
|
||||||
if (log_category == Logs::LogCategory::Netcode)
|
if (log_category == Logs::LogCategory::Netcode)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Make sure the message inbound is at a debug level we're set at */
|
|
||||||
if (log_settings[log_category].log_to_gmsay < debug_level)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* Check to see if the process that actually ran this is zone */
|
/* Check to see if the process that actually ran this is zone */
|
||||||
if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformZone)
|
if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformZone)
|
||||||
on_log_gmsay_hook(log_category, message);
|
on_log_gmsay_hook(log_category, message);
|
||||||
@@ -160,14 +155,6 @@ void EQEmuLogSys::ProcessLogWrite(uint16 debug_level, uint16 log_category, const
|
|||||||
crash_log.close();
|
crash_log.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check if category enabled for process */
|
|
||||||
if (log_settings[log_category].log_to_file == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* Make sure the message inbound is at a debug level we're set at */
|
|
||||||
if (log_settings[log_category].log_to_file < debug_level)
|
|
||||||
return;
|
|
||||||
|
|
||||||
char time_stamp[80];
|
char time_stamp[80];
|
||||||
EQEmuLogSys::SetCurrentTimeStamp(time_stamp);
|
EQEmuLogSys::SetCurrentTimeStamp(time_stamp);
|
||||||
|
|
||||||
@@ -246,13 +233,6 @@ uint16 EQEmuLogSys::GetGMSayColorFromCategory(uint16 log_category) {
|
|||||||
|
|
||||||
void EQEmuLogSys::ProcessConsoleMessage(uint16 debug_level, uint16 log_category, const std::string &message)
|
void EQEmuLogSys::ProcessConsoleMessage(uint16 debug_level, uint16 log_category, const std::string &message)
|
||||||
{
|
{
|
||||||
/* Check if category enabled for process */
|
|
||||||
if (log_settings[log_category].log_to_console == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* Make sure the message inbound is at a debug level we're set at */
|
|
||||||
if (log_settings[log_category].log_to_console < debug_level)
|
|
||||||
return;
|
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
HANDLE console_handle;
|
HANDLE console_handle;
|
||||||
@@ -273,12 +253,25 @@ void EQEmuLogSys::ProcessConsoleMessage(uint16 debug_level, uint16 log_category,
|
|||||||
|
|
||||||
void EQEmuLogSys::Out(Logs::DebugLevel debug_level, uint16 log_category, std::string message, ...)
|
void EQEmuLogSys::Out(Logs::DebugLevel debug_level, uint16 log_category, std::string message, ...)
|
||||||
{
|
{
|
||||||
const bool log_to_console = log_settings[log_category].log_to_console > 0;
|
|
||||||
const bool log_to_file = log_settings[log_category].log_to_file > 0;
|
|
||||||
const bool log_to_gmsay = log_settings[log_category].log_to_gmsay > 0;
|
|
||||||
const bool nothing_to_log = !log_to_console && !log_to_file && !log_to_gmsay;
|
|
||||||
|
|
||||||
if (nothing_to_log) return;
|
bool log_to_console = true;
|
||||||
|
if (log_settings[log_category].log_to_console < debug_level) {
|
||||||
|
log_to_console = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool log_to_file = true;
|
||||||
|
if (log_settings[log_category].log_to_file < debug_level) {
|
||||||
|
log_to_file = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool log_to_gmsay = true;
|
||||||
|
if (log_settings[log_category].log_to_gmsay < debug_level) {
|
||||||
|
log_to_gmsay = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const bool nothing_to_log = !log_to_console && !log_to_file && !log_to_gmsay;
|
||||||
|
if (nothing_to_log)
|
||||||
|
return;
|
||||||
|
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, message);
|
va_start(args, message);
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ namespace Logs {
|
|||||||
Server_Client_Packet_With_Dump,
|
Server_Client_Packet_With_Dump,
|
||||||
Client_Server_Packet_With_Dump,
|
Client_Server_Packet_With_Dump,
|
||||||
Login_Server,
|
Login_Server,
|
||||||
|
Client_Login,
|
||||||
MaxCategoryID /* Don't Remove this*/
|
MaxCategoryID /* Don't Remove this*/
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -131,7 +132,8 @@ namespace Logs {
|
|||||||
"Packet :: Client -> Server Unhandled",
|
"Packet :: Client -> Server Unhandled",
|
||||||
"Packet :: Server -> Client (Dump)",
|
"Packet :: Server -> Client (Dump)",
|
||||||
"Packet :: Client -> Server (Dump)",
|
"Packet :: Client -> Server (Dump)",
|
||||||
"Login Server"
|
"Login Server",
|
||||||
|
"Client Login"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -19,7 +19,7 @@
|
|||||||
#define EXTENDED_PROFILE_H
|
#define EXTENDED_PROFILE_H
|
||||||
|
|
||||||
#include "eq_packet_structs.h"
|
#include "eq_packet_structs.h"
|
||||||
#include "item.h"
|
#include "inventory_profile.h"
|
||||||
|
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ struct ExtendedProfile_Struct {
|
|||||||
uint16 old_pet_hp; /* Not Used */
|
uint16 old_pet_hp; /* Not Used */
|
||||||
uint16 old_pet_mana; /* Not Used */
|
uint16 old_pet_mana; /* Not Used */
|
||||||
SpellBuff_Struct pet_buffs[BUFF_COUNT]; /* Not Used */
|
SpellBuff_Struct pet_buffs[BUFF_COUNT]; /* Not Used */
|
||||||
uint32 pet_items[EQEmu::legacy::MaterialCount]; /* Not Used */
|
EQEmu::TextureMaterialProfile pet_items; /* Not Used */
|
||||||
char merc_name[64]; /* Used */
|
char merc_name[64]; /* Used */
|
||||||
|
|
||||||
uint32 aa_effects; /* Used */
|
uint32 aa_effects; /* Used */
|
||||||
|
|||||||
+5
-2
@@ -213,8 +213,8 @@ enum { //some random constants
|
|||||||
#define MAX_NPC_FACTIONS 20
|
#define MAX_NPC_FACTIONS 20
|
||||||
|
|
||||||
//individual faction pool
|
//individual faction pool
|
||||||
#define MAX_PERSONAL_FACTION 1200
|
#define MAX_PERSONAL_FACTION 2000
|
||||||
#define MIN_PERSONAL_FACTION -3000
|
#define MIN_PERSONAL_FACTION -2000
|
||||||
|
|
||||||
//The Level Cap:
|
//The Level Cap:
|
||||||
//#define LEVEL_CAP RuleI(Character, MaxLevel) //hard cap is 127
|
//#define LEVEL_CAP RuleI(Character, MaxLevel) //hard cap is 127
|
||||||
@@ -235,6 +235,9 @@ enum { //some random constants
|
|||||||
|
|
||||||
#define ZONE_CONTROLLER_NPC_ID 10
|
#define ZONE_CONTROLLER_NPC_ID 10
|
||||||
|
|
||||||
|
// Timer to update aggrometer
|
||||||
|
#define AGGRO_METER_UPDATE_MS 1000
|
||||||
|
|
||||||
//Some hard coded statuses from commands and other places:
|
//Some hard coded statuses from commands and other places:
|
||||||
enum {
|
enum {
|
||||||
minStatusToBeGM = 40,
|
minStatusToBeGM = 40,
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,230 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 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 04111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
// @merth notes:
|
||||||
|
// These classes could be optimized with database reads/writes by storing
|
||||||
|
// a status flag indicating how object needs to interact with database
|
||||||
|
|
||||||
|
#ifndef COMMON_INVENTORY_PROFILE_H
|
||||||
|
#define COMMON_INVENTORY_PROFILE_H
|
||||||
|
|
||||||
|
|
||||||
|
#include "item_instance.h"
|
||||||
|
|
||||||
|
#include <list>
|
||||||
|
|
||||||
|
|
||||||
|
//FatherNitwit: location bits for searching specific
|
||||||
|
//places with HasItem() and HasItemByUse()
|
||||||
|
enum {
|
||||||
|
invWhereWorn = 0x01,
|
||||||
|
invWherePersonal = 0x02, //in the character's inventory
|
||||||
|
invWhereBank = 0x04,
|
||||||
|
invWhereSharedBank = 0x08,
|
||||||
|
invWhereTrading = 0x10,
|
||||||
|
invWhereCursor = 0x20
|
||||||
|
};
|
||||||
|
|
||||||
|
// ########################################
|
||||||
|
// Class: Queue
|
||||||
|
// Queue that allows a read-only iterator
|
||||||
|
class ItemInstQueue
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
~ItemInstQueue();
|
||||||
|
/////////////////////////
|
||||||
|
// Public Methods
|
||||||
|
/////////////////////////
|
||||||
|
|
||||||
|
inline std::list<EQEmu::ItemInstance*>::const_iterator cbegin() { return m_list.cbegin(); }
|
||||||
|
inline std::list<EQEmu::ItemInstance*>::const_iterator cend() { return m_list.cend(); }
|
||||||
|
|
||||||
|
inline int size() { return static_cast<int>(m_list.size()); } // TODO: change to size_t
|
||||||
|
inline bool empty() { return m_list.empty(); }
|
||||||
|
|
||||||
|
void push(EQEmu::ItemInstance* inst);
|
||||||
|
void push_front(EQEmu::ItemInstance* inst);
|
||||||
|
EQEmu::ItemInstance* pop();
|
||||||
|
EQEmu::ItemInstance* pop_back();
|
||||||
|
EQEmu::ItemInstance* peek_front() const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
/////////////////////////
|
||||||
|
// Protected Members
|
||||||
|
/////////////////////////
|
||||||
|
|
||||||
|
std::list<EQEmu::ItemInstance*> m_list;
|
||||||
|
};
|
||||||
|
|
||||||
|
// ########################################
|
||||||
|
// Class: EQEmu::InventoryProfile
|
||||||
|
// Character inventory
|
||||||
|
namespace EQEmu
|
||||||
|
{
|
||||||
|
class InventoryProfile
|
||||||
|
{
|
||||||
|
friend class ItemInstance;
|
||||||
|
public:
|
||||||
|
///////////////////////////////
|
||||||
|
// Public Methods
|
||||||
|
///////////////////////////////
|
||||||
|
|
||||||
|
InventoryProfile() { m_mob_version = versions::MobVersion::Unknown; m_mob_version_set = false; }
|
||||||
|
~InventoryProfile();
|
||||||
|
|
||||||
|
bool SetInventoryVersion(versions::MobVersion inventory_version) {
|
||||||
|
if (!m_mob_version_set) {
|
||||||
|
m_mob_version = versions::ValidateMobVersion(inventory_version);
|
||||||
|
return (m_mob_version_set = true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bool SetInventoryVersion(versions::ClientVersion client_version) { return SetInventoryVersion(versions::ConvertClientVersionToMobVersion(client_version)); }
|
||||||
|
|
||||||
|
versions::MobVersion InventoryVersion() { return m_mob_version; }
|
||||||
|
|
||||||
|
static void CleanDirty();
|
||||||
|
static void MarkDirty(ItemInstance *inst);
|
||||||
|
|
||||||
|
// Retrieve a writeable item at specified slot
|
||||||
|
ItemInstance* GetItem(int16 slot_id) const;
|
||||||
|
ItemInstance* GetItem(int16 slot_id, uint8 bagidx) const;
|
||||||
|
|
||||||
|
inline std::list<ItemInstance*>::const_iterator cursor_cbegin() { return m_cursor.cbegin(); }
|
||||||
|
inline std::list<ItemInstance*>::const_iterator cursor_cend() { return m_cursor.cend(); }
|
||||||
|
|
||||||
|
inline int CursorSize() { return m_cursor.size(); }
|
||||||
|
inline bool CursorEmpty() { return m_cursor.empty(); }
|
||||||
|
|
||||||
|
// Retrieve a read-only item from inventory
|
||||||
|
inline const ItemInstance* operator[](int16 slot_id) const { return GetItem(slot_id); }
|
||||||
|
|
||||||
|
// Add item to inventory
|
||||||
|
int16 PutItem(int16 slot_id, const ItemInstance& inst);
|
||||||
|
|
||||||
|
// Add item to cursor queue
|
||||||
|
int16 PushCursor(const ItemInstance& inst);
|
||||||
|
|
||||||
|
// Get cursor item in front of queue
|
||||||
|
ItemInstance* GetCursorItem();
|
||||||
|
|
||||||
|
// Swap items in inventory
|
||||||
|
bool SwapItem(int16 slot_a, int16 slot_b);
|
||||||
|
|
||||||
|
// Remove item from inventory
|
||||||
|
bool DeleteItem(int16 slot_id, uint8 quantity = 0);
|
||||||
|
|
||||||
|
// Checks All items in a bag for No Drop
|
||||||
|
bool CheckNoDrop(int16 slot_id, bool recurse = true);
|
||||||
|
|
||||||
|
// Remove item from inventory (and take control of memory)
|
||||||
|
ItemInstance* PopItem(int16 slot_id);
|
||||||
|
|
||||||
|
// Check whether there is space for the specified number of the specified item.
|
||||||
|
bool HasSpaceForItem(const ItemData *ItemToTry, int16 Quantity);
|
||||||
|
|
||||||
|
// Check whether item exists in inventory
|
||||||
|
// where argument specifies OR'd list of invWhere constants to look
|
||||||
|
int16 HasItem(uint32 item_id, uint8 quantity = 0, uint8 where = 0xFF);
|
||||||
|
|
||||||
|
// Check whether item exists in inventory
|
||||||
|
// where argument specifies OR'd list of invWhere constants to look
|
||||||
|
int16 HasItemByUse(uint8 use, uint8 quantity = 0, uint8 where = 0xFF);
|
||||||
|
|
||||||
|
// Check whether item exists in inventory
|
||||||
|
// where argument specifies OR'd list of invWhere constants to look
|
||||||
|
int16 HasItemByLoreGroup(uint32 loregroup, uint8 where = 0xFF);
|
||||||
|
|
||||||
|
// Locate an available inventory slot
|
||||||
|
int16 FindFreeSlot(bool for_bag, bool try_cursor, uint8 min_size = 0, bool is_arrow = false);
|
||||||
|
int16 FindFreeSlotForTradeItem(const ItemInstance* inst, int16 general_start = legacy::GENERAL_BEGIN, uint8 bag_start = inventory::containerBegin);
|
||||||
|
|
||||||
|
// Calculate slot_id for an item within a bag
|
||||||
|
static int16 CalcSlotId(int16 slot_id); // Calc parent bag's slot_id
|
||||||
|
static int16 CalcSlotId(int16 bagslot_id, uint8 bagidx); // Calc slot_id for item inside bag
|
||||||
|
static uint8 CalcBagIdx(int16 slot_id); // Calc bagidx for slot_id
|
||||||
|
static int16 CalcSlotFromMaterial(uint8 material);
|
||||||
|
static uint8 CalcMaterialFromSlot(int16 equipslot);
|
||||||
|
|
||||||
|
static bool CanItemFitInContainer(const ItemData *ItemToTry, const ItemData *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);
|
||||||
|
|
||||||
|
int GetSlotByItemInst(ItemInstance *inst);
|
||||||
|
|
||||||
|
uint8 FindBrightestLightType();
|
||||||
|
|
||||||
|
void dumpEntireInventory();
|
||||||
|
void dumpWornItems();
|
||||||
|
void dumpInventory();
|
||||||
|
void dumpBankItems();
|
||||||
|
void dumpSharedBankItems();
|
||||||
|
|
||||||
|
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, std::string value);
|
||||||
|
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, int value);
|
||||||
|
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, float value);
|
||||||
|
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, bool value);
|
||||||
|
std::string GetCustomItemData(int16 slot_id, std::string identifier);
|
||||||
|
protected:
|
||||||
|
///////////////////////////////
|
||||||
|
// Protected Methods
|
||||||
|
///////////////////////////////
|
||||||
|
|
||||||
|
int GetSlotByItemInstCollection(const std::map<int16, ItemInstance*> &collection, ItemInstance *inst);
|
||||||
|
void dumpItemCollection(const std::map<int16, ItemInstance*> &collection);
|
||||||
|
void dumpBagContents(ItemInstance *inst, std::map<int16, ItemInstance*>::const_iterator *it);
|
||||||
|
|
||||||
|
// Retrieves item within an inventory bucket
|
||||||
|
ItemInstance* _GetItem(const std::map<int16, ItemInstance*>& bucket, int16 slot_id) const;
|
||||||
|
|
||||||
|
// Private "put" item into bucket, without regard for what is currently in bucket
|
||||||
|
int16 _PutItem(int16 slot_id, ItemInstance* inst);
|
||||||
|
|
||||||
|
// Checks an inventory bucket for a particular item
|
||||||
|
int16 _HasItem(std::map<int16, ItemInstance*>& bucket, uint32 item_id, uint8 quantity);
|
||||||
|
int16 _HasItem(ItemInstQueue& iqueue, uint32 item_id, uint8 quantity);
|
||||||
|
int16 _HasItemByUse(std::map<int16, ItemInstance*>& bucket, uint8 use, uint8 quantity);
|
||||||
|
int16 _HasItemByUse(ItemInstQueue& iqueue, uint8 use, uint8 quantity);
|
||||||
|
int16 _HasItemByLoreGroup(std::map<int16, ItemInstance*>& bucket, uint32 loregroup);
|
||||||
|
int16 _HasItemByLoreGroup(ItemInstQueue& iqueue, uint32 loregroup);
|
||||||
|
|
||||||
|
|
||||||
|
// Player inventory
|
||||||
|
std::map<int16, ItemInstance*> m_worn; // Items worn by character
|
||||||
|
std::map<int16, ItemInstance*> m_inv; // Items in character personal inventory
|
||||||
|
std::map<int16, ItemInstance*> m_bank; // Items in character bank
|
||||||
|
std::map<int16, ItemInstance*> m_shbank; // Items in character shared bank
|
||||||
|
std::map<int16, ItemInstance*> m_trade; // Items in a trade session
|
||||||
|
::ItemInstQueue m_cursor; // Items on cursor: FIFO
|
||||||
|
|
||||||
|
private:
|
||||||
|
// Active mob version
|
||||||
|
versions::MobVersion m_mob_version;
|
||||||
|
bool m_mob_version_set;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /*COMMON_INVENTORY_PROFILE_H*/
|
||||||
@@ -0,0 +1,397 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "inventory_slot.h"
|
||||||
|
#include "textures.h"
|
||||||
|
#include "string_util.h"
|
||||||
|
|
||||||
|
|
||||||
|
int8 EQEmu::inventory::ConvertEquipmentIndexToTextureIndex(int16 slot_index)
|
||||||
|
{
|
||||||
|
switch (slot_index) {
|
||||||
|
case slotHead:
|
||||||
|
return textures::armorHead;
|
||||||
|
case slotChest:
|
||||||
|
return textures::armorChest;
|
||||||
|
case slotArms:
|
||||||
|
return textures::armorArms;
|
||||||
|
case slotWrist1:
|
||||||
|
return textures::armorWrist;
|
||||||
|
case slotHands:
|
||||||
|
return textures::armorHands;
|
||||||
|
case slotLegs:
|
||||||
|
return textures::armorLegs;
|
||||||
|
case slotFeet:
|
||||||
|
return textures::armorFeet;
|
||||||
|
case slotPrimary:
|
||||||
|
return textures::weaponPrimary;
|
||||||
|
case slotSecondary:
|
||||||
|
return textures::weaponSecondary;
|
||||||
|
default:
|
||||||
|
return textures::textureInvalid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int8 EQEmu::inventory::ConvertEquipmentSlotToTextureIndex(const InventorySlot& inventory_slot)
|
||||||
|
{
|
||||||
|
if ((!inventory_slot.Typeless() && !inventory_slot.IsTypeIndex(typePossessions)) || !inventory_slot.IsContainerIndex(containerInvalid) || !inventory_slot.IsSocketIndex(socketInvalid))
|
||||||
|
return textures::textureInvalid;
|
||||||
|
|
||||||
|
return ConvertEquipmentIndexToTextureIndex(inventory_slot.SlotIndex());
|
||||||
|
}
|
||||||
|
|
||||||
|
int16 EQEmu::inventory::ConvertTextureIndexToEquipmentIndex(int8 texture_index)
|
||||||
|
{
|
||||||
|
switch (texture_index) {
|
||||||
|
case textures::armorHead:
|
||||||
|
return slotHead;
|
||||||
|
case textures::armorChest:
|
||||||
|
return slotChest;
|
||||||
|
case textures::armorArms:
|
||||||
|
return slotArms;
|
||||||
|
case textures::armorWrist:
|
||||||
|
return slotWrist1;
|
||||||
|
case textures::armorHands:
|
||||||
|
return slotHands;
|
||||||
|
case textures::armorLegs:
|
||||||
|
return slotLegs;
|
||||||
|
case textures::armorFeet:
|
||||||
|
return slotFeet;
|
||||||
|
case textures::weaponPrimary:
|
||||||
|
return slotPrimary;
|
||||||
|
case textures::weaponSecondary:
|
||||||
|
return slotSecondary;
|
||||||
|
default:
|
||||||
|
return slotInvalid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::InventorySlot::IsValidSlot() const
|
||||||
|
{
|
||||||
|
if (_typeless)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
int16 slot_count = inventory::SlotCount(_type_index);
|
||||||
|
if (!slot_count || _slot_index < inventory::slotBegin || _slot_index >= slot_count)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (_container_index < inventory::containerInvalid || _container_index >= inventory::ContainerCount)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (_socket_index < inventory::socketInvalid || _socket_index >= inventory::SocketCount)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::InventorySlot::IsDeleteSlot() const
|
||||||
|
{
|
||||||
|
if (_typeless)
|
||||||
|
return (_slot_index == inventory::slotInvalid && _container_index == inventory::containerInvalid && _socket_index == inventory::socketInvalid);
|
||||||
|
else
|
||||||
|
return (_type_index == inventory::typeInvalid && _slot_index == inventory::slotInvalid && _container_index == inventory::containerInvalid && _socket_index == inventory::socketInvalid);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::InventorySlot::IsEquipmentIndex(int16 slot_index)
|
||||||
|
{
|
||||||
|
/*if (slot_index < inventory::EquipmentBegin || slot_index > inventory::EquipmentEnd)
|
||||||
|
return false;*/
|
||||||
|
if ((slot_index < legacy::EQUIPMENT_BEGIN || slot_index > legacy::EQUIPMENT_END) && slot_index != legacy::SLOT_POWER_SOURCE)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::InventorySlot::IsGeneralIndex(int16 slot_index)
|
||||||
|
{
|
||||||
|
/*if (slot_index < inventory::GeneralBegin || slot_index > inventory::GeneralEnd)
|
||||||
|
return false;*/
|
||||||
|
if (slot_index < legacy::GENERAL_BEGIN || slot_index > legacy::GENERAL_END)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::InventorySlot::IsCursorIndex(int16 slot_index)
|
||||||
|
{
|
||||||
|
/*if (slot_index != inventory::slotCursor)
|
||||||
|
return false;*/
|
||||||
|
if (slot_index != legacy::SLOT_CURSOR)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::InventorySlot::IsWeaponIndex(int16 slot_index)
|
||||||
|
{
|
||||||
|
/*if ((slot_index != inventory::slotRange) && (slot_index != inventory::slotPrimary) && (slot_index != inventory::slotSecondary))
|
||||||
|
return false;*/
|
||||||
|
if ((slot_index != legacy::SLOT_RANGE) && (slot_index != legacy::SLOT_PRIMARY) && (slot_index != legacy::SLOT_SECONDARY))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::InventorySlot::IsTextureIndex(int16 slot_index)
|
||||||
|
{
|
||||||
|
switch (slot_index) {
|
||||||
|
case inventory::slotHead:
|
||||||
|
case inventory::slotChest:
|
||||||
|
case inventory::slotArms:
|
||||||
|
case inventory::slotWrist1:
|
||||||
|
case inventory::slotHands:
|
||||||
|
case inventory::slotLegs:
|
||||||
|
case inventory::slotFeet:
|
||||||
|
case inventory::slotPrimary:
|
||||||
|
case inventory::slotSecondary:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::InventorySlot::IsTintableIndex(int16 slot_index)
|
||||||
|
{
|
||||||
|
switch (slot_index) {
|
||||||
|
case inventory::slotHead:
|
||||||
|
case inventory::slotChest:
|
||||||
|
case inventory::slotArms:
|
||||||
|
case inventory::slotWrist1:
|
||||||
|
case inventory::slotHands:
|
||||||
|
case inventory::slotLegs:
|
||||||
|
case inventory::slotFeet:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::InventorySlot::IsEquipmentSlot() const
|
||||||
|
{
|
||||||
|
if (!_typeless && (_type_index != inventory::typePossessions))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if ((_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return IsEquipmentIndex(_slot_index);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::InventorySlot::IsGeneralSlot() const
|
||||||
|
{
|
||||||
|
if (!_typeless && (_type_index != inventory::typePossessions))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if ((_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return IsGeneralIndex(_socket_index);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::InventorySlot::IsCursorSlot() const
|
||||||
|
{
|
||||||
|
if (!_typeless && (_type_index != inventory::typePossessions))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if ((_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return IsCursorIndex(_slot_index);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::InventorySlot::IsWeaponSlot() const
|
||||||
|
{
|
||||||
|
if (!_typeless && (_type_index != inventory::typePossessions))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if ((_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return IsWeaponIndex(_slot_index);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::InventorySlot::IsTextureSlot() const
|
||||||
|
{
|
||||||
|
if (!_typeless && (_type_index != inventory::typePossessions))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if ((_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return IsTextureIndex(_slot_index);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::InventorySlot::IsTintableSlot() const
|
||||||
|
{
|
||||||
|
if (!_typeless && (_type_index != inventory::typePossessions))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if ((_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return IsTintableIndex(_slot_index);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::InventorySlot::IsSlot() const
|
||||||
|
{
|
||||||
|
if (!_typeless && (_type_index == inventory::typeInvalid))
|
||||||
|
return false;
|
||||||
|
if (_slot_index == inventory::slotInvalid)
|
||||||
|
return false;
|
||||||
|
if (_container_index != inventory::containerInvalid)
|
||||||
|
return false;
|
||||||
|
if (_socket_index != inventory::socketInvalid)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::InventorySlot::IsSlotSocket() const
|
||||||
|
{
|
||||||
|
if (!_typeless && (_type_index == inventory::typeInvalid))
|
||||||
|
return false;
|
||||||
|
if (_slot_index == inventory::slotInvalid)
|
||||||
|
return false;
|
||||||
|
if (_container_index != inventory::containerInvalid)
|
||||||
|
return false;
|
||||||
|
if (_socket_index == inventory::socketInvalid)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::InventorySlot::IsContainer() const
|
||||||
|
{
|
||||||
|
if (!_typeless && (_type_index == inventory::typeInvalid))
|
||||||
|
return false;
|
||||||
|
if (_slot_index == inventory::slotInvalid)
|
||||||
|
return false;
|
||||||
|
if (_container_index == inventory::containerInvalid)
|
||||||
|
return false;
|
||||||
|
if (_socket_index != inventory::socketInvalid)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::InventorySlot::IsContainerSocket() const
|
||||||
|
{
|
||||||
|
if (!_typeless && (_type_index == inventory::typeInvalid))
|
||||||
|
return false;
|
||||||
|
if (_slot_index == inventory::slotInvalid)
|
||||||
|
return false;
|
||||||
|
if (_container_index == inventory::containerInvalid)
|
||||||
|
return false;
|
||||||
|
if (_socket_index == inventory::socketInvalid)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::InventorySlot EQEmu::InventorySlot::ToTopOwner() const
|
||||||
|
{
|
||||||
|
return InventorySlot(_type_index, _slot_index);
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::InventorySlot EQEmu::InventorySlot::ToOwner() const
|
||||||
|
{
|
||||||
|
if (IsSlot() || IsSlotSocket() || IsContainer())
|
||||||
|
return InventorySlot(_type_index, _slot_index);
|
||||||
|
|
||||||
|
if (IsContainerSocket())
|
||||||
|
return InventorySlot(_type_index, _slot_index, _container_index);
|
||||||
|
|
||||||
|
return InventorySlot();
|
||||||
|
}
|
||||||
|
|
||||||
|
const std::string EQEmu::InventorySlot::ToString() const
|
||||||
|
{
|
||||||
|
return StringFormat("(%i%s, %i, %i, %i)", _type_index, (_typeless ? " [typeless]" : ""), _slot_index, _container_index, _socket_index);
|
||||||
|
}
|
||||||
|
|
||||||
|
const std::string EQEmu::InventorySlot::ToName() const
|
||||||
|
{
|
||||||
|
return StringFormat("InventorySlot - _type_index: %i%s, _slot_index: %i, _container_index: %i, _socket_index: %i", _type_index, (_typeless ? " [typeless]" : ""), _slot_index, _container_index, _socket_index);
|
||||||
|
}
|
||||||
|
|
||||||
|
void EQEmu::InventorySlot::SetInvalidSlot()
|
||||||
|
{
|
||||||
|
_type_index = inventory::typeInvalid;
|
||||||
|
_slot_index = inventory::slotInvalid;
|
||||||
|
_container_index = inventory::containerInvalid;
|
||||||
|
_socket_index = inventory::socketInvalid;
|
||||||
|
}
|
||||||
|
|
||||||
|
//bool EQEmu::InventorySlot::IsBonusIndex(int16 slot_index)
|
||||||
|
//{
|
||||||
|
// if ((slot_index >= inventory::EquipmentBegin) && (slot_index <= inventory::EquipmentEnd) && (slot_index != inventory::slotAmmo))
|
||||||
|
// return true;
|
||||||
|
//
|
||||||
|
// return false;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//bool EQEmu::InventorySlot::IsBonusSlot() const
|
||||||
|
//{
|
||||||
|
// if ((_type_index != inventory::typePossessions) || (_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid))
|
||||||
|
// return false;
|
||||||
|
//
|
||||||
|
// return IsBonusIndex(_slot_index);
|
||||||
|
//}
|
||||||
|
|
||||||
|
bool inventory_slot_typeless_lessthan(const EQEmu::InventorySlot& lhs, const EQEmu::InventorySlot& rhs)
|
||||||
|
{
|
||||||
|
if (lhs.SlotIndex() < rhs.SlotIndex())
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if ((lhs.SlotIndex() == rhs.SlotIndex()) && (lhs.ContainerIndex() < rhs.ContainerIndex()))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if ((lhs.SlotIndex() == rhs.SlotIndex()) && (lhs.ContainerIndex() == rhs.ContainerIndex()) && (lhs.SocketIndex() < rhs.SocketIndex()))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::InventorySlot::operator<(const InventorySlot& rhs) const
|
||||||
|
{
|
||||||
|
if (Typeless() || rhs.Typeless())
|
||||||
|
return inventory_slot_typeless_lessthan(*this, rhs);
|
||||||
|
|
||||||
|
if (TypeIndex() < rhs.TypeIndex())
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if ((TypeIndex() == rhs.TypeIndex()) && (SlotIndex() < rhs.SlotIndex()))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if ((TypeIndex() == rhs.TypeIndex()) && (SlotIndex() == rhs.SlotIndex()) && (ContainerIndex() < rhs.ContainerIndex()))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if ((TypeIndex() == rhs.TypeIndex()) && (SlotIndex() == rhs.SlotIndex()) && (ContainerIndex() == rhs.ContainerIndex()) && (SocketIndex() < rhs.SocketIndex()))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::operator==(const InventorySlot& lhs, const InventorySlot& rhs)
|
||||||
|
{
|
||||||
|
if (lhs.Typeless() || rhs.Typeless())
|
||||||
|
return ((lhs.SlotIndex() == rhs.SlotIndex()) && (lhs.ContainerIndex() == rhs.ContainerIndex()) && (lhs.SocketIndex() == rhs.SocketIndex()));
|
||||||
|
|
||||||
|
return ((lhs.TypeIndex() == rhs.TypeIndex()) && (lhs.SlotIndex() == rhs.SlotIndex()) && (lhs.ContainerIndex() == rhs.ContainerIndex()) && (lhs.SocketIndex() == rhs.SocketIndex()));
|
||||||
|
}
|
||||||
@@ -0,0 +1,133 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 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_INVENTORY_SLOT
|
||||||
|
#define COMMON_INVENTORY_SLOT
|
||||||
|
|
||||||
|
#include "emu_constants.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace EQEmu
|
||||||
|
{
|
||||||
|
class InventorySlot;
|
||||||
|
|
||||||
|
namespace inventory {
|
||||||
|
int8 ConvertEquipmentIndexToTextureIndex(int16 slot_index);
|
||||||
|
int8 ConvertEquipmentSlotToTextureIndex(const InventorySlot& inventory_slot);
|
||||||
|
int16 ConvertTextureIndexToEquipmentIndex(int8 texture_index);
|
||||||
|
}
|
||||||
|
|
||||||
|
class InventorySlot {
|
||||||
|
public:
|
||||||
|
InventorySlot() : _type_index(inventory::typeInvalid), _slot_index(inventory::slotInvalid), _container_index(inventory::containerInvalid), _socket_index(inventory::socketInvalid), _typeless(false) { }
|
||||||
|
InventorySlot(int16 type_index) : _type_index(type_index), _slot_index(inventory::slotInvalid), _container_index(inventory::containerInvalid), _socket_index(inventory::socketInvalid), _typeless(false) { }
|
||||||
|
InventorySlot(int16 type_index, int16 parent_index) : _type_index(type_index), _slot_index(parent_index), _container_index(inventory::containerInvalid), _socket_index(inventory::socketInvalid), _typeless(false) { }
|
||||||
|
InventorySlot(int16 type_index, int16 parent_index, int16 bag_index) : _type_index(type_index), _slot_index(parent_index), _container_index(bag_index), _socket_index(inventory::socketInvalid), _typeless(false) { }
|
||||||
|
InventorySlot(int16 type_index, int16 parent_index, int16 bag_index, int16 aug_index) : _type_index(type_index), _slot_index(parent_index), _container_index(bag_index), _socket_index(aug_index), _typeless(false) { }
|
||||||
|
InventorySlot(const InventorySlot& r) : _type_index(r._type_index), _slot_index(r._slot_index), _container_index(r._container_index), _socket_index(r._socket_index), _typeless(r._typeless) { }
|
||||||
|
InventorySlot(int16 type_index, const InventorySlot& r) : _type_index(type_index), _slot_index(r._slot_index), _container_index(r._container_index), _socket_index(r._socket_index), _typeless(false) { }
|
||||||
|
|
||||||
|
inline int16 TypeIndex() const { return _type_index; }
|
||||||
|
inline int16 SlotIndex() const { return _slot_index; }
|
||||||
|
inline int16 ContainerIndex() const { return _container_index; }
|
||||||
|
inline int16 SocketIndex() const { return _socket_index; }
|
||||||
|
|
||||||
|
bool Typeless() const { return _typeless; }
|
||||||
|
|
||||||
|
bool IsValidSlot() const;
|
||||||
|
bool IsDeleteSlot() const;
|
||||||
|
|
||||||
|
static bool IsEquipmentIndex(int16 slot_index);
|
||||||
|
static bool IsGeneralIndex(int16 slot_index);
|
||||||
|
static bool IsCursorIndex(int16 slot_index);
|
||||||
|
static bool IsWeaponIndex(int16 slot_index);
|
||||||
|
static bool IsTextureIndex(int16 slot_index);
|
||||||
|
static bool IsTintableIndex(int16 slot_index);
|
||||||
|
|
||||||
|
bool IsEquipmentSlot() const;
|
||||||
|
bool IsGeneralSlot() const;
|
||||||
|
bool IsCursorSlot() const;
|
||||||
|
bool IsWeaponSlot() const;
|
||||||
|
bool IsTextureSlot() const;
|
||||||
|
bool IsTintableSlot() const;
|
||||||
|
|
||||||
|
bool IsSlot() const;
|
||||||
|
bool IsSlotSocket() const;
|
||||||
|
bool IsContainer() const;
|
||||||
|
bool IsContainerSocket() const;
|
||||||
|
|
||||||
|
InventorySlot ToTopOwner() const;
|
||||||
|
InventorySlot ToOwner() const;
|
||||||
|
|
||||||
|
const std::string ToString() const;
|
||||||
|
const std::string ToName() const;
|
||||||
|
|
||||||
|
bool IsTypeIndex(int16 type_index) const { return (_type_index == type_index); }
|
||||||
|
bool IsSlotIndex(int16 slot_index) const { return (_slot_index == slot_index); }
|
||||||
|
bool IsContainerIndex(int16 container_index) const { return (_container_index == container_index); }
|
||||||
|
bool IsSocketIndex(int16 socket_index) const { return (_socket_index == socket_index); }
|
||||||
|
|
||||||
|
void SetType(int16 type_index) { _type_index = type_index; }
|
||||||
|
void SetSlot(int16 slot_index) { _slot_index = slot_index; }
|
||||||
|
void SetContainer(int16 container_index) { _container_index = container_index; }
|
||||||
|
void SetSocket(int16 socket_index) { _socket_index = socket_index; }
|
||||||
|
|
||||||
|
void SetInvalidSlot();
|
||||||
|
|
||||||
|
void SetTypeInvalid() { _type_index = inventory::typeInvalid; }
|
||||||
|
void SetSlotInvalid() { _slot_index = inventory::slotInvalid; }
|
||||||
|
void SetContainerInvalid() { _container_index = inventory::containerInvalid; }
|
||||||
|
void SetSocketInvalid() { _socket_index = inventory::socketInvalid; }
|
||||||
|
|
||||||
|
void SetTypeBegin() { _type_index = inventory::typeBegin; }
|
||||||
|
void SetSlotBegin() { _slot_index = inventory::slotBegin; }
|
||||||
|
void SetContainerBegin() { _container_index = inventory::containerBegin; }
|
||||||
|
void SetSocketBegin() { _socket_index = inventory::socketBegin; }
|
||||||
|
|
||||||
|
void IncrementType() { ++_type_index; }
|
||||||
|
void IncrementSlot() { ++_slot_index; }
|
||||||
|
void IncrementContainer() { ++_container_index; }
|
||||||
|
void IncrementSocket() { ++_socket_index; }
|
||||||
|
|
||||||
|
void SetTypeless() { _typeless = true; }
|
||||||
|
void ClearTypeless() { _typeless = false; }
|
||||||
|
|
||||||
|
// these two methods should really check for all bonus-valid slots..currently checks for equipment only (rework needed)
|
||||||
|
//static bool IsBonusIndex(int16 slot_index);
|
||||||
|
//bool IsBonusSlot() const;
|
||||||
|
|
||||||
|
bool operator<(const InventorySlot& rhs) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
int16 _type_index;
|
||||||
|
//int16 _unknown2; // not implemented
|
||||||
|
int16 _slot_index;
|
||||||
|
int16 _container_index;
|
||||||
|
int16 _socket_index;
|
||||||
|
//int16 _unknown1; // not implemented
|
||||||
|
|
||||||
|
bool _typeless;
|
||||||
|
};
|
||||||
|
|
||||||
|
bool operator==(const InventorySlot& lhs, const InventorySlot& rhs);
|
||||||
|
bool operator!=(const InventorySlot& lhs, const InventorySlot& rhs) { return (!(lhs == rhs)); }
|
||||||
|
|
||||||
|
} /*EQEmu*/
|
||||||
|
|
||||||
|
#endif /*COMMON_INVENTORY_SLOT*/
|
||||||
@@ -1,147 +0,0 @@
|
|||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
|
|
||||||
Copyright (C) 2001-2016 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
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "inventory_version.h"
|
|
||||||
|
|
||||||
|
|
||||||
bool EQEmu::versions::IsValidInventoryVersion(InventoryVersion inventory_version)
|
|
||||||
{
|
|
||||||
if (inventory_version <= InventoryVersion::Unknown || inventory_version > LastInventoryVersion)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool EQEmu::versions::IsValidPCInventoryVersion(InventoryVersion inventory_version)
|
|
||||||
{
|
|
||||||
if (inventory_version <= InventoryVersion::Unknown || inventory_version > LastPCInventoryVersion)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool EQEmu::versions::IsValidNonPCInventoryVersion(InventoryVersion inventory_version)
|
|
||||||
{
|
|
||||||
if (inventory_version <= LastPCInventoryVersion || inventory_version > LastNonPCInventoryVersion)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
EQEmu::versions::InventoryVersion EQEmu::versions::ValidateInventoryVersion(InventoryVersion inventory_version)
|
|
||||||
{
|
|
||||||
if (inventory_version <= InventoryVersion::Unknown || inventory_version > LastInventoryVersion)
|
|
||||||
return InventoryVersion::Unknown;
|
|
||||||
|
|
||||||
return inventory_version;
|
|
||||||
}
|
|
||||||
|
|
||||||
EQEmu::versions::InventoryVersion EQEmu::versions::ValidatePCInventoryVersion(InventoryVersion inventory_version)
|
|
||||||
{
|
|
||||||
if (inventory_version <= InventoryVersion::Unknown || inventory_version > LastPCInventoryVersion)
|
|
||||||
return InventoryVersion::Unknown;
|
|
||||||
|
|
||||||
return inventory_version;
|
|
||||||
}
|
|
||||||
|
|
||||||
EQEmu::versions::InventoryVersion EQEmu::versions::ValidateNonPCInventoryVersion(InventoryVersion inventory_version)
|
|
||||||
{
|
|
||||||
if (inventory_version <= LastPCInventoryVersion || inventory_version > LastNonPCInventoryVersion)
|
|
||||||
return InventoryVersion::Unknown;
|
|
||||||
|
|
||||||
return inventory_version;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char* EQEmu::versions::InventoryVersionName(InventoryVersion inventory_version)
|
|
||||||
{
|
|
||||||
switch (inventory_version) {
|
|
||||||
case InventoryVersion::Unknown:
|
|
||||||
return "Unknown Version";
|
|
||||||
case InventoryVersion::Client62:
|
|
||||||
return "Client 6.2";
|
|
||||||
case InventoryVersion::Titanium:
|
|
||||||
return "Titanium";
|
|
||||||
case InventoryVersion::SoF:
|
|
||||||
return "SoF";
|
|
||||||
case InventoryVersion::SoD:
|
|
||||||
return "SoD";
|
|
||||||
case InventoryVersion::UF:
|
|
||||||
return "UF";
|
|
||||||
case InventoryVersion::RoF:
|
|
||||||
return "RoF";
|
|
||||||
case InventoryVersion::RoF2:
|
|
||||||
return "RoF2";
|
|
||||||
case InventoryVersion::NPC:
|
|
||||||
return "NPC";
|
|
||||||
case InventoryVersion::Merc:
|
|
||||||
return "Merc";
|
|
||||||
case InventoryVersion::Bot:
|
|
||||||
return "Bot";
|
|
||||||
case InventoryVersion::Pet:
|
|
||||||
return "Pet";
|
|
||||||
default:
|
|
||||||
return "Invalid Version";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
EQEmu::versions::ClientVersion EQEmu::versions::ConvertInventoryVersionToClientVersion(InventoryVersion inventory_version)
|
|
||||||
{
|
|
||||||
switch (inventory_version) {
|
|
||||||
case InventoryVersion::Unknown:
|
|
||||||
case InventoryVersion::Client62:
|
|
||||||
return ClientVersion::Unknown;
|
|
||||||
case InventoryVersion::Titanium:
|
|
||||||
return ClientVersion::Titanium;
|
|
||||||
case InventoryVersion::SoF:
|
|
||||||
return ClientVersion::SoF;
|
|
||||||
case InventoryVersion::SoD:
|
|
||||||
return ClientVersion::SoD;
|
|
||||||
case InventoryVersion::UF:
|
|
||||||
return ClientVersion::UF;
|
|
||||||
case InventoryVersion::RoF:
|
|
||||||
return ClientVersion::RoF;
|
|
||||||
case InventoryVersion::RoF2:
|
|
||||||
return ClientVersion::RoF2;
|
|
||||||
default:
|
|
||||||
return ClientVersion::Unknown;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
EQEmu::versions::InventoryVersion EQEmu::versions::ConvertClientVersionToInventoryVersion(ClientVersion client_version)
|
|
||||||
{
|
|
||||||
switch (client_version) {
|
|
||||||
case ClientVersion::Unknown:
|
|
||||||
case ClientVersion::Client62:
|
|
||||||
return InventoryVersion::Unknown;
|
|
||||||
case ClientVersion::Titanium:
|
|
||||||
return InventoryVersion::Titanium;
|
|
||||||
case ClientVersion::SoF:
|
|
||||||
return InventoryVersion::SoF;
|
|
||||||
case ClientVersion::SoD:
|
|
||||||
return InventoryVersion::SoD;
|
|
||||||
case ClientVersion::UF:
|
|
||||||
return InventoryVersion::UF;
|
|
||||||
case ClientVersion::RoF:
|
|
||||||
return InventoryVersion::RoF;
|
|
||||||
case ClientVersion::RoF2:
|
|
||||||
return InventoryVersion::RoF2;
|
|
||||||
default:
|
|
||||||
return InventoryVersion::Unknown;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
|
|
||||||
Copyright (C) 2001-2016 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_INVENTORY_VERSION_H
|
|
||||||
#define COMMON_INVENTORY_VERSION_H
|
|
||||||
|
|
||||||
#include "client_version.h"
|
|
||||||
|
|
||||||
|
|
||||||
namespace EQEmu
|
|
||||||
{
|
|
||||||
namespace versions {
|
|
||||||
enum class InventoryVersion {
|
|
||||||
Unknown = 0,
|
|
||||||
Client62,
|
|
||||||
Titanium,
|
|
||||||
SoF,
|
|
||||||
SoD,
|
|
||||||
UF,
|
|
||||||
RoF,
|
|
||||||
RoF2,
|
|
||||||
NPC,
|
|
||||||
Merc,
|
|
||||||
Bot,
|
|
||||||
Pet
|
|
||||||
};
|
|
||||||
|
|
||||||
static const InventoryVersion LastInventoryVersion = InventoryVersion::Pet;
|
|
||||||
static const InventoryVersion LastPCInventoryVersion = InventoryVersion::RoF2;
|
|
||||||
static const InventoryVersion LastNonPCInventoryVersion = InventoryVersion::Pet;
|
|
||||||
static const size_t InventoryVersionCount = (static_cast<size_t>(LastInventoryVersion) + 1);
|
|
||||||
|
|
||||||
extern bool IsValidInventoryVersion(InventoryVersion inventory_version);
|
|
||||||
extern bool IsValidPCInventoryVersion(InventoryVersion inventory_version);
|
|
||||||
extern bool IsValidNonPCInventoryVersion(InventoryVersion inventory_version);
|
|
||||||
extern InventoryVersion ValidateInventoryVersion(InventoryVersion inventory_version);
|
|
||||||
extern InventoryVersion ValidatePCInventoryVersion(InventoryVersion inventory_version);
|
|
||||||
extern InventoryVersion ValidateNonPCInventoryVersion(InventoryVersion inventory_version);
|
|
||||||
extern const char* InventoryVersionName(InventoryVersion inventory_version);
|
|
||||||
extern ClientVersion ConvertInventoryVersionToClientVersion(InventoryVersion inventory_version);
|
|
||||||
extern InventoryVersion ConvertClientVersionToInventoryVersion(ClientVersion client_version);
|
|
||||||
|
|
||||||
} /*versions*/
|
|
||||||
|
|
||||||
} /*EQEmu*/
|
|
||||||
|
|
||||||
#endif /*COMMON_INVENTORY_VERSION_H*/
|
|
||||||
-3070
File diff suppressed because it is too large
Load Diff
-546
@@ -1,546 +0,0 @@
|
|||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
|
|
||||||
Copyright (C) 2001-2016 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 04111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
// @merth notes:
|
|
||||||
// These classes could be optimized with database reads/writes by storing
|
|
||||||
// a status flag indicating how object needs to interact with database
|
|
||||||
|
|
||||||
#ifndef COMMON_ITEM_H
|
|
||||||
#define COMMON_ITEM_H
|
|
||||||
|
|
||||||
|
|
||||||
class ItemParse; // Parses item packets
|
|
||||||
class EvolveInfo; // Stores information about an evolving item family
|
|
||||||
|
|
||||||
#include "../common/eq_constants.h"
|
|
||||||
#include "../common/item_struct.h"
|
|
||||||
#include "../common/timer.h"
|
|
||||||
#include "../common/bodytypes.h"
|
|
||||||
#include "../common/deity.h" // aren't we already in '/common'?
|
|
||||||
|
|
||||||
#include "string_util.h"
|
|
||||||
|
|
||||||
#include <list>
|
|
||||||
#include <map>
|
|
||||||
//#include <sstream>
|
|
||||||
|
|
||||||
|
|
||||||
namespace ItemField
|
|
||||||
{
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
source = 0,
|
|
||||||
#define F(x) x,
|
|
||||||
#include "item_fieldlist.h"
|
|
||||||
#undef F
|
|
||||||
updated
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
// Specifies usage type for item inside ItemInst
|
|
||||||
enum ItemInstTypes
|
|
||||||
{
|
|
||||||
ItemInstNormal = 0,
|
|
||||||
ItemInstWorldContainer
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
byFlagIgnore, //do not consider this flag
|
|
||||||
byFlagSet, //apply action if the flag is set
|
|
||||||
byFlagNotSet //apply action if the flag is NOT set
|
|
||||||
} byFlagSetting;
|
|
||||||
|
|
||||||
|
|
||||||
//FatherNitwit: location bits for searching specific
|
|
||||||
//places with HasItem() and HasItemByUse()
|
|
||||||
enum {
|
|
||||||
invWhereWorn = 0x01,
|
|
||||||
invWherePersonal = 0x02, //in the character's inventory
|
|
||||||
invWhereBank = 0x04,
|
|
||||||
invWhereSharedBank = 0x08,
|
|
||||||
invWhereTrading = 0x10,
|
|
||||||
invWhereCursor = 0x20
|
|
||||||
};
|
|
||||||
|
|
||||||
class ItemInst;
|
|
||||||
|
|
||||||
// ########################################
|
|
||||||
// Class: Queue
|
|
||||||
// Queue that allows a read-only iterator
|
|
||||||
class ItemInstQueue
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
~ItemInstQueue();
|
|
||||||
/////////////////////////
|
|
||||||
// Public Methods
|
|
||||||
/////////////////////////
|
|
||||||
|
|
||||||
inline std::list<ItemInst*>::const_iterator cbegin() { return m_list.cbegin(); }
|
|
||||||
inline std::list<ItemInst*>::const_iterator cend() { return m_list.cend(); }
|
|
||||||
|
|
||||||
inline int size() { return static_cast<int>(m_list.size()); } // TODO: change to size_t
|
|
||||||
inline bool empty() { return m_list.empty(); }
|
|
||||||
|
|
||||||
void push(ItemInst* inst);
|
|
||||||
void push_front(ItemInst* inst);
|
|
||||||
ItemInst* pop();
|
|
||||||
ItemInst* pop_back();
|
|
||||||
ItemInst* peek_front() const;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
/////////////////////////
|
|
||||||
// Protected Members
|
|
||||||
/////////////////////////
|
|
||||||
|
|
||||||
std::list<ItemInst*> m_list;
|
|
||||||
};
|
|
||||||
|
|
||||||
// ########################################
|
|
||||||
// Class: Inventory
|
|
||||||
// Character inventory
|
|
||||||
class Inventory
|
|
||||||
{
|
|
||||||
friend class ItemInst;
|
|
||||||
public:
|
|
||||||
///////////////////////////////
|
|
||||||
// Public Methods
|
|
||||||
///////////////////////////////
|
|
||||||
|
|
||||||
Inventory() { m_inventory_version = EQEmu::versions::InventoryVersion::Unknown; m_inventory_version_set = false; }
|
|
||||||
~Inventory();
|
|
||||||
|
|
||||||
// inv2 creep
|
|
||||||
bool SetInventoryVersion(EQEmu::versions::InventoryVersion inventory_version) {
|
|
||||||
if (!m_inventory_version_set) {
|
|
||||||
m_inventory_version = EQEmu::versions::ValidateInventoryVersion(inventory_version);
|
|
||||||
return (m_inventory_version_set = true);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
bool SetInventoryVersion(EQEmu::versions::ClientVersion client_version) { return SetInventoryVersion(EQEmu::versions::ConvertClientVersionToInventoryVersion(client_version)); }
|
|
||||||
|
|
||||||
EQEmu::versions::InventoryVersion InventoryVersion() { return m_inventory_version; }
|
|
||||||
|
|
||||||
static void CleanDirty();
|
|
||||||
static void MarkDirty(ItemInst *inst);
|
|
||||||
|
|
||||||
// Retrieve a writeable item at specified slot
|
|
||||||
ItemInst* GetItem(int16 slot_id) const;
|
|
||||||
ItemInst* GetItem(int16 slot_id, uint8 bagidx) const;
|
|
||||||
|
|
||||||
inline std::list<ItemInst*>::const_iterator cursor_cbegin() { return m_cursor.cbegin(); }
|
|
||||||
inline std::list<ItemInst*>::const_iterator cursor_cend() { return m_cursor.cend(); }
|
|
||||||
|
|
||||||
inline int CursorSize() { return m_cursor.size(); }
|
|
||||||
inline bool CursorEmpty() { return m_cursor.empty(); }
|
|
||||||
|
|
||||||
// Retrieve a read-only item from inventory
|
|
||||||
inline const ItemInst* operator[](int16 slot_id) const { return GetItem(slot_id); }
|
|
||||||
|
|
||||||
// Add item to inventory
|
|
||||||
int16 PutItem(int16 slot_id, const ItemInst& inst);
|
|
||||||
|
|
||||||
// Add item to cursor queue
|
|
||||||
int16 PushCursor(const ItemInst& inst);
|
|
||||||
|
|
||||||
// Get cursor item in front of queue
|
|
||||||
ItemInst* GetCursorItem();
|
|
||||||
|
|
||||||
// Swap items in inventory
|
|
||||||
bool SwapItem(int16 slot_a, int16 slot_b);
|
|
||||||
|
|
||||||
// Remove item from inventory
|
|
||||||
bool DeleteItem(int16 slot_id, uint8 quantity=0);
|
|
||||||
|
|
||||||
// Checks All items in a bag for No Drop
|
|
||||||
bool CheckNoDrop(int16 slot_id);
|
|
||||||
|
|
||||||
// Remove item from inventory (and take control of memory)
|
|
||||||
ItemInst* PopItem(int16 slot_id);
|
|
||||||
|
|
||||||
// Check whether there is space for the specified number of the specified item.
|
|
||||||
bool HasSpaceForItem(const EQEmu::Item_Struct *ItemToTry, int16 Quantity);
|
|
||||||
|
|
||||||
// Check whether item exists in inventory
|
|
||||||
// where argument specifies OR'd list of invWhere constants to look
|
|
||||||
int16 HasItem(uint32 item_id, uint8 quantity = 0, uint8 where = 0xFF);
|
|
||||||
|
|
||||||
// Check whether item exists in inventory
|
|
||||||
// where argument specifies OR'd list of invWhere constants to look
|
|
||||||
int16 HasItemByUse(uint8 use, uint8 quantity=0, uint8 where=0xFF);
|
|
||||||
|
|
||||||
// Check whether item exists in inventory
|
|
||||||
// where argument specifies OR'd list of invWhere constants to look
|
|
||||||
int16 HasItemByLoreGroup(uint32 loregroup, uint8 where=0xFF);
|
|
||||||
|
|
||||||
// Locate an available inventory slot
|
|
||||||
int16 FindFreeSlot(bool for_bag, bool try_cursor, uint8 min_size = 0, bool is_arrow = false);
|
|
||||||
int16 FindFreeSlotForTradeItem(const ItemInst* inst);
|
|
||||||
|
|
||||||
// Calculate slot_id for an item within a bag
|
|
||||||
static int16 CalcSlotId(int16 slot_id); // Calc parent bag's slot_id
|
|
||||||
static int16 CalcSlotId(int16 bagslot_id, uint8 bagidx); // Calc slot_id for item inside bag
|
|
||||||
static uint8 CalcBagIdx(int16 slot_id); // Calc bagidx for slot_id
|
|
||||||
static int16 CalcSlotFromMaterial(uint8 material);
|
|
||||||
static uint8 CalcMaterialFromSlot(int16 equipslot);
|
|
||||||
|
|
||||||
static bool CanItemFitInContainer(const EQEmu::Item_Struct *ItemToTry, const EQEmu::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);
|
|
||||||
|
|
||||||
int GetSlotByItemInst(ItemInst *inst);
|
|
||||||
|
|
||||||
uint8 FindBrightestLightType();
|
|
||||||
|
|
||||||
void dumpEntireInventory();
|
|
||||||
void dumpWornItems();
|
|
||||||
void dumpInventory();
|
|
||||||
void dumpBankItems();
|
|
||||||
void dumpSharedBankItems();
|
|
||||||
|
|
||||||
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, std::string value);
|
|
||||||
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, int value);
|
|
||||||
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, float value);
|
|
||||||
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, bool value);
|
|
||||||
std::string GetCustomItemData(int16 slot_id, std::string identifier);
|
|
||||||
protected:
|
|
||||||
///////////////////////////////
|
|
||||||
// Protected Methods
|
|
||||||
///////////////////////////////
|
|
||||||
|
|
||||||
int GetSlotByItemInstCollection(const std::map<int16, ItemInst*> &collection, ItemInst *inst);
|
|
||||||
void dumpItemCollection(const std::map<int16, ItemInst*> &collection);
|
|
||||||
void dumpBagContents(ItemInst *inst, std::map<int16, ItemInst*>::const_iterator *it);
|
|
||||||
|
|
||||||
// Retrieves item within an inventory bucket
|
|
||||||
ItemInst* _GetItem(const std::map<int16, ItemInst*>& bucket, int16 slot_id) const;
|
|
||||||
|
|
||||||
// Private "put" item into bucket, without regard for what is currently in bucket
|
|
||||||
int16 _PutItem(int16 slot_id, ItemInst* inst);
|
|
||||||
|
|
||||||
// Checks an inventory bucket for a particular item
|
|
||||||
int16 _HasItem(std::map<int16, ItemInst*>& bucket, uint32 item_id, uint8 quantity);
|
|
||||||
int16 _HasItem(ItemInstQueue& iqueue, uint32 item_id, uint8 quantity);
|
|
||||||
int16 _HasItemByUse(std::map<int16, ItemInst*>& bucket, uint8 use, uint8 quantity);
|
|
||||||
int16 _HasItemByUse(ItemInstQueue& iqueue, uint8 use, uint8 quantity);
|
|
||||||
int16 _HasItemByLoreGroup(std::map<int16, ItemInst*>& bucket, uint32 loregroup);
|
|
||||||
int16 _HasItemByLoreGroup(ItemInstQueue& iqueue, uint32 loregroup);
|
|
||||||
|
|
||||||
|
|
||||||
// Player inventory
|
|
||||||
std::map<int16, ItemInst*> m_worn; // Items worn by character
|
|
||||||
std::map<int16, ItemInst*> m_inv; // Items in character personal inventory
|
|
||||||
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
|
|
||||||
|
|
||||||
private:
|
|
||||||
// Active inventory version
|
|
||||||
EQEmu::versions::InventoryVersion m_inventory_version;
|
|
||||||
bool m_inventory_version_set;
|
|
||||||
};
|
|
||||||
|
|
||||||
class SharedDatabase;
|
|
||||||
|
|
||||||
// ########################################
|
|
||||||
// Class: ItemInst
|
|
||||||
// Base class for an instance of an item
|
|
||||||
// An item instance encapsulates item data + data specific
|
|
||||||
// to an item instance (includes dye, augments, charges, etc)
|
|
||||||
class ItemInst
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
/////////////////////////
|
|
||||||
// Methods
|
|
||||||
/////////////////////////
|
|
||||||
|
|
||||||
// Constructors/Destructor
|
|
||||||
ItemInst(const EQEmu::Item_Struct* item = nullptr, int16 charges = 0);
|
|
||||||
|
|
||||||
ItemInst(SharedDatabase *db, uint32 item_id, int16 charges = 0);
|
|
||||||
|
|
||||||
ItemInst(ItemInstTypes use_type);
|
|
||||||
|
|
||||||
ItemInst(const ItemInst& copy);
|
|
||||||
|
|
||||||
~ItemInst();
|
|
||||||
|
|
||||||
// Query item type
|
|
||||||
bool IsType(EQEmu::item::ItemClass item_class) const;
|
|
||||||
|
|
||||||
bool IsClassCommon();
|
|
||||||
bool IsClassBag();
|
|
||||||
bool IsClassBook();
|
|
||||||
|
|
||||||
bool IsClassCommon() const { return const_cast<ItemInst*>(this)->IsClassCommon(); }
|
|
||||||
bool IsClassBag() const { return const_cast<ItemInst*>(this)->IsClassBag(); }
|
|
||||||
bool IsClassBook() const { return const_cast<ItemInst*>(this)->IsClassBook(); }
|
|
||||||
|
|
||||||
// Can item be stacked?
|
|
||||||
bool IsStackable() const;
|
|
||||||
bool IsCharged() const;
|
|
||||||
|
|
||||||
// Can item be equipped by/at?
|
|
||||||
bool IsEquipable(uint16 race, uint16 class_) const;
|
|
||||||
bool IsEquipable(int16 slot_id) const;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Augments
|
|
||||||
//
|
|
||||||
bool IsAugmentable() const;
|
|
||||||
bool AvailableWearSlot(uint32 aug_wear_slots) const;
|
|
||||||
int8 AvailableAugmentSlot(int32 augtype) const;
|
|
||||||
bool IsAugmentSlotAvailable(int32 augtype, uint8 slot) const;
|
|
||||||
inline int32 GetAugmentType() const { return ((m_item) ? m_item->AugType : NO_ITEM); }
|
|
||||||
|
|
||||||
inline bool IsExpendable() const { return ((m_item) ? ((m_item->Click.Type == EQEmu::item::ItemEffectExpendable) || (m_item->ItemType == EQEmu::item::ItemTypePotion)) : false); }
|
|
||||||
|
|
||||||
//
|
|
||||||
// Contents
|
|
||||||
//
|
|
||||||
ItemInst* GetItem(uint8 slot) const;
|
|
||||||
uint32 GetItemID(uint8 slot) const;
|
|
||||||
inline const ItemInst* operator[](uint8 slot) const { return GetItem(slot); }
|
|
||||||
void PutItem(uint8 slot, const ItemInst& inst);
|
|
||||||
void PutItem(SharedDatabase *db, uint8 slot, uint32 item_id) { return; } // not defined anywhere...
|
|
||||||
void DeleteItem(uint8 slot);
|
|
||||||
ItemInst* PopItem(uint8 index);
|
|
||||||
void Clear();
|
|
||||||
void ClearByFlags(byFlagSetting is_nodrop, byFlagSetting is_norent);
|
|
||||||
uint8 FirstOpenSlot() const;
|
|
||||||
uint8 GetTotalItemCount() const;
|
|
||||||
bool IsNoneEmptyContainer();
|
|
||||||
std::map<uint8, ItemInst*>* GetContents() { return &m_contents; }
|
|
||||||
|
|
||||||
//
|
|
||||||
// Augments
|
|
||||||
//
|
|
||||||
ItemInst* GetAugment(uint8 slot) const;
|
|
||||||
uint32 GetAugmentItemID(uint8 slot) const;
|
|
||||||
void PutAugment(uint8 slot, const ItemInst& inst);
|
|
||||||
void PutAugment(SharedDatabase *db, uint8 slot, uint32 item_id);
|
|
||||||
void DeleteAugment(uint8 slot);
|
|
||||||
ItemInst* RemoveAugment(uint8 index);
|
|
||||||
bool IsAugmented();
|
|
||||||
ItemInst* GetOrnamentationAug(int32 ornamentationAugtype) const;
|
|
||||||
bool UpdateOrnamentationInfo();
|
|
||||||
static bool CanTransform(const EQEmu::Item_Struct *ItemToTry, const EQEmu::Item_Struct *Container, bool AllowAll = false);
|
|
||||||
|
|
||||||
// Has attack/delay?
|
|
||||||
bool IsWeapon() const;
|
|
||||||
bool IsAmmo() const;
|
|
||||||
|
|
||||||
// Accessors
|
|
||||||
const uint32 GetID() const { return ((m_item) ? m_item->ID : NO_ITEM); }
|
|
||||||
const uint32 GetItemScriptID() const { return ((m_item) ? m_item->ScriptFileID : NO_ITEM); }
|
|
||||||
const EQEmu::Item_Struct* GetItem() const;
|
|
||||||
const EQEmu::Item_Struct* GetUnscaledItem() const;
|
|
||||||
|
|
||||||
int16 GetCharges() const { return m_charges; }
|
|
||||||
void SetCharges(int16 charges) { m_charges = charges; }
|
|
||||||
|
|
||||||
uint32 GetPrice() const { return m_price; }
|
|
||||||
void SetPrice(uint32 price) { m_price = price; }
|
|
||||||
|
|
||||||
void SetColor(uint32 color) { m_color = color; }
|
|
||||||
uint32 GetColor() const { return m_color; }
|
|
||||||
|
|
||||||
uint32 GetMerchantSlot() const { return m_merchantslot; }
|
|
||||||
void SetMerchantSlot(uint32 slot) { m_merchantslot = slot; }
|
|
||||||
|
|
||||||
int32 GetMerchantCount() const { return m_merchantcount; }
|
|
||||||
void SetMerchantCount(int32 count) { m_merchantcount = count; }
|
|
||||||
|
|
||||||
int16 GetCurrentSlot() const { return m_currentslot; }
|
|
||||||
void SetCurrentSlot(int16 curr_slot) { m_currentslot = curr_slot; }
|
|
||||||
|
|
||||||
// Is this item already attuned?
|
|
||||||
bool IsAttuned() const { return m_attuned; }
|
|
||||||
void SetAttuned(bool flag) { m_attuned=flag; }
|
|
||||||
|
|
||||||
std::string GetCustomDataString() const;
|
|
||||||
std::string GetCustomData(std::string identifier);
|
|
||||||
void SetCustomData(std::string identifier, std::string value);
|
|
||||||
void SetCustomData(std::string identifier, int value);
|
|
||||||
void SetCustomData(std::string identifier, float value);
|
|
||||||
void SetCustomData(std::string identifier, bool value);
|
|
||||||
void DeleteCustomData(std::string identifier);
|
|
||||||
|
|
||||||
// Allows treatment of this object as though it were a pointer to m_item
|
|
||||||
operator bool() const { return (m_item != nullptr); }
|
|
||||||
|
|
||||||
// Compare inner Item_Struct of two ItemInst objects
|
|
||||||
bool operator==(const ItemInst& right) const { return (this->m_item == right.m_item); }
|
|
||||||
bool operator!=(const ItemInst& right) const { return (this->m_item != right.m_item); }
|
|
||||||
|
|
||||||
// Clone current item
|
|
||||||
ItemInst* Clone() const;
|
|
||||||
|
|
||||||
bool IsSlotAllowed(int16 slot_id) const;
|
|
||||||
|
|
||||||
bool IsScaling() const { return m_scaling; }
|
|
||||||
bool IsEvolving() const { return (m_evolveLvl >= 1); }
|
|
||||||
uint32 GetExp() const { return m_exp; }
|
|
||||||
void SetExp(uint32 exp) { m_exp = exp; }
|
|
||||||
void AddExp(uint32 exp) { m_exp += exp; }
|
|
||||||
bool IsActivated() { return m_activated; }
|
|
||||||
void SetActivated(bool activated) { m_activated = activated; }
|
|
||||||
int8 GetEvolveLvl() const { return m_evolveLvl; }
|
|
||||||
void SetScaling(bool v) { m_scaling = v; }
|
|
||||||
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; }
|
|
||||||
uint32 GetOrnamentHeroModel(int32 material_slot = -1) const;
|
|
||||||
void SetOrnamentHeroModel(uint32 ornament_hero_model) { m_ornament_hero_model = ornament_hero_model; }
|
|
||||||
uint32 GetRecastTimestamp() const { return m_recast_timestamp; }
|
|
||||||
void SetRecastTimestamp(uint32 in) { m_recast_timestamp = in; }
|
|
||||||
|
|
||||||
void Initialize(SharedDatabase *db = nullptr);
|
|
||||||
void ScaleItem();
|
|
||||||
bool EvolveOnAllKills() const;
|
|
||||||
int8 GetMaxEvolveLvl() const;
|
|
||||||
uint32 GetKillsNeeded(uint8 currentlevel);
|
|
||||||
|
|
||||||
std::string Serialize(int16 slot_id) const { EQEmu::InternalSerializedItem_Struct s; s.slot_id = slot_id; s.inst = (const void*)this; std::string ser; ser.assign((char*)&s, sizeof(EQEmu::InternalSerializedItem_Struct)); return ser; }
|
|
||||||
void Serialize(EQEmu::OutBuffer& ob, int16 slot_id) const { EQEmu::InternalSerializedItem_Struct isi; isi.slot_id = slot_id; isi.inst = (const void*)this; ob.write((const char*)&isi, sizeof(isi)); }
|
|
||||||
|
|
||||||
inline int32 GetSerialNumber() const { return m_SerialNumber; }
|
|
||||||
inline void SetSerialNumber(int32 id) { m_SerialNumber = id; }
|
|
||||||
|
|
||||||
std::map<std::string, Timer>& GetTimers() { return m_timers; }
|
|
||||||
void SetTimer(std::string name, uint32 time);
|
|
||||||
void StopTimer(std::string name);
|
|
||||||
void ClearTimers();
|
|
||||||
|
|
||||||
// Get a total of a stat, including augs
|
|
||||||
// These functions should be used in place of other code manually totaling
|
|
||||||
// to centralize where it is done to make future changes easier (ex. whenever powersources come around)
|
|
||||||
// and to minimize errors. CalcItemBonuses however doesn't use these in interest of performance
|
|
||||||
// by default these do not recurse into augs
|
|
||||||
int GetItemArmorClass(bool augments = false) const;
|
|
||||||
int GetItemElementalDamage(int &magic, int &fire, int &cold, int &poison, int &disease, int &chromatic, int &prismatic, int &physical, int &corruption, bool augments = false) const;
|
|
||||||
// These two differ in the fact that they're quick checks (they are checked BEFORE the one above
|
|
||||||
int GetItemElementalFlag(bool augments = false) const;
|
|
||||||
int GetItemElementalDamage(bool augments = false) const;
|
|
||||||
int GetItemRecommendedLevel(bool augments = false) const;
|
|
||||||
int GetItemRequiredLevel(bool augments = false) const;
|
|
||||||
int GetItemWeaponDamage(bool augments = false) const;
|
|
||||||
int GetItemBackstabDamage(bool augments = false) const;
|
|
||||||
// these two are just quick checks
|
|
||||||
int GetItemBaneDamageBody(bool augments = false) const;
|
|
||||||
int GetItemBaneDamageRace(bool augments = false) const;
|
|
||||||
int GetItemBaneDamageBody(bodyType against, bool augments = false) const;
|
|
||||||
int GetItemBaneDamageRace(uint16 against, bool augments = false) const;
|
|
||||||
int GetItemMagical(bool augments = false) const;
|
|
||||||
int GetItemHP(bool augments = false) const;
|
|
||||||
int GetItemMana(bool augments = false) const;
|
|
||||||
int GetItemEndur(bool augments = false) const;
|
|
||||||
int GetItemAttack(bool augments = false) const;
|
|
||||||
int GetItemStr(bool augments = false) const;
|
|
||||||
int GetItemSta(bool augments = false) const;
|
|
||||||
int GetItemDex(bool augments = false) const;
|
|
||||||
int GetItemAgi(bool augments = false) const;
|
|
||||||
int GetItemInt(bool augments = false) const;
|
|
||||||
int GetItemWis(bool augments = false) const;
|
|
||||||
int GetItemCha(bool augments = false) const;
|
|
||||||
int GetItemMR(bool augments = false) const;
|
|
||||||
int GetItemFR(bool augments = false) const;
|
|
||||||
int GetItemCR(bool augments = false) const;
|
|
||||||
int GetItemPR(bool augments = false) const;
|
|
||||||
int GetItemDR(bool augments = false) const;
|
|
||||||
int GetItemCorrup(bool augments = false) const;
|
|
||||||
int GetItemHeroicStr(bool augments = false) const;
|
|
||||||
int GetItemHeroicSta(bool augments = false) const;
|
|
||||||
int GetItemHeroicDex(bool augments = false) const;
|
|
||||||
int GetItemHeroicAgi(bool augments = false) const;
|
|
||||||
int GetItemHeroicInt(bool augments = false) const;
|
|
||||||
int GetItemHeroicWis(bool augments = false) const;
|
|
||||||
int GetItemHeroicCha(bool augments = false) const;
|
|
||||||
int GetItemHeroicMR(bool augments = false) const;
|
|
||||||
int GetItemHeroicFR(bool augments = false) const;
|
|
||||||
int GetItemHeroicCR(bool augments = false) const;
|
|
||||||
int GetItemHeroicPR(bool augments = false) const;
|
|
||||||
int GetItemHeroicDR(bool augments = false) const;
|
|
||||||
int GetItemHeroicCorrup(bool augments = false) const;
|
|
||||||
int GetItemHaste(bool augments = false) const;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
//////////////////////////
|
|
||||||
// Protected Members
|
|
||||||
//////////////////////////
|
|
||||||
std::map<uint8, ItemInst*>::const_iterator _cbegin() { return m_contents.cbegin(); }
|
|
||||||
std::map<uint8, ItemInst*>::const_iterator _cend() { return m_contents.cend(); }
|
|
||||||
|
|
||||||
friend class Inventory;
|
|
||||||
|
|
||||||
|
|
||||||
void _PutItem(uint8 index, ItemInst* inst) { m_contents[index] = inst; }
|
|
||||||
|
|
||||||
ItemInstTypes m_use_type; // Usage type for item
|
|
||||||
const EQEmu::Item_Struct* m_item; // Ptr to item data
|
|
||||||
int16 m_charges; // # of charges for chargeable items
|
|
||||||
uint32 m_price; // Bazaar /trader price
|
|
||||||
uint32 m_color;
|
|
||||||
uint32 m_merchantslot;
|
|
||||||
int16 m_currentslot;
|
|
||||||
bool m_attuned;
|
|
||||||
int32 m_merchantcount; //number avaliable on the merchant, -1=unlimited
|
|
||||||
int32 m_SerialNumber; // Unique identifier for this instance of an item. Needed for Bazaar.
|
|
||||||
uint32 m_exp;
|
|
||||||
int8 m_evolveLvl;
|
|
||||||
bool m_activated;
|
|
||||||
EQEmu::Item_Struct* m_scaledItem;
|
|
||||||
EvolveInfo* m_evolveInfo;
|
|
||||||
bool m_scaling;
|
|
||||||
uint32 m_ornamenticon;
|
|
||||||
uint32 m_ornamentidfile;
|
|
||||||
uint32 m_ornament_hero_model;
|
|
||||||
uint32 m_recast_timestamp;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Items inside of this item (augs or contents);
|
|
||||||
std::map<uint8, ItemInst*> m_contents; // Zero-based index: min=0, max=9
|
|
||||||
std::map<std::string, std::string> m_custom_data;
|
|
||||||
std::map<std::string, Timer> m_timers;
|
|
||||||
};
|
|
||||||
|
|
||||||
class EvolveInfo {
|
|
||||||
public:
|
|
||||||
friend class ItemInst;
|
|
||||||
//temporary
|
|
||||||
uint16 LvlKills[9];
|
|
||||||
uint32 FirstItem;
|
|
||||||
uint8 MaxLvl;
|
|
||||||
bool AllKills;
|
|
||||||
|
|
||||||
EvolveInfo();
|
|
||||||
EvolveInfo(uint32 first, uint8 max, bool allkills, uint32 L2, uint32 L3, uint32 L4, uint32 L5, uint32 L6, uint32 L7, uint32 L8, uint32 L9, uint32 L10);
|
|
||||||
~EvolveInfo();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*COMMON_ITEM_H*/
|
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "item_struct.h"
|
#include "item_data.h"
|
||||||
#include "classes.h"
|
#include "classes.h"
|
||||||
#include "races.h"
|
#include "races.h"
|
||||||
//#include "deity.h"
|
//#include "deity.h"
|
||||||
@@ -167,7 +167,7 @@ uint8 EQEmu::item::ConvertAugTypeBitToAugType(uint32 aug_type_bit)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EQEmu::Item_Struct::IsEquipable(uint16 race_id, uint16 class_id)
|
bool EQEmu::ItemData::IsEquipable(uint16 race_id, uint16 class_id) const
|
||||||
{
|
{
|
||||||
if (!(Races & GetPlayerRaceBit(race_id)))
|
if (!(Races & GetPlayerRaceBit(race_id)))
|
||||||
return false;
|
return false;
|
||||||
@@ -178,32 +178,50 @@ bool EQEmu::Item_Struct::IsEquipable(uint16 race_id, uint16 class_id)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EQEmu::Item_Struct::IsClassCommon()
|
bool EQEmu::ItemData::IsClassCommon() const
|
||||||
{
|
{
|
||||||
return (ItemClass == item::ItemClassCommon);
|
return (ItemClass == item::ItemClassCommon);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EQEmu::Item_Struct::IsClassBag()
|
bool EQEmu::ItemData::IsClassBag() const
|
||||||
{
|
{
|
||||||
return (ItemClass == item::ItemClassBag);
|
return (ItemClass == item::ItemClassBag);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EQEmu::Item_Struct::IsClassBook()
|
bool EQEmu::ItemData::IsClassBook() const
|
||||||
{
|
{
|
||||||
return (ItemClass == item::ItemClassBook);
|
return (ItemClass == item::ItemClassBook);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EQEmu::Item_Struct::IsType1HWeapon()
|
bool EQEmu::ItemData::IsType1HWeapon() const
|
||||||
{
|
{
|
||||||
return ((ItemType == item::ItemType1HBlunt) || (ItemType == item::ItemType1HSlash) || (ItemType == item::ItemType1HPiercing));
|
return ((ItemType == item::ItemType1HBlunt) || (ItemType == item::ItemType1HSlash) || (ItemType == item::ItemType1HPiercing) || (ItemType == item::ItemTypeMartial));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EQEmu::Item_Struct::IsType2HWeapon()
|
bool EQEmu::ItemData::IsType2HWeapon() const
|
||||||
{
|
{
|
||||||
return ((ItemType == item::ItemType2HBlunt) || (ItemType == item::ItemType2HSlash) || (ItemType == item::ItemType2HPiercing));
|
return ((ItemType == item::ItemType2HBlunt) || (ItemType == item::ItemType2HSlash) || (ItemType == item::ItemType2HPiercing));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EQEmu::Item_Struct::IsTypeShield()
|
bool EQEmu::ItemData::IsTypeShield() const
|
||||||
{
|
{
|
||||||
return (ItemType == item::ItemTypeShield);
|
return (ItemType == item::ItemTypeShield);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool EQEmu::ItemData::CheckLoreConflict(const ItemData* l_item, const ItemData* r_item)
|
||||||
|
{
|
||||||
|
if (!l_item || !r_item)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (!l_item->LoreGroup || !r_item->LoreGroup)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (l_item->LoreGroup == r_item->LoreGroup) {
|
||||||
|
if ((l_item->LoreGroup == -1) && (l_item->ID != r_item->ID))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
@@ -17,8 +17,8 @@
|
|||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 04111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 04111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COMMON_ITEM_STRUCT_H
|
#ifndef COMMON_ITEM_DATA_H
|
||||||
#define COMMON_ITEM_STRUCT_H
|
#define COMMON_ITEM_DATA_H
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -50,17 +50,6 @@
|
|||||||
namespace EQEmu
|
namespace EQEmu
|
||||||
{
|
{
|
||||||
namespace item {
|
namespace item {
|
||||||
enum ItemAttributeBit : uint32 {
|
|
||||||
bit_ItemAttributeNone = 0x00000000,
|
|
||||||
bit_ItemAttributeLore = 0x00000001,
|
|
||||||
bit_ItemAttributeArtifact = 0x00000002,
|
|
||||||
bit_ItemAttributeSummoned = 0x00000004,
|
|
||||||
bit_ItemAttributeMagic = 0x00000008,
|
|
||||||
bit_ItemAttributeAugment = 0x00000010,
|
|
||||||
bit_ItemAttributePendingLore = 0x00000020,
|
|
||||||
bit_ItemAttributeUnknown = 0xFFFFFFFF
|
|
||||||
};
|
|
||||||
|
|
||||||
enum ItemClass {
|
enum ItemClass {
|
||||||
ItemClassCommon = 0,
|
ItemClassCommon = 0,
|
||||||
ItemClassBag,
|
ItemClassBag,
|
||||||
@@ -336,10 +325,10 @@ namespace EQEmu
|
|||||||
};
|
};
|
||||||
|
|
||||||
enum ItemDataType : uint8 {
|
enum ItemDataType : uint8 {
|
||||||
ItemDataTypeBase = 0,
|
ItemDataBase = 0,
|
||||||
ItemDataTypeScaling,
|
ItemDataScaling,
|
||||||
ItemDataTypeEvolving,
|
ItemDataEvolving,
|
||||||
ItemDataTypeCount
|
ItemDataCount
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ItemEffect_Struct {
|
struct ItemEffect_Struct {
|
||||||
@@ -354,8 +343,8 @@ namespace EQEmu
|
|||||||
//ProcRate
|
//ProcRate
|
||||||
};
|
};
|
||||||
|
|
||||||
extern uint32 ConvertAugTypeToAugTypeBit(uint8 aug_type);
|
uint32 ConvertAugTypeToAugTypeBit(uint8 aug_type);
|
||||||
extern uint8 ConvertAugTypeBitToAugType(uint32 aug_type_bit);
|
uint8 ConvertAugTypeBitToAugType(uint32 aug_type_bit);
|
||||||
|
|
||||||
} /*item*/
|
} /*item*/
|
||||||
|
|
||||||
@@ -364,10 +353,9 @@ namespace EQEmu
|
|||||||
const void * inst;
|
const void * inst;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Item_Struct {
|
struct ItemData {
|
||||||
// Non packet based fields
|
// Non packet based fields
|
||||||
uint8 MinStatus;
|
uint8 MinStatus;
|
||||||
//uint8 ItemDataType;
|
|
||||||
|
|
||||||
// Packet based fields
|
// Packet based fields
|
||||||
uint8 ItemClass; // Item Type: 0=common, 1=container, 2=book
|
uint8 ItemClass; // Item Type: 0=common, 1=container, 2=book
|
||||||
@@ -476,9 +464,9 @@ namespace EQEmu
|
|||||||
int32 FactionAmt4; // Faction Amt 4
|
int32 FactionAmt4; // Faction Amt 4
|
||||||
char CharmFile[32]; // ?
|
char CharmFile[32]; // ?
|
||||||
uint32 AugType;
|
uint32 AugType;
|
||||||
uint8 AugSlotType[EQEmu::legacy::ITEM_COMMON_SIZE]; // RoF: Augment Slot 1-6 Type
|
uint8 AugSlotType[inventory::SocketCount]; // RoF: Augment Slot 1-6 Type
|
||||||
uint8 AugSlotVisible[EQEmu::legacy::ITEM_COMMON_SIZE]; // RoF: Augment Slot 1-6 Visible
|
uint8 AugSlotVisible[inventory::SocketCount]; // RoF: Augment Slot 1-6 Visible
|
||||||
uint8 AugSlotUnk2[EQEmu::legacy::ITEM_COMMON_SIZE]; // RoF: Augment Slot 1-6 Unknown Most likely Powersource related
|
uint8 AugSlotUnk2[inventory::SocketCount]; // RoF: Augment Slot 1-6 Unknown Most likely Powersource related
|
||||||
uint32 LDoNTheme;
|
uint32 LDoNTheme;
|
||||||
uint32 LDoNPrice;
|
uint32 LDoNPrice;
|
||||||
uint32 LDoNSold;
|
uint32 LDoNSold;
|
||||||
@@ -543,23 +531,18 @@ namespace EQEmu
|
|||||||
char ScrollName[65];
|
char ScrollName[65];
|
||||||
//BardName
|
//BardName
|
||||||
|
|
||||||
bool IsEquipable(uint16 Race, uint16 Class);
|
bool IsEquipable(uint16 Race, uint16 Class) const;
|
||||||
bool IsClassCommon();
|
bool IsClassCommon() const;
|
||||||
bool IsClassBag();
|
bool IsClassBag() const;
|
||||||
bool IsClassBook();
|
bool IsClassBook() const;
|
||||||
bool IsType1HWeapon();
|
bool IsType1HWeapon() const;
|
||||||
bool IsType2HWeapon();
|
bool IsType2HWeapon() const;
|
||||||
bool IsTypeShield();
|
bool IsTypeShield() const;
|
||||||
|
|
||||||
bool IsEquipable(uint16 Race, uint16 Class) const { return const_cast<Item_Struct*>(this)->IsEquipable(Race, Class); }
|
static bool CheckLoreConflict(const ItemData* l_item, const ItemData* r_item);
|
||||||
bool IsClassCommon() const { return const_cast<Item_Struct*>(this)->IsClassCommon(); }
|
bool CheckLoreConflict(const ItemData* item) const { return CheckLoreConflict(this, item); }
|
||||||
bool IsClassBag() const { return const_cast<Item_Struct*>(this)->IsClassBag(); }
|
|
||||||
bool IsClassBook() const { return const_cast<Item_Struct*>(this)->IsClassBook(); }
|
|
||||||
bool IsType1HWeapon() const { return const_cast<Item_Struct*>(this)->IsType1HWeapon(); }
|
|
||||||
bool IsType2HWeapon() const { return const_cast<Item_Struct*>(this)->IsType2HWeapon(); }
|
|
||||||
bool IsTypeShield() const { return const_cast<Item_Struct*>(this)->IsTypeShield(); }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} /*EQEmu*/
|
} /*EQEmu*/
|
||||||
|
|
||||||
#endif /*COMMON_ITEM_STRUCT_H*/
|
#endif /*COMMON_ITEM_DATA_H*/
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,334 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 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 04111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
// @merth notes:
|
||||||
|
// These classes could be optimized with database reads/writes by storing
|
||||||
|
// a status flag indicating how object needs to interact with database
|
||||||
|
|
||||||
|
#ifndef COMMON_ITEM_INSTANCE_H
|
||||||
|
#define COMMON_ITEM_INSTANCE_H
|
||||||
|
|
||||||
|
|
||||||
|
class ItemParse; // Parses item packets
|
||||||
|
class EvolveInfo; // Stores information about an evolving item family
|
||||||
|
|
||||||
|
#include "../common/eq_constants.h"
|
||||||
|
#include "../common/item_data.h"
|
||||||
|
#include "../common/timer.h"
|
||||||
|
#include "../common/bodytypes.h"
|
||||||
|
#include "../common/deity.h"
|
||||||
|
#include "../common/memory_buffer.h"
|
||||||
|
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
|
||||||
|
// Specifies usage type for item inside EQEmu::ItemInstance
|
||||||
|
enum ItemInstTypes
|
||||||
|
{
|
||||||
|
ItemInstNormal = 0,
|
||||||
|
ItemInstWorldContainer
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
byFlagIgnore, //do not consider this flag
|
||||||
|
byFlagSet, //apply action if the flag is set
|
||||||
|
byFlagNotSet //apply action if the flag is NOT set
|
||||||
|
} byFlagSetting;
|
||||||
|
|
||||||
|
class SharedDatabase;
|
||||||
|
|
||||||
|
// ########################################
|
||||||
|
// Class: EQEmu::ItemInstance
|
||||||
|
// Base class for an instance of an item
|
||||||
|
// An item instance encapsulates item data + data specific
|
||||||
|
// to an item instance (includes dye, augments, charges, etc)
|
||||||
|
namespace EQEmu
|
||||||
|
{
|
||||||
|
class InventoryProfile;
|
||||||
|
|
||||||
|
class ItemInstance {
|
||||||
|
public:
|
||||||
|
/////////////////////////
|
||||||
|
// Methods
|
||||||
|
/////////////////////////
|
||||||
|
|
||||||
|
// Constructors/Destructor
|
||||||
|
ItemInstance(const ItemData* item = nullptr, int16 charges = 0);
|
||||||
|
|
||||||
|
ItemInstance(SharedDatabase *db, uint32 item_id, int16 charges = 0);
|
||||||
|
|
||||||
|
ItemInstance(ItemInstTypes use_type);
|
||||||
|
|
||||||
|
ItemInstance(const ItemInstance& copy);
|
||||||
|
|
||||||
|
~ItemInstance();
|
||||||
|
|
||||||
|
// Query item type
|
||||||
|
bool IsType(item::ItemClass item_class) const;
|
||||||
|
|
||||||
|
bool IsClassCommon() const;
|
||||||
|
bool IsClassBag() const;
|
||||||
|
bool IsClassBook() const;
|
||||||
|
|
||||||
|
// Can item be stacked?
|
||||||
|
bool IsStackable() const;
|
||||||
|
bool IsCharged() const;
|
||||||
|
|
||||||
|
// Can item be equipped by/at?
|
||||||
|
bool IsEquipable(uint16 race, uint16 class_) const;
|
||||||
|
bool IsEquipable(int16 slot_id) const;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Augments
|
||||||
|
//
|
||||||
|
bool IsAugmentable() const;
|
||||||
|
bool AvailableWearSlot(uint32 aug_wear_slots) const;
|
||||||
|
int8 AvailableAugmentSlot(int32 augtype) const;
|
||||||
|
bool IsAugmentSlotAvailable(int32 augtype, uint8 slot) const;
|
||||||
|
inline int32 GetAugmentType() const { return ((m_item) ? m_item->AugType : 0); }
|
||||||
|
|
||||||
|
inline bool IsExpendable() const { return ((m_item) ? ((m_item->Click.Type == item::ItemEffectExpendable) || (m_item->ItemType == item::ItemTypePotion)) : false); }
|
||||||
|
|
||||||
|
//
|
||||||
|
// Contents
|
||||||
|
//
|
||||||
|
ItemInstance* GetItem(uint8 slot) const;
|
||||||
|
uint32 GetItemID(uint8 slot) const;
|
||||||
|
inline const ItemInstance* operator[](uint8 slot) const { return GetItem(slot); }
|
||||||
|
void PutItem(uint8 slot, const ItemInstance& inst);
|
||||||
|
void PutItem(SharedDatabase *db, uint8 slot, uint32 item_id) { return; } // not defined anywhere...
|
||||||
|
void DeleteItem(uint8 slot);
|
||||||
|
ItemInstance* PopItem(uint8 index);
|
||||||
|
void Clear();
|
||||||
|
void ClearByFlags(byFlagSetting is_nodrop, byFlagSetting is_norent);
|
||||||
|
uint8 FirstOpenSlot() const;
|
||||||
|
uint8 GetTotalItemCount() const;
|
||||||
|
bool IsNoneEmptyContainer();
|
||||||
|
std::map<uint8, ItemInstance*>* GetContents() { return &m_contents; }
|
||||||
|
|
||||||
|
//
|
||||||
|
// Augments
|
||||||
|
//
|
||||||
|
ItemInstance* GetAugment(uint8 slot) const;
|
||||||
|
uint32 GetAugmentItemID(uint8 slot) const;
|
||||||
|
void PutAugment(uint8 slot, const ItemInstance& inst);
|
||||||
|
void PutAugment(SharedDatabase *db, uint8 slot, uint32 item_id);
|
||||||
|
void DeleteAugment(uint8 slot);
|
||||||
|
ItemInstance* RemoveAugment(uint8 index);
|
||||||
|
bool IsAugmented();
|
||||||
|
ItemInstance* GetOrnamentationAug(int32 ornamentationAugtype) const;
|
||||||
|
bool UpdateOrnamentationInfo();
|
||||||
|
static bool CanTransform(const ItemData *ItemToTry, const ItemData *Container, bool AllowAll = false);
|
||||||
|
|
||||||
|
// Has attack/delay?
|
||||||
|
bool IsWeapon() const;
|
||||||
|
bool IsAmmo() const;
|
||||||
|
|
||||||
|
// Accessors
|
||||||
|
const uint32 GetID() const { return ((m_item) ? m_item->ID : 0); }
|
||||||
|
const uint32 GetItemScriptID() const { return ((m_item) ? m_item->ScriptFileID : 0); }
|
||||||
|
const ItemData* GetItem() const;
|
||||||
|
const ItemData* GetUnscaledItem() const;
|
||||||
|
|
||||||
|
int16 GetCharges() const { return m_charges; }
|
||||||
|
void SetCharges(int16 charges) { m_charges = charges; }
|
||||||
|
|
||||||
|
uint32 GetPrice() const { return m_price; }
|
||||||
|
void SetPrice(uint32 price) { m_price = price; }
|
||||||
|
|
||||||
|
void SetColor(uint32 color) { m_color = color; }
|
||||||
|
uint32 GetColor() const { return m_color; }
|
||||||
|
|
||||||
|
uint32 GetMerchantSlot() const { return m_merchantslot; }
|
||||||
|
void SetMerchantSlot(uint32 slot) { m_merchantslot = slot; }
|
||||||
|
|
||||||
|
int32 GetMerchantCount() const { return m_merchantcount; }
|
||||||
|
void SetMerchantCount(int32 count) { m_merchantcount = count; }
|
||||||
|
|
||||||
|
int16 GetCurrentSlot() const { return m_currentslot; }
|
||||||
|
void SetCurrentSlot(int16 curr_slot) { m_currentslot = curr_slot; }
|
||||||
|
|
||||||
|
// Is this item already attuned?
|
||||||
|
bool IsAttuned() const { return m_attuned; }
|
||||||
|
void SetAttuned(bool flag) { m_attuned = flag; }
|
||||||
|
|
||||||
|
std::string GetCustomDataString() const;
|
||||||
|
std::string GetCustomData(std::string identifier);
|
||||||
|
void SetCustomData(std::string identifier, std::string value);
|
||||||
|
void SetCustomData(std::string identifier, int value);
|
||||||
|
void SetCustomData(std::string identifier, float value);
|
||||||
|
void SetCustomData(std::string identifier, bool value);
|
||||||
|
void DeleteCustomData(std::string identifier);
|
||||||
|
|
||||||
|
// Allows treatment of this object as though it were a pointer to m_item
|
||||||
|
operator bool() const { return (m_item != nullptr); }
|
||||||
|
|
||||||
|
// Compare inner Item_Struct of two ItemInstance objects
|
||||||
|
bool operator==(const ItemInstance& right) const { return (this->m_item == right.m_item); }
|
||||||
|
bool operator!=(const ItemInstance& right) const { return (this->m_item != right.m_item); }
|
||||||
|
|
||||||
|
// Clone current item
|
||||||
|
ItemInstance* Clone() const;
|
||||||
|
|
||||||
|
bool IsSlotAllowed(int16 slot_id) const;
|
||||||
|
|
||||||
|
bool IsDroppable(bool recurse = true) const;
|
||||||
|
|
||||||
|
bool IsScaling() const { return m_scaling; }
|
||||||
|
bool IsEvolving() const { return (m_evolveLvl >= 1); }
|
||||||
|
uint32 GetExp() const { return m_exp; }
|
||||||
|
void SetExp(uint32 exp) { m_exp = exp; }
|
||||||
|
void AddExp(uint32 exp) { m_exp += exp; }
|
||||||
|
bool IsActivated() { return m_activated; }
|
||||||
|
void SetActivated(bool activated) { m_activated = activated; }
|
||||||
|
int8 GetEvolveLvl() const { return m_evolveLvl; }
|
||||||
|
void SetScaling(bool v) { m_scaling = v; }
|
||||||
|
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; }
|
||||||
|
uint32 GetOrnamentHeroModel(int32 material_slot = -1) const;
|
||||||
|
void SetOrnamentHeroModel(uint32 ornament_hero_model) { m_ornament_hero_model = ornament_hero_model; }
|
||||||
|
uint32 GetRecastTimestamp() const { return m_recast_timestamp; }
|
||||||
|
void SetRecastTimestamp(uint32 in) { m_recast_timestamp = in; }
|
||||||
|
|
||||||
|
void Initialize(SharedDatabase *db = nullptr);
|
||||||
|
void ScaleItem();
|
||||||
|
bool EvolveOnAllKills() const;
|
||||||
|
int8 GetMaxEvolveLvl() const;
|
||||||
|
uint32 GetKillsNeeded(uint8 currentlevel);
|
||||||
|
|
||||||
|
std::string Serialize(int16 slot_id) const { InternalSerializedItem_Struct s; s.slot_id = slot_id; s.inst = (const void*)this; std::string ser; ser.assign((char*)&s, sizeof(InternalSerializedItem_Struct)); return ser; }
|
||||||
|
void Serialize(OutBuffer& ob, int16 slot_id) const { InternalSerializedItem_Struct isi; isi.slot_id = slot_id; isi.inst = (const void*)this; ob.write((const char*)&isi, sizeof(isi)); }
|
||||||
|
|
||||||
|
inline int32 GetSerialNumber() const { return m_SerialNumber; }
|
||||||
|
inline void SetSerialNumber(int32 id) { m_SerialNumber = id; }
|
||||||
|
|
||||||
|
std::map<std::string, Timer>& GetTimers() { return m_timers; }
|
||||||
|
void SetTimer(std::string name, uint32 time);
|
||||||
|
void StopTimer(std::string name);
|
||||||
|
void ClearTimers();
|
||||||
|
|
||||||
|
// Get a total of a stat, including augs
|
||||||
|
// These functions should be used in place of other code manually totaling
|
||||||
|
// to centralize where it is done to make future changes easier (ex. whenever powersources come around)
|
||||||
|
// and to minimize errors. CalcItemBonuses however doesn't use these in interest of performance
|
||||||
|
// by default these do not recurse into augs
|
||||||
|
int GetItemArmorClass(bool augments = false) const;
|
||||||
|
int GetItemElementalDamage(int &magic, int &fire, int &cold, int &poison, int &disease, int &chromatic, int &prismatic, int &physical, int &corruption, bool augments = false) const;
|
||||||
|
// These two differ in the fact that they're quick checks (they are checked BEFORE the one above
|
||||||
|
int GetItemElementalFlag(bool augments = false) const;
|
||||||
|
int GetItemElementalDamage(bool augments = false) const;
|
||||||
|
int GetItemRecommendedLevel(bool augments = false) const;
|
||||||
|
int GetItemRequiredLevel(bool augments = false) const;
|
||||||
|
int GetItemWeaponDamage(bool augments = false) const;
|
||||||
|
int GetItemBackstabDamage(bool augments = false) const;
|
||||||
|
// these two are just quick checks
|
||||||
|
int GetItemBaneDamageBody(bool augments = false) const;
|
||||||
|
int GetItemBaneDamageRace(bool augments = false) const;
|
||||||
|
int GetItemBaneDamageBody(bodyType against, bool augments = false) const;
|
||||||
|
int GetItemBaneDamageRace(uint16 against, bool augments = false) const;
|
||||||
|
int GetItemMagical(bool augments = false) const;
|
||||||
|
int GetItemHP(bool augments = false) const;
|
||||||
|
int GetItemMana(bool augments = false) const;
|
||||||
|
int GetItemEndur(bool augments = false) const;
|
||||||
|
int GetItemAttack(bool augments = false) const;
|
||||||
|
int GetItemStr(bool augments = false) const;
|
||||||
|
int GetItemSta(bool augments = false) const;
|
||||||
|
int GetItemDex(bool augments = false) const;
|
||||||
|
int GetItemAgi(bool augments = false) const;
|
||||||
|
int GetItemInt(bool augments = false) const;
|
||||||
|
int GetItemWis(bool augments = false) const;
|
||||||
|
int GetItemCha(bool augments = false) const;
|
||||||
|
int GetItemMR(bool augments = false) const;
|
||||||
|
int GetItemFR(bool augments = false) const;
|
||||||
|
int GetItemCR(bool augments = false) const;
|
||||||
|
int GetItemPR(bool augments = false) const;
|
||||||
|
int GetItemDR(bool augments = false) const;
|
||||||
|
int GetItemCorrup(bool augments = false) const;
|
||||||
|
int GetItemHeroicStr(bool augments = false) const;
|
||||||
|
int GetItemHeroicSta(bool augments = false) const;
|
||||||
|
int GetItemHeroicDex(bool augments = false) const;
|
||||||
|
int GetItemHeroicAgi(bool augments = false) const;
|
||||||
|
int GetItemHeroicInt(bool augments = false) const;
|
||||||
|
int GetItemHeroicWis(bool augments = false) const;
|
||||||
|
int GetItemHeroicCha(bool augments = false) const;
|
||||||
|
int GetItemHeroicMR(bool augments = false) const;
|
||||||
|
int GetItemHeroicFR(bool augments = false) const;
|
||||||
|
int GetItemHeroicCR(bool augments = false) const;
|
||||||
|
int GetItemHeroicPR(bool augments = false) const;
|
||||||
|
int GetItemHeroicDR(bool augments = false) const;
|
||||||
|
int GetItemHeroicCorrup(bool augments = false) const;
|
||||||
|
int GetItemHaste(bool augments = false) const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
//////////////////////////
|
||||||
|
// Protected Members
|
||||||
|
//////////////////////////
|
||||||
|
friend class InventoryProfile;
|
||||||
|
|
||||||
|
std::map<uint8, ItemInstance*>::const_iterator _cbegin() { return m_contents.cbegin(); }
|
||||||
|
std::map<uint8, ItemInstance*>::const_iterator _cend() { return m_contents.cend(); }
|
||||||
|
|
||||||
|
void _PutItem(uint8 index, ItemInstance* inst) { m_contents[index] = inst; }
|
||||||
|
|
||||||
|
ItemInstTypes m_use_type; // Usage type for item
|
||||||
|
const ItemData* m_item; // Ptr to item data
|
||||||
|
int16 m_charges; // # of charges for chargeable items
|
||||||
|
uint32 m_price; // Bazaar /trader price
|
||||||
|
uint32 m_color;
|
||||||
|
uint32 m_merchantslot;
|
||||||
|
int16 m_currentslot;
|
||||||
|
bool m_attuned;
|
||||||
|
int32 m_merchantcount; //number avaliable on the merchant, -1=unlimited
|
||||||
|
int32 m_SerialNumber; // Unique identifier for this instance of an item. Needed for Bazaar.
|
||||||
|
uint32 m_exp;
|
||||||
|
int8 m_evolveLvl;
|
||||||
|
bool m_activated;
|
||||||
|
ItemData* m_scaledItem;
|
||||||
|
::EvolveInfo* m_evolveInfo;
|
||||||
|
bool m_scaling;
|
||||||
|
uint32 m_ornamenticon;
|
||||||
|
uint32 m_ornamentidfile;
|
||||||
|
uint32 m_ornament_hero_model;
|
||||||
|
uint32 m_recast_timestamp;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Items inside of this item (augs or contents);
|
||||||
|
std::map<uint8, ItemInstance*> m_contents; // Zero-based index: min=0, max=9
|
||||||
|
std::map<std::string, std::string> m_custom_data;
|
||||||
|
std::map<std::string, Timer> m_timers;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class EvolveInfo {
|
||||||
|
public:
|
||||||
|
friend class EQEmu::ItemInstance;
|
||||||
|
//temporary
|
||||||
|
uint16 LvlKills[9];
|
||||||
|
uint32 FirstItem;
|
||||||
|
uint8 MaxLvl;
|
||||||
|
bool AllKills;
|
||||||
|
|
||||||
|
EvolveInfo();
|
||||||
|
EvolveInfo(uint32 first, uint8 max, bool allkills, uint32 L2, uint32 L3, uint32 L4, uint32 L5, uint32 L6, uint32 L7, uint32 L8, uint32 L9, uint32 L10);
|
||||||
|
~EvolveInfo();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /*COMMON_ITEM_INSTANCE_H*/
|
||||||
@@ -82,14 +82,14 @@ bool EQEmu::lightsource::IsLevelGreater(uint8 left_type, uint8 right_type)
|
|||||||
return (light_levels[left_type] > light_levels[right_type]);
|
return (light_levels[left_type] > light_levels[right_type]);
|
||||||
}
|
}
|
||||||
|
|
||||||
EQEmu::lightsource::Light_Struct::Light_Struct()
|
EQEmu::LightSource_Struct::LightSource_Struct()
|
||||||
{
|
{
|
||||||
Clear();
|
Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EQEmu::lightsource::Light_Struct::Clear()
|
void EQEmu::LightSource_Struct::Clear()
|
||||||
{
|
{
|
||||||
memset(&Slot, 0, (sizeof(uint8) * sizeof(Slot)));
|
memset(&Slot, 0, (sizeof(uint8) * lightsource::LightCount));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EQEmu::LightSourceProfile::Clear()
|
void EQEmu::LightSourceProfile::Clear()
|
||||||
|
|||||||
+12
-13
@@ -34,7 +34,6 @@ namespace EQEmu
|
|||||||
LightCount
|
LightCount
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
enum LightType {
|
enum LightType {
|
||||||
LightTypeNone = 0,
|
LightTypeNone = 0,
|
||||||
LightTypeCandle,
|
LightTypeCandle,
|
||||||
@@ -70,21 +69,21 @@ namespace EQEmu
|
|||||||
LightLevelCount
|
LightLevelCount
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Light_Struct {
|
|
||||||
uint8 Slot[LightCount];
|
|
||||||
|
|
||||||
Light_Struct();
|
|
||||||
|
|
||||||
void Clear();
|
|
||||||
|
|
||||||
inline uint8& operator[](LightSlot index) { return Slot[index]; }
|
|
||||||
};
|
|
||||||
|
|
||||||
extern uint8 TypeToLevel(uint8 light_type);
|
extern uint8 TypeToLevel(uint8 light_type);
|
||||||
extern bool IsLevelGreater(uint8 left_type, uint8 right_type);
|
extern bool IsLevelGreater(uint8 left_type, uint8 right_type);
|
||||||
|
|
||||||
}; /*lightsource*/
|
}; /*lightsource*/
|
||||||
|
|
||||||
|
struct LightSource_Struct {
|
||||||
|
uint8 Slot[lightsource::LightCount];
|
||||||
|
|
||||||
|
LightSource_Struct();
|
||||||
|
|
||||||
|
void Clear();
|
||||||
|
|
||||||
|
inline uint8& operator[](lightsource::LightSlot index) { return Slot[index]; }
|
||||||
|
};
|
||||||
|
|
||||||
struct LightSourceProfile {
|
struct LightSourceProfile {
|
||||||
/*
|
/*
|
||||||
Current criteria (light types):
|
Current criteria (light types):
|
||||||
@@ -103,8 +102,8 @@ namespace EQEmu
|
|||||||
-- The timer-based update cancels out the invalid light source
|
-- The timer-based update cancels out the invalid light source
|
||||||
*/
|
*/
|
||||||
|
|
||||||
lightsource::Light_Struct Type; // Light types (classifications)
|
LightSource_Struct Type; // Light types (classifications)
|
||||||
lightsource::Light_Struct Level; // Light levels (intensities) - used to determine which light source should be active
|
LightSource_Struct Level; // Light levels (intensities) - used to determine which light source should be active
|
||||||
|
|
||||||
LightSourceProfile() { }
|
LightSourceProfile() { }
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,277 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "memory_buffer.h"
|
||||||
|
|
||||||
|
|
||||||
|
EQEmu::MemoryBuffer::MemoryBuffer()
|
||||||
|
{
|
||||||
|
buffer_ = nullptr;
|
||||||
|
size_ = 0;
|
||||||
|
capacity_ = 0;
|
||||||
|
read_pos_ = 0;
|
||||||
|
write_pos_ = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::MemoryBuffer::MemoryBuffer(size_t sz)
|
||||||
|
{
|
||||||
|
buffer_ = nullptr;
|
||||||
|
size_ = 0;
|
||||||
|
capacity_ = 0;
|
||||||
|
read_pos_ = 0;
|
||||||
|
write_pos_ = 0;
|
||||||
|
Resize(sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::MemoryBuffer::MemoryBuffer(const MemoryBuffer &other)
|
||||||
|
{
|
||||||
|
if(other.capacity_) {
|
||||||
|
buffer_ = new uchar[other.capacity_];
|
||||||
|
memcpy(buffer_, other.buffer_, other.capacity_);
|
||||||
|
} else {
|
||||||
|
buffer_ = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_ = other.size_;
|
||||||
|
capacity_ = other.capacity_;
|
||||||
|
write_pos_ = other.write_pos_;
|
||||||
|
read_pos_ = other.read_pos_;
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::MemoryBuffer::MemoryBuffer(MemoryBuffer &&other)
|
||||||
|
{
|
||||||
|
uchar *tbuf = other.buffer_;
|
||||||
|
size_t tsz = other.size_;
|
||||||
|
size_t tcapacity = other.capacity_;
|
||||||
|
size_t twrite_pos = other.write_pos_;
|
||||||
|
size_t tread_pos = other.read_pos_;
|
||||||
|
|
||||||
|
other.buffer_ = nullptr;
|
||||||
|
other.size_ = 0;
|
||||||
|
other.capacity_ = 0;
|
||||||
|
other.read_pos_ = 0;
|
||||||
|
other.write_pos_ = 0;
|
||||||
|
|
||||||
|
buffer_ = tbuf;
|
||||||
|
size_ = tsz;
|
||||||
|
capacity_ = tcapacity;
|
||||||
|
write_pos_ = twrite_pos;
|
||||||
|
read_pos_ = tread_pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::MemoryBuffer& EQEmu::MemoryBuffer::operator=(const MemoryBuffer &other)
|
||||||
|
{
|
||||||
|
if(this == &other) {
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(buffer_) {
|
||||||
|
delete[] buffer_;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(other.capacity_) {
|
||||||
|
buffer_ = new uchar[other.capacity_];
|
||||||
|
memcpy(buffer_, other.buffer_, other.capacity_);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
buffer_ = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_ = other.size_;
|
||||||
|
capacity_ = other.capacity_;
|
||||||
|
write_pos_ = other.write_pos_;
|
||||||
|
read_pos_ = other.read_pos_;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::MemoryBuffer& EQEmu::MemoryBuffer::operator=(MemoryBuffer &&other)
|
||||||
|
{
|
||||||
|
uchar *tbuf = other.buffer_;
|
||||||
|
size_t tsz = other.size_;
|
||||||
|
size_t tcapacity = other.capacity_;
|
||||||
|
size_t twrite_pos = other.write_pos_;
|
||||||
|
size_t tread_pos = other.read_pos_;
|
||||||
|
|
||||||
|
other.buffer_ = nullptr;
|
||||||
|
other.size_ = 0;
|
||||||
|
other.capacity_ = 0;
|
||||||
|
other.read_pos_ = 0;
|
||||||
|
other.write_pos_ = 0;
|
||||||
|
|
||||||
|
buffer_ = tbuf;
|
||||||
|
size_ = tsz;
|
||||||
|
capacity_ = tcapacity;
|
||||||
|
write_pos_ = twrite_pos;
|
||||||
|
read_pos_ = tread_pos;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::MemoryBuffer& EQEmu::MemoryBuffer::operator+=(const MemoryBuffer &rhs)
|
||||||
|
{
|
||||||
|
if(!rhs.buffer_) {
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(buffer_) {
|
||||||
|
size_t old_size = size_;
|
||||||
|
Resize(size_ + rhs.size_);
|
||||||
|
memcpy(&buffer_[old_size], rhs.buffer_, rhs.size_);
|
||||||
|
} else {
|
||||||
|
buffer_ = new uchar[rhs.capacity_];
|
||||||
|
memcpy(buffer_, rhs.buffer_, rhs.capacity_);
|
||||||
|
size_ = rhs.size_;
|
||||||
|
capacity_ = rhs.capacity_;
|
||||||
|
}
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::MemoryBuffer::~MemoryBuffer()
|
||||||
|
{
|
||||||
|
Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
uchar& EQEmu::MemoryBuffer::operator[](size_t pos)
|
||||||
|
{
|
||||||
|
return buffer_[pos];
|
||||||
|
}
|
||||||
|
|
||||||
|
const uchar& EQEmu::MemoryBuffer::operator[](size_t pos) const
|
||||||
|
{
|
||||||
|
return buffer_[pos];
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::MemoryBuffer::Empty()
|
||||||
|
{
|
||||||
|
return size_ == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::MemoryBuffer::Empty() const
|
||||||
|
{
|
||||||
|
return size_ == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t EQEmu::MemoryBuffer::Size()
|
||||||
|
{
|
||||||
|
return size_;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t EQEmu::MemoryBuffer::Size() const
|
||||||
|
{
|
||||||
|
return size_;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t EQEmu::MemoryBuffer::Capacity()
|
||||||
|
{
|
||||||
|
return capacity_;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t EQEmu::MemoryBuffer::Capacity() const
|
||||||
|
{
|
||||||
|
return capacity_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void EQEmu::MemoryBuffer::Resize(size_t sz)
|
||||||
|
{
|
||||||
|
if(!buffer_) {
|
||||||
|
size_t new_size = sz + 64;
|
||||||
|
buffer_ = new uchar[new_size];
|
||||||
|
capacity_ = new_size;
|
||||||
|
size_ = sz;
|
||||||
|
memset(buffer_, 0, capacity_);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(sz > capacity_) {
|
||||||
|
size_t new_size = sz + 32;
|
||||||
|
uchar *temp = new uchar[new_size];
|
||||||
|
memcpy(temp, buffer_, capacity_);
|
||||||
|
delete[] buffer_;
|
||||||
|
buffer_ = temp;
|
||||||
|
|
||||||
|
capacity_ = new_size;
|
||||||
|
size_ = sz;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
size_ = sz;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void EQEmu::MemoryBuffer::Clear()
|
||||||
|
{
|
||||||
|
if(buffer_) {
|
||||||
|
delete[] buffer_;
|
||||||
|
buffer_ = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_ = 0;
|
||||||
|
capacity_ = 0;
|
||||||
|
write_pos_ = 0;
|
||||||
|
read_pos_ = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void EQEmu::MemoryBuffer::Zero()
|
||||||
|
{
|
||||||
|
if(buffer_) {
|
||||||
|
memset(buffer_, 0, capacity_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void EQEmu::MemoryBuffer::Write(const char *val, size_t len)
|
||||||
|
{
|
||||||
|
size_t size_needed = write_pos_ + len;
|
||||||
|
Resize(size_needed);
|
||||||
|
|
||||||
|
memcpy(&buffer_[write_pos_], val, len);
|
||||||
|
write_pos_ += len;
|
||||||
|
}
|
||||||
|
|
||||||
|
void EQEmu::MemoryBuffer::Read(uchar *buf, size_t len)
|
||||||
|
{
|
||||||
|
memcpy(buf, &buffer_[read_pos_], len);
|
||||||
|
read_pos_ += len;
|
||||||
|
}
|
||||||
|
|
||||||
|
void EQEmu::MemoryBuffer::Read(char *str)
|
||||||
|
{
|
||||||
|
size_t len = strlen((const char*)&buffer_[read_pos_]);
|
||||||
|
memcpy(str, &buffer_[read_pos_], len);
|
||||||
|
read_pos_ += len;
|
||||||
|
}
|
||||||
|
|
||||||
|
void EQEmu::OutBuffer::overwrite(OutBuffer::pos_type position, const char *_Str, std::streamsize _Count)
|
||||||
|
{
|
||||||
|
auto last_pos = tellp();
|
||||||
|
seekp(position);
|
||||||
|
write(_Str, _Count);
|
||||||
|
seekp(last_pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
uchar* EQEmu::OutBuffer::detach()
|
||||||
|
{
|
||||||
|
size_t buffer_size = tellp();
|
||||||
|
if (buffer_size == 0)
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
|
auto out_buffer = new uchar[buffer_size];
|
||||||
|
memcpy(out_buffer, str().c_str(), buffer_size);
|
||||||
|
flush();
|
||||||
|
|
||||||
|
return out_buffer;
|
||||||
|
}
|
||||||
@@ -0,0 +1,134 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 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_MEMORY_BUFFER
|
||||||
|
#define COMMON_MEMORY_BUFFER
|
||||||
|
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
|
#include <type_traits>
|
||||||
|
#include <string.h>
|
||||||
|
#include <string>
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
|
|
||||||
|
namespace EQEmu
|
||||||
|
{
|
||||||
|
class MemoryBuffer {
|
||||||
|
public:
|
||||||
|
MemoryBuffer();
|
||||||
|
MemoryBuffer(size_t sz);
|
||||||
|
MemoryBuffer(const MemoryBuffer &other);
|
||||||
|
MemoryBuffer(MemoryBuffer &&other);
|
||||||
|
MemoryBuffer& operator=(const MemoryBuffer &other);
|
||||||
|
MemoryBuffer& operator=(MemoryBuffer &&other);
|
||||||
|
MemoryBuffer& operator+=(const MemoryBuffer &rhs);
|
||||||
|
friend MemoryBuffer operator+(MemoryBuffer lhs, const MemoryBuffer& rhs) { return lhs += rhs; }
|
||||||
|
~MemoryBuffer();
|
||||||
|
|
||||||
|
uchar& operator[](size_t pos);
|
||||||
|
const uchar& operator[](size_t pos) const;
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
operator T*() {
|
||||||
|
return reinterpret_cast<T*>(buffer_);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
operator T*() const {
|
||||||
|
return reinterpret_cast<T*>(buffer_);
|
||||||
|
}
|
||||||
|
|
||||||
|
operator bool() { return buffer_ != nullptr; }
|
||||||
|
operator bool() const { return buffer_ != nullptr; }
|
||||||
|
|
||||||
|
bool Empty();
|
||||||
|
bool Empty() const;
|
||||||
|
size_t Size();
|
||||||
|
size_t Size() const;
|
||||||
|
size_t Capacity();
|
||||||
|
size_t Capacity() const;
|
||||||
|
|
||||||
|
void Resize(size_t sz);
|
||||||
|
void Clear();
|
||||||
|
void Zero();
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
void Write(T val) {
|
||||||
|
static_assert(std::is_pod<T>::value, "MemoryBuffer::Write<T>(T val) only works on pod and string types.");
|
||||||
|
Write((const char*)&val, sizeof(T));
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
T Read() {
|
||||||
|
static_assert(std::is_pod<T>::value, "MemoryBuffer::Read<T>() only works on pod and string types.");
|
||||||
|
T temp;
|
||||||
|
Read((uchar*)&temp, sizeof(T));
|
||||||
|
return temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Write(const std::string &val) {
|
||||||
|
Write(val.c_str(), val.length());
|
||||||
|
Write((uint8)0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Write(const char *val) {
|
||||||
|
size_t len = strlen(val);
|
||||||
|
Write(val, len);
|
||||||
|
Write((uint8)0);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ReadString() {
|
||||||
|
std::string ret;
|
||||||
|
size_t len = strlen((const char*)&buffer_[read_pos_]);
|
||||||
|
ret.resize(len);
|
||||||
|
memcpy(&ret[0], &buffer_[read_pos_], len);
|
||||||
|
read_pos_ += len + 1;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Write(const char *val, size_t len);
|
||||||
|
void Read(uchar *buf, size_t len);
|
||||||
|
void Read(char *str);
|
||||||
|
|
||||||
|
inline size_t GetWritePosition() { return write_pos_; }
|
||||||
|
inline void SetWritePosition(size_t wp) { write_pos_ = wp; }
|
||||||
|
inline void WriteSkipBytes(size_t skip) { write_pos_ += skip; }
|
||||||
|
inline size_t GetReadPosition() { return read_pos_; }
|
||||||
|
inline void SetReadPosition(size_t rp) { read_pos_ = rp; }
|
||||||
|
inline void ReadSkipBytes(size_t skip) { read_pos_ += skip; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
uchar *buffer_;
|
||||||
|
size_t size_;
|
||||||
|
size_t capacity_;
|
||||||
|
size_t write_pos_;
|
||||||
|
size_t read_pos_;
|
||||||
|
};
|
||||||
|
|
||||||
|
class OutBuffer : public std::stringstream {
|
||||||
|
public:
|
||||||
|
inline size_t size() { return tellp(); }
|
||||||
|
void overwrite(OutBuffer::pos_type position, const char *_Str, std::streamsize _Count);
|
||||||
|
uchar* detach();
|
||||||
|
};
|
||||||
|
|
||||||
|
} /*EQEmu*/
|
||||||
|
|
||||||
|
#endif /*COMMON_MEMORY_BUFFER*/
|
||||||
@@ -173,7 +173,7 @@ IN(OP_TradeAcceptClick, TradeAccept_Struct);
|
|||||||
IN(OP_BoardBoat, EntityId_Struct); //not really the struct, just 4 bytes
|
IN(OP_BoardBoat, EntityId_Struct); //not really the struct, just 4 bytes
|
||||||
INz(OP_LeaveBoat); //?
|
INz(OP_LeaveBoat); //?
|
||||||
IN(OP_RandomReq, RandomReq_Struct);
|
IN(OP_RandomReq, RandomReq_Struct);
|
||||||
IN(OP_Buff, SpellBuffFade_Struct);
|
IN(OP_Buff, SpellBuffPacket_Struct);
|
||||||
IN(OP_GMHideMe, SpawnAppearance_Struct);
|
IN(OP_GMHideMe, SpawnAppearance_Struct);
|
||||||
IN(OP_GMNameChange, GMName_Struct);
|
IN(OP_GMNameChange, GMName_Struct);
|
||||||
IN(OP_GMKill, GMKill_Struct);
|
IN(OP_GMKill, GMKill_Struct);
|
||||||
@@ -415,7 +415,7 @@ OUTv(OP_SendAATable, SendAA_Struct);
|
|||||||
OUT(OP_AAAction, UseAA_Struct);
|
OUT(OP_AAAction, UseAA_Struct);
|
||||||
OUT(OP_Bazaar, BazaarReturnDone_Struct);
|
OUT(OP_Bazaar, BazaarReturnDone_Struct);
|
||||||
//alt:OUT(OP_Bazaar, BazaarWelcome_Struct);
|
//alt:OUT(OP_Bazaar, BazaarWelcome_Struct);
|
||||||
OUT(OP_Buff, SpellBuffFade_Struct);
|
OUT(OP_Buff, SpellBuffPacket_Struct);
|
||||||
OUT(OP_ClickObject, ClickObject_Struct);
|
OUT(OP_ClickObject, ClickObject_Struct);
|
||||||
OUT(OP_ClientUpdate, PlayerPositionUpdateServer_Struct);
|
OUT(OP_ClientUpdate, PlayerPositionUpdateServer_Struct);
|
||||||
OUT(OP_SpawnPositionUpdate, SpawnPositionUpdate_Struct);
|
OUT(OP_SpawnPositionUpdate, SpawnPositionUpdate_Struct);
|
||||||
|
|||||||
+237
-147
@@ -29,7 +29,7 @@
|
|||||||
#include "../eq_packet_structs.h"
|
#include "../eq_packet_structs.h"
|
||||||
#include "../misc_functions.h"
|
#include "../misc_functions.h"
|
||||||
#include "../string_util.h"
|
#include "../string_util.h"
|
||||||
#include "../item.h"
|
#include "../inventory_profile.h"
|
||||||
#include "rof_structs.h"
|
#include "rof_structs.h"
|
||||||
#include "../rulesys.h"
|
#include "../rulesys.h"
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ namespace RoF
|
|||||||
static OpcodeManager *opcodes = nullptr;
|
static OpcodeManager *opcodes = nullptr;
|
||||||
static Strategy struct_strategy;
|
static Strategy struct_strategy;
|
||||||
|
|
||||||
void SerializeItem(EQEmu::OutBuffer& ob, const ItemInst *inst, int16 slot_id, uint8 depth);
|
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id, uint8 depth);
|
||||||
|
|
||||||
// server to client inventory location converters
|
// server to client inventory location converters
|
||||||
static inline structs::InventorySlot_Struct ServerToRoFSlot(uint32 serverSlot);
|
static inline structs::InventorySlot_Struct ServerToRoFSlot(uint32 serverSlot);
|
||||||
@@ -63,6 +63,12 @@ namespace RoF
|
|||||||
// client to server text link converter
|
// client to server text link converter
|
||||||
static inline void RoFToServerTextLink(std::string& serverTextLink, const std::string& rofTextLink);
|
static inline void RoFToServerTextLink(std::string& serverTextLink, const std::string& rofTextLink);
|
||||||
|
|
||||||
|
static inline CastingSlot ServerToRoFCastingSlot(EQEmu::CastingSlot slot);
|
||||||
|
static inline EQEmu::CastingSlot RoFToServerCastingSlot(CastingSlot slot);
|
||||||
|
|
||||||
|
static inline int ServerToRoFBuffSlot(int index);
|
||||||
|
static inline int RoFToServerBuffSlot(int index);
|
||||||
|
|
||||||
void Register(EQStreamIdentifier &into)
|
void Register(EQStreamIdentifier &into)
|
||||||
{
|
{
|
||||||
//create our opcode manager if we havent already
|
//create our opcode manager if we havent already
|
||||||
@@ -405,22 +411,24 @@ namespace RoF
|
|||||||
|
|
||||||
ENCODE(OP_Buff)
|
ENCODE(OP_Buff)
|
||||||
{
|
{
|
||||||
ENCODE_LENGTH_EXACT(SpellBuffFade_Struct);
|
ENCODE_LENGTH_EXACT(SpellBuffPacket_Struct);
|
||||||
SETUP_DIRECT_ENCODE(SpellBuffFade_Struct, structs::SpellBuffFade_Struct_Live);
|
SETUP_DIRECT_ENCODE(SpellBuffPacket_Struct, structs::SpellBuffPacket_Struct);
|
||||||
|
|
||||||
OUT(entityid);
|
OUT(entityid);
|
||||||
eq->unknown004 = 2;
|
OUT(buff.effect_type);
|
||||||
//eq->level = 80;
|
OUT(buff.level);
|
||||||
//eq->effect = 0;
|
// just so we're 100% sure we get a 1.0f ...
|
||||||
OUT(level);
|
eq->buff.bard_modifier = emu->buff.bard_modifier == 10 ? 1.0f : emu->buff.bard_modifier / 10.0f;
|
||||||
OUT(effect);
|
OUT(buff.spellid);
|
||||||
eq->unknown007 = 0;
|
OUT(buff.duration);
|
||||||
eq->unknown008 = 1.0f;
|
OUT(buff.player_id);
|
||||||
OUT(spellid);
|
OUT(buff.num_hits);
|
||||||
OUT(duration);
|
OUT(buff.y);
|
||||||
eq->playerId = 0x7cde;
|
OUT(buff.x);
|
||||||
OUT(slotid);
|
OUT(buff.z);
|
||||||
OUT(num_hits);
|
// TODO: implement slot_data stuff
|
||||||
|
eq->slotid = ServerToRoFBuffSlot(emu->slotid);
|
||||||
|
|
||||||
if (emu->bufffade == 1)
|
if (emu->bufffade == 1)
|
||||||
eq->bufffade = 1;
|
eq->bufffade = 1;
|
||||||
else
|
else
|
||||||
@@ -432,13 +440,13 @@ namespace RoF
|
|||||||
{
|
{
|
||||||
outapp = new EQApplicationPacket(OP_BuffCreate, 29);
|
outapp = new EQApplicationPacket(OP_BuffCreate, 29);
|
||||||
outapp->WriteUInt32(emu->entityid);
|
outapp->WriteUInt32(emu->entityid);
|
||||||
outapp->WriteUInt32(0x0271); // Unk
|
outapp->WriteUInt32(0); // tic timer
|
||||||
outapp->WriteUInt8(0); // Type of OP_BuffCreate packet ?
|
outapp->WriteUInt8(0); // Type of OP_BuffCreate packet ?
|
||||||
outapp->WriteUInt16(1); // 1 buff in this packet
|
outapp->WriteUInt16(1); // 1 buff in this packet
|
||||||
outapp->WriteUInt32(emu->slotid);
|
outapp->WriteUInt32(eq->slotid);
|
||||||
outapp->WriteUInt32(0xffffffff); // SpellID (0xffff to remove)
|
outapp->WriteUInt32(0xffffffff); // SpellID (0xffff to remove)
|
||||||
outapp->WriteUInt32(0); // Duration
|
outapp->WriteUInt32(0); // Duration
|
||||||
outapp->WriteUInt32(0); // ?
|
outapp->WriteUInt32(0); // numhits
|
||||||
outapp->WriteUInt8(0); // Caster name
|
outapp->WriteUInt8(0); // Caster name
|
||||||
outapp->WriteUInt8(0); // Type
|
outapp->WriteUInt8(0); // Type
|
||||||
}
|
}
|
||||||
@@ -462,16 +470,9 @@ namespace RoF
|
|||||||
__packet->WriteUInt8(emu->all_buffs); // 1 indicates all buffs on the player (0 to add or remove a single buff)
|
__packet->WriteUInt8(emu->all_buffs); // 1 indicates all buffs on the player (0 to add or remove a single buff)
|
||||||
__packet->WriteUInt16(emu->count);
|
__packet->WriteUInt16(emu->count);
|
||||||
|
|
||||||
for (uint16 i = 0; i < emu->count; ++i)
|
for (int i = 0; i < emu->count; ++i)
|
||||||
{
|
{
|
||||||
uint16 buffslot = emu->entries[i].buff_slot;
|
__packet->WriteUInt32(emu->type == 0 ? ServerToRoFBuffSlot(emu->entries[i].buff_slot) : emu->entries[i].buff_slot);
|
||||||
// Not sure if this is needs amending for RoF yet.
|
|
||||||
if (emu->entries[i].buff_slot >= 25)
|
|
||||||
{
|
|
||||||
buffslot += 17;
|
|
||||||
}
|
|
||||||
|
|
||||||
__packet->WriteUInt32(buffslot);
|
|
||||||
__packet->WriteUInt32(emu->entries[i].spell_id);
|
__packet->WriteUInt32(emu->entries[i].spell_id);
|
||||||
__packet->WriteUInt32(emu->entries[i].tics_remaining);
|
__packet->WriteUInt32(emu->entries[i].tics_remaining);
|
||||||
__packet->WriteUInt32(emu->entries[i].num_hits); // Unknown
|
__packet->WriteUInt32(emu->entries[i].num_hits); // Unknown
|
||||||
@@ -498,10 +499,7 @@ namespace RoF
|
|||||||
ENCODE_LENGTH_EXACT(CastSpell_Struct);
|
ENCODE_LENGTH_EXACT(CastSpell_Struct);
|
||||||
SETUP_DIRECT_ENCODE(CastSpell_Struct, structs::CastSpell_Struct);
|
SETUP_DIRECT_ENCODE(CastSpell_Struct, structs::CastSpell_Struct);
|
||||||
|
|
||||||
if (emu->slot == 10)
|
eq->slot = static_cast<uint32>(ServerToRoFCastingSlot(static_cast<EQEmu::CastingSlot>(emu->slot)));
|
||||||
eq->slot = 13;
|
|
||||||
else
|
|
||||||
OUT(slot);
|
|
||||||
|
|
||||||
OUT(spell_id);
|
OUT(spell_id);
|
||||||
eq->inventory_slot = ServerToRoFSlot(emu->inventoryslot);
|
eq->inventory_slot = ServerToRoFSlot(emu->inventoryslot);
|
||||||
@@ -586,7 +584,7 @@ namespace RoF
|
|||||||
ob.write((const char*)&item_count, sizeof(uint32));
|
ob.write((const char*)&item_count, sizeof(uint32));
|
||||||
|
|
||||||
for (int index = 0; index < item_count; ++index, ++eq) {
|
for (int index = 0; index < item_count; ++index, ++eq) {
|
||||||
SerializeItem(ob, (const ItemInst*)eq->inst, eq->slot_id, 0);
|
SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0);
|
||||||
if (ob.tellp() == last_pos)
|
if (ob.tellp() == last_pos)
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id);
|
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id);
|
||||||
|
|
||||||
@@ -977,8 +975,8 @@ namespace RoF
|
|||||||
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, emu->drop_id); // Some unique id
|
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, emu->drop_id); // Some unique id
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, 0); // Same for all objects in the zone
|
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, 0); // Same for all objects in the zone
|
||||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->heading);
|
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->heading);
|
||||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, 0); // X tilt
|
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->tilt_x); // X tilt
|
||||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, 0); // Y tilt
|
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->tilt_y); // Y tilt
|
||||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->size != 0 && (float)emu->size < 5000.f ? (float)((float)emu->size / 100.0f) : 1.f ); // This appears to be the size field. Hackish logic because some PEQ DB items were corrupt.
|
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->size != 0 && (float)emu->size < 5000.f ? (float)((float)emu->size / 100.0f) : 1.f ); // This appears to be the size field. Hackish logic because some PEQ DB items were corrupt.
|
||||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->y);
|
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->y);
|
||||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->x);
|
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->x);
|
||||||
@@ -1494,17 +1492,6 @@ namespace RoF
|
|||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
}
|
}
|
||||||
|
|
||||||
ENCODE(OP_InterruptCast)
|
|
||||||
{
|
|
||||||
ENCODE_LENGTH_EXACT(InterruptCast_Struct);
|
|
||||||
SETUP_DIRECT_ENCODE(InterruptCast_Struct, structs::InterruptCast_Struct);
|
|
||||||
|
|
||||||
OUT(spawnid);
|
|
||||||
OUT(messageid);
|
|
||||||
|
|
||||||
FINISH_ENCODE();
|
|
||||||
}
|
|
||||||
|
|
||||||
ENCODE(OP_ItemLinkResponse) { ENCODE_FORWARD(OP_ItemPacket); }
|
ENCODE(OP_ItemLinkResponse) { ENCODE_FORWARD(OP_ItemPacket); }
|
||||||
|
|
||||||
ENCODE(OP_ItemPacket)
|
ENCODE(OP_ItemPacket)
|
||||||
@@ -1523,7 +1510,7 @@ namespace RoF
|
|||||||
|
|
||||||
ob.write((const char*)__emu_buffer, 4);
|
ob.write((const char*)__emu_buffer, 4);
|
||||||
|
|
||||||
SerializeItem(ob, (const ItemInst*)int_struct->inst, int_struct->slot_id, 0);
|
SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0);
|
||||||
if (ob.tellp() == last_pos) {
|
if (ob.tellp() == last_pos) {
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d.", int_struct->slot_id);
|
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d.", int_struct->slot_id);
|
||||||
delete in;
|
delete in;
|
||||||
@@ -1614,7 +1601,8 @@ namespace RoF
|
|||||||
OUT(new_mana);
|
OUT(new_mana);
|
||||||
OUT(stamina);
|
OUT(stamina);
|
||||||
OUT(spell_id);
|
OUT(spell_id);
|
||||||
eq->unknown16 = -1; // Self Interrupt/Success = -1, Fizzle = 1, Other Interrupt = 2?
|
OUT(keepcasting);
|
||||||
|
eq->slot = -1; // this is spell gem slot. It's -1 in normal operation
|
||||||
|
|
||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
}
|
}
|
||||||
@@ -2003,18 +1991,18 @@ namespace RoF
|
|||||||
__packet->WriteUInt8(1); // 1 indicates all buffs on the pet (0 to add or remove a single buff)
|
__packet->WriteUInt8(1); // 1 indicates all buffs on the pet (0 to add or remove a single buff)
|
||||||
__packet->WriteUInt16(emu->buffcount);
|
__packet->WriteUInt16(emu->buffcount);
|
||||||
|
|
||||||
for (uint16 i = 0; i < BUFF_COUNT; ++i)
|
for (uint16 i = 0; i < PET_BUFF_COUNT; ++i)
|
||||||
{
|
{
|
||||||
if (emu->spellid[i])
|
if (emu->spellid[i])
|
||||||
{
|
{
|
||||||
__packet->WriteUInt32(i);
|
__packet->WriteUInt32(i);
|
||||||
__packet->WriteUInt32(emu->spellid[i]);
|
__packet->WriteUInt32(emu->spellid[i]);
|
||||||
__packet->WriteUInt32(emu->ticsremaining[i]);
|
__packet->WriteUInt32(emu->ticsremaining[i]);
|
||||||
__packet->WriteUInt32(0); // Unknown
|
__packet->WriteUInt32(0); // numhits
|
||||||
__packet->WriteString("");
|
__packet->WriteString("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
__packet->WriteUInt8(0); // Unknown
|
__packet->WriteUInt8(0); // some sort of type
|
||||||
|
|
||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
}
|
}
|
||||||
@@ -2068,9 +2056,9 @@ namespace RoF
|
|||||||
|
|
||||||
outapp->WriteUInt32(22); // Equipment count
|
outapp->WriteUInt32(22); // Equipment count
|
||||||
|
|
||||||
for (int r = 0; r < 9; r++)
|
for (int r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++)
|
||||||
{
|
{
|
||||||
outapp->WriteUInt32(emu->item_material[r]);
|
outapp->WriteUInt32(emu->item_material.Slot[r].Material);
|
||||||
outapp->WriteUInt32(0);
|
outapp->WriteUInt32(0);
|
||||||
outapp->WriteUInt32(0);
|
outapp->WriteUInt32(0);
|
||||||
outapp->WriteUInt32(0);
|
outapp->WriteUInt32(0);
|
||||||
@@ -2088,9 +2076,9 @@ namespace RoF
|
|||||||
outapp->WriteUInt32(0);
|
outapp->WriteUInt32(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
outapp->WriteUInt32(9); // Equipment2 count
|
outapp->WriteUInt32(EQEmu::textures::materialCount); // Equipment2 count
|
||||||
|
|
||||||
for (int r = 0; r < 9; r++)
|
for (int r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++)
|
||||||
{
|
{
|
||||||
outapp->WriteUInt32(0);
|
outapp->WriteUInt32(0);
|
||||||
outapp->WriteUInt32(0);
|
outapp->WriteUInt32(0);
|
||||||
@@ -2099,21 +2087,21 @@ namespace RoF
|
|||||||
outapp->WriteUInt32(0);
|
outapp->WriteUInt32(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
outapp->WriteUInt32(9); // Tint Count
|
outapp->WriteUInt32(EQEmu::textures::materialCount); // Tint Count
|
||||||
|
|
||||||
for (int r = 0; r < 7; r++)
|
for (int r = 0; r < 7; r++)
|
||||||
{
|
{
|
||||||
outapp->WriteUInt32(emu->item_tint[r].Color);
|
outapp->WriteUInt32(emu->item_tint.Slot[r].Color);
|
||||||
}
|
}
|
||||||
// Write zeroes for extra two tint values
|
// Write zeroes for extra two tint values
|
||||||
outapp->WriteUInt32(0);
|
outapp->WriteUInt32(0);
|
||||||
outapp->WriteUInt32(0);
|
outapp->WriteUInt32(0);
|
||||||
|
|
||||||
outapp->WriteUInt32(9); // Tint2 Count
|
outapp->WriteUInt32(EQEmu::textures::materialCount); // Tint2 Count
|
||||||
|
|
||||||
for (int r = 0; r < 7; r++)
|
for (int r = 0; r < 7; r++)
|
||||||
{
|
{
|
||||||
outapp->WriteUInt32(emu->item_tint[r].Color);
|
outapp->WriteUInt32(emu->item_tint.Slot[r].Color);
|
||||||
}
|
}
|
||||||
// Write zeroes for extra two tint values
|
// Write zeroes for extra two tint values
|
||||||
outapp->WriteUInt32(0);
|
outapp->WriteUInt32(0);
|
||||||
@@ -2250,22 +2238,23 @@ namespace RoF
|
|||||||
|
|
||||||
outapp->WriteUInt32(structs::MAX_PP_MEMSPELL); // Memorised spell slots
|
outapp->WriteUInt32(structs::MAX_PP_MEMSPELL); // Memorised spell slots
|
||||||
|
|
||||||
for (uint32 r = 0; r < MAX_PP_MEMSPELL; r++)
|
for (uint32 r = 0; r < MAX_PP_MEMSPELL; r++) // first 12
|
||||||
{
|
{
|
||||||
outapp->WriteUInt32(emu->mem_spells[r]);
|
outapp->WriteUInt32(emu->mem_spells[r]);
|
||||||
}
|
}
|
||||||
// zeroes for the rest of the slots
|
// zeroes for the rest of the slots -- the other 4 which don't work at all!
|
||||||
for (uint32 r = 0; r < structs::MAX_PP_MEMSPELL - MAX_PP_MEMSPELL; r++)
|
for (uint32 r = 0; r < structs::MAX_PP_MEMSPELL - MAX_PP_MEMSPELL; r++)
|
||||||
{
|
{
|
||||||
outapp->WriteUInt32(0xFFFFFFFFU);
|
outapp->WriteUInt32(0xFFFFFFFFU);
|
||||||
}
|
}
|
||||||
|
|
||||||
outapp->WriteUInt32(13); // Unknown count
|
outapp->WriteUInt32(13); // gem refresh count
|
||||||
|
|
||||||
for (uint32 r = 0; r < 13; r++)
|
for (uint32 r = 0; r < MAX_PP_MEMSPELL; r++)
|
||||||
{
|
{
|
||||||
outapp->WriteUInt32(0); // Unknown
|
outapp->WriteUInt32(emu->spellSlotRefresh[r]); // spell gem refresh
|
||||||
}
|
}
|
||||||
|
outapp->WriteUInt32(0); // also refresh -- historically HT/LoH :P
|
||||||
|
|
||||||
outapp->WriteUInt8(0); // Unknown
|
outapp->WriteUInt8(0); // Unknown
|
||||||
|
|
||||||
@@ -2274,31 +2263,32 @@ namespace RoF
|
|||||||
for (uint32 r = 0; r < BUFF_COUNT; r++)
|
for (uint32 r = 0; r < BUFF_COUNT; r++)
|
||||||
{
|
{
|
||||||
float instrument_mod = 0.0f;
|
float instrument_mod = 0.0f;
|
||||||
uint8 slotid = emu->buffs[r].slotid;
|
uint8 effect_type = emu->buffs[r].effect_type;
|
||||||
uint32 player_id = emu->buffs[r].player_id;;
|
uint32 player_id = emu->buffs[r].player_id;;
|
||||||
|
|
||||||
if (emu->buffs[r].spellid != 0xFFFF && emu->buffs[r].spellid != 0)
|
if (emu->buffs[r].spellid != 0xFFFF && emu->buffs[r].spellid != 0)
|
||||||
{
|
{
|
||||||
instrument_mod = 1.0f + (emu->buffs[r].bard_modifier - 10) / 10.0f;
|
instrument_mod = 1.0f + (emu->buffs[r].bard_modifier - 10) / 10.0f;
|
||||||
slotid = 2;
|
effect_type = 2;
|
||||||
player_id = 0x000717fd;
|
player_id = 0x000717fd;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
slotid = 0;
|
effect_type = 0;
|
||||||
}
|
}
|
||||||
outapp->WriteUInt8(0); // Had this as slot, but always appears to be 0 on live.
|
// this is different than the client struct for some reason :P
|
||||||
|
// missing a few things, shuffled around
|
||||||
|
outapp->WriteUInt8(0); // this is an unknown
|
||||||
outapp->WriteFloat(instrument_mod);
|
outapp->WriteFloat(instrument_mod);
|
||||||
outapp->WriteUInt32(player_id);
|
outapp->WriteUInt32(player_id);
|
||||||
outapp->WriteUInt8(0);
|
outapp->WriteUInt8(0);
|
||||||
outapp->WriteUInt32(emu->buffs[r].counters);
|
outapp->WriteUInt32(emu->buffs[r].counters);
|
||||||
//outapp->WriteUInt8(emu->buffs[r].bard_modifier);
|
|
||||||
outapp->WriteUInt32(emu->buffs[r].duration);
|
outapp->WriteUInt32(emu->buffs[r].duration);
|
||||||
outapp->WriteUInt8(emu->buffs[r].level);
|
outapp->WriteUInt8(emu->buffs[r].level);
|
||||||
outapp->WriteUInt32(emu->buffs[r].spellid);
|
outapp->WriteUInt32(emu->buffs[r].spellid);
|
||||||
outapp->WriteUInt32(slotid); // Only ever seen 2
|
outapp->WriteUInt8(effect_type); // Only ever seen 2
|
||||||
|
outapp->WriteUInt32(emu->buffs[r].num_hits);
|
||||||
outapp->WriteUInt32(0);
|
outapp->WriteUInt32(0);
|
||||||
outapp->WriteUInt8(0);
|
|
||||||
outapp->WriteUInt32(emu->buffs[r].counters); // Appears twice ?
|
outapp->WriteUInt32(emu->buffs[r].counters); // Appears twice ?
|
||||||
|
|
||||||
for (uint32 j = 0; j < 44; ++j)
|
for (uint32 j = 0; j < 44; ++j)
|
||||||
@@ -3046,13 +3036,13 @@ namespace RoF
|
|||||||
eq_cse->Gender = emu_cse->Gender;
|
eq_cse->Gender = emu_cse->Gender;
|
||||||
eq_cse->Face = emu_cse->Face;
|
eq_cse->Face = emu_cse->Face;
|
||||||
|
|
||||||
for (int equip_index = 0; equip_index < EQEmu::legacy::MaterialCount; equip_index++) {
|
for (int equip_index = 0; equip_index < EQEmu::textures::materialCount; equip_index++) {
|
||||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteModel;
|
||||||
eq_cse->Equip[equip_index].HeroForgeModel = emu_cse->Equip[equip_index].HeroForgeModel;
|
eq_cse->Equip[equip_index].HeroForgeModel = emu_cse->Equip[equip_index].HerosForgeModel;
|
||||||
eq_cse->Equip[equip_index].Material2 = emu_cse->Equip[equip_index].Material2;
|
eq_cse->Equip[equip_index].Material2 = emu_cse->Equip[equip_index].Unknown2;
|
||||||
eq_cse->Equip[equip_index].Color.Color = emu_cse->Equip[equip_index].Color.Color;
|
eq_cse->Equip[equip_index].Color = emu_cse->Equip[equip_index].Color;
|
||||||
}
|
}
|
||||||
|
|
||||||
eq_cse->Unknown15 = emu_cse->Unknown15;
|
eq_cse->Unknown15 = emu_cse->Unknown15;
|
||||||
@@ -4083,24 +4073,24 @@ namespace RoF
|
|||||||
|
|
||||||
if ((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
|
if ((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
|
||||||
{
|
{
|
||||||
for (k = 0; k < 9; ++k)
|
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; ++k)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->colors[k].Color);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment_tint.Slot[k].Color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
structs::EquipStruct *Equipment = (structs::EquipStruct *)Buffer;
|
structs::Texture_Struct *Equipment = (structs::Texture_Struct *)Buffer;
|
||||||
|
|
||||||
for (k = 0; k < 9; k++) {
|
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||||
Equipment[k].Material = emu->equipment[k].Material;
|
Equipment[k].Material = emu->equipment.Slot[k].Material;
|
||||||
Equipment[k].Unknown1 = emu->equipment[k].Unknown1;
|
Equipment[k].Unknown1 = emu->equipment.Slot[k].Unknown1;
|
||||||
Equipment[k].EliteMaterial = emu->equipment[k].EliteMaterial;
|
Equipment[k].EliteMaterial = emu->equipment.Slot[k].EliteModel;
|
||||||
Equipment[k].HeroForgeModel = emu->equipment[k].HeroForgeModel;
|
Equipment[k].HeroForgeModel = emu->equipment.Slot[k].HerosForgeModel;
|
||||||
Equipment[k].Material2 = emu->equipment[k].Material2;
|
Equipment[k].Material2 = emu->equipment.Slot[k].Unknown2;
|
||||||
}
|
}
|
||||||
|
|
||||||
Buffer += (sizeof(structs::EquipStruct) * 9);
|
Buffer += (sizeof(structs::Texture_Struct) * EQEmu::textures::materialCount);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -4110,13 +4100,13 @@ namespace RoF
|
|||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
|
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialPrimary].Material);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment.Primary.Material);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
|
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialSecondary].Material);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment.Secondary.Material);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
@@ -4290,16 +4280,16 @@ namespace RoF
|
|||||||
|
|
||||||
DECODE(OP_Buff)
|
DECODE(OP_Buff)
|
||||||
{
|
{
|
||||||
DECODE_LENGTH_EXACT(structs::SpellBuffFade_Struct_Live);
|
DECODE_LENGTH_EXACT(structs::SpellBuffPacket_Struct);
|
||||||
SETUP_DIRECT_DECODE(SpellBuffFade_Struct, structs::SpellBuffFade_Struct_Live);
|
SETUP_DIRECT_DECODE(SpellBuffPacket_Struct, structs::SpellBuffPacket_Struct);
|
||||||
|
|
||||||
IN(entityid);
|
IN(entityid);
|
||||||
//IN(slot);
|
IN(buff.effect_type);
|
||||||
IN(level);
|
IN(buff.level);
|
||||||
IN(effect);
|
IN(buff.unknown003);
|
||||||
IN(spellid);
|
IN(buff.spellid);
|
||||||
IN(duration);
|
IN(buff.duration);
|
||||||
IN(slotid);
|
emu->slotid = RoFToServerBuffSlot(eq->slotid);
|
||||||
IN(bufffade);
|
IN(bufffade);
|
||||||
|
|
||||||
FINISH_DIRECT_DECODE();
|
FINISH_DIRECT_DECODE();
|
||||||
@@ -4312,7 +4302,7 @@ namespace RoF
|
|||||||
DECODE_LENGTH_EXACT(structs::BuffRemoveRequest_Struct);
|
DECODE_LENGTH_EXACT(structs::BuffRemoveRequest_Struct);
|
||||||
SETUP_DIRECT_DECODE(BuffRemoveRequest_Struct, structs::BuffRemoveRequest_Struct);
|
SETUP_DIRECT_DECODE(BuffRemoveRequest_Struct, structs::BuffRemoveRequest_Struct);
|
||||||
|
|
||||||
emu->SlotID = (eq->SlotID < 42) ? eq->SlotID : (eq->SlotID - 17);
|
emu->SlotID = RoFToServerBuffSlot(eq->SlotID);
|
||||||
|
|
||||||
IN(EntityID);
|
IN(EntityID);
|
||||||
|
|
||||||
@@ -4324,10 +4314,7 @@ namespace RoF
|
|||||||
DECODE_LENGTH_EXACT(structs::CastSpell_Struct);
|
DECODE_LENGTH_EXACT(structs::CastSpell_Struct);
|
||||||
SETUP_DIRECT_DECODE(CastSpell_Struct, structs::CastSpell_Struct);
|
SETUP_DIRECT_DECODE(CastSpell_Struct, structs::CastSpell_Struct);
|
||||||
|
|
||||||
if (eq->slot == 13)
|
emu->slot = static_cast<uint32>(RoFToServerCastingSlot(static_cast<CastingSlot>(eq->slot)));
|
||||||
emu->slot = 10;
|
|
||||||
else
|
|
||||||
IN(slot);
|
|
||||||
|
|
||||||
IN(spell_id);
|
IN(spell_id);
|
||||||
emu->inventoryslot = RoFToServerSlot(eq->inventory_slot);
|
emu->inventoryslot = RoFToServerSlot(eq->inventory_slot);
|
||||||
@@ -4819,10 +4806,9 @@ namespace RoF
|
|||||||
|
|
||||||
IN(item_id);
|
IN(item_id);
|
||||||
int r;
|
int r;
|
||||||
for (r = 0; r < EQEmu::legacy::ITEM_COMMON_SIZE; r++) {
|
for (r = EQEmu::inventory::socketBegin; r < EQEmu::inventory::SocketCount; r++) {
|
||||||
IN(augments[r]);
|
IN(augments[r]);
|
||||||
}
|
}
|
||||||
// Max Augs is now 6, but no code to support that many yet
|
|
||||||
IN(link_hash);
|
IN(link_hash);
|
||||||
IN(icon);
|
IN(icon);
|
||||||
|
|
||||||
@@ -5199,9 +5185,9 @@ namespace RoF
|
|||||||
return NextItemInstSerialNumber;
|
return NextItemInstSerialNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SerializeItem(EQEmu::OutBuffer& ob, const ItemInst *inst, int16 slot_id_in, uint8 depth)
|
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth)
|
||||||
{
|
{
|
||||||
const EQEmu::Item_Struct *item = inst->GetUnscaledItem();
|
const EQEmu::ItemData *item = inst->GetUnscaledItem();
|
||||||
|
|
||||||
RoF::structs::ItemSerializationHeader hdr;
|
RoF::structs::ItemSerializationHeader hdr;
|
||||||
|
|
||||||
@@ -5209,7 +5195,7 @@ namespace RoF
|
|||||||
|
|
||||||
snprintf(hdr.unknown000, sizeof(hdr.unknown000), "%016d", item->ID);
|
snprintf(hdr.unknown000, sizeof(hdr.unknown000), "%016d", item->ID);
|
||||||
|
|
||||||
hdr.stacksize = (inst->IsStackable() ? ((inst->GetCharges() > 254) ? 0xFFFFFFFF : inst->GetCharges()) : 1);
|
hdr.stacksize = (inst->IsStackable() ? ((inst->GetCharges() > 1000) ? 0xFFFFFFFF : inst->GetCharges()) : 1);
|
||||||
hdr.unknown004 = 0;
|
hdr.unknown004 = 0;
|
||||||
|
|
||||||
structs::InventorySlot_Struct slot_id = ServerToRoFSlot(slot_id_in);
|
structs::InventorySlot_Struct slot_id = ServerToRoFSlot(slot_id_in);
|
||||||
@@ -5255,7 +5241,7 @@ namespace RoF
|
|||||||
|
|
||||||
if (inst->GetOrnamentationIDFile() && inst->GetOrnamentationIcon()) {
|
if (inst->GetOrnamentationIDFile() && inst->GetOrnamentationIcon()) {
|
||||||
ornaIcon = inst->GetOrnamentationIcon();
|
ornaIcon = inst->GetOrnamentationIcon();
|
||||||
heroModel = inst->GetOrnamentHeroModel(Inventory::CalcMaterialFromSlot(slot_id_in));
|
heroModel = inst->GetOrnamentHeroModel(EQEmu::InventoryProfile::CalcMaterialFromSlot(slot_id_in));
|
||||||
|
|
||||||
char tmp[30]; memset(tmp, 0x0, 30); sprintf(tmp, "IT%d", inst->GetOrnamentationIDFile());
|
char tmp[30]; memset(tmp, 0x0, 30); sprintf(tmp, "IT%d", inst->GetOrnamentationIDFile());
|
||||||
|
|
||||||
@@ -5612,18 +5598,18 @@ namespace RoF
|
|||||||
|
|
||||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||||
|
|
||||||
for (uint32 index = SUB_INDEX_BEGIN; index < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++index) {
|
for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) {
|
||||||
ItemInst* sub = inst->GetItem(index);
|
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||||
if (!sub)
|
if (!sub)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
int SubSlotNumber = INVALID_INDEX;
|
int SubSlotNumber = INVALID_INDEX;
|
||||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
||||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + index + 1);
|
SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1);
|
||||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||||
else
|
else
|
||||||
SubSlotNumber = slot_id_in;
|
SubSlotNumber = slot_id_in;
|
||||||
|
|
||||||
@@ -5641,25 +5627,25 @@ namespace RoF
|
|||||||
{
|
{
|
||||||
structs::InventorySlot_Struct RoFSlot;
|
structs::InventorySlot_Struct RoFSlot;
|
||||||
RoFSlot.Type = INVALID_INDEX;
|
RoFSlot.Type = INVALID_INDEX;
|
||||||
RoFSlot.Unknown02 = NOT_USED;
|
RoFSlot.Unknown02 = 0;
|
||||||
RoFSlot.Slot = INVALID_INDEX;
|
RoFSlot.Slot = INVALID_INDEX;
|
||||||
RoFSlot.SubIndex = INVALID_INDEX;
|
RoFSlot.SubIndex = INVALID_INDEX;
|
||||||
RoFSlot.AugIndex = INVALID_INDEX;
|
RoFSlot.AugIndex = INVALID_INDEX;
|
||||||
RoFSlot.Unknown01 = NOT_USED;
|
RoFSlot.Unknown01 = 0;
|
||||||
|
|
||||||
uint32 TempSlot = 0;
|
uint32 TempSlot = 0;
|
||||||
|
|
||||||
if (serverSlot < 56 || serverSlot == EQEmu::legacy::SlotPowerSource) { // Main Inventory and Cursor
|
if (serverSlot < 56 || serverSlot == EQEmu::inventory::slotPowerSource) { // Main Inventory and Cursor
|
||||||
RoFSlot.Type = invtype::InvTypePossessions;
|
RoFSlot.Type = invtype::InvTypePossessions;
|
||||||
RoFSlot.Slot = serverSlot;
|
RoFSlot.Slot = serverSlot;
|
||||||
|
|
||||||
if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||||
RoFSlot.Slot = invslot::PossessionsPowerSource;
|
RoFSlot.Slot = invslot::PossessionsPowerSource;
|
||||||
|
|
||||||
else if (serverSlot >= EQEmu::legacy::SlotCursor) // Cursor and Extended Corpse Inventory
|
else if (serverSlot >= EQEmu::inventory::slotCursor) // Cursor and Extended Corpse Inventory
|
||||||
RoFSlot.Slot += 3;
|
RoFSlot.Slot += 3;
|
||||||
|
|
||||||
else if (serverSlot >= EQEmu::legacy::SlotAmmo) // (> 20)
|
else if (serverSlot >= EQEmu::inventory::slotAmmo) // (> 20)
|
||||||
RoFSlot.Slot += 1;
|
RoFSlot.Slot += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5671,8 +5657,8 @@ namespace RoF
|
|||||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) { // (> 250 && < 341)
|
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) { // (> 250 && < 341)
|
||||||
RoFSlot.Type = invtype::InvTypePossessions;
|
RoFSlot.Type = invtype::InvTypePossessions;
|
||||||
TempSlot = serverSlot - 1;
|
TempSlot = serverSlot - 1;
|
||||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 2;
|
RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 2;
|
||||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::inventory::ContainerCount);
|
||||||
|
|
||||||
if (RoFSlot.Slot >= invslot::PossessionsGeneral9) // (> 30)
|
if (RoFSlot.Slot >= invslot::PossessionsGeneral9) // (> 30)
|
||||||
RoFSlot.Slot = invslot::PossessionsCursor;
|
RoFSlot.Slot = invslot::PossessionsCursor;
|
||||||
@@ -5689,8 +5675,8 @@ namespace RoF
|
|||||||
RoFSlot.Slot = TempSlot;
|
RoFSlot.Slot = TempSlot;
|
||||||
|
|
||||||
if (TempSlot > 30) { // (> 30)
|
if (TempSlot > 30) { // (> 30)
|
||||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3;
|
||||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::inventory::ContainerCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5700,8 +5686,8 @@ namespace RoF
|
|||||||
RoFSlot.Slot = TempSlot;
|
RoFSlot.Slot = TempSlot;
|
||||||
|
|
||||||
if (TempSlot > 30) { // (> 30)
|
if (TempSlot > 30) { // (> 30)
|
||||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3;
|
||||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::inventory::ContainerCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5711,8 +5697,8 @@ namespace RoF
|
|||||||
RoFSlot.Slot = TempSlot;
|
RoFSlot.Slot = TempSlot;
|
||||||
|
|
||||||
if (TempSlot > 30) {
|
if (TempSlot > 30) {
|
||||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3;
|
||||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::inventory::ContainerCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -5746,20 +5732,20 @@ namespace RoF
|
|||||||
RoFSlot.Slot = INVALID_INDEX;
|
RoFSlot.Slot = INVALID_INDEX;
|
||||||
RoFSlot.SubIndex = INVALID_INDEX;
|
RoFSlot.SubIndex = INVALID_INDEX;
|
||||||
RoFSlot.AugIndex = INVALID_INDEX;
|
RoFSlot.AugIndex = INVALID_INDEX;
|
||||||
RoFSlot.Unknown01 = NOT_USED;
|
RoFSlot.Unknown01 = 0;
|
||||||
|
|
||||||
uint32 TempSlot = 0;
|
uint32 TempSlot = 0;
|
||||||
|
|
||||||
if (serverSlot < 56 || serverSlot == EQEmu::legacy::SlotPowerSource) { // (< 52)
|
if (serverSlot < 56 || serverSlot == EQEmu::inventory::slotPowerSource) { // (< 52)
|
||||||
RoFSlot.Slot = serverSlot;
|
RoFSlot.Slot = serverSlot;
|
||||||
|
|
||||||
if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||||
RoFSlot.Slot = invslot::PossessionsPowerSource;
|
RoFSlot.Slot = invslot::PossessionsPowerSource;
|
||||||
|
|
||||||
else if (serverSlot >= EQEmu::legacy::SlotCursor) // Cursor and Extended Corpse Inventory
|
else if (serverSlot >= EQEmu::inventory::slotCursor) // Cursor and Extended Corpse Inventory
|
||||||
RoFSlot.Slot += 3;
|
RoFSlot.Slot += 3;
|
||||||
|
|
||||||
else if (serverSlot >= EQEmu::legacy::SlotAmmo) // Ammo and Personl Inventory
|
else if (serverSlot >= EQEmu::inventory::slotAmmo) // Ammo and Personl Inventory
|
||||||
RoFSlot.Slot += 1;
|
RoFSlot.Slot += 1;
|
||||||
|
|
||||||
/*else if (ServerSlot >= MainCursor) { // Cursor
|
/*else if (ServerSlot >= MainCursor) { // Cursor
|
||||||
@@ -5772,8 +5758,8 @@ namespace RoF
|
|||||||
|
|
||||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) {
|
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) {
|
||||||
TempSlot = serverSlot - 1;
|
TempSlot = serverSlot - 1;
|
||||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 2;
|
RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 2;
|
||||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::inventory::ContainerCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert Server Slot %i to RoF Slots: Main %i, Sub %i, Aug %i, Unk1 %i", serverSlot, RoFSlot.Slot, RoFSlot.SubIndex, RoFSlot.AugIndex, RoFSlot.Unknown01);
|
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert Server Slot %i to RoF Slots: Main %i, Sub %i, Aug %i, Unk1 %i", serverSlot, RoFSlot.Slot, RoFSlot.SubIndex, RoFSlot.AugIndex, RoFSlot.Unknown01);
|
||||||
@@ -5793,7 +5779,7 @@ namespace RoF
|
|||||||
|
|
||||||
if (rofSlot.Type == invtype::InvTypePossessions && rofSlot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51)
|
if (rofSlot.Type == invtype::InvTypePossessions && rofSlot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51)
|
||||||
if (rofSlot.Slot == invslot::PossessionsPowerSource)
|
if (rofSlot.Slot == invslot::PossessionsPowerSource)
|
||||||
TempSlot = EQEmu::legacy::SlotPowerSource;
|
TempSlot = EQEmu::inventory::slotPowerSource;
|
||||||
|
|
||||||
else if (rofSlot.Slot >= invslot::PossessionsCursor) // Cursor and Extended Corpse Inventory
|
else if (rofSlot.Slot >= invslot::PossessionsCursor) // Cursor and Extended Corpse Inventory
|
||||||
TempSlot = rofSlot.Slot - 3;
|
TempSlot = rofSlot.Slot - 3;
|
||||||
@@ -5815,8 +5801,8 @@ namespace RoF
|
|||||||
else // Worn Slots
|
else // Worn Slots
|
||||||
TempSlot = rofSlot.Slot;
|
TempSlot = rofSlot.Slot;
|
||||||
|
|
||||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN) // Bag Slots
|
if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin) // Bag Slots
|
||||||
TempSlot = ((TempSlot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
TempSlot = ((TempSlot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1;
|
||||||
|
|
||||||
ServerSlot = TempSlot;
|
ServerSlot = TempSlot;
|
||||||
}
|
}
|
||||||
@@ -5824,8 +5810,8 @@ namespace RoF
|
|||||||
else if (rofSlot.Type == invtype::InvTypeBank) {
|
else if (rofSlot.Type == invtype::InvTypeBank) {
|
||||||
TempSlot = EQEmu::legacy::BANK_BEGIN;
|
TempSlot = EQEmu::legacy::BANK_BEGIN;
|
||||||
|
|
||||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN)
|
if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin)
|
||||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
TempSlot += ((rofSlot.Slot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1;
|
||||||
|
|
||||||
else
|
else
|
||||||
TempSlot += rofSlot.Slot;
|
TempSlot += rofSlot.Slot;
|
||||||
@@ -5836,8 +5822,8 @@ namespace RoF
|
|||||||
else if (rofSlot.Type == invtype::InvTypeSharedBank) {
|
else if (rofSlot.Type == invtype::InvTypeSharedBank) {
|
||||||
TempSlot = EQEmu::legacy::SHARED_BANK_BEGIN;
|
TempSlot = EQEmu::legacy::SHARED_BANK_BEGIN;
|
||||||
|
|
||||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN)
|
if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin)
|
||||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
TempSlot += ((rofSlot.Slot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1;
|
||||||
|
|
||||||
else
|
else
|
||||||
TempSlot += rofSlot.Slot;
|
TempSlot += rofSlot.Slot;
|
||||||
@@ -5848,10 +5834,10 @@ namespace RoF
|
|||||||
else if (rofSlot.Type == invtype::InvTypeTrade) {
|
else if (rofSlot.Type == invtype::InvTypeTrade) {
|
||||||
TempSlot = EQEmu::legacy::TRADE_BEGIN;
|
TempSlot = EQEmu::legacy::TRADE_BEGIN;
|
||||||
|
|
||||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN)
|
if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin)
|
||||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
TempSlot += ((rofSlot.Slot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1;
|
||||||
// OLD CODE:
|
// OLD CODE:
|
||||||
//TempSlot += 100 + (RoFSlot.MainSlot * EQEmu::legacy::ITEM_CONTAINER_SIZE) + RoFSlot.SubSlot;
|
//TempSlot += 100 + (RoFSlot.MainSlot * EQEmu::inventory::ContainerCount) + RoFSlot.SubSlot;
|
||||||
|
|
||||||
else
|
else
|
||||||
TempSlot += rofSlot.Slot;
|
TempSlot += rofSlot.Slot;
|
||||||
@@ -5862,7 +5848,7 @@ namespace RoF
|
|||||||
else if (rofSlot.Type == invtype::InvTypeWorld) {
|
else if (rofSlot.Type == invtype::InvTypeWorld) {
|
||||||
TempSlot = EQEmu::legacy::WORLD_BEGIN;
|
TempSlot = EQEmu::legacy::WORLD_BEGIN;
|
||||||
|
|
||||||
if (rofSlot.Slot >= SUB_INDEX_BEGIN)
|
if (rofSlot.Slot >= EQEmu::inventory::containerBegin)
|
||||||
TempSlot += rofSlot.Slot;
|
TempSlot += rofSlot.Slot;
|
||||||
|
|
||||||
ServerSlot = TempSlot;
|
ServerSlot = TempSlot;
|
||||||
@@ -5893,7 +5879,7 @@ namespace RoF
|
|||||||
|
|
||||||
if (rofSlot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 33)
|
if (rofSlot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 33)
|
||||||
if (rofSlot.Slot == invslot::PossessionsPowerSource)
|
if (rofSlot.Slot == invslot::PossessionsPowerSource)
|
||||||
TempSlot = EQEmu::legacy::SlotPowerSource;
|
TempSlot = EQEmu::inventory::slotPowerSource;
|
||||||
|
|
||||||
else if (rofSlot.Slot >= invslot::PossessionsCursor) // Cursor and Extended Corpse Inventory
|
else if (rofSlot.Slot >= invslot::PossessionsCursor) // Cursor and Extended Corpse Inventory
|
||||||
TempSlot = rofSlot.Slot - 3;
|
TempSlot = rofSlot.Slot - 3;
|
||||||
@@ -5910,8 +5896,8 @@ namespace RoF
|
|||||||
else
|
else
|
||||||
TempSlot = rofSlot.Slot;
|
TempSlot = rofSlot.Slot;
|
||||||
|
|
||||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN) // Bag Slots
|
if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin) // Bag Slots
|
||||||
TempSlot = ((TempSlot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
TempSlot = ((TempSlot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1;
|
||||||
|
|
||||||
ServerSlot = TempSlot;
|
ServerSlot = TempSlot;
|
||||||
}
|
}
|
||||||
@@ -5999,4 +5985,108 @@ namespace RoF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline CastingSlot ServerToRoFCastingSlot(EQEmu::CastingSlot slot)
|
||||||
|
{
|
||||||
|
switch (slot) {
|
||||||
|
case EQEmu::CastingSlot::Gem1:
|
||||||
|
return CastingSlot::Gem1;
|
||||||
|
case EQEmu::CastingSlot::Gem2:
|
||||||
|
return CastingSlot::Gem2;
|
||||||
|
case EQEmu::CastingSlot::Gem3:
|
||||||
|
return CastingSlot::Gem3;
|
||||||
|
case EQEmu::CastingSlot::Gem4:
|
||||||
|
return CastingSlot::Gem4;
|
||||||
|
case EQEmu::CastingSlot::Gem5:
|
||||||
|
return CastingSlot::Gem5;
|
||||||
|
case EQEmu::CastingSlot::Gem6:
|
||||||
|
return CastingSlot::Gem6;
|
||||||
|
case EQEmu::CastingSlot::Gem7:
|
||||||
|
return CastingSlot::Gem7;
|
||||||
|
case EQEmu::CastingSlot::Gem8:
|
||||||
|
return CastingSlot::Gem8;
|
||||||
|
case EQEmu::CastingSlot::Gem9:
|
||||||
|
return CastingSlot::Gem9;
|
||||||
|
case EQEmu::CastingSlot::Gem10:
|
||||||
|
return CastingSlot::Gem10;
|
||||||
|
case EQEmu::CastingSlot::Gem11:
|
||||||
|
return CastingSlot::Gem11;
|
||||||
|
case EQEmu::CastingSlot::Gem12:
|
||||||
|
return CastingSlot::Gem12;
|
||||||
|
case EQEmu::CastingSlot::Item:
|
||||||
|
case EQEmu::CastingSlot::PotionBelt:
|
||||||
|
return CastingSlot::Item;
|
||||||
|
case EQEmu::CastingSlot::Discipline:
|
||||||
|
return CastingSlot::Discipline;
|
||||||
|
case EQEmu::CastingSlot::AltAbility:
|
||||||
|
return CastingSlot::AltAbility;
|
||||||
|
default: // we shouldn't have any issues with other slots ... just return something
|
||||||
|
return CastingSlot::Discipline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline EQEmu::CastingSlot RoFToServerCastingSlot(CastingSlot slot)
|
||||||
|
{
|
||||||
|
switch (slot) {
|
||||||
|
case CastingSlot::Gem1:
|
||||||
|
return EQEmu::CastingSlot::Gem1;
|
||||||
|
case CastingSlot::Gem2:
|
||||||
|
return EQEmu::CastingSlot::Gem2;
|
||||||
|
case CastingSlot::Gem3:
|
||||||
|
return EQEmu::CastingSlot::Gem3;
|
||||||
|
case CastingSlot::Gem4:
|
||||||
|
return EQEmu::CastingSlot::Gem4;
|
||||||
|
case CastingSlot::Gem5:
|
||||||
|
return EQEmu::CastingSlot::Gem5;
|
||||||
|
case CastingSlot::Gem6:
|
||||||
|
return EQEmu::CastingSlot::Gem6;
|
||||||
|
case CastingSlot::Gem7:
|
||||||
|
return EQEmu::CastingSlot::Gem7;
|
||||||
|
case CastingSlot::Gem8:
|
||||||
|
return EQEmu::CastingSlot::Gem8;
|
||||||
|
case CastingSlot::Gem9:
|
||||||
|
return EQEmu::CastingSlot::Gem9;
|
||||||
|
case CastingSlot::Gem10:
|
||||||
|
return EQEmu::CastingSlot::Gem10;
|
||||||
|
case CastingSlot::Gem11:
|
||||||
|
return EQEmu::CastingSlot::Gem11;
|
||||||
|
case CastingSlot::Gem12:
|
||||||
|
return EQEmu::CastingSlot::Gem12;
|
||||||
|
case CastingSlot::Discipline:
|
||||||
|
return EQEmu::CastingSlot::Discipline;
|
||||||
|
case CastingSlot::Item:
|
||||||
|
return EQEmu::CastingSlot::Item;
|
||||||
|
case CastingSlot::AltAbility:
|
||||||
|
return EQEmu::CastingSlot::AltAbility;
|
||||||
|
default: // we shouldn't have any issues with other slots ... just return something
|
||||||
|
return EQEmu::CastingSlot::Discipline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// these should be optimized out for RoF since they should all boil down to return index :P
|
||||||
|
// but lets leave it here for future proofing
|
||||||
|
static inline int ServerToRoFBuffSlot(int index)
|
||||||
|
{
|
||||||
|
// we're a disc
|
||||||
|
if (index >= EQEmu::constants::LongBuffs + EQEmu::constants::ShortBuffs)
|
||||||
|
return index - EQEmu::constants::LongBuffs - EQEmu::constants::ShortBuffs +
|
||||||
|
constants::LongBuffs + constants::ShortBuffs;
|
||||||
|
// we're a song
|
||||||
|
if (index >= EQEmu::constants::LongBuffs)
|
||||||
|
return index - EQEmu::constants::LongBuffs + constants::LongBuffs;
|
||||||
|
// we're a normal buff
|
||||||
|
return index; // as long as we guard against bad slots server side, we should be fine
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int RoFToServerBuffSlot(int index)
|
||||||
|
{
|
||||||
|
// we're a disc
|
||||||
|
if (index >= constants::LongBuffs + constants::ShortBuffs)
|
||||||
|
return index - constants::LongBuffs - constants::ShortBuffs + EQEmu::constants::LongBuffs +
|
||||||
|
EQEmu::constants::ShortBuffs;
|
||||||
|
// we're a song
|
||||||
|
if (index >= constants::LongBuffs)
|
||||||
|
return index - constants::LongBuffs + EQEmu::constants::LongBuffs;
|
||||||
|
// we're a normal buff
|
||||||
|
return index; // as long as we guard against bad slots server side, we should be fine
|
||||||
|
}
|
||||||
} /*RoF*/
|
} /*RoF*/
|
||||||
|
|||||||
@@ -50,6 +50,24 @@ namespace RoF
|
|||||||
#include "rof_ops.h"
|
#include "rof_ops.h"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class CastingSlot : uint32 {
|
||||||
|
Gem1 = 0,
|
||||||
|
Gem2 = 1,
|
||||||
|
Gem3 = 2,
|
||||||
|
Gem4 = 3,
|
||||||
|
Gem5 = 4,
|
||||||
|
Gem6 = 5,
|
||||||
|
Gem7 = 6,
|
||||||
|
Gem8 = 7,
|
||||||
|
Gem9 = 8,
|
||||||
|
Gem10 = 9,
|
||||||
|
Gem11 = 10,
|
||||||
|
Gem12 = 11,
|
||||||
|
Item = 12,
|
||||||
|
Discipline = 13,
|
||||||
|
AltAbility = 0xFF
|
||||||
|
};
|
||||||
|
|
||||||
}; /*RoF*/
|
}; /*RoF*/
|
||||||
|
|
||||||
#endif /*COMMON_ROF_H*/
|
#endif /*COMMON_ROF_H*/
|
||||||
|
|||||||
+269
-169
@@ -29,7 +29,7 @@
|
|||||||
#include "../eq_packet_structs.h"
|
#include "../eq_packet_structs.h"
|
||||||
#include "../misc_functions.h"
|
#include "../misc_functions.h"
|
||||||
#include "../string_util.h"
|
#include "../string_util.h"
|
||||||
#include "../item.h"
|
#include "../inventory_profile.h"
|
||||||
#include "rof2_structs.h"
|
#include "rof2_structs.h"
|
||||||
#include "../rulesys.h"
|
#include "../rulesys.h"
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ namespace RoF2
|
|||||||
static OpcodeManager *opcodes = nullptr;
|
static OpcodeManager *opcodes = nullptr;
|
||||||
static Strategy struct_strategy;
|
static Strategy struct_strategy;
|
||||||
|
|
||||||
void SerializeItem(EQEmu::OutBuffer& ob, const ItemInst *inst, int16 slot_id, uint8 depth, ItemPacketType packet_type);
|
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id, uint8 depth, ItemPacketType packet_type);
|
||||||
|
|
||||||
// server to client inventory location converters
|
// server to client inventory location converters
|
||||||
static inline structs::InventorySlot_Struct ServerToRoF2Slot(uint32 serverSlot, ItemPacketType PacketType = ItemPacketInvalid);
|
static inline structs::InventorySlot_Struct ServerToRoF2Slot(uint32 serverSlot, ItemPacketType PacketType = ItemPacketInvalid);
|
||||||
@@ -63,6 +63,12 @@ namespace RoF2
|
|||||||
// client to server text link converter
|
// client to server text link converter
|
||||||
static inline void RoF2ToServerTextLink(std::string& serverTextLink, const std::string& rof2TextLink);
|
static inline void RoF2ToServerTextLink(std::string& serverTextLink, const std::string& rof2TextLink);
|
||||||
|
|
||||||
|
static inline CastingSlot ServerToRoF2CastingSlot(EQEmu::CastingSlot slot);
|
||||||
|
static inline EQEmu::CastingSlot RoF2ToServerCastingSlot(CastingSlot slot);
|
||||||
|
|
||||||
|
static inline int ServerToRoF2BuffSlot(int index);
|
||||||
|
static inline int RoF2ToServerBuffSlot(int index);
|
||||||
|
|
||||||
void Register(EQStreamIdentifier &into)
|
void Register(EQStreamIdentifier &into)
|
||||||
{
|
{
|
||||||
//create our opcode manager if we havent already
|
//create our opcode manager if we havent already
|
||||||
@@ -474,22 +480,23 @@ namespace RoF2
|
|||||||
|
|
||||||
ENCODE(OP_Buff)
|
ENCODE(OP_Buff)
|
||||||
{
|
{
|
||||||
ENCODE_LENGTH_EXACT(SpellBuffFade_Struct);
|
ENCODE_LENGTH_EXACT(SpellBuffPacket_Struct);
|
||||||
SETUP_DIRECT_ENCODE(SpellBuffFade_Struct, structs::SpellBuffFade_Struct_Live);
|
SETUP_DIRECT_ENCODE(SpellBuffPacket_Struct, structs::SpellBuffPacket_Struct);
|
||||||
|
|
||||||
OUT(entityid);
|
OUT(entityid);
|
||||||
eq->unknown004 = 2;
|
OUT(buff.effect_type);
|
||||||
//eq->level = 80;
|
OUT(buff.level);
|
||||||
//eq->effect = 0;
|
// just so we're 100% sure we get a 1.0f ...
|
||||||
OUT(level);
|
eq->buff.bard_modifier = emu->buff.bard_modifier == 10 ? 1.0f : emu->buff.bard_modifier / 10.0f;
|
||||||
OUT(effect);
|
OUT(buff.spellid);
|
||||||
eq->unknown007 = 0;
|
OUT(buff.duration);
|
||||||
eq->unknown008 = 1.0f;
|
OUT(buff.player_id);
|
||||||
OUT(spellid);
|
OUT(buff.num_hits);
|
||||||
OUT(duration);
|
OUT(buff.y);
|
||||||
eq->playerId = 0x7cde;
|
OUT(buff.x);
|
||||||
OUT(slotid);
|
OUT(buff.z);
|
||||||
OUT(num_hits);
|
eq->slotid = ServerToRoF2BuffSlot(emu->slotid);
|
||||||
|
// TODO: implement slot_data stuff
|
||||||
if (emu->bufffade == 1)
|
if (emu->bufffade == 1)
|
||||||
eq->bufffade = 1;
|
eq->bufffade = 1;
|
||||||
else
|
else
|
||||||
@@ -501,13 +508,13 @@ namespace RoF2
|
|||||||
{
|
{
|
||||||
outapp = new EQApplicationPacket(OP_BuffCreate, 29);
|
outapp = new EQApplicationPacket(OP_BuffCreate, 29);
|
||||||
outapp->WriteUInt32(emu->entityid);
|
outapp->WriteUInt32(emu->entityid);
|
||||||
outapp->WriteUInt32(0x0271); // Unk
|
outapp->WriteUInt32(0); // tic timer
|
||||||
outapp->WriteUInt8(0); // Type of OP_BuffCreate packet ?
|
outapp->WriteUInt8(0); // Type of OP_BuffCreate packet ?
|
||||||
outapp->WriteUInt16(1); // 1 buff in this packet
|
outapp->WriteUInt16(1); // 1 buff in this packet
|
||||||
outapp->WriteUInt32(emu->slotid);
|
outapp->WriteUInt32(eq->slotid);
|
||||||
outapp->WriteUInt32(0xffffffff); // SpellID (0xffff to remove)
|
outapp->WriteUInt32(0xffffffff); // SpellID (0xffff to remove)
|
||||||
outapp->WriteUInt32(0); // Duration
|
outapp->WriteUInt32(0); // Duration
|
||||||
outapp->WriteUInt32(0); // ?
|
outapp->WriteUInt32(0); // numhits
|
||||||
outapp->WriteUInt8(0); // Caster name
|
outapp->WriteUInt8(0); // Caster name
|
||||||
outapp->WriteUInt8(0); // Type
|
outapp->WriteUInt8(0); // Type
|
||||||
}
|
}
|
||||||
@@ -531,21 +538,9 @@ namespace RoF2
|
|||||||
__packet->WriteUInt8(emu->all_buffs); // 1 indicates all buffs on the player (0 to add or remove a single buff)
|
__packet->WriteUInt8(emu->all_buffs); // 1 indicates all buffs on the player (0 to add or remove a single buff)
|
||||||
__packet->WriteUInt16(emu->count);
|
__packet->WriteUInt16(emu->count);
|
||||||
|
|
||||||
for (uint16 i = 0; i < emu->count; ++i)
|
for (int i = 0; i < emu->count; ++i)
|
||||||
{
|
{
|
||||||
uint16 buffslot = emu->entries[i].buff_slot;
|
__packet->WriteUInt32(emu->type == 0 ? ServerToRoF2BuffSlot(emu->entries[i].buff_slot) : emu->entries[i].buff_slot);
|
||||||
// Not sure if this is needs amending for RoF2 yet.
|
|
||||||
if (emu->entries[i].buff_slot >= 25)
|
|
||||||
{
|
|
||||||
buffslot += 17;
|
|
||||||
}
|
|
||||||
// TODO: We should really just deal with these "server side"
|
|
||||||
// so we can have clients not limited to other clients.
|
|
||||||
// This fixes discs, songs were changed to 20
|
|
||||||
if (buffslot == 54)
|
|
||||||
buffslot = 62;
|
|
||||||
|
|
||||||
__packet->WriteUInt32(buffslot);
|
|
||||||
__packet->WriteUInt32(emu->entries[i].spell_id);
|
__packet->WriteUInt32(emu->entries[i].spell_id);
|
||||||
__packet->WriteUInt32(emu->entries[i].tics_remaining);
|
__packet->WriteUInt32(emu->entries[i].tics_remaining);
|
||||||
__packet->WriteUInt32(emu->entries[i].num_hits); // Unknown
|
__packet->WriteUInt32(emu->entries[i].num_hits); // Unknown
|
||||||
@@ -572,10 +567,7 @@ namespace RoF2
|
|||||||
ENCODE_LENGTH_EXACT(CastSpell_Struct);
|
ENCODE_LENGTH_EXACT(CastSpell_Struct);
|
||||||
SETUP_DIRECT_ENCODE(CastSpell_Struct, structs::CastSpell_Struct);
|
SETUP_DIRECT_ENCODE(CastSpell_Struct, structs::CastSpell_Struct);
|
||||||
|
|
||||||
if (emu->slot == 10)
|
eq->slot = static_cast<uint32>(ServerToRoF2CastingSlot(static_cast<EQEmu::CastingSlot>(emu->slot)));
|
||||||
eq->slot = 13;
|
|
||||||
else
|
|
||||||
OUT(slot);
|
|
||||||
|
|
||||||
OUT(spell_id);
|
OUT(spell_id);
|
||||||
eq->inventory_slot = ServerToRoF2Slot(emu->inventoryslot);
|
eq->inventory_slot = ServerToRoF2Slot(emu->inventoryslot);
|
||||||
@@ -660,7 +652,7 @@ namespace RoF2
|
|||||||
ob.write((const char*)&item_count, sizeof(uint32));
|
ob.write((const char*)&item_count, sizeof(uint32));
|
||||||
|
|
||||||
for (int index = 0; index < item_count; ++index, ++eq) {
|
for (int index = 0; index < item_count; ++index, ++eq) {
|
||||||
SerializeItem(ob, (const ItemInst*)eq->inst, eq->slot_id, 0, ItemPacketCharInventory);
|
SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0, ItemPacketCharInventory);
|
||||||
if (ob.tellp() == last_pos)
|
if (ob.tellp() == last_pos)
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id);
|
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id);
|
||||||
|
|
||||||
@@ -1051,8 +1043,8 @@ namespace RoF2
|
|||||||
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, emu->drop_id); // Some unique id
|
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, emu->drop_id); // Some unique id
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, 0); // Same for all objects in the zone
|
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, 0); // Same for all objects in the zone
|
||||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->heading);
|
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->heading);
|
||||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, 0); // X tilt
|
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->tilt_x); // X tilt
|
||||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, 0); // Y tilt
|
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->tilt_y); // Y tilt
|
||||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->size != 0 && (float)emu->size < 5000.f ? (float)((float)emu->size / 100.0f) : 1.f ); // This appears to be the size field. Hackish logic because some PEQ DB items were corrupt.
|
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->size != 0 && (float)emu->size < 5000.f ? (float)((float)emu->size / 100.0f) : 1.f ); // This appears to be the size field. Hackish logic because some PEQ DB items were corrupt.
|
||||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->y);
|
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->y);
|
||||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->x);
|
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->x);
|
||||||
@@ -1190,17 +1182,17 @@ namespace RoF2
|
|||||||
// Leader
|
// Leader
|
||||||
//
|
//
|
||||||
|
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); // index
|
||||||
VARSTRUCT_ENCODE_STRING(Buffer, gu2->yourname);
|
VARSTRUCT_ENCODE_STRING(Buffer, gu2->yourname); // name
|
||||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint16, Buffer, 0); // owner name of merc
|
||||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0);
|
|
||||||
//VARSTRUCT_ENCODE_STRING(Buffer, "");
|
//VARSTRUCT_ENCODE_STRING(Buffer, "");
|
||||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0); // This is a string
|
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0); // This is a string
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0x46); // Observed 0x41 and 0x46 here
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0x46); // level
|
||||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0); // group tank flag
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0); // group assist flag
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0); // group puller flag
|
||||||
VARSTRUCT_ENCODE_TYPE(uint16, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); // offline
|
||||||
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); // timestamp
|
||||||
|
|
||||||
int MemberNumber = 1;
|
int MemberNumber = 1;
|
||||||
|
|
||||||
@@ -1209,17 +1201,17 @@ namespace RoF2
|
|||||||
if (gu2->membername[i][0] == '\0')
|
if (gu2->membername[i][0] == '\0')
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, MemberNumber++);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, MemberNumber++); // index
|
||||||
VARSTRUCT_ENCODE_STRING(Buffer, gu2->membername[i]);
|
VARSTRUCT_ENCODE_STRING(Buffer, gu2->membername[i]); // name
|
||||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint16, Buffer, 0); // merc flag
|
||||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0);
|
|
||||||
//VARSTRUCT_ENCODE_STRING(Buffer, "");
|
//VARSTRUCT_ENCODE_STRING(Buffer, "");
|
||||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0); // This is a string
|
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0); // owner name fo merc
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0x41); // Observed 0x41 and 0x46 here
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0x41); // level
|
||||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0); // group tank flag
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); // Low byte is Main Assist Flag
|
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0); // group assist flag
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0); // group puller flag
|
||||||
VARSTRUCT_ENCODE_TYPE(uint16, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); // offline
|
||||||
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); // timestamp
|
||||||
}
|
}
|
||||||
|
|
||||||
//Log.Hex(Logs::Netcode, outapp->pBuffer, outapp->size);
|
//Log.Hex(Logs::Netcode, outapp->pBuffer, outapp->size);
|
||||||
@@ -1568,17 +1560,6 @@ namespace RoF2
|
|||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
}
|
}
|
||||||
|
|
||||||
ENCODE(OP_InterruptCast)
|
|
||||||
{
|
|
||||||
ENCODE_LENGTH_EXACT(InterruptCast_Struct);
|
|
||||||
SETUP_DIRECT_ENCODE(InterruptCast_Struct, structs::InterruptCast_Struct);
|
|
||||||
|
|
||||||
OUT(spawnid);
|
|
||||||
OUT(messageid);
|
|
||||||
|
|
||||||
FINISH_ENCODE();
|
|
||||||
}
|
|
||||||
|
|
||||||
ENCODE(OP_ItemLinkResponse) { ENCODE_FORWARD(OP_ItemPacket); }
|
ENCODE(OP_ItemLinkResponse) { ENCODE_FORWARD(OP_ItemPacket); }
|
||||||
|
|
||||||
ENCODE(OP_ItemPacket)
|
ENCODE(OP_ItemPacket)
|
||||||
@@ -1598,7 +1579,7 @@ namespace RoF2
|
|||||||
|
|
||||||
ob.write((const char*)__emu_buffer, 4);
|
ob.write((const char*)__emu_buffer, 4);
|
||||||
|
|
||||||
SerializeItem(ob, (const ItemInst*)int_struct->inst, int_struct->slot_id, 0, old_item_pkt->PacketType);
|
SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0, old_item_pkt->PacketType);
|
||||||
if (ob.tellp() == last_pos) {
|
if (ob.tellp() == last_pos) {
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d.", int_struct->slot_id);
|
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d.", int_struct->slot_id);
|
||||||
delete in;
|
delete in;
|
||||||
@@ -1689,7 +1670,8 @@ namespace RoF2
|
|||||||
OUT(new_mana);
|
OUT(new_mana);
|
||||||
OUT(stamina);
|
OUT(stamina);
|
||||||
OUT(spell_id);
|
OUT(spell_id);
|
||||||
eq->unknown16 = -1; // Self Interrupt/Success = -1, Fizzle = 1, Other Interrupt = 2?
|
OUT(keepcasting);
|
||||||
|
eq->slot = -1; // this is spell gem slot. It's -1 in normal operation
|
||||||
|
|
||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
}
|
}
|
||||||
@@ -2087,18 +2069,18 @@ namespace RoF2
|
|||||||
__packet->WriteUInt8(1); // 1 indicates all buffs on the pet (0 to add or remove a single buff)
|
__packet->WriteUInt8(1); // 1 indicates all buffs on the pet (0 to add or remove a single buff)
|
||||||
__packet->WriteUInt16(emu->buffcount);
|
__packet->WriteUInt16(emu->buffcount);
|
||||||
|
|
||||||
for (uint16 i = 0; i < BUFF_COUNT; ++i)
|
for (uint16 i = 0; i < PET_BUFF_COUNT; ++i)
|
||||||
{
|
{
|
||||||
if (emu->spellid[i])
|
if (emu->spellid[i])
|
||||||
{
|
{
|
||||||
__packet->WriteUInt32(i);
|
__packet->WriteUInt32(i);
|
||||||
__packet->WriteUInt32(emu->spellid[i]);
|
__packet->WriteUInt32(emu->spellid[i]);
|
||||||
__packet->WriteUInt32(emu->ticsremaining[i]);
|
__packet->WriteUInt32(emu->ticsremaining[i]);
|
||||||
__packet->WriteUInt32(0); // Unknown
|
__packet->WriteUInt32(0); // num hits
|
||||||
__packet->WriteString("");
|
__packet->WriteString("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
__packet->WriteUInt8(0); // Unknown
|
__packet->WriteUInt8(0); // some sort of type
|
||||||
|
|
||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
}
|
}
|
||||||
@@ -2152,9 +2134,9 @@ namespace RoF2
|
|||||||
|
|
||||||
outapp->WriteUInt32(22); // Equipment count
|
outapp->WriteUInt32(22); // Equipment count
|
||||||
|
|
||||||
for (int r = 0; r < 9; r++)
|
for (int r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++)
|
||||||
{
|
{
|
||||||
outapp->WriteUInt32(emu->item_material[r]);
|
outapp->WriteUInt32(emu->item_material.Slot[r].Material);
|
||||||
outapp->WriteUInt32(0);
|
outapp->WriteUInt32(0);
|
||||||
outapp->WriteUInt32(0);
|
outapp->WriteUInt32(0);
|
||||||
outapp->WriteUInt32(0);
|
outapp->WriteUInt32(0);
|
||||||
@@ -2172,9 +2154,9 @@ namespace RoF2
|
|||||||
outapp->WriteUInt32(0);
|
outapp->WriteUInt32(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
outapp->WriteUInt32(9); // Equipment2 count
|
outapp->WriteUInt32(EQEmu::textures::materialCount); // Equipment2 count
|
||||||
|
|
||||||
for (int r = 0; r < 9; r++)
|
for (int r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++)
|
||||||
{
|
{
|
||||||
outapp->WriteUInt32(0);
|
outapp->WriteUInt32(0);
|
||||||
outapp->WriteUInt32(0);
|
outapp->WriteUInt32(0);
|
||||||
@@ -2183,21 +2165,21 @@ namespace RoF2
|
|||||||
outapp->WriteUInt32(0);
|
outapp->WriteUInt32(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
outapp->WriteUInt32(9); // Tint Count
|
outapp->WriteUInt32(EQEmu::textures::materialCount); // Tint Count
|
||||||
|
|
||||||
for (int r = 0; r < 7; r++)
|
for (int r = 0; r < 7; r++)
|
||||||
{
|
{
|
||||||
outapp->WriteUInt32(emu->item_tint[r].Color);
|
outapp->WriteUInt32(emu->item_tint.Slot[r].Color);
|
||||||
}
|
}
|
||||||
// Write zeroes for extra two tint values
|
// Write zeroes for extra two tint values
|
||||||
outapp->WriteUInt32(0);
|
outapp->WriteUInt32(0);
|
||||||
outapp->WriteUInt32(0);
|
outapp->WriteUInt32(0);
|
||||||
|
|
||||||
outapp->WriteUInt32(9); // Tint2 Count
|
outapp->WriteUInt32(EQEmu::textures::materialCount); // Tint2 Count
|
||||||
|
|
||||||
for (int r = 0; r < 7; r++)
|
for (int r = 0; r < 7; r++)
|
||||||
{
|
{
|
||||||
outapp->WriteUInt32(emu->item_tint[r].Color);
|
outapp->WriteUInt32(emu->item_tint.Slot[r].Color);
|
||||||
}
|
}
|
||||||
// Write zeroes for extra two tint values
|
// Write zeroes for extra two tint values
|
||||||
outapp->WriteUInt32(0);
|
outapp->WriteUInt32(0);
|
||||||
@@ -2334,22 +2316,23 @@ namespace RoF2
|
|||||||
|
|
||||||
outapp->WriteUInt32(structs::MAX_PP_MEMSPELL); // Memorised spell slots
|
outapp->WriteUInt32(structs::MAX_PP_MEMSPELL); // Memorised spell slots
|
||||||
|
|
||||||
for (uint32 r = 0; r < MAX_PP_MEMSPELL; r++)
|
for (uint32 r = 0; r < MAX_PP_MEMSPELL; r++) // write first 12
|
||||||
{
|
{
|
||||||
outapp->WriteUInt32(emu->mem_spells[r]);
|
outapp->WriteUInt32(emu->mem_spells[r]);
|
||||||
}
|
}
|
||||||
// zeroes for the rest of the slots
|
// zeroes for the rest of the slots the other 4, which actually don't work on the client at all :D
|
||||||
for (uint32 r = 0; r < structs::MAX_PP_MEMSPELL - MAX_PP_MEMSPELL; r++)
|
for (uint32 r = 0; r < structs::MAX_PP_MEMSPELL - MAX_PP_MEMSPELL; r++)
|
||||||
{
|
{
|
||||||
outapp->WriteUInt32(0xFFFFFFFFU);
|
outapp->WriteUInt32(0xFFFFFFFFU);
|
||||||
}
|
}
|
||||||
|
|
||||||
outapp->WriteUInt32(13); // Unknown count
|
outapp->WriteUInt32(13); // gem refresh counts
|
||||||
|
|
||||||
for (uint32 r = 0; r < 13; r++)
|
for (uint32 r = 0; r < MAX_PP_MEMSPELL; r++)
|
||||||
{
|
{
|
||||||
outapp->WriteUInt32(0); // Unknown
|
outapp->WriteUInt32(emu->spellSlotRefresh[r]); // spell gem refresh
|
||||||
}
|
}
|
||||||
|
outapp->WriteUInt32(0); // also refresh -- historically HT/LoH :P
|
||||||
|
|
||||||
outapp->WriteUInt8(0); // Unknown
|
outapp->WriteUInt8(0); // Unknown
|
||||||
|
|
||||||
@@ -2358,31 +2341,33 @@ namespace RoF2
|
|||||||
for (uint32 r = 0; r < BUFF_COUNT; r++)
|
for (uint32 r = 0; r < BUFF_COUNT; r++)
|
||||||
{
|
{
|
||||||
float instrument_mod = 0.0f;
|
float instrument_mod = 0.0f;
|
||||||
uint8 slotid = emu->buffs[r].slotid;
|
uint8 effect_type = emu->buffs[r].effect_type;
|
||||||
uint32 player_id = emu->buffs[r].player_id;;
|
uint32 player_id = emu->buffs[r].player_id;;
|
||||||
|
|
||||||
if (emu->buffs[r].spellid != 0xFFFF && emu->buffs[r].spellid != 0)
|
if (emu->buffs[r].spellid != 0xFFFF && emu->buffs[r].spellid != 0)
|
||||||
{
|
{
|
||||||
instrument_mod = 1.0f + (emu->buffs[r].bard_modifier - 10) / 10.0f;
|
instrument_mod = 1.0f + (emu->buffs[r].bard_modifier - 10) / 10.0f;
|
||||||
slotid = 2;
|
effect_type = 2;
|
||||||
player_id = 0x000717fd;
|
player_id = 0x000717fd;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
slotid = 0;
|
effect_type = 0;
|
||||||
}
|
}
|
||||||
outapp->WriteUInt8(0); // Had this as slot, but always appears to be 0 on live.
|
|
||||||
|
// this is different than the client struct for some reason :P
|
||||||
|
// missing a few things, shuffled around
|
||||||
|
outapp->WriteUInt8(0); // this is an unknown
|
||||||
outapp->WriteFloat(instrument_mod);
|
outapp->WriteFloat(instrument_mod);
|
||||||
outapp->WriteUInt32(player_id);
|
outapp->WriteUInt32(player_id);
|
||||||
outapp->WriteUInt8(0);
|
outapp->WriteUInt8(0);
|
||||||
outapp->WriteUInt32(emu->buffs[r].counters);
|
outapp->WriteUInt32(emu->buffs[r].counters);
|
||||||
//outapp->WriteUInt8(emu->buffs[r].bard_modifier);
|
|
||||||
outapp->WriteUInt32(emu->buffs[r].duration);
|
outapp->WriteUInt32(emu->buffs[r].duration);
|
||||||
outapp->WriteUInt8(emu->buffs[r].level);
|
outapp->WriteUInt8(emu->buffs[r].level);
|
||||||
outapp->WriteUInt32(emu->buffs[r].spellid);
|
outapp->WriteUInt32(emu->buffs[r].spellid);
|
||||||
outapp->WriteUInt32(slotid); // Only ever seen 2
|
outapp->WriteUInt8(effect_type); // Only ever seen 2
|
||||||
|
outapp->WriteUInt32(emu->buffs[r].num_hits);
|
||||||
outapp->WriteUInt32(0);
|
outapp->WriteUInt32(0);
|
||||||
outapp->WriteUInt8(0);
|
|
||||||
outapp->WriteUInt32(emu->buffs[r].counters); // Appears twice ?
|
outapp->WriteUInt32(emu->buffs[r].counters); // Appears twice ?
|
||||||
|
|
||||||
for (uint32 j = 0; j < 44; ++j)
|
for (uint32 j = 0; j < 44; ++j)
|
||||||
@@ -3139,13 +3124,13 @@ namespace RoF2
|
|||||||
eq_cse->Gender = emu_cse->Gender;
|
eq_cse->Gender = emu_cse->Gender;
|
||||||
eq_cse->Face = emu_cse->Face;
|
eq_cse->Face = emu_cse->Face;
|
||||||
|
|
||||||
for (int equip_index = 0; equip_index < EQEmu::legacy::MaterialCount; equip_index++) {
|
for (int equip_index = 0; equip_index < EQEmu::textures::materialCount; equip_index++) {
|
||||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteModel;
|
||||||
eq_cse->Equip[equip_index].HeroForgeModel = emu_cse->Equip[equip_index].HeroForgeModel;
|
eq_cse->Equip[equip_index].HeroForgeModel = emu_cse->Equip[equip_index].HerosForgeModel;
|
||||||
eq_cse->Equip[equip_index].Material2 = emu_cse->Equip[equip_index].Material2;
|
eq_cse->Equip[equip_index].Material2 = emu_cse->Equip[equip_index].Unknown2;
|
||||||
eq_cse->Equip[equip_index].Color.Color = emu_cse->Equip[equip_index].Color.Color;
|
eq_cse->Equip[equip_index].Color = emu_cse->Equip[equip_index].Color;
|
||||||
}
|
}
|
||||||
|
|
||||||
eq_cse->Unknown15 = emu_cse->Unknown15;
|
eq_cse->Unknown15 = emu_cse->Unknown15;
|
||||||
@@ -4306,24 +4291,24 @@ namespace RoF2
|
|||||||
|
|
||||||
if ((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
|
if ((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
|
||||||
{
|
{
|
||||||
for (k = 0; k < 9; ++k)
|
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; ++k)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->colors[k].Color);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment_tint.Slot[k].Color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
structs::EquipStruct *Equipment = (structs::EquipStruct *)Buffer;
|
structs::Texture_Struct *Equipment = (structs::Texture_Struct *)Buffer;
|
||||||
|
|
||||||
for (k = 0; k < 9; k++) {
|
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||||
Equipment[k].Material = emu->equipment[k].Material;
|
Equipment[k].Material = emu->equipment.Slot[k].Material;
|
||||||
Equipment[k].Unknown1 = emu->equipment[k].Unknown1;
|
Equipment[k].Unknown1 = emu->equipment.Slot[k].Unknown1;
|
||||||
Equipment[k].EliteMaterial = emu->equipment[k].EliteMaterial;
|
Equipment[k].EliteMaterial = emu->equipment.Slot[k].EliteModel;
|
||||||
Equipment[k].HeroForgeModel = emu->equipment[k].HeroForgeModel;
|
Equipment[k].HeroForgeModel = emu->equipment.Slot[k].HerosForgeModel;
|
||||||
Equipment[k].Material2 = emu->equipment[k].Material2;
|
Equipment[k].Material2 = emu->equipment.Slot[k].Unknown2;
|
||||||
}
|
}
|
||||||
|
|
||||||
Buffer += (sizeof(structs::EquipStruct) * 9);
|
Buffer += (sizeof(structs::Texture_Struct) * EQEmu::textures::materialCount);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -4333,13 +4318,13 @@ namespace RoF2
|
|||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
|
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialPrimary].Material);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment.Primary.Material);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
|
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialSecondary].Material);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment.Secondary.Material);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
@@ -4389,6 +4374,19 @@ namespace RoF2
|
|||||||
delete in;
|
delete in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ENCODE(OP_CrystalCountUpdate)
|
||||||
|
{
|
||||||
|
ENCODE_LENGTH_EXACT(CrystalCountUpdate_Struct);
|
||||||
|
SETUP_DIRECT_ENCODE(CrystalCountUpdate_Struct, structs::CrystalCountUpdate_Struct);
|
||||||
|
|
||||||
|
OUT(CurrentRadiantCrystals);
|
||||||
|
OUT(CareerRadiantCrystals);
|
||||||
|
OUT(CurrentEbonCrystals);
|
||||||
|
OUT(CareerEbonCrystals);
|
||||||
|
|
||||||
|
FINISH_ENCODE();
|
||||||
|
}
|
||||||
|
|
||||||
// DECODE methods
|
// DECODE methods
|
||||||
|
|
||||||
DECODE(OP_AdventureMerchantSell)
|
DECODE(OP_AdventureMerchantSell)
|
||||||
@@ -4513,16 +4511,16 @@ namespace RoF2
|
|||||||
|
|
||||||
DECODE(OP_Buff)
|
DECODE(OP_Buff)
|
||||||
{
|
{
|
||||||
DECODE_LENGTH_EXACT(structs::SpellBuffFade_Struct_Live);
|
DECODE_LENGTH_EXACT(structs::SpellBuffPacket_Struct);
|
||||||
SETUP_DIRECT_DECODE(SpellBuffFade_Struct, structs::SpellBuffFade_Struct_Live);
|
SETUP_DIRECT_DECODE(SpellBuffPacket_Struct, structs::SpellBuffPacket_Struct);
|
||||||
|
|
||||||
IN(entityid);
|
IN(entityid);
|
||||||
//IN(slot);
|
IN(buff.effect_type);
|
||||||
IN(level);
|
IN(buff.level);
|
||||||
IN(effect);
|
IN(buff.unknown003);
|
||||||
IN(spellid);
|
IN(buff.spellid);
|
||||||
IN(duration);
|
IN(buff.duration);
|
||||||
IN(slotid);
|
emu->slotid = RoF2ToServerBuffSlot(eq->slotid);
|
||||||
IN(bufffade);
|
IN(bufffade);
|
||||||
|
|
||||||
FINISH_DIRECT_DECODE();
|
FINISH_DIRECT_DECODE();
|
||||||
@@ -4535,7 +4533,7 @@ namespace RoF2
|
|||||||
DECODE_LENGTH_EXACT(structs::BuffRemoveRequest_Struct);
|
DECODE_LENGTH_EXACT(structs::BuffRemoveRequest_Struct);
|
||||||
SETUP_DIRECT_DECODE(BuffRemoveRequest_Struct, structs::BuffRemoveRequest_Struct);
|
SETUP_DIRECT_DECODE(BuffRemoveRequest_Struct, structs::BuffRemoveRequest_Struct);
|
||||||
|
|
||||||
emu->SlotID = (eq->SlotID < 42) ? eq->SlotID : (eq->SlotID - 17);
|
emu->SlotID = RoF2ToServerBuffSlot(eq->SlotID);
|
||||||
|
|
||||||
IN(EntityID);
|
IN(EntityID);
|
||||||
|
|
||||||
@@ -4547,10 +4545,7 @@ namespace RoF2
|
|||||||
DECODE_LENGTH_EXACT(structs::CastSpell_Struct);
|
DECODE_LENGTH_EXACT(structs::CastSpell_Struct);
|
||||||
SETUP_DIRECT_DECODE(CastSpell_Struct, structs::CastSpell_Struct);
|
SETUP_DIRECT_DECODE(CastSpell_Struct, structs::CastSpell_Struct);
|
||||||
|
|
||||||
if (eq->slot == 13)
|
emu->slot = static_cast<uint32>(RoF2ToServerCastingSlot(static_cast<CastingSlot>(eq->slot)));
|
||||||
emu->slot = 10;
|
|
||||||
else
|
|
||||||
IN(slot);
|
|
||||||
|
|
||||||
IN(spell_id);
|
IN(spell_id);
|
||||||
emu->inventoryslot = RoF2ToServerSlot(eq->inventory_slot);
|
emu->inventoryslot = RoF2ToServerSlot(eq->inventory_slot);
|
||||||
@@ -5041,7 +5036,7 @@ namespace RoF2
|
|||||||
|
|
||||||
IN(item_id);
|
IN(item_id);
|
||||||
int r;
|
int r;
|
||||||
for (r = 0; r < EQEmu::legacy::ITEM_COMMON_SIZE; r++) {
|
for (r = EQEmu::inventory::socketBegin; r < EQEmu::inventory::SocketCount; r++) {
|
||||||
IN(augments[r]);
|
IN(augments[r]);
|
||||||
}
|
}
|
||||||
IN(link_hash);
|
IN(link_hash);
|
||||||
@@ -5159,6 +5154,7 @@ namespace RoF2
|
|||||||
|
|
||||||
IN(type);
|
IN(type);
|
||||||
IN(invslot);
|
IN(invslot);
|
||||||
|
IN(subslot);
|
||||||
emu->window = (uint8)eq->window;
|
emu->window = (uint8)eq->window;
|
||||||
strn0cpy(emu->txtfile, eq->txtfile, sizeof(emu->txtfile));
|
strn0cpy(emu->txtfile, eq->txtfile, sizeof(emu->txtfile));
|
||||||
|
|
||||||
@@ -5474,9 +5470,9 @@ namespace RoF2
|
|||||||
return NextItemInstSerialNumber;
|
return NextItemInstSerialNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SerializeItem(EQEmu::OutBuffer& ob, const ItemInst *inst, int16 slot_id_in, uint8 depth, ItemPacketType packet_type)
|
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth, ItemPacketType packet_type)
|
||||||
{
|
{
|
||||||
const EQEmu::Item_Struct *item = inst->GetUnscaledItem();
|
const EQEmu::ItemData *item = inst->GetUnscaledItem();
|
||||||
|
|
||||||
RoF2::structs::ItemSerializationHeader hdr;
|
RoF2::structs::ItemSerializationHeader hdr;
|
||||||
|
|
||||||
@@ -5484,7 +5480,7 @@ namespace RoF2
|
|||||||
|
|
||||||
snprintf(hdr.unknown000, sizeof(hdr.unknown000), "%016d", item->ID);
|
snprintf(hdr.unknown000, sizeof(hdr.unknown000), "%016d", item->ID);
|
||||||
|
|
||||||
hdr.stacksize = (inst->IsStackable() ? ((inst->GetCharges() > 254) ? 0xFFFFFFFF : inst->GetCharges()) : 1);
|
hdr.stacksize = (inst->IsStackable() ? ((inst->GetCharges() > 1000) ? 0xFFFFFFFF : inst->GetCharges()) : 1);
|
||||||
hdr.unknown004 = 0;
|
hdr.unknown004 = 0;
|
||||||
|
|
||||||
structs::InventorySlot_Struct slot_id = ServerToRoF2Slot(slot_id_in, packet_type);
|
structs::InventorySlot_Struct slot_id = ServerToRoF2Slot(slot_id_in, packet_type);
|
||||||
@@ -5530,7 +5526,7 @@ namespace RoF2
|
|||||||
|
|
||||||
if (inst->GetOrnamentationIDFile() && inst->GetOrnamentationIcon()) {
|
if (inst->GetOrnamentationIDFile() && inst->GetOrnamentationIcon()) {
|
||||||
ornaIcon = inst->GetOrnamentationIcon();
|
ornaIcon = inst->GetOrnamentationIcon();
|
||||||
heroModel = inst->GetOrnamentHeroModel(Inventory::CalcMaterialFromSlot(slot_id_in));
|
heroModel = inst->GetOrnamentHeroModel(EQEmu::InventoryProfile::CalcMaterialFromSlot(slot_id_in));
|
||||||
|
|
||||||
char tmp[30]; memset(tmp, 0x0, 30); sprintf(tmp, "IT%d", inst->GetOrnamentationIDFile());
|
char tmp[30]; memset(tmp, 0x0, 30); sprintf(tmp, "IT%d", inst->GetOrnamentationIDFile());
|
||||||
|
|
||||||
@@ -5897,18 +5893,18 @@ namespace RoF2
|
|||||||
|
|
||||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||||
|
|
||||||
for (uint32 index = SUB_INDEX_BEGIN; index < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++index) {
|
for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) {
|
||||||
ItemInst* sub = inst->GetItem(index);
|
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||||
if (!sub)
|
if (!sub)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
int SubSlotNumber = INVALID_INDEX;
|
int SubSlotNumber = INVALID_INDEX;
|
||||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
||||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + index + 1);
|
SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1);
|
||||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||||
else
|
else
|
||||||
SubSlotNumber = slot_id_in;
|
SubSlotNumber = slot_id_in;
|
||||||
|
|
||||||
@@ -5926,15 +5922,15 @@ namespace RoF2
|
|||||||
{
|
{
|
||||||
structs::InventorySlot_Struct RoF2Slot;
|
structs::InventorySlot_Struct RoF2Slot;
|
||||||
RoF2Slot.Type = INVALID_INDEX;
|
RoF2Slot.Type = INVALID_INDEX;
|
||||||
RoF2Slot.Unknown02 = NOT_USED;
|
RoF2Slot.Unknown02 = 0;
|
||||||
RoF2Slot.Slot = INVALID_INDEX;
|
RoF2Slot.Slot = INVALID_INDEX;
|
||||||
RoF2Slot.SubIndex = INVALID_INDEX;
|
RoF2Slot.SubIndex = INVALID_INDEX;
|
||||||
RoF2Slot.AugIndex = INVALID_INDEX;
|
RoF2Slot.AugIndex = INVALID_INDEX;
|
||||||
RoF2Slot.Unknown01 = NOT_USED;
|
RoF2Slot.Unknown01 = 0;
|
||||||
|
|
||||||
uint32 TempSlot = 0;
|
uint32 TempSlot = 0;
|
||||||
|
|
||||||
if (serverSlot < 56 || serverSlot == EQEmu::legacy::SlotPowerSource) { // Main Inventory and Cursor
|
if (serverSlot < 56 || serverSlot == EQEmu::inventory::slotPowerSource) { // Main Inventory and Cursor
|
||||||
if (PacketType == ItemPacketLoot)
|
if (PacketType == ItemPacketLoot)
|
||||||
{
|
{
|
||||||
RoF2Slot.Type = invtype::InvTypeCorpse;
|
RoF2Slot.Type = invtype::InvTypeCorpse;
|
||||||
@@ -5946,13 +5942,13 @@ namespace RoF2
|
|||||||
RoF2Slot.Slot = serverSlot;
|
RoF2Slot.Slot = serverSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||||
RoF2Slot.Slot = invslot::PossessionsPowerSource;
|
RoF2Slot.Slot = invslot::PossessionsPowerSource;
|
||||||
|
|
||||||
else if (serverSlot >= EQEmu::legacy::SlotCursor && PacketType != ItemPacketLoot) // Cursor and Extended Corpse Inventory
|
else if (serverSlot >= EQEmu::inventory::slotCursor && PacketType != ItemPacketLoot) // Cursor and Extended Corpse Inventory
|
||||||
RoF2Slot.Slot += 3;
|
RoF2Slot.Slot += 3;
|
||||||
|
|
||||||
else if (serverSlot >= EQEmu::legacy::SlotAmmo) // (> 20)
|
else if (serverSlot >= EQEmu::inventory::slotAmmo) // (> 20)
|
||||||
RoF2Slot.Slot += 1;
|
RoF2Slot.Slot += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5964,8 +5960,8 @@ namespace RoF2
|
|||||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) { // (> 250 && < 341)
|
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) { // (> 250 && < 341)
|
||||||
RoF2Slot.Type = invtype::InvTypePossessions;
|
RoF2Slot.Type = invtype::InvTypePossessions;
|
||||||
TempSlot = serverSlot - 1;
|
TempSlot = serverSlot - 1;
|
||||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 2;
|
RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 2;
|
||||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::inventory::ContainerCount);
|
||||||
|
|
||||||
if (RoF2Slot.Slot >= invslot::PossessionsGeneral9) // (> 30)
|
if (RoF2Slot.Slot >= invslot::PossessionsGeneral9) // (> 30)
|
||||||
RoF2Slot.Slot = invslot::PossessionsCursor;
|
RoF2Slot.Slot = invslot::PossessionsCursor;
|
||||||
@@ -5982,8 +5978,8 @@ namespace RoF2
|
|||||||
RoF2Slot.Slot = TempSlot;
|
RoF2Slot.Slot = TempSlot;
|
||||||
|
|
||||||
if (TempSlot > 30) { // (> 30)
|
if (TempSlot > 30) { // (> 30)
|
||||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3;
|
||||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::inventory::ContainerCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5993,8 +5989,8 @@ namespace RoF2
|
|||||||
RoF2Slot.Slot = TempSlot;
|
RoF2Slot.Slot = TempSlot;
|
||||||
|
|
||||||
if (TempSlot > 30) { // (> 30)
|
if (TempSlot > 30) { // (> 30)
|
||||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3;
|
||||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::inventory::ContainerCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6004,8 +6000,8 @@ namespace RoF2
|
|||||||
RoF2Slot.Slot = TempSlot;
|
RoF2Slot.Slot = TempSlot;
|
||||||
|
|
||||||
if (TempSlot > 30) {
|
if (TempSlot > 30) {
|
||||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3;
|
||||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::inventory::ContainerCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -6039,20 +6035,20 @@ namespace RoF2
|
|||||||
RoF2Slot.Slot = INVALID_INDEX;
|
RoF2Slot.Slot = INVALID_INDEX;
|
||||||
RoF2Slot.SubIndex = INVALID_INDEX;
|
RoF2Slot.SubIndex = INVALID_INDEX;
|
||||||
RoF2Slot.AugIndex = INVALID_INDEX;
|
RoF2Slot.AugIndex = INVALID_INDEX;
|
||||||
RoF2Slot.Unknown01 = NOT_USED;
|
RoF2Slot.Unknown01 = 0;
|
||||||
|
|
||||||
uint32 TempSlot = 0;
|
uint32 TempSlot = 0;
|
||||||
|
|
||||||
if (serverSlot < 56 || serverSlot == EQEmu::legacy::SlotPowerSource) { // (< 52)
|
if (serverSlot < 56 || serverSlot == EQEmu::inventory::slotPowerSource) { // (< 52)
|
||||||
RoF2Slot.Slot = serverSlot;
|
RoF2Slot.Slot = serverSlot;
|
||||||
|
|
||||||
if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||||
RoF2Slot.Slot = invslot::PossessionsPowerSource;
|
RoF2Slot.Slot = invslot::PossessionsPowerSource;
|
||||||
|
|
||||||
else if (serverSlot >= EQEmu::legacy::SlotCursor) // Cursor and Extended Corpse Inventory
|
else if (serverSlot >= EQEmu::inventory::slotCursor) // Cursor and Extended Corpse Inventory
|
||||||
RoF2Slot.Slot += 3;
|
RoF2Slot.Slot += 3;
|
||||||
|
|
||||||
else if (serverSlot >= EQEmu::legacy::SlotAmmo) // Ammo and Personl Inventory
|
else if (serverSlot >= EQEmu::inventory::slotAmmo) // Ammo and Personl Inventory
|
||||||
RoF2Slot.Slot += 1;
|
RoF2Slot.Slot += 1;
|
||||||
|
|
||||||
/*else if (ServerSlot >= MainCursor) { // Cursor
|
/*else if (ServerSlot >= MainCursor) { // Cursor
|
||||||
@@ -6065,8 +6061,8 @@ namespace RoF2
|
|||||||
|
|
||||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) {
|
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) {
|
||||||
TempSlot = serverSlot - 1;
|
TempSlot = serverSlot - 1;
|
||||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 2;
|
RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 2;
|
||||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::inventory::ContainerCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert Server Slot %i to RoF2 Slots: Main %i, Sub %i, Aug %i, Unk1 %i", serverSlot, RoF2Slot.Slot, RoF2Slot.SubIndex, RoF2Slot.AugIndex, RoF2Slot.Unknown01);
|
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert Server Slot %i to RoF2 Slots: Main %i, Sub %i, Aug %i, Unk1 %i", serverSlot, RoF2Slot.Slot, RoF2Slot.SubIndex, RoF2Slot.AugIndex, RoF2Slot.Unknown01);
|
||||||
@@ -6086,7 +6082,7 @@ namespace RoF2
|
|||||||
|
|
||||||
if (rof2Slot.Type == invtype::InvTypePossessions && rof2Slot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51)
|
if (rof2Slot.Type == invtype::InvTypePossessions && rof2Slot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51)
|
||||||
if (rof2Slot.Slot == invslot::PossessionsPowerSource)
|
if (rof2Slot.Slot == invslot::PossessionsPowerSource)
|
||||||
TempSlot = EQEmu::legacy::SlotPowerSource;
|
TempSlot = EQEmu::inventory::slotPowerSource;
|
||||||
|
|
||||||
else if (rof2Slot.Slot >= invslot::PossessionsCursor) // Cursor and Extended Corpse Inventory
|
else if (rof2Slot.Slot >= invslot::PossessionsCursor) // Cursor and Extended Corpse Inventory
|
||||||
TempSlot = rof2Slot.Slot - 3;
|
TempSlot = rof2Slot.Slot - 3;
|
||||||
@@ -6108,8 +6104,8 @@ namespace RoF2
|
|||||||
else // Worn Slots
|
else // Worn Slots
|
||||||
TempSlot = rof2Slot.Slot;
|
TempSlot = rof2Slot.Slot;
|
||||||
|
|
||||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN) // Bag Slots
|
if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin) // Bag Slots
|
||||||
TempSlot = ((TempSlot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
TempSlot = ((TempSlot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1;
|
||||||
|
|
||||||
ServerSlot = TempSlot;
|
ServerSlot = TempSlot;
|
||||||
}
|
}
|
||||||
@@ -6117,8 +6113,8 @@ namespace RoF2
|
|||||||
else if (rof2Slot.Type == invtype::InvTypeBank) {
|
else if (rof2Slot.Type == invtype::InvTypeBank) {
|
||||||
TempSlot = EQEmu::legacy::BANK_BEGIN;
|
TempSlot = EQEmu::legacy::BANK_BEGIN;
|
||||||
|
|
||||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN)
|
if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin)
|
||||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1;
|
||||||
|
|
||||||
else
|
else
|
||||||
TempSlot += rof2Slot.Slot;
|
TempSlot += rof2Slot.Slot;
|
||||||
@@ -6129,8 +6125,8 @@ namespace RoF2
|
|||||||
else if (rof2Slot.Type == invtype::InvTypeSharedBank) {
|
else if (rof2Slot.Type == invtype::InvTypeSharedBank) {
|
||||||
TempSlot = EQEmu::legacy::SHARED_BANK_BEGIN;
|
TempSlot = EQEmu::legacy::SHARED_BANK_BEGIN;
|
||||||
|
|
||||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN)
|
if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin)
|
||||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1;
|
||||||
|
|
||||||
else
|
else
|
||||||
TempSlot += rof2Slot.Slot;
|
TempSlot += rof2Slot.Slot;
|
||||||
@@ -6141,8 +6137,8 @@ namespace RoF2
|
|||||||
else if (rof2Slot.Type == invtype::InvTypeTrade) {
|
else if (rof2Slot.Type == invtype::InvTypeTrade) {
|
||||||
TempSlot = EQEmu::legacy::TRADE_BEGIN;
|
TempSlot = EQEmu::legacy::TRADE_BEGIN;
|
||||||
|
|
||||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN)
|
if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin)
|
||||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1;
|
||||||
// OLD CODE:
|
// OLD CODE:
|
||||||
//TempSlot += 100 + (RoF2Slot.MainSlot * EmuConstants::ITEM_CONTAINER_SIZE) + RoF2Slot.SubSlot;
|
//TempSlot += 100 + (RoF2Slot.MainSlot * EmuConstants::ITEM_CONTAINER_SIZE) + RoF2Slot.SubSlot;
|
||||||
|
|
||||||
@@ -6155,7 +6151,7 @@ namespace RoF2
|
|||||||
else if (rof2Slot.Type == invtype::InvTypeWorld) {
|
else if (rof2Slot.Type == invtype::InvTypeWorld) {
|
||||||
TempSlot = EQEmu::legacy::WORLD_BEGIN;
|
TempSlot = EQEmu::legacy::WORLD_BEGIN;
|
||||||
|
|
||||||
if (rof2Slot.Slot >= SUB_INDEX_BEGIN)
|
if (rof2Slot.Slot >= EQEmu::inventory::containerBegin)
|
||||||
TempSlot += rof2Slot.Slot;
|
TempSlot += rof2Slot.Slot;
|
||||||
|
|
||||||
ServerSlot = TempSlot;
|
ServerSlot = TempSlot;
|
||||||
@@ -6190,7 +6186,7 @@ namespace RoF2
|
|||||||
|
|
||||||
if (rof2Slot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 33)
|
if (rof2Slot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 33)
|
||||||
if (rof2Slot.Slot == invslot::PossessionsPowerSource)
|
if (rof2Slot.Slot == invslot::PossessionsPowerSource)
|
||||||
TempSlot = EQEmu::legacy::SlotPowerSource;
|
TempSlot = EQEmu::inventory::slotPowerSource;
|
||||||
|
|
||||||
else if (rof2Slot.Slot >= invslot::PossessionsCursor) // Cursor and Extended Corpse Inventory
|
else if (rof2Slot.Slot >= invslot::PossessionsCursor) // Cursor and Extended Corpse Inventory
|
||||||
TempSlot = rof2Slot.Slot - 3;
|
TempSlot = rof2Slot.Slot - 3;
|
||||||
@@ -6207,8 +6203,8 @@ namespace RoF2
|
|||||||
else
|
else
|
||||||
TempSlot = rof2Slot.Slot;
|
TempSlot = rof2Slot.Slot;
|
||||||
|
|
||||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN) // Bag Slots
|
if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin) // Bag Slots
|
||||||
TempSlot = ((TempSlot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
TempSlot = ((TempSlot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1;
|
||||||
|
|
||||||
ServerSlot = TempSlot;
|
ServerSlot = TempSlot;
|
||||||
}
|
}
|
||||||
@@ -6287,4 +6283,108 @@ namespace RoF2
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline CastingSlot ServerToRoF2CastingSlot(EQEmu::CastingSlot slot)
|
||||||
|
{
|
||||||
|
switch (slot) {
|
||||||
|
case EQEmu::CastingSlot::Gem1:
|
||||||
|
return CastingSlot::Gem1;
|
||||||
|
case EQEmu::CastingSlot::Gem2:
|
||||||
|
return CastingSlot::Gem2;
|
||||||
|
case EQEmu::CastingSlot::Gem3:
|
||||||
|
return CastingSlot::Gem3;
|
||||||
|
case EQEmu::CastingSlot::Gem4:
|
||||||
|
return CastingSlot::Gem4;
|
||||||
|
case EQEmu::CastingSlot::Gem5:
|
||||||
|
return CastingSlot::Gem5;
|
||||||
|
case EQEmu::CastingSlot::Gem6:
|
||||||
|
return CastingSlot::Gem6;
|
||||||
|
case EQEmu::CastingSlot::Gem7:
|
||||||
|
return CastingSlot::Gem7;
|
||||||
|
case EQEmu::CastingSlot::Gem8:
|
||||||
|
return CastingSlot::Gem8;
|
||||||
|
case EQEmu::CastingSlot::Gem9:
|
||||||
|
return CastingSlot::Gem9;
|
||||||
|
case EQEmu::CastingSlot::Gem10:
|
||||||
|
return CastingSlot::Gem10;
|
||||||
|
case EQEmu::CastingSlot::Gem11:
|
||||||
|
return CastingSlot::Gem11;
|
||||||
|
case EQEmu::CastingSlot::Gem12:
|
||||||
|
return CastingSlot::Gem12;
|
||||||
|
case EQEmu::CastingSlot::Item:
|
||||||
|
case EQEmu::CastingSlot::PotionBelt:
|
||||||
|
return CastingSlot::Item;
|
||||||
|
case EQEmu::CastingSlot::Discipline:
|
||||||
|
return CastingSlot::Discipline;
|
||||||
|
case EQEmu::CastingSlot::AltAbility:
|
||||||
|
return CastingSlot::AltAbility;
|
||||||
|
default: // we shouldn't have any issues with other slots ... just return something
|
||||||
|
return CastingSlot::Discipline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline EQEmu::CastingSlot RoF2ToServerCastingSlot(CastingSlot slot)
|
||||||
|
{
|
||||||
|
switch (slot) {
|
||||||
|
case CastingSlot::Gem1:
|
||||||
|
return EQEmu::CastingSlot::Gem1;
|
||||||
|
case CastingSlot::Gem2:
|
||||||
|
return EQEmu::CastingSlot::Gem2;
|
||||||
|
case CastingSlot::Gem3:
|
||||||
|
return EQEmu::CastingSlot::Gem3;
|
||||||
|
case CastingSlot::Gem4:
|
||||||
|
return EQEmu::CastingSlot::Gem4;
|
||||||
|
case CastingSlot::Gem5:
|
||||||
|
return EQEmu::CastingSlot::Gem5;
|
||||||
|
case CastingSlot::Gem6:
|
||||||
|
return EQEmu::CastingSlot::Gem6;
|
||||||
|
case CastingSlot::Gem7:
|
||||||
|
return EQEmu::CastingSlot::Gem7;
|
||||||
|
case CastingSlot::Gem8:
|
||||||
|
return EQEmu::CastingSlot::Gem8;
|
||||||
|
case CastingSlot::Gem9:
|
||||||
|
return EQEmu::CastingSlot::Gem9;
|
||||||
|
case CastingSlot::Gem10:
|
||||||
|
return EQEmu::CastingSlot::Gem10;
|
||||||
|
case CastingSlot::Gem11:
|
||||||
|
return EQEmu::CastingSlot::Gem11;
|
||||||
|
case CastingSlot::Gem12:
|
||||||
|
return EQEmu::CastingSlot::Gem12;
|
||||||
|
case CastingSlot::Discipline:
|
||||||
|
return EQEmu::CastingSlot::Discipline;
|
||||||
|
case CastingSlot::Item:
|
||||||
|
return EQEmu::CastingSlot::Item;
|
||||||
|
case CastingSlot::AltAbility:
|
||||||
|
return EQEmu::CastingSlot::AltAbility;
|
||||||
|
default: // we shouldn't have any issues with other slots ... just return something
|
||||||
|
return EQEmu::CastingSlot::Discipline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// these should be optimized out for RoF2 since they should all boil down to return index :P
|
||||||
|
// but lets leave it here for future proofing
|
||||||
|
static inline int ServerToRoF2BuffSlot(int index)
|
||||||
|
{
|
||||||
|
// we're a disc
|
||||||
|
if (index >= EQEmu::constants::LongBuffs + EQEmu::constants::ShortBuffs)
|
||||||
|
return index - EQEmu::constants::LongBuffs - EQEmu::constants::ShortBuffs +
|
||||||
|
constants::LongBuffs + constants::ShortBuffs;
|
||||||
|
// we're a song
|
||||||
|
if (index >= EQEmu::constants::LongBuffs)
|
||||||
|
return index - EQEmu::constants::LongBuffs + constants::LongBuffs;
|
||||||
|
// we're a normal buff
|
||||||
|
return index; // as long as we guard against bad slots server side, we should be fine
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int RoF2ToServerBuffSlot(int index)
|
||||||
|
{
|
||||||
|
// we're a disc
|
||||||
|
if (index >= constants::LongBuffs + constants::ShortBuffs)
|
||||||
|
return index - constants::LongBuffs - constants::ShortBuffs + EQEmu::constants::LongBuffs +
|
||||||
|
EQEmu::constants::ShortBuffs;
|
||||||
|
// we're a song
|
||||||
|
if (index >= constants::LongBuffs)
|
||||||
|
return index - constants::LongBuffs + EQEmu::constants::LongBuffs;
|
||||||
|
// we're a normal buff
|
||||||
|
return index; // as long as we guard against bad slots server side, we should be fine
|
||||||
|
}
|
||||||
} /*RoF2*/
|
} /*RoF2*/
|
||||||
|
|||||||
@@ -50,6 +50,24 @@ namespace RoF2
|
|||||||
#include "rof2_ops.h"
|
#include "rof2_ops.h"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class CastingSlot : uint32 {
|
||||||
|
Gem1 = 0,
|
||||||
|
Gem2 = 1,
|
||||||
|
Gem3 = 2,
|
||||||
|
Gem4 = 3,
|
||||||
|
Gem5 = 4,
|
||||||
|
Gem6 = 5,
|
||||||
|
Gem7 = 6,
|
||||||
|
Gem8 = 7,
|
||||||
|
Gem9 = 8,
|
||||||
|
Gem10 = 9,
|
||||||
|
Gem11 = 10,
|
||||||
|
Gem12 = 11,
|
||||||
|
Item = 12,
|
||||||
|
Discipline = 13,
|
||||||
|
AltAbility = 0xFF
|
||||||
|
};
|
||||||
|
|
||||||
}; /*RoF2*/
|
}; /*RoF2*/
|
||||||
|
|
||||||
#endif /*COMMON_ROF2_H*/
|
#endif /*COMMON_ROF2_H*/
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#include "../string_util.h"
|
#include "../string_util.h"
|
||||||
|
|
||||||
|
|
||||||
size_t RoF2::invtype::InvTypeSize(int inv_type)
|
size_t RoF2::invtype::GetInvTypeSize(int inv_type)
|
||||||
{
|
{
|
||||||
switch (inv_type) {
|
switch (inv_type) {
|
||||||
case invtype::InvTypePossessions:
|
case invtype::InvTypePossessions:
|
||||||
@@ -80,7 +80,7 @@ size_t RoF2::invtype::InvTypeSize(int inv_type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* RoF2::invtype::InvTypeName(int inv_type)
|
const char* RoF2::invtype::GetInvTypeName(int inv_type)
|
||||||
{
|
{
|
||||||
switch (inv_type) {
|
switch (inv_type) {
|
||||||
case invtype::InvTypeInvalid:
|
case invtype::InvTypeInvalid:
|
||||||
@@ -140,7 +140,25 @@ const char* RoF2::invtype::InvTypeName(int inv_type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* RoF2::invslot::InvPossessionsSlotName(int inv_slot)
|
bool RoF2::invtype::IsInvTypePersistent(int inv_type)
|
||||||
|
{
|
||||||
|
switch (inv_type) {
|
||||||
|
case invtype::InvTypePossessions:
|
||||||
|
case invtype::InvTypeBank:
|
||||||
|
case invtype::InvTypeSharedBank:
|
||||||
|
case invtype::InvTypeTrade:
|
||||||
|
case invtype::InvTypeWorld:
|
||||||
|
case invtype::InvTypeLimbo:
|
||||||
|
case invtype::InvTypeTribute:
|
||||||
|
case invtype::InvTypeTrophyTribute:
|
||||||
|
case invtype::InvTypeGuildTribute:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* RoF2::invslot::GetInvPossessionsSlotName(int inv_slot)
|
||||||
{
|
{
|
||||||
switch (inv_slot) {
|
switch (inv_slot) {
|
||||||
case invslot::InvSlotInvalid:
|
case invslot::InvSlotInvalid:
|
||||||
@@ -218,12 +236,12 @@ const char* RoF2::invslot::InvPossessionsSlotName(int inv_slot)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* RoF2::invslot::InvSlotName(int inv_type, int inv_slot)
|
const char* RoF2::invslot::GetInvSlotName(int inv_type, int inv_slot)
|
||||||
{
|
{
|
||||||
if (inv_type == invtype::InvTypePossessions)
|
if (inv_type == invtype::InvTypePossessions)
|
||||||
return invslot::InvPossessionsSlotName(inv_slot);
|
return invslot::GetInvPossessionsSlotName(inv_slot);
|
||||||
|
|
||||||
size_t type_size = invtype::InvTypeSize(inv_type);
|
size_t type_size = invtype::GetInvTypeSize(inv_type);
|
||||||
|
|
||||||
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
||||||
return "Invalid Slot";
|
return "Invalid Slot";
|
||||||
@@ -237,7 +255,7 @@ const char* RoF2::invslot::InvSlotName(int inv_type, int inv_slot)
|
|||||||
return ret_str.c_str();
|
return ret_str.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* RoF2::invbag::InvBagIndexName(int bag_index)
|
const char* RoF2::invbag::GetInvBagIndexName(int bag_index)
|
||||||
{
|
{
|
||||||
if (bag_index == invbag::InvBagInvalid)
|
if (bag_index == invbag::InvBagInvalid)
|
||||||
return "Invalid Bag";
|
return "Invalid Bag";
|
||||||
@@ -251,7 +269,7 @@ const char* RoF2::invbag::InvBagIndexName(int bag_index)
|
|||||||
return ret_str.c_str();
|
return ret_str.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* RoF2::invaug::InvAugIndexName(int aug_index)
|
const char* RoF2::invaug::GetInvAugIndexName(int aug_index)
|
||||||
{
|
{
|
||||||
if (aug_index == invaug::InvAugInvalid)
|
if (aug_index == invaug::InvAugInvalid)
|
||||||
return "Invalid Augment";
|
return "Invalid Augment";
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#define COMMON_ROF2_LIMITS_H
|
#define COMMON_ROF2_LIMITS_H
|
||||||
|
|
||||||
#include "../types.h"
|
#include "../types.h"
|
||||||
#include "../client_version.h"
|
#include "../emu_versions.h"
|
||||||
#include "../skills.h"
|
#include "../skills.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -32,8 +32,13 @@ namespace RoF2
|
|||||||
enum : bool { False = false, True = true };
|
enum : bool { False = false, True = true };
|
||||||
|
|
||||||
// pre-declarations
|
// pre-declarations
|
||||||
|
namespace inventory {
|
||||||
|
inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||||
|
|
||||||
|
} /*inventory*/
|
||||||
|
|
||||||
namespace invtype {
|
namespace invtype {
|
||||||
inline EQEmu::versions::ClientVersion InvTypeRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||||
|
|
||||||
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
||||||
|
|
||||||
@@ -69,7 +74,7 @@ namespace RoF2
|
|||||||
} /*invtype*/
|
} /*invtype*/
|
||||||
|
|
||||||
namespace invslot {
|
namespace invslot {
|
||||||
inline EQEmu::versions::ClientVersion InvSlotRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||||
|
|
||||||
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
||||||
|
|
||||||
@@ -122,21 +127,21 @@ namespace RoF2
|
|||||||
} /*invslot*/
|
} /*invslot*/
|
||||||
|
|
||||||
namespace invbag {
|
namespace invbag {
|
||||||
inline EQEmu::versions::ClientVersion InvBagRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||||
|
|
||||||
enum : int { InvBagInvalid = -1, InvBagBegin };
|
enum : int { InvBagInvalid = -1, InvBagBegin };
|
||||||
|
|
||||||
} /*invbag*/
|
} /*invbag*/
|
||||||
|
|
||||||
namespace invaug {
|
namespace invaug {
|
||||||
inline EQEmu::versions::ClientVersion InvAugRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||||
|
|
||||||
enum : int { InvAugInvalid = -1, InvAugBegin };
|
enum : int { InvAugInvalid = -1, InvAugBegin };
|
||||||
|
|
||||||
} /*invaug*/
|
} /*invaug*/
|
||||||
|
|
||||||
namespace item {
|
namespace item {
|
||||||
inline EQEmu::versions::ClientVersion ItemRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
inline EQEmu::versions::ClientVersion GetItemRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||||
|
|
||||||
//enum Unknown : int { // looks like item class..but, RoF has it too - nothing in UF-
|
//enum Unknown : int { // looks like item class..but, RoF has it too - nothing in UF-
|
||||||
// Unknown1 = 0,
|
// Unknown1 = 0,
|
||||||
@@ -165,27 +170,37 @@ namespace RoF2
|
|||||||
} /*item*/
|
} /*item*/
|
||||||
|
|
||||||
namespace profile {
|
namespace profile {
|
||||||
inline EQEmu::versions::ClientVersion ProfileRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||||
|
|
||||||
} /*profile*/
|
} /*profile*/
|
||||||
|
|
||||||
namespace constants {
|
namespace constants {
|
||||||
inline EQEmu::versions::ClientVersion ConstantsRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||||
|
|
||||||
} /*constants*/
|
} /*constants*/
|
||||||
|
|
||||||
namespace behavior {
|
namespace behavior {
|
||||||
inline EQEmu::versions::ClientVersion BehaviorRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||||
|
|
||||||
} /*behavior*/
|
} /*behavior*/
|
||||||
|
|
||||||
namespace skills {
|
namespace skills {
|
||||||
inline EQEmu::versions::ClientVersion SkillsRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||||
|
|
||||||
} /*skills*/
|
} /*skills*/
|
||||||
|
|
||||||
|
|
||||||
// declarations
|
// declarations
|
||||||
|
namespace inventory {
|
||||||
|
const bool ConcatenateInvTypeLimbo = false;
|
||||||
|
|
||||||
|
const bool AllowOverLevelEquipment = true;
|
||||||
|
|
||||||
|
const bool AllowEmptyBagInBag = true;
|
||||||
|
const bool AllowClickCastFromBag = true;
|
||||||
|
|
||||||
|
} /*inventory*/
|
||||||
|
|
||||||
namespace invtype {
|
namespace invtype {
|
||||||
const size_t InvTypePossessionsSize = invslot::PossessionsCount;
|
const size_t InvTypePossessionsSize = invslot::PossessionsCount;
|
||||||
const size_t InvTypeBankSize = 24;
|
const size_t InvTypeBankSize = 24;
|
||||||
@@ -195,7 +210,7 @@ namespace RoF2
|
|||||||
const size_t InvTypeLimboSize = 36;
|
const size_t InvTypeLimboSize = 36;
|
||||||
const size_t InvTypeTributeSize = 5;
|
const size_t InvTypeTributeSize = 5;
|
||||||
const size_t InvTypeTrophyTributeSize = 0;//unknown
|
const size_t InvTypeTrophyTributeSize = 0;//unknown
|
||||||
const size_t InvTypeGuildTributeSize = 0;//unknown
|
const size_t InvTypeGuildTributeSize = 2;//unverified
|
||||||
const size_t InvTypeMerchantSize = 200;
|
const size_t InvTypeMerchantSize = 200;
|
||||||
const size_t InvTypeDeletedSize = 0;//unknown - "Recovery Tab"
|
const size_t InvTypeDeletedSize = 0;//unknown - "Recovery Tab"
|
||||||
const size_t InvTypeCorpseSize = InvTypePossessionsSize;
|
const size_t InvTypeCorpseSize = InvTypePossessionsSize;
|
||||||
@@ -213,30 +228,30 @@ namespace RoF2
|
|||||||
const size_t InvTypeKronoSize = 0;//unknown
|
const size_t InvTypeKronoSize = 0;//unknown
|
||||||
const size_t InvTypeOtherSize = 0;//unknown
|
const size_t InvTypeOtherSize = 0;//unknown
|
||||||
|
|
||||||
const size_t NPCTradeSize = 4;
|
extern size_t GetInvTypeSize(int inv_type);
|
||||||
|
extern const char* GetInvTypeName(int inv_type);
|
||||||
|
|
||||||
extern size_t InvTypeSize(int inv_type);
|
extern bool IsInvTypePersistent(int inv_type);
|
||||||
extern const char* InvTypeName(int inv_type);
|
|
||||||
|
|
||||||
} /*invtype*/
|
} /*invtype*/
|
||||||
|
|
||||||
namespace invslot {
|
namespace invslot {
|
||||||
extern const char* InvPossessionsSlotName(int inv_slot);
|
extern const char* GetInvPossessionsSlotName(int inv_slot);
|
||||||
extern const char* InvSlotName(int inv_type, int inv_slot);
|
extern const char* GetInvSlotName(int inv_type, int inv_slot);
|
||||||
|
|
||||||
} /*invslot*/
|
} /*invslot*/
|
||||||
|
|
||||||
namespace invbag {
|
namespace invbag {
|
||||||
const size_t ItemBagSize = 255; // server Size will be 255..unsure what actual client is (test)
|
const size_t ItemBagSize = 255; // server Size will be 255..unsure what actual client is (test)
|
||||||
|
|
||||||
extern const char* InvBagIndexName(int bag_index);
|
extern const char* GetInvBagIndexName(int bag_index);
|
||||||
|
|
||||||
} /*invbag*/
|
} /*invbag*/
|
||||||
|
|
||||||
namespace invaug {
|
namespace invaug {
|
||||||
const size_t ItemAugSize = 6;
|
const size_t ItemAugSize = 6;
|
||||||
|
|
||||||
extern const char* InvAugIndexName(int aug_index);
|
extern const char* GetInvAugIndexName(int aug_index);
|
||||||
|
|
||||||
} /*invaug*/
|
} /*invaug*/
|
||||||
|
|
||||||
@@ -246,6 +261,7 @@ namespace RoF2
|
|||||||
|
|
||||||
namespace profile {
|
namespace profile {
|
||||||
const size_t TributeSize = invtype::InvTypeTributeSize;
|
const size_t TributeSize = invtype::InvTypeTributeSize;
|
||||||
|
const size_t GuildTributeSize = invtype::InvTypeGuildTributeSize;
|
||||||
|
|
||||||
const size_t BandoliersSize = 20; // number of bandolier instances
|
const size_t BandoliersSize = 20; // number of bandolier instances
|
||||||
const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance
|
const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance
|
||||||
@@ -261,16 +277,17 @@ namespace RoF2
|
|||||||
|
|
||||||
const size_t SayLinkBodySize = 56;
|
const size_t SayLinkBodySize = 56;
|
||||||
|
|
||||||
|
const int LongBuffs = 42;
|
||||||
|
const int ShortBuffs = 20;
|
||||||
|
const int DiscBuffs = 1;
|
||||||
|
const int TotalBuffs = LongBuffs + ShortBuffs + DiscBuffs;
|
||||||
|
const int NPCBuffs = 97;
|
||||||
|
const int PetBuffs = NPCBuffs;
|
||||||
|
const int MercBuffs = LongBuffs;
|
||||||
|
|
||||||
} /*constants*/
|
} /*constants*/
|
||||||
|
|
||||||
namespace behavior {
|
namespace behavior {
|
||||||
const bool ConcatenateInvTypeLimbo = false;
|
|
||||||
|
|
||||||
const bool AllowOverLevelEquipment = true;
|
|
||||||
|
|
||||||
const bool AllowEmptyBagInBag = true;
|
|
||||||
const bool AllowClickCastFromBag = true;
|
|
||||||
|
|
||||||
const bool CoinHasWeight = false;
|
const bool CoinHasWeight = false;
|
||||||
|
|
||||||
} /*behavior*/
|
} /*behavior*/
|
||||||
|
|||||||
@@ -85,7 +85,6 @@ E(OP_HPUpdate)
|
|||||||
E(OP_Illusion)
|
E(OP_Illusion)
|
||||||
E(OP_InspectBuffs)
|
E(OP_InspectBuffs)
|
||||||
E(OP_InspectRequest)
|
E(OP_InspectRequest)
|
||||||
E(OP_InterruptCast)
|
|
||||||
E(OP_ItemLinkResponse)
|
E(OP_ItemLinkResponse)
|
||||||
E(OP_ItemPacket)
|
E(OP_ItemPacket)
|
||||||
E(OP_ItemVerifyReply)
|
E(OP_ItemVerifyReply)
|
||||||
@@ -141,6 +140,7 @@ E(OP_ZoneEntry)
|
|||||||
E(OP_ZonePlayerToBind)
|
E(OP_ZonePlayerToBind)
|
||||||
E(OP_ZoneServerInfo)
|
E(OP_ZoneServerInfo)
|
||||||
E(OP_ZoneSpawns)
|
E(OP_ZoneSpawns)
|
||||||
|
E(OP_CrystalCountUpdate)
|
||||||
// Begin RoF Decodes
|
// Begin RoF Decodes
|
||||||
D(OP_AdventureMerchantSell)
|
D(OP_AdventureMerchantSell)
|
||||||
D(OP_AltCurrencySell)
|
D(OP_AltCurrencySell)
|
||||||
|
|||||||
+126
-157
@@ -163,7 +163,7 @@ struct AdventureInfo {
|
|||||||
** Merth: Gave struct a name so gcc 2.96 would compile
|
** Merth: Gave struct a name so gcc 2.96 would compile
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
struct Color_Struct
|
struct Tint_Struct
|
||||||
{
|
{
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
@@ -171,21 +171,65 @@ struct Color_Struct
|
|||||||
uint8 Green;
|
uint8 Green;
|
||||||
uint8 Red;
|
uint8 Red;
|
||||||
uint8 UseTint; // if there's a tint this is FF
|
uint8 UseTint; // if there's a tint this is FF
|
||||||
} RGB;
|
};
|
||||||
uint32 Color;
|
uint32 Color;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CharSelectEquip
|
struct TintProfile
|
||||||
|
{
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
Tint_Struct Head;
|
||||||
|
Tint_Struct Chest;
|
||||||
|
Tint_Struct Arms;
|
||||||
|
Tint_Struct Wrist;
|
||||||
|
Tint_Struct Hands;
|
||||||
|
Tint_Struct Legs;
|
||||||
|
Tint_Struct Feet;
|
||||||
|
Tint_Struct Primary;
|
||||||
|
Tint_Struct Secondary;
|
||||||
|
};
|
||||||
|
Tint_Struct Slot[EQEmu::textures::materialCount];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Visible equiptment.
|
||||||
|
* Size: 20 Octets
|
||||||
|
*/
|
||||||
|
struct Texture_Struct
|
||||||
{
|
{
|
||||||
uint32 Material;
|
uint32 Material;
|
||||||
uint32 Unknown1;
|
uint32 Unknown1;
|
||||||
uint32 EliteMaterial;
|
uint32 EliteMaterial;
|
||||||
uint32 HeroForgeModel;
|
uint32 HeroForgeModel;
|
||||||
uint32 Material2;
|
uint32 Material2; // Same as material?
|
||||||
Color_Struct Color;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Needs more research regarding new slots
|
||||||
|
//struct TextureProfile
|
||||||
|
//{
|
||||||
|
// union {
|
||||||
|
// struct {
|
||||||
|
// Texture_Struct Head;
|
||||||
|
// Texture_Struct Chest;
|
||||||
|
// Texture_Struct Arms;
|
||||||
|
// Texture_Struct Wrist;
|
||||||
|
// Texture_Struct Hands;
|
||||||
|
// Texture_Struct Legs;
|
||||||
|
// Texture_Struct Feet;
|
||||||
|
// Texture_Struct Primary;
|
||||||
|
// Texture_Struct Secondary;
|
||||||
|
// };
|
||||||
|
// Texture_Struct Slot[EQEmu::textures::TextureCount];
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// TextureProfile();
|
||||||
|
//};
|
||||||
|
|
||||||
|
struct CharSelectEquip : Texture_Struct, Tint_Struct {};
|
||||||
|
|
||||||
struct CharacterSelectEntry_Struct
|
struct CharacterSelectEntry_Struct
|
||||||
{
|
{
|
||||||
/*0000*/ char Name[1]; // Name null terminated
|
/*0000*/ char Name[1]; // Name null terminated
|
||||||
@@ -231,21 +275,6 @@ struct CharacterSelect_Struct
|
|||||||
/*004*/ CharacterSelectEntry_Struct Entries[0];
|
/*004*/ CharacterSelectEntry_Struct Entries[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
* Visible equiptment.
|
|
||||||
* Size: 20 Octets
|
|
||||||
*/
|
|
||||||
struct EquipStruct
|
|
||||||
{
|
|
||||||
/*00*/ uint32 Material;
|
|
||||||
/*04*/ uint32 Unknown1;
|
|
||||||
/*08*/ uint32 EliteMaterial;
|
|
||||||
/*12*/ uint32 HeroForgeModel;
|
|
||||||
/*16*/ uint32 Material2; // Same as material?
|
|
||||||
/*20*/
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
struct Membership_Entry_Struct
|
struct Membership_Entry_Struct
|
||||||
{
|
{
|
||||||
/*000*/ uint32 purchase_id; // Seen 1, then increments 90287 to 90300
|
/*000*/ uint32 purchase_id; // Seen 1, then increments 90287 to 90300
|
||||||
@@ -447,39 +476,24 @@ struct Spawn_Struct
|
|||||||
/*0000*/ uint32 unknown18;
|
/*0000*/ uint32 unknown18;
|
||||||
/*0000*/ uint32 unknown19;
|
/*0000*/ uint32 unknown19;
|
||||||
Spawn_Struct_Position Position;
|
Spawn_Struct_Position Position;
|
||||||
/*0000*/ union
|
/*0000*/ TintProfile equipment_tint;
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
/*0000*/ Color_Struct color_helmet; // Color of helmet item
|
|
||||||
/*0000*/ Color_Struct color_chest; // Color of chest item
|
|
||||||
/*0000*/ Color_Struct color_arms; // Color of arms item
|
|
||||||
/*0000*/ Color_Struct color_bracers; // Color of bracers item
|
|
||||||
/*0000*/ Color_Struct color_hands; // Color of hands item
|
|
||||||
/*0000*/ Color_Struct color_legs; // Color of legs item
|
|
||||||
/*0000*/ Color_Struct color_feet; // Color of feet item
|
|
||||||
/*0000*/ Color_Struct color_primary; // Color of primary item
|
|
||||||
/*0000*/ Color_Struct color_secondary; // Color of secondary item
|
|
||||||
} equipment_colors;
|
|
||||||
/*0000*/ Color_Struct colors[9]; // Array elements correspond to struct equipment_colors above
|
|
||||||
};
|
|
||||||
|
|
||||||
// skip these bytes if not a valid player race
|
// skip these bytes if not a valid player race
|
||||||
/*0000*/ union
|
/*0000*/ union
|
||||||
{
|
{
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
/*0000*/ EquipStruct equip_helmet; // Equiptment: Helmet visual
|
/*0000*/ Texture_Struct equip_helmet; // Equiptment: Helmet visual
|
||||||
/*0000*/ EquipStruct equip_chest; // Equiptment: Chest visual
|
/*0000*/ Texture_Struct equip_chest; // Equiptment: Chest visual
|
||||||
/*0000*/ EquipStruct equip_arms; // Equiptment: Arms visual
|
/*0000*/ Texture_Struct equip_arms; // Equiptment: Arms visual
|
||||||
/*0000*/ EquipStruct equip_bracers; // Equiptment: Wrist visual
|
/*0000*/ Texture_Struct equip_bracers; // Equiptment: Wrist visual
|
||||||
/*0000*/ EquipStruct equip_hands; // Equiptment: Hands visual
|
/*0000*/ Texture_Struct equip_hands; // Equiptment: Hands visual
|
||||||
/*0000*/ EquipStruct equip_legs; // Equiptment: Legs visual
|
/*0000*/ Texture_Struct equip_legs; // Equiptment: Legs visual
|
||||||
/*0000*/ EquipStruct equip_feet; // Equiptment: Boots visual
|
/*0000*/ Texture_Struct equip_feet; // Equiptment: Boots visual
|
||||||
/*0000*/ EquipStruct equip_primary; // Equiptment: Main visual
|
/*0000*/ Texture_Struct equip_primary; // Equiptment: Main visual
|
||||||
/*0000*/ EquipStruct equip_secondary; // Equiptment: Off visual
|
/*0000*/ Texture_Struct equip_secondary; // Equiptment: Off visual
|
||||||
} equip;
|
} equip;
|
||||||
/*0000*/ EquipStruct equipment[9];
|
/*0000*/ Texture_Struct equipment[9];
|
||||||
};
|
};
|
||||||
|
|
||||||
/*0000*/ //char title[0]; // only read if(hasTitleOrSuffix & 4)
|
/*0000*/ //char title[0]; // only read if(hasTitleOrSuffix & 4)
|
||||||
@@ -621,7 +635,7 @@ struct MemorizeSpell_Struct {
|
|||||||
uint32 slot; // Spot in the spell book/memorized slot
|
uint32 slot; // Spot in the spell book/memorized slot
|
||||||
uint32 spell_id; // Spell id (200 or c8 is minor healing, etc)
|
uint32 spell_id; // Spell id (200 or c8 is minor healing, etc)
|
||||||
uint32 scribing; // 1 if memorizing a spell, set to 0 if scribing to book, 2 if un-memming
|
uint32 scribing; // 1 if memorizing a spell, set to 0 if scribing to book, 2 if un-memming
|
||||||
uint32 unknown12;
|
uint32 reduction; // lowers reuse
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -654,11 +668,12 @@ struct DeleteSpell_Struct
|
|||||||
|
|
||||||
struct ManaChange_Struct
|
struct ManaChange_Struct
|
||||||
{
|
{
|
||||||
uint32 new_mana; // New Mana AMount
|
/*00*/ uint32 new_mana; // New Mana AMount
|
||||||
uint32 stamina;
|
/*04*/ uint32 stamina;
|
||||||
uint32 spell_id;
|
/*08*/ uint32 spell_id;
|
||||||
uint32 unknown12;
|
/*12*/ uint8 keepcasting; // won't stop the cast. Change mana while casting?
|
||||||
uint32 unknown16;
|
/*13*/ uint8 padding[3]; // client doesn't read it, garbage data seems like
|
||||||
|
/*16*/ int32 slot; // -1 for normal usage slot for when we want silent interrupt? I think it does timer stuff or something. Linked Spell Reuse interrupt uses it
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SwapSpell_Struct
|
struct SwapSpell_Struct
|
||||||
@@ -705,69 +720,31 @@ struct SpawnAppearance_Struct
|
|||||||
|
|
||||||
struct SpellBuff_Struct
|
struct SpellBuff_Struct
|
||||||
{
|
{
|
||||||
/*000*/ uint8 slotid; // badly named... seems to be 2 for a real buff, 0 otherwise
|
/*000*/ uint8 effect_type; // 0 = no buff, 2 = buff, 4 = inverse affects of buff
|
||||||
/*001*/ float unknown004; // Seen 1 for no buff
|
/*001*/ uint8 level; // Seen 1 for no buff
|
||||||
/*005*/ uint32 player_id; // 'global' ID of the caster, for wearoff messages
|
/*002*/ uint8 unknown002; //pretty sure padding now
|
||||||
/*009*/ uint32 unknown016;
|
/*003*/ uint8 unknown003; // MQ2 used to call this "damage shield" -- don't see client referencing it, so maybe server side DS type tracking?
|
||||||
/*013*/ uint8 bard_modifier;
|
/*004*/ float bard_modifier;
|
||||||
/*014*/ int32 duration;
|
|
||||||
/*018*/ uint8 level;
|
|
||||||
/*019*/ uint32 spellid;
|
|
||||||
/*023*/ uint32 counters;
|
|
||||||
/*027*/ uint8 unknown0028[53];
|
|
||||||
/*080*/
|
|
||||||
};
|
|
||||||
|
|
||||||
struct SpellBuff_Struct_Old
|
|
||||||
{
|
|
||||||
/*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*/ float unknown004; // Seen 1 for no buff
|
|
||||||
/*008*/ uint32 spellid;
|
/*008*/ uint32 spellid;
|
||||||
/*012*/ int32 duration;
|
/*012*/ uint32 duration;
|
||||||
/*016*/ uint32 unknown016;
|
/*016*/ uint32 player_id; // caster ID, pretty sure just zone ID
|
||||||
/*020*/ uint32 player_id; // 'global' ID of the caster, for wearoff messages
|
/*020*/ uint32 num_hits;
|
||||||
/*024*/ uint32 counters;
|
/*024*/ float y; // referenced by SPA 441
|
||||||
/*028*/ uint8 unknown0028[60];
|
/*028*/ float x; // unsure if all buffs get them
|
||||||
|
/*032*/ float z; // as valid data
|
||||||
|
/*036*/ uint32 unknown036;
|
||||||
|
/*040*/ int32 slot_data[12]; // book keeping stuff per slot (counters, rune/vie)
|
||||||
/*088*/
|
/*088*/
|
||||||
};
|
};
|
||||||
|
|
||||||
// Not functional yet, but this is what the packet looks like on Live
|
struct SpellBuffPacket_Struct {
|
||||||
struct SpellBuffFade_Struct_Live {
|
|
||||||
/*000*/ uint32 entityid; // Player id who cast the buff
|
/*000*/ uint32 entityid; // Player id who cast the buff
|
||||||
/*004*/ uint8 unknown004;
|
/*004*/ SpellBuff_Struct buff;
|
||||||
/*005*/ uint8 level;
|
|
||||||
/*006*/ uint8 effect;
|
|
||||||
/*007*/ uint8 unknown007;
|
|
||||||
/*008*/ float unknown008;
|
|
||||||
/*012*/ uint32 spellid;
|
|
||||||
/*016*/ int32 duration;
|
|
||||||
/*020*/ uint32 playerId; // Global player ID?
|
|
||||||
/*024*/ uint32 num_hits;
|
|
||||||
/*028*/ uint8 unknown0028[64];
|
|
||||||
/*092*/ uint32 slotid;
|
/*092*/ uint32 slotid;
|
||||||
/*096*/ uint32 bufffade;
|
/*096*/ uint32 bufffade;
|
||||||
/*100*/
|
/*100*/
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SpellBuffFade_Struct {
|
|
||||||
/*000*/ uint32 entityid;
|
|
||||||
/*004*/ uint8 slot;
|
|
||||||
/*005*/ uint8 level;
|
|
||||||
/*006*/ uint8 effect;
|
|
||||||
/*007*/ uint8 unknown7;
|
|
||||||
/*008*/ uint32 spellid;
|
|
||||||
/*012*/ int32 duration;
|
|
||||||
/*016*/ uint32 num_hits;
|
|
||||||
/*020*/ uint32 unknown020; // Global player ID?
|
|
||||||
/*024*/ uint32 playerId; // Player id who cast the buff
|
|
||||||
/*028*/ uint32 slotid;
|
|
||||||
/*032*/ uint32 bufffade;
|
|
||||||
/*036*/
|
|
||||||
};
|
|
||||||
|
|
||||||
struct BuffRemoveRequest_Struct
|
struct BuffRemoveRequest_Struct
|
||||||
{
|
{
|
||||||
/*00*/ uint32 SlotID;
|
/*00*/ uint32 SlotID;
|
||||||
@@ -1078,38 +1055,38 @@ union
|
|||||||
{
|
{
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
/*00184*/ EquipStruct equip_helmet; // Equipment: Helmet visual
|
/*00184*/ Texture_Struct equip_helmet; // Equipment: Helmet visual
|
||||||
/*00204*/ EquipStruct equip_chest; // Equipment: Chest visual
|
/*00204*/ Texture_Struct equip_chest; // Equipment: Chest visual
|
||||||
/*00224*/ EquipStruct equip_arms; // Equipment: Arms visual
|
/*00224*/ Texture_Struct equip_arms; // Equipment: Arms visual
|
||||||
/*00244*/ EquipStruct equip_bracers; // Equipment: Wrist visual
|
/*00244*/ Texture_Struct equip_bracers; // Equipment: Wrist visual
|
||||||
/*00264*/ EquipStruct equip_hands; // Equipment: Hands visual
|
/*00264*/ Texture_Struct equip_hands; // Equipment: Hands visual
|
||||||
/*00284*/ EquipStruct equip_legs; // Equipment: Legs visual
|
/*00284*/ Texture_Struct equip_legs; // Equipment: Legs visual
|
||||||
/*00304*/ EquipStruct equip_feet; // Equipment: Boots visual
|
/*00304*/ Texture_Struct equip_feet; // Equipment: Boots visual
|
||||||
/*00324*/ EquipStruct equip_primary; // Equipment: Main visual
|
/*00324*/ Texture_Struct equip_primary; // Equipment: Main visual
|
||||||
/*00344*/ EquipStruct equip_secondary; // Equipment: Off visual
|
/*00344*/ Texture_Struct equip_secondary; // Equipment: Off visual
|
||||||
// Below slots are just guesses, but all 0s anyway...
|
// Below slots are just guesses, but all 0s anyway...
|
||||||
/*00364*/ EquipStruct equip_charm; // Equipment: Non-visual
|
/*00364*/ Texture_Struct equip_charm; // Equipment: Non-visual
|
||||||
/*00384*/ EquipStruct equip_ear1; // Equipment: Non-visual
|
/*00384*/ Texture_Struct equip_ear1; // Equipment: Non-visual
|
||||||
/*00404*/ EquipStruct equip_ear2; // Equipment: Non-visual
|
/*00404*/ Texture_Struct equip_ear2; // Equipment: Non-visual
|
||||||
/*00424*/ EquipStruct equip_face; // Equipment: Non-visual
|
/*00424*/ Texture_Struct equip_face; // Equipment: Non-visual
|
||||||
/*00444*/ EquipStruct equip_neck; // Equipment: Non-visual
|
/*00444*/ Texture_Struct equip_neck; // Equipment: Non-visual
|
||||||
/*00464*/ EquipStruct equip_shoulder; // Equipment: Non-visual
|
/*00464*/ Texture_Struct equip_shoulder; // Equipment: Non-visual
|
||||||
/*00484*/ EquipStruct equip_bracer2; // Equipment: Non-visual
|
/*00484*/ Texture_Struct equip_bracer2; // Equipment: Non-visual
|
||||||
/*00504*/ EquipStruct equip_range; // Equipment: Non-visual
|
/*00504*/ Texture_Struct equip_range; // Equipment: Non-visual
|
||||||
/*00524*/ EquipStruct equip_ring1; // Equipment: Non-visual
|
/*00524*/ Texture_Struct equip_ring1; // Equipment: Non-visual
|
||||||
/*00544*/ EquipStruct equip_ring2; // Equipment: Non-visual
|
/*00544*/ Texture_Struct equip_ring2; // Equipment: Non-visual
|
||||||
/*00564*/ EquipStruct equip_waist; // Equipment: Non-visual
|
/*00564*/ Texture_Struct equip_waist; // Equipment: Non-visual
|
||||||
/*00584*/ EquipStruct equip_powersource;// Equipment: Non-visual
|
/*00584*/ Texture_Struct equip_powersource;// Equipment: Non-visual
|
||||||
/*00604*/ EquipStruct equip_ammo; // Equipment: Non-visual
|
/*00604*/ Texture_Struct equip_ammo; // Equipment: Non-visual
|
||||||
} equip;
|
} equip;
|
||||||
/*00184*/ EquipStruct equipment[22]; // Total Slots
|
/*00184*/ Texture_Struct equipment[22]; // Total Slots
|
||||||
};
|
};
|
||||||
/*00624*/ uint32 equip2_count; // Seen 9
|
/*00624*/ uint32 equip2_count; // Seen 9
|
||||||
/*00628*/ EquipStruct equipment2[EQEmu::legacy::MaterialCount]; // Appears to be Visible slots, but all 0s
|
/*00628*/ Texture_Struct equipment2[EQEmu::textures::materialCount]; // Appears to be Visible slots, but all 0s
|
||||||
/*00808*/ uint32 tint_count; // Seen 9
|
/*00808*/ uint32 tint_count; // Seen 9
|
||||||
/*00812*/ Color_Struct item_tint[EQEmu::legacy::MaterialCount]; // RR GG BB 00
|
/*00812*/ TintProfile item_tint; // RR GG BB 00
|
||||||
/*00848*/ uint32 tint_count2; // Seen 9
|
/*00848*/ uint32 tint_count2; // Seen 9
|
||||||
/*00852*/ Color_Struct item_tint2[EQEmu::legacy::MaterialCount]; // RR GG BB 00
|
/*00852*/ TintProfile item_tint2; // RR GG BB 00
|
||||||
/*00888*/ uint8 haircolor; // Player hair color
|
/*00888*/ uint8 haircolor; // Player hair color
|
||||||
/*00889*/ uint8 beardcolor; // Player beard color
|
/*00889*/ uint8 beardcolor; // Player beard color
|
||||||
/*00890*/ uint32 unknown_rof5; //
|
/*00890*/ uint32 unknown_rof5; //
|
||||||
@@ -1385,7 +1362,7 @@ struct WearChange_Struct{
|
|||||||
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
|
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
|
||||||
/*014*/ uint32 hero_forge_model; // New to VoA
|
/*014*/ uint32 hero_forge_model; // New to VoA
|
||||||
/*018*/ uint32 unknown18; // New to RoF2
|
/*018*/ uint32 unknown18; // New to RoF2
|
||||||
/*022*/ Color_Struct color;
|
/*022*/ Tint_Struct color;
|
||||||
/*026*/ uint8 wear_slot_id;
|
/*026*/ uint8 wear_slot_id;
|
||||||
/*027*/
|
/*027*/
|
||||||
};
|
};
|
||||||
@@ -2446,7 +2423,7 @@ struct AdventureLeaderboard_Struct
|
|||||||
/*struct Item_Shop_Struct {
|
/*struct Item_Shop_Struct {
|
||||||
uint16 merchantid;
|
uint16 merchantid;
|
||||||
uint8 itemtype;
|
uint8 itemtype;
|
||||||
Item_Struct item;
|
ItemData item;
|
||||||
uint8 iss_unknown001[6];
|
uint8 iss_unknown001[6];
|
||||||
};*/
|
};*/
|
||||||
|
|
||||||
@@ -2589,9 +2566,12 @@ struct GroupJoin_Struct_Live { // New for Live
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GroupJoin_Struct {
|
struct GroupJoin_Struct {
|
||||||
/*000*/ char unknown000[64];
|
/*000*/ char owner_name[64]; // merc
|
||||||
/*064*/ char membername[64];
|
/*064*/ char membername[64];
|
||||||
/*128*/ uint8 unknown128[20]; // Leadership AA ?
|
/*128*/ uint8 merc;
|
||||||
|
/*129*/ uint8 padding129[3];
|
||||||
|
/*132*/ uint32 level;
|
||||||
|
/*136*/ uint8 unknown136[12]; // group ID most likely in here judging from like captures (unused by client)
|
||||||
/*148*/
|
/*148*/
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2849,7 +2829,8 @@ struct BookText_Struct {
|
|||||||
struct BookRequest_Struct {
|
struct BookRequest_Struct {
|
||||||
/*0000*/ uint32 window; // where to display the text (0xFFFFFFFF means new window).
|
/*0000*/ uint32 window; // where to display the text (0xFFFFFFFF means new window).
|
||||||
/*0004*/ uint16 invslot; // Is the slot, but the RoF2 conversion causes it to fail. Turned to 0 since it isnt required anyway.
|
/*0004*/ uint16 invslot; // Is the slot, but the RoF2 conversion causes it to fail. Turned to 0 since it isnt required anyway.
|
||||||
/*0008*/ uint32 unknown006; // Seen FFFFFFFF
|
/*0006*/ int16 subslot; // Inventory sub-slot (0-x)
|
||||||
|
/*0008*/ uint16 unknown006; // Seen FFFF
|
||||||
/*0010*/ uint16 unknown008; // seen 0000
|
/*0010*/ uint16 unknown008; // seen 0000
|
||||||
/*0012*/ uint32 type; // 0 = Scroll, 1 = Book, 2 = Item Info. Possibly others
|
/*0012*/ uint32 type; // 0 = Scroll, 1 = Book, 2 = Item Info. Possibly others
|
||||||
/*0016*/ uint32 unknown0012;
|
/*0016*/ uint32 unknown0012;
|
||||||
@@ -3634,27 +3615,6 @@ struct PetitionBug_Struct{
|
|||||||
char text[1028];
|
char text[1028];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DyeStruct
|
|
||||||
{
|
|
||||||
union
|
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
struct Color_Struct head;
|
|
||||||
struct Color_Struct chest;
|
|
||||||
struct Color_Struct arms;
|
|
||||||
struct Color_Struct wrists;
|
|
||||||
struct Color_Struct hands;
|
|
||||||
struct Color_Struct legs;
|
|
||||||
struct Color_Struct feet;
|
|
||||||
struct Color_Struct primary; // you can't actually dye this
|
|
||||||
struct Color_Struct secondary; // or this
|
|
||||||
}
|
|
||||||
dyes;
|
|
||||||
struct Color_Struct dye[9];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ApproveZone_Struct {
|
struct ApproveZone_Struct {
|
||||||
char name[64];
|
char name[64];
|
||||||
uint32 zoneid;
|
uint32 zoneid;
|
||||||
@@ -5088,6 +5048,15 @@ struct MercenaryMerchantResponse_Struct {
|
|||||||
/*0004*/
|
/*0004*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Sent by Server to update character crystals.
|
||||||
|
struct CrystalCountUpdate_Struct
|
||||||
|
{
|
||||||
|
/*000*/ uint32 CurrentRadiantCrystals;
|
||||||
|
/*004*/ uint32 CareerRadiantCrystals;
|
||||||
|
/*008*/ uint32 CurrentEbonCrystals;
|
||||||
|
/*012*/ uint32 CareerEbonCrystals;
|
||||||
|
};
|
||||||
|
|
||||||
}; /*structs*/
|
}; /*structs*/
|
||||||
|
|
||||||
}; /*RoF2*/
|
}; /*RoF2*/
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#include "../string_util.h"
|
#include "../string_util.h"
|
||||||
|
|
||||||
|
|
||||||
size_t RoF::invtype::InvTypeSize(int inv_type)
|
size_t RoF::invtype::GetInvTypeSize(int inv_type)
|
||||||
{
|
{
|
||||||
switch (inv_type) {
|
switch (inv_type) {
|
||||||
case invtype::InvTypePossessions:
|
case invtype::InvTypePossessions:
|
||||||
@@ -78,7 +78,7 @@ size_t RoF::invtype::InvTypeSize(int inv_type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* RoF::invtype::InvTypeName(int inv_type)
|
const char* RoF::invtype::GetInvTypeName(int inv_type)
|
||||||
{
|
{
|
||||||
switch (inv_type) {
|
switch (inv_type) {
|
||||||
case invtype::InvTypeInvalid:
|
case invtype::InvTypeInvalid:
|
||||||
@@ -136,7 +136,25 @@ const char* RoF::invtype::InvTypeName(int inv_type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* RoF::invslot::InvPossessionsSlotName(int inv_slot)
|
bool RoF::invtype::IsInvTypePersistent(int inv_type)
|
||||||
|
{
|
||||||
|
switch (inv_type) {
|
||||||
|
case invtype::InvTypePossessions:
|
||||||
|
case invtype::InvTypeBank:
|
||||||
|
case invtype::InvTypeSharedBank:
|
||||||
|
case invtype::InvTypeTrade:
|
||||||
|
case invtype::InvTypeWorld:
|
||||||
|
case invtype::InvTypeLimbo:
|
||||||
|
case invtype::InvTypeTribute:
|
||||||
|
case invtype::InvTypeTrophyTribute:
|
||||||
|
case invtype::InvTypeGuildTribute:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* RoF::invslot::GetInvPossessionsSlotName(int inv_slot)
|
||||||
{
|
{
|
||||||
switch (inv_slot) {
|
switch (inv_slot) {
|
||||||
case invslot::InvSlotInvalid:
|
case invslot::InvSlotInvalid:
|
||||||
@@ -214,12 +232,12 @@ const char* RoF::invslot::InvPossessionsSlotName(int inv_slot)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* RoF::invslot::InvSlotName(int inv_type, int inv_slot)
|
const char* RoF::invslot::GetInvSlotName(int inv_type, int inv_slot)
|
||||||
{
|
{
|
||||||
if (inv_type == invtype::InvTypePossessions)
|
if (inv_type == invtype::InvTypePossessions)
|
||||||
return invslot::InvPossessionsSlotName(inv_slot);
|
return invslot::GetInvPossessionsSlotName(inv_slot);
|
||||||
|
|
||||||
size_t type_size = invtype::InvTypeSize(inv_type);
|
size_t type_size = invtype::GetInvTypeSize(inv_type);
|
||||||
|
|
||||||
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
||||||
return "Invalid Slot";
|
return "Invalid Slot";
|
||||||
@@ -233,7 +251,7 @@ const char* RoF::invslot::InvSlotName(int inv_type, int inv_slot)
|
|||||||
return ret_str.c_str();
|
return ret_str.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* RoF::invbag::InvBagIndexName(int bag_index)
|
const char* RoF::invbag::GetInvBagIndexName(int bag_index)
|
||||||
{
|
{
|
||||||
if (bag_index == invbag::InvBagInvalid)
|
if (bag_index == invbag::InvBagInvalid)
|
||||||
return "Invalid Bag";
|
return "Invalid Bag";
|
||||||
@@ -247,7 +265,7 @@ const char* RoF::invbag::InvBagIndexName(int bag_index)
|
|||||||
return ret_str.c_str();
|
return ret_str.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* RoF::invaug::InvAugIndexName(int aug_index)
|
const char* RoF::invaug::GetInvAugIndexName(int aug_index)
|
||||||
{
|
{
|
||||||
if (aug_index == invaug::InvAugInvalid)
|
if (aug_index == invaug::InvAugInvalid)
|
||||||
return "Invalid Augment";
|
return "Invalid Augment";
|
||||||
|
|||||||
+42
-25
@@ -21,7 +21,7 @@
|
|||||||
#define COMMON_ROF_LIMITS_H
|
#define COMMON_ROF_LIMITS_H
|
||||||
|
|
||||||
#include "../types.h"
|
#include "../types.h"
|
||||||
#include "../client_version.h"
|
#include "../emu_versions.h"
|
||||||
#include "../skills.h"
|
#include "../skills.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -32,8 +32,13 @@ namespace RoF
|
|||||||
enum : bool { False = false, True = true };
|
enum : bool { False = false, True = true };
|
||||||
|
|
||||||
// pre-declarations
|
// pre-declarations
|
||||||
|
namespace inventory {
|
||||||
|
inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||||
|
|
||||||
|
} /*inventory*/
|
||||||
|
|
||||||
namespace invtype {
|
namespace invtype {
|
||||||
inline EQEmu::versions::ClientVersion InvTypeRef() { return EQEmu::versions::ClientVersion::RoF; }
|
inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||||
|
|
||||||
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
||||||
|
|
||||||
@@ -68,7 +73,7 @@ namespace RoF
|
|||||||
} /*invtype*/
|
} /*invtype*/
|
||||||
|
|
||||||
namespace invslot {
|
namespace invslot {
|
||||||
inline EQEmu::versions::ClientVersion InvSlotRef() { return EQEmu::versions::ClientVersion::RoF; }
|
inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||||
|
|
||||||
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
||||||
|
|
||||||
@@ -121,21 +126,21 @@ namespace RoF
|
|||||||
} /*invslot*/
|
} /*invslot*/
|
||||||
|
|
||||||
namespace invbag {
|
namespace invbag {
|
||||||
inline EQEmu::versions::ClientVersion InvBagRef() { return EQEmu::versions::ClientVersion::RoF; }
|
inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||||
|
|
||||||
enum : int { InvBagInvalid = -1, InvBagBegin };
|
enum : int { InvBagInvalid = -1, InvBagBegin };
|
||||||
|
|
||||||
} /*invbag*/
|
} /*invbag*/
|
||||||
|
|
||||||
namespace invaug {
|
namespace invaug {
|
||||||
inline EQEmu::versions::ClientVersion InvAugRef() { return EQEmu::versions::ClientVersion::RoF; }
|
inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||||
|
|
||||||
enum : int { InvAugInvalid = -1, InvAugBegin };
|
enum : int { InvAugInvalid = -1, InvAugBegin };
|
||||||
|
|
||||||
} /*invaug*/
|
} /*invaug*/
|
||||||
|
|
||||||
namespace item {
|
namespace item {
|
||||||
inline EQEmu::versions::ClientVersion ItemRef() { return EQEmu::versions::ClientVersion::RoF; }
|
inline EQEmu::versions::ClientVersion GetItemRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||||
|
|
||||||
enum ItemPacketType : int {
|
enum ItemPacketType : int {
|
||||||
ItemPacketMerchant = 100,
|
ItemPacketMerchant = 100,
|
||||||
@@ -157,27 +162,37 @@ namespace RoF
|
|||||||
} /*item*/
|
} /*item*/
|
||||||
|
|
||||||
namespace profile {
|
namespace profile {
|
||||||
inline EQEmu::versions::ClientVersion ProfileRef() { return EQEmu::versions::ClientVersion::RoF; }
|
inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||||
|
|
||||||
} /*profile*/
|
} /*profile*/
|
||||||
|
|
||||||
namespace constants {
|
namespace constants {
|
||||||
inline EQEmu::versions::ClientVersion ConstantsRef() { return EQEmu::versions::ClientVersion::RoF; }
|
inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||||
|
|
||||||
} /*constants*/
|
} /*constants*/
|
||||||
|
|
||||||
namespace behavior {
|
namespace behavior {
|
||||||
inline EQEmu::versions::ClientVersion BehaviorRef() { return EQEmu::versions::ClientVersion::RoF; }
|
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||||
|
|
||||||
} /*behavior*/
|
} /*behavior*/
|
||||||
|
|
||||||
namespace skills {
|
namespace skills {
|
||||||
inline EQEmu::versions::ClientVersion SkillsRef() { return EQEmu::versions::ClientVersion::RoF; }
|
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||||
|
|
||||||
} /*skills*/
|
} /*skills*/
|
||||||
|
|
||||||
|
|
||||||
// declarations
|
// declarations
|
||||||
|
namespace inventory {
|
||||||
|
const bool ConcatenateInvTypeLimbo = false;
|
||||||
|
|
||||||
|
const bool AllowOverLevelEquipment = true;
|
||||||
|
|
||||||
|
const bool AllowEmptyBagInBag = true;
|
||||||
|
const bool AllowClickCastFromBag = true;
|
||||||
|
|
||||||
|
} /*inventory*/
|
||||||
|
|
||||||
namespace invtype {
|
namespace invtype {
|
||||||
const size_t InvTypePossessionsSize = invslot::PossessionsCount;
|
const size_t InvTypePossessionsSize = invslot::PossessionsCount;
|
||||||
const size_t InvTypeBankSize = 24;
|
const size_t InvTypeBankSize = 24;
|
||||||
@@ -187,7 +202,7 @@ namespace RoF
|
|||||||
const size_t InvTypeLimboSize = 36;
|
const size_t InvTypeLimboSize = 36;
|
||||||
const size_t InvTypeTributeSize = 5;
|
const size_t InvTypeTributeSize = 5;
|
||||||
const size_t InvTypeTrophyTributeSize = 0;//unknown
|
const size_t InvTypeTrophyTributeSize = 0;//unknown
|
||||||
const size_t InvTypeGuildTributeSize = 0;//unknown
|
const size_t InvTypeGuildTributeSize = 2;//unverified
|
||||||
const size_t InvTypeMerchantSize = 200;
|
const size_t InvTypeMerchantSize = 200;
|
||||||
const size_t InvTypeDeletedSize = 0;//unknown - "Recovery Tab"
|
const size_t InvTypeDeletedSize = 0;//unknown - "Recovery Tab"
|
||||||
const size_t InvTypeCorpseSize = InvTypePossessionsSize;
|
const size_t InvTypeCorpseSize = InvTypePossessionsSize;
|
||||||
@@ -204,30 +219,30 @@ namespace RoF
|
|||||||
const size_t InvTypeGuildTrophyTributeSize = 0;//unknown
|
const size_t InvTypeGuildTrophyTributeSize = 0;//unknown
|
||||||
const size_t InvTypeOtherSize = 0;//unknown
|
const size_t InvTypeOtherSize = 0;//unknown
|
||||||
|
|
||||||
const size_t NPCTradeSize = 4;
|
extern size_t GetInvTypeSize(int inv_type);
|
||||||
|
extern const char* GetInvTypeName(int inv_type);
|
||||||
|
|
||||||
extern size_t InvTypeSize(int inv_type);
|
extern bool IsInvTypePersistent(int inv_type);
|
||||||
extern const char* InvTypeName(int inv_type);
|
|
||||||
|
|
||||||
} /*invtype*/
|
} /*invtype*/
|
||||||
|
|
||||||
namespace invslot {
|
namespace invslot {
|
||||||
extern const char* InvPossessionsSlotName(int inv_slot);
|
extern const char* GetInvPossessionsSlotName(int inv_slot);
|
||||||
extern const char* InvSlotName(int inv_type, int inv_slot);
|
extern const char* GetInvSlotName(int inv_type, int inv_slot);
|
||||||
|
|
||||||
} /*invslot*/
|
} /*invslot*/
|
||||||
|
|
||||||
namespace invbag {
|
namespace invbag {
|
||||||
const size_t ItemBagSize = 255; // server Size will be 255..unsure what actual client is (test)
|
const size_t ItemBagSize = 255; // server Size will be 255..unsure what actual client is (test)
|
||||||
|
|
||||||
extern const char* InvBagIndexName(int bag_index);
|
extern const char* GetInvBagIndexName(int bag_index);
|
||||||
|
|
||||||
} /*invbag*/
|
} /*invbag*/
|
||||||
|
|
||||||
namespace invaug {
|
namespace invaug {
|
||||||
const size_t ItemAugSize = 6;
|
const size_t ItemAugSize = 6;
|
||||||
|
|
||||||
extern const char* InvAugIndexName(int aug_index);
|
extern const char* GetInvAugIndexName(int aug_index);
|
||||||
|
|
||||||
} /*invaug*/
|
} /*invaug*/
|
||||||
|
|
||||||
@@ -237,6 +252,7 @@ namespace RoF
|
|||||||
|
|
||||||
namespace profile {
|
namespace profile {
|
||||||
const size_t TributeSize = invtype::InvTypeTributeSize;
|
const size_t TributeSize = invtype::InvTypeTributeSize;
|
||||||
|
const size_t GuildTributeSize = invtype::InvTypeGuildTributeSize;
|
||||||
|
|
||||||
const size_t BandoliersSize = 20; // number of bandolier instances
|
const size_t BandoliersSize = 20; // number of bandolier instances
|
||||||
const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance
|
const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance
|
||||||
@@ -252,16 +268,17 @@ namespace RoF
|
|||||||
|
|
||||||
const size_t SayLinkBodySize = 55;
|
const size_t SayLinkBodySize = 55;
|
||||||
|
|
||||||
|
const int LongBuffs = 42;
|
||||||
|
const int ShortBuffs = 20;
|
||||||
|
const int DiscBuffs = 1;
|
||||||
|
const int TotalBuffs = LongBuffs + ShortBuffs + DiscBuffs;
|
||||||
|
const int NPCBuffs = 97;
|
||||||
|
const int PetBuffs = NPCBuffs;
|
||||||
|
const int MercBuffs = LongBuffs;
|
||||||
|
|
||||||
} /*constants*/
|
} /*constants*/
|
||||||
|
|
||||||
namespace behavior {
|
namespace behavior {
|
||||||
const bool ConcatenateInvTypeLimbo = false;
|
|
||||||
|
|
||||||
const bool AllowOverLevelEquipment = true;
|
|
||||||
|
|
||||||
const bool AllowEmptyBagInBag = true;
|
|
||||||
const bool AllowClickCastFromBag = true;
|
|
||||||
|
|
||||||
const bool CoinHasWeight = false;
|
const bool CoinHasWeight = false;
|
||||||
|
|
||||||
} /*behavior*/
|
} /*behavior*/
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ E(OP_HPUpdate)
|
|||||||
E(OP_Illusion)
|
E(OP_Illusion)
|
||||||
E(OP_InspectBuffs)
|
E(OP_InspectBuffs)
|
||||||
E(OP_InspectRequest)
|
E(OP_InspectRequest)
|
||||||
E(OP_InterruptCast)
|
|
||||||
E(OP_ItemLinkResponse)
|
E(OP_ItemLinkResponse)
|
||||||
E(OP_ItemPacket)
|
E(OP_ItemPacket)
|
||||||
E(OP_ItemVerifyReply)
|
E(OP_ItemVerifyReply)
|
||||||
|
|||||||
+111
-155
@@ -163,7 +163,7 @@ struct AdventureInfo {
|
|||||||
** Merth: Gave struct a name so gcc 2.96 would compile
|
** Merth: Gave struct a name so gcc 2.96 would compile
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
struct Color_Struct
|
struct Tint_Struct
|
||||||
{
|
{
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
@@ -171,21 +171,65 @@ struct Color_Struct
|
|||||||
uint8 Green;
|
uint8 Green;
|
||||||
uint8 Red;
|
uint8 Red;
|
||||||
uint8 UseTint; // if there's a tint this is FF
|
uint8 UseTint; // if there's a tint this is FF
|
||||||
} RGB;
|
};
|
||||||
uint32 Color;
|
uint32 Color;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CharSelectEquip
|
struct TintProfile
|
||||||
|
{
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
Tint_Struct Head;
|
||||||
|
Tint_Struct Chest;
|
||||||
|
Tint_Struct Arms;
|
||||||
|
Tint_Struct Wrist;
|
||||||
|
Tint_Struct Hands;
|
||||||
|
Tint_Struct Legs;
|
||||||
|
Tint_Struct Feet;
|
||||||
|
Tint_Struct Primary;
|
||||||
|
Tint_Struct Secondary;
|
||||||
|
};
|
||||||
|
Tint_Struct Slot[EQEmu::textures::materialCount];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Visible equiptment.
|
||||||
|
* Size: 20 Octets
|
||||||
|
*/
|
||||||
|
struct Texture_Struct
|
||||||
{
|
{
|
||||||
uint32 Material;
|
uint32 Material;
|
||||||
uint32 Unknown1;
|
uint32 Unknown1;
|
||||||
uint32 EliteMaterial;
|
uint32 EliteMaterial;
|
||||||
uint32 HeroForgeModel;
|
uint32 HeroForgeModel;
|
||||||
uint32 Material2;
|
uint32 Material2; // Same as material?
|
||||||
Color_Struct Color;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Needs more research regarding new slots
|
||||||
|
//struct TextureProfile
|
||||||
|
//{
|
||||||
|
// union {
|
||||||
|
// struct {
|
||||||
|
// Texture_Struct Head;
|
||||||
|
// Texture_Struct Chest;
|
||||||
|
// Texture_Struct Arms;
|
||||||
|
// Texture_Struct Wrist;
|
||||||
|
// Texture_Struct Hands;
|
||||||
|
// Texture_Struct Legs;
|
||||||
|
// Texture_Struct Feet;
|
||||||
|
// Texture_Struct Primary;
|
||||||
|
// Texture_Struct Secondary;
|
||||||
|
// };
|
||||||
|
// Texture_Struct Slot[EQEmu::textures::TextureCount];
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// TextureProfile();
|
||||||
|
//};
|
||||||
|
|
||||||
|
struct CharSelectEquip : Texture_Struct, Tint_Struct {};
|
||||||
|
|
||||||
struct CharacterSelectEntry_Struct
|
struct CharacterSelectEntry_Struct
|
||||||
{
|
{
|
||||||
/*0000*/ char Name[1]; // Name null terminated
|
/*0000*/ char Name[1]; // Name null terminated
|
||||||
@@ -231,21 +275,6 @@ struct CharacterSelect_Struct
|
|||||||
/*004*/ CharacterSelectEntry_Struct Entries[0];
|
/*004*/ CharacterSelectEntry_Struct Entries[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
* Visible equiptment.
|
|
||||||
* Size: 20 Octets
|
|
||||||
*/
|
|
||||||
struct EquipStruct
|
|
||||||
{
|
|
||||||
/*00*/ uint32 Material;
|
|
||||||
/*04*/ uint32 Unknown1;
|
|
||||||
/*08*/ uint32 EliteMaterial;
|
|
||||||
/*12*/ uint32 HeroForgeModel;
|
|
||||||
/*16*/ uint32 Material2; // Same as material?
|
|
||||||
/*20*/
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
struct Membership_Entry_Struct
|
struct Membership_Entry_Struct
|
||||||
{
|
{
|
||||||
/*000*/ uint32 purchase_id; // Seen 1, then increments 90287 to 90300
|
/*000*/ uint32 purchase_id; // Seen 1, then increments 90287 to 90300
|
||||||
@@ -441,39 +470,24 @@ struct Spawn_Struct
|
|||||||
/*0000*/ uint32 unknown18;
|
/*0000*/ uint32 unknown18;
|
||||||
/*0000*/ uint32 unknown19;
|
/*0000*/ uint32 unknown19;
|
||||||
Spawn_Struct_Position Position;
|
Spawn_Struct_Position Position;
|
||||||
/*0000*/ union
|
/*0000*/ TintProfile equipment_tint;
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
/*0000*/ Color_Struct color_helmet; // Color of helmet item
|
|
||||||
/*0000*/ Color_Struct color_chest; // Color of chest item
|
|
||||||
/*0000*/ Color_Struct color_arms; // Color of arms item
|
|
||||||
/*0000*/ Color_Struct color_bracers; // Color of bracers item
|
|
||||||
/*0000*/ Color_Struct color_hands; // Color of hands item
|
|
||||||
/*0000*/ Color_Struct color_legs; // Color of legs item
|
|
||||||
/*0000*/ Color_Struct color_feet; // Color of feet item
|
|
||||||
/*0000*/ Color_Struct color_primary; // Color of primary item
|
|
||||||
/*0000*/ Color_Struct color_secondary; // Color of secondary item
|
|
||||||
} equipment_colors;
|
|
||||||
/*0000*/ Color_Struct colors[9]; // Array elements correspond to struct equipment_colors above
|
|
||||||
};
|
|
||||||
|
|
||||||
// skip these bytes if not a valid player race
|
// skip these bytes if not a valid player race
|
||||||
/*0000*/ union
|
/*0000*/ union
|
||||||
{
|
{
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
/*0000*/ EquipStruct equip_helmet; // Equiptment: Helmet visual
|
/*0000*/ Texture_Struct equip_helmet; // Equiptment: Helmet visual
|
||||||
/*0000*/ EquipStruct equip_chest; // Equiptment: Chest visual
|
/*0000*/ Texture_Struct equip_chest; // Equiptment: Chest visual
|
||||||
/*0000*/ EquipStruct equip_arms; // Equiptment: Arms visual
|
/*0000*/ Texture_Struct equip_arms; // Equiptment: Arms visual
|
||||||
/*0000*/ EquipStruct equip_bracers; // Equiptment: Wrist visual
|
/*0000*/ Texture_Struct equip_bracers; // Equiptment: Wrist visual
|
||||||
/*0000*/ EquipStruct equip_hands; // Equiptment: Hands visual
|
/*0000*/ Texture_Struct equip_hands; // Equiptment: Hands visual
|
||||||
/*0000*/ EquipStruct equip_legs; // Equiptment: Legs visual
|
/*0000*/ Texture_Struct equip_legs; // Equiptment: Legs visual
|
||||||
/*0000*/ EquipStruct equip_feet; // Equiptment: Boots visual
|
/*0000*/ Texture_Struct equip_feet; // Equiptment: Boots visual
|
||||||
/*0000*/ EquipStruct equip_primary; // Equiptment: Main visual
|
/*0000*/ Texture_Struct equip_primary; // Equiptment: Main visual
|
||||||
/*0000*/ EquipStruct equip_secondary; // Equiptment: Off visual
|
/*0000*/ Texture_Struct equip_secondary; // Equiptment: Off visual
|
||||||
} equip;
|
} equip;
|
||||||
/*0000*/ EquipStruct equipment[9];
|
/*0000*/ Texture_Struct equipment[9];
|
||||||
};
|
};
|
||||||
|
|
||||||
/*0000*/ //char title[0]; // only read if(hasTitleOrSuffix & 4)
|
/*0000*/ //char title[0]; // only read if(hasTitleOrSuffix & 4)
|
||||||
@@ -610,7 +624,7 @@ struct MemorizeSpell_Struct {
|
|||||||
uint32 slot; // Spot in the spell book/memorized slot
|
uint32 slot; // Spot in the spell book/memorized slot
|
||||||
uint32 spell_id; // Spell id (200 or c8 is minor healing, etc)
|
uint32 spell_id; // Spell id (200 or c8 is minor healing, etc)
|
||||||
uint32 scribing; // 1 if memorizing a spell, set to 0 if scribing to book, 2 if un-memming
|
uint32 scribing; // 1 if memorizing a spell, set to 0 if scribing to book, 2 if un-memming
|
||||||
uint32 unknown12;
|
uint32 reduction; // lowers reuse
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -643,11 +657,12 @@ struct DeleteSpell_Struct
|
|||||||
|
|
||||||
struct ManaChange_Struct
|
struct ManaChange_Struct
|
||||||
{
|
{
|
||||||
uint32 new_mana; // New Mana AMount
|
/*00*/ uint32 new_mana; // New Mana AMount
|
||||||
uint32 stamina;
|
/*04*/ uint32 stamina;
|
||||||
uint32 spell_id;
|
/*08*/ uint32 spell_id;
|
||||||
uint32 unknown12;
|
/*12*/ uint8 keepcasting; // won't stop the cast. Change mana while casting?
|
||||||
uint32 unknown16;
|
/*13*/ uint8 padding[3]; // client doesn't read it, garbage data seems like
|
||||||
|
/*16*/ int32 slot; // -1 for normal usage slot for when we want silent interrupt? I think it does timer stuff or something. Linked Spell Reuse interrupt uses it
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SwapSpell_Struct
|
struct SwapSpell_Struct
|
||||||
@@ -694,69 +709,31 @@ struct SpawnAppearance_Struct
|
|||||||
|
|
||||||
struct SpellBuff_Struct
|
struct SpellBuff_Struct
|
||||||
{
|
{
|
||||||
/*000*/ uint8 slotid; // badly named... seems to be 2 for a real buff, 0 otherwise
|
/*000*/ uint8 effect_type; // 0 = no buff, 2 = buff, 4 = inverse affects of buff
|
||||||
/*001*/ float unknown004; // Seen 1 for no buff
|
/*001*/ uint8 level; // Seen 1 for no buff
|
||||||
/*005*/ uint32 player_id; // 'global' ID of the caster, for wearoff messages
|
/*002*/ uint8 unknown002; //pretty sure padding now
|
||||||
/*009*/ uint32 unknown016;
|
/*003*/ uint8 unknown003; // MQ2 used to call this "damage shield" -- don't see client referencing it, so maybe server side DS type tracking?
|
||||||
/*013*/ uint8 bard_modifier;
|
/*004*/ float bard_modifier;
|
||||||
/*014*/ int32 duration;
|
|
||||||
/*018*/ uint8 level;
|
|
||||||
/*019*/ uint32 spellid;
|
|
||||||
/*023*/ uint32 counters;
|
|
||||||
/*027*/ uint8 unknown0028[53];
|
|
||||||
/*080*/
|
|
||||||
};
|
|
||||||
|
|
||||||
struct SpellBuff_Struct_Old
|
|
||||||
{
|
|
||||||
/*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*/ float unknown004; // Seen 1 for no buff
|
|
||||||
/*008*/ uint32 spellid;
|
/*008*/ uint32 spellid;
|
||||||
/*012*/ int32 duration;
|
/*012*/ uint32 duration;
|
||||||
/*016*/ uint32 unknown016;
|
/*016*/ uint32 player_id; // caster ID, pretty sure just zone ID
|
||||||
/*020*/ uint32 player_id; // 'global' ID of the caster, for wearoff messages
|
/*020*/ uint32 num_hits;
|
||||||
/*024*/ uint32 counters;
|
/*024*/ float y; // referenced by SPA 441
|
||||||
/*028*/ uint8 unknown0028[60];
|
/*028*/ float x; // unsure if all buffs get them
|
||||||
|
/*032*/ float z; // as valid data
|
||||||
|
/*036*/ uint32 unknown036;
|
||||||
|
/*040*/ int32 slot_data[12]; // book keeping stuff per slot (counters, rune/vie)
|
||||||
/*088*/
|
/*088*/
|
||||||
};
|
};
|
||||||
|
|
||||||
// Not functional yet, but this is what the packet looks like on Live
|
struct SpellBuffPacket_Struct {
|
||||||
struct SpellBuffFade_Struct_Live {
|
|
||||||
/*000*/ uint32 entityid; // Player id who cast the buff
|
/*000*/ uint32 entityid; // Player id who cast the buff
|
||||||
/*004*/ uint8 unknown004;
|
/*004*/ SpellBuff_Struct buff;
|
||||||
/*005*/ uint8 level;
|
|
||||||
/*006*/ uint8 effect;
|
|
||||||
/*007*/ uint8 unknown007;
|
|
||||||
/*008*/ float unknown008;
|
|
||||||
/*012*/ uint32 spellid;
|
|
||||||
/*016*/ int32 duration;
|
|
||||||
/*020*/ uint32 playerId; // Global player ID?
|
|
||||||
/*024*/ uint32 num_hits;
|
|
||||||
/*028*/ uint8 unknown0028[64];
|
|
||||||
/*092*/ uint32 slotid;
|
/*092*/ uint32 slotid;
|
||||||
/*096*/ uint32 bufffade;
|
/*096*/ uint32 bufffade;
|
||||||
/*100*/
|
/*100*/
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SpellBuffFade_Struct {
|
|
||||||
/*000*/ uint32 entityid;
|
|
||||||
/*004*/ uint8 slot;
|
|
||||||
/*005*/ uint8 level;
|
|
||||||
/*006*/ uint8 effect;
|
|
||||||
/*007*/ uint8 unknown7;
|
|
||||||
/*008*/ uint32 spellid;
|
|
||||||
/*012*/ int32 duration;
|
|
||||||
/*016*/ uint32 num_hits;
|
|
||||||
/*020*/ uint32 unknown020; // Global player ID?
|
|
||||||
/*024*/ uint32 playerId; // Player id who cast the buff
|
|
||||||
/*028*/ uint32 slotid;
|
|
||||||
/*032*/ uint32 bufffade;
|
|
||||||
/*036*/
|
|
||||||
};
|
|
||||||
|
|
||||||
struct BuffRemoveRequest_Struct
|
struct BuffRemoveRequest_Struct
|
||||||
{
|
{
|
||||||
/*00*/ uint32 SlotID;
|
/*00*/ uint32 SlotID;
|
||||||
@@ -1061,38 +1038,38 @@ union
|
|||||||
{
|
{
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
/*00184*/ EquipStruct equip_helmet; // Equiptment: Helmet visual
|
/*00184*/ Texture_Struct equip_helmet; // Equiptment: Helmet visual
|
||||||
/*00204*/ EquipStruct equip_chest; // Equiptment: Chest visual
|
/*00204*/ Texture_Struct equip_chest; // Equiptment: Chest visual
|
||||||
/*00224*/ EquipStruct equip_arms; // Equiptment: Arms visual
|
/*00224*/ Texture_Struct equip_arms; // Equiptment: Arms visual
|
||||||
/*00244*/ EquipStruct equip_bracers; // Equiptment: Wrist visual
|
/*00244*/ Texture_Struct equip_bracers; // Equiptment: Wrist visual
|
||||||
/*00264*/ EquipStruct equip_hands; // Equiptment: Hands visual
|
/*00264*/ Texture_Struct equip_hands; // Equiptment: Hands visual
|
||||||
/*00284*/ EquipStruct equip_legs; // Equiptment: Legs visual
|
/*00284*/ Texture_Struct equip_legs; // Equiptment: Legs visual
|
||||||
/*00304*/ EquipStruct equip_feet; // Equiptment: Boots visual
|
/*00304*/ Texture_Struct equip_feet; // Equiptment: Boots visual
|
||||||
/*00324*/ EquipStruct equip_primary; // Equiptment: Main visual
|
/*00324*/ Texture_Struct equip_primary; // Equiptment: Main visual
|
||||||
/*00344*/ EquipStruct equip_secondary; // Equiptment: Off visual
|
/*00344*/ Texture_Struct equip_secondary; // Equiptment: Off visual
|
||||||
// Below slots are just guesses, but all 0s anyway...
|
// Below slots are just guesses, but all 0s anyway...
|
||||||
/*00364*/ EquipStruct equip_charm; // Equiptment: Non-visual
|
/*00364*/ Texture_Struct equip_charm; // Equiptment: Non-visual
|
||||||
/*00384*/ EquipStruct equip_ear1; // Equiptment: Non-visual
|
/*00384*/ Texture_Struct equip_ear1; // Equiptment: Non-visual
|
||||||
/*00404*/ EquipStruct equip_ear2; // Equiptment: Non-visual
|
/*00404*/ Texture_Struct equip_ear2; // Equiptment: Non-visual
|
||||||
/*00424*/ EquipStruct equip_face; // Equiptment: Non-visual
|
/*00424*/ Texture_Struct equip_face; // Equiptment: Non-visual
|
||||||
/*00444*/ EquipStruct equip_neck; // Equiptment: Non-visual
|
/*00444*/ Texture_Struct equip_neck; // Equiptment: Non-visual
|
||||||
/*00464*/ EquipStruct equip_shoulder; // Equiptment: Non-visual
|
/*00464*/ Texture_Struct equip_shoulder; // Equiptment: Non-visual
|
||||||
/*00484*/ EquipStruct equip_bracer2; // Equiptment: Non-visual
|
/*00484*/ Texture_Struct equip_bracer2; // Equiptment: Non-visual
|
||||||
/*00504*/ EquipStruct equip_range; // Equiptment: Non-visual
|
/*00504*/ Texture_Struct equip_range; // Equiptment: Non-visual
|
||||||
/*00524*/ EquipStruct equip_ring1; // Equiptment: Non-visual
|
/*00524*/ Texture_Struct equip_ring1; // Equiptment: Non-visual
|
||||||
/*00544*/ EquipStruct equip_ring2; // Equiptment: Non-visual
|
/*00544*/ Texture_Struct equip_ring2; // Equiptment: Non-visual
|
||||||
/*00564*/ EquipStruct equip_waist; // Equiptment: Non-visual
|
/*00564*/ Texture_Struct equip_waist; // Equiptment: Non-visual
|
||||||
/*00584*/ EquipStruct equip_powersource; // Equiptment: Non-visual
|
/*00584*/ Texture_Struct equip_powersource; // Equiptment: Non-visual
|
||||||
/*00604*/ EquipStruct equip_ammo; // Equiptment: Non-visual
|
/*00604*/ Texture_Struct equip_ammo; // Equiptment: Non-visual
|
||||||
} equip;
|
} equip;
|
||||||
/*00184*/ EquipStruct equipment[22];
|
/*00184*/ Texture_Struct equipment[22];
|
||||||
};
|
};
|
||||||
/*00624*/ uint32 equip2_count; // Seen 9
|
/*00624*/ uint32 equip2_count; // Seen 9
|
||||||
/*00628*/ EquipStruct equipment2[9]; // Appears to be Visible slots, but all 0s
|
/*00628*/ Texture_Struct equipment2[9]; // Appears to be Visible slots, but all 0s
|
||||||
/*00808*/ uint32 tint_count; // Seen 9
|
/*00808*/ uint32 tint_count; // Seen 9
|
||||||
/*00812*/ Color_Struct item_tint[9]; // RR GG BB 00
|
/*00812*/ TintProfile item_tint; // RR GG BB 00
|
||||||
/*00848*/ uint32 tint_count2; // Seen 9
|
/*00848*/ uint32 tint_count2; // Seen 9
|
||||||
/*00852*/ Color_Struct item_tint2[9]; // RR GG BB 00
|
/*00852*/ TintProfile item_tint2; // RR GG BB 00
|
||||||
/*00888*/ uint8 haircolor; // Player hair color
|
/*00888*/ uint8 haircolor; // Player hair color
|
||||||
/*00889*/ uint8 beardcolor; // Player beard color
|
/*00889*/ uint8 beardcolor; // Player beard color
|
||||||
/*00890*/ uint32 unknown_rof5; //
|
/*00890*/ uint32 unknown_rof5; //
|
||||||
@@ -1415,7 +1392,7 @@ struct WearChange_Struct{
|
|||||||
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
|
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
|
||||||
/*014*/ uint32 hero_forge_model; // New to VoA
|
/*014*/ uint32 hero_forge_model; // New to VoA
|
||||||
/*018*/ uint32 unknown18; // New to RoF
|
/*018*/ uint32 unknown18; // New to RoF
|
||||||
/*022*/ Color_Struct color;
|
/*022*/ Tint_Struct color;
|
||||||
/*026*/ uint8 wear_slot_id;
|
/*026*/ uint8 wear_slot_id;
|
||||||
/*027*/
|
/*027*/
|
||||||
};
|
};
|
||||||
@@ -2044,7 +2021,7 @@ struct LootingItem_Struct {
|
|||||||
/*004*/ uint32 looter;
|
/*004*/ uint32 looter;
|
||||||
/*008*/ uint16 slot_id;
|
/*008*/ uint16 slot_id;
|
||||||
/*010*/ uint16 unknown10;
|
/*010*/ uint16 unknown10;
|
||||||
/*012*/ uint32 auto_loot;
|
/*012*/ int32 auto_loot;
|
||||||
/*016*/ uint32 unknown16;
|
/*016*/ uint32 unknown16;
|
||||||
/*020*/
|
/*020*/
|
||||||
};
|
};
|
||||||
@@ -2473,7 +2450,7 @@ struct AdventureLeaderboard_Struct
|
|||||||
/*struct Item_Shop_Struct {
|
/*struct Item_Shop_Struct {
|
||||||
uint16 merchantid;
|
uint16 merchantid;
|
||||||
uint8 itemtype;
|
uint8 itemtype;
|
||||||
Item_Struct item;
|
ItemData item;
|
||||||
uint8 iss_unknown001[6];
|
uint8 iss_unknown001[6];
|
||||||
};*/
|
};*/
|
||||||
|
|
||||||
@@ -3634,27 +3611,6 @@ struct PetitionBug_Struct{
|
|||||||
char text[1028];
|
char text[1028];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DyeStruct
|
|
||||||
{
|
|
||||||
union
|
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
struct Color_Struct head;
|
|
||||||
struct Color_Struct chest;
|
|
||||||
struct Color_Struct arms;
|
|
||||||
struct Color_Struct wrists;
|
|
||||||
struct Color_Struct hands;
|
|
||||||
struct Color_Struct legs;
|
|
||||||
struct Color_Struct feet;
|
|
||||||
struct Color_Struct primary; // you can't actually dye this
|
|
||||||
struct Color_Struct secondary; // or this
|
|
||||||
}
|
|
||||||
dyes;
|
|
||||||
struct Color_Struct dye[9];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ApproveZone_Struct {
|
struct ApproveZone_Struct {
|
||||||
char name[64];
|
char name[64];
|
||||||
uint32 zoneid;
|
uint32 zoneid;
|
||||||
|
|||||||
+162
-56
@@ -29,7 +29,7 @@
|
|||||||
#include "../eq_packet_structs.h"
|
#include "../eq_packet_structs.h"
|
||||||
#include "../misc_functions.h"
|
#include "../misc_functions.h"
|
||||||
#include "../string_util.h"
|
#include "../string_util.h"
|
||||||
#include "../item.h"
|
#include "../item_instance.h"
|
||||||
#include "sod_structs.h"
|
#include "sod_structs.h"
|
||||||
#include "../rulesys.h"
|
#include "../rulesys.h"
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ namespace SoD
|
|||||||
static OpcodeManager *opcodes = nullptr;
|
static OpcodeManager *opcodes = nullptr;
|
||||||
static Strategy struct_strategy;
|
static Strategy struct_strategy;
|
||||||
|
|
||||||
void SerializeItem(EQEmu::OutBuffer& ob, const ItemInst *inst, int16 slot_id, uint8 depth);
|
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id, uint8 depth);
|
||||||
|
|
||||||
// server to client inventory location converters
|
// server to client inventory location converters
|
||||||
static inline uint32 ServerToSoDSlot(uint32 ServerSlot);
|
static inline uint32 ServerToSoDSlot(uint32 ServerSlot);
|
||||||
@@ -59,6 +59,12 @@ namespace SoD
|
|||||||
// client to server text link converter
|
// client to server text link converter
|
||||||
static inline void SoDToServerTextLink(std::string& serverTextLink, const std::string& sodTextLink);
|
static inline void SoDToServerTextLink(std::string& serverTextLink, const std::string& sodTextLink);
|
||||||
|
|
||||||
|
static inline CastingSlot ServerToSoDCastingSlot(EQEmu::CastingSlot slot);
|
||||||
|
static inline EQEmu::CastingSlot SoDToServerCastingSlot(CastingSlot slot);
|
||||||
|
|
||||||
|
static inline int ServerToSoDBuffSlot(int index);
|
||||||
|
static inline int SoDToServerBuffSlot(int index);
|
||||||
|
|
||||||
void Register(EQStreamIdentifier &into)
|
void Register(EQStreamIdentifier &into)
|
||||||
{
|
{
|
||||||
//create our opcode manager if we havent already
|
//create our opcode manager if we havent already
|
||||||
@@ -301,17 +307,18 @@ namespace SoD
|
|||||||
|
|
||||||
ENCODE(OP_Buff)
|
ENCODE(OP_Buff)
|
||||||
{
|
{
|
||||||
ENCODE_LENGTH_EXACT(SpellBuffFade_Struct);
|
ENCODE_LENGTH_EXACT(SpellBuffPacket_Struct);
|
||||||
SETUP_DIRECT_ENCODE(SpellBuffFade_Struct, structs::SpellBuffFade_Struct);
|
SETUP_DIRECT_ENCODE(SpellBuffPacket_Struct, structs::SpellBuffPacket_Struct);
|
||||||
|
|
||||||
OUT(entityid);
|
OUT(entityid);
|
||||||
OUT(slot);
|
OUT(buff.effect_type);
|
||||||
OUT(level);
|
OUT(buff.level);
|
||||||
OUT(effect);
|
OUT(buff.bard_modifier);
|
||||||
//eq->unknown7 = 10;
|
OUT(buff.spellid);
|
||||||
OUT(spellid);
|
OUT(buff.duration);
|
||||||
OUT(duration);
|
OUT(buff.counters);
|
||||||
OUT(slotid);
|
OUT(buff.player_id);
|
||||||
|
eq->slotid = ServerToSoDBuffSlot(emu->slotid);
|
||||||
OUT(bufffade);
|
OUT(bufffade);
|
||||||
|
|
||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
@@ -392,7 +399,7 @@ namespace SoD
|
|||||||
ob.write((const char*)&item_count, sizeof(uint32));
|
ob.write((const char*)&item_count, sizeof(uint32));
|
||||||
|
|
||||||
for (int index = 0; index < item_count; ++index, ++eq) {
|
for (int index = 0; index < item_count; ++index, ++eq) {
|
||||||
SerializeItem(ob, (const ItemInst*)eq->inst, eq->slot_id, 0);
|
SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0);
|
||||||
if (ob.tellp() == last_pos)
|
if (ob.tellp() == last_pos)
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id);
|
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id);
|
||||||
|
|
||||||
@@ -1056,7 +1063,7 @@ namespace SoD
|
|||||||
|
|
||||||
ob.write((const char*)__emu_buffer, 4);
|
ob.write((const char*)__emu_buffer, 4);
|
||||||
|
|
||||||
SerializeItem(ob, (const ItemInst*)int_struct->inst, int_struct->slot_id, 0);
|
SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0);
|
||||||
if (ob.tellp() == last_pos) {
|
if (ob.tellp() == last_pos) {
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d.", int_struct->slot_id);
|
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d.", int_struct->slot_id);
|
||||||
delete in;
|
delete in;
|
||||||
@@ -1135,7 +1142,8 @@ namespace SoD
|
|||||||
OUT(new_mana);
|
OUT(new_mana);
|
||||||
OUT(stamina);
|
OUT(stamina);
|
||||||
OUT(spell_id);
|
OUT(spell_id);
|
||||||
eq->unknown16 = -1; // Self Interrupt/Success = -1, Fizzle = 1, Other Interrupt = 2?
|
OUT(keepcasting);
|
||||||
|
eq->slot = -1; // this is spell gem slot. It's -1 in normal operation
|
||||||
|
|
||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
}
|
}
|
||||||
@@ -1498,7 +1506,7 @@ namespace SoD
|
|||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->petid);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->petid);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint16, Buffer, emu->buffcount);
|
VARSTRUCT_ENCODE_TYPE(uint16, Buffer, emu->buffcount);
|
||||||
|
|
||||||
for (unsigned int i = 0; i < BUFF_COUNT; ++i)
|
for (unsigned int i = 0; i < PET_BUFF_COUNT; ++i)
|
||||||
{
|
{
|
||||||
if (emu->spellid[i])
|
if (emu->spellid[i])
|
||||||
{
|
{
|
||||||
@@ -1509,7 +1517,7 @@ namespace SoD
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, emu->buffcount);
|
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, emu->buffcount); // I think this is actually some sort of type
|
||||||
|
|
||||||
delete[] __emu_buffer;
|
delete[] __emu_buffer;
|
||||||
dest->FastQueuePacket(&in, ack_req);
|
dest->FastQueuePacket(&in, ack_req);
|
||||||
@@ -1553,14 +1561,14 @@ namespace SoD
|
|||||||
OUT(hairstyle);
|
OUT(hairstyle);
|
||||||
OUT(beard);
|
OUT(beard);
|
||||||
// OUT(unknown00178[10]);
|
// OUT(unknown00178[10]);
|
||||||
for (r = 0; r < 9; r++) {
|
for (r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++) {
|
||||||
eq->equipment[r].Material = emu->item_material[r];
|
eq->equipment.Slot[r].Material = emu->item_material.Slot[r].Material;
|
||||||
eq->equipment[r].Unknown1 = 0;
|
eq->equipment.Slot[r].Unknown1 = 0;
|
||||||
eq->equipment[r].EliteMaterial = 0;
|
eq->equipment.Slot[r].EliteMaterial = 0;
|
||||||
//eq->colors[r].color = emu->colors[r].color;
|
//eq->colors[r].color = emu->colors[r].color;
|
||||||
}
|
}
|
||||||
for (r = 0; r < 7; r++) {
|
for (r = 0; r < 7; r++) {
|
||||||
OUT(item_tint[r].Color);
|
OUT(item_tint.Slot[r].Color);
|
||||||
}
|
}
|
||||||
// OUT(unknown00224[48]);
|
// OUT(unknown00224[48]);
|
||||||
//NOTE: new client supports 300 AAs, our internal rep/PP
|
//NOTE: new client supports 300 AAs, our internal rep/PP
|
||||||
@@ -1602,10 +1610,10 @@ namespace SoD
|
|||||||
OUT(thirst_level);
|
OUT(thirst_level);
|
||||||
OUT(hunger_level);
|
OUT(hunger_level);
|
||||||
for (r = 0; r < structs::BUFF_COUNT; r++) {
|
for (r = 0; r < structs::BUFF_COUNT; r++) {
|
||||||
OUT(buffs[r].slotid);
|
OUT(buffs[r].effect_type);
|
||||||
OUT(buffs[r].level);
|
OUT(buffs[r].level);
|
||||||
OUT(buffs[r].bard_modifier);
|
OUT(buffs[r].bard_modifier);
|
||||||
OUT(buffs[r].effect);
|
OUT(buffs[r].unknown003);
|
||||||
OUT(buffs[r].spellid);
|
OUT(buffs[r].spellid);
|
||||||
OUT(buffs[r].duration);
|
OUT(buffs[r].duration);
|
||||||
OUT(buffs[r].counters);
|
OUT(buffs[r].counters);
|
||||||
@@ -1993,11 +2001,11 @@ namespace SoD
|
|||||||
eq_cse->HairColor = emu_cse->HairColor;
|
eq_cse->HairColor = emu_cse->HairColor;
|
||||||
eq_cse->Face = emu_cse->Face;
|
eq_cse->Face = emu_cse->Face;
|
||||||
|
|
||||||
for (int equip_index = 0; equip_index < EQEmu::legacy::MaterialCount; equip_index++) {
|
for (int equip_index = EQEmu::textures::textureBegin; equip_index < EQEmu::textures::materialCount; equip_index++) {
|
||||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteModel;
|
||||||
eq_cse->Equip[equip_index].Color.Color = emu_cse->Equip[equip_index].Color.Color;
|
eq_cse->Equip[equip_index].Color = emu_cse->Equip[equip_index].Color;
|
||||||
}
|
}
|
||||||
|
|
||||||
eq_cse->PrimaryIDFile = emu_cse->PrimaryIDFile;
|
eq_cse->PrimaryIDFile = emu_cse->PrimaryIDFile;
|
||||||
@@ -2563,7 +2571,7 @@ namespace SoD
|
|||||||
float SpawnSize = emu->size;
|
float SpawnSize = emu->size;
|
||||||
if (!((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522)))
|
if (!((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522)))
|
||||||
{
|
{
|
||||||
PacketSize -= (sizeof(structs::EquipStruct) * 9);
|
PacketSize -= (sizeof(structs::Texture_Struct) * EQEmu::textures::materialCount);
|
||||||
|
|
||||||
if (emu->size == 0)
|
if (emu->size == 0)
|
||||||
{
|
{
|
||||||
@@ -2760,10 +2768,10 @@ namespace SoD
|
|||||||
|
|
||||||
if ((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
|
if ((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
|
||||||
{
|
{
|
||||||
for (k = 0; k < 9; ++k)
|
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; ++k)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->colors[k].Color);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment_tint.Slot[k].Color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2773,11 +2781,11 @@ namespace SoD
|
|||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
|
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialPrimary].Material);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment.Primary.Material);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
|
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialSecondary].Material);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment.Secondary.Material);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
}
|
}
|
||||||
@@ -2785,15 +2793,15 @@ namespace SoD
|
|||||||
|
|
||||||
if ((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
|
if ((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
|
||||||
{
|
{
|
||||||
structs::EquipStruct *Equipment = (structs::EquipStruct *)Buffer;
|
structs::Texture_Struct *Equipment = (structs::Texture_Struct *)Buffer;
|
||||||
|
|
||||||
for (k = 0; k < 9; k++) {
|
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||||
Equipment[k].Material = emu->equipment[k].Material;
|
Equipment[k].Material = emu->equipment.Slot[k].Material;
|
||||||
Equipment[k].Unknown1 = emu->equipment[k].Unknown1;
|
Equipment[k].Unknown1 = emu->equipment.Slot[k].Unknown1;
|
||||||
Equipment[k].EliteMaterial = emu->equipment[k].EliteMaterial;
|
Equipment[k].EliteMaterial = emu->equipment.Slot[k].EliteModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
Buffer += (sizeof(structs::EquipStruct) * 9);
|
Buffer += (sizeof(structs::Texture_Struct) * EQEmu::textures::materialCount);
|
||||||
}
|
}
|
||||||
if (strlen(emu->title))
|
if (strlen(emu->title))
|
||||||
{
|
{
|
||||||
@@ -2907,16 +2915,17 @@ namespace SoD
|
|||||||
|
|
||||||
DECODE(OP_Buff)
|
DECODE(OP_Buff)
|
||||||
{
|
{
|
||||||
DECODE_LENGTH_EXACT(structs::SpellBuffFade_Struct);
|
DECODE_LENGTH_EXACT(structs::SpellBuffPacket_Struct);
|
||||||
SETUP_DIRECT_DECODE(SpellBuffFade_Struct, structs::SpellBuffFade_Struct);
|
SETUP_DIRECT_DECODE(SpellBuffPacket_Struct, structs::SpellBuffPacket_Struct);
|
||||||
|
|
||||||
IN(entityid);
|
IN(entityid);
|
||||||
IN(slot);
|
IN(buff.effect_type);
|
||||||
IN(level);
|
IN(buff.level);
|
||||||
IN(effect);
|
IN(buff.bard_modifier);
|
||||||
IN(spellid);
|
IN(buff.spellid);
|
||||||
IN(duration);
|
IN(buff.duration);
|
||||||
IN(slotid);
|
IN(buff.counters);
|
||||||
|
emu->slotid = SoDToServerBuffSlot(eq->slotid);
|
||||||
IN(bufffade);
|
IN(bufffade);
|
||||||
|
|
||||||
FINISH_DIRECT_DECODE();
|
FINISH_DIRECT_DECODE();
|
||||||
@@ -2946,6 +2955,7 @@ namespace SoD
|
|||||||
DECODE_LENGTH_EXACT(structs::CastSpell_Struct);
|
DECODE_LENGTH_EXACT(structs::CastSpell_Struct);
|
||||||
SETUP_DIRECT_DECODE(CastSpell_Struct, structs::CastSpell_Struct);
|
SETUP_DIRECT_DECODE(CastSpell_Struct, structs::CastSpell_Struct);
|
||||||
|
|
||||||
|
emu->slot = static_cast<uint32>(SoDToServerCastingSlot(static_cast<CastingSlot>(eq->slot)));
|
||||||
IN(slot);
|
IN(slot);
|
||||||
IN(spell_id);
|
IN(spell_id);
|
||||||
emu->inventoryslot = SoDToServerSlot(eq->inventoryslot);
|
emu->inventoryslot = SoDToServerSlot(eq->inventoryslot);
|
||||||
@@ -3239,8 +3249,10 @@ namespace SoD
|
|||||||
DECODE_LENGTH_EXACT(structs::LoadSpellSet_Struct);
|
DECODE_LENGTH_EXACT(structs::LoadSpellSet_Struct);
|
||||||
SETUP_DIRECT_DECODE(LoadSpellSet_Struct, structs::LoadSpellSet_Struct);
|
SETUP_DIRECT_DECODE(LoadSpellSet_Struct, structs::LoadSpellSet_Struct);
|
||||||
|
|
||||||
for (uint32 i = 0; i < MAX_PP_MEMSPELL; ++i)
|
for (int i = 0; i < structs::MAX_PP_MEMSPELL; ++i)
|
||||||
emu->spell[i] = eq->spell[i];
|
emu->spell[i] = eq->spell[i];
|
||||||
|
for (int i = structs::MAX_PP_MEMSPELL; i < MAX_PP_MEMSPELL; ++i)
|
||||||
|
emu->spell[i] = 0xFFFFFFFF;
|
||||||
|
|
||||||
FINISH_DIRECT_DECODE();
|
FINISH_DIRECT_DECODE();
|
||||||
}
|
}
|
||||||
@@ -3544,9 +3556,9 @@ namespace SoD
|
|||||||
return NextItemInstSerialNumber;
|
return NextItemInstSerialNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SerializeItem(EQEmu::OutBuffer& ob, const ItemInst *inst, int16 slot_id_in, uint8 depth)
|
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth)
|
||||||
{
|
{
|
||||||
const EQEmu::Item_Struct *item = inst->GetUnscaledItem();
|
const EQEmu::ItemData *item = inst->GetUnscaledItem();
|
||||||
|
|
||||||
SoD::structs::ItemSerializationHeader hdr;
|
SoD::structs::ItemSerializationHeader hdr;
|
||||||
|
|
||||||
@@ -3860,18 +3872,18 @@ namespace SoD
|
|||||||
|
|
||||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||||
|
|
||||||
for (uint32 index = SUB_INDEX_BEGIN; index < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++index) {
|
for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) {
|
||||||
ItemInst* sub = inst->GetItem(index);
|
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||||
if (!sub)
|
if (!sub)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
int SubSlotNumber = INVALID_INDEX;
|
int SubSlotNumber = INVALID_INDEX;
|
||||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
||||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + index + 1);
|
SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1);
|
||||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||||
else
|
else
|
||||||
SubSlotNumber = slot_id_in;
|
SubSlotNumber = slot_id_in;
|
||||||
|
|
||||||
@@ -3889,7 +3901,7 @@ namespace SoD
|
|||||||
{
|
{
|
||||||
uint32 SoDSlot = 0;
|
uint32 SoDSlot = 0;
|
||||||
|
|
||||||
if (serverSlot >= EQEmu::legacy::SlotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
if (serverSlot >= EQEmu::inventory::slotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||||
SoDSlot = serverSlot + 1;
|
SoDSlot = serverSlot + 1;
|
||||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END)
|
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END)
|
||||||
SoDSlot = serverSlot + 11;
|
SoDSlot = serverSlot + 11;
|
||||||
@@ -3897,7 +3909,7 @@ namespace SoD
|
|||||||
SoDSlot = serverSlot + 1;
|
SoDSlot = serverSlot + 1;
|
||||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
||||||
SoDSlot = serverSlot + 1;
|
SoDSlot = serverSlot + 1;
|
||||||
else if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
else if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||||
SoDSlot = invslot::PossessionsPowerSource;
|
SoDSlot = invslot::PossessionsPowerSource;
|
||||||
else
|
else
|
||||||
SoDSlot = serverSlot;
|
SoDSlot = serverSlot;
|
||||||
@@ -3923,7 +3935,7 @@ namespace SoD
|
|||||||
else if (sodSlot >= invbag::SharedBankBagsBegin && sodSlot <= invbag::SharedBankBagsEnd)
|
else if (sodSlot >= invbag::SharedBankBagsBegin && sodSlot <= invbag::SharedBankBagsEnd)
|
||||||
ServerSlot = sodSlot - 1;
|
ServerSlot = sodSlot - 1;
|
||||||
else if (sodSlot == invslot::PossessionsPowerSource)
|
else if (sodSlot == invslot::PossessionsPowerSource)
|
||||||
ServerSlot = EQEmu::legacy::SlotPowerSource;
|
ServerSlot = EQEmu::inventory::slotPowerSource;
|
||||||
else
|
else
|
||||||
ServerSlot = sodSlot;
|
ServerSlot = sodSlot;
|
||||||
return ServerSlot;
|
return ServerSlot;
|
||||||
@@ -4011,4 +4023,98 @@ namespace SoD
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline CastingSlot ServerToSoDCastingSlot(EQEmu::CastingSlot slot)
|
||||||
|
{
|
||||||
|
switch (slot) {
|
||||||
|
case EQEmu::CastingSlot::Gem1:
|
||||||
|
return CastingSlot::Gem1;
|
||||||
|
case EQEmu::CastingSlot::Gem2:
|
||||||
|
return CastingSlot::Gem2;
|
||||||
|
case EQEmu::CastingSlot::Gem3:
|
||||||
|
return CastingSlot::Gem3;
|
||||||
|
case EQEmu::CastingSlot::Gem4:
|
||||||
|
return CastingSlot::Gem4;
|
||||||
|
case EQEmu::CastingSlot::Gem5:
|
||||||
|
return CastingSlot::Gem5;
|
||||||
|
case EQEmu::CastingSlot::Gem6:
|
||||||
|
return CastingSlot::Gem6;
|
||||||
|
case EQEmu::CastingSlot::Gem7:
|
||||||
|
return CastingSlot::Gem7;
|
||||||
|
case EQEmu::CastingSlot::Gem8:
|
||||||
|
return CastingSlot::Gem8;
|
||||||
|
case EQEmu::CastingSlot::Gem9:
|
||||||
|
return CastingSlot::Gem9;
|
||||||
|
case EQEmu::CastingSlot::Gem10:
|
||||||
|
return CastingSlot::Gem10;
|
||||||
|
case EQEmu::CastingSlot::Item:
|
||||||
|
case EQEmu::CastingSlot::PotionBelt:
|
||||||
|
return CastingSlot::Item;
|
||||||
|
case EQEmu::CastingSlot::Discipline:
|
||||||
|
return CastingSlot::Discipline;
|
||||||
|
case EQEmu::CastingSlot::AltAbility:
|
||||||
|
return CastingSlot::AltAbility;
|
||||||
|
default: // we shouldn't have any issues with other slots ... just return something
|
||||||
|
return CastingSlot::Discipline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline EQEmu::CastingSlot SoDToServerCastingSlot(CastingSlot slot)
|
||||||
|
{
|
||||||
|
switch (slot) {
|
||||||
|
case CastingSlot::Gem1:
|
||||||
|
return EQEmu::CastingSlot::Gem1;
|
||||||
|
case CastingSlot::Gem2:
|
||||||
|
return EQEmu::CastingSlot::Gem2;
|
||||||
|
case CastingSlot::Gem3:
|
||||||
|
return EQEmu::CastingSlot::Gem3;
|
||||||
|
case CastingSlot::Gem4:
|
||||||
|
return EQEmu::CastingSlot::Gem4;
|
||||||
|
case CastingSlot::Gem5:
|
||||||
|
return EQEmu::CastingSlot::Gem5;
|
||||||
|
case CastingSlot::Gem6:
|
||||||
|
return EQEmu::CastingSlot::Gem6;
|
||||||
|
case CastingSlot::Gem7:
|
||||||
|
return EQEmu::CastingSlot::Gem7;
|
||||||
|
case CastingSlot::Gem8:
|
||||||
|
return EQEmu::CastingSlot::Gem8;
|
||||||
|
case CastingSlot::Gem9:
|
||||||
|
return EQEmu::CastingSlot::Gem9;
|
||||||
|
case CastingSlot::Gem10:
|
||||||
|
return EQEmu::CastingSlot::Gem10;
|
||||||
|
case CastingSlot::Discipline:
|
||||||
|
return EQEmu::CastingSlot::Discipline;
|
||||||
|
case CastingSlot::Item:
|
||||||
|
return EQEmu::CastingSlot::Item;
|
||||||
|
case CastingSlot::AltAbility:
|
||||||
|
return EQEmu::CastingSlot::AltAbility;
|
||||||
|
default: // we shouldn't have any issues with other slots ... just return something
|
||||||
|
return EQEmu::CastingSlot::Discipline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int ServerToSoDBuffSlot(int index)
|
||||||
|
{
|
||||||
|
// we're a disc
|
||||||
|
if (index >= EQEmu::constants::LongBuffs + EQEmu::constants::ShortBuffs)
|
||||||
|
return index - EQEmu::constants::LongBuffs - EQEmu::constants::ShortBuffs +
|
||||||
|
constants::LongBuffs + constants::ShortBuffs;
|
||||||
|
// we're a song
|
||||||
|
if (index >= EQEmu::constants::LongBuffs)
|
||||||
|
return index - EQEmu::constants::LongBuffs + constants::LongBuffs;
|
||||||
|
// we're a normal buff
|
||||||
|
return index; // as long as we guard against bad slots server side, we should be fine
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int SoDToServerBuffSlot(int index)
|
||||||
|
{
|
||||||
|
// we're a disc
|
||||||
|
if (index >= constants::LongBuffs + constants::ShortBuffs)
|
||||||
|
return index - constants::LongBuffs - constants::ShortBuffs + EQEmu::constants::LongBuffs +
|
||||||
|
EQEmu::constants::ShortBuffs;
|
||||||
|
// we're a song
|
||||||
|
if (index >= constants::LongBuffs)
|
||||||
|
return index - constants::LongBuffs + EQEmu::constants::LongBuffs;
|
||||||
|
// we're a normal buff
|
||||||
|
return index; // as long as we guard against bad slots server side, we should be fine
|
||||||
|
}
|
||||||
} /*SoD*/
|
} /*SoD*/
|
||||||
|
|||||||
@@ -50,6 +50,22 @@ namespace SoD
|
|||||||
#include "sod_ops.h"
|
#include "sod_ops.h"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class CastingSlot : uint32 {
|
||||||
|
Gem1 = 0,
|
||||||
|
Gem2 = 1,
|
||||||
|
Gem3 = 2,
|
||||||
|
Gem4 = 3,
|
||||||
|
Gem5 = 4,
|
||||||
|
Gem6 = 5,
|
||||||
|
Gem7 = 6,
|
||||||
|
Gem8 = 7,
|
||||||
|
Gem9 = 8,
|
||||||
|
Gem10 = 9,
|
||||||
|
Item = 10,
|
||||||
|
Discipline = 11,
|
||||||
|
AltAbility = 0xFF
|
||||||
|
};
|
||||||
|
|
||||||
}; /*SoD*/
|
}; /*SoD*/
|
||||||
|
|
||||||
#endif /*COMMON_SOD_H*/
|
#endif /*COMMON_SOD_H*/
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#include "../string_util.h"
|
#include "../string_util.h"
|
||||||
|
|
||||||
|
|
||||||
size_t SoD::invtype::InvTypeSize(int inv_type)
|
size_t SoD::invtype::GetInvTypeSize(int inv_type)
|
||||||
{
|
{
|
||||||
switch (inv_type) {
|
switch (inv_type) {
|
||||||
case invtype::InvTypePossessions:
|
case invtype::InvTypePossessions:
|
||||||
@@ -68,7 +68,7 @@ size_t SoD::invtype::InvTypeSize(int inv_type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* SoD::invtype::InvTypeName(int inv_type)
|
const char* SoD::invtype::GetInvTypeName(int inv_type)
|
||||||
{
|
{
|
||||||
switch (inv_type) {
|
switch (inv_type) {
|
||||||
case invtype::InvTypeInvalid:
|
case invtype::InvTypeInvalid:
|
||||||
@@ -116,7 +116,24 @@ const char* SoD::invtype::InvTypeName(int inv_type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* SoD::invslot::InvPossessionsSlotName(int inv_slot)
|
bool SoD::invtype::IsInvTypePersistent(int inv_type)
|
||||||
|
{
|
||||||
|
switch (inv_type) {
|
||||||
|
case invtype::InvTypePossessions:
|
||||||
|
case invtype::InvTypeBank:
|
||||||
|
case invtype::InvTypeSharedBank:
|
||||||
|
case invtype::InvTypeTrade:
|
||||||
|
case invtype::InvTypeWorld:
|
||||||
|
case invtype::InvTypeLimbo:
|
||||||
|
case invtype::InvTypeTribute:
|
||||||
|
case invtype::InvTypeGuildTribute:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* SoD::invslot::GetInvPossessionsSlotName(int inv_slot)
|
||||||
{
|
{
|
||||||
switch (inv_slot) {
|
switch (inv_slot) {
|
||||||
case invslot::InvSlotInvalid:
|
case invslot::InvSlotInvalid:
|
||||||
@@ -190,9 +207,9 @@ const char* SoD::invslot::InvPossessionsSlotName(int inv_slot)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* SoD::invslot::InvCorpseSlotName(int inv_slot)
|
const char* SoD::invslot::GetInvCorpseSlotName(int inv_slot)
|
||||||
{
|
{
|
||||||
if (!invtype::InvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid)
|
if (!invtype::GetInvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid)
|
||||||
return "Invalid Slot";
|
return "Invalid Slot";
|
||||||
|
|
||||||
// needs work
|
// needs work
|
||||||
@@ -205,14 +222,14 @@ const char* SoD::invslot::InvCorpseSlotName(int inv_slot)
|
|||||||
return ret_str.c_str();
|
return ret_str.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* SoD::invslot::InvSlotName(int inv_type, int inv_slot)
|
const char* SoD::invslot::GetInvSlotName(int inv_type, int inv_slot)
|
||||||
{
|
{
|
||||||
if (inv_type == invtype::InvTypePossessions)
|
if (inv_type == invtype::InvTypePossessions)
|
||||||
return invslot::InvPossessionsSlotName(inv_slot);
|
return invslot::GetInvPossessionsSlotName(inv_slot);
|
||||||
else if (inv_type == invtype::InvTypeCorpse)
|
else if (inv_type == invtype::InvTypeCorpse)
|
||||||
return invslot::InvCorpseSlotName(inv_slot);
|
return invslot::GetInvCorpseSlotName(inv_slot);
|
||||||
|
|
||||||
size_t type_size = invtype::InvTypeSize(inv_type);
|
size_t type_size = invtype::GetInvTypeSize(inv_type);
|
||||||
|
|
||||||
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
||||||
return "Invalid Slot";
|
return "Invalid Slot";
|
||||||
@@ -226,7 +243,7 @@ const char* SoD::invslot::InvSlotName(int inv_type, int inv_slot)
|
|||||||
return ret_str.c_str();
|
return ret_str.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* SoD::invbag::InvBagIndexName(int bag_index)
|
const char* SoD::invbag::GetInvBagIndexName(int bag_index)
|
||||||
{
|
{
|
||||||
if (bag_index == invbag::InvBagInvalid)
|
if (bag_index == invbag::InvBagInvalid)
|
||||||
return "Invalid Bag";
|
return "Invalid Bag";
|
||||||
@@ -240,7 +257,7 @@ const char* SoD::invbag::InvBagIndexName(int bag_index)
|
|||||||
return ret_str.c_str();
|
return ret_str.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* SoD::invaug::InvAugIndexName(int aug_index)
|
const char* SoD::invaug::GetInvAugIndexName(int aug_index)
|
||||||
{
|
{
|
||||||
if (aug_index == invaug::InvAugInvalid)
|
if (aug_index == invaug::InvAugInvalid)
|
||||||
return "Invalid Augment";
|
return "Invalid Augment";
|
||||||
|
|||||||
+47
-27
@@ -21,7 +21,7 @@
|
|||||||
#define COMMON_SOD_LIMITS_H
|
#define COMMON_SOD_LIMITS_H
|
||||||
|
|
||||||
#include "../types.h"
|
#include "../types.h"
|
||||||
#include "../client_version.h"
|
#include "../emu_versions.h"
|
||||||
#include "../skills.h"
|
#include "../skills.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -32,8 +32,13 @@ namespace SoD
|
|||||||
enum : bool { False = false, True = true };
|
enum : bool { False = false, True = true };
|
||||||
|
|
||||||
// pre-declarations
|
// pre-declarations
|
||||||
|
namespace inventory {
|
||||||
|
inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||||
|
|
||||||
|
} /*inventory*/
|
||||||
|
|
||||||
namespace invtype {
|
namespace invtype {
|
||||||
inline EQEmu::versions::ClientVersion InvTypeRef() { return EQEmu::versions::ClientVersion::SoD; }
|
inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||||
|
|
||||||
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
||||||
|
|
||||||
@@ -63,7 +68,7 @@ namespace SoD
|
|||||||
} /*invtype*/
|
} /*invtype*/
|
||||||
|
|
||||||
namespace invslot {
|
namespace invslot {
|
||||||
inline EQEmu::versions::ClientVersion InvSlotRef() { return EQEmu::versions::ClientVersion::SoD; }
|
inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||||
|
|
||||||
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
||||||
|
|
||||||
@@ -114,21 +119,21 @@ namespace SoD
|
|||||||
} /*invslot*/
|
} /*invslot*/
|
||||||
|
|
||||||
namespace invbag {
|
namespace invbag {
|
||||||
inline EQEmu::versions::ClientVersion InvBagRef() { return EQEmu::versions::ClientVersion::SoD; }
|
inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||||
|
|
||||||
enum : int { InvBagInvalid = -1, InvBagBegin };
|
enum : int { InvBagInvalid = -1, InvBagBegin };
|
||||||
|
|
||||||
} /*invbag*/
|
} /*invbag*/
|
||||||
|
|
||||||
namespace invaug {
|
namespace invaug {
|
||||||
inline EQEmu::versions::ClientVersion InvAugRef() { return EQEmu::versions::ClientVersion::SoD; }
|
inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||||
|
|
||||||
enum : int { InvAugInvalid = -1, InvAugBegin };
|
enum : int { InvAugInvalid = -1, InvAugBegin };
|
||||||
|
|
||||||
} /*invaug*/
|
} /*invaug*/
|
||||||
|
|
||||||
namespace item {
|
namespace item {
|
||||||
inline EQEmu::versions::ClientVersion ItemRef() { return EQEmu::versions::ClientVersion::SoD; }
|
inline EQEmu::versions::ClientVersion GetItemRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||||
|
|
||||||
enum ItemPacketType : int {
|
enum ItemPacketType : int {
|
||||||
ItemPacketMerchant = 100,
|
ItemPacketMerchant = 100,
|
||||||
@@ -146,27 +151,37 @@ namespace SoD
|
|||||||
} /*item*/
|
} /*item*/
|
||||||
|
|
||||||
namespace profile {
|
namespace profile {
|
||||||
inline EQEmu::versions::ClientVersion ProfileRef() { return EQEmu::versions::ClientVersion::SoD; }
|
inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||||
|
|
||||||
} /*profile*/
|
} /*profile*/
|
||||||
|
|
||||||
namespace constants {
|
namespace constants {
|
||||||
inline EQEmu::versions::ClientVersion ConstantsRef() { return EQEmu::versions::ClientVersion::SoD; }
|
inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||||
|
|
||||||
} /*constants*/
|
} /*constants*/
|
||||||
|
|
||||||
namespace behavior {
|
namespace behavior {
|
||||||
inline EQEmu::versions::ClientVersion BehaviorRef() { return EQEmu::versions::ClientVersion::SoD; }
|
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||||
|
|
||||||
} /*behavior*/
|
} /*behavior*/
|
||||||
|
|
||||||
namespace skills {
|
namespace skills {
|
||||||
inline EQEmu::versions::ClientVersion SkillsRef() { return EQEmu::versions::ClientVersion::SoD; }
|
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||||
|
|
||||||
} /*skills*/
|
} /*skills*/
|
||||||
|
|
||||||
|
|
||||||
// declarations
|
// declarations
|
||||||
|
namespace inventory {
|
||||||
|
const bool ConcatenateInvTypeLimbo = true;
|
||||||
|
|
||||||
|
const bool AllowOverLevelEquipment = false;
|
||||||
|
|
||||||
|
const bool AllowEmptyBagInBag = false;
|
||||||
|
const bool AllowClickCastFromBag = false;
|
||||||
|
|
||||||
|
} /*inventory*/
|
||||||
|
|
||||||
namespace invtype {
|
namespace invtype {
|
||||||
const size_t InvTypePossessionsSize = invslot::PossessionsCount;
|
const size_t InvTypePossessionsSize = invslot::PossessionsCount;
|
||||||
const size_t InvTypeBankSize = 24;
|
const size_t InvTypeBankSize = 24;
|
||||||
@@ -175,7 +190,7 @@ namespace SoD
|
|||||||
const size_t InvTypeWorldSize = 10;
|
const size_t InvTypeWorldSize = 10;
|
||||||
const size_t InvTypeLimboSize = 36;
|
const size_t InvTypeLimboSize = 36;
|
||||||
const size_t InvTypeTributeSize = 5;
|
const size_t InvTypeTributeSize = 5;
|
||||||
const size_t InvTypeGuildTributeSize = 0;//unknown
|
const size_t InvTypeGuildTributeSize = 2;
|
||||||
const size_t InvTypeMerchantSize = 80;
|
const size_t InvTypeMerchantSize = 80;
|
||||||
const size_t InvTypeCorpseSize = InvTypePossessionsSize;
|
const size_t InvTypeCorpseSize = InvTypePossessionsSize;
|
||||||
const size_t InvTypeBazaarSize = 80;
|
const size_t InvTypeBazaarSize = 80;
|
||||||
@@ -188,10 +203,10 @@ namespace SoD
|
|||||||
const size_t InvTypeArchivedSize = 0;//unknown
|
const size_t InvTypeArchivedSize = 0;//unknown
|
||||||
const size_t InvTypeOtherSize = 0;//unknown
|
const size_t InvTypeOtherSize = 0;//unknown
|
||||||
|
|
||||||
const size_t NPCTradeSize = 4;
|
extern size_t GetInvTypeSize(int inv_type);
|
||||||
|
extern const char* GetInvTypeName(int inv_type);
|
||||||
|
|
||||||
extern size_t InvTypeSize(int inv_type);
|
extern bool IsInvTypePersistent(int inv_type);
|
||||||
extern const char* InvTypeName(int inv_type);
|
|
||||||
|
|
||||||
} /*invtype*/
|
} /*invtype*/
|
||||||
|
|
||||||
@@ -210,14 +225,17 @@ namespace SoD
|
|||||||
const int WorldEnd = (WorldBegin + invtype::InvTypeWorldSize) - 1;
|
const int WorldEnd = (WorldBegin + invtype::InvTypeWorldSize) - 1;
|
||||||
|
|
||||||
const int TributeBegin = 400;
|
const int TributeBegin = 400;
|
||||||
const int TributeEnd = 404;
|
const int TributeEnd = (TributeBegin + invtype::InvTypeTributeSize) - 1;
|
||||||
|
|
||||||
|
const int GuildTributeBegin = 450;
|
||||||
|
const int GuildTributeEnd = (GuildTributeBegin + invtype::InvTypeGuildTributeSize) - 1;
|
||||||
|
|
||||||
const int CorpseBegin = invslot::PossessionsGeneral1;
|
const int CorpseBegin = invslot::PossessionsGeneral1;
|
||||||
const int CorpseEnd = invslot::PossessionsGeneral1 + invslot::PossessionsCursor;
|
const int CorpseEnd = invslot::PossessionsGeneral1 + invslot::PossessionsCursor;
|
||||||
|
|
||||||
extern const char* InvPossessionsSlotName(int inv_slot);
|
extern const char* GetInvPossessionsSlotName(int inv_slot);
|
||||||
extern const char* InvCorpseSlotName(int inv_slot);
|
extern const char* GetInvCorpseSlotName(int inv_slot);
|
||||||
extern const char* InvSlotName(int inv_type, int inv_slot);
|
extern const char* GetInvSlotName(int inv_type, int inv_slot);
|
||||||
|
|
||||||
} /*invslot*/
|
} /*invslot*/
|
||||||
|
|
||||||
@@ -244,14 +262,14 @@ namespace SoD
|
|||||||
const int TradeBagsSize = invtype::InvTypeTradeSize * ItemBagSize;
|
const int TradeBagsSize = invtype::InvTypeTradeSize * ItemBagSize;
|
||||||
const int TradeBagsEnd = (TradeBagsBegin + TradeBagsSize) - 1;
|
const int TradeBagsEnd = (TradeBagsBegin + TradeBagsSize) - 1;
|
||||||
|
|
||||||
extern const char* InvBagIndexName(int bag_index);
|
extern const char* GetInvBagIndexName(int bag_index);
|
||||||
|
|
||||||
} /*invbag*/
|
} /*invbag*/
|
||||||
|
|
||||||
namespace invaug {
|
namespace invaug {
|
||||||
const size_t ItemAugSize = 5;
|
const size_t ItemAugSize = 5;
|
||||||
|
|
||||||
extern const char* InvAugIndexName(int aug_index);
|
extern const char* GetInvAugIndexName(int aug_index);
|
||||||
|
|
||||||
} /*invaug*/
|
} /*invaug*/
|
||||||
|
|
||||||
@@ -261,6 +279,7 @@ namespace SoD
|
|||||||
|
|
||||||
namespace profile {
|
namespace profile {
|
||||||
const size_t TributeSize = invtype::InvTypeTributeSize;
|
const size_t TributeSize = invtype::InvTypeTributeSize;
|
||||||
|
const size_t GuildTributeSize = invtype::InvTypeGuildTributeSize;
|
||||||
|
|
||||||
const size_t BandoliersSize = 20; // number of bandolier instances
|
const size_t BandoliersSize = 20; // number of bandolier instances
|
||||||
const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance
|
const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance
|
||||||
@@ -276,16 +295,17 @@ namespace SoD
|
|||||||
|
|
||||||
const size_t SayLinkBodySize = 50;
|
const size_t SayLinkBodySize = 50;
|
||||||
|
|
||||||
|
const int LongBuffs = 25;
|
||||||
|
const int ShortBuffs = 15;
|
||||||
|
const int DiscBuffs = 1;
|
||||||
|
const int TotalBuffs = LongBuffs + ShortBuffs + DiscBuffs;
|
||||||
|
const int NPCBuffs = 85;
|
||||||
|
const int PetBuffs = NPCBuffs;
|
||||||
|
const int MercBuffs = LongBuffs;
|
||||||
|
|
||||||
} /*constants*/
|
} /*constants*/
|
||||||
|
|
||||||
namespace behavior {
|
namespace behavior {
|
||||||
const bool ConcatenateInvTypeLimbo = true;
|
|
||||||
|
|
||||||
const bool AllowOverLevelEquipment = false;
|
|
||||||
|
|
||||||
const bool AllowEmptyBagInBag = false;
|
|
||||||
const bool AllowClickCastFromBag = false;
|
|
||||||
|
|
||||||
const bool CoinHasWeight = false;
|
const bool CoinHasWeight = false;
|
||||||
|
|
||||||
} /*behavior*/
|
} /*behavior*/
|
||||||
|
|||||||
+71
-117
@@ -122,7 +122,7 @@ struct AdventureInfo {
|
|||||||
** Merth: Gave struct a name so gcc 2.96 would compile
|
** Merth: Gave struct a name so gcc 2.96 would compile
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
struct Color_Struct
|
struct Tint_Struct
|
||||||
{
|
{
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
@@ -130,19 +130,62 @@ struct Color_Struct
|
|||||||
uint8 Green;
|
uint8 Green;
|
||||||
uint8 Red;
|
uint8 Red;
|
||||||
uint8 UseTint; // if there's a tint this is FF
|
uint8 UseTint; // if there's a tint this is FF
|
||||||
} RGB;
|
};
|
||||||
uint32 Color;
|
uint32 Color;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CharSelectEquip
|
struct TintProfile
|
||||||
|
{
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
Tint_Struct Head;
|
||||||
|
Tint_Struct Chest;
|
||||||
|
Tint_Struct Arms;
|
||||||
|
Tint_Struct Wrist;
|
||||||
|
Tint_Struct Hands;
|
||||||
|
Tint_Struct Legs;
|
||||||
|
Tint_Struct Feet;
|
||||||
|
Tint_Struct Primary;
|
||||||
|
Tint_Struct Secondary;
|
||||||
|
};
|
||||||
|
Tint_Struct Slot[EQEmu::textures::materialCount];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Visible equiptment.
|
||||||
|
* Size: 12 Octets
|
||||||
|
*/
|
||||||
|
struct Texture_Struct
|
||||||
{
|
{
|
||||||
uint32 Material;
|
uint32 Material;
|
||||||
uint32 Unknown1;
|
uint32 Unknown1;
|
||||||
uint32 EliteMaterial;
|
uint32 EliteMaterial;
|
||||||
Color_Struct Color;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct TextureProfile
|
||||||
|
{
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
Texture_Struct Head;
|
||||||
|
Texture_Struct Chest;
|
||||||
|
Texture_Struct Arms;
|
||||||
|
Texture_Struct Wrist;
|
||||||
|
Texture_Struct Hands;
|
||||||
|
Texture_Struct Legs;
|
||||||
|
Texture_Struct Feet;
|
||||||
|
Texture_Struct Primary;
|
||||||
|
Texture_Struct Secondary;
|
||||||
|
};
|
||||||
|
Texture_Struct Slot[EQEmu::textures::materialCount];
|
||||||
|
};
|
||||||
|
|
||||||
|
TextureProfile();
|
||||||
|
};
|
||||||
|
|
||||||
|
struct CharSelectEquip : Texture_Struct, Tint_Struct {};
|
||||||
|
|
||||||
struct CharacterSelectEntry_Struct
|
struct CharacterSelectEntry_Struct
|
||||||
{
|
{
|
||||||
/*0000*/ uint8 Level; //
|
/*0000*/ uint8 Level; //
|
||||||
@@ -152,7 +195,7 @@ struct CharacterSelectEntry_Struct
|
|||||||
/*0000*/ uint8 Beard; //
|
/*0000*/ uint8 Beard; //
|
||||||
/*0001*/ uint8 HairColor; //
|
/*0001*/ uint8 HairColor; //
|
||||||
/*0000*/ uint8 Face; //
|
/*0000*/ uint8 Face; //
|
||||||
/*0000*/ CharSelectEquip Equip[9];
|
/*0000*/ CharSelectEquip Equip[EQEmu::textures::materialCount];
|
||||||
/*0000*/ uint32 PrimaryIDFile; //
|
/*0000*/ uint32 PrimaryIDFile; //
|
||||||
/*0000*/ uint32 SecondaryIDFile; //
|
/*0000*/ uint32 SecondaryIDFile; //
|
||||||
/*0000*/ uint8 Unknown15; // 0xff
|
/*0000*/ uint8 Unknown15; // 0xff
|
||||||
@@ -185,19 +228,6 @@ struct CharacterSelect_Struct
|
|||||||
/*0008*/ CharacterSelectEntry_Struct Entries[0];
|
/*0008*/ CharacterSelectEntry_Struct Entries[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
* Visible equiptment.
|
|
||||||
* Size: 12 Octets
|
|
||||||
*/
|
|
||||||
struct EquipStruct
|
|
||||||
{
|
|
||||||
/*00*/ uint32 Material;
|
|
||||||
/*04*/ uint32 Unknown1;
|
|
||||||
/*08*/ uint32 EliteMaterial;
|
|
||||||
/*12*/
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Generic Spawn Struct
|
** Generic Spawn Struct
|
||||||
** Length: 897 Octets
|
** Length: 897 Octets
|
||||||
@@ -314,40 +344,10 @@ struct Spawn_Struct
|
|||||||
/*0000*/ uint32 unknown18;
|
/*0000*/ uint32 unknown18;
|
||||||
/*0000*/ uint32 unknown19;
|
/*0000*/ uint32 unknown19;
|
||||||
Spawn_Struct_Position Position;
|
Spawn_Struct_Position Position;
|
||||||
/*0000*/ union
|
/*0000*/ TintProfile equipment_tint;
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
/*0000*/ Color_Struct color_helmet; // Color of helmet item
|
|
||||||
/*0000*/ Color_Struct color_chest; // Color of chest item
|
|
||||||
/*0000*/ Color_Struct color_arms; // Color of arms item
|
|
||||||
/*0000*/ Color_Struct color_bracers; // Color of bracers item
|
|
||||||
/*0000*/ Color_Struct color_hands; // Color of hands item
|
|
||||||
/*0000*/ Color_Struct color_legs; // Color of legs item
|
|
||||||
/*0000*/ Color_Struct color_feet; // Color of feet item
|
|
||||||
/*0000*/ Color_Struct color_primary; // Color of primary item
|
|
||||||
/*0000*/ Color_Struct color_secondary; // Color of secondary item
|
|
||||||
} equipment_colors;
|
|
||||||
/*0000*/ Color_Struct colors[9]; // Array elements correspond to struct equipment_colors above
|
|
||||||
};
|
|
||||||
|
|
||||||
// skip these bytes if not a valid player race
|
// skip these bytes if not a valid player race
|
||||||
/*0000*/ union
|
/*0000*/ TextureProfile equipment;
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
/*0000*/ EquipStruct equip_helmet; // Equiptment: Helmet visual
|
|
||||||
/*0000*/ EquipStruct equip_chest; // Equiptment: Chest visual
|
|
||||||
/*0000*/ EquipStruct equip_arms; // Equiptment: Arms visual
|
|
||||||
/*0000*/ EquipStruct equip_bracers; // Equiptment: Wrist visual
|
|
||||||
/*0000*/ EquipStruct equip_hands; // Equiptment: Hands visual
|
|
||||||
/*0000*/ EquipStruct equip_legs; // Equiptment: Legs visual
|
|
||||||
/*0000*/ EquipStruct equip_feet; // Equiptment: Boots visual
|
|
||||||
/*0000*/ EquipStruct equip_primary; // Equiptment: Main visual
|
|
||||||
/*0000*/ EquipStruct equip_secondary; // Equiptment: Off visual
|
|
||||||
} equip;
|
|
||||||
/*0000*/ EquipStruct equipment[9];
|
|
||||||
};
|
|
||||||
|
|
||||||
/*0000*/ //char title[0]; // only read if(hasTitleOrSuffix & 4)
|
/*0000*/ //char title[0]; // only read if(hasTitleOrSuffix & 4)
|
||||||
/*0000*/ //char suffix[0]; // only read if(hasTitleOrSuffix & 8)
|
/*0000*/ //char suffix[0]; // only read if(hasTitleOrSuffix & 8)
|
||||||
@@ -479,7 +479,7 @@ struct MemorizeSpell_Struct {
|
|||||||
uint32 slot; // Spot in the spell book/memorized slot
|
uint32 slot; // Spot in the spell book/memorized slot
|
||||||
uint32 spell_id; // Spell id (200 or c8 is minor healing, etc)
|
uint32 spell_id; // Spell id (200 or c8 is minor healing, etc)
|
||||||
uint32 scribing; // 1 if memorizing a spell, set to 0 if scribing to book, 2 if un-memming
|
uint32 scribing; // 1 if memorizing a spell, set to 0 if scribing to book, 2 if un-memming
|
||||||
//uint32 unknown12;
|
uint32 reduction; // lowers reuse
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -512,11 +512,12 @@ struct DeleteSpell_Struct
|
|||||||
|
|
||||||
struct ManaChange_Struct
|
struct ManaChange_Struct
|
||||||
{
|
{
|
||||||
uint32 new_mana; // New Mana AMount
|
/*00*/ uint32 new_mana; // New Mana AMount
|
||||||
uint32 stamina;
|
/*04*/ uint32 stamina;
|
||||||
uint32 spell_id;
|
/*08*/ uint32 spell_id;
|
||||||
uint32 unknown12;
|
/*12*/ uint8 keepcasting; // won't stop the cast. Change mana while casting?
|
||||||
uint32 unknown16;
|
/*13*/ uint8 padding[3]; // client doesn't read it, garbage data seems like
|
||||||
|
/*16*/ int32 slot; // -1 for normal usage slot for when we want silent interrupt? I think it does timer stuff or something. Linked Spell Reuse interrupt uses it
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SwapSpell_Struct
|
struct SwapSpell_Struct
|
||||||
@@ -563,32 +564,22 @@ struct SpawnAppearance_Struct
|
|||||||
// this is used inside profile
|
// this is used inside profile
|
||||||
struct SpellBuff_Struct
|
struct SpellBuff_Struct
|
||||||
{
|
{
|
||||||
/*000*/ uint8 slotid; //badly named... seems to be 2 for a real buff, 0 otherwise
|
/*000*/ uint8 effect_type; // 0 = no buff, 2 = buff, 4 = inverse affects of buff
|
||||||
/*001*/ uint8 level;
|
/*001*/ uint8 level; // Seen 1 for no buff
|
||||||
/*002*/ uint8 bard_modifier;
|
/*002*/ uint8 bard_modifier;
|
||||||
/*003*/ uint8 effect; //not real
|
/*003*/ uint8 unknown003; // MQ2 used to call this "damage shield" -- don't see client referencing it, so maybe server side DS type tracking?
|
||||||
/*004*/ uint32 spellid;
|
/*004*/ uint32 spellid;
|
||||||
/*008*/ int32 duration;
|
/*008*/ uint32 duration;
|
||||||
/*012*/ uint32 counters;
|
/*012*/ uint32 counters;
|
||||||
/*016*/ uint32 unknown004; //Might need to be swapped with player_id
|
/*016*/ uint32 unknown016;
|
||||||
/*020*/ uint32 player_id; //'global' ID of the caster, for wearoff messages
|
/*020*/ uint32 player_id; // caster ID, pretty sure just zone ID
|
||||||
/*024*/
|
/*024*/
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct SpellBuffFade_Struct {
|
struct SpellBuffPacket_Struct {
|
||||||
/*000*/ uint32 entityid;
|
/*000*/ uint32 entityid;
|
||||||
/*004*/ uint8 slot;
|
/*004*/ SpellBuff_Struct buff;
|
||||||
/*005*/ uint8 level;
|
|
||||||
/*006*/ uint8 effect;
|
|
||||||
/*007*/ uint8 unknown7;
|
|
||||||
/*008*/ uint32 spellid;
|
|
||||||
/*012*/ int32 duration;
|
|
||||||
/*016*/ uint32 unknown016;
|
|
||||||
/*020*/ uint32 unknown020; //prolly global player ID
|
|
||||||
/*024*/ uint32 playerId; // Player id who cast the buff
|
|
||||||
/*028*/ uint32 slotid;
|
/*028*/ uint32 slotid;
|
||||||
/*032*/ uint32 bufffade;
|
/*032*/ uint32 bufffade;
|
||||||
/*036*/
|
/*036*/
|
||||||
@@ -903,24 +894,9 @@ struct PlayerProfile_Struct
|
|||||||
/*00216*/ uint8 hairstyle; // Player hair style
|
/*00216*/ uint8 hairstyle; // Player hair style
|
||||||
/*00217*/ uint8 beard; // Player beard type
|
/*00217*/ uint8 beard; // Player beard type
|
||||||
/*00218*/ uint8 unknown00178[14]; //[10]14 on Live? was 10
|
/*00218*/ uint8 unknown00178[14]; //[10]14 on Live? was 10
|
||||||
/*00232*/ union
|
/*00232*/ TextureProfile equipment;
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
/*00228*/ EquipStruct equip_helmet; // Equiptment: Helmet visual
|
|
||||||
/*00240*/ EquipStruct equip_chest; // Equiptment: Chest visual
|
|
||||||
/*00252*/ EquipStruct equip_arms; // Equiptment: Arms visual
|
|
||||||
/*00264*/ EquipStruct equip_bracers; // Equiptment: Wrist visual
|
|
||||||
/*00276*/ EquipStruct equip_hands; // Equiptment: Hands visual
|
|
||||||
/*00288*/ EquipStruct equip_legs; // Equiptment: Legs visual
|
|
||||||
/*00300*/ EquipStruct equip_feet; // Equiptment: Boots visual
|
|
||||||
/*00312*/ EquipStruct equip_primary; // Equiptment: Main visual
|
|
||||||
/*00324*/ EquipStruct equip_secondary; // Equiptment: Off visual
|
|
||||||
} equip;
|
|
||||||
/*00228*/ EquipStruct equipment[9]; //Live Shows [108] for this part
|
|
||||||
};
|
|
||||||
/*00340*/ uint8 unknown00224[156]; // Live Shows [160]
|
/*00340*/ uint8 unknown00224[156]; // Live Shows [160]
|
||||||
/*00496*/ Color_Struct item_tint[9]; // RR GG BB 00
|
/*00496*/ TintProfile item_tint; // RR GG BB 00
|
||||||
/*00532*/ AA_Array aa_array[MAX_PP_AA_ARRAY]; // [3600] AAs 12 bytes each
|
/*00532*/ AA_Array aa_array[MAX_PP_AA_ARRAY]; // [3600] AAs 12 bytes each
|
||||||
/*04132*/ uint32 points; // Unspent Practice points - RELOCATED???
|
/*04132*/ uint32 points; // Unspent Practice points - RELOCATED???
|
||||||
/*04136*/ uint32 mana; // Current mana
|
/*04136*/ uint32 mana; // Current mana
|
||||||
@@ -1177,7 +1153,7 @@ struct WearChange_Struct{
|
|||||||
/*002*/ uint32 material;
|
/*002*/ uint32 material;
|
||||||
/*006*/ uint32 unknown06;
|
/*006*/ uint32 unknown06;
|
||||||
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
|
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
|
||||||
/*014*/ Color_Struct color;
|
/*014*/ Tint_Struct color;
|
||||||
/*018*/ uint8 wear_slot_id;
|
/*018*/ uint8 wear_slot_id;
|
||||||
/*019*/
|
/*019*/
|
||||||
};
|
};
|
||||||
@@ -1690,7 +1666,7 @@ struct LootingItem_Struct {
|
|||||||
/*000*/ uint32 lootee;
|
/*000*/ uint32 lootee;
|
||||||
/*004*/ uint32 looter;
|
/*004*/ uint32 looter;
|
||||||
/*008*/ uint32 slot_id;
|
/*008*/ uint32 slot_id;
|
||||||
/*012*/ uint32 auto_loot;
|
/*012*/ int32 auto_loot;
|
||||||
/*016*/ uint32 unknown16;
|
/*016*/ uint32 unknown16;
|
||||||
/*020*/
|
/*020*/
|
||||||
};
|
};
|
||||||
@@ -1904,8 +1880,7 @@ struct Merchant_Sell_Struct {
|
|||||||
/*004*/ uint32 playerid; // Player's entity id
|
/*004*/ uint32 playerid; // Player's entity id
|
||||||
/*008*/ uint32 itemslot;
|
/*008*/ uint32 itemslot;
|
||||||
/*012*/ uint32 unknown12;
|
/*012*/ uint32 unknown12;
|
||||||
/*016*/ uint8 quantity; // Already sold
|
/*016*/ uint32 quantity;
|
||||||
/*017*/ uint8 Unknown017[3];
|
|
||||||
/*020*/ uint32 Unknown020;
|
/*020*/ uint32 Unknown020;
|
||||||
/*024*/ uint32 price;
|
/*024*/ uint32 price;
|
||||||
/*028*/ uint32 pricehighorderbits; // It appears the price is 64 bits in SoD+
|
/*028*/ uint32 pricehighorderbits; // It appears the price is 64 bits in SoD+
|
||||||
@@ -1995,7 +1970,7 @@ struct AdventureLeaderboard_Struct
|
|||||||
/*struct Item_Shop_Struct {
|
/*struct Item_Shop_Struct {
|
||||||
uint16 merchantid;
|
uint16 merchantid;
|
||||||
uint8 itemtype;
|
uint8 itemtype;
|
||||||
Item_Struct item;
|
ItemData item;
|
||||||
uint8 iss_unknown001[6];
|
uint8 iss_unknown001[6];
|
||||||
};*/
|
};*/
|
||||||
|
|
||||||
@@ -3091,27 +3066,6 @@ struct PetitionBug_Struct{
|
|||||||
char text[1028];
|
char text[1028];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DyeStruct
|
|
||||||
{
|
|
||||||
union
|
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
struct Color_Struct head;
|
|
||||||
struct Color_Struct chest;
|
|
||||||
struct Color_Struct arms;
|
|
||||||
struct Color_Struct wrists;
|
|
||||||
struct Color_Struct hands;
|
|
||||||
struct Color_Struct legs;
|
|
||||||
struct Color_Struct feet;
|
|
||||||
struct Color_Struct primary; // you can't actually dye this
|
|
||||||
struct Color_Struct secondary; // or this
|
|
||||||
}
|
|
||||||
dyes;
|
|
||||||
struct Color_Struct dye[9];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ApproveZone_Struct {
|
struct ApproveZone_Struct {
|
||||||
char name[64];
|
char name[64];
|
||||||
uint32 zoneid;
|
uint32 zoneid;
|
||||||
|
|||||||
+190
-52
@@ -29,7 +29,7 @@
|
|||||||
#include "../eq_packet_structs.h"
|
#include "../eq_packet_structs.h"
|
||||||
#include "../misc_functions.h"
|
#include "../misc_functions.h"
|
||||||
#include "../string_util.h"
|
#include "../string_util.h"
|
||||||
#include "../item.h"
|
#include "../item_instance.h"
|
||||||
#include "sof_structs.h"
|
#include "sof_structs.h"
|
||||||
#include "../rulesys.h"
|
#include "../rulesys.h"
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ namespace SoF
|
|||||||
static OpcodeManager *opcodes = nullptr;
|
static OpcodeManager *opcodes = nullptr;
|
||||||
static Strategy struct_strategy;
|
static Strategy struct_strategy;
|
||||||
|
|
||||||
void SerializeItem(EQEmu::OutBuffer& ob, const ItemInst *inst, int16 slot_id, uint8 depth);
|
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id, uint8 depth);
|
||||||
|
|
||||||
// server to client inventory location converters
|
// server to client inventory location converters
|
||||||
static inline uint32 ServerToSoFSlot(uint32 serverSlot);
|
static inline uint32 ServerToSoFSlot(uint32 serverSlot);
|
||||||
@@ -59,6 +59,12 @@ namespace SoF
|
|||||||
// client to server text link converter
|
// client to server text link converter
|
||||||
static inline void SoFToServerTextLink(std::string& serverTextLink, const std::string& sofTextLink);
|
static inline void SoFToServerTextLink(std::string& serverTextLink, const std::string& sofTextLink);
|
||||||
|
|
||||||
|
static inline CastingSlot ServerToSoFCastingSlot(EQEmu::CastingSlot slot);
|
||||||
|
static inline EQEmu::CastingSlot SoFToServerCastingSlot(CastingSlot slot, uint32 itemlocation);
|
||||||
|
|
||||||
|
static inline int ServerToSoFBuffSlot(int index);
|
||||||
|
static inline int SoFToServerBuffSlot(int index);
|
||||||
|
|
||||||
void Register(EQStreamIdentifier &into)
|
void Register(EQStreamIdentifier &into)
|
||||||
{
|
{
|
||||||
//create our opcode manager if we havent already
|
//create our opcode manager if we havent already
|
||||||
@@ -283,17 +289,18 @@ namespace SoF
|
|||||||
|
|
||||||
ENCODE(OP_Buff)
|
ENCODE(OP_Buff)
|
||||||
{
|
{
|
||||||
ENCODE_LENGTH_EXACT(SpellBuffFade_Struct);
|
ENCODE_LENGTH_EXACT(SpellBuffPacket_Struct);
|
||||||
SETUP_DIRECT_ENCODE(SpellBuffFade_Struct, structs::SpellBuffFade_Struct);
|
SETUP_DIRECT_ENCODE(SpellBuffPacket_Struct, structs::SpellBuffPacket_Struct);
|
||||||
|
|
||||||
OUT(entityid);
|
OUT(entityid);
|
||||||
OUT(slot);
|
OUT(buff.effect_type);
|
||||||
OUT(level);
|
OUT(buff.level);
|
||||||
OUT(effect);
|
OUT(buff.bard_modifier);
|
||||||
//eq->unknown7 = 10;
|
OUT(buff.spellid);
|
||||||
OUT(spellid);
|
OUT(buff.duration);
|
||||||
OUT(duration);
|
OUT(buff.counters);
|
||||||
OUT(slotid);
|
OUT(buff.player_id);
|
||||||
|
eq->slotid = ServerToSoFBuffSlot(emu->slotid);
|
||||||
OUT(bufffade);
|
OUT(bufffade);
|
||||||
|
|
||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
@@ -374,7 +381,7 @@ namespace SoF
|
|||||||
ob.write((const char*)&item_count, sizeof(uint32));
|
ob.write((const char*)&item_count, sizeof(uint32));
|
||||||
|
|
||||||
for (int index = 0; index < item_count; ++index, ++eq) {
|
for (int index = 0; index < item_count; ++index, ++eq) {
|
||||||
SerializeItem(ob, (const ItemInst*)eq->inst, eq->slot_id, 0);
|
SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0);
|
||||||
if (ob.tellp() == last_pos)
|
if (ob.tellp() == last_pos)
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id);
|
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id);
|
||||||
|
|
||||||
@@ -853,7 +860,7 @@ namespace SoF
|
|||||||
|
|
||||||
ob.write((const char*)__emu_buffer, 4);
|
ob.write((const char*)__emu_buffer, 4);
|
||||||
|
|
||||||
SerializeItem(ob, (const ItemInst*)int_struct->inst, int_struct->slot_id, 0);
|
SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0);
|
||||||
if (ob.tellp() == last_pos) {
|
if (ob.tellp() == last_pos) {
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d.", int_struct->slot_id);
|
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d.", int_struct->slot_id);
|
||||||
delete in;
|
delete in;
|
||||||
@@ -932,7 +939,24 @@ namespace SoF
|
|||||||
OUT(new_mana);
|
OUT(new_mana);
|
||||||
OUT(stamina);
|
OUT(stamina);
|
||||||
OUT(spell_id);
|
OUT(spell_id);
|
||||||
eq->unknown16 = -1; // Self Interrupt/Success = -1, Fizzle = 1, Other Interrupt = 2?
|
OUT(keepcasting);
|
||||||
|
eq->slot = -1; // this is spell gem slot. It's -1 in normal operation
|
||||||
|
|
||||||
|
FINISH_ENCODE();
|
||||||
|
}
|
||||||
|
|
||||||
|
ENCODE(OP_MemorizeSpell)
|
||||||
|
{
|
||||||
|
ENCODE_LENGTH_EXACT(MemorizeSpell_Struct);
|
||||||
|
SETUP_DIRECT_ENCODE(MemorizeSpell_Struct, structs::MemorizeSpell_Struct);
|
||||||
|
|
||||||
|
// Since HT/LoH are translated up, we need to translate down only for memSpellSpellbar case
|
||||||
|
if (emu->scribing == 3)
|
||||||
|
eq->slot = static_cast<uint32>(ServerToSoFCastingSlot(static_cast<EQEmu::CastingSlot>(emu->slot)));
|
||||||
|
else
|
||||||
|
OUT(slot);
|
||||||
|
OUT(spell_id);
|
||||||
|
OUT(scribing);
|
||||||
|
|
||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
}
|
}
|
||||||
@@ -1157,9 +1181,9 @@ namespace SoF
|
|||||||
OUT(petid);
|
OUT(petid);
|
||||||
OUT(buffcount);
|
OUT(buffcount);
|
||||||
|
|
||||||
int EQBuffSlot = 0;
|
int EQBuffSlot = 0; // do we really want to shuffle them around like this?
|
||||||
|
|
||||||
for (uint32 EmuBuffSlot = 0; EmuBuffSlot < BUFF_COUNT; ++EmuBuffSlot)
|
for (uint32 EmuBuffSlot = 0; EmuBuffSlot < PET_BUFF_COUNT; ++EmuBuffSlot)
|
||||||
{
|
{
|
||||||
if (emu->spellid[EmuBuffSlot])
|
if (emu->spellid[EmuBuffSlot])
|
||||||
{
|
{
|
||||||
@@ -1209,14 +1233,14 @@ namespace SoF
|
|||||||
OUT(hairstyle);
|
OUT(hairstyle);
|
||||||
OUT(beard);
|
OUT(beard);
|
||||||
// OUT(unknown00178[10]);
|
// OUT(unknown00178[10]);
|
||||||
for (r = 0; r < 9; r++) {
|
for (r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++) {
|
||||||
eq->equipment[r].Material = emu->item_material[r];
|
eq->equipment.Slot[r].Material = emu->item_material.Slot[r].Material;
|
||||||
eq->equipment[r].Unknown1 = 0;
|
eq->equipment.Slot[r].Unknown1 = 0;
|
||||||
eq->equipment[r].EliteMaterial = 0;
|
eq->equipment.Slot[r].EliteMaterial = 0;
|
||||||
//eq->colors[r].color = emu->colors[r].color;
|
//eq->colors[r].color = emu->colors[r].color;
|
||||||
}
|
}
|
||||||
for (r = 0; r < 7; r++) {
|
for (r = 0; r < 7; r++) {
|
||||||
OUT(item_tint[r].Color);
|
OUT(item_tint.Slot[r].Color);
|
||||||
}
|
}
|
||||||
// OUT(unknown00224[48]);
|
// OUT(unknown00224[48]);
|
||||||
//NOTE: new client supports 300 AAs, our internal rep/PP
|
//NOTE: new client supports 300 AAs, our internal rep/PP
|
||||||
@@ -1258,10 +1282,10 @@ namespace SoF
|
|||||||
OUT(thirst_level);
|
OUT(thirst_level);
|
||||||
OUT(hunger_level);
|
OUT(hunger_level);
|
||||||
for (r = 0; r < structs::BUFF_COUNT; r++) {
|
for (r = 0; r < structs::BUFF_COUNT; r++) {
|
||||||
OUT(buffs[r].slotid);
|
OUT(buffs[r].effect_type);
|
||||||
OUT(buffs[r].level);
|
OUT(buffs[r].level);
|
||||||
OUT(buffs[r].bard_modifier);
|
OUT(buffs[r].bard_modifier);
|
||||||
OUT(buffs[r].effect);
|
OUT(buffs[r].unknown003);
|
||||||
OUT(buffs[r].spellid);
|
OUT(buffs[r].spellid);
|
||||||
OUT(buffs[r].duration);
|
OUT(buffs[r].duration);
|
||||||
OUT(buffs[r].counters);
|
OUT(buffs[r].counters);
|
||||||
@@ -1649,11 +1673,11 @@ namespace SoF
|
|||||||
eq_cse->HairColor = emu_cse->HairColor;
|
eq_cse->HairColor = emu_cse->HairColor;
|
||||||
eq_cse->Face = emu_cse->Face;
|
eq_cse->Face = emu_cse->Face;
|
||||||
|
|
||||||
for (int equip_index = 0; equip_index < EQEmu::legacy::MaterialCount; equip_index++) {
|
for (int equip_index = EQEmu::textures::textureBegin; equip_index < EQEmu::textures::materialCount; equip_index++) {
|
||||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteModel;
|
||||||
eq_cse->Equip[equip_index].Color.Color = emu_cse->Equip[equip_index].Color.Color;
|
eq_cse->Equip[equip_index].Color = emu_cse->Equip[equip_index].Color;
|
||||||
}
|
}
|
||||||
|
|
||||||
eq_cse->PrimaryIDFile = emu_cse->PrimaryIDFile;
|
eq_cse->PrimaryIDFile = emu_cse->PrimaryIDFile;
|
||||||
@@ -2080,11 +2104,11 @@ namespace SoF
|
|||||||
eq->deity = emu->deity;
|
eq->deity = emu->deity;
|
||||||
eq->drakkin_heritage = emu->drakkin_heritage;
|
eq->drakkin_heritage = emu->drakkin_heritage;
|
||||||
eq->gender = emu->gender;
|
eq->gender = emu->gender;
|
||||||
for (k = 0; k < 9; k++) {
|
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||||
eq->equipment[k].Material = emu->equipment[k].Material;
|
eq->equipment.Slot[k].Material = emu->equipment.Slot[k].Material;
|
||||||
eq->equipment[k].Unknown1 = emu->equipment[k].Unknown1;
|
eq->equipment.Slot[k].Unknown1 = emu->equipment.Slot[k].Unknown1;
|
||||||
eq->equipment[k].EliteMaterial = emu->equipment[k].EliteMaterial;
|
eq->equipment.Slot[k].EliteMaterial = emu->equipment.Slot[k].EliteModel;
|
||||||
eq->colors[k].Color = emu->colors[k].Color;
|
eq->equipment_tint.Slot[k].Color = emu->equipment_tint.Slot[k].Color;
|
||||||
}
|
}
|
||||||
eq->StandState = emu->StandState;
|
eq->StandState = emu->StandState;
|
||||||
eq->guildID = emu->guildID;
|
eq->guildID = emu->guildID;
|
||||||
@@ -2146,8 +2170,8 @@ namespace SoF
|
|||||||
strcpy(eq->name, emu->name);
|
strcpy(eq->name, emu->name);
|
||||||
eq->petOwnerId = emu->petOwnerId;
|
eq->petOwnerId = emu->petOwnerId;
|
||||||
eq->pvp = 0; // 0 = non-pvp colored name, 1 = red pvp name
|
eq->pvp = 0; // 0 = non-pvp colored name, 1 = red pvp name
|
||||||
for (k = 0; k < 9; k++) {
|
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||||
eq->colors[k].Color = emu->colors[k].Color;
|
eq->equipment_tint.Slot[k].Color = emu->equipment_tint.Slot[k].Color;
|
||||||
}
|
}
|
||||||
eq->anon = emu->anon;
|
eq->anon = emu->anon;
|
||||||
eq->face = emu->face;
|
eq->face = emu->face;
|
||||||
@@ -2343,16 +2367,18 @@ namespace SoF
|
|||||||
|
|
||||||
DECODE(OP_Buff)
|
DECODE(OP_Buff)
|
||||||
{
|
{
|
||||||
DECODE_LENGTH_EXACT(structs::SpellBuffFade_Struct);
|
DECODE_LENGTH_EXACT(structs::SpellBuffPacket_Struct);
|
||||||
SETUP_DIRECT_DECODE(SpellBuffFade_Struct, structs::SpellBuffFade_Struct);
|
SETUP_DIRECT_DECODE(SpellBuffPacket_Struct, structs::SpellBuffPacket_Struct);
|
||||||
|
|
||||||
IN(entityid);
|
IN(entityid);
|
||||||
IN(slot);
|
IN(buff.effect_type);
|
||||||
IN(level);
|
IN(buff.level);
|
||||||
IN(effect);
|
IN(buff.bard_modifier);
|
||||||
IN(spellid);
|
IN(buff.spellid);
|
||||||
IN(duration);
|
IN(buff.duration);
|
||||||
IN(slotid);
|
IN(buff.counters);
|
||||||
|
IN(buff.player_id);
|
||||||
|
emu->slotid = SoFToServerBuffSlot(eq->slotid);
|
||||||
IN(bufffade);
|
IN(bufffade);
|
||||||
|
|
||||||
FINISH_DIRECT_DECODE();
|
FINISH_DIRECT_DECODE();
|
||||||
@@ -2363,7 +2389,7 @@ namespace SoF
|
|||||||
DECODE_LENGTH_EXACT(structs::CastSpell_Struct);
|
DECODE_LENGTH_EXACT(structs::CastSpell_Struct);
|
||||||
SETUP_DIRECT_DECODE(CastSpell_Struct, structs::CastSpell_Struct);
|
SETUP_DIRECT_DECODE(CastSpell_Struct, structs::CastSpell_Struct);
|
||||||
|
|
||||||
IN(slot);
|
emu->slot = static_cast<uint32>(SoFToServerCastingSlot(static_cast<CastingSlot>(eq->slot), eq->inventoryslot));
|
||||||
IN(spell_id);
|
IN(spell_id);
|
||||||
emu->inventoryslot = SoFToServerSlot(eq->inventoryslot);
|
emu->inventoryslot = SoFToServerSlot(eq->inventoryslot);
|
||||||
IN(target_id);
|
IN(target_id);
|
||||||
@@ -2600,6 +2626,21 @@ namespace SoF
|
|||||||
FINISH_DIRECT_DECODE();
|
FINISH_DIRECT_DECODE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DECODE(OP_LoadSpellSet)
|
||||||
|
{
|
||||||
|
DECODE_LENGTH_EXACT(structs::LoadSpellSet_Struct);
|
||||||
|
SETUP_DIRECT_DECODE(LoadSpellSet_Struct, structs::LoadSpellSet_Struct);
|
||||||
|
|
||||||
|
for (int i = 0; i < structs::MAX_PP_MEMSPELL; ++i)
|
||||||
|
IN(spell[i]);
|
||||||
|
for (int i = structs::MAX_PP_MEMSPELL; i < MAX_PP_MEMSPELL; ++i)
|
||||||
|
emu->spell[i] = 0xFFFFFFFF;
|
||||||
|
|
||||||
|
IN(unknown);
|
||||||
|
|
||||||
|
FINISH_DIRECT_DECODE();
|
||||||
|
}
|
||||||
|
|
||||||
DECODE(OP_LootItem)
|
DECODE(OP_LootItem)
|
||||||
{
|
{
|
||||||
DECODE_LENGTH_EXACT(structs::LootingItem_Struct);
|
DECODE_LENGTH_EXACT(structs::LootingItem_Struct);
|
||||||
@@ -2885,9 +2926,9 @@ namespace SoF
|
|||||||
return NextItemInstSerialNumber;
|
return NextItemInstSerialNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SerializeItem(EQEmu::OutBuffer& ob, const ItemInst *inst, int16 slot_id_in, uint8 depth)
|
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth)
|
||||||
{
|
{
|
||||||
const EQEmu::Item_Struct *item = inst->GetUnscaledItem();
|
const EQEmu::ItemData *item = inst->GetUnscaledItem();
|
||||||
|
|
||||||
SoF::structs::ItemSerializationHeader hdr;
|
SoF::structs::ItemSerializationHeader hdr;
|
||||||
|
|
||||||
@@ -3199,18 +3240,18 @@ namespace SoF
|
|||||||
|
|
||||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||||
|
|
||||||
for (uint32 index = SUB_INDEX_BEGIN; index < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++index) {
|
for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) {
|
||||||
ItemInst* sub = inst->GetItem(index);
|
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||||
if (!sub)
|
if (!sub)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
int SubSlotNumber = INVALID_INDEX;
|
int SubSlotNumber = INVALID_INDEX;
|
||||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
||||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + index + 1);
|
SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1);
|
||||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||||
else
|
else
|
||||||
SubSlotNumber = slot_id_in;
|
SubSlotNumber = slot_id_in;
|
||||||
|
|
||||||
@@ -3228,7 +3269,7 @@ namespace SoF
|
|||||||
{
|
{
|
||||||
uint32 SoFSlot = 0;
|
uint32 SoFSlot = 0;
|
||||||
|
|
||||||
if (serverSlot >= EQEmu::legacy::SlotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
if (serverSlot >= EQEmu::inventory::slotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||||
SoFSlot = serverSlot + 1;
|
SoFSlot = serverSlot + 1;
|
||||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END)
|
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END)
|
||||||
SoFSlot = serverSlot + 11;
|
SoFSlot = serverSlot + 11;
|
||||||
@@ -3236,7 +3277,7 @@ namespace SoF
|
|||||||
SoFSlot = serverSlot + 1;
|
SoFSlot = serverSlot + 1;
|
||||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
||||||
SoFSlot = serverSlot + 1;
|
SoFSlot = serverSlot + 1;
|
||||||
else if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
else if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||||
SoFSlot = invslot::PossessionsPowerSource;
|
SoFSlot = invslot::PossessionsPowerSource;
|
||||||
else
|
else
|
||||||
SoFSlot = serverSlot;
|
SoFSlot = serverSlot;
|
||||||
@@ -3263,7 +3304,7 @@ namespace SoF
|
|||||||
else if (sofSlot >= invbag::SharedBankBagsBegin && sofSlot <= invbag::SharedBankBagsEnd)
|
else if (sofSlot >= invbag::SharedBankBagsBegin && sofSlot <= invbag::SharedBankBagsEnd)
|
||||||
ServerSlot = sofSlot - 1;
|
ServerSlot = sofSlot - 1;
|
||||||
else if (sofSlot == invslot::PossessionsPowerSource)
|
else if (sofSlot == invslot::PossessionsPowerSource)
|
||||||
ServerSlot = EQEmu::legacy::SlotPowerSource;
|
ServerSlot = EQEmu::inventory::slotPowerSource;
|
||||||
else
|
else
|
||||||
ServerSlot = sofSlot;
|
ServerSlot = sofSlot;
|
||||||
|
|
||||||
@@ -3352,4 +3393,101 @@ namespace SoF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline CastingSlot ServerToSoFCastingSlot(EQEmu::CastingSlot slot)
|
||||||
|
{
|
||||||
|
switch (slot) {
|
||||||
|
case EQEmu::CastingSlot::Gem1:
|
||||||
|
return CastingSlot::Gem1;
|
||||||
|
case EQEmu::CastingSlot::Gem2:
|
||||||
|
return CastingSlot::Gem2;
|
||||||
|
case EQEmu::CastingSlot::Gem3:
|
||||||
|
return CastingSlot::Gem3;
|
||||||
|
case EQEmu::CastingSlot::Gem4:
|
||||||
|
return CastingSlot::Gem4;
|
||||||
|
case EQEmu::CastingSlot::Gem5:
|
||||||
|
return CastingSlot::Gem5;
|
||||||
|
case EQEmu::CastingSlot::Gem6:
|
||||||
|
return CastingSlot::Gem6;
|
||||||
|
case EQEmu::CastingSlot::Gem7:
|
||||||
|
return CastingSlot::Gem7;
|
||||||
|
case EQEmu::CastingSlot::Gem8:
|
||||||
|
return CastingSlot::Gem8;
|
||||||
|
case EQEmu::CastingSlot::Gem9:
|
||||||
|
return CastingSlot::Gem9;
|
||||||
|
case EQEmu::CastingSlot::Item:
|
||||||
|
return CastingSlot::Item;
|
||||||
|
case EQEmu::CastingSlot::PotionBelt:
|
||||||
|
return CastingSlot::PotionBelt;
|
||||||
|
case EQEmu::CastingSlot::Discipline:
|
||||||
|
return CastingSlot::Discipline;
|
||||||
|
case EQEmu::CastingSlot::AltAbility:
|
||||||
|
return CastingSlot::AltAbility;
|
||||||
|
default: // we shouldn't have any issues with other slots ... just return something
|
||||||
|
return CastingSlot::Discipline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline EQEmu::CastingSlot SoFToServerCastingSlot(CastingSlot slot, uint32 itemlocation)
|
||||||
|
{
|
||||||
|
switch (slot) {
|
||||||
|
case CastingSlot::Gem1:
|
||||||
|
return EQEmu::CastingSlot::Gem1;
|
||||||
|
case CastingSlot::Gem2:
|
||||||
|
return EQEmu::CastingSlot::Gem2;
|
||||||
|
case CastingSlot::Gem3:
|
||||||
|
return EQEmu::CastingSlot::Gem3;
|
||||||
|
case CastingSlot::Gem4:
|
||||||
|
return EQEmu::CastingSlot::Gem4;
|
||||||
|
case CastingSlot::Gem5:
|
||||||
|
return EQEmu::CastingSlot::Gem5;
|
||||||
|
case CastingSlot::Gem6:
|
||||||
|
return EQEmu::CastingSlot::Gem6;
|
||||||
|
case CastingSlot::Gem7:
|
||||||
|
return EQEmu::CastingSlot::Gem7;
|
||||||
|
case CastingSlot::Gem8:
|
||||||
|
return EQEmu::CastingSlot::Gem8;
|
||||||
|
case CastingSlot::Gem9:
|
||||||
|
return EQEmu::CastingSlot::Gem9;
|
||||||
|
case CastingSlot::Ability:
|
||||||
|
return EQEmu::CastingSlot::Ability;
|
||||||
|
// Tit uses 10 for item and discipline casting, but items have a valid location
|
||||||
|
case CastingSlot::Item:
|
||||||
|
if (itemlocation == INVALID_INDEX)
|
||||||
|
return EQEmu::CastingSlot::Discipline;
|
||||||
|
else
|
||||||
|
return EQEmu::CastingSlot::Item;
|
||||||
|
case CastingSlot::PotionBelt:
|
||||||
|
return EQEmu::CastingSlot::PotionBelt;
|
||||||
|
case CastingSlot::AltAbility:
|
||||||
|
return EQEmu::CastingSlot::AltAbility;
|
||||||
|
default: // we shouldn't have any issues with other slots ... just return something
|
||||||
|
return EQEmu::CastingSlot::Discipline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int ServerToSoFBuffSlot(int index)
|
||||||
|
{
|
||||||
|
// we're a disc
|
||||||
|
if (index >= EQEmu::constants::LongBuffs + EQEmu::constants::ShortBuffs)
|
||||||
|
return index - EQEmu::constants::LongBuffs - EQEmu::constants::ShortBuffs +
|
||||||
|
constants::LongBuffs + constants::ShortBuffs;
|
||||||
|
// we're a song
|
||||||
|
if (index >= EQEmu::constants::LongBuffs)
|
||||||
|
return index - EQEmu::constants::LongBuffs + constants::LongBuffs;
|
||||||
|
// we're a normal buff
|
||||||
|
return index; // as long as we guard against bad slots server side, we should be fine
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int SoFToServerBuffSlot(int index)
|
||||||
|
{
|
||||||
|
// we're a disc
|
||||||
|
if (index >= constants::LongBuffs + constants::ShortBuffs)
|
||||||
|
return index - constants::LongBuffs - constants::ShortBuffs + EQEmu::constants::LongBuffs +
|
||||||
|
EQEmu::constants::ShortBuffs;
|
||||||
|
// we're a song
|
||||||
|
if (index >= constants::LongBuffs)
|
||||||
|
return index - constants::LongBuffs + EQEmu::constants::LongBuffs;
|
||||||
|
// we're a normal buff
|
||||||
|
return index; // as long as we guard against bad slots server side, we should be fine
|
||||||
|
}
|
||||||
} /*SoF*/
|
} /*SoF*/
|
||||||
|
|||||||
@@ -50,6 +50,23 @@ namespace SoF
|
|||||||
#include "sof_ops.h"
|
#include "sof_ops.h"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class CastingSlot : uint32 {
|
||||||
|
Gem1 = 0,
|
||||||
|
Gem2 = 1,
|
||||||
|
Gem3 = 2,
|
||||||
|
Gem4 = 3,
|
||||||
|
Gem5 = 4,
|
||||||
|
Gem6 = 5,
|
||||||
|
Gem7 = 6,
|
||||||
|
Gem8 = 7,
|
||||||
|
Gem9 = 8,
|
||||||
|
Ability = 9,
|
||||||
|
Item = 10,
|
||||||
|
Discipline = 10,
|
||||||
|
PotionBelt = 11,
|
||||||
|
AltAbility = 0xFF
|
||||||
|
};
|
||||||
|
|
||||||
}; /*SoF*/
|
}; /*SoF*/
|
||||||
|
|
||||||
#endif /*COMMON_SOF_H*/
|
#endif /*COMMON_SOF_H*/
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#include "../string_util.h"
|
#include "../string_util.h"
|
||||||
|
|
||||||
|
|
||||||
size_t SoF::invtype::InvTypeSize(int inv_type)
|
size_t SoF::invtype::GetInvTypeSize(int inv_type)
|
||||||
{
|
{
|
||||||
switch (inv_type) {
|
switch (inv_type) {
|
||||||
case invtype::InvTypePossessions:
|
case invtype::InvTypePossessions:
|
||||||
@@ -68,7 +68,7 @@ size_t SoF::invtype::InvTypeSize(int inv_type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* SoF::invtype::InvTypeName(int inv_type)
|
const char* SoF::invtype::GetInvTypeName(int inv_type)
|
||||||
{
|
{
|
||||||
switch (inv_type) {
|
switch (inv_type) {
|
||||||
case invtype::InvTypeInvalid:
|
case invtype::InvTypeInvalid:
|
||||||
@@ -116,7 +116,24 @@ const char* SoF::invtype::InvTypeName(int inv_type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* SoF::invslot::InvPossessionsSlotName(int inv_slot)
|
bool SoF::invtype::IsInvTypePersistent(int inv_type)
|
||||||
|
{
|
||||||
|
switch (inv_type) {
|
||||||
|
case invtype::InvTypePossessions:
|
||||||
|
case invtype::InvTypeBank:
|
||||||
|
case invtype::InvTypeSharedBank:
|
||||||
|
case invtype::InvTypeTrade:
|
||||||
|
case invtype::InvTypeWorld:
|
||||||
|
case invtype::InvTypeLimbo:
|
||||||
|
case invtype::InvTypeTribute:
|
||||||
|
case invtype::InvTypeGuildTribute:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* SoF::invslot::GetInvPossessionsSlotName(int inv_slot)
|
||||||
{
|
{
|
||||||
switch (inv_slot) {
|
switch (inv_slot) {
|
||||||
case invslot::InvSlotInvalid:
|
case invslot::InvSlotInvalid:
|
||||||
@@ -190,9 +207,9 @@ const char* SoF::invslot::InvPossessionsSlotName(int inv_slot)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* SoF::invslot::InvCorpseSlotName(int inv_slot)
|
const char* SoF::invslot::GetInvCorpseSlotName(int inv_slot)
|
||||||
{
|
{
|
||||||
if (!invtype::InvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid)
|
if (!invtype::GetInvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid)
|
||||||
return "Invalid Slot";
|
return "Invalid Slot";
|
||||||
|
|
||||||
// needs work
|
// needs work
|
||||||
@@ -205,14 +222,14 @@ const char* SoF::invslot::InvCorpseSlotName(int inv_slot)
|
|||||||
return ret_str.c_str();
|
return ret_str.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* SoF::invslot::InvSlotName(int inv_type, int inv_slot)
|
const char* SoF::invslot::GetInvSlotName(int inv_type, int inv_slot)
|
||||||
{
|
{
|
||||||
if (inv_type == invtype::InvTypePossessions)
|
if (inv_type == invtype::InvTypePossessions)
|
||||||
return invslot::InvPossessionsSlotName(inv_slot);
|
return invslot::GetInvPossessionsSlotName(inv_slot);
|
||||||
else if (inv_type == invtype::InvTypeCorpse)
|
else if (inv_type == invtype::InvTypeCorpse)
|
||||||
return invslot::InvCorpseSlotName(inv_slot);
|
return invslot::GetInvCorpseSlotName(inv_slot);
|
||||||
|
|
||||||
size_t type_size = invtype::InvTypeSize(inv_type);
|
size_t type_size = invtype::GetInvTypeSize(inv_type);
|
||||||
|
|
||||||
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
||||||
return "Invalid Slot";
|
return "Invalid Slot";
|
||||||
@@ -226,7 +243,7 @@ const char* SoF::invslot::InvSlotName(int inv_type, int inv_slot)
|
|||||||
return ret_str.c_str();
|
return ret_str.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* SoF::invbag::InvBagIndexName(int bag_index)
|
const char* SoF::invbag::GetInvBagIndexName(int bag_index)
|
||||||
{
|
{
|
||||||
if (bag_index == invbag::InvBagInvalid)
|
if (bag_index == invbag::InvBagInvalid)
|
||||||
return "Invalid Bag";
|
return "Invalid Bag";
|
||||||
@@ -240,7 +257,7 @@ const char* SoF::invbag::InvBagIndexName(int bag_index)
|
|||||||
return ret_str.c_str();
|
return ret_str.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* SoF::invaug::InvAugIndexName(int aug_index)
|
const char* SoF::invaug::GetInvAugIndexName(int aug_index)
|
||||||
{
|
{
|
||||||
if (aug_index == invaug::InvAugInvalid)
|
if (aug_index == invaug::InvAugInvalid)
|
||||||
return "Invalid Augment";
|
return "Invalid Augment";
|
||||||
|
|||||||
+47
-27
@@ -21,7 +21,7 @@
|
|||||||
#define COMMON_SOF_LIMITS_H
|
#define COMMON_SOF_LIMITS_H
|
||||||
|
|
||||||
#include "../types.h"
|
#include "../types.h"
|
||||||
#include "../client_version.h"
|
#include "../emu_versions.h"
|
||||||
#include "../skills.h"
|
#include "../skills.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -32,8 +32,13 @@ namespace SoF
|
|||||||
enum : bool { False = false, True = true };
|
enum : bool { False = false, True = true };
|
||||||
|
|
||||||
// pre-declarations
|
// pre-declarations
|
||||||
|
namespace inventory {
|
||||||
|
inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||||
|
|
||||||
|
} /*inventory*/
|
||||||
|
|
||||||
namespace invtype {
|
namespace invtype {
|
||||||
inline EQEmu::versions::ClientVersion InvTypeRef() { return EQEmu::versions::ClientVersion::SoF; }
|
inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||||
|
|
||||||
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
||||||
|
|
||||||
@@ -63,7 +68,7 @@ namespace SoF
|
|||||||
} /*invtype*/
|
} /*invtype*/
|
||||||
|
|
||||||
namespace invslot {
|
namespace invslot {
|
||||||
inline EQEmu::versions::ClientVersion InvSlotRef() { return EQEmu::versions::ClientVersion::SoF; }
|
inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||||
|
|
||||||
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
||||||
|
|
||||||
@@ -114,21 +119,21 @@ namespace SoF
|
|||||||
} /*invslot*/
|
} /*invslot*/
|
||||||
|
|
||||||
namespace invbag {
|
namespace invbag {
|
||||||
inline EQEmu::versions::ClientVersion InvBagRef() { return EQEmu::versions::ClientVersion::SoF; }
|
inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||||
|
|
||||||
enum : int { InvBagInvalid = -1, InvBagBegin };
|
enum : int { InvBagInvalid = -1, InvBagBegin };
|
||||||
|
|
||||||
} /*invbag*/
|
} /*invbag*/
|
||||||
|
|
||||||
namespace invaug {
|
namespace invaug {
|
||||||
inline EQEmu::versions::ClientVersion InvAugRef() { return EQEmu::versions::ClientVersion::SoF; }
|
inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||||
|
|
||||||
enum : int { InvAugInvalid = -1, InvAugBegin };
|
enum : int { InvAugInvalid = -1, InvAugBegin };
|
||||||
|
|
||||||
} /*invaug*/
|
} /*invaug*/
|
||||||
|
|
||||||
namespace item {
|
namespace item {
|
||||||
inline EQEmu::versions::ClientVersion ItemRef() { return EQEmu::versions::ClientVersion::SoF; }
|
inline EQEmu::versions::ClientVersion GetItemRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||||
|
|
||||||
enum ItemPacketType : int {
|
enum ItemPacketType : int {
|
||||||
ItemPacketMerchant = 100,
|
ItemPacketMerchant = 100,
|
||||||
@@ -146,27 +151,37 @@ namespace SoF
|
|||||||
} /*item*/
|
} /*item*/
|
||||||
|
|
||||||
namespace profile {
|
namespace profile {
|
||||||
inline EQEmu::versions::ClientVersion ProfileRef() { return EQEmu::versions::ClientVersion::SoF; }
|
inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||||
|
|
||||||
} /*profile*/
|
} /*profile*/
|
||||||
|
|
||||||
namespace constants {
|
namespace constants {
|
||||||
inline EQEmu::versions::ClientVersion ConstantsRef() { return EQEmu::versions::ClientVersion::SoF; }
|
inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||||
|
|
||||||
} /*constants*/
|
} /*constants*/
|
||||||
|
|
||||||
namespace behavior {
|
namespace behavior {
|
||||||
inline EQEmu::versions::ClientVersion BehaviorRef() { return EQEmu::versions::ClientVersion::SoF; }
|
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||||
|
|
||||||
} /*behavior*/
|
} /*behavior*/
|
||||||
|
|
||||||
namespace skills {
|
namespace skills {
|
||||||
inline EQEmu::versions::ClientVersion SkillsRef() { return EQEmu::versions::ClientVersion::SoF; }
|
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||||
|
|
||||||
} /*skills*/
|
} /*skills*/
|
||||||
|
|
||||||
|
|
||||||
// declarations
|
// declarations
|
||||||
|
namespace inventory {
|
||||||
|
const bool ConcatenateInvTypeLimbo = true;
|
||||||
|
|
||||||
|
const bool AllowOverLevelEquipment = false;
|
||||||
|
|
||||||
|
const bool AllowEmptyBagInBag = false;
|
||||||
|
const bool AllowClickCastFromBag = false;
|
||||||
|
|
||||||
|
} /*inventory*/
|
||||||
|
|
||||||
namespace invtype {
|
namespace invtype {
|
||||||
const size_t InvTypePossessionsSize = invslot::PossessionsCount;
|
const size_t InvTypePossessionsSize = invslot::PossessionsCount;
|
||||||
const size_t InvTypeBankSize = 24;
|
const size_t InvTypeBankSize = 24;
|
||||||
@@ -175,7 +190,7 @@ namespace SoF
|
|||||||
const size_t InvTypeWorldSize = 10;
|
const size_t InvTypeWorldSize = 10;
|
||||||
const size_t InvTypeLimboSize = 36;
|
const size_t InvTypeLimboSize = 36;
|
||||||
const size_t InvTypeTributeSize = 5;
|
const size_t InvTypeTributeSize = 5;
|
||||||
const size_t InvTypeGuildTributeSize = 0;//unknown
|
const size_t InvTypeGuildTributeSize = 2;
|
||||||
const size_t InvTypeMerchantSize = 80;
|
const size_t InvTypeMerchantSize = 80;
|
||||||
const size_t InvTypeCorpseSize = InvTypePossessionsSize;
|
const size_t InvTypeCorpseSize = InvTypePossessionsSize;
|
||||||
const size_t InvTypeBazaarSize = 80;
|
const size_t InvTypeBazaarSize = 80;
|
||||||
@@ -188,10 +203,10 @@ namespace SoF
|
|||||||
const size_t InvTypeArchivedSize = 0;//unknown
|
const size_t InvTypeArchivedSize = 0;//unknown
|
||||||
const size_t InvTypeOtherSize = 0;//unknown
|
const size_t InvTypeOtherSize = 0;//unknown
|
||||||
|
|
||||||
const size_t NPCTradeSize = 4;
|
extern size_t GetInvTypeSize(int inv_type);
|
||||||
|
extern const char* GetInvTypeName(int inv_type);
|
||||||
|
|
||||||
extern size_t InvTypeSize(int inv_type);
|
extern bool IsInvTypePersistent(int inv_type);
|
||||||
extern const char* InvTypeName(int inv_type);
|
|
||||||
|
|
||||||
} /*invtype*/
|
} /*invtype*/
|
||||||
|
|
||||||
@@ -210,14 +225,17 @@ namespace SoF
|
|||||||
const int WorldEnd = (WorldBegin + invtype::InvTypeWorldSize) - 1;
|
const int WorldEnd = (WorldBegin + invtype::InvTypeWorldSize) - 1;
|
||||||
|
|
||||||
const int TributeBegin = 400;
|
const int TributeBegin = 400;
|
||||||
const int TributeEnd = 404;
|
const int TributeEnd = (TributeBegin + invtype::InvTypeTributeSize) - 1;
|
||||||
|
|
||||||
|
const int GuildTributeBegin = 450;
|
||||||
|
const int GuildTributeEnd = (GuildTributeBegin + invtype::InvTypeGuildTributeSize) - 1;
|
||||||
|
|
||||||
const int CorpseBegin = PossessionsGeneral1;
|
const int CorpseBegin = PossessionsGeneral1;
|
||||||
const int CorpseEnd = PossessionsGeneral1 + PossessionsCursor;
|
const int CorpseEnd = PossessionsGeneral1 + PossessionsCursor;
|
||||||
|
|
||||||
extern const char* InvPossessionsSlotName(int inv_slot);
|
extern const char* GetInvPossessionsSlotName(int inv_slot);
|
||||||
extern const char* InvCorpseSlotName(int inv_slot);
|
extern const char* GetInvCorpseSlotName(int inv_slot);
|
||||||
extern const char* InvSlotName(int inv_type, int inv_slot);
|
extern const char* GetInvSlotName(int inv_type, int inv_slot);
|
||||||
|
|
||||||
} /*invslot*/
|
} /*invslot*/
|
||||||
|
|
||||||
@@ -244,14 +262,14 @@ namespace SoF
|
|||||||
const int TradeBagsSize = invtype::InvTypeTradeSize * ItemBagSize;
|
const int TradeBagsSize = invtype::InvTypeTradeSize * ItemBagSize;
|
||||||
const int TradeBagsEnd = (TradeBagsBegin + TradeBagsSize) - 1;
|
const int TradeBagsEnd = (TradeBagsBegin + TradeBagsSize) - 1;
|
||||||
|
|
||||||
extern const char* InvBagIndexName(int bag_index);
|
extern const char* GetInvBagIndexName(int bag_index);
|
||||||
|
|
||||||
} /*invbag*/
|
} /*invbag*/
|
||||||
|
|
||||||
namespace invaug {
|
namespace invaug {
|
||||||
const size_t ItemAugSize = 5;
|
const size_t ItemAugSize = 5;
|
||||||
|
|
||||||
extern const char* InvAugIndexName(int aug_index);
|
extern const char* GetInvAugIndexName(int aug_index);
|
||||||
|
|
||||||
} /*invaug*/
|
} /*invaug*/
|
||||||
|
|
||||||
@@ -261,6 +279,7 @@ namespace SoF
|
|||||||
|
|
||||||
namespace profile {
|
namespace profile {
|
||||||
const size_t TributeSize = invtype::InvTypeTributeSize;
|
const size_t TributeSize = invtype::InvTypeTributeSize;
|
||||||
|
const size_t GuildTributeSize = invtype::InvTypeGuildTributeSize;
|
||||||
|
|
||||||
const size_t BandoliersSize = 20; // number of bandolier instances
|
const size_t BandoliersSize = 20; // number of bandolier instances
|
||||||
const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance
|
const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance
|
||||||
@@ -276,16 +295,17 @@ namespace SoF
|
|||||||
|
|
||||||
const size_t SayLinkBodySize = 50;
|
const size_t SayLinkBodySize = 50;
|
||||||
|
|
||||||
|
const int LongBuffs = 25;
|
||||||
|
const int ShortBuffs = 15;
|
||||||
|
const int DiscBuffs = 1;
|
||||||
|
const int TotalBuffs = LongBuffs + ShortBuffs + DiscBuffs;
|
||||||
|
const int NPCBuffs = 60;
|
||||||
|
const int PetBuffs = 30;
|
||||||
|
const int MercBuffs = 0;
|
||||||
|
|
||||||
} /*constants*/
|
} /*constants*/
|
||||||
|
|
||||||
namespace behavior {
|
namespace behavior {
|
||||||
const bool ConcatenateInvTypeLimbo = true;
|
|
||||||
|
|
||||||
const bool AllowOverLevelEquipment = false;
|
|
||||||
|
|
||||||
const bool AllowEmptyBagInBag = false;
|
|
||||||
const bool AllowClickCastFromBag = false;
|
|
||||||
|
|
||||||
const bool CoinHasWeight = true;
|
const bool CoinHasWeight = true;
|
||||||
|
|
||||||
} /*behavior*/
|
} /*behavior*/
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ E(OP_LeadershipExpUpdate)
|
|||||||
E(OP_LogServer)
|
E(OP_LogServer)
|
||||||
E(OP_LootItem)
|
E(OP_LootItem)
|
||||||
E(OP_ManaChange)
|
E(OP_ManaChange)
|
||||||
|
E(OP_MemorizeSpell)
|
||||||
E(OP_MoveItem)
|
E(OP_MoveItem)
|
||||||
E(OP_NewSpawn)
|
E(OP_NewSpawn)
|
||||||
E(OP_NewZone)
|
E(OP_NewZone)
|
||||||
@@ -110,6 +111,7 @@ D(OP_GroupFollow2)
|
|||||||
D(OP_InspectRequest)
|
D(OP_InspectRequest)
|
||||||
D(OP_ItemLinkClick)
|
D(OP_ItemLinkClick)
|
||||||
D(OP_ItemVerifyRequest)
|
D(OP_ItemVerifyRequest)
|
||||||
|
D(OP_LoadSpellSet)
|
||||||
D(OP_LootItem)
|
D(OP_LootItem)
|
||||||
D(OP_MoveItem)
|
D(OP_MoveItem)
|
||||||
D(OP_PetCommands)
|
D(OP_PetCommands)
|
||||||
|
|||||||
+76
-116
@@ -122,7 +122,7 @@ struct AdventureInfo {
|
|||||||
** Merth: Gave struct a name so gcc 2.96 would compile
|
** Merth: Gave struct a name so gcc 2.96 would compile
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
struct Color_Struct
|
struct Tint_Struct
|
||||||
{
|
{
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
@@ -130,19 +130,62 @@ struct Color_Struct
|
|||||||
uint8 Green;
|
uint8 Green;
|
||||||
uint8 Red;
|
uint8 Red;
|
||||||
uint8 UseTint; // if there's a tint this is FF
|
uint8 UseTint; // if there's a tint this is FF
|
||||||
} RGB;
|
};
|
||||||
uint32 Color;
|
uint32 Color;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CharSelectEquip
|
struct TintProfile
|
||||||
|
{
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
Tint_Struct Head;
|
||||||
|
Tint_Struct Chest;
|
||||||
|
Tint_Struct Arms;
|
||||||
|
Tint_Struct Wrist;
|
||||||
|
Tint_Struct Hands;
|
||||||
|
Tint_Struct Legs;
|
||||||
|
Tint_Struct Feet;
|
||||||
|
Tint_Struct Primary;
|
||||||
|
Tint_Struct Secondary;
|
||||||
|
};
|
||||||
|
Tint_Struct Slot[EQEmu::textures::materialCount];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Visible equiptment.
|
||||||
|
* Size: 12 Octets
|
||||||
|
*/
|
||||||
|
struct Texture_Struct
|
||||||
{
|
{
|
||||||
uint32 Material;
|
uint32 Material;
|
||||||
uint32 Unknown1;
|
uint32 Unknown1;
|
||||||
uint32 EliteMaterial;
|
uint32 EliteMaterial;
|
||||||
Color_Struct Color;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct TextureProfile
|
||||||
|
{
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
Texture_Struct Head;
|
||||||
|
Texture_Struct Chest;
|
||||||
|
Texture_Struct Arms;
|
||||||
|
Texture_Struct Wrist;
|
||||||
|
Texture_Struct Hands;
|
||||||
|
Texture_Struct Legs;
|
||||||
|
Texture_Struct Feet;
|
||||||
|
Texture_Struct Primary;
|
||||||
|
Texture_Struct Secondary;
|
||||||
|
};
|
||||||
|
Texture_Struct Slot[EQEmu::textures::materialCount];
|
||||||
|
};
|
||||||
|
|
||||||
|
TextureProfile();
|
||||||
|
};
|
||||||
|
|
||||||
|
struct CharSelectEquip : Texture_Struct, Tint_Struct {};
|
||||||
|
|
||||||
struct CharacterSelectEntry_Struct
|
struct CharacterSelectEntry_Struct
|
||||||
{
|
{
|
||||||
/*0000*/ uint8 Level; //
|
/*0000*/ uint8 Level; //
|
||||||
@@ -152,7 +195,7 @@ struct CharacterSelectEntry_Struct
|
|||||||
/*0000*/ uint8 Beard; //
|
/*0000*/ uint8 Beard; //
|
||||||
/*0001*/ uint8 HairColor; //
|
/*0001*/ uint8 HairColor; //
|
||||||
/*0000*/ uint8 Face; //
|
/*0000*/ uint8 Face; //
|
||||||
/*0000*/ CharSelectEquip Equip[9];
|
/*0000*/ CharSelectEquip Equip[EQEmu::textures::materialCount];
|
||||||
/*0000*/ uint32 PrimaryIDFile; //
|
/*0000*/ uint32 PrimaryIDFile; //
|
||||||
/*0000*/ uint32 SecondaryIDFile; //
|
/*0000*/ uint32 SecondaryIDFile; //
|
||||||
/*0000*/ uint8 Unknown15; // 0xff
|
/*0000*/ uint8 Unknown15; // 0xff
|
||||||
@@ -183,19 +226,6 @@ struct CharacterSelect_Struct
|
|||||||
/*0008*/ CharacterSelectEntry_Struct Entries[0];
|
/*0008*/ CharacterSelectEntry_Struct Entries[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
* Visible equiptment.
|
|
||||||
* Size: 12 Octets
|
|
||||||
*/
|
|
||||||
struct EquipStruct
|
|
||||||
{
|
|
||||||
/*00*/ uint32 Material;
|
|
||||||
/*04*/ uint32 Unknown1;
|
|
||||||
/*08*/ uint32 EliteMaterial;
|
|
||||||
/*12*/
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Generic Spawn Struct
|
** Generic Spawn Struct
|
||||||
** Length: 897 Octets
|
** Length: 897 Octets
|
||||||
@@ -222,22 +252,7 @@ struct Spawn_Struct {
|
|||||||
/*0018*/ uint8 unknown0018[4]; //
|
/*0018*/ uint8 unknown0018[4]; //
|
||||||
/*0022*/ uint8 gender; // Gender (0=male, 1=female, 2=monster)
|
/*0022*/ uint8 gender; // Gender (0=male, 1=female, 2=monster)
|
||||||
/*0023*/ uint8 unknown0023[4]; //
|
/*0023*/ uint8 unknown0023[4]; //
|
||||||
/*0027*/ union
|
/*0027*/ TextureProfile equipment;
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
/*0027*/ EquipStruct equip_helmet; // Equiptment: Helmet visual
|
|
||||||
/*0039*/ EquipStruct equip_chest; // Equiptment: Chest visual
|
|
||||||
/*0051*/ EquipStruct equip_arms; // Equiptment: Arms visual
|
|
||||||
/*0063*/ EquipStruct equip_bracers; // Equiptment: Wrist visual
|
|
||||||
/*0075*/ EquipStruct equip_hands; // Equiptment: Hands visual
|
|
||||||
/*0087*/ EquipStruct equip_legs; // Equiptment: Legs visual
|
|
||||||
/*0099*/ EquipStruct equip_feet; // Equiptment: Boots visual
|
|
||||||
/*0111*/ EquipStruct equip_primary; // Equiptment: Main visual
|
|
||||||
/*0123*/ EquipStruct equip_secondary; // Equiptment: Off visual
|
|
||||||
} equip;
|
|
||||||
/*0027*/ EquipStruct equipment[9];
|
|
||||||
};
|
|
||||||
|
|
||||||
/*0135*/ uint8 StandState; // Seems to be required to be set to 0x64 for normal animation.
|
/*0135*/ uint8 StandState; // Seems to be required to be set to 0x64 for normal animation.
|
||||||
/*0136*/ uint8 unknown0136;
|
/*0136*/ uint8 unknown0136;
|
||||||
@@ -314,22 +329,7 @@ union
|
|||||||
/*0775*/ char name[64]; // Player's Name
|
/*0775*/ char name[64]; // Player's Name
|
||||||
/*0839*/ uint32 petOwnerId; // If this is a pet, the spawn id of owner
|
/*0839*/ uint32 petOwnerId; // If this is a pet, the spawn id of owner
|
||||||
/*0843*/ uint8 pvp; // 0 = normal name color, 2 = PVP name color
|
/*0843*/ uint8 pvp; // 0 = normal name color, 2 = PVP name color
|
||||||
/*0844*/ union
|
/*0844*/ TintProfile equipment_tint;
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
/*0844*/ Color_Struct color_helmet; // Color of helmet item
|
|
||||||
/*0848*/ Color_Struct color_chest; // Color of chest item
|
|
||||||
/*0852*/ Color_Struct color_arms; // Color of arms item
|
|
||||||
/*0856*/ Color_Struct color_bracers; // Color of bracers item
|
|
||||||
/*0860*/ Color_Struct color_hands; // Color of hands item
|
|
||||||
/*0864*/ Color_Struct color_legs; // Color of legs item
|
|
||||||
/*0868*/ Color_Struct color_feet; // Color of feet item
|
|
||||||
/*0872*/ Color_Struct color_primary; // Color of primary item
|
|
||||||
/*0876*/ Color_Struct color_secondary; // Color of secondary item
|
|
||||||
} equipment_colors;
|
|
||||||
/*0844*/ Color_Struct colors[9]; // Array elements correspond to struct equipment_colors above
|
|
||||||
};
|
|
||||||
/*0880*/ uint8 anon; // 0=normal, 1=anon, 2=roleplay
|
/*0880*/ uint8 anon; // 0=normal, 1=anon, 2=roleplay
|
||||||
/*0881*/ uint8 face;
|
/*0881*/ uint8 face;
|
||||||
/*0882*/ uint8 drakkin_details; // Face Details (Spikes) on Drakkin 0 - 7
|
/*0882*/ uint8 drakkin_details; // Face Details (Spikes) on Drakkin 0 - 7
|
||||||
@@ -458,7 +458,7 @@ struct MemorizeSpell_Struct {
|
|||||||
uint32 slot; // Spot in the spell book/memorized slot
|
uint32 slot; // Spot in the spell book/memorized slot
|
||||||
uint32 spell_id; // Spell id (200 or c8 is minor healing, etc)
|
uint32 spell_id; // Spell id (200 or c8 is minor healing, etc)
|
||||||
uint32 scribing; // 1 if memorizing a spell, set to 0 if scribing to book, 2 if un-memming
|
uint32 scribing; // 1 if memorizing a spell, set to 0 if scribing to book, 2 if un-memming
|
||||||
//uint32 unknown12;
|
uint32 reduction; // lowers reuse
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -491,11 +491,12 @@ struct DeleteSpell_Struct
|
|||||||
|
|
||||||
struct ManaChange_Struct
|
struct ManaChange_Struct
|
||||||
{
|
{
|
||||||
uint32 new_mana; // New Mana AMount
|
/*00*/ uint32 new_mana; // New Mana AMount
|
||||||
uint32 stamina;
|
/*04*/ uint32 stamina;
|
||||||
uint32 spell_id;
|
/*08*/ uint32 spell_id;
|
||||||
uint32 unknown12;
|
/*12*/ uint8 keepcasting; // won't stop the cast. Change mana while casting?
|
||||||
uint32 unknown16;
|
/*13*/ uint8 padding[3]; // client doesn't read it, garbage data seems like
|
||||||
|
/*16*/ int32 slot; // -1 for normal usage slot for when we want silent interrupt? I think it does timer stuff or something. Linked Spell Reuse interrupt uses it
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SwapSpell_Struct
|
struct SwapSpell_Struct
|
||||||
@@ -542,32 +543,23 @@ struct SpawnAppearance_Struct
|
|||||||
// this is used inside profile
|
// this is used inside profile
|
||||||
struct SpellBuff_Struct
|
struct SpellBuff_Struct
|
||||||
{
|
{
|
||||||
/*000*/ uint8 slotid; //badly named... seems to be 2 for a real buff, 0 otherwise
|
/*000*/ uint8 effect_type; // 0 = no buff, 2 = buff, 4 = inverse affects of buff
|
||||||
/*001*/ uint8 level;
|
/*001*/ uint8 level; // Seen 1 for no buff
|
||||||
/*002*/ uint8 bard_modifier;
|
/*002*/ uint8 bard_modifier;
|
||||||
/*003*/ uint8 effect; //not real
|
/*003*/ uint8 unknown003; // MQ2 used to call this "damage shield" -- don't see client referencing it, so maybe server side DS type tracking?
|
||||||
/*004*/ uint32 spellid;
|
/*004*/ uint32 spellid;
|
||||||
/*008*/ int32 duration;
|
/*008*/ uint32 duration;
|
||||||
/*012*/ uint32 counters;
|
/*012*/ uint32 counters;
|
||||||
/*016*/ uint32 unknown004; //Might need to be swapped with player_id
|
/*016*/ uint32 unknown016;
|
||||||
/*020*/ uint32 player_id; //'global' ID of the caster, for wearoff messages
|
/*020*/ uint32 player_id; // caster ID, pretty sure just zone ID
|
||||||
|
|
||||||
/*024*/
|
/*024*/
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct SpellBuffFade_Struct {
|
struct SpellBuffPacket_Struct {
|
||||||
/*000*/ uint32 entityid;
|
/*000*/ uint32 entityid;
|
||||||
/*004*/ uint8 slot;
|
/*004*/ SpellBuff_Struct buff;
|
||||||
/*005*/ uint8 level;
|
|
||||||
/*006*/ uint8 effect;
|
|
||||||
/*007*/ uint8 unknown7;
|
|
||||||
/*008*/ uint32 spellid;
|
|
||||||
/*012*/ int32 duration;
|
|
||||||
/*016*/ uint32 unknown016;
|
|
||||||
/*020*/ uint32 unknown020; //prolly global player ID
|
|
||||||
/*024*/ uint32 playerId; // Player id who cast the buff
|
|
||||||
/*028*/ uint32 slotid;
|
/*028*/ uint32 slotid;
|
||||||
/*032*/ uint32 bufffade;
|
/*032*/ uint32 bufffade;
|
||||||
/*036*/
|
/*036*/
|
||||||
@@ -882,24 +874,9 @@ struct PlayerProfile_Struct //23576 Octets
|
|||||||
/*00216*/ uint8 hairstyle; // Player hair style
|
/*00216*/ uint8 hairstyle; // Player hair style
|
||||||
/*00217*/ uint8 beard; // Player beard type
|
/*00217*/ uint8 beard; // Player beard type
|
||||||
/*00218*/ uint8 unknown00178[10]; //[10]14 on Live?
|
/*00218*/ uint8 unknown00178[10]; //[10]14 on Live?
|
||||||
/*00228*/ union
|
/*00228*/ TextureProfile equipment;
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
/*00228*/ EquipStruct equip_helmet; // Equiptment: Helmet visual
|
|
||||||
/*00240*/ EquipStruct equip_chest; // Equiptment: Chest visual
|
|
||||||
/*00252*/ EquipStruct equip_arms; // Equiptment: Arms visual
|
|
||||||
/*00264*/ EquipStruct equip_bracers; // Equiptment: Wrist visual
|
|
||||||
/*00276*/ EquipStruct equip_hands; // Equiptment: Hands visual
|
|
||||||
/*00288*/ EquipStruct equip_legs; // Equiptment: Legs visual
|
|
||||||
/*00300*/ EquipStruct equip_feet; // Equiptment: Boots visual
|
|
||||||
/*00312*/ EquipStruct equip_primary; // Equiptment: Main visual
|
|
||||||
/*00324*/ EquipStruct equip_secondary; // Equiptment: Off visual
|
|
||||||
} equip;
|
|
||||||
/*00228*/ EquipStruct equipment[9]; //Live Shows [108] for this part
|
|
||||||
};
|
|
||||||
/*00336*/ uint8 unknown00224[156]; // Live Shows [160]
|
/*00336*/ uint8 unknown00224[156]; // Live Shows [160]
|
||||||
/*00496*/ Color_Struct item_tint[9]; // RR GG BB 00
|
/*00496*/ TintProfile item_tint; // RR GG BB 00
|
||||||
/*00544*/ AA_Array aa_array[MAX_PP_AA_ARRAY]; // [3600] AAs 12 bytes each
|
/*00544*/ AA_Array aa_array[MAX_PP_AA_ARRAY]; // [3600] AAs 12 bytes each
|
||||||
/*04132*/ uint32 points; // Unspent Practice points - RELOCATED???
|
/*04132*/ uint32 points; // Unspent Practice points - RELOCATED???
|
||||||
/*04136*/ uint32 mana; // Current mana
|
/*04136*/ uint32 mana; // Current mana
|
||||||
@@ -1155,7 +1132,7 @@ struct WearChange_Struct{
|
|||||||
/*002*/ uint32 material;
|
/*002*/ uint32 material;
|
||||||
/*006*/ uint32 unknown06;
|
/*006*/ uint32 unknown06;
|
||||||
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
|
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
|
||||||
/*014*/ Color_Struct color;
|
/*014*/ Tint_Struct color;
|
||||||
/*018*/ uint8 wear_slot_id;
|
/*018*/ uint8 wear_slot_id;
|
||||||
/*019*/
|
/*019*/
|
||||||
};
|
};
|
||||||
@@ -1671,7 +1648,7 @@ struct LootingItem_Struct {
|
|||||||
/*002*/ uint32 looter;
|
/*002*/ uint32 looter;
|
||||||
/*004*/ uint16 slot_id;
|
/*004*/ uint16 slot_id;
|
||||||
/*006*/ uint8 unknown3[2];
|
/*006*/ uint8 unknown3[2];
|
||||||
/*008*/ uint32 auto_loot;
|
/*008*/ int32 auto_loot;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GuildManageStatus_Struct{
|
struct GuildManageStatus_Struct{
|
||||||
@@ -1882,8 +1859,7 @@ struct Merchant_Sell_Struct {
|
|||||||
/*004*/ uint32 playerid; // Player's entity id
|
/*004*/ uint32 playerid; // Player's entity id
|
||||||
/*008*/ uint32 itemslot;
|
/*008*/ uint32 itemslot;
|
||||||
uint32 unknown12;
|
uint32 unknown12;
|
||||||
/*016*/ uint8 quantity; // Already sold
|
/*016*/ uint32 quantity;
|
||||||
/*017*/ uint8 Unknown016[3];
|
|
||||||
/*020*/ uint32 price;
|
/*020*/ uint32 price;
|
||||||
};
|
};
|
||||||
struct Merchant_Purchase_Struct {
|
struct Merchant_Purchase_Struct {
|
||||||
@@ -2954,27 +2930,6 @@ struct PetitionBug_Struct{
|
|||||||
char text[1028];
|
char text[1028];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DyeStruct
|
|
||||||
{
|
|
||||||
union
|
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
struct Color_Struct head;
|
|
||||||
struct Color_Struct chest;
|
|
||||||
struct Color_Struct arms;
|
|
||||||
struct Color_Struct wrists;
|
|
||||||
struct Color_Struct hands;
|
|
||||||
struct Color_Struct legs;
|
|
||||||
struct Color_Struct feet;
|
|
||||||
struct Color_Struct primary; // you can't actually dye this
|
|
||||||
struct Color_Struct secondary; // or this
|
|
||||||
}
|
|
||||||
dyes;
|
|
||||||
struct Color_Struct dye[9];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ApproveZone_Struct {
|
struct ApproveZone_Struct {
|
||||||
char name[64];
|
char name[64];
|
||||||
uint32 zoneid;
|
uint32 zoneid;
|
||||||
@@ -3773,6 +3728,11 @@ struct AnnoyingZoneUnknown_Struct {
|
|||||||
uint32 value; //always 4
|
uint32 value; //always 4
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct LoadSpellSet_Struct {
|
||||||
|
uint32 spell[MAX_PP_MEMSPELL];
|
||||||
|
uint32 unknown;
|
||||||
|
};
|
||||||
|
|
||||||
struct BlockedBuffs_Struct {
|
struct BlockedBuffs_Struct {
|
||||||
/*000*/ uint8 unknown000[80];
|
/*000*/ uint8 unknown000[80];
|
||||||
/*080*/ uint8 unknown081;
|
/*080*/ uint8 unknown081;
|
||||||
|
|||||||
+239
-27
@@ -30,7 +30,7 @@
|
|||||||
#include "../eq_packet_structs.h"
|
#include "../eq_packet_structs.h"
|
||||||
#include "../misc_functions.h"
|
#include "../misc_functions.h"
|
||||||
#include "../string_util.h"
|
#include "../string_util.h"
|
||||||
#include "../item.h"
|
#include "../item_instance.h"
|
||||||
#include "titanium_structs.h"
|
#include "titanium_structs.h"
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
@@ -42,7 +42,7 @@ namespace Titanium
|
|||||||
static OpcodeManager *opcodes = nullptr;
|
static OpcodeManager *opcodes = nullptr;
|
||||||
static Strategy struct_strategy;
|
static Strategy struct_strategy;
|
||||||
|
|
||||||
void SerializeItem(EQEmu::OutBuffer& ob, const ItemInst *inst, int16 slot_id_in, uint8 depth);
|
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth);
|
||||||
|
|
||||||
// server to client inventory location converters
|
// server to client inventory location converters
|
||||||
static inline int16 ServerToTitaniumSlot(uint32 serverSlot);
|
static inline int16 ServerToTitaniumSlot(uint32 serverSlot);
|
||||||
@@ -58,6 +58,12 @@ namespace Titanium
|
|||||||
// client to server text link converter
|
// client to server text link converter
|
||||||
static inline void TitaniumToServerTextLink(std::string& serverTextLink, const std::string& titaniumTextLink);
|
static inline void TitaniumToServerTextLink(std::string& serverTextLink, const std::string& titaniumTextLink);
|
||||||
|
|
||||||
|
static inline CastingSlot ServerToTitaniumCastingSlot(EQEmu::CastingSlot slot);
|
||||||
|
static inline EQEmu::CastingSlot TitaniumToServerCastingSlot(CastingSlot slot, uint32 itemlocation);
|
||||||
|
|
||||||
|
static inline int ServerToTitaniumBuffSlot(int index);
|
||||||
|
static inline int TitaniumToServerBuffSlot(int index);
|
||||||
|
|
||||||
void Register(EQStreamIdentifier &into)
|
void Register(EQStreamIdentifier &into)
|
||||||
{
|
{
|
||||||
auto Config = EQEmuConfig::get();
|
auto Config = EQEmuConfig::get();
|
||||||
@@ -254,6 +260,25 @@ namespace Titanium
|
|||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ENCODE(OP_Buff)
|
||||||
|
{
|
||||||
|
ENCODE_LENGTH_EXACT(SpellBuffPacket_Struct);
|
||||||
|
SETUP_DIRECT_ENCODE(SpellBuffPacket_Struct, structs::SpellBuffPacket_Struct);
|
||||||
|
|
||||||
|
OUT(entityid);
|
||||||
|
OUT(buff.effect_type);
|
||||||
|
OUT(buff.level);
|
||||||
|
OUT(buff.bard_modifier);
|
||||||
|
OUT(buff.spellid);
|
||||||
|
OUT(buff.duration);
|
||||||
|
OUT(buff.counters);
|
||||||
|
OUT(buff.player_id);
|
||||||
|
eq->slotid = ServerToTitaniumBuffSlot(emu->slotid);
|
||||||
|
OUT(bufffade);
|
||||||
|
|
||||||
|
FINISH_ENCODE();
|
||||||
|
}
|
||||||
|
|
||||||
ENCODE(OP_ChannelMessage)
|
ENCODE(OP_ChannelMessage)
|
||||||
{
|
{
|
||||||
EQApplicationPacket *in = *p;
|
EQApplicationPacket *in = *p;
|
||||||
@@ -307,7 +332,7 @@ namespace Titanium
|
|||||||
EQEmu::OutBuffer::pos_type last_pos = ob.tellp();
|
EQEmu::OutBuffer::pos_type last_pos = ob.tellp();
|
||||||
|
|
||||||
for (int r = 0; r < itemcount; r++, eq++) {
|
for (int r = 0; r < itemcount; r++, eq++) {
|
||||||
SerializeItem(ob, (const ItemInst*)eq->inst, eq->slot_id, 0);
|
SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0);
|
||||||
if (ob.tellp() == last_pos)
|
if (ob.tellp() == last_pos)
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id);
|
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id);
|
||||||
|
|
||||||
@@ -573,6 +598,46 @@ namespace Titanium
|
|||||||
dest->FastQueuePacket(&in, ack_req);
|
dest->FastQueuePacket(&in, ack_req);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ENCODE(OP_GroundSpawn)
|
||||||
|
{
|
||||||
|
// We are not encoding the spawn_id field here, but it doesn't appear to matter.
|
||||||
|
//
|
||||||
|
EQApplicationPacket *in = *p;
|
||||||
|
*p = nullptr;
|
||||||
|
|
||||||
|
//store away the emu struct
|
||||||
|
unsigned char *__emu_buffer = in->pBuffer;
|
||||||
|
Object_Struct *emu = (Object_Struct *)__emu_buffer;
|
||||||
|
|
||||||
|
in->size = strlen(emu->object_name) + sizeof(structs::Object_Struct) - 1;
|
||||||
|
in->pBuffer = new unsigned char[in->size];
|
||||||
|
|
||||||
|
structs::Object_Struct *eq = (structs::Object_Struct *) in->pBuffer;
|
||||||
|
|
||||||
|
eq->drop_id = emu->drop_id;
|
||||||
|
eq->heading = emu->heading;
|
||||||
|
eq->linked_list_addr[0] = 0;
|
||||||
|
eq->linked_list_addr[1] = 0;
|
||||||
|
strcpy(eq->object_name, emu->object_name);
|
||||||
|
eq->object_type = emu->object_type;
|
||||||
|
eq->spawn_id = 0;
|
||||||
|
eq->unknown008[0] = 0;
|
||||||
|
eq->unknown008[1] = 0;
|
||||||
|
eq->unknown020 = 0;
|
||||||
|
eq->unknown024 = 0;
|
||||||
|
eq->unknown076 = 0;
|
||||||
|
eq->unknown084 = 0xffffffff;
|
||||||
|
eq->z = emu->z;
|
||||||
|
eq->x = emu->x;
|
||||||
|
eq->y = emu->y;
|
||||||
|
eq->zone_id = emu->zone_id;
|
||||||
|
eq->zone_instance = emu->zone_instance;
|
||||||
|
|
||||||
|
|
||||||
|
delete[] __emu_buffer;
|
||||||
|
dest->FastQueuePacket(&in, ack_req);
|
||||||
|
}
|
||||||
|
|
||||||
ENCODE(OP_GuildMemberList)
|
ENCODE(OP_GuildMemberList)
|
||||||
{
|
{
|
||||||
//consume the packet
|
//consume the packet
|
||||||
@@ -753,7 +818,7 @@ namespace Titanium
|
|||||||
|
|
||||||
ob.write((const char*)__emu_buffer, 4);
|
ob.write((const char*)__emu_buffer, 4);
|
||||||
|
|
||||||
SerializeItem(ob, (const ItemInst*)int_struct->inst, int_struct->slot_id, 0);
|
SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0);
|
||||||
if (ob.tellp() == last_pos) {
|
if (ob.tellp() == last_pos) {
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d.", int_struct->slot_id);
|
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d.", int_struct->slot_id);
|
||||||
delete in;
|
delete in;
|
||||||
@@ -814,6 +879,22 @@ namespace Titanium
|
|||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ENCODE(OP_MemorizeSpell)
|
||||||
|
{
|
||||||
|
ENCODE_LENGTH_EXACT(MemorizeSpell_Struct);
|
||||||
|
SETUP_DIRECT_ENCODE(MemorizeSpell_Struct, structs::MemorizeSpell_Struct);
|
||||||
|
|
||||||
|
// Since HT/LoH are translated up, we need to translate down only for memSpellSpellbar case
|
||||||
|
if (emu->scribing == 3)
|
||||||
|
eq->slot = static_cast<uint32>(ServerToTitaniumCastingSlot(static_cast<EQEmu::CastingSlot>(emu->slot)));
|
||||||
|
else
|
||||||
|
OUT(slot);
|
||||||
|
OUT(spell_id);
|
||||||
|
OUT(scribing);
|
||||||
|
|
||||||
|
FINISH_ENCODE();
|
||||||
|
}
|
||||||
|
|
||||||
ENCODE(OP_MoveItem)
|
ENCODE(OP_MoveItem)
|
||||||
{
|
{
|
||||||
ENCODE_LENGTH_EXACT(MoveItem_Struct);
|
ENCODE_LENGTH_EXACT(MoveItem_Struct);
|
||||||
@@ -853,9 +934,9 @@ namespace Titanium
|
|||||||
OUT(petid);
|
OUT(petid);
|
||||||
OUT(buffcount);
|
OUT(buffcount);
|
||||||
|
|
||||||
int EQBuffSlot = 0;
|
int EQBuffSlot = 0; // do we really want to shuffle them around like this?
|
||||||
|
|
||||||
for (uint32 EmuBuffSlot = 0; EmuBuffSlot < BUFF_COUNT; ++EmuBuffSlot)
|
for (uint32 EmuBuffSlot = 0; EmuBuffSlot < PET_BUFF_COUNT; ++EmuBuffSlot)
|
||||||
{
|
{
|
||||||
if (emu->spellid[EmuBuffSlot])
|
if (emu->spellid[EmuBuffSlot])
|
||||||
{
|
{
|
||||||
@@ -903,9 +984,9 @@ namespace Titanium
|
|||||||
OUT(hairstyle);
|
OUT(hairstyle);
|
||||||
OUT(beard);
|
OUT(beard);
|
||||||
// OUT(unknown00178[10]);
|
// OUT(unknown00178[10]);
|
||||||
for (r = 0; r < 9; r++) {
|
for (r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++) {
|
||||||
OUT(item_material[r]);
|
OUT(item_material.Slot[r].Material);
|
||||||
OUT(item_tint[r].Color);
|
OUT(item_tint.Slot[r].Color);
|
||||||
}
|
}
|
||||||
// OUT(unknown00224[48]);
|
// OUT(unknown00224[48]);
|
||||||
for (r = 0; r < structs::MAX_PP_AA_ARRAY; r++) {
|
for (r = 0; r < structs::MAX_PP_AA_ARRAY; r++) {
|
||||||
@@ -945,10 +1026,10 @@ namespace Titanium
|
|||||||
OUT(thirst_level);
|
OUT(thirst_level);
|
||||||
OUT(hunger_level);
|
OUT(hunger_level);
|
||||||
for (r = 0; r < structs::BUFF_COUNT; r++) {
|
for (r = 0; r < structs::BUFF_COUNT; r++) {
|
||||||
OUT(buffs[r].slotid);
|
OUT(buffs[r].effect_type);
|
||||||
OUT(buffs[r].level);
|
OUT(buffs[r].level);
|
||||||
OUT(buffs[r].bard_modifier);
|
OUT(buffs[r].bard_modifier);
|
||||||
OUT(buffs[r].effect);
|
OUT(buffs[r].unknown003);
|
||||||
OUT(buffs[r].spellid);
|
OUT(buffs[r].spellid);
|
||||||
OUT(buffs[r].duration);
|
OUT(buffs[r].duration);
|
||||||
OUT(buffs[r].counters);
|
OUT(buffs[r].counters);
|
||||||
@@ -1223,15 +1304,15 @@ namespace Titanium
|
|||||||
if (eq->Race[char_index] > 473)
|
if (eq->Race[char_index] > 473)
|
||||||
eq->Race[char_index] = 1;
|
eq->Race[char_index] = 1;
|
||||||
|
|
||||||
for (int index = 0; index < EQEmu::legacy::MaterialCount; ++index) {
|
for (int index = 0; index < EQEmu::textures::materialCount; ++index) {
|
||||||
eq->CS_Colors[char_index][index].Color = emu_cse->Equip[index].Color.Color;
|
eq->CS_Colors[char_index].Slot[index].Color = emu_cse->Equip[index].Color;
|
||||||
}
|
}
|
||||||
|
|
||||||
eq->BeardColor[char_index] = emu_cse->BeardColor;
|
eq->BeardColor[char_index] = emu_cse->BeardColor;
|
||||||
eq->HairStyle[char_index] = emu_cse->HairStyle;
|
eq->HairStyle[char_index] = emu_cse->HairStyle;
|
||||||
|
|
||||||
for (int index = 0; index < EQEmu::legacy::MaterialCount; ++index) {
|
for (int index = 0; index < EQEmu::textures::materialCount; ++index) {
|
||||||
eq->Equip[char_index][index] = emu_cse->Equip[index].Material;
|
eq->Equip[char_index].Slot[index].Material = emu_cse->Equip[index].Material;
|
||||||
}
|
}
|
||||||
|
|
||||||
eq->SecondaryIDFile[char_index] = emu_cse->SecondaryIDFile;
|
eq->SecondaryIDFile[char_index] = emu_cse->SecondaryIDFile;
|
||||||
@@ -1260,15 +1341,15 @@ namespace Titanium
|
|||||||
for (; char_index < 10; ++char_index) {
|
for (; char_index < 10; ++char_index) {
|
||||||
eq->Race[char_index] = 0;
|
eq->Race[char_index] = 0;
|
||||||
|
|
||||||
for (int index = 0; index < EQEmu::legacy::MaterialCount; ++index) {
|
for (int index = 0; index < EQEmu::textures::materialCount; ++index) {
|
||||||
eq->CS_Colors[char_index][index].Color = 0;
|
eq->CS_Colors[char_index].Slot[index].Color = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
eq->BeardColor[char_index] = 0;
|
eq->BeardColor[char_index] = 0;
|
||||||
eq->HairStyle[char_index] = 0;
|
eq->HairStyle[char_index] = 0;
|
||||||
|
|
||||||
for (int index = 0; index < EQEmu::legacy::MaterialCount; ++index) {
|
for (int index = 0; index < EQEmu::textures::materialCount; ++index) {
|
||||||
eq->Equip[char_index][index] = 0;
|
eq->Equip[char_index].Slot[index].Material = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
eq->SecondaryIDFile[char_index] = 0;
|
eq->SecondaryIDFile[char_index] = 0;
|
||||||
@@ -1599,9 +1680,9 @@ namespace Titanium
|
|||||||
eq->petOwnerId = emu->petOwnerId;
|
eq->petOwnerId = emu->petOwnerId;
|
||||||
eq->guildrank = emu->guildrank;
|
eq->guildrank = emu->guildrank;
|
||||||
// eq->unknown0194[3] = emu->unknown0194[3];
|
// eq->unknown0194[3] = emu->unknown0194[3];
|
||||||
for (k = 0; k < 9; k++) {
|
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||||
eq->equipment[k] = emu->equipment[k].Material;
|
eq->equipment.Slot[k].Material = emu->equipment.Slot[k].Material;
|
||||||
eq->colors[k].Color = emu->colors[k].Color;
|
eq->equipment_tint.Slot[k].Color = emu->equipment_tint.Slot[k].Color;
|
||||||
}
|
}
|
||||||
for (k = 0; k < 8; k++) {
|
for (k = 0; k < 8; k++) {
|
||||||
eq->set_to_0xFF[k] = 0xFF;
|
eq->set_to_0xFF[k] = 0xFF;
|
||||||
@@ -1688,12 +1769,31 @@ namespace Titanium
|
|||||||
FINISH_DIRECT_DECODE();
|
FINISH_DIRECT_DECODE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DECODE(OP_Buff)
|
||||||
|
{
|
||||||
|
DECODE_LENGTH_EXACT(structs::SpellBuffPacket_Struct);
|
||||||
|
SETUP_DIRECT_DECODE(SpellBuffPacket_Struct, structs::SpellBuffPacket_Struct);
|
||||||
|
|
||||||
|
IN(entityid);
|
||||||
|
IN(buff.effect_type);
|
||||||
|
IN(buff.level);
|
||||||
|
IN(buff.bard_modifier);
|
||||||
|
IN(buff.spellid);
|
||||||
|
IN(buff.duration);
|
||||||
|
IN(buff.counters);
|
||||||
|
IN(buff.player_id);
|
||||||
|
emu->slotid = TitaniumToServerBuffSlot(eq->slotid);
|
||||||
|
IN(bufffade);
|
||||||
|
|
||||||
|
FINISH_DIRECT_DECODE();
|
||||||
|
}
|
||||||
|
|
||||||
DECODE(OP_CastSpell)
|
DECODE(OP_CastSpell)
|
||||||
{
|
{
|
||||||
DECODE_LENGTH_EXACT(structs::CastSpell_Struct);
|
DECODE_LENGTH_EXACT(structs::CastSpell_Struct);
|
||||||
SETUP_DIRECT_DECODE(CastSpell_Struct, structs::CastSpell_Struct);
|
SETUP_DIRECT_DECODE(CastSpell_Struct, structs::CastSpell_Struct);
|
||||||
|
|
||||||
IN(slot);
|
emu->slot = static_cast<uint32>(TitaniumToServerCastingSlot(static_cast<CastingSlot>(eq->slot), eq->inventoryslot));
|
||||||
IN(spell_id);
|
IN(spell_id);
|
||||||
emu->inventoryslot = TitaniumToServerSlot(eq->inventoryslot);
|
emu->inventoryslot = TitaniumToServerSlot(eq->inventoryslot);
|
||||||
IN(target_id);
|
IN(target_id);
|
||||||
@@ -1881,6 +1981,21 @@ namespace Titanium
|
|||||||
FINISH_DIRECT_DECODE();
|
FINISH_DIRECT_DECODE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DECODE(OP_LoadSpellSet)
|
||||||
|
{
|
||||||
|
DECODE_LENGTH_EXACT(structs::LoadSpellSet_Struct);
|
||||||
|
SETUP_DIRECT_DECODE(LoadSpellSet_Struct, structs::LoadSpellSet_Struct);
|
||||||
|
|
||||||
|
for (int i = 0; i < structs::MAX_PP_MEMSPELL; ++i)
|
||||||
|
IN(spell[i]);
|
||||||
|
for (int i = structs::MAX_PP_MEMSPELL; i < MAX_PP_MEMSPELL; ++i)
|
||||||
|
emu->spell[i] = 0xFFFFFFFF;
|
||||||
|
|
||||||
|
IN(unknown);
|
||||||
|
|
||||||
|
FINISH_DIRECT_DECODE();
|
||||||
|
}
|
||||||
|
|
||||||
DECODE(OP_LootItem)
|
DECODE(OP_LootItem)
|
||||||
{
|
{
|
||||||
DECODE_LENGTH_EXACT(structs::LootingItem_Struct);
|
DECODE_LENGTH_EXACT(structs::LootingItem_Struct);
|
||||||
@@ -2104,10 +2219,10 @@ namespace Titanium
|
|||||||
}
|
}
|
||||||
|
|
||||||
// file scope helper methods
|
// file scope helper methods
|
||||||
void SerializeItem(EQEmu::OutBuffer& ob, const ItemInst *inst, int16 slot_id_in, uint8 depth)
|
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth)
|
||||||
{
|
{
|
||||||
const char* protection = "\\\\\\\\\\";
|
const char* protection = "\\\\\\\\\\";
|
||||||
const EQEmu::Item_Struct* item = inst->GetUnscaledItem();
|
const EQEmu::ItemData* item = inst->GetUnscaledItem();
|
||||||
|
|
||||||
ob << StringFormat("%.*s%s", (depth ? (depth - 1) : 0), protection, (depth ? "\"" : "")); // For leading quotes (and protection) if a subitem;
|
ob << StringFormat("%.*s%s", (depth ? (depth - 1) : 0), protection, (depth ? "\"" : "")); // For leading quotes (and protection) if a subitem;
|
||||||
|
|
||||||
@@ -2325,10 +2440,10 @@ namespace Titanium
|
|||||||
ob << StringFormat("%.*s\"", depth, protection); // Quotes (and protection, if needed) around static data
|
ob << StringFormat("%.*s\"", depth, protection); // Quotes (and protection, if needed) around static data
|
||||||
|
|
||||||
// Sub data
|
// Sub data
|
||||||
for (int index = SUB_INDEX_BEGIN; index < invbag::ItemBagSize; ++index) {
|
for (int index = EQEmu::inventory::containerBegin; index < invbag::ItemBagSize; ++index) {
|
||||||
ob << '|';
|
ob << '|';
|
||||||
|
|
||||||
ItemInst* sub = inst->GetItem(index);
|
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||||
if (!sub)
|
if (!sub)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -2449,4 +2564,101 @@ namespace Titanium
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline CastingSlot ServerToTitaniumCastingSlot(EQEmu::CastingSlot slot)
|
||||||
|
{
|
||||||
|
switch (slot) {
|
||||||
|
case EQEmu::CastingSlot::Gem1:
|
||||||
|
return CastingSlot::Gem1;
|
||||||
|
case EQEmu::CastingSlot::Gem2:
|
||||||
|
return CastingSlot::Gem2;
|
||||||
|
case EQEmu::CastingSlot::Gem3:
|
||||||
|
return CastingSlot::Gem3;
|
||||||
|
case EQEmu::CastingSlot::Gem4:
|
||||||
|
return CastingSlot::Gem4;
|
||||||
|
case EQEmu::CastingSlot::Gem5:
|
||||||
|
return CastingSlot::Gem5;
|
||||||
|
case EQEmu::CastingSlot::Gem6:
|
||||||
|
return CastingSlot::Gem6;
|
||||||
|
case EQEmu::CastingSlot::Gem7:
|
||||||
|
return CastingSlot::Gem7;
|
||||||
|
case EQEmu::CastingSlot::Gem8:
|
||||||
|
return CastingSlot::Gem8;
|
||||||
|
case EQEmu::CastingSlot::Gem9:
|
||||||
|
return CastingSlot::Gem9;
|
||||||
|
case EQEmu::CastingSlot::Item:
|
||||||
|
return CastingSlot::Item;
|
||||||
|
case EQEmu::CastingSlot::PotionBelt:
|
||||||
|
return CastingSlot::PotionBelt;
|
||||||
|
case EQEmu::CastingSlot::Discipline:
|
||||||
|
return CastingSlot::Discipline;
|
||||||
|
case EQEmu::CastingSlot::AltAbility:
|
||||||
|
return CastingSlot::AltAbility;
|
||||||
|
default: // we shouldn't have any issues with other slots ... just return something
|
||||||
|
return CastingSlot::Discipline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline EQEmu::CastingSlot TitaniumToServerCastingSlot(CastingSlot slot, uint32 itemlocation)
|
||||||
|
{
|
||||||
|
switch (slot) {
|
||||||
|
case CastingSlot::Gem1:
|
||||||
|
return EQEmu::CastingSlot::Gem1;
|
||||||
|
case CastingSlot::Gem2:
|
||||||
|
return EQEmu::CastingSlot::Gem2;
|
||||||
|
case CastingSlot::Gem3:
|
||||||
|
return EQEmu::CastingSlot::Gem3;
|
||||||
|
case CastingSlot::Gem4:
|
||||||
|
return EQEmu::CastingSlot::Gem4;
|
||||||
|
case CastingSlot::Gem5:
|
||||||
|
return EQEmu::CastingSlot::Gem5;
|
||||||
|
case CastingSlot::Gem6:
|
||||||
|
return EQEmu::CastingSlot::Gem6;
|
||||||
|
case CastingSlot::Gem7:
|
||||||
|
return EQEmu::CastingSlot::Gem7;
|
||||||
|
case CastingSlot::Gem8:
|
||||||
|
return EQEmu::CastingSlot::Gem8;
|
||||||
|
case CastingSlot::Gem9:
|
||||||
|
return EQEmu::CastingSlot::Gem9;
|
||||||
|
case CastingSlot::Ability:
|
||||||
|
return EQEmu::CastingSlot::Ability;
|
||||||
|
// Tit uses 10 for item and discipline casting, but items have a valid location
|
||||||
|
case CastingSlot::Item:
|
||||||
|
if (itemlocation == INVALID_INDEX)
|
||||||
|
return EQEmu::CastingSlot::Discipline;
|
||||||
|
else
|
||||||
|
return EQEmu::CastingSlot::Item;
|
||||||
|
case CastingSlot::PotionBelt:
|
||||||
|
return EQEmu::CastingSlot::PotionBelt;
|
||||||
|
case CastingSlot::AltAbility:
|
||||||
|
return EQEmu::CastingSlot::AltAbility;
|
||||||
|
default: // we shouldn't have any issues with other slots ... just return something
|
||||||
|
return EQEmu::CastingSlot::Discipline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int ServerToTitaniumBuffSlot(int index)
|
||||||
|
{
|
||||||
|
// we're a disc
|
||||||
|
if (index >= EQEmu::constants::LongBuffs + EQEmu::constants::ShortBuffs)
|
||||||
|
return index - EQEmu::constants::LongBuffs - EQEmu::constants::ShortBuffs +
|
||||||
|
constants::LongBuffs + constants::ShortBuffs;
|
||||||
|
// we're a song
|
||||||
|
if (index >= EQEmu::constants::LongBuffs)
|
||||||
|
return index - EQEmu::constants::LongBuffs + constants::LongBuffs;
|
||||||
|
// we're a normal buff
|
||||||
|
return index; // as long as we guard against bad slots server side, we should be fine
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int TitaniumToServerBuffSlot(int index)
|
||||||
|
{
|
||||||
|
// we're a disc
|
||||||
|
if (index >= constants::LongBuffs + constants::ShortBuffs)
|
||||||
|
return index - constants::LongBuffs - constants::ShortBuffs + EQEmu::constants::LongBuffs +
|
||||||
|
EQEmu::constants::ShortBuffs;
|
||||||
|
// we're a song
|
||||||
|
if (index >= constants::LongBuffs)
|
||||||
|
return index - constants::LongBuffs + EQEmu::constants::LongBuffs;
|
||||||
|
// we're a normal buff
|
||||||
|
return index; // as long as we guard against bad slots server side, we should be fine
|
||||||
|
}
|
||||||
} /*Titanium*/
|
} /*Titanium*/
|
||||||
|
|||||||
@@ -50,6 +50,23 @@ namespace Titanium
|
|||||||
#include "titanium_ops.h"
|
#include "titanium_ops.h"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class CastingSlot : uint32 {
|
||||||
|
Gem1 = 0,
|
||||||
|
Gem2 = 1,
|
||||||
|
Gem3 = 2,
|
||||||
|
Gem4 = 3,
|
||||||
|
Gem5 = 4,
|
||||||
|
Gem6 = 5,
|
||||||
|
Gem7 = 6,
|
||||||
|
Gem8 = 7,
|
||||||
|
Gem9 = 8,
|
||||||
|
Ability = 9,
|
||||||
|
Item = 10,
|
||||||
|
Discipline = 10,
|
||||||
|
PotionBelt = 11,
|
||||||
|
AltAbility = 0xFF
|
||||||
|
};
|
||||||
|
|
||||||
}; /*Titanium*/
|
}; /*Titanium*/
|
||||||
|
|
||||||
#endif /*COMMON_TITANIUM_H*/
|
#endif /*COMMON_TITANIUM_H*/
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#include "../string_util.h"
|
#include "../string_util.h"
|
||||||
|
|
||||||
|
|
||||||
size_t Titanium::invtype::InvTypeSize(int inv_type)
|
size_t Titanium::invtype::GetInvTypeSize(int inv_type)
|
||||||
{
|
{
|
||||||
switch (inv_type) {
|
switch (inv_type) {
|
||||||
case invtype::InvTypePossessions:
|
case invtype::InvTypePossessions:
|
||||||
@@ -68,7 +68,7 @@ size_t Titanium::invtype::InvTypeSize(int inv_type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* Titanium::invtype::InvTypeName(int inv_type)
|
const char* Titanium::invtype::GetInvTypeName(int inv_type)
|
||||||
{
|
{
|
||||||
switch (inv_type) {
|
switch (inv_type) {
|
||||||
case invtype::InvTypeInvalid:
|
case invtype::InvTypeInvalid:
|
||||||
@@ -116,7 +116,24 @@ const char* Titanium::invtype::InvTypeName(int inv_type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* Titanium::invslot::InvPossessionsSlotName(int inv_slot)
|
bool Titanium::invtype::IsInvTypePersistent(int inv_type)
|
||||||
|
{
|
||||||
|
switch (inv_type) {
|
||||||
|
case invtype::InvTypePossessions:
|
||||||
|
case invtype::InvTypeBank:
|
||||||
|
case invtype::InvTypeSharedBank:
|
||||||
|
case invtype::InvTypeTrade:
|
||||||
|
case invtype::InvTypeWorld:
|
||||||
|
case invtype::InvTypeLimbo:
|
||||||
|
case invtype::InvTypeTribute:
|
||||||
|
case invtype::InvTypeGuildTribute:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* Titanium::invslot::GetInvPossessionsSlotName(int inv_slot)
|
||||||
{
|
{
|
||||||
switch (inv_slot) {
|
switch (inv_slot) {
|
||||||
case invslot::InvSlotInvalid:
|
case invslot::InvSlotInvalid:
|
||||||
@@ -188,9 +205,9 @@ const char* Titanium::invslot::InvPossessionsSlotName(int inv_slot)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* Titanium::invslot::InvCorpseSlotName(int inv_slot)
|
const char* Titanium::invslot::GetInvCorpseSlotName(int inv_slot)
|
||||||
{
|
{
|
||||||
if (!invtype::InvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid)
|
if (!invtype::GetInvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid)
|
||||||
return "Invalid Slot";
|
return "Invalid Slot";
|
||||||
|
|
||||||
// needs work
|
// needs work
|
||||||
@@ -203,14 +220,14 @@ const char* Titanium::invslot::InvCorpseSlotName(int inv_slot)
|
|||||||
return ret_str.c_str();
|
return ret_str.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* Titanium::invslot::InvSlotName(int inv_type, int inv_slot)
|
const char* Titanium::invslot::GetInvSlotName(int inv_type, int inv_slot)
|
||||||
{
|
{
|
||||||
if (inv_type == invtype::InvTypePossessions)
|
if (inv_type == invtype::InvTypePossessions)
|
||||||
return invslot::InvPossessionsSlotName(inv_slot);
|
return invslot::GetInvPossessionsSlotName(inv_slot);
|
||||||
else if (inv_type == invtype::InvTypeCorpse)
|
else if (inv_type == invtype::InvTypeCorpse)
|
||||||
return invslot::InvCorpseSlotName(inv_slot);
|
return invslot::GetInvCorpseSlotName(inv_slot);
|
||||||
|
|
||||||
size_t type_size = invtype::InvTypeSize(inv_type);
|
size_t type_size = invtype::GetInvTypeSize(inv_type);
|
||||||
|
|
||||||
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
||||||
return "Invalid Slot";
|
return "Invalid Slot";
|
||||||
@@ -224,7 +241,7 @@ const char* Titanium::invslot::InvSlotName(int inv_type, int inv_slot)
|
|||||||
return ret_str.c_str();
|
return ret_str.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* Titanium::invbag::InvBagIndexName(int bag_index)
|
const char* Titanium::invbag::GetInvBagIndexName(int bag_index)
|
||||||
{
|
{
|
||||||
if (bag_index == invbag::InvBagInvalid)
|
if (bag_index == invbag::InvBagInvalid)
|
||||||
return "Invalid Bag";
|
return "Invalid Bag";
|
||||||
@@ -238,7 +255,7 @@ const char* Titanium::invbag::InvBagIndexName(int bag_index)
|
|||||||
return ret_str.c_str();
|
return ret_str.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* Titanium::invaug::InvAugIndexName(int aug_index)
|
const char* Titanium::invaug::GetInvAugIndexName(int aug_index)
|
||||||
{
|
{
|
||||||
if (aug_index == invaug::InvAugInvalid)
|
if (aug_index == invaug::InvAugInvalid)
|
||||||
return "Invalid Augment";
|
return "Invalid Augment";
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#define COMMON_TITANIUM_LIMITS_H
|
#define COMMON_TITANIUM_LIMITS_H
|
||||||
|
|
||||||
#include "../types.h"
|
#include "../types.h"
|
||||||
#include "../client_version.h"
|
#include "../emu_versions.h"
|
||||||
#include "../skills.h"
|
#include "../skills.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -32,8 +32,13 @@ namespace Titanium
|
|||||||
enum : bool { False = false, True = true };
|
enum : bool { False = false, True = true };
|
||||||
|
|
||||||
// pre-declarations
|
// pre-declarations
|
||||||
|
namespace inventory {
|
||||||
|
inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||||
|
|
||||||
|
} /*inventory*/
|
||||||
|
|
||||||
namespace invtype {
|
namespace invtype {
|
||||||
inline EQEmu::versions::ClientVersion InvTypeRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||||
|
|
||||||
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
||||||
|
|
||||||
@@ -63,7 +68,7 @@ namespace Titanium
|
|||||||
} /*invtype*/
|
} /*invtype*/
|
||||||
|
|
||||||
namespace invslot {
|
namespace invslot {
|
||||||
inline EQEmu::versions::ClientVersion InvSlotRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||||
|
|
||||||
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
||||||
|
|
||||||
@@ -113,21 +118,21 @@ namespace Titanium
|
|||||||
} /*invslot*/
|
} /*invslot*/
|
||||||
|
|
||||||
namespace invbag {
|
namespace invbag {
|
||||||
inline EQEmu::versions::ClientVersion InvBagRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||||
|
|
||||||
enum : int { InvBagInvalid = -1, InvBagBegin };
|
enum : int { InvBagInvalid = -1, InvBagBegin };
|
||||||
|
|
||||||
} /*invbag*/
|
} /*invbag*/
|
||||||
|
|
||||||
namespace invaug {
|
namespace invaug {
|
||||||
inline EQEmu::versions::ClientVersion InvAugRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||||
|
|
||||||
enum : int { InvAugInvalid = -1, InvAugBegin };
|
enum : int { InvAugInvalid = -1, InvAugBegin };
|
||||||
|
|
||||||
} /*invaug*/
|
} /*invaug*/
|
||||||
|
|
||||||
namespace item {
|
namespace item {
|
||||||
inline EQEmu::versions::ClientVersion ItemRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
inline EQEmu::versions::ClientVersion GetItemRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||||
|
|
||||||
enum ItemPacketType : int {
|
enum ItemPacketType : int {
|
||||||
ItemPacketMerchant = 100,
|
ItemPacketMerchant = 100,
|
||||||
@@ -145,27 +150,37 @@ namespace Titanium
|
|||||||
} /*item*/
|
} /*item*/
|
||||||
|
|
||||||
namespace profile {
|
namespace profile {
|
||||||
inline EQEmu::versions::ClientVersion ProfileRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||||
|
|
||||||
} /*profile*/
|
} /*profile*/
|
||||||
|
|
||||||
namespace constants {
|
namespace constants {
|
||||||
inline EQEmu::versions::ClientVersion ConstantsRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||||
|
|
||||||
} /*constants*/
|
} /*constants*/
|
||||||
|
|
||||||
namespace behavior {
|
namespace behavior {
|
||||||
inline EQEmu::versions::ClientVersion BehaviorRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||||
|
|
||||||
} /*behavior*/
|
} /*behavior*/
|
||||||
|
|
||||||
namespace skills {
|
namespace skills {
|
||||||
inline EQEmu::versions::ClientVersion SkillsRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||||
|
|
||||||
} /*skills*/
|
} /*skills*/
|
||||||
|
|
||||||
|
|
||||||
// declarations
|
// declarations
|
||||||
|
namespace inventory {
|
||||||
|
const bool ConcatenateInvTypeLimbo = true;
|
||||||
|
|
||||||
|
const bool AllowOverLevelEquipment = false;
|
||||||
|
|
||||||
|
const bool AllowEmptyBagInBag = false;
|
||||||
|
const bool AllowClickCastFromBag = false;
|
||||||
|
|
||||||
|
} /*inventory*/
|
||||||
|
|
||||||
namespace invtype {
|
namespace invtype {
|
||||||
const size_t InvTypePossessionsSize = invslot::PossessionsCount;
|
const size_t InvTypePossessionsSize = invslot::PossessionsCount;
|
||||||
const size_t InvTypeBankSize = 16;
|
const size_t InvTypeBankSize = 16;
|
||||||
@@ -174,7 +189,7 @@ namespace Titanium
|
|||||||
const size_t InvTypeWorldSize = 10;
|
const size_t InvTypeWorldSize = 10;
|
||||||
const size_t InvTypeLimboSize = 36;
|
const size_t InvTypeLimboSize = 36;
|
||||||
const size_t InvTypeTributeSize = 5;
|
const size_t InvTypeTributeSize = 5;
|
||||||
const size_t InvTypeGuildTributeSize = 0;//unknown
|
const size_t InvTypeGuildTributeSize = 2;
|
||||||
const size_t InvTypeMerchantSize = 80;
|
const size_t InvTypeMerchantSize = 80;
|
||||||
const size_t InvTypeCorpseSize = InvTypePossessionsSize;
|
const size_t InvTypeCorpseSize = InvTypePossessionsSize;
|
||||||
const size_t InvTypeBazaarSize = 80;
|
const size_t InvTypeBazaarSize = 80;
|
||||||
@@ -187,10 +202,10 @@ namespace Titanium
|
|||||||
const size_t InvTypeArchivedSize = 0;//unknown
|
const size_t InvTypeArchivedSize = 0;//unknown
|
||||||
const size_t InvTypeOtherSize = 0;//unknown
|
const size_t InvTypeOtherSize = 0;//unknown
|
||||||
|
|
||||||
const size_t NPCTradeSize = 4;
|
extern size_t GetInvTypeSize(int inv_type);
|
||||||
|
extern const char* GetInvTypeName(int inv_type);
|
||||||
|
|
||||||
extern size_t InvTypeSize(int inv_type);
|
extern bool IsInvTypePersistent(int inv_type);
|
||||||
extern const char* InvTypeName(int inv_type);
|
|
||||||
|
|
||||||
} /*invtype*/
|
} /*invtype*/
|
||||||
|
|
||||||
@@ -209,14 +224,17 @@ namespace Titanium
|
|||||||
const int WorldEnd = (WorldBegin + invtype::InvTypeWorldSize) - 1;
|
const int WorldEnd = (WorldBegin + invtype::InvTypeWorldSize) - 1;
|
||||||
|
|
||||||
const int TributeBegin = 400;
|
const int TributeBegin = 400;
|
||||||
const int TributeEnd = 404;
|
const int TributeEnd = (TributeBegin + invtype::InvTypeTributeSize) - 1;
|
||||||
|
|
||||||
|
const int GuildTributeBegin = 450;
|
||||||
|
const int GuildTributeEnd = (GuildTributeBegin + invtype::InvTypeGuildTributeSize) - 1;
|
||||||
|
|
||||||
const int CorpseBegin = PossessionsGeneral1;
|
const int CorpseBegin = PossessionsGeneral1;
|
||||||
const int CorpseEnd = PossessionsGeneral1 + PossessionsCursor;
|
const int CorpseEnd = PossessionsGeneral1 + PossessionsCursor;
|
||||||
|
|
||||||
extern const char* InvPossessionsSlotName(int inv_slot);
|
extern const char* GetInvPossessionsSlotName(int inv_slot);
|
||||||
extern const char* InvCorpseSlotName(int inv_slot);
|
extern const char* GetInvCorpseSlotName(int inv_slot);
|
||||||
extern const char* InvSlotName(int inv_type, int inv_slot);
|
extern const char* GetInvSlotName(int inv_type, int inv_slot);
|
||||||
|
|
||||||
} /*invslot*/
|
} /*invslot*/
|
||||||
|
|
||||||
@@ -243,14 +261,14 @@ namespace Titanium
|
|||||||
const int TradeBagsSize = invtype::InvTypeTradeSize * ItemBagSize;
|
const int TradeBagsSize = invtype::InvTypeTradeSize * ItemBagSize;
|
||||||
const int TradeBagsEnd = (TradeBagsBegin + TradeBagsSize) - 1;
|
const int TradeBagsEnd = (TradeBagsBegin + TradeBagsSize) - 1;
|
||||||
|
|
||||||
extern const char* InvBagIndexName(int bag_index);
|
extern const char* GetInvBagIndexName(int bag_index);
|
||||||
|
|
||||||
} /*invbag*/
|
} /*invbag*/
|
||||||
|
|
||||||
namespace invaug {
|
namespace invaug {
|
||||||
const size_t ItemAugSize = 5;
|
const size_t ItemAugSize = 5;
|
||||||
|
|
||||||
extern const char* InvAugIndexName(int aug_index);
|
extern const char* GetInvAugIndexName(int aug_index);
|
||||||
|
|
||||||
} /*invaug*/
|
} /*invaug*/
|
||||||
|
|
||||||
@@ -260,6 +278,7 @@ namespace Titanium
|
|||||||
|
|
||||||
namespace profile {
|
namespace profile {
|
||||||
const size_t TributeSize = invtype::InvTypeTributeSize;
|
const size_t TributeSize = invtype::InvTypeTributeSize;
|
||||||
|
const size_t GuildTributeSize = invtype::InvTypeGuildTributeSize;
|
||||||
|
|
||||||
const size_t BandoliersSize = 4; // number of bandolier instances
|
const size_t BandoliersSize = 4; // number of bandolier instances
|
||||||
const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance
|
const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance
|
||||||
@@ -275,16 +294,17 @@ namespace Titanium
|
|||||||
|
|
||||||
const size_t SayLinkBodySize = 45;
|
const size_t SayLinkBodySize = 45;
|
||||||
|
|
||||||
|
const int LongBuffs = 25;
|
||||||
|
const int ShortBuffs = 12;
|
||||||
|
const int DiscBuffs = 1;
|
||||||
|
const int TotalBuffs = LongBuffs + ShortBuffs + DiscBuffs;
|
||||||
|
const int NPCBuffs = 60;
|
||||||
|
const int PetBuffs = 30;
|
||||||
|
const int MercBuffs = 0;
|
||||||
|
|
||||||
} /*constants*/
|
} /*constants*/
|
||||||
|
|
||||||
namespace behavior {
|
namespace behavior {
|
||||||
const bool ConcatenateInvTypeLimbo = true;
|
|
||||||
|
|
||||||
const bool AllowOverLevelEquipment = false;
|
|
||||||
|
|
||||||
const bool AllowEmptyBagInBag = false;
|
|
||||||
const bool AllowClickCastFromBag = false;
|
|
||||||
|
|
||||||
const bool CoinHasWeight = true;
|
const bool CoinHasWeight = true;
|
||||||
|
|
||||||
} /*behavior*/
|
} /*behavior*/
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ E(OP_AdventureMerchantSell)
|
|||||||
E(OP_ApplyPoison)
|
E(OP_ApplyPoison)
|
||||||
E(OP_BazaarSearch)
|
E(OP_BazaarSearch)
|
||||||
E(OP_BecomeTrader)
|
E(OP_BecomeTrader)
|
||||||
|
E(OP_Buff)
|
||||||
E(OP_ChannelMessage)
|
E(OP_ChannelMessage)
|
||||||
E(OP_CharInventory)
|
E(OP_CharInventory)
|
||||||
E(OP_Damage)
|
E(OP_Damage)
|
||||||
@@ -39,6 +40,7 @@ E(OP_DzLeaderStatus)
|
|||||||
E(OP_DzMemberList)
|
E(OP_DzMemberList)
|
||||||
E(OP_Emote)
|
E(OP_Emote)
|
||||||
E(OP_FormattedMessage)
|
E(OP_FormattedMessage)
|
||||||
|
E(OP_GroundSpawn)
|
||||||
E(OP_GuildMemberLevelUpdate)
|
E(OP_GuildMemberLevelUpdate)
|
||||||
E(OP_GuildMemberList)
|
E(OP_GuildMemberList)
|
||||||
E(OP_Illusion)
|
E(OP_Illusion)
|
||||||
@@ -49,6 +51,7 @@ E(OP_ItemPacket)
|
|||||||
E(OP_LeadershipExpUpdate)
|
E(OP_LeadershipExpUpdate)
|
||||||
E(OP_LFGuild)
|
E(OP_LFGuild)
|
||||||
E(OP_LootItem)
|
E(OP_LootItem)
|
||||||
|
E(OP_MemorizeSpell)
|
||||||
E(OP_MoveItem)
|
E(OP_MoveItem)
|
||||||
E(OP_OnLevelMessage)
|
E(OP_OnLevelMessage)
|
||||||
E(OP_PetBuffWindow)
|
E(OP_PetBuffWindow)
|
||||||
@@ -74,6 +77,7 @@ E(OP_ZoneSpawns)
|
|||||||
D(OP_AdventureMerchantSell)
|
D(OP_AdventureMerchantSell)
|
||||||
D(OP_ApplyPoison)
|
D(OP_ApplyPoison)
|
||||||
D(OP_AugmentItem)
|
D(OP_AugmentItem)
|
||||||
|
D(OP_Buff)
|
||||||
D(OP_CastSpell)
|
D(OP_CastSpell)
|
||||||
D(OP_ChannelMessage)
|
D(OP_ChannelMessage)
|
||||||
D(OP_CharacterCreate)
|
D(OP_CharacterCreate)
|
||||||
@@ -85,6 +89,7 @@ D(OP_InspectAnswer)
|
|||||||
D(OP_InspectRequest)
|
D(OP_InspectRequest)
|
||||||
D(OP_ItemLinkClick)
|
D(OP_ItemLinkClick)
|
||||||
D(OP_LFGuild)
|
D(OP_LFGuild)
|
||||||
|
D(OP_LoadSpellSet)
|
||||||
D(OP_LootItem)
|
D(OP_LootItem)
|
||||||
D(OP_MoveItem)
|
D(OP_MoveItem)
|
||||||
D(OP_PetCommands)
|
D(OP_PetCommands)
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ struct AdventureInfo {
|
|||||||
** Merth: Gave struct a name so gcc 2.96 would compile
|
** Merth: Gave struct a name so gcc 2.96 would compile
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
struct Color_Struct
|
struct Tint_Struct
|
||||||
{
|
{
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
@@ -126,11 +126,53 @@ struct Color_Struct
|
|||||||
uint8 Green;
|
uint8 Green;
|
||||||
uint8 Red;
|
uint8 Red;
|
||||||
uint8 UseTint; // if there's a tint this is FF
|
uint8 UseTint; // if there's a tint this is FF
|
||||||
} RGB;
|
};
|
||||||
uint32 Color;
|
uint32 Color;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct TintProfile {
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
Tint_Struct Head;
|
||||||
|
Tint_Struct Chest;
|
||||||
|
Tint_Struct Arms;
|
||||||
|
Tint_Struct Wrist;
|
||||||
|
Tint_Struct Hands;
|
||||||
|
Tint_Struct Legs;
|
||||||
|
Tint_Struct Feet;
|
||||||
|
Tint_Struct Primary;
|
||||||
|
Tint_Struct Secondary;
|
||||||
|
};
|
||||||
|
Tint_Struct Slot[EQEmu::textures::materialCount];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Texture_Struct
|
||||||
|
{
|
||||||
|
uint32 Material;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct TextureProfile
|
||||||
|
{
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
Texture_Struct Head;
|
||||||
|
Texture_Struct Chest;
|
||||||
|
Texture_Struct Arms;
|
||||||
|
Texture_Struct Wrist;
|
||||||
|
Texture_Struct Hands;
|
||||||
|
Texture_Struct Legs;
|
||||||
|
Texture_Struct Feet;
|
||||||
|
Texture_Struct Primary;
|
||||||
|
Texture_Struct Secondary;
|
||||||
|
};
|
||||||
|
Texture_Struct Slot[EQEmu::textures::materialCount];
|
||||||
|
};
|
||||||
|
|
||||||
|
TextureProfile();
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Character Selection Struct
|
** Character Selection Struct
|
||||||
** Length: 1704 Bytes
|
** Length: 1704 Bytes
|
||||||
@@ -139,10 +181,10 @@ struct Color_Struct
|
|||||||
struct CharacterSelect_Struct
|
struct CharacterSelect_Struct
|
||||||
{
|
{
|
||||||
/*0000*/ uint32 Race[10]; // Characters Race
|
/*0000*/ uint32 Race[10]; // Characters Race
|
||||||
/*0040*/ Color_Struct CS_Colors[10][9]; // Characters Equipment Colors
|
/*0040*/ TintProfile CS_Colors[10]; // Characters Equipment Colors - packet requires length for 10 characters..but, client is limited to 8
|
||||||
/*0400*/ uint8 BeardColor[10]; // Characters beard Color
|
/*0400*/ uint8 BeardColor[10]; // Characters beard Color
|
||||||
/*0410*/ uint8 HairStyle[10]; // Characters hair style
|
/*0410*/ uint8 HairStyle[10]; // Characters hair style
|
||||||
/*0420*/ uint32 Equip[10][9]; // 0=helm, 1=chest, 2=arm, 3=bracer, 4=hand, 5=leg, 6=boot, 7=melee1, 8=melee2 (Might not be)
|
/*0420*/ TextureProfile Equip[10]; // Characters texture array
|
||||||
/*0780*/ uint32 SecondaryIDFile[10]; // Characters secondary IDFile number
|
/*0780*/ uint32 SecondaryIDFile[10]; // Characters secondary IDFile number
|
||||||
/*0820*/ uint8 Unknown820[10]; // 10x ff
|
/*0820*/ uint8 Unknown820[10]; // 10x ff
|
||||||
/*0830*/ uint8 Unknown830[2]; // 2x 00
|
/*0830*/ uint8 Unknown830[2]; // 2x 00
|
||||||
@@ -239,22 +281,7 @@ struct Spawn_Struct {
|
|||||||
/*0189*/ uint32 petOwnerId; // If this is a pet, the spawn id of owner
|
/*0189*/ uint32 petOwnerId; // If this is a pet, the spawn id of owner
|
||||||
/*0193*/ uint8 guildrank; // 0=normal, 1=officer, 2=leader
|
/*0193*/ uint8 guildrank; // 0=normal, 1=officer, 2=leader
|
||||||
/*0194*/ uint8 unknown0194[3];
|
/*0194*/ uint8 unknown0194[3];
|
||||||
/*0197*/ union
|
/*0197*/ TextureProfile equipment;
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
/*0197*/ uint32 equip_helmet; // Equipment: Helmet Visual
|
|
||||||
/*0201*/ uint32 equip_chest; // Equipment: Chest Visual
|
|
||||||
/*0205*/ uint32 equip_arms; // Equipment: Arms Visual
|
|
||||||
/*0209*/ uint32 equip_bracers; // Equipment: Bracers Visual
|
|
||||||
/*0213*/ uint32 equip_hands; // Equipment: Hands Visual
|
|
||||||
/*0217*/ uint32 equip_legs; // Equipment: Legs Visual
|
|
||||||
/*0221*/ uint32 equip_feet; // Equipment: Feet Visual
|
|
||||||
/*0225*/ uint32 equip_primary; // Equipment: Primary Visual
|
|
||||||
/*0229*/ uint32 equip_secondary; // Equipment: Secondary Visual
|
|
||||||
} equip;
|
|
||||||
/*0197*/ uint32 equipment[9]; // Array elements correspond to struct equipment above
|
|
||||||
};
|
|
||||||
/*0233*/ float runspeed; // Speed when running
|
/*0233*/ float runspeed; // Speed when running
|
||||||
/*0036*/ uint8 afk; // 0=no, 1=afk
|
/*0036*/ uint8 afk; // 0=no, 1=afk
|
||||||
/*0238*/ uint32 guildID; // Current guild
|
/*0238*/ uint32 guildID; // Current guild
|
||||||
@@ -284,22 +311,7 @@ union
|
|||||||
};
|
};
|
||||||
/*0340*/ uint32 spawnId; // Spawn Id
|
/*0340*/ uint32 spawnId; // Spawn Id
|
||||||
/*0344*/ uint8 unknown0344[4];
|
/*0344*/ uint8 unknown0344[4];
|
||||||
/*0348*/ union
|
/*0348*/ TintProfile equipment_tint;
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
/*0348*/ Color_Struct color_helmet; // Color of helmet item
|
|
||||||
/*0352*/ Color_Struct color_chest; // Color of chest item
|
|
||||||
/*0356*/ Color_Struct color_arms; // Color of arms item
|
|
||||||
/*0360*/ Color_Struct color_bracers; // Color of bracers item
|
|
||||||
/*0364*/ Color_Struct color_hands; // Color of hands item
|
|
||||||
/*0368*/ Color_Struct color_legs; // Color of legs item
|
|
||||||
/*0372*/ Color_Struct color_feet; // Color of feet item
|
|
||||||
/*0376*/ Color_Struct color_primary; // Color of primary item
|
|
||||||
/*0380*/ Color_Struct color_secondary; // Color of secondary item
|
|
||||||
} equipment_colors;
|
|
||||||
/*0348*/ Color_Struct colors[9]; // Array elements correspond to struct equipment_colors above
|
|
||||||
};
|
|
||||||
/*0384*/ uint8 lfg; // 0=off, 1=lfg on
|
/*0384*/ uint8 lfg; // 0=off, 1=lfg on
|
||||||
/*0385*/
|
/*0385*/
|
||||||
|
|
||||||
@@ -378,7 +390,7 @@ struct MemorizeSpell_Struct {
|
|||||||
uint32 slot; // Spot in the spell book/memorized slot
|
uint32 slot; // Spot in the spell book/memorized slot
|
||||||
uint32 spell_id; // Spell id (200 or c8 is minor healing, etc)
|
uint32 spell_id; // Spell id (200 or c8 is minor healing, etc)
|
||||||
uint32 scribing; // 1 if memorizing a spell, set to 0 if scribing to book, 2 if un-memming
|
uint32 scribing; // 1 if memorizing a spell, set to 0 if scribing to book, 2 if un-memming
|
||||||
uint32 unknown12;
|
uint32 reduction; // lowers reuse
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -408,13 +420,13 @@ struct DeleteSpell_Struct
|
|||||||
/*005*/uint8 unknowndss006[3];
|
/*005*/uint8 unknowndss006[3];
|
||||||
/*008*/
|
/*008*/
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ManaChange_Struct
|
struct ManaChange_Struct
|
||||||
{
|
{
|
||||||
uint32 new_mana; // New Mana AMount
|
/*00*/ uint32 new_mana; // New Mana AMount
|
||||||
uint32 stamina;
|
/*04*/ uint32 stamina;
|
||||||
uint32 spell_id;
|
/*08*/ uint32 spell_id;
|
||||||
uint32 unknown12;
|
/*12*/ uint8 keepcasting; // won't stop the cast. Change mana while casting?
|
||||||
|
/*13*/ uint8 padding[3]; // client doesn't read it, garbage data seems like
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SwapSpell_Struct
|
struct SwapSpell_Struct
|
||||||
@@ -461,26 +473,19 @@ struct SpawnAppearance_Struct
|
|||||||
// this is used inside profile
|
// this is used inside profile
|
||||||
struct SpellBuff_Struct
|
struct SpellBuff_Struct
|
||||||
{
|
{
|
||||||
/*000*/ uint8 slotid; //badly named... seems to be 2 for a real buff, 0 otherwise
|
/*000*/ uint8 effect_type; // 0 = no buff, 2 = buff, 4 = inverse affects of buff
|
||||||
/*001*/ uint8 level;
|
/*001*/ uint8 level;
|
||||||
/*002*/ uint8 bard_modifier;
|
/*002*/ uint8 bard_modifier;
|
||||||
/*003*/ uint8 effect; //not real
|
/*003*/ uint8 unknown003; // MQ2 used to call this "damage shield" -- don't see client referencing it, so maybe server side DS type tracking?
|
||||||
/*004*/ uint32 spellid;
|
/*004*/ uint32 spellid;
|
||||||
/*008*/ int32 duration;
|
/*008*/ int32 duration;
|
||||||
/*012*/ uint32 counters;
|
/*012*/ uint32 counters; // single book keeping value (counters, rune/vie)
|
||||||
/*016*/ uint32 player_id; //'global' ID of the caster, for wearoff messages
|
/*016*/ uint32 player_id; // caster ID, pretty sure just zone ID
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SpellBuffFade_Struct {
|
struct SpellBuffPacket_Struct {
|
||||||
/*000*/ uint32 entityid;
|
/*000*/ uint32 entityid;
|
||||||
/*004*/ uint8 slot;
|
/*004*/ SpellBuff_Struct buff;
|
||||||
/*005*/ uint8 level;
|
|
||||||
/*006*/ uint8 effect;
|
|
||||||
/*007*/ uint8 unknown7;
|
|
||||||
/*008*/ uint32 spellid;
|
|
||||||
/*012*/ int32 duration;
|
|
||||||
/*016*/ uint32 unknown016;
|
|
||||||
/*020*/ uint32 unknown020; //prolly global player ID
|
|
||||||
/*024*/ uint32 slotid;
|
/*024*/ uint32 slotid;
|
||||||
/*028*/ uint32 bufffade;
|
/*028*/ uint32 bufffade;
|
||||||
/*032*/
|
/*032*/
|
||||||
@@ -810,9 +815,9 @@ struct PlayerProfile_Struct
|
|||||||
/*00176*/ uint8 hairstyle; // Player hair style
|
/*00176*/ uint8 hairstyle; // Player hair style
|
||||||
/*00177*/ uint8 beard; // Player beard type
|
/*00177*/ uint8 beard; // Player beard type
|
||||||
/*00178*/ uint8 unknown00178[10];
|
/*00178*/ uint8 unknown00178[10];
|
||||||
/*00188*/ uint32 item_material[9]; // Item texture/material of worn items
|
/*00188*/ TextureProfile item_material; // Item texture/material of worn items
|
||||||
/*00224*/ uint8 unknown00224[44];
|
/*00224*/ uint8 unknown00224[44];
|
||||||
/*00268*/ Color_Struct item_tint[9]; // RR GG BB 00
|
/*00268*/ TintProfile item_tint; // RR GG BB 00
|
||||||
/*00304*/ AA_Array aa_array[MAX_PP_AA_ARRAY]; // AAs
|
/*00304*/ AA_Array aa_array[MAX_PP_AA_ARRAY]; // AAs
|
||||||
/*02224*/ uint32 points; // Unspent Practice points
|
/*02224*/ uint32 points; // Unspent Practice points
|
||||||
/*02228*/ uint32 mana; // Current mana
|
/*02228*/ uint32 mana; // Current mana
|
||||||
@@ -1035,7 +1040,7 @@ struct SpecialMesg_Struct
|
|||||||
struct WearChange_Struct{
|
struct WearChange_Struct{
|
||||||
/*000*/ uint16 spawn_id;
|
/*000*/ uint16 spawn_id;
|
||||||
/*002*/ uint16 material;
|
/*002*/ uint16 material;
|
||||||
/*004*/ Color_Struct color;
|
/*004*/ Tint_Struct color;
|
||||||
/*009*/ uint8 wear_slot_id;
|
/*009*/ uint8 wear_slot_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1415,7 +1420,7 @@ struct LootingItem_Struct {
|
|||||||
/*002*/ uint32 looter;
|
/*002*/ uint32 looter;
|
||||||
/*004*/ uint16 slot_id;
|
/*004*/ uint16 slot_id;
|
||||||
/*006*/ uint8 unknown3[2];
|
/*006*/ uint8 unknown3[2];
|
||||||
/*008*/ uint32 auto_loot;
|
/*008*/ int32 auto_loot;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GuildManageStatus_Struct{
|
struct GuildManageStatus_Struct{
|
||||||
@@ -1652,8 +1657,7 @@ struct Merchant_Sell_Struct {
|
|||||||
/*004*/ uint32 playerid; // Player's entity id
|
/*004*/ uint32 playerid; // Player's entity id
|
||||||
/*008*/ uint32 itemslot;
|
/*008*/ uint32 itemslot;
|
||||||
uint32 unknown12;
|
uint32 unknown12;
|
||||||
/*016*/ uint8 quantity; // Already sold
|
/*016*/ uint32 quantity;
|
||||||
/*017*/ uint8 Unknown016[3];
|
|
||||||
/*020*/ uint32 price;
|
/*020*/ uint32 price;
|
||||||
};
|
};
|
||||||
struct Merchant_Purchase_Struct {
|
struct Merchant_Purchase_Struct {
|
||||||
@@ -2591,27 +2595,6 @@ struct PetitionBug_Struct{
|
|||||||
char text[1028];
|
char text[1028];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DyeStruct
|
|
||||||
{
|
|
||||||
union
|
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
struct Color_Struct head;
|
|
||||||
struct Color_Struct chest;
|
|
||||||
struct Color_Struct arms;
|
|
||||||
struct Color_Struct wrists;
|
|
||||||
struct Color_Struct hands;
|
|
||||||
struct Color_Struct legs;
|
|
||||||
struct Color_Struct feet;
|
|
||||||
struct Color_Struct primary; // you can't actually dye this
|
|
||||||
struct Color_Struct secondary; // or this
|
|
||||||
}
|
|
||||||
dyes;
|
|
||||||
struct Color_Struct dye[9];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ApproveZone_Struct {
|
struct ApproveZone_Struct {
|
||||||
char name[64];
|
char name[64];
|
||||||
uint32 zoneid;
|
uint32 zoneid;
|
||||||
@@ -3245,6 +3228,11 @@ struct AnnoyingZoneUnknown_Struct {
|
|||||||
uint32 value; //always 4
|
uint32 value; //always 4
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct LoadSpellSet_Struct {
|
||||||
|
uint32 spell[MAX_PP_MEMSPELL];
|
||||||
|
uint32 unknown;
|
||||||
|
};
|
||||||
|
|
||||||
struct ApplyPoison_Struct {
|
struct ApplyPoison_Struct {
|
||||||
uint32 inventorySlot;
|
uint32 inventorySlot;
|
||||||
uint32 success;
|
uint32 success;
|
||||||
|
|||||||
+185
-88
@@ -29,7 +29,7 @@
|
|||||||
#include "../eq_packet_structs.h"
|
#include "../eq_packet_structs.h"
|
||||||
#include "../misc_functions.h"
|
#include "../misc_functions.h"
|
||||||
#include "../string_util.h"
|
#include "../string_util.h"
|
||||||
#include "../item.h"
|
#include "../item_instance.h"
|
||||||
#include "uf_structs.h"
|
#include "uf_structs.h"
|
||||||
#include "../rulesys.h"
|
#include "../rulesys.h"
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ namespace UF
|
|||||||
static OpcodeManager *opcodes = nullptr;
|
static OpcodeManager *opcodes = nullptr;
|
||||||
static Strategy struct_strategy;
|
static Strategy struct_strategy;
|
||||||
|
|
||||||
void SerializeItem(EQEmu::OutBuffer& ob, const ItemInst *inst, int16 slot_id, uint8 depth);
|
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id, uint8 depth);
|
||||||
|
|
||||||
// server to client inventory location converters
|
// server to client inventory location converters
|
||||||
static inline uint32 ServerToUFSlot(uint32 serverSlot);
|
static inline uint32 ServerToUFSlot(uint32 serverSlot);
|
||||||
@@ -59,6 +59,12 @@ namespace UF
|
|||||||
// client to server text link converter
|
// client to server text link converter
|
||||||
static inline void UFToServerTextLink(std::string& serverTextLink, const std::string& ufTextLink);
|
static inline void UFToServerTextLink(std::string& serverTextLink, const std::string& ufTextLink);
|
||||||
|
|
||||||
|
static inline CastingSlot ServerToUFCastingSlot(EQEmu::CastingSlot slot);
|
||||||
|
static inline EQEmu::CastingSlot UFToServerCastingSlot(CastingSlot slot);
|
||||||
|
|
||||||
|
static inline int ServerToUFBuffSlot(int index);
|
||||||
|
static inline int UFToServerBuffSlot(int index);
|
||||||
|
|
||||||
void Register(EQStreamIdentifier &into)
|
void Register(EQStreamIdentifier &into)
|
||||||
{
|
{
|
||||||
//create our opcode manager if we havent already
|
//create our opcode manager if we havent already
|
||||||
@@ -363,20 +369,20 @@ namespace UF
|
|||||||
|
|
||||||
ENCODE(OP_Buff)
|
ENCODE(OP_Buff)
|
||||||
{
|
{
|
||||||
ENCODE_LENGTH_EXACT(SpellBuffFade_Struct);
|
ENCODE_LENGTH_EXACT(SpellBuffPacket_Struct);
|
||||||
SETUP_DIRECT_ENCODE(SpellBuffFade_Struct, structs::SpellBuffFade_Struct_Underfoot);
|
SETUP_DIRECT_ENCODE(SpellBuffPacket_Struct, structs::SpellBuffPacket_Struct);
|
||||||
|
|
||||||
OUT(entityid);
|
OUT(entityid);
|
||||||
OUT(slot);
|
OUT(buff.effect_type);
|
||||||
OUT(level);
|
OUT(buff.level);
|
||||||
OUT(effect);
|
// just so we're 100% sure we get a 1.0f ...
|
||||||
//eq->unknown7 = 10;
|
eq->buff.bard_modifier = emu->buff.bard_modifier == 10 ? 1.0f : emu->buff.bard_modifier / 10.0f;
|
||||||
OUT(spellid);
|
OUT(buff.spellid);
|
||||||
OUT(duration);
|
OUT(buff.duration);
|
||||||
OUT(slotid);
|
OUT(buff.num_hits);
|
||||||
|
// TODO: implement slot_data stuff
|
||||||
|
eq->slotid = ServerToUFBuffSlot(emu->slotid);
|
||||||
OUT(bufffade); // Live (October 2011) sends a 2 rather than 0 when a buff is created, but it doesn't seem to matter.
|
OUT(bufffade); // Live (October 2011) sends a 2 rather than 0 when a buff is created, but it doesn't seem to matter.
|
||||||
OUT(num_hits);
|
|
||||||
eq->unknown008 = 1.0f;
|
|
||||||
|
|
||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
}
|
}
|
||||||
@@ -395,19 +401,9 @@ namespace UF
|
|||||||
__packet->WriteUInt8(emu->all_buffs); // 1 = all buffs, 0 = 1 buff
|
__packet->WriteUInt8(emu->all_buffs); // 1 = all buffs, 0 = 1 buff
|
||||||
__packet->WriteUInt16(emu->count);
|
__packet->WriteUInt16(emu->count);
|
||||||
|
|
||||||
for (uint16 i = 0; i < emu->count; ++i)
|
for (int i = 0; i < emu->count; ++i)
|
||||||
{
|
{
|
||||||
uint16 buffslot = emu->entries[i].buff_slot;
|
__packet->WriteUInt32(emu->type == 0 ? ServerToUFBuffSlot(emu->entries[i].buff_slot) : emu->entries[i].buff_slot);
|
||||||
if (emu->entries[i].buff_slot >= 25 && emu->entries[i].buff_slot < 37)
|
|
||||||
{
|
|
||||||
buffslot += 5;
|
|
||||||
}
|
|
||||||
else if (emu->entries[i].buff_slot >= 37)
|
|
||||||
{
|
|
||||||
buffslot += 14;
|
|
||||||
}
|
|
||||||
|
|
||||||
__packet->WriteUInt32(buffslot);
|
|
||||||
__packet->WriteUInt32(emu->entries[i].spell_id);
|
__packet->WriteUInt32(emu->entries[i].spell_id);
|
||||||
__packet->WriteUInt32(emu->entries[i].tics_remaining);
|
__packet->WriteUInt32(emu->entries[i].tics_remaining);
|
||||||
__packet->WriteUInt32(emu->entries[i].num_hits);
|
__packet->WriteUInt32(emu->entries[i].num_hits);
|
||||||
@@ -531,7 +527,7 @@ namespace UF
|
|||||||
ob.write((const char*)&item_count, sizeof(uint32));
|
ob.write((const char*)&item_count, sizeof(uint32));
|
||||||
|
|
||||||
for (int index = 0; index < item_count; ++index, ++eq) {
|
for (int index = 0; index < item_count; ++index, ++eq) {
|
||||||
SerializeItem(ob, (const ItemInst*)eq->inst, eq->slot_id, 0);
|
SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0);
|
||||||
if (ob.tellp() == last_pos)
|
if (ob.tellp() == last_pos)
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id);
|
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id);
|
||||||
|
|
||||||
@@ -865,8 +861,8 @@ namespace UF
|
|||||||
// This next field is actually a float. There is a groundspawn in freeportwest (sack of money sitting on some barrels) which requires this
|
// This next field is actually a float. There is a groundspawn in freeportwest (sack of money sitting on some barrels) which requires this
|
||||||
// field to be set to (float)255.0 to appear at all, and also the size field below to be 5, to be the correct size. I think SoD has the same
|
// field to be set to (float)255.0 to appear at all, and also the size field below to be 5, to be the correct size. I think SoD has the same
|
||||||
// issue.
|
// issue.
|
||||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, 0); //X tilt
|
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->tilt_x); //X tilt
|
||||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, 0); //Y tilt
|
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->tilt_y); //Y tilt
|
||||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->size != 0 && (float)emu->size < 5000.f ? (float)((float)emu->size / 100.0f) : 1.f ); // This appears to be the size field. Hackish logic because some PEQ DB items were corrupt.
|
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->size != 0 && (float)emu->size < 5000.f ? (float)((float)emu->size / 100.0f) : 1.f ); // This appears to be the size field. Hackish logic because some PEQ DB items were corrupt.
|
||||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->y);
|
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->y);
|
||||||
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->x);
|
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->x);
|
||||||
@@ -1283,7 +1279,7 @@ namespace UF
|
|||||||
|
|
||||||
ob.write((const char*)__emu_buffer, 4);
|
ob.write((const char*)__emu_buffer, 4);
|
||||||
|
|
||||||
SerializeItem(ob, (const ItemInst*)int_struct->inst, int_struct->slot_id, 0);
|
SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0);
|
||||||
if (ob.tellp() == last_pos) {
|
if (ob.tellp() == last_pos) {
|
||||||
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d.", int_struct->slot_id);
|
Log.Out(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d.", int_struct->slot_id);
|
||||||
delete in;
|
delete in;
|
||||||
@@ -1374,7 +1370,8 @@ namespace UF
|
|||||||
OUT(new_mana);
|
OUT(new_mana);
|
||||||
OUT(stamina);
|
OUT(stamina);
|
||||||
OUT(spell_id);
|
OUT(spell_id);
|
||||||
eq->unknown16 = -1; // Self Interrupt/Success = -1, Fizzle = 1, Other Interrupt = 2?
|
OUT(keepcasting);
|
||||||
|
eq->slot = -1; // this is spell gem slot. It's -1 in normal operation
|
||||||
|
|
||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
}
|
}
|
||||||
@@ -1752,18 +1749,18 @@ namespace UF
|
|||||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 1);
|
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 1);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint16, Buffer, emu->buffcount);
|
VARSTRUCT_ENCODE_TYPE(uint16, Buffer, emu->buffcount);
|
||||||
|
|
||||||
for (unsigned int i = 0; i < BUFF_COUNT; ++i)
|
for (unsigned int i = 0; i < PET_BUFF_COUNT; ++i)
|
||||||
{
|
{
|
||||||
if (emu->spellid[i])
|
if (emu->spellid[i])
|
||||||
{
|
{
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, i);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, i);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->spellid[i]);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->spellid[i]);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->ticsremaining[i]);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->ticsremaining[i]);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); // numhits
|
||||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0); // This is a string. Name of the caster of the buff.
|
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0); // This is a string. Name of the caster of the buff.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, emu->buffcount);
|
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, emu->buffcount); /// I think this is actually some sort of type
|
||||||
|
|
||||||
delete[] __emu_buffer;
|
delete[] __emu_buffer;
|
||||||
dest->FastQueuePacket(&in, ack_req);
|
dest->FastQueuePacket(&in, ack_req);
|
||||||
@@ -1806,14 +1803,14 @@ namespace UF
|
|||||||
OUT(hairstyle);
|
OUT(hairstyle);
|
||||||
OUT(beard);
|
OUT(beard);
|
||||||
// OUT(unknown00178[10]);
|
// OUT(unknown00178[10]);
|
||||||
for (r = 0; r < 9; r++) {
|
for (r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++) {
|
||||||
eq->equipment[r].Material = emu->item_material[r];
|
eq->equipment.Slot[r].Material = emu->item_material.Slot[r].Material;
|
||||||
eq->equipment[r].Unknown1 = 0;
|
eq->equipment.Slot[r].Unknown1 = 0;
|
||||||
eq->equipment[r].EliteMaterial = 0;
|
eq->equipment.Slot[r].EliteMaterial = 0;
|
||||||
//eq->colors[r].color = emu->colors[r].color;
|
//eq->colors[r].color = emu->colors[r].color;
|
||||||
}
|
}
|
||||||
for (r = 0; r < 7; r++) {
|
for (r = 0; r < 7; r++) {
|
||||||
OUT(item_tint[r].Color);
|
OUT(item_tint.Slot[r].Color);
|
||||||
}
|
}
|
||||||
// OUT(unknown00224[48]);
|
// OUT(unknown00224[48]);
|
||||||
//NOTE: new client supports 300 AAs, our internal rep/PP
|
//NOTE: new client supports 300 AAs, our internal rep/PP
|
||||||
@@ -1858,26 +1855,26 @@ namespace UF
|
|||||||
OUT(thirst_level);
|
OUT(thirst_level);
|
||||||
OUT(hunger_level);
|
OUT(hunger_level);
|
||||||
//PS this needs to be figured out more; but it was 'good enough'
|
//PS this needs to be figured out more; but it was 'good enough'
|
||||||
for (r = 0; r < structs::BUFF_COUNT; r++)
|
for (r = 0; r < BUFF_COUNT; r++)
|
||||||
{
|
{
|
||||||
if (emu->buffs[r].spellid != 0xFFFF && emu->buffs[r].spellid != 0)
|
if (emu->buffs[r].spellid != 0xFFFF && emu->buffs[r].spellid != 0)
|
||||||
{
|
{
|
||||||
eq->buffs[r].unknown004 = 0x3f800000;
|
eq->buffs[r].bard_modifier = 1.0f + (emu->buffs[r].bard_modifier - 10) / 10.0f;
|
||||||
eq->buffs[r].slotid = 2;
|
eq->buffs[r].effect_type= 2;
|
||||||
eq->buffs[r].player_id = 0x000717fd;
|
eq->buffs[r].player_id = 0x000717fd;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
eq->buffs[r].slotid = 0;
|
eq->buffs[r].effect_type = 0;
|
||||||
|
eq->buffs[r].bard_modifier = 1.0f;
|
||||||
}
|
}
|
||||||
//OUT(buffs[r].slotid);
|
OUT(buffs[r].effect_type);
|
||||||
OUT(buffs[r].level);
|
OUT(buffs[r].level);
|
||||||
//OUT(buffs[r].bard_modifier);
|
OUT(buffs[r].unknown003);
|
||||||
//OUT(buffs[r].effect);
|
|
||||||
OUT(buffs[r].spellid);
|
OUT(buffs[r].spellid);
|
||||||
OUT(buffs[r].duration);
|
OUT(buffs[r].duration);
|
||||||
OUT(buffs[r].counters);
|
OUT(buffs[r].num_hits);
|
||||||
//OUT(buffs[r].player_id);
|
OUT(buffs[r].player_id);
|
||||||
}
|
}
|
||||||
for (r = 0; r < MAX_PP_DISCIPLINES; r++) {
|
for (r = 0; r < MAX_PP_DISCIPLINES; r++) {
|
||||||
OUT(disciplines.values[r]);
|
OUT(disciplines.values[r]);
|
||||||
@@ -2290,11 +2287,11 @@ namespace UF
|
|||||||
eq_cse->HairColor = emu_cse->HairColor;
|
eq_cse->HairColor = emu_cse->HairColor;
|
||||||
eq_cse->Face = emu_cse->Face;
|
eq_cse->Face = emu_cse->Face;
|
||||||
|
|
||||||
for (int equip_index = 0; equip_index < EQEmu::legacy::MaterialCount; equip_index++) {
|
for (int equip_index = EQEmu::textures::textureBegin; equip_index < EQEmu::textures::materialCount; equip_index++) {
|
||||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteModel;
|
||||||
eq_cse->Equip[equip_index].Color.Color = emu_cse->Equip[equip_index].Color.Color;
|
eq_cse->Equip[equip_index].Color = emu_cse->Equip[equip_index].Color;
|
||||||
}
|
}
|
||||||
|
|
||||||
eq_cse->PrimaryIDFile = emu_cse->PrimaryIDFile;
|
eq_cse->PrimaryIDFile = emu_cse->PrimaryIDFile;
|
||||||
@@ -2858,7 +2855,7 @@ namespace UF
|
|||||||
float SpawnSize = emu->size;
|
float SpawnSize = emu->size;
|
||||||
if (!((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522)))
|
if (!((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522)))
|
||||||
{
|
{
|
||||||
PacketSize -= (sizeof(structs::EquipStruct) * 9);
|
PacketSize -= (sizeof(structs::Texture_Struct) * EQEmu::textures::materialCount);
|
||||||
|
|
||||||
if (emu->size == 0)
|
if (emu->size == 0)
|
||||||
{
|
{
|
||||||
@@ -3057,10 +3054,10 @@ namespace UF
|
|||||||
|
|
||||||
if ((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
|
if ((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
|
||||||
{
|
{
|
||||||
for (k = 0; k < 9; ++k)
|
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; ++k)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->colors[k].Color);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment_tint.Slot[k].Color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3070,19 +3067,19 @@ namespace UF
|
|||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
|
|
||||||
if (emu->equipment[EQEmu::legacy::MaterialPrimary].Material > 99999) {
|
if (emu->equipment.Primary.Material > 99999) {
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 63);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 63);
|
||||||
} else {
|
} else {
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialPrimary].Material);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment.Primary.Material);
|
||||||
}
|
}
|
||||||
|
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
|
|
||||||
if (emu->equipment[EQEmu::legacy::MaterialSecondary].Material > 99999) {
|
if (emu->equipment.Secondary.Material > 99999) {
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 63);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 63);
|
||||||
} else {
|
} else {
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialSecondary].Material);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment.Secondary.Material);
|
||||||
}
|
}
|
||||||
|
|
||||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||||
@@ -3091,19 +3088,19 @@ namespace UF
|
|||||||
|
|
||||||
if ((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
|
if ((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
|
||||||
{
|
{
|
||||||
structs::EquipStruct *Equipment = (structs::EquipStruct *)Buffer;
|
structs::Texture_Struct *Equipment = (structs::Texture_Struct *)Buffer;
|
||||||
|
|
||||||
for (k = 0; k < 9; k++) {
|
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||||
if (emu->equipment[k].Material > 99999) {
|
if (emu->equipment.Slot[k].Material > 99999) {
|
||||||
Equipment[k].Material = 63;
|
Equipment[k].Material = 63;
|
||||||
} else {
|
} else {
|
||||||
Equipment[k].Material = emu->equipment[k].Material;
|
Equipment[k].Material = emu->equipment.Slot[k].Material;
|
||||||
}
|
}
|
||||||
Equipment[k].Unknown1 = emu->equipment[k].Unknown1;
|
Equipment[k].Unknown1 = emu->equipment.Slot[k].Unknown1;
|
||||||
Equipment[k].EliteMaterial = emu->equipment[k].EliteMaterial;
|
Equipment[k].EliteMaterial = emu->equipment.Slot[k].EliteModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
Buffer += (sizeof(structs::EquipStruct) * 9);
|
Buffer += (sizeof(structs::Texture_Struct) * EQEmu::textures::materialCount);
|
||||||
}
|
}
|
||||||
if (strlen(emu->title))
|
if (strlen(emu->title))
|
||||||
{
|
{
|
||||||
@@ -3216,15 +3213,16 @@ namespace UF
|
|||||||
|
|
||||||
DECODE(OP_Buff)
|
DECODE(OP_Buff)
|
||||||
{
|
{
|
||||||
DECODE_LENGTH_EXACT(structs::SpellBuffFade_Struct_Underfoot);
|
DECODE_LENGTH_EXACT(structs::SpellBuffPacket_Struct);
|
||||||
SETUP_DIRECT_DECODE(SpellBuffFade_Struct, structs::SpellBuffFade_Struct_Underfoot);
|
SETUP_DIRECT_DECODE(SpellBuffPacket_Struct, structs::SpellBuffPacket_Struct);
|
||||||
|
|
||||||
IN(entityid);
|
IN(entityid);
|
||||||
IN(slot);
|
IN(buff.effect_type);
|
||||||
IN(level);
|
IN(buff.level);
|
||||||
IN(effect);
|
IN(buff.unknown003);
|
||||||
IN(spellid);
|
IN(buff.spellid);
|
||||||
IN(duration);
|
IN(buff.duration);
|
||||||
|
emu->slotid = UFToServerBuffSlot(eq->slotid);
|
||||||
IN(slotid);
|
IN(slotid);
|
||||||
IN(bufffade);
|
IN(bufffade);
|
||||||
|
|
||||||
@@ -3238,7 +3236,7 @@ namespace UF
|
|||||||
DECODE_LENGTH_EXACT(structs::BuffRemoveRequest_Struct);
|
DECODE_LENGTH_EXACT(structs::BuffRemoveRequest_Struct);
|
||||||
SETUP_DIRECT_DECODE(BuffRemoveRequest_Struct, structs::BuffRemoveRequest_Struct);
|
SETUP_DIRECT_DECODE(BuffRemoveRequest_Struct, structs::BuffRemoveRequest_Struct);
|
||||||
|
|
||||||
emu->SlotID = (eq->SlotID < 30) ? eq->SlotID : (eq->SlotID - 5);
|
emu->SlotID = UFToServerBuffSlot(eq->SlotID);
|
||||||
|
|
||||||
IN(EntityID);
|
IN(EntityID);
|
||||||
|
|
||||||
@@ -3250,10 +3248,7 @@ namespace UF
|
|||||||
DECODE_LENGTH_EXACT(structs::CastSpell_Struct);
|
DECODE_LENGTH_EXACT(structs::CastSpell_Struct);
|
||||||
SETUP_DIRECT_DECODE(CastSpell_Struct, structs::CastSpell_Struct);
|
SETUP_DIRECT_DECODE(CastSpell_Struct, structs::CastSpell_Struct);
|
||||||
|
|
||||||
if (eq->slot == 13)
|
emu->slot = static_cast<uint32>(UFToServerCastingSlot(static_cast<CastingSlot>(eq->slot)));
|
||||||
emu->slot = 10;
|
|
||||||
else
|
|
||||||
IN(slot);
|
|
||||||
|
|
||||||
IN(spell_id);
|
IN(spell_id);
|
||||||
emu->inventoryslot = UFToServerSlot(eq->inventoryslot);
|
emu->inventoryslot = UFToServerSlot(eq->inventoryslot);
|
||||||
@@ -3839,13 +3834,13 @@ namespace UF
|
|||||||
return NextItemInstSerialNumber;
|
return NextItemInstSerialNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SerializeItem(EQEmu::OutBuffer& ob, const ItemInst *inst, int16 slot_id_in, uint8 depth)
|
void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth)
|
||||||
{
|
{
|
||||||
const EQEmu::Item_Struct *item = inst->GetUnscaledItem();
|
const EQEmu::ItemData *item = inst->GetUnscaledItem();
|
||||||
|
|
||||||
UF::structs::ItemSerializationHeader hdr;
|
UF::structs::ItemSerializationHeader hdr;
|
||||||
|
|
||||||
hdr.stacksize = (inst->IsStackable() ? ((inst->GetCharges() > 254) ? 0xFFFFFFFF : inst->GetCharges()) : 1);
|
hdr.stacksize = (inst->IsStackable() ? ((inst->GetCharges() > 1000) ? 0xFFFFFFFF : inst->GetCharges()) : 1);
|
||||||
hdr.unknown004 = 0;
|
hdr.unknown004 = 0;
|
||||||
|
|
||||||
int32 slot_id = ServerToUFSlot(slot_id_in);
|
int32 slot_id = ServerToUFSlot(slot_id_in);
|
||||||
@@ -3885,7 +3880,7 @@ namespace UF
|
|||||||
int ornamentationAugtype = RuleI(Character, OrnamentationAugmentType);
|
int ornamentationAugtype = RuleI(Character, OrnamentationAugmentType);
|
||||||
uint16 ornaIcon = 0;
|
uint16 ornaIcon = 0;
|
||||||
if (inst->GetOrnamentationAug(ornamentationAugtype)) {
|
if (inst->GetOrnamentationAug(ornamentationAugtype)) {
|
||||||
const EQEmu::Item_Struct *aug_weap = inst->GetOrnamentationAug(ornamentationAugtype)->GetItem();
|
const EQEmu::ItemData *aug_weap = inst->GetOrnamentationAug(ornamentationAugtype)->GetItem();
|
||||||
ornaIcon = aug_weap->Icon;
|
ornaIcon = aug_weap->Icon;
|
||||||
|
|
||||||
ob.write(aug_weap->IDFile, strlen(aug_weap->IDFile));
|
ob.write(aug_weap->IDFile, strlen(aug_weap->IDFile));
|
||||||
@@ -4216,18 +4211,18 @@ namespace UF
|
|||||||
|
|
||||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||||
|
|
||||||
for (uint32 index = SUB_INDEX_BEGIN; index < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++index) {
|
for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) {
|
||||||
ItemInst* sub = inst->GetItem(index);
|
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||||
if (!sub)
|
if (!sub)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
int SubSlotNumber = INVALID_INDEX;
|
int SubSlotNumber = INVALID_INDEX;
|
||||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
||||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + index + 1);
|
SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1);
|
||||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||||
else
|
else
|
||||||
SubSlotNumber = slot_id_in;
|
SubSlotNumber = slot_id_in;
|
||||||
|
|
||||||
@@ -4245,7 +4240,7 @@ namespace UF
|
|||||||
{
|
{
|
||||||
uint32 UnderfootSlot = 0;
|
uint32 UnderfootSlot = 0;
|
||||||
|
|
||||||
if (serverSlot >= EQEmu::legacy::SlotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
if (serverSlot >= EQEmu::inventory::slotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||||
UnderfootSlot = serverSlot + 1;
|
UnderfootSlot = serverSlot + 1;
|
||||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END)
|
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END)
|
||||||
UnderfootSlot = serverSlot + 11;
|
UnderfootSlot = serverSlot + 11;
|
||||||
@@ -4253,7 +4248,7 @@ namespace UF
|
|||||||
UnderfootSlot = serverSlot + 1;
|
UnderfootSlot = serverSlot + 1;
|
||||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
||||||
UnderfootSlot = serverSlot + 1;
|
UnderfootSlot = serverSlot + 1;
|
||||||
else if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
else if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||||
UnderfootSlot = invslot::PossessionsPowerSource;
|
UnderfootSlot = invslot::PossessionsPowerSource;
|
||||||
else
|
else
|
||||||
UnderfootSlot = serverSlot;
|
UnderfootSlot = serverSlot;
|
||||||
@@ -4280,7 +4275,7 @@ namespace UF
|
|||||||
else if (ufSlot >= invbag::SharedBankBagsBegin && ufSlot <= invbag::SharedBankBagsEnd)
|
else if (ufSlot >= invbag::SharedBankBagsBegin && ufSlot <= invbag::SharedBankBagsEnd)
|
||||||
ServerSlot = ufSlot - 1;
|
ServerSlot = ufSlot - 1;
|
||||||
else if (ufSlot == invslot::PossessionsPowerSource)
|
else if (ufSlot == invslot::PossessionsPowerSource)
|
||||||
ServerSlot = EQEmu::legacy::SlotPowerSource;
|
ServerSlot = EQEmu::inventory::slotPowerSource;
|
||||||
else
|
else
|
||||||
ServerSlot = ufSlot;
|
ServerSlot = ufSlot;
|
||||||
|
|
||||||
@@ -4369,4 +4364,106 @@ namespace UF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline CastingSlot ServerToUFCastingSlot(EQEmu::CastingSlot slot)
|
||||||
|
{
|
||||||
|
switch (slot) {
|
||||||
|
case EQEmu::CastingSlot::Gem1:
|
||||||
|
return CastingSlot::Gem1;
|
||||||
|
case EQEmu::CastingSlot::Gem2:
|
||||||
|
return CastingSlot::Gem2;
|
||||||
|
case EQEmu::CastingSlot::Gem3:
|
||||||
|
return CastingSlot::Gem3;
|
||||||
|
case EQEmu::CastingSlot::Gem4:
|
||||||
|
return CastingSlot::Gem4;
|
||||||
|
case EQEmu::CastingSlot::Gem5:
|
||||||
|
return CastingSlot::Gem5;
|
||||||
|
case EQEmu::CastingSlot::Gem6:
|
||||||
|
return CastingSlot::Gem6;
|
||||||
|
case EQEmu::CastingSlot::Gem7:
|
||||||
|
return CastingSlot::Gem7;
|
||||||
|
case EQEmu::CastingSlot::Gem8:
|
||||||
|
return CastingSlot::Gem8;
|
||||||
|
case EQEmu::CastingSlot::Gem9:
|
||||||
|
return CastingSlot::Gem9;
|
||||||
|
case EQEmu::CastingSlot::Gem10:
|
||||||
|
return CastingSlot::Gem10;
|
||||||
|
case EQEmu::CastingSlot::Gem11:
|
||||||
|
return CastingSlot::Gem11;
|
||||||
|
case EQEmu::CastingSlot::Gem12:
|
||||||
|
return CastingSlot::Gem12;
|
||||||
|
case EQEmu::CastingSlot::Item:
|
||||||
|
case EQEmu::CastingSlot::PotionBelt:
|
||||||
|
return CastingSlot::Item;
|
||||||
|
case EQEmu::CastingSlot::Discipline:
|
||||||
|
return CastingSlot::Discipline;
|
||||||
|
case EQEmu::CastingSlot::AltAbility:
|
||||||
|
return CastingSlot::AltAbility;
|
||||||
|
default: // we shouldn't have any issues with other slots ... just return something
|
||||||
|
return CastingSlot::Discipline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline EQEmu::CastingSlot UFToServerCastingSlot(CastingSlot slot)
|
||||||
|
{
|
||||||
|
switch (slot) {
|
||||||
|
case CastingSlot::Gem1:
|
||||||
|
return EQEmu::CastingSlot::Gem1;
|
||||||
|
case CastingSlot::Gem2:
|
||||||
|
return EQEmu::CastingSlot::Gem2;
|
||||||
|
case CastingSlot::Gem3:
|
||||||
|
return EQEmu::CastingSlot::Gem3;
|
||||||
|
case CastingSlot::Gem4:
|
||||||
|
return EQEmu::CastingSlot::Gem4;
|
||||||
|
case CastingSlot::Gem5:
|
||||||
|
return EQEmu::CastingSlot::Gem5;
|
||||||
|
case CastingSlot::Gem6:
|
||||||
|
return EQEmu::CastingSlot::Gem6;
|
||||||
|
case CastingSlot::Gem7:
|
||||||
|
return EQEmu::CastingSlot::Gem7;
|
||||||
|
case CastingSlot::Gem8:
|
||||||
|
return EQEmu::CastingSlot::Gem8;
|
||||||
|
case CastingSlot::Gem9:
|
||||||
|
return EQEmu::CastingSlot::Gem9;
|
||||||
|
case CastingSlot::Gem10:
|
||||||
|
return EQEmu::CastingSlot::Gem10;
|
||||||
|
case CastingSlot::Gem11:
|
||||||
|
return EQEmu::CastingSlot::Gem11;
|
||||||
|
case CastingSlot::Gem12:
|
||||||
|
return EQEmu::CastingSlot::Gem12;
|
||||||
|
case CastingSlot::Discipline:
|
||||||
|
return EQEmu::CastingSlot::Discipline;
|
||||||
|
case CastingSlot::Item:
|
||||||
|
return EQEmu::CastingSlot::Item;
|
||||||
|
case CastingSlot::AltAbility:
|
||||||
|
return EQEmu::CastingSlot::AltAbility;
|
||||||
|
default: // we shouldn't have any issues with other slots ... just return something
|
||||||
|
return EQEmu::CastingSlot::Discipline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int ServerToUFBuffSlot(int index)
|
||||||
|
{
|
||||||
|
// we're a disc
|
||||||
|
if (index >= EQEmu::constants::LongBuffs + EQEmu::constants::ShortBuffs)
|
||||||
|
return index - EQEmu::constants::LongBuffs - EQEmu::constants::ShortBuffs +
|
||||||
|
constants::LongBuffs + constants::ShortBuffs;
|
||||||
|
// we're a song
|
||||||
|
if (index >= EQEmu::constants::LongBuffs)
|
||||||
|
return index - EQEmu::constants::LongBuffs + constants::LongBuffs;
|
||||||
|
// we're a normal buff
|
||||||
|
return index; // as long as we guard against bad slots server side, we should be fine
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int UFToServerBuffSlot(int index)
|
||||||
|
{
|
||||||
|
// we're a disc
|
||||||
|
if (index >= constants::LongBuffs + constants::ShortBuffs)
|
||||||
|
return index - constants::LongBuffs - constants::ShortBuffs + EQEmu::constants::LongBuffs +
|
||||||
|
EQEmu::constants::ShortBuffs;
|
||||||
|
// we're a song
|
||||||
|
if (index >= constants::LongBuffs)
|
||||||
|
return index - constants::LongBuffs + EQEmu::constants::LongBuffs;
|
||||||
|
// we're a normal buff
|
||||||
|
return index; // as long as we guard against bad slots server side, we should be fine
|
||||||
|
}
|
||||||
} /*UF*/
|
} /*UF*/
|
||||||
|
|||||||
@@ -50,6 +50,24 @@ namespace UF
|
|||||||
#include "uf_ops.h"
|
#include "uf_ops.h"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class CastingSlot : uint32 {
|
||||||
|
Gem1 = 0,
|
||||||
|
Gem2 = 1,
|
||||||
|
Gem3 = 2,
|
||||||
|
Gem4 = 3,
|
||||||
|
Gem5 = 4,
|
||||||
|
Gem6 = 5,
|
||||||
|
Gem7 = 6,
|
||||||
|
Gem8 = 7,
|
||||||
|
Gem9 = 8,
|
||||||
|
Gem10 = 9,
|
||||||
|
Gem11 = 10,
|
||||||
|
Gem12 = 11,
|
||||||
|
Item = 12,
|
||||||
|
Discipline = 13,
|
||||||
|
AltAbility = 0xFF
|
||||||
|
};
|
||||||
|
|
||||||
}; /*UF*/
|
}; /*UF*/
|
||||||
|
|
||||||
#endif /*COMMON_UF_H*/
|
#endif /*COMMON_UF_H*/
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#include "../string_util.h"
|
#include "../string_util.h"
|
||||||
|
|
||||||
|
|
||||||
size_t UF::invtype::InvTypeSize(int inv_type)
|
size_t UF::invtype::GetInvTypeSize(int inv_type)
|
||||||
{
|
{
|
||||||
switch (inv_type) {
|
switch (inv_type) {
|
||||||
case invtype::InvTypePossessions:
|
case invtype::InvTypePossessions:
|
||||||
@@ -68,7 +68,7 @@ size_t UF::invtype::InvTypeSize(int inv_type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* UF::invtype::InvTypeName(int inv_type)
|
const char* UF::invtype::GetInvTypeName(int inv_type)
|
||||||
{
|
{
|
||||||
switch (inv_type) {
|
switch (inv_type) {
|
||||||
case invtype::InvTypeInvalid:
|
case invtype::InvTypeInvalid:
|
||||||
@@ -116,7 +116,24 @@ const char* UF::invtype::InvTypeName(int inv_type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* UF::invslot::InvPossessionsSlotName(int inv_slot)
|
bool UF::invtype::IsInvTypePersistent(int inv_type)
|
||||||
|
{
|
||||||
|
switch (inv_type) {
|
||||||
|
case invtype::InvTypePossessions:
|
||||||
|
case invtype::InvTypeBank:
|
||||||
|
case invtype::InvTypeSharedBank:
|
||||||
|
case invtype::InvTypeTrade:
|
||||||
|
case invtype::InvTypeWorld:
|
||||||
|
case invtype::InvTypeLimbo:
|
||||||
|
case invtype::InvTypeTribute:
|
||||||
|
case invtype::InvTypeGuildTribute:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* UF::invslot::GetInvPossessionsSlotName(int inv_slot)
|
||||||
{
|
{
|
||||||
switch (inv_slot) {
|
switch (inv_slot) {
|
||||||
case invslot::InvSlotInvalid:
|
case invslot::InvSlotInvalid:
|
||||||
@@ -190,9 +207,9 @@ const char* UF::invslot::InvPossessionsSlotName(int inv_slot)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* UF::invslot::InvCorpseSlotName(int inv_slot)
|
const char* UF::invslot::GetInvCorpseSlotName(int inv_slot)
|
||||||
{
|
{
|
||||||
if (!invtype::InvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid)
|
if (!invtype::GetInvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid)
|
||||||
return "Invalid Slot";
|
return "Invalid Slot";
|
||||||
|
|
||||||
// needs work
|
// needs work
|
||||||
@@ -205,14 +222,14 @@ const char* UF::invslot::InvCorpseSlotName(int inv_slot)
|
|||||||
return ret_str.c_str();
|
return ret_str.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* UF::invslot::InvSlotName(int inv_type, int inv_slot)
|
const char* UF::invslot::GetInvSlotName(int inv_type, int inv_slot)
|
||||||
{
|
{
|
||||||
if (inv_type == invtype::InvTypePossessions)
|
if (inv_type == invtype::InvTypePossessions)
|
||||||
return invslot::InvPossessionsSlotName(inv_slot);
|
return invslot::GetInvPossessionsSlotName(inv_slot);
|
||||||
else if (inv_type == invtype::InvTypeCorpse)
|
else if (inv_type == invtype::InvTypeCorpse)
|
||||||
return invslot::InvCorpseSlotName(inv_slot);
|
return invslot::GetInvCorpseSlotName(inv_slot);
|
||||||
|
|
||||||
size_t type_size = invtype::InvTypeSize(inv_type);
|
size_t type_size = invtype::GetInvTypeSize(inv_type);
|
||||||
|
|
||||||
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
||||||
return "Invalid Slot";
|
return "Invalid Slot";
|
||||||
@@ -226,7 +243,7 @@ const char* UF::invslot::InvSlotName(int inv_type, int inv_slot)
|
|||||||
return ret_str.c_str();
|
return ret_str.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* UF::invbag::InvBagIndexName(int bag_index)
|
const char* UF::invbag::GetInvBagIndexName(int bag_index)
|
||||||
{
|
{
|
||||||
if (bag_index == invbag::InvBagInvalid)
|
if (bag_index == invbag::InvBagInvalid)
|
||||||
return "Invalid Bag";
|
return "Invalid Bag";
|
||||||
@@ -240,7 +257,7 @@ const char* UF::invbag::InvBagIndexName(int bag_index)
|
|||||||
return ret_str.c_str();
|
return ret_str.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* UF::invaug::InvAugIndexName(int aug_index)
|
const char* UF::invaug::GetInvAugIndexName(int aug_index)
|
||||||
{
|
{
|
||||||
if (aug_index == invaug::InvAugInvalid)
|
if (aug_index == invaug::InvAugInvalid)
|
||||||
return "Invalid Augment";
|
return "Invalid Augment";
|
||||||
|
|||||||
+47
-27
@@ -21,7 +21,7 @@
|
|||||||
#define COMMON_UF_LIMITS_H
|
#define COMMON_UF_LIMITS_H
|
||||||
|
|
||||||
#include "../types.h"
|
#include "../types.h"
|
||||||
#include "../client_version.h"
|
#include "../emu_versions.h"
|
||||||
#include "../skills.h"
|
#include "../skills.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -32,8 +32,13 @@ namespace UF
|
|||||||
enum : bool { False = false, True = true };
|
enum : bool { False = false, True = true };
|
||||||
|
|
||||||
// pre-declarations
|
// pre-declarations
|
||||||
|
namespace inventory {
|
||||||
|
inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||||
|
|
||||||
|
} /*inventory*/
|
||||||
|
|
||||||
namespace invtype {
|
namespace invtype {
|
||||||
inline EQEmu::versions::ClientVersion InvTypeRef() { return EQEmu::versions::ClientVersion::UF; }
|
inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||||
|
|
||||||
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
||||||
|
|
||||||
@@ -63,7 +68,7 @@ namespace UF
|
|||||||
} /*invtype*/
|
} /*invtype*/
|
||||||
|
|
||||||
namespace invslot {
|
namespace invslot {
|
||||||
inline EQEmu::versions::ClientVersion InvSlotRef() { return EQEmu::versions::ClientVersion::UF; }
|
inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||||
|
|
||||||
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
||||||
|
|
||||||
@@ -114,21 +119,21 @@ namespace UF
|
|||||||
} /*invslot*/
|
} /*invslot*/
|
||||||
|
|
||||||
namespace invbag {
|
namespace invbag {
|
||||||
inline EQEmu::versions::ClientVersion InvBagRef() { return EQEmu::versions::ClientVersion::UF; }
|
inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||||
|
|
||||||
enum : int { InvBagInvalid = -1, InvBagBegin };
|
enum : int { InvBagInvalid = -1, InvBagBegin };
|
||||||
|
|
||||||
} /*invbag*/
|
} /*invbag*/
|
||||||
|
|
||||||
namespace invaug {
|
namespace invaug {
|
||||||
inline EQEmu::versions::ClientVersion InvAugRef() { return EQEmu::versions::ClientVersion::UF; }
|
inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||||
|
|
||||||
enum : int { InvAugInvalid = -1, InvAugBegin };
|
enum : int { InvAugInvalid = -1, InvAugBegin };
|
||||||
|
|
||||||
} /*invaug*/
|
} /*invaug*/
|
||||||
|
|
||||||
namespace item {
|
namespace item {
|
||||||
inline EQEmu::versions::ClientVersion ItemRef() { return EQEmu::versions::ClientVersion::UF; }
|
inline EQEmu::versions::ClientVersion GetItemRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||||
|
|
||||||
enum ItemPacketType : int {
|
enum ItemPacketType : int {
|
||||||
ItemPacketMerchant = 100,
|
ItemPacketMerchant = 100,
|
||||||
@@ -147,27 +152,37 @@ namespace UF
|
|||||||
} /*item*/
|
} /*item*/
|
||||||
|
|
||||||
namespace profile {
|
namespace profile {
|
||||||
inline EQEmu::versions::ClientVersion ProfileRef() { return EQEmu::versions::ClientVersion::UF; }
|
inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||||
|
|
||||||
} /*profile*/
|
} /*profile*/
|
||||||
|
|
||||||
namespace constants {
|
namespace constants {
|
||||||
inline EQEmu::versions::ClientVersion ConstantsRef() { return EQEmu::versions::ClientVersion::UF; }
|
inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||||
|
|
||||||
} /*constants*/
|
} /*constants*/
|
||||||
|
|
||||||
namespace behavior {
|
namespace behavior {
|
||||||
inline EQEmu::versions::ClientVersion BehaviorRef() { return EQEmu::versions::ClientVersion::UF; }
|
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||||
|
|
||||||
} /*behavior*/
|
} /*behavior*/
|
||||||
|
|
||||||
namespace skills {
|
namespace skills {
|
||||||
inline EQEmu::versions::ClientVersion SkillsRef() { return EQEmu::versions::ClientVersion::UF; }
|
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||||
|
|
||||||
} /*skills*/
|
} /*skills*/
|
||||||
|
|
||||||
|
|
||||||
// declarations
|
// declarations
|
||||||
|
namespace inventory {
|
||||||
|
const bool ConcatenateInvTypeLimbo = true;
|
||||||
|
|
||||||
|
const bool AllowOverLevelEquipment = true;
|
||||||
|
|
||||||
|
const bool AllowEmptyBagInBag = false;
|
||||||
|
const bool AllowClickCastFromBag = false;
|
||||||
|
|
||||||
|
} /*inventory*/
|
||||||
|
|
||||||
namespace invtype {
|
namespace invtype {
|
||||||
const size_t InvTypePossessionsSize = invslot::PossessionsCount;
|
const size_t InvTypePossessionsSize = invslot::PossessionsCount;
|
||||||
const size_t InvTypeBankSize = 24;
|
const size_t InvTypeBankSize = 24;
|
||||||
@@ -176,7 +191,7 @@ namespace UF
|
|||||||
const size_t InvTypeWorldSize = 10;
|
const size_t InvTypeWorldSize = 10;
|
||||||
const size_t InvTypeLimboSize = 36;
|
const size_t InvTypeLimboSize = 36;
|
||||||
const size_t InvTypeTributeSize = 5;
|
const size_t InvTypeTributeSize = 5;
|
||||||
const size_t InvTypeGuildTributeSize = 0;//unknown
|
const size_t InvTypeGuildTributeSize = 2;
|
||||||
const size_t InvTypeMerchantSize = 80;
|
const size_t InvTypeMerchantSize = 80;
|
||||||
const size_t InvTypeCorpseSize = InvTypePossessionsSize;
|
const size_t InvTypeCorpseSize = InvTypePossessionsSize;
|
||||||
const size_t InvTypeBazaarSize = 80;
|
const size_t InvTypeBazaarSize = 80;
|
||||||
@@ -189,10 +204,10 @@ namespace UF
|
|||||||
const size_t InvTypeArchivedSize = 0;//unknown
|
const size_t InvTypeArchivedSize = 0;//unknown
|
||||||
const size_t InvTypeOtherSize = 0;//unknown
|
const size_t InvTypeOtherSize = 0;//unknown
|
||||||
|
|
||||||
const size_t NPCTradeSize = 4;
|
extern size_t GetInvTypeSize(int inv_type);
|
||||||
|
extern const char* GetInvTypeName(int inv_type);
|
||||||
|
|
||||||
extern size_t InvTypeSize(int inv_type);
|
extern bool IsInvTypePersistent(int inv_type);
|
||||||
extern const char* InvTypeName(int inv_type);
|
|
||||||
|
|
||||||
} /*invtype*/
|
} /*invtype*/
|
||||||
|
|
||||||
@@ -211,14 +226,17 @@ namespace UF
|
|||||||
const int WorldEnd = (WorldBegin + invtype::InvTypeWorldSize) - 1;
|
const int WorldEnd = (WorldBegin + invtype::InvTypeWorldSize) - 1;
|
||||||
|
|
||||||
const int TributeBegin = 400;
|
const int TributeBegin = 400;
|
||||||
const int TributeEnd = 404;
|
const int TributeEnd = (TributeBegin + invtype::InvTypeTributeSize) - 1;
|
||||||
|
|
||||||
|
const int GuildTributeBegin = 450;
|
||||||
|
const int GuildTributeEnd = (GuildTributeBegin + invtype::InvTypeGuildTributeSize) - 1;
|
||||||
|
|
||||||
const int CorpseBegin = invslot::PossessionsGeneral1;
|
const int CorpseBegin = invslot::PossessionsGeneral1;
|
||||||
const int CorpseEnd = invslot::PossessionsGeneral1 + invslot::PossessionsCursor;
|
const int CorpseEnd = invslot::PossessionsGeneral1 + invslot::PossessionsCursor;
|
||||||
|
|
||||||
extern const char* InvPossessionsSlotName(int inv_slot);
|
extern const char* GetInvPossessionsSlotName(int inv_slot);
|
||||||
extern const char* InvCorpseSlotName(int inv_slot);
|
extern const char* GetInvCorpseSlotName(int inv_slot);
|
||||||
extern const char* InvSlotName(int inv_type, int inv_slot);
|
extern const char* GetInvSlotName(int inv_type, int inv_slot);
|
||||||
|
|
||||||
} /*invslot*/
|
} /*invslot*/
|
||||||
|
|
||||||
@@ -245,14 +263,14 @@ namespace UF
|
|||||||
const int TradeBagsSize = invtype::InvTypeTradeSize * ItemBagSize;
|
const int TradeBagsSize = invtype::InvTypeTradeSize * ItemBagSize;
|
||||||
const int TradeBagsEnd = (TradeBagsBegin + TradeBagsSize) - 1;
|
const int TradeBagsEnd = (TradeBagsBegin + TradeBagsSize) - 1;
|
||||||
|
|
||||||
extern const char* InvBagIndexName(int bag_index);
|
extern const char* GetInvBagIndexName(int bag_index);
|
||||||
|
|
||||||
} /*invbag*/
|
} /*invbag*/
|
||||||
|
|
||||||
namespace invaug {
|
namespace invaug {
|
||||||
const size_t ItemAugSize = 5;
|
const size_t ItemAugSize = 5;
|
||||||
|
|
||||||
extern const char* InvAugIndexName(int aug_index);
|
extern const char* GetInvAugIndexName(int aug_index);
|
||||||
|
|
||||||
} /*invaug*/
|
} /*invaug*/
|
||||||
|
|
||||||
@@ -262,6 +280,7 @@ namespace UF
|
|||||||
|
|
||||||
namespace profile {
|
namespace profile {
|
||||||
const size_t TributeSize = invtype::InvTypeTributeSize;
|
const size_t TributeSize = invtype::InvTypeTributeSize;
|
||||||
|
const size_t GuildTributeSize = invtype::InvTypeGuildTributeSize;
|
||||||
|
|
||||||
const size_t BandoliersSize = 20; // number of bandolier instances
|
const size_t BandoliersSize = 20; // number of bandolier instances
|
||||||
const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance
|
const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance
|
||||||
@@ -277,16 +296,17 @@ namespace UF
|
|||||||
|
|
||||||
const size_t SayLinkBodySize = 50;
|
const size_t SayLinkBodySize = 50;
|
||||||
|
|
||||||
|
const int LongBuffs = 30;
|
||||||
|
const int ShortBuffs = 20;
|
||||||
|
const int DiscBuffs = 1;
|
||||||
|
const int TotalBuffs = LongBuffs + ShortBuffs + DiscBuffs;
|
||||||
|
const int NPCBuffs = 85;
|
||||||
|
const int PetBuffs = NPCBuffs;
|
||||||
|
const int MercBuffs = LongBuffs;
|
||||||
|
|
||||||
} /*constants*/
|
} /*constants*/
|
||||||
|
|
||||||
namespace behavior {
|
namespace behavior {
|
||||||
const bool ConcatenateInvTypeLimbo = true;
|
|
||||||
|
|
||||||
const bool AllowOverLevelEquipment = true;
|
|
||||||
|
|
||||||
const bool AllowEmptyBagInBag = false;
|
|
||||||
const bool AllowClickCastFromBag = false;
|
|
||||||
|
|
||||||
const bool CoinHasWeight = false;
|
const bool CoinHasWeight = false;
|
||||||
|
|
||||||
} /*behavior*/
|
} /*behavior*/
|
||||||
|
|||||||
+81
-148
@@ -26,7 +26,7 @@ namespace UF
|
|||||||
namespace structs {
|
namespace structs {
|
||||||
|
|
||||||
|
|
||||||
static const uint32 BUFF_COUNT = 25;
|
static const uint32 BUFF_COUNT = 30;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Compiler override to ensure
|
** Compiler override to ensure
|
||||||
@@ -122,27 +122,70 @@ struct AdventureInfo {
|
|||||||
** Merth: Gave struct a name so gcc 2.96 would compile
|
** Merth: Gave struct a name so gcc 2.96 would compile
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
struct Color_Struct
|
struct Tint_Struct
|
||||||
{
|
{
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
uint8 blue;
|
uint8 Blue;
|
||||||
uint8 Green;
|
uint8 Green;
|
||||||
uint8 Red;
|
uint8 Red;
|
||||||
uint8 UseTint; // if there's a tint this is FF
|
uint8 UseTint; // if there's a tint this is FF
|
||||||
} RGB;
|
};
|
||||||
uint32 Color;
|
uint32 Color;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CharSelectEquip
|
struct TintProfile
|
||||||
|
{
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
Tint_Struct Head;
|
||||||
|
Tint_Struct Chest;
|
||||||
|
Tint_Struct Arms;
|
||||||
|
Tint_Struct Wrist;
|
||||||
|
Tint_Struct Hands;
|
||||||
|
Tint_Struct Legs;
|
||||||
|
Tint_Struct Feet;
|
||||||
|
Tint_Struct Primary;
|
||||||
|
Tint_Struct Secondary;
|
||||||
|
};
|
||||||
|
Tint_Struct Slot[EQEmu::textures::materialCount];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Visible equiptment.
|
||||||
|
* Size: 12 Octets
|
||||||
|
*/
|
||||||
|
struct Texture_Struct
|
||||||
{
|
{
|
||||||
uint32 Material;
|
uint32 Material;
|
||||||
uint32 Unknown1;
|
uint32 Unknown1;
|
||||||
uint32 EliteMaterial;
|
uint32 EliteMaterial;
|
||||||
Color_Struct Color;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct TextureProfile
|
||||||
|
{
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
Texture_Struct Head;
|
||||||
|
Texture_Struct Chest;
|
||||||
|
Texture_Struct Arms;
|
||||||
|
Texture_Struct Wrist;
|
||||||
|
Texture_Struct Hands;
|
||||||
|
Texture_Struct Legs;
|
||||||
|
Texture_Struct Feet;
|
||||||
|
Texture_Struct Primary;
|
||||||
|
Texture_Struct Secondary;
|
||||||
|
};
|
||||||
|
Texture_Struct Slot[EQEmu::textures::materialCount];
|
||||||
|
};
|
||||||
|
|
||||||
|
TextureProfile();
|
||||||
|
};
|
||||||
|
|
||||||
|
struct CharSelectEquip : Texture_Struct, Tint_Struct {};
|
||||||
|
|
||||||
struct CharacterSelectEntry_Struct
|
struct CharacterSelectEntry_Struct
|
||||||
{
|
{
|
||||||
/*0000*/ uint8 Level; //
|
/*0000*/ uint8 Level; //
|
||||||
@@ -152,7 +195,7 @@ struct CharacterSelectEntry_Struct
|
|||||||
/*0000*/ uint8 Beard; //
|
/*0000*/ uint8 Beard; //
|
||||||
/*0001*/ uint8 HairColor; //
|
/*0001*/ uint8 HairColor; //
|
||||||
/*0000*/ uint8 Face; //
|
/*0000*/ uint8 Face; //
|
||||||
/*0000*/ CharSelectEquip Equip[9];
|
/*0000*/ CharSelectEquip Equip[EQEmu::textures::materialCount];
|
||||||
/*0000*/ uint32 PrimaryIDFile; //
|
/*0000*/ uint32 PrimaryIDFile; //
|
||||||
/*0000*/ uint32 SecondaryIDFile; //
|
/*0000*/ uint32 SecondaryIDFile; //
|
||||||
/*0000*/ uint8 Unknown15; // 0xff
|
/*0000*/ uint8 Unknown15; // 0xff
|
||||||
@@ -185,19 +228,6 @@ struct CharacterSelect_Struct
|
|||||||
/*0008*/ CharacterSelectEntry_Struct Entries[0];
|
/*0008*/ CharacterSelectEntry_Struct Entries[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
* Visible equiptment.
|
|
||||||
* Size: 12 Octets
|
|
||||||
*/
|
|
||||||
struct EquipStruct
|
|
||||||
{
|
|
||||||
/*00*/ uint32 Material;
|
|
||||||
/*04*/ uint32 Unknown1;
|
|
||||||
/*08*/ uint32 EliteMaterial;
|
|
||||||
/*12*/
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Generic Spawn Struct
|
** Generic Spawn Struct
|
||||||
** Length: 897 Octets
|
** Length: 897 Octets
|
||||||
@@ -314,40 +344,10 @@ struct Spawn_Struct
|
|||||||
/*0000*/ uint32 unknown18;
|
/*0000*/ uint32 unknown18;
|
||||||
/*0000*/ uint32 unknown19;
|
/*0000*/ uint32 unknown19;
|
||||||
Spawn_Struct_Position Position;
|
Spawn_Struct_Position Position;
|
||||||
/*0000*/ union
|
/*0000*/ TintProfile equipment_tint;
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
/*0000*/ Color_Struct color_helmet; // Color of helmet item
|
|
||||||
/*0000*/ Color_Struct color_chest; // Color of chest item
|
|
||||||
/*0000*/ Color_Struct color_arms; // Color of arms item
|
|
||||||
/*0000*/ Color_Struct color_bracers; // Color of bracers item
|
|
||||||
/*0000*/ Color_Struct color_hands; // Color of hands item
|
|
||||||
/*0000*/ Color_Struct color_legs; // Color of legs item
|
|
||||||
/*0000*/ Color_Struct color_feet; // Color of feet item
|
|
||||||
/*0000*/ Color_Struct color_primary; // Color of primary item
|
|
||||||
/*0000*/ Color_Struct color_secondary; // Color of secondary item
|
|
||||||
} equipment_colors;
|
|
||||||
/*0000*/ Color_Struct colors[9]; // Array elements correspond to struct equipment_colors above
|
|
||||||
};
|
|
||||||
|
|
||||||
// skip these bytes if not a valid player race
|
// skip these bytes if not a valid player race
|
||||||
/*0000*/ union
|
/*0000*/ TextureProfile equipment;
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
/*0000*/ EquipStruct equip_helmet; // Equiptment: Helmet visual
|
|
||||||
/*0000*/ EquipStruct equip_chest; // Equiptment: Chest visual
|
|
||||||
/*0000*/ EquipStruct equip_arms; // Equiptment: Arms visual
|
|
||||||
/*0000*/ EquipStruct equip_bracers; // Equiptment: Wrist visual
|
|
||||||
/*0000*/ EquipStruct equip_hands; // Equiptment: Hands visual
|
|
||||||
/*0000*/ EquipStruct equip_legs; // Equiptment: Legs visual
|
|
||||||
/*0000*/ EquipStruct equip_feet; // Equiptment: Boots visual
|
|
||||||
/*0000*/ EquipStruct equip_primary; // Equiptment: Main visual
|
|
||||||
/*0000*/ EquipStruct equip_secondary; // Equiptment: Off visual
|
|
||||||
} equip;
|
|
||||||
/*0000*/ EquipStruct equipment[9];
|
|
||||||
};
|
|
||||||
|
|
||||||
/*0000*/ //char title[0]; // only read if(hasTitleOrSuffix & 4)
|
/*0000*/ //char title[0]; // only read if(hasTitleOrSuffix & 4)
|
||||||
/*0000*/ //char suffix[0]; // only read if(hasTitleOrSuffix & 8)
|
/*0000*/ //char suffix[0]; // only read if(hasTitleOrSuffix & 8)
|
||||||
@@ -479,7 +479,7 @@ struct MemorizeSpell_Struct {
|
|||||||
uint32 slot; // Spot in the spell book/memorized slot
|
uint32 slot; // Spot in the spell book/memorized slot
|
||||||
uint32 spell_id; // Spell id (200 or c8 is minor healing, etc)
|
uint32 spell_id; // Spell id (200 or c8 is minor healing, etc)
|
||||||
uint32 scribing; // 1 if memorizing a spell, set to 0 if scribing to book, 2 if un-memming
|
uint32 scribing; // 1 if memorizing a spell, set to 0 if scribing to book, 2 if un-memming
|
||||||
//uint32 unknown12;
|
uint32 reduction; // lowers reuse
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -512,11 +512,12 @@ struct DeleteSpell_Struct
|
|||||||
|
|
||||||
struct ManaChange_Struct
|
struct ManaChange_Struct
|
||||||
{
|
{
|
||||||
uint32 new_mana; // New Mana AMount
|
/*00*/ uint32 new_mana; // New Mana AMount
|
||||||
uint32 stamina;
|
/*04*/ uint32 stamina;
|
||||||
uint32 spell_id;
|
/*08*/ uint32 spell_id;
|
||||||
uint32 unknown12;
|
/*12*/ uint8 keepcasting; // won't stop the cast. Change mana while casting?
|
||||||
uint32 unknown16;
|
/*13*/ uint8 padding[3]; // client doesn't read it, garbage data seems like
|
||||||
|
/*16*/ int32 slot; // -1 for normal usage slot for when we want silent interrupt? I think it does timer stuff or something. Linked Spell Reuse interrupt uses it
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SwapSpell_Struct
|
struct SwapSpell_Struct
|
||||||
@@ -566,55 +567,28 @@ struct SpawnAppearance_Struct
|
|||||||
// Size 76 (was 24)
|
// Size 76 (was 24)
|
||||||
struct SpellBuff_Struct
|
struct SpellBuff_Struct
|
||||||
{
|
{
|
||||||
/*000*/ uint8 slotid; // badly named... seems to be 2 for a real buff, 0 otherwise
|
/*000*/ uint8 effect_type; // 0 = no buff, 2 = buff, 4 = inverse affects of buff
|
||||||
/*001*/ uint8 level;
|
/*001*/ uint8 level; // Seen 1 for no buff
|
||||||
/*002*/ uint8 bard_modifier;
|
/*002*/ uint8 unknown002; //pretty sure padding now
|
||||||
/*003*/ uint8 effect; // not real
|
/*003*/ uint8 unknown003; // MQ2 used to call this "damage shield" -- don't see client referencing it, so maybe server side DS type tracking?
|
||||||
/*004*/ uint32 unknown004; // Seen 1 for no buff
|
/*004*/ float bard_modifier;
|
||||||
/*008*/ uint32 spellid;
|
/*008*/ uint32 spellid;
|
||||||
/*012*/ int32 duration;
|
/*012*/ uint32 duration;
|
||||||
/*016*/ uint32 unknown016;
|
/*016*/ uint32 num_hits;
|
||||||
/*020*/ uint32 player_id; // 'global' ID of the caster, for wearoff messages
|
/*020*/ uint32 player_id; // caster ID, pretty sure just zone ID
|
||||||
/*024*/ uint32 counters;
|
/*024*/ uint32 unknown036;
|
||||||
/*028*/ uint8 unknown0028[48];
|
/*028*/ int32 slot_data[12]; // book keeping stuff per slot (counters, rune/vie)
|
||||||
/*076*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Not functional yet, but this is what the packet looks like on Underfoot
|
// Not functional yet, but this is what the packet looks like on Underfoot
|
||||||
struct SpellBuffFade_Struct_Underfoot {
|
struct SpellBuffPacket_Struct {
|
||||||
/*000*/ uint32 entityid; // Player id who cast the buff
|
/*000*/ uint32 entityid; // Player id who cast the buff
|
||||||
/*004*/ uint8 slot;
|
/*004*/ SpellBuff_Struct buff;
|
||||||
/*005*/ uint8 level;
|
|
||||||
/*006*/ uint8 effect;
|
|
||||||
/*007*/ uint8 unknown7;
|
|
||||||
/*008*/ float unknown008;
|
|
||||||
/*012*/ uint32 spellid;
|
|
||||||
/*016*/ int32 duration;
|
|
||||||
/*020*/ uint32 num_hits;
|
|
||||||
/*024*/ uint32 playerId; // Global player ID?
|
|
||||||
/*028*/ uint32 unknown020;
|
|
||||||
/*032*/ uint8 unknown0028[48];
|
|
||||||
/*080*/ uint32 slotid;
|
/*080*/ uint32 slotid;
|
||||||
/*084*/ uint32 bufffade;
|
/*084*/ uint32 bufffade;
|
||||||
/*088*/
|
/*088*/
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SpellBuffFade_Struct {
|
|
||||||
/*000*/ uint32 entityid;
|
|
||||||
/*004*/ uint8 slot;
|
|
||||||
/*005*/ uint8 level;
|
|
||||||
/*006*/ uint8 effect;
|
|
||||||
/*007*/ uint8 unknown7;
|
|
||||||
/*008*/ uint32 spellid;
|
|
||||||
/*012*/ int32 duration;
|
|
||||||
/*016*/ uint32 unknown016;
|
|
||||||
/*020*/ uint32 unknown020; // Global player ID?
|
|
||||||
/*024*/ uint32 playerId; // Player id who cast the buff
|
|
||||||
/*028*/ uint32 slotid;
|
|
||||||
/*032*/ uint32 bufffade;
|
|
||||||
/*036*/
|
|
||||||
};
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
struct BuffIconEntry_Struct {
|
struct BuffIconEntry_Struct {
|
||||||
/*000*/ uint32 buff_slot;
|
/*000*/ uint32 buff_slot;
|
||||||
@@ -873,7 +847,7 @@ struct BindStruct {
|
|||||||
*/
|
*/
|
||||||
static const uint32 MAX_PP_LANGUAGE = 25; //
|
static const uint32 MAX_PP_LANGUAGE = 25; //
|
||||||
static const uint32 MAX_PP_SPELLBOOK = 720; // 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_MEMSPELL = 12; //was 9 now 10 on Underfoot
|
||||||
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 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_PP_AA_ARRAY = 300; //was 299
|
||||||
static const uint32 MAX_GROUP_MEMBERS = 6;
|
static const uint32 MAX_GROUP_MEMBERS = 6;
|
||||||
@@ -943,7 +917,7 @@ struct PlayerProfile_Struct
|
|||||||
/*00160*/ uint32 deity; // deity
|
/*00160*/ uint32 deity; // deity
|
||||||
/*00164*/ uint32 intoxication; // Alcohol level (in ticks till sober?)
|
/*00164*/ uint32 intoxication; // Alcohol level (in ticks till sober?)
|
||||||
/*00168*/ uint32 spellSlotRefresh[MAX_PP_MEMSPELL]; // Refresh time (millis) - 4 Octets Each
|
/*00168*/ uint32 spellSlotRefresh[MAX_PP_MEMSPELL]; // Refresh time (millis) - 4 Octets Each
|
||||||
/*00208*/ uint8 unknown00208[14]; // Seen 00 00 00 00 00 00 00 00 00 00 00 00 02 01
|
/*00208*/ uint8 unknown00208[6]; // Seen 00 00 00 00 00 00 00 00 00 00 00 00 02 01
|
||||||
/*00222*/ uint32 abilitySlotRefresh;
|
/*00222*/ uint32 abilitySlotRefresh;
|
||||||
/*00226*/ uint8 haircolor; // Player hair color
|
/*00226*/ uint8 haircolor; // Player hair color
|
||||||
/*00227*/ uint8 beardcolor; // Player beard color
|
/*00227*/ uint8 beardcolor; // Player beard color
|
||||||
@@ -952,24 +926,9 @@ struct PlayerProfile_Struct
|
|||||||
/*00230*/ uint8 hairstyle; // Player hair style
|
/*00230*/ uint8 hairstyle; // Player hair style
|
||||||
/*00231*/ uint8 beard; // Player beard type
|
/*00231*/ uint8 beard; // Player beard type
|
||||||
/*00232*/ uint8 unknown00232[4]; // was 14
|
/*00232*/ uint8 unknown00232[4]; // was 14
|
||||||
/*00236*/ union
|
/*00236*/ TextureProfile equipment;
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
/*00236*/ EquipStruct equip_helmet; // Equiptment: Helmet visual
|
|
||||||
/*00248*/ EquipStruct equip_chest; // Equiptment: Chest visual
|
|
||||||
/*00260*/ EquipStruct equip_arms; // Equiptment: Arms visual
|
|
||||||
/*00272*/ EquipStruct equip_bracers; // Equiptment: Wrist visual
|
|
||||||
/*00284*/ EquipStruct equip_hands; // Equiptment: Hands visual
|
|
||||||
/*00296*/ EquipStruct equip_legs; // Equiptment: Legs visual
|
|
||||||
/*00308*/ EquipStruct equip_feet; // Equiptment: Boots visual
|
|
||||||
/*00320*/ EquipStruct equip_primary; // Equiptment: Main visual
|
|
||||||
/*00332*/ EquipStruct equip_secondary; // Equiptment: Off visual
|
|
||||||
} equip;
|
|
||||||
/*00236*/ EquipStruct equipment[9]; //Underfoot Shows [108] for this part
|
|
||||||
};
|
|
||||||
/*00344*/ uint8 unknown00344[168]; // Underfoot Shows [160]
|
/*00344*/ uint8 unknown00344[168]; // Underfoot Shows [160]
|
||||||
/*00512*/ Color_Struct item_tint[9]; // RR GG BB 00
|
/*00512*/ TintProfile item_tint; // RR GG BB 00
|
||||||
/*00548*/ AA_Array aa_array[MAX_PP_AA_ARRAY]; // [3600] AAs 12 bytes each
|
/*00548*/ AA_Array aa_array[MAX_PP_AA_ARRAY]; // [3600] AAs 12 bytes each
|
||||||
/*04148*/ uint32 points; // Unspent Practice points - RELOCATED???
|
/*04148*/ uint32 points; // Unspent Practice points - RELOCATED???
|
||||||
/*04152*/ uint32 mana; // Current mana
|
/*04152*/ uint32 mana; // Current mana
|
||||||
@@ -986,7 +945,7 @@ struct PlayerProfile_Struct
|
|||||||
/*04217*/ uint8 unknown04217[147]; // was [175]
|
/*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]
|
/*04364*/ uint32 spell_book[MAX_PP_SPELLBOOK]; // List of the Spells in spellbook 720 = 90 pages [2880] was [1920]
|
||||||
/*07244*/ uint32 mem_spells[MAX_PP_MEMSPELL]; // List of spells memorized
|
/*07244*/ uint32 mem_spells[MAX_PP_MEMSPELL]; // List of spells memorized
|
||||||
/*07284*/ uint8 unknown07284[28]; //#### uint8 unknown04396[32]; in Titanium ####[28]
|
/*07284*/ uint8 unknown07284[20]; //#### uint8 unknown04396[32]; in Titanium ####[28]
|
||||||
/*07312*/ uint32 platinum; // Platinum Pieces on player
|
/*07312*/ uint32 platinum; // Platinum Pieces on player
|
||||||
/*07316*/ uint32 gold; // Gold Pieces on player
|
/*07316*/ uint32 gold; // Gold Pieces on player
|
||||||
/*07320*/ uint32 silver; // Silver Pieces on player
|
/*07320*/ uint32 silver; // Silver Pieces on player
|
||||||
@@ -1000,8 +959,7 @@ struct PlayerProfile_Struct
|
|||||||
/*07880*/ uint32 toxicity; // Potion Toxicity (15=too toxic, each potion adds 3)
|
/*07880*/ uint32 toxicity; // Potion Toxicity (15=too toxic, each potion adds 3)
|
||||||
/*07884*/ uint32 thirst_level; // Drink (ticks till next drink)
|
/*07884*/ uint32 thirst_level; // Drink (ticks till next drink)
|
||||||
/*07888*/ uint32 hunger_level; // Food (ticks till next eat)
|
/*07888*/ uint32 hunger_level; // Food (ticks till next eat)
|
||||||
/*07892*/ SpellBuff_Struct buffs[BUFF_COUNT]; // [1900] Buffs currently on the player (30 Max) - (Each Size 76)
|
/*07892*/ SpellBuff_Struct buffs[BUFF_COUNT]; // [2280] Buffs currently on the player (30 Max) - (Each Size 76)
|
||||||
/*09792*/ uint8 unknown09792[380]; // BUFF_COUNT has been left at 25. These are the extra 5 buffs in Underfoot
|
|
||||||
/*10172*/ Disciplines_Struct disciplines; // [400] Known disciplines
|
/*10172*/ Disciplines_Struct disciplines; // [400] Known disciplines
|
||||||
/*10972*/ uint32 recastTimers[MAX_RECAST_TYPES]; // Timers (UNIX Time of last use)
|
/*10972*/ uint32 recastTimers[MAX_RECAST_TYPES]; // Timers (UNIX Time of last use)
|
||||||
/*11052*/ uint8 unknown11052[160]; // Some type of Timers
|
/*11052*/ uint8 unknown11052[160]; // Some type of Timers
|
||||||
@@ -1232,7 +1190,7 @@ struct WearChange_Struct{
|
|||||||
/*002*/ uint32 material;
|
/*002*/ uint32 material;
|
||||||
/*006*/ uint32 unknown06;
|
/*006*/ uint32 unknown06;
|
||||||
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
|
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
|
||||||
/*014*/ Color_Struct color;
|
/*014*/ Tint_Struct color;
|
||||||
/*018*/ uint8 wear_slot_id;
|
/*018*/ uint8 wear_slot_id;
|
||||||
/*019*/
|
/*019*/
|
||||||
};
|
};
|
||||||
@@ -1749,7 +1707,7 @@ struct LootingItem_Struct {
|
|||||||
/*000*/ uint32 lootee;
|
/*000*/ uint32 lootee;
|
||||||
/*004*/ uint32 looter;
|
/*004*/ uint32 looter;
|
||||||
/*008*/ uint32 slot_id;
|
/*008*/ uint32 slot_id;
|
||||||
/*012*/ uint32 auto_loot;
|
/*012*/ int32 auto_loot;
|
||||||
/*016*/ uint32 unknown16;
|
/*016*/ uint32 unknown16;
|
||||||
/*020*/
|
/*020*/
|
||||||
};
|
};
|
||||||
@@ -1963,8 +1921,7 @@ struct Merchant_Sell_Struct {
|
|||||||
/*004*/ uint32 playerid; // Player's entity id
|
/*004*/ uint32 playerid; // Player's entity id
|
||||||
/*008*/ uint32 itemslot;
|
/*008*/ uint32 itemslot;
|
||||||
/*012*/ uint32 unknown12;
|
/*012*/ uint32 unknown12;
|
||||||
/*016*/ uint8 quantity; // Already sold
|
/*016*/ uint32 quantity;
|
||||||
/*017*/ uint8 Unknown017[3];
|
|
||||||
/*020*/ uint32 Unknown020;
|
/*020*/ uint32 Unknown020;
|
||||||
/*024*/ uint32 price;
|
/*024*/ uint32 price;
|
||||||
/*028*/ uint32 pricehighorderbits; // It appears the price is 64 bits in Underfoot+
|
/*028*/ uint32 pricehighorderbits; // It appears the price is 64 bits in Underfoot+
|
||||||
@@ -2054,7 +2011,7 @@ struct AdventureLeaderboard_Struct
|
|||||||
/*struct Item_Shop_Struct {
|
/*struct Item_Shop_Struct {
|
||||||
uint16 merchantid;
|
uint16 merchantid;
|
||||||
uint8 itemtype;
|
uint8 itemtype;
|
||||||
Item_Struct item;
|
ItemData item;
|
||||||
uint8 iss_unknown001[6];
|
uint8 iss_unknown001[6];
|
||||||
};*/
|
};*/
|
||||||
|
|
||||||
@@ -2209,9 +2166,7 @@ struct GroupFollow_Struct { // Underfoot Follow Struct
|
|||||||
|
|
||||||
struct InspectBuffs_Struct {
|
struct InspectBuffs_Struct {
|
||||||
/*000*/ uint32 spell_id[BUFF_COUNT];
|
/*000*/ uint32 spell_id[BUFF_COUNT];
|
||||||
/*100*/ uint32 filler100[5]; // BUFF_COUNT is really 30...
|
|
||||||
/*120*/ int32 tics_remaining[BUFF_COUNT];
|
/*120*/ int32 tics_remaining[BUFF_COUNT];
|
||||||
/*220*/ uint32 filler220[5]; // BUFF_COUNT is really 30...
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -3162,27 +3117,6 @@ struct PetitionBug_Struct{
|
|||||||
char text[1028];
|
char text[1028];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DyeStruct
|
|
||||||
{
|
|
||||||
union
|
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
struct Color_Struct head;
|
|
||||||
struct Color_Struct chest;
|
|
||||||
struct Color_Struct arms;
|
|
||||||
struct Color_Struct wrists;
|
|
||||||
struct Color_Struct hands;
|
|
||||||
struct Color_Struct legs;
|
|
||||||
struct Color_Struct feet;
|
|
||||||
struct Color_Struct primary; // you can't actually dye this
|
|
||||||
struct Color_Struct secondary; // or this
|
|
||||||
}
|
|
||||||
dyes;
|
|
||||||
struct Color_Struct dye[9];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ApproveZone_Struct {
|
struct ApproveZone_Struct {
|
||||||
char name[64];
|
char name[64];
|
||||||
uint32 zoneid;
|
uint32 zoneid;
|
||||||
@@ -3994,7 +3928,6 @@ struct AnnoyingZoneUnknown_Struct {
|
|||||||
|
|
||||||
struct LoadSpellSet_Struct {
|
struct LoadSpellSet_Struct {
|
||||||
uint8 spell[MAX_PP_MEMSPELL]; // 0 if no action
|
uint8 spell[MAX_PP_MEMSPELL]; // 0 if no action
|
||||||
uint16 unknown2; // is this two more spell gems?
|
|
||||||
uint32 unknown; // there seems to be an extra field in this packet...
|
uint32 unknown; // there seems to be an extra field in this packet...
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -37,10 +37,12 @@ enum { //values for pTimerType
|
|||||||
pTimerSenseTraps = 12,
|
pTimerSenseTraps = 12,
|
||||||
pTimerDisarmTraps = 13,
|
pTimerDisarmTraps = 13,
|
||||||
pTimerDisciplineReuseStart = 14,
|
pTimerDisciplineReuseStart = 14,
|
||||||
pTimerDisciplineReuseEnd = 24,
|
pTimerDisciplineReuseEnd = 24, // client actually has 20 ids, but still no disc go that high even on live
|
||||||
pTimerCombatAbility = 25,
|
pTimerCombatAbility = 25,
|
||||||
pTimerCombatAbility2 = 26, // RoF2+ Tiger Claw is unlinked from other monk skills, generic in case other classes ever need it
|
pTimerCombatAbility2 = 26, // RoF2+ Tiger Claw is unlinked from other monk skills, generic in case other classes ever need it
|
||||||
pTimerBeggingPickPocket = 27,
|
pTimerBeggingPickPocket = 27,
|
||||||
|
pTimerLinkedSpellReuseStart = 28,
|
||||||
|
pTimerLinkedSpellReuseEnd = 48,
|
||||||
|
|
||||||
pTimerLayHands = 87, //these IDs are used by client too
|
pTimerLayHands = 87, //these IDs are used by client too
|
||||||
pTimerHarmTouch = 89, //so dont change them
|
pTimerHarmTouch = 89, //so dont change them
|
||||||
|
|||||||
+1316
-43
File diff suppressed because it is too large
Load Diff
+736
@@ -45,6 +45,7 @@
|
|||||||
#define TIGER 63
|
#define TIGER 63
|
||||||
#define ELEMENTAL 75
|
#define ELEMENTAL 75
|
||||||
#define ALLIGATOR 91
|
#define ALLIGATOR 91
|
||||||
|
#define OGGOK_CITIZEN 93
|
||||||
#define EYE_OF_ZOMM 108
|
#define EYE_OF_ZOMM 108
|
||||||
#define WOLF_ELEMENTAL 120
|
#define WOLF_ELEMENTAL 120
|
||||||
#define INVISIBLE_MAN 127
|
#define INVISIBLE_MAN 127
|
||||||
@@ -112,6 +113,741 @@
|
|||||||
|
|
||||||
#define PLAYER_RACE_ALL_MASK 65535
|
#define PLAYER_RACE_ALL_MASK 65535
|
||||||
|
|
||||||
|
#define RT_ABHORRENT 193
|
||||||
|
#define RT_AIR_ELEMENTAL 210
|
||||||
|
#define RT_AIR_ELEMENTAL_2 475
|
||||||
|
#define RT_AIR_MEPHIT 291
|
||||||
|
#define RT_AKHEVA 230
|
||||||
|
#define RT_AKHEVA_2 722
|
||||||
|
#define RT_ALARAN 695
|
||||||
|
#define RT_ALARAN_GHOST 708
|
||||||
|
#define RT_ALARAN_SENTRY_STONE 703
|
||||||
|
#define RT_ALLIGATOR 91
|
||||||
|
#define RT_ALLIGATOR_2 479
|
||||||
|
#define RT_AMYGDALAN 99
|
||||||
|
#define RT_AMYGDALAN_2 663
|
||||||
|
#define RT_ANEUK 395
|
||||||
|
#define RT_ANIMATED_ARMOR 323
|
||||||
|
#define RT_ANIMATED_HAND 166
|
||||||
|
#define RT_ANIMATED_STATUE 442
|
||||||
|
#define RT_ANIMATED_STATUE_2 448
|
||||||
|
#define RT_APEXUS 637
|
||||||
|
#define RT_ARACHNID 326
|
||||||
|
#define RT_ARCANIST_OF_HATE 352
|
||||||
|
#define RT_ARMADILLO 87
|
||||||
|
#define RT_ARMOR_RACK 535
|
||||||
|
#define RT_AVIAK 13
|
||||||
|
#define RT_AVIAK_2 558
|
||||||
|
#define RT_AVIAK_PULL_ALONG 711
|
||||||
|
#define RT_AYONAE_RO 498
|
||||||
|
#define RT_BANNER 500
|
||||||
|
#define RT_BANNER_2 553
|
||||||
|
#define RT_BANNER_3 554
|
||||||
|
#define RT_BANNER_4 555
|
||||||
|
#define RT_BANNER_5 556
|
||||||
|
#define RT_BANNER_6 557
|
||||||
|
#define RT_BANNER_7 586
|
||||||
|
#define RT_BANNER_10TH_ANNIVERSARY 628
|
||||||
|
#define RT_BANSHEE 250
|
||||||
|
#define RT_BANSHEE_2 487
|
||||||
|
#define RT_BANSHEE_3 488
|
||||||
|
#define RT_BARBARIAN 2
|
||||||
|
#define RT_BARBARIAN_2 90
|
||||||
|
#define RT_BARREL 377
|
||||||
|
#define RT_BARREL_BARGE_SHIP 546
|
||||||
|
#define RT_BASILISK 436
|
||||||
|
#define RT_BAT 34
|
||||||
|
#define RT_BAT_2 260
|
||||||
|
#define RT_BAT_3 416
|
||||||
|
#define RT_BAZU 409
|
||||||
|
#define RT_BEAR 43
|
||||||
|
#define RT_BEAR_2 305
|
||||||
|
#define RT_BEAR_3 480
|
||||||
|
#define RT_BEAR_MOUNT 655
|
||||||
|
#define RT_BEAR_TRAP 503
|
||||||
|
#define RT_BEETLE 22
|
||||||
|
#define RT_BEETLE_2 559
|
||||||
|
#define RT_BEETLE_3 716
|
||||||
|
#define RT_BEGGAR 55
|
||||||
|
#define RT_BELLIKOS 638
|
||||||
|
#define RT_BERTOXXULOUS 152
|
||||||
|
#define RT_BERTOXXULOUS_2 255
|
||||||
|
#define RT_BIXIE 79
|
||||||
|
#define RT_BIXIE_2 520
|
||||||
|
#define RT_BLIMP_SHIP 693
|
||||||
|
#define RT_BLIND_DREAMER 669
|
||||||
|
#define RT_BLOOD_RAVEN 279
|
||||||
|
#define RT_BOAT 141
|
||||||
|
#define RT_BOAT_2 533
|
||||||
|
#define RT_BOLVIRK 486
|
||||||
|
#define RT_BONE_GOLEM 362
|
||||||
|
#define RT_BONE_GOLEM_2 491
|
||||||
|
#define RT_BONES 383
|
||||||
|
#define RT_BOOK_DERVISH 660
|
||||||
|
#define RT_BOT_PORTAL 329
|
||||||
|
#define RT_BOULDER 585
|
||||||
|
#define RT_BOX 376
|
||||||
|
#define RT_BRAXI 688
|
||||||
|
#define RT_BRAXI_MOUNT 676
|
||||||
|
#define RT_BRELL 640
|
||||||
|
#define RT_BRELLS_FIRST_CREATION 639
|
||||||
|
#define RT_BRISTLEBANE 153
|
||||||
|
#define RT_BROKEN_CLOCKWORK 274
|
||||||
|
#define RT_BRONTOTHERIUM 169
|
||||||
|
#define RT_BROWNIE 15
|
||||||
|
#define RT_BROWNIE_2 568
|
||||||
|
#define RT_BUBONIAN 268
|
||||||
|
#define RT_BUBONIAN_UNDERLING 269
|
||||||
|
#define RT_BURYNAI 144
|
||||||
|
#define RT_BURYNAI_2 602
|
||||||
|
#define RT_CAKE_10TH_ANNIVERSARY 629
|
||||||
|
#define RT_CAMPFIRE 567
|
||||||
|
#define RT_CARRIER_HAND 721
|
||||||
|
#define RT_CAT 713
|
||||||
|
#define RT_CAZIC_THULE 95
|
||||||
|
#define RT_CAZIC_THULE_2 670
|
||||||
|
#define RT_CENTAUR 16
|
||||||
|
#define RT_CENTAUR_2 521
|
||||||
|
#define RT_CHEST 378
|
||||||
|
#define RT_CHEST_2 589
|
||||||
|
#define RT_CHEST_3 590
|
||||||
|
#define RT_CHIMERA 412
|
||||||
|
#define RT_CHIMERA_2 582
|
||||||
|
#define RT_CHOKIDAI 356
|
||||||
|
#define RT_CLAM 115
|
||||||
|
#define RT_CLIKNAR_MOUNT 652
|
||||||
|
#define RT_CLIKNAR_QUEEN 642
|
||||||
|
#define RT_CLIKNAR_SOLDIER 643
|
||||||
|
#define RT_CLIKNAR_WORKER 644
|
||||||
|
#define RT_CLOCKWORK_BEETLE 276
|
||||||
|
#define RT_CLOCKWORK_BOAR 472
|
||||||
|
#define RT_CLOCKWORK_BOMB 504
|
||||||
|
#define RT_CLOCKWORK_BRAIN 249
|
||||||
|
#define RT_CLOCKWORK_GNOME 88
|
||||||
|
#define RT_CLOCKWORK_GOLEM 248
|
||||||
|
#define RT_CLOCKWORK_GUARDIAN 572
|
||||||
|
#define RT_COCKATRICE 96
|
||||||
|
#define RT_COFFIN 382
|
||||||
|
#define RT_COFFIN_2 592
|
||||||
|
#define RT_COIN_PURSE 427
|
||||||
|
#define RT_COLDAIN 183
|
||||||
|
#define RT_COLDAIN_2 645
|
||||||
|
#define RT_COLDAIN_3 646
|
||||||
|
#define RT_CORAL 460
|
||||||
|
#define RT_CORATHUS 459
|
||||||
|
#define RT_CRAB 302
|
||||||
|
#define RT_CRAGBEAST 390
|
||||||
|
#define RT_CRAGSLITHER 597
|
||||||
|
#define RT_CROCODILE 259
|
||||||
|
#define RT_CRYSTAL 591
|
||||||
|
#define RT_CRYSTAL_SHARD 425
|
||||||
|
#define RT_CRYSTAL_SPHERE 616
|
||||||
|
#define RT_CRYSTAL_SPIDER 327
|
||||||
|
#define RT_CRYSTALSKIN_AMBULOID 641
|
||||||
|
#define RT_CRYSTALSKIN_SESSILOID 647
|
||||||
|
#define RT_DAISY_MAN 97
|
||||||
|
#define RT_DARK_ELF 6
|
||||||
|
#define RT_DARK_ELF_2 77
|
||||||
|
#define RT_DARK_LORD 466
|
||||||
|
#define RT_DEMI_LICH 45
|
||||||
|
#define RT_DEMON_VULTURE 620
|
||||||
|
#define RT_DERVISH 100
|
||||||
|
#define RT_DERVISH_2 372
|
||||||
|
#define RT_DERVISH_3 431
|
||||||
|
#define RT_DERVISH_4 704
|
||||||
|
#define RT_DERVISH_VER_5 726
|
||||||
|
#define RT_DERVISH_VER_6 727
|
||||||
|
#define RT_DEVOURER 159
|
||||||
|
#define RT_DIRE_WOLF 171
|
||||||
|
#define RT_DISCORD_SHIP 404
|
||||||
|
#define RT_DISCORDLING 418
|
||||||
|
#define RT_DISEASED_FIEND 253
|
||||||
|
#define RT_DJINN 126
|
||||||
|
#define RT_DRACHNID 57
|
||||||
|
#define RT_DRACHNID_2 461
|
||||||
|
#define RT_DRACHNID_COCOON 462
|
||||||
|
#define RT_DRACOLICH 604
|
||||||
|
#define RT_DRAGLOCK 132
|
||||||
|
#define RT_DRAGON 49
|
||||||
|
#define RT_DRAGON_2 122
|
||||||
|
#define RT_DRAGON_3 165
|
||||||
|
#define RT_DRAGON_4 184
|
||||||
|
#define RT_DRAGON_5 192
|
||||||
|
#define RT_DRAGON_6 195
|
||||||
|
#define RT_DRAGON_7 196
|
||||||
|
#define RT_DRAGON_8 198
|
||||||
|
#define RT_DRAGON_9 304
|
||||||
|
#define RT_DRAGON_10 435
|
||||||
|
#define RT_DRAGON_11 437
|
||||||
|
#define RT_DRAGON_12 438
|
||||||
|
#define RT_DRAGON_13 452
|
||||||
|
#define RT_DRAGON_14 530
|
||||||
|
#define RT_DRAGON_15 531
|
||||||
|
#define RT_DRAGON_16 569
|
||||||
|
#define RT_DRAGON_BONES 423
|
||||||
|
#define RT_DRAGON_EGG 445
|
||||||
|
#define RT_DRAGON_STATUE 446
|
||||||
|
#define RT_DRAGORN 413
|
||||||
|
#define RT_DRAGORN_BOX 421
|
||||||
|
#define RT_DRAKE 89
|
||||||
|
#define RT_DRAKE_2 430
|
||||||
|
#define RT_DRAKE_3 432
|
||||||
|
#define RT_DRAKKIN 522
|
||||||
|
#define RT_DRIXIE 113
|
||||||
|
#define RT_DROGMORE 348
|
||||||
|
#define RT_DROLVARG 133
|
||||||
|
#define RT_DRYAD 243
|
||||||
|
#define RT_DWARF 8
|
||||||
|
#define RT_DWARF_2 94
|
||||||
|
#define RT_DYNAMITE_KEG 505
|
||||||
|
#define RT_DYNLETH 532
|
||||||
|
#define RT_EARTH_ELEMENTAL 209
|
||||||
|
#define RT_EARTH_ELEMENTAL_2 476
|
||||||
|
#define RT_EARTH_MEPHIT 292
|
||||||
|
#define RT_EEL 35
|
||||||
|
#define RT_EFREETI 101
|
||||||
|
#define RT_EFREETI_2 320
|
||||||
|
#define RT_ELDDAR 489
|
||||||
|
#define RT_ELEMENTAL 75
|
||||||
|
#define RT_ELK_HEAD 714
|
||||||
|
#define RT_ELVEN_BOAT 544
|
||||||
|
#define RT_ELVEN_GHOST 587
|
||||||
|
#define RT_ENCHANTED_ARMOR 175
|
||||||
|
#define RT_EROLLISI 150
|
||||||
|
#define RT_ERUDITE 3
|
||||||
|
#define RT_ERUDITE_2 78
|
||||||
|
#define RT_ERUDITE_3 678
|
||||||
|
#define RT_EVAN_TEST 204
|
||||||
|
#define RT_EVIL_EYE 21
|
||||||
|
#define RT_EVIL_EYE_2 375
|
||||||
|
#define RT_EVIL_EYE_3 469
|
||||||
|
#define RT_EXOSKELETON 570
|
||||||
|
#define RT_EXPLOSIVE_CART 692
|
||||||
|
#define RT_EYE 108
|
||||||
|
#define RT_FAIRY 25
|
||||||
|
#define RT_FAIRY_2 473
|
||||||
|
#define RT_FALLEN_KNIGHT 719
|
||||||
|
#define RT_FAUN 182
|
||||||
|
#define RT_FAY_DRAKE 154
|
||||||
|
#define RT_FENNIN_RO 284
|
||||||
|
#define RT_FERAN 410
|
||||||
|
#define RT_FERAN_MOUNT 623
|
||||||
|
#define RT_FIEND 300
|
||||||
|
#define RT_FIRE_ELEMENTAL 212
|
||||||
|
#define RT_FIRE_ELEMENTAL_2 477
|
||||||
|
#define RT_FIRE_MEPHIT 293
|
||||||
|
#define RT_FISH 24
|
||||||
|
#define RT_FISH_2 148
|
||||||
|
#define RT_FLAG 501
|
||||||
|
#define RT_FLOATING_ISLAND 596
|
||||||
|
#define RT_FLOATING_SKULL 512
|
||||||
|
#define RT_FLOATING_TOWER 691
|
||||||
|
#define RT_FLY 245
|
||||||
|
#define RT_FLYING_CARPET 720
|
||||||
|
#define RT_FOREST_GIANT 490
|
||||||
|
#define RT_FROG 343
|
||||||
|
#define RT_FROG_2 603
|
||||||
|
#define RT_FROGLOK 26
|
||||||
|
#define RT_FROGLOK_2 27
|
||||||
|
#define RT_FROGLOK_3 330
|
||||||
|
#define RT_FROGLOK_GHOST 371
|
||||||
|
#define RT_FROGLOK_SKELETON 349
|
||||||
|
#define RT_FUNGAL_FIEND 218
|
||||||
|
#define RT_FUNGUS_PATCH 463
|
||||||
|
#define RT_FUNGUSMAN 28
|
||||||
|
#define RT_GALORIAN 228
|
||||||
|
#define RT_GARGOYLE 29
|
||||||
|
#define RT_GARGOYLE_2 464
|
||||||
|
#define RT_GASBAG 30
|
||||||
|
#define RT_GELATINOUS_CUBE 31
|
||||||
|
#define RT_GELATINOUS_CUBE_2 712
|
||||||
|
#define RT_GELIDRAN 417
|
||||||
|
#define RT_GENARI 648
|
||||||
|
#define RT_GEONID 178
|
||||||
|
#define RT_GHOST 32
|
||||||
|
#define RT_GHOST_2 117
|
||||||
|
#define RT_GHOST_3 118
|
||||||
|
#define RT_GHOST_4 334
|
||||||
|
#define RT_GHOST_SHIP 114
|
||||||
|
#define RT_GHOST_SHIP_2 552
|
||||||
|
#define RT_GHOUL 33
|
||||||
|
#define RT_GHOUL_2 571
|
||||||
|
#define RT_GIANT 18
|
||||||
|
#define RT_GIANT_2 140
|
||||||
|
#define RT_GIANT_3 188
|
||||||
|
#define RT_GIANT_4 189
|
||||||
|
#define RT_GIANT_5 306
|
||||||
|
#define RT_GIANT_6 307
|
||||||
|
#define RT_GIANT_7 308
|
||||||
|
#define RT_GIANT_8 309
|
||||||
|
#define RT_GIANT_9 310
|
||||||
|
#define RT_GIANT_10 311
|
||||||
|
#define RT_GIANT_11 312
|
||||||
|
#define RT_GIANT_12 453
|
||||||
|
#define RT_GIANT_13 523
|
||||||
|
#define RT_GIANT_CLOCKWORK 275
|
||||||
|
#define RT_GIANT_RALLOSIAN_MATS 626
|
||||||
|
#define RT_GIANT_SHADE 526
|
||||||
|
#define RT_GIGYN 649
|
||||||
|
#define RT_GINGERBREAD_MAN 666
|
||||||
|
#define RT_GIRPLAN 419
|
||||||
|
#define RT_GNOLL 39
|
||||||
|
#define RT_GNOLL_2 524
|
||||||
|
#define RT_GNOLL_3 617
|
||||||
|
#define RT_GNOME 12
|
||||||
|
#define RT_GNOMEWORK 457
|
||||||
|
#define RT_GNOMISH_BALLOON 683
|
||||||
|
#define RT_GNOMISH_BOAT 545
|
||||||
|
#define RT_GNOMISH_HOVERING_TRANSPORT 685
|
||||||
|
#define RT_GNOMISH_ROCKET_PACK 684
|
||||||
|
#define RT_GOBLIN 40
|
||||||
|
#define RT_GOBLIN_2 59
|
||||||
|
#define RT_GOBLIN_3 137
|
||||||
|
#define RT_GOBLIN_4 369
|
||||||
|
#define RT_GOBLIN_5 433
|
||||||
|
#define RT_GOD_LUCLIN_VER_2 728
|
||||||
|
#define RT_GOD_LUCLIN_VER_3 729
|
||||||
|
#define RT_GOD_LUCLIN_VER_4 731
|
||||||
|
#define RT_GOD_OF_DISCORD 622
|
||||||
|
#define RT_GOLEM 17
|
||||||
|
#define RT_GOLEM_2 374
|
||||||
|
#define RT_GOO 145
|
||||||
|
#define RT_GOO_2 547
|
||||||
|
#define RT_GOO_3 548
|
||||||
|
#define RT_GOO_4 549
|
||||||
|
#define RT_GORAL 687
|
||||||
|
#define RT_GORAL_MOUNT 673
|
||||||
|
#define RT_GORGON 121
|
||||||
|
#define RT_GORILLA 41
|
||||||
|
#define RT_GORILLA_2 560
|
||||||
|
#define RT_GRANDFATHER_CLOCK 665
|
||||||
|
#define RT_GREKEN_YOUNG 651
|
||||||
|
#define RT_GREKEN_YOUNG_ADULT 650
|
||||||
|
#define RT_GRENDLAEN 701
|
||||||
|
#define RT_GRIEG_VENEFICUS 231
|
||||||
|
#define RT_GRIFFIN 47
|
||||||
|
#define RT_GRIFFIN_2 525
|
||||||
|
#define RT_GRIMLING 202
|
||||||
|
#define RT_GROUND_SHAKER 233
|
||||||
|
#define RT_GUARD 44
|
||||||
|
#define RT_GUARD_2 106
|
||||||
|
#define RT_GUARD_3 112
|
||||||
|
#define RT_GUARD_4 239
|
||||||
|
#define RT_GUARD_OF_JUSTICE 251
|
||||||
|
#define RT_GUARDIAN_CPU 593
|
||||||
|
#define RT_HADAL 698
|
||||||
|
#define RT_HAG 185
|
||||||
|
#define RT_HALF_ELF 7
|
||||||
|
#define RT_HALFLING 11
|
||||||
|
#define RT_HALFLING_2 81
|
||||||
|
#define RT_HARPY 111
|
||||||
|
#define RT_HARPY_2 527
|
||||||
|
#define RT_HIGH_ELF 5
|
||||||
|
#define RT_HIPPOGRIFF 186
|
||||||
|
#define RT_HOLGRESH 168
|
||||||
|
#define RT_HOLGRESH_2 715
|
||||||
|
#define RT_HONEY_POT 536
|
||||||
|
#define RT_HORSE 216
|
||||||
|
#define RT_HORSE_2 492
|
||||||
|
#define RT_HORSE_3 518
|
||||||
|
#define RT_HOVERING_PLATFORM 699
|
||||||
|
#define RT_HRAQUIS 261
|
||||||
|
#define RT_HUMAN 1
|
||||||
|
#define RT_HUMAN_2 67
|
||||||
|
#define RT_HUMAN_3 71
|
||||||
|
#define RT_HUMAN_4 566
|
||||||
|
#define RT_HUMAN_GHOST 588
|
||||||
|
#define RT_HUVUL 400
|
||||||
|
#define RT_HYDRA_CRYSTAL 615
|
||||||
|
#define RT_HYDRA_MOUNT 631
|
||||||
|
#define RT_HYDRA_NPC 632
|
||||||
|
#define RT_HYNID 388
|
||||||
|
#define RT_ICE_SPECTRE 174
|
||||||
|
#define RT_IKAAV 394
|
||||||
|
#define RT_IKSAR 128
|
||||||
|
#define RT_IKSAR_2 139
|
||||||
|
#define RT_IKSAR_GHOST 605
|
||||||
|
#define RT_IKSAR_GOLEM 160
|
||||||
|
#define RT_IKSAR_SKELETON 606
|
||||||
|
#define RT_IKSAR_SPIRIT 147
|
||||||
|
#define RT_IMP 46
|
||||||
|
#define RT_INNORUUK 123
|
||||||
|
#define RT_INSECT 370
|
||||||
|
#define RT_INTERACTIVE_OBJECT 2250
|
||||||
|
#define RT_INVISIBLE_MAN 127
|
||||||
|
#define RT_INVISIBLE_MAN_2 681
|
||||||
|
#define RT_INVISIBLE_MAN_3 690
|
||||||
|
#define RT_INVISIBLE_MAN_OF_ZOMM 600
|
||||||
|
#define RT_IXT 393
|
||||||
|
#define RT_JOKESTER 384
|
||||||
|
#define RT_JUM_JUM_BUCKET 537
|
||||||
|
#define RT_JUNK_BEAST 273
|
||||||
|
#define RT_KANGON 689
|
||||||
|
#define RT_KANGON_MOUNT 677
|
||||||
|
#define RT_KARANA 278
|
||||||
|
#define RT_KEDGE 103
|
||||||
|
#define RT_KEDGE_2 561
|
||||||
|
#define RT_KERRAN 23
|
||||||
|
#define RT_KERRAN_2 562
|
||||||
|
#define RT_KIRIN 434
|
||||||
|
#define RT_KIRIN_2 583
|
||||||
|
#define RT_KNIGHT_OF_HATE 351
|
||||||
|
#define RT_KNIGHT_OF_PESTILENCE 266
|
||||||
|
#define RT_KOBOLD 48
|
||||||
|
#define RT_KOBOLD_2 455
|
||||||
|
#define RT_KRAKEN 315
|
||||||
|
#define RT_KYV 396
|
||||||
|
#define RT_LAUNCH 73
|
||||||
|
#define RT_LAVA_ROCK 447
|
||||||
|
#define RT_LAVA_SPIDER 450
|
||||||
|
#define RT_LAVA_SPIDER_QUEEN 451
|
||||||
|
#define RT_LEECH 104
|
||||||
|
#define RT_LEPERTOLOTH 267
|
||||||
|
#define RT_LIGHTCRAWLER 223
|
||||||
|
#define RT_LIGHTNING_WARRIOR 407
|
||||||
|
#define RT_LION 50
|
||||||
|
#define RT_LIZARD_MAN 51
|
||||||
|
#define RT_LUCLIN 724
|
||||||
|
#define RT_LUGGALD 345
|
||||||
|
#define RT_LUGGALD_2 346
|
||||||
|
#define RT_LUGGALDS 347
|
||||||
|
#define RT_MALARIAN 265
|
||||||
|
#define RT_MAMMOTH 107
|
||||||
|
#define RT_MAMMOTH_2 528
|
||||||
|
#define RT_MAN_EATING_PLANT 162
|
||||||
|
#define RT_MANSION 595
|
||||||
|
#define RT_MANTICORE 172
|
||||||
|
#define RT_MANTRAP 573
|
||||||
|
#define RT_MARIONETTE 659
|
||||||
|
#define RT_MASTRUQ 402
|
||||||
|
#define RT_MATA_MURAM 406
|
||||||
|
#define RT_MEDIUM_PLANT 541
|
||||||
|
#define RT_MEPHIT 607
|
||||||
|
#define RT_MERCHANT_SHIP 550
|
||||||
|
#define RT_MERMAID 110
|
||||||
|
#define RT_MIMIC 52
|
||||||
|
#define RT_MINI_POM 252
|
||||||
|
#define RT_MINOTAUR 53
|
||||||
|
#define RT_MINOTAUR_2 420
|
||||||
|
#define RT_MINOTAUR_3 470
|
||||||
|
#define RT_MINOTAUR_4 574
|
||||||
|
#define RT_MITHANIEL_MARR 296
|
||||||
|
#define RT_MORELL_THULE 658
|
||||||
|
#define RT_MOSQUITO 134
|
||||||
|
#define RT_MOUTH_OF_INSANITY 281
|
||||||
|
#define RT_MUDDITE 608
|
||||||
|
#define RT_MUMMY 368
|
||||||
|
#define RT_MURAMITE_ARMOR_PILE 424
|
||||||
|
#define RT_MURKGLIDER 414
|
||||||
|
#define RT_MURKGLIDER_EGG_SAC 429
|
||||||
|
#define RT_MUTNA 401
|
||||||
|
#define RT_NEKHON 614
|
||||||
|
#define RT_NETHERBIAN 229
|
||||||
|
#define RT_NIGHTMARE 287
|
||||||
|
#define RT_NIGHTMARE_GARGOYLE 280
|
||||||
|
#define RT_NIGHTMARE_GOBLIN 277
|
||||||
|
#define RT_NIGHTMARE_MEPHIT 294
|
||||||
|
#define RT_NIGHTMARE_UNICORN 517
|
||||||
|
#define RT_NIGHTMARE_UNICORN_2 519
|
||||||
|
#define RT_NIGHTMARE_WRAITH 264
|
||||||
|
#define RT_NIHIL 385
|
||||||
|
#define RT_NILBORIEN 317
|
||||||
|
#define RT_NOC 397
|
||||||
|
#define RT_NYMPH 242
|
||||||
|
#define RT_OGRE 10
|
||||||
|
#define RT_OGRE_2 93
|
||||||
|
#define RT_OGRE_NPC_MALE 624
|
||||||
|
#define RT_ORB 730
|
||||||
|
#define RT_ORC 54
|
||||||
|
#define RT_ORC_2 458
|
||||||
|
#define RT_OTHMIR 190
|
||||||
|
#define RT_OWLBEAR 206
|
||||||
|
#define RT_PARASITIC_SCAVENGER 700
|
||||||
|
#define RT_PEGASUS 125
|
||||||
|
#define RT_PEGASUS_2 493
|
||||||
|
#define RT_PEGASUS_3 732
|
||||||
|
#define RT_PHOENIX 303
|
||||||
|
#define RT_PIRANHA 74
|
||||||
|
#define RT_PIRATE 335
|
||||||
|
#define RT_PIRATE_2 336
|
||||||
|
#define RT_PIRATE_3 337
|
||||||
|
#define RT_PIRATE_4 338
|
||||||
|
#define RT_PIRATE_5 339
|
||||||
|
#define RT_PIRATE_6 340
|
||||||
|
#define RT_PIRATE_7 341
|
||||||
|
#define RT_PIRATE_8 342
|
||||||
|
#define RT_PIRATE_SHIP 551
|
||||||
|
#define RT_PIXIE 56
|
||||||
|
#define RT_POISON_FROG 316
|
||||||
|
#define RT_PORTAL 426
|
||||||
|
#define RT_POWDER_KEG 636
|
||||||
|
#define RT_PRESSURE_PLATE 506
|
||||||
|
#define RT_PUFFER_SPORE 507
|
||||||
|
#define RT_PUMA 76
|
||||||
|
#define RT_PUMA_2 439
|
||||||
|
#define RT_PUMA_3 584
|
||||||
|
#define RT_PUSLING 270
|
||||||
|
#define RT_PYRILEN 411
|
||||||
|
#define RT_RA_TUK 398
|
||||||
|
#define RT_RABBIT 668
|
||||||
|
#define RT_RALLOS_ZEK 66
|
||||||
|
#define RT_RALLOS_ZEK_2 288
|
||||||
|
#define RT_RALLOS_ZEK_MINION 325
|
||||||
|
#define RT_RAPTOR 163
|
||||||
|
#define RT_RAPTOR_2 609
|
||||||
|
#define RT_RAPTOR_MOUNT 680
|
||||||
|
#define RT_RAT 36
|
||||||
|
#define RT_RAT_2 415
|
||||||
|
#define RT_RAT_MOUNT 656
|
||||||
|
#define RT_RATMAN 156
|
||||||
|
#define RT_RATMAN_2 718
|
||||||
|
#define RT_REANIMATED_HAND 80
|
||||||
|
#define RT_RECUSO 237
|
||||||
|
#define RT_REGENERATION_POOL 705
|
||||||
|
#define RT_RELIC_CASE 707
|
||||||
|
#define RT_RHINO_BEETLE 207
|
||||||
|
#define RT_RHINOCEROS 135
|
||||||
|
#define RT_ROBOCOPTER_OF_ZOMM 601
|
||||||
|
#define RT_ROCK_PILE 428
|
||||||
|
#define RT_ROCKHOPPER 200
|
||||||
|
#define RT_RONNIE_TEST 197
|
||||||
|
#define RT_ROOT_TENTACLE 509
|
||||||
|
#define RT_ROT_DOG_MOUNT 672
|
||||||
|
#define RT_ROTDOG 662
|
||||||
|
#define RT_ROTOCOPTER 577
|
||||||
|
#define RT_ROWBOAT 502
|
||||||
|
#define RT_ROYAL_GUARD 667
|
||||||
|
#define RT_RUJARKIAN_ORC 361
|
||||||
|
#define RT_RUJARKIAN_ORC_2 366
|
||||||
|
#define RT_RUNED_ORB 422
|
||||||
|
#define RT_RUNIC_SYMBOL 510
|
||||||
|
#define RT_SABER_TOOTHED_CAT 119
|
||||||
|
#define RT_SALTPETTER_BOMB 511
|
||||||
|
#define RT_SAND_ELF 364
|
||||||
|
#define RT_SANDMAN 664
|
||||||
|
#define RT_SARNAK 131
|
||||||
|
#define RT_SARNAK_2 610
|
||||||
|
#define RT_SARNAK_GOLEM 164
|
||||||
|
#define RT_SARNAK_SPIRIT 146
|
||||||
|
#define RT_SARYRN 283
|
||||||
|
#define RT_SATYR 529
|
||||||
|
#define RT_SCALED_WOLF 481
|
||||||
|
#define RT_SCARECROW 82
|
||||||
|
#define RT_SCARECROW_2 575
|
||||||
|
#define RT_SCARLET_CHEETAH 221
|
||||||
|
#define RT_SCLERA_MOUNT 675
|
||||||
|
#define RT_SCORPION 129
|
||||||
|
#define RT_SCORPION_2 149
|
||||||
|
#define RT_SCORPION_3 611
|
||||||
|
#define RT_SCRYKIN 495
|
||||||
|
#define RT_SEA_TURTLE 194
|
||||||
|
#define RT_SEAHORSE 116
|
||||||
|
#define RT_SELYRAH 686
|
||||||
|
#define RT_SELYRAH_MOUNT 674
|
||||||
|
#define RT_SERU 236
|
||||||
|
#define RT_SERVANT_OF_SHADOW 723
|
||||||
|
#define RT_SESSILOID_MOUNT 657
|
||||||
|
#define RT_SHADE 224
|
||||||
|
#define RT_SHADE_2 373
|
||||||
|
#define RT_SHADE_3 576
|
||||||
|
#define RT_SHADEL 205
|
||||||
|
#define RT_SHAMBLING_MOUND 494
|
||||||
|
#define RT_SHARK 61
|
||||||
|
#define RT_SHIKNAR 199
|
||||||
|
#define RT_SHILISKIN 467
|
||||||
|
#define RT_SHIP 72
|
||||||
|
#define RT_SHIP_IN_A_BOTTLE 702
|
||||||
|
#define RT_SHISSAR 217
|
||||||
|
#define RT_SHISSAR_2 563
|
||||||
|
#define RT_SHRIEKER 227
|
||||||
|
#define RT_SIREN 187
|
||||||
|
#define RT_SIREN_2 564
|
||||||
|
#define RT_SKELETAL_HORSE 282
|
||||||
|
#define RT_SKELETON 60
|
||||||
|
#define RT_SKELETON_2 367
|
||||||
|
#define RT_SKELETON_3 484
|
||||||
|
#define RT_SKUNK 83
|
||||||
|
#define RT_SKYSTRIDER 709
|
||||||
|
#define RT_SMALL_PLANT 540
|
||||||
|
#define RT_SNAKE 37
|
||||||
|
#define RT_SNAKE_2 468
|
||||||
|
#define RT_SNAKE_ELEMENTAL 84
|
||||||
|
#define RT_SNOW_DERVISH 170
|
||||||
|
#define RT_SNOW_RABBIT 176
|
||||||
|
#define RT_SOKOKAR 618
|
||||||
|
#define RT_SOKOKAR_MOUNT 625
|
||||||
|
#define RT_SOKOKAR_W_SADDLE 627
|
||||||
|
#define RT_SOLUSEK_RO 58
|
||||||
|
#define RT_SOLUSEK_RO_2 247
|
||||||
|
#define RT_SOLUSEK_RO_GUARD 254
|
||||||
|
#define RT_SONIC_WOLF 232
|
||||||
|
#define RT_SOUL_DEVOURER 286
|
||||||
|
#define RT_SPECTRE 85
|
||||||
|
#define RT_SPECTRE_2 485
|
||||||
|
#define RT_SPELL_PARTICLE_1 599
|
||||||
|
#define RT_SPHINX 86
|
||||||
|
#define RT_SPHINX_2 565
|
||||||
|
#define RT_SPIDER 38
|
||||||
|
#define RT_SPIDER_2 440
|
||||||
|
#define RT_SPIDER_EGG_SACK 449
|
||||||
|
#define RT_SPIDER_MOUNT 654
|
||||||
|
#define RT_SPIDER_QUEEN 441
|
||||||
|
#define RT_SPIKE_TRAP 513
|
||||||
|
#define RT_SPIRIT_WOLF 483
|
||||||
|
#define RT_SPORALI 456
|
||||||
|
#define RT_STONE_JUG 539
|
||||||
|
#define RT_STONE_PYLON 619
|
||||||
|
#define RT_STONE_RING 508
|
||||||
|
#define RT_STONE_WORKER 387
|
||||||
|
#define RT_STONE_WORKER_2 405
|
||||||
|
#define RT_STONEGRABBER 220
|
||||||
|
#define RT_STONEMITE 391
|
||||||
|
#define RT_STORMRIDER 272
|
||||||
|
#define RT_SUCCUBUS 408
|
||||||
|
#define RT_SUCCULENT 167
|
||||||
|
#define RT_SULLON_ZEK 499
|
||||||
|
#define RT_SUN_REVENANT 226
|
||||||
|
#define RT_SUNFLOWER 225
|
||||||
|
#define RT_SWINETOR 696
|
||||||
|
#define RT_SWORDFISH 105
|
||||||
|
#define RT_SYNARCANA 363
|
||||||
|
#define RT_TABLE 380
|
||||||
|
#define RT_TADPOLE 102
|
||||||
|
#define RT_TAELOSIAN 403
|
||||||
|
#define RT_TALL_PLANT 542
|
||||||
|
#define RT_TALLON_ZEK 290
|
||||||
|
#define RT_TANETH 399
|
||||||
|
#define RT_TAREW_MARR 246
|
||||||
|
#define RT_TEGI 215
|
||||||
|
#define RT_TELEPORT_MAN 240
|
||||||
|
#define RT_TELEPORTATION_STAND 706
|
||||||
|
#define RT_TELMIRA 653
|
||||||
|
#define RT_TENTACLE_TERROR 68
|
||||||
|
#define RT_TENTACLE_TERROR_2 578
|
||||||
|
#define RT_TERRIS_THULE 257
|
||||||
|
#define RT_TEST_OBJECT 301
|
||||||
|
#define RT_THE_RATHE 298
|
||||||
|
#define RT_THE_TRIBUNAL 256
|
||||||
|
#define RT_THOUGHT_HORROR 214
|
||||||
|
#define RT_TIGER 63
|
||||||
|
#define RT_TIN_SOLDIER 263
|
||||||
|
#define RT_TOOLBOX 538
|
||||||
|
#define RT_TOPIARY_LION 661
|
||||||
|
#define RT_TOPIARY_LION_MOUNT 671
|
||||||
|
#define RT_TORMENTOR 285
|
||||||
|
#define RT_TOTEM 173
|
||||||
|
#define RT_TOTEM_2 514
|
||||||
|
#define RT_TRAKANON 19
|
||||||
|
#define RT_TRANQUILION 262
|
||||||
|
#define RT_TREANT 64
|
||||||
|
#define RT_TREANT_2 244
|
||||||
|
#define RT_TREANT_3 496
|
||||||
|
#define RT_TRIBUNAL 151
|
||||||
|
#define RT_TRIUMVIRATE 697
|
||||||
|
#define RT_TROLL 9
|
||||||
|
#define RT_TROLL_2 92
|
||||||
|
#define RT_TROLL_3 331
|
||||||
|
#define RT_TROLL_4 332
|
||||||
|
#define RT_TROLL_5 333
|
||||||
|
#define RT_TROLL_ZOMBIE 344
|
||||||
|
#define RT_TRUSIK 386
|
||||||
|
#define RT_TSETSIAN 612
|
||||||
|
#define RT_TUMBLEWEED 694
|
||||||
|
#define RT_TUNARE 62
|
||||||
|
#define RT_TUREPTA 389
|
||||||
|
#define RT_UKUN 392
|
||||||
|
#define RT_ULTHORK 191
|
||||||
|
#define RT_UNDEAD_CHOKIDAI 357
|
||||||
|
#define RT_UNDEAD_FOOTMAN 324
|
||||||
|
#define RT_UNDEAD_FROGLOK 350
|
||||||
|
#define RT_UNDEAD_IKSAR 161
|
||||||
|
#define RT_UNDEAD_KNIGHT 297
|
||||||
|
#define RT_UNDEAD_SARNAK 155
|
||||||
|
#define RT_UNDEAD_VEKSAR 358
|
||||||
|
#define RT_UNDERBULK 201
|
||||||
|
#define RT_UNICORN 124
|
||||||
|
#define RT_UNKNOWN_RACE 0
|
||||||
|
#define RT_UNKNOWN_RACE_2 142
|
||||||
|
#define RT_UNKNOWN_RACE_3 143
|
||||||
|
#define RT_UNKNOWN_RACE_4 179
|
||||||
|
#define RT_UNKNOWN_RACE_5 180
|
||||||
|
#define RT_UNKNOWN_RACE_6 443
|
||||||
|
#define RT_UNKNOWN_RACE_7 444
|
||||||
|
#define RT_VAH_SHIR 130
|
||||||
|
#define RT_VAH_SHIR_2 238
|
||||||
|
#define RT_VAH_SHIR_SKELETON 234
|
||||||
|
#define RT_VALLON_ZEK 289
|
||||||
|
#define RT_VALORIAN 318
|
||||||
|
#define RT_VALORIAN_2 322
|
||||||
|
#define RT_VAMPIRE 65
|
||||||
|
#define RT_VAMPIRE_2 98
|
||||||
|
#define RT_VAMPIRE_3 208
|
||||||
|
#define RT_VAMPIRE_4 219
|
||||||
|
#define RT_VAMPIRE_5 359
|
||||||
|
#define RT_VAMPIRE_6 360
|
||||||
|
#define RT_VAMPIRE_7 365
|
||||||
|
#define RT_VAMPIRE_8 497
|
||||||
|
#define RT_VASE 379
|
||||||
|
#define RT_VEGEROG 258
|
||||||
|
#define RT_VEKSAR 353
|
||||||
|
#define RT_VEKSAR_2 354
|
||||||
|
#define RT_VEKSAR_3 355
|
||||||
|
#define RT_VENRIL_SATHIR 20
|
||||||
|
#define RT_VINE_MAW 717
|
||||||
|
#define RT_WAGON 621
|
||||||
|
#define RT_WALRUS 177
|
||||||
|
#define RT_WAR_BOAR 319
|
||||||
|
#define RT_WAR_BOAR_2 321
|
||||||
|
#define RT_WAR_WRAITH 313
|
||||||
|
#define RT_WASP 109
|
||||||
|
#define RT_WATER_ELEMENTAL 211
|
||||||
|
#define RT_WATER_ELEMENTAL_2 478
|
||||||
|
#define RT_WATER_MEPHIT 271
|
||||||
|
#define RT_WATER_SPOUT 710
|
||||||
|
#define RT_WEAPON_RACK 381
|
||||||
|
#define RT_WEAPON_RACK_2 534
|
||||||
|
#define RT_WEB 515
|
||||||
|
#define RT_WEDDING_ALTAR 635
|
||||||
|
#define RT_WEDDING_ARBOR 634
|
||||||
|
#define RT_WEDDING_FLOWERS 633
|
||||||
|
#define RT_WEREORC 579
|
||||||
|
#define RT_WEREWOLF 14
|
||||||
|
#define RT_WEREWOLF_2 241
|
||||||
|
#define RT_WEREWOLF_3 454
|
||||||
|
#define RT_WETFANG_MINNOW 213
|
||||||
|
#define RT_WHIRLIGIG 682
|
||||||
|
#define RT_WICKER_BASKET 516
|
||||||
|
#define RT_WILL_O_WISP 69
|
||||||
|
#define RT_WINE_CASK 543
|
||||||
|
#define RT_WINE_CASK_2 630
|
||||||
|
#define RT_WITHERAN 465
|
||||||
|
#define RT_WITHERAN_2 474
|
||||||
|
#define RT_WOLF 42
|
||||||
|
#define RT_WOLF_2 120
|
||||||
|
#define RT_WOLF_3 482
|
||||||
|
#define RT_WOOD_ELF 4
|
||||||
|
#define RT_WORG 580
|
||||||
|
#define RT_WORG_2 594
|
||||||
|
#define RT_WORM 203
|
||||||
|
#define RT_WRETCH 235
|
||||||
|
#define RT_WRULON 314
|
||||||
|
#define RT_WRULON_2 598
|
||||||
|
#define RT_WURM 158
|
||||||
|
#define RT_WURM_2 613
|
||||||
|
#define RT_WURM_MOUNT 679
|
||||||
|
#define RT_WYVERN 157
|
||||||
|
#define RT_WYVERN_2 581
|
||||||
|
#define RT_XALGOZ 136
|
||||||
|
#define RT_XARIC_THE_UNSPOKEN 725
|
||||||
|
#define RT_XEGONY 299
|
||||||
|
#define RT_YAKKAR 181
|
||||||
|
#define RT_YETI 138
|
||||||
|
#define RT_ZEBUXORUK 295
|
||||||
|
#define RT_ZEBUXORUKS_CAGE 328
|
||||||
|
#define RT_ZELNIAK 222
|
||||||
|
#define RT_ZOMBIE 70
|
||||||
|
#define RT_ZOMBIE_2 471
|
||||||
|
|
||||||
|
|
||||||
const char* GetRaceIDName(uint16 race_id);
|
const char* GetRaceIDName(uint16 race_id);
|
||||||
const char* GetPlayerRaceName(uint32 player_race_value);
|
const char* GetPlayerRaceName(uint32 player_race_value);
|
||||||
|
|||||||
@@ -65,6 +65,15 @@ namespace EQEmu {
|
|||||||
return Real(0.0, 1.0) <= required;
|
return Real(0.0, 1.0) <= required;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// same range as client's roll0
|
||||||
|
// This is their main high level RNG function
|
||||||
|
int Roll0(int max)
|
||||||
|
{
|
||||||
|
if (max - 1 > 0)
|
||||||
|
return Int(0, max - 1);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// std::shuffle requires a RNG engine passed to it, so lets provide a wrapper to use our engine
|
// std::shuffle requires a RNG engine passed to it, so lets provide a wrapper to use our engine
|
||||||
template<typename RandomAccessIterator>
|
template<typename RandomAccessIterator>
|
||||||
void Shuffle(RandomAccessIterator first, RandomAccessIterator last)
|
void Shuffle(RandomAccessIterator first, RandomAccessIterator last)
|
||||||
|
|||||||
+54
-13
@@ -55,6 +55,8 @@ RULE_REAL(Character, AAExpMultiplier, 0.5)
|
|||||||
RULE_REAL(Character, GroupExpMultiplier, 0.5)
|
RULE_REAL(Character, GroupExpMultiplier, 0.5)
|
||||||
RULE_REAL(Character, RaidExpMultiplier, 0.2)
|
RULE_REAL(Character, RaidExpMultiplier, 0.2)
|
||||||
RULE_BOOL(Character, UseXPConScaling, true)
|
RULE_BOOL(Character, UseXPConScaling, true)
|
||||||
|
RULE_INT(Character, ShowExpValues, 0) //0 - normal, 1 - Show raw experience values, 2 - Show raw experience values AND percent.
|
||||||
|
RULE_INT(Character, GreenModifier, 20)
|
||||||
RULE_INT(Character, LightBlueModifier, 40)
|
RULE_INT(Character, LightBlueModifier, 40)
|
||||||
RULE_INT(Character, BlueModifier, 90)
|
RULE_INT(Character, BlueModifier, 90)
|
||||||
RULE_INT(Character, WhiteModifier, 100)
|
RULE_INT(Character, WhiteModifier, 100)
|
||||||
@@ -113,6 +115,7 @@ RULE_BOOL(Character, CheckCursorEmptyWhenLooting, true) // If true, a player can
|
|||||||
RULE_BOOL(Character, MaintainIntoxicationAcrossZones, true) // If true, alcohol effects are maintained across zoning and logging out/in.
|
RULE_BOOL(Character, MaintainIntoxicationAcrossZones, true) // If true, alcohol effects are maintained across zoning and logging out/in.
|
||||||
RULE_BOOL(Character, EnableDiscoveredItems, true) // If enabled, it enables EVENT_DISCOVER_ITEM and also saves character names and timestamps for the first time an item is discovered.
|
RULE_BOOL(Character, EnableDiscoveredItems, true) // If enabled, it enables EVENT_DISCOVER_ITEM and also saves character names and timestamps for the first time an item is discovered.
|
||||||
RULE_BOOL(Character, EnableXTargetting, true) // Enable Extended Targetting Window, for users with UF and later clients.
|
RULE_BOOL(Character, EnableXTargetting, true) // Enable Extended Targetting Window, for users with UF and later clients.
|
||||||
|
RULE_BOOL(Character, EnableAggroMeter, true) // Enable Aggro Meter, for users with RoF and later clients.
|
||||||
RULE_BOOL(Character, KeepLevelOverMax, false) // Don't delevel a character that has somehow gone over the level cap
|
RULE_BOOL(Character, KeepLevelOverMax, false) // Don't delevel a character that has somehow gone over the level cap
|
||||||
RULE_INT(Character, FoodLossPerUpdate, 35) // How much food/water you lose per stamina update
|
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, BaseInstrumentSoftCap, 36) // Softcap for instrument mods, 36 commonly referred to as "3.6" as well.
|
||||||
@@ -142,6 +145,12 @@ RULE_INT(Character, InvSnapshotMinRetryM, 30) // Time (in minutes) to re-attempt
|
|||||||
RULE_INT(Character, InvSnapshotHistoryD, 30) // Time (in days) to keep snapshot entries
|
RULE_INT(Character, InvSnapshotHistoryD, 30) // Time (in days) to keep snapshot entries
|
||||||
RULE_BOOL(Character, RestrictSpellScribing, false) // Restricts spell scribing to allowable races/classes of spell scroll, if true
|
RULE_BOOL(Character, RestrictSpellScribing, false) // Restricts spell scribing to allowable races/classes of spell scroll, if true
|
||||||
RULE_BOOL(Character, UseStackablePickPocketing, true) // Allows stackable pickpocketed items to stack instead of only being allowed in empty inventory slots
|
RULE_BOOL(Character, UseStackablePickPocketing, true) // Allows stackable pickpocketed items to stack instead of only being allowed in empty inventory slots
|
||||||
|
RULE_BOOL(Character, EnableAvoidanceCap, false)
|
||||||
|
RULE_INT(Character, AvoidanceCap, 750) // 750 Is a pretty good value, seen people dodge all attacks beyond 1,000 Avoidance
|
||||||
|
RULE_BOOL(Character, AllowMQTarget, false) // Disables putting players in the 'hackers' list for targeting beyond the clip plane or attempting to target something untargetable
|
||||||
|
RULE_BOOL(Character, UseOldBindWound, false) // Uses the original bind wound behavior
|
||||||
|
RULE_BOOL(Character, GrantHoTTOnCreate, false) // Grant Health of Target's Target leadership AA on character creation
|
||||||
|
RULE_BOOL(Character, UseOldConSystem, false) // Grant Health of Target's Target leadership AA on character creation
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY(Mercs)
|
RULE_CATEGORY(Mercs)
|
||||||
@@ -156,6 +165,8 @@ RULE_INT(Mercs, AggroRadius, 100) // Determines the distance from which a merc
|
|||||||
RULE_INT(Mercs, AggroRadiusPuller, 25) // Determines the distance from which a merc will aggro group member's target, if they have the group role of puller (also used to determine the distance at which a healer merc will begin healing a group member, if they have the group role of puller)
|
RULE_INT(Mercs, AggroRadiusPuller, 25) // Determines the distance from which a merc will aggro group member's target, if they have the group role of puller (also used to determine the distance at which a healer merc will begin healing a group member, if they have the group role of puller)
|
||||||
RULE_INT(Mercs, ResurrectRadius, 50) // Determines the distance from which a healer merc will attempt to resurrect a group member's corpse
|
RULE_INT(Mercs, ResurrectRadius, 50) // Determines the distance from which a healer merc will attempt to resurrect a group member's corpse
|
||||||
RULE_INT(Mercs, ScaleRate, 100)
|
RULE_INT(Mercs, ScaleRate, 100)
|
||||||
|
RULE_BOOL(Mercs, MercsUsePathing, true) // Mercs will use node pathing when moving
|
||||||
|
RULE_BOOL(Mercs, AllowMercSuspendInCombat, true)
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY(Guild)
|
RULE_CATEGORY(Guild)
|
||||||
@@ -203,6 +214,7 @@ RULE_INT(World, ExemptMaxClientsStatus, -1) // Exempt accounts from the MaxClien
|
|||||||
RULE_INT(World, AddMaxClientsPerIP, -1) // Maximum number of clients allowed to connect per IP address if account status is < ExemptMaxClientsStatus. Default value: -1 (feature disabled)
|
RULE_INT(World, AddMaxClientsPerIP, -1) // Maximum number of clients allowed to connect per IP address if account status is < ExemptMaxClientsStatus. Default value: -1 (feature disabled)
|
||||||
RULE_INT(World, AddMaxClientsStatus, -1) // Accounts with status >= this rule will be allowed to use the amount of accounts defined in the AddMaxClientsPerIP. Default value: -1 (feature disabled)
|
RULE_INT(World, AddMaxClientsStatus, -1) // Accounts with status >= this rule will be allowed to use the amount of accounts defined in the AddMaxClientsPerIP. Default value: -1 (feature disabled)
|
||||||
RULE_BOOL(World, MaxClientsSetByStatus, false) // If True, IP Limiting will be set to the status on the account as long as the status is > MaxClientsPerIP
|
RULE_BOOL(World, MaxClientsSetByStatus, false) // If True, IP Limiting will be set to the status on the account as long as the status is > MaxClientsPerIP
|
||||||
|
RULE_BOOL(World, EnableIPExemptions, false) // If True, ip_exemptions table is used, if there is no entry for the IP it will default to RuleI(World, MaxClientsPerIP)
|
||||||
RULE_BOOL(World, ClearTempMerchantlist, true) // Clears temp merchant items when world boots.
|
RULE_BOOL(World, ClearTempMerchantlist, true) // Clears temp merchant items when world boots.
|
||||||
RULE_BOOL(World, DeleteStaleCorpeBackups, true) // Deletes stale corpse backups older than 2 weeks.
|
RULE_BOOL(World, DeleteStaleCorpeBackups, true) // Deletes stale corpse backups older than 2 weeks.
|
||||||
RULE_INT(World, AccountSessionLimit, -1) //Max number of characters allowed on at once from a single account (-1 is disabled)
|
RULE_INT(World, AccountSessionLimit, -1) //Max number of characters allowed on at once from a single account (-1 is disabled)
|
||||||
@@ -217,7 +229,9 @@ RULE_INT(World, PVPSettings, 0) // Sets the PVP settings for the server, 1 = Ral
|
|||||||
RULE_BOOL (World, IsGMPetitionWindowEnabled, false)
|
RULE_BOOL (World, IsGMPetitionWindowEnabled, false)
|
||||||
RULE_INT (World, FVNoDropFlag, 0) // Sets the Firiona Vie settings on the client. If set to 2, the flag will be set for GMs only, allowing trading of no-drop items.
|
RULE_INT (World, FVNoDropFlag, 0) // Sets the Firiona Vie settings on the client. If set to 2, the flag will be set for GMs only, allowing trading of no-drop items.
|
||||||
RULE_BOOL (World, IPLimitDisconnectAll, false)
|
RULE_BOOL (World, IPLimitDisconnectAll, false)
|
||||||
|
RULE_BOOL(World, MaxClientsSimplifiedLogic, false) // New logic that only uses ExemptMaxClientsStatus and MaxClientsPerIP. Done on the loginserver. This mimics the P99-style special IP rules.
|
||||||
RULE_INT (World, TellQueueSize, 20)
|
RULE_INT (World, TellQueueSize, 20)
|
||||||
|
RULE_BOOL(World, StartZoneSameAsBindOnCreation, true) //Should the start zone ALWAYS be the same location as your bind?
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY(Zone)
|
RULE_CATEGORY(Zone)
|
||||||
@@ -250,6 +264,9 @@ RULE_INT(Zone, WeatherTimer, 600) // Weather timer when no duration is available
|
|||||||
RULE_BOOL(Zone, EnableLoggedOffReplenishments, true)
|
RULE_BOOL(Zone, EnableLoggedOffReplenishments, true)
|
||||||
RULE_INT(Zone, MinOfflineTimeToReplenishments, 21600) // 21600 seconds is 6 Hours
|
RULE_INT(Zone, MinOfflineTimeToReplenishments, 21600) // 21600 seconds is 6 Hours
|
||||||
RULE_BOOL(Zone, UseZoneController, true) // Enables the ability to use persistent quest based zone controllers (zone_controller.pl/lua)
|
RULE_BOOL(Zone, UseZoneController, true) // Enables the ability to use persistent quest based zone controllers (zone_controller.pl/lua)
|
||||||
|
RULE_BOOL(Zone, EnableZoneControllerGlobals, false) // Enables the ability to use quest globals with the zone controller NPC
|
||||||
|
RULE_INT(Zone, GlobalLootMultiplier, 1) // Sets Global Loot drop multiplier for database based drops, useful for double, triple loot etc.
|
||||||
|
RULE_BOOL(Zone, IdleWhenEmpty, true) // Don't process NPCs while zone is empty. Defaults to true.
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY(Map)
|
RULE_CATEGORY(Map)
|
||||||
@@ -325,11 +342,11 @@ RULE_INT(Spells, SacrificeMinLevel, 46) //first level Sacrifice will work on
|
|||||||
RULE_INT(Spells, SacrificeMaxLevel, 69) //last level Sacrifice will work on
|
RULE_INT(Spells, SacrificeMaxLevel, 69) //last level Sacrifice will work on
|
||||||
RULE_INT(Spells, SacrificeItemID, 9963) //Item ID of the item Sacrifice will return (defaults to an EE)
|
RULE_INT(Spells, SacrificeItemID, 9963) //Item ID of the item Sacrifice will return (defaults to an EE)
|
||||||
RULE_BOOL(Spells, EnableSpellGlobals, false) // If Enabled, spells check the spell_globals table and compare character data from the quest globals before allowing that spell to scribe with scribespells
|
RULE_BOOL(Spells, EnableSpellGlobals, false) // If Enabled, spells check the spell_globals table and compare character data from the quest globals before allowing that spell to scribe with scribespells
|
||||||
RULE_INT(Spells, MaxBuffSlotsNPC, 25)
|
RULE_INT(Spells, MaxBuffSlotsNPC, 60) // default to Tit's limit
|
||||||
RULE_INT(Spells, MaxSongSlotsNPC, 10)
|
RULE_INT(Spells, MaxSongSlotsNPC, 0) // NPCs don't have songs ...
|
||||||
RULE_INT(Spells, MaxDiscSlotsNPC, 1)
|
RULE_INT(Spells, MaxDiscSlotsNPC, 0) // NPCs don't have discs ...
|
||||||
RULE_INT(Spells, MaxTotalSlotsNPC, 36)
|
RULE_INT(Spells, MaxTotalSlotsNPC, 60) // default to Tit's limit
|
||||||
RULE_INT(Spells, MaxTotalSlotsPET, 25) // do not set this higher than 25 until the player profile is removed from the blob
|
RULE_INT(Spells, MaxTotalSlotsPET, 30) // default to Tit's limit
|
||||||
RULE_BOOL (Spells, EnableBlockedBuffs, true)
|
RULE_BOOL (Spells, EnableBlockedBuffs, true)
|
||||||
RULE_INT(Spells, ReflectType, 1) //0 = disabled, 1 = single target player spells only, 2 = all player spells, 3 = all single target spells, 4 = all spells
|
RULE_INT(Spells, ReflectType, 1) //0 = disabled, 1 = single target player spells only, 2 = all player spells, 3 = all single target spells, 4 = all spells
|
||||||
RULE_INT(Spells, VirusSpreadDistance, 30) // The distance a viral spell will jump to its next victim
|
RULE_INT(Spells, VirusSpreadDistance, 30) // The distance a viral spell will jump to its next victim
|
||||||
@@ -379,18 +396,18 @@ RULE_BOOL(Spells, UseAdditiveFocusFromWornSlot, false) // Allows an additive foc
|
|||||||
RULE_BOOL(Spells, AlwaysSendTargetsBuffs, false) // ignore LAA level if true
|
RULE_BOOL(Spells, AlwaysSendTargetsBuffs, false) // ignore LAA level if true
|
||||||
RULE_BOOL(Spells, FlatItemExtraSpellAmt, false) // allow SpellDmg stat to affect all spells, regardless of cast time/cooldown/etc
|
RULE_BOOL(Spells, FlatItemExtraSpellAmt, false) // allow SpellDmg stat to affect all spells, regardless of cast time/cooldown/etc
|
||||||
RULE_BOOL(Spells, IgnoreSpellDmgLvlRestriction, false) // ignore the 5 level spread on applying SpellDmg
|
RULE_BOOL(Spells, IgnoreSpellDmgLvlRestriction, false) // ignore the 5 level spread on applying SpellDmg
|
||||||
|
RULE_BOOL(Spells, AllowItemTGB, false) // TGB doesn't work with items on live, custom servers want it though
|
||||||
|
RULE_BOOL(Spells, NPCInnateProcOverride, true) // NPC innate procs override the target type to single target.
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY(Combat)
|
RULE_CATEGORY(Combat)
|
||||||
RULE_INT(Combat, MeleeBaseCritChance, 0) //The base crit chance for non warriors, NOTE: This will apply to NPCs as well
|
RULE_INT(Combat, PetBaseCritChance, 0) // Pet Base crit chance
|
||||||
RULE_INT(Combat, WarBerBaseCritChance, 3) //The base crit chance for warriors and berserkers, only applies to clients
|
|
||||||
RULE_INT(Combat, BerserkBaseCritChance, 6) //The bonus base crit chance you get when you're berserk
|
|
||||||
RULE_INT(Combat, NPCBashKickLevel, 6) //The level that npcs can KICK/BASH
|
RULE_INT(Combat, NPCBashKickLevel, 6) //The level that npcs can KICK/BASH
|
||||||
RULE_INT(Combat, NPCBashKickStunChance, 15) //Percent chance that a bash/kick will stun
|
RULE_INT(Combat, NPCBashKickStunChance, 15) //Percent chance that a bash/kick will stun
|
||||||
RULE_INT(Combat, RogueCritThrowingChance, 25) //Rogue throwing crit bonus
|
RULE_INT(Combat, MeleeCritDifficulty, 8900) // lower is easier
|
||||||
RULE_INT(Combat, RogueDeadlyStrikeChance, 80) //Rogue chance throwing from behind crit becomes a deadly strike
|
RULE_INT(Combat, ArcheryCritDifficulty, 3400) // lower is easier
|
||||||
RULE_INT(Combat, RogueDeadlyStrikeMod, 2) //Deadly strike modifier to crit damage
|
RULE_INT(Combat, ThrowingCritDifficulty, 1100) // lower is easier
|
||||||
RULE_INT(Combat, ClientBaseCritChance, 0) //The base crit chance for all clients, this will stack with warrior's/zerker's crit chance.
|
RULE_BOOL(Combat, NPCCanCrit, false) // true allows non PC pet NPCs to crit
|
||||||
RULE_BOOL(Combat, UseIntervalAC, true)
|
RULE_BOOL(Combat, UseIntervalAC, true)
|
||||||
RULE_INT(Combat, PetAttackMagicLevel, 30)
|
RULE_INT(Combat, PetAttackMagicLevel, 30)
|
||||||
RULE_BOOL(Combat, EnableFearPathing, true)
|
RULE_BOOL(Combat, EnableFearPathing, true)
|
||||||
@@ -481,6 +498,8 @@ RULE_BOOL(Combat, UseLiveCombatRounds, true) // turn this false if you don't wan
|
|||||||
RULE_INT(Combat, NPCAssistCap, 5) // Maxiumium number of NPCs that will assist another NPC at once
|
RULE_INT(Combat, NPCAssistCap, 5) // Maxiumium number of NPCs that will assist another NPC at once
|
||||||
RULE_INT(Combat, NPCAssistCapTimer, 6000) // Time in milliseconds a NPC will take to clear assist aggro cap space
|
RULE_INT(Combat, NPCAssistCapTimer, 6000) // Time in milliseconds a NPC will take to clear assist aggro cap space
|
||||||
RULE_BOOL(Combat, UseRevampHandToHand, false) // use h2h revamped dmg/delays I believe this was implemented during SoF
|
RULE_BOOL(Combat, UseRevampHandToHand, false) // use h2h revamped dmg/delays I believe this was implemented during SoF
|
||||||
|
RULE_BOOL(Combat, ClassicMasterWu, false) // classic master wu uses a random special, modern doesn't
|
||||||
|
RULE_INT(Combat, LevelToStopDamageCaps, 0) // 1 will effectively disable them, 20 should give basically same results as old incorrect system
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY(NPC)
|
RULE_CATEGORY(NPC)
|
||||||
@@ -502,6 +521,8 @@ RULE_BOOL(NPC, LiveLikeEnrage, false) // If set to true then only player control
|
|||||||
RULE_BOOL(NPC, EnableMeritBasedFaction, false) // If set to true, faction will given in the same way as experience (solo/group/raid)
|
RULE_BOOL(NPC, EnableMeritBasedFaction, false) // If set to true, faction will given in the same way as experience (solo/group/raid)
|
||||||
RULE_INT(NPC, NPCToNPCAggroTimerMin, 500)
|
RULE_INT(NPC, NPCToNPCAggroTimerMin, 500)
|
||||||
RULE_INT(NPC, NPCToNPCAggroTimerMax, 6000)
|
RULE_INT(NPC, NPCToNPCAggroTimerMax, 6000)
|
||||||
|
RULE_BOOL(NPC, UseClassAsLastName, true) // Uses class archetype as LastName for npcs with none
|
||||||
|
RULE_BOOL(NPC, NewLevelScaling, true) // Better level scaling, use old if new formulas would break your server
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY(Aggro)
|
RULE_CATEGORY(Aggro)
|
||||||
@@ -517,6 +538,7 @@ RULE_REAL(Aggro, TunnelVisionAggroMod, 0.75) //people not currently the top hate
|
|||||||
RULE_INT(Aggro, MaxScalingProcAggro, 400) // Set to -1 for no limit. Maxmimum amount of aggro that HP scaling SPA effect in a proc will add.
|
RULE_INT(Aggro, MaxScalingProcAggro, 400) // Set to -1 for no limit. Maxmimum amount of aggro that HP scaling SPA effect in a proc will add.
|
||||||
RULE_INT(Aggro, IntAggroThreshold, 75) // Int <= this will aggro regardless of level difference.
|
RULE_INT(Aggro, IntAggroThreshold, 75) // Int <= this will aggro regardless of level difference.
|
||||||
RULE_BOOL(Aggro, AllowTickPulling, false) // tick pulling is an exploit in an NPC's call for help fixed sometime in 2006 on live
|
RULE_BOOL(Aggro, AllowTickPulling, false) // tick pulling is an exploit in an NPC's call for help fixed sometime in 2006 on live
|
||||||
|
RULE_BOOL(Aggro, UseLevelAggro, true) // Level 18+ and Undead will aggro regardless of level difference. (this will disabled Rule:IntAggroThreshold if set to true)
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY(TaskSystem)
|
RULE_CATEGORY(TaskSystem)
|
||||||
@@ -528,9 +550,24 @@ RULE_BOOL(TaskSystem, KeepOneRecordPerCompletedTask, true)
|
|||||||
RULE_BOOL(TaskSystem, EnableTaskProximity, true)
|
RULE_BOOL(TaskSystem, EnableTaskProximity, true)
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
|
RULE_CATEGORY(Range)
|
||||||
|
RULE_INT(Range, Say, 135)
|
||||||
|
RULE_INT(Range, Emote, 135)
|
||||||
|
RULE_INT(Range, BeginCast, 200)
|
||||||
|
RULE_INT(Range, Anims, 135)
|
||||||
|
RULE_INT(Range, SpellParticles, 135)
|
||||||
|
RULE_INT(Range, DamageMessages, 50)
|
||||||
|
RULE_INT(Range, SpellMessages, 75)
|
||||||
|
RULE_INT(Range, SongMessages, 75)
|
||||||
|
RULE_INT(Range, MobPositionUpdates, 600)
|
||||||
|
RULE_INT(Range, CriticalDamage, 80)
|
||||||
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
|
|
||||||
#ifdef BOTS
|
#ifdef BOTS
|
||||||
RULE_CATEGORY(Bots)
|
RULE_CATEGORY(Bots)
|
||||||
RULE_INT(Bots, AAExpansion, 8) // Bots get AAs through this expansion
|
RULE_INT(Bots, AAExpansion, 8) // Bots get AAs through this expansion
|
||||||
|
RULE_BOOL(Bots, AllowCamelCaseNames, false) // Allows the use of 'MyBot' type names
|
||||||
RULE_INT(Bots, CommandSpellRank, 1) // Filters bot command spells by rank (1, 2 and 3 are valid filters - any other number allows all ranks)
|
RULE_INT(Bots, CommandSpellRank, 1) // Filters bot command spells by rank (1, 2 and 3 are valid filters - any other number allows all ranks)
|
||||||
RULE_INT(Bots, CreationLimit, 150) // Number of bots that each account can create
|
RULE_INT(Bots, CreationLimit, 150) // Number of bots that each account can create
|
||||||
RULE_BOOL(Bots, FinishBuffing, false) // Allow for buffs to complete even if the bot caster is out of mana. Only affects buffing out of combat.
|
RULE_BOOL(Bots, FinishBuffing, false) // Allow for buffs to complete even if the bot caster is out of mana. Only affects buffing out of combat.
|
||||||
@@ -541,12 +578,15 @@ RULE_REAL(Bots, ManaRegen, 2.0) // Adjust mana regen for bots, 1 is fast and hig
|
|||||||
RULE_BOOL(Bots, PreferNoManaCommandSpells, true) // Give sorting priority to newer no-mana spells (i.e., 'Bind Affinity')
|
RULE_BOOL(Bots, PreferNoManaCommandSpells, true) // Give sorting priority to newer no-mana spells (i.e., 'Bind Affinity')
|
||||||
RULE_BOOL(Bots, QuestableSpawnLimit, false) // Optional quest method to manage bot spawn limits using the quest_globals name bot_spawn_limit, see: /bazaar/Aediles_Thrall.pl
|
RULE_BOOL(Bots, QuestableSpawnLimit, false) // Optional quest method to manage bot spawn limits using the quest_globals name bot_spawn_limit, see: /bazaar/Aediles_Thrall.pl
|
||||||
RULE_BOOL(Bots, QuestableSpells, false) // Anita Thrall's (Anita_Thrall.pl) Bot Spell Scriber quests.
|
RULE_BOOL(Bots, QuestableSpells, false) // Anita Thrall's (Anita_Thrall.pl) Bot Spell Scriber quests.
|
||||||
RULE_INT(Bots, SpawnLimit, 71) // Number of bots a character can have spawned at one time, You + 71 bots is a 12 group raid
|
RULE_INT(Bots, SpawnLimit, 71) // Number of bots a character can have spawned at one time, You + 71 bots is a 12 group pseudo-raid (bots are not raidable at this time)
|
||||||
|
RULE_BOOL(Bots, UpdatePositionWithTimer, false) // Sends a position update with every positive movement timer check
|
||||||
|
RULE_BOOL(Bots, UsePathing, true) // Bots will use node pathing when moving
|
||||||
RULE_BOOL(Bots, BotGroupXP, false) // Determines whether client gets xp for bots outside their group.
|
RULE_BOOL(Bots, BotGroupXP, false) // Determines whether client gets xp for bots outside their group.
|
||||||
RULE_BOOL(Bots, BotBardUseOutOfCombatSongs, true) // Determines whether bard bots use additional out of combat songs (optional script)
|
RULE_BOOL(Bots, BotBardUseOutOfCombatSongs, true) // Determines whether bard bots use additional out of combat songs (optional script)
|
||||||
RULE_BOOL(Bots, BotLevelsWithOwner, false) // Auto-updates spawned bots as owner levels/de-levels (false is original behavior)
|
RULE_BOOL(Bots, BotLevelsWithOwner, false) // Auto-updates spawned bots as owner levels/de-levels (false is original behavior)
|
||||||
RULE_BOOL(Bots, BotCharacterLevelEnabled, false) // Enables required level to spawn bots
|
RULE_BOOL(Bots, BotCharacterLevelEnabled, false) // Enables required level to spawn bots
|
||||||
RULE_INT(Bots, BotCharacterLevel, 0) // 0 as default (if level > this value you can spawn bots if BotCharacterLevelEnabled is true)
|
RULE_INT(Bots, BotCharacterLevel, 0) // 0 as default (if level > this value you can spawn bots if BotCharacterLevelEnabled is true)
|
||||||
|
RULE_INT(Bots, CasterStopMeleeLevel, 13) // Level at which caster bots stop melee attacks
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -664,6 +704,7 @@ RULE_CATEGORY_END()
|
|||||||
|
|
||||||
RULE_CATEGORY(Client)
|
RULE_CATEGORY(Client)
|
||||||
RULE_BOOL(Client, UseLiveFactionMessage, false) // Allows players to see faction adjustments like Live
|
RULE_BOOL(Client, UseLiveFactionMessage, false) // Allows players to see faction adjustments like Live
|
||||||
|
RULE_BOOL(Client, UseLiveBlockedMessage, false) // Allows players to see faction adjustments like Live
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
#undef RULE_CATEGORY
|
#undef RULE_CATEGORY
|
||||||
|
|||||||
+79
-79
@@ -21,17 +21,65 @@
|
|||||||
#include "emu_constants.h"
|
#include "emu_constants.h"
|
||||||
|
|
||||||
#include "string_util.h"
|
#include "string_util.h"
|
||||||
#include "item.h"
|
#include "item_instance.h"
|
||||||
#include "item_struct.h"
|
#include "item_data.h"
|
||||||
#include "../zone/zonedb.h"
|
#include "../zone/zonedb.h"
|
||||||
|
|
||||||
|
|
||||||
EQEmu::saylink::SayLinkEngine::SayLinkEngine()
|
bool EQEmu::saylink::DegenerateLinkBody(SayLinkBody_Struct& say_link_body_struct, const std::string& say_link_body)
|
||||||
|
{
|
||||||
|
memset(&say_link_body_struct, 0, sizeof(say_link_body_struct));
|
||||||
|
if (say_link_body.length() != EQEmu::legacy::TEXT_LINK_BODY_LENGTH)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
say_link_body_struct.unknown_1 = (uint8)strtol(say_link_body.substr(0, 1).c_str(), nullptr, 16);
|
||||||
|
say_link_body_struct.item_id = (uint32)strtol(say_link_body.substr(1, 5).c_str(), nullptr, 16);
|
||||||
|
say_link_body_struct.augment_1 = (uint32)strtol(say_link_body.substr(6, 5).c_str(), nullptr, 16);
|
||||||
|
say_link_body_struct.augment_2 = (uint32)strtol(say_link_body.substr(11, 5).c_str(), nullptr, 16);
|
||||||
|
say_link_body_struct.augment_3 = (uint32)strtol(say_link_body.substr(16, 5).c_str(), nullptr, 16);
|
||||||
|
say_link_body_struct.augment_4 = (uint32)strtol(say_link_body.substr(21, 5).c_str(), nullptr, 16);
|
||||||
|
say_link_body_struct.augment_5 = (uint32)strtol(say_link_body.substr(26, 5).c_str(), nullptr, 16);
|
||||||
|
say_link_body_struct.augment_6 = (uint32)strtol(say_link_body.substr(31, 5).c_str(), nullptr, 16);
|
||||||
|
say_link_body_struct.is_evolving = (uint8)strtol(say_link_body.substr(36, 1).c_str(), nullptr, 16);
|
||||||
|
say_link_body_struct.evolve_group = (uint32)strtol(say_link_body.substr(37, 4).c_str(), nullptr, 16);
|
||||||
|
say_link_body_struct.evolve_level = (uint8)strtol(say_link_body.substr(41, 2).c_str(), nullptr, 16);
|
||||||
|
say_link_body_struct.ornament_icon = (uint32)strtol(say_link_body.substr(43, 5).c_str(), nullptr, 16);
|
||||||
|
say_link_body_struct.hash = (int)strtol(say_link_body.substr(48, 8).c_str(), nullptr, 16);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::saylink::GenerateLinkBody(std::string& say_link_body, const SayLinkBody_Struct& say_link_body_struct)
|
||||||
|
{
|
||||||
|
say_link_body = StringFormat(
|
||||||
|
"%1X" "%05X" "%05X" "%05X" "%05X" "%05X" "%05X" "%05X" "%1X" "%04X" "%02X" "%05X" "%08X",
|
||||||
|
(0x0F & say_link_body_struct.unknown_1),
|
||||||
|
(0x000FFFFF & say_link_body_struct.item_id),
|
||||||
|
(0x000FFFFF & say_link_body_struct.augment_1),
|
||||||
|
(0x000FFFFF & say_link_body_struct.augment_2),
|
||||||
|
(0x000FFFFF & say_link_body_struct.augment_3),
|
||||||
|
(0x000FFFFF & say_link_body_struct.augment_4),
|
||||||
|
(0x000FFFFF & say_link_body_struct.augment_5),
|
||||||
|
(0x000FFFFF & say_link_body_struct.augment_6),
|
||||||
|
(0x0F & say_link_body_struct.is_evolving),
|
||||||
|
(0x0000FFFF & say_link_body_struct.evolve_group),
|
||||||
|
(0xFF & say_link_body_struct.evolve_level),
|
||||||
|
(0x000FFFFF & say_link_body_struct.ornament_icon),
|
||||||
|
(0xFFFFFFFF & say_link_body_struct.hash)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (say_link_body.length() != EQEmu::legacy::TEXT_LINK_BODY_LENGTH)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::SayLinkEngine::SayLinkEngine()
|
||||||
{
|
{
|
||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string EQEmu::saylink::SayLinkEngine::GenerateLink()
|
std::string EQEmu::SayLinkEngine::GenerateLink()
|
||||||
{
|
{
|
||||||
m_Link.clear();
|
m_Link.clear();
|
||||||
m_LinkBody.clear();
|
m_LinkBody.clear();
|
||||||
@@ -59,25 +107,25 @@ std::string EQEmu::saylink::SayLinkEngine::GenerateLink()
|
|||||||
return m_Link;
|
return m_Link;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EQEmu::saylink::SayLinkEngine::Reset()
|
void EQEmu::SayLinkEngine::Reset()
|
||||||
{
|
{
|
||||||
m_LinkType = SayLinkBlank;
|
m_LinkType = saylink::SayLinkBlank;
|
||||||
m_ItemData = nullptr;
|
m_ItemData = nullptr;
|
||||||
m_LootData = nullptr;
|
m_LootData = nullptr;
|
||||||
m_ItemInst = nullptr;
|
m_ItemInst = nullptr;
|
||||||
m_Proxy_unknown_1 = NOT_USED;
|
m_Proxy_unknown_1 = 0;
|
||||||
m_ProxyItemID = NOT_USED;
|
m_ProxyItemID = 0;
|
||||||
m_ProxyAugment1ID = NOT_USED;
|
m_ProxyAugment1ID = 0;
|
||||||
m_ProxyAugment2ID = NOT_USED;
|
m_ProxyAugment2ID = 0;
|
||||||
m_ProxyAugment3ID = NOT_USED;
|
m_ProxyAugment3ID = 0;
|
||||||
m_ProxyAugment4ID = NOT_USED;
|
m_ProxyAugment4ID = 0;
|
||||||
m_ProxyAugment5ID = NOT_USED;
|
m_ProxyAugment5ID = 0;
|
||||||
m_ProxyAugment6ID = NOT_USED;
|
m_ProxyAugment6ID = 0;
|
||||||
m_ProxyIsEvolving = NOT_USED;
|
m_ProxyIsEvolving = 0;
|
||||||
m_ProxyEvolveGroup = NOT_USED;
|
m_ProxyEvolveGroup = 0;
|
||||||
m_ProxyEvolveLevel = NOT_USED;
|
m_ProxyEvolveLevel = 0;
|
||||||
m_ProxyOrnamentIcon = NOT_USED;
|
m_ProxyOrnamentIcon = 0;
|
||||||
m_ProxyHash = NOT_USED;
|
m_ProxyHash = 0;
|
||||||
m_ProxyText = nullptr;
|
m_ProxyText = nullptr;
|
||||||
m_TaskUse = false;
|
m_TaskUse = false;
|
||||||
m_Link.clear();
|
m_Link.clear();
|
||||||
@@ -86,7 +134,7 @@ void EQEmu::saylink::SayLinkEngine::Reset()
|
|||||||
m_Error = false;
|
m_Error = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EQEmu::saylink::SayLinkEngine::generate_body()
|
void EQEmu::SayLinkEngine::generate_body()
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
Current server mask: EQClientRoF2
|
Current server mask: EQClientRoF2
|
||||||
@@ -99,19 +147,19 @@ void EQEmu::saylink::SayLinkEngine::generate_body()
|
|||||||
|
|
||||||
memset(&m_LinkBodyStruct, 0, sizeof(SayLinkBody_Struct));
|
memset(&m_LinkBodyStruct, 0, sizeof(SayLinkBody_Struct));
|
||||||
|
|
||||||
const EQEmu::Item_Struct* item_data = nullptr;
|
const EQEmu::ItemData* item_data = nullptr;
|
||||||
|
|
||||||
switch (m_LinkType) {
|
switch (m_LinkType) {
|
||||||
case SayLinkBlank:
|
case saylink::SayLinkBlank:
|
||||||
break;
|
break;
|
||||||
case SayLinkItemData:
|
case saylink::SayLinkItemData:
|
||||||
if (m_ItemData == nullptr) { break; }
|
if (m_ItemData == nullptr) { break; }
|
||||||
m_LinkBodyStruct.item_id = m_ItemData->ID;
|
m_LinkBodyStruct.item_id = m_ItemData->ID;
|
||||||
m_LinkBodyStruct.evolve_group = m_ItemData->LoreGroup; // this probably won't work for all items
|
m_LinkBodyStruct.evolve_group = m_ItemData->LoreGroup; // this probably won't work for all items
|
||||||
//m_LinkBodyStruct.evolve_level = m_ItemData->EvolvingLevel;
|
//m_LinkBodyStruct.evolve_level = m_ItemData->EvolvingLevel;
|
||||||
// TODO: add hash call
|
// TODO: add hash call
|
||||||
break;
|
break;
|
||||||
case SayLinkLootItem:
|
case saylink::SayLinkLootItem:
|
||||||
if (m_LootData == nullptr) { break; }
|
if (m_LootData == nullptr) { break; }
|
||||||
item_data = database.GetItem(m_LootData->item_id);
|
item_data = database.GetItem(m_LootData->item_id);
|
||||||
if (item_data == nullptr) { break; }
|
if (item_data == nullptr) { break; }
|
||||||
@@ -126,7 +174,7 @@ void EQEmu::saylink::SayLinkEngine::generate_body()
|
|||||||
//m_LinkBodyStruct.evolve_level = item_data->EvolvingLevel;
|
//m_LinkBodyStruct.evolve_level = item_data->EvolvingLevel;
|
||||||
// TODO: add hash call
|
// TODO: add hash call
|
||||||
break;
|
break;
|
||||||
case SayLinkItemInst:
|
case saylink::SayLinkItemInst:
|
||||||
if (m_ItemInst == nullptr) { break; }
|
if (m_ItemInst == nullptr) { break; }
|
||||||
if (m_ItemInst->GetItem() == nullptr) { break; }
|
if (m_ItemInst->GetItem() == nullptr) { break; }
|
||||||
m_LinkBodyStruct.item_id = m_ItemInst->GetItem()->ID;
|
m_LinkBodyStruct.item_id = m_ItemInst->GetItem()->ID;
|
||||||
@@ -195,29 +243,29 @@ void EQEmu::saylink::SayLinkEngine::generate_body()
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EQEmu::saylink::SayLinkEngine::generate_text()
|
void EQEmu::SayLinkEngine::generate_text()
|
||||||
{
|
{
|
||||||
if (m_ProxyText != nullptr) {
|
if (m_ProxyText != nullptr) {
|
||||||
m_LinkText = m_ProxyText;
|
m_LinkText = m_ProxyText;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const EQEmu::Item_Struct* item_data = nullptr;
|
const EQEmu::ItemData* item_data = nullptr;
|
||||||
|
|
||||||
switch (m_LinkType) {
|
switch (m_LinkType) {
|
||||||
case SayLinkBlank:
|
case saylink::SayLinkBlank:
|
||||||
break;
|
break;
|
||||||
case SayLinkItemData:
|
case saylink::SayLinkItemData:
|
||||||
if (m_ItemData == nullptr) { break; }
|
if (m_ItemData == nullptr) { break; }
|
||||||
m_LinkText = m_ItemData->Name;
|
m_LinkText = m_ItemData->Name;
|
||||||
return;
|
return;
|
||||||
case SayLinkLootItem:
|
case saylink::SayLinkLootItem:
|
||||||
if (m_LootData == nullptr) { break; }
|
if (m_LootData == nullptr) { break; }
|
||||||
item_data = database.GetItem(m_LootData->item_id);
|
item_data = database.GetItem(m_LootData->item_id);
|
||||||
if (item_data == nullptr) { break; }
|
if (item_data == nullptr) { break; }
|
||||||
m_LinkText = item_data->Name;
|
m_LinkText = item_data->Name;
|
||||||
return;
|
return;
|
||||||
case SayLinkItemInst:
|
case saylink::SayLinkItemInst:
|
||||||
if (m_ItemInst == nullptr) { break; }
|
if (m_ItemInst == nullptr) { break; }
|
||||||
if (m_ItemInst->GetItem() == nullptr) { break; }
|
if (m_ItemInst->GetItem() == nullptr) { break; }
|
||||||
m_LinkText = m_ItemInst->GetItem()->Name;
|
m_LinkText = m_ItemInst->GetItem()->Name;
|
||||||
@@ -228,51 +276,3 @@ void EQEmu::saylink::SayLinkEngine::generate_text()
|
|||||||
|
|
||||||
m_LinkText = "null";
|
m_LinkText = "null";
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EQEmu::saylink::DegenerateLinkBody(SayLinkBody_Struct& say_link_body_struct, const std::string& say_link_body)
|
|
||||||
{
|
|
||||||
memset(&say_link_body_struct, 0, sizeof(say_link_body_struct));
|
|
||||||
if (say_link_body.length() != EQEmu::legacy::TEXT_LINK_BODY_LENGTH)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
say_link_body_struct.unknown_1 = (uint8)strtol(say_link_body.substr(0, 1).c_str(), nullptr, 16);
|
|
||||||
say_link_body_struct.item_id = (uint32)strtol(say_link_body.substr(1, 5).c_str(), nullptr, 16);
|
|
||||||
say_link_body_struct.augment_1 = (uint32)strtol(say_link_body.substr(6, 5).c_str(), nullptr, 16);
|
|
||||||
say_link_body_struct.augment_2 = (uint32)strtol(say_link_body.substr(11, 5).c_str(), nullptr, 16);
|
|
||||||
say_link_body_struct.augment_3 = (uint32)strtol(say_link_body.substr(16, 5).c_str(), nullptr, 16);
|
|
||||||
say_link_body_struct.augment_4 = (uint32)strtol(say_link_body.substr(21, 5).c_str(), nullptr, 16);
|
|
||||||
say_link_body_struct.augment_5 = (uint32)strtol(say_link_body.substr(26, 5).c_str(), nullptr, 16);
|
|
||||||
say_link_body_struct.augment_6 = (uint32)strtol(say_link_body.substr(31, 5).c_str(), nullptr, 16);
|
|
||||||
say_link_body_struct.is_evolving = (uint8)strtol(say_link_body.substr(36, 1).c_str(), nullptr, 16);
|
|
||||||
say_link_body_struct.evolve_group = (uint32)strtol(say_link_body.substr(37, 4).c_str(), nullptr, 16);
|
|
||||||
say_link_body_struct.evolve_level = (uint8)strtol(say_link_body.substr(41, 2).c_str(), nullptr, 16);
|
|
||||||
say_link_body_struct.ornament_icon = (uint32)strtol(say_link_body.substr(43, 5).c_str(), nullptr, 16);
|
|
||||||
say_link_body_struct.hash = (int)strtol(say_link_body.substr(48, 8).c_str(), nullptr, 16);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool EQEmu::saylink::GenerateLinkBody(std::string& say_link_body, const SayLinkBody_Struct& say_link_body_struct)
|
|
||||||
{
|
|
||||||
say_link_body = StringFormat(
|
|
||||||
"%1X" "%05X" "%05X" "%05X" "%05X" "%05X" "%05X" "%05X" "%1X" "%04X" "%02X" "%05X" "%08X",
|
|
||||||
(0x0F & say_link_body_struct.unknown_1),
|
|
||||||
(0x000FFFFF & say_link_body_struct.item_id),
|
|
||||||
(0x000FFFFF & say_link_body_struct.augment_1),
|
|
||||||
(0x000FFFFF & say_link_body_struct.augment_2),
|
|
||||||
(0x000FFFFF & say_link_body_struct.augment_3),
|
|
||||||
(0x000FFFFF & say_link_body_struct.augment_4),
|
|
||||||
(0x000FFFFF & say_link_body_struct.augment_5),
|
|
||||||
(0x000FFFFF & say_link_body_struct.augment_6),
|
|
||||||
(0x0F & say_link_body_struct.is_evolving),
|
|
||||||
(0x0000FFFF & say_link_body_struct.evolve_group),
|
|
||||||
(0xFF & say_link_body_struct.evolve_level),
|
|
||||||
(0x000FFFFF & say_link_body_struct.ornament_icon),
|
|
||||||
(0xFFFFFFFF & say_link_body_struct.hash)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (say_link_body.length() != EQEmu::legacy::TEXT_LINK_BODY_LENGTH)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|||||||
+22
-27
@@ -26,26 +26,27 @@
|
|||||||
|
|
||||||
|
|
||||||
struct ServerLootItem_Struct;
|
struct ServerLootItem_Struct;
|
||||||
class ItemInst;
|
|
||||||
|
|
||||||
|
|
||||||
namespace EQEmu
|
namespace EQEmu
|
||||||
{
|
{
|
||||||
struct Item_Struct;
|
struct ItemData;
|
||||||
|
class ItemInstance;
|
||||||
|
struct SayLinkBody_Struct;
|
||||||
|
|
||||||
namespace saylink {
|
namespace saylink {
|
||||||
struct SayLinkBody_Struct; // Current server mask: EQClientRoF2
|
enum SayLinkType {
|
||||||
|
SayLinkBlank = 0,
|
||||||
class SayLinkEngine;
|
SayLinkItemData,
|
||||||
|
SayLinkLootItem,
|
||||||
|
SayLinkItemInst
|
||||||
|
};
|
||||||
|
|
||||||
extern bool DegenerateLinkBody(SayLinkBody_Struct& say_Link_body_struct, const std::string& say_link_body);
|
extern bool DegenerateLinkBody(SayLinkBody_Struct& say_Link_body_struct, const std::string& say_link_body);
|
||||||
extern bool GenerateLinkBody(std::string& say_link_body, const SayLinkBody_Struct& say_link_body_struct);
|
extern bool GenerateLinkBody(std::string& say_link_body, const SayLinkBody_Struct& say_link_body_struct);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
} /*saylink*/
|
||||||
|
|
||||||
struct EQEmu::saylink::SayLinkBody_Struct
|
struct SayLinkBody_Struct {
|
||||||
{
|
|
||||||
uint8 unknown_1; /* %1X */
|
uint8 unknown_1; /* %1X */
|
||||||
uint32 item_id; /* %05X */
|
uint32 item_id; /* %05X */
|
||||||
uint32 augment_1; /* %05X */
|
uint32 augment_1; /* %05X */
|
||||||
@@ -59,24 +60,16 @@ struct EQEmu::saylink::SayLinkBody_Struct
|
|||||||
uint8 evolve_level; /* %02X */
|
uint8 evolve_level; /* %02X */
|
||||||
uint32 ornament_icon; /* %05X */
|
uint32 ornament_icon; /* %05X */
|
||||||
int hash; /* %08X */
|
int hash; /* %08X */
|
||||||
};
|
|
||||||
|
|
||||||
class EQEmu::saylink::SayLinkEngine
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
enum SayLinkType {
|
|
||||||
SayLinkBlank = 0,
|
|
||||||
SayLinkItemData,
|
|
||||||
SayLinkLootItem,
|
|
||||||
SayLinkItemInst
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class SayLinkEngine {
|
||||||
|
public:
|
||||||
SayLinkEngine();
|
SayLinkEngine();
|
||||||
|
|
||||||
void SetLinkType(SayLinkType link_type) { m_LinkType = link_type; }
|
void SetLinkType(saylink::SayLinkType link_type) { m_LinkType = link_type; }
|
||||||
void SetItemData(const EQEmu::Item_Struct* item_data) { m_ItemData = item_data; }
|
void SetItemData(const EQEmu::ItemData* item_data) { m_ItemData = item_data; }
|
||||||
void SetLootData(const ServerLootItem_Struct* loot_data) { m_LootData = loot_data; }
|
void SetLootData(const ServerLootItem_Struct* loot_data) { m_LootData = loot_data; }
|
||||||
void SetItemInst(const ItemInst* item_inst) { m_ItemInst = item_inst; }
|
void SetItemInst(const ItemInstance* item_inst) { m_ItemInst = item_inst; }
|
||||||
|
|
||||||
// mainly for saylinks..but, not limited to
|
// mainly for saylinks..but, not limited to
|
||||||
void SetProxyUnknown1(uint8 proxy_unknown_1) { m_Proxy_unknown_1 = proxy_unknown_1; }
|
void SetProxyUnknown1(uint8 proxy_unknown_1) { m_Proxy_unknown_1 = proxy_unknown_1; }
|
||||||
@@ -105,14 +98,14 @@ public:
|
|||||||
|
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void generate_body();
|
void generate_body();
|
||||||
void generate_text();
|
void generate_text();
|
||||||
|
|
||||||
int m_LinkType;
|
int m_LinkType;
|
||||||
const EQEmu::Item_Struct* m_ItemData;
|
const ItemData* m_ItemData;
|
||||||
const ServerLootItem_Struct* m_LootData;
|
const ServerLootItem_Struct* m_LootData;
|
||||||
const ItemInst* m_ItemInst;
|
const ItemInstance* m_ItemInst;
|
||||||
|
|
||||||
uint8 m_Proxy_unknown_1;
|
uint8 m_Proxy_unknown_1;
|
||||||
uint32 m_ProxyItemID;
|
uint32 m_ProxyItemID;
|
||||||
@@ -134,6 +127,8 @@ private:
|
|||||||
std::string m_LinkBody;
|
std::string m_LinkBody;
|
||||||
std::string m_LinkText;
|
std::string m_LinkText;
|
||||||
bool m_Error;
|
bool m_Error;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} /*EQEmu*/
|
||||||
|
|
||||||
#endif /*COMMON_SAY_LINK_H*/
|
#endif /*COMMON_SAY_LINK_H*/
|
||||||
|
|||||||
@@ -193,6 +193,7 @@
|
|||||||
#define ServerOP_QSSendQuery 0x5016
|
#define ServerOP_QSSendQuery 0x5016
|
||||||
#define ServerOP_CZSignalNPC 0x5017
|
#define ServerOP_CZSignalNPC 0x5017
|
||||||
#define ServerOP_CZSetEntityVariableByNPCTypeID 0x5018
|
#define ServerOP_CZSetEntityVariableByNPCTypeID 0x5018
|
||||||
|
#define ServerOP_WWMarquee 0x5019
|
||||||
|
|
||||||
/* Query Serv Generic Packet Flag/Type Enumeration */
|
/* Query Serv Generic Packet Flag/Type Enumeration */
|
||||||
enum { QSG_LFGuild = 0 };
|
enum { QSG_LFGuild = 0 };
|
||||||
@@ -662,6 +663,7 @@ struct UsertoWorldRequest_Struct {
|
|||||||
uint32 worldid;
|
uint32 worldid;
|
||||||
uint32 FromID;
|
uint32 FromID;
|
||||||
uint32 ToID;
|
uint32 ToID;
|
||||||
|
char IPAddr[64];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct UsertoWorldResponse_Struct {
|
struct UsertoWorldResponse_Struct {
|
||||||
@@ -1254,6 +1256,15 @@ struct CZMessagePlayer_Struct {
|
|||||||
char Message[512];
|
char Message[512];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct WWMarquee_Struct {
|
||||||
|
uint32 Type;
|
||||||
|
uint32 Priority;
|
||||||
|
uint32 FadeIn;
|
||||||
|
uint32 FadeOut;
|
||||||
|
uint32 Duration;
|
||||||
|
char Message[512];
|
||||||
|
};
|
||||||
|
|
||||||
struct CZSetEntVarByNPCTypeID_Struct {
|
struct CZSetEntVarByNPCTypeID_Struct {
|
||||||
uint32 npctype_id;
|
uint32 npctype_id;
|
||||||
char id[256];
|
char id[256];
|
||||||
|
|||||||
+89
-75
@@ -29,7 +29,7 @@
|
|||||||
#include "faction.h"
|
#include "faction.h"
|
||||||
#include "features.h"
|
#include "features.h"
|
||||||
#include "ipc_mutex.h"
|
#include "ipc_mutex.h"
|
||||||
#include "item.h"
|
#include "inventory_profile.h"
|
||||||
#include "loottable.h"
|
#include "loottable.h"
|
||||||
#include "memory_mapped_file.h"
|
#include "memory_mapped_file.h"
|
||||||
#include "mysql.h"
|
#include "mysql.h"
|
||||||
@@ -38,6 +38,17 @@
|
|||||||
#include "string_util.h"
|
#include "string_util.h"
|
||||||
#include "eqemu_config.h"
|
#include "eqemu_config.h"
|
||||||
|
|
||||||
|
namespace ItemField
|
||||||
|
{
|
||||||
|
enum {
|
||||||
|
source = 0,
|
||||||
|
#define F(x) x,
|
||||||
|
#include "item_fieldlist.h"
|
||||||
|
#undef F
|
||||||
|
updated
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
SharedDatabase::SharedDatabase()
|
SharedDatabase::SharedDatabase()
|
||||||
: Database()
|
: Database()
|
||||||
{
|
{
|
||||||
@@ -99,13 +110,13 @@ uint32 SharedDatabase::GetTotalTimeEntitledOnAccount(uint32 AccountID) {
|
|||||||
return EntitledTime;
|
return EntitledTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SharedDatabase::SaveCursor(uint32 char_id, std::list<ItemInst*>::const_iterator &start, std::list<ItemInst*>::const_iterator &end)
|
bool SharedDatabase::SaveCursor(uint32 char_id, std::list<EQEmu::ItemInstance*>::const_iterator &start, std::list<EQEmu::ItemInstance*>::const_iterator &end)
|
||||||
{
|
{
|
||||||
// Delete cursor items
|
// Delete cursor items
|
||||||
std::string query = StringFormat("DELETE FROM inventory WHERE charid = %i "
|
std::string query = StringFormat("DELETE FROM inventory WHERE charid = %i "
|
||||||
"AND ((slotid >= 8000 AND slotid <= 8999) "
|
"AND ((slotid >= 8000 AND slotid <= 8999) "
|
||||||
"OR slotid = %i OR (slotid >= %i AND slotid <= %i) )",
|
"OR slotid = %i OR (slotid >= %i AND slotid <= %i) )",
|
||||||
char_id, EQEmu::legacy::SlotCursor,
|
char_id, EQEmu::inventory::slotCursor,
|
||||||
EQEmu::legacy::CURSOR_BAG_BEGIN, EQEmu::legacy::CURSOR_BAG_END);
|
EQEmu::legacy::CURSOR_BAG_BEGIN, EQEmu::legacy::CURSOR_BAG_END);
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
if (!results.Success()) {
|
if (!results.Success()) {
|
||||||
@@ -116,8 +127,8 @@ bool SharedDatabase::SaveCursor(uint32 char_id, std::list<ItemInst*>::const_iter
|
|||||||
int i = 8000;
|
int i = 8000;
|
||||||
for(auto it = start; it != end; ++it, i++) {
|
for(auto it = start; it != end; ++it, i++) {
|
||||||
if (i > 8999) { break; } // shouldn't be anything in the queue that indexes this high
|
if (i > 8999) { break; } // shouldn't be anything in the queue that indexes this high
|
||||||
ItemInst *inst = *it;
|
EQEmu::ItemInstance *inst = *it;
|
||||||
int16 use_slot = (i == 8000) ? EQEmu::legacy::SlotCursor : i;
|
int16 use_slot = (i == 8000) ? EQEmu::inventory::slotCursor : i;
|
||||||
if (!SaveInventory(char_id, inst, use_slot)) {
|
if (!SaveInventory(char_id, inst, use_slot)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -126,7 +137,7 @@ bool SharedDatabase::SaveCursor(uint32 char_id, std::list<ItemInst*>::const_iter
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SharedDatabase::VerifyInventory(uint32 account_id, int16 slot_id, const ItemInst* inst)
|
bool SharedDatabase::VerifyInventory(uint32 account_id, int16 slot_id, const EQEmu::ItemInstance* inst)
|
||||||
{
|
{
|
||||||
// Delete cursor items
|
// Delete cursor items
|
||||||
std::string query = StringFormat("SELECT itemid, charges FROM sharedbank "
|
std::string query = StringFormat("SELECT itemid, charges FROM sharedbank "
|
||||||
@@ -159,7 +170,7 @@ bool SharedDatabase::VerifyInventory(uint32 account_id, int16 slot_id, const Ite
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SharedDatabase::SaveInventory(uint32 char_id, const ItemInst* inst, int16 slot_id) {
|
bool SharedDatabase::SaveInventory(uint32 char_id, const EQEmu::ItemInstance* inst, int16 slot_id) {
|
||||||
|
|
||||||
//never save tribute slots:
|
//never save tribute slots:
|
||||||
if (slot_id >= EQEmu::legacy::TRIBUTE_BEGIN && slot_id <= EQEmu::legacy::TRIBUTE_END)
|
if (slot_id >= EQEmu::legacy::TRIBUTE_BEGIN && slot_id <= EQEmu::legacy::TRIBUTE_END)
|
||||||
@@ -173,7 +184,7 @@ bool SharedDatabase::SaveInventory(uint32 char_id, const ItemInst* inst, int16 s
|
|||||||
else {
|
else {
|
||||||
// Needed to clear out bag slots that 'REPLACE' in UpdateSharedBankSlot does not overwrite..otherwise, duplication occurs
|
// Needed to clear out bag slots that 'REPLACE' in UpdateSharedBankSlot does not overwrite..otherwise, duplication occurs
|
||||||
// (This requires that parent then child items be sent..which should be how they are currently passed)
|
// (This requires that parent then child items be sent..which should be how they are currently passed)
|
||||||
if (Inventory::SupportsContainers(slot_id))
|
if (EQEmu::InventoryProfile::SupportsContainers(slot_id))
|
||||||
DeleteSharedBankSlot(char_id, slot_id);
|
DeleteSharedBankSlot(char_id, slot_id);
|
||||||
return UpdateSharedBankSlot(char_id, inst, slot_id);
|
return UpdateSharedBankSlot(char_id, inst, slot_id);
|
||||||
}
|
}
|
||||||
@@ -184,18 +195,18 @@ bool SharedDatabase::SaveInventory(uint32 char_id, const ItemInst* inst, int16 s
|
|||||||
|
|
||||||
// Needed to clear out bag slots that 'REPLACE' in UpdateInventorySlot does not overwrite..otherwise, duplication occurs
|
// Needed to clear out bag slots that 'REPLACE' in UpdateInventorySlot does not overwrite..otherwise, duplication occurs
|
||||||
// (This requires that parent then child items be sent..which should be how they are currently passed)
|
// (This requires that parent then child items be sent..which should be how they are currently passed)
|
||||||
if (Inventory::SupportsContainers(slot_id))
|
if (EQEmu::InventoryProfile::SupportsContainers(slot_id))
|
||||||
DeleteInventorySlot(char_id, slot_id);
|
DeleteInventorySlot(char_id, slot_id);
|
||||||
return UpdateInventorySlot(char_id, inst, slot_id);
|
return UpdateInventorySlot(char_id, inst, slot_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SharedDatabase::UpdateInventorySlot(uint32 char_id, const ItemInst* inst, int16 slot_id) {
|
bool SharedDatabase::UpdateInventorySlot(uint32 char_id, const EQEmu::ItemInstance* inst, int16 slot_id) {
|
||||||
// need to check 'inst' argument for valid pointer
|
// need to check 'inst' argument for valid pointer
|
||||||
|
|
||||||
uint32 augslot[EQEmu::legacy::ITEM_COMMON_SIZE] = { 0, 0, 0, 0, 0, 0 };
|
uint32 augslot[EQEmu::inventory::SocketCount] = { 0, 0, 0, 0, 0, 0 };
|
||||||
if (inst->IsClassCommon()) {
|
if (inst->IsClassCommon()) {
|
||||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; i++) {
|
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) {
|
||||||
ItemInst *auginst = inst->GetItem(i);
|
EQEmu::ItemInstance *auginst = inst->GetItem(i);
|
||||||
augslot[i] = (auginst && auginst->GetItem()) ? auginst->GetItem()->ID : 0;
|
augslot[i] = (auginst && auginst->GetItem()) ? auginst->GetItem()->ID : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -221,12 +232,12 @@ bool SharedDatabase::UpdateInventorySlot(uint32 char_id, const ItemInst* inst, i
|
|||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
|
|
||||||
// Save bag contents, if slot supports bag contents
|
// Save bag contents, if slot supports bag contents
|
||||||
if (inst->IsClassBag() && Inventory::SupportsContainers(slot_id))
|
if (inst->IsClassBag() && EQEmu::InventoryProfile::SupportsContainers(slot_id))
|
||||||
// Limiting to bag slot count will get rid of 'hidden' duplicated items and 'Invalid Slot ID'
|
// Limiting to bag slot count will get rid of 'hidden' duplicated items and 'Invalid Slot ID'
|
||||||
// messages through attrition (and the modded code in SaveInventory)
|
// messages through attrition (and the modded code in SaveInventory)
|
||||||
for (uint8 idx = SUB_INDEX_BEGIN; idx < inst->GetItem()->BagSlots && idx < EQEmu::legacy::ITEM_CONTAINER_SIZE; idx++) {
|
for (uint8 idx = EQEmu::inventory::containerBegin; idx < inst->GetItem()->BagSlots && idx < EQEmu::inventory::ContainerCount; idx++) {
|
||||||
const ItemInst* baginst = inst->GetItem(idx);
|
const EQEmu::ItemInstance* baginst = inst->GetItem(idx);
|
||||||
SaveInventory(char_id, baginst, Inventory::CalcSlotId(slot_id, idx));
|
SaveInventory(char_id, baginst, EQEmu::InventoryProfile::CalcSlotId(slot_id, idx));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!results.Success()) {
|
if (!results.Success()) {
|
||||||
@@ -236,13 +247,13 @@ bool SharedDatabase::UpdateInventorySlot(uint32 char_id, const ItemInst* inst, i
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SharedDatabase::UpdateSharedBankSlot(uint32 char_id, const ItemInst* inst, int16 slot_id) {
|
bool SharedDatabase::UpdateSharedBankSlot(uint32 char_id, const EQEmu::ItemInstance* inst, int16 slot_id) {
|
||||||
// need to check 'inst' argument for valid pointer
|
// need to check 'inst' argument for valid pointer
|
||||||
|
|
||||||
uint32 augslot[EQEmu::legacy::ITEM_COMMON_SIZE] = { 0, 0, 0, 0, 0, 0 };
|
uint32 augslot[EQEmu::inventory::SocketCount] = { 0, 0, 0, 0, 0, 0 };
|
||||||
if (inst->IsClassCommon()) {
|
if (inst->IsClassCommon()) {
|
||||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; i++) {
|
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) {
|
||||||
ItemInst *auginst = inst->GetItem(i);
|
EQEmu::ItemInstance *auginst = inst->GetItem(i);
|
||||||
augslot[i] = (auginst && auginst->GetItem()) ? auginst->GetItem()->ID : 0;
|
augslot[i] = (auginst && auginst->GetItem()) ? auginst->GetItem()->ID : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -267,12 +278,12 @@ bool SharedDatabase::UpdateSharedBankSlot(uint32 char_id, const ItemInst* inst,
|
|||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
|
|
||||||
// Save bag contents, if slot supports bag contents
|
// Save bag contents, if slot supports bag contents
|
||||||
if (inst->IsClassBag() && Inventory::SupportsContainers(slot_id)) {
|
if (inst->IsClassBag() && EQEmu::InventoryProfile::SupportsContainers(slot_id)) {
|
||||||
// Limiting to bag slot count will get rid of 'hidden' duplicated items and 'Invalid Slot ID'
|
// Limiting to bag slot count will get rid of 'hidden' duplicated items and 'Invalid Slot ID'
|
||||||
// messages through attrition (and the modded code in SaveInventory)
|
// messages through attrition (and the modded code in SaveInventory)
|
||||||
for (uint8 idx = SUB_INDEX_BEGIN; idx < inst->GetItem()->BagSlots && idx < EQEmu::legacy::ITEM_CONTAINER_SIZE; idx++) {
|
for (uint8 idx = EQEmu::inventory::containerBegin; idx < inst->GetItem()->BagSlots && idx < EQEmu::inventory::ContainerCount; idx++) {
|
||||||
const ItemInst* baginst = inst->GetItem(idx);
|
const EQEmu::ItemInstance* baginst = inst->GetItem(idx);
|
||||||
SaveInventory(char_id, baginst, Inventory::CalcSlotId(slot_id, idx));
|
SaveInventory(char_id, baginst, EQEmu::InventoryProfile::CalcSlotId(slot_id, idx));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -293,10 +304,10 @@ bool SharedDatabase::DeleteInventorySlot(uint32 char_id, int16 slot_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delete bag slots, if need be
|
// Delete bag slots, if need be
|
||||||
if (!Inventory::SupportsContainers(slot_id))
|
if (!EQEmu::InventoryProfile::SupportsContainers(slot_id))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
int16 base_slot_id = Inventory::CalcSlotId(slot_id, SUB_INDEX_BEGIN);
|
int16 base_slot_id = EQEmu::InventoryProfile::CalcSlotId(slot_id, EQEmu::inventory::containerBegin);
|
||||||
query = StringFormat("DELETE FROM inventory WHERE charid = %i AND slotid >= %i AND slotid < %i",
|
query = StringFormat("DELETE FROM inventory WHERE charid = %i AND slotid >= %i AND slotid < %i",
|
||||||
char_id, base_slot_id, (base_slot_id+10));
|
char_id, base_slot_id, (base_slot_id+10));
|
||||||
results = QueryDatabase(query);
|
results = QueryDatabase(query);
|
||||||
@@ -319,10 +330,10 @@ bool SharedDatabase::DeleteSharedBankSlot(uint32 char_id, int16 slot_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delete bag slots, if need be
|
// Delete bag slots, if need be
|
||||||
if (!Inventory::SupportsContainers(slot_id))
|
if (!EQEmu::InventoryProfile::SupportsContainers(slot_id))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
int16 base_slot_id = Inventory::CalcSlotId(slot_id, SUB_INDEX_BEGIN);
|
int16 base_slot_id = EQEmu::InventoryProfile::CalcSlotId(slot_id, EQEmu::inventory::containerBegin);
|
||||||
query = StringFormat("DELETE FROM sharedbank WHERE acctid = %i "
|
query = StringFormat("DELETE FROM sharedbank WHERE acctid = %i "
|
||||||
"AND slotid >= %i AND slotid < %i",
|
"AND slotid >= %i AND slotid < %i",
|
||||||
account_id, base_slot_id, (base_slot_id+10));
|
account_id, base_slot_id, (base_slot_id+10));
|
||||||
@@ -362,9 +373,9 @@ bool SharedDatabase::SetSharedPlatinum(uint32 account_id, int32 amount_to_add) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SharedDatabase::SetStartingItems(PlayerProfile_Struct* pp, Inventory* inv, uint32 si_race, uint32 si_class, uint32 si_deity, uint32 si_current_zone, char* si_name, int admin_level) {
|
bool SharedDatabase::SetStartingItems(PlayerProfile_Struct* pp, EQEmu::InventoryProfile* inv, uint32 si_race, uint32 si_class, uint32 si_deity, uint32 si_current_zone, char* si_name, int admin_level) {
|
||||||
|
|
||||||
const EQEmu::Item_Struct* myitem;
|
const EQEmu::ItemData* myitem;
|
||||||
|
|
||||||
std::string query = StringFormat("SELECT itemid, item_charges, slot FROM starting_items "
|
std::string query = StringFormat("SELECT itemid, item_charges, slot FROM starting_items "
|
||||||
"WHERE (race = %i or race = 0) AND (class = %i or class = 0) AND "
|
"WHERE (race = %i or race = 0) AND (class = %i or class = 0) AND "
|
||||||
@@ -385,7 +396,7 @@ bool SharedDatabase::SetStartingItems(PlayerProfile_Struct* pp, Inventory* inv,
|
|||||||
if(!myitem)
|
if(!myitem)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
ItemInst* myinst = CreateBaseItem(myitem, charges);
|
EQEmu::ItemInstance* myinst = CreateBaseItem(myitem, charges);
|
||||||
|
|
||||||
if(slot < 0)
|
if(slot < 0)
|
||||||
slot = inv->FindFreeSlot(0, 0);
|
slot = inv->FindFreeSlot(0, 0);
|
||||||
@@ -399,7 +410,7 @@ bool SharedDatabase::SetStartingItems(PlayerProfile_Struct* pp, Inventory* inv,
|
|||||||
|
|
||||||
|
|
||||||
// Retrieve shared bank inventory based on either account or character
|
// Retrieve shared bank inventory based on either account or character
|
||||||
bool SharedDatabase::GetSharedBank(uint32 id, Inventory *inv, bool is_charid)
|
bool SharedDatabase::GetSharedBank(uint32 id, EQEmu::InventoryProfile *inv, bool is_charid)
|
||||||
{
|
{
|
||||||
std::string query;
|
std::string query;
|
||||||
|
|
||||||
@@ -428,7 +439,7 @@ bool SharedDatabase::GetSharedBank(uint32 id, Inventory *inv, bool is_charid)
|
|||||||
uint32 item_id = (uint32)atoi(row[1]);
|
uint32 item_id = (uint32)atoi(row[1]);
|
||||||
int8 charges = (int8)atoi(row[2]);
|
int8 charges = (int8)atoi(row[2]);
|
||||||
|
|
||||||
uint32 aug[EQEmu::legacy::ITEM_COMMON_SIZE];
|
uint32 aug[EQEmu::inventory::SocketCount];
|
||||||
aug[0] = (uint32)atoi(row[3]);
|
aug[0] = (uint32)atoi(row[3]);
|
||||||
aug[1] = (uint32)atoi(row[4]);
|
aug[1] = (uint32)atoi(row[4]);
|
||||||
aug[2] = (uint32)atoi(row[5]);
|
aug[2] = (uint32)atoi(row[5]);
|
||||||
@@ -436,7 +447,7 @@ bool SharedDatabase::GetSharedBank(uint32 id, Inventory *inv, bool is_charid)
|
|||||||
aug[4] = (uint32)atoi(row[7]);
|
aug[4] = (uint32)atoi(row[7]);
|
||||||
aug[5] = (uint32)atoi(row[8]);
|
aug[5] = (uint32)atoi(row[8]);
|
||||||
|
|
||||||
const EQEmu::Item_Struct *item = GetItem(item_id);
|
const EQEmu::ItemData *item = GetItem(item_id);
|
||||||
|
|
||||||
if (!item) {
|
if (!item) {
|
||||||
Log.Out(Logs::General, Logs::Error,
|
Log.Out(Logs::General, Logs::Error,
|
||||||
@@ -447,15 +458,15 @@ bool SharedDatabase::GetSharedBank(uint32 id, Inventory *inv, bool is_charid)
|
|||||||
|
|
||||||
int16 put_slot_id = INVALID_INDEX;
|
int16 put_slot_id = INVALID_INDEX;
|
||||||
|
|
||||||
ItemInst *inst = CreateBaseItem(item, charges);
|
EQEmu::ItemInstance *inst = CreateBaseItem(item, charges);
|
||||||
if (inst && item->IsClassCommon()) {
|
if (inst && item->IsClassCommon()) {
|
||||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; i++) {
|
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) {
|
||||||
if (aug[i])
|
if (aug[i])
|
||||||
inst->PutAugment(this, i, aug[i]);
|
inst->PutAugment(this, i, aug[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (row[9]) {
|
if (inst && row[9]) {
|
||||||
std::string data_str(row[9]);
|
std::string data_str(row[9]);
|
||||||
std::string idAsString;
|
std::string idAsString;
|
||||||
std::string value;
|
std::string value;
|
||||||
@@ -480,6 +491,7 @@ bool SharedDatabase::GetSharedBank(uint32 id, Inventory *inv, bool is_charid)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// theoretically inst can be nullptr ... this would be very bad ...
|
||||||
put_slot_id = inv->PutItem(slot_id, *inst);
|
put_slot_id = inv->PutItem(slot_id, *inst);
|
||||||
safe_delete(inst);
|
safe_delete(inst);
|
||||||
|
|
||||||
@@ -499,7 +511,7 @@ bool SharedDatabase::GetSharedBank(uint32 id, Inventory *inv, bool is_charid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Overloaded: Retrieve character inventory based on character id
|
// Overloaded: Retrieve character inventory based on character id
|
||||||
bool SharedDatabase::GetInventory(uint32 char_id, Inventory *inv)
|
bool SharedDatabase::GetInventory(uint32 char_id, EQEmu::InventoryProfile *inv)
|
||||||
{
|
{
|
||||||
// Retrieve character inventory
|
// Retrieve character inventory
|
||||||
std::string query =
|
std::string query =
|
||||||
@@ -523,7 +535,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory *inv)
|
|||||||
uint16 charges = atoi(row[2]);
|
uint16 charges = atoi(row[2]);
|
||||||
uint32 color = atoul(row[3]);
|
uint32 color = atoul(row[3]);
|
||||||
|
|
||||||
uint32 aug[EQEmu::legacy::ITEM_COMMON_SIZE];
|
uint32 aug[EQEmu::inventory::SocketCount];
|
||||||
|
|
||||||
aug[0] = (uint32)atoul(row[4]);
|
aug[0] = (uint32)atoul(row[4]);
|
||||||
aug[1] = (uint32)atoul(row[5]);
|
aug[1] = (uint32)atoul(row[5]);
|
||||||
@@ -538,7 +550,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory *inv)
|
|||||||
uint32 ornament_idfile = (uint32)atoul(row[13]);
|
uint32 ornament_idfile = (uint32)atoul(row[13]);
|
||||||
uint32 ornament_hero_model = (uint32)atoul(row[14]);
|
uint32 ornament_hero_model = (uint32)atoul(row[14]);
|
||||||
|
|
||||||
const EQEmu::Item_Struct *item = GetItem(item_id);
|
const EQEmu::ItemData *item = GetItem(item_id);
|
||||||
|
|
||||||
if (!item) {
|
if (!item) {
|
||||||
Log.Out(Logs::General, Logs::Error,
|
Log.Out(Logs::General, Logs::Error,
|
||||||
@@ -549,7 +561,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory *inv)
|
|||||||
|
|
||||||
int16 put_slot_id = INVALID_INDEX;
|
int16 put_slot_id = INVALID_INDEX;
|
||||||
|
|
||||||
ItemInst *inst = CreateBaseItem(item, charges);
|
EQEmu::ItemInstance *inst = CreateBaseItem(item, charges);
|
||||||
|
|
||||||
if (inst == nullptr)
|
if (inst == nullptr)
|
||||||
continue;
|
continue;
|
||||||
@@ -582,11 +594,11 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory *inv)
|
|||||||
|
|
||||||
inst->SetOrnamentIcon(ornament_icon);
|
inst->SetOrnamentIcon(ornament_icon);
|
||||||
inst->SetOrnamentationIDFile(ornament_idfile);
|
inst->SetOrnamentationIDFile(ornament_idfile);
|
||||||
inst->SetOrnamentHeroModel(ornament_hero_model);
|
inst->SetOrnamentHeroModel(item->HerosForgeModel);
|
||||||
|
|
||||||
if (instnodrop ||
|
if (instnodrop ||
|
||||||
(((slot_id >= EQEmu::legacy::EQUIPMENT_BEGIN && slot_id <= EQEmu::legacy::EQUIPMENT_END) ||
|
(((slot_id >= EQEmu::legacy::EQUIPMENT_BEGIN && slot_id <= EQEmu::legacy::EQUIPMENT_END) ||
|
||||||
slot_id == EQEmu::legacy::SlotPowerSource) &&
|
slot_id == EQEmu::inventory::slotPowerSource) &&
|
||||||
inst->GetItem()->Attuneable))
|
inst->GetItem()->Attuneable))
|
||||||
inst->SetAttuned(true);
|
inst->SetAttuned(true);
|
||||||
|
|
||||||
@@ -595,8 +607,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory *inv)
|
|||||||
|
|
||||||
if (charges == 0x7FFF)
|
if (charges == 0x7FFF)
|
||||||
inst->SetCharges(-1);
|
inst->SetCharges(-1);
|
||||||
else if (charges == 0 &&
|
else if (charges == 0 && inst->IsStackable()) // Stackable items need a minimum charge of 1 remain moveable.
|
||||||
inst->IsStackable()) // Stackable items need a minimum charge of 1 remain moveable.
|
|
||||||
inst->SetCharges(1);
|
inst->SetCharges(1);
|
||||||
else
|
else
|
||||||
inst->SetCharges(charges);
|
inst->SetCharges(charges);
|
||||||
@@ -609,7 +620,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory *inv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (item->IsClassCommon()) {
|
if (item->IsClassCommon()) {
|
||||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; i++) {
|
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) {
|
||||||
if (aug[i])
|
if (aug[i])
|
||||||
inst->PutAugment(this, i, aug[i]);
|
inst->PutAugment(this, i, aug[i]);
|
||||||
}
|
}
|
||||||
@@ -642,7 +653,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory *inv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Overloaded: Retrieve character inventory based on account_id and character name
|
// Overloaded: Retrieve character inventory based on account_id and character name
|
||||||
bool SharedDatabase::GetInventory(uint32 account_id, char *name, Inventory *inv)
|
bool SharedDatabase::GetInventory(uint32 account_id, char *name, EQEmu::InventoryProfile *inv)
|
||||||
{
|
{
|
||||||
// Retrieve character inventory
|
// Retrieve character inventory
|
||||||
std::string query =
|
std::string query =
|
||||||
@@ -666,7 +677,7 @@ bool SharedDatabase::GetInventory(uint32 account_id, char *name, Inventory *inv)
|
|||||||
int8 charges = atoi(row[2]);
|
int8 charges = atoi(row[2]);
|
||||||
uint32 color = atoul(row[3]);
|
uint32 color = atoul(row[3]);
|
||||||
|
|
||||||
uint32 aug[EQEmu::legacy::ITEM_COMMON_SIZE];
|
uint32 aug[EQEmu::inventory::SocketCount];
|
||||||
aug[0] = (uint32)atoi(row[4]);
|
aug[0] = (uint32)atoi(row[4]);
|
||||||
aug[1] = (uint32)atoi(row[5]);
|
aug[1] = (uint32)atoi(row[5]);
|
||||||
aug[2] = (uint32)atoi(row[6]);
|
aug[2] = (uint32)atoi(row[6]);
|
||||||
@@ -679,12 +690,12 @@ bool SharedDatabase::GetInventory(uint32 account_id, char *name, Inventory *inv)
|
|||||||
uint32 ornament_idfile = (uint32)atoul(row[13]);
|
uint32 ornament_idfile = (uint32)atoul(row[13]);
|
||||||
uint32 ornament_hero_model = (uint32)atoul(row[14]);
|
uint32 ornament_hero_model = (uint32)atoul(row[14]);
|
||||||
|
|
||||||
const EQEmu::Item_Struct *item = GetItem(item_id);
|
const EQEmu::ItemData *item = GetItem(item_id);
|
||||||
int16 put_slot_id = INVALID_INDEX;
|
int16 put_slot_id = INVALID_INDEX;
|
||||||
if (!item)
|
if (!item)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
ItemInst *inst = CreateBaseItem(item, charges);
|
EQEmu::ItemInstance *inst = CreateBaseItem(item, charges);
|
||||||
|
|
||||||
if (inst == nullptr)
|
if (inst == nullptr)
|
||||||
continue;
|
continue;
|
||||||
@@ -719,7 +730,7 @@ bool SharedDatabase::GetInventory(uint32 account_id, char *name, Inventory *inv)
|
|||||||
|
|
||||||
inst->SetOrnamentIcon(ornament_icon);
|
inst->SetOrnamentIcon(ornament_icon);
|
||||||
inst->SetOrnamentationIDFile(ornament_idfile);
|
inst->SetOrnamentationIDFile(ornament_idfile);
|
||||||
inst->SetOrnamentHeroModel(ornament_hero_model);
|
inst->SetOrnamentHeroModel(item->HerosForgeModel);
|
||||||
|
|
||||||
if (color > 0)
|
if (color > 0)
|
||||||
inst->SetColor(color);
|
inst->SetColor(color);
|
||||||
@@ -727,7 +738,7 @@ bool SharedDatabase::GetInventory(uint32 account_id, char *name, Inventory *inv)
|
|||||||
inst->SetCharges(charges);
|
inst->SetCharges(charges);
|
||||||
|
|
||||||
if (item->IsClassCommon()) {
|
if (item->IsClassCommon()) {
|
||||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; i++) {
|
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) {
|
||||||
if (aug[i])
|
if (aug[i])
|
||||||
inst->PutAugment(this, i, aug[i]);
|
inst->PutAugment(this, i, aug[i]);
|
||||||
}
|
}
|
||||||
@@ -816,7 +827,7 @@ bool SharedDatabase::LoadItems(const std::string &prefix) {
|
|||||||
mutex.Lock();
|
mutex.Lock();
|
||||||
std::string file_name = Config->SharedMemDir + prefix + std::string("items");
|
std::string file_name = Config->SharedMemDir + prefix + std::string("items");
|
||||||
items_mmf = std::unique_ptr<EQEmu::MemoryMappedFile>(new EQEmu::MemoryMappedFile(file_name));
|
items_mmf = std::unique_ptr<EQEmu::MemoryMappedFile>(new EQEmu::MemoryMappedFile(file_name));
|
||||||
items_hash = std::unique_ptr<EQEmu::FixedMemoryHashSet<EQEmu::Item_Struct>>(new EQEmu::FixedMemoryHashSet<EQEmu::Item_Struct>(reinterpret_cast<uint8*>(items_mmf->Get()), items_mmf->Size()));
|
items_hash = std::unique_ptr<EQEmu::FixedMemoryHashSet<EQEmu::ItemData>>(new EQEmu::FixedMemoryHashSet<EQEmu::ItemData>(reinterpret_cast<uint8*>(items_mmf->Get()), items_mmf->Size()));
|
||||||
mutex.Unlock();
|
mutex.Unlock();
|
||||||
} catch(std::exception& ex) {
|
} catch(std::exception& ex) {
|
||||||
Log.Out(Logs::General, Logs::Error, "Error Loading Items: %s", ex.what());
|
Log.Out(Logs::General, Logs::Error, "Error Loading Items: %s", ex.what());
|
||||||
@@ -828,7 +839,7 @@ bool SharedDatabase::LoadItems(const std::string &prefix) {
|
|||||||
|
|
||||||
void SharedDatabase::LoadItems(void *data, uint32 size, int32 items, uint32 max_item_id)
|
void SharedDatabase::LoadItems(void *data, uint32 size, int32 items, uint32 max_item_id)
|
||||||
{
|
{
|
||||||
EQEmu::FixedMemoryHashSet<EQEmu::Item_Struct> hash(reinterpret_cast<uint8 *>(data), size, items, max_item_id);
|
EQEmu::FixedMemoryHashSet<EQEmu::ItemData> hash(reinterpret_cast<uint8 *>(data), size, items, max_item_id);
|
||||||
|
|
||||||
std::string ndbuffer;
|
std::string ndbuffer;
|
||||||
bool disableNoRent = false;
|
bool disableNoRent = false;
|
||||||
@@ -856,7 +867,7 @@ void SharedDatabase::LoadItems(void *data, uint32 size, int32 items, uint32 max_
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EQEmu::Item_Struct item;
|
EQEmu::ItemData item;
|
||||||
|
|
||||||
const std::string query = "SELECT source,"
|
const std::string query = "SELECT source,"
|
||||||
#define F(x) "`"#x"`,"
|
#define F(x) "`"#x"`,"
|
||||||
@@ -869,7 +880,7 @@ void SharedDatabase::LoadItems(void *data, uint32 size, int32 items, uint32 max_
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
memset(&item, 0, sizeof(EQEmu::Item_Struct));
|
memset(&item, 0, sizeof(EQEmu::ItemData));
|
||||||
|
|
||||||
item.ItemClass = (uint8)atoi(row[ItemField::itemclass]);
|
item.ItemClass = (uint8)atoi(row[ItemField::itemclass]);
|
||||||
strcpy(item.Name, row[ItemField::name]);
|
strcpy(item.Name, row[ItemField::name]);
|
||||||
@@ -1086,7 +1097,7 @@ void SharedDatabase::LoadItems(void *data, uint32 size, int32 items, uint32 max_
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const EQEmu::Item_Struct* SharedDatabase::GetItem(uint32 id) {
|
const EQEmu::ItemData* SharedDatabase::GetItem(uint32 id) {
|
||||||
if (id == 0)
|
if (id == 0)
|
||||||
{
|
{
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@@ -1105,7 +1116,7 @@ const EQEmu::Item_Struct* SharedDatabase::GetItem(uint32 id) {
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
const EQEmu::Item_Struct* SharedDatabase::IterateItems(uint32* id) {
|
const EQEmu::ItemData* SharedDatabase::IterateItems(uint32* id) {
|
||||||
if(!items_hash || !id) {
|
if(!items_hash || !id) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
@@ -1125,13 +1136,13 @@ const EQEmu::Item_Struct* SharedDatabase::IterateItems(uint32* id) {
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string SharedDatabase::GetBook(const char *txtfile)
|
std::string SharedDatabase::GetBook(const char *txtfile, int16 *language)
|
||||||
{
|
{
|
||||||
char txtfile2[20];
|
char txtfile2[20];
|
||||||
std::string txtout;
|
std::string txtout;
|
||||||
strcpy(txtfile2, txtfile);
|
strcpy(txtfile2, txtfile);
|
||||||
|
|
||||||
std::string query = StringFormat("SELECT txtfile FROM books WHERE name = '%s'", txtfile2);
|
std::string query = StringFormat("SELECT txtfile, language FROM books WHERE name = '%s'", txtfile2);
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
if (!results.Success()) {
|
if (!results.Success()) {
|
||||||
txtout.assign(" ",1);
|
txtout.assign(" ",1);
|
||||||
@@ -1146,6 +1157,7 @@ std::string SharedDatabase::GetBook(const char *txtfile)
|
|||||||
|
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
txtout.assign(row[0],strlen(row[0]));
|
txtout.assign(row[0],strlen(row[0]));
|
||||||
|
*language = static_cast<int16>(atoi(row[1]));
|
||||||
|
|
||||||
return txtout;
|
return txtout;
|
||||||
}
|
}
|
||||||
@@ -1250,18 +1262,18 @@ bool SharedDatabase::LoadNPCFactionLists(const std::string &prefix) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create appropriate ItemInst class
|
// Create appropriate EQEmu::ItemInstance class
|
||||||
ItemInst* SharedDatabase::CreateItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5, uint32 aug6, uint8 attuned)
|
EQEmu::ItemInstance* SharedDatabase::CreateItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5, uint32 aug6, uint8 attuned)
|
||||||
{
|
{
|
||||||
const EQEmu::Item_Struct* item = nullptr;
|
const EQEmu::ItemData* item = nullptr;
|
||||||
ItemInst* inst = nullptr;
|
EQEmu::ItemInstance* inst = nullptr;
|
||||||
|
|
||||||
item = GetItem(item_id);
|
item = GetItem(item_id);
|
||||||
if (item) {
|
if (item) {
|
||||||
inst = CreateBaseItem(item, charges);
|
inst = CreateBaseItem(item, charges);
|
||||||
|
|
||||||
if (inst == nullptr) {
|
if (inst == nullptr) {
|
||||||
Log.Out(Logs::General, Logs::Error, "Error: valid item data returned a null reference for ItemInst creation in SharedDatabase::CreateItem()");
|
Log.Out(Logs::General, Logs::Error, "Error: valid item data returned a null reference for EQEmu::ItemInstance creation in SharedDatabase::CreateItem()");
|
||||||
Log.Out(Logs::General, Logs::Error, "Item Data = ID: %u, Name: %s, Charges: %i", item->ID, item->Name, charges);
|
Log.Out(Logs::General, Logs::Error, "Item Data = ID: %u, Name: %s, Charges: %i", item->ID, item->Name, charges);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
@@ -1279,15 +1291,15 @@ ItemInst* SharedDatabase::CreateItem(uint32 item_id, int16 charges, uint32 aug1,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Create appropriate ItemInst class
|
// Create appropriate EQEmu::ItemInstance class
|
||||||
ItemInst* SharedDatabase::CreateItem(const EQEmu::Item_Struct* item, int16 charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5, uint32 aug6, uint8 attuned)
|
EQEmu::ItemInstance* SharedDatabase::CreateItem(const EQEmu::ItemData* item, int16 charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5, uint32 aug6, uint8 attuned)
|
||||||
{
|
{
|
||||||
ItemInst* inst = nullptr;
|
EQEmu::ItemInstance* inst = nullptr;
|
||||||
if (item) {
|
if (item) {
|
||||||
inst = CreateBaseItem(item, charges);
|
inst = CreateBaseItem(item, charges);
|
||||||
|
|
||||||
if (inst == nullptr) {
|
if (inst == nullptr) {
|
||||||
Log.Out(Logs::General, Logs::Error, "Error: valid item data returned a null reference for ItemInst creation in SharedDatabase::CreateItem()");
|
Log.Out(Logs::General, Logs::Error, "Error: valid item data returned a null reference for EQEmu::ItemInstance creation in SharedDatabase::CreateItem()");
|
||||||
Log.Out(Logs::General, Logs::Error, "Item Data = ID: %u, Name: %s, Charges: %i", item->ID, item->Name, charges);
|
Log.Out(Logs::General, Logs::Error, "Item Data = ID: %u, Name: %s, Charges: %i", item->ID, item->Name, charges);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
@@ -1304,8 +1316,8 @@ ItemInst* SharedDatabase::CreateItem(const EQEmu::Item_Struct* item, int16 charg
|
|||||||
return inst;
|
return inst;
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemInst* SharedDatabase::CreateBaseItem(const EQEmu::Item_Struct* item, int16 charges) {
|
EQEmu::ItemInstance* SharedDatabase::CreateBaseItem(const EQEmu::ItemData* item, int16 charges) {
|
||||||
ItemInst* inst = nullptr;
|
EQEmu::ItemInstance* inst = nullptr;
|
||||||
if (item) {
|
if (item) {
|
||||||
// if maxcharges is -1 that means it is an unlimited use item.
|
// if maxcharges is -1 that means it is an unlimited use item.
|
||||||
// set it to 1 charge so that it is usable on creation
|
// set it to 1 charge so that it is usable on creation
|
||||||
@@ -1315,10 +1327,10 @@ ItemInst* SharedDatabase::CreateBaseItem(const EQEmu::Item_Struct* item, int16 c
|
|||||||
if(charges <= 0 && item->Stackable)
|
if(charges <= 0 && item->Stackable)
|
||||||
charges = 1;
|
charges = 1;
|
||||||
|
|
||||||
inst = new ItemInst(item, charges);
|
inst = new EQEmu::ItemInstance(item, charges);
|
||||||
|
|
||||||
if (inst == nullptr) {
|
if (inst == nullptr) {
|
||||||
Log.Out(Logs::General, Logs::Error, "Error: valid item data returned a null reference for ItemInst creation in SharedDatabase::CreateBaseItem()");
|
Log.Out(Logs::General, Logs::Error, "Error: valid item data returned a null reference for EQEmu::ItemInstance creation in SharedDatabase::CreateBaseItem()");
|
||||||
Log.Out(Logs::General, Logs::Error, "Item Data = ID: %u, Name: %s, Charges: %i", item->ID, item->Name, charges);
|
Log.Out(Logs::General, Logs::Error, "Item Data = ID: %u, Name: %s, Charges: %i", item->ID, item->Name, charges);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
@@ -1664,7 +1676,7 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
|
|||||||
|
|
||||||
sp[tempid].uninterruptable=atoi(row[146]) != 0;
|
sp[tempid].uninterruptable=atoi(row[146]) != 0;
|
||||||
sp[tempid].ResistDiff=atoi(row[147]);
|
sp[tempid].ResistDiff=atoi(row[147]);
|
||||||
sp[tempid].dot_stacking_exempt=atoi(row[148]);
|
sp[tempid].dot_stacking_exempt = atoi(row[148]) != 0;
|
||||||
sp[tempid].RecourseLink = atoi(row[150]);
|
sp[tempid].RecourseLink = atoi(row[150]);
|
||||||
sp[tempid].no_partial_resist = atoi(row[151]) != 0;
|
sp[tempid].no_partial_resist = atoi(row[151]) != 0;
|
||||||
|
|
||||||
@@ -1689,6 +1701,8 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
|
|||||||
sp[tempid].pvpresistcalc=atoi(row[178]);
|
sp[tempid].pvpresistcalc=atoi(row[178]);
|
||||||
sp[tempid].pvpresistcap=atoi(row[179]);
|
sp[tempid].pvpresistcap=atoi(row[179]);
|
||||||
sp[tempid].spell_category=atoi(row[180]);
|
sp[tempid].spell_category=atoi(row[180]);
|
||||||
|
sp[tempid].pcnpc_only_flag=atoi(row[183]);
|
||||||
|
sp[tempid].cast_not_standing = atoi(row[184]) != 0;
|
||||||
sp[tempid].can_mgb=atoi(row[185]);
|
sp[tempid].can_mgb=atoi(row[185]);
|
||||||
sp[tempid].dispel_flag = atoi(row[186]);
|
sp[tempid].dispel_flag = atoi(row[186]);
|
||||||
sp[tempid].MinResist = atoi(row[189]);
|
sp[tempid].MinResist = atoi(row[189]);
|
||||||
|
|||||||
+21
-20
@@ -33,8 +33,6 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
class EvolveInfo;
|
class EvolveInfo;
|
||||||
class Inventory;
|
|
||||||
class ItemInst;
|
|
||||||
struct BaseDataStruct;
|
struct BaseDataStruct;
|
||||||
struct InspectMessage_Struct;
|
struct InspectMessage_Struct;
|
||||||
struct PlayerProfile_Struct;
|
struct PlayerProfile_Struct;
|
||||||
@@ -42,9 +40,12 @@ struct SPDat_Spell_Struct;
|
|||||||
struct NPCFactionList;
|
struct NPCFactionList;
|
||||||
struct LootTable_Struct;
|
struct LootTable_Struct;
|
||||||
struct LootDrop_Struct;
|
struct LootDrop_Struct;
|
||||||
|
|
||||||
namespace EQEmu
|
namespace EQEmu
|
||||||
{
|
{
|
||||||
struct Item_Struct;
|
struct ItemData;
|
||||||
|
class ItemInstance;
|
||||||
|
class InventoryProfile;
|
||||||
class MemoryMappedFile;
|
class MemoryMappedFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,34 +74,34 @@ class SharedDatabase : public Database
|
|||||||
uint32 GetTotalTimeEntitledOnAccount(uint32 AccountID);
|
uint32 GetTotalTimeEntitledOnAccount(uint32 AccountID);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Character Inventory
|
Character InventoryProfile
|
||||||
*/
|
*/
|
||||||
bool SaveCursor(uint32 char_id, std::list<ItemInst*>::const_iterator &start, std::list<ItemInst*>::const_iterator &end);
|
bool SaveCursor(uint32 char_id, std::list<EQEmu::ItemInstance*>::const_iterator &start, std::list<EQEmu::ItemInstance*>::const_iterator &end);
|
||||||
bool SaveInventory(uint32 char_id, const ItemInst* inst, int16 slot_id);
|
bool SaveInventory(uint32 char_id, const EQEmu::ItemInstance* inst, int16 slot_id);
|
||||||
bool DeleteSharedBankSlot(uint32 char_id, int16 slot_id);
|
bool DeleteSharedBankSlot(uint32 char_id, int16 slot_id);
|
||||||
bool DeleteInventorySlot(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 UpdateInventorySlot(uint32 char_id, const EQEmu::ItemInstance* inst, int16 slot_id);
|
||||||
bool UpdateSharedBankSlot(uint32 char_id, const ItemInst* inst, int16 slot_id);
|
bool UpdateSharedBankSlot(uint32 char_id, const EQEmu::ItemInstance* inst, int16 slot_id);
|
||||||
bool VerifyInventory(uint32 account_id, int16 slot_id, const ItemInst* inst);
|
bool VerifyInventory(uint32 account_id, int16 slot_id, const EQEmu::ItemInstance* inst);
|
||||||
bool GetSharedBank(uint32 id, Inventory* inv, bool is_charid);
|
bool GetSharedBank(uint32 id, EQEmu::InventoryProfile* inv, bool is_charid);
|
||||||
int32 GetSharedPlatinum(uint32 account_id);
|
int32 GetSharedPlatinum(uint32 account_id);
|
||||||
bool SetSharedPlatinum(uint32 account_id, int32 amount_to_add);
|
bool SetSharedPlatinum(uint32 account_id, int32 amount_to_add);
|
||||||
bool GetInventory(uint32 char_id, Inventory* inv);
|
bool GetInventory(uint32 char_id, EQEmu::InventoryProfile* inv);
|
||||||
bool GetInventory(uint32 account_id, char* name, Inventory* inv);
|
bool GetInventory(uint32 account_id, char* name, EQEmu::InventoryProfile* inv);
|
||||||
std::map<uint32, uint32> GetItemRecastTimestamps(uint32 char_id);
|
std::map<uint32, uint32> GetItemRecastTimestamps(uint32 char_id);
|
||||||
uint32 GetItemRecastTimestamp(uint32 char_id, uint32 recast_type);
|
uint32 GetItemRecastTimestamp(uint32 char_id, uint32 recast_type);
|
||||||
void ClearOldRecastTimestamps(uint32 char_id);
|
void ClearOldRecastTimestamps(uint32 char_id);
|
||||||
bool SetStartingItems(PlayerProfile_Struct* pp, Inventory* inv, uint32 si_race, uint32 si_class, uint32 si_deity, uint32 si_current_zone, char* si_name, int admin);
|
bool SetStartingItems(PlayerProfile_Struct* pp, EQEmu::InventoryProfile* inv, uint32 si_race, uint32 si_class, uint32 si_deity, uint32 si_current_zone, char* si_name, int admin);
|
||||||
|
|
||||||
|
|
||||||
std::string GetBook(const char *txtfile);
|
std::string GetBook(const char *txtfile, int16 *language);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Item Methods
|
Item Methods
|
||||||
*/
|
*/
|
||||||
ItemInst* CreateItem(uint32 item_id, int16 charges = 0, uint32 aug1 = 0, uint32 aug2 = 0, uint32 aug3 = 0, uint32 aug4 = 0, uint32 aug5 = 0, uint32 aug6 = 0, uint8 attuned = 0);
|
EQEmu::ItemInstance* CreateItem(uint32 item_id, int16 charges = 0, uint32 aug1 = 0, uint32 aug2 = 0, uint32 aug3 = 0, uint32 aug4 = 0, uint32 aug5 = 0, uint32 aug6 = 0, uint8 attuned = 0);
|
||||||
ItemInst* CreateItem(const EQEmu::Item_Struct* item, int16 charges = 0, uint32 aug1 = 0, uint32 aug2 = 0, uint32 aug3 = 0, uint32 aug4 = 0, uint32 aug5 = 0, uint32 aug6 = 0, uint8 attuned = 0);
|
EQEmu::ItemInstance* CreateItem(const EQEmu::ItemData* item, int16 charges = 0, uint32 aug1 = 0, uint32 aug2 = 0, uint32 aug3 = 0, uint32 aug4 = 0, uint32 aug5 = 0, uint32 aug6 = 0, uint8 attuned = 0);
|
||||||
ItemInst* CreateBaseItem(const EQEmu::Item_Struct* item, int16 charges = 0);
|
EQEmu::ItemInstance* CreateBaseItem(const EQEmu::ItemData* item, int16 charges = 0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Shared Memory crap
|
Shared Memory crap
|
||||||
@@ -110,8 +111,8 @@ class SharedDatabase : public Database
|
|||||||
void GetItemsCount(int32 &item_count, uint32 &max_id);
|
void GetItemsCount(int32 &item_count, uint32 &max_id);
|
||||||
void LoadItems(void *data, uint32 size, int32 items, uint32 max_item_id);
|
void LoadItems(void *data, uint32 size, int32 items, uint32 max_item_id);
|
||||||
bool LoadItems(const std::string &prefix);
|
bool LoadItems(const std::string &prefix);
|
||||||
const EQEmu::Item_Struct* IterateItems(uint32* id);
|
const EQEmu::ItemData* IterateItems(uint32* id);
|
||||||
const EQEmu::Item_Struct* GetItem(uint32 id);
|
const EQEmu::ItemData* GetItem(uint32 id);
|
||||||
const EvolveInfo* GetEvolveInfo(uint32 loregroup);
|
const EvolveInfo* GetEvolveInfo(uint32 loregroup);
|
||||||
|
|
||||||
//faction lists
|
//faction lists
|
||||||
@@ -148,7 +149,7 @@ class SharedDatabase : public Database
|
|||||||
|
|
||||||
std::unique_ptr<EQEmu::MemoryMappedFile> skill_caps_mmf;
|
std::unique_ptr<EQEmu::MemoryMappedFile> skill_caps_mmf;
|
||||||
std::unique_ptr<EQEmu::MemoryMappedFile> items_mmf;
|
std::unique_ptr<EQEmu::MemoryMappedFile> items_mmf;
|
||||||
std::unique_ptr<EQEmu::FixedMemoryHashSet<EQEmu::Item_Struct>> items_hash;
|
std::unique_ptr<EQEmu::FixedMemoryHashSet<EQEmu::ItemData>> items_hash;
|
||||||
std::unique_ptr<EQEmu::MemoryMappedFile> faction_mmf;
|
std::unique_ptr<EQEmu::MemoryMappedFile> faction_mmf;
|
||||||
std::unique_ptr<EQEmu::FixedMemoryHashSet<NPCFactionList>> faction_hash;
|
std::unique_ptr<EQEmu::FixedMemoryHashSet<NPCFactionList>> faction_hash;
|
||||||
std::unique_ptr<EQEmu::MemoryMappedFile> loot_table_mmf;
|
std::unique_ptr<EQEmu::MemoryMappedFile> loot_table_mmf;
|
||||||
|
|||||||
+67
-136
@@ -17,7 +17,6 @@
|
|||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "types.h"
|
|
||||||
#include "skills.h"
|
#include "skills.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -111,6 +110,71 @@ bool EQEmu::skills::IsBardInstrumentSkill(SkillType skill)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool EQEmu::skills::IsCastingSkill(SkillType skill)
|
||||||
|
{
|
||||||
|
switch (skill) {
|
||||||
|
case SkillAbjuration:
|
||||||
|
case SkillAlteration:
|
||||||
|
case SkillConjuration:
|
||||||
|
case SkillDivination:
|
||||||
|
case SkillEvocation:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int32 EQEmu::skills::GetBaseDamage(SkillType skill)
|
||||||
|
{
|
||||||
|
switch (skill) {
|
||||||
|
case SkillBash:
|
||||||
|
return 2;
|
||||||
|
case SkillDragonPunch:
|
||||||
|
return 12;
|
||||||
|
case SkillEagleStrike:
|
||||||
|
return 7;
|
||||||
|
case SkillFlyingKick:
|
||||||
|
return 25;
|
||||||
|
case SkillKick:
|
||||||
|
return 3;
|
||||||
|
case SkillRoundKick:
|
||||||
|
return 5;
|
||||||
|
case SkillTigerClaw:
|
||||||
|
return 4;
|
||||||
|
case SkillFrenzy:
|
||||||
|
return 10;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::skills::IsMeleeDmg(SkillType skill)
|
||||||
|
{
|
||||||
|
switch (skill) {
|
||||||
|
case Skill1HBlunt:
|
||||||
|
case Skill1HSlashing:
|
||||||
|
case Skill2HBlunt:
|
||||||
|
case Skill2HSlashing:
|
||||||
|
case SkillBackstab:
|
||||||
|
case SkillBash:
|
||||||
|
case SkillDragonPunch:
|
||||||
|
case SkillEagleStrike:
|
||||||
|
case SkillFlyingKick:
|
||||||
|
case SkillHandtoHand:
|
||||||
|
case SkillKick:
|
||||||
|
case Skill1HPiercing:
|
||||||
|
case SkillRiposte:
|
||||||
|
case SkillRoundKick:
|
||||||
|
case SkillThrowing:
|
||||||
|
case SkillTigerClaw:
|
||||||
|
case SkillFrenzy:
|
||||||
|
case Skill2HPiercing:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const std::map<EQEmu::skills::SkillType, std::string>& EQEmu::skills::GetSkillTypeMap()
|
const std::map<EQEmu::skills::SkillType, std::string>& EQEmu::skills::GetSkillTypeMap()
|
||||||
{
|
{
|
||||||
/* VS2013 code
|
/* VS2013 code
|
||||||
@@ -291,142 +355,9 @@ const std::map<EQEmu::skills::SkillType, std::string>& EQEmu::skills::GetSkillTy
|
|||||||
return skill_type_map;
|
return skill_type_map;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct EQEmu::SkillProfile // prototype - not implemented
|
|
||||||
{
|
|
||||||
union {
|
|
||||||
struct {
|
|
||||||
uint32 _1HBlunt;
|
|
||||||
uint32 _1HSlashing;
|
|
||||||
uint32 _2HBlunt;
|
|
||||||
uint32 _2HSlashing;
|
|
||||||
uint32 Abjuration;
|
|
||||||
uint32 Alteration;
|
|
||||||
uint32 ApplyPoison;
|
|
||||||
uint32 Archery;
|
|
||||||
uint32 Backstab;
|
|
||||||
uint32 BindWound;
|
|
||||||
uint32 Bash;
|
|
||||||
uint32 Block;
|
|
||||||
uint32 BrassInstruments;
|
|
||||||
uint32 Channeling;
|
|
||||||
uint32 Conjuration;
|
|
||||||
uint32 Defense;
|
|
||||||
uint32 Disarm;
|
|
||||||
uint32 DisarmTraps;
|
|
||||||
uint32 Divination;
|
|
||||||
uint32 Dodge;
|
|
||||||
uint32 DoubleAttack;
|
|
||||||
union {
|
|
||||||
uint32 DragonPunch;
|
|
||||||
uint32 TailRake;
|
|
||||||
};
|
|
||||||
uint32 DualWield;
|
|
||||||
uint32 EagleStrike;
|
|
||||||
uint32 Evocation;
|
|
||||||
uint32 FeignDeath;
|
|
||||||
uint32 FlyingKick;
|
|
||||||
uint32 Forage;
|
|
||||||
uint32 HandtoHand;
|
|
||||||
uint32 Hide;
|
|
||||||
uint32 Kick;
|
|
||||||
uint32 Meditate;
|
|
||||||
uint32 Mend;
|
|
||||||
uint32 Offense;
|
|
||||||
uint32 Parry;
|
|
||||||
uint32 PickLock;
|
|
||||||
uint32 _1HPiercing;
|
|
||||||
uint32 Riposte;
|
|
||||||
uint32 RoundKick;
|
|
||||||
uint32 SafeFall;
|
|
||||||
uint32 SenseHeading;
|
|
||||||
uint32 Singing;
|
|
||||||
uint32 Sneak;
|
|
||||||
uint32 SpecializeAbjure;
|
|
||||||
uint32 SpecializeAlteration;
|
|
||||||
uint32 SpecializeConjuration;
|
|
||||||
uint32 SpecializeDivination;
|
|
||||||
uint32 SpecializeEvocation;
|
|
||||||
uint32 PickPockets;
|
|
||||||
uint32 StringedInstruments;
|
|
||||||
uint32 Swimming;
|
|
||||||
uint32 Throwing;
|
|
||||||
uint32 TigerClaw;
|
|
||||||
uint32 Tracking;
|
|
||||||
uint32 WindInstruments;
|
|
||||||
uint32 Fishing;
|
|
||||||
uint32 MakePoison;
|
|
||||||
uint32 Tinkering;
|
|
||||||
uint32 Research;
|
|
||||||
uint32 Alchemy;
|
|
||||||
uint32 Baking;
|
|
||||||
uint32 Tailoring;
|
|
||||||
uint32 SenseTraps;
|
|
||||||
uint32 Blacksmithing;
|
|
||||||
uint32 Fletching;
|
|
||||||
uint32 Brewing;
|
|
||||||
uint32 AlcoholTolerance;
|
|
||||||
uint32 Begging;
|
|
||||||
uint32 JewelryMaking;
|
|
||||||
uint32 Pottery;
|
|
||||||
uint32 PercussionInstruments;
|
|
||||||
uint32 Intimidation;
|
|
||||||
uint32 Berserking;
|
|
||||||
uint32 Taunt;
|
|
||||||
uint32 Frenzy;
|
|
||||||
uint32 RemoveTraps;
|
|
||||||
uint32 TripleAttack;
|
|
||||||
uint32 _2HPiercing;
|
|
||||||
uint32 unused1;
|
|
||||||
uint32 unused2;
|
|
||||||
uint32 unused3;
|
|
||||||
uint32 unused4;
|
|
||||||
uint32 unused5;
|
|
||||||
uint32 unused6;
|
|
||||||
uint32 unused7;
|
|
||||||
uint32 unused8;
|
|
||||||
uint32 unused9;
|
|
||||||
uint32 unused10;
|
|
||||||
uint32 unused11;
|
|
||||||
uint32 unused12;
|
|
||||||
uint32 unused13;
|
|
||||||
uint32 unused14;
|
|
||||||
uint32 unused15;
|
|
||||||
uint32 unused16;
|
|
||||||
uint32 unused17;
|
|
||||||
uint32 unused18;
|
|
||||||
uint32 unused19;
|
|
||||||
uint32 unused20;
|
|
||||||
uint32 unused21;
|
|
||||||
uint32 unused22;
|
|
||||||
};
|
|
||||||
uint32 skill[PACKET_SKILL_ARRAY_SIZE];
|
|
||||||
};
|
|
||||||
|
|
||||||
SkillProfile();
|
|
||||||
|
|
||||||
uint32* GetSkills() { return reinterpret_cast<uint32*>(&skill); }
|
|
||||||
|
|
||||||
skills::SkillType GetLastUseableSkill() { return EQEmu::skills::Skill2HPiercing; }
|
|
||||||
|
|
||||||
size_t GetSkillsArraySize() { return PACKET_SKILL_ARRAY_SIZE; }
|
|
||||||
uint32 GetSkill(int skill_id);
|
|
||||||
|
|
||||||
uint32 operator[](int skill_id) { return GetSkill(skill_id); }
|
|
||||||
|
|
||||||
// const
|
|
||||||
uint32* GetSkills() const { return const_cast<SkillProfile*>(this)->GetSkills(); }
|
|
||||||
|
|
||||||
skills::SkillType GetLastUseableSkill() const { return const_cast<SkillProfile*>(this)->GetLastUseableSkill(); }
|
|
||||||
|
|
||||||
size_t GetSkillsArraySize() const { return const_cast<SkillProfile*>(this)->GetSkillsArraySize(); }
|
|
||||||
uint32 GetSkill(int skill_id) const { return const_cast<SkillProfile*>(this)->GetSkill(skill_id); }
|
|
||||||
|
|
||||||
uint32 operator[](int skill_id) const { return const_cast<SkillProfile*>(this)->GetSkill(skill_id); }
|
|
||||||
};
|
|
||||||
|
|
||||||
EQEmu::SkillProfile::SkillProfile()
|
EQEmu::SkillProfile::SkillProfile()
|
||||||
{
|
{
|
||||||
memset(&skill, 0, (sizeof(uint32) * PACKET_SKILL_ARRAY_SIZE));
|
memset(&Skill, 0, (sizeof(uint32) * PACKET_SKILL_ARRAY_SIZE));
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 EQEmu::SkillProfile::GetSkill(int skill_id)
|
uint32 EQEmu::SkillProfile::GetSkill(int skill_id)
|
||||||
@@ -434,5 +365,5 @@ uint32 EQEmu::SkillProfile::GetSkill(int skill_id)
|
|||||||
if (skill_id < 0 || skill_id >= PACKET_SKILL_ARRAY_SIZE)
|
if (skill_id < 0 || skill_id >= PACKET_SKILL_ARRAY_SIZE)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return skill[skill_id];
|
return Skill[skill_id];
|
||||||
}
|
}
|
||||||
|
|||||||
+140
-5
@@ -20,6 +20,8 @@
|
|||||||
#ifndef COMMON_SKILLS_H
|
#ifndef COMMON_SKILLS_H
|
||||||
#define COMMON_SKILLS_H
|
#define COMMON_SKILLS_H
|
||||||
|
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
@@ -159,16 +161,149 @@ namespace EQEmu
|
|||||||
// server profile does not reflect this yet..so, prefixed with 'PACKET_'
|
// server profile does not reflect this yet..so, prefixed with 'PACKET_'
|
||||||
#define PACKET_SKILL_ARRAY_SIZE 100
|
#define PACKET_SKILL_ARRAY_SIZE 100
|
||||||
|
|
||||||
extern bool IsTradeskill(SkillType skill);
|
bool IsTradeskill(SkillType skill);
|
||||||
extern bool IsSpecializedSkill(SkillType skill);
|
bool IsSpecializedSkill(SkillType skill);
|
||||||
extern float GetSkillMeleePushForce(SkillType skill);
|
float GetSkillMeleePushForce(SkillType skill);
|
||||||
extern bool IsBardInstrumentSkill(SkillType skill);
|
bool IsBardInstrumentSkill(SkillType skill);
|
||||||
|
bool IsCastingSkill(SkillType skill);
|
||||||
|
int32 GetBaseDamage(SkillType skill);
|
||||||
|
bool IsMeleeDmg(SkillType skill);
|
||||||
|
|
||||||
extern const std::map<SkillType, std::string>& GetSkillTypeMap();
|
extern const std::map<SkillType, std::string>& GetSkillTypeMap();
|
||||||
|
|
||||||
} /*skills*/
|
} /*skills*/
|
||||||
|
|
||||||
struct SkillProfile;
|
struct SkillProfile { // prototype - not implemented
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
uint32 _1HBlunt;
|
||||||
|
uint32 _1HSlashing;
|
||||||
|
uint32 _2HBlunt;
|
||||||
|
uint32 _2HSlashing;
|
||||||
|
uint32 Abjuration;
|
||||||
|
uint32 Alteration;
|
||||||
|
uint32 ApplyPoison;
|
||||||
|
uint32 Archery;
|
||||||
|
uint32 Backstab;
|
||||||
|
uint32 BindWound;
|
||||||
|
uint32 Bash;
|
||||||
|
uint32 Block;
|
||||||
|
uint32 BrassInstruments;
|
||||||
|
uint32 Channeling;
|
||||||
|
uint32 Conjuration;
|
||||||
|
uint32 Defense;
|
||||||
|
uint32 Disarm;
|
||||||
|
uint32 DisarmTraps;
|
||||||
|
uint32 Divination;
|
||||||
|
uint32 Dodge;
|
||||||
|
uint32 DoubleAttack;
|
||||||
|
union {
|
||||||
|
uint32 DragonPunch;
|
||||||
|
uint32 TailRake;
|
||||||
|
};
|
||||||
|
uint32 DualWield;
|
||||||
|
uint32 EagleStrike;
|
||||||
|
uint32 Evocation;
|
||||||
|
uint32 FeignDeath;
|
||||||
|
uint32 FlyingKick;
|
||||||
|
uint32 Forage;
|
||||||
|
uint32 HandtoHand;
|
||||||
|
uint32 Hide;
|
||||||
|
uint32 Kick;
|
||||||
|
uint32 Meditate;
|
||||||
|
uint32 Mend;
|
||||||
|
uint32 Offense;
|
||||||
|
uint32 Parry;
|
||||||
|
uint32 PickLock;
|
||||||
|
uint32 _1HPiercing;
|
||||||
|
uint32 Riposte;
|
||||||
|
uint32 RoundKick;
|
||||||
|
uint32 SafeFall;
|
||||||
|
uint32 SenseHeading;
|
||||||
|
uint32 Singing;
|
||||||
|
uint32 Sneak;
|
||||||
|
uint32 SpecializeAbjure;
|
||||||
|
uint32 SpecializeAlteration;
|
||||||
|
uint32 SpecializeConjuration;
|
||||||
|
uint32 SpecializeDivination;
|
||||||
|
uint32 SpecializeEvocation;
|
||||||
|
uint32 PickPockets;
|
||||||
|
uint32 StringedInstruments;
|
||||||
|
uint32 Swimming;
|
||||||
|
uint32 Throwing;
|
||||||
|
uint32 TigerClaw;
|
||||||
|
uint32 Tracking;
|
||||||
|
uint32 WindInstruments;
|
||||||
|
uint32 Fishing;
|
||||||
|
uint32 MakePoison;
|
||||||
|
uint32 Tinkering;
|
||||||
|
uint32 Research;
|
||||||
|
uint32 Alchemy;
|
||||||
|
uint32 Baking;
|
||||||
|
uint32 Tailoring;
|
||||||
|
uint32 SenseTraps;
|
||||||
|
uint32 Blacksmithing;
|
||||||
|
uint32 Fletching;
|
||||||
|
uint32 Brewing;
|
||||||
|
uint32 AlcoholTolerance;
|
||||||
|
uint32 Begging;
|
||||||
|
uint32 JewelryMaking;
|
||||||
|
uint32 Pottery;
|
||||||
|
uint32 PercussionInstruments;
|
||||||
|
uint32 Intimidation;
|
||||||
|
uint32 Berserking;
|
||||||
|
uint32 Taunt;
|
||||||
|
uint32 Frenzy;
|
||||||
|
uint32 RemoveTraps;
|
||||||
|
uint32 TripleAttack;
|
||||||
|
uint32 _2HPiercing;
|
||||||
|
uint32 unused1;
|
||||||
|
uint32 unused2;
|
||||||
|
uint32 unused3;
|
||||||
|
uint32 unused4;
|
||||||
|
uint32 unused5;
|
||||||
|
uint32 unused6;
|
||||||
|
uint32 unused7;
|
||||||
|
uint32 unused8;
|
||||||
|
uint32 unused9;
|
||||||
|
uint32 unused10;
|
||||||
|
uint32 unused11;
|
||||||
|
uint32 unused12;
|
||||||
|
uint32 unused13;
|
||||||
|
uint32 unused14;
|
||||||
|
uint32 unused15;
|
||||||
|
uint32 unused16;
|
||||||
|
uint32 unused17;
|
||||||
|
uint32 unused18;
|
||||||
|
uint32 unused19;
|
||||||
|
uint32 unused20;
|
||||||
|
uint32 unused21;
|
||||||
|
uint32 unused22;
|
||||||
|
};
|
||||||
|
uint32 Skill[PACKET_SKILL_ARRAY_SIZE];
|
||||||
|
};
|
||||||
|
|
||||||
|
SkillProfile();
|
||||||
|
|
||||||
|
uint32* GetSkills() { return reinterpret_cast<uint32*>(&Skill); }
|
||||||
|
|
||||||
|
skills::SkillType GetLastUseableSkill() { return EQEmu::skills::Skill2HPiercing; }
|
||||||
|
|
||||||
|
size_t GetSkillsArraySize() { return PACKET_SKILL_ARRAY_SIZE; }
|
||||||
|
uint32 GetSkill(int skill_id);
|
||||||
|
|
||||||
|
uint32 operator[](int skill_id) { return GetSkill(skill_id); }
|
||||||
|
|
||||||
|
// const
|
||||||
|
uint32* GetSkills() const { return const_cast<SkillProfile*>(this)->GetSkills(); }
|
||||||
|
|
||||||
|
skills::SkillType GetLastUseableSkill() const { return const_cast<SkillProfile*>(this)->GetLastUseableSkill(); }
|
||||||
|
|
||||||
|
size_t GetSkillsArraySize() const { return const_cast<SkillProfile*>(this)->GetSkillsArraySize(); }
|
||||||
|
uint32 GetSkill(int skill_id) const { return const_cast<SkillProfile*>(this)->GetSkill(skill_id); }
|
||||||
|
|
||||||
|
uint32 operator[](int skill_id) const { return const_cast<SkillProfile*>(this)->GetSkill(skill_id); }
|
||||||
|
};
|
||||||
|
|
||||||
} /*EQEmu*/
|
} /*EQEmu*/
|
||||||
|
|
||||||
|
|||||||
+118
-8
@@ -235,8 +235,11 @@ bool IsBeneficialSpell(uint16 spell_id)
|
|||||||
// If the resisttype is magic and SpellAffectIndex is Calm/memblur/dispell sight
|
// If the resisttype is magic and SpellAffectIndex is Calm/memblur/dispell sight
|
||||||
// it's not beneficial
|
// it's not beneficial
|
||||||
if (spells[spell_id].resisttype == RESIST_MAGIC) {
|
if (spells[spell_id].resisttype == RESIST_MAGIC) {
|
||||||
if (sai == SAI_Calm || sai == SAI_Dispell_Sight ||
|
// checking these SAI cause issues with the rng defensive proc line
|
||||||
sai == SAI_Memory_Blur || sai == SAI_Calm_Song)
|
// So I guess instead of fixing it for real, just a quick hack :P
|
||||||
|
if (spells[spell_id].effectid[0] != SE_DefensiveProc &&
|
||||||
|
(sai == SAI_Calm || sai == SAI_Dispell_Sight || sai == SAI_Memory_Blur ||
|
||||||
|
sai == SAI_Calm_Song))
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
// If the resisttype is not magic and spell is Bind Sight or Cast Sight
|
// If the resisttype is not magic and spell is Bind Sight or Cast Sight
|
||||||
@@ -406,9 +409,20 @@ bool IsPartialCapableSpell(uint16 spell_id)
|
|||||||
if (spells[spell_id].no_partial_resist)
|
if (spells[spell_id].no_partial_resist)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (IsPureNukeSpell(spell_id))
|
// spell uses 600 (partial) scale if first effect is damage, else it uses 200 scale.
|
||||||
|
// this includes DoTs. no_partial_resist excludes spells like necro snares
|
||||||
|
for (int o = 0; o < EFFECT_COUNT; o++) {
|
||||||
|
auto tid = spells[spell_id].effectid[o];
|
||||||
|
|
||||||
|
if (IsBlankSpellEffect(spell_id, o))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if ((tid == SE_CurrentHPOnce || tid == SE_CurrentHP) && spells[spell_id].base[o] < 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -669,9 +683,7 @@ bool IsDisciplineBuff(uint16 spell_id)
|
|||||||
if (!IsValidSpell(spell_id))
|
if (!IsValidSpell(spell_id))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (spells[spell_id].mana == 0 && spells[spell_id].short_buff_box == 0 &&
|
if (spells[spell_id].IsDisciplineBuff && spells[spell_id].targettype == ST_Self)
|
||||||
(spells[spell_id].EndurCost || spells[spell_id].EndurUpkeep) &&
|
|
||||||
spells[spell_id].targettype == ST_Self)
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@@ -704,7 +716,7 @@ bool IsCombatSkill(uint16 spell_id)
|
|||||||
bool IsResurrectionEffects(uint16 spell_id)
|
bool IsResurrectionEffects(uint16 spell_id)
|
||||||
{
|
{
|
||||||
// spell id 756 is Resurrection Effects spell
|
// spell id 756 is Resurrection Effects spell
|
||||||
if(IsValidSpell(spell_id) && spell_id == 756)
|
if(IsValidSpell(spell_id) && (spell_id == 756 || spell_id == 757))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@@ -928,7 +940,7 @@ bool IsRegularSingleTargetHealSpell(uint16 spell_id)
|
|||||||
{
|
{
|
||||||
if(spells[spell_id].effectid[0] == 0 && spells[spell_id].base[0] > 0 &&
|
if(spells[spell_id].effectid[0] == 0 && spells[spell_id].base[0] > 0 &&
|
||||||
spells[spell_id].targettype == ST_Target && spells[spell_id].buffduration == 0 &&
|
spells[spell_id].targettype == ST_Target && spells[spell_id].buffduration == 0 &&
|
||||||
!IsFastHealSpell(spell_id) && !IsCompleteHealSpell(spell_id) &&
|
!IsCompleteHealSpell(spell_id) &&
|
||||||
!IsHealOverTimeSpell(spell_id) && !IsGroupSpell(spell_id))
|
!IsHealOverTimeSpell(spell_id) && !IsGroupSpell(spell_id))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@@ -1100,6 +1112,104 @@ bool NoDetrimentalSpellAggro(uint16 spell_id)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IsStackableDot(uint16 spell_id)
|
||||||
|
{
|
||||||
|
// rules according to client
|
||||||
|
if (!IsValidSpell(spell_id))
|
||||||
|
return false;
|
||||||
|
const auto &spell = spells[spell_id];
|
||||||
|
if (spell.dot_stacking_exempt || spell.goodEffect || !spell.buffdurationformula)
|
||||||
|
return false;
|
||||||
|
return IsEffectInSpell(spell_id, SE_CurrentHP) || IsEffectInSpell(spell_id, SE_GravityEffect);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsCastWhileInvis(uint16 spell_id)
|
||||||
|
{
|
||||||
|
if (!IsValidSpell(spell_id))
|
||||||
|
return false;
|
||||||
|
const auto &spell = spells[spell_id];
|
||||||
|
if (spell.sneak || spell.cast_not_standing)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsEffectIgnoredInStacking(int spa)
|
||||||
|
{
|
||||||
|
// this should match RoF2
|
||||||
|
switch (spa) {
|
||||||
|
case SE_SeeInvis:
|
||||||
|
case SE_DiseaseCounter:
|
||||||
|
case SE_PoisonCounter:
|
||||||
|
case SE_Levitate:
|
||||||
|
case SE_InfraVision:
|
||||||
|
case SE_UltraVision:
|
||||||
|
case SE_CurrentHPOnce:
|
||||||
|
case SE_CurseCounter:
|
||||||
|
case SE_ImprovedDamage:
|
||||||
|
case SE_ImprovedHeal:
|
||||||
|
case SE_SpellResistReduction:
|
||||||
|
case SE_IncreaseSpellHaste:
|
||||||
|
case SE_IncreaseSpellDuration:
|
||||||
|
case SE_IncreaseRange:
|
||||||
|
case SE_SpellHateMod:
|
||||||
|
case SE_ReduceReagentCost:
|
||||||
|
case SE_ReduceManaCost:
|
||||||
|
case SE_FcStunTimeMod:
|
||||||
|
case SE_LimitMaxLevel:
|
||||||
|
case SE_LimitResist:
|
||||||
|
case SE_LimitTarget:
|
||||||
|
case SE_LimitEffect:
|
||||||
|
case SE_LimitSpellType:
|
||||||
|
case SE_LimitSpell:
|
||||||
|
case SE_LimitMinDur:
|
||||||
|
case SE_LimitInstant:
|
||||||
|
case SE_LimitMinLevel:
|
||||||
|
case SE_LimitCastTimeMin:
|
||||||
|
case SE_LimitCastTimeMax:
|
||||||
|
case SE_StackingCommand_Block:
|
||||||
|
case SE_StackingCommand_Overwrite:
|
||||||
|
case SE_PetPowerIncrease:
|
||||||
|
case SE_SkillDamageAmount:
|
||||||
|
case SE_ChannelChanceSpells:
|
||||||
|
case SE_Blank:
|
||||||
|
case SE_FcDamageAmt:
|
||||||
|
case SE_SpellDurationIncByTic:
|
||||||
|
case SE_FcSpellVulnerability:
|
||||||
|
case SE_FcDamageAmtIncoming:
|
||||||
|
case SE_FcDamagePctCrit:
|
||||||
|
case SE_FcDamageAmtCrit:
|
||||||
|
case SE_ReduceReuseTimer:
|
||||||
|
case SE_LimitCombatSkills:
|
||||||
|
case SE_BlockNextSpellFocus:
|
||||||
|
case SE_SpellTrigger:
|
||||||
|
case SE_LimitManaMin:
|
||||||
|
case SE_CorruptionCounter:
|
||||||
|
case SE_ApplyEffect:
|
||||||
|
case SE_NegateSpellEffect:
|
||||||
|
case SE_LimitSpellGroup:
|
||||||
|
case SE_LimitManaMax:
|
||||||
|
case SE_FcHealAmt:
|
||||||
|
case SE_FcHealPctIncoming:
|
||||||
|
case SE_FcHealAmtIncoming:
|
||||||
|
case SE_FcHealPctCritIncoming:
|
||||||
|
case SE_FcHealAmtCrit:
|
||||||
|
case SE_LimitClass:
|
||||||
|
case SE_LimitRace:
|
||||||
|
case SE_FcBaseEffects:
|
||||||
|
case 415:
|
||||||
|
case SE_SkillDamageAmount2:
|
||||||
|
case SE_FcLimitUse:
|
||||||
|
case SE_FcIncreaseNumHits:
|
||||||
|
case SE_LimitUseMin:
|
||||||
|
case SE_LimitUseType:
|
||||||
|
case SE_GravityEffect:
|
||||||
|
case 425:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
uint32 GetNimbusEffect(uint16 spell_id)
|
uint32 GetNimbusEffect(uint16 spell_id)
|
||||||
{
|
{
|
||||||
if (IsValidSpell(spell_id))
|
if (IsValidSpell(spell_id))
|
||||||
|
|||||||
+242
-161
@@ -43,35 +43,93 @@
|
|||||||
|
|
||||||
const int Z_AGGRO=10;
|
const int Z_AGGRO=10;
|
||||||
|
|
||||||
const int MobAISpellRange=100; // max range of buffs
|
const uint32 MobAISpellRange=100; // max range of buffs
|
||||||
const int SpellType_Nuke=1;
|
|
||||||
const int SpellType_Heal=2;
|
|
||||||
const int SpellType_Root=4;
|
|
||||||
const int SpellType_Buff=8;
|
|
||||||
const int SpellType_Escape=16;
|
|
||||||
const int SpellType_Pet=32;
|
|
||||||
const int SpellType_Lifetap=64;
|
|
||||||
const int SpellType_Snare=128;
|
|
||||||
const int SpellType_DOT=256;
|
|
||||||
const int SpellType_Dispel=512;
|
|
||||||
const int SpellType_InCombatBuff=1024;
|
|
||||||
const int SpellType_Mez=2048;
|
|
||||||
const int SpellType_Charm=4096;
|
|
||||||
const int SpellType_Slow = 8192;
|
|
||||||
const int SpellType_Debuff = 16384;
|
|
||||||
const int SpellType_Cure = 32768;
|
|
||||||
const int SpellType_Resurrect = 65536;
|
|
||||||
|
|
||||||
const int SpellTypes_Detrimental = SpellType_Nuke|SpellType_Root|SpellType_Lifetap|SpellType_Snare|SpellType_DOT|SpellType_Dispel|SpellType_Mez|SpellType_Charm|SpellType_Debuff|SpellType_Slow;
|
enum SpellTypes : uint32
|
||||||
const int SpellTypes_Beneficial = SpellType_Heal|SpellType_Buff|SpellType_Escape|SpellType_Pet|SpellType_InCombatBuff|SpellType_Cure;
|
{
|
||||||
|
SpellType_Nuke = (1 << 0),
|
||||||
|
SpellType_Heal = (1 << 1),
|
||||||
|
SpellType_Root = (1 << 2),
|
||||||
|
SpellType_Buff = (1 << 3),
|
||||||
|
SpellType_Escape = (1 << 4),
|
||||||
|
SpellType_Pet = (1 << 5),
|
||||||
|
SpellType_Lifetap = (1 << 6),
|
||||||
|
SpellType_Snare = (1 << 7),
|
||||||
|
SpellType_DOT = (1 << 8),
|
||||||
|
SpellType_Dispel = (1 << 9),
|
||||||
|
SpellType_InCombatBuff = (1 << 10),
|
||||||
|
SpellType_Mez = (1 << 11),
|
||||||
|
SpellType_Charm = (1 << 12),
|
||||||
|
SpellType_Slow = (1 << 13),
|
||||||
|
SpellType_Debuff = (1 << 14),
|
||||||
|
SpellType_Cure = (1 << 15),
|
||||||
|
SpellType_Resurrect = (1 << 16),
|
||||||
|
SpellType_HateRedux = (1 << 17),
|
||||||
|
SpellType_InCombatBuffSong = (1 << 18), // bard in-combat group/ae buffs
|
||||||
|
SpellType_OutOfCombatBuffSong = (1 << 19), // bard out-of-combat group/ae buffs
|
||||||
|
SpellType_PreCombatBuff = (1 << 20),
|
||||||
|
SpellType_PreCombatBuffSong = (1 << 21),
|
||||||
|
|
||||||
#define SpellType_Any 0xFFFF
|
SpellTypes_Detrimental = (SpellType_Nuke | SpellType_Root | SpellType_Lifetap | SpellType_Snare | SpellType_DOT | SpellType_Dispel | SpellType_Mez | SpellType_Charm | SpellType_Debuff | SpellType_Slow),
|
||||||
|
SpellTypes_Beneficial = (SpellType_Heal | SpellType_Buff | SpellType_Escape | SpellType_Pet | SpellType_InCombatBuff | SpellType_Cure | SpellType_HateRedux | SpellType_InCombatBuffSong | SpellType_OutOfCombatBuffSong | SpellType_PreCombatBuff | SpellType_PreCombatBuffSong),
|
||||||
|
|
||||||
|
SpellType_Any = 0xFFFFFFFF
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// These should not be used to determine spell category..
|
||||||
|
// They are a graphical affects (effects?) index only
|
||||||
|
// TODO: import sai list
|
||||||
enum SpellAffectIndex {
|
enum SpellAffectIndex {
|
||||||
|
SAI_Summon_Mount_Unclass = -1,
|
||||||
|
SAI_Direct_Damage = 0,
|
||||||
|
SAI_Heal_Cure = 1,
|
||||||
|
SAI_AC_Buff = 2,
|
||||||
|
SAI_AE_Damage = 3,
|
||||||
|
SAI_Summon = 4, // Summoned Pets and Items
|
||||||
|
SAI_Sight = 5,
|
||||||
|
SAI_Mana_Regen_Resist_Song = 6,
|
||||||
|
SAI_Stat_Buff = 7,
|
||||||
|
SAI_Vanish = 9, // Invisibility and Gate/Port
|
||||||
|
SAI_Appearance = 10, // Illusion and Size
|
||||||
|
SAI_Enchanter_Pet = 11,
|
||||||
SAI_Calm = 12, // Lull and Alliance Spells
|
SAI_Calm = 12, // Lull and Alliance Spells
|
||||||
|
SAI_Fear = 13,
|
||||||
SAI_Dispell_Sight = 14, // Dispells and Spells like Bind Sight
|
SAI_Dispell_Sight = 14, // Dispells and Spells like Bind Sight
|
||||||
|
SAI_Stun = 15,
|
||||||
|
SAI_Haste_Runspeed = 16, // Haste and SoW
|
||||||
|
SAI_Combat_Slow = 17,
|
||||||
|
SAI_Damage_Shield = 18,
|
||||||
|
SAI_Cannibalize_Weapon_Proc = 19,
|
||||||
|
SAI_Weaken = 20,
|
||||||
|
SAI_Banish = 21,
|
||||||
|
SAI_Blind_Poison = 22,
|
||||||
|
SAI_Cold_DD = 23,
|
||||||
|
SAI_Poison_Disease_DD = 24,
|
||||||
|
SAI_Fire_DD = 25,
|
||||||
SAI_Memory_Blur = 27,
|
SAI_Memory_Blur = 27,
|
||||||
SAI_Calm_Song = 43 // Lull and Alliance Songs
|
SAI_Gravity_Fling = 28,
|
||||||
|
SAI_Suffocate = 29,
|
||||||
|
SAI_Lifetap_Over_Time = 30,
|
||||||
|
SAI_Fire_AE = 31,
|
||||||
|
SAI_Cold_AE = 33,
|
||||||
|
SAI_Poison_Disease_AE = 34,
|
||||||
|
SAI_Teleport = 40,
|
||||||
|
SAI_Direct_Damage_Song = 41,
|
||||||
|
SAI_Combat_Buff_Song = 42,
|
||||||
|
SAI_Calm_Song = 43, // Lull and Alliance Songs
|
||||||
|
SAI_Firework = 45,
|
||||||
|
SAI_Firework_AE = 46,
|
||||||
|
SAI_Weather_Rocket = 47,
|
||||||
|
SAI_Convert_Vitals = 50,
|
||||||
|
SAI_NPC_Special_60 = 60,
|
||||||
|
SAI_NPC_Special_61 = 61,
|
||||||
|
SAI_NPC_Special_62 = 62,
|
||||||
|
SAI_NPC_Special_63 = 63,
|
||||||
|
SAI_NPC_Special_70 = 70,
|
||||||
|
SAI_NPC_Special_71 = 71,
|
||||||
|
SAI_NPC_Special_80 = 80,
|
||||||
|
SAI_Trap_Lock = 88
|
||||||
};
|
};
|
||||||
enum RESISTTYPE
|
enum RESISTTYPE
|
||||||
{
|
{
|
||||||
@@ -100,23 +158,23 @@ typedef enum {
|
|||||||
/* 09 */ ST_Animal = 0x09,
|
/* 09 */ ST_Animal = 0x09,
|
||||||
/* 10 */ ST_Undead = 0x0a,
|
/* 10 */ ST_Undead = 0x0a,
|
||||||
/* 11 */ ST_Summoned = 0x0b,
|
/* 11 */ ST_Summoned = 0x0b,
|
||||||
/* 12 */ // NOT USED
|
/* 12 */ // NOT USED error is 218 (This spell only works on things that are flying.)
|
||||||
/* 13 */ ST_Tap = 0x0d,
|
/* 13 */ ST_Tap = 0x0d,
|
||||||
/* 14 */ ST_Pet = 0x0e,
|
/* 14 */ ST_Pet = 0x0e,
|
||||||
/* 15 */ ST_Corpse = 0x0f,
|
/* 15 */ ST_Corpse = 0x0f,
|
||||||
/* 16 */ ST_Plant = 0x10,
|
/* 16 */ ST_Plant = 0x10,
|
||||||
/* 17 */ ST_Giant = 0x11, //special giant
|
/* 17 */ ST_Giant = 0x11, //special giant
|
||||||
/* 18 */ ST_Dragon = 0x12, //special dragon
|
/* 18 */ ST_Dragon = 0x12, //special dragon
|
||||||
/* 19 */ // NOT USED
|
/* 19 */ // NOT USED error is 227 (This spell only works on specific coldain.)
|
||||||
/* 20 */ ST_TargetAETap = 0x14,
|
/* 20 */ ST_TargetAETap = 0x14,
|
||||||
/* 21 */ // NOT USED
|
/* 21 */ // NOT USED same switch case as ST_Undead
|
||||||
/* 22 */ // NOT USED
|
/* 22 */ // NOT USED same switch case as ST_Summoned
|
||||||
/* 23 */ // NOT USED
|
/* 23 */ // NOT USED same switch case as ST_Animal
|
||||||
/* 24 */ ST_UndeadAE = 0x18,
|
/* 24 */ ST_UndeadAE = 0x18,
|
||||||
/* 25 */ ST_SummonedAE = 0x19,
|
/* 25 */ ST_SummonedAE = 0x19,
|
||||||
/* 26 */ // NOT USED
|
/* 26 */ // NOT USED
|
||||||
/* 27 */ // NOT USED
|
/* 27 */ // NOT USED error is 223 (This spell only works on insects.)
|
||||||
/* 28 */ // NOT USED
|
/* 28 */ // NOT USED error is 223 (This spell only works on insects.)
|
||||||
/* 29 */ // NOT USED
|
/* 29 */ // NOT USED
|
||||||
/* 30 */ // NOT USED
|
/* 30 */ // NOT USED
|
||||||
/* 31 */ // NOT USED
|
/* 31 */ // NOT USED
|
||||||
@@ -446,7 +504,7 @@ typedef enum {
|
|||||||
#define SE_IncreaseRunSpeedCap 290 // implemented[AA] - increases run speed over the hard cap
|
#define SE_IncreaseRunSpeedCap 290 // implemented[AA] - increases run speed over the hard cap
|
||||||
#define SE_Purify 291 // implemented - Removes determental effects
|
#define SE_Purify 291 // implemented - Removes determental effects
|
||||||
#define SE_StrikeThrough2 292 // implemented[AA] - increasing chance of bypassing an opponent's special defenses, such as dodge, block, parry, and riposte.
|
#define SE_StrikeThrough2 292 // implemented[AA] - increasing chance of bypassing an opponent's special defenses, such as dodge, block, parry, and riposte.
|
||||||
#define SE_FrontalStunResist 293 // implemented[AA] - Reduce chance to be stunned from front.
|
#define SE_FrontalStunResist 293 // implemented[AA] - Reduce chance to be stunned from front. -- live descriptions sounds like this isn't limited to frontal anymore
|
||||||
#define SE_CriticalSpellChance 294 // implemented - increase chance to critical hit and critical damage modifier.
|
#define SE_CriticalSpellChance 294 // implemented - increase chance to critical hit and critical damage modifier.
|
||||||
//#define SE_ReduceTimerSpecial 295 // not used
|
//#define SE_ReduceTimerSpecial 295 // not used
|
||||||
#define SE_FcSpellVulnerability 296 // implemented - increase in incoming spell damage
|
#define SE_FcSpellVulnerability 296 // implemented - increase in incoming spell damage
|
||||||
@@ -485,7 +543,7 @@ typedef enum {
|
|||||||
#define SE_ManaAbsorbPercentDamage 329 // implemented
|
#define SE_ManaAbsorbPercentDamage 329 // implemented
|
||||||
#define SE_CriticalDamageMob 330 // implemented
|
#define SE_CriticalDamageMob 330 // implemented
|
||||||
#define SE_Salvage 331 // implemented - chance to recover items that would be destroyed in failed tradeskill combine
|
#define SE_Salvage 331 // implemented - chance to recover items that would be destroyed in failed tradeskill combine
|
||||||
//#define SE_SummonToCorpse 332 // *not implemented AA - Call of the Wild (Druid/Shaman Res spell with no exp)
|
#define SE_SummonToCorpse 332 // *not implemented AA - Call of the Wild (Druid/Shaman Res spell with no exp)
|
||||||
#define SE_CastOnRuneFadeEffect 333 // implemented
|
#define SE_CastOnRuneFadeEffect 333 // implemented
|
||||||
#define SE_BardAEDot 334 // implemented
|
#define SE_BardAEDot 334 // implemented
|
||||||
#define SE_BlockNextSpellFocus 335 // implemented - base1 chance to block next spell ie Puratus (8494)
|
#define SE_BlockNextSpellFocus 335 // implemented - base1 chance to block next spell ie Puratus (8494)
|
||||||
@@ -502,7 +560,7 @@ typedef enum {
|
|||||||
#define SE_HeadShotLevel 346 // implemented[AA] - HeadShot max level to kill
|
#define SE_HeadShotLevel 346 // implemented[AA] - HeadShot max level to kill
|
||||||
#define SE_DoubleRangedAttack 347 // implemented - chance at an additional archery attack (consumes arrow)
|
#define SE_DoubleRangedAttack 347 // implemented - chance at an additional archery attack (consumes arrow)
|
||||||
#define SE_LimitManaMin 348 // implemented
|
#define SE_LimitManaMin 348 // implemented
|
||||||
#define SE_ShieldEquipHateMod 349 // implemented[AA] Increase melee hate when wearing a shield.
|
#define SE_ShieldEquipDmgMod 349 // implemented[AA] Increase melee base damage (indirectly increasing hate) when wearing a shield.
|
||||||
#define SE_ManaBurn 350 // implemented - Drains mana for damage/heal at a defined ratio up to a defined maximum amount of mana.
|
#define SE_ManaBurn 350 // implemented - Drains mana for damage/heal at a defined ratio up to a defined maximum amount of mana.
|
||||||
//#define SE_PersistentEffect 351 // *not implemented. creates a trap/totem that casts a spell (spell id + base1?) when anything comes near it. can probably make a beacon for this
|
//#define SE_PersistentEffect 351 // *not implemented. creates a trap/totem that casts a spell (spell id + base1?) when anything comes near it. can probably make a beacon for this
|
||||||
//#define SE_IncreaseTrapCount 352 // *not implemented - looks to be some type of invulnerability? Test ITC (8755)
|
//#define SE_IncreaseTrapCount 352 // *not implemented - looks to be some type of invulnerability? Test ITC (8755)
|
||||||
@@ -519,7 +577,7 @@ typedef enum {
|
|||||||
#define SE_BandolierSlots 363 // *not implemented[AA] 'Battle Ready' expands the bandolier by one additional save slot per rank.
|
#define SE_BandolierSlots 363 // *not implemented[AA] 'Battle Ready' expands the bandolier by one additional save slot per rank.
|
||||||
#define SE_TripleAttackChance 364 // implemented
|
#define SE_TripleAttackChance 364 // implemented
|
||||||
#define SE_ProcOnSpellKillShot 365 // implemented - chance to trigger a spell on kill when the kill is caused by a specific spell with this effect in it (10470 Venin)
|
#define SE_ProcOnSpellKillShot 365 // implemented - chance to trigger a spell on kill when the kill is caused by a specific spell with this effect in it (10470 Venin)
|
||||||
#define SE_ShieldEquipDmgMod 366 // implemented[AA] Damage modifier to melee if shield equiped. (base1 = dmg mod , base2 = ?) ie Shield Specialist AA
|
#define SE_GroupShielding 366 // *not implemented[AA] This gives you /shieldgroup
|
||||||
#define SE_SetBodyType 367 // implemented - set body type of base1 so it can be affected by spells that are limited to that type (Plant, Animal, Undead, etc)
|
#define SE_SetBodyType 367 // implemented - set body type of base1 so it can be affected by spells that are limited to that type (Plant, Animal, Undead, etc)
|
||||||
//#define SE_FactionMod 368 // *not implemented - increases faction with base1 (faction id, live won't match up w/ ours) by base2
|
//#define SE_FactionMod 368 // *not implemented - increases faction with base1 (faction id, live won't match up w/ ours) by base2
|
||||||
#define SE_CorruptionCounter 369 // implemented
|
#define SE_CorruptionCounter 369 // implemented
|
||||||
@@ -643,139 +701,159 @@ typedef enum {
|
|||||||
|
|
||||||
struct SPDat_Spell_Struct
|
struct SPDat_Spell_Struct
|
||||||
{
|
{
|
||||||
/* 000 */ int id; // not used
|
/* 000 */ int id; // not used -- SPELLINDEX
|
||||||
/* 001 */ char name[64]; // Name of the spell
|
/* 001 */ char name[64]; // Name of the spell -- SPELLNAME
|
||||||
/* 002 */ char player_1[32]; // "PLAYER_1"
|
/* 002 */ char player_1[32]; // "PLAYER_1" -- ACTORTAG
|
||||||
/* 003 */ char teleport_zone[64]; // Teleport zone, pet name summoned, or item summoned
|
/* 003 */ char teleport_zone[64]; // Teleport zone, pet name summoned, or item summoned -- NPC_FILENAME
|
||||||
/* 004 */ char you_cast[64]; // Message when you cast
|
/* 004 */ char you_cast[64]; // Message when you cast -- CASTERMETXT
|
||||||
/* 005 */ char other_casts[64]; // Message when other casts
|
/* 005 */ char other_casts[64]; // Message when other casts -- CASTEROTHERTXT
|
||||||
/* 006 */ char cast_on_you[64]; // Message when spell is cast on you
|
/* 006 */ char cast_on_you[64]; // Message when spell is cast on you -- CASTEDMETXT
|
||||||
/* 007 */ char cast_on_other[64]; // Message when spell is cast on someone else
|
/* 007 */ char cast_on_other[64]; // Message when spell is cast on someone else -- CASTEDOTHERTXT
|
||||||
/* 008 */ char spell_fades[64]; // Spell fades
|
/* 008 */ char spell_fades[64]; // Spell fades -- SPELLGONE
|
||||||
/* 009 */ float range;
|
/* 009 */ float range; // -- RANGE
|
||||||
/* 010 */ float aoerange;
|
/* 010 */ float aoerange; // -- IMPACTRANGE
|
||||||
/* 011 */ float pushback;
|
/* 011 */ float pushback; // -- OUTFORCE
|
||||||
/* 012 */ float pushup;
|
/* 012 */ float pushup; // -- UPFORCE
|
||||||
/* 013 */ uint32 cast_time; // Cast time
|
/* 013 */ uint32 cast_time; // Cast time -- CASTINGTIME
|
||||||
/* 014 */ uint32 recovery_time; // Recovery time
|
/* 014 */ uint32 recovery_time; // Recovery time -- RECOVERYDELAY
|
||||||
/* 015 */ uint32 recast_time; // Recast same spell time
|
/* 015 */ uint32 recast_time; // Recast same spell time -- SPELLDELAY
|
||||||
/* 016 */ uint32 buffdurationformula;
|
/* 016 */ uint32 buffdurationformula; // -- DURATIONBASE
|
||||||
/* 017 */ uint32 buffduration;
|
/* 017 */ uint32 buffduration; // -- DURATIONCAP
|
||||||
/* 018 */ uint32 AEDuration; // sentinel, rain of something
|
/* 018 */ uint32 AEDuration; // sentinel, rain of something -- IMPACTDURATION
|
||||||
/* 019 */ uint16 mana; // Mana Used
|
/* 019 */ uint16 mana; // Mana Used -- MANACOST
|
||||||
/* 020 */ int base[EFFECT_COUNT]; //various purposes
|
/* 020 */ int base[EFFECT_COUNT]; //various purposes -- BASEAFFECT1 .. BASEAFFECT12
|
||||||
/* 032 */ int base2[EFFECT_COUNT]; //various purposes
|
/* 032 */ int base2[EFFECT_COUNT]; //various purposes -- BASE_EFFECT2_1 ... BASE_EFFECT2_12
|
||||||
/* 044 */ int32 max[EFFECT_COUNT];
|
/* 044 */ int32 max[EFFECT_COUNT]; // -- AFFECT1CAP ... AFFECT12CAP
|
||||||
/* 056 */ //uint16 icon; // Spell icon
|
/* 056 */ //uint16 icon; // Spell icon -- IMAGENUMBER
|
||||||
/* 057 */ //uint16 memicon; // Icon on membarthing
|
/* 057 */ //uint16 memicon; // Icon on membarthing -- MEMIMAGENUMBER
|
||||||
/* 058 */ int32 components[4]; // reagents
|
/* 058 */ int32 components[4]; // reagents -- EXPENDREAGENT1 ... EXPENDREAGENT4
|
||||||
/* 062 */ int component_counts[4]; // amount of regents used
|
/* 062 */ int component_counts[4]; // amount of regents used -- EXPENDQTY1 ... EXPENDQTY4
|
||||||
/* 066 */ int NoexpendReagent[4]; // focus items (Need but not used; Flame Lick has a Fire Beetle Eye focus.)
|
/* 066 */ int NoexpendReagent[4]; // focus items (Need but not used; Flame Lick has a Fire Beetle Eye focus.)
|
||||||
// If it is a number between 1-4 it means components[number] is a focus and not to expend it
|
// If it is a number between 1-4 it means components[number] is a focus and not to expend it
|
||||||
// If it is a valid itemid it means this item is a focus as well
|
// If it is a valid itemid it means this item is a focus as well
|
||||||
/* 070 */ uint16 formula[EFFECT_COUNT]; // Spell's value formula
|
// -- NOEXPENDREAGENT1 ... NOEXPENDREAGENT4
|
||||||
/* 082 */ //int LightType; // probaly another effecttype flag
|
/* 070 */ uint16 formula[EFFECT_COUNT]; // Spell's value formula -- LEVELAFFECT1MOD ... LEVELAFFECT12MOD
|
||||||
/* 083 */ int8 goodEffect; //0=detrimental, 1=Beneficial, 2=Beneficial, Group Only
|
/* 082 */ //int LightType; // probaly another effecttype flag -- LIGHTTYPE
|
||||||
/* 084 */ int Activated; // probably another effecttype flag
|
/* 083 */ int8 goodEffect; //0=detrimental, 1=Beneficial, 2=Beneficial, Group Only -- BENEFICIAL
|
||||||
/* 085 */ int resisttype;
|
/* 084 */ int Activated; // probably another effecttype flag -- ACTIVATED
|
||||||
/* 086 */ int effectid[EFFECT_COUNT]; // Spell's effects
|
/* 085 */ int resisttype; // -- RESISTTYPE
|
||||||
/* 098 */ SpellTargetType targettype; // Spell's Target
|
/* 086 */ int effectid[EFFECT_COUNT]; // Spell's effects -- SPELLAFFECT1 ... SPELLAFFECT12
|
||||||
/* 099 */ int basediff; // base difficulty fizzle adjustment
|
/* 098 */ SpellTargetType targettype; // Spell's Target -- TYPENUMBER
|
||||||
/* 100 */ EQEmu::skills::SkillType skill;
|
/* 099 */ int basediff; // base difficulty fizzle adjustment -- BASEDIFFICULTY
|
||||||
/* 101 */ int8 zonetype; // 01=Outdoors, 02=dungeons, ff=Any
|
/* 100 */ EQEmu::skills::SkillType skill; // -- CASTINGSKILL
|
||||||
/* 102 */ int8 EnvironmentType;
|
/* 101 */ int8 zonetype; // 01=Outdoors, 02=dungeons, ff=Any -- ZONETYPE
|
||||||
/* 103 */ int8 TimeOfDay;
|
/* 102 */ int8 EnvironmentType; // -- ENVIRONMENTTYPE
|
||||||
/* 104 */ uint8 classes[PLAYER_CLASS_COUNT]; // Classes, and their min levels
|
/* 103 */ int8 TimeOfDay; // -- TIMEOFDAY
|
||||||
/* 120 */ uint8 CastingAnim;
|
/* 104 */ uint8 classes[PLAYER_CLASS_COUNT]; // Classes, and their min levels -- WARRIORMIN ... BERSERKERMIN
|
||||||
/* 121 */ //uint8 TargetAnim;
|
/* 120 */ uint8 CastingAnim; // -- CASTINGANIM
|
||||||
/* 122 */ //uint32 TravelType;
|
/* 121 */ //uint8 TargetAnim; // -- TARGETANIM
|
||||||
/* 123 */ uint16 SpellAffectIndex;
|
/* 122 */ //uint32 TravelType; // -- TRAVELTYPE
|
||||||
/* 124 */ int8 disallow_sit; // 124: high-end Yaulp spells (V, VI, VII, VIII [Rk 1, 2, & 3], & Gallenite's Bark of Fury
|
/* 123 */ uint16 SpellAffectIndex; // -- SPELLAFFECTINDEX
|
||||||
/* 125 */ int8 diety_agnostic;// 125: Words of the Skeptic
|
/* 124 */ int8 disallow_sit; // 124: high-end Yaulp spells (V, VI, VII, VIII [Rk 1, 2, & 3], & Gallenite's Bark of Fury -- CANCELONSIT
|
||||||
|
/* 125 */ int8 diety_agnostic;// 125: Words of the Skeptic -- DIETY_AGNOSTIC
|
||||||
/* 126 */ int8 deities[16]; // Deity check. 201 - 216 per http://www.eqemulator.net/wiki/wikka.php?wakka=DeityList
|
/* 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
|
// -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
|
// the client actually stores deities in a single int32_t
|
||||||
// 143: always set to 0
|
// -- DIETY_BERTOXXULOUS ... DIETY_VEESHAN
|
||||||
/* 144 */ //int16 new_icon // Spell icon used by the client in uifiles/default/spells??.tga, both for spell gems & buff window. Looks to depreciate icon & memicon
|
/* 142 */ //int8 npc_no_cast; // 142: between 0 & 100 -- NPC_NO_CAST
|
||||||
/* 145 */ //int16 spellanim; // Doesn't look like it's the same as #doanim, so not sure what this is
|
/* 143 */ //int ai_pt_bonus; // 143: always set to 0, client doesn't save this -- AI_PT_BONUS
|
||||||
/* 146 */ int8 uninterruptable; // Looks like anything != 0 is uninterruptable. Values are mostly -1, 0, & 1 (Fetid Breath = 90?)
|
/* 144 */ //int16 new_icon // Spell icon used by the client in uifiles/default/spells??.tga, both for spell gems & buff window. Looks to depreciate icon & memicon -- NEW_ICON
|
||||||
/* 147 */ int16 ResistDiff;
|
/* 145 */ //int16 spellanim; // Doesn't look like it's the same as #doanim, so not sure what this is, particles I think -- SPELL_EFFECT_INDEX
|
||||||
/* 148 */ int8 dot_stacking_exempt; // If 1 doesn't stack with self cast by others. If -1 (not implemented) doesn't stack with same effect (???)
|
/* 146 */ bool uninterruptable; // Looks like anything != 0 is uninterruptable. Values are mostly -1, 0, & 1 (Fetid Breath = 90?) -- NO_INTERRUPT
|
||||||
/* 149 */ //int deletable;
|
/* 147 */ int16 ResistDiff; // -- RESIST_MOD
|
||||||
/* 150 */ uint16 RecourseLink;
|
/* 148 */ bool dot_stacking_exempt; // -- NOT_STACKABLE_DOT
|
||||||
/* 151 */ bool no_partial_resist; // 151: -1, 0, or 1
|
/* 149 */ //int deletable; // -- DELETE_OK
|
||||||
// 152 & 153: all set to 0
|
/* 150 */ uint16 RecourseLink; // -- REFLECT_SPELLINDEX
|
||||||
/* 154 */ int8 short_buff_box; // != 0, goes to short buff box.
|
/* 151 */ bool no_partial_resist; // 151: -1, 0, or 1 -- NO_PARTIAL_SAVE
|
||||||
/* 155 */ int descnum; // eqstr of description of spell
|
/* 152 */ //bool small_targets_only; // -- SMALL_TARGETS_ONLY
|
||||||
/* 156 */ int typedescnum; // eqstr of type description
|
/* 153 */ //bool uses_persistent_particles; // -- USES_PERSISTENT_PARTICLES
|
||||||
/* 157 */ int effectdescnum; // eqstr of effect description
|
/* 154 */ int8 short_buff_box; // != 0, goes to short buff box. -- BARD_BUFF_BOX
|
||||||
/* 158 */ //Category Desc ID 3
|
/* 155 */ int descnum; // eqstr of description of spell -- DESCRIPTION_INDEX
|
||||||
/* 159 */ bool npc_no_los;
|
/* 156 */ int typedescnum; // eqstr of type description -- PRIMARY_CATEGORY
|
||||||
/* 161 */ bool reflectable;
|
/* 157 */ int effectdescnum; // eqstr of effect description -- SECONDARY_CATEGORY_1
|
||||||
/* 162 */ int bonushate;
|
/* 158 */ //int secondary_category_2; //Category Desc ID 3 -- SECONDARY_CATEGORY_2
|
||||||
/* 163 */
|
/* 159 */ bool npc_no_los; // -- NO_NPC_LOS
|
||||||
/* 164 */ // for most spells this appears to mimic ResistDiff
|
/* 160 */ //bool feedbackable; // -- FEEDBACKABLE
|
||||||
/* 165 */ bool ldon_trap; //Flag found on all LDON trap / chest related spells.
|
/* 161 */ bool reflectable; // -- REFLECTABLE
|
||||||
/* 166 */ int EndurCost;
|
/* 162 */ int bonushate; // -- HATE_MOD
|
||||||
/* 167 */ int8 EndurTimerIndex;
|
/* 163 */ //int resist_per_level; // -- RESIST_PER_LEVEL
|
||||||
/* 168 */ bool IsDisciplineBuff; //Will goto the combat window when cast
|
/* 164 */ //int resist_cap; // for most spells this appears to mimic ResistDiff -- RESIST_CAP
|
||||||
/* 169 - 172*/ //These are zero for ALL spells
|
/* 165 */ bool ldon_trap; //Flag found on all LDON trap / chest related spells. -- AFFECT_INANIMATE
|
||||||
/* 173 */ int HateAdded;
|
/* 166 */ int EndurCost; // -- STAMINA_COST
|
||||||
/* 174 */ int EndurUpkeep;
|
/* 167 */ int8 EndurTimerIndex; // bad name, used for all spells -- TIMER_INDEX
|
||||||
/* 175 */ int numhitstype; // defines which type of behavior will tick down the numhit counter.
|
/* 168 */ bool IsDisciplineBuff; //Will goto the combat window when cast -- IS_SKILL
|
||||||
/* 176 */ int numhits;
|
/* 169 - 172*/ //These are zero for ALL spells, also removed from live -- ATTACK_OPENING, DEFENSE_OPENING, SKILL_OPENING, NPC_ERROR_OPENING
|
||||||
/* 177 */ int pvpresistbase;
|
/* 173 */ int HateAdded; // -- SPELL_HATE_GIVEN
|
||||||
/* 178 */ int pvpresistcalc;
|
/* 174 */ int EndurUpkeep; // -- ENDUR_UPKEEP
|
||||||
/* 179 */ int pvpresistcap;
|
/* 175 */ int numhitstype; // defines which type of behavior will tick down the numhit counter. -- LIMITED_USE_TYPE
|
||||||
/* 180 */ int spell_category;
|
/* 176 */ int numhits; // -- LIMITED_USE_COUNT
|
||||||
/* 181 */ //unknown - likely buff duration related
|
/* 177 */ int pvpresistbase; // -- PVP_RESIST_MOD
|
||||||
/* 182 */ //unknown - likely buff duration related
|
/* 178 */ int pvpresistcalc; // -- PVP_RESIST_PER_LEVEL
|
||||||
/* 183 */
|
/* 179 */ int pvpresistcap; // -- PVP_RESIST_CAP
|
||||||
/* 184 */
|
/* 180 */ int spell_category; // -- GLOBAL_GROUP
|
||||||
/* 185 */ int8 can_mgb; // 0=no, -1 or 1 = yes
|
/* 181 */ //int pvp_duration; // buffdurationformula for PvP -- PVP_DURATION
|
||||||
/* 186 */ int dispel_flag;
|
/* 182 */ //int pvp_duration_cap; // buffduration for PvP -- PVP_DURATION_CAP
|
||||||
/* 187 */ //int npc_category;
|
/* 183 */ int pcnpc_only_flag; // valid values are 0, 1 = PCs (and mercs), and 2 = NPCs (and not mercs) -- PCNPC_ONLY_FLAG
|
||||||
/* 188 */ //int npc_usefulness;
|
/* 184 */ bool cast_not_standing; // this is checked in the client's EQ_Spell::IsCastWhileInvisSpell, this also blocks SE_InterruptCasting from affecting this spell -- CAST_NOT_STANDING
|
||||||
/* 189 */ int MinResist;
|
/* 185 */ bool can_mgb; // 0=no, -1 or 1 = yes -- CAN_MGB
|
||||||
/* 190 */ int MaxResist;
|
/* 186 */ int dispel_flag; // -- NO_DISPELL
|
||||||
/* 191 */ uint8 viral_targets;
|
/* 187 */ //int npc_category; // -- NPC_MEM_CATEGORY
|
||||||
/* 192 */ uint8 viral_timer;
|
/* 188 */ //int npc_usefulness; // -- NPC_USEFULNESS
|
||||||
/* 193 */ int NimbusEffect;
|
/* 189 */ int MinResist; // -- MIN_RESIST
|
||||||
/* 194 */ float directional_start; //Cone Start Angle:
|
/* 190 */ int MaxResist; // -- MAX_RESIST
|
||||||
/* 195 */ float directional_end; // Cone End Angle:
|
/* 191 */ uint8 viral_targets; // -- MIN_SPREAD_TIME
|
||||||
/* 196 */ bool sneak; // effect can only be used if sneaking (rogue 'Daggerfall' ect)
|
/* 192 */ uint8 viral_timer; // -- MAX_SPREAD_TIME
|
||||||
/* 197 */ bool not_focusable; //prevents focus effects from being applied to spell
|
/* 193 */ int NimbusEffect; // -- DURATION_PARTICLE_EFFECT
|
||||||
/* 198 */ bool no_detrimental_spell_aggro;
|
/* 194 */ float directional_start; //Cone Start Angle: -- CONE_START_ANGLE
|
||||||
/* 199 */
|
/* 195 */ float directional_end; // Cone End Angle: -- CONE_END_ANGLE
|
||||||
/* 200 */ bool suspendable; // buff is suspended in suspended buff zones
|
/* 196 */ bool sneak; // effect can only be used if sneaking (rogue 'Daggerfall' ect) -- SNEAK_ATTACK
|
||||||
/* 201 */ int viral_range;
|
/* 197 */ bool not_focusable; //prevents focus effects from being applied to spell -- NOT_FOCUSABLE
|
||||||
/* 202 */ int songcap; // individual song cap
|
/* 198 */ bool no_detrimental_spell_aggro; // -- NO_DETRIMENTAL_SPELL_AGGRO
|
||||||
/* 203 */
|
/* 199 */ //bool show_wear_off_message; // -- SHOW_WEAR_OFF_MESSAGE
|
||||||
/* 204 */
|
/* 200 */ bool suspendable; // buff is suspended in suspended buff zones -- IS_COUNTDOWN_HELD
|
||||||
/* 205 */ bool no_block;
|
/* 201 */ int viral_range; // -- SPREAD_RADIUS
|
||||||
/* 206 */
|
/* 202 */ int songcap; // individual song cap -- BASE_EFFECTS_FOCUS_CAP
|
||||||
/* 207 */ int spellgroup;
|
/* 203 */ //bool stacks_with_self; // -- STACKS_WITH_SELF
|
||||||
/* 208 */ int rank; //increments AA effects with same name
|
/* 204 */ //int not_shown_to_player; // client skips this -- NOT_SHOWN_TO_PLAYER
|
||||||
/* 209 */ int no_resist; //makes spells unresistable, which makes charms unbreakable as well.
|
/* 205 */ bool no_block; // -- NO_BUFF_BLOCK
|
||||||
/* 210 */ // bool DurationFrozen; ???
|
/* 206 */ //int8 anim_variation; // -- ANIM_VARIATION
|
||||||
/* 211 */ int CastRestriction; //Various restriction categories for spells most seem targetable race related but have also seen others for instance only castable if target hp 20% or lower or only if target out of combat
|
/* 207 */ int spellgroup; // -- SPELL_GROUP
|
||||||
/* 212 */ bool AllowRest;
|
/* 208 */ int rank; //increments AA effects with same name -- SPELL_GROUP_RANK
|
||||||
/* 213 */ bool InCombat; //Allow spell if target is in combat
|
/* 209 */ int no_resist; //makes spells unresistable, which makes charms unbreakable as well. -- NO_RESIST
|
||||||
/* 214 */ bool OutofCombat; //Allow spell if target is out of combat
|
/* 210 */ // bool allow_spellscribe; // -- ALLOW_SPELLSCRIBE
|
||||||
/* 215 - 216 */
|
/* 211 */ int CastRestriction; //Various restriction categories for spells most seem targetable race related but have also seen others for instance only castable if target hp 20% or lower or only if target out of combat -- SPELL_REQ_ASSOCIATION_ID
|
||||||
/* 217 */ int override_crit_chance; //Places a cap on the max chance to critical
|
/* 212 */ bool AllowRest; // -- BYPASS_REGEN_CHECK
|
||||||
/* 218 */ int aemaxtargets; //Is used for various AE effects
|
/* 213 */ bool InCombat; //Allow spell if target is in combat -- CAN_CAST_IN_COMBAT
|
||||||
/* 219 */ int no_heal_damage_item_mod;
|
/* 214 */ bool OutofCombat; //Allow spell if target is out of combat -- CAN_CAST_OUT_OF_COMBAT
|
||||||
/* 220 - 223 */
|
/* 215 */ //bool show_dot_message; // -- SHOW_DOT_MESSAGE
|
||||||
/* 224 */ bool persistdeath; // buff doesn't get stripped on death
|
/* 216 */ //bool invalid; // -- INVALID
|
||||||
/* 225 - 226 */
|
/* 217 */ int override_crit_chance; //Places a cap on the max chance to critical -- OVERRIDE_CRIT_CHANCE
|
||||||
/* 227 */ float min_dist; //spell power modified by distance from caster (Min Distance)
|
/* 218 */ int aemaxtargets; //Is used for various AE effects -- MAX_TARGETS
|
||||||
/* 228 */ float min_dist_mod; //spell power modified by distance from caster (Modifier at Min Distance)
|
/* 219 */ int no_heal_damage_item_mod; // -- NO_HEAL_DAMAGE_ITEM_MOD
|
||||||
/* 229 */ float max_dist; //spell power modified by distance from caster (Max Distance)
|
/* 220 */ //int caster_requirement_id; // -- CASTER_REQUIREMENT_ID
|
||||||
/* 230 */ float max_dist_mod; //spell power modified by distance from caster (Modifier at Max Distance)
|
/* 221 */ //int spell_class; // -- SPELL_CLASS
|
||||||
/* 231 */ float min_range; //Min casting range
|
/* 222 */ //int spell_subclass; // -- SPELL_SUBCLASS
|
||||||
/* 232 */ bool no_remove; //prevents buff from being removed by click
|
/* 223 */ //int ai_valid_targets; // -- AI_VALID_TARGETS
|
||||||
/* 233 - 236 */
|
/* 224 */ bool persistdeath; // buff doesn't get stripped on death -- NO_STRIP_ON_DEATH
|
||||||
|
/* 225 */ //float base_effects_focus_slope; // -- BASE_EFFECTS_FOCUS_SLOPE
|
||||||
|
/* 226 */ //float base_effects_focus_offset; // -- BASE_EFFECTS_FOCUS_OFFSET
|
||||||
|
/* 227 */ float min_dist; //spell power modified by distance from caster (Min Distance) -- DISTANCE_MOD_CLOSE_DIST
|
||||||
|
/* 228 */ float min_dist_mod; //spell power modified by distance from caster (Modifier at Min Distance) -- DISTANCE_MOD_CLOSE_MULT
|
||||||
|
/* 229 */ float max_dist; //spell power modified by distance from caster (Max Distance) -- DISTANCE_MOD_FAR_DIST
|
||||||
|
/* 230 */ float max_dist_mod; //spell power modified by distance from caster (Modifier at Max Distance) -- DISTANCE_MOD_FAR_MULT
|
||||||
|
/* The client also does this
|
||||||
|
* v26 = *(float *)&v4->DistanceModFarDist - *(float *)&v4->DistanceModCloseDist;
|
||||||
|
* if ( v26 > -0.00000011920929 && v26 < 0.00000011920929 )
|
||||||
|
* v26 = 1.0;
|
||||||
|
* v27 = (st7_0 - *(float *)&v4->DistanceModCloseMult) / v26;
|
||||||
|
* *(float *)&v4->DistanceMod = v27;
|
||||||
|
*/
|
||||||
|
/* 231 */ float min_range; //Min casting range -- MIN_RANGE
|
||||||
|
/* 232 */ bool no_remove; //prevents buff from being removed by click -- NO_REMOVE
|
||||||
|
/* 233 */ //int spell_recourse_type; // -- SPELL_RECOURSE_TYPE
|
||||||
|
/* 234 */ //bool only_during_fast_regen; // -- ONLY_DURING_FAST_REGEN
|
||||||
|
/* 235 */ //bool is_beta_only; // -- IS_BETA_ONLY
|
||||||
|
/* 236 */ //int spell_subgroup; // -- SPELL_SUBGROUP
|
||||||
uint8 DamageShieldType; // This field does not exist in spells_us.txt
|
uint8 DamageShieldType; // This field does not exist in spells_us.txt
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -882,6 +960,9 @@ uint32 GetPartialMagicRuneReduction(uint32 spell_id);
|
|||||||
uint32 GetPartialMeleeRuneAmount(uint32 spell_id);
|
uint32 GetPartialMeleeRuneAmount(uint32 spell_id);
|
||||||
uint32 GetPartialMagicRuneAmount(uint32 spell_id);
|
uint32 GetPartialMagicRuneAmount(uint32 spell_id);
|
||||||
bool NoDetrimentalSpellAggro(uint16 spell_id);
|
bool NoDetrimentalSpellAggro(uint16 spell_id);
|
||||||
|
bool IsStackableDot(uint16 spell_id);
|
||||||
|
bool IsCastWhileInvis(uint16 spell_id);
|
||||||
|
bool IsEffectIgnoredInStacking(int spa);
|
||||||
|
|
||||||
int CalcPetHp(int levelb, int classb, int STA = 75);
|
int CalcPetHp(int levelb, int classb, int STA = 75);
|
||||||
const char *GetRandPetName();
|
const char *GetRandPetName();
|
||||||
|
|||||||
@@ -415,46 +415,3 @@ void find_replace(std::string& string_subject, const std::string& search_string,
|
|||||||
index = string_subject.find_first_of(search_string);
|
index = string_subject.find_first_of(search_string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
|
|
||||||
Copyright (C) 2001-2016 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
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
void EQEmu::OutBuffer::overwrite(OutBuffer::pos_type position, const char *_Str, std::streamsize _Count)
|
|
||||||
{
|
|
||||||
auto last_pos = tellp();
|
|
||||||
seekp(position);
|
|
||||||
write(_Str, _Count);
|
|
||||||
seekp(last_pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
uchar* EQEmu::OutBuffer::detach()
|
|
||||||
{
|
|
||||||
size_t buffer_size = tellp();
|
|
||||||
if (buffer_size == 0)
|
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
auto out_buffer = new uchar[buffer_size];
|
|
||||||
memcpy(out_buffer, str().c_str(), buffer_size);
|
|
||||||
flush();
|
|
||||||
|
|
||||||
return out_buffer;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -53,36 +53,4 @@ void MakeLowerString(const char *source, char *target);
|
|||||||
void RemoveApostrophes(std::string &s);
|
void RemoveApostrophes(std::string &s);
|
||||||
void find_replace(std::string& string_subject, const std::string& search_string, const std::string& replace_string);
|
void find_replace(std::string& string_subject, const std::string& search_string, const std::string& replace_string);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
|
|
||||||
Copyright (C) 2001-2016 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
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
namespace EQEmu
|
|
||||||
{
|
|
||||||
class OutBuffer : public std::stringstream {
|
|
||||||
public:
|
|
||||||
inline size_t size() { return tellp(); }
|
|
||||||
void overwrite(OutBuffer::pos_type position, const char *_Str, std::streamsize _Count);
|
|
||||||
uchar* detach();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
class EQApplicationPacket;
|
class EQApplicationPacket;
|
||||||
class EQStream;
|
class EQStream;
|
||||||
#include "emu_opcodes.h"
|
#include "emu_opcodes.h"
|
||||||
#include "client_version.h" // inv2 watch
|
#include "emu_versions.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "textures.h"
|
||||||
@@ -0,0 +1,139 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 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_TEXTURES_H
|
||||||
|
#define COMMON_TEXTURES_H
|
||||||
|
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace EQEmu
|
||||||
|
{
|
||||||
|
namespace textures {
|
||||||
|
enum : int8 { textureInvalid = -1, textureBegin };
|
||||||
|
|
||||||
|
enum TextureSlot : int8 {
|
||||||
|
armorHead = textureBegin,
|
||||||
|
armorChest,
|
||||||
|
armorArms,
|
||||||
|
armorWrist,
|
||||||
|
armorHands,
|
||||||
|
armorLegs,
|
||||||
|
armorFeet,
|
||||||
|
weaponPrimary,
|
||||||
|
weaponSecondary,
|
||||||
|
materialCount,
|
||||||
|
materialInvalid = textureInvalid
|
||||||
|
};
|
||||||
|
|
||||||
|
enum TintSlot : int8 {
|
||||||
|
tintHead = textureBegin,
|
||||||
|
tintChest,
|
||||||
|
tintArms,
|
||||||
|
tintWrist,
|
||||||
|
tintHands,
|
||||||
|
tintLegs,
|
||||||
|
tintFeet,
|
||||||
|
tintCount,
|
||||||
|
tintInvalid = textureInvalid
|
||||||
|
};
|
||||||
|
|
||||||
|
const int8 LastTexture = weaponSecondary;
|
||||||
|
const int8 LastTintableTexture = tintFeet;
|
||||||
|
|
||||||
|
struct Texture_Struct {
|
||||||
|
uint32 Material;
|
||||||
|
uint32 Unknown1;
|
||||||
|
uint32 EliteModel;
|
||||||
|
uint32 HerosForgeModel;
|
||||||
|
uint32 Unknown2; // same as material?
|
||||||
|
};
|
||||||
|
|
||||||
|
struct TextureMaterial_Struct {
|
||||||
|
uint32 Material;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Tint_Struct {
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
uint8 Blue;
|
||||||
|
uint8 Green;
|
||||||
|
uint8 Red;
|
||||||
|
uint8 UseTint; // if there's a tint, this is FF
|
||||||
|
};
|
||||||
|
uint32 Color;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
} /*textures*/
|
||||||
|
|
||||||
|
struct TextureProfile {
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
textures::Texture_Struct Head;
|
||||||
|
textures::Texture_Struct Chest;
|
||||||
|
textures::Texture_Struct Arms;
|
||||||
|
textures::Texture_Struct Wrist;
|
||||||
|
textures::Texture_Struct Hands;
|
||||||
|
textures::Texture_Struct Legs;
|
||||||
|
textures::Texture_Struct Feet;
|
||||||
|
textures::Texture_Struct Primary;
|
||||||
|
textures::Texture_Struct Secondary;
|
||||||
|
};
|
||||||
|
textures::Texture_Struct Slot[textures::materialCount];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
struct TextureMaterialProfile {
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
textures::TextureMaterial_Struct Head;
|
||||||
|
textures::TextureMaterial_Struct Chest;
|
||||||
|
textures::TextureMaterial_Struct Arms;
|
||||||
|
textures::TextureMaterial_Struct Wrist;
|
||||||
|
textures::TextureMaterial_Struct Hands;
|
||||||
|
textures::TextureMaterial_Struct Legs;
|
||||||
|
textures::TextureMaterial_Struct Feet;
|
||||||
|
textures::TextureMaterial_Struct Primary;
|
||||||
|
textures::TextureMaterial_Struct Secondary;
|
||||||
|
};
|
||||||
|
textures::TextureMaterial_Struct Slot[textures::materialCount];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
struct TintProfile {
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
textures::Tint_Struct Head;
|
||||||
|
textures::Tint_Struct Chest;
|
||||||
|
textures::Tint_Struct Arms;
|
||||||
|
textures::Tint_Struct Wrist;
|
||||||
|
textures::Tint_Struct Hands;
|
||||||
|
textures::Tint_Struct Legs;
|
||||||
|
textures::Tint_Struct Feet;
|
||||||
|
textures::Tint_Struct Primary;
|
||||||
|
textures::Tint_Struct Secondary;
|
||||||
|
};
|
||||||
|
textures::Tint_Struct Slot[textures::materialCount]; // materialCount is correct..but, {[weaponPrimary],[weaponSecondary]} are not tintable...
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
} /*EQEmu*/
|
||||||
|
|
||||||
|
#endif /*COMMON_TEXTURES_H*/
|
||||||
+2
-2
@@ -30,9 +30,9 @@
|
|||||||
Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define CURRENT_BINARY_DATABASE_VERSION 9096
|
#define CURRENT_BINARY_DATABASE_VERSION 9107
|
||||||
#ifdef BOTS
|
#ifdef BOTS
|
||||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9006
|
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9015
|
||||||
#else
|
#else
|
||||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 0 // must be 0
|
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 0 // must be 0
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -99,11 +99,13 @@ bool Client::Process()
|
|||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
|
if (Log.log_settings[Logs::Client_Server_Packet_Unhandled].is_category_enabled == 1) {
|
||||||
char dump[64];
|
char dump[64];
|
||||||
app->build_header_dump(dump);
|
app->build_header_dump(dump);
|
||||||
Log.Out(Logs::General, Logs::Error, "Recieved unhandled application packet from the client: %s.", dump);
|
Log.Out(Logs::General, Logs::Error, "Recieved unhandled application packet from the client: %s.", dump);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
delete app;
|
delete app;
|
||||||
app = connection->PopPacket();
|
app = connection->PopPacket();
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ void Config::Parse(const char *file_name)
|
|||||||
*/
|
*/
|
||||||
void Config::Tokenize(FILE *input, std::list<std::string> &tokens)
|
void Config::Tokenize(FILE *input, std::list<std::string> &tokens)
|
||||||
{
|
{
|
||||||
char c = fgetc(input);
|
auto c = fgetc(input);
|
||||||
std::string lexeme;
|
std::string lexeme;
|
||||||
|
|
||||||
while(c != EOF)
|
while(c != EOF)
|
||||||
@@ -162,7 +162,7 @@ void Config::Tokenize(FILE *input, std::list<std::string> &tokens)
|
|||||||
|
|
||||||
if(isalnum(c))
|
if(isalnum(c))
|
||||||
{
|
{
|
||||||
lexeme.append((const char *)&c, 1);
|
lexeme += c;
|
||||||
c = fgetc(input);
|
c = fgetc(input);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -193,14 +193,14 @@ void Config::Tokenize(FILE *input, std::list<std::string> &tokens)
|
|||||||
lexeme.clear();
|
lexeme.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
lexeme.append((const char *)&c, 1);
|
lexeme += c;
|
||||||
tokens.push_back(lexeme);
|
tokens.push_back(lexeme);
|
||||||
lexeme.clear();
|
lexeme.clear();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
lexeme.append((const char *)&c, 1);
|
lexeme += c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#include "../common/ipc_mutex.h"
|
#include "../common/ipc_mutex.h"
|
||||||
#include "../common/memory_mapped_file.h"
|
#include "../common/memory_mapped_file.h"
|
||||||
#include "../common/eqemu_exception.h"
|
#include "../common/eqemu_exception.h"
|
||||||
#include "../common/item_struct.h"
|
#include "../common/item_data.h"
|
||||||
|
|
||||||
void LoadItems(SharedDatabase *database, const std::string &prefix) {
|
void LoadItems(SharedDatabase *database, const std::string &prefix) {
|
||||||
EQEmu::IPCMutex mutex("items");
|
EQEmu::IPCMutex mutex("items");
|
||||||
@@ -35,7 +35,7 @@ void LoadItems(SharedDatabase *database, const std::string &prefix) {
|
|||||||
EQ_EXCEPT("Shared Memory", "Unable to get any items from the database.");
|
EQ_EXCEPT("Shared Memory", "Unable to get any items from the database.");
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 size = static_cast<uint32>(EQEmu::FixedMemoryHashSet<EQEmu::Item_Struct>::estimated_size(items, max_item));
|
uint32 size = static_cast<uint32>(EQEmu::FixedMemoryHashSet<EQEmu::ItemData>::estimated_size(items, max_item));
|
||||||
|
|
||||||
auto Config = EQEmuConfig::get();
|
auto Config = EQEmuConfig::get();
|
||||||
std::string file_name = Config->SharedMemDir + prefix + std::string("items");
|
std::string file_name = Config->SharedMemDir + prefix + std::string("items");
|
||||||
|
|||||||
@@ -36,6 +36,39 @@
|
|||||||
|
|
||||||
EQEmuLogSys Log;
|
EQEmuLogSys Log;
|
||||||
|
|
||||||
|
#ifdef _WINDOWS
|
||||||
|
#include <direct.h>
|
||||||
|
#else
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
inline bool MakeDirectory(const std::string &directory_name)
|
||||||
|
{
|
||||||
|
#ifdef _WINDOWS
|
||||||
|
struct _stat st;
|
||||||
|
if (_stat(directory_name.c_str(), &st) == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
_mkdir(directory_name.c_str());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
struct stat st;
|
||||||
|
if (stat(directory_name.c_str(), &st) == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
mkdir(directory_name.c_str(), 0755);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
RegisterExecutablePlatform(ExePlatformSharedMemory);
|
RegisterExecutablePlatform(ExePlatformSharedMemory);
|
||||||
Log.LoadLogSettingsDefaults();
|
Log.LoadLogSettingsDefaults();
|
||||||
@@ -62,6 +95,11 @@ int main(int argc, char **argv) {
|
|||||||
database.LoadLogSettings(Log.log_settings);
|
database.LoadLogSettings(Log.log_settings);
|
||||||
Log.StartFileLogs();
|
Log.StartFileLogs();
|
||||||
|
|
||||||
|
std::string shared_mem_directory = Config->SharedMemDir;
|
||||||
|
if (MakeDirectory(shared_mem_directory)) {
|
||||||
|
Log.Out(Logs::General, Logs::Status, "Shared Memory folder doesn't exist, so we created it... '%s'", shared_mem_directory.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
database.LoadVariables();
|
database.LoadVariables();
|
||||||
|
|
||||||
/* If we're running shared memory and hotfix has no custom name, we probably want to start from scratch... */
|
/* If we're running shared memory and hotfix has no custom name, we probably want to start from scratch... */
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user