mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-23 13:12:28 +00:00
Compare commits
703 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b224142b2a | |||
| 60563aead6 | |||
| a201a3e837 | |||
| 2d070ff1c0 | |||
| 4e257d43b2 | |||
| 7cb1a2e7e4 | |||
| e2bc79401b | |||
| 26589835e5 | |||
| e65bf63e51 | |||
| f6bddb9502 | |||
| d071bd2e7c | |||
| 921433f998 | |||
| 48be7c508d | |||
| f1260a598d | |||
| 36c945a77c | |||
| 0a8f3554e9 | |||
| af42af7869 | |||
| 65dcfd55a7 | |||
| 052b41fbb2 | |||
| 5998cf8a3c | |||
| fc282f86c0 | |||
| 804421095a | |||
| bc53ca3b71 | |||
| ff5eb54331 | |||
| 23698c1373 | |||
| 0a0260b75b | |||
| 9636ef3499 | |||
| dc0eb0f6b5 | |||
| 525eb518f6 | |||
| 70dd447156 | |||
| 52eb4d2d4e | |||
| 24ea7a0d45 | |||
| faaebc2806 | |||
| 6f867ebca3 | |||
| cbadd8bde1 | |||
| 395be050a3 | |||
| a59cdc2c89 | |||
| c98964a9e8 | |||
| 1054bfe476 | |||
| 7198e670ae | |||
| 4a7984f04d | |||
| c0b546921e | |||
| de84065cde | |||
| 8dfd61bbcf | |||
| e04496188b | |||
| 705dd4d7df | |||
| 0d0917b779 | |||
| ad2fd9e4d5 | |||
| e8ae28b439 | |||
| fde9517247 | |||
| 4a597a2b38 | |||
| 34b1950820 | |||
| 5562030594 | |||
| 9821c7da65 | |||
| c7a79d81ca | |||
| f5ba442ba6 | |||
| 2d052a7a28 | |||
| 3577ff5a81 | |||
| 88984a3960 | |||
| 6d52f3c02a | |||
| cb6948b6fd | |||
| ad603fd213 | |||
| b06fec6ad0 | |||
| 7db731a47d | |||
| 35e9c3ad98 | |||
| 904ae416c5 | |||
| 4faca5543a | |||
| 5d5c3fbfd1 | |||
| 251e940fe8 | |||
| e833f457a1 | |||
| 6d763256f1 | |||
| 8da864bada | |||
| 82e96d7014 | |||
| 700de3f518 | |||
| ad9c0df552 | |||
| ca3b5a3221 | |||
| 8cd19670ab | |||
| 84fa042c75 | |||
| 3d83f647bf | |||
| 67863e364b | |||
| ac0933719a | |||
| b7c19e4034 | |||
| 94a0cb3522 | |||
| 28ad768c0a | |||
| baa7a1feb9 | |||
| 6b45b2bc52 | |||
| cf1370b9e2 | |||
| 6f67577115 | |||
| 191aa575f8 | |||
| 4e3842b9d8 | |||
| f0881d4aa9 | |||
| 521106e286 | |||
| 12ea532a7a | |||
| 98c21635c2 | |||
| c465b8c8c3 | |||
| cfa05587fc | |||
| 56a96dc817 | |||
| 32a034bd58 | |||
| 2814130aad | |||
| c5c778f575 | |||
| daec5bde66 | |||
| ee7f88d247 | |||
| 5c5cde7fe5 | |||
| 08e787da59 | |||
| b43cfa126f | |||
| fbaae2b1e4 | |||
| 0598f7e87c | |||
| b4862dea45 | |||
| 09e13d0034 | |||
| bee04c1b53 | |||
| 2fbe6b304c | |||
| 02e82f1cfc | |||
| a2bef4d999 | |||
| 50a69a8e20 | |||
| a5207b58e1 | |||
| 3c2b8d13b9 | |||
| 2f1191b263 | |||
| e4f45d7b35 | |||
| f4d024fd47 | |||
| c30850f00a | |||
| ce248d83d6 | |||
| 3ca282abfa | |||
| 5c0fbac7b0 | |||
| ce4c6b0c8a | |||
| 6b67c3736b | |||
| 3266ed98e6 | |||
| 5970b0ee41 | |||
| 3b51aebb51 | |||
| 12ceac4c02 | |||
| 7fa1256c5d | |||
| f328853251 | |||
| d1b0564698 | |||
| 111fb84041 | |||
| 79a70271d5 | |||
| 1ca397f426 | |||
| d49426f763 | |||
| c5a90adb39 | |||
| 3573686976 | |||
| cab071b544 | |||
| f1701aae9f | |||
| 96a0cc37e0 | |||
| 2330285b04 | |||
| ac463fe9aa | |||
| fdd78e41da | |||
| 4ad8500a3e | |||
| b5c6b47639 | |||
| 62e22d1aea | |||
| 1973a065c5 | |||
| 6c5248b9a9 | |||
| 1ed9c3082c | |||
| 37936b63c4 | |||
| 4a83b4acb9 | |||
| e7681f1b49 | |||
| 4f38dba334 | |||
| 67a9779d5b | |||
| 5b85aa6550 | |||
| 6a5b3ef4fe | |||
| 9570412991 | |||
| c506e33018 | |||
| 8f32a9949b | |||
| d7e05de556 | |||
| 1e13d43b71 | |||
| a6b9e6cb3c | |||
| 0b44f58518 | |||
| c749155ad2 | |||
| 9d6248886c | |||
| de16db5a2f | |||
| 251d4fa3e3 | |||
| 9324bdf107 | |||
| e3e63efd68 | |||
| 071367b6a9 | |||
| 2e8d7b09af | |||
| eee65b8c22 | |||
| e11fa4a278 | |||
| 650aa566b0 | |||
| bd48efcdd5 | |||
| 9ac79f1071 | |||
| fc48a109fd | |||
| 0017951a74 | |||
| 959319f91f | |||
| 41cbe5fb01 | |||
| 71d72a02a9 | |||
| 01c580224d | |||
| 0355af310d | |||
| 94231b62a3 | |||
| fe364a0798 | |||
| 30922afd08 | |||
| 73e398b0f4 | |||
| 10ae97e42f | |||
| 96242f6c5e | |||
| 5dc3a5ab20 | |||
| 44bfdfebc2 | |||
| d33b320436 | |||
| 51b6db977f | |||
| e02e6099aa | |||
| 8e20f3e7dc | |||
| 5434c47d1f | |||
| cbc8e652b9 | |||
| 4a26466b2b | |||
| 6c7a4edae3 | |||
| 8c8cec29d4 | |||
| 9de4f84f22 | |||
| 563a39c2d9 | |||
| 741eca17f4 | |||
| b32f59a40d | |||
| 352d6fd83c | |||
| 738fa38047 | |||
| fabe93e548 | |||
| 16f72be898 | |||
| 9c22de9eb2 | |||
| f0f5262e3e | |||
| 8594148496 | |||
| dd869695c4 | |||
| 7943a73cfb | |||
| 59bcd031c8 | |||
| 22cc86e6a0 | |||
| a763fc08b6 | |||
| 8ae234aedf | |||
| 793487b825 | |||
| bb5ae7447d | |||
| 0370156179 | |||
| 39cab761eb | |||
| 720e80377e | |||
| 3d44050959 | |||
| d5efa0f23c | |||
| e63b310058 | |||
| 384d8c6167 | |||
| d23608964e | |||
| d656db843a | |||
| 0ed1e539ae | |||
| d8a8b8e6dc | |||
| 77f0e7919e | |||
| 587ddc0fdd | |||
| efdc177b78 | |||
| 275e1144ad | |||
| d987ccf289 | |||
| fe7774ab75 | |||
| 19e6a6909f | |||
| 4446a1ed08 | |||
| b4e4d94061 | |||
| f81f8ea5d6 | |||
| 7476ae2a82 | |||
| 0c4a32246b | |||
| b8b43c7149 | |||
| b4286b87db | |||
| cb0d5ac7d0 | |||
| 957f05860b | |||
| d4139b98e3 | |||
| 29d614421f | |||
| beff1caf4f | |||
| 29ec6db345 | |||
| 8efc652c10 | |||
| 29079a7ec2 | |||
| 3ac0f1506c | |||
| 38f1e8847c | |||
| cff9e05626 | |||
| 29a36008d1 | |||
| 51958b991c | |||
| 771279128d | |||
| 385d70b294 | |||
| 4bd41b3678 | |||
| 527293d2f2 | |||
| d754e24a02 | |||
| b4576435e3 | |||
| 5e1500c93b | |||
| c9073b10a1 | |||
| a9f7af59a2 | |||
| 728399e372 | |||
| 51a3302288 | |||
| 5decde0af9 | |||
| 3620ac4eaf | |||
| 43e906e3c8 | |||
| 39bb2aa811 | |||
| acab4dd443 | |||
| 45ff2cddb7 | |||
| 1619324d06 | |||
| 7b0045290d | |||
| 441ddf233a | |||
| 306c641c72 | |||
| b417e23d97 | |||
| 481492cb59 | |||
| d3fbd026b4 | |||
| 2d77adeeb8 | |||
| f84130fc7c | |||
| 57f8f61094 | |||
| 5ec0b9993a | |||
| 65cb049a38 | |||
| 3247137ef2 | |||
| adb8175654 | |||
| 5afd6b8628 | |||
| 4cb6a5635e | |||
| b54411e533 | |||
| 7f85d8c8a2 | |||
| c95b18da85 | |||
| a062c27e1a | |||
| c5df59a2f0 | |||
| d538b48fbc | |||
| 0a27273d64 | |||
| 22170527c4 | |||
| f0f920d0e8 | |||
| 193f7b0fe3 | |||
| c81491f97e | |||
| bb91265b2b | |||
| affb735c38 | |||
| 3db2332821 | |||
| a6ae2ca635 | |||
| 466eecacc4 | |||
| a327c91bac | |||
| cef2aa64d9 | |||
| 69a124e11f | |||
| 3f056462d6 | |||
| e8eb774458 | |||
| 223d06645d | |||
| 2db5dc2ed7 | |||
| 6d95fc2547 | |||
| b10062452a | |||
| 9c72533264 | |||
| f805ddf319 | |||
| 2267881d52 | |||
| 7ca23d14c7 | |||
| 4cf845e6ff | |||
| 9c6ab05659 | |||
| 0f9cfc0615 | |||
| 6028dbb4e5 | |||
| fc8cb2b5b7 | |||
| 594657f2c7 | |||
| 09e1155a26 | |||
| e824f81670 | |||
| 69c0405004 | |||
| e38abaa32a | |||
| c002f834d4 | |||
| e53a91f5c3 | |||
| ef5e93b71b | |||
| 6f00a69850 | |||
| 41938fbe72 | |||
| d1561c28d9 | |||
| be0621de42 | |||
| 15cec40ed5 | |||
| ea734c90b5 | |||
| 6c5b569c29 | |||
| e5f3f4c552 | |||
| f097eaf3cd | |||
| 48eba3c092 | |||
| bdba6219ac | |||
| d86912a7bb | |||
| 362366a333 | |||
| 35049d530e | |||
| 66cfb2e32b | |||
| 3e1c917f11 | |||
| ea4c23efcf | |||
| c328829610 | |||
| 28ac586ed8 | |||
| ee71fa0d56 | |||
| f3e04bfe4c | |||
| a8c23d25f3 | |||
| 41f2d71c7c | |||
| e338f801ea | |||
| 6221c1f8ab | |||
| 5dac9a944b | |||
| 97c1c479f9 | |||
| 21d6865e8c | |||
| e2894ef2aa | |||
| 7656b9b928 | |||
| 0fde0fbd23 | |||
| d5955da08c | |||
| e2333e671b | |||
| 1da70ee6ed | |||
| 0d8cbca016 | |||
| 1a4b794ce4 | |||
| fca359bf51 | |||
| 5f11e91da2 | |||
| 2c275f603a | |||
| ad921d01d8 | |||
| e3e2b266f2 | |||
| e2d52ec3e5 | |||
| a325380884 | |||
| b6294a28cb | |||
| 69336d1e53 | |||
| 2df5506d82 | |||
| 2dacb523fc | |||
| 6474e1353f | |||
| 45ef740244 | |||
| 48299b6024 | |||
| be7d2e9457 | |||
| a90babbae1 | |||
| 4b1d3592d4 | |||
| 77cfd116e0 | |||
| 67c8949cd4 | |||
| b66b7a5fd2 | |||
| b0d358cda8 | |||
| 8553278759 | |||
| 7a3f7602a5 | |||
| 11e08c9b67 | |||
| dfcddac2ef | |||
| 73b2987700 | |||
| 5781821ab3 | |||
| 9183541825 | |||
| 7870081716 | |||
| 0438042844 | |||
| 2bee906784 | |||
| cab41487d5 | |||
| 66448feece | |||
| 65127ad756 | |||
| 1261c228a3 | |||
| 5be8e710a9 | |||
| 3ad7ab625d | |||
| b6be6c3709 | |||
| 8ff4e59d20 | |||
| ad116af59d | |||
| fa1fe55e01 | |||
| 4f2dbb37d2 | |||
| 7dc1da21f0 | |||
| 806a9fbb99 | |||
| f4203d0621 | |||
| bf6b9aaef8 | |||
| d5f5b38d26 | |||
| 6a078279eb | |||
| a61b930bd9 | |||
| 6be2f6a7e4 | |||
| 1d08b1687f | |||
| e2382137e6 | |||
| f1039ab0e9 | |||
| ce3532aa19 | |||
| 1b1c5b5f9f | |||
| 9c3f1937a7 | |||
| 81a641c96c | |||
| 037df28b7c | |||
| fe1c67b8b4 | |||
| c7c9218210 | |||
| 6d6516d80d | |||
| 528f16bdaf | |||
| 64641a3390 | |||
| 74b8f38030 | |||
| c7faf8a03c | |||
| aa9601352d | |||
| 81b9d9a57e | |||
| cecd9b89ba | |||
| 938322a3d1 | |||
| 1c04dccf53 | |||
| 0622f02470 | |||
| 1366774931 | |||
| 5cbae2b833 | |||
| c12805acce | |||
| e2c84c5f39 | |||
| e19db3f447 | |||
| 7d0b316e74 | |||
| 0ef428d286 | |||
| 2a73a572d3 | |||
| 638d121b75 | |||
| 3b75d4fa8f | |||
| cb897786bc | |||
| aa780ceb8c | |||
| 4a3f94e688 | |||
| 211b3a135e | |||
| cbce5e5eb6 | |||
| a3347579e6 | |||
| 2fbd170188 | |||
| 95208eb24e | |||
| bcf282da91 | |||
| edc2567b10 | |||
| b379bdd36e | |||
| eeb9a6ab65 | |||
| c4de954b15 | |||
| 2d8e9bf058 | |||
| 0b352ff0f7 | |||
| 28ec84a6c9 | |||
| 7f5f805c10 | |||
| b3789c261b | |||
| d86fc1c141 | |||
| accedf7184 | |||
| 5f5fba1117 | |||
| 61cd48ff44 | |||
| ca2c2ccfac | |||
| 905a264744 | |||
| 114d0ae11b | |||
| 4d768474e8 | |||
| e753685ceb | |||
| e0e3059498 | |||
| 61545beff2 | |||
| 16c5ead887 | |||
| 3a270dd96a | |||
| bb2bed7b00 | |||
| 0438dee22e | |||
| b3d8e22539 | |||
| 968127c414 | |||
| 272180ff0f | |||
| 03fed0f42d | |||
| fab091da2d | |||
| c7417d4b54 | |||
| d8c6c69450 | |||
| 1024e327b5 | |||
| e38268230f | |||
| c7760d8dae | |||
| 8d050b8f3f | |||
| 7800cbbe96 | |||
| 50233b9a8c | |||
| a722e3f112 | |||
| be52d413db | |||
| 1dfd3349b7 | |||
| cf8363f62e | |||
| 7326a3ea7a | |||
| cb49bae53c | |||
| 31f891dda5 | |||
| 38572fe393 | |||
| 83367ee806 | |||
| f117aafc45 | |||
| 3e0c1bc02e | |||
| f13a1d6351 | |||
| fdde64dcc3 | |||
| f5fa07c8db | |||
| 5ffb6bdee7 | |||
| 8035c6c558 | |||
| fc1eca0f31 | |||
| 28e49801b7 | |||
| 66c171b61b | |||
| 3be7d45d36 | |||
| e5822a0c4a | |||
| b05dd45d62 | |||
| 9f64092606 | |||
| d2acd0505c | |||
| 05ed577e23 | |||
| 7831162235 | |||
| 8567fd928a | |||
| 73a23e9f9d | |||
| f232bf1ccd | |||
| acc6926448 | |||
| 837ce8ab4a | |||
| 2497c719ee | |||
| 31b46efcac | |||
| 9f3a0a3f95 | |||
| 179400c777 | |||
| 0f12a74074 | |||
| 61b784e96e | |||
| 723e5d536a | |||
| 225929d937 | |||
| 763ed7f7a3 | |||
| ea6ef4c283 | |||
| e5a0cc9ef7 | |||
| a79ea9b850 | |||
| 039e321dde | |||
| c57292a9dd | |||
| 9561a3fd3e | |||
| aa021addc1 | |||
| c0cbbf3a65 | |||
| a73ac9cfe8 | |||
| ec8c46abfe | |||
| b9b92762b5 | |||
| 7feb531ff7 | |||
| e67423bba7 | |||
| 531e4b0207 | |||
| 34496c49b4 | |||
| a445d7e39f | |||
| 0d12715d77 | |||
| 9878459049 | |||
| 9be0d3b090 | |||
| 16ba3eb11e | |||
| 973aa94cb5 | |||
| 4cbccfdce2 | |||
| a5e6fa3479 | |||
| 3712d36867 | |||
| 17291e9977 | |||
| 15f57e4a4c | |||
| e58d63bf35 | |||
| f89add9f64 | |||
| e039f6d2c6 | |||
| 7cef4d8fe9 | |||
| 7b85b09f24 | |||
| 413538f1b5 | |||
| c03a70651c | |||
| ec01e6c69b | |||
| 11773208df | |||
| 1f155690d8 | |||
| 36a29dbb9f | |||
| c160b8716f | |||
| 7ffce01260 | |||
| 1170b57fd5 | |||
| fee8a1214a | |||
| c26a6959e4 | |||
| 837b9b7ec7 | |||
| a5a8bfb0f4 | |||
| 69bddef5a0 | |||
| 7d242045ec | |||
| c3035fdf41 | |||
| e34c47414f | |||
| 909dda7c09 | |||
| 22ab145f19 | |||
| cd8e30a2ec | |||
| 03be6b2b6b | |||
| cda2217634 | |||
| 4525b512ac | |||
| db0d1116f8 | |||
| 3ef5d8ef0a | |||
| 4ed88e348e | |||
| ad29fa9cfa | |||
| 388c4bc574 | |||
| b4f3993616 | |||
| f9366553a3 | |||
| 52608d9b2d | |||
| 3cb02e3b86 | |||
| 34c3b8628e | |||
| 8f921ce919 | |||
| 6754dfdf6d | |||
| 81722962cf | |||
| d169d95ab0 | |||
| 63ca4cac5e | |||
| f30ae9dd5a | |||
| eb49707779 | |||
| 87bb5deb5c | |||
| e390531dcd | |||
| d7dc733480 | |||
| 0c38b46bf1 | |||
| 899cf32e6b | |||
| 1f9597a9e2 | |||
| 54c89d69f6 | |||
| a14371ba5c | |||
| 4c12d31e4a | |||
| e50cf5c4be | |||
| ca7dd7d741 | |||
| 59618e0038 | |||
| ef1f1562f0 | |||
| 31177b7dc7 | |||
| 5b7aaff150 | |||
| b525a32b6e | |||
| 99fe610f72 | |||
| b5ec35e672 | |||
| 15fa2b371c | |||
| 0799b47c9c | |||
| a216672443 | |||
| d755aa48bc | |||
| f7ecfe7257 | |||
| 89a0bbb8bf | |||
| 822c8425bd | |||
| a6b57a3423 | |||
| 6d4f7413a5 | |||
| 3e041052ee | |||
| 444174ef57 | |||
| 970f7e01a9 | |||
| 4432c07081 | |||
| 221c667a23 | |||
| b710c41c34 | |||
| 8825218361 | |||
| 1bb5c4e0d8 | |||
| 58343480ff | |||
| 081905dbc3 | |||
| a8b8f71092 | |||
| 36c1d88eac | |||
| 6eba672013 | |||
| 091c8ea5f1 | |||
| 95dc0c5fc8 | |||
| 73c8d3d09d | |||
| 049a0bf787 | |||
| 2095380ba4 | |||
| 081192d29e | |||
| 2429980fd5 | |||
| 0ac238d762 | |||
| 45320fd8ec | |||
| 6d33a13e23 | |||
| 52d64d03a6 | |||
| fe6e289606 | |||
| 26569ac51d | |||
| 38d04931ba | |||
| 96cf3d967f | |||
| 36325226eb | |||
| 6410f52c9c | |||
| 7ae14fffd0 | |||
| d213e3b106 | |||
| ba612f91c7 | |||
| 8312a8cf3b | |||
| 390dcc9a88 | |||
| cd1b45f0d6 | |||
| b8caa5dc31 | |||
| 53572b4d13 | |||
| cf0c773002 | |||
| 515fe8d9e5 | |||
| 06d1bd632b | |||
| 89f34246f0 | |||
| 7d8e128b5f | |||
| 14c642a3f7 | |||
| a67255475c | |||
| 04045dfc27 | |||
| 510a51e564 | |||
| 54b2c50109 | |||
| fe753f05df | |||
| ab76783f8b | |||
| 364a51b119 | |||
| a486db5e95 | |||
| c8e7d9e005 | |||
| 93aa690a6d | |||
| 87f1f78b67 | |||
| 0574a3db86 | |||
| 0178f3c9bb | |||
| 9eb3907d45 | |||
| 118c2a9db9 | |||
| 0a9222e1ee | |||
| e0db3c0b60 | |||
| e0a99730e5 | |||
| 6497bdf45a | |||
| ca430e2494 | |||
| f8439fd6e6 | |||
| 8dda7ddd04 | |||
| 5d8ea5752d | |||
| 4071d88290 | |||
| 5cf748d135 |
+3
-1
@@ -8,7 +8,9 @@ script:
|
||||
- make
|
||||
- ./bin/tests
|
||||
branches:
|
||||
only: master
|
||||
only:
|
||||
- master
|
||||
- stable
|
||||
notifications:
|
||||
email: false
|
||||
irc:
|
||||
|
||||
+15
-10
@@ -24,8 +24,8 @@
|
||||
#EQEMU_DISABLE_LOGSYS
|
||||
#EQEMU_COMMANDS_LOGGING
|
||||
#EQEMU_BUILD_SERVER
|
||||
#EQEMU_BUILD_LOGIN
|
||||
#EQEMU_BUILD_TESTS
|
||||
#EQEMU_BUILD_LOGIN
|
||||
#EQEMU_BUILD_TESTS
|
||||
#EQEMU_BUILD_PERL
|
||||
#EQEMU_BUILD_LUA
|
||||
#EQEMU_SANITIZE_LUA_LIBS
|
||||
@@ -103,7 +103,7 @@ IF(MSVC)
|
||||
SET(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /SAFESEH:NO")
|
||||
SET(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO} /SAFESEH:NO")
|
||||
ENDIF(EQEMU_DISABLE_SAFESEH)
|
||||
|
||||
|
||||
OPTION(EQEMU_BUILD_MSVC_MP "Enable build with multiple processes." ON)
|
||||
IF(EQEMU_BUILD_MSVC_MP)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
|
||||
@@ -115,7 +115,7 @@ IF(MSVC)
|
||||
STRING(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
|
||||
ENDIF(${flag_var} MATCHES "/MD")
|
||||
ENDFOREACH(flag_var)
|
||||
|
||||
|
||||
ADD_DEFINITIONS(-DNOMINMAX)
|
||||
ELSE(MSVC)
|
||||
#Normally set by perl but we don't use the perl flags anymore so we set it.
|
||||
@@ -126,6 +126,7 @@ ENDIF(MSVC)
|
||||
IF(UNIX)
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
ADD_DEFINITIONS(-DFREEBSD)
|
||||
ADD_DEFINITIONS(-D_GLIBCXX_USE_C99)
|
||||
SET(FREEBSD TRUE)
|
||||
ENDIF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
@@ -259,7 +260,10 @@ OPTION(EQEMU_BUILD_CLIENT_FILES "Build Client Import/Export Data Programs." ON)
|
||||
|
||||
#C++11 stuff
|
||||
IF(NOT MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||
IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-reserved-user-defined-literal")
|
||||
ENDIF()
|
||||
ENDIF(NOT MSVC)
|
||||
|
||||
#Various definitions
|
||||
@@ -289,6 +293,7 @@ ADD_DEFINITIONS(-DLOG_LEVEL_DEBUG=${EQEMU_LOG_LEVEL_DEBUG})
|
||||
ADD_DEFINITIONS(-DLOG_LEVEL_QUEST=${EQEMU_LOG_LEVEL_QUEST})
|
||||
ADD_DEFINITIONS(-DLOG_LEVEL_COMMANDS=${EQEMU_LOG_LEVEL_COMMANDS})
|
||||
ADD_DEFINITIONS(-DLOG_LEVEL_CRASH=${EQEMU_LOG_LEVEL_CRASH})
|
||||
ADD_DEFINITIONS(-DGLM_FORCE_RADIANS)
|
||||
|
||||
IF(EQEMU_STREAM_RETRANSMIT_ACKED_PACKETS)
|
||||
ADD_DEFINITIONS(-DRETRANSMIT_ACKED_PACKETS=true)
|
||||
@@ -301,26 +306,26 @@ FIND_PACKAGE(ZLIB REQUIRED)
|
||||
FIND_PACKAGE(MySQL REQUIRED)
|
||||
IF(EQEMU_BUILD_PERL)
|
||||
FIND_PACKAGE(PerlLibs REQUIRED)
|
||||
INCLUDE_DIRECTORIES("${PERL_INCLUDE_PATH}")
|
||||
INCLUDE_DIRECTORIES(SYSTEM "${PERL_INCLUDE_PATH}")
|
||||
ENDIF(EQEMU_BUILD_PERL)
|
||||
|
||||
IF(EQEMU_BUILD_LUA)
|
||||
FIND_PACKAGE(EQLua51 REQUIRED)
|
||||
SET(Boost_USE_STATIC_LIBS OFF)
|
||||
SET(Boost_USE_MULTITHREADED ON)
|
||||
SET(Boost_USE_MULTITHREADED ON)
|
||||
SET(Boost_USE_STATIC_RUNTIME OFF)
|
||||
SET(BOOST_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/boost")
|
||||
|
||||
FIND_PACKAGE(Boost REQUIRED)
|
||||
INCLUDE_DIRECTORIES("${LUA_INCLUDE_DIR}" "${Boost_INCLUDE_DIRS}" "luabind")
|
||||
|
||||
INCLUDE_DIRECTORIES(SYSTEM "${LUA_INCLUDE_DIR}" "${Boost_INCLUDE_DIRS}" "luabind")
|
||||
|
||||
OPTION(EQEMU_SANITIZE_LUA_LIBS "Sanitize Lua Libraries (Remove OS and IO standard libraries from being able to run)." ON)
|
||||
IF(EQEMU_SANITIZE_LUA_LIBS)
|
||||
ADD_DEFINITIONS(-DSANITIZE_LUA_LIBS)
|
||||
ENDIF(EQEMU_SANITIZE_LUA_LIBS)
|
||||
ENDIF(EQEMU_BUILD_LUA)
|
||||
|
||||
INCLUDE_DIRECTORIES("${ZLIB_INCLUDE_DIRS}" "${MySQL_INCLUDE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/common/glm/glm")
|
||||
INCLUDE_DIRECTORIES(SYSTEM "${ZLIB_INCLUDE_DIRS}" "${MySQL_INCLUDE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/common/glm/glm")
|
||||
|
||||
IF(EQEMU_BUILD_LUA)
|
||||
ADD_SUBDIRECTORY(luabind)
|
||||
|
||||
+370
@@ -1,5 +1,375 @@
|
||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
-------------------------------------------------------
|
||||
== 12/04/2014 ==
|
||||
Kayen: Ranged attacks will now more accurately check MAX firing range, fixing the issue where you would
|
||||
hit ranged attack and nothing would happpen due to incorrect server side range checks.
|
||||
Trevius: Initial addition of the RoF2 client from May 10th 2013 (currently available on Steam as the F2P client).
|
||||
Trevius: RoF2 is disabled by default, but you can enable by editing /common/patches/patches.cpp (see comments)
|
||||
|
||||
== 12/01/2014 ==
|
||||
Trevius: Mercenaries now spawn as the same Gender and Size of the Merchant they are purchased from.
|
||||
Trevius: Mercenaries now spawn with randomized facial features when purchased.
|
||||
Trevius: Setting a lastname for NPCs will now override any hard coded lastname (such as GM Trainers).
|
||||
|
||||
Required SQL: utils/sql/git/required/2014_12_01_mercs_table_update.sql
|
||||
|
||||
== 11/28/2014 ==
|
||||
Trevius: Fixed a zone crash related to numhits for spells.
|
||||
Trevius: Fixed a query related to group leaders logging in.
|
||||
Trevius (Natedog): Fixed a world crash related to attempting to join an adventure with Mercenaries.
|
||||
|
||||
== 11/27/2014 ==
|
||||
Kayen: Projectiles (ie Arrows) fired from archery will now do damage upon impact instead of instantly (consistent w/ live).
|
||||
Optional SQL: utils/sql/git/optional/2014_11_27_ProjectileDmgOnImpact.sql
|
||||
|
||||
== 11/25/2014 ==
|
||||
Trevius: Spells that modify model size are now limited to 2 size adjustments from the base size.
|
||||
Trevius: Fix to prevent Mercenaries from being set as Group Leader.
|
||||
|
||||
== 11/24/2014 ==
|
||||
Trevius: Added Rule NPC:EnableMeritBasedFaction (disabled by default) - Allows faction gain to work similar to experience.
|
||||
|
||||
== 11/22/2014 ==
|
||||
Trevius: Grouping with Mercenaries is now considerably less buggy.
|
||||
Trevius: Fixed an issue with Spell Globals related to high Character IDs.
|
||||
Trevius: Crash fix for Swarm Pets.
|
||||
|
||||
== 11/19/2014 ==
|
||||
Trevius: Mercenaries now Dismiss, Suspend, Unsuspend, and Die correctly.
|
||||
|
||||
== 11/18/2014 ==
|
||||
Trevius: Mercenaries can now zone once again.
|
||||
|
||||
== 11/17/2014 ==
|
||||
demonstar55: Correct OP_AugmentInfo reply. This fixes RoF display issue with Adventurer's Stone. Still issues with UF/SoF/SoD though.
|
||||
|
||||
== 11/16/2014 ==
|
||||
demonstar55: fix size issue with ControlBoat_Struct and exploit fix in OP_BoardBoat
|
||||
|
||||
Akkadius: Implemented Automatic Database update and versioning system
|
||||
Akkadius: Created database revision define, this is located in version.h in common #define CURRENT_BINARY_DATABASE_VERSION 9057
|
||||
- This revision define will need to be incremented each time a database update is made
|
||||
- Along with a revision define increment, you will need to update the db_update manifest located in:
|
||||
- https://raw.githubusercontent.com/EQEmu/Server/master/utils/sql/db_update_manifest.txt
|
||||
- An entry needs to be made at the bottom of the manifest, the entry is quite simple
|
||||
- Example: 9057|2014_11_13_spells_new_updates.sql|SHOW COLUMNS FROM `spells_new` LIKE 'disallow_sit'|empty|
|
||||
- This latest example is checking to see if the spells_new table contains the column 'disallow_sit', if its empty, the update needs to be ran
|
||||
- More examples of match types below:
|
||||
# Example: Version|Filename.sql|Query_to_Check_Condition_For_Needed_Update|match type|text to match
|
||||
# 0 = Database Version
|
||||
# 1 = Filename.sql
|
||||
# 2 = Query_to_Check_Condition_For_Needed_Update
|
||||
# 3 = Match Type - If condition from match type to Value 4 is true, update will flag for needing to be ran
|
||||
# contains = If query results contains text from 4th value
|
||||
# match = If query results matches text from 4th value
|
||||
# missing = If query result is missing text from 4th value
|
||||
# empty = If the query results in no results
|
||||
# not_empty = If the query is not empty
|
||||
# 4 = Text to match
|
||||
- The manifest contains all database updates 'Required' to be made to the schema, and it will contain a working backport all the way back to SVN -
|
||||
currently it is tested and backported through the beginning of our Github repo
|
||||
- On world bootup or standalone run of db_update.pl, users will be prompted with a simple menu that we will expand upon later:
|
||||
|
||||
============================================================
|
||||
EQEmu: Automatic Database Upgrade Check
|
||||
============================================================
|
||||
Operating System is: MSWin32
|
||||
(Windows) MySQL is in system path
|
||||
Path = C:\Program Files\MariaDB 10.0\bin/mysql
|
||||
============================================================
|
||||
Binary Database Version: (9057)
|
||||
Local Database Version: (9057)
|
||||
|
||||
Database up to Date: Continuing World Bootup...
|
||||
============================================================
|
||||
Retrieving latest database manifest...
|
||||
URL: https://raw.githubusercontent.com/EQEmu/Server/master/utils/sql/db_update_manifest.txt
|
||||
Saved: db_update/db_update_manifest.txt
|
||||
|
||||
Database Management Menu (Please Select):
|
||||
1) Backup Database - (Saves to Backups folder)
|
||||
Ideal to perform before performing updates
|
||||
2) Backup Database Compressed - (Saves to Backups folder)
|
||||
Ideal to perform before performing updates
|
||||
3) Check for pending Database updates
|
||||
Stages updates for automatic upgrade...
|
||||
0) Exit
|
||||
|
||||
Akkadius: Created db_update.pl, placed in utils/scripts folder, used for the automatic database update routine (Linux/Windows)
|
||||
- db_update.pl script created db_version table if not created, if old one is present it will remove it
|
||||
Akkadius: Created db_dumper.pl, placed in utils/scripts folder, used for the automatic database update routine backups and standalone backups (Linux/Windows)
|
||||
Akkadius: World will now check the db_update.pl script on bootup, if the db_update.pl script is not present, it will fetch it remotely before running -
|
||||
when db_update.pl is done running, world will continue with bootup
|
||||
|
||||
== 11/15/2014 ==
|
||||
Uleat(Natedog): A better fix for OP_ShopPlayerBuy - doesn't cause the issues that I introduced
|
||||
Kayen: Implemented NPC Special Ability 41 'Allow To Tank', gives NPC opportunity to take aggro over a client in melee range.
|
||||
Kayen: Updated swarm pet AI to be consistent with live.
|
||||
|
||||
*OLD AI: Swarm pet would lock on to target until target died, then depop as soon as target died.
|
||||
|
||||
*NEW AI: Swarm pet will attack cast on target, NOT perma locked it can change targets if attacked
|
||||
by something else that generate more hate. When target dies swarm pet will follow owner, if owner is
|
||||
attacked by something else the swarm pet will attack it (until duration timer despawns the pet).
|
||||
|
||||
Kayen: Updated perl quest function: MakeTempPet(Tspell_id, name=nullptr, duration=0, target=nullptr, sticktarg=0)
|
||||
Kayen: Implemented perl quest function: Mob::TypesTempPet(npctypesid, name=nullptr, duration=0, follow=0, target=nullptr, sticktarg=0)
|
||||
Note: 'sticktarg' field will cause the swarm pet to use the OLD AI
|
||||
|
||||
Rule to use OLD AI only - default is disabled.
|
||||
Optional SQL: utils/sql/git/optional/2014_11_15_SwarmPetTargetLock.sql
|
||||
|
||||
== 11/14/2014 ==
|
||||
Secrets: Identified object size and solidtype as flags. Exported them as functions to Perl.
|
||||
demonstar55: Don't use the hack for charms that doesn't work on RoF
|
||||
demonstar55: UF too
|
||||
demonstar55: Tit
|
||||
demonstar55: SoF
|
||||
demonstar55: SoD
|
||||
demonstar55: 62 (untested)
|
||||
|
||||
== 11/13/2014 ==
|
||||
Kayen: Implemented target type (44) 'Beams' (which projects an AE infront of caster with a specified length and width).
|
||||
Kayen: Implemented target type (32) AE Target HateList
|
||||
Kayen: Implemented target type (36) Area Client Only
|
||||
Kayen: Implemented target type (37) Area PC Only
|
||||
Kayen: Implemented target type (39) Group No Pet
|
||||
Uleat: PlayerLogMerchantTransactions does not support partial stack purchase logging at this time
|
||||
|
||||
== 11/12/2014 ==
|
||||
Uleat: Changed 'GMTrainee' struct to reflect the actual client hard-coded max skill count (100) - applies to all currently supported clients (6.2->RoF)
|
||||
|
||||
== 11/11/2014 ==
|
||||
Uleat: Third attempt at a fix for GM trainer zone crashes... (this is starting to look like a KLS fix...)
|
||||
|
||||
== 11/10/2014 ==
|
||||
Uleat: Fix for GM Trainer crashing server (really!)
|
||||
JJ: Yellow faction messages.
|
||||
|
||||
== 11/09/2014 ==
|
||||
Kayen: Implemented support for spell target type (45) 'Target Rings' on Underfoot (does work earlier expansions). Thanks to Lecht for figuring out the op_code side.
|
||||
JJ: Implement new Live-like faction adjustment message using rule Client:UseLiveFactionMessage.
|
||||
Optional SQL: utils/sql/git/optional/2014_11_09_LiveFactionMessages.sql
|
||||
|
||||
== 11/06/2014 ==
|
||||
demonstar55: Tracking default sort will now be correct order
|
||||
Trevius: Fixed dynamic merchant list loading. Allows any merchant to be used in any zone.
|
||||
|
||||
== 11/03/2014 ==
|
||||
Secrets: Fixed an overflow in melee lifetap calculations (int16 vs int32)
|
||||
Secrets: Fixed overflow on AC and ATK values that can go out of range.
|
||||
Secrets: Merc/Bot fixes for previous updates.
|
||||
Secrets: Changed a lot of int16s for stat-related functions to int32 because they were causing combat formula overflows (int16/int32 mismatch).
|
||||
Secrets: Linux fix?
|
||||
|
||||
== 11/02/2014 ==
|
||||
Akkadius: Added out of range checking for Spell Save/Loads
|
||||
|
||||
== 11/01/2014 ==
|
||||
Trevius: Fixed potential crash related to Pets/Mercs buffs when targeting themselves.
|
||||
JJ: (noudess) Revamped faction system. See https://github.com/EQEmu/Server/pull/256
|
||||
|
||||
== 10/28/2014 ==
|
||||
Uleat: Added Client::InterrogateInventory(). Can be invoked by #interrogateinv and is also called when Handle_OP_MoveItem() calls for SwapItemResync()
|
||||
|
||||
== 10/22/2014 ==
|
||||
Uleat: Fix for stacking items in a world object..added a new command option: #peekinv world - will show world container contents, if one is in use by target.
|
||||
|
||||
== 10/20/2014 ==
|
||||
demonstar55: Inspect Buffs rank 1 will now show NPC buffs in target window (SoD+)
|
||||
|
||||
== 10/19/2014 ==
|
||||
Uleat: Updated command #peekinv to display item links properly in RoF clients
|
||||
demonstar55: Group Mentoring in raids
|
||||
demonstar55: Inspect Buffs (text only version) works in raid groups
|
||||
demonstar55: Make use of the Inspect Buffs op/packet. 62 SOL until someone finds its op
|
||||
|
||||
== 10/18/2014==
|
||||
demonstar55: Implement group mentor, sharing leadership exp (SoF+ only)
|
||||
demonstar55: Add gaining of group leadership while in raids
|
||||
|
||||
== 10/16/2014 ==
|
||||
Uleat: Fixed the auto-conversion view naming error and renamed the views in the script files. Added a fix sql for databases that auto-converted.
|
||||
Fix SQL: ../sql/git/bots/deprecated/2014_10_16_Lower_Case_View_Fix.sql
|
||||
|
||||
== 10/15/2014 ==
|
||||
Uleat: Cleaned up load/drop bots sqls, added '../utils/sql/git/bots/deprecated' and '../deprecated/load_bots_old.sql' (use this file on pre-player blob conversion databases.)
|
||||
Notes: I modifed the behavior of both load and drop bots to fail on the first operation if their modifications have been performed already.
|
||||
'load_bots.sql' will explicitly add bot schema, while 'drop_bots.sql' will explicitly drop it. I also added a few lines to change
|
||||
a few altered tables back to their original state - as of the date in the file.
|
||||
|
||||
== 10/13/2014 ==
|
||||
demonstar55: Partially implement leadership and raids
|
||||
Currently working: client side only effects and stat bonuses.
|
||||
Not working: Mark NPC, and other stuff that need extra server side support
|
||||
Currently only UF tested (Tit and 62 may just work, others need packet work)
|
||||
|
||||
== 10/12/2014 ==
|
||||
Akkadius: Fix for LDON Character Stat load
|
||||
|
||||
== 10/11/2014 ==
|
||||
demonstar55: Implement Raid MOTD for UF
|
||||
Don't forget 2014_10_11_RaidMOTD.sql!
|
||||
|
||||
== 10/09/2014 ==
|
||||
Uleat: Added 'BOTS' conversion code to supplement the database 'PlayerProfile' blob conversion that Akkadius recently implemented.
|
||||
Note: This automatic conversion uses the view `vwbotcharactermobs` as an update vector. If you need/would like for the converter to run on
|
||||
previously and/or manually changed code, or just have a need for it to re-run, change the following in the database view and save:
|
||||
"c.`last_login`," to "c.`timelaston`,"
|
||||
"c.`zone_id`" to "c.`zoneid`"
|
||||
"FROM `character_data` AS c" to "FROM `character_old` AS c"
|
||||
** This will only work if you haven't deleted your `character_old` table **
|
||||
|
||||
== 10/07/2014 ==
|
||||
demonstar55: Identified tutorial flag in all charcreate packets, reworked logic to correctly set homes binds
|
||||
|
||||
== 10/05/2014 ==
|
||||
Uleat: Added Server<->Corpse slot translators needed for re-enumeration (inactive until phased in)
|
||||
|
||||
== 10/03/2014 ==
|
||||
Uleat: Fixed Ti(6.2) OP_AugmentInfo translation that I broke (does not currently need and I mis-read a process)
|
||||
Uleat: Moved client patch OP_LootItem slot translation to external handlers
|
||||
|
||||
== 10/02/2014 ==
|
||||
Kayen: Exported to PERL $client->SendSpellAnim(targetid, spellid)
|
||||
This function sends the spell graphic of a spell without actually having to cast the spell.
|
||||
|
||||
== 10/02/2014 ==
|
||||
Uleat: First round of Ti/6.2 translators added - needed for re-enumeration
|
||||
|
||||
== 10/01/2014 ==
|
||||
Kayen: Exported to PERL $client->SendColoredText(color, msg)
|
||||
demonstar55: Exported SendColoredText to lua
|
||||
|
||||
== 09/30/2014 ==
|
||||
Uleat: Implemented click-casting from bag slots for clients that natively support it (RoF)
|
||||
|
||||
== 09/28/2014 ==
|
||||
demonstar55: Add support for post June 18, 2014 Hundred Hands Effect spells (they changed the formula and stuff)
|
||||
set Spells:Jun182014HundredHandsRevamp to true if you're using a spell file from June 18, 2014+
|
||||
|
||||
== 09/27/2014 ==
|
||||
Kayen: Implemented perl function $mob->GetSpellStat(spell_id, identifier, slot);
|
||||
Note: identifier is the stat field in spells_new, slot is used for certain effects like effectid, base,base2, max ect.
|
||||
Example $mob->GetSpellStat(121, "range"); //Returns spell range
|
||||
Example $mob->GetSpellStat(121, "effectid", 1); //Returns the the value of effectid1
|
||||
This will allow you to pull almost all the data for any spell in quest files.
|
||||
demonstar55: Move the client's SetAttackTimer to the end of Client::CalcBonuses to keep the haste in sync
|
||||
demonstar55: Correct haste/slow "stacking" rules
|
||||
demonstar55: Correct SE_AttackSpeed4 to respect unslowable
|
||||
demonstar55: Make the haste be between 1-225 like the client (<100 = slow, >100 = haste) to ...
|
||||
demonstar55: Correct Hundred Hands effect and use formula provided by devs
|
||||
|
||||
== 09/24/2014 ==
|
||||
Uleat: Re-ordered server opcodes and handlers to give them some predictability of location (I need this for the inventory re-enumeration.)
|
||||
demonstar55: Added helper function bool EQEmu::IsTradeskill(uint32 skill)
|
||||
|
||||
== 09/23/2014 ==
|
||||
Kayen: Spell recourse effects will now be applied AFTER the base spells effects have been applied (consistent with live).
|
||||
Kayen: SE_ApplySpell and SE_TriggerSpell will now be applied based on which effect slot they are used in (instead of always before all spell effects are checked).
|
||||
Note: If a spell has multiple SE_TriggerSpell effects within it. Only one will be able to trigger. (If you want multiple spells use SE_ApplySpell)
|
||||
|
||||
== 09/22/2014 ==
|
||||
Akkadius: #resetaa now covers the function of #resetaa and #refundaa
|
||||
- #resetaa will wipe all AA data, refund the spent points into the available points and send character to character select properly
|
||||
Akkadius: Removed #refundaa
|
||||
Akkadius: Removed a lot of debug code for blob conversion
|
||||
Akkadius: Changed status logging for loads/saves to Debug category
|
||||
|
||||
== 09/21/2014 ==
|
||||
Akkadius: Player Profile Blob to Database Conversion
|
||||
- Summary: HUGE difference in database speeds reads/writes and 1:10 datasize difference
|
||||
- The new character storage engine unlike the character_ table before, is able to properly index data and make use of
|
||||
proper MySQL/MariaDB caching optimizations and performance has increased phenominally
|
||||
PERFORMANCE AND STATISTICS FIGURES (Varies on hardware):
|
||||
- EZ Server Character data size of 2.6GB `character_` table alone now takes up approx 600MB
|
||||
- Character Data Loads take approx .03 seconds BEFORE MySQL/MariaDB cache
|
||||
- Character Data Loads take approx .001-.0035 seconds AFTER MySQL/MariaDB cache
|
||||
- Character Data Saves take approx .0001 - .003 for any particular save operation
|
||||
- Database Auto Conversion: When the 'character_' table exists, World boot-up will queue an auto-conversion prompt and convert all of your characters, BACKUP
|
||||
YOUR DATABASE BEFORE CONVERTING, here is an EASY backup script: http://wiki.eqemulator.org/p?MySQL_DB_Backup_Script
|
||||
- On auto conversion, the following tables are created automatically:
|
||||
- Table: `character_skills` - Stores Character Skills
|
||||
- Table: `character_languages` - Stores Character Language
|
||||
- Table: `character_bind` - Stores Character Bind point and Home Bind point designated by is_home bool field
|
||||
- Table: `character_alternate_abilities` - Stores all Character AA
|
||||
- Table: `character_currency` - Stores all Platinum/Gold/Silver/Copper and character related currencies
|
||||
- Table: `character_data` - Stores basic character data (Fields from `character_` table migrated to this table)
|
||||
- Table: `character_spells` - Stores character spells
|
||||
- Table: `character_memmed_spells` - Stores character memorized spells
|
||||
- Table: `character_disciplines` - Stores character disciplines
|
||||
- Table: `character_material` - Stores character armor dye textures
|
||||
- Table: `character_tribute` - Stores character tributes
|
||||
- Table: `character_bandolier` - Stores character bandoliers
|
||||
- Table: `character_inspect_messages` - Stores character inspection messages (Moved from `character_` table)
|
||||
- Table: `character_leadership_abilities` - Stores character Leadership AAs
|
||||
- Loads: Majority of Player profile loads now occur at Client::Handle_Connect_OP_ZoneEntry
|
||||
LoadCharacterFactionValues(uint32 character_id, faction_map & val_list);
|
||||
LoadCharacterSpellBook(uint32 character_id, PlayerProfile_Struct* pp);
|
||||
LoadCharacterMemmedSpells(uint32 character_id, PlayerProfile_Struct* pp);
|
||||
LoadCharacterLanguages(uint32 character_id, PlayerProfile_Struct* pp);
|
||||
LoadCharacterDisciplines(uint32 character_id, PlayerProfile_Struct* pp);
|
||||
LoadCharacterSkills(uint32 character_id, PlayerProfile_Struct* pp);
|
||||
LoadCharacterData(uint32 character_id, PlayerProfile_Struct* pp, ExtendedProfile_Struct* m_epp);
|
||||
LoadCharacterCurrency(uint32 character_id, PlayerProfile_Struct* pp);
|
||||
LoadCharacterBindPoint(uint32 character_id, PlayerProfile_Struct* pp);
|
||||
LoadCharacterMaterialColor(uint32 character_id, PlayerProfile_Struct* pp);
|
||||
LoadCharacterBandolier(uint32 character_id, PlayerProfile_Struct* pp);
|
||||
LoadCharacterTribute(uint32 character_id, PlayerProfile_Struct* pp);
|
||||
LoadCharacterPotions(uint32 character_id, PlayerProfile_Struct* pp);
|
||||
LoadCharacterLeadershipAA(uint32 character_id, PlayerProfile_Struct* pp);
|
||||
- Saves: Occur all over the code now instead of calling full saves
|
||||
SaveCharacterBindPoint(uint32 character_id, uint32 zone_id, uint32 instance_id, float x, float y, float z, float heading, uint8 is_home);
|
||||
SaveCharacterCurrency(uint32 character_id, PlayerProfile_Struct* pp);
|
||||
SaveCharacterData(uint32 character_id, uint32 account_id, PlayerProfile_Struct* pp, ExtendedProfile_Struct* m_epp);
|
||||
SaveCharacterAA(uint32 character_id, uint32 aa_id, uint32 current_level);
|
||||
SaveCharacterSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
|
||||
SaveCharacterMemorizedSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
|
||||
SaveCharacterMaterialColor(uint32 character_id, uint32 slot_id, uint32 color);
|
||||
SaveCharacterSkill(uint32 character_id, uint32 skill_id, uint32 value);
|
||||
SaveCharacterLanguage(uint32 character_id, uint32 lang_id, uint32 value);
|
||||
SaveCharacterDisc(uint32 character_id, uint32 slot_id, uint32 disc_id);
|
||||
SaveCharacterTribute(uint32 character_id, PlayerProfile_Struct* pp);
|
||||
SaveCharacterBandolier(uint32 character_id, uint8 bandolier_id, uint8 bandolier_slot, uint32 item_id, uint32 icon, const char* bandolier_name);
|
||||
SaveCharacterPotionBelt(uint32 character_id, uint8 potion_id, uint32 item_id, uint32 icon);
|
||||
SaveCharacterLeadershipAA(uint32 character_id, PlayerProfile_Struct* pp);
|
||||
- Deletes:
|
||||
DeleteCharacterSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
|
||||
DeleteCharacterMemorizedSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
|
||||
DeleteCharacterDisc(uint32 character_id, uint32 slot_id);
|
||||
DeleteCharacterBandolier(uint32 character_id, uint32 band_id);
|
||||
DeleteCharacterLeadershipAAs(uint32 character_id);
|
||||
- Now occur all over the code and only trigger when necessary
|
||||
- Two FULL saves when looting a corpse, this has been reduced to just currency saves on initial loot and trimmed to one save since AddToMoneyPP did it already
|
||||
- Every time a player moves coin with any situation (Splits/Trades/Merchant/Skills/Bank Coin Exchange/Coin Moves), a full save is made, this is now just a currency save
|
||||
- Every time a player skilled up at a skill vendor, a full blob save hit was made, this is not just a currency hit
|
||||
- Every time an AA was purchased, a full save was made
|
||||
- Every time a spell was scribed/swapped, disc was trained
|
||||
- When a client exists a zone, when a client enters a zone
|
||||
- NOTE: These amount of excessive saves have caused scalability issues that cause the `character_` table to hang which causes process hangs that affect the whole server
|
||||
because of the slowness of the `character_` table and the blob not allowing any indexing to occur
|
||||
- All functions that once depended on the `character_` table are now rewritten to appropriately read from the `character_data` table
|
||||
- Database query errors that occur during conversion or from and load/save/delete character functions are now leveraged via ThrowDBError and logs now go to
|
||||
Server_Folder_Root/eqemu_query_error_log.txt (You cannot log errors natively through MySQL)
|
||||
- DBASYNC IS NOW COMPLETELY REMOVED - This was mainly for Character data async loads/saves and merchantlist loads
|
||||
- Side implementations:
|
||||
Perl Exports:
|
||||
- quest::crosszonesetentityvariablebynpctypeid(npctype_id, id, m_var) - Sets entity variables world wide with specified npctype_id
|
||||
- quest::crosszonesignalnpcbynpctypeid(npctype_id, data) - Signals all NPC entities world wide with specified npctype_id
|
||||
- $client->GetTaskActivityDoneCount(TaskID, ActivityID) - Gets task activity done count by task id and activity id for client entity
|
||||
|
||||
VIEW TABLE SIZE AFTER CONVERT:
|
||||
|
||||
SELECT CONCAT(table_schema, '.', table_name) as table_name,
|
||||
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows,
|
||||
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA,
|
||||
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx,
|
||||
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size,
|
||||
ROUND(index_length / data_length, 2) idxfrac
|
||||
FROM information_schema.TABLES
|
||||
WHERE `table_name` LIKE 'character_%'
|
||||
ORDER BY DATA DESC;
|
||||
|
||||
== 09/20/2014 ==
|
||||
demonstar55: Fix crash in SendEnterWorld on illegally long names
|
||||
demonstar55: The client only lets you enter 15 characters for your name (UF at least)
|
||||
|
||||
+19
-4
@@ -8,7 +8,6 @@ SET(common_sources
|
||||
crc16.cpp
|
||||
crc32.cpp
|
||||
database.cpp
|
||||
dbasync.cpp
|
||||
dbcore.cpp
|
||||
debug.cpp
|
||||
emu_opcodes.cpp
|
||||
@@ -56,8 +55,9 @@ SET(common_sources
|
||||
rulesys.cpp
|
||||
serverinfo.cpp
|
||||
shareddb.cpp
|
||||
skills.cpp
|
||||
spdat.cpp
|
||||
string_util.cpp
|
||||
string_util.cpp
|
||||
struct_strategy.cpp
|
||||
tcp_connection.cpp
|
||||
tcp_server.cpp
|
||||
@@ -72,6 +72,7 @@ SET(common_sources
|
||||
patches/sod.cpp
|
||||
patches/sof.cpp
|
||||
patches/rof.cpp
|
||||
patches/rof2.cpp
|
||||
patches/titanium.cpp
|
||||
patches/underfoot.cpp
|
||||
SocketLib/Base64.cpp
|
||||
@@ -103,8 +104,8 @@ SET(common_headers
|
||||
crash.h
|
||||
crc16.h
|
||||
crc32.h
|
||||
data_verification.h
|
||||
database.h
|
||||
dbasync.h
|
||||
dbcore.h
|
||||
debug.h
|
||||
deity.h
|
||||
@@ -168,6 +169,7 @@ SET(common_headers
|
||||
ptimer.h
|
||||
queue.h
|
||||
races.h
|
||||
random.h
|
||||
rdtsc.h
|
||||
rulesys.h
|
||||
ruletypes.h
|
||||
@@ -216,6 +218,11 @@ SET(common_headers
|
||||
patches/rof_itemfields.h
|
||||
patches/rof_ops.h
|
||||
patches/rof_structs.h
|
||||
patches/rof2.h
|
||||
patches/rof2_constants.h
|
||||
patches/rof2_itemfields.h
|
||||
patches/rof2_ops.h
|
||||
patches/rof2_structs.h
|
||||
patches/titanium.h
|
||||
patches/titanium_constants.h
|
||||
patches/titanium_itemfields.h
|
||||
@@ -269,6 +276,11 @@ SOURCE_GROUP(Patches FILES
|
||||
patches/rof_ops.h
|
||||
patches/rof_constants.h
|
||||
patches/rof_structs.h
|
||||
patches/rof2.h
|
||||
patches/rof2_itemfields.h
|
||||
patches/rof2_ops.h
|
||||
patches/rof2_constants.h
|
||||
patches/rof2_structs.h
|
||||
patches/titanium.h
|
||||
patches/titanium_itemfields.h
|
||||
patches/titanium_ops.h
|
||||
@@ -284,6 +296,7 @@ SOURCE_GROUP(Patches FILES
|
||||
patches/sod.cpp
|
||||
patches/sof.cpp
|
||||
patches/rof.cpp
|
||||
patches/rof2.cpp
|
||||
patches/titanium.cpp
|
||||
patches/underfoot.cpp
|
||||
)
|
||||
@@ -334,7 +347,9 @@ ADD_LIBRARY(common ${common_sources} ${common_headers})
|
||||
|
||||
IF(UNIX)
|
||||
ADD_DEFINITIONS(-fPIC)
|
||||
SET_SOURCE_FILES_PROPERTIES("patches/sod.cpp" "patches/sof.cpp" "patches/rof.cpp" "patches/underfoot.cpp" PROPERTIES COMPILE_FLAGS -O0)
|
||||
SET_SOURCE_FILES_PROPERTIES("SocketLib/Mime.cpp" PROPERTY COMPILE_FLAGS -Wno-unused-result)
|
||||
SET_SOURCE_FILES_PROPERTIES("patches/sod.cpp" "patches/sof.cpp" "patches/rof.cpp" "patches/rof2.cpp" "patches/underfoot.cpp" PROPERTIES COMPILE_FLAGS -O0)
|
||||
ENDIF(UNIX)
|
||||
|
||||
|
||||
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||
|
||||
@@ -290,50 +290,3 @@ const char* GetEQClassName(uint8 class_, uint8 level) {
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetArrayEQClass(uint8 eqclass) {
|
||||
switch (eqclass) {
|
||||
case WARRIOR:
|
||||
return WARRIOR;
|
||||
case CLERIC:
|
||||
return CLERIC;
|
||||
case PALADIN:
|
||||
return PALADIN;
|
||||
case RANGER:
|
||||
return RANGER;
|
||||
case SHADOWKNIGHT:
|
||||
return SHADOWKNIGHT;
|
||||
case DRUID:
|
||||
return DRUID;
|
||||
case MONK:
|
||||
return MONK;
|
||||
case BARD:
|
||||
return BARD;
|
||||
case ROGUE:
|
||||
return ROGUE;
|
||||
case SHAMAN:
|
||||
return SHAMAN;
|
||||
case NECROMANCER:
|
||||
return NECROMANCER;
|
||||
case WIZARD:
|
||||
return WIZARD;
|
||||
case MAGICIAN:
|
||||
return MAGICIAN;
|
||||
case ENCHANTER:
|
||||
return ENCHANTER;
|
||||
case BEASTLORD:
|
||||
return BEASTLORD;
|
||||
case BERSERKER:
|
||||
return BERSERKER;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
uint8 GetEQArrayEQClass(uint8 eqclass) {
|
||||
if (eqclass >= WARRIOR && eqclass <= BERSERKER)
|
||||
return eqclass - WARRIOR;
|
||||
if (eqclass >= WARRIORGM && eqclass <= BERSERKERGM)
|
||||
return eqclass - WARRIORGM;
|
||||
return WARRIOR;
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,5 @@
|
||||
#define call_1 65536
|
||||
|
||||
const char* GetEQClassName(uint8 class_, uint8 level = 0);
|
||||
uint32 GetArrayEQClass(uint8 eqclass);
|
||||
uint8 GetEQArrayEQClass(uint8 eqclass);
|
||||
#endif
|
||||
|
||||
|
||||
+39
-5
@@ -17,7 +17,8 @@ static const uint32 BIT_RoFAndLater = 0xFFFFFFE0;
|
||||
static const uint32 BIT_RoF2AndLater = 0xFFFFFFC0;
|
||||
static const uint32 BIT_AllClients = 0xFFFFFFFF;
|
||||
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
EQClientUnknown = 0,
|
||||
EQClient62, // Build: 'Aug 4 2005 15:40:59'
|
||||
EQClientTitanium, // Build: 'Oct 31 2005 10:33:37'
|
||||
@@ -26,17 +27,50 @@ typedef enum {
|
||||
EQClientUnderfoot, // Build: 'Jun 8 2010 16:44:32'
|
||||
EQClientRoF, // Build: 'Dec 10 2012 17:35:44'
|
||||
EQClientRoF2, // Build: 'May 10 2013 23:30:08'
|
||||
|
||||
|
||||
_EQClientCount, // place new clients before this point (preferably, in release/attribute order)
|
||||
|
||||
|
||||
// Values below are not implemented, as yet...
|
||||
|
||||
|
||||
EmuNPC = _EQClientCount,
|
||||
EmuMerc,
|
||||
EmuBot,
|
||||
EmuPet,
|
||||
|
||||
|
||||
_EmuClientCount // array size for EQLimits
|
||||
} EQClientVersion;
|
||||
|
||||
static const char* EQClientVersionName(EQClientVersion version)
|
||||
{
|
||||
switch (version)
|
||||
{
|
||||
case EQClientUnknown:
|
||||
return "EQClientUnknown";
|
||||
case EQClient62:
|
||||
return "EQClient62";
|
||||
case EQClientTitanium:
|
||||
return "EQClientTitanium";
|
||||
case EQClientSoF:
|
||||
return "EQClientSoF";
|
||||
case EQClientSoD:
|
||||
return "EQClientSoD";
|
||||
case EQClientUnderfoot:
|
||||
return "EQClientUnderfoot";
|
||||
case EQClientRoF:
|
||||
return "EQClientRoF";
|
||||
case EQClientRoF2:
|
||||
return "EQClientRoF2";
|
||||
case EmuNPC:
|
||||
return "EmuNPC";
|
||||
case EmuMerc:
|
||||
return "EmuMerc";
|
||||
case EmuBot:
|
||||
return "EmuBot";
|
||||
case EmuPet:
|
||||
return "EmuPet";
|
||||
default:
|
||||
return "ERROR: Invalid EQClientVersion";
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* CLIENTVERSIONS_H */
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#ifndef COMMON_DATA_VERIFICATION_H
|
||||
#define COMMON_DATA_VERIFICATION_H
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace EQEmu
|
||||
{
|
||||
|
||||
template <typename T>
|
||||
T Clamp(const T& value, const T& lower, const T& upper) {
|
||||
return std::max(lower, std::min(value, upper));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T ClampLower(const T& value, const T& lower) {
|
||||
return std::max(lower, value);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T ClampUpper(const T& value, const T& upper) {
|
||||
return std::min(value, upper);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
bool ValueWithin(const T& value, const T& lower, const T& upper) {
|
||||
return value >= lower && value <= upper;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
+2269
-548
File diff suppressed because it is too large
Load Diff
+429
-23
@@ -26,12 +26,6 @@
|
||||
#include "dbcore.h"
|
||||
#include "linked_list.h"
|
||||
#include "eq_packet_structs.h"
|
||||
/*#include "eq_stream.h"
|
||||
#include "guilds.h"
|
||||
#include "misc_functions.h"
|
||||
#include "mutex.h"
|
||||
#include "item.h"
|
||||
#include "extprofile.h"*/
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
@@ -47,6 +41,7 @@ class SpawnGroupList;
|
||||
class Petition;
|
||||
class Client;
|
||||
class Merc;
|
||||
class MySQLRequestResult;
|
||||
struct Combine_Struct;
|
||||
//struct Faction;
|
||||
//struct FactionMods;
|
||||
@@ -74,21 +69,15 @@ uint8 eventid;
|
||||
EventLogDetails_Struct eld[255];
|
||||
};
|
||||
|
||||
|
||||
// Added By Hogie
|
||||
// INSERT into variables (varname,value) values('decaytime [minlevel] [maxlevel]','[number of seconds]');
|
||||
// IE: decaytime 1 54 = Levels 1 through 54
|
||||
// decaytime 55 100 = Levels 55 through 100
|
||||
// It will always put the LAST time for the level (I think) from the Database
|
||||
struct npcDecayTimes_Struct {
|
||||
uint16 minlvl;
|
||||
uint16 maxlvl;
|
||||
uint32 seconds;
|
||||
};
|
||||
// Added By Hogie -- End
|
||||
|
||||
|
||||
struct VarCache_Struct {
|
||||
char varname[26]; // varname is char(25) in database
|
||||
char varname[26];
|
||||
char value[0];
|
||||
};
|
||||
|
||||
@@ -99,6 +88,411 @@ struct ExtendedProfile_Struct;
|
||||
struct GuildMember_Struct;
|
||||
class PTimerList;
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
/* Conversion Structs */
|
||||
|
||||
namespace Convert {
|
||||
struct BindStruct {
|
||||
/*000*/ uint32 zoneId;
|
||||
/*004*/ float x;
|
||||
/*008*/ float y;
|
||||
/*012*/ float z;
|
||||
/*016*/ float heading;
|
||||
};
|
||||
struct Color_Struct
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
uint8 blue;
|
||||
uint8 green;
|
||||
uint8 red;
|
||||
uint8 use_tint; // if there's a tint this is FF
|
||||
} rgb;
|
||||
uint32 color;
|
||||
};
|
||||
};
|
||||
struct AA_Array
|
||||
{
|
||||
uint32 AA;
|
||||
uint32 value;
|
||||
};
|
||||
struct SpellBuff_Struct
|
||||
{
|
||||
/*000*/ uint8 slotid; //badly named... seems to be 2 for a real buff, 0 otherwise
|
||||
/*001*/ uint8 level;
|
||||
/*002*/ uint8 bard_modifier;
|
||||
/*003*/ uint8 effect; //not real
|
||||
/*004*/ uint32 spellid;
|
||||
/*008*/ uint32 duration;
|
||||
/*012*/ uint32 counters;
|
||||
/*016*/ uint32 player_id; //'global' ID of the caster, for wearoff messages
|
||||
/*020*/
|
||||
};
|
||||
struct Tribute_Struct {
|
||||
uint32 tribute;
|
||||
uint32 tier;
|
||||
};
|
||||
struct Disciplines_Struct {
|
||||
uint32 values[MAX_PP_DISCIPLINES];
|
||||
};
|
||||
struct GroupLeadershipAA_Struct {
|
||||
union {
|
||||
struct {
|
||||
uint32 groupAAMarkNPC;
|
||||
uint32 groupAANPCHealth;
|
||||
uint32 groupAADelegateMainAssist;
|
||||
uint32 groupAADelegateMarkNPC;
|
||||
uint32 groupAA4;
|
||||
uint32 groupAA5;
|
||||
uint32 groupAAInspectBuffs;
|
||||
uint32 groupAA7;
|
||||
uint32 groupAASpellAwareness;
|
||||
uint32 groupAAOffenseEnhancement;
|
||||
uint32 groupAAManaEnhancement;
|
||||
uint32 groupAAHealthEnhancement;
|
||||
uint32 groupAAHealthRegeneration;
|
||||
uint32 groupAAFindPathToPC;
|
||||
uint32 groupAAHealthOfTargetsTarget;
|
||||
uint32 groupAA15;
|
||||
};
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct RaidLeadershipAA_Struct {
|
||||
union {
|
||||
struct {
|
||||
uint32 raidAAMarkNPC;
|
||||
uint32 raidAANPCHealth;
|
||||
uint32 raidAADelegateMainAssist;
|
||||
uint32 raidAADelegateMarkNPC;
|
||||
uint32 raidAA4;
|
||||
uint32 raidAA5;
|
||||
uint32 raidAA6;
|
||||
uint32 raidAASpellAwareness;
|
||||
uint32 raidAAOffenseEnhancement;
|
||||
uint32 raidAAManaEnhancement;
|
||||
uint32 raidAAHealthEnhancement;
|
||||
uint32 raidAAHealthRegeneration;
|
||||
uint32 raidAAFindPathToPC;
|
||||
uint32 raidAAHealthOfTargetsTarget;
|
||||
uint32 raidAA14;
|
||||
uint32 raidAA15;
|
||||
};
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct LeadershipAA_Struct {
|
||||
union {
|
||||
struct {
|
||||
Convert::GroupLeadershipAA_Struct group;
|
||||
Convert::RaidLeadershipAA_Struct raid;
|
||||
};
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
typedef struct
|
||||
{
|
||||
/*00*/ char Name[64];
|
||||
/*64*/ uint32 Level;
|
||||
/*68*/ uint32 Race;
|
||||
/*72*/ uint32 Class;
|
||||
/*76*/ uint32 Zone;
|
||||
/*80*/ uint32 Time;
|
||||
/*84*/ uint32 Points;
|
||||
/*88*/
|
||||
} PVPStatsEntry_Struct;
|
||||
struct BandolierItem_Struct {
|
||||
uint32 item_id;
|
||||
uint32 icon;
|
||||
char item_name[64];
|
||||
};
|
||||
struct Bandolier_Struct {
|
||||
char name[32];
|
||||
Convert::BandolierItem_Struct items[EmuConstants::BANDOLIER_SIZE];
|
||||
};
|
||||
struct PotionBelt_Struct {
|
||||
Convert::BandolierItem_Struct items[EmuConstants::POTION_BELT_SIZE];
|
||||
};
|
||||
struct SuspendedMinion_Struct
|
||||
{
|
||||
/*000*/ uint16 SpellID;
|
||||
/*002*/ uint32 HP;
|
||||
/*006*/ uint32 Mana;
|
||||
/*010*/ Convert::SpellBuff_Struct Buffs[BUFF_COUNT];
|
||||
/*510*/ uint32 Items[_MaterialCount];
|
||||
/*546*/ char Name[64];
|
||||
/*610*/
|
||||
};
|
||||
|
||||
struct PlayerProfile_Struct {
|
||||
/*0000*/ uint32 checksum; // Checksum from CRC32::SetEQChecksum
|
||||
/*0004*/ char name[64]; // Name of player sizes not right
|
||||
/*0068*/ char last_name[32]; // Last name of player sizes not right
|
||||
/*0100*/ uint32 gender; // Player Gender - 0 Male, 1 Female
|
||||
/*0104*/ uint32 race; // Player race
|
||||
/*0108*/ uint32 class_; // Player class
|
||||
/*0112*/ uint32 unknown0112; //
|
||||
/*0116*/ uint32 level; // Level of player (might be one byte)
|
||||
/*0120*/ Convert::BindStruct binds[5]; // Bind points (primary is first, home city is fifth)
|
||||
/*0220*/ uint32 deity; // deity
|
||||
/*0224*/ uint32 guild_id;
|
||||
/*0228*/ uint32 birthday; // characters bday
|
||||
/*0232*/ uint32 lastlogin; // last login or zone time
|
||||
/*0236*/ uint32 timePlayedMin; // in minutes
|
||||
/*0240*/ uint8 pvp;
|
||||
/*0241*/ uint8 level2; //no idea why this is here, but thats how it is on live
|
||||
/*0242*/ uint8 anon; // 2=roleplay, 1=anon, 0=not anon
|
||||
/*0243*/ uint8 gm;
|
||||
/*0244*/ uint8 guildrank;
|
||||
/*0245*/ uint8 guildbanker;
|
||||
/*0246*/ uint8 unknown0246[6]; //
|
||||
/*0252*/ uint32 intoxication;
|
||||
/*0256*/ uint32 spellSlotRefresh[MAX_PP_REF_MEMSPELL]; //in ms
|
||||
/*0292*/ uint32 abilitySlotRefresh;
|
||||
/*0296*/ uint8 haircolor; // Player hair color
|
||||
/*0297*/ uint8 beardcolor; // Player beard color
|
||||
/*0298*/ uint8 eyecolor1; // Player left eye color
|
||||
/*0299*/ uint8 eyecolor2; // Player right eye color
|
||||
/*0300*/ uint8 hairstyle; // Player hair style
|
||||
/*0301*/ uint8 beard; // Beard type
|
||||
/*0302*/ uint8 ability_time_seconds; //The following four spots are unknown right now.....
|
||||
/*0303*/ uint8 ability_number; //ability used
|
||||
/*0304*/ uint8 ability_time_minutes;
|
||||
/*0305*/ uint8 ability_time_hours; //place holder
|
||||
/*0306*/ uint8 unknown0306[6]; // @bp Spacer/Flag?
|
||||
/*0312*/ uint32 item_material[_MaterialCount]; // Item texture/material of worn/held items
|
||||
/*0348*/ uint8 unknown0348[44];
|
||||
/*0392*/ Convert::Color_Struct item_tint[_MaterialCount];
|
||||
/*0428*/ Convert::AA_Array aa_array[MAX_PP_AA_ARRAY];
|
||||
/*2348*/ float unknown2384; //seen ~128, ~47
|
||||
/*2352*/ char servername[32]; // length probably not right
|
||||
/*2384*/ char title[32]; // length might be wrong
|
||||
/*2416*/ char suffix[32]; // length might be wrong
|
||||
/*2448*/ uint32 guildid2; //
|
||||
/*2452*/ uint32 exp; // Current Experience
|
||||
/*2456*/ uint32 unknown2492;
|
||||
/*2460*/ uint32 points; // Unspent Practice points
|
||||
/*2464*/ uint32 mana; // current mana
|
||||
/*2468*/ uint32 cur_hp; // current hp
|
||||
/*2472*/ uint32 unknown2508; // 0x05
|
||||
/*2476*/ uint32 STR; // Strength
|
||||
/*2480*/ uint32 STA; // Stamina
|
||||
/*2484*/ uint32 CHA; // Charisma
|
||||
/*2488*/ uint32 DEX; // Dexterity
|
||||
/*2492*/ uint32 INT; // Intelligence
|
||||
/*2496*/ uint32 AGI; // Agility
|
||||
/*2500*/ uint32 WIS; // Wisdom
|
||||
/*2504*/ uint8 face; // Player face
|
||||
/*2505*/ uint8 unknown2541[47]; // ?
|
||||
/*2552*/ uint8 languages[MAX_PP_LANGUAGE];
|
||||
/*2580*/ uint8 unknown2616[4];
|
||||
/*2584*/ uint32 spell_book[MAX_PP_REF_SPELLBOOK];
|
||||
/*4504*/ uint8 unknown4540[128]; // Was [428] all 0xff
|
||||
/*4632*/ uint32 mem_spells[MAX_PP_REF_MEMSPELL];
|
||||
/*4668*/ uint8 unknown4704[32]; //
|
||||
/*4700*/ float y; // Player y position
|
||||
/*4704*/ float x; // Player x position
|
||||
/*4708*/ float z; // Player z position
|
||||
/*4712*/ float heading; // Direction player is facing
|
||||
/*4716*/ uint8 unknown4752[4]; //
|
||||
/*4720*/ int32 platinum; // Platinum Pieces on player
|
||||
/*4724*/ int32 gold; // Gold Pieces on player
|
||||
/*4728*/ int32 silver; // Silver Pieces on player
|
||||
/*4732*/ int32 copper; // Copper Pieces on player
|
||||
/*4736*/ int32 platinum_bank; // Platinum Pieces in Bank
|
||||
/*4740*/ int32 gold_bank; // Gold Pieces in Bank
|
||||
/*4744*/ int32 silver_bank; // Silver Pieces in Bank
|
||||
/*4748*/ int32 copper_bank; // Copper Pieces in Bank
|
||||
/*4752*/ int32 platinum_cursor; // Platinum on cursor
|
||||
/*4756*/ int32 gold_cursor; // Gold on cursor
|
||||
/*4760*/ int32 silver_cursor; // Silver on cursor
|
||||
/*4764*/ int32 copper_cursor; // Copper on cursor
|
||||
/*4768*/ int32 platinum_shared; // Platinum shared between characters
|
||||
/*4772*/ uint8 unknown4808[24];
|
||||
/*4796*/ uint32 skills[MAX_PP_SKILL]; // [400] List of skills // 100 dword buffer
|
||||
/*5196*/ uint8 unknown5132[184];
|
||||
/*5380*/ uint32 pvp2; //
|
||||
/*5384*/ uint32 unknown5420; //
|
||||
/*5388*/ uint32 pvptype; //
|
||||
/*5392*/ uint32 unknown5428; //
|
||||
/*5396*/ uint32 ability_down; // Guessing
|
||||
/*5400*/ uint8 unknown5436[8]; //
|
||||
/*5408*/ uint32 autosplit; //not used right now
|
||||
/*5412*/ uint8 unknown5448[8];
|
||||
/*5420*/ uint32 zone_change_count; // Number of times user has zoned in their career (guessing)
|
||||
/*5424*/ uint8 unknown5460[16]; //
|
||||
/*5440*/ uint32 drakkin_heritage; //
|
||||
/*5444*/ uint32 drakkin_tattoo; //
|
||||
/*5448*/ uint32 drakkin_details; //
|
||||
/*5452*/ uint32 expansions; // expansion setting, bit field of expansions avaliable
|
||||
/*5456*/ int32 toxicity; //from drinking potions, seems to increase by 3 each time you drink
|
||||
/*5460*/ char unknown5496[16]; //
|
||||
/*5476*/ int32 hunger_level;
|
||||
/*5480*/ int32 thirst_level;
|
||||
/*5484*/ uint32 ability_up;
|
||||
/*5488*/ char unknown5524[16];
|
||||
/*5504*/ uint16 zone_id; // Current zone of the player
|
||||
/*5506*/ uint16 zoneInstance; // Instance ID
|
||||
/*5508*/ Convert::SpellBuff_Struct buffs[BUFF_COUNT]; // Buffs currently on the player
|
||||
/*6008*/ char groupMembers[6][64];//
|
||||
/*6392*/ char unknown6428[656];
|
||||
/*7048*/ uint32 entityid;
|
||||
/*7052*/ uint32 leadAAActive;
|
||||
/*7056*/ uint32 unknown7092;
|
||||
/*7060*/ int32 ldon_points_guk; //client uses these as signed
|
||||
/*7064*/ int32 ldon_points_mir;
|
||||
/*7068*/ int32 ldon_points_mmc;
|
||||
/*7072*/ int32 ldon_points_ruj;
|
||||
/*7076*/ int32 ldon_points_tak;
|
||||
/*7080*/ int32 ldon_points_available;
|
||||
/*7084*/ int32 ldon_wins_guk;
|
||||
/*7088*/ int32 ldon_wins_mir;
|
||||
/*7092*/ int32 ldon_wins_mmc;
|
||||
/*7096*/ int32 ldon_wins_ruj;
|
||||
/*7100*/ int32 ldon_wins_tak;
|
||||
/*7104*/ int32 ldon_losses_guk;
|
||||
/*7108*/ int32 ldon_losses_mir;
|
||||
/*7112*/ int32 ldon_losses_mmc;
|
||||
/*7116*/ int32 ldon_losses_ruj;
|
||||
/*7120*/ int32 ldon_losses_tak;
|
||||
/*7124*/ uint8 unknown7160[72];
|
||||
/*7196*/ uint32 tribute_time_remaining; //in miliseconds
|
||||
/*7200*/ uint32 showhelm;
|
||||
/*7204*/ uint32 career_tribute_points;
|
||||
/*7208*/ uint32 unknown7244;
|
||||
/*7212*/ uint32 tribute_points;
|
||||
/*7216*/ uint32 unknown7252;
|
||||
/*7220*/ uint32 tribute_active; //1=active
|
||||
/*7224*/ Convert::Tribute_Struct tributes[EmuConstants::TRIBUTE_SIZE];
|
||||
/*7264*/ Convert::Disciplines_Struct disciplines;
|
||||
/*7664*/ uint32 recastTimers[MAX_RECAST_TYPES]; // Timers (GMT of last use)
|
||||
/*7744*/ char unknown7780[160];
|
||||
/*7904*/ uint32 endurance;
|
||||
/*7908*/ uint32 group_leadership_exp; //0-1000
|
||||
/*7912*/ uint32 raid_leadership_exp; //0-2000
|
||||
/*7916*/ uint32 group_leadership_points;
|
||||
/*7920*/ uint32 raid_leadership_points;
|
||||
/*7924*/ Convert::LeadershipAA_Struct leader_abilities;
|
||||
/*8052*/ uint8 unknown8088[132];
|
||||
/*8184*/ uint32 air_remaining;
|
||||
/*8188*/ uint32 PVPKills;
|
||||
/*8192*/ uint32 PVPDeaths;
|
||||
/*8196*/ uint32 PVPCurrentPoints;
|
||||
/*8200*/ uint32 PVPCareerPoints;
|
||||
/*8204*/ uint32 PVPBestKillStreak;
|
||||
/*8208*/ uint32 PVPWorstDeathStreak;
|
||||
/*8212*/ uint32 PVPCurrentKillStreak;
|
||||
/*8216*/ Convert::PVPStatsEntry_Struct PVPLastKill;
|
||||
/*8304*/ Convert::PVPStatsEntry_Struct PVPLastDeath;
|
||||
/*8392*/ uint32 PVPNumberOfKillsInLast24Hours;
|
||||
/*8396*/ Convert::PVPStatsEntry_Struct PVPRecentKills[50];
|
||||
/*12796*/ uint32 aapoints_spent;
|
||||
/*12800*/ uint32 expAA;
|
||||
/*12804*/ uint32 aapoints; //avaliable, unspent
|
||||
/*12808*/ uint8 unknown12844[36];
|
||||
/*12844*/ Convert::Bandolier_Struct bandoliers[EmuConstants::BANDOLIERS_COUNT];
|
||||
/*14124*/ uint8 unknown14160[4506];
|
||||
/*18630*/ Convert::SuspendedMinion_Struct SuspendedMinion; // No longer in use
|
||||
/*19240*/ uint32 timeentitledonaccount;
|
||||
/*19244*/ Convert::PotionBelt_Struct potionbelt; //there should be 3 more of these
|
||||
/*19532*/ uint8 unknown19568[8];
|
||||
/*19540*/ uint32 currentRadCrystals; // Current count of radiant crystals
|
||||
/*19544*/ uint32 careerRadCrystals; // Total count of radiant crystals ever
|
||||
/*19548*/ uint32 currentEbonCrystals;// Current count of ebon crystals
|
||||
/*19552*/ uint32 careerEbonCrystals; // Total count of ebon crystals ever
|
||||
/*19556*/ uint8 groupAutoconsent; // 0=off, 1=on
|
||||
/*19557*/ uint8 raidAutoconsent; // 0=off, 1=on
|
||||
/*19558*/ uint8 guildAutoconsent; // 0=off, 1=on
|
||||
/*19559*/ uint8 unknown19595[5]; // ***Placeholder (6/29/2005)
|
||||
/*19564*/ uint32 RestTimer;
|
||||
/*19568*/
|
||||
};
|
||||
|
||||
|
||||
namespace player_lootitem_temp
|
||||
{
|
||||
struct ServerLootItem_Struct_temp {
|
||||
uint32 item_id;
|
||||
int16 equipSlot;
|
||||
uint8 charges;
|
||||
uint16 lootslot;
|
||||
uint32 aug1;
|
||||
uint32 aug2;
|
||||
uint32 aug3;
|
||||
uint32 aug4;
|
||||
uint32 aug5;
|
||||
};
|
||||
}
|
||||
|
||||
struct DBPlayerCorpse_Struct_temp {
|
||||
uint32 crc;
|
||||
bool locked;
|
||||
uint32 itemcount;
|
||||
uint32 exp;
|
||||
float size;
|
||||
uint8 level;
|
||||
uint8 race;
|
||||
uint8 gender;
|
||||
uint8 class_;
|
||||
uint8 deity;
|
||||
uint8 texture;
|
||||
uint8 helmtexture;
|
||||
uint32 copper;
|
||||
uint32 silver;
|
||||
uint32 gold;
|
||||
uint32 plat;
|
||||
Color_Struct item_tint[9];
|
||||
uint8 haircolor;
|
||||
uint8 beardcolor;
|
||||
uint8 eyecolor1;
|
||||
uint8 eyecolor2;
|
||||
uint8 hairstyle;
|
||||
uint8 face;
|
||||
uint8 beard;
|
||||
uint32 drakkin_heritage;
|
||||
uint32 drakkin_tattoo;
|
||||
uint32 drakkin_details;
|
||||
player_lootitem_temp::ServerLootItem_Struct_temp items[0];
|
||||
};
|
||||
|
||||
namespace classic_db_temp {
|
||||
struct DBPlayerCorpse_Struct_temp {
|
||||
uint32 crc;
|
||||
bool locked;
|
||||
uint32 itemcount;
|
||||
uint32 exp;
|
||||
float size;
|
||||
uint8 level;
|
||||
uint8 race;
|
||||
uint8 gender;
|
||||
uint8 class_;
|
||||
uint8 deity;
|
||||
uint8 texture;
|
||||
uint8 helmtexture;
|
||||
uint32 copper;
|
||||
uint32 silver;
|
||||
uint32 gold;
|
||||
uint32 plat;
|
||||
Color_Struct item_tint[9];
|
||||
uint8 haircolor;
|
||||
uint8 beardcolor;
|
||||
uint8 eyecolor1;
|
||||
uint8 eyecolor2;
|
||||
uint8 hairstyle;
|
||||
uint8 face;
|
||||
uint8 beard;
|
||||
player_lootitem_temp::ServerLootItem_Struct_temp items[0];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#pragma pack()
|
||||
|
||||
class Database : public DBcore {
|
||||
public:
|
||||
Database();
|
||||
@@ -106,9 +500,14 @@ public:
|
||||
bool Connect(const char* host, const char* user, const char* passwd, const char* database,uint32 port);
|
||||
~Database();
|
||||
|
||||
|
||||
/*
|
||||
* General Character Related Stuff
|
||||
*/
|
||||
|
||||
/* Character Creation */
|
||||
bool SaveCharacterCreate(uint32 character_id, uint32 account_id, PlayerProfile_Struct* pp);
|
||||
|
||||
bool MoveCharacterToZone(const char* charname, const char* zonename);
|
||||
bool MoveCharacterToZone(const char* charname, const char* zonename,uint32 zoneid);
|
||||
bool MoveCharacterToZone(uint32 iCharID, const char* iZonename);
|
||||
@@ -118,9 +517,8 @@ public:
|
||||
bool AddToNameFilter(const char* name);
|
||||
bool ReserveName(uint32 account_id, char* name);
|
||||
bool CreateCharacter(uint32 account_id, char* name, uint16 gender, uint16 race, uint16 class_, uint8 str, uint8 sta, uint8 cha, uint8 dex, uint8 int_, uint8 agi, uint8 wis, uint8 face);
|
||||
bool StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inventory* inv, ExtendedProfile_Struct *ext);
|
||||
bool StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inventory* inv);
|
||||
bool DeleteCharacter(char* name);
|
||||
uint8 CopyCharacter(const char* oldname, const char* newname, uint32 acctid);
|
||||
|
||||
/*
|
||||
* General Information Getting Queries
|
||||
@@ -175,8 +573,7 @@ public:
|
||||
* Adventure related.
|
||||
*/
|
||||
void UpdateAdventureStatsEntry(uint32 char_id, uint8 theme, bool win);
|
||||
bool GetAdventureStats(uint32 char_id, uint32 &guk_w, uint32 &mir_w, uint32 &mmc_w, uint32 &ruj_w, uint32 &tak_w,
|
||||
uint32 &guk_l, uint32 &mir_l, uint32 &mmc_l, uint32 &ruj_l, uint32 &tak_l);
|
||||
bool GetAdventureStats(uint32 char_id, AdventureStats_Struct *as);
|
||||
|
||||
/*
|
||||
* Account Related
|
||||
@@ -205,7 +602,7 @@ public:
|
||||
|
||||
void SetGroupLeaderName(uint32 gid, const char* name);
|
||||
char* GetGroupLeadershipInfo(uint32 gid, char* leaderbuf, char* maintank = nullptr, char* assist = nullptr, char* puller = nullptr, char *marknpc = nullptr,
|
||||
GroupLeadershipAA_Struct* GLAA = nullptr);
|
||||
char *mentoree = nullptr, int *mentor_percent = nullptr, GroupLeadershipAA_Struct* GLAA = nullptr);
|
||||
void ClearGroupLeader(uint32 gid = 0);
|
||||
|
||||
|
||||
@@ -216,6 +613,18 @@ public:
|
||||
void ClearRaidDetails(uint32 rid = 0);
|
||||
uint32 GetRaidID(const char* name);
|
||||
const char *GetRaidLeaderName(uint32 rid);
|
||||
void GetGroupLeadershipInfo(uint32 gid, uint32 rid, char* maintank = nullptr, char* assist = nullptr, char* puller = nullptr, char *marknpc = nullptr,
|
||||
char *mentoree = nullptr, int *mentor_percent = nullptr, GroupLeadershipAA_Struct* GLAA = nullptr);
|
||||
void GetRaidLeadershipInfo(uint32 rid, char* maintank = nullptr, char* assist = nullptr, char* puller = nullptr, char *marknpc = nullptr,
|
||||
RaidLeadershipAA_Struct* RLAA = nullptr);
|
||||
void SetRaidGroupLeaderInfo(uint32 gid, uint32 rid);
|
||||
void ClearRaidLeader(uint32 gid = 0xFFFFFFFF, uint32 rid = 0);
|
||||
|
||||
/* Database Conversions*/
|
||||
bool CheckDatabaseConversions();
|
||||
bool CheckDatabaseConvertPPDeblob();
|
||||
bool CheckDatabaseConvertCorpseDeblob();
|
||||
bool CheckDatabaseConvertBotsPostPPDeblob();
|
||||
|
||||
/*
|
||||
* Database Variables
|
||||
@@ -250,10 +659,6 @@ public:
|
||||
void SetLoginFlags(uint32 CharID, bool LFP, bool LFG, uint8 firstlogon);
|
||||
void AddReport(std::string who, std::string against, std::string lines);
|
||||
|
||||
|
||||
protected:
|
||||
void HandleMysqlError(uint32 errnum);
|
||||
|
||||
private:
|
||||
void DBInitVars();
|
||||
|
||||
@@ -277,6 +682,7 @@ private:
|
||||
*/
|
||||
void ClearAllRaids();
|
||||
void ClearAllRaidDetails();
|
||||
void ClearAllRaidLeaders();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,669 +0,0 @@
|
||||
#include "debug.h"
|
||||
#ifdef _WINDOWS
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
#include <iostream>
|
||||
#include "dbasync.h"
|
||||
#include "database.h"
|
||||
#include <errmsg.h>
|
||||
#include <mysqld_error.h>
|
||||
#include <limits.h>
|
||||
#include "dbcore.h"
|
||||
#include <string.h>
|
||||
//#include "../common/misc_functions.h"
|
||||
#include "string_util.h"
|
||||
#define ASYNC_LOOP_GRANULARITY 4 //# of ms between checking our work
|
||||
|
||||
bool DBAsyncCB_LoadVariables(DBAsyncWork* iWork) {
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
MYSQL_RES* result = 0;
|
||||
DBAsyncQuery* dbaq = iWork->PopAnswer();
|
||||
if (dbaq->GetAnswer(errbuf, &result))
|
||||
iWork->GetDB()->LoadVariables_result(result);
|
||||
else
|
||||
std::cout << "Error: DBAsyncCB_LoadVariables failed: !GetAnswer: '" << errbuf << "'" << std::endl;
|
||||
return true;
|
||||
}
|
||||
|
||||
void AsyncLoadVariables(DBAsync *dba, Database *db) {
|
||||
char* query = 0;
|
||||
DBAsyncWork* dbaw = new DBAsyncWork(db, &DBAsyncCB_LoadVariables, 0, DBAsync::Read);
|
||||
dbaw->AddQuery(0, &query, db->LoadVariables_MQ(&query));
|
||||
dba->AddWork(&dbaw);
|
||||
}
|
||||
|
||||
|
||||
//we only need to do anything when somebody puts work on the queue
|
||||
//so instead of checking all the time, we will wait on a condition
|
||||
//which will get signaled when somebody puts something on the queue
|
||||
ThreadReturnType DBAsyncLoop(void* tmp) {
|
||||
DBAsync* dba = (DBAsync*) tmp;
|
||||
|
||||
#ifndef WIN32
|
||||
_log(COMMON__THREADS, "Starting DBAsyncLoop with thread ID %d", pthread_self());
|
||||
#endif
|
||||
|
||||
dba->MLoopRunning.lock();
|
||||
while (dba->RunLoop()) {
|
||||
//wait before working so we check the loop condition
|
||||
//as soon as were done working
|
||||
dba->CInList.Wait();
|
||||
//we could check dba->RunLoop() again to see if we
|
||||
//got turned off while we were waiting
|
||||
{
|
||||
dba->Process();
|
||||
}
|
||||
}
|
||||
dba->MLoopRunning.unlock();
|
||||
|
||||
#ifndef WIN32
|
||||
_log(COMMON__THREADS, "Ending DBAsyncLoop with thread ID %d", pthread_self());
|
||||
#endif
|
||||
|
||||
THREAD_RETURN(nullptr);
|
||||
}
|
||||
|
||||
DBAsync::DBAsync(DBcore* iDBC)
|
||||
: Timeoutable(10000)
|
||||
{
|
||||
pDBC = iDBC;
|
||||
pRunLoop = true;
|
||||
pNextID = 1;
|
||||
#ifdef _WINDOWS
|
||||
_beginthread(DBAsyncLoop, 0, this);
|
||||
#else
|
||||
pthread_t thread;
|
||||
pthread_create(&thread, nullptr, DBAsyncLoop, this);
|
||||
#endif
|
||||
}
|
||||
|
||||
DBAsync::~DBAsync() {
|
||||
StopThread();
|
||||
}
|
||||
|
||||
bool DBAsync::StopThread() {
|
||||
bool ret;
|
||||
MRunLoop.lock();
|
||||
ret = pRunLoop;
|
||||
pRunLoop = false;
|
||||
MRunLoop.unlock();
|
||||
|
||||
//signal the condition so we exit the loop if were waiting
|
||||
CInList.Signal();
|
||||
|
||||
//this effectively waits for the processing thread to finish
|
||||
MLoopRunning.lock();
|
||||
MLoopRunning.unlock();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint32 DBAsync::AddWork(DBAsyncWork** iWork, uint32 iDelay) {
|
||||
MInList.lock();
|
||||
uint32 ret = GetNextID();
|
||||
if (!(*iWork)->SetWorkID(ret)) {
|
||||
MInList.unlock();
|
||||
return 0;
|
||||
}
|
||||
InList.Append(*iWork);
|
||||
(*iWork)->SetStatus(Queued);
|
||||
if (iDelay)
|
||||
(*iWork)->pExecuteAfter = Timer::GetCurrentTime() + iDelay;
|
||||
#if DEBUG_MYSQL_QUERIES >= 2
|
||||
std::cout << "Adding AsyncWork #" << (*iWork)->GetWorkID() << std::endl;
|
||||
std::cout << "ExecuteAfter = " << (*iWork)->pExecuteAfter << " (" << Timer::GetCurrentTime() << " + " << iDelay << ")" << std::endl;
|
||||
#endif
|
||||
*iWork = 0;
|
||||
MInList.unlock();
|
||||
|
||||
//wake up the processing thread and tell it to get to work.
|
||||
CInList.Signal();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool DBAsync::CancelWork(uint32 iWorkID) {
|
||||
if (iWorkID == 0)
|
||||
return false;
|
||||
#if DEBUG_MYSQL_QUERIES >= 2
|
||||
std::cout << "DBAsync::CancelWork: " << iWorkID << std::endl;
|
||||
#endif
|
||||
MCurrentWork.lock();
|
||||
if (CurrentWork && CurrentWork->GetWorkID() == iWorkID) {
|
||||
CurrentWork->Cancel();
|
||||
MCurrentWork.unlock();
|
||||
return true;
|
||||
}
|
||||
MCurrentWork.unlock();
|
||||
MInList.lock();
|
||||
LinkedListIterator<DBAsyncWork*> iterator(InList);
|
||||
|
||||
iterator.Reset();
|
||||
while (iterator.MoreElements()) {
|
||||
if (iterator.GetData()->GetWorkID() == iWorkID) {
|
||||
iterator.RemoveCurrent(true);
|
||||
MInList.unlock();
|
||||
return true;
|
||||
}
|
||||
iterator.Advance();
|
||||
}
|
||||
MInList.unlock();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DBAsync::RunLoop() {
|
||||
bool ret;
|
||||
MRunLoop.lock();
|
||||
ret = pRunLoop;
|
||||
MRunLoop.unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
DBAsyncWork* DBAsync::InListPop() {
|
||||
DBAsyncWork* ret = 0;
|
||||
MInList.lock();
|
||||
LinkedListIterator<DBAsyncWork*> iterator(InList);
|
||||
|
||||
iterator.Reset();
|
||||
while (iterator.MoreElements()) {
|
||||
if (iterator.GetData()->pExecuteAfter <= Timer::GetCurrentTime()) {
|
||||
ret = iterator.GetData();
|
||||
#if DEBUG_MYSQL_QUERIES >= 2
|
||||
std::cout << "Poping AsyncWork #" << ret->GetWorkID() << std::endl;
|
||||
std::cout << ret->pExecuteAfter << " <= " << Timer::GetCurrentTime() << std::endl;
|
||||
#endif
|
||||
iterator.RemoveCurrent(false);
|
||||
break;
|
||||
}
|
||||
iterator.Advance();
|
||||
}
|
||||
MInList.unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
DBAsyncWork* DBAsync::InListPopWrite() {
|
||||
MInList.lock();
|
||||
LinkedListIterator<DBAsyncWork*> iterator(InList);
|
||||
|
||||
DBAsyncWork* ret = 0;
|
||||
DBAsync::Type tmpType;
|
||||
iterator.Reset();
|
||||
while (iterator.MoreElements()) {
|
||||
tmpType = iterator.GetData()->Type();
|
||||
if (tmpType == Write || tmpType == Both) {
|
||||
ret = iterator.GetData();
|
||||
iterator.RemoveCurrent(false);
|
||||
break;
|
||||
}
|
||||
iterator.Advance();
|
||||
}
|
||||
MInList.unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
void DBAsync::AddFQ(DBAsyncFinishedQueue* iDBAFQ) {
|
||||
MFQList.lock();
|
||||
DBAsyncFinishedQueue** tmp = new DBAsyncFinishedQueue*;
|
||||
*tmp = iDBAFQ;
|
||||
FQList.Append(tmp);
|
||||
MFQList.unlock();
|
||||
}
|
||||
|
||||
void DBAsync::Process() {
|
||||
DBAsyncWork* tmpWork;
|
||||
MCurrentWork.lock();
|
||||
while ((CurrentWork = InListPop())) {
|
||||
MCurrentWork.unlock();
|
||||
//move from queued to executing
|
||||
Status tmpStatus = CurrentWork->SetStatus(Executing);
|
||||
if (tmpStatus == Queued) {
|
||||
//execute the work
|
||||
ProcessWork(CurrentWork);
|
||||
tmpWork = CurrentWork;
|
||||
MCurrentWork.lock();
|
||||
CurrentWork = 0;
|
||||
MCurrentWork.unlock();
|
||||
//move from executing to finished
|
||||
tmpStatus = tmpWork->SetStatus(DBAsync::Finished);
|
||||
if (tmpStatus != Executing) {
|
||||
if (tmpStatus != Canceled) {
|
||||
std::cout << "Error: Unexpected DBAsyncWork->Status in DBAsync::Process #1" << std::endl;
|
||||
}
|
||||
MCurrentWork.lock();
|
||||
safe_delete(tmpWork);
|
||||
}
|
||||
else {
|
||||
//call callbacks or put results on finished queue
|
||||
DispatchWork(tmpWork);
|
||||
Sleep(25);
|
||||
MCurrentWork.lock();
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (tmpStatus != Canceled) {
|
||||
std::cout << "Error: Unexpected DBAsyncWork->Status in DBAsync::Process #2" << std::endl;
|
||||
}
|
||||
MCurrentWork.lock();
|
||||
safe_delete(CurrentWork);
|
||||
}
|
||||
}
|
||||
MCurrentWork.unlock();
|
||||
}
|
||||
|
||||
void DBAsync::CheckTimeout() {
|
||||
try{
|
||||
MFQList.lock();
|
||||
LinkedListIterator<DBAsyncFinishedQueue**> iterator(FQList);
|
||||
|
||||
iterator.Reset();
|
||||
while (iterator.MoreElements()) {
|
||||
(*iterator.GetData())->CheckTimeouts();
|
||||
iterator.Advance();
|
||||
}
|
||||
MFQList.unlock();
|
||||
}
|
||||
catch(...){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void DBAsync::CommitWrites() {
|
||||
#if DEBUG_MYSQL_QUERIES >= 2
|
||||
std::cout << "DBAsync::CommitWrites() called." << std::endl;
|
||||
#endif
|
||||
DBAsyncWork* tmpWork;
|
||||
while ((tmpWork = InListPopWrite())) {
|
||||
Status tmpStatus = tmpWork->SetStatus(Executing);
|
||||
if (tmpStatus == Queued) {
|
||||
ProcessWork(tmpWork);
|
||||
tmpStatus = tmpWork->SetStatus(DBAsync::Finished);
|
||||
if (tmpStatus != Executing) {
|
||||
if (tmpStatus != Canceled) {
|
||||
std::cout << "Error: Unexpected DBAsyncWork->Status in DBAsync::CommitWrites #1" << std::endl;
|
||||
}
|
||||
safe_delete(tmpWork);
|
||||
}
|
||||
else {
|
||||
DispatchWork(tmpWork);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (tmpStatus != Canceled) {
|
||||
std::cout << "Error: Unexpected DBAsyncWork->Status in DBAsync::CommitWrites #2" << std::endl;
|
||||
}
|
||||
safe_delete(tmpWork);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DBAsync::ProcessWork(DBAsyncWork* iWork, bool iSleep) {
|
||||
DBAsyncQuery* CurrentQuery;
|
||||
while ((CurrentQuery = iWork->PopQuery())) {
|
||||
CurrentQuery->Process(pDBC);
|
||||
iWork->PushAnswer(CurrentQuery);
|
||||
if (iSleep)
|
||||
Sleep(1);
|
||||
}
|
||||
}
|
||||
|
||||
void DBAsync::DispatchWork(DBAsyncWork* iWork) {
|
||||
//if this work has a callback, call it
|
||||
//otherwise, stick the work on the finish queue
|
||||
if (iWork->pCB) {
|
||||
if (iWork->pCB(iWork))
|
||||
safe_delete(iWork);
|
||||
}
|
||||
else {
|
||||
if (!iWork->pDBAFQ->Push(iWork))
|
||||
safe_delete(iWork);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
DBAsyncFinishedQueue::DBAsyncFinishedQueue(uint32 iTimeout) {
|
||||
pTimeout = iTimeout;
|
||||
}
|
||||
|
||||
DBAsyncFinishedQueue::~DBAsyncFinishedQueue() {
|
||||
}
|
||||
|
||||
void DBAsyncFinishedQueue::CheckTimeouts() {
|
||||
if (pTimeout == 0xFFFFFFFF)
|
||||
return;
|
||||
MLock.lock();
|
||||
LinkedListIterator<DBAsyncWork*> iterator(list);
|
||||
|
||||
iterator.Reset();
|
||||
while (iterator.MoreElements()) {
|
||||
if (iterator.GetData()->CheckTimeout(pTimeout))
|
||||
iterator.RemoveCurrent(true);
|
||||
iterator.Advance();
|
||||
}
|
||||
MLock.unlock();
|
||||
}
|
||||
|
||||
DBAsyncWork* DBAsyncFinishedQueue::Pop() {
|
||||
DBAsyncWork* ret = 0;
|
||||
MLock.lock();
|
||||
ret = list.Pop();
|
||||
MLock.unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
DBAsyncWork* DBAsyncFinishedQueue::Find(uint32 iWorkID) {
|
||||
DBAsyncWork* ret = 0;
|
||||
MLock.lock();
|
||||
LinkedListIterator<DBAsyncWork*> iterator(list);
|
||||
|
||||
iterator.Reset();
|
||||
while (iterator.MoreElements()) {
|
||||
if (iterator.GetData()->GetWorkID() == iWorkID) {
|
||||
ret = iterator.GetData();
|
||||
iterator.RemoveCurrent(false);
|
||||
break;
|
||||
}
|
||||
iterator.Advance();
|
||||
}
|
||||
MLock.unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
DBAsyncWork* DBAsyncFinishedQueue::PopByWPT(uint32 iWPT) {
|
||||
DBAsyncWork* ret = 0;
|
||||
MLock.lock();
|
||||
LinkedListIterator<DBAsyncWork*> iterator(list);
|
||||
|
||||
iterator.Reset();
|
||||
while (iterator.MoreElements()) {
|
||||
if (iterator.GetData()->WPT() == iWPT) {
|
||||
ret = iterator.GetData();
|
||||
iterator.RemoveCurrent(false);
|
||||
break;
|
||||
}
|
||||
iterator.Advance();
|
||||
}
|
||||
MLock.unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool DBAsyncFinishedQueue::Push(DBAsyncWork* iDBAW) {
|
||||
if (!this)
|
||||
return false;
|
||||
MLock.lock();
|
||||
list.Append(iDBAW);
|
||||
MLock.unlock();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
DBAsyncWork::DBAsyncWork(Database *db, DBAsyncFinishedQueue* iDBAFQ, uint32 iWPT, DBAsync::Type iType, uint32 iTimeout)
|
||||
: m_db(db)
|
||||
{
|
||||
pstatus = DBAsync::AddingWork;
|
||||
pType = iType;
|
||||
pExecuteAfter = 0;
|
||||
pWorkID = 0;
|
||||
pDBAFQ = iDBAFQ;
|
||||
pCB = 0;
|
||||
pWPT = iWPT;
|
||||
pQuestionCount = 0;
|
||||
pAnswerCount = 0;
|
||||
pTimeout = iTimeout;
|
||||
pTSFinish = 0;
|
||||
}
|
||||
|
||||
DBAsyncWork::DBAsyncWork(Database *db, DBWorkCompleteCallBack iCB, uint32 iWPT, DBAsync::Type iType, uint32 iTimeout)
|
||||
: m_db(db)
|
||||
{
|
||||
pstatus = DBAsync::AddingWork;
|
||||
pType = iType;
|
||||
pExecuteAfter = 0;
|
||||
pWorkID = 0;
|
||||
pDBAFQ = 0;
|
||||
pCB = iCB;
|
||||
pWPT = iWPT;
|
||||
pQuestionCount = 0;
|
||||
pAnswerCount = 0;
|
||||
pTimeout = iTimeout;
|
||||
pTSFinish = 0;
|
||||
}
|
||||
|
||||
DBAsyncWork::~DBAsyncWork() {
|
||||
DBAsyncQuery* dbaq = 0;
|
||||
while ((dbaq = todo.pop()))
|
||||
safe_delete(dbaq);
|
||||
while ((dbaq = done.pop()))
|
||||
safe_delete(dbaq);
|
||||
while ((dbaq = todel.pop()))
|
||||
safe_delete(dbaq);
|
||||
}
|
||||
|
||||
bool DBAsyncWork::AddQuery(DBAsyncQuery** iDBAQ) {
|
||||
bool ret;
|
||||
MLock.lock();
|
||||
if (pstatus != DBAsync::AddingWork)
|
||||
ret = false;
|
||||
else {
|
||||
ret = true;
|
||||
pQuestionCount++;
|
||||
todo.push(*iDBAQ);
|
||||
(*iDBAQ)->pstatus = DBAsync::Queued;
|
||||
*iDBAQ = 0;
|
||||
}
|
||||
MLock.unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool DBAsyncWork::AddQuery(uint32 iQPT, char** iQuery, uint32 iQueryLen, bool iGetResultSet, bool iGetErrbuf) {
|
||||
DBAsyncQuery* DBAQ = new DBAsyncQuery(iQPT, iQuery, iQueryLen, iGetResultSet, iGetErrbuf);
|
||||
if (AddQuery(&DBAQ))
|
||||
return true;
|
||||
else {
|
||||
safe_delete(DBAQ);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool DBAsyncWork::SetWorkID(uint32 iWorkID) {
|
||||
bool ret = true;
|
||||
MLock.lock();
|
||||
if (pWorkID)
|
||||
ret = false;
|
||||
else
|
||||
pWorkID = iWorkID;
|
||||
MLock.unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint32 DBAsyncWork::GetWorkID() {
|
||||
uint32 ret;
|
||||
MLock.lock();
|
||||
ret = pWorkID;
|
||||
MLock.unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint32 DBAsyncWork::WPT() {
|
||||
uint32 ret;
|
||||
MLock.lock();
|
||||
ret = pWPT;
|
||||
MLock.unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
DBAsync::Type DBAsyncWork::Type() {
|
||||
DBAsync::Type ret;
|
||||
MLock.lock();
|
||||
ret = pType;
|
||||
MLock.unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
DBAsyncQuery* DBAsyncWork::PopAnswer() {
|
||||
DBAsyncQuery* ret;
|
||||
MLock.lock();
|
||||
ret = done.pop();
|
||||
if (ret)
|
||||
pAnswerCount--;
|
||||
todel.push(ret);
|
||||
MLock.unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool DBAsyncWork::CheckTimeout(uint32 iFQTimeout) {
|
||||
if (pTimeout == 0xFFFFFFFF)
|
||||
return false;
|
||||
bool ret = false;
|
||||
MLock.lock();
|
||||
if (pTimeout > iFQTimeout)
|
||||
iFQTimeout = pTimeout;
|
||||
if (Timer::GetCurrentTime() > (pTSFinish + iFQTimeout))
|
||||
ret = true;
|
||||
MLock.unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
//sets the work's status to the supplied value and returns
|
||||
//the revious status
|
||||
DBAsync::Status DBAsyncWork::SetStatus(DBAsync::Status iStatus) {
|
||||
DBAsync::Status ret;
|
||||
MLock.lock();
|
||||
if (iStatus == DBAsync::Finished)
|
||||
pTSFinish = Timer::GetCurrentTime();
|
||||
ret = pstatus;
|
||||
pstatus = iStatus;
|
||||
MLock.unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool DBAsyncWork::Cancel() {
|
||||
bool ret;
|
||||
MLock.lock();
|
||||
if (pstatus != DBAsync::Finished) {
|
||||
pstatus = DBAsync::Canceled;
|
||||
ret = true;
|
||||
}
|
||||
else
|
||||
ret = false;
|
||||
MLock.unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool DBAsyncWork::IsCancled() {
|
||||
bool ret;
|
||||
MLock.lock();
|
||||
ret = (bool) (pstatus == DBAsync::Canceled);
|
||||
MLock.unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
DBAsyncQuery* DBAsyncWork::PopQuery() {
|
||||
DBAsyncQuery* ret = 0;
|
||||
MLock.lock();
|
||||
ret = todo.pop();
|
||||
if (ret)
|
||||
pQuestionCount--;
|
||||
MLock.unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
void DBAsyncWork::PushAnswer(DBAsyncQuery* iDBAQ) {
|
||||
MLock.lock();
|
||||
done.push(iDBAQ);
|
||||
pAnswerCount++;
|
||||
MLock.unlock();
|
||||
}
|
||||
|
||||
|
||||
DBAsyncQuery::DBAsyncQuery(uint32 iQPT, char** iQuery, uint32 iQueryLen, bool iGetResultSet, bool iGetErrbuf) {
|
||||
if (iQueryLen == 0xFFFFFFFF)
|
||||
pQueryLen = strlen(*iQuery);
|
||||
else
|
||||
pQueryLen = iQueryLen;
|
||||
pQuery = *iQuery;
|
||||
*iQuery = 0;
|
||||
Init(iQPT, iGetResultSet, iGetErrbuf);
|
||||
}
|
||||
|
||||
DBAsyncQuery::DBAsyncQuery(uint32 iQPT, const char* iQuery, uint32 iQueryLen, bool iGetResultSet, bool iGetErrbuf) {
|
||||
if (iQueryLen == 0xFFFFFFFF)
|
||||
pQueryLen = strlen(iQuery);
|
||||
else
|
||||
pQueryLen = iQueryLen;
|
||||
pQuery = strn0cpy(new char[pQueryLen+1], iQuery, pQueryLen+1);
|
||||
Init(iQPT, iGetResultSet, iGetErrbuf);
|
||||
}
|
||||
|
||||
void DBAsyncQuery::Init(uint32 iQPT, bool iGetResultSet, bool iGetErrbuf) {
|
||||
pstatus = DBAsync::AddingWork;
|
||||
pQPT = iQPT;
|
||||
pGetResultSet = iGetResultSet;
|
||||
pGetErrbuf = iGetErrbuf;
|
||||
|
||||
pmysqlsuccess = false;
|
||||
perrbuf = 0;
|
||||
perrnum = 0;
|
||||
presult = 0;
|
||||
paffected_rows = 0;
|
||||
plast_insert_id = 0;
|
||||
}
|
||||
|
||||
DBAsyncQuery::~DBAsyncQuery() {
|
||||
safe_delete_array(perrbuf);
|
||||
safe_delete_array(pQuery);
|
||||
if (presult)
|
||||
mysql_free_result(presult);
|
||||
}
|
||||
|
||||
bool DBAsyncQuery::GetAnswer(char* errbuf, MYSQL_RES** result, uint32* affected_rows, uint32* last_insert_id, uint32* errnum) {
|
||||
if (pstatus != DBAsync::Finished) {
|
||||
if (errbuf)
|
||||
snprintf(errbuf, MYSQL_ERRMSG_SIZE, "Error: Query not finished.");
|
||||
if (errnum)
|
||||
*errnum = UINT_MAX;
|
||||
return false;
|
||||
}
|
||||
if (errbuf) {
|
||||
if (pGetErrbuf) {
|
||||
if (perrbuf)
|
||||
strn0cpy(errbuf, perrbuf, MYSQL_ERRMSG_SIZE);
|
||||
else
|
||||
snprintf(errbuf, MYSQL_ERRMSG_SIZE, "Error message should've been saved, but hasnt. errno: %u", perrnum);
|
||||
}
|
||||
else
|
||||
snprintf(errbuf, MYSQL_ERRMSG_SIZE, "Error message not saved. errno: %u", perrnum);
|
||||
}
|
||||
if (errnum)
|
||||
*errnum = perrnum;
|
||||
if (affected_rows)
|
||||
*affected_rows = paffected_rows;
|
||||
if (last_insert_id)
|
||||
*last_insert_id = plast_insert_id;
|
||||
if (result)
|
||||
*result = presult;
|
||||
return pmysqlsuccess;
|
||||
}
|
||||
|
||||
void DBAsyncQuery::Process(DBcore* iDBC) {
|
||||
pstatus = DBAsync::Executing;
|
||||
if (pGetErrbuf)
|
||||
perrbuf = new char[MYSQL_ERRMSG_SIZE];
|
||||
MYSQL_RES** resultPP = 0;
|
||||
if (pGetResultSet)
|
||||
resultPP = &presult;
|
||||
pmysqlsuccess = iDBC->RunQuery(pQuery, pQueryLen, perrbuf, resultPP, &paffected_rows, &plast_insert_id, &perrnum);
|
||||
pstatus = DBAsync::Finished;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,176 +0,0 @@
|
||||
#ifndef DBASYNC_H
|
||||
#define DBASYNC_H
|
||||
#include "../common/dbcore.h"
|
||||
#include "../common/timeoutmgr.h"
|
||||
|
||||
|
||||
class DBAsyncFinishedQueue;
|
||||
class DBAsyncWork;
|
||||
class DBAsyncQuery;
|
||||
class Database;
|
||||
|
||||
// Big daddy that owns the threads and does the work
|
||||
class DBAsync : private Timeoutable {
|
||||
public:
|
||||
enum Status { AddingWork, Queued, Executing, Finished, Canceled };
|
||||
enum Type { Read, Write, Both };
|
||||
|
||||
DBAsync(DBcore* iDBC);
|
||||
~DBAsync();
|
||||
bool StopThread();
|
||||
|
||||
uint32 AddWork(DBAsyncWork** iWork, uint32 iDelay = 0);
|
||||
bool CancelWork(uint32 iWorkID);
|
||||
void CommitWrites();
|
||||
|
||||
void AddFQ(DBAsyncFinishedQueue* iDBAFQ);
|
||||
protected:
|
||||
//things related to the processing thread:
|
||||
friend ThreadReturnType DBAsyncLoop(void* tmp);
|
||||
Mutex MLoopRunning;
|
||||
Condition CInList;
|
||||
bool RunLoop();
|
||||
void Process();
|
||||
|
||||
private:
|
||||
virtual void CheckTimeout();
|
||||
|
||||
void ProcessWork(DBAsyncWork* iWork, bool iSleep = true);
|
||||
void DispatchWork(DBAsyncWork* iWork);
|
||||
inline uint32 GetNextID() { return pNextID++; }
|
||||
DBAsyncWork* InListPop();
|
||||
DBAsyncWork* InListPopWrite(); // Ignores delay
|
||||
void OutListPush(DBAsyncWork* iDBAW);
|
||||
|
||||
Mutex MRunLoop;
|
||||
bool pRunLoop;
|
||||
|
||||
DBcore* pDBC;
|
||||
uint32 pNextID;
|
||||
Mutex MInList;
|
||||
LinkedList<DBAsyncWork*> InList;
|
||||
|
||||
Mutex MFQList;
|
||||
LinkedList<DBAsyncFinishedQueue**> FQList;
|
||||
|
||||
// Mutex for outside access to current work & when current work is being changed.
|
||||
// NOT locked when CurrentWork is being accessed by the DBAsync thread.
|
||||
// Never change pointer from outside DBAsync thread!
|
||||
// Only here for access to thread-safe DBAsyncWork functions.
|
||||
Mutex MCurrentWork;
|
||||
DBAsyncWork* CurrentWork;
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
DB Work Complete Callback:
|
||||
This will be called under the DBAsync thread! Never access any non-threadsafe
|
||||
data/functions/classes. (ie: zone, entitylist, client, etc are not threadsafe)
|
||||
Function prototype:
|
||||
return value: true if we should delete the data, false if we should keep it
|
||||
*/
|
||||
typedef bool(*DBWorkCompleteCallBack)(DBAsyncWork*);
|
||||
|
||||
class DBAsyncFinishedQueue {
|
||||
public:
|
||||
DBAsyncFinishedQueue(uint32 iTimeout = 90000);
|
||||
~DBAsyncFinishedQueue();
|
||||
|
||||
DBAsyncWork* Pop();
|
||||
DBAsyncWork* PopByWPT(uint32 iWPT);
|
||||
DBAsyncWork* Find(uint32 iWPT);
|
||||
bool Push(DBAsyncWork* iDBAW);
|
||||
|
||||
void CheckTimeouts();
|
||||
private:
|
||||
Mutex MLock;
|
||||
uint32 pTimeout;
|
||||
LinkedList<DBAsyncWork*> list;
|
||||
};
|
||||
|
||||
// Container class for multiple queries
|
||||
class DBAsyncWork {
|
||||
public:
|
||||
DBAsyncWork(Database *db, DBAsyncFinishedQueue* iDBAFQ, uint32 iWPT = 0, DBAsync::Type iType = DBAsync::Both, uint32 iTimeout = 0);
|
||||
DBAsyncWork(Database *db, DBWorkCompleteCallBack iCB, uint32 iWPT = 0, DBAsync::Type iType = DBAsync::Both, uint32 iTimeout = 0);
|
||||
~DBAsyncWork();
|
||||
|
||||
bool AddQuery(DBAsyncQuery** iDBAQ);
|
||||
bool AddQuery(uint32 iQPT, char** iQuery, uint32 iQueryLen = 0xFFFFFFFF, bool iGetResultSet = true, bool iGetErrbuf = true);
|
||||
uint32 WPT();
|
||||
DBAsync::Type Type();
|
||||
|
||||
// Pops finished queries off the work
|
||||
DBAsyncQuery* PopAnswer();
|
||||
uint32 QueryCount();
|
||||
|
||||
Database *GetDB() const { return(m_db); }
|
||||
|
||||
bool CheckTimeout(uint32 iFQTimeout);
|
||||
bool SetWorkID(uint32 iWorkID);
|
||||
uint32 GetWorkID();
|
||||
protected:
|
||||
friend class DBAsync;
|
||||
DBAsync::Status SetStatus(DBAsync::Status iStatus);
|
||||
bool Cancel();
|
||||
bool IsCancled();
|
||||
DBAsyncQuery* PopQuery(); // Get query to be run
|
||||
void PushAnswer(DBAsyncQuery* iDBAQ); // Push answer back into workset
|
||||
|
||||
// not mutex'd cause only to be accessed from dbasync class
|
||||
uint32 pExecuteAfter;
|
||||
private:
|
||||
Mutex MLock;
|
||||
uint32 pQuestionCount;
|
||||
uint32 pAnswerCount;
|
||||
uint32 pWorkID;
|
||||
uint32 pWPT;
|
||||
uint32 pTimeout;
|
||||
uint32 pTSFinish; // timestamp when finished
|
||||
DBAsyncFinishedQueue* pDBAFQ; //we do now own this pointer
|
||||
DBWorkCompleteCallBack pCB;
|
||||
DBAsync::Status pstatus;
|
||||
DBAsync::Type pType;
|
||||
MyQueue<DBAsyncQuery> todo;
|
||||
MyQueue<DBAsyncQuery> done;
|
||||
MyQueue<DBAsyncQuery> todel;
|
||||
Database *const m_db; //we do now own this pointer
|
||||
};
|
||||
|
||||
// Container class for the query information
|
||||
class DBAsyncQuery {
|
||||
public:
|
||||
DBAsyncQuery(uint32 iQPT, char** iQuery, uint32 iQueryLen = 0xFFFFFFFF, bool iGetResultSet = true, bool iGetErrbuf = true);
|
||||
DBAsyncQuery(uint32 iQPT, const char* iQuery, uint32 iQueryLen = 0xFFFFFFFF, bool iGetResultSet = true, bool iGetErrbuf = true);
|
||||
~DBAsyncQuery();
|
||||
|
||||
bool GetAnswer(char* errbuf = 0, MYSQL_RES** result = 0, uint32* affected_rows = 0, uint32* last_insert_id = 0, uint32* errnum = 0);
|
||||
inline uint32 QPT() { return pQPT; }
|
||||
protected:
|
||||
friend class DBAsyncWork;
|
||||
uint32 pQPT;
|
||||
|
||||
friend class DBAsync;
|
||||
void Process(DBcore* iDBC);
|
||||
|
||||
void Init(uint32 iQPT, bool iGetResultSet, bool iGetErrbuf);
|
||||
DBAsync::Status pstatus;
|
||||
char* pQuery;
|
||||
uint32 pQueryLen;
|
||||
bool pGetResultSet;
|
||||
bool pGetErrbuf;
|
||||
|
||||
bool pmysqlsuccess;
|
||||
char* perrbuf;
|
||||
uint32 perrnum;
|
||||
uint32 paffected_rows;
|
||||
uint32 plast_insert_id;
|
||||
MYSQL_RES* presult;
|
||||
};
|
||||
|
||||
|
||||
void AsyncLoadVariables(DBAsync *dba, Database *db);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
+20
-87
@@ -4,6 +4,7 @@
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <errmsg.h>
|
||||
#include <mysqld_error.h>
|
||||
@@ -113,6 +114,16 @@ MySQLRequestResult DBcore::QueryDatabase(const char* query, uint32 querylen, boo
|
||||
#ifdef _EQDEBUG
|
||||
std::cout << "DB Query Error #" << mysql_errno(&mysql) << ": " << mysql_error(&mysql) << std::endl;
|
||||
#endif
|
||||
|
||||
/* Implement Logging at the Root */
|
||||
if (mysql_errno(&mysql) > 0 && strlen(query) > 0){
|
||||
std::cout << "\n[MYSQL ERR] " << mysql_errno(&mysql) << ": " << mysql_error(&mysql) << " [Query]: \n" << query << "\n" << std::endl;
|
||||
/* Write to log file */
|
||||
std::ofstream log("eqemu_query_error_log.txt", std::ios_base::app | std::ios_base::out);
|
||||
log << "[MYSQL ERR] " << mysql_error(&mysql) << "\n" << query << "\n";
|
||||
log.close();
|
||||
}
|
||||
|
||||
return MySQLRequestResult(nullptr, 0, 0, 0, 0, mysql_errno(&mysql),errorBuffer);
|
||||
|
||||
}
|
||||
@@ -126,7 +137,6 @@ MySQLRequestResult DBcore::QueryDatabase(const char* query, uint32 querylen, boo
|
||||
|
||||
MySQLRequestResult requestResult(res, (uint32)mysql_affected_rows(&mysql), rowCount, (uint32)mysql_field_count(&mysql), (uint32)mysql_insert_id(&mysql));
|
||||
|
||||
|
||||
#if DEBUG_MYSQL_QUERIES >= 1
|
||||
if (requestResult.Success())
|
||||
{
|
||||
@@ -145,93 +155,16 @@ MySQLRequestResult DBcore::QueryDatabase(const char* query, uint32 querylen, boo
|
||||
return requestResult;
|
||||
}
|
||||
|
||||
bool DBcore::RunQuery(const char* query, uint32 querylen, char* errbuf, MYSQL_RES** result, uint32* affected_rows, uint32* last_insert_id, uint32* errnum, bool retry) {
|
||||
if (errnum)
|
||||
*errnum = 0;
|
||||
if (errbuf)
|
||||
errbuf[0] = 0;
|
||||
bool ret = false;
|
||||
LockMutex lock(&MDatabase);
|
||||
if (pStatus != Connected)
|
||||
Open();
|
||||
void DBcore::TransactionBegin() {
|
||||
QueryDatabase("START TRANSACTION");
|
||||
}
|
||||
|
||||
if (mysql_real_query(&mysql, query, querylen)) {
|
||||
if (mysql_errno(&mysql) == CR_SERVER_GONE_ERROR)
|
||||
pStatus = Error;
|
||||
if (mysql_errno(&mysql) == CR_SERVER_LOST || mysql_errno(&mysql) == CR_SERVER_GONE_ERROR) {
|
||||
if (retry) {
|
||||
std::cout << "Database Error: Lost connection, attempting to recover...." << std::endl;
|
||||
ret = RunQuery(query, querylen, errbuf, result, affected_rows, last_insert_id, errnum, false);
|
||||
if (ret)
|
||||
std::cout << "Reconnection to database successful." << std::endl;
|
||||
}
|
||||
else {
|
||||
pStatus = Error;
|
||||
if (errnum)
|
||||
*errnum = mysql_errno(&mysql);
|
||||
if (errbuf)
|
||||
snprintf(errbuf, MYSQL_ERRMSG_SIZE, "#%i: %s", mysql_errno(&mysql), mysql_error(&mysql));
|
||||
std::cout << "DB Query Error #" << mysql_errno(&mysql) << ": " << mysql_error(&mysql) << std::endl;
|
||||
ret = false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (errnum)
|
||||
*errnum = mysql_errno(&mysql);
|
||||
if (errbuf)
|
||||
snprintf(errbuf, MYSQL_ERRMSG_SIZE, "#%i: %s", mysql_errno(&mysql), mysql_error(&mysql));
|
||||
#ifdef _EQDEBUG
|
||||
std::cout << "DB Query Error #" << mysql_errno(&mysql) << ": " << mysql_error(&mysql) << std::endl;
|
||||
#endif
|
||||
ret = false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (result && mysql_field_count(&mysql)) {
|
||||
*result = mysql_store_result(&mysql);
|
||||
#ifdef _EQDEBUG
|
||||
DBMemLeak::Alloc(*result, query);
|
||||
#endif
|
||||
}
|
||||
else if (result)
|
||||
*result = 0;
|
||||
if (affected_rows)
|
||||
*affected_rows = mysql_affected_rows(&mysql);
|
||||
if (last_insert_id)
|
||||
*last_insert_id = (uint32)mysql_insert_id(&mysql);
|
||||
if (result) {
|
||||
if (*result) {
|
||||
ret = true;
|
||||
}
|
||||
else {
|
||||
#ifdef _EQDEBUG
|
||||
std::cout << "DB Query Error: No Result" << std::endl;
|
||||
#endif
|
||||
if (errnum)
|
||||
*errnum = UINT_MAX;
|
||||
if (errbuf)
|
||||
strcpy(errbuf, "DBcore::RunQuery: No Result");
|
||||
ret = false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
#if DEBUG_MYSQL_QUERIES >= 1
|
||||
if (ret) {
|
||||
std::cout << "query successful";
|
||||
if (result && (*result))
|
||||
std::cout << ", " << (int) mysql_num_rows(*result) << " rows returned";
|
||||
if (affected_rows)
|
||||
std::cout << ", " << (*affected_rows) << " rows affected";
|
||||
std::cout<< std::endl;
|
||||
}
|
||||
else {
|
||||
std::cout << "QUERY: query FAILED" << std::endl;
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
void DBcore::TransactionCommit() {
|
||||
QueryDatabase("COMMIT");
|
||||
}
|
||||
|
||||
void DBcore::TransactionRollback() {
|
||||
QueryDatabase("ROLLBACK");
|
||||
}
|
||||
|
||||
uint32 DBcore::DoEscapeString(char* tobuf, const char* frombuf, uint32 fromlen) {
|
||||
|
||||
+3
-1
@@ -23,9 +23,11 @@ public:
|
||||
DBcore();
|
||||
~DBcore();
|
||||
eStatus GetStatus() { return pStatus; }
|
||||
bool RunQuery(const char* query, uint32 querylen, char* errbuf = 0, MYSQL_RES** result = 0, uint32* affected_rows = 0, uint32* last_insert_id = 0, uint32* errnum = 0, bool retry = true);
|
||||
MySQLRequestResult QueryDatabase(const char* query, uint32 querylen, bool retryOnFailureOnce = true);
|
||||
MySQLRequestResult QueryDatabase(std::string query, bool retryOnFailureOnce = true);
|
||||
void TransactionBegin();
|
||||
void TransactionCommit();
|
||||
void TransactionRollback();
|
||||
uint32 DoEscapeString(char* tobuf, const char* frombuf, uint32 fromlen);
|
||||
void ping();
|
||||
MYSQL* getMySQL(){ return &mysql; }
|
||||
|
||||
+10
-8
@@ -80,14 +80,15 @@ public:
|
||||
~EQEMuLog();
|
||||
|
||||
enum LogIDs {
|
||||
Status = 0, //this must stay the first entry in this list
|
||||
Normal,
|
||||
Error,
|
||||
Debug,
|
||||
Quest,
|
||||
Commands,
|
||||
Crash,
|
||||
MaxLogID
|
||||
Status = 0, /* This must stay the first entry in this list */
|
||||
Normal, /* Normal Logs */
|
||||
Error, /* Error Logs */
|
||||
Debug, /* Debug Logs */
|
||||
Quest, /* Quest Logs */
|
||||
Commands, /* Issued Comamnds */
|
||||
Crash, /* Crash Logs */
|
||||
Save, /* Client Saves */
|
||||
MaxLogID /* Max, used in functions to get the max log ID */
|
||||
};
|
||||
|
||||
//these are callbacks called for each
|
||||
@@ -113,6 +114,7 @@ private:
|
||||
Mutex MOpen;
|
||||
Mutex MLog[MaxLogID];
|
||||
FILE* fp[MaxLogID];
|
||||
|
||||
/* LogStatus: bitwise variable
|
||||
1 = output to file
|
||||
2 = output to stdout
|
||||
|
||||
+507
-502
File diff suppressed because it is too large
Load Diff
@@ -968,4 +968,28 @@ namespace legacy {
|
||||
} InventorySlot;
|
||||
}
|
||||
|
||||
#pragma pack(1) // will be used in packets as well as other inventory-related systems
|
||||
|
||||
struct ItemSlot_Struct
|
||||
{
|
||||
int16 indexMap;
|
||||
int16 unknown02;
|
||||
int16 indexMain;
|
||||
int16 indexSub;
|
||||
int16 indexAug;
|
||||
int16 unknown01;
|
||||
};
|
||||
|
||||
struct ItemSlotShort_Struct
|
||||
{
|
||||
int16 indexMain;
|
||||
int16 indexSub;
|
||||
int16 indexAug;
|
||||
int16 unknown01;
|
||||
};
|
||||
|
||||
#pragma pack()
|
||||
|
||||
static const uint32 MAX_SPELL_DB_ID_VAL = 65535;
|
||||
|
||||
#endif
|
||||
|
||||
+52
-32
@@ -539,7 +539,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
||||
/*Underfoot*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
||||
/*RoF*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
||||
|
||||
/*NPC*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
||||
/*Merc*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
||||
@@ -554,7 +554,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ EmuConstants::MAP_BANK_SIZE,
|
||||
/*Underfoot*/ EmuConstants::MAP_BANK_SIZE,
|
||||
/*RoF*/ EmuConstants::MAP_BANK_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::MAP_BANK_SIZE,
|
||||
|
||||
/*NPC*/ NOT_USED,
|
||||
/*Merc*/ NOT_USED,
|
||||
@@ -569,7 +569,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ EmuConstants::MAP_SHARED_BANK_SIZE,
|
||||
/*Underfoot*/ EmuConstants::MAP_SHARED_BANK_SIZE,
|
||||
/*RoF*/ EmuConstants::MAP_SHARED_BANK_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::MAP_SHARED_BANK_SIZE,
|
||||
|
||||
/*NPC*/ NOT_USED,
|
||||
/*Merc*/ NOT_USED,
|
||||
@@ -584,7 +584,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ EmuConstants::MAP_TRADE_SIZE,
|
||||
/*Underfoot*/ EmuConstants::MAP_TRADE_SIZE,
|
||||
/*RoF*/ EmuConstants::MAP_TRADE_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::MAP_TRADE_SIZE,
|
||||
|
||||
/*NPC*/ 4,
|
||||
/*Merc*/ 4,
|
||||
@@ -599,7 +599,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ EmuConstants::MAP_WORLD_SIZE,
|
||||
/*Underfoot*/ EmuConstants::MAP_WORLD_SIZE,
|
||||
/*RoF*/ EmuConstants::MAP_WORLD_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::MAP_WORLD_SIZE,
|
||||
|
||||
/*NPC*/ NOT_USED,
|
||||
/*Merc*/ NOT_USED,
|
||||
@@ -614,7 +614,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ EmuConstants::MAP_LIMBO_SIZE,
|
||||
/*Underfoot*/ EmuConstants::MAP_LIMBO_SIZE,
|
||||
/*RoF*/ EmuConstants::MAP_LIMBO_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::MAP_LIMBO_SIZE,
|
||||
|
||||
/*NPC*/ NOT_USED,
|
||||
/*Merc*/ NOT_USED,
|
||||
@@ -629,7 +629,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ EmuConstants::MAP_TRIBUTE_SIZE,
|
||||
/*Underfoot*/ EmuConstants::MAP_TRIBUTE_SIZE,
|
||||
/*RoF*/ EmuConstants::MAP_TRIBUTE_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::MAP_TRIBUTE_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -644,7 +644,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_TROPHY_TRIBUTE_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::MAP_TROPHY_TRIBUTE_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -659,7 +659,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_GUILD_TRIBUTE_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::MAP_GUILD_TRIBUTE_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -674,7 +674,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_MERCHANT_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::MAP_MERCHANT_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -689,7 +689,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_DELETED_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::MAP_DELETED_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -704,7 +704,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ SoD::consts::MAP_CORPSE_SIZE,
|
||||
/*Underfoot*/ Underfoot::consts::MAP_CORPSE_SIZE,
|
||||
/*RoF*/ RoF::consts::MAP_CORPSE_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ RoF2::consts::MAP_CORPSE_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -719,7 +719,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ EmuConstants::MAP_BAZAAR_SIZE,
|
||||
/*Underfoot*/ EmuConstants::MAP_BAZAAR_SIZE,
|
||||
/*RoF*/ EmuConstants::MAP_BAZAAR_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::MAP_BAZAAR_SIZE,
|
||||
|
||||
/*NPC*/ 0, // this may need to be 'EmuConstants::MAP_BAZAAR_SIZE' if offline client traders respawn as an npc
|
||||
/*Merc*/ 0,
|
||||
@@ -734,7 +734,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ SoD::consts::MAP_INSPECT_SIZE,
|
||||
/*Underfoot*/ Underfoot::consts::MAP_INSPECT_SIZE,
|
||||
/*RoF*/ RoF::consts::MAP_INSPECT_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ RoF2::consts::MAP_INSPECT_SIZE,
|
||||
|
||||
/*NPC*/ NOT_USED,
|
||||
/*Merc*/ NOT_USED,
|
||||
@@ -749,7 +749,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_REAL_ESTATE_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::MAP_REAL_ESTATE_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -764,7 +764,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_VIEW_MOD_PC_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::MAP_VIEW_MOD_PC_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -779,7 +779,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_VIEW_MOD_BANK_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::MAP_VIEW_MOD_BANK_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -794,7 +794,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_VIEW_MOD_SHARED_BANK_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::MAP_VIEW_MOD_SHARED_BANK_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -809,7 +809,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_VIEW_MOD_LIMBO_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::MAP_VIEW_MOD_LIMBO_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -824,7 +824,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_ALT_STORAGE_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::MAP_ALT_STORAGE_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -839,7 +839,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_ARCHIVED_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::MAP_ARCHIVED_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -854,7 +854,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_MAIL_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::MAP_MAIL_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -869,7 +869,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_GUILD_TROPHY_TRIBUTE_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::MAP_GUILD_TROPHY_TRIBUTE_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -884,7 +884,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ NOT_USED,
|
||||
/*Underfoot*/ NOT_USED,
|
||||
/*RoF*/ EmuConstants::MAP_KRONO_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::MAP_KRONO_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -899,7 +899,7 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ EmuConstants::MAP_OTHER_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::MAP_OTHER_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -1012,7 +1012,7 @@ bool EQLimits::AllowsEmptyBagInBag(uint32 version) {
|
||||
/*SoD*/ SoD::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
||||
/*Underfoot*/ Underfoot::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
||||
/*RoF*/ RoF::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
||||
/*RoF2*/ false,
|
||||
/*RoF2*/ RoF2::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
||||
|
||||
/*NPC*/ false,
|
||||
/*Merc*/ false,
|
||||
@@ -1024,6 +1024,26 @@ bool EQLimits::AllowsEmptyBagInBag(uint32 version) {
|
||||
//return local[ValidateMobVersion(version)];
|
||||
}
|
||||
|
||||
bool EQLimits::AllowsClickCastFromBag(uint32 version) {
|
||||
static const bool local[_EmuClientCount] = {
|
||||
/*Unknown*/ false,
|
||||
/*62*/ Client62::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
||||
/*Titanium*/ Titanium::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
||||
/*SoF*/ SoF::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
||||
/*SoD*/ SoD::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
||||
/*Underfoot*/ Underfoot::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
||||
/*RoF*/ RoF::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
||||
/*RoF2*/ RoF2::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
||||
|
||||
/*NPC*/ false,
|
||||
/*Merc*/ false,
|
||||
/*Bot*/ false,
|
||||
/*Pet*/ false
|
||||
};
|
||||
|
||||
return local[ValidateMobVersion(version)];
|
||||
}
|
||||
|
||||
// items
|
||||
uint16 EQLimits::ItemCommonSize(uint32 version) {
|
||||
static const uint16 local[_EmuClientCount] = {
|
||||
@@ -1034,7 +1054,7 @@ uint16 EQLimits::ItemCommonSize(uint32 version) {
|
||||
/*SoD*/ EmuConstants::ITEM_COMMON_SIZE,
|
||||
/*Underfoot*/ EmuConstants::ITEM_COMMON_SIZE,
|
||||
/*RoF*/ EmuConstants::ITEM_COMMON_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::ITEM_COMMON_SIZE,
|
||||
|
||||
/*NPC*/ EmuConstants::ITEM_COMMON_SIZE,
|
||||
/*Merc*/ EmuConstants::ITEM_COMMON_SIZE,
|
||||
@@ -1054,7 +1074,7 @@ uint16 EQLimits::ItemContainerSize(uint32 version) {
|
||||
/*SoD*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
||||
/*Underfoot*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
||||
/*RoF*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
||||
|
||||
/*NPC*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
||||
/*Merc*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
||||
@@ -1074,7 +1094,7 @@ bool EQLimits::CoinHasWeight(uint32 version) {
|
||||
/*SoD*/ SoD::limits::COIN_HAS_WEIGHT,
|
||||
/*Underfoot*/ Underfoot::limits::COIN_HAS_WEIGHT,
|
||||
/*RoF*/ RoF::limits::COIN_HAS_WEIGHT,
|
||||
/*RoF2*/ true,
|
||||
/*RoF2*/ RoF::limits::COIN_HAS_WEIGHT,
|
||||
|
||||
/*NPC*/ true,
|
||||
/*Merc*/ true,
|
||||
@@ -1094,7 +1114,7 @@ uint32 EQLimits::BandoliersCount(uint32 version) {
|
||||
/*SoD*/ EmuConstants::BANDOLIERS_COUNT,
|
||||
/*Underfoot*/ EmuConstants::BANDOLIERS_COUNT,
|
||||
/*RoF*/ EmuConstants::BANDOLIERS_COUNT,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::BANDOLIERS_COUNT,
|
||||
|
||||
/*NPC*/ NOT_USED,
|
||||
/*Merc*/ NOT_USED,
|
||||
@@ -1114,7 +1134,7 @@ uint32 EQLimits::BandolierSize(uint32 version) {
|
||||
/*SoD*/ EmuConstants::BANDOLIER_SIZE,
|
||||
/*Underfoot*/ EmuConstants::BANDOLIER_SIZE,
|
||||
/*RoF*/ EmuConstants::BANDOLIER_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::BANDOLIER_SIZE,
|
||||
|
||||
/*NPC*/ NOT_USED,
|
||||
/*Merc*/ NOT_USED,
|
||||
@@ -1134,7 +1154,7 @@ uint32 EQLimits::PotionBeltSize(uint32 version) {
|
||||
/*SoD*/ EmuConstants::POTION_BELT_SIZE,
|
||||
/*Underfoot*/ EmuConstants::POTION_BELT_SIZE,
|
||||
/*RoF*/ EmuConstants::POTION_BELT_SIZE,
|
||||
/*RoF2*/ 0,
|
||||
/*RoF2*/ EmuConstants::POTION_BELT_SIZE,
|
||||
|
||||
/*NPC*/ NOT_USED,
|
||||
/*Merc*/ NOT_USED,
|
||||
|
||||
@@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#include "../common/patches/sod_constants.h"
|
||||
#include "../common/patches/underfoot_constants.h"
|
||||
#include "../common/patches/rof_constants.h"
|
||||
//#include "../common/patches/rof2_constants.h"
|
||||
#include "../common/patches/rof2_constants.h"
|
||||
|
||||
// *** DO NOT CHANGE without a full understanding of the consequences..the server is set up to use these settings explicitly!! ***
|
||||
// *** You will cause compilation failures and corrupt your database if partial or incorrect attempts to change them are made!! ***
|
||||
@@ -184,6 +184,7 @@ public:
|
||||
static uint64 CursorBitmask(uint32 version);
|
||||
|
||||
static bool AllowsEmptyBagInBag(uint32 version);
|
||||
static bool AllowsClickCastFromBag(uint32 version);
|
||||
|
||||
// items
|
||||
static uint16 ItemCommonSize(uint32 version);
|
||||
|
||||
+9
-6
@@ -97,16 +97,15 @@ protected:
|
||||
};
|
||||
|
||||
class EQApplicationPacket : public EQPacket {
|
||||
// friend class EQProtocolPacket;
|
||||
friend class EQStream;
|
||||
public:
|
||||
EQApplicationPacket() : EQPacket(OP_Unknown,nullptr,0)
|
||||
EQApplicationPacket() : EQPacket(OP_Unknown, nullptr, 0), opcode_bypass(0)
|
||||
{ app_opcode_size = GetExecutablePlatform() == ExePlatformUCS ? 1 : 2; }
|
||||
EQApplicationPacket(const EmuOpcode op) : EQPacket(op,nullptr,0)
|
||||
EQApplicationPacket(const EmuOpcode op) : EQPacket(op, nullptr, 0), opcode_bypass(0)
|
||||
{ app_opcode_size = GetExecutablePlatform() == ExePlatformUCS ? 1 : 2; }
|
||||
EQApplicationPacket(const EmuOpcode op, const uint32 len) : EQPacket(op,nullptr,len)
|
||||
EQApplicationPacket(const EmuOpcode op, const uint32 len) : EQPacket(op, nullptr, len), opcode_bypass(0)
|
||||
{ app_opcode_size = GetExecutablePlatform() == ExePlatformUCS ? 1 : 2; }
|
||||
EQApplicationPacket(const EmuOpcode op, const unsigned char *buf, const uint32 len) : EQPacket(op,buf,len)
|
||||
EQApplicationPacket(const EmuOpcode op, const unsigned char *buf, const uint32 len) : EQPacket(op, buf, len), opcode_bypass(0)
|
||||
{ app_opcode_size = GetExecutablePlatform() == ExePlatformUCS ? 1 : 2; }
|
||||
bool combine(const EQApplicationPacket *rhs);
|
||||
uint32 serialize (uint16 opcode, unsigned char *dest) const;
|
||||
@@ -119,12 +118,16 @@ public:
|
||||
virtual void DumpRawHeader(uint16 seq=0xffff, FILE *to = stdout) const;
|
||||
virtual void DumpRawHeaderNoTime(uint16 seq=0xffff, FILE *to = stdout) const;
|
||||
|
||||
uint16 GetOpcodeBypass() { return opcode_bypass; }
|
||||
void SetOpcodeBypass(uint16 v) { opcode_bypass = v; }
|
||||
|
||||
protected:
|
||||
|
||||
uint8 app_opcode_size;
|
||||
uint16 opcode_bypass;
|
||||
private:
|
||||
|
||||
EQApplicationPacket(const EQApplicationPacket &p) : EQPacket(p.emu_opcode, p.pBuffer, p.size) { app_opcode_size = p.app_opcode_size; }
|
||||
EQApplicationPacket(const EQApplicationPacket &p) : EQPacket(p.emu_opcode, p.pBuffer, p.size), opcode_bypass(p.opcode_bypass) { app_opcode_size = p.app_opcode_size; }
|
||||
|
||||
};
|
||||
|
||||
|
||||
+156
-53
@@ -478,7 +478,11 @@ struct CastSpell_Struct
|
||||
uint32 spell_id;
|
||||
uint32 inventoryslot; // slot for clicky item, 0xFFFF = normal cast
|
||||
uint32 target_id;
|
||||
uint8 cs_unknown[4];
|
||||
uint32 cs_unknown1;
|
||||
uint32 cs_unknown2;
|
||||
float y_pos;
|
||||
float x_pos;
|
||||
float z_pos;
|
||||
};
|
||||
|
||||
struct SpellEffect_Struct
|
||||
@@ -534,7 +538,7 @@ struct SpellBuffFade_Struct {
|
||||
/*007*/ uint8 unknown7;
|
||||
/*008*/ uint32 spellid;
|
||||
/*012*/ uint32 duration;
|
||||
/*016*/ uint32 unknown016;
|
||||
/*016*/ uint32 num_hits;
|
||||
/*020*/ uint32 unknown020; //prolly global player ID
|
||||
/*024*/ uint32 slotid;
|
||||
/*028*/ uint32 bufffade;
|
||||
@@ -597,8 +601,8 @@ struct GMTrainee_Struct
|
||||
{
|
||||
/*000*/ uint32 npcid;
|
||||
/*004*/ uint32 playerid;
|
||||
/*008*/ uint32 skills[73];
|
||||
/*300*/ uint8 unknown300[148];
|
||||
/*008*/ uint32 skills[PACKET_SKILL_ARRAY_SIZE];
|
||||
/*408*/ uint8 unknown408[40];
|
||||
/*448*/
|
||||
};
|
||||
|
||||
@@ -689,7 +693,7 @@ struct CharCreate_Struct
|
||||
/*0076*/ uint32 drakkin_heritage; // added for SoF
|
||||
/*0080*/ uint32 drakkin_tattoo; // added for SoF
|
||||
/*0084*/ uint32 drakkin_details; // added for SoF
|
||||
/*0088*/
|
||||
/*0088*/ uint32 tutorial;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -759,14 +763,62 @@ struct MovePotionToBelt_Struct {
|
||||
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
||||
static const uint32 MAX_RAID_LEADERSHIP_AA_ARRAY = 16;
|
||||
static const uint32 MAX_LEADERSHIP_AA_ARRAY = (MAX_GROUP_LEADERSHIP_AA_ARRAY+MAX_RAID_LEADERSHIP_AA_ARRAY);
|
||||
struct LeadershipAA_Struct {
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
struct GroupLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 groupAAMarkNPC;
|
||||
uint32 groupAANPCHealth;
|
||||
uint32 groupAADelegateMainAssist;
|
||||
uint32 groupAADelegateMarkNPC;
|
||||
uint32 groupAA4;
|
||||
uint32 groupAA5;
|
||||
uint32 groupAAInspectBuffs;
|
||||
uint32 groupAA7;
|
||||
uint32 groupAASpellAwareness;
|
||||
uint32 groupAAOffenseEnhancement;
|
||||
uint32 groupAAManaEnhancement;
|
||||
uint32 groupAAHealthEnhancement;
|
||||
uint32 groupAAHealthRegeneration;
|
||||
uint32 groupAAFindPathToPC;
|
||||
uint32 groupAAHealthOfTargetsTarget;
|
||||
uint32 groupAA15;
|
||||
};
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct RaidLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 raidAAMarkNPC;
|
||||
uint32 raidAANPCHealth;
|
||||
uint32 raidAADelegateMainAssist;
|
||||
uint32 raidAADelegateMarkNPC;
|
||||
uint32 raidAA4;
|
||||
uint32 raidAA5;
|
||||
uint32 raidAA6;
|
||||
uint32 raidAASpellAwareness;
|
||||
uint32 raidAAOffenseEnhancement;
|
||||
uint32 raidAAManaEnhancement;
|
||||
uint32 raidAAHealthEnhancement;
|
||||
uint32 raidAAHealthRegeneration;
|
||||
uint32 raidAAFindPathToPC;
|
||||
uint32 raidAAHealthOfTargetsTarget;
|
||||
uint32 raidAA14;
|
||||
uint32 raidAA15;
|
||||
};
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct LeadershipAA_Struct {
|
||||
union {
|
||||
struct {
|
||||
GroupLeadershipAA_Struct group;
|
||||
RaidLeadershipAA_Struct raid;
|
||||
};
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -779,17 +831,18 @@ struct BindStruct {
|
||||
/*008*/ float y;
|
||||
/*012*/ float z;
|
||||
/*016*/ float heading;
|
||||
/*020*/
|
||||
/*020*/ uint32 instance_id;
|
||||
/*024*/
|
||||
};
|
||||
|
||||
struct SuspendedMinion_Struct
|
||||
{
|
||||
/*000*/ uint16 SpellID;
|
||||
/*002*/ uint32 HP;
|
||||
/*006*/ uint32 Mana;
|
||||
/*010*/ SpellBuff_Struct Buffs[BUFF_COUNT];
|
||||
/*510*/ uint32 Items[_MaterialCount];
|
||||
/*546*/ char Name[64];
|
||||
/*000*/ uint16 SpellID;
|
||||
/*002*/ uint32 HP;
|
||||
/*006*/ uint32 Mana;
|
||||
/*010*/ SpellBuff_Struct Buffs[BUFF_COUNT];
|
||||
/*510*/ uint32 Items[_MaterialCount];
|
||||
/*546*/ char Name[64];
|
||||
/*610*/
|
||||
};
|
||||
|
||||
@@ -800,10 +853,13 @@ struct SuspendedMinion_Struct
|
||||
** Length: 4308 bytes
|
||||
** OpCode: 0x006a
|
||||
*/
|
||||
static const uint32 MAX_PP_LANGUAGE = 28;
|
||||
static const uint32 MAX_PP_SPELLBOOK = 480; // Increased to 480 to support SoF
|
||||
static const uint32 MAX_PP_MEMSPELL = 9;
|
||||
static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_LANGUAGE = 28;
|
||||
static const uint32 MAX_PP_SPELLBOOK = 480; // Set for all functions
|
||||
static const uint32 MAX_PP_MEMSPELL = 9; // Set to latest client so functions can work right
|
||||
static const uint32 MAX_PP_REF_SPELLBOOK = 480; // Set for Player Profile size retain
|
||||
static const uint32 MAX_PP_REF_MEMSPELL = 9; // Set for Player Profile size retain
|
||||
|
||||
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_AA_ARRAY = 240;
|
||||
static const uint32 MAX_GROUP_MEMBERS = 6;
|
||||
static const uint32 MAX_RECAST_TYPES = 20;
|
||||
@@ -880,7 +936,7 @@ struct PlayerProfile_Struct
|
||||
/*0245*/ uint8 guildbanker;
|
||||
/*0246*/ uint8 unknown0246[6]; //
|
||||
/*0252*/ uint32 intoxication;
|
||||
/*0256*/ uint32 spellSlotRefresh[MAX_PP_MEMSPELL]; //in ms
|
||||
/*0256*/ uint32 spellSlotRefresh[MAX_PP_REF_MEMSPELL]; //in ms
|
||||
/*0292*/ uint32 abilitySlotRefresh;
|
||||
/*0296*/ uint8 haircolor; // Player hair color
|
||||
/*0297*/ uint8 beardcolor; // Player beard color
|
||||
@@ -919,9 +975,9 @@ struct PlayerProfile_Struct
|
||||
/*2505*/ uint8 unknown2541[47]; // ?
|
||||
/*2552*/ uint8 languages[MAX_PP_LANGUAGE];
|
||||
/*2580*/ uint8 unknown2616[4];
|
||||
/*2584*/ uint32 spell_book[MAX_PP_SPELLBOOK];
|
||||
/*2584*/ uint32 spell_book[MAX_PP_REF_SPELLBOOK];
|
||||
/*4504*/ uint8 unknown4540[128]; // Was [428] all 0xff
|
||||
/*4632*/ uint32 mem_spells[MAX_PP_MEMSPELL];
|
||||
/*4632*/ uint32 mem_spells[MAX_PP_REF_MEMSPELL];
|
||||
/*4668*/ uint8 unknown4704[32]; //
|
||||
/*4700*/ float y; // Player y position
|
||||
/*4704*/ float x; // Player x position
|
||||
@@ -1446,17 +1502,18 @@ struct BulkItemPacket_Struct
|
||||
|
||||
struct Consume_Struct
|
||||
{
|
||||
/*0000*/ uint32 slot;
|
||||
/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click
|
||||
/*0008*/ uint8 c_unknown1[4];
|
||||
/*0012*/ uint8 type; // 0x01=Food 0x02=Water
|
||||
/*0013*/ uint8 unknown13[3];
|
||||
/*0000*/ uint32 slot;
|
||||
/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click
|
||||
/*0008*/ uint8 c_unknown1[4];
|
||||
/*0012*/ uint8 type; // 0x01=Food 0x02=Water
|
||||
/*0013*/ uint8 unknown13[3];
|
||||
};
|
||||
|
||||
struct DeleteItem_Struct {
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0012*/
|
||||
};
|
||||
|
||||
struct MoveItem_Struct
|
||||
@@ -1464,16 +1521,18 @@ struct MoveItem_Struct
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0012*/
|
||||
};
|
||||
|
||||
// both MoveItem_Struct/DeleteItem_Struct server structures will be changing to a structure-based slot format..this will
|
||||
// be used for handling SoF/SoD/etc... time stamps sent using the MoveItem_Struct format. (nothing will be done with this
|
||||
// info at the moment..but, it forwards it on to the server for handling/future use)
|
||||
// info at the moment..but, it is forwarded on to the server for handling/future use)
|
||||
struct ClientTimeStamp_Struct
|
||||
{
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0012*/
|
||||
};
|
||||
|
||||
//
|
||||
@@ -2177,6 +2236,12 @@ struct GroupLeaderChange_Struct
|
||||
/*128*/ char Unknown128[20];
|
||||
};
|
||||
|
||||
struct GroupMentor_Struct {
|
||||
/*000*/ int percent;
|
||||
/*004*/ char name[64];
|
||||
/*068*/
|
||||
};
|
||||
|
||||
struct FaceChange_Struct {
|
||||
/*000*/ uint8 haircolor;
|
||||
/*001*/ uint8 beardcolor;
|
||||
@@ -2599,6 +2664,17 @@ struct Translocate_Struct {
|
||||
/*088*/ uint32 Complete;
|
||||
};
|
||||
|
||||
struct PendingTranslocate_Struct
|
||||
{
|
||||
uint32 zone_id;
|
||||
uint16 instance_id;
|
||||
float heading;
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
uint32 spell_id;
|
||||
};
|
||||
|
||||
struct Sacrifice_Struct {
|
||||
/*000*/ uint32 CasterID;
|
||||
/*004*/ uint32 TargetID;
|
||||
@@ -3397,7 +3473,7 @@ struct Split_Struct
|
||||
*/
|
||||
struct NewCombine_Struct {
|
||||
/*00*/ int16 container_slot;
|
||||
/*02*/ char unknown02[2];
|
||||
/*02*/ int16 guildtribute_slot;
|
||||
/*04*/
|
||||
};
|
||||
|
||||
@@ -3908,6 +3984,11 @@ struct MarkNPC_Struct
|
||||
/*08**/ char Name[64];
|
||||
};
|
||||
|
||||
struct InspectBuffs_Struct {
|
||||
/*000*/ uint32 spell_id[BUFF_COUNT];
|
||||
/*100*/ uint32 tics_remaining[BUFF_COUNT];
|
||||
};
|
||||
|
||||
struct RaidGeneral_Struct {
|
||||
/*00*/ uint32 action; //=10
|
||||
/*04*/ char player_name[64]; //should both be the player's name
|
||||
@@ -3923,6 +4004,19 @@ struct RaidAddMember_Struct {
|
||||
/*139*/ uint8 flags[5]; //no idea if these are needed...
|
||||
};
|
||||
|
||||
struct RaidMOTD_Struct {
|
||||
/*000*/ RaidGeneral_Struct general; // leader_name and action only used
|
||||
/*136*/ char motd[0]; // max size is 1024, but reply is variable
|
||||
};
|
||||
|
||||
struct RaidLeadershipUpdate_Struct {
|
||||
/*000*/ uint32 action;
|
||||
/*004*/ char player_name[64];
|
||||
/*068*/ char leader_name[64];
|
||||
/*132*/ GroupLeadershipAA_Struct group; //unneeded
|
||||
/*196*/ RaidLeadershipAA_Struct raid;
|
||||
/*260*/ char Unknown260[128]; //unverified
|
||||
};
|
||||
|
||||
struct RaidAdd_Struct {
|
||||
/*000*/ uint32 action; //=0
|
||||
@@ -4064,7 +4158,7 @@ struct GroupInvite_Struct {
|
||||
// uint8 unknown128[65];
|
||||
};
|
||||
|
||||
struct BuffFadeMsg_Struct {
|
||||
struct ColoredText_Struct {
|
||||
uint32 color;
|
||||
char msg[1];
|
||||
};
|
||||
@@ -4261,6 +4355,13 @@ struct ItemVerifyReply_Struct {
|
||||
/*012*/
|
||||
};
|
||||
|
||||
struct ItemRecastDelay_Struct {
|
||||
/*000*/ uint32 recast_delay; // in seconds
|
||||
/*004*/ uint32 recast_type;
|
||||
/*008*/ uint32 unknown008;
|
||||
/*012*/
|
||||
};
|
||||
|
||||
/**
|
||||
* Shroud yourself. For yourself shrouding, this has your spawnId, spawnStruct,
|
||||
* bits of your charProfileStruct (no checksum, then charProfile up till
|
||||
@@ -4294,14 +4395,14 @@ typedef struct {
|
||||
struct ControlBoat_Struct {
|
||||
/*000*/ uint32 boatId; // entitylist id of the boat
|
||||
/*004*/ bool TakeControl; // 01 if taking control, 00 if releasing it
|
||||
/*007*/ // no idea what these last three bytes represent
|
||||
/*007*/ char unknown[3]; // no idea what these last three bytes represent
|
||||
};
|
||||
|
||||
struct AugmentInfo_Struct
|
||||
{
|
||||
/*000*/ uint32 itemid; // id of the solvent needed
|
||||
/*004*/ uint8 window; // window to display the information in
|
||||
/*005*/ uint8 unknown005[67]; // total packet length 72, all the rest were always 00
|
||||
/*000*/ uint32 itemid; // id of the solvent needed
|
||||
/*004*/ uint32 window; // window to display the information in
|
||||
/*008*/ char augment_info[64]; // the reply has the text here
|
||||
/*072*/
|
||||
};
|
||||
|
||||
@@ -4589,11 +4690,13 @@ struct BuffIconEntry_Struct
|
||||
uint32 buff_slot;
|
||||
uint32 spell_id;
|
||||
uint32 tics_remaining;
|
||||
uint32 num_hits;
|
||||
};
|
||||
|
||||
struct BuffIcon_Struct
|
||||
{
|
||||
uint32 entity_id;
|
||||
uint8 all_buffs;
|
||||
uint16 count;
|
||||
BuffIconEntry_Struct entries[0];
|
||||
};
|
||||
@@ -5106,17 +5209,17 @@ struct MercenaryMerchantResponse_Struct {
|
||||
};
|
||||
|
||||
struct ServerLootItem_Struct {
|
||||
uint32 item_id;
|
||||
int16 equipSlot;
|
||||
uint8 charges;
|
||||
uint16 lootslot;
|
||||
uint32 aug1;
|
||||
uint32 aug2;
|
||||
uint32 aug3;
|
||||
uint32 aug4;
|
||||
uint32 aug5;
|
||||
uint8 minlevel;
|
||||
uint8 maxlevel;
|
||||
uint32 item_id; // uint32 item_id;
|
||||
int16 equip_slot; // int16 equip_slot;
|
||||
uint16 charges; // uint8 charges;
|
||||
uint16 lootslot; // uint16 lootslot;
|
||||
uint32 aug_1; // uint32 aug_1;
|
||||
uint32 aug_2; // uint32 aug_2;
|
||||
uint32 aug_3; // uint32 aug_3;
|
||||
uint32 aug_4; // uint32 aug_4;
|
||||
uint32 aug_5; // uint32 aug_5;
|
||||
uint8 min_level; //
|
||||
uint8 max_level; //
|
||||
};
|
||||
|
||||
//Found in client near a ref to the string:
|
||||
|
||||
+6
-48
@@ -532,9 +532,12 @@ void EQStream::FastQueuePacket(EQApplicationPacket **p, bool ack_req)
|
||||
return;
|
||||
}
|
||||
|
||||
uint16 opcode = (*OpMgr)->EmuToEQ(pack->emu_opcode);
|
||||
|
||||
//_log(NET__APP_TRACE, "Queueing %sacked packet with opcode 0x%x (%s) and length %d", ack_req?"":"non-", opcode, OpcodeManager::EmuToName(pack->emu_opcode), pack->size);
|
||||
uint16 opcode = 0;
|
||||
if(pack->GetOpcodeBypass() != 0) {
|
||||
opcode = pack->GetOpcodeBypass();
|
||||
} else {
|
||||
opcode = (*OpMgr)->EmuToEQ(pack->emu_opcode);
|
||||
}
|
||||
|
||||
if (!ack_req) {
|
||||
NonSequencedPush(new EQProtocolPacket(opcode, pack->pBuffer, pack->size));
|
||||
@@ -877,43 +880,6 @@ sockaddr_in address;
|
||||
AddBytesSent(length);
|
||||
}
|
||||
|
||||
/*
|
||||
commented out since im not sure theres a lot of merit in it.
|
||||
Really it was bitterness towards allocating a 2k buffer on the stack each call.
|
||||
Im sure the thought was client side, but even then, they will
|
||||
likely need a whole thread to call this method, in which case, they should
|
||||
supply the buffer so we dont re-allocate it each time.
|
||||
EQProtocolPacket *EQStream::Read(int eq_fd, sockaddr_in *from)
|
||||
{
|
||||
int socklen;
|
||||
int length=0;
|
||||
EQProtocolPacket *p=nullptr;
|
||||
char temp[15];
|
||||
|
||||
socklen=sizeof(sockaddr);
|
||||
#ifdef _WINDOWS
|
||||
length=recvfrom(eq_fd, (char *)_tempBuffer, 2048, 0, (struct sockaddr*)from, (int *)&socklen);
|
||||
#else
|
||||
length=recvfrom(eq_fd, _tempBuffer, 2048, 0, (struct sockaddr*)from, (socklen_t *)&socklen);
|
||||
#endif
|
||||
|
||||
if (length>=2) {
|
||||
p=new EQProtocolPacket(_tempBuffer[1],&_tempBuffer[2],length-2);
|
||||
|
||||
uint32 ip=from->sin_addr.s_addr;
|
||||
sprintf(temp,"%d.%d.%d.%d:%d",
|
||||
*(unsigned char *)&ip,
|
||||
*((unsigned char *)&ip+1),
|
||||
*((unsigned char *)&ip+2),
|
||||
*((unsigned char *)&ip+3),
|
||||
ntohs(from->sin_port));
|
||||
//std::cout << timestamp() << "Data from: " << temp << " OpCode 0x" << std::hex << std::setw(2) << std::setfill('0') << (int)p->opcode << std::dec << std::endl;
|
||||
//dump_message(p->pBuffer,p->size,timestamp());
|
||||
|
||||
}
|
||||
return p;
|
||||
}*/
|
||||
|
||||
void EQStream::SendSessionResponse()
|
||||
{
|
||||
EQProtocolPacket *out=new EQProtocolPacket(OP_SessionResponse,nullptr,sizeof(SessionResponse));
|
||||
@@ -1101,14 +1067,6 @@ EQProtocolPacket *p=nullptr;
|
||||
SequencedQueue.clear();
|
||||
}
|
||||
MOutboundQueue.unlock();
|
||||
|
||||
/*if(uint16(SequencedBase + SequencedQueue.size()) != NextOutSeq) {
|
||||
_log(NET__ERROR, _L "Out-bound Invalid Sequenced queue: BS %d + SQ %d != NOS %d" __L, SequencedBase, SequencedQueue.size(), NextOutSeq);
|
||||
}
|
||||
if(NextSequencedSend > SequencedQueue.size()) {
|
||||
_log(NET__ERROR, _L "Out-bound Next Send Sequence is beyond the end of the queue NSS %d > SQ %d" __L, NextSequencedSend, SequencedQueue.size());
|
||||
}*/
|
||||
//NOTE: we prolly want to reset counters if we are stupposed to do anything after this.
|
||||
}
|
||||
|
||||
void EQStream::PacketQueueClear()
|
||||
|
||||
+17
-18
@@ -21,7 +21,6 @@
|
||||
#include "eq_packet_structs.h"
|
||||
#include "item.h"
|
||||
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
/*
|
||||
@@ -37,24 +36,24 @@
|
||||
*/
|
||||
struct ExtendedProfile_Struct {
|
||||
// Pet stuff
|
||||
uint16 pet_id;
|
||||
uint16 old_pet_hp;
|
||||
uint16 old_pet_mana;
|
||||
SpellBuff_Struct pet_buffs[BUFF_COUNT];
|
||||
uint32 pet_items[_MaterialCount];
|
||||
char merc_name[64];
|
||||
uint16 pet_id; /* Not Used */
|
||||
uint16 old_pet_hp; /* Not Used */
|
||||
uint16 old_pet_mana; /* Not Used */
|
||||
SpellBuff_Struct pet_buffs[BUFF_COUNT]; /* Not Used */
|
||||
uint32 pet_items[_MaterialCount]; /* Not Used */
|
||||
char merc_name[64]; /* Used */
|
||||
|
||||
uint32 aa_effects;
|
||||
uint32 perAA; //% of exp going to AAs
|
||||
uint32 expended_aa; // Total of expended AA
|
||||
uint32 pet_hp;
|
||||
uint32 pet_mana;
|
||||
uint32 mercTemplateID;
|
||||
uint32 mercSuspendedTime;
|
||||
bool mercIsSuspended;
|
||||
uint32 mercTimerRemaining;
|
||||
uint8 mercGender;
|
||||
int32 mercState;
|
||||
uint32 aa_effects; /* Used */
|
||||
uint32 perAA; /* Used: % of exp going to AAs */
|
||||
uint32 expended_aa; /* Used: Total of expended AA */
|
||||
uint32 pet_hp; /* Not Used */
|
||||
uint32 pet_mana; /* Not Used */
|
||||
uint32 mercTemplateID; /* Not Used */
|
||||
uint32 mercSuspendedTime; /* Not Used */
|
||||
bool mercIsSuspended; /* Not Used */
|
||||
uint32 mercTimerRemaining; /* Not Used */
|
||||
uint8 mercGender; /* Not Used */
|
||||
int32 mercState; /* Not Used */
|
||||
};
|
||||
|
||||
#pragma pack()
|
||||
|
||||
+3
-3
@@ -47,7 +47,7 @@ const char *FactionValueToString(FACTION_VALUE fv) {
|
||||
|
||||
|
||||
//o--------------------------------------------------------------
|
||||
//| Name: CalculateFaction; rembrant, Dec. 16, 2001
|
||||
//| Name: CalculateFaction; Dec. 16, 2001
|
||||
//o--------------------------------------------------------------
|
||||
//| Notes: Returns the faction message value.
|
||||
//| Modify these values to taste.
|
||||
@@ -69,7 +69,7 @@ FACTION_VALUE CalculateFaction(FactionMods* fm, int32 tmpCharacter_value)
|
||||
return FACTION_INDIFFERENT;
|
||||
}
|
||||
|
||||
// neotokyo: this function should check if some races have more than one race define
|
||||
// this function should check if some races have more than one race define
|
||||
bool IsOfEqualRace(int r1, int r2)
|
||||
{
|
||||
if (r1 == r2)
|
||||
@@ -88,7 +88,7 @@ bool IsOfEqualRace(int r1, int r2)
|
||||
return false;
|
||||
}
|
||||
|
||||
// neotokyo: trolls endure ogres, dark elves, ...
|
||||
// trolls endure ogres, dark elves, ...
|
||||
bool IsOfIndiffRace(int r1, int r2)
|
||||
{
|
||||
if (r1 == r2)
|
||||
|
||||
+7
-6
@@ -163,7 +163,7 @@ enum { //timer settings, all in milliseconds
|
||||
CombatEventTimer_expire = 12000,
|
||||
Tribute_duration = 600000,
|
||||
ZoneTimerResolution = 3, //sleep time between zone main loop runs (milliseconds)
|
||||
FeignMemoryDuration = 120000, // EverHood - Duration player must feign death to clear zonewide agro.
|
||||
FeignMemoryDuration = 120000, // Duration player must feign death to clear zonewide agro.
|
||||
EnragedTimer = 360000,
|
||||
EnragedDurationTimer = 10000
|
||||
};
|
||||
@@ -208,12 +208,12 @@ enum { //some random constants
|
||||
//chance ratio that a
|
||||
#define THREATENLY_ARRGO_CHANCE 32 // 32/128 (25%) chance that a mob will arrgo on con Threatenly
|
||||
|
||||
// max factions per npc faction list
|
||||
//max factions per npc faction list
|
||||
#define MAX_NPC_FACTIONS 20
|
||||
|
||||
//value caps
|
||||
#define MAX_FACTION 1500
|
||||
#define MIN_FACTION -1500
|
||||
//individual faction pool
|
||||
#define MAX_PERSONAL_FACTION 1200
|
||||
#define MIN_PERSONAL_FACTION -3000
|
||||
|
||||
//The Level Cap:
|
||||
//#define LEVEL_CAP RuleI(Character, MaxLevel) //hard cap is 127
|
||||
@@ -261,7 +261,8 @@ enum {
|
||||
commandChangeFlags = 200, //ability to set/refresh flags
|
||||
commandBanPlayers = 100, //can set bans on players
|
||||
commandChangeDatarate = 201, //edit client's data rate
|
||||
commandZoneToCoords = 0 //can #zone with coords
|
||||
commandZoneToCoords = 0, //can #zone with coords
|
||||
commandInterrogateInv = 100 //below this == only log on error state and self-only target dump
|
||||
};
|
||||
|
||||
//default states for logging flag on NPCs and clients (having NPCs on by default is prolly a bad idea)
|
||||
|
||||
@@ -756,7 +756,7 @@ bool BaseGuildManager::DBSetGuild(uint32 charid, uint32 guild_id, uint8 rank) {
|
||||
std::string query;
|
||||
|
||||
if(guild_id != GUILD_NONE) {
|
||||
query = StringFormat("REPLACE INTO guild_members (char_id,guild_id,rank) VALUES(%d,%d,%d)", charid, guild_id, rank);
|
||||
query = StringFormat("REPLACE INTO guild_members (char_id,guild_id,rank,public_note) VALUES(%d,%d,%d,'')", charid, guild_id, rank);
|
||||
auto results = m_db->QueryDatabase(query);
|
||||
|
||||
if (!results.Success()) {
|
||||
@@ -897,10 +897,10 @@ bool BaseGuildManager::QueryWithLogging(std::string query, const char *errmsg) {
|
||||
" FROM vwBotCharacterMobs AS c LEFT JOIN vwGuildMembers AS g ON c.id=g.char_id AND c.mobtype = g.mobtype "
|
||||
#else
|
||||
#define GuildMemberBaseQuery \
|
||||
"SELECT c.id,c.name,c.class,c.level,c.timelaston,c.zoneid," \
|
||||
"SELECT c.id,c.name,c.class,c.level,c.last_login,c.zone_id," \
|
||||
" g.guild_id,g.rank,g.tribute_enable,g.total_tribute,g.last_tribute," \
|
||||
" g.banker,g.public_note,g.alt " \
|
||||
" FROM character_ AS c LEFT JOIN guild_members AS g ON c.id=g.char_id "
|
||||
" FROM `character_data` AS c LEFT JOIN guild_members AS g ON c.id=g.char_id "
|
||||
#endif
|
||||
static void ProcessGuildMember(MySQLRequestRow row, CharGuildInfo &into) {
|
||||
//fields from `characer_`
|
||||
@@ -1241,7 +1241,7 @@ BaseGuildManager::GuildInfo::GuildInfo() {
|
||||
uint32 BaseGuildManager::DoesAccountContainAGuildLeader(uint32 AccountID)
|
||||
{
|
||||
std::string query = StringFormat("SELECT guild_id FROM guild_members WHERE char_id IN "
|
||||
"(SELECT id FROM character_ WHERE account_id = %i) AND rank = 2",
|
||||
"(SELECT id FROM `character_data` WHERE account_id = %i) AND rank = 2",
|
||||
AccountID);
|
||||
auto results = m_db->QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
|
||||
+1
-315
@@ -24,318 +24,4 @@
|
||||
|
||||
#ifndef WIN32
|
||||
#include <netinet/in.h> //for htonl
|
||||
#endif
|
||||
|
||||
/*
|
||||
void Database::GetGuildMembers(uint32 guild_id, GuildMember_Struct* gms){
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = 0;
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
uint32 count=0;
|
||||
uint32 length=0;
|
||||
if (RunQuery(query, MakeAnyLenString(&query, "Select name,profile,timelaston,guildrank,publicnote from character_ where guild=%i", guild_id), errbuf, &result)) {
|
||||
safe_delete_array(query);
|
||||
while( ( row = mysql_fetch_row(result) ) ){
|
||||
strcpy(gms->member[count].name,row[0]);
|
||||
length+=strlen(row[0])+strlen(row[4]);
|
||||
PlayerProfile_Struct* pps=(PlayerProfile_Struct*)row[1];
|
||||
gms->member[count].level=htonl(pps->level);
|
||||
gms->member[count].zoneid=(pps->zone_id*256);
|
||||
gms->member[count].timelaston=htonl(atol(row[2]));
|
||||
gms->member[count].class_=htonl(pps->class_);
|
||||
gms->member[count].rank=atoi(row[3]);
|
||||
strcpy(gms->member[count].publicnote,row[4]);
|
||||
count++;
|
||||
}
|
||||
mysql_free_result(result);
|
||||
}
|
||||
else {
|
||||
LogFile->write(EQEMuLog::Error, "Error in GetGuildMembers query '%s': %s", query, errbuf);
|
||||
safe_delete_array(query);
|
||||
}
|
||||
gms->count=count;
|
||||
gms->length=length;
|
||||
}
|
||||
|
||||
uint32 Database::NumberInGuild(uint32 guild_id) {
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = 0;
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
|
||||
if (RunQuery(query, MakeAnyLenString(&query, "Select count(id) from character_ where guild=%i", guild_id), errbuf, &result)) {
|
||||
safe_delete_array(query);
|
||||
if (mysql_num_rows(result) == 1) {
|
||||
row = mysql_fetch_row(result);
|
||||
uint32 ret = atoi(row[0]);
|
||||
mysql_free_result(result);
|
||||
return ret;
|
||||
}
|
||||
mysql_free_result(result);
|
||||
}
|
||||
else {
|
||||
LogFile->write(EQEMuLog::Error, "Error in NumberInGuild query '%s': %s", query, errbuf);
|
||||
safe_delete_array(query);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
bool Database::SetGuild(char* name, uint32 guild_id, uint8 guildrank) {
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = 0;
|
||||
uint32 affected_rows = 0;
|
||||
|
||||
if (RunQuery(query, MakeAnyLenString(&query, "UPDATE character_ SET guild=%i, guildrank=%i WHERE name='%s'", guild_id, guildrank, name), errbuf, 0, &affected_rows)) {
|
||||
safe_delete_array(query);
|
||||
if (affected_rows == 1)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
LogFile->write(EQEMuLog::Error, "Error in SetGuild query '%s': %s", query, errbuf);
|
||||
safe_delete_array(query);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Database::SetGuild(uint32 charid, uint32 guild_id, uint8 guildrank) {
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = 0;
|
||||
uint32 affected_rows = 0;
|
||||
|
||||
if (RunQuery(query, MakeAnyLenString(&query, "UPDATE character_ SET guild=%i, guildrank=%i WHERE id=%i", guild_id, guildrank, charid), errbuf, 0, &affected_rows)) {
|
||||
safe_delete_array(query);
|
||||
if (affected_rows == 1)
|
||||
return true;
|
||||
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
LogFile->write(EQEMuLog::Error, "Error in SetGuild query '%s': %s", query, errbuf);
|
||||
safe_delete_array(query);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Database::DeleteGuild(uint32 guild_id)
|
||||
{
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = 0;
|
||||
char *query2 = 0;
|
||||
uint32 affected_rows = 0;
|
||||
|
||||
if (RunQuery(query, MakeAnyLenString(&query, "DELETE FROM guilds WHERE id=%i;", guild_id), errbuf, 0, &affected_rows)) {
|
||||
safe_delete_array(query);
|
||||
if (affected_rows == 1) {
|
||||
if(!RunQuery(query2, MakeAnyLenString(&query2, "update character_ set guild=0,guildrank=0 where guild=%i", guild_id), errbuf, 0, &affected_rows))
|
||||
LogFile->write(EQEMuLog::Error, "Error in DeleteGuild cleanup query '%s': %s", query2, errbuf);
|
||||
safe_delete_array(query2);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
LogFile->write(EQEMuLog::Error, "Error in DeleteGuild query '%s': %s", query, errbuf);
|
||||
safe_delete_array(query);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Database::RenameGuild(uint32 guild_id, const char* name) {
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = 0;
|
||||
uint32 affected_rows = 0;
|
||||
char buf[65];
|
||||
DoEscapeString(buf, name, strlen(name)) ;
|
||||
|
||||
if (RunQuery(query, MakeAnyLenString(&query, "Update guilds set name='%s' WHERE id=%i;", buf, guild_id), errbuf, 0, &affected_rows)) {
|
||||
safe_delete_array(query);
|
||||
if (affected_rows == 1)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
LogFile->write(EQEMuLog::Error, "Error in RenameGuild query '%s': %s", query, errbuf);
|
||||
safe_delete_array(query);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool Database::EditGuild(uint32 guild_id, uint8 ranknum, GuildRankLevel_Struct* grl)
|
||||
{
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = 0;
|
||||
int chars = 0;
|
||||
uint32 affected_rows = 0;
|
||||
char buf[203];
|
||||
char buf2[8];
|
||||
DoEscapeString(buf, grl->rankname, strlen(grl->rankname)) ;
|
||||
buf2[GUILD_HEAR] = grl->heargu + '0';
|
||||
buf2[GUILD_SPEAK] = grl->speakgu + '0';
|
||||
buf2[GUILD_INVITE] = grl->invite + '0';
|
||||
buf2[GUILD_REMOVE] = grl->remove + '0';
|
||||
buf2[GUILD_PROMOTE] = grl->promote + '0';
|
||||
buf2[GUILD_DEMOTE] = grl->demote + '0';
|
||||
buf2[GUILD_MOTD] = grl->motd + '0';
|
||||
buf2[GUILD_WARPEACE] = grl->warpeace + '0';
|
||||
|
||||
if (ranknum == 0)
|
||||
chars = MakeAnyLenString(&query, "Update guilds set rank%ititle='%s' WHERE id=%i;", ranknum, buf, guild_id);
|
||||
else
|
||||
chars = MakeAnyLenString(&query, "Update guilds set rank%ititle='%s', rank%i='%s' WHERE id=%i;", ranknum, buf, ranknum, buf2, guild_id);
|
||||
|
||||
if (RunQuery(query, chars, errbuf, 0, &affected_rows)) {
|
||||
safe_delete_array(query);
|
||||
if (affected_rows == 1)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
LogFile->write(EQEMuLog::Error, "Error in EditGuild query '%s': %s", query, errbuf);
|
||||
safe_delete_array(query);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Database::GetGuildNameByID(uint32 guild_id, char * name) {
|
||||
if (!name || !guild_id) return false;
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = 0;
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
|
||||
if (RunQuery(query, MakeAnyLenString(&query, "select name from guilds where id='%i'", guild_id), errbuf, &result)) {
|
||||
safe_delete_array(query);
|
||||
row = mysql_fetch_row(result);
|
||||
if (row[0])
|
||||
sprintf(name,"%s",row[0]);
|
||||
mysql_free_result(result);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
LogFile->write(EQEMuLog::Error, "Error in GetGuildNameByID query '%s': %s", query, errbuf);
|
||||
safe_delete_array(query);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 Database::GetGuildIDbyLeader(uint32 leader)
|
||||
{
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = 0;
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
|
||||
if (RunQuery(query, MakeAnyLenString(&query, "SELECT id FROM guilds WHERE leader=%i", leader), errbuf, &result)) {
|
||||
safe_delete_array(query);
|
||||
if (mysql_num_rows(result) == 1)
|
||||
{
|
||||
row = mysql_fetch_row(result);
|
||||
uint32 tmp = atoi(row[0]);
|
||||
mysql_free_result(result);
|
||||
return tmp;
|
||||
}
|
||||
mysql_free_result(result);
|
||||
}
|
||||
else {
|
||||
LogFile->write(EQEMuLog::Error, "Error in Getguild_idbyLeader query '%s': %s", query, errbuf);
|
||||
safe_delete_array(query);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool Database::SetGuildLeader(uint32 guild_id, uint32 leader)
|
||||
{
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = 0;
|
||||
uint32 affected_rows = 0;
|
||||
|
||||
if (RunQuery(query, MakeAnyLenString(&query, "UPDATE guilds SET leader=%i WHERE id=%i", leader, guild_id), errbuf, 0, &affected_rows)) {
|
||||
safe_delete_array(query);
|
||||
if (affected_rows == 1)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
LogFile->write(EQEMuLog::Error, "Error in SetGuildLeader query '%s': %s", query, errbuf);
|
||||
safe_delete_array(query);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Database::SetGuildMOTD(uint32 guild_id, const char* motd) {
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = 0;
|
||||
char* motdbuf = 0;
|
||||
uint32 affected_rows = 0;
|
||||
|
||||
motdbuf = new char[(strlen(motd)*2)+3];
|
||||
|
||||
DoEscapeString(motdbuf, motd, strlen(motd)) ;
|
||||
|
||||
if (RunQuery(query, MakeAnyLenString(&query, "Update guilds set motd='%s' WHERE id=%i;", motdbuf, guild_id), errbuf, 0, &affected_rows)) {
|
||||
safe_delete_array(query);
|
||||
delete motdbuf;
|
||||
if (affected_rows == 1)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
LogFile->write(EQEMuLog::Error, "Error in SetGuildMOTD query '%s': %s", query, errbuf);
|
||||
safe_delete_array(query);
|
||||
delete motdbuf;
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
string Database::GetGuildMOTD(uint32 guild_id)
|
||||
{
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = 0;
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
string motd_str;
|
||||
if (RunQuery(query, MakeAnyLenString(&query, "SELECT motd FROM guilds WHERE id=%i", guild_id), errbuf, &result)) {
|
||||
safe_delete_array(query);
|
||||
if (mysql_num_rows(result) == 1) {
|
||||
row = mysql_fetch_row(result);
|
||||
if (row[0])
|
||||
motd_str = row[0];
|
||||
}
|
||||
mysql_free_result(result);
|
||||
}
|
||||
else {
|
||||
LogFile->write(EQEMuLog::Error, "Error in GetGuildMOTD query '%s': %s", query, errbuf);
|
||||
safe_delete_array(query);
|
||||
}
|
||||
return motd_str;
|
||||
}
|
||||
*/
|
||||
|
||||
#endif
|
||||
@@ -911,6 +911,30 @@ bool Inventory::CanItemFitInContainer(const Item_Struct *ItemToTry, const Item_S
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Inventory::SupportsClickCasting(int16 slot_id)
|
||||
{
|
||||
// there are a few non-potion items that identify as ItemTypePotion..so, we still need to ubiquitously include the equipment range
|
||||
if ((uint16)slot_id <= EmuConstants::GENERAL_END || slot_id == MainPowerSource)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (slot_id >= EmuConstants::GENERAL_BAGS_BEGIN && slot_id <= EmuConstants::GENERAL_BAGS_END)
|
||||
{
|
||||
if (EQLimits::AllowsClickCastFromBag(m_version))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Inventory::SupportsPotionBeltCasting(int16 slot_id)
|
||||
{
|
||||
if ((uint16)slot_id <= EmuConstants::GENERAL_END || slot_id == MainPowerSource || (slot_id >= EmuConstants::GENERAL_BAGS_BEGIN && slot_id <= EmuConstants::GENERAL_BAGS_END))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Test whether a given slot can support a container item
|
||||
bool Inventory::SupportsContainers(int16 slot_id)
|
||||
{
|
||||
@@ -1388,6 +1412,8 @@ ItemInst::ItemInst(const Item_Struct* item, int16 charges) {
|
||||
m_scaledItem = nullptr;
|
||||
m_evolveInfo = nullptr;
|
||||
m_scaling = false;
|
||||
m_ornamenticon = 0;
|
||||
m_ornamentidfile = 0;
|
||||
}
|
||||
|
||||
ItemInst::ItemInst(SharedDatabase *db, uint32 item_id, int16 charges) {
|
||||
@@ -1410,6 +1436,8 @@ ItemInst::ItemInst(SharedDatabase *db, uint32 item_id, int16 charges) {
|
||||
m_scaledItem = nullptr;
|
||||
m_evolveInfo = nullptr;
|
||||
m_scaling = false;
|
||||
m_ornamenticon = 0;
|
||||
m_ornamentidfile = 0;
|
||||
}
|
||||
|
||||
ItemInst::ItemInst(ItemInstTypes use_type) {
|
||||
@@ -1427,6 +1455,8 @@ ItemInst::ItemInst(ItemInstTypes use_type) {
|
||||
m_scaledItem = nullptr;
|
||||
m_evolveInfo = nullptr;
|
||||
m_scaling = false;
|
||||
m_ornamenticon = 0;
|
||||
m_ornamentidfile = 0;
|
||||
}
|
||||
|
||||
// Make a copy of an ItemInst object
|
||||
@@ -1477,6 +1507,8 @@ ItemInst::ItemInst(const ItemInst& copy)
|
||||
m_evolveInfo = nullptr;
|
||||
|
||||
m_scaling = copy.m_scaling;
|
||||
m_ornamenticon = copy.m_ornamenticon;
|
||||
m_ornamentidfile = copy.m_ornamentidfile;
|
||||
}
|
||||
|
||||
// Clean up container contents
|
||||
@@ -1750,6 +1782,67 @@ ItemInst* ItemInst::GetAugment(uint8 slot) const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ItemInst* ItemInst::GetOrnamentationAug(int ornamentationAugtype) const
|
||||
{
|
||||
for (int i = AUG_BEGIN; i < EmuConstants::ITEM_COMMON_SIZE; i++) {
|
||||
if (GetAugment(i) && m_item->AugSlotType[i] == ornamentationAugtype) {
|
||||
const char *item_IDFile = GetAugment(i)->GetItem()->IDFile;
|
||||
if (strncmp(item_IDFile, "IT64", strlen(item_IDFile)) == 0 || strncmp(item_IDFile, "IT63", strlen(item_IDFile)) == 0)
|
||||
continue;
|
||||
|
||||
return this->GetAugment(i);
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool ItemInst::CanTransform(const Item_Struct *ItemToTry, const Item_Struct *Container, bool AllowAll) {
|
||||
if (!ItemToTry || !Container) return false;
|
||||
|
||||
if (ItemToTry->ItemType == ItemTypeArrow || strnlen(Container->CharmFile, 30) == 0)
|
||||
return false;
|
||||
|
||||
if (AllowAll && strncasecmp(Container->CharmFile, "ITEMTRANSFIGSHIELD", 18) && strncasecmp(Container->CharmFile, "ITEMTransfigBow", 15)) {
|
||||
switch (ItemToTry->ItemType) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
case 35:
|
||||
case 45:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
static std::map<std::string, int> types;
|
||||
types["itemtransfig1hp"] = 2;
|
||||
types["itemtransfig1hs"] = 0;
|
||||
types["itemtransfig2hb"] = 4;
|
||||
types["itemtransfig2hp"] = 35;
|
||||
types["itemtransfig2hs"] = 1;
|
||||
types["itemtransfigblunt"] = 3;
|
||||
types["itemtransfigbow"] = 5;
|
||||
types["itemtransfighth"] = 45;
|
||||
types["itemtransfigshield"] = 8;
|
||||
types["itemtransfigslashing"] = 0;
|
||||
|
||||
auto i = types.find(MakeLowerString(Container->CharmFile));
|
||||
if (i != types.end() && i->second == ItemToTry->ItemType)
|
||||
return true;
|
||||
|
||||
static std::map<std::string, int> typestwo;
|
||||
typestwo["itemtransfigblunt"] = 4;
|
||||
typestwo["itemtransfigslashing"] = 1;
|
||||
|
||||
i = typestwo.find(MakeLowerString(Container->CharmFile));
|
||||
if (i != typestwo.end() && i->second == ItemToTry->ItemType)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 ItemInst::GetAugmentItemID(uint8 slot) const
|
||||
{
|
||||
uint32 id = NO_ITEM;
|
||||
|
||||
+34
-3
@@ -121,8 +121,22 @@ public:
|
||||
// Public Methods
|
||||
///////////////////////////////
|
||||
|
||||
Inventory() { m_version = EQClientUnknown; m_versionset = false; }
|
||||
~Inventory();
|
||||
|
||||
// Inventory v2 creep
|
||||
bool SetInventoryVersion(EQClientVersion version) {
|
||||
if (!m_versionset) {
|
||||
m_version = version;
|
||||
return (m_versionset = true);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
EQClientVersion GetInventoryVersion() { return m_version; }
|
||||
|
||||
static void CleanDirty();
|
||||
static void MarkDirty(ItemInst *inst);
|
||||
|
||||
@@ -132,7 +146,7 @@ public:
|
||||
|
||||
inline iter_queue cursor_begin() { return m_cursor.begin(); }
|
||||
inline iter_queue cursor_end() { return m_cursor.end(); }
|
||||
inline bool CursorEmpty() { return (m_cursor.size() == 0); }
|
||||
inline bool CursorEmpty() { return (m_cursor.size() == 0); }
|
||||
|
||||
// Retrieve a read-only item from inventory
|
||||
inline const ItemInst* operator[](int16 slot_id) const { return GetItem(slot_id); }
|
||||
@@ -183,6 +197,10 @@ public:
|
||||
|
||||
static bool CanItemFitInContainer(const Item_Struct *ItemToTry, const Item_Struct *Container);
|
||||
|
||||
// Test for valid inventory casting slot
|
||||
bool SupportsClickCasting(int16 slot_id);
|
||||
bool SupportsPotionBeltCasting(int16 slot_id);
|
||||
|
||||
// Test whether a given slot can support a container item
|
||||
static bool SupportsContainers(int16 slot_id);
|
||||
|
||||
@@ -229,7 +247,12 @@ protected:
|
||||
std::map<int16, ItemInst*> m_bank; // Items in character bank
|
||||
std::map<int16, ItemInst*> m_shbank; // Items in character shared bank
|
||||
std::map<int16, ItemInst*> m_trade; // Items in a trade session
|
||||
ItemInstQueue m_cursor; // Items on cursor: FIFO
|
||||
ItemInstQueue m_cursor; // Items on cursor: FIFO
|
||||
|
||||
private:
|
||||
// Active inventory version
|
||||
EQClientVersion m_version;
|
||||
bool m_versionset;
|
||||
};
|
||||
|
||||
class SharedDatabase;
|
||||
@@ -306,7 +329,9 @@ public:
|
||||
void DeleteAugment(uint8 slot);
|
||||
ItemInst* RemoveAugment(uint8 index);
|
||||
bool IsAugmented();
|
||||
|
||||
ItemInst* GetOrnamentationAug(int ornamentationAugtype) const;
|
||||
static bool CanTransform(const Item_Struct *ItemToTry, const Item_Struct *Container, bool AllowAll = false);
|
||||
|
||||
// Has attack/delay?
|
||||
bool IsWeapon() const;
|
||||
bool IsAmmo() const;
|
||||
@@ -368,6 +393,10 @@ public:
|
||||
void SetActivated(bool activated) { m_activated = activated; }
|
||||
int8 GetEvolveLvl() const { return m_evolveLvl; }
|
||||
void SetScaling(bool v) { m_scaling = v; }
|
||||
uint32 GetOrnamentationIcon() const { return m_ornamenticon; }
|
||||
void SetOrnamentIcon(uint32 ornament_icon) { m_ornamenticon = ornament_icon; }
|
||||
uint32 GetOrnamentationIDFile() const { return m_ornamentidfile; }
|
||||
void SetOrnamentationIDFile(uint32 ornament_idfile) { m_ornamentidfile = ornament_idfile; }
|
||||
|
||||
void Initialize(SharedDatabase *db = nullptr);
|
||||
void ScaleItem();
|
||||
@@ -412,6 +441,8 @@ protected:
|
||||
Item_Struct* m_scaledItem;
|
||||
EvolveInfo* m_evolveInfo;
|
||||
bool m_scaling;
|
||||
uint32 m_ornamenticon;
|
||||
uint32 m_ornamentidfile;
|
||||
|
||||
//
|
||||
// Items inside of this item (augs or contents);
|
||||
|
||||
@@ -169,6 +169,7 @@ F(bardlevel)
|
||||
F(questitemflag)
|
||||
F(svcorruption)
|
||||
F(purity)
|
||||
F(evolvinglevel)
|
||||
F(backstabdmg)
|
||||
F(dsmitigation)
|
||||
F(heroic_str)
|
||||
|
||||
@@ -217,6 +217,7 @@ struct Item_Struct {
|
||||
// Begin SoF Fields
|
||||
int32 SVCorruption;
|
||||
uint32 Purity;
|
||||
uint8 EvolvingLevel;
|
||||
uint32 BackstabDmg;
|
||||
uint32 DSMitigation;
|
||||
int32 HeroicStr;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
//Mail and Chat Channels
|
||||
N(OP_MailLogin),
|
||||
N(OP_Mail),
|
||||
N(OP_Buddy),
|
||||
N(OP_ChannelAnnounceJoin),
|
||||
N(OP_ChannelAnnounceLeave),
|
||||
N(OP_Buddy),
|
||||
N(OP_MailHeaderCount),
|
||||
N(OP_MailHeader),
|
||||
N(OP_MailSendBody),
|
||||
N(OP_MailNew),
|
||||
N(OP_MailDeliveryStatus),
|
||||
N(OP_MailboxChange),
|
||||
N(OP_Ignore),
|
||||
N(OP_Mail),
|
||||
N(OP_MailboxChange),
|
||||
N(OP_MailDeliveryStatus),
|
||||
N(OP_MailHeader),
|
||||
N(OP_MailHeaderCount),
|
||||
N(OP_MailLogin),
|
||||
N(OP_MailNew),
|
||||
N(OP_MailSendBody),
|
||||
|
||||
+23
-154
@@ -54,20 +54,6 @@
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
static bool WELLRNG_init = false;
|
||||
static int state_i = 0;
|
||||
static unsigned int STATE[R];
|
||||
static unsigned int z0, z1, z2;
|
||||
unsigned int (*WELLRNG19937)(void);
|
||||
static unsigned int case_1 (void);
|
||||
static unsigned int case_2 (void);
|
||||
static unsigned int case_3 (void);
|
||||
static unsigned int case_4 (void);
|
||||
static unsigned int case_5 (void);
|
||||
static unsigned int case_6 (void);
|
||||
uint32 rnd_hash(time_t t, clock_t c);
|
||||
void oneseed(const uint32 seed);
|
||||
|
||||
void CoutTimestamp(bool ms) {
|
||||
time_t rawtime;
|
||||
struct tm* gmt_t;
|
||||
@@ -179,41 +165,6 @@ const char * itoa(int num, char* a,int b) {
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* generate a random integer in the range low-high this
|
||||
* should be used instead of the rand()%limit method
|
||||
*/
|
||||
int MakeRandomInt(int low, int high)
|
||||
{
|
||||
if(low >= high)
|
||||
return(low);
|
||||
|
||||
//return (rand()%(high-low+1) + (low));
|
||||
if(!WELLRNG_init) {
|
||||
WELLRNG_init = true;
|
||||
oneseed( rnd_hash( time(nullptr), clock() ) );
|
||||
WELLRNG19937 = case_1;
|
||||
}
|
||||
unsigned int randomnum = ((WELLRNG19937)());
|
||||
if(randomnum == 0xffffffffUL)
|
||||
return high;
|
||||
return int ((randomnum / (double)0xffffffffUL) * (high - low + 1) + low);
|
||||
}
|
||||
|
||||
double MakeRandomFloat(double low, double high)
|
||||
{
|
||||
if(low >= high)
|
||||
return(low);
|
||||
|
||||
//return (rand() / (double)RAND_MAX * (high - low) + low);
|
||||
if(!WELLRNG_init) {
|
||||
WELLRNG_init = true;
|
||||
oneseed( rnd_hash( time(nullptr), clock() ) );
|
||||
WELLRNG19937 = case_1;
|
||||
}
|
||||
return ((WELLRNG19937)() / (double)0xffffffffUL * (high - low) + low);
|
||||
}
|
||||
|
||||
uint32 rnd_hash( time_t t, clock_t c )
|
||||
{
|
||||
// Get a uint32 from t and c
|
||||
@@ -239,111 +190,6 @@ uint32 rnd_hash( time_t t, clock_t c )
|
||||
return ( h1 + differ++ ) ^ h2;
|
||||
}
|
||||
|
||||
void oneseed( const uint32 seed )
|
||||
{
|
||||
// Initialize generator state with seed
|
||||
// See Knuth TAOCP Vol 2, 3rd Ed, p.106 for multiplier.
|
||||
// In previous versions, most significant bits (MSBs) of the seed affect
|
||||
// only MSBs of the state array. Modified 9 Jan 2002 by Makoto Matsumoto.
|
||||
register int j = 0;
|
||||
STATE[j] = seed & 0xffffffffUL;
|
||||
for (j = 1; j < R; j++)
|
||||
{
|
||||
STATE[j] = ( 1812433253UL * ( STATE[j-1] ^ (STATE[j-1] >> 30) ) + j ) & 0xffffffffUL;
|
||||
}
|
||||
}
|
||||
|
||||
// WELL RNG code
|
||||
|
||||
/* ***************************************************************************** */
|
||||
/* Copyright: Francois Panneton and Pierre L'Ecuyer, University of Montreal */
|
||||
/* Makoto Matsumoto, Hiroshima University */
|
||||
/* Notice: This code can be used freely for personal, academic, */
|
||||
/* or non-commercial purposes. For commercial purposes, */
|
||||
/* please contact P. L'Ecuyer at: lecuyer@iro.UMontreal.ca */
|
||||
/* A modified "maximally equidistributed" implementation */
|
||||
/* by Shin Harase, Hiroshima University. */
|
||||
/* ***************************************************************************** */
|
||||
|
||||
unsigned int case_1 (void){
|
||||
// state_i == 0
|
||||
z0 = (VRm1Under & MASKL) | (VRm2Under & MASKU);
|
||||
z1 = MAT0NEG (-25, V0) ^ MAT0POS (27, VM1);
|
||||
z2 = MAT3POS (9, VM2) ^ MAT0POS (1, VM3);
|
||||
newV1 = z1 ^ z2;
|
||||
newV0Under = MAT1 (z0) ^ MAT0NEG (-9, z1) ^ MAT0NEG (-21, z2) ^ MAT0POS (21, newV1);
|
||||
state_i = R - 1;
|
||||
WELLRNG19937 = case_3;
|
||||
return (STATE[state_i] ^ (newVM2Over & BITMASK));
|
||||
}
|
||||
|
||||
static unsigned int case_2 (void){
|
||||
// state_i == 1
|
||||
z0 = (VRm1 & MASKL) | (VRm2Under & MASKU);
|
||||
z1 = MAT0NEG (-25, V0) ^ MAT0POS (27, VM1);
|
||||
z2 = MAT3POS (9, VM2) ^ MAT0POS (1, VM3);
|
||||
newV1 = z1 ^ z2;
|
||||
newV0 = MAT1 (z0) ^ MAT0NEG (-9, z1) ^ MAT0NEG (-21, z2) ^ MAT0POS (21, newV1);
|
||||
state_i = 0;
|
||||
WELLRNG19937 = case_1;
|
||||
return (STATE[state_i] ^ (newVM2 & BITMASK));
|
||||
}
|
||||
|
||||
static unsigned int case_3 (void){
|
||||
// state_i+M1 >= R
|
||||
z0 = (VRm1 & MASKL) | (VRm2 & MASKU);
|
||||
z1 = MAT0NEG (-25, V0) ^ MAT0POS (27, VM1Over);
|
||||
z2 = MAT3POS (9, VM2Over) ^ MAT0POS (1, VM3Over);
|
||||
newV1 = z1 ^ z2;
|
||||
newV0 = MAT1 (z0) ^ MAT0NEG (-9, z1) ^ MAT0NEG (-21, z2) ^ MAT0POS (21, newV1);
|
||||
state_i--;
|
||||
if (state_i + M1 < R)
|
||||
WELLRNG19937 = case_5;
|
||||
return (STATE[state_i] ^ (newVM2Over & BITMASK));
|
||||
}
|
||||
|
||||
static unsigned int case_4 (void){
|
||||
// state_i+M3 >= R
|
||||
z0 = (VRm1 & MASKL) | (VRm2 & MASKU);
|
||||
z1 = MAT0NEG (-25, V0) ^ MAT0POS (27, VM1);
|
||||
z2 = MAT3POS (9, VM2) ^ MAT0POS (1, VM3Over);
|
||||
newV1 = z1 ^ z2;
|
||||
newV0 = MAT1 (z0) ^ MAT0NEG (-9, z1) ^ MAT0NEG (-21, z2) ^ MAT0POS (21, newV1);
|
||||
state_i--;
|
||||
if (state_i + M3 < R)
|
||||
WELLRNG19937 = case_6;
|
||||
return (STATE[state_i] ^ (newVM2 & BITMASK));
|
||||
}
|
||||
|
||||
static unsigned int case_5 (void){
|
||||
// state_i+M2 >= R
|
||||
z0 = (VRm1 & MASKL) | (VRm2 & MASKU);
|
||||
z1 = MAT0NEG (-25, V0) ^ MAT0POS (27, VM1);
|
||||
z2 = MAT3POS (9, VM2Over) ^ MAT0POS (1, VM3Over);
|
||||
newV1 = z1 ^ z2;
|
||||
newV0 = MAT1 (z0) ^ MAT0NEG (-9, z1) ^ MAT0NEG (-21, z2) ^ MAT0POS (21, newV1);
|
||||
state_i--;
|
||||
if (state_i + M2 < R)
|
||||
WELLRNG19937 = case_4;
|
||||
return (STATE[state_i] ^ (newVM2Over & BITMASK));
|
||||
}
|
||||
|
||||
static unsigned int case_6 (void){
|
||||
// 2 <= state_i <= (R - M3 - 1)
|
||||
z0 = (VRm1 & MASKL) | (VRm2 & MASKU);
|
||||
z1 = MAT0NEG (-25, V0) ^ MAT0POS (27, VM1);
|
||||
z2 = MAT3POS (9, VM2) ^ MAT0POS (1, VM3);
|
||||
newV1 = z1 ^ z2;
|
||||
newV0 = MAT1 (z0) ^ MAT0NEG (-9, z1) ^ MAT0NEG (-21, z2) ^ MAT0POS (21, newV1);
|
||||
state_i--;
|
||||
if (state_i == 1)
|
||||
WELLRNG19937 = case_2;
|
||||
return (STATE[state_i] ^ (newVM2 & BITMASK));
|
||||
}
|
||||
|
||||
// end WELL RNG code
|
||||
|
||||
|
||||
float EQ13toFloat(int d)
|
||||
{
|
||||
return ( float(d)/float(1<<2));
|
||||
@@ -387,3 +233,26 @@ float EQHtoFloat(int d)
|
||||
{
|
||||
return(360.0f - float((d * 360) >> 11));
|
||||
}
|
||||
|
||||
// returns a swapped-bit value for use in client translator and inventory functions
|
||||
uint32 SwapBits21and22(uint32 mask)
|
||||
{
|
||||
static const uint32 BIT21 = 1 << 21;
|
||||
static const uint32 BIT22 = 1 << 22;
|
||||
static const uint32 SWAPBITS = (BIT21 | BIT22);
|
||||
|
||||
if ((bool)(mask & BIT21) != (bool)(mask & BIT22))
|
||||
mask ^= SWAPBITS;
|
||||
|
||||
return mask;
|
||||
}
|
||||
|
||||
// returns an unset bit 22 value for use in client translators
|
||||
uint32 Catch22(uint32 mask)
|
||||
{
|
||||
static const uint32 KEEPBITS = ~(1 << 22);
|
||||
|
||||
mask &= KEEPBITS;
|
||||
|
||||
return mask;
|
||||
}
|
||||
|
||||
@@ -102,6 +102,8 @@ int FloatToEQ13(float d);
|
||||
int NewFloatToEQ13(float d);
|
||||
int FloatToEQ19(float d);
|
||||
int FloatToEQH(float d);
|
||||
uint32 SwapBits21and22(uint32 mask);
|
||||
uint32 Catch22(uint32 mask);
|
||||
|
||||
// macro to catch fp errors (provided by noudness)
|
||||
#define FCMP(a,b) (fabs(a-b) < FLT_EPSILON)
|
||||
|
||||
@@ -32,6 +32,7 @@ MySQLRequestResult::MySQLRequestResult(MYSQL_RES* result, uint32 rowsAffected, u
|
||||
|
||||
void MySQLRequestResult::FreeInternals()
|
||||
{
|
||||
|
||||
safe_delete_array(m_ErrorBuffer);
|
||||
|
||||
if (m_Result != nullptr)
|
||||
@@ -100,6 +101,7 @@ MySQLRequestResult::MySQLRequestResult(MySQLRequestResult&& moveItem)
|
||||
m_RowsAffected = moveItem.m_RowsAffected;
|
||||
m_LastInsertedID = moveItem.m_LastInsertedID;
|
||||
m_ColumnLengths = moveItem.m_ColumnLengths;
|
||||
m_ColumnCount = moveItem.m_ColumnCount;
|
||||
m_Fields = moveItem.m_Fields;
|
||||
|
||||
// Keeps deconstructor from double freeing
|
||||
@@ -127,6 +129,7 @@ MySQLRequestResult& MySQLRequestResult::operator=(MySQLRequestResult&& other)
|
||||
m_CurrentRow = other.m_CurrentRow;
|
||||
m_OneBeyondRow = other.m_OneBeyondRow;
|
||||
m_ColumnLengths = other.m_ColumnLengths;
|
||||
m_ColumnCount = other.m_ColumnCount;
|
||||
m_Fields = other.m_Fields;
|
||||
|
||||
// Keeps deconstructor from double freeing
|
||||
|
||||
@@ -305,7 +305,8 @@ OUTz(OP_FinishWindow2);
|
||||
//OUTv(OP_AdventureInfo, strlen(p)+1);
|
||||
//OUTv(OP_AdventureMerchantResponse, strlen(msg)+2);
|
||||
OUTv(OP_ItemPacket, ItemPacket_Struct);
|
||||
OUTv(OP_BuffFadeMsg, BuffFadeMsg_Struct);
|
||||
OUTv(OP_ColoredText, ColoredText_Struct);
|
||||
OUTv(OP_ItemRecastDelay, ItemRecastDelay_Struct);
|
||||
OUTv(OP_FormattedMessage, FormattedMessage_Struct);
|
||||
OUTv(OP_GuildMemberList, uint32); //variable length, but nasty
|
||||
OUTv(OP_InterruptCast, InterruptCast_Struct);
|
||||
|
||||
@@ -160,7 +160,7 @@ void load_opcode_names()
|
||||
opcode_map[0x0192]="LiveOP_YellForHelp";
|
||||
opcode_map[0x00ef]="LiveOP_SafePoint";
|
||||
opcode_map[0x0157]="LiveOP_Buff";
|
||||
opcode_map[0x00c0]="LiveOP_BuffFadeMsg";
|
||||
opcode_map[0x00c0]="LiveOP_ColoredText";
|
||||
opcode_map[0x0440]="LiveOP_MultiLineMsg";
|
||||
opcode_map[0x021c]="LiveOP_SpecialMesg";
|
||||
opcode_map[0x0013]="LiveOP_Consent";
|
||||
|
||||
+1230
-979
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#ifndef CLIENT62_CONSTANTS_H_
|
||||
#define CLIENT62_CONSTANTS_H_
|
||||
|
||||
#include "../common/types.h"
|
||||
#include "../types.h"
|
||||
|
||||
namespace Client62 {
|
||||
namespace maps {
|
||||
@@ -180,6 +180,7 @@ namespace Client62 {
|
||||
|
||||
namespace limits {
|
||||
static const bool ALLOWS_EMPTY_BAG_IN_BAG = false;
|
||||
static const bool ALLOWS_CLICK_CAST_FROM_BAG = false;
|
||||
static const bool COIN_HAS_WEIGHT = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,36 +1,54 @@
|
||||
|
||||
//list of packets we need to encode on the way out:
|
||||
// out-going packets that require an ENCODE translation:
|
||||
E(OP_Action)
|
||||
E(OP_AdventureMerchantSell)
|
||||
E(OP_ApplyPoison)
|
||||
E(OP_BazaarSearch)
|
||||
E(OP_BecomeTrader)
|
||||
E(OP_CharInventory)
|
||||
E(OP_DeleteCharge)
|
||||
E(OP_DeleteItem)
|
||||
E(OP_DeleteSpawn)
|
||||
E(OP_GuildMemberLevelUpdate)
|
||||
E(OP_GuildMemberList)
|
||||
E(OP_Illusion)
|
||||
E(OP_ItemLinkResponse)
|
||||
E(OP_ItemPacket)
|
||||
E(OP_LeadershipExpUpdate)
|
||||
E(OP_LootItem)
|
||||
E(OP_MoveItem)
|
||||
E(OP_NewSpawn)
|
||||
E(OP_OnLevelMessage)
|
||||
E(OP_PetBuffWindow)
|
||||
E(OP_PlayerProfile)
|
||||
E(OP_ReadBook)
|
||||
E(OP_RespondAA)
|
||||
E(OP_SendAATable)
|
||||
E(OP_SendCharInfo)
|
||||
E(OP_LeadershipExpUpdate)
|
||||
E(OP_PlayerProfile)
|
||||
E(OP_NewSpawn)
|
||||
E(OP_ZoneSpawns)
|
||||
E(OP_ZoneEntry)
|
||||
E(OP_ItemPacket)
|
||||
E(OP_ItemLinkResponse)
|
||||
E(OP_CharInventory)
|
||||
E(OP_GuildMemberList)
|
||||
E(OP_ZoneServerReady)
|
||||
E(OP_GuildMemberLevelUpdate)
|
||||
E(OP_ReadBook)
|
||||
E(OP_Illusion)
|
||||
E(OP_ShopPlayerSell)
|
||||
E(OP_Track)
|
||||
E(OP_BazaarSearch)
|
||||
E(OP_RespondAA)
|
||||
E(OP_DeleteSpawn)
|
||||
E(OP_TributeItem)
|
||||
E(OP_WearChange)
|
||||
E(OP_Action)
|
||||
E(OP_BecomeTrader)
|
||||
E(OP_PetBuffWindow)
|
||||
E(OP_OnLevelMessage)
|
||||
//list of packets we need to decode on the way in:
|
||||
D(OP_SetServerFilter)
|
||||
E(OP_ZoneEntry)
|
||||
E(OP_ZoneServerReady)
|
||||
E(OP_ZoneSpawns)
|
||||
// incoming packets that require a DECODE translation:
|
||||
D(OP_AdventureMerchantSell)
|
||||
D(OP_ApplyPoison)
|
||||
D(OP_AugmentItem)
|
||||
D(OP_CastSpell)
|
||||
D(OP_CharacterCreate)
|
||||
D(OP_ItemLinkClick)
|
||||
D(OP_WhoAllRequest)
|
||||
D(OP_ReadBook)
|
||||
D(OP_Consume)
|
||||
D(OP_DeleteItem)
|
||||
D(OP_FaceChange)
|
||||
D(OP_ItemLinkClick)
|
||||
D(OP_LootItem)
|
||||
D(OP_MoveItem)
|
||||
D(OP_ReadBook)
|
||||
D(OP_SetServerFilter)
|
||||
D(OP_ShopPlayerSell)
|
||||
D(OP_TradeSkillCombine)
|
||||
D(OP_TributeItem)
|
||||
D(OP_WearChange)
|
||||
D(OP_WhoAllRequest)
|
||||
#undef E
|
||||
#undef D
|
||||
|
||||
@@ -406,7 +406,7 @@ struct CastSpell_Struct
|
||||
uint32 spell_id;
|
||||
uint32 inventoryslot; // slot for clicky item, 0xFFFF = normal cast
|
||||
uint32 target_id;
|
||||
uint8 cs_unknown[4];
|
||||
uint8 cs_unknown[4];
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -472,8 +472,8 @@ struct GMTrainee_Struct
|
||||
{
|
||||
/*000*/ uint32 npcid;
|
||||
/*004*/ uint32 playerid;
|
||||
/*008*/ uint32 skills[73];
|
||||
/*300*/ uint8 unknown300[148];
|
||||
/*008*/ uint32 skills[PACKET_SKILL_ARRAY_SIZE];
|
||||
/*408*/ uint8 unknown408[40];
|
||||
/*448*/
|
||||
};
|
||||
|
||||
@@ -558,7 +558,7 @@ struct CharCreate_Struct
|
||||
/*0128*/ uint32 face;
|
||||
/*0132*/ uint32 eyecolor1; //its possiable we could have these switched
|
||||
/*0136*/ uint32 eyecolor2; //since setting one sets the other we really can't check
|
||||
/*0140*/ uint32 unknown140;
|
||||
/*0140*/ uint32 tutorial; //assumptions are bad! But guessed
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -611,14 +611,62 @@ struct PotionBelt_Struct {
|
||||
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
||||
static const uint32 MAX_RAID_LEADERSHIP_AA_ARRAY = 16;
|
||||
static const uint32 MAX_LEADERSHIP_AA_ARRAY = (MAX_GROUP_LEADERSHIP_AA_ARRAY+MAX_RAID_LEADERSHIP_AA_ARRAY);
|
||||
struct LeadershipAA_Struct {
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
struct GroupLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 groupAAMarkNPC;
|
||||
uint32 groupAANPCHealth;
|
||||
uint32 groupAADelegateMainAssist;
|
||||
uint32 groupAADelegateMarkNPC;
|
||||
uint32 groupAA4;
|
||||
uint32 groupAA5;
|
||||
uint32 groupAAInspectBuffs;
|
||||
uint32 groupAA7;
|
||||
uint32 groupAASpellAwareness;
|
||||
uint32 groupAAOffenseEnhancement;
|
||||
uint32 groupAAManaEnhancement;
|
||||
uint32 groupAAHealthEnhancement;
|
||||
uint32 groupAAHealthRegeneration;
|
||||
uint32 groupAAFindPathToPC;
|
||||
uint32 groupAAHealthOfTargetsTarget;
|
||||
uint32 groupAA15;
|
||||
};
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct RaidLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 raidAAMarkNPC;
|
||||
uint32 raidAANPCHealth;
|
||||
uint32 raidAADelegateMainAssist;
|
||||
uint32 raidAADelegateMarkNPC;
|
||||
uint32 raidAA4;
|
||||
uint32 raidAA5;
|
||||
uint32 raidAA6;
|
||||
uint32 raidAASpellAwareness;
|
||||
uint32 raidAAOffenseEnhancement;
|
||||
uint32 raidAAManaEnhancement;
|
||||
uint32 raidAAHealthEnhancement;
|
||||
uint32 raidAAHealthRegeneration;
|
||||
uint32 raidAAFindPathToPC;
|
||||
uint32 raidAAHealthOfTargetsTarget;
|
||||
uint32 raidAA14;
|
||||
uint32 raidAA15;
|
||||
};
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct LeadershipAA_Struct {
|
||||
union {
|
||||
struct {
|
||||
GroupLeadershipAA_Struct group;
|
||||
RaidLeadershipAA_Struct raid;
|
||||
};
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -630,7 +678,7 @@ struct RaidLeadershipAA_Struct {
|
||||
static const uint32 MAX_PP_LANGUAGE = 28;
|
||||
static const uint32 MAX_PP_SPELLBOOK = 400;
|
||||
static const uint32 MAX_PP_MEMSPELL = 9;
|
||||
static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_AA_ARRAY = 240;
|
||||
static const uint32 MAX_GROUP_MEMBERS = 6;
|
||||
struct PlayerProfile_Struct
|
||||
@@ -1148,19 +1196,27 @@ struct BulkItemPacket_Struct
|
||||
|
||||
struct Consume_Struct
|
||||
{
|
||||
/*0000*/ uint32 slot;
|
||||
/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click
|
||||
/*0008*/ uint8 c_unknown1[4];
|
||||
/*0012*/ uint8 type; // 0x01=Food 0x02=Water
|
||||
/*0013*/ uint8 unknown13[3];
|
||||
/*0000*/ uint32 slot;
|
||||
/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click
|
||||
/*0008*/ uint8 c_unknown1[4];
|
||||
/*0012*/ uint8 type; // 0x01=Food 0x02=Water
|
||||
/*0013*/ uint8 unknown13[3];
|
||||
};
|
||||
|
||||
struct DeleteItem_Struct
|
||||
{
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0012*/
|
||||
};
|
||||
|
||||
struct MoveItem_Struct
|
||||
{
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0012*/
|
||||
};
|
||||
|
||||
//
|
||||
@@ -1362,12 +1418,6 @@ struct CombatAbility_Struct {
|
||||
uint32 m_skill;
|
||||
};
|
||||
|
||||
struct DeleteItem_Struct {
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
};
|
||||
|
||||
//Instill Doubt
|
||||
struct Instill_Doubt_Struct {
|
||||
uint8 i_id;
|
||||
@@ -1521,6 +1571,14 @@ struct Adventure_Purchase_Struct {
|
||||
/*008*/ uint32 variable;
|
||||
};
|
||||
|
||||
struct Adventure_Sell_Struct {
|
||||
/*000*/ uint32 unknown000; //0x01
|
||||
/*004*/ uint32 npcid;
|
||||
/*008*/ uint32 slot;
|
||||
/*012*/ uint32 charges;
|
||||
/*016*/ uint32 sell_price;
|
||||
};
|
||||
|
||||
struct AdventurePoints_Update_Struct {
|
||||
/*000*/ uint32 ldon_available_points; // Total available points
|
||||
/*004*/ uint8 unkown_apu004[20];
|
||||
@@ -2524,10 +2582,10 @@ struct TributeInfo_Struct {
|
||||
};
|
||||
|
||||
struct TributeItem_Struct {
|
||||
uint32 slot;
|
||||
uint32 quantity;
|
||||
uint32 tribute_master_id;
|
||||
int32 tribute_points;
|
||||
uint32 slot;
|
||||
uint32 quantity;
|
||||
uint32 tribute_master_id;
|
||||
int32 tribute_points;
|
||||
};
|
||||
|
||||
struct TributePoint_Struct {
|
||||
@@ -2563,7 +2621,7 @@ struct Split_Struct
|
||||
*/
|
||||
struct NewCombine_Struct {
|
||||
/*00*/ int16 container_slot;
|
||||
/*02*/ char unknown02[2];
|
||||
/*02*/ int16 guildtribute_slot;
|
||||
/*04*/
|
||||
};
|
||||
|
||||
@@ -2969,7 +3027,7 @@ struct GroupInvite_Struct {
|
||||
// uint8 unknown128[65];
|
||||
};
|
||||
|
||||
struct BuffFadeMsg_Struct {
|
||||
struct ColoredText_Struct {
|
||||
uint32 color;
|
||||
char msg[1];
|
||||
};
|
||||
@@ -3076,6 +3134,11 @@ struct AnnoyingZoneUnknown_Struct {
|
||||
uint32 value; //always 4
|
||||
};
|
||||
|
||||
struct ApplyPoison_Struct {
|
||||
uint32 inventorySlot;
|
||||
uint32 success;
|
||||
};
|
||||
|
||||
struct GuildMemberUpdate_Struct {
|
||||
/*00*/ uint32 guild_id; //not sure
|
||||
/*04*/ char member_name[64];
|
||||
@@ -3084,11 +3147,6 @@ struct GuildMemberUpdate_Struct {
|
||||
/*72*/ uint32 unknown072;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}; //end namespace structs
|
||||
}; //end namespace Client62
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "sof.h"
|
||||
#include "sod.h"
|
||||
#include "rof.h"
|
||||
//#include "rof2.h"
|
||||
#include "rof2.h"
|
||||
|
||||
void RegisterAllPatches(EQStreamIdentifier &into) {
|
||||
Client62::Register(into);
|
||||
@@ -17,6 +17,7 @@ void RegisterAllPatches(EQStreamIdentifier &into) {
|
||||
SoD::Register(into);
|
||||
Underfoot::Register(into);
|
||||
RoF::Register(into);
|
||||
// Uncomment the line below to enable RoF2 Client
|
||||
//RoF2::Register(into);
|
||||
}
|
||||
|
||||
@@ -27,5 +28,6 @@ void ReloadAllPatches() {
|
||||
SoD::Reload();
|
||||
Underfoot::Reload();
|
||||
RoF::Reload();
|
||||
// Uncomment the line below to enable RoF2 Client
|
||||
//RoF2::Reload();
|
||||
}
|
||||
|
||||
+5027
-4771
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,37 @@
|
||||
#ifndef RoF2_H_
|
||||
#define RoF2_H_
|
||||
|
||||
#include "../struct_strategy.h"
|
||||
|
||||
class EQStreamIdentifier;
|
||||
|
||||
namespace RoF2 {
|
||||
|
||||
//these are the only public member of this namespace.
|
||||
extern void Register(EQStreamIdentifier &into);
|
||||
extern void Reload();
|
||||
|
||||
|
||||
|
||||
//you should not directly access anything below..
|
||||
//I just dont feel like making a seperate header for it.
|
||||
|
||||
class Strategy : public StructStrategy {
|
||||
public:
|
||||
Strategy();
|
||||
|
||||
protected:
|
||||
|
||||
virtual std::string Describe() const;
|
||||
virtual const EQClientVersion ClientVersion() const;
|
||||
|
||||
//magic macro to declare our opcode processors
|
||||
#include "ss_declare.h"
|
||||
#include "rof2_ops.h"
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /*RoF2_H_*/
|
||||
@@ -0,0 +1,217 @@
|
||||
/*
|
||||
EQEMu: Everquest Server Emulator
|
||||
|
||||
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
*/
|
||||
|
||||
#ifndef RoF2_CONSTANTS_H_
|
||||
#define RoF2_CONSTANTS_H_
|
||||
|
||||
#include "../types.h"
|
||||
|
||||
namespace RoF2 {
|
||||
namespace maps {
|
||||
typedef enum : int16 {
|
||||
MapPossessions = 0,
|
||||
MapBank,
|
||||
MapSharedBank,
|
||||
MapTrade,
|
||||
MapWorld,
|
||||
MapLimbo,
|
||||
MapTribute,
|
||||
MapTrophyTribute,
|
||||
MapGuildTribute,
|
||||
MapMerchant,
|
||||
MapDeleted,
|
||||
MapCorpse,
|
||||
MapBazaar,
|
||||
MapInspect,
|
||||
MapRealEstate,
|
||||
MapViewMODPC,
|
||||
MapViewMODBank,
|
||||
MapViewMODSharedBank,
|
||||
MapViewMODLimbo,
|
||||
MapAltStorage,
|
||||
MapArchived,
|
||||
MapMail,
|
||||
MapGuildTrophyTribute,
|
||||
MapKrono,
|
||||
MapOther,
|
||||
_MapCount
|
||||
} InventoryMaps;
|
||||
}
|
||||
|
||||
namespace slots {
|
||||
typedef enum : int16 {
|
||||
MainCharm = 0,
|
||||
MainEar1,
|
||||
MainHead,
|
||||
MainFace,
|
||||
MainEar2,
|
||||
MainNeck,
|
||||
MainShoulders,
|
||||
MainArms,
|
||||
MainBack,
|
||||
MainWrist1,
|
||||
MainWrist2,
|
||||
MainRange,
|
||||
MainHands,
|
||||
MainPrimary,
|
||||
MainSecondary,
|
||||
MainFinger1,
|
||||
MainFinger2,
|
||||
MainChest,
|
||||
MainLegs,
|
||||
MainFeet,
|
||||
MainWaist,
|
||||
MainPowerSource,
|
||||
MainAmmo,
|
||||
MainGeneral1,
|
||||
MainGeneral2,
|
||||
MainGeneral3,
|
||||
MainGeneral4,
|
||||
MainGeneral5,
|
||||
MainGeneral6,
|
||||
MainGeneral7,
|
||||
MainGeneral8,
|
||||
MainGeneral9,
|
||||
MainGeneral10,
|
||||
MainCursor,
|
||||
_MainCount,
|
||||
_MainEquipmentBegin = MainCharm,
|
||||
_MainEquipmentEnd = MainAmmo,
|
||||
_MainEquipmentCount = (_MainEquipmentEnd - _MainEquipmentBegin + 1),
|
||||
_MainGeneralBegin = MainGeneral1,
|
||||
_MainGeneralEnd = MainGeneral10,
|
||||
_MainGeneralCount = (_MainGeneralEnd - _MainGeneralBegin + 1)
|
||||
} EquipmentSlots;
|
||||
}
|
||||
|
||||
namespace consts {
|
||||
static const uint16 MAP_POSSESSIONS_SIZE = slots::_MainCount;
|
||||
static const uint16 MAP_BANK_SIZE = 24;
|
||||
static const uint16 MAP_SHARED_BANK_SIZE = 2;
|
||||
static const uint16 MAP_TRADE_SIZE = 8;
|
||||
static const uint16 MAP_WORLD_SIZE = 10;
|
||||
static const uint16 MAP_LIMBO_SIZE = 36;
|
||||
static const uint16 MAP_TRIBUTE_SIZE = 0; //?
|
||||
static const uint16 MAP_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 MAP_GUILD_TRIBUTE_SIZE = 0;
|
||||
static const uint16 MAP_MERCHANT_SIZE = 0;
|
||||
static const uint16 MAP_DELETED_SIZE = 0;
|
||||
static const uint16 MAP_CORPSE_SIZE = slots::_MainCount;
|
||||
static const uint16 MAP_BAZAAR_SIZE = 200;
|
||||
static const uint16 MAP_INSPECT_SIZE = slots::_MainEquipmentCount;
|
||||
static const uint16 MAP_REAL_ESTATE_SIZE = 0;
|
||||
static const uint16 MAP_VIEW_MOD_PC_SIZE = MAP_POSSESSIONS_SIZE;
|
||||
static const uint16 MAP_VIEW_MOD_BANK_SIZE = MAP_BANK_SIZE;
|
||||
static const uint16 MAP_VIEW_MOD_SHARED_BANK_SIZE = MAP_SHARED_BANK_SIZE;
|
||||
static const uint16 MAP_VIEW_MOD_LIMBO_SIZE = MAP_LIMBO_SIZE;
|
||||
static const uint16 MAP_ALT_STORAGE_SIZE = 0;
|
||||
static const uint16 MAP_ARCHIVED_SIZE = 0;
|
||||
static const uint16 MAP_MAIL_SIZE = 0;
|
||||
static const uint16 MAP_GUILD_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 MAP_KRONO_SIZE = NOT_USED;
|
||||
static const uint16 MAP_OTHER_SIZE = 0;
|
||||
|
||||
// most of these definitions will go away with the structure-based system..this maintains compatibility for now
|
||||
// (bag slots and main slots beyond Possessions are assigned for compatibility with current server coding)
|
||||
static const int16 EQUIPMENT_BEGIN = slots::MainCharm;
|
||||
static const int16 EQUIPMENT_END = slots::MainAmmo;
|
||||
static const uint16 EQUIPMENT_SIZE = slots::_MainEquipmentCount;
|
||||
|
||||
static const int16 GENERAL_BEGIN = slots::MainGeneral1;
|
||||
static const int16 GENERAL_END = slots::MainGeneral10;
|
||||
static const uint16 GENERAL_SIZE = slots::_MainGeneralCount;
|
||||
static const int16 GENERAL_BAGS_BEGIN = 251;
|
||||
static const int16 GENERAL_BAGS_END_OFFSET = 99;
|
||||
static const int16 GENERAL_BAGS_END = GENERAL_BAGS_BEGIN + GENERAL_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 CURSOR = slots::MainCursor;
|
||||
static const int16 CURSOR_BAG_BEGIN = 351;
|
||||
static const int16 CURSOR_BAG_END_OFFSET = 9;
|
||||
static const int16 CURSOR_BAG_END = CURSOR_BAG_BEGIN + CURSOR_BAG_END_OFFSET;
|
||||
|
||||
static const int16 BANK_BEGIN = 2000;
|
||||
static const int16 BANK_END = 2023;
|
||||
static const int16 BANK_BAGS_BEGIN = 2031;
|
||||
static const int16 BANK_BAGS_END_OFFSET = 239;
|
||||
static const int16 BANK_BAGS_END = BANK_BAGS_BEGIN + BANK_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 SHARED_BANK_BEGIN = 2500;
|
||||
static const int16 SHARED_BANK_END = 2501;
|
||||
static const int16 SHARED_BANK_BAGS_BEGIN = 2531;
|
||||
static const int16 SHARED_BANK_BAGS_END_OFFSET = 19;
|
||||
static const int16 SHARED_BANK_BAGS_END = SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 TRADE_BEGIN = 3000;
|
||||
static const int16 TRADE_END = 3007;
|
||||
static const int16 TRADE_NPC_END = 3003;
|
||||
static const int16 TRADE_BAGS_BEGIN = 3031;
|
||||
static const int16 TRADE_BAGS_END_OFFSET = 79;
|
||||
static const int16 TRADE_BAGS_END = TRADE_BAGS_BEGIN + TRADE_BAGS_END_OFFSET;
|
||||
|
||||
static const int16 WORLD_BEGIN = 4000;
|
||||
static const int16 WORLD_END = 4009;
|
||||
|
||||
static const int16 TRIBUTE_BEGIN = 400;
|
||||
static const int16 TRIBUTE_END = 404;
|
||||
|
||||
static const int16 CORPSE_BEGIN = slots::MainGeneral1;
|
||||
static const int16 CORPSE_END = slots::MainGeneral1 + slots::MainCursor;
|
||||
|
||||
static const uint16 ITEM_COMMON_SIZE = 6;
|
||||
static const uint16 ITEM_CONTAINER_SIZE = 255; // 255; (server max will be 255..unsure what actual client is - test)
|
||||
|
||||
static const uint32 BANDOLIERS_COUNT = 20; // count = number of bandolier instances
|
||||
static const uint32 BANDOLIER_SIZE = 4; // size = number of equipment slots in bandolier instance
|
||||
static const uint32 POTION_BELT_SIZE = 5;
|
||||
}
|
||||
|
||||
namespace limits {
|
||||
static const bool ALLOWS_EMPTY_BAG_IN_BAG = true;
|
||||
static const bool ALLOWS_CLICK_CAST_FROM_BAG = true;
|
||||
static const bool COIN_HAS_WEIGHT = false;
|
||||
}
|
||||
|
||||
}; //end namespace RoF2
|
||||
|
||||
#endif /*RoF2_CONSTANTS_H_*/
|
||||
|
||||
/*
|
||||
RoF2 Notes:
|
||||
** Structure-based inventory **
|
||||
ok Possessions: ( 0, { 0 .. 33 }, -1, -1 ) (Corpse: { 23 .. 56 } [Offset 23])
|
||||
ok [Equipment: ( 0, { 0 .. 22 }, -1, -1 )]
|
||||
ok [General: ( 0, { 23 .. 32 }, -1, -1 )]
|
||||
ok [Cursor: ( 0, 33, -1, -1 )]
|
||||
General Bags: ( 0, { 23 .. 32 }, { 0 .. (maxsize - 1) }, -1 )
|
||||
Cursor Bags: ( 0, 33, { 0 .. (maxsize - 1) }, -1 )
|
||||
|
||||
Bank: ( 1, { 0 .. 23 }, -1, -1 )
|
||||
Bank Bags: ( 1, { 0 .. 23 }, { 0 .. (maxsize - 1)}, -1 )
|
||||
|
||||
Shared Bank: ( 2, { 0 .. 1 }, -1, -1 )
|
||||
Shared Bank Bags: ( 2, { 0 .. 1 }, { 0 .. (maxsize - 1) }, -1 )
|
||||
|
||||
Trade: ( 3, { 0 .. 8 }, -1, -1 )
|
||||
(Trade Bags: 3031 - 3110 -- server values)
|
||||
|
||||
World: ( 4, { 0 .. 10 }, -1, -1 )
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,439 @@
|
||||
/*
|
||||
|
||||
|
||||
These fields must be in the order of how they are serialized!
|
||||
|
||||
|
||||
|
||||
*/
|
||||
#define NEW_TRY
|
||||
#ifdef NEW_TRY
|
||||
//* 000 */ I(ItemClass) // Leave this one off on purpose
|
||||
/* 001 */ S(Name)
|
||||
/* 002 */ S(Lore)
|
||||
//* 003 */ C("")//lorefile - Newly Added - Field is Null
|
||||
/* 004 */ S(IDFile)
|
||||
/* 005 */ I(ID)
|
||||
/* 006 */ I(Weight)
|
||||
/* 007 */ I(NoRent)
|
||||
/* 008 */ I(NoDrop)
|
||||
/* 009 */ I(Size)
|
||||
/* 010 */ I(Slots)
|
||||
/* 011 */ I(Price)
|
||||
/* 012 */ I(Icon)
|
||||
/* 013 */ C("0")//UNK013
|
||||
/* 014 */ C("0")//UNK014
|
||||
/* 015 */ I(BenefitFlag)
|
||||
/* 016 */ I(Tradeskills)
|
||||
/* 017 */ I(CR)
|
||||
/* 018 */ I(DR)
|
||||
/* 019 */ I(PR)
|
||||
/* 020 */ I(MR)
|
||||
/* 021 */ I(FR)
|
||||
/* 022 */ C("0")//svcorruption - Newly Added
|
||||
/* 023 */ I(AStr)
|
||||
/* 024 */ I(ASta)
|
||||
/* 025 */ I(AAgi)
|
||||
/* 026 */ I(ADex)
|
||||
/* 027 */ I(ACha)
|
||||
/* 028 */ I(AInt)
|
||||
/* 029 */ I(AWis)
|
||||
/* 030 */ I(HP)
|
||||
/* 031 */ I(Mana)
|
||||
/* 032 */ I(Endur) //endur - Relocated
|
||||
/* 033 */ I(AC)
|
||||
/* 034 */ I(Classes)//classes - Relocated
|
||||
/* 035 */ I(Races)//races - Relocated
|
||||
/* 036 */ I(Deity)
|
||||
/* 037 */ I(SkillModValue)
|
||||
/* 038 */ C("0")//UNK038 - Default is 0
|
||||
/* 039 */ I(SkillModType)
|
||||
/* 040 */ I(BaneDmgRace)
|
||||
/* 041 */ I(BaneDmgBody)//banedmgbody - Relocated
|
||||
/* 042 */ I(BaneDmgRaceAmt)//banedmgraceamt - Relocated
|
||||
/* 043 */ I(BaneDmgAmt)//banedmgamt - Relocated
|
||||
/* 044 */ I(Magic)
|
||||
/* 045 */ I(CastTime_)
|
||||
/* 046 */ I(ReqLevel)
|
||||
/* 047 */ I(RecLevel)//reclevel - Relocated
|
||||
/* 048 */ I(RecSkill)//recskill - Relocated
|
||||
/* 049 */ I(BardType)
|
||||
/* 050 */ I(BardValue)
|
||||
/* 051 */ I(Light)
|
||||
/* 052 */ I(Delay)
|
||||
/* 053 */ I(ElemDmgType)
|
||||
/* 054 */ I(ElemDmgAmt)
|
||||
/* 055 */ I(Range)
|
||||
/* 056 */ I(Damage)
|
||||
/* 057 */ I(Color)
|
||||
/* 058 */ I(ItemType)
|
||||
/* 059 */ I(Material)
|
||||
/* 060 */ C("0")//UNK060 - Default is 0
|
||||
/* 061 */ C("0")//UNK061 - Default is 0
|
||||
/* 062 */ F(SellRate)
|
||||
/* 063 */ I(CombatEffects)
|
||||
/* 064 */ I(Shielding)
|
||||
/* 065 */ I(StunResist)
|
||||
/* 066 */ I(StrikeThrough)
|
||||
/* 067 */ I(ExtraDmgSkill)
|
||||
/* 068 */ I(ExtraDmgAmt)
|
||||
/* 069 */ I(SpellShield)
|
||||
/* 070 */ I(Avoidance)
|
||||
/* 071 */ I(Accuracy)
|
||||
/* 072 */ I(CharmFileID)
|
||||
/* 073 */ I(FactionMod1)//Swapped these so Faction Amt comes after each Faction Mod
|
||||
/* 074 */ I(FactionAmt1)//Swapped these so Faction Amt comes after each Faction Mod
|
||||
/* 075 */ I(FactionMod2)//Swapped these so Faction Amt comes after each Faction Mod
|
||||
/* 076 */ I(FactionAmt2)//Swapped these so Faction Amt comes after each Faction Mod
|
||||
/* 077 */ I(FactionMod3)//Swapped these so Faction Amt comes after each Faction Mod
|
||||
/* 078 */ I(FactionAmt3)//Swapped these so Faction Amt comes after each Faction Mod
|
||||
/* 079 */ I(FactionMod4)//Swapped these so Faction Amt comes after each Faction Mod
|
||||
/* 080 */ I(FactionAmt4)//Swapped these so Faction Amt comes after each Faction Mod
|
||||
/* 081 */ S(CharmFile)
|
||||
/* 082 */ I(AugType)
|
||||
/* 083 */ I(AugRestrict)//augrestrict - Relocated
|
||||
/* 084 */ I(AugDistiller)//augdistiller - Relocated
|
||||
/* 085 */ I(AugSlotType[0])
|
||||
/* 086 */ I(AugSlotVisible[0])//augslot1visible - Default 1
|
||||
/* 087 */ C("0")//augslot1unk2 - Newly Added - Default 0
|
||||
/* 088 */ I(AugSlotType[1])
|
||||
/* 089 */ I(AugSlotVisible[1])
|
||||
/* 090 */ C("0")//augslot2unk2 - Newly Added
|
||||
/* 091 */ I(AugSlotType[2])
|
||||
/* 092 */ I(AugSlotVisible[2])
|
||||
/* 093 */ C("0")//augslot3unk2 - Newly Added
|
||||
/* 094 */ I(AugSlotType[3])
|
||||
/* 095 */ I(AugSlotVisible[3])
|
||||
/* 096 */ C("0")//augslot4unk2 - Newly Added
|
||||
/* 097 */ I(AugSlotType[4])
|
||||
/* 098 */ I(AugSlotVisible[4])
|
||||
/* 099 */ C("0")//augslot5unk2 - Newly Added
|
||||
/* 100 */ I(PointType)//pointtype - Relocated
|
||||
/* 101 */ I(LDoNTheme)
|
||||
/* 102 */ I(LDoNPrice)
|
||||
/* 103 */ C("70")//UNK098 - Newly Added - Default 70, but some are set to 0
|
||||
/* 104 */ I(LDoNSold)
|
||||
/* 105 */ I(BagType)
|
||||
/* 106 */ I(BagSlots)
|
||||
/* 107 */ I(BagSize)
|
||||
/* 108 */ I(BagWR)
|
||||
/* 109 */ I(Book)
|
||||
/* 110 */ I(BookType)
|
||||
/* 111 */ S(Filename)
|
||||
/* 112 */ I(LoreGroup)
|
||||
/* 113 */ I(ArtifactFlag)
|
||||
/* 114 */ C("0")//I(PendingLoreFlag)?//UNK109 - Default 0, but a few are 1
|
||||
/* 115 */ I(Favor)
|
||||
/* 116 */ I(GuildFavor)//guildfavor - Relocated
|
||||
/* 117 */ I(FVNoDrop)
|
||||
/* 118 */ I(DotShielding)
|
||||
/* 119 */ I(Attack)
|
||||
/* 120 */ I(Regen)
|
||||
/* 121 */ I(ManaRegen)
|
||||
/* 122 */ I(EnduranceRegen)
|
||||
/* 123 */ I(Haste)
|
||||
/* 124 */ I(DamageShield)
|
||||
/* 125 */ C("-1") //UNK120 - Default is -1
|
||||
/* 126 */ C("0") //UNK121 - Default is 0
|
||||
/* 127 */ I(Attuneable)
|
||||
/* 128 */ I(NoPet)
|
||||
/* 129 */ C("0") //UNK124 - Default 0, but a few are 1
|
||||
/* 130 */ I(PotionBelt)
|
||||
/* 131 */ C("0") //potionbeltslots - Default 0, but a few are 1
|
||||
/* 132 */ I(StackSize)
|
||||
/* 133 */ I(NoTransfer)
|
||||
/* 134 */ I(Stackable)//UNK129 - Default is 0, but some are much higher
|
||||
/* 135 */ I(QuestItemFlag)//questitemflag - Default is 0 (off), flag on = 1
|
||||
/* 136 */ C("0")//UNK131 - Default is 0, but there is an item set to 1
|
||||
/* 137 */ C("0")//UNK132 - Default is 0? 0000000000000000000?
|
||||
/* 138 */ I(Click.Effect)
|
||||
/* 139 */ I(Click.Type)
|
||||
/* 140 */ I(Click.Level2)
|
||||
/* 141 */ I(Click.Level)
|
||||
/* 142 */ I(MaxCharges)//maxcharges - Relocated
|
||||
/* 143 */ I(CastTime_)//casttime - Relocated - Note Duplicate Entries for CastTime_ and none for CastTime
|
||||
/* 144 */ I(RecastDelay)//recastdelay - Relocated
|
||||
/* 145 */ I(RecastType)//recasttype - Relocated
|
||||
/* 146 */ C("0")//clickunk5 - Newly Added - Default is 0
|
||||
/* 147 */ C("")//clickname - Newly Added - Default is Null
|
||||
/* 148 */ C("-1")//clickunk7 - Newly Added - Default is -1, but some set to 0 and some much higher
|
||||
/* 149 */ I(Proc.Effect)
|
||||
/* 150 */ I(Proc.Type)
|
||||
/* 151 */ I(Proc.Level2)
|
||||
/* 152 */ I(Proc.Level)
|
||||
/* 153 */ C("0")//procunk1 - Newly Added - Default is 0, but some set to -1 and 1
|
||||
/* 154 */ C("0")//procunk2 - Newly Added - Default is 0
|
||||
/* 155 */ C("0")//procunk3 - Newly Added - Default is 0
|
||||
/* 156 */ C("0")//procunk4 - Newly Added - Default is 0
|
||||
/* 157 */ I(ProcRate)//procrate - Relocated
|
||||
/* 158 */ C("")//procname - Newly Added - Default is Null
|
||||
/* 159 */ C("-1")//procunk7 - Newly Added - Default is -1, but some set to 0
|
||||
/* 160 */ I(Worn.Effect)
|
||||
/* 161 */ I(Worn.Type)
|
||||
/* 162 */ I(Worn.Level2)
|
||||
/* 163 */ I(Worn.Level)
|
||||
/* 164 */ C("0")//wornunk1 - Newly Added - Default is 0
|
||||
/* 165 */ C("0")//wornunk2 - Newly Added - Default is 0
|
||||
/* 166 */ C("0")//wornunk3 - Newly Added - Default is 0
|
||||
/* 167 */ C("0")//wornunk4 - Newly Added - Default is 0
|
||||
/* 168 */ C("0")//wornunk5 - Newly Added - Default is 0
|
||||
/* 169 */ C("")//wornname - Newly Added - Default is Null
|
||||
/* 170 */ C("-1")//wornunk7 - Newly Added - Default is -1, but some set to 0
|
||||
/* 171 */ I(Focus.Effect)
|
||||
/* 172 */ I(Focus.Type)
|
||||
/* 173 */ I(Focus.Level2)
|
||||
/* 174 */ I(Focus.Level)
|
||||
/* 175 */ C("0")//focusunk1 - Newly Added - Default is 0
|
||||
/* 176 */ C("0")//focusunk2 - Newly Added - Default is 0
|
||||
/* 177 */ C("0")//focusunk3 - Newly Added - Default is 0
|
||||
/* 178 */ C("0")//focusunk4 - Newly Added - Default is 0
|
||||
/* 179 */ C("0")//focusunk5 - Newly Added - Default is 0
|
||||
/* 180 */ C("")//focusname - Newly Added - Default is Null
|
||||
/* 181 */ C("-1")//focusunk7 - Newly Added - Default is -1, but some set to 0
|
||||
/* 182 */ I(Scroll.Effect)
|
||||
/* 183 */ I(Scroll.Type)
|
||||
/* 184 */ I(Scroll.Level2)
|
||||
/* 185 */ I(Scroll.Level)
|
||||
/* 186 */ C("0")//scrollunk1 - Renumber this***
|
||||
/* 187 */ C("0")//scrollunk2 - Newly Added - Default is 0
|
||||
/* 188 */ C("0")//scrollunk3 - Newly Added - Default is 0
|
||||
/* 189 */ C("0")//scrollunk4 - Newly Added - Default is 0
|
||||
/* 190 */ C("0")//scrollunk5 - Newly Added - Default is 0
|
||||
/* 191 */ C("")//scrollname - Newly Added - Default is Null
|
||||
/* 192 */ C("-1")//scrollunk7 - Newly Added - Default is -1, but some set to 0
|
||||
/* 193 */ C("0")//UNK193 - Default is 0
|
||||
/* 194 */ C("0")//purity - Newly Added - Default is 0, but some go up to 75
|
||||
/* 195 */ C("0")//dsmitigation - Newly Added - Default is 0, but some are up to 2
|
||||
/* 196 */ C("0")//heroic_str - Newly Added - Default is 0
|
||||
/* 197 */ C("0")//heroic_int - Newly Added - Default is 0
|
||||
/* 198 */ C("0")//heroic_wis - Newly Added - Default is 0
|
||||
/* 199 */ C("0")//heroic_agi - Newly Added - Default is 0
|
||||
/* 200 */ C("0")//heroic_dex - Newly Added - Default is 0
|
||||
/* 201 */ C("0")//heroic_sta - Newly Added - Default is 0
|
||||
/* 202 */ C("0")//heroic_cha - Newly Added - Default is 0
|
||||
/* 203 */ C("0")//HeroicSvPoison - Newly Added - Default is 0
|
||||
/* 204 */ C("0")//HeroicSvMagic - Newly Added - Default is 0
|
||||
/* 205 */ C("0")//HeroicSvFire - Newly Added - Default is 0
|
||||
/* 206 */ C("0")//HeroicSvDisease - Newly Added - Default is 0
|
||||
/* 207 */ C("0")//HeroicSvCold - Newly Added - Default is 0
|
||||
/* 208 */ C("0")//HeroicSvCorruption - Newly Added - Default is 0
|
||||
/* 209 */ C("0")//healamt - Newly Added - Default is 0, but some are up to 9
|
||||
/* 210 */ C("0")//spelldmg - Newly Added - Default is 0, but some are up to 9
|
||||
/* 211 */ C("0")//clairvoyance - Newly Added - Default is 0, but some are up to 10
|
||||
/* 212 */ C("0")//backstabdmg - Newly Added - Default is 0, but some are up to 65
|
||||
//* 213 */ C("0")//evolvinglevel - Newly Added - Default is 0, but some are up to 7
|
||||
//* 214 */ C("0")//MaxPower - Newly Added
|
||||
//* 215 */ C("0")//Power - Newly Added
|
||||
|
||||
//This doesn't appear to be used /* 102 */ S(verified)//verified
|
||||
//This doesn't appear to be used /* 102 */ S(serialized)//created
|
||||
//Unsure where this goes right now (or if it is even used) /* 108 */ I(SummonedFlag)
|
||||
|
||||
#else
|
||||
/* 000 */ //I(ItemClass) Leave this one off on purpose
|
||||
/* 001 */ S(Name)
|
||||
/* 002 */ S(Lore)
|
||||
/* 003 */ C("") //LoreFile?
|
||||
/* 003 */ S(IDFile)
|
||||
/* 004 */ I(ID)
|
||||
/* 005 */ I(Weight)
|
||||
/* 006 */ I(NoRent)
|
||||
/* 007 */ I(NoDrop)
|
||||
/* 008 */ I(Size)
|
||||
/* 009 */ I(Slots)
|
||||
/* 010 */ I(Price)
|
||||
/* 011 */ I(Icon)
|
||||
/* 013 */ C("0")
|
||||
/* 014 */ C("0")
|
||||
/* 014 */ I(BenefitFlag)
|
||||
/* 015 */ I(Tradeskills)
|
||||
/* 016 */ I(CR)
|
||||
/* 017 */ I(DR)
|
||||
/* 018 */ I(PR)
|
||||
/* 019 */ I(MR)
|
||||
/* 020 */ I(FR)
|
||||
C("0") //svcorruption
|
||||
/* 021 */ I(AStr)
|
||||
/* 022 */ I(ASta)
|
||||
/* 023 */ I(AAgi)
|
||||
/* 024 */ I(ADex)
|
||||
/* 025 */ I(ACha)
|
||||
/* 026 */ I(AInt)
|
||||
/* 027 */ I(AWis)
|
||||
/* 028 */ I(HP)
|
||||
/* 029 */ I(Mana)
|
||||
I(Endur)
|
||||
/* 030 */ I(AC)
|
||||
/* 052 */ I(Classes)
|
||||
/* 053 */ I(Races)
|
||||
/* 031 */ I(Deity)
|
||||
/* 032 */ I(SkillModValue)
|
||||
/* 033 */ C("0")
|
||||
/* 034 */ I(SkillModType)
|
||||
/* 035 */ I(BaneDmgRace)
|
||||
/* 037 */ I(BaneDmgBody)
|
||||
/* 036 */ I(BaneDmgRaceAmt)
|
||||
/* 036 */ I(BaneDmgAmt)
|
||||
/* 038 */ I(Magic)
|
||||
/* 039 */ I(CastTime_)
|
||||
/* 040 */ I(ReqLevel)
|
||||
/* 045 */ I(RecLevel)
|
||||
/* 046 */ I(RecSkill)
|
||||
/* 041 */ I(BardType)
|
||||
/* 042 */ I(BardValue)
|
||||
/* 043 */ I(Light)
|
||||
/* 044 */ I(Delay)
|
||||
/* 047 */ I(ElemDmgType)
|
||||
/* 048 */ I(ElemDmgAmt)
|
||||
/* 049 */ I(Range)
|
||||
/* 050 */ I(Damage)
|
||||
/* 051 */ I(Color)
|
||||
/* 056 */ I(ItemType)
|
||||
/* 057 */ I(Material)
|
||||
/* 060 */ C("0")
|
||||
/* 061 */ C("0")
|
||||
/* 058 */ F(SellRate)
|
||||
/* 063 */ I(CombatEffects)
|
||||
/* 064 */ I(Shielding)
|
||||
/* 065 */ I(StunResist)
|
||||
/* 059 */ //C("0")
|
||||
/* 061 */ //C("0")
|
||||
/* 066 */ I(StrikeThrough)
|
||||
/* 067 */ I(ExtraDmgSkill)
|
||||
/* 068 */ I(ExtraDmgAmt)
|
||||
/* 069 */ I(SpellShield)
|
||||
/* 070 */ I(Avoidance)
|
||||
/* 071 */ I(Accuracy)
|
||||
/* 072 */ I(CharmFileID)
|
||||
/* 073 */ I(FactionMod1)
|
||||
/* 077 */ I(FactionAmt1)
|
||||
/* 074 */ I(FactionMod2)
|
||||
/* 078 */ I(FactionAmt2)
|
||||
/* 075 */ I(FactionMod3)
|
||||
/* 079 */ I(FactionAmt3)
|
||||
/* 076 */ I(FactionMod4)
|
||||
/* 080 */ I(FactionAmt4)
|
||||
/* 081 */ S(CharmFile)
|
||||
/* 082 */ I(AugType)
|
||||
/* 082 */ I(AugRestrict)
|
||||
/* 082 */ I(AugDistiller)
|
||||
/* 083 */ I(AugSlotType[0])
|
||||
/* 084 */ I(AugSlotVisible[0])
|
||||
/* 084 */ I(AugSlotUnk2[0])
|
||||
/* 085 */ I(AugSlotType[1])
|
||||
/* 086 */ I(AugSlotVisible[1])
|
||||
/* 086 */ I(AugSlotUnk2[1])
|
||||
/* 087 */ I(AugSlotType[2])
|
||||
/* 088 */ I(AugSlotVisible[2])
|
||||
/* 088 */ I(AugSlotUnk2[2])
|
||||
/* 089 */ I(AugSlotType[3])
|
||||
/* 090 */ I(AugSlotVisible[3])
|
||||
/* 090 */ I(AugSlotUnk2[3])
|
||||
/* 091 */ I(AugSlotType[4])
|
||||
/* 092 */ I(AugSlotVisible[4])
|
||||
/* 092 */ I(AugSlotUnk2[4])
|
||||
/* 093 */ I(PointType)
|
||||
/* 093 */ I(LDoNTheme)
|
||||
/* 094 */ I(LDoNPrice)
|
||||
/* 094 */ C("0")
|
||||
/* 095 */ I(LDoNSold)
|
||||
/* 096 */ I(BagType)
|
||||
/* 097 */ I(BagSlots)
|
||||
/* 098 */ I(BagSize)
|
||||
/* 099 */ I(BagWR)
|
||||
/* 100 */ I(Book)
|
||||
/* 101 */ I(BookType)
|
||||
/* 102 */ S(Filename)
|
||||
/* 105 */ I(LoreGroup)
|
||||
/* 106 */ //I(PendingLoreFlag)
|
||||
/* 107 */ I(ArtifactFlag)
|
||||
/* 094 */ C("0")
|
||||
/* 108 */ //I(SummonedFlag)
|
||||
/* 109 */ I(Favor)
|
||||
/* 121 */ I(GuildFavor)
|
||||
/* 110 */ I(FVNoDrop)
|
||||
/* 112 */ I(DotShielding)
|
||||
/* 113 */ I(Attack)
|
||||
/* 114 */ I(Regen)
|
||||
/* 115 */ I(ManaRegen)
|
||||
/* 116 */ I(EnduranceRegen)
|
||||
/* 117 */ I(Haste)
|
||||
/* 118 */ I(DamageShield)
|
||||
/* 120 */ C("0")
|
||||
/* 121 */ C("0")
|
||||
/* 125 */ I(Attuneable)
|
||||
/* 126 */ I(NoPet)
|
||||
/* 124 */ C("0")
|
||||
/* 129 */ I(PotionBelt)
|
||||
/* 130 */ I(PotionBeltSlots)
|
||||
/* 131 */ I(StackSize)
|
||||
/* 132 */ I(NoTransfer)
|
||||
/* 129 */ C("0")
|
||||
/* 132 */ I(QuestItemFlag)
|
||||
/* 131 */ C("0")
|
||||
/* 132 */ C("00000000000000000000000000000000000000")
|
||||
/* 134 */ I(Click.Effect)
|
||||
/* 135 */ I(Click.Type)
|
||||
/* 136 */ I(Click.Level2)
|
||||
/* 137 */ I(Click.Level)
|
||||
/* 055 */ I(MaxCharges)
|
||||
/* 060 */ I(CastTime)
|
||||
/* 119 */ I(RecastDelay)
|
||||
/* 120 */ I(RecastType)
|
||||
/* 138 */ C("0") //clickunk5 (prolly ProcRate)
|
||||
/* 138 */ C("") //clickunk6
|
||||
/* 138 */ C("-1") //clickunk7
|
||||
/* 139 */ I(Proc.Effect)
|
||||
/* 140 */ I(Proc.Type)
|
||||
/* 141 */ I(Proc.Level2)
|
||||
/* 142 */ I(Proc.Level)
|
||||
/* 143 */ C("0") //procunk1 (prolly MaxCharges)
|
||||
/* 143 */ C("0") //procunk2 (prolly CastTime)
|
||||
/* 143 */ C("0") //procunk3 (prolly RecastDelay)
|
||||
/* 143 */ C("0") //procunk4 (prolly RecastType)
|
||||
/* 062 */ I(ProcRate)
|
||||
/* 143 */ C("") //procunk6
|
||||
/* 143 */ C("-1") //procunk7
|
||||
/* 144 */ I(Worn.Effect)
|
||||
/* 145 */ I(Worn.Type)
|
||||
/* 146 */ I(Worn.Level2)
|
||||
/* 147 */ I(Worn.Level)
|
||||
/* 143 */ C("0") //wornunk1 (prolly MaxCharges)
|
||||
/* 143 */ C("0") //wornunk2 (prolly CastTime)
|
||||
/* 143 */ C("0") //wornunk3 (prolly RecastDelay)
|
||||
/* 143 */ C("0") //wornunk4 (prolly RecastType)
|
||||
/* 143 */ C("0") //wornunk5 (prolly ProcRate)
|
||||
/* 143 */ C("") //wornunk6
|
||||
/* 143 */ C("-1") //wornunk7
|
||||
/* 149 */ I(Focus.Effect)
|
||||
/* 150 */ I(Focus.Type)
|
||||
/* 151 */ I(Focus.Level2)
|
||||
/* 152 */ I(Focus.Level)
|
||||
/* 143 */ C("0") //focusunk1 (prolly MaxCharges)
|
||||
/* 143 */ C("0") //focusunk2 (prolly CastTime)
|
||||
/* 143 */ C("0") //focusunk3 (prolly RecastDelay)
|
||||
/* 143 */ C("0") //focusunk4 (prolly RecastType)
|
||||
/* 143 */ C("0") //focusunk5 (prolly ProcRate)
|
||||
/* 143 */ C("") //focusunk6
|
||||
/* 143 */ C("-1") //focusunk7
|
||||
/* 154 */ I(Scroll.Effect)
|
||||
/* 155 */ I(Scroll.Type)
|
||||
/* 156 */ I(Scroll.Level2)
|
||||
/* 157 */ I(Scroll.Level)
|
||||
/* 143 */ C("0") //scrollunk1 (prolly MaxCharges)
|
||||
/* 143 */ C("0") //scrollunk2 (prolly CastTime)
|
||||
/* 143 */ C("0") //scrollunk3 (prolly RecastDelay)
|
||||
/* 143 */ C("0") //scrollunk4 (prolly RecastType)
|
||||
/* 143 */ C("0") //scrollunk5 (prolly ProcRate)
|
||||
/* 143 */ C("") //scrollunk6
|
||||
/* 143 */ C("-1") //scrollunk7
|
||||
/* 193 */ C("0") //Power Source Capacity
|
||||
/* 194 */ C("0") //purity
|
||||
|
||||
#endif
|
||||
|
||||
#undef I
|
||||
#undef C
|
||||
#undef S
|
||||
#undef F
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
// out-going packets that require an ENCODE translation:
|
||||
// Begin RoF2 Encodes
|
||||
|
||||
// incoming packets that require a DECODE translation:
|
||||
// Begin RoF2 Decodes
|
||||
|
||||
|
||||
// End RoF2 Encodes/Decodes
|
||||
|
||||
// These require Encodes/Decodes for RoF, so they do for RoF2 as well
|
||||
// Begin RoF Encodes
|
||||
E(OP_Action)
|
||||
E(OP_AdventureMerchantSell)
|
||||
E(OP_AltCurrency)
|
||||
E(OP_AltCurrencySell)
|
||||
E(OP_Animation)
|
||||
E(OP_ApplyPoison)
|
||||
E(OP_AugmentInfo)
|
||||
E(OP_Barter)
|
||||
E(OP_BazaarSearch)
|
||||
E(OP_BeginCast)
|
||||
E(OP_BlockedBuffs)
|
||||
E(OP_Buff)
|
||||
E(OP_BuffCreate)
|
||||
E(OP_CancelTrade)
|
||||
E(OP_CastSpell)
|
||||
E(OP_ChannelMessage)
|
||||
E(OP_CharInventory)
|
||||
E(OP_ClickObjectAction)
|
||||
E(OP_ClientUpdate)
|
||||
E(OP_Consider)
|
||||
E(OP_Damage)
|
||||
E(OP_DeleteCharge)
|
||||
E(OP_DeleteItem)
|
||||
E(OP_DeleteSpawn)
|
||||
E(OP_DisciplineUpdate)
|
||||
E(OP_DzCompass)
|
||||
E(OP_DzExpeditionEndsWarning)
|
||||
E(OP_DzExpeditionInfo)
|
||||
E(OP_DzExpeditionList)
|
||||
E(OP_DzJoinExpeditionConfirm)
|
||||
E(OP_DzLeaderStatus)
|
||||
E(OP_DzMemberList)
|
||||
E(OP_ExpansionInfo)
|
||||
E(OP_GMLastName)
|
||||
E(OP_GMTrainSkillConfirm)
|
||||
E(OP_GroundSpawn)
|
||||
E(OP_GroupCancelInvite)
|
||||
E(OP_GroupFollow)
|
||||
E(OP_GroupFollow2)
|
||||
E(OP_GroupInvite)
|
||||
E(OP_GroupUpdate)
|
||||
E(OP_GuildMemberList)
|
||||
E(OP_GuildMemberUpdate)
|
||||
E(OP_GuildsList)
|
||||
E(OP_HPUpdate)
|
||||
E(OP_Illusion)
|
||||
E(OP_InspectBuffs)
|
||||
E(OP_InspectRequest)
|
||||
E(OP_InterruptCast)
|
||||
E(OP_ItemLinkResponse)
|
||||
E(OP_ItemPacket)
|
||||
E(OP_ItemVerifyReply)
|
||||
E(OP_LeadershipExpUpdate)
|
||||
E(OP_LogServer)
|
||||
E(OP_LootItem)
|
||||
E(OP_ManaChange)
|
||||
E(OP_MercenaryDataResponse)
|
||||
E(OP_MercenaryDataUpdate)
|
||||
E(OP_MoveItem)
|
||||
E(OP_NewSpawn)
|
||||
E(OP_NewZone)
|
||||
E(OP_OnLevelMessage)
|
||||
//E(OP_OpenNewTasksWindow)
|
||||
E(OP_PetBuffWindow)
|
||||
E(OP_PlayerProfile)
|
||||
E(OP_RaidJoin)
|
||||
E(OP_RaidUpdate)
|
||||
E(OP_ReadBook)
|
||||
E(OP_RecipeAutoCombine)
|
||||
E(OP_RemoveBlockedBuffs)
|
||||
E(OP_RequestClientZoneChange)
|
||||
E(OP_RespondAA)
|
||||
E(OP_RezzRequest)
|
||||
E(OP_SendAATable)
|
||||
E(OP_SendCharInfo)
|
||||
E(OP_SendMembership)
|
||||
E(OP_SendZonepoints)
|
||||
E(OP_SetGuildRank)
|
||||
E(OP_ShopPlayerBuy)
|
||||
E(OP_ShopPlayerSell)
|
||||
E(OP_ShopRequest)
|
||||
E(OP_SkillUpdate)
|
||||
E(OP_SomeItemPacketMaybe)
|
||||
E(OP_SpawnAppearance)
|
||||
E(OP_SpawnDoor)
|
||||
E(OP_Stun)
|
||||
E(OP_TargetBuffs)
|
||||
E(OP_TaskDescription)
|
||||
E(OP_TaskHistoryReply)
|
||||
E(OP_Track)
|
||||
E(OP_Trader)
|
||||
E(OP_TraderBuy)
|
||||
E(OP_TributeInfo)
|
||||
E(OP_TributeItem)
|
||||
E(OP_VetRewardsAvaliable)
|
||||
E(OP_WearChange)
|
||||
E(OP_WhoAllResponse)
|
||||
E(OP_ZoneChange)
|
||||
E(OP_ZoneEntry)
|
||||
E(OP_ZonePlayerToBind)
|
||||
E(OP_ZoneServerInfo)
|
||||
E(OP_ZoneSpawns)
|
||||
// Begin RoF Decodes
|
||||
D(OP_AdventureMerchantSell)
|
||||
D(OP_AltCurrencySell)
|
||||
D(OP_AltCurrencySellSelection)
|
||||
D(OP_ApplyPoison)
|
||||
D(OP_AugmentInfo)
|
||||
D(OP_AugmentItem)
|
||||
D(OP_BazaarSearch)
|
||||
D(OP_BlockedBuffs)
|
||||
D(OP_Buff)
|
||||
D(OP_BuffRemoveRequest)
|
||||
D(OP_CastSpell)
|
||||
D(OP_ChannelMessage)
|
||||
D(OP_CharacterCreate)
|
||||
D(OP_ClientUpdate)
|
||||
D(OP_Consider)
|
||||
D(OP_ConsiderCorpse)
|
||||
D(OP_Consume)
|
||||
D(OP_Damage)
|
||||
D(OP_DeleteItem)
|
||||
D(OP_EnvDamage)
|
||||
D(OP_FaceChange)
|
||||
D(OP_FindPersonRequest)
|
||||
D(OP_GMLastName)
|
||||
D(OP_GroupCancelInvite)
|
||||
D(OP_GroupDisband)
|
||||
D(OP_GroupFollow)
|
||||
D(OP_GroupFollow2)
|
||||
D(OP_GroupInvite)
|
||||
D(OP_GroupInvite2)
|
||||
D(OP_GuildDemote)
|
||||
D(OP_GuildRemove)
|
||||
D(OP_GuildStatus)
|
||||
D(OP_InspectRequest)
|
||||
D(OP_ItemLinkClick)
|
||||
D(OP_ItemVerifyRequest)
|
||||
D(OP_LoadSpellSet)
|
||||
D(OP_LootItem)
|
||||
D(OP_MoveItem)
|
||||
D(OP_PetCommands)
|
||||
D(OP_RaidInvite)
|
||||
D(OP_ReadBook)
|
||||
D(OP_RecipeAutoCombine)
|
||||
D(OP_RemoveBlockedBuffs)
|
||||
D(OP_RezzAnswer)
|
||||
D(OP_Save)
|
||||
D(OP_SetServerFilter)
|
||||
D(OP_ShopPlayerBuy)
|
||||
D(OP_ShopPlayerSell)
|
||||
D(OP_ShopRequest)
|
||||
D(OP_Trader)
|
||||
D(OP_TraderBuy)
|
||||
D(OP_TradeSkillCombine)
|
||||
D(OP_TributeItem)
|
||||
D(OP_WhoAllRequest)
|
||||
D(OP_ZoneChange)
|
||||
D(OP_ZoneEntry)
|
||||
// End RoF Encodes/Decodes
|
||||
#undef E
|
||||
#undef D
|
||||
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#ifndef RoF_CONSTANTS_H_
|
||||
#define RoF_CONSTANTS_H_
|
||||
|
||||
#include "../common/types.h"
|
||||
#include "../types.h"
|
||||
|
||||
namespace RoF {
|
||||
namespace maps {
|
||||
@@ -184,6 +184,7 @@ namespace RoF {
|
||||
|
||||
namespace limits {
|
||||
static const bool ALLOWS_EMPTY_BAG_IN_BAG = true;
|
||||
static const bool ALLOWS_CLICK_CAST_FROM_BAG = true;
|
||||
static const bool COIN_HAS_WEIGHT = false;
|
||||
}
|
||||
|
||||
|
||||
+142
-142
@@ -1,162 +1,162 @@
|
||||
|
||||
//list of packets we need to encode on the way out:
|
||||
|
||||
E(OP_SendCharInfo)
|
||||
E(OP_ZoneServerInfo)
|
||||
E(OP_SendAATable)
|
||||
E(OP_PlayerProfile)
|
||||
E(OP_ZoneEntry)
|
||||
E(OP_CharInventory)
|
||||
E(OP_NewZone)
|
||||
E(OP_SpawnDoor)
|
||||
E(OP_GroundSpawn)
|
||||
E(OP_SendZonepoints)
|
||||
E(OP_NewSpawn)
|
||||
E(OP_ZoneSpawns)
|
||||
E(OP_ItemLinkResponse)
|
||||
E(OP_ItemPacket)
|
||||
E(OP_GuildMemberList)
|
||||
E(OP_Illusion)
|
||||
E(OP_ManaChange)
|
||||
E(OP_ClientUpdate)
|
||||
E(OP_LeadershipExpUpdate)
|
||||
E(OP_ExpansionInfo)
|
||||
E(OP_LogServer)
|
||||
E(OP_Damage)
|
||||
E(OP_Buff)
|
||||
// out-going packets that require an ENCODE translation:
|
||||
E(OP_Action)
|
||||
E(OP_Consider)
|
||||
E(OP_CancelTrade)
|
||||
E(OP_ShopPlayerSell)
|
||||
E(OP_DeleteItem)
|
||||
E(OP_ItemVerifyReply)
|
||||
E(OP_DeleteCharge)
|
||||
E(OP_MoveItem)
|
||||
//E(OP_OpenNewTasksWindow)
|
||||
E(OP_BazaarSearch)
|
||||
E(OP_Trader)
|
||||
E(OP_TraderBuy)
|
||||
E(OP_LootItem)
|
||||
E(OP_TributeItem)
|
||||
E(OP_SomeItemPacketMaybe)
|
||||
E(OP_ReadBook)
|
||||
E(OP_Stun)
|
||||
E(OP_ZonePlayerToBind)
|
||||
E(OP_AdventureMerchantSell)
|
||||
E(OP_RaidUpdate)
|
||||
E(OP_RaidJoin)
|
||||
E(OP_VetRewardsAvaliable)
|
||||
E(OP_InspectRequest)
|
||||
E(OP_GroupInvite)
|
||||
E(OP_GroupFollow)
|
||||
E(OP_GroupFollow2)
|
||||
E(OP_GroupUpdate)
|
||||
E(OP_GroupCancelInvite)
|
||||
E(OP_WhoAllResponse)
|
||||
E(OP_Track)
|
||||
E(OP_ShopPlayerBuy)
|
||||
E(OP_PetBuffWindow)
|
||||
E(OP_OnLevelMessage)
|
||||
E(OP_Barter)
|
||||
E(OP_AltCurrency)
|
||||
E(OP_AltCurrencySell)
|
||||
E(OP_Animation)
|
||||
E(OP_ApplyPoison)
|
||||
E(OP_AugmentInfo)
|
||||
E(OP_Barter)
|
||||
E(OP_BazaarSearch)
|
||||
E(OP_BeginCast)
|
||||
E(OP_BlockedBuffs)
|
||||
E(OP_Buff)
|
||||
E(OP_BuffCreate)
|
||||
E(OP_CancelTrade)
|
||||
E(OP_CastSpell)
|
||||
E(OP_ChannelMessage)
|
||||
E(OP_GuildsList)
|
||||
E(OP_CharInventory)
|
||||
E(OP_ClickObjectAction)
|
||||
E(OP_ClientUpdate)
|
||||
E(OP_Consider)
|
||||
E(OP_Damage)
|
||||
E(OP_DeleteCharge)
|
||||
E(OP_DeleteItem)
|
||||
E(OP_DeleteSpawn)
|
||||
E(OP_DisciplineUpdate)
|
||||
E(OP_DzCompass)
|
||||
E(OP_DzExpeditionEndsWarning)
|
||||
E(OP_DzExpeditionInfo)
|
||||
E(OP_DzCompass)
|
||||
E(OP_DzMemberList)
|
||||
E(OP_DzExpeditionList)
|
||||
E(OP_DzLeaderStatus)
|
||||
E(OP_DzJoinExpeditionConfirm)
|
||||
E(OP_TargetBuffs)
|
||||
E(OP_BuffCreate)
|
||||
E(OP_SpawnAppearance)
|
||||
E(OP_RespondAA)
|
||||
E(OP_DisciplineUpdate)
|
||||
E(OP_AltCurrencySell)
|
||||
E(OP_AltCurrency)
|
||||
E(OP_RequestClientZoneChange)
|
||||
E(OP_ZoneChange)
|
||||
E(OP_WearChange)
|
||||
E(OP_ShopRequest)
|
||||
E(OP_CastSpell)
|
||||
E(OP_InterruptCast)
|
||||
E(OP_SendMembership)
|
||||
E(OP_Animation)
|
||||
E(OP_HPUpdate)
|
||||
E(OP_BlockedBuffs)
|
||||
E(OP_RemoveBlockedBuffs)
|
||||
E(OP_DeleteSpawn)
|
||||
E(OP_ClickObjectAction)
|
||||
E(OP_RecipeAutoCombine)
|
||||
E(OP_GMTrainSkillConfirm)
|
||||
E(OP_SkillUpdate)
|
||||
E(OP_TributeInfo)
|
||||
E(OP_TaskHistoryReply)
|
||||
E(OP_TaskDescription)
|
||||
E(OP_SetGuildRank)
|
||||
E(OP_MercenaryDataUpdate)
|
||||
E(OP_MercenaryDataResponse)
|
||||
E(OP_GuildMemberUpdate)
|
||||
E(OP_DzLeaderStatus)
|
||||
E(OP_DzMemberList)
|
||||
E(OP_ExpansionInfo)
|
||||
E(OP_GMLastName)
|
||||
E(OP_BeginCast)
|
||||
E(OP_GMTrainSkillConfirm)
|
||||
E(OP_GroundSpawn)
|
||||
E(OP_GroupCancelInvite)
|
||||
E(OP_GroupFollow)
|
||||
E(OP_GroupFollow2)
|
||||
E(OP_GroupInvite)
|
||||
E(OP_GroupUpdate)
|
||||
E(OP_GuildMemberList)
|
||||
E(OP_GuildMemberUpdate)
|
||||
E(OP_GuildsList)
|
||||
E(OP_HPUpdate)
|
||||
E(OP_Illusion)
|
||||
E(OP_InspectBuffs)
|
||||
E(OP_InspectRequest)
|
||||
E(OP_InterruptCast)
|
||||
E(OP_ItemLinkResponse)
|
||||
E(OP_ItemPacket)
|
||||
E(OP_ItemVerifyReply)
|
||||
E(OP_LeadershipExpUpdate)
|
||||
E(OP_LogServer)
|
||||
E(OP_LootItem)
|
||||
E(OP_ManaChange)
|
||||
E(OP_MercenaryDataResponse)
|
||||
E(OP_MercenaryDataUpdate)
|
||||
E(OP_MoveItem)
|
||||
E(OP_NewSpawn)
|
||||
E(OP_NewZone)
|
||||
E(OP_OnLevelMessage)
|
||||
//E(OP_OpenNewTasksWindow)
|
||||
E(OP_PetBuffWindow)
|
||||
E(OP_PlayerProfile)
|
||||
E(OP_RaidJoin)
|
||||
E(OP_RaidUpdate)
|
||||
E(OP_ReadBook)
|
||||
E(OP_RecipeAutoCombine)
|
||||
E(OP_RemoveBlockedBuffs)
|
||||
E(OP_RequestClientZoneChange)
|
||||
E(OP_RespondAA)
|
||||
E(OP_RezzRequest)
|
||||
//list of packets we need to decode on the way in:
|
||||
D(OP_SetServerFilter)
|
||||
D(OP_CharacterCreate)
|
||||
D(OP_ItemLinkClick)
|
||||
D(OP_ConsiderCorpse)
|
||||
D(OP_Consider)
|
||||
D(OP_ClientUpdate)
|
||||
D(OP_MoveItem)
|
||||
D(OP_WhoAllRequest)
|
||||
E(OP_SendAATable)
|
||||
E(OP_SendCharInfo)
|
||||
E(OP_SendMembership)
|
||||
E(OP_SendZonepoints)
|
||||
E(OP_SetGuildRank)
|
||||
E(OP_ShopPlayerBuy)
|
||||
E(OP_ShopPlayerSell)
|
||||
E(OP_ShopRequest)
|
||||
E(OP_SkillUpdate)
|
||||
E(OP_SomeItemPacketMaybe)
|
||||
E(OP_SpawnAppearance)
|
||||
E(OP_SpawnDoor)
|
||||
E(OP_Stun)
|
||||
E(OP_TargetBuffs)
|
||||
E(OP_TaskDescription)
|
||||
E(OP_TaskHistoryReply)
|
||||
E(OP_Track)
|
||||
E(OP_Trader)
|
||||
E(OP_TraderBuy)
|
||||
E(OP_TributeInfo)
|
||||
E(OP_TributeItem)
|
||||
E(OP_VetRewardsAvaliable)
|
||||
E(OP_WearChange)
|
||||
E(OP_WhoAllResponse)
|
||||
E(OP_ZoneChange)
|
||||
E(OP_ZoneEntry)
|
||||
E(OP_ZonePlayerToBind)
|
||||
E(OP_ZoneServerInfo)
|
||||
E(OP_ZoneSpawns)
|
||||
// incoming packets that require a DECODE translation:
|
||||
D(OP_AdventureMerchantSell)
|
||||
D(OP_AltCurrencySell)
|
||||
D(OP_AltCurrencySellSelection)
|
||||
D(OP_ApplyPoison)
|
||||
D(OP_AugmentInfo)
|
||||
D(OP_AugmentItem)
|
||||
D(OP_BazaarSearch)
|
||||
D(OP_BlockedBuffs)
|
||||
D(OP_Buff)
|
||||
D(OP_ShopPlayerSell)
|
||||
D(OP_Consume)
|
||||
D(OP_BuffRemoveRequest)
|
||||
D(OP_CastSpell)
|
||||
D(OP_Save)
|
||||
D(OP_ItemVerifyRequest)
|
||||
D(OP_GroupInvite)
|
||||
D(OP_GroupInvite2)
|
||||
D(OP_ChannelMessage)
|
||||
D(OP_CharacterCreate)
|
||||
D(OP_ClientUpdate)
|
||||
D(OP_Consider)
|
||||
D(OP_ConsiderCorpse)
|
||||
D(OP_Consume)
|
||||
D(OP_Damage)
|
||||
D(OP_DeleteItem)
|
||||
D(OP_EnvDamage)
|
||||
D(OP_FaceChange)
|
||||
D(OP_FindPersonRequest)
|
||||
D(OP_GMLastName)
|
||||
D(OP_GroupCancelInvite)
|
||||
D(OP_GroupDisband)
|
||||
D(OP_GroupFollow)
|
||||
D(OP_GroupFollow2)
|
||||
D(OP_GroupDisband)
|
||||
D(OP_GroupCancelInvite)
|
||||
D(OP_FindPersonRequest)
|
||||
D(OP_TraderBuy)
|
||||
D(OP_LootItem)
|
||||
D(OP_TributeItem)
|
||||
D(OP_ReadBook)
|
||||
D(OP_AugmentInfo)
|
||||
D(OP_FaceChange)
|
||||
D(OP_AdventureMerchantSell)
|
||||
D(OP_TradeSkillCombine)
|
||||
D(OP_RaidInvite)
|
||||
D(OP_InspectRequest)
|
||||
D(OP_ShopPlayerBuy)
|
||||
D(OP_BazaarSearch)
|
||||
D(OP_LoadSpellSet)
|
||||
D(OP_ApplyPoison)
|
||||
D(OP_Damage)
|
||||
D(OP_EnvDamage)
|
||||
D(OP_ChannelMessage)
|
||||
D(OP_DeleteItem)
|
||||
D(OP_AugmentItem)
|
||||
D(OP_PetCommands)
|
||||
D(OP_BuffRemoveRequest)
|
||||
D(OP_AltCurrencySellSelection)
|
||||
D(OP_AltCurrencySell)
|
||||
D(OP_ZoneChange)
|
||||
D(OP_ZoneEntry)
|
||||
D(OP_ShopRequest)
|
||||
D(OP_BlockedBuffs)
|
||||
D(OP_RemoveBlockedBuffs)
|
||||
D(OP_RecipeAutoCombine)
|
||||
D(OP_GroupInvite)
|
||||
D(OP_GroupInvite2)
|
||||
D(OP_GuildDemote)
|
||||
D(OP_GuildRemove)
|
||||
D(OP_GuildStatus)
|
||||
D(OP_Trader)
|
||||
D(OP_GMLastName)
|
||||
D(OP_InspectRequest)
|
||||
D(OP_ItemLinkClick)
|
||||
D(OP_ItemVerifyRequest)
|
||||
D(OP_LoadSpellSet)
|
||||
D(OP_LootItem)
|
||||
D(OP_MoveItem)
|
||||
D(OP_PetCommands)
|
||||
D(OP_RaidInvite)
|
||||
D(OP_ReadBook)
|
||||
D(OP_RecipeAutoCombine)
|
||||
D(OP_RemoveBlockedBuffs)
|
||||
D(OP_RezzAnswer)
|
||||
D(OP_Save)
|
||||
D(OP_SetServerFilter)
|
||||
D(OP_ShopPlayerBuy)
|
||||
D(OP_ShopPlayerSell)
|
||||
D(OP_ShopRequest)
|
||||
D(OP_Trader)
|
||||
D(OP_TraderBuy)
|
||||
D(OP_TradeSkillCombine)
|
||||
D(OP_TributeItem)
|
||||
D(OP_WhoAllRequest)
|
||||
D(OP_ZoneChange)
|
||||
D(OP_ZoneEntry)
|
||||
#undef E
|
||||
#undef D
|
||||
|
||||
+141
-34
@@ -112,7 +112,7 @@ static const uint32 MAX_NUMBER_GUILDS = 1500;
|
||||
static const uint32 MAX_PP_LANGUAGE = 32; // was 25
|
||||
static const uint32 MAX_PP_SPELLBOOK = 720; // was 480
|
||||
static const uint32 MAX_PP_MEMSPELL = 16; // was 12
|
||||
static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_AA_ARRAY = 300;
|
||||
static const uint32 MAX_PP_DISCIPLINES = 200; // was 100
|
||||
static const uint32 MAX_GROUP_MEMBERS = 6;
|
||||
@@ -712,7 +712,8 @@ struct SpellBuffFade_Struct_Live {
|
||||
/*012*/ uint32 spellid;
|
||||
/*016*/ uint32 duration;
|
||||
/*020*/ uint32 playerId; // Global player ID?
|
||||
/*024*/ uint8 unknown0028[68];
|
||||
/*024*/ uint32 num_hits;
|
||||
/*028*/ uint8 unknown0028[64];
|
||||
/*092*/ uint32 slotid;
|
||||
/*096*/ uint32 bufffade;
|
||||
/*100*/
|
||||
@@ -726,7 +727,7 @@ struct SpellBuffFade_Struct {
|
||||
/*007*/ uint8 unknown7;
|
||||
/*008*/ uint32 spellid;
|
||||
/*012*/ uint32 duration;
|
||||
/*016*/ uint32 unknown016;
|
||||
/*016*/ uint32 num_hits;
|
||||
/*020*/ uint32 unknown020; // Global player ID?
|
||||
/*024*/ uint32 playerId; // Player id who cast the buff
|
||||
/*028*/ uint32 slotid;
|
||||
@@ -741,12 +742,33 @@ struct BuffRemoveRequest_Struct
|
||||
/*08*/
|
||||
};
|
||||
|
||||
#if 0
|
||||
// not in use
|
||||
struct BuffIconEntry_Struct {
|
||||
/*000*/ uint32 buff_slot;
|
||||
/*004*/ uint32 spell_id;
|
||||
/*008*/ uint32 tics_remaining;
|
||||
/*012*/ uint32 num_hits;
|
||||
// char name[0]; caster name is also here sometimes
|
||||
// uint8 unknownend; 1 when single, 0 when all opposite of all_buffs?
|
||||
};
|
||||
|
||||
// not in use
|
||||
struct BuffIcon_Struct {
|
||||
/*000*/ uint32 entity_id;
|
||||
/*004*/ uint32 unknown004;
|
||||
/*008*/ uint8 all_buffs; // 1 when updating all buffs, 0 when doing one
|
||||
/*009*/ uint16 count;
|
||||
/*011*/ BuffIconEntry_Struct entires[0];
|
||||
};
|
||||
#endif
|
||||
|
||||
struct GMTrainee_Struct
|
||||
{
|
||||
/*000*/ uint32 npcid;
|
||||
/*004*/ uint32 playerid;
|
||||
/*008*/ uint32 skills[73];
|
||||
/*300*/ uint8 unknown300[148];
|
||||
/*008*/ uint32 skills[PACKET_SKILL_ARRAY_SIZE];
|
||||
/*408*/ uint8 unknown408[40];
|
||||
/*448*/
|
||||
};
|
||||
|
||||
@@ -893,14 +915,62 @@ struct PotionBelt_Struct {
|
||||
BandolierItem_Struct items[MAX_POTIONS_IN_BELT];
|
||||
};
|
||||
|
||||
struct LeadershipAA_Struct {
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
struct GroupLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 groupAAMarkNPC;
|
||||
uint32 groupAANPCHealth;
|
||||
uint32 groupAADelegateMainAssist;
|
||||
uint32 groupAADelegateMarkNPC;
|
||||
uint32 groupAA4;
|
||||
uint32 groupAA5;
|
||||
uint32 groupAAInspectBuffs;
|
||||
uint32 groupAA7;
|
||||
uint32 groupAASpellAwareness;
|
||||
uint32 groupAAOffenseEnhancement;
|
||||
uint32 groupAAManaEnhancement;
|
||||
uint32 groupAAHealthEnhancement;
|
||||
uint32 groupAAHealthRegeneration;
|
||||
uint32 groupAAFindPathToPC;
|
||||
uint32 groupAAHealthOfTargetsTarget;
|
||||
uint32 groupAA15;
|
||||
};
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct RaidLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 raidAAMarkNPC;
|
||||
uint32 raidAANPCHealth;
|
||||
uint32 raidAADelegateMainAssist;
|
||||
uint32 raidAADelegateMarkNPC;
|
||||
uint32 raidAA4;
|
||||
uint32 raidAA5;
|
||||
uint32 raidAA6;
|
||||
uint32 raidAASpellAwareness;
|
||||
uint32 raidAAOffenseEnhancement;
|
||||
uint32 raidAAManaEnhancement;
|
||||
uint32 raidAAHealthEnhancement;
|
||||
uint32 raidAAHealthRegeneration;
|
||||
uint32 raidAAFindPathToPC;
|
||||
uint32 raidAAHealthOfTargetsTarget;
|
||||
uint32 raidAA14;
|
||||
uint32 raidAA15;
|
||||
};
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct LeadershipAA_Struct {
|
||||
union {
|
||||
struct {
|
||||
GroupLeadershipAA_Struct group;
|
||||
RaidLeadershipAA_Struct raid;
|
||||
};
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1678,7 +1748,7 @@ struct BulkItemPacket_Struct
|
||||
|
||||
struct Consume_Struct
|
||||
{
|
||||
/*000*/ ItemSlotStruct slot;
|
||||
/*000*/ ItemSlotStruct slot;
|
||||
/*012*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click
|
||||
/*016*/ uint32 type; // 0x01=Food 0x02=Water
|
||||
/*020*/ uint32 c_unknown1; // Seen 2
|
||||
@@ -1711,17 +1781,17 @@ struct ItemProperties_Struct {
|
||||
};
|
||||
|
||||
struct DeleteItem_Struct {
|
||||
/*0000*/ ItemSlotStruct from_slot;
|
||||
/*0004*/ ItemSlotStruct to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0012*/
|
||||
/*0000*/ ItemSlotStruct from_slot;
|
||||
/*0012*/ ItemSlotStruct to_slot;
|
||||
/*0024*/ uint32 number_in_stack;
|
||||
/*0028*/
|
||||
};
|
||||
|
||||
struct MoveItem_Struct {
|
||||
/*0000*/ ItemSlotStruct from_slot;
|
||||
/*0004*/ ItemSlotStruct to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0012*/
|
||||
/*0000*/ ItemSlotStruct from_slot;
|
||||
/*0012*/ ItemSlotStruct to_slot;
|
||||
/*0024*/ uint32 number_in_stack;
|
||||
/*0028*/
|
||||
};
|
||||
|
||||
//
|
||||
@@ -2045,7 +2115,7 @@ struct Merchant_Sell_Struct {
|
||||
|
||||
struct Merchant_Purchase_Struct {
|
||||
/*000*/ uint32 npcid; // Merchant NPC's entity id
|
||||
/*004*/ MainInvItemSlotStruct itemslot;
|
||||
/*004*/ MainInvItemSlotStruct itemslot;
|
||||
/*012*/ uint32 quantity;
|
||||
/*016*/ uint32 price;
|
||||
/*020*/
|
||||
@@ -2403,6 +2473,11 @@ struct GroupFollow_Struct { // Live Follow Struct
|
||||
/*0152*/
|
||||
};
|
||||
|
||||
struct InspectBuffs_Struct {
|
||||
/*000*/ uint32 spell_id[BUFF_COUNT];
|
||||
/*168*/ uint32 tics_remaining[BUFF_COUNT];
|
||||
};
|
||||
|
||||
struct LFG_Struct {
|
||||
/*000*/ uint32 unknown000;
|
||||
/*004*/ uint32 value; // 0x00 = off 0x01 = on
|
||||
@@ -3488,10 +3563,10 @@ struct TributeInfo_Struct {
|
||||
|
||||
struct TributeItem_Struct
|
||||
{
|
||||
/*00*/ ItemSlotStruct slot;
|
||||
/*12*/ uint32 quantity;
|
||||
/*16*/ uint32 tribute_master_id;
|
||||
/*20*/ int32 tribute_points;
|
||||
/*00*/ ItemSlotStruct slot;
|
||||
/*12*/ uint32 quantity;
|
||||
/*16*/ uint32 tribute_master_id;
|
||||
/*20*/ int32 tribute_points;
|
||||
/*24*/
|
||||
};
|
||||
|
||||
@@ -3527,7 +3602,7 @@ struct Split_Struct
|
||||
*/
|
||||
struct NewCombine_Struct {
|
||||
/*00*/ ItemSlotStruct container_slot;
|
||||
/*12*/ ItemSlotStruct unknown_slot; // Slot type is 8?
|
||||
/*12*/ ItemSlotStruct guildtribute_slot; // Slot type is 8? (MapGuildTribute = 8 -U)
|
||||
/*24*/
|
||||
};
|
||||
|
||||
@@ -3972,6 +4047,21 @@ struct RaidAddMember_Struct {
|
||||
/*139*/ uint8 flags[5]; //no idea if these are needed...
|
||||
};
|
||||
|
||||
struct RaidMOTD_Struct {
|
||||
/*000*/ RaidGeneral_Struct general; // leader_name and action only used
|
||||
/*140*/ char motd[0]; // max size 1024, but reply is variable
|
||||
};
|
||||
|
||||
struct RaidLeadershipUpdate_Struct {
|
||||
/*000*/ uint32 action;
|
||||
/*004*/ char player_name[64];
|
||||
/*068*/ uint32 Unknown068;
|
||||
/*072*/ char leader_name[64];
|
||||
/*136*/ GroupLeadershipAA_Struct group; //unneeded
|
||||
/*200*/ RaidLeadershipAA_Struct raid;
|
||||
/*264*/ char Unknown264[128];
|
||||
};
|
||||
|
||||
struct RaidAdd_Struct {
|
||||
/*000*/ uint32 action; //=0
|
||||
/*004*/ char player_name[64]; //should both be the player's name
|
||||
@@ -4079,7 +4169,8 @@ struct Arrow_Struct {
|
||||
/*070*/ uint8 unknown070;
|
||||
/*071*/ uint8 item_type;
|
||||
/*072*/ uint8 skill;
|
||||
/*073*/ char model_name[43];
|
||||
/*073*/ uint8 unknown073[16];
|
||||
/*089*/ char model_name[27];
|
||||
/*116*/
|
||||
};
|
||||
|
||||
@@ -4106,7 +4197,7 @@ struct GMToggle_Struct {
|
||||
uint32 toggle;
|
||||
};
|
||||
|
||||
struct BuffFadeMsg_Struct {
|
||||
struct ColoredText_Struct {
|
||||
uint32 color;
|
||||
char msg[1]; //was 1
|
||||
/*0???*/ uint8 paddingXXX[3]; // always 0's
|
||||
@@ -4306,7 +4397,7 @@ struct ItemSerializationHeader
|
||||
/*030*/ uint16 unknown013; // 0xffff
|
||||
/*032*/ uint32 price;
|
||||
/*036*/ uint32 merchant_slot; //1 if not a merchant item
|
||||
/*040*/ uint32 unknown020; //0
|
||||
/*040*/ uint32 scaled_value; //0
|
||||
/*044*/ uint32 instance_id; //unique instance id if not merchant item, else is merchant slot
|
||||
/*048*/ uint32 unknown028; //0
|
||||
/*052*/ uint32 last_cast_time; // Unix Time from PP of last cast for this recast type if recast delay > 0
|
||||
@@ -4315,8 +4406,24 @@ struct ItemSerializationHeader
|
||||
/*064*/ uint32 unknown044; // 0
|
||||
/*068*/ uint32 unknown048; // 0
|
||||
/*072*/ uint32 unknown052; // 0
|
||||
/*076*/ uint32 unknown056; // 0
|
||||
/*080*/ uint8 unknown060; // 0
|
||||
uint8 isEvolving;
|
||||
};
|
||||
|
||||
struct EvolvingItem {
|
||||
uint8 unknown001;
|
||||
uint8 unknown002;
|
||||
uint8 unknown003;
|
||||
uint8 unknown004;
|
||||
int32 evoLevel;
|
||||
double progress;
|
||||
uint8 Activated;
|
||||
int32 evomaxlevel;
|
||||
uint8 unknown005[4];
|
||||
};
|
||||
|
||||
struct ItemSerializationHeaderFinish
|
||||
{
|
||||
uint16 ornamentIcon;
|
||||
/*081*/ uint8 unknown061; // 0 - Add Evolving Item struct if this isn't set to 0?
|
||||
/*082*/ uint8 unknown062; // 0
|
||||
/*083*/ uint32 unknowna1; // 0xffffffff
|
||||
@@ -4585,10 +4692,10 @@ struct ItemQuaternaryBodyStruct
|
||||
|
||||
struct AugmentInfo_Struct
|
||||
{
|
||||
/*000*/ uint32 itemid; // id of the solvent needed
|
||||
/*004*/ uint8 window; // window to display the information in
|
||||
/*005*/ uint8 unknown005[71]; // total packet length 76, all the rest were always 00
|
||||
/*076*/
|
||||
/*000*/ uint32 itemid; // id of the solvent needed
|
||||
/*004*/ uint32 window; // window to display the information in
|
||||
/*008*/ char augment_info[64]; // total packet length 76, all the rest were always 00
|
||||
/*072*/ uint32 unknown072;
|
||||
};
|
||||
|
||||
struct VeteranRewardItem
|
||||
|
||||
+3284
-3159
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#ifndef SoD_CONSTANTS_H_
|
||||
#define SoD_CONSTANTS_H_
|
||||
|
||||
#include "../common/types.h"
|
||||
#include "../types.h"
|
||||
|
||||
namespace SoD {
|
||||
namespace maps {
|
||||
@@ -181,6 +181,7 @@ namespace SoD {
|
||||
|
||||
namespace limits {
|
||||
static const bool ALLOWS_EMPTY_BAG_IN_BAG = false;
|
||||
static const bool ALLOWS_CLICK_CAST_FROM_BAG = false;
|
||||
static const bool COIN_HAS_WEIGHT = false;
|
||||
}
|
||||
|
||||
|
||||
+99
-100
@@ -1,117 +1,116 @@
|
||||
|
||||
//list of packets we need to encode on the way out:
|
||||
|
||||
E(OP_SendCharInfo)
|
||||
E(OP_ZoneServerInfo)
|
||||
E(OP_SendAATable)
|
||||
E(OP_PlayerProfile)
|
||||
E(OP_ZoneEntry)
|
||||
E(OP_CharInventory)
|
||||
E(OP_NewZone)
|
||||
E(OP_SpawnDoor)
|
||||
E(OP_GroundSpawn)
|
||||
E(OP_SendZonepoints)
|
||||
E(OP_NewSpawn)
|
||||
E(OP_ZoneSpawns)
|
||||
E(OP_ItemLinkResponse)
|
||||
E(OP_ItemPacket)
|
||||
E(OP_GuildMemberList)
|
||||
E(OP_Illusion)
|
||||
E(OP_ManaChange)
|
||||
E(OP_ClientUpdate)
|
||||
E(OP_LeadershipExpUpdate)
|
||||
E(OP_ExpansionInfo)
|
||||
E(OP_LogServer)
|
||||
E(OP_Damage)
|
||||
E(OP_Buff)
|
||||
// out-going packets that require an ENCODE translation:
|
||||
E(OP_Action)
|
||||
E(OP_Consider)
|
||||
E(OP_CancelTrade)
|
||||
E(OP_ShopPlayerSell)
|
||||
E(OP_DeleteItem)
|
||||
E(OP_ItemVerifyReply)
|
||||
E(OP_DeleteCharge)
|
||||
E(OP_MoveItem)
|
||||
E(OP_OpenNewTasksWindow)
|
||||
E(OP_BazaarSearch)
|
||||
E(OP_Trader)
|
||||
E(OP_TraderBuy)
|
||||
E(OP_LootItem)
|
||||
E(OP_TributeItem)
|
||||
E(OP_SomeItemPacketMaybe)
|
||||
E(OP_ReadBook)
|
||||
E(OP_Stun)
|
||||
E(OP_ZonePlayerToBind)
|
||||
E(OP_AdventureMerchantSell)
|
||||
E(OP_RaidUpdate)
|
||||
E(OP_RaidJoin)
|
||||
E(OP_VetRewardsAvaliable)
|
||||
E(OP_InspectRequest)
|
||||
E(OP_GroupInvite)
|
||||
E(OP_GroupFollow)
|
||||
E(OP_GroupFollow2)
|
||||
E(OP_GroupUpdate)
|
||||
E(OP_GroupCancelInvite)
|
||||
E(OP_WhoAllResponse)
|
||||
E(OP_Track)
|
||||
E(OP_ShopPlayerBuy)
|
||||
E(OP_PetBuffWindow)
|
||||
E(OP_OnLevelMessage)
|
||||
E(OP_Barter)
|
||||
E(OP_AltCurrencySell)
|
||||
E(OP_ApplyPoison)
|
||||
E(OP_AugmentInfo)
|
||||
E(OP_Barter)
|
||||
E(OP_BazaarSearch)
|
||||
E(OP_Buff)
|
||||
E(OP_CancelTrade)
|
||||
E(OP_CharInventory)
|
||||
E(OP_ClientUpdate)
|
||||
E(OP_Consider)
|
||||
E(OP_Damage)
|
||||
E(OP_DeleteCharge)
|
||||
E(OP_DeleteItem)
|
||||
E(OP_DzCompass)
|
||||
E(OP_DzExpeditionEndsWarning)
|
||||
E(OP_DzExpeditionInfo)
|
||||
E(OP_DzCompass)
|
||||
E(OP_DzMemberList)
|
||||
E(OP_DzExpeditionList)
|
||||
E(OP_DzLeaderStatus)
|
||||
E(OP_DzJoinExpeditionConfirm)
|
||||
E(OP_TargetBuffs)
|
||||
E(OP_AltCurrencySell)
|
||||
E(OP_WearChange)
|
||||
E(OP_DzLeaderStatus)
|
||||
E(OP_DzMemberList)
|
||||
E(OP_ExpansionInfo)
|
||||
E(OP_GroundSpawn)
|
||||
E(OP_GroupCancelInvite)
|
||||
E(OP_GroupFollow)
|
||||
E(OP_GroupFollow2)
|
||||
E(OP_GroupInvite)
|
||||
E(OP_GroupUpdate)
|
||||
E(OP_GuildMemberList)
|
||||
E(OP_Illusion)
|
||||
E(OP_InspectRequest)
|
||||
E(OP_ItemLinkResponse)
|
||||
E(OP_ItemPacket)
|
||||
E(OP_ItemVerifyReply)
|
||||
E(OP_LeadershipExpUpdate)
|
||||
E(OP_LogServer)
|
||||
E(OP_LootItem)
|
||||
E(OP_ManaChange)
|
||||
E(OP_MercenaryDataResponse)
|
||||
E(OP_MercenaryDataUpdate)
|
||||
//list of packets we need to decode on the way in:
|
||||
D(OP_SetServerFilter)
|
||||
D(OP_CharacterCreate)
|
||||
D(OP_ItemLinkClick)
|
||||
D(OP_ConsiderCorpse)
|
||||
D(OP_Consider)
|
||||
D(OP_ClientUpdate)
|
||||
D(OP_MoveItem)
|
||||
D(OP_WhoAllRequest)
|
||||
E(OP_MoveItem)
|
||||
E(OP_NewSpawn)
|
||||
E(OP_NewZone)
|
||||
E(OP_OnLevelMessage)
|
||||
E(OP_OpenNewTasksWindow)
|
||||
E(OP_PetBuffWindow)
|
||||
E(OP_PlayerProfile)
|
||||
E(OP_RaidJoin)
|
||||
E(OP_RaidUpdate)
|
||||
E(OP_ReadBook)
|
||||
E(OP_SendAATable)
|
||||
E(OP_SendCharInfo)
|
||||
E(OP_SendZonepoints)
|
||||
E(OP_ShopPlayerBuy)
|
||||
E(OP_ShopPlayerSell)
|
||||
E(OP_SomeItemPacketMaybe)
|
||||
E(OP_SpawnDoor)
|
||||
E(OP_Stun)
|
||||
E(OP_TargetBuffs)
|
||||
E(OP_Track)
|
||||
E(OP_Trader)
|
||||
E(OP_TraderBuy)
|
||||
E(OP_TributeItem)
|
||||
E(OP_VetRewardsAvaliable)
|
||||
E(OP_WearChange)
|
||||
E(OP_WhoAllResponse)
|
||||
E(OP_ZoneEntry)
|
||||
E(OP_ZonePlayerToBind)
|
||||
E(OP_ZoneServerInfo)
|
||||
E(OP_ZoneSpawns)
|
||||
// incoming packets that require a DECODE translation:
|
||||
D(OP_AdventureMerchantSell)
|
||||
D(OP_AltCurrencySell)
|
||||
D(OP_AltCurrencySellSelection)
|
||||
D(OP_ApplyPoison)
|
||||
D(OP_AugmentInfo)
|
||||
D(OP_AugmentItem)
|
||||
D(OP_BazaarSearch)
|
||||
D(OP_Buff)
|
||||
D(OP_ShopPlayerSell)
|
||||
D(OP_Consume)
|
||||
D(OP_Bug)
|
||||
D(OP_CastSpell)
|
||||
D(OP_Save)
|
||||
D(OP_ItemVerifyRequest)
|
||||
D(OP_GroupInvite)
|
||||
D(OP_GroupInvite2)
|
||||
D(OP_CharacterCreate)
|
||||
D(OP_ClientUpdate)
|
||||
D(OP_Consider)
|
||||
D(OP_ConsiderCorpse)
|
||||
D(OP_Consume)
|
||||
D(OP_DeleteItem)
|
||||
D(OP_FaceChange)
|
||||
D(OP_FindPersonRequest)
|
||||
D(OP_GroupCancelInvite)
|
||||
D(OP_GroupDisband)
|
||||
D(OP_GroupFollow)
|
||||
D(OP_GroupFollow2)
|
||||
D(OP_GroupDisband)
|
||||
D(OP_GroupCancelInvite)
|
||||
D(OP_FindPersonRequest)
|
||||
D(OP_TraderBuy)
|
||||
D(OP_LootItem)
|
||||
D(OP_TributeItem)
|
||||
D(OP_ReadBook)
|
||||
D(OP_AugmentInfo)
|
||||
D(OP_FaceChange)
|
||||
D(OP_AdventureMerchantSell)
|
||||
D(OP_TradeSkillCombine)
|
||||
D(OP_RaidInvite)
|
||||
D(OP_GroupInvite)
|
||||
D(OP_GroupInvite2)
|
||||
D(OP_InspectRequest)
|
||||
D(OP_WearChange)
|
||||
D(OP_ShopPlayerBuy)
|
||||
D(OP_BazaarSearch)
|
||||
D(OP_ItemLinkClick)
|
||||
D(OP_ItemVerifyRequest)
|
||||
D(OP_LoadSpellSet)
|
||||
D(OP_ApplyPoison)
|
||||
D(OP_DeleteItem)
|
||||
D(OP_AugmentItem)
|
||||
D(OP_Bug)
|
||||
D(OP_AltCurrencySellSelection)
|
||||
D(OP_AltCurrencySell)
|
||||
D(OP_LootItem)
|
||||
D(OP_MoveItem)
|
||||
D(OP_RaidInvite)
|
||||
D(OP_ReadBook)
|
||||
D(OP_Save)
|
||||
D(OP_SetServerFilter)
|
||||
D(OP_ShopPlayerBuy)
|
||||
D(OP_ShopPlayerSell)
|
||||
D(OP_TraderBuy)
|
||||
D(OP_TradeSkillCombine)
|
||||
D(OP_TributeItem)
|
||||
D(OP_WearChange)
|
||||
D(OP_WhoAllRequest)
|
||||
#undef E
|
||||
#undef D
|
||||
|
||||
@@ -519,7 +519,7 @@ struct CastSpell_Struct
|
||||
uint32 spell_id;
|
||||
uint32 inventoryslot; // slot for clicky item, 0xFFFF = normal cast
|
||||
uint32 target_id;
|
||||
uint8 cs_unknown[4];
|
||||
uint8 cs_unknown[4];
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -576,8 +576,8 @@ struct GMTrainee_Struct
|
||||
{
|
||||
/*000*/ uint32 npcid;
|
||||
/*004*/ uint32 playerid;
|
||||
/*008*/ uint32 skills[73];
|
||||
/*300*/ uint8 unknown300[148];
|
||||
/*008*/ uint32 skills[PACKET_SKILL_ARRAY_SIZE];
|
||||
/*408*/ uint8 unknown408[40];
|
||||
/*448*/
|
||||
};
|
||||
|
||||
@@ -711,14 +711,62 @@ struct PotionBelt_Struct {
|
||||
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
||||
static const uint32 MAX_RAID_LEADERSHIP_AA_ARRAY = 16;
|
||||
static const uint32 MAX_LEADERSHIP_AA_ARRAY = (MAX_GROUP_LEADERSHIP_AA_ARRAY+MAX_RAID_LEADERSHIP_AA_ARRAY);
|
||||
struct LeadershipAA_Struct {
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
struct GroupLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 groupAAMarkNPC;
|
||||
uint32 groupAANPCHealth;
|
||||
uint32 groupAADelegateMainAssist;
|
||||
uint32 groupAADelegateMarkNPC;
|
||||
uint32 groupAA4;
|
||||
uint32 groupAA5;
|
||||
uint32 groupAAInspectBuffs;
|
||||
uint32 groupAA7;
|
||||
uint32 groupAASpellAwareness;
|
||||
uint32 groupAAOffenseEnhancement;
|
||||
uint32 groupAAManaEnhancement;
|
||||
uint32 groupAAHealthEnhancement;
|
||||
uint32 groupAAHealthRegeneration;
|
||||
uint32 groupAAFindPathToPC;
|
||||
uint32 groupAAHealthOfTargetsTarget;
|
||||
uint32 groupAA15;
|
||||
};
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct RaidLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 raidAAMarkNPC;
|
||||
uint32 raidAANPCHealth;
|
||||
uint32 raidAADelegateMainAssist;
|
||||
uint32 raidAADelegateMarkNPC;
|
||||
uint32 raidAA4;
|
||||
uint32 raidAA5;
|
||||
uint32 raidAA6;
|
||||
uint32 raidAASpellAwareness;
|
||||
uint32 raidAAOffenseEnhancement;
|
||||
uint32 raidAAManaEnhancement;
|
||||
uint32 raidAAHealthEnhancement;
|
||||
uint32 raidAAHealthRegeneration;
|
||||
uint32 raidAAFindPathToPC;
|
||||
uint32 raidAAHealthOfTargetsTarget;
|
||||
uint32 raidAA14;
|
||||
uint32 raidAA15;
|
||||
};
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct LeadershipAA_Struct {
|
||||
union {
|
||||
struct {
|
||||
GroupLeadershipAA_Struct group;
|
||||
RaidLeadershipAA_Struct raid;
|
||||
};
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -744,7 +792,7 @@ struct BindStruct {
|
||||
static const uint32 MAX_PP_LANGUAGE = 25; //
|
||||
static const uint32 MAX_PP_SPELLBOOK = 480; // Confirmed 60 pages on Live now
|
||||
static const uint32 MAX_PP_MEMSPELL = 10; //was 9 now 10 on Live
|
||||
static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_AA_ARRAY = 300; //was 299
|
||||
static const uint32 MAX_GROUP_MEMBERS = 6;
|
||||
static const uint32 MAX_RECAST_TYPES = 20;
|
||||
@@ -1469,11 +1517,11 @@ struct BulkItemPacket_Struct
|
||||
|
||||
struct Consume_Struct
|
||||
{
|
||||
/*0000*/ uint32 slot;
|
||||
/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click
|
||||
/*0008*/ uint8 c_unknown1[4];
|
||||
/*0012*/ uint8 type; // 0x01=Food 0x02=Water
|
||||
/*0013*/ uint8 unknown13[3];
|
||||
/*0000*/ uint32 slot;
|
||||
/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click
|
||||
/*0008*/ uint8 c_unknown1[4];
|
||||
/*0012*/ uint8 type; // 0x01=Food 0x02=Water
|
||||
/*0013*/ uint8 unknown13[3];
|
||||
/*0016*/
|
||||
};
|
||||
|
||||
@@ -1503,17 +1551,17 @@ struct ItemProperties_Struct {
|
||||
};
|
||||
|
||||
struct DeleteItem_Struct {
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0012*/
|
||||
};
|
||||
|
||||
struct MoveItem_Struct
|
||||
{
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0012*/
|
||||
};
|
||||
|
||||
@@ -3090,10 +3138,10 @@ struct TributeInfo_Struct {
|
||||
};
|
||||
|
||||
struct TributeItem_Struct {
|
||||
uint32 slot;
|
||||
uint32 quantity;
|
||||
uint32 tribute_master_id;
|
||||
int32 tribute_points;
|
||||
uint32 slot;
|
||||
uint32 quantity;
|
||||
uint32 tribute_master_id;
|
||||
int32 tribute_points;
|
||||
};
|
||||
|
||||
struct TributePoint_Struct {
|
||||
@@ -3129,7 +3177,7 @@ struct Split_Struct
|
||||
*/
|
||||
struct NewCombine_Struct {
|
||||
/*00*/ int16 container_slot;
|
||||
/*02*/ char unknown02[2];
|
||||
/*02*/ int16 guildtribute_slot;
|
||||
/*04*/
|
||||
};
|
||||
|
||||
@@ -3562,6 +3610,21 @@ struct RaidAddMember_Struct {
|
||||
/*139*/ uint8 flags[5]; //no idea if these are needed...
|
||||
};
|
||||
|
||||
struct RaidMOTD_Struct {
|
||||
/*000*/ RaidGeneral_Struct general; // leader_name and action only used
|
||||
/*140*/ char motd[0]; // max size 1024, but reply is variable
|
||||
};
|
||||
|
||||
struct RaidLeadershipUpdate_Struct {
|
||||
/*000*/ uint32 action;
|
||||
/*004*/ char player_name[64];
|
||||
/*068*/ uint32 Unknown068;
|
||||
/*072*/ char leader_name[64];
|
||||
/*136*/ GroupLeadershipAA_Struct group; //unneeded
|
||||
/*200*/ RaidLeadershipAA_Struct raid;
|
||||
/*264*/ char Unknown264[128];
|
||||
};
|
||||
|
||||
struct RaidAdd_Struct {
|
||||
/*000*/ uint32 action; //=0
|
||||
/*004*/ char player_name[64]; //should both be the player's name
|
||||
@@ -3693,7 +3756,7 @@ struct GMToggle_Struct {
|
||||
uint32 toggle;
|
||||
};
|
||||
|
||||
struct BuffFadeMsg_Struct {
|
||||
struct ColoredText_Struct {
|
||||
uint32 color;
|
||||
char msg[1]; //was 1
|
||||
/*0???*/ uint8 paddingXXX[3]; // always 0's
|
||||
@@ -3868,7 +3931,7 @@ struct ItemSerializationHeader
|
||||
/*008*/ uint32 slot;
|
||||
/*012*/ uint32 price;
|
||||
/*016*/ uint32 merchant_slot; //1 if not a merchant item
|
||||
/*020*/ uint32 unknown020; //0
|
||||
/*020*/ uint32 scaled_value; //0
|
||||
/*024*/ uint32 instance_id; //unique instance id if not merchant item, else is merchant slot
|
||||
/*028*/ uint32 unknown028; //0
|
||||
/*032*/ uint32 last_cast_time; // Unix Time from PP of last cast for this recast type if recast delay > 0
|
||||
@@ -4109,10 +4172,10 @@ struct ItemQuaternaryBodyStruct
|
||||
|
||||
struct AugmentInfo_Struct
|
||||
{
|
||||
/*000*/ uint32 itemid; // id of the solvent needed
|
||||
/*004*/ uint8 window; // window to display the information in
|
||||
/*005*/ uint8 unknown005[71]; // total packet length 76, all the rest were always 00
|
||||
/*076*/
|
||||
/*000*/ uint32 itemid; // id of the solvent needed
|
||||
/*004*/ uint32 window; // window to display the information in
|
||||
/*008*/ char augment_info[64]; // total packet length 76, all the rest were always 00
|
||||
/*072*/ uint32 unknown072;
|
||||
};
|
||||
|
||||
struct VeteranRewardItem
|
||||
|
||||
+2894
-2752
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#ifndef SoF_CONSTANTS_H_
|
||||
#define SoF_CONSTANTS_H_
|
||||
|
||||
#include "../common/types.h"
|
||||
#include "../types.h"
|
||||
|
||||
namespace SoF {
|
||||
namespace maps {
|
||||
@@ -181,6 +181,7 @@ namespace SoF {
|
||||
|
||||
namespace limits {
|
||||
static const bool ALLOWS_EMPTY_BAG_IN_BAG = false;
|
||||
static const bool ALLOWS_CLICK_CAST_FROM_BAG = false;
|
||||
static const bool COIN_HAS_WEIGHT = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
0x1ee9,
|
||||
0x7f5d, OP_CastSpell
|
||||
0x0659, OP_ManaChange
|
||||
0x3bc7, OP_BuffFadeMsg
|
||||
0x3bc7, OP_ColoredText
|
||||
0x3209,
|
||||
0x6a93, OP_MemorizeSpell
|
||||
0x1237,
|
||||
|
||||
+82
-83
@@ -1,100 +1,99 @@
|
||||
|
||||
//list of packets we need to encode on the way out:
|
||||
|
||||
E(OP_SendCharInfo)
|
||||
E(OP_ZoneServerInfo)
|
||||
E(OP_SendAATable)
|
||||
E(OP_PlayerProfile)
|
||||
E(OP_ZoneEntry)
|
||||
E(OP_CharInventory)
|
||||
E(OP_NewZone)
|
||||
E(OP_SpawnDoor)
|
||||
E(OP_GroundSpawn)
|
||||
E(OP_SendZonepoints)
|
||||
E(OP_NewSpawn)
|
||||
E(OP_ZoneSpawns)
|
||||
E(OP_ItemLinkResponse)
|
||||
E(OP_ItemPacket)
|
||||
E(OP_GuildMemberList)
|
||||
E(OP_Illusion)
|
||||
E(OP_ManaChange)
|
||||
E(OP_ClientUpdate)
|
||||
E(OP_LeadershipExpUpdate)
|
||||
E(OP_ExpansionInfo)
|
||||
E(OP_LogServer)
|
||||
E(OP_Damage)
|
||||
E(OP_Buff)
|
||||
// out-going packets that require an ENCODE translation:
|
||||
E(OP_Action)
|
||||
E(OP_Consider)
|
||||
E(OP_CancelTrade)
|
||||
E(OP_ShopPlayerSell)
|
||||
E(OP_DeleteItem)
|
||||
E(OP_ItemVerifyReply)
|
||||
E(OP_DeleteCharge)
|
||||
E(OP_MoveItem)
|
||||
E(OP_OpenNewTasksWindow)
|
||||
E(OP_BazaarSearch)
|
||||
E(OP_Trader)
|
||||
E(OP_TraderBuy)
|
||||
E(OP_LootItem)
|
||||
E(OP_TributeItem)
|
||||
E(OP_SomeItemPacketMaybe)
|
||||
E(OP_ReadBook)
|
||||
E(OP_Stun)
|
||||
E(OP_ZonePlayerToBind)
|
||||
E(OP_AdventureMerchantSell)
|
||||
E(OP_RaidUpdate)
|
||||
E(OP_RaidJoin)
|
||||
E(OP_VetRewardsAvaliable)
|
||||
E(OP_InspectRequest)
|
||||
E(OP_Track)
|
||||
E(OP_DeleteSpawn)
|
||||
E(OP_AltCurrencySell)
|
||||
E(OP_ApplyPoison)
|
||||
E(OP_AugmentInfo)
|
||||
E(OP_BazaarSearch)
|
||||
E(OP_BecomeTrader)
|
||||
E(OP_Buff)
|
||||
E(OP_CancelTrade)
|
||||
E(OP_CharInventory)
|
||||
E(OP_ClientUpdate)
|
||||
E(OP_Consider)
|
||||
E(OP_Damage)
|
||||
E(OP_DeleteCharge)
|
||||
E(OP_DeleteItem)
|
||||
E(OP_DeleteSpawn)
|
||||
E(OP_DzCompass)
|
||||
E(OP_DzExpeditionEndsWarning)
|
||||
E(OP_DzExpeditionInfo)
|
||||
E(OP_DzCompass)
|
||||
E(OP_DzMemberList)
|
||||
E(OP_DzExpeditionList)
|
||||
E(OP_DzLeaderStatus)
|
||||
E(OP_DzJoinExpeditionConfirm)
|
||||
E(OP_BecomeTrader)
|
||||
E(OP_PetBuffWindow)
|
||||
E(OP_DzLeaderStatus)
|
||||
E(OP_DzMemberList)
|
||||
E(OP_ExpansionInfo)
|
||||
E(OP_GroundSpawn)
|
||||
E(OP_GuildMemberList)
|
||||
E(OP_Illusion)
|
||||
E(OP_InspectRequest)
|
||||
E(OP_ItemLinkResponse)
|
||||
E(OP_ItemPacket)
|
||||
E(OP_ItemVerifyReply)
|
||||
E(OP_LeadershipExpUpdate)
|
||||
E(OP_LogServer)
|
||||
E(OP_LootItem)
|
||||
E(OP_ManaChange)
|
||||
E(OP_MoveItem)
|
||||
E(OP_NewSpawn)
|
||||
E(OP_NewZone)
|
||||
E(OP_OnLevelMessage)
|
||||
E(OP_AltCurrencySell)
|
||||
E(OP_OpenNewTasksWindow)
|
||||
E(OP_PetBuffWindow)
|
||||
E(OP_PlayerProfile)
|
||||
E(OP_RaidJoin)
|
||||
E(OP_RaidUpdate)
|
||||
E(OP_ReadBook)
|
||||
E(OP_SendAATable)
|
||||
E(OP_SendCharInfo)
|
||||
E(OP_SendZonepoints)
|
||||
E(OP_ShopPlayerSell)
|
||||
E(OP_SomeItemPacketMaybe)
|
||||
E(OP_SpawnDoor)
|
||||
E(OP_Stun)
|
||||
E(OP_Track)
|
||||
E(OP_Trader)
|
||||
E(OP_TraderBuy)
|
||||
E(OP_TributeItem)
|
||||
E(OP_VetRewardsAvaliable)
|
||||
E(OP_WearChange)
|
||||
//list of packets we need to decode on the way in:
|
||||
D(OP_SetServerFilter)
|
||||
D(OP_CharacterCreate)
|
||||
D(OP_ItemLinkClick)
|
||||
D(OP_ConsiderCorpse)
|
||||
D(OP_Consider)
|
||||
D(OP_ClientUpdate)
|
||||
D(OP_MoveItem)
|
||||
D(OP_WhoAllRequest)
|
||||
E(OP_ZoneEntry)
|
||||
E(OP_ZonePlayerToBind)
|
||||
E(OP_ZoneServerInfo)
|
||||
E(OP_ZoneSpawns)
|
||||
// incoming packets that require a DECODE translation:
|
||||
D(OP_AdventureMerchantSell)
|
||||
D(OP_AltCurrencySell)
|
||||
D(OP_AltCurrencySellSelection)
|
||||
D(OP_ApplyPoison)
|
||||
D(OP_AugmentInfo)
|
||||
D(OP_AugmentItem)
|
||||
D(OP_Buff)
|
||||
D(OP_ShopPlayerSell)
|
||||
D(OP_Consume)
|
||||
D(OP_CastSpell)
|
||||
D(OP_Save)
|
||||
D(OP_ItemVerifyRequest)
|
||||
D(OP_CharacterCreate)
|
||||
D(OP_ClientUpdate)
|
||||
D(OP_Consider)
|
||||
D(OP_ConsiderCorpse)
|
||||
D(OP_Consume)
|
||||
D(OP_DeleteItem)
|
||||
D(OP_FaceChange)
|
||||
D(OP_FindPersonRequest)
|
||||
D(OP_GroupFollow)
|
||||
D(OP_GroupFollow2)
|
||||
D(OP_FindPersonRequest)
|
||||
D(OP_TraderBuy)
|
||||
D(OP_LootItem)
|
||||
D(OP_TributeItem)
|
||||
D(OP_ReadBook)
|
||||
D(OP_AugmentInfo)
|
||||
D(OP_FaceChange)
|
||||
D(OP_AdventureMerchantSell)
|
||||
D(OP_TradeSkillCombine)
|
||||
D(OP_RaidInvite)
|
||||
D(OP_InspectRequest)
|
||||
D(OP_ItemLinkClick)
|
||||
D(OP_ItemVerifyRequest)
|
||||
D(OP_LootItem)
|
||||
D(OP_MoveItem)
|
||||
D(OP_RaidInvite)
|
||||
D(OP_ReadBook)
|
||||
D(OP_Save)
|
||||
D(OP_SetServerFilter)
|
||||
D(OP_ShopPlayerSell)
|
||||
D(OP_TraderBuy)
|
||||
D(OP_TradeSkillCombine)
|
||||
D(OP_TributeItem)
|
||||
D(OP_WearChange)
|
||||
D(OP_ApplyPoison)
|
||||
D(OP_DeleteItem)
|
||||
D(OP_AugmentItem)
|
||||
D(OP_AltCurrencySellSelection)
|
||||
D(OP_AltCurrencySell)
|
||||
D(OP_WhoAllRequest)
|
||||
#undef E
|
||||
#undef D
|
||||
|
||||
@@ -497,7 +497,7 @@ struct CastSpell_Struct
|
||||
uint32 spell_id;
|
||||
uint32 inventoryslot; // slot for clicky item, 0xFFFF = normal cast
|
||||
uint32 target_id;
|
||||
uint8 cs_unknown[4];
|
||||
uint8 cs_unknown[4];
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -554,8 +554,8 @@ struct GMTrainee_Struct
|
||||
{
|
||||
/*000*/ uint32 npcid;
|
||||
/*004*/ uint32 playerid;
|
||||
/*008*/ uint32 skills[73];
|
||||
/*300*/ uint8 unknown300[148];
|
||||
/*008*/ uint32 skills[PACKET_SKILL_ARRAY_SIZE];
|
||||
/*408*/ uint8 unknown408[40];
|
||||
/*448*/
|
||||
};
|
||||
|
||||
@@ -689,14 +689,62 @@ struct PotionBelt_Struct {
|
||||
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
||||
static const uint32 MAX_RAID_LEADERSHIP_AA_ARRAY = 16;
|
||||
static const uint32 MAX_LEADERSHIP_AA_ARRAY = (MAX_GROUP_LEADERSHIP_AA_ARRAY+MAX_RAID_LEADERSHIP_AA_ARRAY);
|
||||
struct LeadershipAA_Struct {
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
struct GroupLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 groupAAMarkNPC;
|
||||
uint32 groupAANPCHealth;
|
||||
uint32 groupAADelegateMainAssist;
|
||||
uint32 groupAADelegateMarkNPC;
|
||||
uint32 groupAA4;
|
||||
uint32 groupAA5;
|
||||
uint32 groupAAInspectBuffs;
|
||||
uint32 groupAA7;
|
||||
uint32 groupAASpellAwareness;
|
||||
uint32 groupAAOffenseEnhancement;
|
||||
uint32 groupAAManaEnhancement;
|
||||
uint32 groupAAHealthEnhancement;
|
||||
uint32 groupAAHealthRegeneration;
|
||||
uint32 groupAAFindPathToPC;
|
||||
uint32 groupAAHealthOfTargetsTarget;
|
||||
uint32 groupAA15;
|
||||
};
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct RaidLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 raidAAMarkNPC;
|
||||
uint32 raidAANPCHealth;
|
||||
uint32 raidAADelegateMainAssist;
|
||||
uint32 raidAADelegateMarkNPC;
|
||||
uint32 raidAA4;
|
||||
uint32 raidAA5;
|
||||
uint32 raidAA6;
|
||||
uint32 raidAASpellAwareness;
|
||||
uint32 raidAAOffenseEnhancement;
|
||||
uint32 raidAAManaEnhancement;
|
||||
uint32 raidAAHealthEnhancement;
|
||||
uint32 raidAAHealthRegeneration;
|
||||
uint32 raidAAFindPathToPC;
|
||||
uint32 raidAAHealthOfTargetsTarget;
|
||||
uint32 raidAA14;
|
||||
uint32 raidAA15;
|
||||
};
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct LeadershipAA_Struct {
|
||||
union {
|
||||
struct {
|
||||
GroupLeadershipAA_Struct group;
|
||||
RaidLeadershipAA_Struct raid;
|
||||
};
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -722,7 +770,7 @@ struct BindStruct {
|
||||
static const uint32 MAX_PP_LANGUAGE = 25; //
|
||||
static const uint32 MAX_PP_SPELLBOOK = 480; // Confirmed 60 pages on Live now
|
||||
static const uint32 MAX_PP_MEMSPELL = 10; //was 9 now 10 on Live
|
||||
static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_AA_ARRAY = 300; //was 299
|
||||
static const uint32 MAX_GROUP_MEMBERS = 6;
|
||||
static const uint32 MAX_RECAST_TYPES = 20;
|
||||
@@ -1445,11 +1493,11 @@ struct BulkItemPacket_Struct
|
||||
|
||||
struct Consume_Struct
|
||||
{
|
||||
/*0000*/ uint32 slot;
|
||||
/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click
|
||||
/*0008*/ uint8 c_unknown1[4];
|
||||
/*0012*/ uint8 type; // 0x01=Food 0x02=Water
|
||||
/*0013*/ uint8 unknown13[3];
|
||||
/*0000*/ uint32 slot;
|
||||
/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click
|
||||
/*0008*/ uint8 c_unknown1[4];
|
||||
/*0012*/ uint8 type; // 0x01=Food 0x02=Water
|
||||
/*0013*/ uint8 unknown13[3];
|
||||
/*0016*/
|
||||
};
|
||||
|
||||
@@ -1479,17 +1527,17 @@ struct ItemProperties_Struct {
|
||||
};
|
||||
|
||||
struct DeleteItem_Struct {
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0012*/
|
||||
};
|
||||
|
||||
struct MoveItem_Struct
|
||||
{
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0012*/
|
||||
};
|
||||
|
||||
@@ -2953,10 +3001,10 @@ struct TributeInfo_Struct {
|
||||
};
|
||||
|
||||
struct TributeItem_Struct {
|
||||
uint32 slot;
|
||||
uint32 quantity;
|
||||
uint32 tribute_master_id;
|
||||
int32 tribute_points;
|
||||
uint32 slot;
|
||||
uint32 quantity;
|
||||
uint32 tribute_master_id;
|
||||
int32 tribute_points;
|
||||
};
|
||||
|
||||
struct TributePoint_Struct {
|
||||
@@ -2992,7 +3040,7 @@ struct Split_Struct
|
||||
*/
|
||||
struct NewCombine_Struct {
|
||||
/*00*/ int16 container_slot;
|
||||
/*02*/ char unknown02[2];
|
||||
/*02*/ int16 guildtribute_slot;
|
||||
/*04*/
|
||||
};
|
||||
|
||||
@@ -3425,6 +3473,21 @@ struct RaidAddMember_Struct {
|
||||
/*139*/ uint8 flags[5]; //no idea if these are needed...
|
||||
};
|
||||
|
||||
struct RaidMOTD_Struct {
|
||||
/*000*/ RaidGeneral_Struct general; // leader_name and action only used
|
||||
/*140*/ char motd[0]; // max size 1024, but reply is variable
|
||||
};
|
||||
|
||||
struct RaidLeadershipUpdate_Struct {
|
||||
/*000*/ uint32 action;
|
||||
/*004*/ char player_name[64];
|
||||
/*068*/ uint32 Unknown068;
|
||||
/*072*/ char leader_name[64];
|
||||
/*136*/ GroupLeadershipAA_Struct group; //unneeded
|
||||
/*200*/ RaidLeadershipAA_Struct raid;
|
||||
/*264*/ char Unknown264[128];
|
||||
};
|
||||
|
||||
struct RaidAdd_Struct {
|
||||
/*000*/ uint32 action; //=0
|
||||
/*004*/ char player_name[64]; //should both be the player's name
|
||||
@@ -3556,7 +3619,7 @@ struct GMToggle_Struct {
|
||||
uint32 toggle;
|
||||
};
|
||||
|
||||
struct BuffFadeMsg_Struct {
|
||||
struct ColoredText_Struct {
|
||||
uint32 color;
|
||||
char msg[1]; //was 1
|
||||
/*0???*/ uint8 paddingXXX[3]; // always 0's
|
||||
@@ -3726,7 +3789,7 @@ struct ItemSerializationHeader
|
||||
uint32 slot;
|
||||
uint32 price;
|
||||
uint32 merchant_slot; //1 if not a merchant item
|
||||
uint32 unknown020; //0
|
||||
uint32 scaled_value; //0
|
||||
uint32 instance_id; //unique instance id if not merchant item, else is merchant slot
|
||||
uint32 unknown028; //0
|
||||
uint32 last_cast_time; // Unix Time from PP of last cast for this recast type if recast delay > 0
|
||||
@@ -3963,10 +4026,10 @@ struct ItemQuaternaryBodyStruct
|
||||
|
||||
struct AugmentInfo_Struct
|
||||
{
|
||||
/*000*/ uint32 itemid; // id of the solvent needed
|
||||
/*004*/ uint8 window; // window to display the information in
|
||||
/*005*/ uint8 unknown005[71]; // total packet length 76, all the rest were always 00
|
||||
/*076*/
|
||||
/*000*/ uint32 itemid; // id of the solvent needed
|
||||
/*004*/ uint32 window; // window to display the information in
|
||||
/*008*/ char augment_info[64]; // total packet length 76, all the rest were always 00
|
||||
/*072*/ uint32 unknown072;
|
||||
};
|
||||
|
||||
struct VeteranRewardItem
|
||||
|
||||
+1655
-1391
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#ifndef Titanium_CONSTANTS_H_
|
||||
#define Titanium_CONSTANTS_H_
|
||||
|
||||
#include "../common/types.h"
|
||||
#include "../types.h"
|
||||
|
||||
namespace Titanium {
|
||||
namespace maps {
|
||||
@@ -180,6 +180,7 @@ namespace Titanium {
|
||||
|
||||
namespace limits {
|
||||
static const bool ALLOWS_EMPTY_BAG_IN_BAG = false;
|
||||
static const bool ALLOWS_CLICK_CAST_FROM_BAG = false;
|
||||
static const bool COIN_HAS_WEIGHT = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,53 +1,71 @@
|
||||
|
||||
//list of packets we need to encode on the way out:
|
||||
E(OP_SendCharInfo)
|
||||
E(OP_SendAATable)
|
||||
E(OP_LeadershipExpUpdate)
|
||||
E(OP_PlayerProfile)
|
||||
E(OP_NewSpawn)
|
||||
E(OP_ZoneSpawns)
|
||||
E(OP_ZoneEntry)
|
||||
E(OP_CharInventory)
|
||||
E(OP_ItemLinkResponse)
|
||||
E(OP_ItemPacket)
|
||||
// out-going packets that require an ENCODE translation:
|
||||
E(OP_Action)
|
||||
E(OP_AdventureMerchantSell)
|
||||
E(OP_ApplyPoison)
|
||||
E(OP_BazaarSearch)
|
||||
E(OP_GuildMemberList)
|
||||
E(OP_ZoneServerReady)
|
||||
E(OP_GuildMemberLevelUpdate)
|
||||
E(OP_Trader)
|
||||
E(OP_TraderBuy)
|
||||
E(OP_ReadBook)
|
||||
E(OP_Illusion)
|
||||
E(OP_VetRewardsAvaliable)
|
||||
E(OP_InspectRequest)
|
||||
E(OP_InspectAnswer)
|
||||
E(OP_Track)
|
||||
E(OP_RespondAA)
|
||||
E(OP_BecomeTrader)
|
||||
E(OP_CharInventory)
|
||||
E(OP_DeleteCharge)
|
||||
E(OP_DeleteItem)
|
||||
E(OP_DeleteSpawn)
|
||||
E(OP_WearChange)
|
||||
E(OP_DzCompass)
|
||||
E(OP_DzExpeditionEndsWarning)
|
||||
E(OP_DzExpeditionInfo)
|
||||
E(OP_DzCompass)
|
||||
E(OP_DzMemberList)
|
||||
E(OP_DzExpeditionList)
|
||||
E(OP_DzLeaderStatus)
|
||||
E(OP_DzJoinExpeditionConfirm)
|
||||
E(OP_Action)
|
||||
E(OP_BecomeTrader)
|
||||
E(OP_PetBuffWindow)
|
||||
E(OP_OnLevelMessage)
|
||||
E(OP_DzLeaderStatus)
|
||||
E(OP_DzMemberList)
|
||||
E(OP_GuildMemberLevelUpdate)
|
||||
E(OP_GuildMemberList)
|
||||
E(OP_Illusion)
|
||||
E(OP_InspectAnswer)
|
||||
E(OP_InspectRequest)
|
||||
E(OP_ItemLinkResponse)
|
||||
E(OP_ItemPacket)
|
||||
E(OP_LeadershipExpUpdate)
|
||||
E(OP_LFGuild)
|
||||
//list of packets we need to decode on the way in:
|
||||
D(OP_SetServerFilter)
|
||||
E(OP_LootItem)
|
||||
E(OP_MoveItem)
|
||||
E(OP_OnLevelMessage)
|
||||
E(OP_PetBuffWindow)
|
||||
E(OP_PlayerProfile)
|
||||
E(OP_NewSpawn)
|
||||
E(OP_ReadBook)
|
||||
E(OP_RespondAA)
|
||||
E(OP_SendCharInfo)
|
||||
E(OP_SendAATable)
|
||||
E(OP_ShopPlayerSell)
|
||||
E(OP_Track)
|
||||
E(OP_Trader)
|
||||
E(OP_TraderBuy)
|
||||
E(OP_TributeItem)
|
||||
E(OP_VetRewardsAvaliable)
|
||||
E(OP_WearChange)
|
||||
E(OP_ZoneEntry)
|
||||
E(OP_ZoneServerReady)
|
||||
E(OP_ZoneSpawns)
|
||||
// incoming packets that require a DECODE translation:
|
||||
D(OP_AdventureMerchantSell)
|
||||
D(OP_ApplyPoison)
|
||||
D(OP_AugmentItem)
|
||||
D(OP_CastSpell)
|
||||
D(OP_CharacterCreate)
|
||||
D(OP_ItemLinkClick)
|
||||
D(OP_TraderBuy)
|
||||
D(OP_WhoAllRequest)
|
||||
D(OP_ReadBook)
|
||||
D(OP_Consume)
|
||||
D(OP_DeleteItem)
|
||||
D(OP_FaceChange)
|
||||
D(OP_InspectRequest)
|
||||
D(OP_InspectAnswer)
|
||||
D(OP_WearChange)
|
||||
D(OP_InspectRequest)
|
||||
D(OP_ItemLinkClick)
|
||||
D(OP_LFGuild)
|
||||
D(OP_LootItem)
|
||||
D(OP_MoveItem)
|
||||
D(OP_ReadBook)
|
||||
D(OP_SetServerFilter)
|
||||
D(OP_ShopPlayerSell)
|
||||
D(OP_TraderBuy)
|
||||
D(OP_TradeSkillCombine)
|
||||
D(OP_TributeItem)
|
||||
D(OP_WearChange)
|
||||
D(OP_WhoAllRequest)
|
||||
#undef E
|
||||
#undef D
|
||||
|
||||
@@ -419,7 +419,7 @@ struct CastSpell_Struct
|
||||
uint32 spell_id;
|
||||
uint32 inventoryslot; // slot for clicky item, 0xFFFF = normal cast
|
||||
uint32 target_id;
|
||||
uint8 cs_unknown[4];
|
||||
uint8 cs_unknown[4];
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -485,8 +485,8 @@ struct GMTrainee_Struct
|
||||
{
|
||||
/*000*/ uint32 npcid;
|
||||
/*004*/ uint32 playerid;
|
||||
/*008*/ uint32 skills[73];
|
||||
/*300*/ uint8 unknown300[148];
|
||||
/*008*/ uint32 skills[PACKET_SKILL_ARRAY_SIZE];
|
||||
/*408*/ uint8 unknown408[40];
|
||||
/*448*/
|
||||
};
|
||||
|
||||
@@ -565,7 +565,7 @@ struct CharCreate_Struct
|
||||
/*0064*/ uint32 face; // Could be unknown0076
|
||||
/*0068*/ uint32 eyecolor1; //its possiable we could have these switched
|
||||
/*0073*/ uint32 eyecolor2; //since setting one sets the other we really can't check
|
||||
/*0076*/ uint32 unknown0076; // Could be face
|
||||
/*0076*/ uint32 tutorial;
|
||||
/*0080*/
|
||||
};
|
||||
|
||||
@@ -619,14 +619,62 @@ struct PotionBelt_Struct {
|
||||
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
||||
static const uint32 MAX_RAID_LEADERSHIP_AA_ARRAY = 16;
|
||||
static const uint32 MAX_LEADERSHIP_AA_ARRAY = (MAX_GROUP_LEADERSHIP_AA_ARRAY+MAX_RAID_LEADERSHIP_AA_ARRAY);
|
||||
struct LeadershipAA_Struct {
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
struct GroupLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 groupAAMarkNPC;
|
||||
uint32 groupAANPCHealth;
|
||||
uint32 groupAADelegateMainAssist;
|
||||
uint32 groupAADelegateMarkNPC;
|
||||
uint32 groupAA4;
|
||||
uint32 groupAA5;
|
||||
uint32 groupAAInspectBuffs;
|
||||
uint32 groupAA7;
|
||||
uint32 groupAASpellAwareness;
|
||||
uint32 groupAAOffenseEnhancement;
|
||||
uint32 groupAAManaEnhancement;
|
||||
uint32 groupAAHealthEnhancement;
|
||||
uint32 groupAAHealthRegeneration;
|
||||
uint32 groupAAFindPathToPC;
|
||||
uint32 groupAAHealthOfTargetsTarget;
|
||||
uint32 groupAA15;
|
||||
};
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct RaidLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 raidAAMarkNPC;
|
||||
uint32 raidAANPCHealth;
|
||||
uint32 raidAADelegateMainAssist;
|
||||
uint32 raidAADelegateMarkNPC;
|
||||
uint32 raidAA4;
|
||||
uint32 raidAA5;
|
||||
uint32 raidAA6;
|
||||
uint32 raidAASpellAwareness;
|
||||
uint32 raidAAOffenseEnhancement;
|
||||
uint32 raidAAManaEnhancement;
|
||||
uint32 raidAAHealthEnhancement;
|
||||
uint32 raidAAHealthRegeneration;
|
||||
uint32 raidAAFindPathToPC;
|
||||
uint32 raidAAHealthOfTargetsTarget;
|
||||
uint32 raidAA14;
|
||||
uint32 raidAA15;
|
||||
};
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct LeadershipAA_Struct {
|
||||
union {
|
||||
struct {
|
||||
GroupLeadershipAA_Struct group;
|
||||
RaidLeadershipAA_Struct raid;
|
||||
};
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -652,7 +700,7 @@ struct BindStruct {
|
||||
static const uint32 MAX_PP_LANGUAGE = 28;
|
||||
static const uint32 MAX_PP_SPELLBOOK = 400;
|
||||
static const uint32 MAX_PP_MEMSPELL = 9;
|
||||
static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_AA_ARRAY = 240;
|
||||
static const uint32 MAX_GROUP_MEMBERS = 6;
|
||||
static const uint32 MAX_RECAST_TYPES = 20;
|
||||
@@ -1217,19 +1265,27 @@ struct BulkItemPacket_Struct
|
||||
|
||||
struct Consume_Struct
|
||||
{
|
||||
/*0000*/ uint32 slot;
|
||||
/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click
|
||||
/*0008*/ uint8 c_unknown1[4];
|
||||
/*0012*/ uint8 type; // 0x01=Food 0x02=Water
|
||||
/*0013*/ uint8 unknown13[3];
|
||||
/*0000*/ uint32 slot;
|
||||
/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click
|
||||
/*0008*/ uint8 c_unknown1[4];
|
||||
/*0012*/ uint8 type; // 0x01=Food 0x02=Water
|
||||
/*0013*/ uint8 unknown13[3];
|
||||
};
|
||||
|
||||
struct DeleteItem_Struct
|
||||
{
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0012*/
|
||||
};
|
||||
|
||||
struct MoveItem_Struct
|
||||
{
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0012*/
|
||||
};
|
||||
|
||||
//
|
||||
@@ -1431,12 +1487,6 @@ struct CombatAbility_Struct {
|
||||
uint32 m_skill;
|
||||
};
|
||||
|
||||
struct DeleteItem_Struct {
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
};
|
||||
|
||||
//Instill Doubt
|
||||
struct Instill_Doubt_Struct {
|
||||
uint8 i_id;
|
||||
@@ -1590,6 +1640,14 @@ struct Adventure_Purchase_Struct {
|
||||
/*008*/ uint32 variable;
|
||||
};
|
||||
|
||||
struct Adventure_Sell_Struct {
|
||||
/*000*/ uint32 unknown000; //0x01
|
||||
/*004*/ uint32 npcid;
|
||||
/*008*/ uint32 slot;
|
||||
/*012*/ uint32 charges;
|
||||
/*016*/ uint32 sell_price;
|
||||
};
|
||||
|
||||
struct AdventurePoints_Update_Struct {
|
||||
/*000*/ uint32 ldon_available_points; // Total available points
|
||||
/*004*/ uint8 unkown_apu004[20];
|
||||
@@ -2583,10 +2641,10 @@ struct TributeInfo_Struct {
|
||||
};
|
||||
|
||||
struct TributeItem_Struct {
|
||||
uint32 slot;
|
||||
uint32 quantity;
|
||||
uint32 tribute_master_id;
|
||||
int32 tribute_points;
|
||||
uint32 slot;
|
||||
uint32 quantity;
|
||||
uint32 tribute_master_id;
|
||||
int32 tribute_points;
|
||||
};
|
||||
|
||||
struct TributePoint_Struct {
|
||||
@@ -2622,7 +2680,7 @@ struct Split_Struct
|
||||
*/
|
||||
struct NewCombine_Struct {
|
||||
/*00*/ int16 container_slot;
|
||||
/*02*/ char unknown02[2];
|
||||
/*02*/ int16 guildtribute_slot;
|
||||
/*04*/
|
||||
};
|
||||
|
||||
@@ -3046,7 +3104,7 @@ struct GroupInvite_Struct {
|
||||
// uint8 unknown128[65];
|
||||
};
|
||||
|
||||
struct BuffFadeMsg_Struct {
|
||||
struct ColoredText_Struct {
|
||||
uint32 color;
|
||||
char msg[1];
|
||||
};
|
||||
@@ -3154,6 +3212,11 @@ struct AnnoyingZoneUnknown_Struct {
|
||||
uint32 value; //always 4
|
||||
};
|
||||
|
||||
struct ApplyPoison_Struct {
|
||||
uint32 inventorySlot;
|
||||
uint32 success;
|
||||
};
|
||||
|
||||
struct GuildMemberUpdate_Struct {
|
||||
/*000*/ uint32 guild_id; //not sure
|
||||
/*004*/ char member_name[64];
|
||||
|
||||
+3681
-3499
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#ifndef Underfoot_CONSTANTS_H_
|
||||
#define Underfoot_CONSTANTS_H_
|
||||
|
||||
#include "../common/types.h"
|
||||
#include "../types.h"
|
||||
|
||||
namespace Underfoot {
|
||||
namespace maps {
|
||||
@@ -181,6 +181,7 @@ namespace Underfoot {
|
||||
|
||||
namespace limits {
|
||||
static const bool ALLOWS_EMPTY_BAG_IN_BAG = false;
|
||||
static const bool ALLOWS_CLICK_CAST_FROM_BAG = false;
|
||||
static const bool COIN_HAS_WEIGHT = false;
|
||||
}
|
||||
|
||||
|
||||
+109
-109
@@ -1,128 +1,128 @@
|
||||
|
||||
//list of packets we need to encode on the way out:
|
||||
|
||||
E(OP_SendCharInfo)
|
||||
E(OP_ZoneServerInfo)
|
||||
E(OP_SendAATable)
|
||||
E(OP_PlayerProfile)
|
||||
E(OP_ZoneEntry)
|
||||
E(OP_CharInventory)
|
||||
E(OP_NewZone)
|
||||
E(OP_SpawnDoor)
|
||||
E(OP_GroundSpawn)
|
||||
E(OP_SendZonepoints)
|
||||
E(OP_NewSpawn)
|
||||
E(OP_ZoneSpawns)
|
||||
E(OP_ItemLinkResponse)
|
||||
E(OP_ItemPacket)
|
||||
E(OP_GuildMemberList)
|
||||
E(OP_Illusion)
|
||||
E(OP_ManaChange)
|
||||
E(OP_ClientUpdate)
|
||||
E(OP_LeadershipExpUpdate)
|
||||
E(OP_ExpansionInfo)
|
||||
E(OP_LogServer)
|
||||
E(OP_Damage)
|
||||
E(OP_Buff)
|
||||
// out-going packets that require an ENCODE translation:
|
||||
E(OP_Action)
|
||||
E(OP_Consider)
|
||||
E(OP_CancelTrade)
|
||||
E(OP_ShopPlayerSell)
|
||||
E(OP_DeleteItem)
|
||||
E(OP_ItemVerifyReply)
|
||||
E(OP_DeleteCharge)
|
||||
E(OP_MoveItem)
|
||||
E(OP_OpenNewTasksWindow)
|
||||
E(OP_BazaarSearch)
|
||||
E(OP_Trader)
|
||||
E(OP_TraderBuy)
|
||||
E(OP_LootItem)
|
||||
E(OP_TributeItem)
|
||||
E(OP_SomeItemPacketMaybe)
|
||||
E(OP_ReadBook)
|
||||
E(OP_Stun)
|
||||
E(OP_ZonePlayerToBind)
|
||||
E(OP_AdventureMerchantSell)
|
||||
E(OP_RaidUpdate)
|
||||
E(OP_RaidJoin)
|
||||
E(OP_VetRewardsAvaliable)
|
||||
E(OP_InspectRequest)
|
||||
E(OP_GroupInvite)
|
||||
E(OP_GroupFollow)
|
||||
E(OP_GroupFollow2)
|
||||
E(OP_GroupUpdate)
|
||||
E(OP_GroupCancelInvite)
|
||||
E(OP_WhoAllResponse)
|
||||
E(OP_Track)
|
||||
E(OP_ShopPlayerBuy)
|
||||
E(OP_PetBuffWindow)
|
||||
E(OP_OnLevelMessage)
|
||||
E(OP_Barter)
|
||||
E(OP_AltCurrency)
|
||||
E(OP_AltCurrencySell)
|
||||
E(OP_ApplyPoison)
|
||||
E(OP_AugmentInfo)
|
||||
E(OP_Barter)
|
||||
E(OP_BazaarSearch)
|
||||
E(OP_Buff)
|
||||
E(OP_BuffCreate)
|
||||
E(OP_CancelTrade)
|
||||
E(OP_ChannelMessage)
|
||||
E(OP_GuildsList)
|
||||
E(OP_CharInventory)
|
||||
E(OP_ClientUpdate)
|
||||
E(OP_Consider)
|
||||
E(OP_Damage)
|
||||
E(OP_DeleteCharge)
|
||||
E(OP_DeleteItem)
|
||||
E(OP_DisciplineUpdate)
|
||||
E(OP_DzCompass)
|
||||
E(OP_DzExpeditionEndsWarning)
|
||||
E(OP_DzExpeditionInfo)
|
||||
E(OP_DzCompass)
|
||||
E(OP_DzMemberList)
|
||||
E(OP_DzExpeditionList)
|
||||
E(OP_DzLeaderStatus)
|
||||
E(OP_DzJoinExpeditionConfirm)
|
||||
E(OP_TargetBuffs)
|
||||
E(OP_BuffCreate)
|
||||
E(OP_SpawnAppearance)
|
||||
E(OP_RespondAA)
|
||||
E(OP_DisciplineUpdate)
|
||||
E(OP_AltCurrencySell)
|
||||
E(OP_AltCurrency)
|
||||
E(OP_WearChange)
|
||||
E(OP_DzLeaderStatus)
|
||||
E(OP_DzMemberList)
|
||||
E(OP_ExpansionInfo)
|
||||
E(OP_GroundSpawn)
|
||||
E(OP_GroupCancelInvite)
|
||||
E(OP_GroupFollow)
|
||||
E(OP_GroupFollow2)
|
||||
E(OP_GroupInvite)
|
||||
E(OP_GroupUpdate)
|
||||
E(OP_GuildMemberList)
|
||||
E(OP_GuildsList)
|
||||
E(OP_Illusion)
|
||||
E(OP_InspectBuffs)
|
||||
E(OP_InspectRequest)
|
||||
E(OP_ItemLinkResponse)
|
||||
E(OP_ItemPacket)
|
||||
E(OP_ItemVerifyReply)
|
||||
E(OP_LeadershipExpUpdate)
|
||||
E(OP_LogServer)
|
||||
E(OP_LootItem)
|
||||
E(OP_ManaChange)
|
||||
E(OP_MercenaryDataResponse)
|
||||
E(OP_MercenaryDataUpdate)
|
||||
//list of packets we need to decode on the way in:
|
||||
D(OP_SetServerFilter)
|
||||
D(OP_CharacterCreate)
|
||||
D(OP_ItemLinkClick)
|
||||
D(OP_ConsiderCorpse)
|
||||
D(OP_Consider)
|
||||
D(OP_ClientUpdate)
|
||||
D(OP_MoveItem)
|
||||
D(OP_WhoAllRequest)
|
||||
E(OP_MoveItem)
|
||||
E(OP_NewSpawn)
|
||||
E(OP_NewZone)
|
||||
E(OP_OnLevelMessage)
|
||||
E(OP_OpenNewTasksWindow)
|
||||
E(OP_PetBuffWindow)
|
||||
E(OP_PlayerProfile)
|
||||
E(OP_RaidJoin)
|
||||
E(OP_RaidUpdate)
|
||||
E(OP_ReadBook)
|
||||
E(OP_RespondAA)
|
||||
E(OP_SendAATable)
|
||||
E(OP_SendCharInfo)
|
||||
E(OP_SendZonepoints)
|
||||
E(OP_ShopPlayerBuy)
|
||||
E(OP_ShopPlayerSell)
|
||||
E(OP_SomeItemPacketMaybe)
|
||||
E(OP_SpawnAppearance)
|
||||
E(OP_SpawnDoor)
|
||||
E(OP_Stun)
|
||||
E(OP_TargetBuffs)
|
||||
E(OP_Track)
|
||||
E(OP_Trader)
|
||||
E(OP_TraderBuy)
|
||||
E(OP_TributeItem)
|
||||
E(OP_VetRewardsAvaliable)
|
||||
E(OP_WearChange)
|
||||
E(OP_WhoAllResponse)
|
||||
E(OP_ZoneEntry)
|
||||
E(OP_ZonePlayerToBind)
|
||||
E(OP_ZoneServerInfo)
|
||||
E(OP_ZoneSpawns)
|
||||
// incoming packets that require a DECODE translation:
|
||||
D(OP_AdventureMerchantSell)
|
||||
D(OP_AltCurrencySell)
|
||||
D(OP_AltCurrencySellSelection)
|
||||
D(OP_ApplyPoison)
|
||||
D(OP_AugmentInfo)
|
||||
D(OP_AugmentItem)
|
||||
D(OP_BazaarSearch)
|
||||
D(OP_Buff)
|
||||
D(OP_ShopPlayerSell)
|
||||
D(OP_Consume)
|
||||
D(OP_BuffRemoveRequest)
|
||||
D(OP_CastSpell)
|
||||
D(OP_Save)
|
||||
D(OP_ItemVerifyRequest)
|
||||
D(OP_GroupInvite)
|
||||
D(OP_GroupInvite2)
|
||||
D(OP_ChannelMessage)
|
||||
D(OP_CharacterCreate)
|
||||
D(OP_ClientUpdate)
|
||||
D(OP_Consider)
|
||||
D(OP_ConsiderCorpse)
|
||||
D(OP_Consume)
|
||||
D(OP_Damage)
|
||||
D(OP_DeleteItem)
|
||||
D(OP_EnvDamage)
|
||||
D(OP_FaceChange)
|
||||
D(OP_FindPersonRequest)
|
||||
D(OP_GroupCancelInvite)
|
||||
D(OP_GroupDisband)
|
||||
D(OP_GroupFollow)
|
||||
D(OP_GroupFollow2)
|
||||
D(OP_GroupDisband)
|
||||
D(OP_GroupCancelInvite)
|
||||
D(OP_FindPersonRequest)
|
||||
D(OP_TraderBuy)
|
||||
D(OP_LootItem)
|
||||
D(OP_TributeItem)
|
||||
D(OP_ReadBook)
|
||||
D(OP_AugmentInfo)
|
||||
D(OP_FaceChange)
|
||||
D(OP_AdventureMerchantSell)
|
||||
D(OP_TradeSkillCombine)
|
||||
D(OP_RaidInvite)
|
||||
D(OP_GroupInvite)
|
||||
D(OP_GroupInvite2)
|
||||
D(OP_InspectRequest)
|
||||
D(OP_WearChange)
|
||||
D(OP_ShopPlayerBuy)
|
||||
D(OP_BazaarSearch)
|
||||
D(OP_ItemLinkClick)
|
||||
D(OP_ItemVerifyRequest)
|
||||
D(OP_LoadSpellSet)
|
||||
D(OP_ApplyPoison)
|
||||
D(OP_Damage)
|
||||
D(OP_EnvDamage)
|
||||
D(OP_ChannelMessage)
|
||||
D(OP_DeleteItem)
|
||||
D(OP_AugmentItem)
|
||||
D(OP_LootItem)
|
||||
D(OP_MoveItem)
|
||||
D(OP_PetCommands)
|
||||
D(OP_BuffRemoveRequest)
|
||||
D(OP_AltCurrencySellSelection)
|
||||
D(OP_AltCurrencySell)
|
||||
D(OP_RaidInvite)
|
||||
D(OP_ReadBook)
|
||||
D(OP_Save)
|
||||
D(OP_SetServerFilter)
|
||||
D(OP_ShopPlayerBuy)
|
||||
D(OP_ShopPlayerSell)
|
||||
D(OP_TraderBuy)
|
||||
D(OP_TradeSkillCombine)
|
||||
D(OP_TributeItem)
|
||||
D(OP_WearChange)
|
||||
D(OP_WhoAllRequest)
|
||||
#undef E
|
||||
#undef D
|
||||
|
||||
@@ -519,7 +519,11 @@ struct CastSpell_Struct
|
||||
uint32 spell_id;
|
||||
uint32 inventoryslot; // slot for clicky item, 0xFFFF = normal cast
|
||||
uint32 target_id;
|
||||
uint32 cs_unknown[5];
|
||||
uint32 cs_unknown1;
|
||||
uint32 cs_unknown2;
|
||||
float y_pos;
|
||||
float x_pos;
|
||||
float z_pos;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -564,7 +568,7 @@ struct SpellBuffFade_Struct_Underfoot {
|
||||
/*008*/ float unknown008;
|
||||
/*012*/ uint32 spellid;
|
||||
/*016*/ uint32 duration;
|
||||
/*020*/ uint32 unknown016;
|
||||
/*020*/ uint32 num_hits;
|
||||
/*024*/ uint32 playerId; // Global player ID?
|
||||
/*028*/ uint32 unknown020;
|
||||
/*032*/ uint8 unknown0028[48];
|
||||
@@ -589,6 +593,25 @@ struct SpellBuffFade_Struct {
|
||||
/*036*/
|
||||
};
|
||||
|
||||
#if 0
|
||||
struct BuffIconEntry_Struct {
|
||||
/*000*/ uint32 buff_slot;
|
||||
/*004*/ uint32 spell_id;
|
||||
/*008*/ uint32 tics_remaining;
|
||||
/*012*/ uint32 num_hits;
|
||||
// char name[0]; caster name is also here sometimes
|
||||
// uint8 unknownend; 1 when single, 0 when all opposite of all_buffs?
|
||||
};
|
||||
|
||||
struct BuffIcon_Struct {
|
||||
/*000*/ uint32 entity_id;
|
||||
/*004*/ uint32 unknown004;
|
||||
/*008*/ uint8 all_buffs; // 1 when updating all buffs, 0 when doing one
|
||||
/*009*/ uint16 count;
|
||||
/*011*/ BuffIconEntry_Struct entires[0];
|
||||
};
|
||||
#endif
|
||||
|
||||
struct BuffRemoveRequest_Struct
|
||||
{
|
||||
/*00*/ uint32 SlotID;
|
||||
@@ -600,8 +623,8 @@ struct GMTrainee_Struct
|
||||
{
|
||||
/*000*/ uint32 npcid;
|
||||
/*004*/ uint32 playerid;
|
||||
/*008*/ uint32 skills[73];
|
||||
/*300*/ uint8 unknown300[148];
|
||||
/*008*/ uint32 skills[PACKET_SKILL_ARRAY_SIZE];
|
||||
/*408*/ uint8 unknown408[40];
|
||||
/*448*/
|
||||
};
|
||||
|
||||
@@ -735,14 +758,62 @@ struct PotionBelt_Struct {
|
||||
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
||||
static const uint32 MAX_RAID_LEADERSHIP_AA_ARRAY = 16;
|
||||
static const uint32 MAX_LEADERSHIP_AA_ARRAY = (MAX_GROUP_LEADERSHIP_AA_ARRAY+MAX_RAID_LEADERSHIP_AA_ARRAY);
|
||||
struct LeadershipAA_Struct {
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
struct GroupLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 groupAAMarkNPC;
|
||||
uint32 groupAANPCHealth;
|
||||
uint32 groupAADelegateMainAssist;
|
||||
uint32 groupAADelegateMarkNPC;
|
||||
uint32 groupAA4;
|
||||
uint32 groupAA5;
|
||||
uint32 groupAAInspectBuffs;
|
||||
uint32 groupAA7;
|
||||
uint32 groupAASpellAwareness;
|
||||
uint32 groupAAOffenseEnhancement;
|
||||
uint32 groupAAManaEnhancement;
|
||||
uint32 groupAAHealthEnhancement;
|
||||
uint32 groupAAHealthRegeneration;
|
||||
uint32 groupAAFindPathToPC;
|
||||
uint32 groupAAHealthOfTargetsTarget;
|
||||
uint32 groupAA15;
|
||||
};
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct RaidLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 raidAAMarkNPC;
|
||||
uint32 raidAANPCHealth;
|
||||
uint32 raidAADelegateMainAssist;
|
||||
uint32 raidAADelegateMarkNPC;
|
||||
uint32 raidAA4;
|
||||
uint32 raidAA5;
|
||||
uint32 raidAA6;
|
||||
uint32 raidAASpellAwareness;
|
||||
uint32 raidAAOffenseEnhancement;
|
||||
uint32 raidAAManaEnhancement;
|
||||
uint32 raidAAHealthEnhancement;
|
||||
uint32 raidAAHealthRegeneration;
|
||||
uint32 raidAAFindPathToPC;
|
||||
uint32 raidAAHealthOfTargetsTarget;
|
||||
uint32 raidAA14;
|
||||
uint32 raidAA15;
|
||||
};
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct LeadershipAA_Struct {
|
||||
union {
|
||||
struct {
|
||||
GroupLeadershipAA_Struct group;
|
||||
RaidLeadershipAA_Struct raid;
|
||||
};
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -766,9 +837,9 @@ struct BindStruct {
|
||||
** OpCode: 0x006a
|
||||
*/
|
||||
static const uint32 MAX_PP_LANGUAGE = 25; //
|
||||
static const uint32 MAX_PP_SPELLBOOK = 480; // Confirmed 60 pages on Underfoot now
|
||||
static const uint32 MAX_PP_SPELLBOOK = 720; // Confirmed 60 pages on Underfoot now
|
||||
static const uint32 MAX_PP_MEMSPELL = 10; //was 9 now 10 on Underfoot
|
||||
static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_AA_ARRAY = 300; //was 299
|
||||
static const uint32 MAX_GROUP_MEMBERS = 6;
|
||||
static const uint32 MAX_RECAST_TYPES = 20;
|
||||
@@ -879,7 +950,6 @@ struct PlayerProfile_Struct
|
||||
/*04216*/ uint8 face; // Player face - Actually uint32?
|
||||
/*04217*/ uint8 unknown04217[147]; // was [175]
|
||||
/*04364*/ uint32 spell_book[MAX_PP_SPELLBOOK]; // List of the Spells in spellbook 720 = 90 pages [2880] was [1920]
|
||||
/*06284*/ uint8 unknown06284[960]; // Spacer for the end of the book for now (pages 60 to 90)
|
||||
/*07244*/ uint32 mem_spells[MAX_PP_MEMSPELL]; // List of spells memorized
|
||||
/*07284*/ uint8 unknown07284[28]; //#### uint8 unknown04396[32]; in Titanium ####[28]
|
||||
/*07312*/ uint32 platinum; // Platinum Pieces on player
|
||||
@@ -1506,11 +1576,11 @@ struct BulkItemPacket_Struct
|
||||
|
||||
struct Consume_Struct
|
||||
{
|
||||
/*0000*/ uint32 slot;
|
||||
/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click
|
||||
/*0008*/ uint8 c_unknown1[4];
|
||||
/*0012*/ uint8 type; // 0x01=Food 0x02=Water
|
||||
/*0013*/ uint8 unknown13[3];
|
||||
/*0000*/ uint32 slot;
|
||||
/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click
|
||||
/*0008*/ uint8 c_unknown1[4];
|
||||
/*0012*/ uint8 type; // 0x01=Food 0x02=Water
|
||||
/*0013*/ uint8 unknown13[3];
|
||||
/*0016*/
|
||||
};
|
||||
|
||||
@@ -1540,17 +1610,17 @@ struct ItemProperties_Struct {
|
||||
};
|
||||
|
||||
struct DeleteItem_Struct {
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0012*/
|
||||
};
|
||||
|
||||
struct MoveItem_Struct
|
||||
{
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0000*/ uint32 from_slot;
|
||||
/*0004*/ uint32 to_slot;
|
||||
/*0008*/ uint32 number_in_stack;
|
||||
/*0012*/
|
||||
};
|
||||
|
||||
@@ -2100,6 +2170,14 @@ struct GroupFollow_Struct { // Underfoot Follow Struct
|
||||
/*0152*/
|
||||
};
|
||||
|
||||
struct InspectBuffs_Struct {
|
||||
/*000*/ uint32 spell_id[BUFF_COUNT];
|
||||
/*100*/ uint32 filler100[5]; // BUFF_COUNT is really 30...
|
||||
/*120*/ uint32 tics_remaining[BUFF_COUNT];
|
||||
/*220*/ uint32 filler220[5]; // BUFF_COUNT is really 30...
|
||||
};
|
||||
|
||||
|
||||
struct LFG_Struct {
|
||||
/*000*/ uint32 unknown000;
|
||||
/*004*/ uint32 value; // 0x00 = off 0x01 = on
|
||||
@@ -3130,10 +3208,10 @@ struct TributeInfo_Struct {
|
||||
};
|
||||
|
||||
struct TributeItem_Struct {
|
||||
uint32 slot;
|
||||
uint32 quantity;
|
||||
uint32 tribute_master_id;
|
||||
int32 tribute_points;
|
||||
uint32 slot;
|
||||
uint32 quantity;
|
||||
uint32 tribute_master_id;
|
||||
int32 tribute_points;
|
||||
};
|
||||
|
||||
struct TributePoint_Struct {
|
||||
@@ -3169,7 +3247,7 @@ struct Split_Struct
|
||||
*/
|
||||
struct NewCombine_Struct {
|
||||
/*00*/ int16 container_slot;
|
||||
/*02*/ char unknown02[2];
|
||||
/*02*/ int16 guildtribute_slot;
|
||||
/*04*/
|
||||
};
|
||||
|
||||
@@ -3605,6 +3683,21 @@ struct RaidAddMember_Struct {
|
||||
/*139*/ uint8 flags[5]; //no idea if these are needed...
|
||||
};
|
||||
|
||||
struct RaidMOTD_Struct {
|
||||
/*000*/ RaidGeneral_Struct general; // leader_name and action only used
|
||||
/*140*/ char motd[0]; // max size 1024, but reply is variable
|
||||
};
|
||||
|
||||
struct RaidLeadershipUpdate_Struct {
|
||||
/*000*/ uint32 action;
|
||||
/*004*/ char player_name[64];
|
||||
/*068*/ uint32 Unknown068;
|
||||
/*072*/ char leader_name[64];
|
||||
/*136*/ GroupLeadershipAA_Struct group; //unneeded
|
||||
/*200*/ RaidLeadershipAA_Struct raid;
|
||||
/*264*/ char Unknown264[128];
|
||||
};
|
||||
|
||||
struct RaidAdd_Struct {
|
||||
/*000*/ uint32 action; //=0
|
||||
/*004*/ char player_name[64]; //should both be the player's name
|
||||
@@ -3736,7 +3829,7 @@ struct GMToggle_Struct {
|
||||
uint32 toggle;
|
||||
};
|
||||
|
||||
struct BuffFadeMsg_Struct {
|
||||
struct ColoredText_Struct {
|
||||
uint32 color;
|
||||
char msg[1]; //was 1
|
||||
/*0???*/ uint8 paddingXXX[3]; // always 0's
|
||||
@@ -3912,25 +4005,42 @@ struct ItemVerifyReply_Struct {
|
||||
|
||||
struct ItemSerializationHeader
|
||||
{
|
||||
/*000*/ uint32 stacksize;
|
||||
/*004*/ uint32 unknown004;
|
||||
/*008*/ uint32 slot;
|
||||
/*012*/ uint32 price;
|
||||
/*016*/ uint32 merchant_slot; //1 if not a merchant item
|
||||
/*020*/ uint32 unknown020; //0
|
||||
/*024*/ uint32 instance_id; //unique instance id if not merchant item, else is merchant slot
|
||||
/*028*/ uint32 unknown028; //0
|
||||
/*032*/ uint32 last_cast_time; // Unix Time from PP of last cast for this recast type if recast delay > 0
|
||||
/*036*/ uint32 charges; //Total Charges an item has (-1 for unlimited)
|
||||
/*040*/ uint32 inst_nodrop; // 1 if the item is no drop (attuned items)
|
||||
/*044*/ uint32 unknown044; //0
|
||||
/*048*/ uint32 unknown048; //0
|
||||
/*052*/ uint32 unknown052; //0
|
||||
/*056*/ uint32 unknown056; //0
|
||||
/*060*/ uint8 unknown060; //0
|
||||
/*061*/ uint8 unknown061; //0 - Add Evolving Item struct if this isn't set to 0?
|
||||
/*062*/ uint8 unknown062; // New to Underfoot
|
||||
/*063*/ uint8 ItemClass; //0, 1, or 2
|
||||
/*000*/ uint32 stacksize;
|
||||
/*004*/ uint32 unknown004;
|
||||
/*008*/ uint32 slot;
|
||||
/*012*/ uint32 price;
|
||||
/*016*/ uint32 merchant_slot; //1 if not a merchant item
|
||||
/*020*/ uint32 scaled_value; //0
|
||||
/*024*/ uint32 instance_id; //unique instance id if not merchant item, else is merchant slot
|
||||
/*028*/ uint32 unknown028; //0
|
||||
/*032*/ uint32 last_cast_time; // Unix Time from PP of last cast for this recast type if recast delay > 0
|
||||
/*036*/ uint32 charges; //Total Charges an item has (-1 for unlimited)
|
||||
/*040*/ uint32 inst_nodrop; // 1 if the item is no drop (attuned items)
|
||||
/*044*/ uint32 unknown044; //0
|
||||
/*048*/ uint32 unknown048; //0
|
||||
/*052*/ uint32 unknown052; //0
|
||||
/*056*/ uint8 isEvolving; //0 // If 1 Add evolving item data in between Header and HeaderFinish
|
||||
};
|
||||
|
||||
struct EvolvingItem {
|
||||
uint8 unknown001;
|
||||
uint8 unknown002;
|
||||
uint8 unknown003;
|
||||
uint8 unknown004;
|
||||
int32 evoLevel;
|
||||
double progress;
|
||||
uint8 Activated;
|
||||
int32 evomaxlevel;
|
||||
uint8 unknown02[4];
|
||||
};
|
||||
|
||||
struct ItemSerializationHeaderFinish
|
||||
{
|
||||
uint16 ornamentIcon;
|
||||
/*060*/ uint8 unknown060; //0
|
||||
/*061*/ uint8 unknown061; //0 -
|
||||
/*062*/ uint8 isCopied; // New to Underfoot // Copied flag on item
|
||||
/*063*/ uint8 ItemClass; //0, 1, or 2
|
||||
};
|
||||
|
||||
struct ItemBodyStruct
|
||||
@@ -4161,10 +4271,10 @@ struct ItemQuaternaryBodyStruct
|
||||
|
||||
struct AugmentInfo_Struct
|
||||
{
|
||||
/*000*/ uint32 itemid; // id of the solvent needed
|
||||
/*004*/ uint8 window; // window to display the information in
|
||||
/*005*/ uint8 unknown005[71]; // total packet length 76, all the rest were always 00
|
||||
/*076*/
|
||||
/*000*/ uint32 itemid; // id of the solvent needed
|
||||
/*004*/ uint32 window; // window to display the information in
|
||||
/*008*/ char augment_info[64]; // total packet length 76, all the rest were always 00
|
||||
/*072*/ uint32 unknown072;
|
||||
};
|
||||
|
||||
struct VeteranRewardItem
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __random_h__
|
||||
#define __random_h__
|
||||
|
||||
#include <random>
|
||||
#include <utility>
|
||||
|
||||
/* This uses mt19937 seeded with the std::random_device
|
||||
* The idea is to have this be included as a member of another class
|
||||
* so mocking out for testing is easier
|
||||
* If you need to reseed random.Reseed()
|
||||
* Eventually this should be derived from an abstract base class
|
||||
*/
|
||||
|
||||
namespace EQEmu {
|
||||
class Random {
|
||||
public:
|
||||
// AKA old MakeRandomInt
|
||||
const int Int(int low, int high)
|
||||
{
|
||||
if (low > high)
|
||||
std::swap(low, high);
|
||||
return std::uniform_int_distribution<int>(low, high)(m_gen); // [low, high]
|
||||
}
|
||||
|
||||
// AKA old MakeRandomFloat
|
||||
const double Real(double low, double high)
|
||||
{
|
||||
if (low > high)
|
||||
std::swap(low, high);
|
||||
return std::uniform_real_distribution<double>(low, high)(m_gen); // [low, high)
|
||||
}
|
||||
|
||||
// example Roll(50) would have a 50% success rate
|
||||
// Roll(100) 100%, etc
|
||||
// valid values 0-100 (well, higher works too but ...)
|
||||
const bool Roll(const int required)
|
||||
{
|
||||
return Int(0, 99) < required;
|
||||
}
|
||||
|
||||
// valid values 0.0 - 1.0
|
||||
const bool Roll(const double required)
|
||||
{
|
||||
return Real(0.0, 1.0) <= required;
|
||||
}
|
||||
|
||||
void Reseed()
|
||||
{
|
||||
// We could do the seed_seq thing here too if we need better seeding
|
||||
// but that is mostly overkill for us, so just seed once
|
||||
std::random_device rd;
|
||||
m_gen.seed(rd());
|
||||
}
|
||||
|
||||
Random()
|
||||
{
|
||||
Reseed();
|
||||
}
|
||||
|
||||
private:
|
||||
std::mt19937 m_gen;
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* !__random_h__ */
|
||||
|
||||
+13
-4
@@ -100,6 +100,7 @@ RULE_BOOL ( Character, KeepLevelOverMax, false) // Don't delevel a character tha
|
||||
RULE_INT ( Character, FoodLossPerUpdate, 35) // How much food/water you lose per stamina update
|
||||
RULE_INT ( Character, BaseInstrumentSoftCap, 36) // Softcap for instrument mods, 36 commonly referred to as "3.6" as well.
|
||||
RULE_INT ( Character, BaseRunSpeedCap, 158) // Base Run Speed Cap, on live it's 158% which will give you a runspeed of 1.580 hard capped to 225.
|
||||
RULE_INT ( Character, OrnamentationAugmentType, 20) //Ornamentation Augment Type
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY( Mercs )
|
||||
@@ -123,7 +124,6 @@ RULE_INT ( Guild, PlayerCreationLimit, 1) // Only allow use of the UF+ window i
|
||||
RULE_INT ( Guild, PlayerCreationRequiredStatus, 0) // Required admin status.
|
||||
RULE_INT ( Guild, PlayerCreationRequiredLevel, 0) // Required Level of the player attempting to create the guild.
|
||||
RULE_INT ( Guild, PlayerCreationRequiredTime, 0) // Required Time Entitled On Account (in Minutes) to create the guild.
|
||||
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY( Skills )
|
||||
@@ -201,6 +201,8 @@ RULE_INT ( Zone, EbonCrystalItemID, 40902)
|
||||
RULE_INT ( Zone, RadiantCrystalItemID, 40903)
|
||||
RULE_BOOL ( Zone, LevelBasedEXPMods, false) // Allows you to use the level_exp_mods table in consideration to your players EXP hits
|
||||
RULE_INT ( Zone, WeatherTimer, 600) // Weather timer when no duration is available
|
||||
RULE_BOOL ( Zone, EnableLoggedOffReplenishments, true)
|
||||
RULE_INT ( Zone, MinOfflineTimeToReplenishments, 21600) // 21600 seconds is 6 Hours
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY( Map )
|
||||
@@ -245,7 +247,6 @@ RULE_INT ( Pathing, CullNodesFromStart, 1) // Checks LOS from Start point to se
|
||||
RULE_INT ( Pathing, CullNodesFromEnd, 1) // Checks LOS from End point to second to last node for this many nodes and removes last node if there is LOS
|
||||
RULE_REAL ( Pathing, CandidateNodeRangeXY, 400) // When searching for path start/end nodes, only nodes within this range will be considered.
|
||||
RULE_REAL ( Pathing, CandidateNodeRangeZ, 10) // When searching for path start/end nodes, only nodes within this range will be considered.
|
||||
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY( Watermap )
|
||||
@@ -322,7 +323,8 @@ RULE_INT ( Spells, AI_IdleNoSpellMinRecast, 500) // AI spell recast time(MS) che
|
||||
RULE_INT ( Spells, AI_IdleNoSpellMaxRecast, 2000) // AI spell recast time(MS) check when no spell is cast while chasing target. (max time in random)
|
||||
RULE_INT ( Spells, AI_IdleBeneficialChance, 100) // Chance while idle to do a beneficial spell on self or others.
|
||||
RULE_BOOL ( Spells, SHDProcIDOffByOne, true) // pre June 2009 SHD spell procs were off by 1, they stopped doing this in June 2009 (so UF+ spell files need this false)
|
||||
|
||||
RULE_BOOL ( Spells, Jun182014HundredHandsRevamp, false) // this should be true for if you import a spell file newer than June 18, 2014
|
||||
RULE_BOOL ( Spells, SwarmPetTargetLock, false) // Use old method of swarm pets target locking till target dies then despawning.
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY( Combat )
|
||||
@@ -417,6 +419,7 @@ RULE_INT ( Combat, ArcheryBonusChance, 50)
|
||||
RULE_INT ( Combat, BerserkerFrenzyStart, 35)
|
||||
RULE_INT ( Combat, BerserkerFrenzyEnd, 45)
|
||||
RULE_BOOL ( Combat, OneProcPerWeapon, true) //If enabled, One proc per weapon per round
|
||||
RULE_BOOL ( Combat, ProjectileDmgOnImpact, true) //If enabled, projectiles (ie arrows) will hit on impact, instead of instantly.
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY( NPC )
|
||||
@@ -435,6 +438,7 @@ RULE_BOOL ( NPC, SmartLastFightingDelayMoving, true)
|
||||
RULE_BOOL ( NPC, ReturnNonQuestNoDropItems, false) // Returns NO DROP items on NPCs that don't have an EVENT_TRADE sub in their script
|
||||
RULE_INT ( NPC, StartEnrageValue, 9) // % HP that an NPC will begin to enrage
|
||||
RULE_BOOL ( NPC, LiveLikeEnrage, false) // If set to true then only player controlled pets will enrage
|
||||
RULE_BOOL ( NPC, EnableMeritBasedFaction, false) // If set to true, faction will given in the same way as experience (solo/group/raid)
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY ( Aggro )
|
||||
@@ -502,7 +506,6 @@ RULE_INT ( Merchant, PricePenaltyPct, 4) // Determines maximum price penalty fro
|
||||
RULE_REAL( Merchant, ChaBonusMod, 3.45) // Determines CHA cap, from 104 CHA. 3.45 is 132 CHA at apprehensive. 0.34 is 400 CHA at apprehensive.
|
||||
RULE_REAL ( Merchant, ChaPenaltyMod, 1.52) // Determines CHA bottom, up to 102 CHA. 1.52 is 37 CHA at apprehensive. 0.98 is 0 CHA at apprehensive.
|
||||
RULE_BOOL ( Merchant, EnableAltCurrencySell, true) // Enables the ability to resell items to alternate currency merchants
|
||||
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY ( Bazaar )
|
||||
@@ -584,6 +587,12 @@ RULE_CATEGORY( Inventory )
|
||||
RULE_BOOL ( Inventory, EnforceAugmentRestriction, true) // Forces augment slot restrictions
|
||||
RULE_BOOL ( Inventory, EnforceAugmentUsability, true) // Forces augmented item usability
|
||||
RULE_BOOL ( Inventory, EnforceAugmentWear, true) // Forces augment wear slot validation
|
||||
RULE_BOOL ( Inventory, DeleteTransformationMold, true) //False if you want mold to last forever
|
||||
RULE_BOOL ( Inventory, AllowAnyWeaponTransformation, false) //Weapons can use any weapon transformation
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY( Client )
|
||||
RULE_BOOL( Client, UseLiveFactionMessage, false) // Allows players to see faction adjustments like Live
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
#undef RULE_CATEGORY
|
||||
|
||||
+25
-6
@@ -104,6 +104,7 @@
|
||||
#define ServerOP_GroupFollow 0x0110
|
||||
#define ServerOP_GroupFollowAck 0x0111
|
||||
#define ServerOP_GroupCancelInvite 0x0112
|
||||
#define ServerOP_RaidMOTD 0x0113
|
||||
|
||||
#define ServerOP_InstanceUpdateTime 0x014F
|
||||
#define ServerOP_AdventureRequest 0x0150
|
||||
@@ -180,13 +181,15 @@
|
||||
#define ServerOP_CZMessagePlayer 0x4008
|
||||
#define ServerOP_ReloadWorld 0x4009
|
||||
|
||||
#define ServerOP_QSPlayerLogTrades 0x4010
|
||||
#define ServerOP_QSPlayerLogHandins 0x4011
|
||||
#define ServerOP_QSPlayerLogNPCKills 0x4012
|
||||
#define ServerOP_QSPlayerLogDeletes 0x4013
|
||||
#define ServerOP_QSPlayerLogMoves 0x4014
|
||||
#define ServerOP_QSPlayerLogTrades 0x4010
|
||||
#define ServerOP_QSPlayerLogHandins 0x4011
|
||||
#define ServerOP_QSPlayerLogNPCKills 0x4012
|
||||
#define ServerOP_QSPlayerLogDeletes 0x4013
|
||||
#define ServerOP_QSPlayerLogMoves 0x4014
|
||||
#define ServerOP_QSPlayerLogMerchantTransactions 0x4015
|
||||
#define ServerOP_QSSendQuery 0x4016
|
||||
#define ServerOP_QSSendQuery 0x4016
|
||||
#define ServerOP_CZSignalNPC 0x4017
|
||||
#define ServerOP_CZSetEntityVariableByNPCTypeID 0x4018
|
||||
|
||||
/* Query Serv Generic Packet Flag/Type Enumeration */
|
||||
enum { QSG_LFGuild = 0 };
|
||||
@@ -852,6 +855,11 @@ struct ServerRaidMessage_Struct {
|
||||
char message[0];
|
||||
};
|
||||
|
||||
struct ServerRaidMOTD_Struct {
|
||||
uint32 rid;
|
||||
char motd[0];
|
||||
};
|
||||
|
||||
struct ServerLFGMatchesRequest_Struct {
|
||||
uint32 FromID;
|
||||
uint8 QuerierLevel;
|
||||
@@ -1094,6 +1102,11 @@ struct CZClientSignal_Struct {
|
||||
uint32 data;
|
||||
};
|
||||
|
||||
struct CZNPCSignal_Struct {
|
||||
uint32 npctype_id;
|
||||
uint32 data;
|
||||
};
|
||||
|
||||
struct CZClientSignalByName_Struct {
|
||||
char Name[64];
|
||||
uint32 data;
|
||||
@@ -1235,6 +1248,12 @@ struct CZMessagePlayer_Struct {
|
||||
char Message[512];
|
||||
};
|
||||
|
||||
struct CZSetEntVarByNPCTypeID_Struct {
|
||||
uint32 npctype_id;
|
||||
char id[256];
|
||||
char m_var[256];
|
||||
};
|
||||
|
||||
struct ReloadWorld_Struct{
|
||||
uint32 Option;
|
||||
};
|
||||
|
||||
+1222
-1451
File diff suppressed because it is too large
Load Diff
+6
-6
@@ -40,13 +40,9 @@ public:
|
||||
bool SetGMSpeed(uint32 account_id, uint8 gmspeed);
|
||||
uint8 GetGMSpeed(uint32 account_id);
|
||||
bool SetHideMe(uint32 account_id, uint8 hideme);
|
||||
bool GetPlayerProfile(uint32 account_id, char* name, PlayerProfile_Struct* pp, Inventory* inv, ExtendedProfile_Struct *ext, char* current_zone = 0, uint32 *current_instance = 0);
|
||||
bool SetPlayerProfile(uint32 account_id, uint32 charid, PlayerProfile_Struct* pp, Inventory* inv, ExtendedProfile_Struct *ext, uint32 current_zone, uint32 current_instance, uint8 MaxXTargets);
|
||||
uint32 SetPlayerProfile_MQ(char** query, uint32 account_id, uint32 charid, PlayerProfile_Struct* pp, Inventory* inv, ExtendedProfile_Struct *ext, uint32 current_zone, uint32 current_instance, uint8 MaxXTargets);
|
||||
int32 DeleteStalePlayerCorpses();
|
||||
int32 DeleteStalePlayerBackups();
|
||||
void GetPlayerInspectMessage(char* playername, InspectMessage_Struct* message);
|
||||
void SetPlayerInspectMessage(char* playername, const InspectMessage_Struct* message);
|
||||
void LoadCharacterInspectMessage(uint32 character_id, InspectMessage_Struct* message);
|
||||
void SaveCharacterInspectMessage(uint32 character_id, const InspectMessage_Struct* message);
|
||||
void GetBotInspectMessage(uint32 botid, InspectMessage_Struct* message);
|
||||
void SetBotInspectMessage(uint32 botid, const InspectMessage_Struct* message);
|
||||
bool GetCommandSettings(std::map<std::string,uint8> &commands);
|
||||
@@ -57,6 +53,10 @@ public:
|
||||
*/
|
||||
bool SaveCursor(uint32 char_id, std::list<ItemInst*>::const_iterator &start, std::list<ItemInst*>::const_iterator &end);
|
||||
bool SaveInventory(uint32 char_id, const ItemInst* inst, int16 slot_id);
|
||||
bool DeleteSharedBankSlot(uint32 char_id, int16 slot_id);
|
||||
bool DeleteInventorySlot(uint32 char_id, int16 slot_id);
|
||||
bool UpdateInventorySlot(uint32 char_id, const ItemInst* inst, int16 slot_id);
|
||||
bool UpdateSharedBankSlot(uint32 char_id, const ItemInst* inst, int16 slot_id);
|
||||
bool VerifyInventory(uint32 account_id, int16 slot_id, const ItemInst* inst);
|
||||
bool GetSharedBank(uint32 id, Inventory* inv, bool is_charid);
|
||||
int32 GetSharedPlatinum(uint32 account_id);
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include "types.h"
|
||||
#include "skills.h"
|
||||
|
||||
bool EQEmu::IsTradeskill(SkillUseTypes skill)
|
||||
{
|
||||
switch (skill) {
|
||||
case SkillFishing:
|
||||
case SkillMakePoison:
|
||||
case SkillTinkering:
|
||||
case SkillResearch:
|
||||
case SkillAlchemy:
|
||||
case SkillBaking:
|
||||
case SkillTailoring:
|
||||
case SkillBlacksmithing:
|
||||
case SkillFletching:
|
||||
case SkillBrewing:
|
||||
case SkillPottery:
|
||||
case SkillJewelryMaking:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool EQEmu::IsSpecializedSkill(SkillUseTypes skill)
|
||||
{
|
||||
// this could be a simple if, but if this is more portable if any IDs change (probably won't)
|
||||
// or any other specialized are added (also unlikely)
|
||||
switch (skill) {
|
||||
case SkillSpecializeAbjure:
|
||||
case SkillSpecializeAlteration:
|
||||
case SkillSpecializeConjuration:
|
||||
case SkillSpecializeDivination:
|
||||
case SkillSpecializeEvocation:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
+13
-3
@@ -30,7 +30,7 @@
|
||||
**
|
||||
** (ref: eqstr_us.txt [05-10-2013])
|
||||
*/
|
||||
enum SkillUseTypes : uint32
|
||||
enum SkillUseTypes
|
||||
{
|
||||
/*13855*/ Skill1HBlunt = 0,
|
||||
/*13856*/ Skill1HSlashing,
|
||||
@@ -108,6 +108,7 @@ enum SkillUseTypes : uint32
|
||||
/*13869*/ SkillBerserking,
|
||||
/*13902*/ SkillTaunt,
|
||||
/*05837*/ SkillFrenzy, // This appears to be the only listed one not grouped with the others
|
||||
/*00000*/ _EmuSkillCount // move to last position of active enumeration labels
|
||||
|
||||
// SoF+ specific skills
|
||||
// /*03670*/ SkillRemoveTraps,
|
||||
@@ -124,7 +125,6 @@ enum SkillUseTypes : uint32
|
||||
|
||||
// Support values
|
||||
// /*-----*/ _SkillServerArraySize = _SkillCount_RoF2, // Should reflect last client '_SkillCount'
|
||||
/*-----*/ _SkillPacketArraySize = 100, // Currently supported clients appear to iterate full 100 dword buffer range
|
||||
|
||||
// Superfluous additions to SkillUseTypes..server-use only
|
||||
// /*-----*/ ExtSkillGenericTradeskill = 100
|
||||
@@ -152,7 +152,7 @@ enum SkillUseTypes : uint32
|
||||
NOTE: Disregard this until it is sorted out
|
||||
|
||||
I changed (tradeskill==75) to ExtSkillGenericTradeskill in tradeskills.cpp for both instances. If it's a pseudo-enumeration of
|
||||
an AA ability, then use the 'ExtSkill' ('ExtentedSkill') prefix with a value >= 100. (current implementation)
|
||||
an AA ability, then use the 'ExtSkill' ('ExtendedSkill') prefix with a value >= 100. (current implementation)
|
||||
|
||||
We probably need to recode ALL of the skill checks to use the new Skill2HPiercing and ensure that the animation value is
|
||||
properly changed in the patch files. As far as earlier clients using this new skill, it can be done, but we just need to ensure
|
||||
@@ -163,6 +163,7 @@ enum SkillUseTypes : uint32
|
||||
|
||||
In addition to the above re-coding, we're probably going to need to rework the database pp blob to reserve space for the current
|
||||
100-dword buffer allocation. This way, we can just add new ones without having to rework it each time.
|
||||
(Wasn't done for this in particular..but, thanks Akkadius!)
|
||||
|
||||
-U
|
||||
*/
|
||||
@@ -171,6 +172,9 @@ enum SkillUseTypes : uint32
|
||||
// temporary until it can be sorted out...
|
||||
#define HIGHEST_SKILL SkillFrenzy
|
||||
|
||||
// server profile does not reflect this yet..so, prefixed with 'PACKET_'
|
||||
#define PACKET_SKILL_ARRAY_SIZE 100
|
||||
|
||||
// TODO: add string return for skill names
|
||||
|
||||
/*
|
||||
@@ -260,4 +264,10 @@ typedef enum {
|
||||
#define HIGHEST_SKILL FRENZY
|
||||
*/
|
||||
|
||||
// for skill related helper functions
|
||||
namespace EQEmu {
|
||||
bool IsTradeskill(SkillUseTypes skill);
|
||||
bool IsSpecializedSkill(SkillUseTypes skill);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+18
-7
@@ -119,7 +119,7 @@ typedef enum {
|
||||
/* 29 */ // NOT USED
|
||||
/* 30 */ // NOT USED
|
||||
/* 31 */ // NOT USED
|
||||
/* 32 */ ST_AECaster2 = 0x20, //ae caster hatelist maybe?
|
||||
/* 32 */ ST_AETargetHateList = 0x20,
|
||||
/* 33 */ ST_HateList = 0x21,
|
||||
/* 34 */ ST_LDoNChest_Cursed = 0x22,
|
||||
/* 35 */ ST_Muramite = 0x23, //only works on special muramites
|
||||
@@ -131,10 +131,13 @@ typedef enum {
|
||||
/* 41 */ ST_Group = 0x29,
|
||||
/* 42 */ ST_Directional = 0x2a, //ae around this target between two angles
|
||||
/* 43 */ ST_GroupClientAndPet = 0x2b,
|
||||
/* 44 */ //ST_Beam = 0x2c, //like directional but facing in front of you always
|
||||
/* 45 */ //ST_Ring = 0x2d, // Like a mix of PB ae + rain spell(has ae duration)
|
||||
/* 44 */ ST_Beam = 0x2c,
|
||||
/* 45 */ ST_Ring = 0x2d,
|
||||
/* 46 */ ST_TargetsTarget = 0x2e, // uses the target of your target
|
||||
/* 47 */ ST_PetMaster = 0x2f, // uses the master as target
|
||||
/* 48 */ // UNKNOWN
|
||||
/* 49 */ // NOT USED
|
||||
/* 50 */ ST_TargetAENoPlayersPets = 0x32,
|
||||
} SpellTargetType;
|
||||
|
||||
typedef enum {
|
||||
@@ -673,7 +676,7 @@ struct SPDat_Spell_Struct
|
||||
/* 122 */ //uint32 TravelType;
|
||||
/* 123 */ uint16 SpellAffectIndex;
|
||||
/* 124 */ int8 disallow_sit; // 124: high-end Yaulp spells (V, VI, VII, VIII [Rk 1, 2, & 3], & Gallenite's Bark of Fury
|
||||
/* 125 */ // 125: Words of the Skeptic
|
||||
/* 125 */ int8 diety_agnostic;// 125: Words of the Skeptic
|
||||
/* 126 */ int8 deities[16]; // Deity check. 201 - 216 per http://www.eqemulator.net/wiki/wikka.php?wakka=DeityList
|
||||
// -1: Restrict to Deity; 1: Restrict to Deity, but only used on non-Live (Test Server "Blessing of ...") spells; 0: Don't restrict
|
||||
/* 142 */ // 142: between 0 & 100
|
||||
@@ -697,6 +700,7 @@ struct SPDat_Spell_Struct
|
||||
/* 162 */ int bonushate;
|
||||
/* 163 */
|
||||
/* 164 */ // for most spells this appears to mimic ResistDiff
|
||||
/* 165 */ bool ldon_trap; //Flag found on all LDON trap / chest related spells.
|
||||
/* 166 */ int EndurCost;
|
||||
/* 167 */ int8 EndurTimerIndex;
|
||||
/* 168 */ bool IsDisciplineBuff; //Will goto the combat window when cast
|
||||
@@ -709,9 +713,14 @@ struct SPDat_Spell_Struct
|
||||
/* 178 */ int pvpresistcalc;
|
||||
/* 179 */ int pvpresistcap;
|
||||
/* 180 */ int spell_category;
|
||||
/* 181 */
|
||||
/* 181 */ //unknown - likely buff duration related
|
||||
/* 182 */ //unknown - likely buff duration related
|
||||
/* 183 */
|
||||
/* 184 */
|
||||
/* 185 */ int8 can_mgb; // 0=no, -1 or 1 = yes
|
||||
/* 186 */ int dispel_flag;
|
||||
/* 187 */ //int npc_category;
|
||||
/* 188 */ //int npc_usefulness;
|
||||
/* 189 */ int MinResist;
|
||||
/* 190 */ int MaxResist;
|
||||
/* 191 */ uint8 viral_targets;
|
||||
@@ -719,14 +728,16 @@ struct SPDat_Spell_Struct
|
||||
/* 193 */ int NimbusEffect;
|
||||
/* 194 */ float directional_start; //Cone Start Angle:
|
||||
/* 195 */ float directional_end; // Cone End Angle:
|
||||
/* 196 */
|
||||
/* 196 */ bool sneak; // effect can only be used if sneaking (rogue 'Daggerfall' ect)
|
||||
/* 197 */ bool not_extendable;
|
||||
/* 198- 199 */
|
||||
/* 200 */ bool suspendable; // buff is suspended in suspended buff zones
|
||||
/* 201 */ int viral_range;
|
||||
/* 202 */
|
||||
/* 203 */ //int songcap; // individual song cap (how live currently does it, not implemented)
|
||||
/* 204 - 206 */
|
||||
/* 204 */
|
||||
/* 205 */ bool no_block;
|
||||
/* 206 */
|
||||
/* 207 */ int spellgroup;
|
||||
/* 208 */ int rank; //increments AA effects with same name
|
||||
/* 209 */ int powerful_flag; // Need more investigation to figure out what to call this, for now we know -1 makes charm spells not break before their duration is complete, it does alot more though
|
||||
|
||||
@@ -17,6 +17,11 @@ StructStrategy::StructStrategy() {
|
||||
}
|
||||
|
||||
void StructStrategy::Encode(EQApplicationPacket **p, EQStream *dest, bool ack_req) const {
|
||||
if((*p)->GetOpcodeBypass() != 0) {
|
||||
PassEncoder(p, dest, ack_req);
|
||||
return;
|
||||
}
|
||||
|
||||
EmuOpcode op = (*p)->GetOpcode();
|
||||
Encoder proc = encoders[op];
|
||||
proc(p, dest, ack_req);
|
||||
|
||||
@@ -18,9 +18,6 @@
|
||||
#ifndef _WINDOWS
|
||||
#ifndef __UNIX_H__
|
||||
#define __UNIX_H__
|
||||
#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
|
||||
#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP {0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, __LOCK_INITIALIZER}
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
|
||||
typedef int SOCKET;
|
||||
|
||||
@@ -23,6 +23,14 @@
|
||||
#define EQEMU_PROTOCOL_VERSION "0.3.10"
|
||||
|
||||
#define CURRENT_VERSION "1.0.0"
|
||||
|
||||
/*
|
||||
Everytime a Database SQL is added to Github,
|
||||
increment CURRENT_BINARY_DATABASE_VERSION number and make sure you update the manifest
|
||||
Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
||||
*/
|
||||
|
||||
#define CURRENT_BINARY_DATABASE_VERSION 9059
|
||||
#define COMPILE_DATE __DATE__
|
||||
#define COMPILE_TIME __TIME__
|
||||
#ifndef WIN32
|
||||
|
||||
@@ -389,7 +389,7 @@ void Client::GenerateKey()
|
||||
'6', '7', '8', '9'
|
||||
};
|
||||
|
||||
key.append((const char*)&key_selection[MakeRandomInt(0, 35)], 1);
|
||||
key.append((const char*)&key_selection[random.Int(0, 35)], 1);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "../common/opcodemgr.h"
|
||||
#include "../common/eq_stream_type.h"
|
||||
#include "../common/eq_stream_factory.h"
|
||||
#include "../common/random.h"
|
||||
#ifndef WIN32
|
||||
#include "eq_crypto_api.h"
|
||||
#endif
|
||||
@@ -129,6 +130,8 @@ public:
|
||||
* Gets the connection for this client.
|
||||
*/
|
||||
EQStream *GetConnection() { return connection; }
|
||||
|
||||
EQEmu::Random random;
|
||||
private:
|
||||
EQStream *connection;
|
||||
ClientVersion version;
|
||||
|
||||
@@ -21,7 +21,7 @@ SET(lb_sources
|
||||
)
|
||||
|
||||
SET(lb_headers
|
||||
|
||||
|
||||
)
|
||||
|
||||
ADD_LIBRARY(luabind ${lb_sources} ${lb_headers})
|
||||
@@ -29,6 +29,11 @@ ADD_LIBRARY(luabind ${lb_sources} ${lb_headers})
|
||||
|
||||
IF(UNIX)
|
||||
ADD_DEFINITIONS(-fPIC)
|
||||
set_source_files_properties(${lb_sources} PROPERTY COMPILE_FLAGS -Wno-deprecated-declarations)
|
||||
ENDIF(UNIX)
|
||||
|
||||
IF(MSVC)
|
||||
set_source_files_properties(${lb_sources} PROPERTY COMPILE_FLAGS " /W0 " )
|
||||
ENDIF(MSVC)
|
||||
|
||||
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <luabind/config.hpp>
|
||||
#include <luabind/detail/instance_holder.hpp>
|
||||
#include <luabind/detail/ref.hpp>
|
||||
#include <cstdlib>
|
||||
|
||||
namespace luabind { namespace detail
|
||||
{
|
||||
|
||||
+10
-11
@@ -349,17 +349,16 @@ void Database::GeneralQueryReceive(ServerPacket *pack) {
|
||||
/*
|
||||
These are general queries passed from anywhere in zone instead of packing structures and breaking them down again and again
|
||||
*/
|
||||
char *Query = nullptr;
|
||||
Query = new char[pack->ReadUInt32() + 1];
|
||||
pack->ReadString(Query);
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char* query = 0;
|
||||
uint32 lastid = 0;
|
||||
if (!RunQuery(query, MakeAnyLenString(&query, Query), errbuf, 0, 0, &lastid)) {
|
||||
_log(QUERYSERV__ERROR, "Failed Delete Log Record Insert: %s", errbuf);
|
||||
_log(QUERYSERV__ERROR, "%s", query);
|
||||
char *queryBuffer = new char[pack->ReadUInt32() + 1];
|
||||
pack->ReadString(queryBuffer);
|
||||
|
||||
std::string query(queryBuffer);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
_log(QUERYSERV__ERROR, "Failed Delete Log Record Insert: %s", results.ErrorMessage().c_str());
|
||||
_log(QUERYSERV__ERROR, "%s", query.c_str());
|
||||
}
|
||||
safe_delete_array(query);
|
||||
|
||||
safe_delete(pack);
|
||||
safe_delete(Query);
|
||||
safe_delete(queryBuffer);
|
||||
}
|
||||
|
||||
@@ -8,18 +8,22 @@ SET(tests_sources
|
||||
|
||||
SET(tests_headers
|
||||
atobool_test.h
|
||||
data_verification_test.h
|
||||
fixed_memory_test.h
|
||||
fixed_memory_variable_test.h
|
||||
hextoi_32_64_test.h
|
||||
ipc_mutex_test.h
|
||||
memory_mapped_file_test.h
|
||||
string_util_test.h
|
||||
skills_util_test.h
|
||||
)
|
||||
|
||||
ADD_EXECUTABLE(tests ${tests_sources} ${tests_headers})
|
||||
|
||||
TARGET_LINK_LIBRARIES(tests common cppunit)
|
||||
|
||||
INSTALL(TARGETS tests RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
|
||||
IF(MSVC)
|
||||
SET_TARGET_PROPERTIES(tests PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF")
|
||||
TARGET_LINK_LIBRARIES(tests "Ws2_32.lib")
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __EQEMU_TESTS_DATA_VERIFICATION_H
|
||||
#define __EQEMU_TESTS_DATA_VERIFICATION_H
|
||||
|
||||
#include "cppunit/cpptest.h"
|
||||
#include "../common/data_verification.h"
|
||||
|
||||
class DataVerificationTest : public Test::Suite {
|
||||
typedef void(DataVerificationTest::*TestFunction)(void);
|
||||
public:
|
||||
DataVerificationTest() {
|
||||
TEST_ADD(DataVerificationTest::Clamp);
|
||||
TEST_ADD(DataVerificationTest::ClampUpper);
|
||||
TEST_ADD(DataVerificationTest::ClampLower);
|
||||
TEST_ADD(DataVerificationTest::ValueWithin);
|
||||
}
|
||||
|
||||
~DataVerificationTest() {
|
||||
}
|
||||
|
||||
private:
|
||||
void Clamp() {
|
||||
float value_f = 500.0f;
|
||||
int value_i = 500;
|
||||
|
||||
float vf1 = EQEmu::Clamp(value_f, 0.0f, 1000.0f);
|
||||
float vf2 = EQEmu::Clamp(value_f, 0.0f, 250.0f);
|
||||
float vf3 = EQEmu::Clamp(value_f, 750.0f, 1000.0f);
|
||||
|
||||
int vi1 = EQEmu::Clamp(value_i, 0, 1000);
|
||||
int vi2 = EQEmu::Clamp(value_i, 0, 250);
|
||||
int vi3 = EQEmu::Clamp(value_i, 750, 1000);
|
||||
|
||||
TEST_ASSERT_EQUALS(vf1, 500.0f);
|
||||
TEST_ASSERT_EQUALS(vf2, 250.0f);
|
||||
TEST_ASSERT_EQUALS(vf3, 750.0f);
|
||||
|
||||
TEST_ASSERT_EQUALS(vi1, 500);
|
||||
TEST_ASSERT_EQUALS(vi2, 250);
|
||||
TEST_ASSERT_EQUALS(vi3, 750);
|
||||
}
|
||||
|
||||
void ClampUpper() {
|
||||
float value_f = 500.0f;
|
||||
int value_i = 500;
|
||||
|
||||
float vf1 = EQEmu::ClampUpper(value_f, 1000.0f);
|
||||
float vf2 = EQEmu::ClampUpper(value_f, 250.0f);
|
||||
|
||||
int vi1 = EQEmu::ClampUpper(value_i, 1000);
|
||||
int vi2 = EQEmu::ClampUpper(value_i, 250);
|
||||
|
||||
TEST_ASSERT_EQUALS(vf1, 500.0f);
|
||||
TEST_ASSERT_EQUALS(vf2, 250.0f);
|
||||
|
||||
TEST_ASSERT_EQUALS(vi1, 500);
|
||||
TEST_ASSERT_EQUALS(vi2, 250);
|
||||
}
|
||||
|
||||
void ClampLower() {
|
||||
float value_f = 500.0f;
|
||||
int value_i = 500;
|
||||
|
||||
float vf1 = EQEmu::ClampLower(value_f, 0.0f);
|
||||
float vf2 = EQEmu::ClampLower(value_f, 750.0f);
|
||||
|
||||
int vi1 = EQEmu::ClampLower(value_i, 0);
|
||||
int vi2 = EQEmu::ClampLower(value_i, 750);
|
||||
|
||||
TEST_ASSERT_EQUALS(vf1, 500.0f);
|
||||
TEST_ASSERT_EQUALS(vf2, 750.0f);
|
||||
|
||||
TEST_ASSERT_EQUALS(vi1, 500);
|
||||
TEST_ASSERT_EQUALS(vi2, 750);
|
||||
}
|
||||
|
||||
void ValueWithin() {
|
||||
float value_f = 500.0f;
|
||||
int value_i = 500;
|
||||
|
||||
TEST_ASSERT(EQEmu::ValueWithin(value_f, 0.0f, 1000.0f));
|
||||
TEST_ASSERT(!EQEmu::ValueWithin(value_f, 0.0f, 400.0f));
|
||||
TEST_ASSERT(!EQEmu::ValueWithin(value_f, 600.0f, 900.0f));
|
||||
|
||||
TEST_ASSERT(EQEmu::ValueWithin(value_i, 0, 1000));
|
||||
TEST_ASSERT(!EQEmu::ValueWithin(value_i, 0, 400));
|
||||
TEST_ASSERT(!EQEmu::ValueWithin(value_i, 600, 900));
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -27,6 +27,8 @@
|
||||
#include "atobool_test.h"
|
||||
#include "hextoi_32_64_test.h"
|
||||
#include "string_util_test.h"
|
||||
#include "data_verification_test.h"
|
||||
#include "skills_util_test.h"
|
||||
|
||||
int main() {
|
||||
try {
|
||||
@@ -40,6 +42,8 @@ int main() {
|
||||
tests.add(new atoboolTest());
|
||||
tests.add(new hextoi_32_64_Test());
|
||||
tests.add(new StringUtilTest());
|
||||
tests.add(new DataVerificationTest());
|
||||
tests.add(new SkillsUtilsTest());
|
||||
tests.run(*output, true);
|
||||
} catch(...) {
|
||||
return -1;
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __EQEMU_TESTS_SKILLS_UTILS_H
|
||||
#define __EQEMU_TESTS_SKILLS_UTILS_H
|
||||
|
||||
#include "cppunit/cpptest.h"
|
||||
#include "../common/skills.h"
|
||||
|
||||
class SkillsUtilsTest: public Test::Suite {
|
||||
typedef void(SkillsUtilsTest::*TestFunction)(void);
|
||||
public:
|
||||
SkillsUtilsTest() {
|
||||
TEST_ADD(SkillsUtilsTest::IsTradeskill);
|
||||
TEST_ADD(SkillsUtilsTest::IsSpecializedSkill);
|
||||
}
|
||||
|
||||
~SkillsUtilsTest() {
|
||||
}
|
||||
|
||||
private:
|
||||
void IsTradeskill() {
|
||||
TEST_ASSERT(EQEmu::IsTradeskill(SkillPottery));
|
||||
TEST_ASSERT(!EQEmu::IsTradeskill(SkillParry));
|
||||
}
|
||||
|
||||
void IsSpecializedSkill() {
|
||||
TEST_ASSERT(EQEmu::IsSpecializedSkill(SkillSpecializeConjuration));
|
||||
TEST_ASSERT(!EQEmu::IsSpecializedSkill(SkillConjuration))
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "../common/string_util.h"
|
||||
|
||||
class StringUtilTest : public Test::Suite {
|
||||
typedef void(IPCMutexTest::*TestFunction)(void);
|
||||
typedef void(StringUtilTest::*TestFunction)(void);
|
||||
public:
|
||||
StringUtilTest() {
|
||||
TEST_ADD(StringUtilTest::StringFormatTest);
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void StringFormatTest() {
|
||||
void StringFormatTest() {
|
||||
const char* fmt = "Test: %c %d %4.2f";
|
||||
char c = 'a';
|
||||
int i = 2014;
|
||||
|
||||
+6
-6
@@ -139,7 +139,7 @@ int Database::FindAccount(const char *characterName, Client *client) {
|
||||
|
||||
client->ClearCharacters();
|
||||
std::string query = StringFormat("SELECT `id`, `account_id`, `level` "
|
||||
"FROM `character_` WHERE `name` = '%s' LIMIT 1",
|
||||
"FROM `character_data` WHERE `name` = '%s' LIMIT 1",
|
||||
characterName);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
@@ -159,7 +159,7 @@ int Database::FindAccount(const char *characterName, Client *client) {
|
||||
|
||||
_log(UCS__TRACE, "Account ID for %s is %i", characterName, accountID);
|
||||
|
||||
query = StringFormat("SELECT `id`, `name`, `level` FROM `character_` "
|
||||
query = StringFormat("SELECT `id`, `name`, `level` FROM `character_data` "
|
||||
"WHERE `account_id` = %i AND `name` != '%s'",
|
||||
accountID, characterName);
|
||||
results = QueryDatabase(query);
|
||||
@@ -174,7 +174,7 @@ int Database::FindAccount(const char *characterName, Client *client) {
|
||||
|
||||
bool Database::VerifyMailKey(std::string characterName, int IPAddress, std::string MailKey) {
|
||||
|
||||
std::string query = StringFormat("SELECT `mailkey` FROM `character_` WHERE `name`='%s' LIMIT 1",
|
||||
std::string query = StringFormat("SELECT `mailkey` FROM `character_data` WHERE `name`='%s' LIMIT 1",
|
||||
characterName.c_str());
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
@@ -202,7 +202,7 @@ bool Database::VerifyMailKey(std::string characterName, int IPAddress, std::stri
|
||||
int Database::FindCharacter(const char *characterName) {
|
||||
|
||||
char *safeCharName = RemoveApostrophes(characterName);
|
||||
std::string query = StringFormat("SELECT `id` FROM `character_` WHERE `name`='%s' LIMIT 1", safeCharName);
|
||||
std::string query = StringFormat("SELECT `id` FROM `character_data` WHERE `name`='%s' LIMIT 1", safeCharName);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
_log(UCS__ERROR, "FindCharacter failed. %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
@@ -523,9 +523,9 @@ void Database::ExpireMail() {
|
||||
time(nullptr) - RuleI(Mail, ExpireTrash));
|
||||
results = QueryDatabase(query);
|
||||
if(results.Success())
|
||||
_log(UCS__ERROR, "Error expiring trash messages, %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
else
|
||||
_log(UCS__INIT, "Expired %i trash messages.", results.RowsAffected());
|
||||
else
|
||||
_log(UCS__ERROR, "Error expiring trash messages, %s %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ OP_Begging=0x13e7 # ShowEQ 10/27/05
|
||||
OP_InspectRequest=0x775d # ShowEQ 10/27/05
|
||||
OP_Action2=0x0000
|
||||
OP_BeginCast=0x3990 # ShowEQ 10/27/05
|
||||
OP_BuffFadeMsg=0x0b2d # ShowEQ 10/27/05
|
||||
OP_ColoredText=0x0b2d # ShowEQ 10/27/05
|
||||
OP_Consent=0x1081 # ShowEQ 10/27/05
|
||||
OP_LFGCommand=0x68ac # ShowEQ 10/27/05
|
||||
OP_LFGGetMatchesRequest=0x022f # ShowEQ 10/27/05
|
||||
|
||||
@@ -150,7 +150,7 @@ OP_InspectRequest=0x2403
|
||||
OP_Action2=0x0000 # ShowEQ 06/29/05
|
||||
OP_BeginCast=0x3990 # ShowEQ 06/29/05
|
||||
OP_WhoAllRequest=0x5cdd # ShowEQ 06/29/05
|
||||
OP_BuffFadeMsg=0x4bc6 # ShowEQ 06/29/05
|
||||
OP_ColoredText=0x4bc6 # ShowEQ 06/29/05
|
||||
OP_Consent=0x1081 # ShowEQ 06/29/05
|
||||
OP_LFGCommand=0x022f # ShowEQ 06/29/05
|
||||
OP_LFGGetMatchesRequest=0x6f82 # ShowEQ 06/29/05
|
||||
|
||||
@@ -94,6 +94,7 @@ OP_ClearBlockedBuffs=0x5d3c
|
||||
OP_WorldObjectsSent=0x7fa8
|
||||
OP_SendExpZonein=0x25ab
|
||||
OP_SendAATable=0x7791
|
||||
OP_ShroudClearAA=0x422e
|
||||
OP_RespondAA=0x379d
|
||||
OP_UpdateAA=0x504f
|
||||
OP_SendAAStats=0x3d1c
|
||||
@@ -166,7 +167,7 @@ OP_InspectRequest=0x23f1
|
||||
OP_InspectAnswer=0x5794
|
||||
OP_InspectMessageUpdate=0x3064
|
||||
OP_BeginCast=0x17ff
|
||||
OP_BuffFadeMsg=0x41cb
|
||||
OP_ColoredText=0x41cb
|
||||
OP_ConsentResponse=0x183d
|
||||
OP_MemorizeSpell=0x2fac
|
||||
OP_SwapSpell=0x4736
|
||||
@@ -289,8 +290,10 @@ OP_LeadershipExpToggle=0x3ea6
|
||||
OP_LeadershipExpUpdate=0x6922
|
||||
OP_PurchaseLeadershipAA=0x1962
|
||||
OP_UpdateLeadershipAA=0x56aa
|
||||
OP_MarkNPC=0x2d9f
|
||||
OP_MarkNPC=0x1a6c
|
||||
OP_MarkRaidNPC=0x2d9f #unimplemented
|
||||
OP_ClearNPCMarks=0x0d2d
|
||||
OP_ClearRaidNPCMarks=0x433a #unimplemented
|
||||
OP_DelegateAbility=0x7820
|
||||
OP_SetGroupTarget=0x118a
|
||||
OP_Charm=0x7118
|
||||
@@ -365,7 +368,7 @@ OP_DzLeaderStatus=0x4021
|
||||
OP_DzExpeditionEndsWarning=0x32eb
|
||||
OP_DzMemberList=0x348f
|
||||
OP_DzCompass=0x0e01 # Was 0x4f09
|
||||
OP_DzChooseZone=0x0000 # Maybe 0x29d6
|
||||
OP_DzChooseZone=0x6e5e # Maybe 0x29d6
|
||||
|
||||
# New Opcodes
|
||||
OP_SpawnPositionUpdate=0x0000 # Actually OP_MobUpdate ?
|
||||
@@ -498,6 +501,8 @@ OP_GroupRoles=0x047c
|
||||
OP_GroupMakeLeader=0x4129
|
||||
OP_DoGroupLeadershipAbility=0x17d7
|
||||
OP_GroupLeadershipAAUpdate=0x6567
|
||||
OP_GroupMentor=0x56DB
|
||||
OP_InspectBuffs=0x01f3
|
||||
|
||||
# LFG/LFP Opcodes
|
||||
OP_LFGCommand=0x4463
|
||||
@@ -510,8 +515,8 @@ OP_LFGAppearance=0x0000
|
||||
OP_LFGResponse=0x0000
|
||||
|
||||
# Raid Opcodes
|
||||
OP_RaidInvite=0x1bd1
|
||||
OP_RaidUpdate=0x548e
|
||||
OP_RaidInvite=0x5fb2
|
||||
OP_RaidUpdate=0x1bd1
|
||||
OP_RaidJoin=0x0000
|
||||
|
||||
# Button-push commands
|
||||
@@ -653,3 +658,5 @@ OP_RAWOutOfSession=0x0000
|
||||
# we need to document the differences between these packets to make identifying them easier
|
||||
OP_Some3ByteHPUpdate=0x0000 # initial HP update for mobs
|
||||
OP_InitialHPUpdate=0x0000
|
||||
|
||||
OP_ItemRecastDelay=0x57ed
|
||||
|
||||
@@ -0,0 +1,660 @@
|
||||
# ShowEQ Import Notes:
|
||||
# ZERO THE FILE first
|
||||
# perl -pi -e 's/0x[0-9a-fA-F]{4}/0x0000/g' opcodes.conf
|
||||
# Unknown Mapping:
|
||||
# OP_Action2 -> OP_Damage
|
||||
# OP_EnvDamage -> OP_Damage ---> might have been a one time mistake
|
||||
# Name Differences:
|
||||
# OP_CancelInvite -> OP_GroupCancelInvite
|
||||
# OP_GMFind -> OP_FindPersonRequest
|
||||
# OP_CommonMessage -> OP_ChannelMessage
|
||||
|
||||
OP_Unknown=0x0000
|
||||
OP_ExploreUnknown=0x0000 # used for unknown explorer
|
||||
|
||||
# world packets
|
||||
# Required to reach Char Select:
|
||||
OP_SendLoginInfo=0x7a09
|
||||
OP_ApproveWorld=0x7499
|
||||
OP_LogServer=0x7ceb
|
||||
OP_SendCharInfo=0x00d2
|
||||
OP_ExpansionInfo=0x590d
|
||||
OP_GuildsList=0x0000
|
||||
OP_EnterWorld=0x578f
|
||||
OP_PostEnterWorld=0x6259
|
||||
OP_World_Client_CRC1=0x12cc
|
||||
OP_World_Client_CRC2=0x0f13
|
||||
OP_SendSpellChecksum=0x0000
|
||||
OP_SendSkillCapsChecksum=0x0000
|
||||
|
||||
# Character Select Related:
|
||||
OP_SendMaxCharacters=0x5475
|
||||
OP_SendMembership=0x7acc
|
||||
OP_SendMembershipDetails=0x057b
|
||||
OP_CharacterCreateRequest=0x6773
|
||||
OP_CharacterCreate=0x6bbf
|
||||
OP_DeleteCharacter=0x1808
|
||||
OP_RandomNameGenerator=0x5954
|
||||
OP_ApproveName=0x56a2
|
||||
OP_MOTD=0x0c22
|
||||
OP_SetChatServer=0x1bc5
|
||||
OP_SetChatServer2=0x7eec
|
||||
OP_ZoneServerInfo=0x4c44
|
||||
OP_WorldComplete=0x4493
|
||||
OP_WorldUnknown001=0x2301
|
||||
OP_FloatListThing=0x46c6
|
||||
|
||||
# Reasons for Disconnect:
|
||||
OP_ZoneUnavail=0x4cb4
|
||||
OP_WorldClientReady=0x23c1
|
||||
OP_CharacterStillInZone=0x0000
|
||||
OP_WorldChecksumFailure=0x0000
|
||||
OP_WorldLoginFailed=0x0000
|
||||
OP_WorldLogout=0x0000
|
||||
OP_WorldLevelTooHigh=0x0000
|
||||
OP_CharInacessable=0x0000
|
||||
OP_UserCompInfo=0x0000
|
||||
OP_SendExeChecksum=0x0000
|
||||
OP_SendBaseDataChecksum=0x0000
|
||||
|
||||
# Zone in opcodes
|
||||
OP_AckPacket=0x471d
|
||||
OP_ZoneEntry=0x5089
|
||||
OP_ReqNewZone=0x7887
|
||||
OP_NewZone=0x1795
|
||||
OP_ZoneSpawns=0x5237
|
||||
OP_PlayerProfile=0x6506
|
||||
OP_TimeOfDay=0x5070
|
||||
OP_LevelUpdate=0x1eec
|
||||
OP_Stamina=0x2a79
|
||||
OP_RequestClientZoneChange=0x3fcf
|
||||
OP_ZoneChange=0x2d18
|
||||
OP_LockoutTimerInfo=0x0000
|
||||
OP_ZoneServerReady=0x0000
|
||||
OP_ZoneInUnknown=0x0000
|
||||
OP_LogoutReply=0x0000
|
||||
OP_PreLogoutReply=0x0000
|
||||
|
||||
# Required to fully log in
|
||||
OP_SpawnAppearance=0x0971
|
||||
OP_ChangeSize=0x4707
|
||||
OP_TributeUpdate=0x5961
|
||||
OP_TributeTimer=0x073d
|
||||
OP_SendTributes=0x729b
|
||||
OP_SendGuildTributes=0x1877
|
||||
OP_TributeInfo=0x4254
|
||||
OP_Weather=0x661e
|
||||
OP_ReqClientSpawn=0x35fa
|
||||
OP_SpawnDoor=0x7291
|
||||
OP_GroundSpawn=0x6fca
|
||||
OP_SendZonepoints=0x69a4
|
||||
OP_BlockedBuffs=0x3033
|
||||
OP_RemoveBlockedBuffs=0x0de7
|
||||
OP_ClearBlockedBuffs=0x34cb
|
||||
OP_WorldObjectsSent=0x5ae2
|
||||
OP_SendExpZonein=0x5f8e
|
||||
OP_SendAATable=0x66b5
|
||||
OP_RespondAA=0x7a27
|
||||
OP_UpdateAA=0x66f0
|
||||
OP_SendAAStats=0x43c8
|
||||
OP_AAExpUpdate=0x7d14
|
||||
OP_ExpUpdate=0x20ed
|
||||
OP_HPUpdate=0x2828
|
||||
OP_ManaChange=0x5467
|
||||
OP_TGB=0x0876
|
||||
OP_SpecialMesg=0x083
|
||||
OP_GuildMemberList=0x12a6
|
||||
OP_GuildMOTD=0x3e13
|
||||
OP_CharInventory=0x5ca6
|
||||
OP_WearChange=0x7994
|
||||
OP_ClientUpdate=0x7dfc
|
||||
OP_ClientReady=0x345d
|
||||
OP_SetServerFilter=0x444d
|
||||
|
||||
# Guild Opcodes - Disabled until crashes are resolved in RoF
|
||||
OP_GetGuildMOTD=0x36e0
|
||||
OP_GetGuildMOTDReply=0x4f1f
|
||||
OP_GuildMemberUpdate=0x69b9
|
||||
OP_GuildInvite=0x7099
|
||||
OP_GuildRemove=0x1444
|
||||
OP_GuildPeace=0x67e3
|
||||
OP_SetGuildMOTD=0x0b0b
|
||||
OP_GuildList=0x6279
|
||||
OP_GuildWar=0x1ffb
|
||||
OP_GuildLeader=0x7e09
|
||||
OP_GuildDelete=0x3708
|
||||
OP_GuildInviteAccept=0x7053
|
||||
OP_GuildDemote=0x2d4e
|
||||
OP_GuildPromote=0x0000
|
||||
OP_GuildPublicNote=0x5053
|
||||
OP_GuildManageBanker=0x748f
|
||||
OP_GuildBank=0x5134
|
||||
OP_SetGuildRank=0x0b9c
|
||||
OP_GuildUpdateURLAndChannel=0x2958
|
||||
OP_GuildStatus=0x7326
|
||||
OP_GuildCreate=0x76d9
|
||||
OP_GuildMemberLevelUpdate=0x0000 # Unused?
|
||||
OP_ZoneGuildList=0x0000 # Unused?
|
||||
OP_GetGuildsList=0x0000 # Unused?
|
||||
OP_LFGuild=0x0000
|
||||
OP_GuildManageRemove=0x0000
|
||||
OP_GuildManageAdd=0x0000
|
||||
OP_GuildManageStatus=0x0000
|
||||
|
||||
# GM/Guide Opcodes
|
||||
OP_GMServers=0x08c1
|
||||
OP_GMBecomeNPC=0x3ae1
|
||||
OP_GMZoneRequest=0x62ac
|
||||
OP_GMZoneRequest2=0x7e1a
|
||||
OP_GMGoto=0x7d8e
|
||||
OP_GMSearchCorpse=0x357c
|
||||
OP_GMHideMe=0x79c5
|
||||
OP_GMDelCorpse=0x607e
|
||||
OP_GMApproval=0x6db5
|
||||
OP_GMToggle=0x2097
|
||||
OP_GMSummon=0x486f
|
||||
OP_GMEmoteZone=0x1cfd
|
||||
OP_GMEmoteWorld=0x458e
|
||||
OP_GMFind=0x4a8f
|
||||
OP_GMKick=0x26a7
|
||||
OP_GMKill=0x51d3
|
||||
OP_GMNameChange=0x035f
|
||||
OP_GMLastName=0x46ce
|
||||
|
||||
# Misc Opcodes
|
||||
OP_InspectRequest=0x57bc
|
||||
OP_InspectAnswer=0x71ac
|
||||
OP_InspectMessageUpdate=0x4d25
|
||||
OP_BeginCast=0x318f
|
||||
OP_ColoredText=0x43af
|
||||
OP_ConsentResponse=0x384a
|
||||
OP_MemorizeSpell=0x217c
|
||||
OP_SwapSpell=0x0efa
|
||||
OP_CastSpell=0x1287
|
||||
OP_Consider=0x742b
|
||||
OP_FormattedMessage=0x1024
|
||||
OP_SimpleMessage=0x213f
|
||||
OP_Buff=0x659c
|
||||
OP_Illusion=0x312a
|
||||
OP_MoneyOnCorpse=0x5f44
|
||||
OP_RandomReply=0x106b
|
||||
OP_DenyResponse=0x2382
|
||||
OP_SkillUpdate=0x04c
|
||||
OP_GMTrainSkillConfirm=0x4b64
|
||||
OP_RandomReq=0x7b10
|
||||
OP_Death=0x6517
|
||||
OP_GMTraining=0x1966
|
||||
OP_GMEndTraining=0x4d6b
|
||||
OP_GMTrainSkill=0x2a85
|
||||
OP_Animation=0x7177
|
||||
OP_Begging=0x6703
|
||||
OP_Consent=0x1fd1
|
||||
OP_ConsentDeny=0x7a45
|
||||
OP_AutoFire=0x241e
|
||||
OP_PetCommands=0x0159
|
||||
OP_DeleteSpell=0x52e5
|
||||
OP_Surname=0x0423
|
||||
OP_ClearSurname=0x3fb0
|
||||
OP_FaceChange=0x5578
|
||||
OP_SenseHeading=0x260a
|
||||
OP_Action=0x744c
|
||||
OP_ConsiderCorpse=0x5204
|
||||
OP_HideCorpse=0x49e1
|
||||
OP_CorpseDrag=0x0904
|
||||
OP_CorpseDrop=0x7037
|
||||
OP_Bug=0x73f4
|
||||
OP_Feedback=0x5602
|
||||
OP_Report=0x1414
|
||||
OP_Damage=0x6f15
|
||||
OP_ChannelMessage=0x2b2d
|
||||
OP_Assist=0x4478
|
||||
OP_AssistGroup=0x27f8
|
||||
OP_MoveCoin=0x0bcf
|
||||
OP_ZonePlayerToBind=0x0ecb
|
||||
OP_KeyRing=0x6857
|
||||
OP_WhoAllRequest=0x674b
|
||||
OP_WhoAllResponse=0x51b8
|
||||
OP_FriendsWho=0x3956
|
||||
OP_ConfirmDelete=0x43a3
|
||||
OP_Logout=0x4ac6
|
||||
OP_Rewind=0x1745
|
||||
OP_TargetCommand=0x58e2
|
||||
OP_Hide=0x67fe
|
||||
OP_Jump=0x31f4
|
||||
OP_Camp=0x28ec
|
||||
OP_Emote=0x373b
|
||||
OP_SetRunMode=0x009f
|
||||
OP_BankerChange=0x791e
|
||||
OP_TargetMouse=0x075d
|
||||
OP_MobHealth=0x37b1
|
||||
OP_InitialMobHealth=0x0000 # Unused?
|
||||
OP_TargetHoTT=0x0272
|
||||
OP_XTargetResponse=0x672f
|
||||
OP_XTargetRequest=0x45be
|
||||
OP_XTargetAutoAddHaters=0x792c
|
||||
OP_TargetBuffs=0x4f4b
|
||||
OP_BuffCreate=0x3377
|
||||
OP_BuffRemoveRequest=0x64f2
|
||||
OP_DeleteSpawn=0x7280
|
||||
OP_AutoAttack=0x109d
|
||||
OP_AutoAttack2=0x3526
|
||||
OP_Consume=0x4b70
|
||||
OP_MoveItem=0x32ee
|
||||
OP_DeleteItem=0x18ad
|
||||
OP_DeleteCharge=0x01b8
|
||||
OP_ItemPacket=0x368e
|
||||
OP_ItemLinkResponse=0x70c0
|
||||
OP_ItemLinkClick=0x4cef
|
||||
OP_ItemPreview=0x6b5c
|
||||
OP_NewSpawn=0x6097
|
||||
OP_Track=0x17e5
|
||||
OP_TrackTarget=0x0029
|
||||
OP_TrackUnknown=0x4577
|
||||
OP_ClickDoor=0x3a8f
|
||||
OP_MoveDoor=0x08e8
|
||||
OP_RemoveAllDoors=0x700c
|
||||
OP_EnvDamage=0x51fd
|
||||
OP_BoardBoat=0x4211
|
||||
OP_Forage=0x5306
|
||||
OP_LeaveBoat=0x7617
|
||||
OP_ControlBoat=0x0ae7
|
||||
OP_SafeFallSuccess=0x2219
|
||||
OP_RezzComplete=0x760d
|
||||
OP_RezzRequest=0x3c21
|
||||
OP_RezzAnswer=0x701c
|
||||
OP_Shielding=0x48c1
|
||||
OP_RequestDuel=0x3af1
|
||||
OP_MobRename=0x2c57
|
||||
OP_AugmentItem=0x661b
|
||||
OP_WeaponEquip1=0x34a7
|
||||
OP_WeaponEquip2=0x559a
|
||||
OP_WeaponUnequip2=0x2d25
|
||||
OP_ApplyPoison=0x31e6
|
||||
OP_Save=0x4a39
|
||||
OP_TestBuff=0x7cb8
|
||||
OP_CustomTitles=0x100e
|
||||
OP_Split=0x3a54
|
||||
OP_YellForHelp=0x4e56
|
||||
OP_LoadSpellSet=0x261d
|
||||
OP_Bandolier=0x7677
|
||||
OP_PotionBelt=0x1a3e
|
||||
OP_DuelResponse=0x6a46
|
||||
OP_DuelResponse2=0x68d3
|
||||
OP_SaveOnZoneReq=0x600d
|
||||
OP_ReadBook=0x72df
|
||||
OP_Dye=0x23b9
|
||||
OP_InterruptCast=0x048c
|
||||
OP_AAAction=0x424e
|
||||
OP_LeadershipExpToggle=0x6c55
|
||||
OP_LeadershipExpUpdate=0x2797
|
||||
OP_PurchaseLeadershipAA=0x0026
|
||||
OP_UpdateLeadershipAA=0x026
|
||||
OP_MarkNPC=0x5a58
|
||||
OP_MarkRaidNPC=0x74bd #unimplemented
|
||||
OP_ClearNPCMarks=0x2003
|
||||
OP_ClearRaidNPCMarks=0x20d3 #unimplemented
|
||||
OP_DelegateAbility=0x76b8
|
||||
OP_SetGroupTarget=0x2814
|
||||
OP_Charm=0x5d92
|
||||
OP_Stun=0x36a4
|
||||
OP_SendFindableNPCs=0x7e62
|
||||
OP_FindPersonRequest=0x5cea
|
||||
OP_FindPersonReply=0x7e58
|
||||
OP_Sound=0x1a30
|
||||
OP_PetBuffWindow=0x5882
|
||||
OP_LevelAppearance=0x3bc9
|
||||
OP_Translocate=0x6580
|
||||
OP_Sacrifice=0x1821
|
||||
OP_PopupResponse=0x08a6
|
||||
OP_OnLevelMessage=0x4d6e
|
||||
OP_AugmentInfo=0x0afb
|
||||
OP_Petition=0x3de3
|
||||
OP_SomeItemPacketMaybe=0x747c
|
||||
OP_PVPStats=0x4b15
|
||||
OP_PVPLeaderBoardRequest=0x04aa
|
||||
OP_PVPLeaderBoardReply=0x071f
|
||||
OP_PVPLeaderBoardDetailsRequest=0x3707
|
||||
OP_PVPLeaderBoardDetailsReply=0x25b7
|
||||
OP_RestState=0x000f
|
||||
OP_RespawnWindow=0x28bc
|
||||
OP_LDoNButton=0x5327
|
||||
OP_SetStartCity=0x6326
|
||||
OP_VoiceMacroIn=0x17fd
|
||||
OP_VoiceMacroOut=0x409a
|
||||
OP_ItemViewUnknown=0x465b
|
||||
OP_VetRewardsAvaliable=0x590e
|
||||
OP_VetClaimRequest=0x1126
|
||||
OP_VetClaimReply=0x16d4
|
||||
OP_DisciplineUpdate=0x759e
|
||||
OP_DisciplineTimer=0x6989
|
||||
OP_BecomeCorpse=0x0000 # Unused?
|
||||
OP_Action2=0x0000 # Unused?
|
||||
OP_MobUpdate=0x2c84
|
||||
OP_NPCMoveUpdate=0x5892
|
||||
OP_CameraEffect=0x127f
|
||||
OP_SpellEffect=0x5936
|
||||
OP_RemoveNimbusEffect=0x7b1e
|
||||
OP_AltCurrency=0x62ab
|
||||
OP_AltCurrencyMerchantRequest=0x61cb
|
||||
OP_AltCurrencyMerchantReply=0x5409
|
||||
OP_AltCurrencyPurchase=0x0165
|
||||
OP_AltCurrencySell=0x74ec
|
||||
OP_AltCurrencySellSelection=0x3788
|
||||
OP_AltCurrencyReclaim=0x3899
|
||||
OP_CrystalCountUpdate=0x467f
|
||||
OP_CrystalCreate=0x7aee
|
||||
OP_CrystalReclaim=0x2439
|
||||
OP_Untargetable=0x053c
|
||||
OP_IncreaseStats=0x70a3
|
||||
OP_Weblink=0x6f4b
|
||||
OP_OpenContainer=0x0000
|
||||
OP_Marquee=0x0000
|
||||
OP_ItemRecastDelay=0x15a9
|
||||
#OP_OpenInventory=0x0000 # Likely does not exist in RoF -U
|
||||
|
||||
OP_DzQuit=0x205f
|
||||
OP_DzListTimers=0x0398
|
||||
OP_DzAddPlayer=0x59ca
|
||||
OP_DzRemovePlayer=0x4701
|
||||
OP_DzSwapPlayer=0x1abc
|
||||
OP_DzMakeLeader=0x405b
|
||||
OP_DzPlayerList=0x543d
|
||||
OP_DzJoinExpeditionConfirm=0x14c6
|
||||
OP_DzJoinExpeditionReply=0x7f4b
|
||||
OP_DzExpeditionInfo=0x4f7e
|
||||
OP_DzExpeditionList=0x9119
|
||||
OP_DzMemberStatus=0xb2e3
|
||||
OP_DzLeaderStatus=0x32f0
|
||||
OP_DzExpeditionEndsWarning=0x7e94
|
||||
OP_DzMemberList=0x3de9
|
||||
OP_DzCompass=0x3e0e
|
||||
OP_DzChooseZone=0x0000
|
||||
|
||||
# New Opcodes
|
||||
OP_SpawnPositionUpdate=0x0000 # Actually OP_MobUpdate ?
|
||||
OP_ManaUpdate=0x3791
|
||||
OP_EnduranceUpdate=0x5f42
|
||||
OP_MobManaUpdate=0x2404
|
||||
OP_MobEnduranceUpdate=0x1c81
|
||||
|
||||
# Mercenary Opcodes
|
||||
OP_MercenaryDataUpdateRequest=0x7b89
|
||||
OP_MercenaryDataUpdate=0x61a4
|
||||
OP_MercenaryDataRequest=0x11c1
|
||||
OP_MercenaryDataResponse=0x72ce
|
||||
OP_MercenaryHire=0x7169
|
||||
OP_MercenaryDismiss=0x6e83
|
||||
OP_MercenaryTimerRequest=0x31e4
|
||||
OP_MercenaryTimer=0x0763
|
||||
OP_MercenaryUnknown1=0x5d26
|
||||
OP_MercenaryCommand=0x27f2
|
||||
OP_MercenarySuspendRequest=0x4407
|
||||
OP_MercenarySuspendResponse=0x6f03
|
||||
OP_MercenaryUnsuspendResponse=0x27a0
|
||||
|
||||
# Looting
|
||||
OP_LootRequest=0x0adf
|
||||
OP_EndLootRequest=0x30f7
|
||||
OP_LootItem=0x4dc9
|
||||
OP_LootComplete=0x55c4
|
||||
|
||||
# bazaar trader stuff:
|
||||
OP_BazaarSearch=0x39d6
|
||||
OP_TraderDelItem=0x0000
|
||||
OP_BecomeTrader=0x61b3
|
||||
OP_TraderShop=0x31df
|
||||
OP_Trader=0x4ef5
|
||||
OP_TraderBuy=0x0000
|
||||
OP_Barter=0x243a
|
||||
OP_ShopItem=0x0000
|
||||
OP_BazaarInspect=0x0000
|
||||
OP_Bazaar=0x0000
|
||||
OP_TraderItemUpdate=0x0000
|
||||
|
||||
# pc/npc trading
|
||||
OP_TradeRequest=0x77b5
|
||||
OP_TradeAcceptClick=0x69e2
|
||||
OP_TradeRequestAck=0x14bf
|
||||
OP_TradeCoins=0x4206
|
||||
OP_FinishTrade=0x3993
|
||||
OP_CancelTrade=0x354c
|
||||
OP_TradeMoneyUpdate=0x68c2
|
||||
OP_MoneyUpdate=0x640c
|
||||
OP_TradeBusy=0x5505
|
||||
|
||||
# Sent after canceling trade or after closing tradeskill object
|
||||
OP_FinishWindow=0x7349
|
||||
OP_FinishWindow2=0x40ef
|
||||
|
||||
# Sent on Live for what seems to be item existance verification
|
||||
# Ex. Before Right Click Effect happens from items
|
||||
OP_ItemVerifyRequest=0x189c
|
||||
OP_ItemVerifyReply=0x097b
|
||||
|
||||
# merchant stuff
|
||||
OP_ShopPlayerSell=0x0000
|
||||
OP_ShopRequest=0x4fed
|
||||
OP_ShopEnd=0x30a8
|
||||
OP_ShopEndConfirm=0x3196
|
||||
OP_ShopPlayerBuy=0x0ddd
|
||||
OP_ShopDelItem=0x724f
|
||||
|
||||
# tradeskill stuff:
|
||||
OP_ClickObject=0x4aa1
|
||||
OP_ClickObjectAction=0x0c1e
|
||||
OP_ClearObject=0x7a11
|
||||
OP_RecipeDetails=0x40d7
|
||||
OP_RecipesFavorite=0x71b1
|
||||
OP_RecipesSearch=0x1db6
|
||||
OP_RecipeReply=0x6e02
|
||||
OP_RecipeAutoCombine=0x6261
|
||||
OP_TradeSkillCombine=0x579a
|
||||
|
||||
# Tribute Packets:
|
||||
OP_OpenGuildTributeMaster=0x378d
|
||||
OP_OpenTributeMaster=0x7666
|
||||
OP_SelectTribute=0x79fc
|
||||
OP_TributeItem=0x4f3e
|
||||
OP_TributeMoney=0x58fb
|
||||
OP_TributeToggle=0x241d
|
||||
OP_TributePointUpdate=0x5300
|
||||
OP_TributeNPC=0x0000
|
||||
OP_GuildTributeInfo=0x0000
|
||||
OP_OpenTributeReply=0x0000
|
||||
OP_GuildTributeStatus=0x0000
|
||||
|
||||
# Adventure packets:
|
||||
OP_LeaveAdventure=0x5d18
|
||||
OP_AdventureFinish=0x400f
|
||||
OP_AdventureInfoRequest=0x3cb0
|
||||
OP_AdventureInfo=0x4c54
|
||||
OP_AdventureRequest=0x2c6c
|
||||
OP_AdventureDetails=0x5648
|
||||
OP_AdventureData=0x7171
|
||||
OP_AdventureUpdate=0x1b01
|
||||
OP_AdventureMerchantRequest=0x6922
|
||||
OP_AdventureMerchantResponse=0x3e47
|
||||
OP_AdventureMerchantPurchase=0x5b72
|
||||
OP_AdventureMerchantSell=0x2f9b
|
||||
OP_AdventurePointsUpdate=0x65c3
|
||||
OP_AdventureStatsRequest=0x5a62
|
||||
OP_AdventureStatsReply=0x2370
|
||||
OP_AdventureLeaderboardRequest=0x7093
|
||||
OP_AdventureLeaderboardReply=0x7f79
|
||||
|
||||
# Group Opcodes
|
||||
OP_GroupDisband=0x4c10
|
||||
OP_GroupInvite=0x6110
|
||||
OP_GroupFollow=0x1649
|
||||
OP_GroupUpdate=0x3abb
|
||||
OP_GroupUpdateB=0x6194
|
||||
OP_GroupCancelInvite=0x0000
|
||||
OP_GroupAcknowledge=0x7323
|
||||
OP_GroupDelete=0x0f6c
|
||||
OP_CancelInvite=0x2a50
|
||||
OP_GroupFollow2=0x2060
|
||||
OP_GroupInvite2=0x32c2
|
||||
OP_GroupDisbandYou=0x1ae5
|
||||
OP_GroupDisbandOther=0x74da
|
||||
OP_GroupLeaderChange=0x21b4
|
||||
OP_GroupRoles=0x70e2
|
||||
OP_GroupMakeLeader=0x4229
|
||||
OP_DoGroupLeadershipAbility=0x1fb5
|
||||
OP_GroupLeadershipAAUpdate=0x02cf
|
||||
OP_GroupMentor=0x3342
|
||||
OP_InspectBuffs=0x486c
|
||||
|
||||
# LFG/LFP Opcodes
|
||||
OP_LFGCommand=0x6060
|
||||
OP_LFGGetMatchesRequest=0x0340
|
||||
OP_LFGGetMatchesResponse=0x5048
|
||||
OP_LFPGetMatchesRequest=0x4d7d
|
||||
OP_LFPGetMatchesResponse=0x22c6
|
||||
OP_LFPCommand=0x49a9
|
||||
OP_LFGAppearance=0x0000
|
||||
OP_LFGResponse=0x0000
|
||||
|
||||
# Raid Opcodes
|
||||
OP_RaidInvite=0x55ac
|
||||
OP_RaidUpdate=0x3973
|
||||
OP_RaidJoin=0x0000
|
||||
|
||||
# Button-push commands
|
||||
OP_Taunt=0x2703
|
||||
OP_CombatAbility=0x3eba
|
||||
OP_SenseTraps=0x02af
|
||||
OP_PickPocket=0x39e8
|
||||
OP_DisarmTraps=0x78bf
|
||||
OP_Disarm=0x5ec8
|
||||
OP_Sneak=0x5d55
|
||||
OP_Fishing=0x1e2a
|
||||
OP_InstillDoubt=0x640e
|
||||
OP_FeignDeath=0x52fa
|
||||
OP_Mend=0x0ecf
|
||||
OP_Bind_Wound=0x0386
|
||||
OP_LDoNOpen=0x3d5c
|
||||
|
||||
# Task packets
|
||||
OP_TaskDescription=0x3714
|
||||
OP_TaskActivity=0x08d3
|
||||
OP_CompletedTasks=0x4eba
|
||||
OP_TaskActivityComplete=0x5e19
|
||||
OP_AcceptNewTask=0x0a23
|
||||
OP_CancelTask=0x39f0
|
||||
OP_TaskMemberList=0x5727
|
||||
OP_OpenNewTasksWindow=0x48a2
|
||||
OP_AvaliableTask=0x36e8
|
||||
OP_TaskHistoryRequest=0x5f1c
|
||||
OP_TaskHistoryReply=0x3d05
|
||||
OP_DeclineAllTasks=0x0000
|
||||
|
||||
# Title opcodes
|
||||
OP_NewTitlesAvailable=0x0d32
|
||||
OP_RequestTitles=0x6344
|
||||
OP_SendTitleList=0x2d08
|
||||
OP_SetTitle=0x6527
|
||||
OP_SetTitleReply=0x4c21
|
||||
|
||||
# mail opcodes
|
||||
OP_Command=0x0000
|
||||
OP_MailboxHeader=0x0000
|
||||
OP_MailHeader=0x0000
|
||||
OP_MailBody=0x0000
|
||||
OP_NewMail=0x0000
|
||||
OP_SentConfirm=0x0000
|
||||
|
||||
########### Below this point should not be needed ###########
|
||||
|
||||
# This section are all unknown in Titanium
|
||||
OP_ForceFindPerson=0x0000
|
||||
OP_LocInfo=0x0000
|
||||
OP_ReloadUI=0x0000
|
||||
OP_ItemName=0x0000
|
||||
OP_ItemLinkText=0x0000
|
||||
OP_MultiLineMsg=0x0000
|
||||
OP_MendHPUpdate=0x0000
|
||||
OP_TargetReject=0x0000
|
||||
OP_SafePoint=0x0000
|
||||
OP_ApproveZone=0x0000
|
||||
OP_ZoneComplete=0x0000
|
||||
OP_ClientError=0x0000
|
||||
OP_DumpName=0x0000
|
||||
OP_Heartbeat=0x0000
|
||||
OP_CrashDump=0x0000
|
||||
OP_LoginComplete=0x0000
|
||||
|
||||
# discovered opcodes not yet used:
|
||||
OP_PickLockSuccess=0x0000
|
||||
OP_PlayMP3=0x0000
|
||||
OP_ReclaimCrystals=0x0000
|
||||
OP_DynamicWall=0x0000
|
||||
OP_OpenDiscordMerchant=0x0000
|
||||
OP_DiscordMerchantInventory=0x0000
|
||||
OP_GiveMoney=0x0000
|
||||
OP_RequestKnowledgeBase=0x0000
|
||||
OP_KnowledgeBase=0x0000
|
||||
OP_SlashAdventure=0x0000 # /adventure
|
||||
OP_BecomePVPPrompt=0x0000
|
||||
OP_MoveLogRequest=0x0000 # gone I think
|
||||
OP_MoveLogDisregard=0x0000 # gone I think
|
||||
|
||||
# named unknowns, to make looking for real unknown easier
|
||||
OP_AnnoyingZoneUnknown=0x0000
|
||||
OP_Some6ByteHPUpdate=0x0000 seems to happen when you target group members
|
||||
OP_QueryResponseThing=0x0000
|
||||
|
||||
|
||||
# realityincarnate: these are just here to stop annoying several thousand byte packet dumps
|
||||
#OP_LoginUnknown1=0x46d3 # OP_SendSpellChecksum
|
||||
#OP_LoginUnknown2=0x040b # OP_SendSkillCapsChecksum
|
||||
|
||||
# Petition Opcodes
|
||||
OP_PetitionSearch=0x0000 search term for petition
|
||||
OP_PetitionSearchResults=0x0000 (list of?) matches from search
|
||||
OP_PetitionSearchText=0x0000 text results of search
|
||||
|
||||
OP_PetitionUpdate=0x0000
|
||||
OP_PetitionCheckout=0x0000
|
||||
OP_PetitionCheckIn=0x0000
|
||||
OP_PetitionQue=0x0000
|
||||
OP_PetitionUnCheckout=0x0000
|
||||
OP_PetitionDelete=0x0000
|
||||
OP_DeletePetition=0x0000
|
||||
OP_PetitionResolve=0x0000
|
||||
OP_PDeletePetition=0x0000
|
||||
OP_PetitionBug=0x0000
|
||||
OP_PetitionRefresh=0x0000
|
||||
OP_PetitionCheckout2=0x0000
|
||||
OP_PetitionViewPetition=0x0000
|
||||
|
||||
# Login opcodes
|
||||
OP_SessionReady=0x0000
|
||||
OP_Login=0x0000
|
||||
OP_ServerListRequest=0x0000
|
||||
OP_PlayEverquestRequest=0x0000
|
||||
OP_PlayEverquestResponse=0x0000
|
||||
OP_ChatMessage=0x0000
|
||||
OP_LoginAccepted=0x0000
|
||||
OP_ServerListResponse=0x0000
|
||||
OP_Poll=0x0000
|
||||
OP_EnterChat=0x0000
|
||||
OP_PollResponse=0x0000
|
||||
|
||||
# raw opcodes
|
||||
OP_RAWSessionRequest=0x0000
|
||||
OP_RAWSessionResponse=0x0000
|
||||
OP_RAWCombined=0x0000
|
||||
OP_RAWSessionDisconnect=0x0000
|
||||
OP_RAWKeepAlive=0x0000
|
||||
OP_RAWSessionStatRequest=0x0000
|
||||
OP_RAWSessionStatResponse=0x0000
|
||||
OP_RAWPacket=0x0000
|
||||
OP_RAWFragment=0x0000
|
||||
OP_RAWOutOfOrderAck=0x0000
|
||||
OP_RAWAck=0x0000
|
||||
OP_RAWAppCombined=0x0000
|
||||
OP_RAWOutOfSession=0x0000
|
||||
|
||||
# we need to document the differences between these packets to make identifying them easier
|
||||
OP_Some3ByteHPUpdate=0x0000 # initial HP update for mobs
|
||||
OP_InitialHPUpdate=0x0000
|
||||
@@ -158,7 +158,7 @@ OP_GMApproval=0x72fa # C
|
||||
OP_GMToggle=0x7566 # C
|
||||
OP_GMSummon=0x596d # C
|
||||
OP_GMEmoteZone=0x3e7c # C
|
||||
OP_GMEmoteWorld=0x3e7c # C
|
||||
OP_GMEmoteWorld=0x5298 # C
|
||||
OP_GMFind=0x6e27 # C
|
||||
OP_GMKick=0x799c # C
|
||||
OP_GMKill=0x6685 # C
|
||||
@@ -168,7 +168,7 @@ OP_GMLastName=0x3563 # C
|
||||
OP_InspectAnswer=0x4938 # C
|
||||
OP_Action2=0x7e4d # C OP_Damage?
|
||||
OP_BeginCast=0x0d5a # C
|
||||
OP_BuffFadeMsg=0x569a # C
|
||||
OP_ColoredText=0x569a # C
|
||||
OP_ConsentResponse=0x6e47 # C
|
||||
OP_MemorizeSpell=0x8543 # C
|
||||
OP_SwapSpell=0x3fd2 # C
|
||||
@@ -288,8 +288,10 @@ OP_LeadershipExpToggle=0x34c5 # C
|
||||
OP_LeadershipExpUpdate=0x69d0 # C
|
||||
OP_PurchaseLeadershipAA=0x07b3 # C
|
||||
OP_UpdateLeadershipAA=0x6948 # C
|
||||
OP_MarkNPC=0x0d4b # C
|
||||
OP_MarkNPC=0x695c # C
|
||||
OP_MarkRaidNPC=0x0d4b # C
|
||||
OP_ClearNPCMarks=0x5033 # C
|
||||
OP_ClearRaidNPCMarks=0x5f55 # C
|
||||
OP_DoGroupLeadershipAbility=0x540b # C
|
||||
OP_GroupLeadershipAAUpdate=0x0c33
|
||||
OP_DelegateAbility=0x0322 # C
|
||||
@@ -367,7 +369,7 @@ OP_DzExpeditionEndsWarning=0x1879
|
||||
OP_DzExpeditionList=0x3657
|
||||
OP_DzMemberList=0x74e4
|
||||
OP_DzCompass=0x35d3
|
||||
OP_DzChooseZone=0xd8a
|
||||
OP_DzChooseZone=0x0d8a
|
||||
#0x1d99 was grouped with these too but I don't really know it's purpose.
|
||||
|
||||
# New Opcodes
|
||||
@@ -484,6 +486,8 @@ OP_GroupDisbandOther=0x162d
|
||||
OP_GroupLeaderChange=0x7545
|
||||
OP_GroupRoles=0x6b67
|
||||
OP_GroupMakeLeader=0x6087
|
||||
OP_GroupMentor=0x1224
|
||||
OP_InspectBuffs=0x66bf
|
||||
# LFG/LFP Opcodes
|
||||
OP_LFGCommand=0x3288 # C
|
||||
OP_LFGGetMatchesRequest=0x5613 # C
|
||||
@@ -576,7 +580,6 @@ OP_MultiLineMsg=0x0000 #
|
||||
OP_MendHPUpdate=0x0000 #
|
||||
OP_TargetReject=0x0000 #
|
||||
OP_SafePoint=0x0000 #
|
||||
OP_IncreaseStats=0x0000 #
|
||||
OP_ApproveZone=0x0000 #
|
||||
OP_ZoneComplete=0x0000 #
|
||||
OP_ClientError=0x0000 #
|
||||
@@ -659,4 +662,6 @@ OP_RAWOutOfSession=0x0000 #
|
||||
|
||||
# we need to document the differences between these packets to make identifying them easier
|
||||
OP_Some3ByteHPUpdate=0x0000 # initial HP update for mobs
|
||||
OP_InitialHPUpdate=0x0000 #
|
||||
OP_InitialHPUpdate=0x0000 #
|
||||
|
||||
OP_ItemRecastDelay=0x15c4
|
||||
|
||||
@@ -85,6 +85,7 @@ OP_TaskActivity=0x2E60 #SEQ 12/04/08
|
||||
OP_CompletedTasks=0x75AC #Derision 2009
|
||||
OP_Weather=0x70A5 #SEQ 12/04/08
|
||||
OP_SendAATable=0x6F05 #Trevius 12/20/08
|
||||
OP_ShroudClearAA=0x71b9
|
||||
OP_UpdateAA=0x45D2 #Trevius 12/20/08
|
||||
OP_RespondAA=0x4426 #Trevius 12/20/08
|
||||
OP_ReqClientSpawn=0x014C #SEQ 12/04/08
|
||||
@@ -164,7 +165,7 @@ OP_GMLastName=0x0375 #/lastname <Name> <New Surname>
|
||||
OP_InspectAnswer=0x084F #SEQ 12/04/08
|
||||
OP_Action2=0x0EF2 #SEQ 12/04/08
|
||||
OP_BeginCast=0x5A50 #SEQ 12/04/08
|
||||
OP_BuffFadeMsg=0x3BC7 #SEQ 12/04/08
|
||||
OP_ColoredText=0x3BC7 #SEQ 12/04/08
|
||||
OP_ConsentResponse=0x4D30 #SEQ 12/04/08
|
||||
OP_MemorizeSpell=0x6A93 #SEQ 12/04/08
|
||||
OP_SwapSpell=0x1418 #SEQ 12/04/08
|
||||
@@ -281,8 +282,10 @@ OP_LeadershipExpToggle=0x24D4 #Xinu 02/20/09
|
||||
OP_LeadershipExpUpdate=0x58b6 #Derision 2009
|
||||
OP_PurchaseLeadershipAA=0x1408 #Derision 2009
|
||||
OP_UpdateLeadershipAA=0x7abf #Derision 2009
|
||||
OP_MarkNPC=0x00c6 #Derision 2009
|
||||
OP_MarkNPC=0x4697 #Derision 2009
|
||||
OP_MarkRaidNPC=0x00c6
|
||||
OP_ClearNPCMarks=0x2ff2 #
|
||||
OP_ClearRaidNPCMarks=0x56a9 #
|
||||
OP_DoGroupLeadershipAbility=0x5a64 #Derision 2009
|
||||
OP_DelegateAbility=0x57e3 #Derision 2009
|
||||
OP_SetGroupTarget=0x1651 #Derision 2009
|
||||
@@ -329,6 +332,7 @@ OP_InspectMessageUpdate=0x67e9 # C
|
||||
OP_OpenInventory=0x66c8
|
||||
OP_OpenContainer=0x10e3
|
||||
OP_Marquee=0x2f75
|
||||
OP_Untargetable=0x3e36
|
||||
|
||||
#expedition
|
||||
OP_DzQuit=0x20d6
|
||||
@@ -450,6 +454,8 @@ OP_GroupDelete=0x0000 #
|
||||
OP_CancelInvite=0x596C #Trevius 03/02/09
|
||||
OP_GroupFollow2=0x59D4 #Xinu 02/20/09
|
||||
OP_GroupInvite2=0x07F6 #Xinu 02/20/09
|
||||
OP_GroupMentor=0x9EF3
|
||||
OP_InspectBuffs=0x3547
|
||||
|
||||
#LFG/LFP Opcodes
|
||||
OP_LFGCommand=0x5D81 #Trevius 01/16/09
|
||||
@@ -526,7 +532,7 @@ OP_MultiLineMsg=0x0000 #
|
||||
OP_MendHPUpdate=0x0000 #
|
||||
OP_TargetReject=0x0000 #
|
||||
OP_SafePoint=0x0000 #
|
||||
OP_IncreaseStats=0x0000 #
|
||||
OP_IncreaseStats=0x5ecb #
|
||||
OP_ApproveZone=0x0000 #
|
||||
OP_ZoneComplete=0x0000 #
|
||||
OP_ClientError=0x0000 #
|
||||
@@ -540,9 +546,11 @@ OP_PickLockSuccess=0x0000 #
|
||||
OP_VetRewardsAvaliable=0x044b #
|
||||
OP_VetClaimRequest=0x7503
|
||||
OP_VetClaimReply=0x01e1
|
||||
OP_PlayMP3=0x0000 #
|
||||
OP_PlayMP3=0x0d1c #
|
||||
OP_ReclaimCrystals=0x0000 #
|
||||
OP_CrystalCountUpdate=0x64C1 #
|
||||
OP_CrystalCreate=0x65e2
|
||||
OP_CrystalReclaim=0x0730
|
||||
OP_DynamicWall=0x0000 #
|
||||
OP_OpenDiscordMerchant=0x0000 #
|
||||
OP_DiscordMerchantInventory=0x0000 #
|
||||
@@ -615,6 +623,8 @@ OP_RAWOutOfSession=0x0000 #
|
||||
OP_Some3ByteHPUpdate=0x0000 #initial HP update for mobs
|
||||
OP_InitialHPUpdate=0x0000 #
|
||||
|
||||
OP_ItemRecastDelay=0x0ada
|
||||
|
||||
|
||||
# Opcodes from the client that are currently Unknowns:
|
||||
# 0x3E85 - Sent when Guild Management window is opened
|
||||
|
||||
@@ -154,7 +154,7 @@ OP_InspectRequest=0x775d # ShowEQ 10/27/05
|
||||
OP_InspectAnswer=0x2403 # ShowEQ 10/27/05
|
||||
OP_Action2=0x0000
|
||||
OP_BeginCast=0x3990 # ShowEQ 10/27/05
|
||||
OP_BuffFadeMsg=0x0b2d # ShowEQ 10/27/05
|
||||
OP_ColoredText=0x0b2d # ShowEQ 10/27/05
|
||||
OP_Consent=0x1081 # ShowEQ 10/27/05
|
||||
OP_ConsentDeny=0x4e8c # ShowEQ 10/27/05
|
||||
OP_ConsentResponse=0x6380 # ShowEQ 10/27/05
|
||||
@@ -420,6 +420,8 @@ OP_RaidJoin=0x1f21 # ShowEQ 10/27/05
|
||||
OP_RaidInvite=0x5891 # ShowEQ 10/27/05
|
||||
OP_RaidUpdate=0x1f21 # EQEmu 06/29/05
|
||||
|
||||
OP_InspectBuffs=0x4FB6
|
||||
|
||||
|
||||
OP_ZoneComplete=0x0000
|
||||
OP_ItemLinkText=0x0000
|
||||
|
||||
@@ -88,6 +88,7 @@ OP_TaskActivity=0x31f3 # C
|
||||
OP_CompletedTasks=0x687f # C
|
||||
OP_Weather=0x4658 # V
|
||||
OP_SendAATable=0x6ef9 # V
|
||||
OP_ShroudClearAA=0x2cd4
|
||||
OP_UpdateAA=0x7bf6 # V
|
||||
OP_RespondAA=0x1fbd # C 0x2bad
|
||||
OP_ReqClientSpawn=0x69cd # V
|
||||
@@ -168,7 +169,7 @@ OP_GMLastName=0x7bfb # C
|
||||
|
||||
OP_InspectAnswer=0x0c2b # C
|
||||
OP_BeginCast=0x0d5a # C
|
||||
OP_BuffFadeMsg=0x71bf # C
|
||||
OP_ColoredText=0x71bf # C
|
||||
OP_ConsentResponse=0x0e87 # C
|
||||
OP_MemorizeSpell=0x3887 # C
|
||||
OP_SwapSpell=0x5805 # C
|
||||
@@ -292,8 +293,10 @@ OP_LeadershipExpToggle=0x5033 # C
|
||||
OP_LeadershipExpUpdate=0x074f # C
|
||||
OP_PurchaseLeadershipAA=0x5f55 # C
|
||||
OP_UpdateLeadershipAA=0x77ed # C
|
||||
OP_MarkNPC=0x3ec7 # C
|
||||
OP_MarkNPC=0x66bf
|
||||
OP_MarkRaidNPC=0x3ec7 # C
|
||||
OP_ClearNPCMarks=0x5c29 # C
|
||||
OP_ClearRaidNPCMarks=0x2af4
|
||||
OP_DoGroupLeadershipAbility=0x0068 # C
|
||||
OP_GroupLeadershipAAUpdate=0x167b # C
|
||||
OP_DelegateAbility=0x6e58 # C
|
||||
@@ -313,7 +316,7 @@ OP_OnLevelMessage=0x24cb # C
|
||||
OP_AugmentInfo=0x31b1 # C
|
||||
OP_Petition=0x31d1 # C
|
||||
OP_SomeItemPacketMaybe=0x2c27 # C
|
||||
OP_PVPStats=0x0000 #
|
||||
OP_PVPStats=0x5272 #
|
||||
OP_PVPLeaderBoardRequest=0x4973 # C
|
||||
OP_PVPLeaderBoardReply=0x3842 # C
|
||||
OP_PVPLeaderBoardDetailsRequest=0x6c75 # C
|
||||
@@ -371,7 +374,17 @@ OP_DzExpeditionEndsWarning=0x6ac2
|
||||
OP_DzExpeditionList=0x70d8
|
||||
OP_DzMemberList=0x15c4
|
||||
OP_DzCompass=0x01cb
|
||||
OP_DzChooseZone=0x0000
|
||||
OP_DzChooseZone=0x65e1
|
||||
|
||||
#shroud
|
||||
OP_ShroudSelectionWindow=0x72ad
|
||||
OP_ShroudRequestStats=0x488b
|
||||
OP_ShroudRespondStats=0x1910
|
||||
OP_ShroudSelect=0x45d7
|
||||
OP_ShroudSelectCancel=0x666d
|
||||
OP_ShroudProgress=0x6016 # This clears current progress and sets
|
||||
OP_ShroudProgress2=0x66b4 # This just sets progress
|
||||
OP_Shroud=0x1643
|
||||
|
||||
# New Opcodes
|
||||
OP_SpawnPositionUpdate=0x4656 # C
|
||||
@@ -487,6 +500,8 @@ OP_GroupDisbandOther=0x49f6 # C
|
||||
OP_GroupLeaderChange=0x0c33 # C
|
||||
OP_GroupRoles=0x116d # C
|
||||
OP_GroupMakeLeader=0x5851
|
||||
OP_GroupMentor=0x292f
|
||||
OP_InspectBuffs=0x105b
|
||||
|
||||
# LFG/LFP Opcodes
|
||||
OP_LFGCommand=0x2c38 # C
|
||||
@@ -654,3 +669,8 @@ OP_RAWOutOfSession=0x0000 #
|
||||
# we need to document the differences between these packets to make identifying them easier
|
||||
OP_Some3ByteHPUpdate=0x0000 # initial HP update for mobs
|
||||
OP_InitialHPUpdate=0x0000 #
|
||||
|
||||
OP_ItemRecastDelay=0x82d7
|
||||
|
||||
# unhandled
|
||||
OP_ShieldGroup=0x23a1
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
############################################################
|
||||
#::: Script: DB_Dumper.pl
|
||||
#::: Purpose: Utility to easily manage database backups and compress.
|
||||
#::: Export Individual DB Tables...
|
||||
#::: Export specific databases...
|
||||
#::: Built for both Windows and Linux
|
||||
#::: Windows uses WinRar or 7-Zip for compression
|
||||
#::: Linux uses tar for compression
|
||||
#::: Author: Akkadius
|
||||
############################################################
|
||||
|
||||
$localdrive = "C:"; #::: Where Windows and all Install Programs are...
|
||||
$linesep = "---------------------------------------";
|
||||
|
||||
use POSIX qw(strftime);
|
||||
my $date = strftime "%m-%d-%Y", localtime;
|
||||
print "\nTodays Date: " . $date . "\n";
|
||||
|
||||
use Config;
|
||||
print "Operating System is: $Config{osname}\n";
|
||||
if($Config{osname}=~/linux/i){ $OS = "Linux"; }
|
||||
if($Config{osname}=~/Win|MS/i){ $OS = "Windows"; }
|
||||
|
||||
if(!$ARGV[0]){
|
||||
print "\nERROR! Need arguments\n\n";
|
||||
print "#::: Help :::#\n";
|
||||
print "######################################################\n\n";
|
||||
print "Arguments\n";
|
||||
print " loc=\"C:\\File Location\" - File path location to backup...\n";
|
||||
print " database=\"dbname\" - Manually specify databasename, default is database in eqemu_config.xml\n";
|
||||
print " tables=\"table1,table2,table3\" - Manually specify tables, default is to dump all tables from database\n";
|
||||
print " compress - Compress Database with 7-ZIP, will fallback to WinRAR depending on what is installed (Must be installed to default program dir)...\n";
|
||||
print ' Example: perl DB_Dumper.pl Loc="E:\Backups"' . "\n\n";
|
||||
print "######################################################\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
#::: CONFIG VARIABLES - Parsed from eqemu_config.xml
|
||||
|
||||
my $confile = "eqemu_config.xml"; #default
|
||||
open(F, "<$confile") or die "Unable to open config: $confile - This must be in your EQEmu Server Folder with your XML config\n";
|
||||
my $indb = 0;
|
||||
|
||||
while(<F>) {
|
||||
s/\r//g;
|
||||
if(/<database>/i) { $indb = 1; }
|
||||
next unless($indb == 1);
|
||||
if(/<\/database>/i) { $indb = 0; last; }
|
||||
if(/<host>(.*)<\/host>/i) { $host = $1; }
|
||||
elsif(/<username>(.*)<\/username>/i) { $user = $1; }
|
||||
elsif(/<password>(.*)<\/password>/i) { $pass = $1; }
|
||||
elsif(/<db>(.*)<\/db>/i) { $db = $1; }
|
||||
}
|
||||
|
||||
$Debug = 0;
|
||||
print "Arguments\n" if $Debug;
|
||||
$n = 0;
|
||||
while($ARGV[$n]){
|
||||
print $n . ': ' . $ARGV[$n] . "\n" if $Debug;
|
||||
if($ARGV[$n]=~/compress/i){
|
||||
print "Compression SET\n";
|
||||
$Compress = 1;
|
||||
}
|
||||
if($ARGV[$n]=~/database=/i){
|
||||
@DB_NAME = split('=', $ARGV[$n]);
|
||||
print "Database is " . $DB_NAME[1] . "\n";
|
||||
$db = $DB_NAME[1];
|
||||
}
|
||||
if($ARGV[$n]=~/loc=/i){
|
||||
@B_LOC = split('=', $ARGV[$n]);
|
||||
print "Backup Directory: " . $B_LOC[1] . "\n";
|
||||
}
|
||||
if($ARGV[$n]=~/tables=/i){
|
||||
@Tables = split('=', $ARGV[$n]); @TList = split(',', $Tables[1]);
|
||||
foreach my $tables (@TList){
|
||||
$t_tables .= $tables . " ";
|
||||
$t_tables_l .= $tables . "_";
|
||||
$t_tables_p .= $tables . "\n";
|
||||
}
|
||||
print "Backing up tables: \n\n############################\n" . $t_tables_p . "############################\n\n";
|
||||
}
|
||||
$n++;
|
||||
}
|
||||
|
||||
#::: Check for Backup Directory existence, if doesn't exist then create...
|
||||
if (-d $B_LOC[1]) {
|
||||
print "Directory currently exists... Adding files to it...\n\n";
|
||||
}
|
||||
elsif($B_LOC[1] ne ""){
|
||||
print "Directory does NOT exist! Creating...\n\n";
|
||||
mkdir($B_LOC[1]) or die 'Failed to create folder, maybe created the folder manually at "' . $B_LOC[1]. '" ?';
|
||||
}
|
||||
else{
|
||||
print "No save location specified... Saving to folder script is running in...\n";
|
||||
}
|
||||
if($B_LOC[1] ne ""){
|
||||
if($OS eq "Windows"){ $file_app = "\\"; }
|
||||
if($OS eq "Linux"){ $file_app = "/"; }
|
||||
}
|
||||
else {
|
||||
$file_app = "";
|
||||
}
|
||||
|
||||
if($t_tables ne ""){
|
||||
$tables_f_l = substr($t_tables_l, 0, 20) . '...';
|
||||
$target_file = '' . $tables_f_l . ' ' . $date . '';
|
||||
print "Performing table based backup...\n";
|
||||
#::: Backup Database...
|
||||
print "Backing up Database " . $db . "... \n\n";
|
||||
$cmd = 'mysqldump -u' . $user . ' --max_allowed_packet=512M --password="' . $pass . '" ' . $db . ' ' . $t_tables . ' > "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.sql"';
|
||||
printcmd($cmd);
|
||||
system($cmd);
|
||||
}
|
||||
else{ #::: Entire DB Backup
|
||||
$target_file = '' . $db . ' ' . $date . '';
|
||||
#::: Backup Database...
|
||||
print "Backing up Database " . $db . "... \n\n";
|
||||
$cmd = 'mysqldump -u' . $user . ' --max_allowed_packet=512M --password="' . $pass . '" ' . $db . ' > "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.sql"';
|
||||
printcmd($cmd);
|
||||
system($cmd);
|
||||
}
|
||||
|
||||
#::: Get File Size
|
||||
$fileloc = '' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.sql';
|
||||
$filesize = -s $fileloc;
|
||||
if($filesize < 1000){ print "\n" . 'Error occurred... exiting...' . "\n\n"; exit; }
|
||||
print "Backup DONE... DB Backup File Size '" . $filesize . "' (" . get_filesize_str($fileloc) . ")\n\n";
|
||||
|
||||
#::: WinRar Get, check compression flag
|
||||
if($Compress == 1){
|
||||
if($OS eq "Windows"){
|
||||
if(-d $localdrive . "\\Program Files\\7-Zip"){
|
||||
print " ::: You have 7-Zip installed as 64 Bit...\n\n";
|
||||
$S_ZIP = $localdrive . "\\Program Files\\7-Zip";
|
||||
}
|
||||
elsif(-d $localdrive . "\\Program Files (x86)\\7-Zip"){
|
||||
print " ::: You have 7-Zip installed as 32 Bit...\n\n";
|
||||
$S_ZIP = $localdrive . "\\Program Files (x86)\\7-Zip";
|
||||
}
|
||||
elsif(-d $localdrive . "\\Program Files (x86)\\WinRAR"){
|
||||
print " ::: You have WinRAR installed as 32 Bit...\n\n";
|
||||
$WinRar = $localdrive . "\\Program Files (x86)\\WinRAR";
|
||||
}
|
||||
elsif(-d $localdrive . "\\Program Files\\WinRAR"){
|
||||
print " ::: You have WinRAR installed as 64 Bit...\n\n";
|
||||
$WinRar = $localdrive . "\\Program Files\\WinRAR";
|
||||
}
|
||||
else{
|
||||
print "No WinRAR installed... Will not compress...\n";
|
||||
}
|
||||
if($S_ZIP ne ""){
|
||||
print "Compressing Database with 7-ZIP... \n\n";
|
||||
$cmd = '"' . $S_ZIP . '\\7z" a -t7z -m0=lzma -mx=9 "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.7z" "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.sql" ';
|
||||
printcmd($cmd);
|
||||
system($cmd);
|
||||
print "\nDeleting RAW .sql Dump... \n\n";
|
||||
$cmd = 'del "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.sql" ';
|
||||
printcmd($cmd);
|
||||
system($cmd);
|
||||
$final_file = $target_file . ".7z";
|
||||
}
|
||||
elsif($WinRar ne ""){
|
||||
print "Compressing Database with WinRAR... \n";
|
||||
$cmd = '"' . $WinRar . '\\rar" a "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.rar" "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.sql" ';
|
||||
printcmd($cmd);
|
||||
system($cmd);
|
||||
print "\nDeleting RAW .sql Dump... \n\n";
|
||||
$cmd = 'del "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.sql" ';
|
||||
printcmd($cmd);
|
||||
system($cmd);
|
||||
$final_file = $target_file . ".rar";
|
||||
}
|
||||
}
|
||||
if($OS eq "Linux"){
|
||||
print "Compressing Database with Tarball... \n";
|
||||
$cmd = 'tar -zcvf "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.tar.gz" "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.sql" ';
|
||||
printcmd($cmd);
|
||||
system($cmd);
|
||||
print "\nDeleting RAW .sql Dump... \n\n";
|
||||
$cmd = 'rm "' . $B_LOC[1] . '' . $file_app . '' . $target_file . '.sql" ';
|
||||
printcmd($cmd);
|
||||
system($cmd);
|
||||
$final_file = $target_file . ".tar.gz";
|
||||
}
|
||||
}
|
||||
|
||||
#::: Get Final File Location for display
|
||||
if($B_LOC[1] ne ""){ $final_loc = $B_LOC[1] . '' . $file_app . ""; }
|
||||
else{
|
||||
if($OS eq "Windows"){
|
||||
$final_loc = `echo %cd%`;
|
||||
}
|
||||
elsif($OS eq "Linux"){
|
||||
$final_loc = `pwd`;
|
||||
}
|
||||
}
|
||||
|
||||
print "Final file located: " . $final_loc . "" . $final_file . "\n\n";
|
||||
|
||||
sub printcmd{
|
||||
print "--- CMD --- \n" . $_[0] . "\n" . $linesep . "\n\n";
|
||||
}
|
||||
|
||||
sub get_filesize_str{
|
||||
my $file = shift();
|
||||
my $size = (stat($file))[7] || die "stat($file): $!\n";
|
||||
if ($size > 1099511627776) { return sprintf("%.2f TiB", $size / 1099511627776); }
|
||||
elsif ($size > 1073741824) { return sprintf("%.2f GiB", $size / 1073741824); }
|
||||
elsif ($size > 1048576) { return sprintf("%.2f MiB", $size / 1048576); }
|
||||
elsif ($size > 1024) { return sprintf("%.2f KiB", $size / 1024); }
|
||||
else { return "$size byte" . ($size == 1 ? "" : "s"); }
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user