Compare commits

...

1962 Commits

Author SHA1 Message Date
Matheus Macabu
f86bb39df8 Allow leaderless party (#1980)
* Fixed some misc. stuff

* Allow for leaderless party.
2017-11-02 16:32:33 +07:00
Jey
c09929aa16 Negative npc input checks for arena_points.
* Related issue: #2557
* Thanks to @mazvi
2017-11-01 22:17:31 +01:00
rAthenaAPI
fbb447ac8c SQL synchronization 2017-11-01 16:57:26 +01:00
Lemongrass3110
125ab2853a Last missing mob ids from old range 2017-11-01 16:57:05 +01:00
rAthenaAPI
d6171801ca SQL synchronization 2017-11-01 16:40:39 +01:00
Lemongrass3110
af358809b9 New npc and mob IDs
The old range has been fully used up now.
2017-11-01 16:40:22 +01:00
rAthenaAPI
4d602135fc SQL synchronization 2017-10-30 22:16:53 +01:00
Aleos
d15b5fc584 Corrected St. Patrick's Hat and Green Ale (#2558)
* Fixes #2547.
* St. Patrick's Hat bonus should be granted from +8 or higher refine.
* Green Ale has a 10 second use delay.
Thanks to @uddevil!
2017-10-30 17:16:28 -04:00
lighta
611dee0753 Fix cmake (#2554)
* Fix cmake
Thanks to @secretdataz for help. (cherry-picked from refactor)
2017-10-30 13:19:27 -04:00
Maz-V
c76f3675a2 Global_Function: Added "F_GetPlatinumSkills" (#2545)
* Added global function F_GetPlatinumSkills.
* Adjusted the Job Master and Platinum Skills NPCs to use this function.
Thanks to @mazvi!
2017-10-30 10:57:57 -04:00
Jittapan Pluemsumran
09519f3b37 Merge pull request #2546 from lighta/fix_configure
Add check in configure to ensure c++ compiler
2017-10-29 05:35:13 -07:00
Roman Kalashnikov
9772639ae7 Fixed duplicated condition (#2553)
The condition `if(node->prev)` was checked in the previous:
`if( node->prev && n > 5 ) {`
2017-10-29 11:00:59 +01:00
rAthenaAPI
618e668bdf SQL synchronization 2017-10-28 01:56:35 +02:00
Atemo
c9ee8eb647 Follow up 5ed2113251 2017-10-28 01:56:00 +02:00
rAthenaAPI
af20c0ca8c SQL synchronization 2017-10-27 23:42:34 +02:00
Atemo
5ed2113251 Initial release of Sarah and Fenrir memorial (#2504)
Initial release of Sarah and Fenrir memorial
Notes:
* Some monsters status are inaccurated.
* Sarah seems to cast NPC_WIDESOULDRAIN and Gigantes cast NPC_PETRIFYATTACK (need more infos).

Thanks to @aleos89 for the grammatical fixes !
Big thanks to Divine Pride for the infos!
2017-10-27 23:42:12 +02:00
Aleos
2c1df58ba4 Corrected Dark Claw behavior (#2548)
* Fixes #2537.
* The wound effect should be applied even if Dark Claw misses.
Thanks to @esu1214!
2017-10-27 14:25:03 -04:00
Lemongrass3110
18e0f0ab48 Fixed searchstore for vendings with item id > 32k 2017-10-27 00:57:32 +02:00
lighta
feb1ab9d95 Add check in configure to ensure c++ compiler 2017-10-26 09:00:02 -04:00
Aleos
5208d16995 Item Shop Trade Restriction adjustment (#2517)
* Item Shop Trade Restriction adjustment
* Fixes #2503.
* Added a config to allow usage of sell-restricted items as currency in Item Shops.
Thanks to @Mickosis!

* Cleaned up some final things
* Fixed some typos in the configuration file.
* Resolved the shop ID not being stored at the time of checking the currency.
* Optimized the inventory check.
2017-10-25 13:49:39 -04:00
Maz-V
10d405706b Platinum Skill: skill MC_CARTDECORATE (#2521)
* Added MC_CARTDECORATE for Merchant Class
* Added PACKETVER check
Thanks to @mazvi and @anacondaqq!
2017-10-25 10:38:31 -04:00
Lemongrass3110
93ad3a1378 2 new NPC constants 2017-10-24 23:19:57 +02:00
Lemongrass3110
3b219565d3 Enabled import for translations by default (#2535)
Added possibility to override MAP_MAX_MSG with defines_pre.h
Added possibility to override LANG_ENABLE with defines_pre.h

Thanks to @Daegaladh for the idea with LANG_ENABLE.
2017-10-24 22:36:59 +02:00
Lemongrass3110
cb760a0a42 Adjusted atcommand go for new novi grounds
Follow up to c7d5b61
2017-10-22 17:18:54 +02:00
Atemo
c7d5b61409 New Intro for Renewal - continuation of https://github.com/rathena/rathena/pull/2309 (#2530)
* Update map iz_int in mapcache.dat for the new Intro Map
* Update Academy script for the new Intro based on kRO: [http://www.inven.co.kr/webzine/news/?news=176048&site=ro](http://www.inven.co.kr/webzine/news/?news=176048&site=ro)
* Add monster spawn in the new Intro Map
     
Thanks 805a2b3b1a (diff-8d1dca8dc246e9f4d38c6f1ad0d2c930) for original script.

Thanks @jenkijo for the base, @Lemongrass3110 and @aleos89 for the review, and Divine Pride for some infos !
2017-10-21 00:23:49 +02:00
Atemo
0a96c9089b Merge branch 'master' of https://github.com/rathena/rathena 2017-10-20 16:02:45 +02:00
Atemo
f07ceced91 Added missing warps from dali to dali02, dali02 to dali (issue #2531)
Thanks @hendra814 !
2017-10-20 16:02:10 +02:00
rAthenaAPI
535804be6a SQL synchronization 2017-10-20 15:52:30 +02:00
Atemo
b90df89380 Fixed Crimson Saber (Item ID: 13454) equip class requirement
Thanks @ToiletMaster !
2017-10-20 15:52:17 +02:00
Lemongrass3110
828f7d6ec2 Fixed a typo with SC_CHEERUP
Follow up to c73e10c
Fixes #2532

Thanks to @mazvi
2017-10-20 09:57:50 +02:00
Lemongrass3110
caf31521d0 Fixed an import issue in mapindex (#2512)
* Fixes #2511.
Thanks to @Daegaladh for his input!
2017-10-19 14:11:56 -04:00
rAthenaAPI
3d8a16bfff SQL synchronization 2017-10-19 19:23:18 +02:00
Aleos
c73e10cb30 Added new 2016 Wedding skills (#2479)
* Added new 2016 Wedding skills
* Adds Call All Family, One Forever, and Cheer Up skills to the renewal databases.
* Removed Enlarge Weight Limit R skill from a few job skill trees as it's not needed to be defined there.
Thanks to @Rytech2, @Jeybla, and @Lemongrass3110!
2017-10-19 13:22:55 -04:00
Aleos
ea0b54e03f Corrected Endure hit count behavior (#2525)
* Fixes #2508.
* Endure should have 7 hits (instead of 8) in PvM.
Thanks to @kaninhot004!
2017-10-19 10:14:57 -04:00
Lemongrass3110
7dc6f7577c Support for october clients
Thanks to @4144
2017-10-19 01:15:46 +02:00
Jittapan Pluemsumran
2830183eaa Implemented round,floor,ceil script commands. (#2524) 2017-10-18 03:10:10 -07:00
Aleos
b4106eb988 Adjusted script command bindatcmd (#2518)
* Fixes #2513.
* Defaulted the char-command level to 100.
Thanks to @mazvi and @Lemongrass3110!
2017-10-16 14:49:39 -04:00
Maz-V
7991f47a01 Adds jobmaster option disable Baby Novice only (#2514) 2017-10-16 09:54:03 +02:00
Jey
48fcc92a9c Follow up to 828f78322b
* Only checks item names of items with new ids.
* Fixes warnings on import itemdb overwrites.
* Note: The duplicate name check should be refactored after the Cpp
  migration. It'd be much faster with a C++ map with the
  name string as the key.
* Thanks to @Daegaladh!
2017-10-15 13:38:15 +02:00
Aleos
db37fc7ddd Fixes required equipment check for skills (#2374)
* Fixes required equipment check for skills
* Fixes #2372.
* Required equipment check was allowing the skill to cast without the proper equipment.
* Adjusted the skill fail messages to their appropriate responses.
Thanks to @M4karov, @exneval, @Jeybla, and @Lemongrass3110!
2017-10-14 22:37:55 -04:00
Lemongrass3110
8c2f727f64 Added support for 3 new hat effects 2017-10-15 02:29:38 +02:00
Lemongrass3110
b196b46bd5 Follow up to f42c2ff
Fixes some missing randoms

Thanks to @aleos89
2017-10-15 02:19:58 +02:00
Aleos
2606cf977f Migrated skill.c to C++ (#2500)
* Migrated skill.c to C++
* Needed in preparation for future projects.
2017-10-14 13:03:27 -04:00
Lemongrass3110
f42c2ff211 Moved some remaining constants into src (#2501)
* Moved all npc view constants into src

Source side the constants will use Gravity's naming standard(JT_*)
NPC side still supports the old names without JT_

* Moved all effect constants into src

Added check for effect validation to atcommand effect and all script commands using them
Removed the unused and broken function unit_changeviewsize from unit.c
Replaced a lot of hardcoded effect ids with their respective constants
Cleaned up the effect documentations

* Moved all hat effect constants into src

Added check for effect validation to script command hateffect
2017-10-14 18:13:51 +02:00
Aleos
951ff55573 Updated Convex Mirror to match official behavior (#2506)
* Updated Convex Mirror to match official behavior
* Fixes #2498.
* When a MVP dies it will only show the respawn time once instead of flooding the chat window.
* The Boss icon will now properly display itself when the MVP respawns if the player has already consumed a Convex Mirror.
* Converted some integers to constant values.
* Made use of the other BOSS_INFO packet messages.
* Properly end the status when the player changes maps.
* Small cleanups and updated status change documentation.
Thanks to @esu1214 and @Lemongrass3110!
2017-10-14 11:45:24 -04:00
aleos
76923ac506 Corrected some refiner checks
* Follow up to e24d30a.
* Fixes #2505 and fixes #2507.
* Added a missing material check for Suhnbi.
* Added a missing safe limit check for normal refiners. Safe limit was always 0.
Thanks to @mazvi, @Mickosis, and @cydh!
2017-10-14 09:11:30 -04:00
aleos89
3ab39c4cb3 Follow up to 6a2c122
* Removed an unused variable.
2017-10-13 09:53:36 -04:00
rAthenaAPI
57113d1fbb SQL synchronization 2017-10-12 17:04:12 +02:00
Aleos
6a2c1229d0 Updated Rebellion class (#1692)
* Updated Rebellion class
* Information based on Rebellion Awakening patch from kRO.
- http://ro.gnjoy.com/news/update/View.asp?seq=183&curpage=1
* Fixes #859 and fixes #1449.
Thanks to @RagnarokNova and Fyrus for their information!
2017-10-12 11:04:03 -04:00
rAthenaAPI
db2d332cab SQL synchronization 2017-10-11 15:24:39 +02:00
Lemongrass3110
705cc5a869 Mob DB placeholders
kRO patch 2017-10-11
2017-10-11 15:24:06 +02:00
Aleos
fa425b834f Updated callshop selling list variables (#2480)
* Updated callshop selling list variables
* Updated script command callshop OnSellItem list to include random item options.
* See documentation for more information.
2017-10-10 12:15:51 +02:00
rAthenaAPI
7898a667df SQL synchronization 2017-10-09 14:37:51 +02:00
Jey
3e78cc1c3a Fixes item positions
* 28310,Earring_Of_Sarah_L
* 28311,Earring_Of_Sarah_R
* Closes #2493
* Thanks to @Yuchinin
2017-10-09 14:35:59 +02:00
rAthenaAPI
9e1c5dbec1 SQL synchronization 2017-10-09 03:55:27 +02:00
Jeybla
828f78322b Adds a duplicate name check for the itemdb. (#2492)
* Fixes #2487
* Fixes some duplicate itemdb entries.
2017-10-09 03:55:12 +02:00
Jey
ff6722c924 Follow up to fb882c4aa0
* Fixes #2489
* Thanks to @Yuchinin
2017-10-08 20:20:33 +02:00
rAthenaAPI
ba7a766472 SQL synchronization 2017-10-08 16:50:46 +02:00
Jittapan Pluemsumran
800fd3da45 Fixed Zaha Doll Hat not being refinable. Fixes #2485
Thanks to @uddevil
2017-10-08 21:50:38 +07:00
rAthenaAPI
8a93b12020 SQL synchronization 2017-10-08 00:58:05 +02:00
Atemo
319fc4d18c Fixed a duplicate aegis name
Thanks @Jeybla !
2017-10-08 00:57:43 +02:00
Aleos
54a119c56a Resolves Skill Unit Database parsing issue (#2484)
* Fixes #2483.
* Properly trims the target field so it can be processed accurately.
2017-10-07 17:29:50 +02:00
Jeybla
b8562932cf Removes SCRIPT_CALLFUNC_CHECK ifdef-directives. (#2482)
* Closes #2205
* The SCRIPT_CALLFUNC_CHECK define was to enforce function
  calling with callfunc in scripts. Because I don't think calling
  functions without callfunc will give us performancy issues,
  this check is simply removed by this commit.
2017-10-07 16:59:45 +02:00
Jeybla
2676d05394 Jobmaster update (#2369)
* Major changes due to readability and some corrections
* Adds the option to disable Rebirth Classes
* Adds the possibility to give players job related 
  Equipment (mostly weapons) on job change
* Adds more level requirement settings
* Adds BabyExpanded and BabySummoner Jobs
* Thanks to @Braniff, @mazvi, @Mikegyver, @Lemongrass3110, @Akkarinage, @Stolao and @secretdataz!
2017-10-06 17:40:39 +02:00
rpdigos
fb882c4aa0 Fix a couple of warnings. (#2462)
* Fix a couple of warnings.
Thanks to @rpdigos!
2017-10-06 10:58:17 -04:00
Jey
ae0da362f8 Follow up to fe75aea
* Fixes a compile warning
* Thanks to @Haikenz
2017-10-06 02:23:56 +02:00
Aleos
fe75aeab50 Corrected character slot movement (#2452)
* Corrected character slot movement
* Resolves characters changing slots (on the char-selection screen) to the first empty slot rather than to the actual slot index.
Thanks to @Tokeiburu, @Lemongrass3110, and @Jeybla!
2017-10-05 18:31:30 -04:00
Aleos
0068268337 Follow up to 2c8ab4f
* Fixed some typos.
Thanks to @Akkarinage!
2017-10-05 14:27:19 -04:00
aleos89
9210bf5d68 Follow up to 2c8ab4f
* Fixed some visual issues for the contributing documentation.
2017-10-05 14:04:25 -04:00
aleos89
2c8ab4ff79 Updated the contributing documentation
* Updated the label documentation.
2017-10-05 13:57:43 -04:00
Jittapan Pluemsumran
872cb42a48 Fixed a bug where refine bonuses was being incorrectly parsed. Fixes #2456
Thanks to @hc3490
2017-10-05 22:43:38 +07:00
rAthenaAPI
6f634735aa SQL synchronization 2017-10-05 08:17:51 +02:00
rAthenaAPI
1679521a4b SQL synchronization 2017-10-05 08:17:41 +02:00
Jittapan Pluemsumran
67518f4def Merge pull request #2470 from rathena/feature/moscovia_cards
Implemented cards for Moscovia monsters
2017-10-05 13:17:33 +07:00
Aleos
53ba373c43 Corrected Overed Boost behavior (#2474)
* Fixes #2473.
* Skill was draining double homunculus hunger and double master SP.
Thanks to @Everade!
2017-10-04 21:14:55 -04:00
rAthenaAPI
1aa8c072b7 SQL synchronization 2017-10-04 16:38:29 +02:00
Atemo
0791adb4f4 Corrected duplicate item name follow up 7f9747c15d (diff-23f1393132fc5ca16140f50c9591e550R4554) 2017-10-04 16:38:00 +02:00
rAthenaAPI
771d4b94ba SQL synchronization 2017-10-04 16:30:35 +02:00
Atemo
7f9747c15d Aegis item name (#2451)
* Correct Aegis item name from https://rathena.org/board/topic/107649-aegis_id2name_v2/

Thanks @esu1214
2017-10-04 16:30:28 +02:00
Atemo
75653d9da1 Adjust Wood_Goblin_Card item script from the description 2017-10-04 00:00:36 +02:00
Lemongrass3110
b8844a0973 Fixed @Atemo's comments 2017-10-03 15:46:45 +02:00
Lemongrass3110
77a7bc2d9a Fixed a missing comma 2017-10-03 14:55:29 +02:00
Jey
6b6717748e Fixes homunculus being able to attack from Manhole
* Fixes #2068
2017-10-03 08:07:57 +02:00
Jey
215aa158ed Follow up to aa6e8987db.
* Fixes compile warnings.
2017-10-02 22:16:12 +02:00
Jittapan Pluemsumran
fc8534f766 Implemented cards for Moscovia monsters 2017-10-02 23:34:35 +07:00
rAthenaAPI
5b874a15f1 SQL synchronization 2017-10-02 18:19:47 +02:00
Jittapan Pluemsumran
091738ac7e Implemented Terra Gloria cards (#2464) 2017-10-02 23:19:27 +07:00
Jeybla
aa6e8987db Merge pull request #2466 from rathena/refactor/mob_cpp
* Convert mob.c to mob.cpp.
2017-10-02 17:49:55 +02:00
Jittapan Pluemsumran
16d8abbd0f Merge pull request #2468 from MuzTank/issue-1432
Added AB_RENOVATIO as reproducible skill.
2017-10-02 21:43:27 +07:00
Edwin
2df18b12e6 Added AB_RENOVATIO as reproducible skill. 2017-10-02 15:00:45 +07:00
Jittapan Pluemsumran
f20ac015d1 Fixed random options with negative values being stored as 0 in database. (#2465)
* Made random option database columns signed
* Negative values can now be stored for random options
* Fixed #2415
Thanks to @uddevil

* Follow up to ea28ff4. Updated main SQL scripts.
2017-10-02 09:05:41 +07:00
Jey
a5719e7228 Prefer static_casts instead of C casts. 2017-10-01 18:32:52 +02:00
Jey
593ac62757 Convert mob.c to mob.cpp. 2017-10-01 18:25:16 +02:00
rAthenaAPI
af86a07c39 SQL synchronization 2017-09-30 18:19:07 +02:00
Lemongrass3110
6899c89e5d Added new mob db placeholders
With this gravity used up the old monster id range and their client will probably support the new range on kRO sakray soon!
2017-09-30 18:18:35 +02:00
Aleos
ab014246cc Corrected Elemental Cure healing behavior (#2443)
* Fixes #2440.
* The HP/SP heal should be based on the caster's current HP/SP, not the Elemental's max HP/SP.
Thanks to @Barigas!
2017-09-29 09:41:34 -04:00
Lemongrass3110
7de7472782 Added support for some missing clients (#2458) 2017-09-28 23:52:56 +02:00
Jey
e6ec0f528f Follow up to 0e4ffdacdb. 2017-09-28 23:29:29 +02:00
Jeybla
0e4ffdacdb Adds pk_mode_mes displayed on joining a pk zone. (#2400)
* When pk_mode and pk_mode_mes is enabled, the player gets notified joining a pk-zone map.
* It's now possible to specify the target in showscript.
  Default is still AREA.
* pk_mode_mes is now using showscript to SELF.
* Thanks to @Atemo, @RadianFord, @Lemongrass3110, @aleos89
2017-09-28 22:53:16 +02:00
Aleos
ee552d67d4 Updated Kaite renewal behavior (#2457)
* Fixes #2409.
* Kaite no longer reflects AoE magic.
Thanks to @esu1214!
2017-09-28 09:45:51 -04:00
aleos
d9a2bdbe05 Changed atcommand follow behavior
* Fixes #2424.
* Atcommand follow will now continue to follow the target even if the target dies.
Thanks to @MrAntares!
2017-09-26 17:02:39 -04:00
aleos
82ed67a01c Corrected script command instance ID lookups
* Fixes #2448.
* Resolves script_instancegetid causing scripts to end prematurely during player lookups.
Thanks to @Yuchinin and @Atemo!
2017-09-26 16:46:13 -04:00
aleos
2572bbbcb9 Updated script command callshop documentation
* Fixes #2419.
* Updated documentation to show that the option parameter only works on the 'shop' type NPC.
Thanks to @anacondaqq!
2017-09-26 16:17:04 -04:00
rAthenaAPI
9b66c32ef7 SQL synchronization 2017-09-26 16:32:54 +02:00
aleos89
549d6f5b55 Corrected Bawaya Agimat Tattoo item bonus
* Fixes #2422.
* Adjusted bonus from variable cast time to fixed cast time.
Thanks to @esu1214!
2017-09-26 10:32:35 -04:00
Vincent Stumpf
cd43f32ffb Shadow Refiner and getequiprefinecost (#2447)
* Fixes #2445 and fixes #2446.
* Fixed shadow refiner.
— The script uses the values of the array instead of the indexes to loop through it.
* Fixed segfault in getequiprefinecost.
— No checks in getequiprefinecost meant there were possibilities using negative indexes in arrays.
* Added to the script documentation what happens on failure when calling getequiprefinecost (it returns -1).
Thanks to @vstmpf, @crazystorm2017, and @hendra814!
2017-09-24 09:53:40 -04:00
anity99
052b9bc819 Fix duplicate location (#2442)
* Corrected Shadow Blacksmith overlapping with Mighty Hammer.
Thanks to @anity99!
2017-09-22 14:19:50 -04:00
Aleos
80a251ef02 Migrated clif.c to C++ (#2435)
* Migrated clif.c to C++
* Needed in preparation for future projects.
Thanks to @Daegaladh and @Mikegyver for testing!
2017-09-21 11:41:57 -04:00
aleos89
1bfe8475c8 Corrected Elemental flee calculation
* Fixes #2436.
* Added missing caster's flee into the formula.
Thanks to @Barigas!
2017-09-21 11:03:10 -04:00
anity99
c71f105083 Fix typo in achievements.txt (#2433)
* Resolves some typos in the AG_ADVENTURE script resulting in some not being able to be completed.
Thanks to @anity99!
2017-09-20 14:39:23 -04:00
Vincent Stumpf
0e74b5f55b Fixed potential crash in pc_bonus (#2423)
* Fixes #2420.
* If a bonus script command is used in an NPC with a non-existent bonus type, the server crashes.
Thanks to @vstumpf and @anacondaqq!
2017-09-20 14:33:25 -04:00
Vincent Stumpf
70f1d86404 Fixed msvc warning casting int to bool in getequiprefinecost (#2429)
* Fixes #2428.
Thanks to @vstumpf and @Haikenz!
2017-09-19 10:15:42 -04:00
Jittapan Pluemsumran
78c63c3a47 Merge pull request #2430 from anity99/updated-alternate-3rd-job-bodystyles
Updated alternate 3rd job bodystyles
2017-09-19 18:08:21 +07:00
Phong Truong
303bfb54aa Update atcommand.c 2017-09-19 12:35:32 +07:00
Jittapan Pluemsumran
e24d30a711 Refine overhaul (#2295)
* Converted refine_db.txt to refine_db.yml
* Refine success rates can now be set in refine_db.yml. rAthena's default NPCs will respect this database by default.
* Added shadow equipment refiner
Thanks to @Akkarinage @aleos89 @Atemo and @Mikegyver for their inputs.
2017-09-18 21:52:52 +07:00
sader fawall
8222208421 update item group file location (#2418)
* Updated documentation for item groups.
Thanks to @sader1992!
2017-09-15 13:54:01 -04:00
Aleos
5c7c089320 Corrected OPT1 behavior (#2378)
* Fixes #869.
* Damage skills should fully cast when OPT1 statuses are active.
Thanks to @panko11 and @Playtester!
2017-09-15 13:08:32 -04:00
Jeybla
557cccac9c Adds allow_bound_sell configuration. (#2401)
- It is possible to sell bound items, when allow_bound_sell is enabled.
- Fixes #2398.
- Changes made by @aleos89
- Thanks to @Everade
2017-09-12 15:53:55 -04:00
rAthenaAPI
cabb547164 SQL synchronization 2017-09-12 17:13:24 +02:00
Luan da Silva Santos
734ec22577 Fix for issue #2391 https://github.com/rathena/rathena/issues/2391 (#2416)
* Resolves Lex Aeterna autospell for Laser of Eagle.
2017-09-12 11:13:17 -04:00
Jey
5fda4f0f65 Fixed potential map server crash.
* Added a null pointer check
* Thanks to @admkakaroto!
2017-09-11 03:04:28 +02:00
rAthenaAPI
de441d6d2c SQL synchronization 2017-09-09 20:22:01 +02:00
Atemo
969c10fbc1 Leprechaun_Hat should be refineable (issue #2407)
Thanks @uddevil !
2017-09-09 20:21:29 +02:00
Atemo
3cc29d04cc Fixed another issue follow up b275412bcc 2017-09-08 19:22:34 +02:00
Jey
b275412bcc Fixes a warning in HorrorToyFactory.
* Replaces an unattached sleep2 to sleep
* Thanks to @admkakaroto and @technoken!
2017-09-08 11:22:23 +02:00
Jey
b4952aae09 Fixes a potential map-server crash.
* Follow up to 816d8ab2
* "buf" length in clif_party_info adjusted. (Buffer overflow)
* Thanks to @plsfixrito!
2017-09-07 23:21:52 +02:00
Jey
6434a83088 Follow up to 38d225c444
- Fixes a compile warning
- Thanks to @Mikegyver and @Daegaladh
2017-09-07 15:34:33 +02:00
Jey
38d225c444 Follow up to 60d59124a3.
* Fixes a map server crash due to wrong casting
* Fixes #2406
* Thanks to @keitenai!
2017-09-07 13:18:28 +02:00
Jey
528539f621 Follow up to 60d59124a3
* Fixes some compile warnings
* "Forcing value to bool"
* Thanks @M4karov
2017-09-07 12:51:00 +02:00
Daegaladh
60d59124a3 Migrated script.c to C++ (#2404)
* Thanks to @Daegaladh!
* Originial pull request: #2395
2017-09-07 04:13:42 +02:00
Jittapan Pluemsumran
0379774cd2 Revert "Migrated script.c to C++ (#2395)" (#2403)
This reverts commit 965edbf47d.
2017-09-05 22:40:24 +07:00
Daegaladh
965edbf47d Migrated script.c to C++ (#2395)
* Migrated script.c to C++
2017-09-05 19:51:04 +07:00
rAthenaAPI
d770de8015 SQL synchronization 2017-09-02 16:49:26 +02:00
Aleos
6ef8a97cf0 Updated Guillotine Poison item behavior (#2396)
* Fixes #1044.
* Poisons are now consumable by all classes.
* Using the item directly gives no benefit.
* Adjusted the item type to 2 (usable) from 0 (healing).
* A Dagger or Katar weapon is required to use Poisoning Weapon.
* Casting Poisoning Weapon again will cancel the previous bonus.
Thanks to @cydh and @Playtester!
2017-09-02 10:49:18 -04:00
aleos
470364cbe1 Corrected a second changequest attempt
* Related to #2070.
Thanks to @LiamKarlMitchell!
2017-08-31 20:24:04 -04:00
Aleos
e92fc9672f Resolved bonus WeaponMATKRate (#2383)
* Fixes #2275.
* Moved the bonus check after equipment is parsed.
Thanks to @Felleonel!
2017-08-31 14:26:17 -04:00
rAthenaAPI
a0da1ffb75 SQL synchronization 2017-08-31 20:05:13 +02:00
Aleos
d353b6682b Updated Rune Stone item behavior (#2384)
* Fixes #1045.
* Rune Stones are now consumable by all classes.
* Adjusted the item type to 2 (usable item) from 11 (delayed item).
* Removed the IG_RUNE item group.
Thanks to @cydh and @Paoly28!
2017-08-31 14:05:06 -04:00
Aleos
dfe714e9a1 Corrected broadcast item flag with autoloot (#2392)
* Fixes #1796.
* Moved the broadcast flag check before party share loot check.
Thanks to @whupdo!
2017-08-31 13:51:07 -04:00
Jeybla
f197f82f1f Removed reset of monster drops on mobdb reload. (#2394)
Does not clear item_drop_ers on mobdbreload anymore.
- Fixes #2355
- Thanks to @Zellukas.
2017-08-31 19:02:22 +02:00
Aleos
fc115b85a1 Adjusted HP, Max HP, SP, and Max SP SQL defines (#2389)
* Fixes #2387.
* Adjusted column define from mediumint to unsigned int.
* Synchronized default values to 0.
* Adjusted the parser format specifier
* Adjusted the specifiers to support unsigned.
Thanks to @M45T3Ryu and @Lemongrass3110!
2017-08-31 10:49:48 -04:00
Aleos
b19325b842 Corrected mob chat display checks (#2390)
* Fixes #2388.
* Added a validation check when monsters try to talk and attempt to lookup and invalid chat message on skill usage.
* Clones of players will now have no mob chat ID associated to their skills.
Thanks to @M4karov!
2017-08-31 10:15:00 -04:00
aleos
3e51f68570 Adjusted the Achievement Chat Counter
* Fixes #2334.
* Moved the achievement objective update function before the NPC waiting room event trigger.
Thanks to @ClayJensen and @Atemo!
2017-08-29 19:09:41 -04:00
Aleos
e4072e1361 Updated Silvervine Root Twist behavior (#2377)
* Fixes #1139.
* Should be removable by Earth Shaker.
* Removed maxcount limit as it's not a ground skill anymore.
2017-08-29 09:39:52 -04:00
Aleos
515fa6a163 Corrected the Chorus skills damage bonus (#2379)
* Added the missing range value when searching the map.
* Resolves an incorrect calculation in the bonus when less than 8 of the members are a Minstrel or Wanderer.
* Moved the Chorus check to the respective skills to avoid unnecessary calls to the function.
* Added documentation.
* Removed redundancy.
Thanks to @Tokeiburu and @Lemongrass3110!
2017-08-28 19:43:57 -04:00
Aleos
7a1b2e0f0a Cleaned up Item Shop checks (#2373)
* Fixes #2352.
* Removed an extra bound check when selling items.
* Added a check to return failure when unable to delete an item.
* Added checks when counting sellable items in an Item Shop.
- Items that can't be sold, favorite items, rental items, and bound items will now be ignored unless the GM has required permissions.
Thanks to @chadn4u, @Jeybla, @Lemongrass3110!
2017-08-28 10:08:29 -04:00
Aleos
39a5d38b9d Corrected Fatal Menace behavior (#2371)
* Resolves an issue with targets in the Fatal Menace area not getting teleported with the player.
Thanks to @Tokeiburu!
2017-08-28 09:40:23 -04:00
Stolao
9db3c386ea Fix bAddEffOnSkill (#2370)
* Fixes #2357.
* Fixed a copy paste error.
2017-08-25 14:41:15 -04:00
Aleos
4539d557e2 Added script command sc_end_class (#2368)
* Added a new script command sc_end_class to remove status changes from any learned skills.
* Adjusted the custom Reset NPC to make use of this behavior.
Thanks to @sader1992!

* Follow up to f93680b
* Adjusted documentation.

* Follow up to f93680b
* Removed the check from script command resetskill.
* Added a new script command sc_end_class.

* Fixed a compile error
* Corrected the define of the script command.
* Adjusted some documentation.
* Reverted some formatting from the original commit.
Thanks to @sader1992 and @Lemongrass3110!
2017-08-25 13:26:22 -04:00
Moch. Luthfi Rahmadi
c9ce29c00e Update Readme.md (#2337)
* Added Centos 64bit build option with MariaDB.
Thanks to @mazvi!
2017-08-23 10:21:06 -04:00
Lemongrass3110
1fc0ed600f Added support for the all 2017-06 clients 2017-08-21 00:10:06 +02:00
Lemongrass3110
3183c39cfe Fixed 2 compiler warnings
Fixes #2346

Thanks to @hurtsky
2017-08-20 15:01:05 +02:00
Lemongrass3110
6f985080a8 Follow up to 5fdebec
Fixed a typo
2017-08-18 11:49:20 +02:00
Lemongrass3110
5fdebec3af Fixed rebinding of mob view data for killed mobs
Fixes #2351

Thanks to @TesLA-Git
2017-08-18 11:47:40 +02:00
rAthenaAPI
2d31bc3c43 SQL synchronization 2017-08-16 19:52:33 +02:00
aleos89
b9627dd879 Resolved non-weapon items having a weapon level
* Fixes #2343.
* Removed all weapon level values from non-weapons in the renewal item database.
Thanks to @admkakaroto!
2017-08-16 13:52:10 -04:00
Lemongrass3110
d319ff7ca5 Fixed character creation for expired VIP accounts
Fixes #2333

Thanks to @Everade
2017-08-16 13:50:13 +02:00
Lemongrass3110
4cb4d60fee Fixed return value of unitattack for players
Fixes #2345

Thanks to @anacondaqq
2017-08-16 11:33:35 +02:00
Lemongrass3110
165197d26f Fixed cast time for the npcskill script command
Fixes #2342

Thanks to @Atemo
2017-08-16 09:40:38 +02:00
rAthenaAPI
374ecd0c99 SQL synchronization 2017-08-15 20:13:25 +02:00
Atemo
11d33007d9 Initial release of Ghost Palace Memorial (#2331)
* Initial release of Ghost Palace Memorial (Walkthrough conversion)

Thanks @Lemongrass3110, @aleos89 and @Jeybla for their help!
Thanks to Divine Pride for the monsters datas !
2017-08-15 20:11:50 +02:00
Jittapan Pluemsumran
eac3365282 Merge pull request #2340 from rathena/hotfix/issue2339
Fixed std::string reference being an incomplete type in inter.h
2017-08-15 16:26:07 +07:00
Jittapan Pluemsumran
bfb92940d5 Fixed std::string reference being an incomplete type in inter.h
Fixes #2339
2017-08-15 11:17:16 +07:00
rAthenaAPI
b04f79ed86 SQL synchronization 2017-08-14 19:57:44 +02:00
Atemo
641a1f1e88 Updated item_db.txt (16.1 episode) 2017-08-14 19:57:24 +02:00
Aleos
7554b53d68 Adjusted script command gettimestr (#2329)
* Fixes #2328.
* Added an optional parameter to pass in a Unix tick value to convert to a readable format.
Thanks to @hendra814 and @Lemongrass3110!
2017-08-14 13:51:18 -04:00
Jittapan Pluemsumran
74d809d139 Merge pull request #2338 from keitenai/patch-3
Fixed incorrect use of 'close' command
2017-08-14 22:59:15 +07:00
keitenai
f4de91b407 Fixed incorrect use of 'close' command 2017-08-14 23:25:29 +08:00
Lemongrass3110
d673d25978 Fixed another error from mobdb reloading
Thanks to @Everade
2017-08-14 04:22:55 +02:00
Lemongrass3110
693e958525 Fixed wrong crimson staff being dropped
Thanks to @Everade
2017-08-14 03:06:58 +02:00
Jittapan Pluemsumran
cc1d26fe74 Inter server C++ conversion (#2322)
* Renamed inter.c to inter.cpp and refactored it

* Converted inter_server.conf to inter_server.yml

* Updated the makefiles

* Refactored inter-server storage handling logic

* Fixed a bug with wrong maximum being displayed
When you took out an item of the storage it would always display the maximum amount of the normal storage.

* Fixed a bug with storages that are over maximum

Thanks to @Akkarinage, @Lemongrass3110 and @Jeybla
2017-08-14 01:27:58 +02:00
Vincent Stumpf
f9c6b92a63 Fixes memory leak in char-server (#2335)
Fixes #2330

Allocated memory in various StringBuf instances was being cleared instead of freeing it completely.
2017-08-13 23:44:18 +02:00
keitenai
fcc4936b23 Fixed script dialogue's NPC name to its proper order. (#2320)
Fixed script dialogue's NPC name to its proper order.

Credit @keitenai
2017-08-13 14:35:51 +02:00
Lemongrass3110
a2fc7d51b3 Fixed a PACKETVER mismatch for the random options
Fixes #2332

Thanks to @Milchdealer
2017-08-13 00:30:54 +02:00
Lemongrass3110
37f7fc5708 Fixed memory manager still using SVN revision 2017-08-12 16:50:00 +02:00
Atemo
087a72731d Fixed storage condition in lasagna town
From cb580e1f0d
Credits @exneval
2017-08-12 14:13:51 +02:00
Lemongrass3110
dce6ff1bea Fixed a memory leak in the script engine
Returning NPC variables in a user defined script function inside the same NPC does not require to allocate any additional stack.

Fixes #1205

Thanks to @Jeybla
2017-08-11 22:52:51 +02:00
Lemongrass3110
6b18ea56a0 Fixed x64 release mode not building all servers 2017-08-11 21:21:09 +02:00
Lemongrass3110
abfd1980de Made view_data for mob unit changes persistent (#2316)
Made view_data for mobs changes persistent

Fixes #2269

Thanks to @Yuchinin
---
Fixed reloadmobdb breaking the view ids

Fixes #2326

Thanks to @karlseven
---
Allowed updating mob's class to a pc class
Fixed sex change so that the client is automatically refreshed
Respawn the monster on clientside if the class is changed

Thanks to @Jeybla and @aleos89 for helping!
2017-08-11 19:27:33 +02:00
rAthenaAPI
9c6a89076d SQL synchronization 2017-08-11 00:53:48 +02:00
Lemongrass3110
b30d0fdf64 New NPC IDs and mob ID placeholders 2017-08-11 00:53:35 +02:00
Lemongrass3110
74cc00f88e Follow up to ac1cf04
Thanks to @CairoLee
2017-08-10 23:33:41 +02:00
Akkarinage
8417d7616b Details of import/ dirs and examples
Signed-off-by: Akkarinage <akkarin@rathena.org>
2017-08-10 00:34:43 +01:00
aleos
ac1cf0499a Follow up to dcbb2df
* Adjusted the checks to one-line.
* Corrected the map-server from spitting out an error for the achievements import file.
2017-08-08 21:12:20 -04:00
aleos
dcbb2df776 Corrected YAML file parsing
* Fixes #2323.
* YAML file parsing will now properly catch and display warnings when unable to read a file.
Thanks to @CairoLee!
2017-08-08 20:50:09 -04:00
Lemongrass3110
4a28c8c1b0 Follow up to 8310253
Achievement code now matches the Quest code.

Fixed a few small typos and removed some leftovers by @aleos89

Thanks to @CairoLee and @Tokeiburu
2017-08-09 00:45:51 +02:00
Jittapan Pluemsumran
71421a4268 Made global variables in header files extern and implement them in their respective source file. (#2318) 2017-08-08 15:33:39 +07:00
Lemongrass3110
8310253b84 Follow up to ee12429
The incomplete count was not updated before moving the memory that way the counter had the wrong value.
Also the memory manager would complain that the pointer is invalid when we have zero achievements.

Thanks to @CairoLee
2017-08-07 12:54:16 +02:00
Lemongrass3110
34aa59d82b Added missing MySQL column check for show_equip
Follow up to 983d164
2017-08-07 09:31:32 +02:00
Lemongrass3110
9084d01536 Fixed a compilation problem with CentOS
Fixes #2317

Thanks to @keitenai and @sanny1128
2017-08-07 07:59:09 +02:00
Jittapan Pluemsumran
a46e012619 Made cbasetypes.h more C++ compatible (#2315)
* Removed inline macro in cbasetypes.h
* Renamed swap macro to avoid name clash with std::swap
2017-08-07 06:33:47 +07:00
Lemongrass3110
829f0a1f59 Added dummy entries for the equip switch feature
With this the players will not get disconnected when they click the button or drag an item into the new part of the equip window.
2017-08-06 22:25:47 +02:00
Lemongrass3110
5424ab85c9 Fixed mob database reloading
Fixes #2304
Thanks to @uddevil and @anacondaqq

Closes #2305
Thanks to @vstumpf
2017-08-06 18:11:54 +02:00
Lemongrass3110
f8e4aabf87 Follow up to 70c14fa 2017-08-06 17:48:24 +02:00
Lemongrass3110
983d164b7d Fixed public equip switch not being saved
Fixes #2310

Thanks to @mrjnumber1
2017-08-06 13:49:29 +02:00
Lemongrass3110
43949b8ab6 Fixed misleading indentation in script.c
Fixes #2307

Thanks to @Akkarinage
2017-08-06 13:23:30 +02:00
Lemongrass3110
70c14fa567 Fixed achievement handling in OnPCStatCalcEvent
Fixes #2314

Thanks to @CairoLee
2017-08-06 13:10:34 +02:00
Lemongrass3110
ee1242908b Fixed a memory leak in achievementremove
Fixes #2313

Thanks to @CairoLee
2017-08-06 12:55:59 +02:00
Atemo
115c1b9f5f Fixed a typo in quests_eclage.txt issue #2311 2017-08-05 13:42:39 +02:00
rAthenaAPI
93cf197a2f SQL synchronization 2017-08-05 01:11:12 +02:00
Aleos
cd164d74cd Removed some hardcoded item checks (#2303)
* Fixes #991.
* Removed hardcoded checks for SC_ITEMBOOST, SC_EXPBOOST, and SC_JEXPBOOST.
* Players are able to still consume these items even if the status is already active.
* Corrected the item bonus for Malangdo Cat Can.
Thanks to @cydh!
2017-08-04 19:11:05 -04:00
Lemongrass3110
bbd42e7f12 Cleaned up character deletion code (#2296)
* Fixes #2271
Thanks to @Tokeiburu
2017-08-04 18:46:17 -04:00
rAthenaAPI
de3f924afc SQL synchronization 2017-08-05 00:38:48 +02:00
Aleos
fe5f1e115d Added a new item flag for delayed consumption (#2300)
* Added a new item flag for delayed consumption
* Fixes #550.
* The new flag will never consume the item.
* Supports script command itemskill.
Thanks to @cydh!
2017-08-04 18:38:39 -04:00
Atemo
9d6b3d06a9 Fixed readparam when 2nd parameter is a variable
Related issue #2276
2017-08-04 15:45:57 +02:00
Daegaladh
627a178ca9 Fixed a lot of "next" on Old Pharmacist (#2308)
* Corrected the usage of script command next which was causing the NPC dialogue to be combined in certain cases.
Thanks to @Daegaladh!
2017-08-03 14:17:21 -04:00
rAthenaAPI
915c9ddb26 SQL synchronization 2017-08-03 19:41:11 +02:00
aleos89
166836d7b3 Follow up to cd3f42e
* Swapped equip locations for Sarah's Left Earring (28310) and Sarah's Right Earring (28311).
2017-08-03 13:40:50 -04:00
Temtaime
cd3f42eb6a Fix swapped accsessories (#2281)
* Enum was swapped, you can view it by calling @itemlist with one accessory equipped.
Thanks to @Temtaime!
2017-08-03 13:38:59 -04:00
aleos89
4c62f581a8 Corrected guild bound item retrieval deletion
* Corrected a SQL statement deleting all guild bound items in the inventory table for offline characters.
Thanks to @Canoe!
2017-08-01 14:20:58 -04:00
aleos89
c0556a397e Follow up to 6748ff7
* Fixed pre-increment and pre-decrement operators for achievement condition parsing.
Thanks to @Lemongrass3110!
2017-07-31 14:25:31 -04:00
aleos89
f4338adab7 Follow up to 6581bac
* Fixed some compile errors.
* Clarified documentation for script command achievementupdate a bit more.
2017-07-31 13:13:23 -04:00
aleos89
6581bac83b Added script command achievementupdate
* Updates the specified achievement's value.
Thanks to @Tokeiburu!
2017-07-31 12:57:39 -04:00
rAthenaAPI
1e71d50cb4 SQL synchronization 2017-07-31 16:18:15 +02:00
aleos89
4af6860302 Corrected Crimson Spear class requirement
* Fixes #2297.
* Added missing support for Swordman, Transcendent Swordman, and Baby Swordman.
Thanks to @ToiletMaster!
2017-07-31 10:17:57 -04:00
Lemongrass3110
b2c5424af1 Fixed some memleaks in skill_require_db
Thanks to @Everade
2017-07-30 16:40:48 +02:00
Lemongrass3110
6748ff7e17 Fixed pre-increment and pre-decrement operators
Fixes #2176
2017-07-28 22:51:13 +02:00
aleos
0126759d00 Fixed some typos in the achievement database
* Corrected documentation in the import database.
* Corrected a typo for dependent achievements in renewal.
Thanks to @Atemo!
2017-07-28 16:47:16 -04:00
Lemongrass3110
dfbd6f6cc4 Fixed item selection dialog
Fixes #2293

This was broken in 95!!! different client versions

A real big thank you to @admkakaroto
2017-07-28 21:24:14 +02:00
Lemongrass3110
000786d991 Fixed some RODEX related compile warnings
Fixes #2286

Thanks to @Valorro
2017-07-28 17:50:51 +02:00
Lemongrass3110
d7c7d58d5d Fixed some compilation warnings in release mode
Fixes #2219

Thanks to @keitenai, @CairoLee and @kukuasir1
2017-07-28 17:43:01 +02:00
Lemongrass3110
1e63f892d9 Fixed release mode building of map-server
Related to #2294

Thanks to @keitenai and @admkakaroto
2017-07-28 15:11:28 +02:00
aleos
fdbdcb266e Renamed the Achievement SQL upgrade file
* Renamed the Achievement SQL upgrade file date to match the release date.
Thanks to @sikiro!
2017-07-27 19:54:04 -04:00
aleos
a5e18f1250 Allow negative Equipment Attack
* Fixes #2191.
* In renewal Equipment Attack can become negative and is not capped to 0.
Thanks to @jezznar and @reigneil!
2017-07-27 19:03:01 -04:00
Lemongrass3110
f0a07d6d80 Respecting enchants in combos
Follow up to 3f8ff5a

Thanks to @esu1214
2017-07-27 23:07:05 +02:00
Jeybla
3f8ff5a3fb Fixes Item Combos in same equip index. (#2080)
Fixes #1710

Thanks to @esu1214
2017-07-27 22:45:21 +02:00
f0und3r
b21f7c0a1f Config for guild alliance only by master (#2291)
Added a new configuration to allow to restrict alliance requests to the guild master.

Thanks to @f0und3r
2017-07-27 22:18:52 +02:00
Lemongrass3110
02135c4e2e Added support for RODEX 2017 (#2290) 2017-07-27 21:52:43 +02:00
Vincent Stumpf
3a55613537 Allows families to share exp (#2280)
* Fixes #2265
* Family is Mother + Child, Father + Child, or Mother + Father + Child
Thanks to @vstumpf!
2017-07-27 13:23:25 -04:00
rAthenaAPI
77e8d51570 SQL synchronization 2017-07-27 18:41:06 +02:00
aleos89
1bfd28ee67 Corrected some new shield defines
* Fixes #2292.
* Fixed Scutum, Shield of Flame, Shield of Gust, Shield of Water, and Shield of Earth resolving as weapons.
Thanks to @uddevil and @Lemongrass3110!
2017-07-27 12:40:50 -04:00
rAthenaAPI
51ef5595af SQL synchronization 2017-07-27 15:43:09 +02:00
Lemongrass3110
77718c325f Fixed weapon level of Tempest
Fixes #2287

Thanks to @ToiletMaster
2017-07-27 15:42:29 +02:00
rAthenaAPI
d113d24bce SQL synchronization 2017-07-27 15:33:12 +02:00
Aleos
7f5411da07 Initial release of the Achievement System (#2044)
* Information based on kRO patch notes.
- http://ro.gnjoy.com/news/update/View.asp?seq=163&curpage=1
* Includes Title System which is integrated into the Achievement System.
* Includes RODEX integration for rewards.
* Added new atcommand reloadachievementdb.
* Added new script commands achievementinfo, achievementadd, achievementremove, achievementcomplete, and achievementexists.
Thanks to @Lux-uri, @RagnarokNova, @Lemongrass3110, and @Tokeiburu for their help!
2017-07-27 09:33:03 -04:00
Lemongrass3110
433490a202 Fixed homunculus menu for a few clients 2017-07-27 01:37:58 +02:00
hazimjauhari90
cac49fda1b Updated alternate 3rd job bodystyles (#2288)
* Added Sorcerer class to the bodystyle atcommand.
2017-07-26 13:49:47 -04:00
Aleos
8b3e9cd28f Disable instances from using OnPC Events (#2278)
* Fixes #2273.
* Disable the use of OnPC Events in instance scripts since player's aren't actually attached to the event thus causing a crash.
Thanks to @Tokeiburu!
2017-07-24 17:38:05 -04:00
Lemongrass3110
7c2f3c4db9 Fixed 2017-06-07cRagexeRE and 2017-06-14bRagexeRE
Fixed #2285
Follow up to 2f453e7

Thanks to @hendra814
2017-07-24 19:32:16 +02:00
Lemongrass3110
cf0cfe84a7 Added script command progressbar_npc (#2272)
* Fixes #1473
Thanks to @Tokeiburu and @kukuasir1
2017-07-24 13:21:35 -04:00
Akkarinage
d912c5039b Removed SQL upgrade files dated prior to 2016 (#2282)
Signed-off-by: Akkarinage <akkarin@rathena.org>
2017-07-24 15:35:05 +01:00
Lemongrass3110
be15b62912 Follow up to a3c0590
Added a missing field check
2017-07-24 10:35:44 +02:00
hazimjauhari90
2f453e79ec Added shuffle packets for 2017-06-14bRagexeRE (#2277)
Thanks to @Rytech2 and @hazimjauhari90.
2017-07-23 19:03:38 +02:00
aleos89
ad036d08a4 Follow up to 94aa28a
* Resolved some compile warnings.
2017-07-20 13:36:23 -04:00
aleos89
94aa28aafc Follow up to df2c3e1
* Resolved a compile warning.
2017-07-20 13:24:44 -04:00
Lemongrass3110
eda85943f7 Fixed an issue with git hash lookup 2017-07-18 23:02:31 +02:00
Aleos
504b249d20 Updated Rogue Spirit potion bonus (#2225)
* Fixes #2139.
* Added missing 50% HP bonus.
* Removed extra 50% SP bonus.
* Cleaned up overall pc_itemheal function calculations.
Thanks to @mrjnumber1 and @exneval, and @Lemongrass3110!
2017-07-18 12:53:33 -04:00
Lemongrass3110
9eaabd5f6c Fixed mod permissions for private channels (#2262) 2017-07-17 23:25:55 +02:00
Lemongrass3110
e157e05c1c Fixed file order in map-server project for VS 2017-07-17 23:01:53 +02:00
aleos89
df2c3e1645 Fixed a compile warning for ADJUST_SKILL_DAMAGE
* Fixes #2231.
Thanks to @technoken!
2017-07-17 14:56:08 -04:00
Lemongrass3110
dae5030650 Fixed unitwarp to unwalkable areas for NPCs
Fixed #2270

Thanks to @Yuchinin
2017-07-16 22:29:48 +02:00
Lemongrass3110
d324cd1e25 Fixed a warning when obfuscation is disabled
Thanks to @sader1992 and @Jeybla
2017-07-16 16:36:46 +02:00
Lemongrass3110
19d7c44298 Removed packet_db copy from VS project
Thanks to @Everade
2017-07-16 16:15:34 +02:00
Aleos
d86c8a81be Expanded script command unitstopwalk (#2258)
Fixes #2254.
Added an optional flag to specify the types of methods to stop a unit from walking.
Created an enum for the unit_stop_walking flags.
Thanks to @Yuchinin and @Lemongrass3110!
2017-07-16 16:05:17 +02:00
Lemongrass3110
574c753945 Follow up to f0ab8d2
Fixed #2266

Thanks to @hendra814
2017-07-16 05:28:03 +02:00
Lemongrass3110
f0ab8d2a52 Overhauled and dropped packet db (#2263)
Adds support for a lot of missing clients and features almost all clients from 2016 and 2017
clientinfo.xml's version value will be ignored from now on
By setting PACKETVER the server will configure everything else on it's own from now on
Dropped is_clientver script command
And a lot more
2017-07-15 22:45:12 +02:00
aleos89
0d103bf6a7 Fixed a small bug with atcommand addwarp
* The function that creates the warp was using the wrong Y area argument.
Thanks to @mrjnumber1!
2017-07-14 13:54:52 -04:00
rAthenaAPI
77ad410607 SQL synchronization 2017-07-14 19:19:14 +02:00
aleos89
2bd0fd5a16 Corrected Shield of Death bonus
* Wearer should receive 10% more damage not gain 10% damage against normal monsters.
Thanks to Divine-Pride.net!
2017-07-14 13:18:58 -04:00
rAthenaAPI
4071801bdc SQL synchronization 2017-07-14 00:15:41 +02:00
Lemongrass3110
6e2ab60016 Fixed a warning for guild master change time
Fixed #2246

Thanks to @anacondaqq
2017-07-14 00:15:24 +02:00
Lemongrass3110
b0f5672a74 Fixed character deletion on 2014-10-22
Fixed #2251

Thanks to @lelouch22
2017-07-14 00:13:21 +02:00
Lemongrass3110
e00d843836 Mob DB placeholder 2017-07-14 00:10:58 +02:00
Akkarinage
d9d9042b87 Added Lasagna to atcommand go locations 2017-07-13 15:58:03 +01:00
rAthenaAPI
c6c8d0bc88 SQL synchronization 2017-07-10 18:27:38 +02:00
aleos89
7a3a64960b Corrected Siege Arrow Quivers
* Fixes #2249.
* Siege Arrow Quiver S should give Arrow S while Siege Arrow Quiver A should give Arrow A.
Thanks to @uddevil!
2017-07-10 12:27:23 -04:00
aleos89
9959c919dc VIP Drop calculation correction
* Fixes #2247.
* Adjusted the drop rate to properly float the value before converting to integer.
Thanks to @talesvalente!
2017-07-10 10:29:28 -04:00
aleos
0739275508 Cleaned up Hells Plant damage formula
* Fixes #2230.
Thanks to @RagnarokValor!
2017-07-08 13:18:04 -04:00
aleos
4dfeeade06 Resolve some compile warnings
* Fixes #2245.
Thanks to @lelouch22!
2017-07-08 11:42:53 -04:00
Lemongrass3110
b2aa7e698d Fixed thief's back sliding animation
Fixed #1914

Thanks to @zackdreaver for reporting and @aleos89 for his help!
2017-07-07 23:52:00 +02:00
aleos89
27a30ffa51 Removed an unused variable
* Follow up to bae5c31.
* Fixes #2241.
Thanks to @hazimjauhari90!
2017-07-07 08:36:30 -04:00
Aleos
bae5c31201 Miscellaneous atcommand parsing cleanups (#2238)
* Removed several typecasts.
* Adjusted atcommands that interpret character names to make use of atcmd_player_name.
* Added some missing comments.
* Adjusted a few return messages to match the appropriate scenario.
* Assume atcommand changeleader is successful after initial checks.
Thanks to @Lemongrass3110!
2017-07-06 17:15:45 -04:00
aleos
5462b08d28 Follow up to dc2c51c
* Added a missing break.
2017-07-06 16:43:21 -04:00
aleos
dc2c51cd83 Corrected Hell Inferno behavior
* Fixes #2236.
* Hell Inferno's shadow attack will now properly do elemental damage.
* Burning should only start when the fire attack successfully lands.
* Gave a slight delay to the shadow attack to mimic officials.
Thanks to @hartonox!
2017-07-06 16:38:45 -04:00
rAthenaAPI
2f35069fd6 SQL synchronization 2017-07-06 15:47:53 +02:00
Atemo
c7438aa0fd Corrected class requirement for item ID 2027 (issue #2240)
Thanks @hendra814
2017-07-06 15:47:31 +02:00
Aleos
5f7a143d3e Updated Summoner class (#1965)
* Fixes #1865.
* Updated and added new Summoner class skills.
* Information based on kRO patch notes.
- http://ro.gnjoy.com/news/devnote/View.asp?category=1&seq=1987966&curpage=1
* Updated previously implemented skills to better mimic official behavior.
Thanks to @RagnarokNova, Fyrus, and Jet for their hard work on gathering the information!
Thanks to @Grimfiend, @Atemo, @feltenc, @Lemongrass3110, @Felleonel, and @sanny1128 for the rapid test and reports!
2017-07-05 19:40:35 -04:00
Lemongrass3110
689a3ff9b3 Added a few missing cashpoint message comments 2017-07-03 22:25:14 +02:00
Lemongrass3110
f86ba2b6b8 Added a state check for the cash shop
If the cash shop is open you can not use the atcommands cash and points.
This is because no update packet exists and the cash shop only gets the current amount when you open the cash shop.
The second way to update the cash shop values is on a successful purchase.
2017-07-03 22:14:34 +02:00
Lemongrass3110
eaeec3973e Follow up to a3c0590
Fixed a wrong configuration value from testing the no-delay option.
2017-07-02 23:42:40 +02:00
Lemongrass3110
a3c0590508 Added some checks to guild leader change
Introduces two new configurations:
1) Allow guild leader changes in WoE (yes/no)
	Default: no
2) Delay between the changes (in minutes)
	Default: 1440 minutes = 1 day

Follow up to b51617c
2017-07-02 23:40:30 +02:00
Lemongrass3110
2072fe3643 Fixed unitwalk and unitwalkto label reset
Fixed #2222

Thanks to @zellkennedy
2017-07-02 18:21:33 +02:00
Atemo
4b8720b44c Removed extra tabs/spaces in script_commands.txt 2017-07-02 16:31:16 +02:00
Lemongrass3110
045f4be573 Fixed getequipid returning 0 instead of -1
Fixed #2228 and updated the documentation a little

Thanks to @talesvalente
2017-07-02 15:39:35 +02:00
Lemongrass3110
2aefe6c188 Fixed 2 compilation warnings 2017-07-02 15:06:27 +02:00
hazimjauhari90
ad80914981 Follow up to 7351b88 (#2200)
Merged HerculesWS/Hercules@73db1e2

The exact client date for the implementation of new party ui window is actually 2017-05-02dRagexeRE

Thanks to @4144, @Asheraf and @dastgir
2017-07-02 14:18:08 +02:00
Jittapan Pluemsumran
fa24b2134d Expanded bg_get_data script command (#2179)
* Expanded bg_get_data script command.
* Now able accept type parameter of 1 to list account IDs of battleground members.
* Originally implemented by @AnnieRuru at https://rathena.org/board/topic/72571-b/
2017-06-30 14:06:04 -04:00
Aleos
ba242eb9ed Resolved function timers not being freed properly (#2223)
* Fixes #2216.
* Properly free a function's timer when reloading scripts.
* Renamed script_stop_instances to not confuse it with the Instance System.
Thanks to @Tokeiburu!
2017-06-30 12:43:20 -04:00
Lemongrass3110
45e91e2a3a Added clan emblems to the NPCs (#2221)
* Added clan emblems to the NPCs
* Partial merge of/based on idathena/trunk@1f84c5d
Thanks to @exneval
2017-06-30 12:31:06 -04:00
Atemo
a8e4c83ef1 Updated sleep2: (#2208)
* Updated sleep2:
Currently sleep2 is supposed to return 0 or 1 if the unit is still attached. Actually mapserv throws a warning and the script end if the timer is still running and unit offline. With this update the script ends if there is no unit attached for sleep2.
* Corrected comments / docs
Thanks @secretdataz, @Lemongrass3110
2017-06-30 10:25:14 -04:00
rAthenaAPI
f0aed89aad SQL synchronization 2017-06-28 22:59:07 +02:00
Lemongrass3110
c8496a159d Mob DB placeholders 2017-06-28 22:58:31 +02:00
Lemongrass3110
9827bf6153 Fixed motd parsing
Fixed #2220

Thanks to @anacondaqq
2017-06-27 19:00:59 +02:00
Lemongrass3110
da036de523 Follow up to 4a2574c and 76786e2 2017-06-27 18:44:23 +02:00
Jittapan Pluemsumran
e87626cc76 Fixed compile error when ADJUST_SKILL_DAMAGE macro is defined 2017-06-27 16:45:19 +07:00
aleos89
20908ee9c0 Replaced some final uses of rand()
* Replaced some final left overs of rand() with rnd() from MT19937AR.
2017-06-26 14:36:31 -04:00
aleos89
a7c8751a10 Resolve an issue with script command strnpcinfo
* Resolved the NPC map name lookup for floating NPC returning arbitrary values.
2017-06-26 14:12:24 -04:00
rAthenaAPI
73a8ceb947 SQL synchronization 2017-06-26 00:54:32 +02:00
Atemo
a5afb06979 Initial release of lasagna npcs (#2105)
* First release of lasagna npcs (playing conversion).

* Added a new parameter for npctalk script command
Target for <flag>:
- bc_all  : Broadcast message is sent server-wide (only in the chat window).
- bc_map  : Message is sent to everyone in the same map as the source of the npc.
- bc_area : Message is sent to players in the vicinity of the source (default value).
- bc_self : Message is sent only to player attached.

* Implemented doram food buffs

* Updated npctalk:
*npctalk "<message>"{,"<NPC name>",<flag>};
- Empty string for "<NPC name>" now means attached NPC

* Added flag parameter for unittalk script command
*unittalk <GID>,"<text>"{,<flag>};
flag: Specify target
   bc_area - Message is sent to players in the vicinity of the source (default).
   bc_self - Message is sent only to player attached.
 
* Updated classchange script command:
classchange(<view id>{,"<NPC name>",<flag>});
flag: Specify target
   bc_area - Data is sent to players in the vicinity of the source (default).
   bc_self - Data is sent only to player attached.

* Updated Time Limit for quests to allow HH:MM format

Thanks @secretdataz, @Lemongrass3110, @aleos89, @Jeybla, @anacondaqq, @jenkijo, @sikiro, @admkakaroto for contributing !
2017-06-26 00:54:25 +02:00
Jey
809fc35b0e Follow up to 4a2574c.\r\nThanks to @Jeybla! 2017-06-26 01:24:54 +07:00
Jittapan Pluemsumran
4a2574c599 Migrate core source files to C++. Add yaml-cpp project as dependency (#2207)
By updating to this commit, Linux users have to regenerate Makefiles by re-running the configure script.

* Added yaml-cpp project as a 3rdparty library
* Migrated source files core to C++
* Updated configure scripts
* Make Linux installations compile *.cpp files
* Made server components' main source file C++
* Also made headers CPP-aware.

* Added basic C wrapper for yaml-cpp library
* YAML-node path is delimited by periods.
* Basic integer types and string are supported.
* Strings returned from this wrapper have to be freed with malloc.h::aFree
* Arrays (sequence) is supported with iterator wrapper.
* Remember to free every wrapper you create!

* Add yaml-cpp as dependency of common project
* Made the repo not ignore *.yml files

Thanks to @aleos89 and @Lemongrass3110.
2017-06-25 23:33:24 +07:00
Aleos
e804970c49 Added a config for Banana Bombs (#2211)
* Fixes #2095.
* Added a battle config banana_bomb_duration to allow people to adjust the default duration of Make Bomb - Banana Bomb.
2017-06-23 09:39:27 -04:00
rAthenaAPI
6c5fabad50 SQL synchronization 2017-06-23 00:37:11 +02:00
Aleos
d5b67f35a0 Remove all bAtkRate item bonuses from renewal (#2199)
* Fixes #2198.
* Removed all bAtkRate item bonuses from the renewal item database and replaced with bAddClass.
* Updated item bonuses to match current descriptions.
* Updated various Aegis names.
Thanks to @Tokeiburu!
2017-06-22 18:37:03 -04:00
aleos89
2a6277a3dc Adjusted NPC casted skill cast times
* Fixes #2045.
* NPC's that cast skills through script commands unitskilluseid or unitskillusepos with a given cast time will no longer be instant cast.
2017-06-22 14:39:05 -04:00
Jittapan Pluemsumran
6fc2399df1 Fixed compiler warnings
Thanks to @RadianFord
2017-06-21 22:31:01 +07:00
Jittapan Pluemsumran
bd33f01e53 Resolved compiler warning when compiling rAthena with clang++ 2017-06-21 22:26:49 +07:00
Atemo
56201aead5 Update re/refine_db.txt (normal rate), issue #1492 (#1558)
Thanks @zackdreaver
2017-06-21 10:29:46 -04:00
Lemongrass3110
3acf1aada3 Follow up to 58776da
Fixed a few compiler warnings.
Thanks to @RadianFord
2017-06-21 15:07:37 +02:00
aleos
9d7d368a33 Adjusted RODEX mail return and delete timers
* Adjusted from 14 -> 15 days.
2017-06-20 18:52:12 -04:00
Lemongrass3110
58776da1ac Basic RODEX support (#2186)
Adds basic support for the new mail UI RODEX.

Fixes #1567

Thanks to @RagnarokNova, @Atemo, @aleos89 and everyone else that helped me with this.
Additionally I would like to thank @jezznar and @hazimjauhari90 for their good testing in the pull request.
2017-06-21 00:00:29 +02:00
Lemongrass3110
76786e2977 Cleaned up visual studio project minicore (#2166)
Cleaned up leftover defines(PCRE_SUPPORT and FD_SETSIZE) in the projects
2017-06-20 22:25:24 +02:00
Lemongrass3110
d0ca637ddd Fixed vip_status command (#2184)
Fixed different return types for the same function call
Also introduced constants for better function usage.

Fixes #2183
Thanks to @anacondaqq
2017-06-20 19:22:46 +02:00
Ninja
1005b46735 Added instructions on how to get GitHub Hash (#2189)
* Added instruction on how to get GitHub Hash
2017-06-17 10:39:49 -04:00
rAthenaAPI
48df8e0730 SQL synchronization 2017-06-16 19:10:25 +02:00
aleos89
55935a1111 Corrected Sword Stick view type
* Fixes #2193.
* Changed from Mace to 1 Handed Staff.
Thanks to @uddevil!
2017-06-16 13:10:06 -04:00
Ninja
6b8dbf9a82 Fix for Issue #2143 False Duplication of Items (#2157)
* Fixes #2143.
* Resolves the inventory looking like there are duplicate items when players use atcommand refresh during trades.
2017-06-16 10:17:02 -04:00
rAthenaAPI
f52e4b61be SQL synchronization 2017-06-15 21:15:25 +02:00
Atemo
6ce846883e Updated produce_db.txt to include Combination Kit
Thanks @anacondaqq
2017-06-15 21:14:56 +02:00
Atemo
b9db8611c8 Updated map_cache.dat 2017-06-15 18:42:26 +02:00
aleos
3093824bbe Updated atcommand changegm area name update
* Changing a guild's leader will now properly update the respective player names to the area.
Thanks to @anacondaqq!
2017-06-14 20:11:46 -04:00
Jeybla
05a778d6a3 Fixes damage skills which ignored walls. (#1453)
* Fixes damage skills which ignored walls.
* The following functions were adjusted for the battle config skill_wall_check.
* Changed map_foreachinrange behavior:
- map_foreachinallrange is now the old map_foreachinrange
- map_foreachinrange does not check for a wall
- map_foreachinshootrange always checks for a wall
* Changed map_foreachinarea behavior:
- map_foreachinallarea is now the old map_foreachinarea
- map_foreachinarea does not check for a wall
- map_foreachinshootarea always checks for a wall
2017-06-14 19:28:59 -04:00
rAthenaAPI
5f61ee6ecd SQL synchronization 2017-06-14 19:35:39 +02:00
Jittapan Pluemsumran
887efa4ea4 Item DB update and script command adjustment (#1739)
* Made getequipid script command accept EQI_COMPOUND_ON (-1) for current equipment slot when running in item script.
* Added new equipment index for current item in item script context.
* Fixed typo in Fulbuk_Card item script.
* Fixed typo in Lich_Lord_Card effect.
2017-06-14 13:35:32 -04:00
Jittapan Pluemsumran
264af55b42 Change some GvG checks (#2172)
* Fixes #1600.
* Adjusted various GvG checks to ignore the Agit mode check.
* Blocked Anodyne on GvG zones.
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2017-06-12 17:59:44 -04:00
aleos89
399d11cd78 Follow up to 6d962d7
* Corrected a missed constant rename which caused a compile error.
2017-06-12 13:18:41 -04:00
Atemo
ad82c6b790 Fixed color by default in questinfo script command
Thanks @anacondaqq
2017-06-12 18:59:37 +02:00
aleos89
6d962d73d1 Corrected enum constant naming convention.
Follow up to 6c266ae.
2017-06-12 12:13:02 -04:00
rAthenaAPI
fa1c722149 SQL synchronization 2017-06-12 16:57:55 +02:00
Jittapan Pluemsumran
6c266ae1f5 Item package and Aegis names updates (#2170)
* Item DB Updates
* Updated Item Packages that were added based on idRO's updates
* Added some Item Packages
* Corrected some Aegis item names
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2017-06-12 10:57:46 -04:00
rAthenaAPI
65fa130896 SQL synchronization 2017-06-09 11:23:36 +02:00
Lemongrass3110
8e7d739fcf kRO data patch 2017-06-07 2017-06-09 11:23:04 +02:00
rAthenaAPI
1b27a15c15 SQL synchronization 2017-06-08 17:05:26 +02:00
aleos89
fb2ab5baff Corrected some Aegis item names
* Follow up to a89e051.
* Removed the remaining invalid characters.
2017-06-08 11:04:53 -04:00
rAthenaAPI
5be6d191d5 SQL synchronization 2017-06-08 16:10:04 +02:00
aleos89
a89e051ef5 Corrected some Aegis item names
* Removed some invalid characters for Aegis item names.
2017-06-08 10:09:44 -04:00
aleos89
128259407c Corrected a SQL buffer type for bound items
* Resolves the equip value of bound items being truncated.
Thanks to @Tokeiburu!
2017-06-08 09:42:54 -04:00
Lemongrass3110
7351b88c14 Follow up to 816d8ab
Thanks to @admkakaroto

Source: http://ro.gnjoy.com/news/update/View.asp?seq=208
2017-06-06 21:26:28 +02:00
aleos89
b2d72ca625 Fixed Status Recovery's interaction with skills
* Fixes #2188.
* Poem of the Netherworld will now properly be removed with Status Recovery.
Thanks to @awayne910!
2017-06-06 08:45:49 -04:00
Lemongrass3110
816d8ab2d0 Fixed party window for 2017 clients
Thanks to @mrdiablo for his help again!
2017-06-05 23:07:09 +02:00
Lemongrass3110
b51617cb73 Added support for 2017's guild leader change 2017-06-03 17:03:56 +02:00
Lemongrass3110
52ac564215 Fixed login on 2017-03-15 and later 2017-06-03 14:32:29 +02:00
Lemongrass3110
9412ebb9f7 Added support for 2016's guild packets
Thanks to @mrdiablo for his help.
2017-06-03 14:08:06 +02:00
Lemongrass3110
c212b2ed05 Follow up to 4a2bd82 2017-06-01 21:43:10 +02:00
Lemongrass3110
b00f1e06b1 Revert of d259ba3 2017-06-01 19:14:52 +02:00
Aleos
4a2bd82883 Updated Rune Knight Runestone effects (#2181)
* Fixes #2144.
* Based on kRO update: http://ro.gnjoy.com/news/devnote/View.asp?category=1&seq=3708477&curpage=1
* Turisus Runestone - Reduce amplified bonus damage when dealing normal attacks from 300% to 200%. Add an additional increase ATK-based physical damage by 250% instead on normal maps and 125% on VS maps. Rhydo Runestone won't benefit from this bonus.
* Asir Runestone - Adds a static +70 ATK. Party members now receive 1/2 of the bonus instead of 1/4.
* Pertz Runestone - Changed factor in formula from INT to STR.
* Removed the limit of Turisus Runestone, Asir Runestone and Pertz Runestone that can be held while increasing the limit of the other runestones from 20 to 60.
2017-06-01 12:06:16 -04:00
Aleos
f450538f4c Implemented Clan Instance support (#2178)
* Allows instances to be created specifically for clans.
* Added script command instance_check_clan.
Thanks to @Lemongrass3110 for the idea and testing!
2017-06-01 10:48:34 -04:00
Lemongrass3110
ddee418cd5 Fixed warps between 2 maps of the same instance
Right now they would have always used the source map of the warp as the target map.

Thanks to @kukuasir1
2017-06-01 11:37:38 +02:00
rAthenaAPI
a01dab7e2f SQL synchronization 2017-05-30 16:13:33 +02:00
Lemongrass3110
bff62ed117 Mob DB placeholders
Also added support for 2 new NPC IDs
2017-05-30 16:12:21 +02:00
Aleos
3e625dfdf9 Fixes Tetra Vortex Fire animation (#2091)
* Added a damage animation motion for Tetra Vortex Fire.
* Resolves the black animation being displayed.
Thanks to @exneval, @spinzaku, @secretdataz, @reigneil, and @feltenc!
2017-05-27 09:32:26 -04:00
Lemongrass3110
8d8712f85e Corrected some wrong inter packet documentation 2017-05-25 23:38:51 +02:00
Atemo
4d126047e8 Follow-up b7cd40e7a3
Restricted JOB_BABY_KAGEROU, JOB_BABY_OBORO and JOB_BABY_REBELLION to enter woe TE castles

Thanks @Lemongrass3110 !
2017-05-25 01:12:46 +02:00
Atemo
b7cd40e7a3 Restricted Summoner Jobs to enter in woe TE castles 2017-05-24 20:53:29 +02:00
Lemongrass3110
0fcc9b6be4 Follow up to 2043c95
Fixes #2102

Thanks to @whupdo
2017-05-23 00:02:34 +02:00
Lemongrass3110
bba3da2fd7 Fixed a missing alliance channel check
Fixes #2158

Thanks to @Canoe for the bug report and solution!
2017-05-22 22:36:27 +02:00
Jeybla
cc700f1fb5 Fixes Instance idle timer. (#2155)
* Fixes #2154
* Fixes an incorrect start of the instance idle timer.
* Thanks to generic!
2017-05-22 06:23:34 +02:00
hazimjauhari90
39dbb9abd3 follow up to 9716233 (#2130)
ZC_ACCEPT_ENTER2 will be used for client authentication again.

Used 2016-03-30 for now until the exact date is confirmed.

Credits to @4144 HerculesWS/Hercules@964268d

Thanks to @hazimjauhari90 for his pull request.
2017-05-22 00:50:11 +02:00
Jittapan Pluemsumran
6a75b17380 Skip MapN parsing if it is equal to EnterMap for instances (#2131)
Added a check to prevent instance from adding duplicate maps
2017-05-20 19:50:01 +02:00
Lemongrass3110
ae540f133f Fixed linux server shutdown order (#2151)
Fixes #2141

Thanks to @hurtsky, @RadianFord, @hazimjauhari90 and @aleos89
2017-05-20 18:40:08 +02:00
Aleos
ce4ebbe5bc Updated leftover pet variables to 64k support (#2129)
* Small follow up to 7cd82d0.
* Fixes #2121.
* Updated pet egg and pet equips to support 64k values.
Thanks to @TrueNoir!
2017-05-16 22:28:17 +02:00
Lemongrass3110
068ea0a4ba Fixed char saving after buyingstore transactions
Fixes #2148
Thanks to @Encon21
2017-05-16 20:33:03 +02:00
nanakiwurtz
c0476f6bfe Fixed chat color bug in Channel System (#2140)
`@channel setcolor` command failed to change the font color, resulting in black font color.
2017-05-16 15:27:53 +07:00
Jey
79ad0a1902 Fixed bAutoSpellOnSkill applied on wrong target.
* Target is now determined by the AutoSpell, not the casted one.
* Fixes #2136
2017-05-11 23:31:03 +02:00
Lemongrass3110
562d6d1e34 Added automatic clan member removal (#2135) 2017-05-10 23:27:20 +02:00
Lemongrass3110
55735ea8f8 Follow up to 9716233
Thanks to @hazimjauhari90 and @admkakaroto.
2017-05-10 23:23:48 +02:00
Jittapan Pluemsumran
d259ba3385 Added zlib1.dll to .gitignore 2017-05-10 20:30:41 +07:00
Atemo
809754379b Added 'warp2' NPC
Unlike 'warp', 'warp2' NPC will also be triggered by hidden player.
Thanks @secretdataz and @Lemongrass3110 !

* Replace script using OnTouch:([\r\n\t]+)warp by warp2

* Removed sprite id from warp duplicates in Bangungot instance

* Fixed a bug where warp/warp2 parsing is too greedy
2017-05-09 23:45:34 +02:00
rAthenaAPI
ea4d192aaa SQL synchronization 2017-05-09 13:34:27 +02:00
Atemo
1e1d7e54f0 Merged Faceworm Instance from idathena https://github.com/idathena/tr… (#1889)
* Merged Faceworm Instance from idathena 20f71d8c62

Credits to @exneval !
2017-05-09 13:34:19 +02:00
Lemongrass3110
9716233c84 Introducing the equip preview window
Fixes some bugs for 2016-09-21 onward, where you can preview how a item would like if you put it on.
This works on other people's vending and on your own inventory.

Thanks to @Rytech2 and @hazimjauhari90
2017-05-08 23:40:05 +02:00
Jittapan Pluemsumran
999c411ecd Update README.md 2017-05-08 15:13:37 +07:00
rAthenaAPI
b7f3ee9772 SQL synchronization 2017-05-06 16:16:12 +02:00
Atemo
f539d9797f Fixed issue #2110
bBaseAtk is capped and can't be sustracted

Thanks @jamon18 and @admkakaroto
2017-05-06 16:15:55 +02:00
rAthenaAPI
e59d5d78d8 SQL synchronization 2017-05-06 15:36:56 +02:00
Atemo
6cc9b955f5 Changed Vellum Glaive effect to follow kRO description
issue #2109

Thanks to @jamon18
2017-05-06 15:36:38 +02:00
Jittapan Pluemsumran
4a004ad4b8 Merge branch 'feature/cpp' 2017-05-05 16:53:25 +07:00
Jittapan Pluemsumran
2e524f18fc Removed an extra C linkage declaration in core.h 2017-05-05 16:50:58 +07:00
aleos89
a3282c1730 Corrected a compile error
* Follow up to 900548f.
2017-05-04 13:28:06 -04:00
aleos89
900548f34b Corrected a compile warning
* Follow up to a15661e.
2017-05-04 13:20:17 -04:00
Aleos
12756ba8ec Homunculi configuration adjustments (#2092)
* Fixes #2073.
* Homunculi will no longer autoloot items by default.
* Homunculi will not Vaporize if their HP is below 80% when the master dies.
* The battle configuration homunculus_auto_vapor is now a percentage value to allow for further customization.
Thanks to @TheNoobCompany!
2017-05-04 12:28:57 -04:00
Cydh Ramdh
a15661ecfa RE:Initial release script commands for Item Random Options (#2066)
* Added script commands getitem3, getitembound3, makeitem3, rentitem3, countitem3, and delitem3.
2017-05-04 12:11:43 -04:00
aleos89
4bb6aa13a0 Revert "Status Change display in status window (#1481)"
This reverts commit a75133eb4d.
2017-05-04 10:25:44 -04:00
aleos89
9ba2513ff4 Revert "Fixed hidden statuses not being applied"
This reverts commit ef3ad997c7.
2017-05-04 10:24:04 -04:00
Jittapan Pluemsumran
7749c18a06 Prepared the project for mixing C++ code in 2017-05-03 22:32:46 +07:00
Jeybla
cc59048d86 Adjusted Feint Bomb behavior near a Maelstrom Cell. (#2107)
* Feint Bomb near a Maelstrom Cell now matches the official behavior.

Rathena before:
* FB was possible to use near Maelstrom, but didn't trigger an explosion

Now:
* FB fails near Maelstrom, displaying a "skill failed" message.
* It's possible to use FB right after it failed.
2017-05-03 07:54:39 +02:00
Aleos
10b512b859 Updated Giant Fly Wing behavior (#2098)
* Party members should be recalled to their own positions in a 3x3 area around the party leader.
* Added two missing client messages.
* Adjusted script command warpparty to support range values.
* Adjusted script command warpparty to not warp the party leader if "Leader" is passed as the map.
2017-05-02 20:51:26 -04:00
Lemongrass3110
cac27fc3d5 Refactored script_rid2sd (#2062)
It now matches the other script_***2sd or script_***2bl functions.
Also added script_mapid2sd for mapid to map session lookups.
Cleaned up the order of some of the checks in the script functions that used script_rid2sd and sometimes checked the validity of the retrieved session to late or even never at all.
2017-05-03 00:17:46 +02:00
aleos
ef3ad997c7 Fixed hidden statuses not being applied
* Follow up to a75133e.
* Fixes #2111.
Thanks to @Canoe, @Lemongrass3110, and @Jeybla!
2017-05-02 17:33:54 -04:00
rpdigos
07e1a670bc Replaced strcopy with memmove (#2061)
Shortened the original title and commit message a little.
Thanks to @rpdigos!

Original commit message:
When we try to run the application we got the signal Abort trap 6 and the application is interrupted by the OS.
This issue is related with the fact that when using strncpy the source and destination string should not overlap, as we can see in the man page:

man stpncpy()
...
The source and destination strings should not overlap, as the behavior is undefined.

We've replaced it by the function memove:

man memmove()
...
The two strings may overlap; the copy is always done in a non-destructive manner.

Follow ec1fe15d7d
2017-05-02 23:30:47 +02:00
Lemongrass3110
799f781ac2 Fixed MySQL 5.7 compatibility (#2074) 2017-05-02 22:59:05 +02:00
Playtester
b6ff1c6030 Claymore Trap and Blast Mine in Renewal (fixes #1028, fixes #2113)
* Reverted 574f69e
* These traps were already working fine before that commit, so no further changes needed
2017-05-02 20:03:25 +02:00
Jittapan Pluemsumran
cacd98ddeb Merge pull request #2089 from rathena/refactor/windows-build
* Dropped support for VS older than 2012
* Delete all solutions
* Added a new global VS2013 solution (2015+ also supported by this solution)
* Added x64 build support for Windows (Thanks to @Lemongrass3110)
2017-05-02 12:52:39 +07:00
Jeybla
9e6b02ae59 Fixes a getcharid error message. (#2106)
* In quests/quests_morroc.txt Continental Guard.
2017-04-29 19:20:25 +02:00
Lemongrass3110
4a6498665c Enabled x64 in appveyor 2017-04-28 15:13:30 +02:00
Lemongrass3110
be9b13d0bc Removed dbghelp.dll
Follow up to b1881ea by @wilkemeyer
2017-04-28 14:54:48 +02:00
Lemongrass3110
6bbce0f372 Merge branch 'master' into refactor/windows-build
Added all missing import-tmpl copies to the map-server project

# Conflicts:
#	vcproj-10/map-server.vcxproj
#	vcproj-12/map-server.vcxproj
#	vcproj-13/map-server.vcxproj
#	vcproj-14/map-server.vcxproj
2017-04-28 14:38:07 +02:00
Lemongrass3110
07b2ef28a0 Added Visual Studio x64 support
Removed the .dll files for the libraries from the root directory.
They are now copied from the 3rdparty folder when your build finishes and the project requires them.
If you clean your project they will also automatically be removed from the root directory again.

Updated libraries:
MySQL 5.0.20 -> 6.1.9
PCRE 8.30 -> 8.33.0.1 UTF8

Both Win32 and x64 are now supported. Remember to clean and build when you switch the target platform, otherwise you will end up with the wrong .dll files at runtime.
2017-04-28 13:40:08 +02:00
rAthenaAPI
bf2461f2b0 SQL synchronization 2017-04-28 00:43:16 +02:00
Cydh Ramdh
e59cdfff90 RE:Initial release item random option for monster drop (#2065)
* Initial release item random option for monster drop
* To add item for monster with random option group, see 'db/[pre-]re/mob_drop.txt'
* To add item random option group with random option group, see 'db/[pre-]re/mob_item_randomopt_group.txt'
* Default entries for random options are follow iRO Crimson/Scarlet Weapon based on
  * "[Renewal] Episode 15.2 Crimson Weapon System", see http://www.playragnarok.com/news/updatedetail.aspx?id=280&p=1.
  * File uploaded by Oda (iRO's CM) on https://forums.warpportal.com/index.php?/topic/168763-fansitedb-information-distribution-and-request-station/?p=2495922

Signed-off-by: Cydh Ramdh <cydh@pservero.com>

* Follow up 3b7db36288
* Moved `RDMOPTG_Crimson_Weapon` from const.txt to `enum Random_Option_Group` in `itemdb.h`.
* Removed `RDMOPT_WEAPON_ATTR_POISON`, `RDMOPT_WEAPON_ATTR_TELEKINESIS`, and `RDMOPT_WEAPON_ATTR_UNDEAD` from Crimson Weapon random group (`RDMOPTG_Crimson_Weapon`), thanks to @atemo
* Added db header for impot-tmpl files, thanks to @secretdataz

Signed-off-by: Cydh Ramdh <cydh@pservero.com>

* Follow up ac0cdd8dc8
* Fixed type on steal checking

Signed-off-by: Cydh Ramdh <cydh@pservero.com>

* Cleared some drop slot for crimson weapon
2017-04-28 00:43:09 +02:00
Lemongrass3110
31cd394d1d Follow up to 4cfaa18
Removed the duplicated lines
Also removed project dependencies for libconfig and mt19937ar from common-minicore
2017-04-27 11:06:59 +02:00
Jittapan Pluemsumran
4cfaa1817b Removed unneccessary library includes 2017-04-27 15:05:08 +07:00
Jey
cbc3b260c8 Follow up to caed38927a
* Fixed a possible map server crash
* Fixes #2094

Thanks to @spangler88.
2017-04-26 15:03:40 +02:00
Lemongrass3110
4348ef3b89 Added a -D equivalent for msbuild
Fixes appveyor not building in pre-renewal mode
See original commit 15b4050
2017-04-26 03:44:37 +02:00
Lemongrass3110
bfeb697933 Redirected build output into the .vs folder 2017-04-26 03:38:08 +02:00
Lemongrass3110
3995fff863 Updated gitignore for the moved shell scripts
Added some of the new visual studio output files to the ignore list too
2017-04-26 03:18:58 +02:00
Jey
4f99567e41 Channel System message correction
* Follow up to c87dba5.
* Fixed the member limit message pointing to the wrong index.
2017-04-26 03:18:48 +02:00
Lemongrass3110
448e5e893f Moved the bat scripts into the tools folder
Added post build copies and post cleanup deletions for the required bat scripts for each project
2017-04-26 02:58:39 +02:00
Lemongrass3110
5923633ad7 Added deprecation functionality to script engine (#2064)
This commit adds support to deprecate script commands or constants.

Based on the following two commits by @MishimaHaruna
HerculesWS/Hercules@ce85609
HerculesWS/Hercules@6ae9045
2017-04-25 23:43:29 +02:00
aleos89
b4857cca83 Follow up to 452d9c6
* Added missing cases for Midnight Frenzy and Silvervein Rush.
2017-04-25 14:06:12 -04:00
Aleos
452d9c60eb Updated Homunculus S skill failure messages (#2082)
* Fixes #2058.
* Added missing skill failure messages for Homunculus S.
* Eternal Quick Combo can no longer be used on Status Immune monsters.
* Disabled the Style Change message for Eleanor. Aegis does not display a message when switching fighting style.
Thanks to @feltenc and @Jeybla!
2017-04-25 13:33:05 -04:00
aleos89
f1af3210d6 Follow up to eb0a79f
* Fixed Blessing ending Curse before the Curse check.
2017-04-25 12:46:57 -04:00
Jittapan Pluemsumran
fcba7b7213 Added missing EOL in project files 2017-04-25 23:11:58 +07:00
Jittapan Pluemsumran
7fb245b8e6 Updated appveyor.yml to use new solution. 2017-04-25 21:14:43 +07:00
Jittapan Pluemsumran
da36b26572 Remove rAthena-15.sln 2017-04-25 21:05:30 +07:00
Jittapan Pluemsumran
f9a0f81d4e Resolve compile errors 2017-04-25 21:05:18 +07:00
Jittapan Pluemsumran
96073607bf Merge branch 'master' into refactor/windows-build
# Conflicts:
#	vcproj-10/char-server.vcxproj
#	vcproj-10/char-server.vcxproj.filters
#	vcproj-10/login-server.vcxproj
#	vcproj-10/map-server.vcxproj
#	vcproj-10/map-server.vcxproj.filters
#	vcproj-10/mapcache.vcxproj
#	vcproj-12/char-server.vcxproj
#	vcproj-12/char-server.vcxproj.filters
#	vcproj-12/login-server.vcxproj
#	vcproj-12/map-server.vcxproj
#	vcproj-12/map-server.vcxproj.filters
#	vcproj-12/mapcache.vcxproj
#	vcproj-13/char-server.vcxproj
#	vcproj-13/char-server.vcxproj.filters
#	vcproj-13/login-server.vcxproj
#	vcproj-13/map-server.vcxproj
#	vcproj-13/map-server.vcxproj.filters
#	vcproj-13/mapcache.vcxproj
#	vcproj-14/char-server.vcxproj
#	vcproj-14/char-server.vcxproj.filters
#	vcproj-14/login-server.vcxproj
#	vcproj-14/map-server.vcxproj
#	vcproj-14/map-server.vcxproj.filters
#	vcproj-14/mapcache.vcxproj
#	vcproj-9/char-server.vcproj
#	vcproj-9/dbghelpplug.vcproj
#	vcproj-9/login-server.vcproj
#	vcproj-9/map-server.vcproj
#	vcproj-9/mapcache.vcproj
2017-04-25 21:00:33 +07:00
rAthenaAPI
f56a3f6d1e SQL synchronization 2017-04-25 15:50:12 +02:00
Arashi
a040a52764 Fixed some Armors wLV and refineables (#2077)
Fixed armors level 1 weapons
Fixed accessories and lower headgears being refinable

Thank you @crazystorm2017 !
2017-04-25 15:50:05 +02:00
Jeybla
a7c682ff12 Adjusted skill_nocast_db settings. (#2081)
For the following skills:
* SC_MANHOLE - PvP only
* SC_DIMENSIONDOOR - town and field, doesn't work in PvP
* SC_CHAOSPANIC - No restriction
* SC_BLOODYLUST - Enabled in town

Fixes #1496.

Thanks to @Everade and @aleos89.
2017-04-25 14:37:44 +02:00
Lemongrass3110
cdc0527b71 Converted some scripts to warps (#1947)
Credits to @Atemo!
2017-04-24 23:54:43 +02:00
aleos89
c3ad04dc90 Channel System message correction
* Follow up to c87dba5.
* Fixed the join message pointing to the wrong index.
Thanks to @CairoLee!
2017-04-24 10:18:51 -04:00
Cydh Ramdh
c87dba5a52 Channel System is Expanded! (#1933)
* Many changes on conf/channel.conf!
- Now capable of setting default values for channels through the config such as the channel name, channel password, member capacity, chat color, chat delay, and more.
* Many new channel script commands!
- Added script commands channel_create, channel_setopt channel_setcolor, channel_setpass, channel_setgroup, channel_chat, channel_ban, channel_unban, channel_kick, and channel_delete.
2017-04-19 14:12:00 -04:00
rAthenaAPI
97f989f7d8 SQL synchronization 2017-04-19 10:36:12 +02:00
Akkarinage
25da0fe4fd NPC ID Updates (#2075)
Also added new commented Mob IDs to mob_db.txt

Signed-off-by: Akkarinage <akkarin@rathena.org>
2017-04-19 10:36:05 +02:00
Akkarinage
58bad46c32 Misc grammar changes to documentation.
Signed-off-by: Akkarinage <akkarin@rathena.org>
2017-04-19 03:13:17 +01:00
Akkarinage
33c31ca368 Updated default PACKETVER
It makes no sense to use 20130807 as the default PACKETVER when we use 55 (20151104) as the default packet_ver in /db/packet_db.txt

Signed-off-by: Akkarinage <akkarin@rathena.org>
2017-04-18 15:23:43 +01:00
rAthenaAPI
e18d636d79 SQL synchronization 2017-04-17 23:03:14 +02:00
aleos
38e0496027 Removed empty script check for usable items
* Fixes #2069.
* Usable items that don't have a script will now execute as normal.
* Items that have a special effect with no script were not displaying their effect since the check was stopping any execution.
* Cleared up some usages of script command end.
Thanks to @LiamKarlMitchell!
2017-04-17 17:03:03 -04:00
Aleos
a75133eb4d Status Change display in status window (#1481)
* Adjusted the way some status changes display in the player's status window.
- Some status changes are hidden from the display.
* Katar critical bonus is no longer shown in the status window.
- Added a configuration to enable or disable the critical display for Katars.
* SC_INCCRI now has doubled critical rate while wearing Katars. Thanks to @Limestone!
* Refactored some status_calc_* functions to no longer be static and moved them to the header.
2017-04-14 23:56:34 -04:00
Lemongrass3110
ed24be1625 Cleaned up MAPID definitions
Fixed the wrong initialization for baby summoner, who was actually a baby swordman summoner like this.
Follow up to 39e54d6
2017-04-14 23:34:25 +02:00
rAthenaAPI
ccefbd9ece SQL synchronization 2017-04-14 22:38:31 +02:00
Lemongrass3110
7d20033d5d Added support for the latest NPC IDs 2017-04-14 22:38:19 +02:00
hazimjauhari90
ad0731fec1 follow up to 39e54d6 (#2056)
* Corrected Baby Kagerou/Oboro & Baby Rebellion base level to match respective adult base level.
2017-04-14 12:26:15 -04:00
Lemongrass3110
2029f2e708 Added constants for new baby jobs
Follow up to 39e54d6
2017-04-14 09:44:04 +02:00
Lemongrass3110
384917b83f Added current_equip_item_index check
getrefine and getequipweaponlv(-1) should only be useable within item scripts.
2017-04-14 00:17:23 +02:00
aleos
800f49181f Pain Killer damage correction
* Added a check so Pain Killer damage doesn't heal targets.
Thanks to @Jeybla!
2017-04-12 22:37:25 -04:00
aleos
caed38927a Updated Feint Bomb to match official behavior
* Fixes #728 and fixes #1070.
* Players can no longer use skills while in the hidden state from Feint Bomb.
* Targets will now properly release the caster as a target and follow the bomb.
Thanks to @Tokeiburu, @MrAntares, and @stealth62!
2017-04-12 16:41:27 -04:00
Atemo
c098d0c518 Fixed wrong condition in monk.txt issue #2057
Thanks @TheNoobCompany !
2017-04-12 20:42:25 +02:00
aleos
1261d92c43 Corrected Feint Bomb behavior (fixes #1999)
* Feint Bomb will no longer give players permanent effects of AoE when they backslide into them.
* Feint Bomb no longer consumes 1 SP every second while hidden.
* Stealth Field will now apply to all targets, not just allies (party + guildmates).
* Miscellaneous cleanups for Neutral Barrier and Stealth Field.
Thanks to @feltenc!
2017-04-11 21:17:23 -04:00
Akkarinage
9af37d21b7 Removed ancient SQL Upgrade files.
* Old SVN upgrades are no longer needed.
* Retained the last 3 years of upgrades.

Signed-off-by: Akkarinage <akkarin@rathena.org>
2017-04-11 17:58:18 +01:00
hazimjauhari90
b7d802ad55 follow up to 39e54d6 (#2054)
* Fixed job name display for baby expanded jobs.
2017-04-10 19:49:44 -04:00
Lemongrass3110
100d71e659 Remove password outputs on login server console (#2052) 2017-04-11 00:23:03 +02:00
Lemongrass3110
780ebd16db Fixed debug output for missing char server tables 2017-04-10 22:02:35 +02:00
Liam Mitchell
398619556a Update dts_warper.txt moc_ruins wrong id. (#2038)
* Update dts_warper.txt moc_ruins wrong id.

Wrong display ID and directions.
#2037

* Tweaked dts_warper.

According to what @Atemo said in issue #2037
2017-04-10 19:04:58 +02:00
aleos
0c2ccc77c7 Added script command getfreecell
* The command can randomly find a free cell on the given map and store the references to the found cell in the given variables.
* Check out the script commands documentation for more information.
Thanks to @Tokeiburu!
2017-04-10 10:45:33 -04:00
rAthenaAPI
425c0a6f09 SQL synchronization 2017-04-10 16:33:11 +02:00
hazimjauhari90
f57f3e7db1 Added missing quest ID in quest_db.txt (#2033)
* Added missing quests to the quest database
2017-04-10 10:33:04 -04:00
aleos
4b9ade33ee Fixed sleep timers getting freed twice
* Fixes #2042.
Thanks to @Encon21!
2017-04-06 21:01:08 -04:00
aleos
d6594eefda Re-link monster drop data with item data
* Fixes script commands addmonsterdrop and delmonsterdrop to update the monster drop data that is stored within the item data struct.
* This refreshes atcommand whodrops and other functions that use this data.
Thanks to @technoken!
2017-04-06 18:42:27 -04:00
hazimjauhari90
39e54d65bb Expanded baby jobs (#2039)
* Added support for expanded baby jobs.
* All jobs listed below are now fully playable.
- Baby Summoner
- Baby Ninja
- Baby Kagerou
- Baby Oboro
- Baby Taekwon
- Baby Star Gladiator
- Baby Soul Linker
- Baby Gunslinger
- Baby Rebellion
2017-04-06 18:00:30 -04:00
Jeybla
72fe4cd515 Adds chatmes (scriptcommand). (#1924)
* Adds chatmes script command.
* chatmes writes a given message to the waitingroom of the NPC.
2017-04-06 17:55:58 -04:00
Atemo
73b798bf12 Removed extra semi-colon 2017-04-06 14:40:36 +02:00
Lemongrass3110
ec1fe15d7d Fixed an error with renewal table loading
Follow up to 5d22e1c
Fixes #2040
Thanks to @Yuchinin
2017-04-05 22:33:15 +02:00
Lemongrass3110
5d204e55d3 Merge branch 'master' of https://github.com/rathena/rathena 2017-04-05 21:57:20 +02:00
Playtester
0a35e3a976 Bomb used by monsters (fixes #2041)
* When Bomb used by monsters deals damage, it is now always considered melee damage
2017-04-05 17:37:50 +02:00
Atemo
a6b252c01e Added rid check in SaraMemory.txt (issue #2032) 2017-04-04 19:20:26 +02:00
Lemongrass3110
858634112c Merge branch 'master' of https://github.com/rathena/rathena 2017-04-03 22:39:06 +02:00
Lemongrass3110
3cce333fc6 Added cash shop support for 2012-04-10
Fixed #1982
Thanks to @anacondaqq!

These packets were actually added way before this client date, but for now this is the earliest packet version, where we support the cash shop for now.
2017-04-03 22:35:11 +02:00
Lemongrass3110
c218eb6120 Fixes #2022 (#2023)
Thanks to @Joy-Ro
2017-04-03 22:12:28 +02:00
Lemongrass3110
f45f9efda0 Merge branch 'master' of https://github.com/rathena/rathena 2017-04-03 22:01:13 +02:00
Playtester
4369b4715b Fixed compiler warning (follow-up to 5d90380) 2017-04-03 20:40:09 +02:00
Playtester
5d90380fcc Claymore Trap, Blast Mine, Land Mine renewal damage (fixes #2036)
- Fixed a rounding issue when calculating trap damage
2017-04-03 20:33:55 +02:00
rAthenaAPI
6d58946864 SQL synchronization 2017-04-03 15:31:27 +02:00
Jeybla
f0b7feb3f6 Makes Breeze Armor (Shadow) 24024 refineable. (#2034) 2017-04-03 15:31:22 +02:00
Atemo
82967fceb4 Updated doc/sample/instancing.txt follow up cb703c5bfa 2017-04-01 16:42:39 +02:00
Aleos
e655a73815 Corrected a random option warning
* Fixed a small typo in the itemdb_read_randomopt.
2017-03-31 12:40:53 -04:00
aleos89
c1ef0aa4ce Fixed invalid vending items being saved
* Fixes #2030
* Resolves a potential case of an invalid item being saved to the vending table resulting in a random item being sold for 0 zeny.
Thanks to @Tokeiburu!
2017-03-31 12:24:24 -04:00
Lemongrass3110
2a7fecbe24 Merge branch 'master' of https://github.com/rathena/rathena 2017-03-28 22:59:24 +02:00
Aleos
ebc39cda6b Follow up to 5fa2db9 2017-03-28 15:57:43 -04:00
Lemongrass3110
92b4a56919 Follow up to 11f5009
Sorry I should not rush.
2017-03-28 19:41:44 +02:00
Lemongrass3110
3b225f6f0c Rebase 2017-03-28 19:39:38 +02:00
Lemongrass3110
11f5009e82 Partial revert of b8d1dc6
Sorry guys.
2017-03-28 19:38:51 +02:00
Lemongrass3110
5fa2db993d Fixed #2028 2017-03-28 19:36:40 +02:00
Lemongrass3110
b8d1dc6b14 Fixed #2027
Thanks to @RadianFord
2017-03-28 19:34:55 +02:00
Atemo
0b5687db13 Fixed a typo in GeffenMagicTournament.txt issue #2002
Thanks to @srhmike
2017-03-27 18:35:42 +02:00
Radian
12ee8aa2a7 Updated alternate 3rd job bodystyles (#2021)
* Added Shadow Chaser, Minstrel, and Wanderer classes to the bodystyle atcommand.
Thanks to @RadianFord and @admkakaroto!
2017-03-27 11:23:24 -04:00
Lemongrass3110
6eb4cc408f Fixes #2004
Thanks to @daisyanne1380

Make sure to make a backup of your tables' content before running the upgrade script - in case of any conversion problems that might occur.
2017-03-27 00:31:02 +02:00
Lemongrass3110
55e445b588 Fixes #2005
Thanks to @cold-hr for reporting and @anacondaqq for the fix.
2017-03-26 22:50:52 +02:00
Atemo
08338e0a64 Summoner Eden Group Equip Quest Implementation
Edit from PR https://github.com/rathena/rathena/pull/1152
Credit @MysticFurur0RE
2017-03-22 21:43:08 +01:00
Atemo
f581d26c21 Partial fix of issue #2002 (cannot access instance variable "'ins_nyd2") 2017-03-22 21:30:33 +01:00
hazimjauhari90
29b06700ff Fixed job name display (#2013)
* Corrected job_name conversions because of the gap created from special event jobs.
Thanks to @hazimjauhari90!
2017-03-22 14:21:47 -04:00
Atemo
17a273864a Added missing quest ID in quest_db.txt (issue #2012)
Partial fix of issue #2002, Incorrect use of 'close' command in quests_eclage.txt
2017-03-20 15:30:46 +01:00
rAthenaAPI
744042066b SQL synchronization 2017-03-20 02:07:34 +01:00
Cydh Ramdh
870001c755 * Changed getexp to getexp2 for pre-re items.
* Fixed #2001
  * Novice Fly Wings (12323) now cannot be used in `noteleport` map
  * Novice Butterfly Wings (12324) now cannot be used in `noreturn` map

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2017-03-20 08:06:31 +07:00
Mr.Akarachai Jaitrong
61ff2512e6 Update main.sql (#2006)
* Added SQL table creation checks for db_roulette, clan, and clan_alliance tables.
Thanks to @ex0ample!
2017-03-17 11:30:34 -04:00
Playtester
8f82d046c0 Monsters placing traps (see #1998)
* Monsters can no longer place traps on themselves, the skill will fail
2017-03-08 22:34:44 +01:00
Akkarinage
08e862c0e0 Removed Doxygen related files, since we no longer use it.
Signed-off-by: Akkarinage <akkarin@rathena.org>
2017-03-07 21:29:14 +00:00
aleos89
601857819f Added missing Quest DB entries (fixes #1997)
* Added missing Thor Volcano Base Camp quest database entries.
Thanks to @Indigo000!
2017-03-07 10:45:47 -05:00
Atemo
f6488a2a9e Corrected a warp destination typo in The Sign quest (credit c215c9c21a) 2017-03-06 23:26:10 +01:00
Atemo
c6e09fdf35 Added parenthesis in tu_ma_th01.txt 2017-03-06 23:21:05 +01:00
Jittapan Pluemsumran
1a233da1ab Removed an extra semicolon in kafras.txt 2017-03-06 18:26:14 +07:00
Lemongrass3110
800f22b77b Removed an unused character variable
Fixes #1976
2017-03-02 23:20:45 +01:00
Lemongrass3110
43ba736401 Follow up to 7ecaf8b
Fixed a typo
2017-03-02 22:30:26 +01:00
Lemongrass3110
7ecaf8bc74 Added support for 0xa3d 2017-03-02 22:28:00 +01:00
Playtester
40f6b7f44a Taekwon Kick Damage, Sprint, Flying Kick (fixes #1991)
* Taekwon Kicks no longer get a percentual damage increase from learning Sprint
* Counter Kick, Heel Drop, Storm Kick and Counter Kick now get a +10 ATK bonus per level of Sprint
-- This bonus is on top of the normal +10 ATK bonus from Sprint for fists
* Using Flying Kick as a counter will now deal 4%*baselevel damage
* Using Flying Kick while running will now deal 4%*baselevel damage regardless of skill level used
-- When having the spurt buff on top, it will deal 8%*baselevel damage instead
* Tumbling is now properly removed on logout
* Fixed a problem that sometimes caused Tumbling to become unusable
2017-03-02 21:23:33 +01:00
Lemongrass3110
da23d877d1 Fixed a compiler warning
Fixes #1988
Thanks to @cold-hr
2017-03-01 09:42:36 +01:00
Atemo
4270ef876d Fixed #1981 Clearchus Mercenary Npc
- Delete / give the quest when the time limit has been reached
2017-02-24 12:42:09 +01:00
Matheus Macabu
4a2964f763 Fixed some misc. stuff (#1974)
* Empty string checking
* Unsigned/signed variables changed to fit their context
* Assignment order within if clause
* hom_is_active already checks for sd->hd
* Fixed SC_MDEFSET being set by the wrong condition
* channel_ajoin inner for has same iter variable as outer
2017-02-23 10:14:21 -05:00
aleos
8bdaf1e920 Small VIP cleanups
* Adjusted default battle_config struct values to match the configuration file.
* Follow up to 251c400 to clean up the VIP Gemstone check.
2017-02-21 20:51:17 -05:00
aleos
251c40061b Expanded VIP Gemstone configuration (fixes #1975)
* Expanded the VIP Gemstone configuration so it has the following options:
- 0 = Disabled
- 1 = Behave like Mistress Card
- 2 = Remove all gemstone requirements (default)
2017-02-21 20:27:57 -05:00
aleos
2931b76b7b Adjusted check to remove prereqs from skill_tree
* Fixes #1973.
* Setting a prerequisite skill to 0 will now remove it rather than skip it in the skill_tree import.
Thanks to @KrokusPokus!
2017-02-20 09:02:43 -05:00
rAthenaAPI
d20c6b5080 SQL synchronization 2017-02-19 17:58:42 +01:00
aleos
987901f2f7 Corrected Shoes of Valor bonus (fixes #1966)
* Changed bonus skill from Heal level 1 to Increase Agility level 1.
Thanks to @hendra814 and @cydh!
2017-02-19 11:58:27 -05:00
aleos
3d711607b0 Follow up to 8492f6c
* Moved the knockback check to the correct location.
Thanks to @Everade!
2017-02-18 17:13:43 -05:00
aleos
6c0debb9ba Increased the integer storage type for EXP
* Adjusted the homunculus and mvplog tables to support increased EXP amounts.
2017-02-18 15:30:29 -05:00
Lemongrass3110
03ffd99c4d Fixed cashshop removal issue
Fixes #1971
Thanks to @RadianFord
2017-02-17 09:42:37 +01:00
Lemongrass3110
93f74cf567 Fixed the day of the year function 2017-02-16 20:48:36 +01:00
Lemongrass3110
eebbf1de93 Fixed a compile warning on centos
Fixes #1969
Thanks to @technoken
2017-02-16 17:58:11 +01:00
Lemongrass3110
aaa4ea919e Initial release of the cash shop sales (#1825)
Added a permission for the cashshop sales

Thanks to @Angelic234 and everyone else who tested this feature while it was sleeping waiting in a pull request.
Thanks to @aleos89, @secretdataz and @lighta for reviewing and commenting.
2017-02-15 14:04:18 +01:00
Lemongrass3110
7cf081c24b Fixed character rename feature (#1943)
This feature was broken for clients after 2011-11-01.
Added 2 new options for allowing it when the character is inside a party or guild.
The server now delivers the corresponding error messages if the player is inside a party or guild.
2017-02-15 13:06:31 +01:00
Lemongrass3110
2f659e419f Fixed invalid damage on WoE maps
Fixes #1951
Thanks to @keitenai
2017-02-14 22:39:42 +01:00
Aleos
afa880ebd6 Remove sleep timers when a script is unloaded (#1956)
* Fixes #1791 and fixes #1792.
* Removes sleep timers that are active when a script is unloaded from memory.
* Make sure duplicate NPC are properly removed.
Thanks to @exneval and @Tokeiburu!
2017-02-14 13:13:53 -05:00
aleos89
66cfa0618e Updated Issue and Pull Request templates
* Added HTML comment tags around descriptions.
* These descriptions will now be hidden on the preview of the Issue/Pull Request.
2017-02-14 12:41:09 -05:00
Aleos
5d22e1cf48 Cleaned up processing of secondary tables (#1946)
* Cleaned up processing of secondary tables
* Fixes #1934.
* Renewal and Pre-Renewal secondary tables are now properly loaded depending on the server mode.
* Includes item, monster, and monster skill tables.
Thanks to @Lemongrass3110 and @daisyanne1380!
2017-02-13 13:09:40 -05:00
Akkarinage
196017c9c4 Batch file for Windows Mapcache users
* Closes #1908
Signed-off-by: Akkarinage <akkarin@rathena.org>
2017-02-13 17:36:27 +00:00
aleos
0c20c596e0 Expanded script command setbattleflag
* Fixes #1945.
* Adds an optional flag to reload the monster database for specific map flags that are EXP/drop related.
* This resolves having to add atcommand reloadmobdb after setting the battle configs.
* Adjusted atcommand setbattleflag to also have the optional parameter.
* The reload should only have to be called on the final setbattleflag use.
2017-02-11 20:55:35 -05:00
aleos
ca051d185e Removed Freezing and Crystalize from OPT1
* Fixes #1955.
* Freezing and Crystalize are no longer considered Body Status Changes (OPT1).
* They are now stackable with other non-OPT1 statuses.
* Crystalize now works on monsters.
* Crystalize no longer has a Wind element damage bonus.
* Targets under Crystalize and Deep Sleep no can no longer consume items.
* Targets under Stun and White Imprison can no longer be affected by OPT1 statuses.
* Freezing no longer removes Burning.
Thanks to @FrFrMako, @Playtester, and Fyrus!
2017-02-10 17:45:33 -05:00
aleos
ce1429d4ff Merge branch 'master' of https://github.com/rathena/rathena 2017-02-07 19:39:56 -05:00
aleos
431f30aad4 Correct Cloud Kill Poison resistance
* Fixes #1948.
* Poisoning effect from Cloud Kill is now able to be resisted.
Thanks to @alxalmora!
2017-02-07 19:39:40 -05:00
Jeybla
3b5699eb46 Added some missing string escapes (#1869) 2017-02-07 22:36:09 +01:00
Lemongrass3110
c770990973 Added better documentation for skill splash range
This was brought up because of #1940.
Thanks to @Joy-Ro
2017-02-07 00:27:52 +01:00
Lemongrass3110
cc3b39c085 Added the packet db entry for 0x0A0E
Fixes #1918
Thanks to @mrjnumber1
2017-02-06 23:44:23 +01:00
Lemongrass3110
068d18c9d7 Fixed market shop weight calculation
Fixes #1897
Thanks to @Angelic234
2017-02-06 23:30:05 +01:00
rAthenaAPI
f2c27a86cb SQL synchronization 2017-02-06 22:24:53 +01:00
Jeybla
e1e2bfa7a3 Fixes Queen Scaraba Card (#1937)
Fixes #1935
2017-02-06 22:24:47 +01:00
Lemongrass3110
4623d376d0 Another follow up to d99c914 2017-02-05 19:58:57 +01:00
Matheus Macabu
aa7de205fe Update name for all party members on rename (#1715) 2017-02-05 19:52:31 +01:00
Lemongrass3110
90e3f89df2 Follow up to d99c914
Thanks to @RadianFord and @CairoLee
2017-02-04 17:43:50 +01:00
Lemongrass3110
7377f0f674 bindatcmd now supports the new event name length 2017-02-04 00:03:40 +01:00
Aleos
d99c91418a Cleaned up character saving (#1911)
* Fixes #1910.
* Changed chrif_save option to readable constant values.
* Added new Inventory and Cart options so that normal character save calls aren't flooded with requests to save Inventory and Cart data.
* Cleaned up storage and premium storage saving functions being unused.
2017-02-03 10:25:46 -05:00
aleos89
52f9bf63af Fixed Cart Weight calculation (fixes #1938)
* Resolves Cart weight not getting recalculated when using atcommand resetskill.
Thanks to @Hactus and @Tokeiburu!
2017-02-03 10:17:21 -05:00
Cydh Ramdh
ae182ef6a8 Fixed a broken character in skill.c's comment
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2017-02-03 21:09:21 +07:00
Jeybla
929384cead Fixes AgitEnd2 Scriptcommand. (#1936)
OnAgitEnd2 events were not triggered by using the AgitEnd2 script command.

Follow up to 2043c95
2017-02-03 08:38:15 +01:00
aleos
c853ef0303 Backslide against walls (fixes #1914)
* Backslide animation is not shown when the player is against a wall.
* SP is still consumed as normal.
Thanks to @zackdreaver!
2017-02-02 18:07:37 -05:00
aleos89
778e96e475 Follow up to 84df170
* Fixes a wrong status icon being set to a status change.
2017-02-02 13:44:05 -05:00
rAthenaAPI
8a95bc5aba SQL synchronization 2017-02-02 18:19:23 +01:00
aleos89
84df1708ee Added missing Elemental Resist Potion icon
* Fixes #1898.
* Separated the SC_ARMOR_ELEMENT to each element (Water, Earth, Fire, Wind).
* Added the status icon for the respective element.
Thanks to @zackdreaver!
2017-02-02 12:19:04 -05:00
aleos89
bb42b3183c Added missing SCB for Geffen Magic statuses
* SC_GEFFEN_MAGIC1, SC_GEFFEN_MAGIC2, and SC_GEFFEN_MAGIC3 were missing their SCB_ALL flags.
2017-02-02 09:53:29 -05:00
aleos
320bf9073b Fixed VIP gemstone requirement setting (fixes #1846)
* Resolves the VIP gemstone requirement setting get reset on each status_calc_pc.
* Removed some duplicate code during gemstone avoidance calculation.
Thanks to @Everade!
2017-01-31 20:05:15 -05:00
aleos89
baa91f834c Follow up to 4af46ba and e8b9cf0
* Ensures all instances of players disconnecting from the server has their shop removed.
2017-01-31 13:37:02 -05:00
Jeybla
e31428df64 Conf: hide favorite items while selling to NPCs (#1925)
Added a configuration for hiding favorite items in the sell menu.

Thanks to @Jeybla!
2017-01-31 13:55:01 +01:00
aleos
fa443eee30 Adjusted Meteor Assault interaction with EDP
* Fixes #1885.
* Enchant Dead Poison no longer increases Meteor Assault damage on renewal.
Thanks to @alxalmora and @Playtester!
2017-01-30 20:23:12 -05:00
aleos
e8b9cf06ce Follow up to 4af46ba
* Added a map session data check back into the GM kick process so atcommand kickall does not remove vendors or buyingstores.
* Adjusted the checks for when a player logs back into their account so it properly removes any vending or buyinstore information.
2017-01-29 15:10:42 -05:00
aleos
4af46ba8c2 Fixed vending/buyingstore info not being removed
* Fixes #1921.
* Resolves vending and buyinstore information not being removed from the SQL tables when a player is kicked.
Thanks to @Tokeiburu!
2017-01-29 12:22:04 -05:00
aleos
cb72a89fd5 Added battle config pet_master_dead (fixes #1916)
* Added a new battle config that will allow or disallow (default) a pet to continue attacking its target if the master is dead.
Thanks to @technoken!
2017-01-29 10:36:53 -05:00
aleos
bfab00a3c3 Fixed Vanish damage interaction with some skills
* Fixes #1721.
* Devotion and Shadow Form damage bypass Vanish damage.
Thanks to @jamon18!
2017-01-28 11:29:01 -05:00
aleos89
6e9cd4404a Amended script command checkweight documentation
* Fixes #1917.
* Second example is about arrays and should use script command checkweight2.
Thanks to @lucasoli!
2017-01-26 09:05:02 -05:00
aleos
10c4bacab5 Follow up to 6542773
* Added an alias for atcommand reloadnpcfile -> reloadnpc.
2017-01-25 20:53:07 -05:00
aleos
706345f56f Revamped script command setunitdata (fixes #1903)
* Resolved mobs having certain stats getting reset to their database value when the mob's status is recalculated.
* Resolved some monster, homunculus, mercenary, and elemental stats not properly recalculating when setting the unit data.
Thanks to @technoken and @Tokeiburu!
2017-01-25 20:48:24 -05:00
rAthenaAPI
b26793f2b1 SQL synchronization 2017-01-25 20:20:06 +01:00
Atemo
dfaee699fb Fixed bugs in Bangungot Hospital instance (issue #1504) (effects, warps, announce..) 2017-01-25 20:19:47 +01:00
Atemo
7e2dedc828 Corrected areamonster from aegis conversion 2017-01-25 20:04:41 +01:00
aleos89
65427737bf Follow up to 9c2026d
* Renamed atcommand reloadnpc to reloadnpcfile.
* Adjusted documentation to fit.
2017-01-25 13:48:37 -05:00
aleos89
9c2026d216 Fixed atcommands for NPC loading (fixes #203)
* Resolves atcommand loadnpc not working in sequence with atcommand unloadnpc multiple times on the same NPC.
* Added atcommand reloadnpc.
Thanks to @Tokeiburu!
2017-01-25 13:06:45 -05:00
aleos89
0b2e0cc3fd Adjusted Crush Strike duration (fixes #1900)
* Lowered Crush Strike's duration from 3 minutes to 30 seconds.
Thanks to @zackdreaver!
2017-01-25 10:38:30 -05:00
aleos89
10af42f488 Cleaned up Pull Request Template
* Removed HTML break tags.
* Added blank line to end of Issue Template.
2017-01-24 14:17:18 -05:00
Lemongrass3110
08d55d80f5 GTB should not block Masquerade status changes (#1905)
* Fixes #1901
Thanks to @zackdreaver and @RagnarokNova!
2017-01-24 12:04:32 -05:00
Jittapan Pluemsumran
14b381dcc7 Initial Release of Guild Daily Mission (#1582)
* Implemented Guild Daily Mission
Thanks to @cydh, @Atemo, and @Lemongrass3110 for their help!
2017-01-24 10:47:20 -05:00
Atemo
09cbf2dfa6 Follow up a63604d92a
The display name of the NPC won't get appended in front of the message for globalmes script command.

Corrected area monsters spawn in Nydhoggr's Nest Instance
2017-01-22 19:14:19 +01:00
aleos
7543f1cba7 Resolved a potential map-server crash
* Fixes #1839, fixes #1844, and fixes #1882.
* Resolves players at login attempting to calculate their statuses who haven't been fully loaded.
* Added a new state flag to make sure inventory and status data is loaded before player's statuses are calculated.
Thanks to @Tokeiburu, @Everade, and @MrAntares!
2017-01-22 13:03:46 -05:00
Atemo
c6470ff4ff Clean-up permanent monster spawn: (#1831)
* Clean-up permanent monster spawn:
- <delay1>,<delay2>,<event> are actually optionnal field
- <event> value 0 and 1 are meaningless (actually event name with length < 4 are skipped)

* Exported monster AI constants

* Updated docs for monster size constants (already exported)
Notes:
- the default size for monster script cmd was small not medium
- monster script cmd now display a warning for size above SZ_BIG (previously SZ_ALL)

* - Fixed an issue to make <xs> and <ys> optionnals
- Updated npcs scripts

* Leftover in the docs for permanent monster spawn

* Corrected english docs. Credit to @aleos89
Added additionnal warning for xs / ys negative input. Credit @Lemongrass3110 

Thanks to @cydh for the idea
2017-01-22 19:03:08 +01:00
Lemongrass3110
047ef1263b Fixed 2 compiler warnings on PACKETVER < 20110111 2017-01-19 22:05:11 +01:00
Lemongrass3110
9cd1ea4ebe Fixed wrong output in itemdb_read_itemdelay 2017-01-19 14:52:59 +01:00
aleos
d8768e4cae Cleaned up the colored messages (fixes #1855)
* Removed redundant clif_colormes and clif_messagecolor2 functions.
* Changed all clif_disp_onlyself to clif_messagecolor.
* Resolves several places around source using the 0x17F packet which now has a display toggle for Guild Chat resulting in these messages not related to Guild Chat not displaying.
* Added COLOR_LIGHT_GREEN to imitate the Guild Chat color.
2017-01-18 17:20:25 -05:00
rAthenaAPI
b0f8426e34 SQL synchronization 2017-01-18 16:06:50 +01:00
aleos89
2c4cd07af0 Corrected script command atcommand (fixes #1894)
* Resolves the map ID being stored instead of the map index when a dummy player is used.
Thanks to @Tokeiburu!
2017-01-18 10:06:37 -05:00
Lemongrass3110
b3112553b5 Added a missing zeroes for SQL synchronization
Follow up to c6ab722
2017-01-18 09:50:01 +01:00
rAthenaAPI
5a661cb136 SQL synchronization 2017-01-18 03:25:19 +01:00
Atemo
c6ab72207e Horror toy factory (#1813)
* Initial release of Horror Toy Factory instance.
Thanks to @aleos89, @secretdataz, @Lemongrass3110
Took some part from 52f6420abc
Credit @exneval

Todo : implement NPC_HELLBURNING skill
2017-01-18 03:25:12 +01:00
Lemongrass3110
7416ad79fd Fixed Emperium attack checks for slaveclones
Fixes #1890
2017-01-17 20:02:57 +01:00
Lemongrass3110
60652e2001 Fixed event OnBreakGuild not being triggered
Fixes #1888
Thanks to @guilherme-gm
2017-01-17 19:42:09 +01:00
Lemongrass3110
633d50fa72 Atcommand clanspy 2017-01-16 23:36:52 +01:00
aleos
961a945345 Issue Template cleanup
* Follow up to 414841a.
* Removed the HTML break tags.
2017-01-16 16:06:54 -05:00
Cydh Ramdh
414841a88b Add CONTRIBUTING.md, ISSUE_TEMPLATE.md, and PULL_REQUEST_TEMPLATE.md (#1688)
* Adds the contributing templates.
* Put the contributing files to a hidden folder so the root directory is less populated.
Thanks to @cydh and @Lemongrass3110!
2017-01-16 15:15:39 -05:00
Lemongrass3110
d6daffe737 Fixed aftercast animation of Coluceo Heal
Fixes #1884
Thanks to @Tokeiburu
2017-01-15 23:32:04 +01:00
Lemongrass3110
c09ce192f6 Updated renewal skill tree (#1740)
Updated pre-renewal accordingly(Only for renewal jobs and skills!)
2017-01-15 23:11:54 +01:00
Lemongrass3110
06c40e6cb4 Updated renewal skill SP costs (#1742)
Updated pre-renewal accordingly(only for renewal jobs!)
2017-01-14 22:19:54 +01:00
Lemongrass3110
958476f6ce Repaired line endings in logs.sql 2017-01-14 19:32:14 +01:00
rAthenaAPI
dd804c3dfe SQL synchronization 2017-01-14 19:28:01 +01:00
Lemongrass3110
a6f8dd5f61 Fixed Unity Guard and Buckler
Fixes #1880
Thanks to @sigtus
2017-01-14 19:27:42 +01:00
vstumpf
11f0a1f9d1 Clan Chat logging is now available 2017-01-14 17:47:36 +01:00
rAthenaAPI
c9cfc591df SQL synchronization 2017-01-14 08:34:20 +01:00
zackdreaver
07eb5ea810 Renewal item db update (#1848)
* Renewal item db update:
- Small fixes and cleanup
Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Add itemID 5978 http://www.divine-pride.net/database/item/5978

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Update itemID 18564 scripts http://www.divine-pride.net/database/item/18564

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Add itemID 18877 http://www.divine-pride.net/database/item/18877

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Update itemID 19116 scripts http://www.divine-pride.net/database/item/19116

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Add itemID 20510 scripts http://www.divine-pride.net/database/item/20510

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Add Unity gears
Unity_Violin http://www.divine-pride.net/database/item/1941,
Unity_Whip http://www.divine-pride.net/database/item/1995,
Unity_Two-Handed_Staff http://www.divine-pride.net/database/item/2025,
Unity_Revolver http://www.divine-pride.net/database/item/13129,
Unity_Huuma_Shuriken http://www.divine-pride.net/database/item/13329,
Unity_Sword http://www.divine-pride.net/database/item/13456,
Unity_Dagger http://www.divine-pride.net/database/item/13457,
Unity_Mail http://www.divine-pride.net/database/item/15152,
Unity_Mantle http://www.divine-pride.net/database/item/15153,
Unity_Suit http://www.divine-pride.net/database/item/15154,
Unity_Robe http://www.divine-pride.net/database/item/15155,
Unity_Mace http://www.divine-pride.net/database/item/16048,
Unity_Bow http://www.divine-pride.net/database/item/18132,
Unity_STR_Manteau http://www.divine-pride.net/database/item/20780,
Unity_AGI_Manteau http://www.divine-pride.net/database/item/20781,
Unity_INT_Muffler http://www.divine-pride.net/database/item/20782,
Unity_Exquisite_Muffler http://www.divine-pride.net/database/item/20787,
Unity_STR_Boots http://www.divine-pride.net/database/item/22078,
Unity_AGI_Boots http://www.divine-pride.net/database/item/22079,
Unity_DEX_Boots http://www.divine-pride.net/database/item/22080,
Unity_INT_Boots http://www.divine-pride.net/database/item/22081,
Unity_Katar http://www.divine-pride.net/database/item/28011,
Unity_Two-Handed_Axe http://www.divine-pride.net/database/item/28110
Unity_Bible http://www.divine-pride.net/database/item/28606,
Unity_Guard http://www.divine-pride.net/database/item/28904,
Unity_Buckler http://www.divine-pride.net/database/item/28905

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Add Angel Poring Boots item set
Angel_Poring_Boots http://www.divine-pride.net/database/item/22101,
Leo_Stone http://www.divine-pride.net/database/item/29148,
Pisces_Stone http://www.divine-pride.net/database/item/29149,
Capricorn_Stone http://www.divine-pride.net/database/item/29150,
Aquarius_Stone http://www.divine-pride.net/database/item/29151,
Scorpio_Stone http://www.divine-pride.net/database/item/29152,
Taurus_Stone http://www.divine-pride.net/database/item/29153

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Add itemID 26110 http://www.divine-pride.net/database/item/26110

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Add new accessories
Vesper_Core01_ http://www.divine-pride.net/database/item/28302,
Vesper_Core02_ http://www.divine-pride.net/database/item/28303,
Vesper_Core03_ http://www.divine-pride.net/database/item/28304,
Vesper_Core04_ http://www.divine-pride.net/database/item/28305,
Falconer_Glove http://www.divine-pride.net/database/item/28322

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Add jRO's LoVA cards
LoVA_Hades_Card http://www.divine-pride.net/database/item/31006,
LoVA_Realization_Hades_Card http://www.divine-pride.net/database/item/31007,
LoVA_Lulu_Card http://www.divine-pride.net/database/item/31008,
LoVA_Realization_Lulu_Card http://www.divine-pride.net/database/item/31009,
LoVA_Kima_Card http://www.divine-pride.net/database/item/31010,
LoVA_Realization_Kima_Card http://www.divine-pride.net/database/item/31011,
LoVA_Bahamut_Card http://www.divine-pride.net/database/item/31012,
LoVA_Realization_Bahamut_Card http://www.divine-pride.net/database/item/31013,
LoVA_Ragnarok_Card http://www.divine-pride.net/database/item/31014,
LoVA_Realization_Ragnarok_Card http://www.divine-pride.net/database/item/31015,

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Add new costumes

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* follow up 12063498b6

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Add new shields and their combo set
Proof_of_Glory http://www.divine-pride.net/database/item/28499
Cursed_Mad_Bunny http://www.divine-pride.net/database/item/28901
Mad_Bunny_ http://www.divine-pride.net/database/item/28902
Rectangular_Large_Sleeve http://www.divine-pride.net/database/item/28910
Ultralight_Magic_Shield http://www.divine-pride.net/database/item/28913
Bunker_Shield http://www.divine-pride.net/database/item/28915
Gaia_Shield http://www.divine-pride.net/database/item/28916
Diamond_Shield http://www.divine-pride.net/database/item/28920

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Update combo set of Enhanced Force Shadow Weapon and Enhanced Soul Shadow Weapon

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Add first classes's Shadow equipment

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* follow up 12063498b6 thanks to @Cydh

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Add new costumes

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- According to https://forums.warpportal.com/index.php?/topic/169125-shadow-gear-event/#entry2023963, The promotional shadow gear set bonus is 'all stats +3'after the event ends.

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Add Caster Shadow Set

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Fix Armor_of_Gray missing mdef bonus

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Add missing combo of Ozs_New_Ukulele and Ozs_New_Wing_Ring

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Fix Pendant_of_Harmony script, Element resistance should be Holy resistance only and the autocast of Renovation should be triggered by normal attack.

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* follow up e77dcea119

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Add headgears from jRO
Pipe_Of_Jiraiya http://www.divine-pride.net/database/item/18947
Mask_Of_Orochimaru http://www.divine-pride.net/database/item/18948
Scroll_Of_Tsunade http://www.divine-pride.net/database/item/18949

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Fix Noble_Cross element bonus

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Add combo script for Encyclopedia

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Fix Geffen_Magic_Robe refine bonus

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Add combo set of GMT gears

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Fix Wind_Whisper matk script

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Fix Gigantic_Blade weapon type

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Fix axe weapons script
Tanos_Axe_ now become Two-Handed Axe
Axe_Tornado now become Two-Handed Axe and refinable
Blue_Twohand_Axe now become Two-Handed Axe

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Add Soul Potion aka Stats Reduction potion
related to this https://github.com/rathena/rathena/pull/1509

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Add combo script for temporal boots and gigant snake skins

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* follow up 72e1c4ad33

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Fix Magic_Stone_Hat and Schmidt_Helm matk bonus

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Minor fix and cleanup

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Add combo script for Pendant_of_Chaos and Pendant_of_Harmony
- Fix Pendant_of_Chaos element reduction bonus, should be Darkness only
- Fix wrong id order

Signed-off-by: zackdreaver <zackdreaver@gmail.com>

* Renewal item db update:
- Fix item scripts according review by secretdataz
- Add combo script for sloted version of vesper cores

Signed-off-by: zackdreaver <zackdreaver@gmail.com>
2017-01-14 14:34:13 +07:00
Lemongrass3110
f5c43329b2 Follow up to 9f4587a
Fixes #1877
Thanks to @Tokeiburu and @Everade for their help.
2017-01-13 23:34:06 +01:00
aleos89
6de7aa88e8 Resolved party bound item check (fixes #1874)
* Resolved a potential map-server crash.
* If a party bound item is attempted to be removed because the player was offline during party destruction, delete the item without recalculating the status.
Thanks to @Tokeiburu!
2017-01-13 12:29:18 -05:00
Lemongrass3110
a73814eeee Fixed some compile warnings
Fixes #1861
Thanks to @rubie123
2017-01-11 10:21:47 +01:00
rAthenaAPI
4da04a7f2c SQL synchronization 2017-01-10 22:58:13 +01:00
Lemongrass3110
2043c95e66 Refactored hardcoded npc event names (#1767)
While refactoring those events the following other changes were made:

Introducing OnInstanceDestroy event. This event can be used to hook script code right in front of the instance destruction. This can be useful if you have any stored references to an instance id for example.

The script command cmdothernpc will now check if the target event exists and report failures. Therefore it now returns true or false.

All agit(FE,SE,TE) start and end commands from atcommand and script commands have been merged in their respective guild function which now returns a bool value of true for successful actions and false if it did not succeed(if the specific WoE was [not] running).

All global triggered events with mapserver status output now call the same function and therefore have the same mapserver output(including their respective event name of course).

Renamed a few events in the script configuration to match the other names

Added constants for months and weekdays

Additionally added constants for gettime types to make it easier to read.

Replaced all existing usages I found with their proper new syntax or better fitting functions.
2017-01-10 22:58:04 +01:00
Playtester
870273e48f Fixed Taekwon Mission not working (fixes #1862)
* Taekwon Mission will now work regardless of setting "taekwon_mission_mobname"

Special thanks to @vstumpf for the fix.
2017-01-09 20:36:30 +01:00
lighta
6a97675dc1 Merge branch 'johnfercher-master' 2017-01-08 15:44:46 -05:00
lighta
c93b9cec6e Small finalisation for ARM va_list issue 2017-01-08 15:43:54 -05:00
Johnathan Fercher
755329fe11 raspberry simple adaptation
added a new version of itemdb_group_free at map/itemdb.c.
2017-01-08 15:35:19 -05:00
Lemongrass3110
14b79eafcb Follow up to 88aaa9b
Fixes #1857
Thanks to @srhmike
2017-01-07 22:32:07 +01:00
Aleos
f14b5b34ec Adjusted the parameter size for NPC commands (#1856)
* Adjusted the parameter size for NPC commands
* Fixes #1805
* Changed NAME_LENGTH parameter size to NPC_NAME_LENGTH.
Thanks to @Tokeiburu!
2017-01-06 19:11:50 -05:00
Lemongrass3110
88aaa9be98 Added a parameter to map_nick2sd for partial name (#1852)
With this parameter the caller can decide if he wants to enable or disable partial name scan support.
Generally it was disabled in a lot of functions(clif,channel,script commands).
It is still available for some "non-critical" atcommands as well as for all charcommands.
2017-01-07 00:19:04 +01:00
Lemongrass3110
55459f30f2 Added a script command for instance information (#1815)
With this script command you can look up information about a specific instance. This way you do not have to hardcode values specified in the database in the script if you need it.

Thanks to @aleos89 for the script documentation.
2017-01-07 00:08:11 +01:00
Lemongrass3110
12457d342f Fixed sleep2 and awake functions for non-players (#1849)
Fixes #1837
2017-01-06 23:41:18 +01:00
Lemongrass3110
eb47d74f08 Added a config for maprespawnguildid's behaviour (#1836) 2017-01-06 23:29:49 +01:00
naffej
da526d1982 Update battle.c (#1850)
* Fixed Neutral Barrier not checking the target, instead of source, if attacks should hit.
2017-01-06 12:53:07 -05:00
Lemongrass3110
988bf12887 Fixed announces from Koschei the Immortal
Original Commit HerculesWS/Hercules@dbc54ea
Thanks to @landergate
2017-01-06 17:15:19 +01:00
Lemongrass3110
03a54402bc Fixed ZC_PROPERTY_HOMUN_2 packet
Homunculus also have their HP stored as int from 2014-10-16 onward.
Please note that the information windows is to small to show the numbers correctly, because Gravity certainly does not intend that the HP can become that high.
2017-01-04 13:21:47 +01:00
Lemongrass3110
0a303c7852 Fixed remote listing command in README
Thanks to @CairoLee
2017-01-04 12:16:21 +01:00
Lemongrass3110
8b6b9c19ac Follow up to b0bcd06
Added a special error message for timeout, since it does not set an error code when a timeout occurs.
Also added a message when the socket is not writeable after successful connection.
2017-01-03 15:44:08 +01:00
Playtester
396b5c3215 Renewal Stealth / Chase Walk (fixes #1826)
* Stopping Stealth aka Chase Walk in renewal now has a cast time
2016-12-30 20:53:52 +01:00
rAthenaAPI
a635255409 SQL synchronization 2016-12-30 20:21:54 +01:00
aleos
aa2868c807 Fixed the Eden Group Mark warp map (fixes #1841)
* Follow up to b62f4a2.
* Fixed the item trying to place the character on an incorrect map.
Thanks to @hendra814!
2016-12-30 14:21:41 -05:00
rAthenaAPI
c52a6de2c0 SQL synchronization 2016-12-30 20:00:19 +01:00
Locien
c712618116 Another small fix
Same as previous.
2016-12-30 19:59:55 +01:00
Locien
15ee996fb4 Revert "Another small fix"
This reverts commit bfb94d0abc.
2016-12-30 19:58:40 +01:00
Locien
bfb94d0abc Another small fix
Same as last time.
2016-12-30 19:58:07 +01:00
rAthenaAPI
dd1d78865a SQL synchronization 2016-12-30 19:48:28 +01:00
Locien
92174bbae6 More fixes to Geffen Magic Tournament
This should finally fix it.
2016-12-30 19:48:09 +01:00
rAthenaAPI
c1a26796e3 SQL synchronization 2016-12-30 19:44:49 +01:00
Locien
8ac9fb7f3d Another small fix to the Geffen Magical Tournament commit
Fixed missing values in mob_db.txt.
2016-12-30 19:44:31 +01:00
rAthenaAPI
44cdd34fce SQL synchronization 2016-12-30 19:34:16 +01:00
Locien
1efbe3675b Small fix to Geffen Magic Tournanment commit
Commented out missing monster skills and added a missing item.
2016-12-30 19:33:57 +01:00
rAthenaAPI
64858fba87 SQL synchronization 2016-12-30 18:48:40 +01:00
Locien
be1c0ee1e6 Geffen Magic Tournament instance - Semi-official implementation
Big thanks to @RagnarokNova for creating this script with the help of
@tokeiburu, Diablo and others. I simply converted it to be compliant
with rAthena master standard. Hope you guys enjoy it and report any bugs
:)

To clarify on the semi-official part: This script was made from scratch
by playing on iRO and may have inconsistencies with the official
version. If you want to use this on your server you must enable it
yourself by uncommenting the entry in scripts_athena.conf.
2016-12-30 18:45:49 +01:00
Atemo
a9faab82cb Fixed incorrect OnTouch label in Crow of Destiny Quest (issue #1840) and in Guild dungeon 2 event. Thanks @Tokeiburu 2016-12-29 23:00:37 +01:00
Dragonnnn
a06028bb48 Corrected misspelled git command. 2016-12-29 11:20:38 +07:00
Dragonnnn
39cc005feb Added guide to allow users to receive updates from main rAthena repo to their forked versions in Bitbucket/GitLab (#1828)
* Added guide to update forked repositories.
2016-12-28 15:21:48 -05:00
rAthenaAPI
36704f9045 SQL synchronization 2016-12-28 13:04:05 +01:00
Lemongrass3110
575583d0a6 Added some new NPC constants and mob placeholders 2016-12-28 13:03:44 +01:00
Playtester
260655a3c4 Songs and Dances vs. Dispell and Vanishing Buster (fixes #1824)
* Songs and Dances can no longer be dispelled by Dispell and Vanishing Buster
* Added a configuration to simulate the old behavior: Dispelling works if target not inside song area
2016-12-25 20:02:07 +01:00
Jittapan Pluemsumran
9f4587a652 Made prevent_logout effect on log-in optional (#1827)
* Made prevent_logout effect on log-in optional
kRO does not prevent players from logging out after connecting to its zone servers.
2016-12-25 22:16:30 +07:00
rAthenaAPI
eb142883c2 SQL synchronization 2016-12-21 08:04:07 +01:00
Jittapan Pluemsumran
b62f4a2c36 Made Para_Team_Mark_ (22508) follow kRO effect.
Fixed #1820.
2016-12-21 14:03:54 +07:00
Playtester
182557311b Official song and dance formulas (fixes #1808)
* Fixed musical lessons not having any effect on Song of Lutie's MaxHP bonus (lesson/2)
* Song of Lutie now heals 1 HP more every 2 vit instead of 5 HP more every 10 vit
* Perfect Tablature's flee bonus in renewal is now 3*skill_lv + agi/15 + lesson/2
* Perfect Tablature's perfect dodge bonus is now (skill_lv+1)/2 + luk/30 + lesson/5
* Focus Ballet's hit bonus in renewal is now 20 + 2*skill_lv + dex/15 + lesson
* Focus Ballet's hit bonus in pre-re is now 1 + 2*skill_lv + dex/10 + lesson
* Slow Grace's ASPD decrease in renewal is now 3*skill_lv + dex/15 + lesson
* Slow Grace's ASPD decrease in pre-re is now 5 + 3*skill_lv + dex/10 + lesson
* Slow Grace's speed decrease in renewal is now 2*skill_lv + agi/20 + lesson/2
* Slow Grace's speed decrease in pre-re is now 5 + 3*skill_lv + agi/10 + lesson
* Impressive Riff's ASPD increase in pre-re is now 5 + skill_lv + agi/20 + lesson/2
* Lady Luck's critical bonus is now 10 + skill_lv + luk/10 + 0.5*lesson (not rounded down)
2016-12-20 22:17:52 +01:00
Playtester
08812e0523 Monster level 10 Frost Diver and Decrease Agi (fixes #1819)
* Freeze from monster level 10 Frost Diver will now last 30s in pre-re and 32.5s in re
* Fixed monster level 10 Decrease Agi in renewal lasting way too
2016-12-20 17:17:48 +01:00
Playtester
e5a89a74f4 Fixed Satan Morroc not using most of his skills (fixes #1818)
* Satan Morroc will now be able to cast all of his skills if his HP are low
-- There is no "HP higher than" limit for casting skills, only "HP lower than"
* Satan Morroc no longer summons slaves on spawn or when idle
2016-12-20 16:56:07 +01:00
Playtester
d5357c3e9f Hell Power, Hallucination, Gospel (follow-up to 74d577c, fixes #1816)
* NPC_HELLPOWER is now a "no damage" skill and works similar to NPC_HALLUCINATION
* NPC_HALLUCINATION now has a fixed duration
* Both skills have a max level of 5 (for activation chance)
* Fixed Gospel's activation chance being 1% higher than it should be
* Fixed a compiler warning (see #1816)
2016-12-20 15:49:49 +01:00
rAthenaAPI
700950b1f4 SQL synchronization 2016-12-20 13:58:17 +01:00
Lemongrass3110
c407ec211d Fixed #1817
Additionally corrected iRO name.
2016-12-20 13:57:57 +01:00
rAthenaAPI
e3e752cdba SQL synchronization 2016-12-20 11:30:20 +01:00
Cydh Ramdh
ffb3182046 Fixed Location for Darklord Essences
* Follow up 9fcdcbde3b
* The compound location must be `1023`

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-12-20 17:26:25 +07:00
Cydh Ramdh
2896d894d1 Official Random Coordinates for Savepoint (#1756)
* Added parameters for `savepoint are range for `x` and `y` for random savepoint coordinates.
* Added documentation for new savepoint params. Credits to @aleos89
* Updated savepoint on script to follow official behaviour (random save in 3x3). All credits to @Atemo
2016-12-20 17:16:42 +07:00
Cydh Ramdh
388e699e15 Added party config change_party_leader_samemap (#1803)
* Added party config `change_party_leader_samemap`
* Prevent changing the party leader if the specified player is not on the same map (Note 1)
* Default is `yes` as official does
* This config will be ignored by `party_changeleader` script command
* Thanks to @aleos89 and @Lemongrass3110

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-12-20 17:06:14 +07:00
Locien
fb29b18b52 Consistency changes for script unit commands (#1801)
* Consistency changes for script unit commands

Made it so that all unit commands(except for unitexists) take 0 as the
unit ID argument which will reference the activator of the script.
Unitwarp has since previously had this functionality and it's very
useful. Example use: When a monster walks over an npc script with the
OnTouchNPC label unitkill 0; will kill the monster.

* Clean up and fixes to unit script commands self referencing with ID 0

Added a script_rid2bl function that will return the block list beloning
to an RID specified or the activator of the script if 0 is specified as
RID.
2016-12-20 02:08:35 +01:00
Lemongrass3110
1b634c8f42 Fixed showdigit's start values (#1807)
Fixed #1769
2016-12-20 01:37:40 +01:00
aleos
8492f6c35e Fixes Feint Bomb and bNoKnockBack (fixes #1814)
* Resolves Feint Bomb's backslide effect not working when the player is wearing an item that has the bonus NoKnockBack active.
Thanks to @Everade!
2016-12-19 19:32:35 -05:00
aleos
1a5e3a35bd Added readable constants for knockback functions
* Added enum for skill_blown.
* Added enum for unit_blown_immune.
2016-12-19 19:04:01 -05:00
Lemongrass3110
552c39acc3 Fixed #1809
Thanks to @Tokeiburu
2016-12-20 00:13:48 +01:00
Playtester
d1f8c8ca6c Fiber Lock vs. Land Protector (follow-up to 79e9afa)
* Fiber Lock now ends in all situations in which the unit group is removed (e.g. Land Protector)
2016-12-19 23:43:56 +01:00
Playtester
74d577ce52 Gospel, Tarot, Curse, Poison, Hallucination, Hell Power, NPC skills
* Official Gospel chances, effects and duration (fixes #1812)
-- Chance of Gospel to trigger increased from 10%*skill_lv to 50%+5%*skill_lv
-- Gospel's Heal effect now heals 1000-9999 HP instead of 1-9999 HP
-- Blessing and Increase Agi effects now last for 4 minutes instead of 60 seconds
-- Increase Defense now only lasts 10 seconds instead of 60 seconds
-- Gospel's damage is now twice likely to trigger with one of two different effects
-- Fixed Gospel's damage not showing the Holy Cross effect
-- Gospel's first damage effect deals 3000-7999 damage which is reduced by DEF (percentual in pre-re)
-- Gospel's second damage effect deals 1500-5499 damage which cannot be reduced by DEF
-- Curse, Blind and Poison effect now last 30 minutes instead of 60 seconds
-- Provoke lasts infinite, but is removed when changing maps or logging out
-- Fixed Provoke's icon from disappearing whenever a status changes
-- DEF, ATK, Flee and Speed super debuffs now only last 20 seconds instead of 60 seconds
* Official status change base duration for curse (fixes #1811)
-- Curse base duration is 30 seconds in pre-re and 20 seconds in renewal
-- Napalm Vulcan, Tarot Card of Fate, NPC_HELLJUDGEMENT, NPC_WIDECURSE use this duration
-- NPC_CURSEATTACK has a fixed 30 seconds duration
* Official status change base duration for poison (fixes #1811)
-- Poison base duration is 60 seconds in pre-re and 20 seconds in renewal
-- Duration is no longer halved for monsters in pre-re
-- Envenom, Venom Dust, Venom Splasher, Tarot Card of Fate, NPC_POISON, NPC_ACIDBREATH use this duration
* NPC_STOP now has a duration of 15 seconds instead of 10 seconds
* NPC_HELLPOWER and NPC_WIDEHELLDIGNITY now have a duration of 180 seconds instead of 300 seconds
* Tarot Card of Fate uses base duration for Curse, Poison, Stone, Freeze and Stun
-- For Confusion and Stop the duration remains fixed to 30 seconds
* All NPC status skills now have a 20%*skill_lv chance to trigger instead of 50%+10%*skill_lv
-- NPC_HALLUCINATION and NPC_HELLPOWER now only affect you to 20% instead of 100%/60%
* Damage shown by Hallucination is now completely random instead of being multiplied by 6
* The animation is now shown when trying to resurrect someone affected by Hell Power

Special thanks to @mrjnumber1 and Luke for providing various information on these.
2016-12-19 22:28:18 +01:00
Locien
a4a6dd896f Small fix to previous magic rod changes
Fixed a compiler error.
2016-12-17 04:10:07 +01:00
Locien
d92272eb89 Corrected behavior for magic rod showing its animation in pre-renewal
In pre-renewal the animation of magic rod only shows up when the user is
attacked with a spell that can be absorbed by it. In renewal it shows
when you cast the skill instead. This has been tested on iRO Chaos and
iRO Classic.
2016-12-17 00:55:34 +01:00
Lemongrass3110
b0bcd060c4 Added windows specific socket timeout code (#1714)
* Added windows specific socket timeout code

Added socket code for windows that respects our given timeout.
Also added some more ifndef checks to some stat reporting functions.
Updated the MSDN reference link.
Fixed the delay being milliseconds on windows, thanks to @theultramage
Fixes #794 on windows.
2016-12-17 00:36:23 +01:00
Stolao
25bcb51598 Merge pull request #1793 from rathena/Code_Consistancy_Edit
Code Consistency
2016-12-16 13:27:52 -08:00
Lemongrass3110
7df9962a72 Follow up to 9333921
Thanks to @Playtester's friend Ash for reporting this.
2016-12-13 09:10:07 +01:00
Stolao
f0059affb3 no message 2016-12-12 11:44:55 -08:00
Aleos
d095fe7a67 Merge pull request #1741 from rathena/cleanup/itemgroups
Cleaned up Item Groups
- Moved constants from const.txt to script_constants.h.
- Removes hard coded item groups into the IG_* database to easily be adjusted/created.
- Renamed IG_FingingOre -> IG_FindingOre.
2016-12-12 13:58:54 -05:00
Playtester
b4225e8436 Tarot Card of Fate Follow-Up (fixes #1789)
* The tarot card THE SUN no longer blocks other cards in pre-re (still does in renewal)
* Added a configuration for equal chance for all cards in case someone prefers eAthena behavior
2016-12-12 19:10:28 +01:00
Lemongrass3110
0e78dfca26 Fixed a compiler warning
Follow up to 79e9afa
Fixes #1787
Thanks to @srhmike
2016-12-12 08:47:58 +01:00
Playtester
f084db4f1c Monsters spreading out on hide (fixes #1786)
* When you hide and monsters are still on their original chase path, they will no longer spread out
-- This makes Grimtooth mobbing viable again on default settings
-- In all other situations, monsters will still spread out
2016-12-11 22:37:32 +01:00
Playtester
79e9afaff0 Fiber Lock / Spider Web (fixes #1782)
* Fiber Lock's duration now depends on the map and how many fiber locks have been stacked
-- PVM: 1st - 8s, 2nd - 16s (default - 8s)
-- PVP: 1st - 4s, 2nd - 8s, 3rd - 12s (default - 4s)
* Fiber Lock now always doubles fire damage, even in renewal
* When a unit affected by Fiber Lock takes fire damage, the Fiber Lock that lasts shortest is now removed
* A unit can now only move when all Fiber Locks on it were removed or have expired
* When a unit with multiple Fiber Locks on it dies, not all Fiber Locks are removed
* A unit can no longer be affected by more than 3 Fiber Locks at the same time
2016-12-11 19:25:48 +01:00
Lemongrass3110
ab38f2cd7e Fixed jobmasks for custom jobs(>32 bit)
Fixes #1784
Thanks to @Stolao
2016-12-11 16:33:41 +01:00
Lemongrass3110
93339212bc Fixed #1772 (#1773)
* Fixed #1772

Added support for char_id to readparam
Added a check and error message if get_var is used on a parameter instead of a variable
2016-12-11 16:00:44 +01:00
Lemongrass3110
d13acf3886 Fixed a bug with getarraysize
When the attached rid of the script was actually not a player, but a monster or something else the script was terminated. A good example for this was to use getarraysize on a OnTouchNPC event.

Thanks to MasterOfMuppets(@Locien) for reporting this.
2016-12-11 14:57:18 +01:00
Playtester
08406785c6 Skills that increase elemental damage (fixes #1780)
* Negative values in the attr_fix table will now longer be ignored
* Renewal: Skills that increase elemental damage stack linearly with the attr_fix value
(e.g. if the attr_fix value is -25% and a skill increases elemental damage by 50%, it becomes 25%)
* Pre-Renewal: Skills that increase elemental damage increase damage percentually
(e.g. if damage is 25 and a skill increases elemental damage by 20%, it becomes 30)
2016-12-10 18:39:03 +01:00
Playtester
fd892a0425 Monster idle/walk behavior (fixes #1778)
* Monsters will now remember which players have spotted them
* If all players that spotted the monster logged out, it will become inactive again
* Inactive monsters neither walk nor use any skills (e.g. Metamorphosis)
* Minor documentation fix
2016-12-10 17:05:09 +01:00
aleos
8399992598 Adjusted variable size
* Increased variable size for the item group check to prevent overflows.
2016-12-10 09:25:54 -05:00
Lemongrass3110
b9a8ab722e Added an additional parameter to instance_enter (#1720)
Added an additional parameter to instance_enter

This allows easier usage for instances in IM_NONE, where a player will never be attached to the instance.
All you have to do is remember the created instance id and supply this command with it. That way you do not have to use any workaround like the following anymore:
warp instance_mapname( <mapname>, <instance id> ), <hardcoded enter x coordinate>, <hardcoded enter y coordinate>;

Added usage of the new constants in the existing scripts

Fixed default checks and null pointer output
Thanks to @Atemo
2016-12-10 12:38:57 +01:00
Atemo
45bc42c305 Fix wrong command usage at sign quest
Credit Hercules@47834e8f6db03689595946af0cd95748005126c7
2016-12-09 19:58:01 +01:00
Jittapan Pluemsumran
99d0afaca0 Removed duplicated config in login_athena.conf 2016-12-09 15:47:14 +07:00
aleos89
0162ad890e Corrected Spore Explosion on GCC builds
* Follow up to 8f4660b.
* Resolves Spore Explosion not inflicting damage on targets for some GCC builds.
Thanks to @Tokeiburu!
2016-12-08 09:23:41 -05:00
Lemongrass3110
e490befb9a Follow up to e2eadcf 2016-12-08 01:41:21 +01:00
Lemongrass3110
e2eadcfbd8 Implemented mapflag nolockon correctly
Fixed #1736
Thanks to @GrumpyLittlePanda for reporting and @Playtester for pointing me into the right direction.
2016-12-07 23:09:53 +01:00
Lemongrass3110
2bb92a114b Fixed hallucination ignoring reloadbattleconf
Fixed #1765
2016-12-07 22:28:36 +01:00
Playtester
05783ade33 Follow-up to 0dbc83d (related to #1768)
* Moved the skill_tarotcard function up so the compiler doesn't throw warnings
* Minor code optimizations and comment updates
2016-12-07 22:09:09 +01:00
Playtester
0dbc83db9d Tarot Card of Fate (fixes #1768)
* Implemented official chances for each Tarot Card to occur
-- 15%: LOVERS
-- 10%: FOOL, MAGICIAN, HIGH PRIESTESS, STRENGTH, SUN
-- 8%: TEMPERANCE
-- 7%: CHARIOT
-- 6%: THE HANGED MAN
-- 5%: DEATH, STAR
-- 2%: TOWER
-- 1%: WHEEL OF FORTUNE, DEVIL
* The SUN tarot card will give you the tarot card status change
-- The status change makes you immune to other tarot card effects
-- The affected person will see a tarot card icon and the duration of the effect
* Fixed LOVERS healing self instead of the target
* The LOVERS tarot card now displays on self instead of target

Special thanks to @mrjnumber1
2016-12-07 21:28:32 +01:00
Lemongrass3110
fec4d7b0cf Added support for VS 2017 RC 2016-12-05 23:27:15 +01:00
Cydh Ramdh
342443bf61 Added new mapflag hidemobhpbar (#1537)
* Added new mapflag `hidemobhpbar` to hides monster's HP bar on a map.
* Added maps for this mapflag, credits to @Atemo and @Lemongrass3110 

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-12-04 10:52:14 +07:00
Atemo
222ee49802 Fix issue #1752
- NPC should give the Bioetics skill when changing to Creator
2016-12-03 23:50:46 +01:00
Atemo
d3f0aec324 Fix issue #1651
- The timer event wasn't updated on last tick event
2016-12-03 05:50:16 +01:00
aleos89
33fa182c48 Corrected damage immunity states (fixes #1754)
* Added unit data damage immunity to the GvG targeting function.
* Added unit data and mob mode damage immunity to the reflecting damage calculation function.
Thanks to @admkakaroto!
2016-12-02 07:38:53 -05:00
Atemo
d2651c45c1 Issue #1760 in woe 2
- The firsts barricades are now indestructible until both Guardian Stones are destroyed.
2016-12-01 23:58:43 +01:00
aleos89
c05808a305 Fixed item bonus bAddMaxWeight (fixes #1761)
* Stored bAddMaxWeight into it's own variable for later calculation.
* Created enum constants for status_calc_weight and status_calc_cart_weight for easier readability.
2016-12-01 13:00:38 -05:00
Lemongrass3110
ac2ba09415 Fixed areawarp cell check
The script command areawarp has been checking the wrong target map for ages. It has been checking the mapindex rather than the mapid and therefore returned a wrong result.
2016-12-01 13:06:54 +01:00
Atemo
d7e5f1b5d9 Fix issue #1758
- Players were warped outside the instance
2016-11-30 21:12:41 +01:00
Lemongrass3110
c88ca4432d Definition cleanup
Removed a few ghost definitions
Adjusted some definitions to use the same types

Related to #1738
2016-11-26 20:34:55 +01:00
aleos89
82675d86d0 Resolved the rental timer display (fixes #1745)
* Follow up to 45d9674.
* Fixes the timer message displaying too often.
Thanks to @whupdo!
2016-11-26 14:09:44 -05:00
Lemongrass3110
9aaf18eb33 Fixed some compile warnings
Follow up to 09a0c29
Fixes #1748 - thanks to @srhmike
2016-11-26 17:19:14 +01:00
aleos89
09a0c29a39 Corrected Lux Anima behavior (fixes #1110)
* Only transfers the most recent rune buff to the party.
* The source loses the rune buff that is passed to the party.
* There is a stack limit of 20 Lux Anima Runestones.
-- Stack only applies to renewal as the item isn't implemented in pre-renewal.
2016-11-25 15:42:44 -05:00
aleos89
2c3201116c Split item stack database between renewal and pre-renewal
* Separated the database between the two modes.
2016-11-25 15:31:16 -05:00
aleos89
595d9b743d Fixed a potential map server crash
* Resolves an invalid operator check for pc_check_available_item.
* Added a new flag for pc_delitem to not calculate a player's status when unequipping an item.
Thanks to @cydh!
2016-11-24 23:41:53 -05:00
Atemo
d78da42472 Fixed a potentiel quest warning issue #1737 2016-11-24 19:50:07 +01:00
Lemongrass3110
9040613fa6 Added missing empty newlines to a lot of files 2016-11-23 13:54:45 +01:00
Lemongrass3110
9b1b7b1a2b Replaced hardcoded genders with constants (#1730)
* Replaced hardcoded gender codes in source

Introduced a new constant for the account based gender and replaced all hardcoded gender references to code 99 with it.

* Replaced hardcoded gender codes in npcs

Exported the gender constants into the script engine and replaced all usages with references to the constants instead of expecting a value behind them.

* Corrected a typo

Thanks to Machiezmo from Discord.

* Fixed an inverted gender logic

Thanks to @secretdataz
2016-11-22 21:20:03 +01:00
aleos89
127c13bbdd Cleaned up Item Groups
* Moved constants from const.txt to script_constants.h.
* Removes hard coded item groups into the IG_* database to easily be adjusted/created.
* Renamed IG_FingingOre -> IG_FindingOre.

Enabled commented Item Groups
* Follow up to 50d5c14.
* Retains consistency between constant and ID values.
* Renamed duplicate item groups to avoid compile errors.
2016-11-22 09:32:14 -05:00
rAthenaAPI
c7a8909d42 SQL synchronization 2016-11-22 06:39:24 +01:00
zackdreaver
aaca85351d Renewal item_db update (#1723)
* Renewal item_db update:
- Add new costumes
- Fix item script

Signed-off-by: zackdreaver <zackdreaver@gmail.com>
2016-11-22 12:39:19 +07:00
Playtester
ee9a0f988d Renewal Sage ground effect visuals (fixes #1735)
* Fixed Land Protector, Volcano, Deluge and Violent Gale only displaying one cell
* Because 12-4=8 and not 10!
2016-11-21 18:05:47 +01:00
Cydh Ramdh
633a642e5a * Corrected combos of Elemental Clothes (19048)
* Updated Status Change documentation for `SC_SIEGFRIED` and `SC_SCRESIST`
* Fixed `bResEff` cannot be used to increase the rate (for reducing resistance)

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-11-20 11:35:02 +07:00
aleos89
0dd3c74c2e Fixed some arrays not zeroing out on status recalculation (fixes #1722)
* Follow up to 0f1b1af, f296409, and a79d065.
* Fixes several bonuses that are not zeroed out properly since the block order didn't match.
Thanks to @whupdo!
2016-11-19 09:26:33 -05:00
aleos89
ef63cffa30 Small OPTION_INVISIBLE refactor
* Cleaned up the usage of OPTION_INVISIBLE to utilize the macro that was defined for it.
2016-11-18 14:44:49 -05:00
Lemongrass3110
1aa2012cff Fixed a typo in an item group name
Fixes #1726
Thanks to @kukuasir1
2016-11-18 10:23:42 +01:00
Playtester
db3ef52fd2 Frost Nova AoE (fixes #1619)
- Increased Frost Nova AoE from 5x5 to 7x7
- Frost Nova no longer hits enemies that are on the same cell as the caster
2016-11-17 18:25:56 +01:00
Lemongrass3110
0fa8919749 Added sura jobs to the switch 2016-11-17 17:35:35 +07:00
aleos89
9910478ce2 Resolved some compile warnings
* Resolved two unreachable code warnings.
* Resolved two potentially uninitialized local variable warnings.
2016-11-16 13:07:19 -05:00
Lemongrass3110
ecc8cf9f0b Initial release of the clan system
Thanks to @cydh, @RagnarokNova and @aleos89 for their help.
2016-11-16 15:36:08 +01:00
aleos89
dfccb88785 Removed double saving attempts
* Follow up to 3dfdb38.
* Removed an extra save attempt if a player changes jobs and has fame.
2016-11-16 08:50:36 -05:00
aleos89
3dfdb38d32 Fixed atcommand changecharsex sync issue (fixes #1684)
* Resolves the map-server holding a different job value than what the char-server could be holding.
Thanks to @Grantea!
2016-11-16 08:41:16 -05:00
Lemongrass3110
9bf5d4a291 Fixed a shadowed variable
Fixes #1718
2016-11-16 08:18:18 +01:00
aleos89
cb279a7243 Resolved an uninitialized variable (fixes #1717)
* Follow up to ade1b17.
* Corrects the countitem script command having an uninitialized variable warning during compile.
Thanks to @hnomkeng!
2016-11-15 21:54:44 -05:00
aleos89
5332d7f0e7 Resolved a map crash with pet items (fixes #1716)
* Follow up to ade1b17.
* Added a pet data check that was removed.
Thanks to @Keniski!
2016-11-15 21:52:05 -05:00
aleos89
ab7ca67ff4 Corrected Doram item combos (fixes #1711)
* Fixed Charming Grass Necklace combo not working.
Thanks to @Darkelfen!
2016-11-15 20:05:39 -05:00
Lemongrass3110
6c27a13061 Added enc_temp_folder to gitignore list 2016-11-15 23:16:31 +01:00
aleos89
d1cc320769 Corrected Storage dirty flag check
* Follow up to ade1b17.
2016-11-15 16:17:11 -05:00
aleos89
00fd5e7078 Removed rAthena Stat Reporter
* Follow up to 0ffeec0.
* No longer being used so it will now be completely removed.
2016-11-15 10:19:58 -05:00
Lemongrass3110
28cee2caa9 Cleaned storage saving output 2016-11-14 20:05:19 +01:00
Aleos
ade1b171eb Optimized Inventory, Cart Inventory, and Storage usage (#1115)
* These storage types now mimic Guild Storage and can be loaded/saved whenever needed.
* Relieves mmo_charstatus from having to send storage types and lets the char-server handle it.
* All storage types now have an increased max amount.
* Implemented Premium Storage System. Thanks to @cydh!
* Fixes #441 - Players will no longer be required to log out to resync cart item data before opening a Vending Store.
* Refactored player weight and cart weight calculations into their own functions.
* Added script commands openstorage2, guildstoragecountitem[2] and guildstoragedelitem[2].
* Refactored several function return types as well as documentation.
Thanks to @lighta and @cydh for their help with it!
2016-11-14 13:11:43 -05:00
aleos89
8028789dee Removed unused functions
* Removed inter_storage_delete and inter_guild_storage_delete functions as they are not used.
2016-11-14 09:38:59 -05:00
Lemongrass3110
b5de7df013 Implemented correct windows socket cleanup
Resolves HerculesWS/Hercules#1513
Thanks to @mkbu95 for bringing this up
2016-11-14 10:44:43 +01:00
Lemongrass3110
4ed035b036 Cleaned up fame lists (#1660)
Added 0x97e into the packet length table
2016-11-14 09:04:42 +01:00
Atemo
dcc3285a5f WoE TE
- restricted HP/SP Increase potions and Concentrated White Potion Z inside castles (but SC not disabled). Issue #1713

Thanks to @Darkelfen
2016-11-13 23:15:48 +01:00
rAthenaAPI
8617f832a6 SQL synchronization 2016-11-13 21:07:29 +01:00
aleos89
eae1161d53 Corrected Sling Item behavior
* Partial revert of 89a33a7.
* Moved bonuses back to the item_db so items can easily be customized.
* Sling Item is no longer usable on self.
2016-11-13 15:07:14 -05:00
Atemo
afd6f2027d Fixed potential script (*)quest warning 2016-11-13 17:58:20 +01:00
Lemongrass3110
ea085f86f8 Follow up to 61ce61c 2016-11-12 13:47:54 +01:00
Yohanes Edwin
162c5a2c86 Fixed issue #1622: If player and NPC get same number of dice but the total is lower than 8 (#1650)
* Resolves players getting stuck in Airship Dice Quest.
Thanks to @MuzTank!
2016-11-11 16:25:28 -05:00
aleos89
c00c7346d2 Resolved some compile errors
* Follow up to 9c552ca and 5aa53e4.
2016-11-11 15:35:38 -05:00
aleos89
5aa53e4738 Merge branch 'master' into cleanup/storages_optimization 2016-11-11 14:54:43 -05:00
aleos89
56512ce116 Corrected vending order of similar item IDs
* Resolves an issue where if a similar item ID is vended more than once (non-stackable) the order of the vended items becomes incorrect when one is purchased.
Thanks to @Tokeiburu!
2016-11-11 14:26:32 -05:00
rAthenaAPI
4c2adc0d0b SQL synchronization 2016-11-11 05:41:34 +01:00
Cydh Ramdh
c7a9dd8b25 Corrected job for Crimson Weapons, Infinity Weapons, and a Spoon!
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-11-11 11:40:44 +07:00
Lemongrass3110
61ce61c7a0 Updated wiki references in README 2016-11-10 09:00:00 +01:00
Lemongrass3110
a03105b49d Fixed a potential map-server crash
Fixes #1398
2016-11-10 00:18:16 +01:00
Lemongrass3110
4687247769 Fixed a possible null pointer
Follow up to e93c888
See https://rathena.org/board/topic/108045-map-server-crash-after-using-skill-manhole/
2016-11-10 00:12:26 +01:00
aleos89
74a703d649 Corrected Anodyne usage on no teleport maps (fixes #1704)
* Added a missing break.
2016-11-09 09:36:10 -05:00
aleos89
550cfcad54 Merge branch 'master' of https://github.com/rathena/rathena 2016-11-08 11:10:33 -05:00
aleos89
623d845717 Fixed IgnoreDefClassRate check (fixes #1702)
* The item bonus will now properly check for a valid Class rather than a valid Race.
* Added IgnoreDefRaceRate and IgnoreDefClassRate to the item_bonus documentation.
Thanks to @Tokeiburu!
2016-11-08 11:07:08 -05:00
aleos89
9a009bf316 Corrected Spiritual Sphere Absorption and Cursed Circle interaction (fixes #1514)
* Spiritual Sphere Absorption will fail to go through if the caster is captured in Cursed Circle.
2016-11-07 16:46:21 -05:00
CairoLee
e21b39230a Clear unused battle configure "disp_serverbank_msg" 2016-11-07 22:00:37 +01:00
aleos89
c8d37c4448 Removed Frigg's Song from Group A Songs (fixes #1583)
* Song can now overlap with Group A and B Songs.
* Song was removed from group in Hero's Trail III patch.
2016-11-07 15:08:49 -05:00
aleos89
45d9674d2b Resolved rental timer display (fixes #1542)
* Resolves the timer display overflowing when an item is rented for a long duration.
Thanks to @mrjnumber1!
2016-11-07 14:39:43 -05:00
aleos89
cbc365d0f2 Corrected autospell bonuses (fixes #1593)
* Resolves the range check when the config is enabled not checking the proper distance between the two targets.
* Updated the item bonus documentation.
Thanks to @chriser-!
2016-11-06 14:15:12 -05:00
Playtester
78d9e2a245 Slave aggro (fixes #1676)
- Slaves will now become aggressive when their master starts chasing a target to attack it
2016-11-06 11:17:14 +01:00
rAthenaAPI
d0ce53e312 SQL synchronization 2016-11-06 06:10:56 +01:00
Sean Allen
8c3562a045 Fixed 3D_Glasses item script. (#1694)
* 3D_Glasses's item script Class=Job_Star_Gladiator2 is wrong, Changed to `Class==Job_Star_Gladiator2`
2016-11-06 12:10:50 +07:00
Aleos
0b68035248 Cleaned up instance parsing checks (#1610)
* Cleaned up instance parsing checks (fixes #1606)
* Changed atoi to strtol.
* Added data validation checks.
* References to #1609.
2016-11-05 09:56:28 -04:00
Cydh Ramdh
20e228a7f5 Fixed npc_cashshop_buy for 2010-11-16 client or older
* Failed to buy item from `itemshop` and `pointshop` NPC
* Thanks to Anime s2 that notices this

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-11-05 09:59:42 +07:00
aleos89
805f11d9f0 Added unit flag UF_CRAZYWEED_IMMUNE
* Follow up to 6e97762.
* Used to make unit skills immune to Crazy Vine's removal effect.
2016-11-03 21:54:04 -04:00
aleos89
6e9776203a Corrected Crazy Vines behavior (fixes #1522 and fixes #1689)
* Crazy Vines will now properly remove all ground type skills.
* Removed UF_REM_CRAZYWEED enum.
2016-11-03 21:17:34 -04:00
Cydh Ramdh
aa0b7cd7ba Removed duplicate check for storage size
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-11-04 07:27:26 +07:00
aleos89
cc733a9516 Corrected Voice of Siren's behavior (fixes #1680)
* Resolves traps not being avoided when the Maestro/Wanderer has enticed the trapper.
2016-11-03 18:10:34 -04:00
aleos89
06aec011c8 Fixed a potential map crash
* Follow up to dc8d466.
2016-11-03 10:17:19 -04:00
Cydh Ramdh
9c552ca256 Merge pull request #1620 from rathena/cleanup/storage_optimization-premium_storage
Initial release 'premium' storage
2016-11-03 11:41:05 +07:00
Akkarinage
9f888077c1 Adjusted Discord link in Readme.md
* Follow up to 378b4dd
2016-11-02 22:35:34 +00:00
Aleos
378b4dd569 Adjusted the Discord link in the README
* Follow up to 12ca9a0.
* Adjusted the link to a human readable format.
2016-11-02 18:06:27 -04:00
Lemongrass3110
418d8203e6 Refactored clif functions for unit names (#1664)
Refactored clif functions for unit names

Renamed clif_charnameack to clif_name and added additional parameters to follow other clif functions.

Removed clif_charnameupdate completely since it was just a copy of the BL_PC code in clif_charnameack and replaced all calls with clif_name_area.

Fixed guild position display
Fixes #1662
Thanks to @ghul3 for reporting it.

Removed useless params for some guild functions
2016-11-02 11:13:52 +01:00
Lemongrass3110
485ae6f8cf Fixed a bug in party creation
Fixes #1674
Thanks to @admkakaroto and @Grantea
2016-11-02 10:37:27 +01:00
Cydh Ramdh
4753407d63 Fixed memleak when player's string variable is cleared
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-11-01 20:33:08 +07:00
Jittapan Pluemsumran
12ca9a05e0 Add Discord link 2016-11-01 16:12:37 +07:00
rAthenaAPI
cf482a1f05 SQL synchronization 2016-11-01 06:13:27 +01:00
Cydh Ramdh
9fcdcbde3b Item DB Updates (#1592)
* Item DB Updates
* Corrected Aegis and English (iRO) names of Enchancement Stones & Shadow Equipments, credits to http://divine-pride.net
* Corrected Price for Shadow equipments to 0.
* Fixed #1586 item position for Essence of Evils.
* Updated effect of `Bear's Power`, script by @Lemongrass3110

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-11-01 12:13:24 +07:00
aleos89
b831287b0e Small documentation cleanups
* Cleaned up the inter_server.conf documentation.
* Cleaned up the script command openstorage2 documentation.
2016-11-01 09:08:59 +07:00
Cydh Ramdh
46b1de7d50 Initial release 'premium' storage
* Adapting official multiple storages.
* Added config to defines storages. See conf/import-tmpl/inter_server.conf.
* Added packet IZ `0x388c` for sending storage definitions.
* Added script command `openstorage2` to open premium storages.
* Removed `sd->storage_size`, replaced by `sd->storage.max_amount`. The value is defined in inter_server.conf in storage entries.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-11-01 09:08:55 +07:00
aleos89
dc8d466b03 Minor define cleanups
* Removed some variable defines that were redefines.
2016-10-31 21:58:28 -04:00
aleos89
c1d9520019 Added an extra ammo requirement for specific skills (fixes #1683)
* Severe Rainstorm, Round Trip, and Fire Rain now require +1 to their ammo requirement in order to successfully cast the skill.
* These skills will still consume their normal ammo amount.
Thanks to Fyrus for data mining!
2016-10-31 17:08:44 -04:00
Playtester
9a130fa0e8 SG counter and other status variables (bugreport:7449)
- Fixed extra status variables not being cleared correctly when the killed unit did not have any status change
(e.g. SG counter will now be set back to 0 when a monster dies)

Reference: https://rathena.org/board/tracker/issue-7449-storm-gust-counter-does-not-get-reset-on-mob-dead/
2016-10-30 13:27:30 +01:00
Akkarinage
644d809ddb Added missing items for IG_Mysterious_Travel_Sack4
Used Divine-Pride as a source of data. Their information seems to be the most up-to-date source at the moment.

Signed-off-by: Akkarinage <akkarin@rathena.org>
2016-10-30 10:24:23 +07:00
Playtester
5d24d73abf Lex Divina on allies (fixes #1668)
- Lex Divina can now be cast on a silenced ally
- When casting Lex Divina on an ally that is not silenced, it will no longer display the skill animation
2016-10-29 19:43:53 +02:00
aleos89
f310f335a1 Merge branch 'master' of https://github.com/rathena/rathena 2016-10-29 12:44:41 -04:00
aleos89
561a874833 Fixed Falcon Assault element (fixes #1659)
* Partial revert of 1d8bec3.
* Element should always be neutral.
* Renewal mode ignores the target's defense cards.
2016-10-29 12:44:11 -04:00
Lemongrass3110
6f67a65855 Added documentation for item links in mes (#1616)
Fixes #1614
2016-10-29 16:28:51 +01:00
aleos89
a0caaa1036 Fixed cart data for older cart types
* Follow up to c0bd422.
* Resolves older carts that don't use the SC_PUSH_CART status to update their weight and item data properly.
* Moved to pc_scdata_received so that it will hit both versions just fine.
Thanks to @Lemongrass3110!
2016-10-28 17:51:58 -04:00
aleos89
481a730ebc Adjusted some script syntax
* Follow up to d017e24.
Thanks to @Tokeiburu!
2016-10-28 17:33:30 -04:00
Jey
c14e67426b Fixes Phantom Thrust in PvE. 2016-10-28 12:27:52 +07:00
aleos89
c0bd422af2 Resolved some more inventory issues
* Moved storage type loading further up the chain to ensure data is loaded sooner.
* Resolved cart weight and cart count to update properly.
* Resolved item display index not displaying in the correct order when opening a Vending Shop.
Thanks to @Tokeiburu!
2016-10-27 20:28:31 -04:00
aleos89
e9c5dc6e16 Fixed instance maps not being freed
* Follow up to 2cfb844.
* Resolves instance maps not getting freed when the instance is destroyed.
Thanks to @Akkarinage!
2016-10-26 19:18:57 -04:00
Smokexyz
428e516187 Typo in ipban.c (#1654) 2016-10-24 23:40:52 +02:00
Jittapan Pluemsumran
1c74af7b1f Merge pull request #1637 from rathena/hotfix/issue1636
Fixed unknown state handling in mob skills
2016-10-23 18:29:33 +07:00
Playtester
6dfaa0b17b Siroma and Imp Cards (fixes #1646)
- Pre-re: Skill-specific cast time reductions no longer stack additively with global cast time reductions
2016-10-22 12:48:07 +02:00
Playtester
04cf397ea5 Occult Impaction damage (fixes #1641)
- Fixed Occult Impaction damage being double as high as it should be
- In renewal, the skill ratio is now applied to the piercing effect
(If a skill deals 400% damage, the piercing effect will now also be 4 times more effective.)
2016-10-22 12:32:26 +02:00
Akkarinage
d20cbcae48 Removed use of petheal command from pet_db.txt in both PRE and RE modes. (#1648)
Removed use of petheal command from pet_db.txt in both PRE and RE modes.
* Changed documentation to show deprecation more prominently.
* Closes #1576.
* Removed script command petheal.

Signed-off-by: Akkarinage <akkarin@rathena.org>
2016-10-21 15:25:32 -04:00
Lemongrass3110
40430d6cb5 Fixing buildbots(for real)
Sorry guys this should not have landed in master...
2016-10-20 00:27:53 +02:00
Lemongrass3110
7d0931a45d Follow up 3108bb1
Fixed a typo with configure call
2016-10-20 00:14:02 +02:00
Lemongrass3110
ed53167bc8 Follow up abd9809
appveyor lost the quotes
2016-10-20 00:11:52 +02:00
Lemongrass3110
abd98090d1 Follow up to dd55592 2016-10-20 00:01:03 +02:00
Lemongrass3110
dd555926a0 Reenabled buildbot defines
Now builds will fail if any warnings or errors occur.

Removed duplicated "matrix" keyword I added accidentally in 3108bb1.
Removed a default warning in run once mode in the character server. Follow up to a0b3e51
2016-10-19 23:58:29 +02:00
Lemongrass3110
3108bb1265 Added a configure option for vip features
Added the new option to the CI matrix
2016-10-19 23:15:13 +02:00
Lemongrass3110
15b40509d6 Added a -D equivalent for msbuild
Fixes appveyor not building in pre-renewal mode
2016-10-19 23:14:44 +02:00
Lemongrass3110
4db687c7a4 Fixed unknown state handling in mob skills 2016-10-19 14:46:11 +02:00
Lemongrass3110
b2f0ffb947 Fixed a potential server crash in mob_chat_db
Fixes #1635
Thanks to @Temtaime
2016-10-19 12:24:46 +02:00
Lemongrass3110
3ad16f04fb Merge pull request #1634 from Temtaime/patch-1
Fix type in warning message

Thanks to @Temtaime
2016-10-19 12:18:32 +02:00
Temtaime
655d6f56e7 Fix type in warning message 2016-10-19 12:35:12 +03:00
Aleos
e93c8880b3 Updated Manhole skill behavior (#1617)
* Updated Manhole skill behavior
* Fixes #1601
* GvG and Battleground monster objects are not able to be targeted by Manhole.
* Removed the usage of Strip Accessory on targets who are affected by Manhole.
Thanks to @ignizh!
2016-10-18 17:59:32 -04:00
Lemongrass3110
73eb96f358 Introducing charpointer macros for fifo/buffers (#1624)
* Introducing charpointer macros for fifo/buffers
2016-10-18 23:35:21 +02:00
Lemongrass3110
56c9765fe0 Fixed a wrong close in the eye of hellion quest
Merges HerculesWS/Hercules@d8441a3
Thanks to @Ridley8819
2016-10-18 22:49:18 +02:00
aleos89
031adff925 Updated Ranger Traps behavior
* Fixes #1611.
* Magenta, Cobalt, Maize, and Verdure Traps should permanently change the element of the target.
2016-10-18 21:54:46 +02:00
Lemongrass3110
55c5627eef Fixed compilation warning in pre-re
Fixes #1627
Thanks to @keitenai
2016-10-17 13:53:04 +02:00
rAthenaAPI
a0c7d6e2fe SQL synchronization 2016-10-16 23:07:52 +02:00
Lemongrass3110
568262faf4 Added latest npc constants
Also added some mob placeholders
2016-10-16 23:07:28 +02:00
Lemongrass3110
57131f286c Fixed some compile warnings
Fixes #1623
Thanks to @lelouch22
2016-10-16 14:20:17 +02:00
Lemongrass3110
48c43cf92f Refactored clif_charnameack
Added support for ZC_ACK_REQNAMEALL2 which is used from 2015-05-13 and higher
Added packet documentation for ZC_ACCEPT_ENTER3
Fixed some visual effects not being resent when using `@refresh`. Thanks to @Grantea
2016-10-16 12:58:03 +02:00
aleos89
7e2efec61b Moved some inventory checks
* Resolved item bonuses not properly being given that get applied before the player's inventory is received.
* Resolved rental items that have Status Changes attached to them not getting removed if the timer expired when the player logs in.
* Removed an extra call for player's with item sets.
Thanks to @Tokeiburu!
2016-10-14 12:50:06 -04:00
Jittapan Pluemsumran
09cb81d98e Added a sample for utilizing the random option system. 2016-10-14 19:38:15 +07:00
Lemongrass3110
2bde36fb9d Merge pull request #1563 from rathena/cleanup/npc_name_length
Expand NPC Name Length to 50

Thanks to @cydh!
2016-10-14 09:37:36 +02:00
Lemongrass3110
6a8985531b Fixed NPC markets
Fixed signedness warnings for the sanity zero-terminations
2016-10-14 09:14:22 +02:00
Lemongrass3110
e443f846c6 Increased EVENT_NAME_LENGTH and some more cleanups
Fixed an invalid reference in clif.c(follow up to 008be23)
Moved the OnWhisperGlobal name definition to the other special event name declarations
Increased EVENT_NAME_LENGTH from 51 to 77 characters because it uses NPCs exname which can be up to 50 characters now
Added a warning when an NPCs exname is too long for an OnWhisperEvent
2016-10-14 09:13:53 +02:00
Lemongrass3110
b60f74c3df Sanity zero-termination for NAME_LENGTH usages 2016-10-14 09:13:21 +02:00
Lemongrass3110
4d71a12d00 Fixed a few EVENT_NAME_LENGTH usages 2016-10-14 09:11:28 +02:00
Cydh Ramdh
d3077435e8 Expand NPC Name Length to 50
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-10-14 09:11:28 +02:00
Cydh Ramdh
748035141b Merge branch 'master' into cleanup/storages_optimization 2016-10-14 06:12:52 +07:00
Cydh Ramdh
b2c4178209 Corrected 'VIP' personal info notification (#1613)
* Only displayed when map-server is changed or when changing map that has different base rate with previous map's rate, should not when map changed/warped.
* Updated some packet that related with VIP and its doc.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-10-14 06:04:09 +07:00
Lemongrass3110
768d801f3d Merged storage loading into a single function
Follow up to 800714a forgot to eliminate TABLE_CART_ completely.
2016-10-14 00:41:15 +02:00
aleos89
a8c8cbd498 Small cleanups
* Corrected the spacing to tabs in a few locations.
* Corrected a variable typo.
2016-10-13 18:06:58 -04:00
Lemongrass3110
800714abfe Reverted a lot of e8f4500
Wasted 11 bytes of network traffic to keep the code clean.

Process:
1) A player tries to open a vending store and is now in the pre-vend state.
2) If all items in the cart are saved then he can proceed to opening the store.
3) If not a request to save the cart data is sent to the inter server.
4) If the acknowledgment packet from the inter server is received then check if the player is still online and in pre-vend state and open the vending dialog
2016-10-13 23:53:34 +02:00
Cydh Ramdh
8f3599b0e3 Fixed VIP char selection window (#1598)
* Char selection window went crazy when `VIP_ENABLE` is defined
* Fixed #628

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-10-12 06:26:30 +07:00
aleos89
6663df344b Corrected script command statusup2 documentation (fixes #1612)
* Corrected the documentation referencing the wrong script command.
* Removed some trailing white spaces.
* Prettified some text.
Thanks to @lucasoli!
2016-10-11 14:23:15 -04:00
Jittapan Pluemsumran
f51a1c74ba Removed additional clif_maptypeproperty2 calls 2016-10-11 08:45:03 +02:00
Lemongrass3110
940c473c88 Cleaned up map property sending functions
Implemented ZC_MAPPROPERTY_R2 properly
2016-10-11 08:45:03 +02:00
Lemongrass3110
ce9e623e47 Added a configuration for deletion restriction
Additionally added the checks to char_delete_char_sql so it is triggered on deletion itself and from older packets(chclif_parse_delchar) too.
2016-10-11 08:41:06 +02:00
Cem YILMAZ
5ea873b8b2 Added guild/party checks for character deletion process #1480 2016-10-11 08:41:06 +02:00
Cydh Ramdh
3e4d2b86c2 Merge pull request #1089 from Baalberith6/autotrade
Fixing @at venders being stuck when map->char connection gets reset.
2016-10-11 12:38:14 +07:00
Lemongrass3110
103ee947ff Follow up to f0dd764
Fixed compile/merge errors from 5a56210
2016-10-10 13:13:23 +02:00
Lemongrass3110
f0dd764095 Merge branch 'master' into cleanup/storages_optimization
# Conflicts:
#	src/map/script.c
2016-10-10 13:06:52 +02:00
Jittapan Pluemsumran
10946dd891 Removed README.txt
README.md in its text form is already human-readable.
2016-10-09 09:12:34 +07:00
Cydh Ramdh
19d620575a Fixed #1575, cart cannot be changed.
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-10-09 08:29:16 +07:00
Cydh Ramdh
cd0b2b2974 Follow up 9a52768f6f (#1595)
* Fixed #1594, compile warning

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-10-08 06:01:00 +07:00
Cydh Ramdh
9a52768f6f Cleanup party withdraw (#1585)
* Added enum for withdraw result in mmo.h.
* Added name of kicked player and changed `sd` init from `account_id` to `char_id`.
* Fixed party list window isn't updated when member kicked.
* Updated packet documentation.
* Thanks to @aleos89 @Lemongrass3110

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-10-06 10:58:05 +07:00
Jittapan Pluemsumran
01b1052570 Merge pull request #1589 from rathena/hotfix/issue1587
Fixed random options being removed on card removal
2016-10-03 21:50:08 +07:00
Lemongrass3110
5a5621073f Fixed random options being removed on cardremoval
Fixes #1587
2016-10-03 13:31:20 +02:00
Jittapan Pluemsumran
6510d414fa Merged warp and warpchar into a single function (#1584)
* the warp command now allows you to warp other players
* the warpchar script command is still usable but not recommended
* removed warpchar documentation from script_commands.txt to let it fade from people's memory
2016-10-02 23:25:03 +02:00
Atemo
6216bfbbfd Fixed Kafra length name follow up 7a011ecd34 2016-10-01 22:14:14 +02:00
rAthenaAPI
963cfa5771 SQL synchronization 2016-10-01 16:54:54 +02:00
Jittapan Pluemsumran
7a011ecd34 Merge pull request #981 from rathena/woe_te-restrictions
WoE:Training Edition implementation
* Added a new version of WoE, WoE:TE which forbids 3rd class and 2nd expanded class from joining.
  - 10 new WoE castles.
  - New zone for job_noenter_map.txt
  - Various items are restricted.
* New monsters for the guild dungeon.
2016-10-01 21:54:44 +07:00
aleos89
42ce38c286 Renamed WoE:TE directory and files
* Now matches WoE:FE and WoE:SE format
* Now reflects respective script commands.
2016-10-01 10:17:21 -04:00
Lemongrass3110
3b09de10e9 Fixed random options with MAX_ITEM_RDM_OPT < 5 (#1580)
* Fixed random options with MAX_ITEM_RDM_OPT < 5

Fixed a possible issue on 2015 clients with random options, if you define an amount less than 5, because the client expects that much.

* Fixed a copy-paste mistake

Follow up to 6a01375
Thanks to @secretdataz
2016-09-30 22:26:37 +07:00
aleos89
01e5fbe0b7 Fixed an ambiguous if statement (fixes #1581)
* Resolves a compile warning for a multi-line define.
2016-09-30 10:16:16 -04:00
Atemo
14628e2d4d Corrected function name in the comment 2016-09-29 20:15:30 +02:00
aleos89
fed68141fa Cleaned up the WoE:TE NPC dialogues 2016-09-29 13:09:41 -04:00
Lemongrass3110
30647011e2 Small cleanups 2016-09-29 15:04:35 +02:00
Jittapan Pluemsumran
228f0c5e3b Export some more constant for multiple purposes
- MAX_* for iteration purpose
- INT_MIN and INT_MAX for sanity check
- NAME_LENGTH / PASSWD_LENGTH for in-game account manipulation
2016-09-29 18:28:24 +07:00
Lemongrass3110
2661b7a23d Added missing script changelog entries 2016-09-29 09:41:51 +02:00
Lemongrass3110
9e176ce8d1 Whitespace cleanup from merging
Follow up to 644e294.
Sorry somehow tortoise git always screws up with those lines...
2016-09-29 08:19:26 +02:00
Lemongrass3110
644e294699 Merge branch 'master' into woe_te-restrictions
# Conflicts:
#	npc/re/mapflag/nobranch.txt
#	npc/re/mapflag/nomemo.txt
#	npc/re/mapflag/noteleport.txt
#	npc/re/scripts_athena.conf
#	src/map/atcommand.c
#	src/map/map.h
#	src/map/script.c
#	src/map/script_constants.h
2016-09-29 08:13:31 +02:00
Cydh Ramdh
6d31591258 Updated Monster Skills. Thanks to @aleos89 !
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-09-29 08:23:39 +07:00
aleos89
f4f4367c52 Corrected Eleanor's Eternal Quick Combo behavior (fixes #1568)
* Adjusted skill type to misc.
* Added missing damage calculation.
* Corrected the Equipment ATK reduction.
* Moved the Stun addition and Tinder Breaker removal to skill_additional_effect.
2016-09-28 13:59:40 -04:00
aleos89
7be38fa70f Enabled Warlock for atcommand bodystyle 2016-09-28 12:43:39 -04:00
Lemongrass3110
8e3da7ffed Changed mob parsing order (#1573)
Fixes #1572
2016-09-27 19:28:05 +02:00
Lemongrass3110
0c07b660b9 Updated buyingstore list (#1570)
* Updated renewal buyingstore list
* Updated some older/commented entries in renewal
* Updated pre-renewal buyingstore list
2016-09-27 19:12:31 +02:00
Jittapan Pluemsumran
90539f48b3 Added English comments in nullpo.h (#1556)
* Added English comments in nullpo.h
* Updated comment formatting
* Added _f functions for Visual Studio
2016-09-23 16:34:55 +02:00
Cydh Ramdh
79b39e5a1d Exports constants
* `SI_MERMAID_LONGING`
* `SI_MAGICAL_FEATHER`

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-09-21 19:35:59 +07:00
Playtester
0e4d6a4f24 Monster Storm Gust and Sightrasher (fixes #1562)
- Storm Gust and Sightrasher Level 10 when used by monsters will now deal the same damage as when used by a player
2016-09-19 18:23:13 +02:00
rAthenaAPI
e820ef9090 SQL synchronization 2016-09-17 04:29:31 +02:00
Jittapan Pluemsumran
c1b455235b Merge pull request #1559 from Jeybla/FixQuadrille2
[Fix] Quadrille [2] (16024) Jobmask
2016-09-17 09:29:25 +07:00
Jey
9425f54904 [Fix] Quadrille [2] (16024) Jobmask 2016-09-17 04:17:20 +02:00
rAthenaAPI
5f20c0ce0c SQL synchronization 2016-09-16 04:48:05 +02:00
Cydh Ramdh
0fc59c7c8a Item DB Updates
* Added missing job, upper, and gender values
* Added new items
* Added new packages (IG_Ink_Ball and IG_Something_Candy_Holder credits to Divine-Pride.net)

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-09-16 09:36:55 +07:00
Lemongrass3110
0c903a0771 Added AL_HEAL to power skill list
Thanks to @Playtester
2016-09-15 08:31:28 +02:00
Cydh Ramdh
7d72a70c5c Follow up 61a57668ed
* Missing semicolon

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-09-15 09:38:19 +07:00
rAthenaAPI
328ef187a6 SQL synchronization 2016-09-14 08:19:18 +02:00
Lemongrass3110
61a57668ed Nightmare Glastheim (#1541)
Originally released by @Ridley8819 on HerculesWS/Hercules@114767c

Additions:
Added drops for Baphomet and Chimera
Removed duplicated champion monsters

@aleos89 cleaned up NPC dialogue and some of the grammar.
2016-09-14 08:19:14 +02:00
rAthenaAPI
2c0cf04ebe SQL synchronization 2016-09-14 07:38:40 +02:00
Jittapan Pluemsumran
633934bbac Merge pull request #1555 from zackdreaver/master
Renewal item_db update
2016-09-14 12:38:34 +07:00
zackdreaver
17eab30242 Renewal item_db update:
- Add new costumes

Signed-off-by: zackdreaver <zackdreaver@gmail.com>
2016-09-13 19:07:06 +07:00
zackdreaver
ef113cebf0 Renewal item_db update
- Fix mdef of shadow handicraft (itemID 5750)
- Add new gears

Signed-off-by: zackdreaver <zackdreaver@gmail.com>
2016-09-13 15:10:26 +07:00
aleos89
391f0d68fd Fixed map-server errors from Cloud Kill (fixes #1553)
* Resolves the Cloud Kill status trying to add a timer to a dead target.
2016-09-12 11:04:01 -04:00
Jittapan Pluemsumran
64e15932aa Cleaned up Dimensional Gap NPCs 2016-09-12 20:55:43 +07:00
Jittapan Pluemsumran
ddac48d5dd Adjusted minimum vit_penalty_num config to 1 to avoid potential crash
* To disable this feature, just set vit_penalty_type to 0 is enough!
2016-09-12 18:26:45 +07:00
Cydh Ramdh
6aed7e0245 Added WOE TE monsters and spawn
* Monsters for Godly Quest, Guild Dungeons, missions, and treasure
* Thanks to http://Divine-Pride.net and @aleos89

NOTES:
* Monster English names following db.irowiki.org
* Need official name for monsters 2428 ~ 2440
* Monster modes are from various informations

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-09-12 14:23:42 +07:00
Jittapan Pluemsumran
33cda97717 Battleground script command expansion (#1534)
* Implemented 2 new battleground commands. Closes #1531.
* bg_join - join battleground without npc chat room
* bg_create - create a battle group without npc chat room
* Made events for bg_create and waitingroom2bg optional
* Made map,x,y parameters on waitingroom2bg_single optional

Thanks to @Lemongrass3110 and @cydh for code reviews
Thanks to @aleos89 for documentation cleanup
2016-09-12 13:30:50 +07:00
Cydh Ramdh
dc8471d77e Fixed Cart is not shown after relog (#1472)
* Fixed #1391
* Clean up `clif_status_change`

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-09-11 06:45:56 +07:00
Cydh Ramdh
17946ea286 Fixed Cart save issue for vending (#1551)
* Added check if cart need to be saved first or not before vending
* Removed `id` from item struct when new item added to cart.
  * The `id` value from inventory is never be used, on relog, `id`s for cart are always use 'real' value from table.
  * 0-ing the value also prevent wrong `id` number while inserting records to `vending_items`.
* Ordered by `id` whiel loading cart items from table.
* Initialize `sd->inventory`,  `sd->inventory`, and `sd->storage` to 0 on `pc_authok`

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-09-11 06:40:03 +07:00
Jittapan Pluemsumran
4ef35f4d1f Added missing close; in Ayothaya shaman 2016-09-09 16:58:15 +07:00
Jittapan Pluemsumran
bc7f2037ca Fixed Bakonawa spawn coordinate. Fixes #1544.
* Thanks to @Indigo000
2016-09-09 09:22:55 +07:00
Jittapan Pluemsumran
8d60ed2205 Adjusted Nightmare Clock Tower warper to use scope variable instead of temporary char variable 2016-09-09 08:46:31 +07:00
rAthenaAPI
6fddd9caac SQL synchronization 2016-09-09 00:54:29 +02:00
Cydh Ramdh
b46e4332df Item Updates and New Status Changes (#1539)
* Item Updates
* Added new Status Changes
* Implemented effect for respective items
  * 12874,Frost_Giant_Blood: SC_GVG_GIANT
  * 12875,Golem_Stone: SC_GVG_GOLEM
  * 12876,Elf_Tear_Stun: SC_GVG_STUN
  * 12877,Elf_Tear_Stone_Curse: SC_GVG_STONE
  * 12878,Elf_Tear_Freezing: SC_GVG_FREEZ
  * 12879,Elf_Tear_Sleep: SC_GVG_SLEEP
  * 12880,Elf_Tear_Curse: SC_GVG_CURSE
  * 12881,Elf_Tear_Silence: SC_GVG_SILENCE
  * 12882,Elf_Tear_Blind: SC_GVG_BLIND
* Thanks Divine-Pride.net

Signed-off-by: Cydh Ramdh <cydh@pservero.com>

* Follow up 9267a32d8c
* Updated Status Change doc
2016-09-09 05:54:22 +07:00
RagnarokNova
7d0c7d8b24 Initial Release of Dimensional Gap (dali) NPCs 2016-09-08 22:54:15 +07:00
Jittapan Pluemsumran
d074cf67a7 Revert "Corrected Mora Daily Quest Job EXP formula"
This reverts commit 3607efd5c6.
2016-09-08 13:18:52 +07:00
Atemo
d62f422e3d Corrected OnTouch/OnTouch_ in NPC script (#1548)
Some leftover from aegis convertion..

Skipped pre-re folder, I don't have old data.
2016-09-07 21:35:14 +02:00
rAthenaAPI
18a8c735c5 SQL synchronization 2016-09-07 09:20:39 +02:00
Lemongrass3110
aaa2ca86e4 Fixed ATK2 values for nightmare clock tower 2016-09-07 09:20:08 +02:00
aleos89
cb252ded85 Storage types optimization clean ups
* Removed char_inventory_to_sql and merged differences with char_memitemdata_to_sql.
Thanks to @Jeybla's suggestion!
2016-09-06 14:43:52 -04:00
aleos89
7a05b59dd1 Merge branch 'master' into cleanup/storages_optimization 2016-09-06 13:40:01 -04:00
aleos89
c3a308ffdb Storage types optimization fixes
* Fixed guild storage getting reset on server restart.
* Adjusted a guild bound item acknowledgment attempting to create guild storage data if not found.
* Added expire_time to guild storage data.
* Added some missing random option item checks.
Thanks to @Jeybla!
2016-09-06 13:16:14 -04:00
aleos89
adbabeeef5 Fixed guild storage item transfers
* Fixed items not getting removed from inventory/cart when transferring to guild storage.
Thanks to @Jeybla!
2016-09-06 11:18:33 -04:00
rAthenaAPI
538f44fd15 SQL synchronization 2016-09-06 14:36:16 +02:00
LiMoon
71c8cc3006 Corrected weight for item 19033 and 22826
* Merges #1500.
2016-09-06 19:35:34 +07:00
Atemo
23b271c958 Initial release of nocostume map flag (#1137)
* Initial release of `nocostume` map flag to follow official `DISABLE_COSTUMEITEM` map property.
* Added map flag `nocostume`, current confirmed maps are TE Castles and Guild Dungeons.
* Fixed #815.
* Stores `setlook` values so it won't be removed on `nocostume` mapflag

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-09-06 11:34:36 +02:00
Atemo
bbb2945858 The mobs shouldn't be killed when the emperium is broken. Thanks @cydh 2016-09-05 16:15:55 +02:00
Cydh Ramdh
cf80d72359 Typo fix
* Fixed typo in warning message of `getcastledata`

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-09-05 18:00:38 +07:00
Jittapan Pluemsumran
6a457bef79 Fixed Mixed Solution No.3 Arc never being assigned and occurrence of questlog errors in map.
* Merged HerculesWS/Hercules@c8e27db. Thanks to @skyleo!
2016-09-05 16:15:03 +07:00
rAthenaAPI
c9a0d29c46 SQL synchronization 2016-09-04 22:41:53 +02:00
Lemongrass3110
a7be32f754 Nightmare clocktower (#1518)
* Nightmare clocktower

This is a merge from HerculesWS/Hercules@88c5a47 originally done by @Ridley8819.
All the credits belong to him.

@aleos89 cleaned up some of the grammar and removed duplicate texts.
@secretdataz added the missing mapflags.
@Atemo adjusted Cursed Book item script
2016-09-04 22:41:47 +02:00
rAthenaAPI
7b5f2c145a SQL synchronization 2016-09-04 13:37:05 +02:00
Jittapan Pluemsumran
82ab444245 Follow up to 88fb5bd. Also adjusted job mask for Bow_Of_Storms 2016-09-04 18:36:30 +07:00
rAthenaAPI
397cf182bc SQL synchronization 2016-09-04 13:26:45 +02:00
Jittapan Pluemsumran
88fb5bdc3c Adjusted Bow_of_Storms (18123) item script. Fixed #1536 2016-09-04 18:26:34 +07:00
aleos89
432dcda695 Corrected script command unitwalk (fixes #1535)
* Resolved the event label not triggering when the unit reaches the destination.
Thanks to Cyan Hijirikawa!
2016-09-03 12:17:33 -04:00
Jittapan Pluemsumran
fb85ce207d Fixed a bug in Theore's Request quest that allows the player to bypass some steps.
Closes #1533. Thanks to @Indigo000
2016-09-03 22:35:58 +07:00
Jittapan Pluemsumran
443a2b0f9b Merge pull request #1520 from cyilcode/hotfix/issue1378
Prevented Phatasmic Arrow to knock back targets that would die from i…
2016-09-03 21:30:25 +07:00
Jittapan Pluemsumran
3607efd5c6 Corrected Mora Daily Quest Job EXP formula 2016-09-03 15:18:17 +07:00
rAthenaAPI
09e07916e7 SQL synchronization 2016-09-03 10:04:33 +02:00
Jittapan Pluemsumran
b29f7fcd93 Merge pull request #1530 from rathena/itemskill
Itemskill script command expansion
2016-09-03 15:04:28 +07:00
Jittapan Pluemsumran
cae6088414 Made Level 5 Sienna Execrate Scroll item check for skill requirements. Fixes #1532 2016-09-02 16:52:17 +07:00
Jittapan Pluemsumran
9d51221f33 Merge branch 'master' into itemskill 2016-09-02 16:50:47 +07:00
Atemo
2995ba0908 Mapflag:
- added monster_noteleport in TE castle (need official info)
Missions:
- corrected playtime check value
God quest TE:
- Changed $@2012_tegod_kafra -> $2012_tegod_kafra ; $@2012_tegod_gloria -> $2012_tegod_gloria as it should be
- Corrected lowest economy set to 1
- Minor debug and standardise script
WOE main script:
- Added a condition for mobs spawn (case guildbreak)
2016-09-02 01:36:16 +02:00
rAthenaAPI
ebb6bca0b3 SQL synchronization 2016-09-01 10:02:56 +02:00
Lemongrass3110
d21460d611 Fixed some typos and mistakes
Removed the additional argument for Level 5 Sienna Execrate for now. It will not check for the requirements for now. See issue #1532 and pull request #1530
2016-09-01 10:02:30 +02:00
aleos89
382c8d4a52 Added defines and constants for new skills (related to #1525)
* Skill are not complete, these are just the placeholders.
2016-08-31 21:09:06 -04:00
aleos89
7ffb943343 Storage optimization clean ups
* Cleaned up some of the script command documentation.
* Adjusted some checks to use constants.
2016-08-31 19:55:19 -04:00
Lemongrass3110
818727f7ef Fixed wrong usages of specialeffect (#1529)
* Fixed wrong usages of specialeffect

* Missing fix
2016-08-31 20:36:17 +02:00
Lemongrass3110
547a8e657a Applied new npctalk syntax to the existing scripts (#1528)
* Applied new npctalk syntax to Old Glast Heim

* Applied new npctalk syntax to Sara's Memory
2016-08-31 19:26:18 +02:00
Atemo
58c0920e5d Applied new npctalk syntax to the existing scripts 2016-08-31 19:12:12 +02:00
Atemo
55b30623fc Fix a small typo 2016-08-31 19:02:09 +02:00
rAthenaAPI
4ef4f1eb9f SQL synchronization 2016-08-31 18:39:39 +02:00
Jittapan Pluemsumran
399b98e4a1 Renewal Item Database Update
- Implemented items from kRO update 2016-08-18 to 2016-08-31
- Implemented Eden Group set expansion items!
2016-08-31 23:38:44 +07:00
Jittapan Pluemsumran
a79d065973 Implemented new item bonuses bRegenPercentHP and bRegenPercentHP 2016-08-31 23:37:57 +07:00
Jittapan Pluemsumran
92eacaccfd Corrected grammatical error in documentation.
Thanks to @Lemongrass3110
2016-08-31 19:48:03 +07:00
Jittapan Pluemsumran
0329edf800 Follow up to 668690d
* Commented about default behavior of itemskill command that bypasses skill requirements.
Thanks to @Lemongrass3110
2016-08-31 19:43:16 +07:00
Jittapan Pluemsumran
668690d028 Expanded itemskill script command to allow skill requirements checking 2016-08-31 19:39:42 +07:00
rAthenaAPI
30fb80afd8 SQL synchronization 2016-08-31 13:46:41 +02:00
CygnusBot
140ecb9b21 kRO 2016-08-31 dummy monster data 2016-08-31 18:39:32 +07:00
Lemongrass3110
0569d85dbf Fixed random options not being updated correctly
Fixes #1527
2016-08-31 11:53:58 +02:00
Cydh Ramdh
f7e4001f65 Follow up d84d6ba1e5
* Added restriction check for normal warp portal.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-08-31 15:08:44 +07:00
Cydh Ramdh
0df1ba0a20 TE Updates
* Implemented `job_noenter_map.txt` for TE maps.
* Added job list that cannot enter TE Castles and Guild Dungeons.
* Replaced `getpermissionwoete` with `jobcanentermap`.
* Added missing quest `7516`.
* Fixed typo in TE Mission NPC.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-08-31 14:42:49 +07:00
Cydh Ramdh
65a90ff84c Merge branch 'master' into woe_te-restrictions 2016-08-31 08:03:34 +07:00
aleos89
ab7324c84c Resolved some compile warnings
* Removed an unused variable.
* Resolved an uninitialized variable issue.
2016-08-30 20:58:40 -04:00
aleos89
bd36b294ad Merge branch 'master' into cleanup/storages_optimization 2016-08-30 19:40:36 -04:00
Cydh Ramdh
47276e94a6 Clean up party invitation reply. (#1471)
* Clean up party invitation reply.
* Added reply result as enum.
* Added official party restriction.
* Added configuration in party.conf

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-08-31 01:07:55 +02:00
Lemongrass3110
600e8ae7ce Fixed searchstore feature for 2015-02-26 onwards 2016-08-31 01:02:39 +02:00
aleos89
0feabf30ce Fixed Eclage skill animations
* Resolved Eclage skills not showing their animations.
Thanks to @Tokeiburu!
2016-08-30 18:57:05 -04:00
Cydh Ramdh
d84d6ba1e5 Initial release: Map X Job restriction (#1526)
* Listed job with matched map zone is restricted to enter the map.
* Added db file `job_noenter_map.txt` with format: `JobID,FlagZone,GroupLevelBypass`.
* Reserved usage for WOE:TE implementation.
* Typo correction, thanks @aleos89 @Lemongrass3110
2016-08-30 22:09:02 +07:00
Cydh Ramdh
fa16e30593 TE updates:
* Change God Item final broadcast from `mapannounce` to `announce`.
* Fixed variable typo in `#tequest_master_prt01` NPC. `$@2012_tegod_kafra` to `$@2012_tegod_gloria`
* Missing `OnMyMobDead` label in `#tequest_master_prt01` NPC.
* Corrected the castle Economy and Defense lowest level is 1, not 0.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-08-30 19:36:13 +07:00
aleos89
b3b2bab7c5 Follow up to cd5dbe2
* Forgot to adjust npctalk's definition.
2016-08-29 12:24:02 -04:00
aleos89
cd5dbe28e4 Adjusted the npctalk script command
* Now has an optional parameter of NPC name.
- If supplied, it will display over that NPC's head, else it will use the attached NPC.
2016-08-29 11:56:19 -04:00
Atemo
b83bfd06f5 Rental merchant:
- shouldn't count equipped item (allowing to rent multiple item)
2016-08-28 22:36:58 +02:00
Atemo
e0550db4d8 Changed maprespawnguildid flag on emperium broken.
All monsters were removed, now don't remove monsters.
2016-08-28 17:50:18 +02:00
Jittapan Pluemsumran
51ef9118a8 Merge pull request #1509 from rathena/feature/stat_reduce_pot
Implemented status reduction potion support
2016-08-28 00:36:43 +07:00
Cydh Ramdh
c5e9ce0931 * Added 'dummy' Monsters: WOE TE Treasure Chests, Thief Poring and Suspicious Baby for TE mission. Credits to http://Divine-Pride.net
* Reverted changes of Hervor Avtir against master branch

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-08-27 08:46:31 +07:00
Cydh Ramdh
8805e7e1d8 Merge branch 'master' into woe_te-restrictions 2016-08-27 07:04:41 +07:00
Cydh Ramdh
682f9184ac Follow up e6f3bf2035
* Revert removed `noequip` flags
* Typo fix

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-08-27 06:21:43 +07:00
aleos89
bf84469438 Adjusted battle_getcurrentskill() return type
* Adjusted the function's return type to uint16 to match the skill_id variable type.
2016-08-26 14:41:22 -04:00
aleos89
08f63aa3b1 Corrected quest progression (fixes #1521)
* Quests can now progress even if they are marked inactive.
Thanks to @Tokeiburu!
2016-08-26 14:34:13 -04:00
Atemo
55edbc14ef Hazy Forest:
- Added missing initnpctimer for npc 'Tired Rem's Garden Tree' and 'Spyder's Garden Tree' (issue #1517)
2016-08-26 19:26:53 +02:00
Cem YILMAZ
0fe730d972 Prevented Phatasmic Arrow to knock back targets that would die from its attack. #1378 2016-08-26 17:42:44 +03:00
Lemongrass3110
c3b6951ba7 Fixed default roulette data
Thanks to @spinzaku for bringing it to my attention.
2016-08-26 10:01:49 +02:00
Lemongrass3110
5cae674b05 Used defined variable names for constant exports (#1417) 2016-08-25 15:59:18 +02:00
rAthenaAPI
f8a8c9fe79 SQL synchronization 2016-08-24 15:29:36 +02:00
Jittapan Pluemsumran
1d6f99adab Follow up to 6bcfc18 2016-08-24 20:29:17 +07:00
rAthenaAPI
b20ab4ace2 SQL synchronization 2016-08-24 15:17:35 +02:00
Jittapan Pluemsumran
6bcfc18f6f Updated some AegisName to official name 2016-08-24 20:17:24 +07:00
Cydh Ramdh
78bc0a6131 Follow up f296409ada
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-08-24 15:35:38 +07:00
Jittapan Pluemsumran
3678fca3d4 Removed text effects from NPC titles 2016-08-23 13:26:00 +07:00
rAthenaAPI
9434d69001 SQL synchronization 2016-08-23 07:46:53 +02:00
Jittapan Pluemsumran
b58920aad8 Merge pull request #1508 from rathena/feature/ht1/sara
Implemented Heroes' Trail Part 1 - Sara's Memory instance
2016-08-23 12:46:48 +07:00
Jittapan Pluemsumran
7a3c390fb1 Add proper credit to @RagnarokNova in the script header. 2016-08-23 12:45:23 +07:00
Jittapan Pluemsumran
9b52803581 Follow up to 75b0b43bc2
* Changed script header format. Suggested by @Cydh.
2016-08-23 08:55:56 +07:00
Jittapan Pluemsumran
eb8ea91f5b Follow up to 472b885ca8
* Added brackets after if
2016-08-22 22:44:13 +07:00
Jittapan Pluemsumran
472b885ca8 Follow up to 021bed5f5d 2016-08-21 18:06:26 +07:00
Jittapan Pluemsumran
021bed5f5d Implemented status reduction potion support
* New script command `needed_status_point` added.
* The items are not yet implemented.
2016-08-21 14:30:17 +07:00
Jittapan Pluemsumran
75b0b43bc2 Implemented Heroes' Trail Part 1 - Sara's Memory instance
* Special thanks to @RagnarokNova!
* Relevant issue: #1312
2016-08-21 10:07:59 +07:00
Jittapan Pluemsumran
04ffafa5fd Added missing column check for char table in char_checkdb 2016-08-20 11:01:25 +07:00
rAthenaAPI
d20a7cafc0 SQL synchronization 2016-08-20 03:24:17 +02:00
Cydh Ramdh
24882c9605 Item DB Updates
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-08-20 08:23:50 +07:00
aleos89
d11b58ca11 Removed an unused function declaration (fixes #1503)
* Function battle_validate_conf() does not exist.
2016-08-19 14:28:57 -04:00
Aleos
3f107dea76 Merge pull request #1507 from rathena/cleanup/char_bans
Adjusted the temporary ban check
2016-08-19 13:18:36 -04:00
aleos89
bd65341685 Follow up to cd7e610
* Forgot to send the response back to the client.
2016-08-18 20:30:27 -04:00
aleos89
cd7e610879 Adjusted the temporary ban check
* Temporarily ban players who attempt to login to too many unregistered accounts.
* This makes it tougher for people who have access to server data and attempt to use that data on other servers.
2016-08-18 20:18:19 -04:00
rAthenaAPI
03adcd9bce SQL synchronization 2016-08-19 01:55:48 +02:00
Jittapan Pluemsumran
d8675957ad Merge pull request #1506 from Jeybla/FixCurRootCard
[Fix] ItemDB: 4603, 4604
2016-08-19 06:55:43 +07:00
Jey
8b3e889c26 [Fix] ItemDB: 4603, 4604
- Realized Corruption Root Card
- Corruption Root Card
2016-08-18 21:36:30 +02:00
aleos89
371f619cb4 Updated status icons to latest kRO
* Added new status icons.
2016-08-18 14:21:23 -04:00
rAthenaAPI
861c2d92c5 SQL synchronization 2016-08-18 15:23:10 +02:00
Jittapan Pluemsumran
13e8551d85 Merge pull request #1505 from zackdreaver/master
Renewal item_db update
2016-08-18 20:23:03 +07:00
Cydh Ramdh
e7147d97a1 Added empty db/pre-re/item_randomopt_db.txt, follow up f296409ada
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-08-18 14:24:49 +07:00
Aleos
c575fede4f Merge pull request #1495 from rathena/cleanup/skill_tree
Skill Tree cleanup
2016-08-17 20:17:37 -04:00
aleos89
b9e61c7b93 Resolved a compile warning
* Removed an unused variable.
2016-08-17 20:08:52 -04:00
aleos89
b2a46a33ec Follow up to 16b100d (part 2)
* Cleaned up some of the warning messages during parsing.
2016-08-17 19:48:55 -04:00
zackdreaver
d73bad4d1c Renewal item_db update
Signed-off-by: zackdreaver <zackdreaver@gmail.com>
2016-08-18 01:31:55 +07:00
aleos89
d7ee77caa3 Follow up to 16b100d
* Corrected some skill tree max levels not matching their defined max level.
2016-08-17 13:10:35 -04:00
aleos89
16b100d97d Follow up to e40c88e
* Fixed the offset when base/job level requirements are active.
* Added some validity checks for skill ID, skill level, base level and job level.
* Moved the parsing of the skill tree database after the parsing of the job databases to make sure the max base and job level data is acquired first.
2016-08-17 12:56:58 -04:00
Atemo
2387316294 Merge pull request #1499 from Jeybla/GodlikeMixerUpdate
Updated Custom Godlike Mixing NPC
2016-08-17 05:19:52 +02:00
Jey
14654b8916 Custom GL Mixer: Adds Muspellium and Essence of Rune 2016-08-17 05:09:52 +02:00
Jey
5353c44dd7 Removed 20x Oridecon from Sleipnir 2016-08-17 04:58:26 +02:00
Cydh Ramdh
8da71a126d * Fixed memory leaks from item random options, follow up f296409ada
* Clean up doc and array index check for `getequiprandomoption`, `setrandomoption`, follow up 8deabb157a
* Exported CARD0_FORGE, CARD0_FORGE, and CARD0_PET for `getequipcardid` result.
* Add `SCSTART_` references in `sc_start` doc.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-08-16 11:14:33 +07:00
Aleos
47a69c082a Corrected the showscript packet
* Follow up to 43f25e3.
* The showscript packet was being sent to all players logged in which can be network intensive.
Thanks to @Tokeiburu!
2016-08-15 22:12:33 -04:00
Jey
5d5287126a Updated Custom Godlike Mixing NPC 2016-08-15 21:48:19 +02:00
Lemongrass3110
e2bf685a86 Fixed memory leaks from item random options 2016-08-15 16:34:14 +02:00
rAthenaAPI
3d94626b0b SQL synchronization 2016-08-15 12:19:52 +02:00
Cydh Ramdh
d8537a2307 Implemented hateffect script for some items.
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-08-15 17:18:46 +07:00
Lemongrass3110
1e2e37a9d4 Some small cleanups 2016-08-15 12:15:35 +02:00
Jittapan Pluemsumran
8deabb157a Implemented basic script commands to apply options to equipped item. 2016-08-15 17:04:06 +07:00
Jittapan Pluemsumran
da21013254 Follow up to 1e8c27c.
Removed an unneccessary pointer. Thanks to @cydh
2016-08-15 16:31:48 +07:00
Jittapan Pluemsumran
1e8c27c085 Fixed compile error on VS2010
* unprofessional personal diary page 1
2016-08-14 23:23:11 +07:00
Jittapan Pluemsumran
8657c4210c Follow up to f296409ada
* Some variable and function leftovers clean-ups
2016-08-14 22:52:06 +07:00
Jittapan Pluemsumran
f296409ada Initial Release of Random Option System
* Added basic support for random option system
* Don't forget to import upgrade_20160814.sql and upgrade_20160814_log.sql to make your existing rAthena installation functional!
2016-08-14 22:21:07 +07:00
rAthenaAPI
ba80a564c1 SQL synchronization 2016-08-14 12:58:56 +02:00
Lemongrass3110
c1aa8410fa Updated hateffects to latest kRO
Added 3 new mobs listed in the kRO client
2016-08-14 12:58:32 +02:00
Lemongrass3110
a87d86cb11 Fixed getinventorylist documentation
Fixes #1497.
Thanks to @Darkelfen for reporting it.

Additionally exported the EQP_* constants into the script engine.
Replaced some hardcoded equip positions with their respective constants.
2016-08-14 00:26:22 +02:00
Lemongrass3110
ebcb92363b Follow up to ede39b1
Fixed the compile errors on packet versions < 20150513
2016-08-13 22:38:18 +02:00
Lemongrass3110
ede39b1730 Refurbished hat effects
Follow up to 5da49b8
Thanks to @cydh for the good base in #1465.

Renamed the function from itemeffect to hateffect.
The effects now get sent to other players as well.
You can enable or disable one effect at a time with the script command now.
2016-08-13 21:56:58 +02:00
Lemongrass3110
2cbc9ac507 Fixed some compile warnings
Fixed a shadowed variable in clif_parse_WisMessage
Adjusted a hardcoded limitation to use the correct define for event name length
Removed the check if the target is dead for killing cloud(leftover from 99e49d9)
2016-08-12 16:46:52 +02:00
Lemongrass3110
9157318ee9 Script level up events from atcommands
Based on @Emistry's pull request HerculesWS/Hercules#1396:
Added a configuration to enable the atcommands baselevel and joblevel to trigger their respective npc events.
This will help you guys with testing your custom scripts that are listening to OnPCBaseLvUpEvent or OnPCJobLvUpEvent.
For safety reasons we only trigger the events on level increase.
2016-08-12 15:21:48 +02:00
Lemongrass3110
f560da84c6 Fixed a crash on invalid combo scripts
Fixes #1493
Thanks to @julia40124009 for reporting.
2016-08-12 14:37:39 +02:00
aleos89
e40c88ecbf Skill Tree cleanup
* Added an optional base level requirement for skills.
* Refactored some variable types and names.
2016-08-11 18:31:59 -04:00
Atemo
c488268d8c Juperos Ruins History Quest:
- Added default arguments in function Func_JupHist to avoid being stuck (fixes #1444)
- Implemented quest log

Investment Rewards:
- Added missing Elemental Converter menu selection
2016-08-11 21:59:25 +02:00
Lemongrass3110
8857ff6279 Added custom battle config support
You can now define custom battle config structure members in src/custom/battle_config_struct.inc and initialize them in src/custom/battle_config_init.inc
You can put the configuration into any battle configuration file, but we recommend you to put it into conf/import/battle_conf.txt
2016-08-10 23:06:41 +02:00
rAthenaAPI
5090693182 SQL synchronization 2016-08-10 20:21:22 +02:00
Lemongrass3110
a209e4ce54 Updated item type of Falmons F in pre-renewal 2016-08-10 20:21:17 +02:00
aleos89
8788c74a02 Follow up to f200541
* Added missing pre-renewal skill database changes.
2016-08-10 13:50:58 -04:00
rAthenaAPI
e36ebb2640 SQL synchronization 2016-08-10 15:50:41 +02:00
Lemongrass3110
5777162d7f Fixed a few item types
Some items had a script but were marked as etc on serverside.
2016-08-10 15:50:10 +02:00
aleos89
5fcb3bff05 Corrected Knuckle Arrow behavior (fixes #1483)
* Items that prevent knock back will stop Knuckle Arrow's knock back effect.
2016-08-09 17:42:08 -04:00
aleos89
99e49d9a45 Fixed Cloud Kill causing a map-server crash
* Follow up to e5a197a and 5fabab9.
2016-08-09 17:35:05 -04:00
aleos89
f200541657 Corrected Clearance and Phantom Thrust behavior (fixes #1476)
* Now only usable on monsters and party members.
* Corrected skill error message to official.
2016-08-09 17:29:20 -04:00
rAthenaAPI
a015208282 SQL synchronization 2016-08-09 21:02:54 +02:00
Lemongrass3110
574072de41 Fixed Demon Eyes' item script
Follow up to a599264
2016-08-09 21:02:31 +02:00
rAthenaAPI
826bc42f0e SQL synchronization 2016-08-09 18:38:34 +02:00
Jittapan Pluemsumran
574e3ae88d Follow up to 9c2a74428f
Adjusted Scarlet_Poncho's equipment position
2016-08-09 23:38:25 +07:00
rAthenaAPI
f1aa08fd1a SQL synchronization 2016-08-09 18:28:10 +02:00
Jittapan Pluemsumran
8695666181 Merge pull request #1485 from zackdreaver/master
Renewal item_db update
2016-08-09 23:28:03 +07:00
rAthenaAPI
bd1ba935cb SQL synchronization 2016-08-09 18:22:08 +02:00
Jittapan Pluemsumran
9c2a74428f Corrected Scarlet_Poncho and Engraved_Plate_Armor's item type. Fixes #1491
* Thanks to @LiMoon
2016-08-09 23:21:53 +07:00
Playtester
72b61d742f GX Poison Duration (fixes #1486)
- The duration of GX poisons is now reduced by (VIT+LUK)/2 seconds
- The duration of Oblivion Curse is no longer reduced by INT
2016-08-08 21:28:00 +02:00
rAthenaAPI
24921d71b0 SQL synchronization 2016-08-07 14:26:50 +02:00
Jittapan Pluemsumran
f7b36e8c32 Implemented cards from Charleston Crisis patch 2016-08-07 19:26:42 +07:00
Jittapan Pluemsumran
5f981bc1b1 Implemented bNoMadoGear item bonus
* Support for upcoming Charleston cards
2016-08-07 18:20:30 +07:00
zackdreaver
a599264c60 Renewal item_db update:
- Add new gears
- Fix and cleanup item scripts

Signed-off-by: zackdreaver <zackdreaver@gmail.com>
2016-08-07 17:52:42 +07:00
Jittapan Pluemsumran
9912ad9656 Corrected Rift_Manteau and Rift_Shoes' tradability 2016-08-07 16:59:58 +07:00
Jittapan Pluemsumran
3d8eca4930 Merge pull request #1484 from jgoog999/06-Bullet_Magazine_Seller_Fix
Fixes issue https://github.com/rathena/rathena/issues/1482
2016-08-07 16:40:43 +07:00
Limestone
e00adfef81 Fixes issue https://github.com/rathena/rathena/issues/1482 2016-08-07 17:28:15 +08:00
rAthenaAPI
49088dfe10 SQL synchronization 2016-08-06 15:33:48 +02:00
Jittapan Pluemsumran
66f054f342 Follow up to be4a87f222 2016-08-06 20:33:38 +07:00
rAthenaAPI
638123ca73 SQL synchronization 2016-08-06 14:54:39 +02:00
Jittapan Pluemsumran
be4a87f222 Implemented Infinite Space instance's armor set. 2016-08-06 19:54:28 +07:00
rAthenaAPI
de2d8dc935 SQL synchronization 2016-08-05 23:05:37 +02:00
aleos89
676ae63cd8 Corrected Mystical Amplification behavior for renewal (fixes #913)
* Staff of Destruction and Sacrament will now lower Mystical Amplification's cast time.
* Release damage is no longer increased by Mystical Amplification.
* All hits from Water Ball, Jupiter Thunder, and Tetra Vortex have increased damage by Mystical Amplification.
2016-08-05 17:05:03 -04:00
Lemongrass3110
a855bccfd2 Fixed wrong operator usage in 2 scripts
If those fixes are wrong blame it on me!
2016-08-05 00:29:03 +02:00
Lemongrass3110
d017e24cd2 Adjusted some scripts to the new syntax
Follow up to fd48238
Thanks to @Everade and @Jeybla for reporting this problem in #1468
2016-08-05 00:28:23 +02:00
Playtester
f7a276ec73 Voice of Siren duration (fixes #507)
- The minimum duration of Voice of Siren is now 10 seconds
2016-08-04 19:09:05 +02:00
rAthenaAPI
4e137d3047 SQL synchronization 2016-08-03 04:17:50 +02:00
Jittapan Pluemsumran
373600b3f0 Merge pull request #1474 from Jeybla/FixCyclopsGlasses
Fix Cyclops Glasses Middle HG
2016-08-03 09:17:45 +07:00
Jey
393e07deb1 Fix Cyclops Glasses Middle HG 2016-08-03 02:40:22 +02:00
rAthenaAPI
ea735363c3 SQL synchronization 2016-08-02 23:54:25 +02:00
aleos89
842e30ed8a Corrected progress bar behavior (fixes #1425)
* Skills/Items, that have pop-up menus, or active NPC send a work in progress message if players try to do anything else.
* If a progress bar is active the first attempt to walk cancels the progress bar while the second walk attempt moves the player.
* Applies to renewal mode only.
2016-08-02 17:25:25 -04:00
rAthenaAPI
c7d77bbce8 SQL synchronization 2016-08-02 23:00:17 +02:00
Lemongrass3110
472b30b830 Revert .gitattributes to their original state
This reverts commits a0dd1f0 and 08ea77a
2016-08-02 19:43:06 +02:00
Lemongrass3110
5fabab9c1e Fixed a mapcrash caused by SC_CLOUD_KILL
Fixes #1462
Thanks to @Everade for reporting it to us.
2016-08-02 19:39:48 +02:00
rAthenaAPI
3af3c72152 SQL synchronization 2016-08-02 19:14:50 +02:00
Cydh Ramdh
d1c40d644c Updated .sql DB files.
* Follow up a1f59c6a0f
* Follow up 08ea77a993, normalize ending-lines.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-08-03 00:12:43 +07:00
Cydh Ramdh
a1f59c6a0f Merge branch 'items/idRO-1' 2016-08-03 00:10:23 +07:00
Cydh Ramdh
08ea77a993 Merge branch 'updated-gitattributes' 2016-08-03 00:10:01 +07:00
rAthenaAPI
97a5f66d1b SQL synchronization 2016-08-02 18:48:46 +02:00
Jittapan Pluemsumran
52f88ebc06 Removed delay reduction effect from Cenere_Card.
Thanks to @Jeybla
2016-08-02 23:48:28 +07:00
rAthenaAPI
11a842581d SQL synchronization 2016-08-02 17:53:34 +02:00
Jittapan Pluemsumran
cfc6d22123 Implemented Wunderkammer (18575) item effect. Fixes #1457 2016-08-02 22:53:10 +07:00
aleos89
6bc2f62bff Removed unused variables
* Follow up to d1a957e.
2016-08-01 12:40:23 -04:00
Cydh Ramdh
81011c87f7 Typo fixes, follow up bc0e1710ae
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-08-01 11:25:22 +07:00
Cydh Ramdh
bc0e1710ae * Follow up 65bd0eeb2a
* Corrected some item types
* Corrected flags of item_trade.txt
* Added items into item_flag.txt
* Updated item_package.txt with announce flag value

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-08-01 11:15:47 +07:00
Cydh Ramdh
a0dd1f0bde Updated .gitattributes
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-07-31 10:12:40 +07:00
Cydh Ramdh
65bd0eeb2a Added items from idRO
* Items until maintenace on 2016/07/26

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-07-31 09:26:59 +07:00
rAthenaAPI
ccd5584b84 SQL synchronization 2016-07-30 06:05:15 +02:00
Lemongrass3110
4ee0cd9da0 Added HAT_EF_FIREWORK
Follow up to 5da49b8 thanks to @lelouch22
2016-07-30 02:01:51 +02:00
Lemongrass3110
639830a004 Fixed a compile error
Follow up to 120df33
Sorry I did not wait for the build reports.
2016-07-30 00:16:28 +02:00
Limestone
120df3353e One Click Identify feature adjustments (#1463)
- In Official, you can also use Novice Magnifiers
- If you have both type of magnifiers in your inventory, it will always consume the normal magnifier first
2016-07-30 00:06:50 +02:00
Lemongrass3110
b8660e327d Updated clone depth for appveyor
We disabled rolling builds now(appveyor server side setting) so it does not look like our commits where failing the build tests anymore.
2016-07-29 19:57:39 +02:00
Lemongrass3110
e99f17b3b2 Fixed the required levels for MC_CHANGECART
Thanks to @jgoog999 for his pull request(merges and closes #1461).
2016-07-29 19:48:41 +02:00
aleos89
52a74e8590 Updated Camouflage behavior - part 2
* Follow up to bec9845.
* Arrow Shower should not benefit from Camouflage.
* Sharp Shooting and Arrow Storm bonus should be applied to all targets in the area, not just the selected target.
Thanks to @Tokeiburu!
2016-07-29 13:39:51 -04:00
Lemongrass3110
b6adc1d4ff Replaced specialeffect2 calls without constants 2016-07-29 19:34:30 +02:00
Lemongrass3110
5da49b87b5 Added hat effect packet and script support 2016-07-29 19:15:46 +02:00
Jittapan Pluemsumran
43b95eb575 Merge pull request #1460 from jgoog999/03-costumes
Implemented new costumes w/ visual effects
2016-07-29 10:03:08 +07:00
Limestone
f0ac1d81c5 Implemented new costumes w/ visual effects
- ItemID (19022) // jRO Item
 - ItemID (20062)
 - ItemID (20099)
 - ItemID (20154)
 - ItemID (20209) // jRO Item
 - ItemID (20246)

Note 1: Status ID's that we still don't have their item informations
 - SC_FLOWERSMOKE
 - SC_HAPPINESS_STAR
 - SC_MAGICAL_FEATHER

Note 2: Some of the costumes will not show it's visual effects on 2014 clients downwards.
2016-07-29 10:31:35 +08:00
aleos89
50e81a45cc Follow up to d1a957e
* Removed a comment that is no longer applicable.
2016-07-28 19:41:51 -04:00
aleos89
d1a957efea Cleaned up parts of the VIP System
* Removed battle configs vip_exp_penalty_base_normal and vip_exp_penalty_job_normal as these are duplicates of other battle configs.
* Battle config vip_exp_penalty_base and vip_exp_penalty_job are now at a rate of 100 instead of 1 to match other configs.
* Added VIP Zeny Penalty config.
* Cleaned up various rate calculations.
* Removed various macro defines that aren't needed.
* Moved the player state for atcommand showrate to the VIP struct.
2016-07-28 19:28:36 -04:00
Lemongrass3110
63ff4a9390 Made mercury riser refinable
Fixes #1458
2016-07-28 20:59:38 +02:00
Jittapan Pluemsumran
a33fbce144 Enabled previously disabled Freyja set for pre-renewal. Fixes #1455 2016-07-28 09:41:17 +07:00
aleos89
cdd4767e8e Follow up to 160f24d
* Corrected the battle_config name for the MVP Tomb delay.
Thanks to @secretdataz!
2016-07-27 19:29:23 -04:00
aleos89
1daa6fd65b Revert of efdc748
* Going to follow up later with a better fix.
2016-07-27 18:56:37 -04:00
rAthenaAPI
00868e59ec SQL synchronization
[ci skip]
2016-07-28 00:36:15 +02:00
Lemongrass3110
4b2b479785 Updated MATK of 5 items 2016-07-28 00:35:43 +02:00
aleos89
efdc748a7a Corrected bResEff behavior (fixes #996)
* Removed the common SC range check.
* A few of the Eff_* values are tied to a SC that's not within the common SC range.
2016-07-27 18:15:46 -04:00
rAthenaAPI
288bce7326 SQL synchronization
[ci skip]
2016-07-28 00:05:32 +02:00
Lemongrass3110
bf209d19c2 Updated some view ids 2016-07-28 00:04:36 +02:00
aleos89
160f24d66a Corrected MVP Tomb behavior (fixes #1429)
* On Aegis there is a 9~ second delay before the tomb is spawned.
2016-07-27 16:49:32 -04:00
aleos89
bec9845499 Updated Camouflage behavior (fixes #1438)
* Camouflage now ends when attacking plant type monsters.
* Camouflage bonus is applied to the first skill after activating Camouflage.
* Corrected movement speed bonus checks.
* Removed INF3_NOENDCAMOUFLAGE enum as it is no longer needed.
* Updated skill_db documentation.
2016-07-26 16:58:44 -04:00
Cydh Ramdh
2a1aebaf64 Cleaned up char_del_option checks
This is a squash commit for @cydh's pull request #1299.

Cleaned up the `char_del_option` checks.
Added a comment for `char_del_option`, that only work for clients that send delete request by using 0x0068 or 0x01fb.
Added an enum for values.
Added a function to validate and adjust configuration data.
Resolved character deletion not working properly for clients 2015-10-01 and higher (fixes #1189)
Delete date should be sent as remaining time on some client versions.
Adjusted some comment wording.
Added empty/default birthdate deletion.
Made email deletion case insensitive.
2016-07-26 22:35:22 +02:00
aleos89
ffec87d29a Corrected item bonus WeaponMatkRate (fixes #1446)
* Item bonus formula was checking for an incorrect MATK value.
* Moved the bonus after the WMATK and Weapon Refine calculations so it's not zeroed out at the beginning.
2016-07-25 13:27:29 -04:00
aleos89
e24f2f4f97 Corrected Earth Shaker wall checks (fixes #1447)
* Earth Shaker is no longer able to hit targets behind walls.
2016-07-25 10:56:44 -04:00
aleos89
d5edd06c6d Corrected Mercenary skills (fixes #1442)
* Adjusted Scapegoat SP requirement from 10 to 5.
* Removed 100% HP requirement of Scapegoat.
* Recuperate now removes Deadly Poison.
2016-07-25 10:49:05 -04:00
Lemongrass3110
fa8296e3c2 Merge pull request #1437 from rathena/bonus/add_drop_rate
Added script bonuses to add player's drop rate

Thanks to @cydh
2016-07-23 19:10:55 +02:00
Lemongrass3110
e7882351d8 Cleaned up player specific drop rate calculations
Removed the src check for the new bonuses.
2016-07-23 18:43:09 +02:00
Jittapan Pluemsumran
6349802d25 Enable Ranger class in bodystyle atcommand 2016-07-22 13:43:57 +07:00
Jittapan Pluemsumran
7558c1e7ed Follow up to 8f5739c
* Sorry, didn't cherry-pick all relevant commits!
2016-07-21 22:42:08 +07:00
Jittapan Pluemsumran
8f5739c0d0 Item Database Update
* Implemented Sealed_Mind_Box
* Corrected Broken_Heart and Kindly_Heart scripts.
2016-07-21 22:34:52 +07:00
Cydh Ramdh
29379c3ea5 Added script bonuses in order to support official AddReceiveItem_Equip n
* `bonus2 bDropAddRace,r,x;` : Adds x% to player's drop rate when killing a monster with race r.
* `bonus2 bDropAddClass,c,x;` : Adds x% to player's drop rate when killing a monster with race c.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-07-19 16:43:05 +07:00
Jittapan Pluemsumran
9d730f3ba9 Item database update
Fixed #1433. Fixed #1434.
2016-07-18 23:27:53 +07:00
aleos89
e771472042 Constant cleanup
* Adjusted some IDs to constant values.
2016-07-14 13:51:00 -04:00
aleos89
10c4eb08f5 Corrected documentation for SkillUseSP and SkillUseSPRate
* SP consumption decreases based on positive value.
* SP consumption increases based on negative value.
2016-07-11 10:46:19 -04:00
Jittapan Pluemsumran
395f22d9e4 Corrected a few items 2016-07-11 19:46:32 +07:00
Jittapan Pluemsumran
d57eb44fee Corrected Tanos_Axe's class and job mask. Fixed #1399 2016-07-11 13:41:30 +07:00
Jittapan Pluemsumran
63fea9cc13 Corrected Heroic_Judgement_Shawl and Heroic_Target_Suit item 2016-07-11 13:33:31 +07:00
Jittapan Pluemsumran
1f85dab1c5 Fixed Emergency Call scroll being usable on non guild-leader. Fixes #1421 2016-07-09 01:16:11 +07:00
Jittapan Pluemsumran
2f9d44c3b1 Changed Job_SuperNovice to Job_Super_Novice in scripts to match source-side constant. 2016-07-08 14:32:10 +07:00
aleos89
1a0fb8f821 Updated Golden Thief Bug card immunity (fixes #1400)
* White Imprison and Hell's Plant are now blocked by Golden Thief Bug card.
* Removed an extra status end of White Imprison in Status Recovery.
2016-07-07 20:13:25 -04:00
aleos89
82250c24dd Fixed Leech End damage underflow (fixes #1419)
* Resolves an underflow issue resulting in INT_MAX damage.
2016-07-07 17:19:10 -04:00
Lemongrass3110
fbf7957d21 Changed command definition of atcommand channel
Follow up to 369799a.
Sorry to @secretdataz, it was actually my fault.
Thanks to @lighta for bringing this to our attention.
2016-07-06 14:52:13 +02:00
Jittapan Pluemsumran
369799a6c5 Made atcommand channel unusable by non-players. Closed #1342.
* The command can still be used in scripts if there is a player attached to the script.
2016-07-06 16:40:43 +07:00
Atemo
82f5908bb5 Correct typo follow up 109b30dd51 2016-07-05 20:50:20 +02:00
Atemo
f927d636b6 Fixed issue #1409 (NPC shouldn't be clickable) 2016-07-05 16:16:35 +02:00
Atemo
1c4f940d67 Merge branch 'master' of https://github.com/rathena/rathena 2016-07-05 16:13:35 +02:00
aleos89
b3e1c52cbb Corrected Shield Press damage delay (fixes #1165)
* Damage should have a ~1 second delay as the shield animation falls.
2016-07-04 11:47:08 -04:00
Jittapan Pluemsumran
95f09f84bf Fixed some incorrect shadow gears combo script
* They should grant total immunity to a status effect.
2016-07-04 18:17:33 +07:00
Atemo
22bc0907d6 Fixed: Disable Loki NPC at entrance of Hazy Forest after the defeat of Wandering Purple Dragon. 2016-07-03 21:20:11 +02:00
Jittapan Pluemsumran
15c382ee2c Item DB update
* Changed AegisName for item #19133 (formerly Odin_Mask) to avoid duplicate AegisName
* Corrected script in item #4556 (Fenrir_Card). Thanks to @Jeybla.
2016-07-04 00:40:27 +07:00
Atemo
1ea0e3899c Merge branch 'master' of https://github.com/rathena/rathena 2016-07-03 02:20:26 +02:00
Atemo
fd6f241074 Fixed EndlessTower.txt : officially a player can't enter in endless tower if he has changed party and he already entered in the instance with his previous party. Thanks to RagEmu/Renewal@73ec00faa5 2016-07-03 02:18:31 +02:00
Lemongrass3110
d632f100b5 Removed duplicate check in guild creation
Merged from HerculesWS/Hercules@0b7498b thanks to @MishimaHaruna.
2016-07-03 02:11:57 +02:00
Atemo
109b30dd51 Fixed EndlessTower.txt : officially a player can't enter in endless tower if he has changed party and he already entered in the instance with his previous party. Thanks to RagEmu/Renewal@73ec00faa5
Fixed potential quest warning in SealedShrine.txt and quests/quests_13_1.txt
2016-07-03 02:06:52 +02:00
Lemongrass3110
63f719a154 Fixed emperium deletion on guild creation
Merged from HerculesWS/Hercules@71c24de thanks to @4144.
2016-07-03 02:06:49 +02:00
Lemongrass3110
4744ee0731 Fixed instance idle timeout
Fixed instances of going into idle mode when there were still users left in the instance.
Thanks to @Darkelfen for reporting it.
Fixes #1412.
2016-07-03 01:52:06 +02:00
aleos89
e5a197ad70 Corrected Cloud Kill effect (fixes #407)
* Properly implemented the Cloud Kill status icon.
* Poison duration is not reduced and lasts if the target leaves the AoE.
- Walking into the AoE a second time resets the Poison status.
2016-07-02 19:49:58 -04:00
aleos89
10d1020008 Fixed Elemental Change skills versus players (fixes #1411)
* Should not be usable on players or Status Immune monsters.
2016-07-02 19:24:24 -04:00
aleos89
9f68f7817c Corrected an issue with script command set
* Follow up to fd48238.
* Added a few checks so the optional value for script command setr doesn't conflict with the optional character ID value.
2016-07-01 17:46:59 -04:00
aleos89
fd482381f6 Script engine fixes/additions (fixes #1212)
* Follow up to c3193f3.
* Resolved some issues with += and -= operators.
* Cleaned up post ++ and -- operators.
* Implemented pre ++ and -- operators.
Thanks to Hercules!
2016-07-01 17:13:50 -04:00
Lemongrass3110
11179e3d43 Fixed creator npc for rebirth
The npc now gives the creators their homunculus skills if they had learned them before their rebirth.

Fixes #1408
2016-07-01 09:34:52 +02:00
Lemongrass3110
a41b132321 Updated some aegis names
Additionally trimmed some whitespaces at the end of names or at the end of lines.
Added some more placeholders for monsters.
2016-07-01 08:48:44 +02:00
Lemongrass3110
b1b43bb0df Removed hardcoded aloevera restriction
Additional changed some hardcoded ids to constants.
2016-07-01 00:33:43 +02:00
rAthenaAPI
28d76e77df SQL synchronization
[ci skip]
2016-07-01 00:05:00 +02:00
Aleos
db592a269f Updated Homunculus S Summons (fixes #420)
* Updated miscellaneous database values.
2016-06-30 18:04:02 -04:00
Jittapan Pluemsumran
cf4e6495fe SQL Synchronization
[ci skip]
2016-06-30 14:40:10 +07:00
Jittapan Pluemsumran
c5e3fb073c Merge pull request #1377 from rathena/db/itemdb
Item database update
2016-06-30 13:08:04 +07:00
Jittapan Pluemsumran
3a121e9aa8 Merge branch 'master' into db/itemdb
Conflicts:
db/re/item_db.txt
2016-06-30 12:44:28 +07:00
Jittapan Pluemsumran
16ad1fce9c Implemented God Material Box
* also corrected Hermose_Cap item script. Thanks to @zackdreaver
2016-06-30 12:34:53 +07:00
Lemongrass3110
d6d92a4b8e Small follow up to fe11416 2016-06-30 01:03:17 +02:00
aleos89
fe11416429 Streamlined renewal ASPD skill and potion calculations
* Only calculate the specific ASPD type (fixed or rate) when needed.
* Condensed some fixed ASPD bonus checks.
2016-06-29 13:23:54 -04:00
aleos89
4b679bcbb4 Merge branch 'master' of https://github.com/rathena/rathena 2016-06-29 10:16:23 -04:00
aleos89
06eab75006 Cleaned up Impressive Riff ASPD formula
* Renewal - No longer has to be /10 each time.
* Pre-renewal - Calculated separately from renewal formula.
2016-06-29 10:14:59 -04:00
Jittapan Pluemsumran
933d6879d3 Fixed #1405.
Changed a misplaced close to end
2016-06-29 20:59:26 +07:00
aleos89
b99114c0ce Corrected Swing Dance ASPD bonus
* Wrong status change value was being applied.
2016-06-28 14:00:06 -04:00
aleos89
cccb740817 Adjusted atcommand showexp display (fixes #1401)
* Follow up to d2bbd91.
* When no base or job EXP is given the message won't display.
2016-06-28 09:27:25 -04:00
Lemongrass3110
de1bc36a7a Revert "SQL synchronization"
This reverts commit e49cba5cee.

Sorry I really do not know why or how this came into master... >_<
2016-06-28 00:05:15 +02:00
rAthenaAPI
e49cba5cee SQL synchronization
[ci skip]
2016-06-27 21:58:29 +02:00
aleos89
c2035f0477 Follow up to 82af619
* Resolved a compile error.
2016-06-27 14:33:22 -04:00
aleos89
82af619dfd Refactored clif damage type calls
* Cleaned up the calls for e_damage_type to use the constant value.
2016-06-27 12:48:26 -04:00
Jittapan Pluemsumran
b8a221fc99 Merge pull request #1397 from Akkarinage/hotfix/issue1387
Added duplicate NPCs to Novice Grounds. Fixes #1387.
2016-06-27 20:22:05 +07:00
Akkarinage
1dd674ff0d Added duplicate NPCs to Novice Grounds. Fixes #1387. 2016-06-27 05:58:19 +01:00
Jittapan Pluemsumran
3eac0617cd SQL Synchronization 2016-06-26 23:01:27 +07:00
Jittapan Pluemsumran
b1d827183f Merge pull request #1392 from zackdreaver/master
Renewal item_db fix and update
2016-06-26 22:58:03 +07:00
zackdreaver
eb007e4b06 follow up 69ac7c3be9
Signed-off-by: zackdreaver <zackdreaver@gmail.com>
2016-06-26 22:42:13 +07:00
zackdreaver
69ac7c3be9 Renewal item_db fix and update
Signed-off-by: zackdreaver <zackdreaver@gmail.com>
2016-06-26 10:50:35 +07:00
aleos89
562a1a7b61 Removed some leftover variables
* Follow up to 65b716f.
2016-06-24 13:06:55 -04:00
Jittapan Pluemsumran
574f69e211 Updated HT_BLASTMINE and HT_CLAYMORETRAP renewal behavior
* These two skills now bypass defense cards.
Fixed #1028. Thanks to @Vomaito
2016-06-24 21:36:52 +07:00
Jittapan Pluemsumran
26aa69d6ef ECL_SQUOIA now removes SC_DECREASEAGI 2016-06-24 20:16:49 +07:00
Lemongrass3110
bea47eac42 Added some more missing placeholders to mobdb 2016-06-23 23:24:56 +02:00
Lemongrass3110
f03174123e Fixed full throttle status icon
It now displays the time correctly.
Fixes #1384 thanks to @julia40124009
2016-06-23 15:55:28 +02:00
Jittapan Pluemsumran
440921fba0 Merge branch 'master' into db/itemdb 2016-06-23 20:16:32 +07:00
Jittapan Pluemsumran
b3ab05d1b8 Implemented missing Summoner's weapons. 2016-06-23 19:13:54 +07:00
Jittapan Pluemsumran
b95df50cd1 Follow up to 6412c82
Correct typo in the code
2016-06-23 17:14:02 +07:00
Cydh Ramdh
6412c82d59 Follow up d2bbd913ec
* Clean up `party_exp_share` for Renewal.
* Updated `party_exp_share` source doc.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-06-23 10:42:59 +07:00
Cydh Ramdh
d2bbd913ec Fixed #1383: 0 EXP oddity for 'even share' party EXP
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-06-23 08:48:21 +07:00
Atemo
94b866e938 Fixed issue #1382 (quest error)
Thanks @anacondaqq
2016-06-23 02:25:31 +02:00
Lemongrass3110
4ad8eb0655 Fixed appveyor project id 2016-06-23 01:40:12 +02:00
Lemongrass3110
7316c45ba6 Added appveyor for windows build tests 2016-06-23 01:28:22 +02:00
Lemongrass3110
2534588af6 Added const support to mob race2 db 2016-06-23 01:16:27 +02:00
Lemongrass3110
65b716f586 Removed some hardcoded mob ids
Created some race2 values for mobs used in the Manuk and Splendide status changes
2016-06-23 00:41:21 +02:00
Lemongrass3110
9558ef0868 Moved mob random groups constants
Added/Moved the two missing groups into src.
All of them are exported now directly through script_constants.h
2016-06-22 21:04:53 +02:00
aleos89
2e98ff68ae Updated script documentation
* Updated the constant location references to the new script_constants.h file.
2016-06-22 13:47:19 -04:00
Atemo
85f44a587d Removed useless lines 2016-06-22 15:50:40 +02:00
Jittapan Pluemsumran
c658ea23d4 Follow up to 33270ed.
Change type of running_npc_stat_calc_event variable to bool.
2016-06-22 17:54:40 +07:00
Jittapan Pluemsumran
33270ed2f5 Expands pc_bonus warnings to give more info when unknown bonus type is detected. 2016-06-22 15:42:58 +07:00
Lemongrass3110
124572efad Updated slots of shield of aeon
Fixes #1265.
This data was taken from divine-pride and iRO patch 2016-06-16data_gm_desc_r2.gpf, since the item does not exist on kRO.
2016-06-21 23:57:38 +02:00
Jittapan Pluemsumran
0798acec94 Update .gitignore. Ignore *.VC.opendb
[ci skip]
2016-06-21 18:37:07 +07:00
Jittapan Pluemsumran
ec042e99a5 Follow up to 1d09abe
Only retrieve the pointer for base status once
2016-06-21 17:23:16 +07:00
Jittapan Pluemsumran
815368accf Merge pull request #1381 from AtlantisRO/master
Added use of F_HasEdenGroupMark function.
Thanks to @AtlantisRO!
2016-06-21 17:13:56 +07:00
AtlantisRO
cfe7e3efc6 Added use of F_HasEdenGroupMark function. 2016-06-21 03:44:31 -06:00
Jittapan Pluemsumran
274232f716 Merge pull request #1380 from AtlantisRO/master
Added support to Para_Team_Mark_ item in Eden Group
Thanks to @AtlantisRO!
2016-06-21 13:56:56 +07:00
AtlantisRO
3a526c7ca0 Added support to Para_Team_Mark_ in Eden Group. 2016-06-20 21:28:20 -06:00
AtlantisRO
22aa75511c Update to rAthena's Latest Version 2016-06-20 16:08:17 -06:00
aleos89
b2fedb8ea1 Follow up to 1d09abe
* Removed an unused variable.
2016-06-20 14:21:20 -04:00
Jittapan Pluemsumran
1d09abe0a8 Fix Rebirth Spirit (SL_HIGH) not increasing stat on recast
Fixes #1372. Thanks to @dragonis1701
2016-06-19 22:28:06 +07:00
Jittapan Pluemsumran
9b3a58128a Opps.
This reverts commit d4824c3
2016-06-19 22:08:01 +07:00
Jittapan Pluemsumran
d4824c36c5 Soul Breaker's magic portion should not be affected by element.
Fixes #734. Thanks to @MrAntares.
2016-06-19 22:06:33 +07:00
Jittapan Pluemsumran
e4ac1eee8c Phantasmic Arrow should use equipped weapon's element instead of forced neutral.
Fixes #1352. Thanks to dragonis1701
2016-06-19 20:42:37 +07:00
aleos89
247217e7d5 Fixed an incorrect message ID for the bodystyle atcommand
* When using an unsupported bodystyle job an invalid ID was trying to be printed.
Thanks to @julia40124009!
2016-06-19 09:02:04 -04:00
Jittapan Pluemsumran
9cf7cae557 Correct Goddess of Insight enchant script 2016-06-19 18:11:14 +07:00
Jittapan Pluemsumran
29ae472737 Item database update 2016-06-19 13:36:23 +07:00
Jittapan Pluemsumran
90c6d7a763 Added new enchantments 2016-06-19 12:54:22 +07:00
Jittapan Pluemsumran
520a84083c Add new headgears 2016-06-19 11:57:14 +07:00
aleos89
7a84b535d8 Reflect Damage versus Emperium (fixes #1356)
* Reflect Damage will no longer damage Emperium.
2016-06-18 11:29:17 -04:00
Atemo
14d93ff996 Fixed a mistake with dispbottom in hunting_missions.txt 2016-06-18 17:15:25 +02:00
aleos89
dfd9bdef63 Resolved a compile warning
* Resolves a possible attempt of outputting an uninitialized instance name during reload.
2016-06-17 13:21:47 -04:00
Atemo
6546566a4a Fix a typo in hunting_missions.txt follow up 673a93c5e4 2016-06-17 18:46:26 +02:00
Atemo
673a93c5e4 Fix issue #1225
If party enable warning / debug and error show up.
2016-06-17 15:34:46 +02:00
Jittapan Pluemsumran
33f83e0015 Updated bSkillUseSP item bonus documentation
Thanks to @Stolao
[ci skip]
2016-06-17 16:52:32 +07:00
Lemongrass3110
93c01ee056 Fixed monsterinfo and whereis
Also updated the german translation.
Follow up to 604e805
2016-06-16 23:40:14 +02:00
aleos89
604e805c03 Corrected some MAX_SEARCH results (fixes #1345)
* The count was already being capped by itemdb_searchname_array() so the check was never hit.
* Adjusted the return message to match the corrected result.
2016-06-16 13:46:15 -04:00
Atemo
abf939c559 Partial solved issue #1368
@ii displayed double info, introduced in cef2f9ea63
2016-06-16 16:15:12 +02:00
rAthenaAPI
30ca913558 SQL synchronization
[ci skip]
2016-06-15 20:00:41 +02:00
Lemongrass3110
5892e5ee68 Updated the sql conversion script 2016-06-15 20:00:27 +02:00
rAthenaAPI
0a28f4778a SQL synchronization
[ci skip]
2016-06-15 19:57:13 +02:00
Jittapan Pluemsumran
c6df701f64 Update High_Weapon_Box (12818) item script. Fixes #1339
Thanks to @spinzaku
2016-06-15 22:54:48 +07:00
Aleos
195a5254a7 Merge pull request #1334 from rathena/issue_IM_CHAR
Adjusted IM_CHAR instance mode option
* Now stores the instance using the character's ID rather than the account ID.
Thanks to @Atemo!
2016-06-15 09:14:10 -04:00
aleos89
a14e21f4dd Follow up to 15fdc12
* Adjusted the item database parser cast type.
* Adjusted the SQL tables to reflect the increased limit.
2016-06-14 17:37:04 -04:00
aleos89
15fdc12f72 Updated item database job mask to 64 bit
* Expands job mask values to higher range for future use.
Thanks to HerculesWS/Hercules@5399666!
2016-06-14 13:44:21 -04:00
Atemo
aed00e0b33 Fix issue #1361
Pintados Festival never ends.
2016-06-13 15:42:14 +02:00
Jittapan Pluemsumran
f61535b819 Revert 407fd01. I should not work at midnight...
Sorry guys, Fixes #1359
2016-06-12 23:43:44 +07:00
Jittapan Pluemsumran
407fd01d4e Revert "Cleaned up do_reload_instance. Fixes #1359."
This reverts commit e219dd9510.
2016-06-12 23:32:52 +07:00
Jittapan Pluemsumran
e219dd9510 Cleaned up do_reload_instance. Fixes #1359.
* Added mode-specific handling of instance reload.
* Resolved potential crash when not on IM_PARTY mode.
Thanks to @iubantot.
2016-06-12 23:26:38 +07:00
Jittapan Pluemsumran
055ee42b3d Fixed #910. Added weight check in Ring of the Wise King Quest.
Thanks to @Jeybla for the changes and @Akaineko-astasi for the report.
2016-06-12 20:28:50 +07:00
Atemo
a667fc0efb Fixed PLAYTIME issue in guillotine_cross.txt #1346 2016-06-11 01:07:28 +02:00
Aleos
0d43d26fb9 Follow up to 98fdf31
* Fixes an uninitialized variable.
2016-06-07 17:26:46 -04:00
Jittapan Pluemsumran
98fdf31fb3 Implemented recalculatestat command (#1348)
This command will force a stat recalculation for the attached player.
2016-06-07 23:50:34 +07:00
Jittapan Pluemsumran
ac2009be35 Resolve more error
Sorry ;----;
2016-06-07 23:21:08 +07:00
Jittapan Pluemsumran
14587cc92f Resolve error in quest_db 2016-06-07 23:16:30 +07:00
Jittapan Pluemsumran
b8898cd7f0 Updated Old Glast Heim instance
* Adds official quest entries for the instance.
* Modify behavior of item-giving NPCs.
Fixes #701. Fixes #1343.
Thanks to @exneval, @spinzaku and @tmav94.
2016-06-07 22:59:47 +07:00
aleos89
aa5d7a4d2d Corrected Knuckle Arrow's effect (fixes #1071)
* Caster will now move beside the target, not on top of the target.
* Boss monsters and knock back immune players (through items or Basilica) are not pushed and don't receive the bonus damage.
2016-06-07 10:06:23 -04:00
Lemongrass3110
7cf7a546c5 Fixed compilation for clients before 2011-11-08
Follow up to 6e9c67c
Fixes #1347
2016-06-07 12:10:39 +02:00
aleos89
ab576e9bf8 Corrected Warmer's effect (fixes #1097)
* Moved the healing effect to status change timer.
* Warmer's effect will now last the entire life of the unit.
* Warmer's effect will now be removed when a player leaves the unit.
* Corrected Cloud Kill unit flag not being applied.
2016-06-06 09:47:03 -04:00
aleos89
3817bb33ec Corrected Earthquake damage (fixes #1338)
* Resolved the ternary operator zeroing out the rest of the equation.
2016-06-05 08:37:31 -04:00
Lemongrass3110
39f06ba71d Removed redundant session check
Follow up to 323bd72
Thanks to @lighta
2016-06-05 11:03:27 +02:00
aleos89
323bd72907 Resolved a memory leak in the channel system (fixes #473)
* Added a check to preemptively stop autotrading players from creating multiple guild chat channels at server start.
2016-06-04 18:16:05 -04:00
Jittapan Pluemsumran
66cda76504 Remove webtatic repo reference for CentOS5
* The repo is down and Git is included in default repo of newer versions of CentOS
[ci skip]
2016-06-04 13:48:58 +07:00
aleos89
46f1a6f695 Resolved a compile warning
* Follow up to a89ab2f.
* Casted the message length to uint16 from size_t when writing to FIFO.
2016-06-03 12:59:30 -04:00
aleos89
e39293f129 Follow up to 19f2bc5
* Reverted parts of the Earth Quake cleanup.
* Added the missing 100% damage increase for levels 5 and higher.
* Corrected the hit rate to be 2x not 1.2x.
* Commented out the unofficial ATK2 damage increase.
2016-06-02 18:39:17 -04:00
Atemo
6951a909e3 case IM_CHAR:
script.c instance_create use sd->status.char_id
    instance.c use sd->status.account_id and map_id2sd check
2016-06-02 16:04:25 +02:00
aleos89
5ef2000bd9 Resolved a potential map crash on instance destruction (fixes #1333)
* Adjusted the instance destruction checks on party and guild breaks.
2016-06-02 09:02:14 -04:00
aleos89
eeccb70050 Merge branch 'master' into cleanup/storages_optimization
Conflicts:
	doc/script_commands.txt
	src/map/pc.c
	src/map/script.c
2016-06-01 13:24:27 -04:00
Playtester
63e8fa0721 Fixed cast sensor not working (follow-up to 55e4df1)
- Monsters with cast sensor will now start to attack the caster at cast begin again
2016-06-01 17:56:56 +02:00
Aleos
48a4ee162d Merge pull request #1324 from rathena/cleanup/monster_groups
Cleaned up monster group parsing
* Adjusted monster groups to support sv_readdb.
* Updated the import folder documentation for the related monster groups.
* Fixes #1269.
Thanks to @Lemongrass3110!
2016-06-01 10:21:26 -04:00
Jittapan Pluemsumran
25c4334e84 Add official quest condition for Guillotine Cross job change quest
Thanks to @rubie123
2016-06-01 20:14:23 +07:00
Lemongrass3110
e2d3819d99 Adjusted an inter packet to respect NAME_LENGTH
Follow up to b8d4761
2016-05-31 23:54:17 +02:00
Lemongrass3110
b8d4761671 Merge pull request #1321 from wilkemeyer/fix/mapserver-intif-partycreate-wfifoset
map-server: corrected intif_create_party sent-buffer-allocation size.
2016-05-31 23:51:34 +02:00
Aleos
1591e9ade7 Merge pull request #1308 from rathena/cleanup/item_groups
Cleaned up item group parsing
* Adjusted item groups to support sv_readdb.
* Now allows for proper usage of the import directory for these item groups.
Thanks to @Lemongrass3110!
2016-05-31 14:10:16 -04:00
Playtester
b4fe1fe365 Enchant Blade on blocked attacks (fixes #1327)
* Enchant Blade will no longer deal damage on blocked attacks (e.g. against Safety Wall and King's Grace)
2016-05-31 18:23:58 +02:00
aleos89
93aa624828 Added missing jobs to atcommand accinfo
* Added Rebellion, Oktoberfest, and Summoner job names.
* Adjusted some variable array lengths to use defines.
2016-05-30 11:02:23 -04:00
Aleos
a89ab2f123 Merge pull request #1277 from rathena/cleanup/chat_messages
Cleaned and merged the chat functions
* This addresses the issue that clients from late 2015 will not zero terminate most of their messages anymore.
* Also fixes the problem with the unknown packets that were most likely caused by adding the zero termination directly into the packet buffer.
Thanks to @Lemongrass3110!
2016-05-29 08:15:32 -04:00
Lemongrass3110
790bc58934 Fixed truncation of atcommand request messages
Merged HerculesWS/Hercules@58a7bf4
2016-05-29 12:28:29 +02:00
Lemongrass3110
a3470e87f3 Merge remote-tracking branch 'origin/master' into cleanup/chat_messages
Conflicts:
	src/map/clif.c
2016-05-29 11:52:35 +02:00
Atemo
3261532403 Follow up 97426ecce0 "Another 'unofficial fix' in assassin.txt" 2016-05-29 01:44:26 +02:00
Atemo
6258557fcc Added another note for active_transform command. 2016-05-28 20:54:53 +02:00
Atemo
97426ecce0 Another 'unofficial fix' in assassin.txt follow up 33184fe3d5 2016-05-28 20:47:56 +02:00
Atemo
88635c010a Updated the second entrance to Biolabs. 2016-05-28 20:45:36 +02:00
Atemo
6485dba326 Updated quest_db.txt for Wolfchev Laboratory.
Corrected syntax in WolfchevLaboratory.txt (dialog never triggered).
2016-05-28 20:44:06 +02:00
Lemongrass3110
961399f9de Enabled the error messages of the parsing function 2016-05-28 17:24:37 +02:00
Lemongrass3110
968c2ef24d Fixed the old import templates 2016-05-28 17:23:54 +02:00
Lemongrass3110
73f0d8423d Removed old entries in mob_random_db 2016-05-28 17:16:34 +02:00
Lemongrass3110
a89e97e5bd Changed monster group parsing to svreaddb 2016-05-28 17:14:24 +02:00
aleos89
08893675a1 Fixed atcommand skilltree (fixes #1320)
* Resolves the command not searching the skill_tree array using the correct class index.
2016-05-28 09:33:10 -04:00
Cydh Ramdh
f0ed0cfe0a Just fixed skill name in comments
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-05-28 06:34:36 +07:00
Aleos
196536e491 Merge pull request #1322 from wilkemeyer/fix/mapserver-intif-party-addmember-wfifoset
Corrected intif_party_addmember send-buffer-allocation size
Thanks to @wilkemeyer!
2016-05-27 17:30:29 -04:00
Florian Wilkemeyer
b7643e3373 map-server: intif -> intif_party_addmember: fixed wrong wfifo buffer space reservation / allocation 2016-05-27 20:57:21 +02:00
Jittapan Pluemsumran
5287f82a0e Add support for unsetting bit flag in item_noequip (Closes #1319).
* Unset the flag by passing in negative value.
* Thanks to @Everade
2016-05-28 00:20:08 +07:00
Florian Wilkemeyer
332f66d9c8 map-server: corrected intif_create_party sent-buffer-allocation size. 2016-05-27 16:58:01 +02:00
Stolao
38155a625e Merge pull request #1294 from rathena/resetnpc_update
updated resetnpc
2016-05-26 16:03:28 -07:00
Jittapan Pluemsumran
c0ab4d5594 Documentation update on body style (LOOK_BODY2) 2016-05-27 01:58:32 +07:00
Playtester
1640b40236 Official Enchant Blade damage (fixes #975)
- Implemented the fully official damage calculation for this skill, it's now 100% accurate
** Partially reverted c3f4618
** The damage bonus is: [((SkillLv x 20) + 100) x srcBaseLevel / 150] + srcINT + srcMATK - tarMDEF - tarMDEF2
** The damage bonus from base level and INT is calculated when the status change starts
** The damage bonus from MATK and the reduction from MDEF/MDEF2 is calculated per hit
2016-05-26 20:06:24 +02:00
aleos89
f91bf02154 Resolved instance destruction causing a map crash (fixes #1309)
* Follow up to 32c829d.
2016-05-26 11:07:34 -04:00
aleos89
161a4c01c9 Small adjustments for the instance system
* Follow up to 32c829d.
* Added a missing break on guild type instance creation.
- Thanks to @Canoe!
* Added instance name back to script command instance_enter.
- This will present the proper error message when trying to enter another instance.
2016-05-26 09:06:49 -04:00
Lemongrass3110
a98d6b13e8 Refactored the code of the parsing function 2016-05-26 12:25:29 +02:00
Jittapan Pluemsumran
5ac2292cc3 Correct Fatal enchantment item script. Fixes #1307 2016-05-26 11:51:14 +07:00
Aleos
32c829debe Merge pull request #1264 from rathena/feature/instance_expansion
Expanded the instance system to support new modes
* New modes include: No player attached, single player, and guild.
* Modified the instance_db to allow instance idle time to be adjustable.
* Removed Map1 from the instance_db as the EnterMap is always the same value.
* Adjusted the stored maps of instances to dynamic arrays to conserve memory.
- Max amount of possible maps increased to 255.
* Instances will now be destroyed even if the owner cannot be found.
* Corrected the return value when entering an instance when a character, party, or guild does not have an instance.
* Expanded script command instance_create to take in an owner ID and an optional mode.
* Added a new script command instance_check_guild (works the same as instance_check_party).
* Corrected a few script commands to properly stop the script engine on failures for instance script commands.
* Removed the instance name lookup for when entering an instance as instance_id is now passed.
- Adjusted script command instance_enter to no longer require the instance name.
* Cleaned up script command instance_warpall.
* Adjusted script command instance_announce to check when instance ID is 0 rather than -1 since instance IDs are stored as unsigned now.
* Refactored all instance_id to unsigned short.
* Updated documentation to reflect changes.
2016-05-25 14:55:50 -04:00
aleos89
28ad9ac22d Resolved compile warnings
* Follow up to 2cfb844.
* Initialized some variables.
2016-05-25 14:22:27 -04:00
Jittapan Pluemsumran
6f0ed156f4 Fixed #1114
Made Rhydo rune undispellable.
Correct variable type in Old Glast Heim script.
Thanks to @nehpetskie
2016-05-25 19:18:07 +07:00
Jittapan Pluemsumran
e81137c0a9 SQL Synchronization 2016-05-25 12:01:18 +07:00
Jittapan Pluemsumran
9b4c7dd1fe Correct hit amount of KO_HUUMARANKA
Fixes #1300. Thanks to @spinzaku
2016-05-25 11:57:26 +07:00
Aleos
e40c5a2fc3 Merge pull request #1279 from secretdataz/cards
Item database update - kRO Cards
* Added Infinite Space, Nightmare Pyramids, and Bio Labs level 4.
* Added a couple missing combo bonuses.
Thanks to @secretdataz!
2016-05-24 19:10:10 -04:00
nanakiwurtz
aec8b516b6 Fixed #1296
* Thanks to @X-eno

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2016-05-25 04:35:07 +07:00
Stolao
a0dd3a175a Changed revision numbering 2016-05-24 07:46:23 -07:00
aleos89
1cd648b1af Resolved compile errors
* Follow up to 1408eef.
2016-05-24 10:30:42 -04:00
aleos89
1408eefd80 Expanded max maps per instance define
* Follow up to c97be60.
* Increased the max amount of maps per instance to the limit.
2016-05-24 09:57:42 -04:00
aleos89
6babca3689 Corrected a few minor issues
* Follow up to 2cfb844.
* Adjusted the instance_db documentation.
* Adjusted script command instance_announce to check when instance ID is 0 rather than -1 since instance IDs are stored as unsigned now.
* Added a couple of checks when sending instance information to the client.
* Fixed a compile warning.
2016-05-24 09:22:03 -04:00
aleos89
cc30d9df09 Resolved some map blocks not getting freed
* Fixes Bio Explosion, Suicide Bombing, and Summon Legion not properly freeing map blocks.
Thanks to @Tokeiburu!
2016-05-23 14:55:49 -04:00
aleos89
c591586f2b Adjusted instance script's instance_enter to new format
* Follow up to c97be60.
* No longer requires instance name.
2016-05-23 14:20:55 -04:00
aleos89
2cfb844429 Refactored a bit of the instance modes
* Follow up to c97be60.
* Added some safety measures when sending the instance name to the client.
* Adjusted the stored maps of instances to dynamic arrays to conserve memory.
- Max amount of possible maps increased to 255.
* Removed Map1 from the instance_db as the EnterMap is always the same value.
* Instances will now be destroyed even if the owner cannot be found.
* Corrected the return value when entering an instance when a character, party, or guild does not have an instance.
* Corrected a few script commands to properly stop the script engine on failures for instance script commands.
* Removed the instance name lookup for when entering an instance as instance_id is now passed.
- Adjusted script command instance_enter to no longer require the instance name.
* Adjusted script command instance_create to keep backwards compatibility.
* Cleaned up script command instance_warpall.
* Updated script documentation to reflect changes.
* Updated instance_db to reflect changes.
2016-05-23 14:12:34 -04:00
aleos89
9c89b0e06e Revert "Adjusted instance scripts to new format"
This reverts commit 8f7d2208a9.
2016-05-23 12:56:11 -04:00
Stolao
65419729f9 updated resetnpc 2016-05-23 05:10:34 -07:00
Jittapan Pluemsumran
631187b3ec Follow up to 33184fe
add comment/explaination on the fix
[ci skip]
2016-05-23 00:51:46 +07:00
Jittapan Pluemsumran
33184fe3d5 Assassin job quest shouldn't set variable before the dialog is actually finished.
Fixes #1228. Thanks to @MrAntares and @spinzaku.
2016-05-23 00:43:48 +07:00
aleos89
6e9c67cb82 Fixed active_transform not getting removed (fixes #1282)
* Corrected active_transform and transform stacking display issues.
* Implemented ZC_EFST_SET_ENTER and ZC_EFST_SET_ENTER2.
- Adjusted the sc_display to make use of this.
Thanks to @exneval for the packet info!
2016-05-22 09:22:20 -04:00
Lemongrass3110
208407cfe6 Added the new import templates 2016-05-22 03:59:13 +02:00
Lemongrass3110
1e6eb7d1da Removed old entries item_group_db 2016-05-22 03:58:54 +02:00
Lemongrass3110
1739ff4153 Changed item group parsing to svreaddb 2016-05-22 03:54:52 +02:00
aleos89
4f3468958f Added a map cell check for Shadow Leap (fixes #1291)
* Resolves players being able to enter non-walkable parts of maps.
Thanks to @Tokeiburu!
2016-05-21 09:47:59 -04:00
aleos89
19f2bc597c Corrected NPC Earthquake skill (fixes #1289)
* Properly implemented the skill as a unit skill.
* Corrected the damage calculation and removed attempts at diving by zero.
* The skill now ignores the target's defense.
2016-05-20 14:00:58 -04:00
Jittapan Pluemsumran
37b3644350 Correct Boarding_Halter weight 2016-05-20 22:19:51 +07:00
Jittapan Pluemsumran
4a671ea379 Merge pull request #1183 from secretdataz/fix/holywater
Aqua Benedicta/Water Ball official behavior. Fixes #1119
2016-05-20 19:10:45 +07:00
Jittapan Pluemsumran
7e31f4fc3e Merge branch 'fix/issue1272' 2016-05-20 18:01:02 +07:00
Jittapan Pluemsumran
d1819e71b6 RAG203 (13190, 13195) should use AL_DECAGI on enemy.
Fixes #1272. Thanks to @Yuchinin
2016-05-20 17:56:02 +07:00
Lemongrass3110
2e668ea25a Merge pull request #1286 from Jeybla/add_1278
Adds var 'killedrid' to script monster OnKillEvents. (Closes #1278)

Thanks to @Jeybla - tested by @Stolao and confirmed as working.
2016-05-20 12:49:45 +02:00
Jittapan Pluemsumran
935235cea0 Item bonus bAddEff should not effect the user when hit by own skill. Fixes #720 2016-05-20 13:01:24 +07:00
Jey
5b35e1afd0 Adds var 'killedrid' to script monster OnKillEvents. (Closes #1278) 2016-05-20 02:10:22 +02:00
Cydh Ramdh
ed8c9672ee Fixed #1285
* `SC_HASTEATTACK_CASH` -> `SC_ATTHASTE_CASH`

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-05-20 06:29:58 +07:00
Jittapan Pluemsumran
440a265dff Follow up to bcdf196
silly mistake
2016-05-20 03:06:01 +07:00
Jittapan Pluemsumran
bcdf196391 Implemented new kRO cards
Added monster from new Biolab as placeholder for transform script
Corrected Nightmare Pyramids card drops
2016-05-20 03:02:29 +07:00
aleos89
01bff3bb08 Follow up to db0f231
* Refactored battle_vanish a bit more.
Thanks to @Lemongrass3110!
2016-05-19 12:38:27 -04:00
aleos89
db0f231507 Corrected vanish damage with some physical damage statuses (fixes #1262)
* Resolves Exceed Break, Spell Fist, and Giant Growth being able to do more damage with Vellum-type weapons.
* Optimized the battle_vanish calculations to their respective case.
2016-05-19 10:48:16 -04:00
Lemongrass3110
0bd54c4114 Merge pull request #1284 from secretdataz/fix/issue1265
Correct Strawberry_Decoration (2979) and Tasty_Strawberry_Hat (18852)…
2016-05-19 13:55:42 +02:00
Jittapan Pluemsumran
1672e0f7cc Correct Strawberry_Decoration (2979) and Tasty_Strawberry_Hat (18852) item script. Fixes #1265 2016-05-19 18:40:03 +07:00
Lemongrass3110
b2a50491d9 SQL Sync
[ci skip]
2016-05-19 10:08:22 +02:00
Lemongrass3110
b213864542 Merge pull request #1283 from secretdataz/master
Kitsune Ear Bell Ribbon (18934) should give 10% ASPD bonus.
2016-05-19 10:05:14 +02:00
Jittapan Pluemsumran
8e0dff7acb Kitsune Ear Bell Ribbon (18934) should give 10% ASPD bonus.
thanks to @spinzaku
2016-05-19 14:53:14 +07:00
aleos89
24ef79b12e Corrected Dispell, Clearance and Banishing Buster usage on hidden targets (fixes #1266)
* When the target hides after having one of these skills casted upon them, the skill will no longer fail.
2016-05-18 09:20:24 -04:00
Cydh Ramdh
c6917e36cd Follow up 1e584cb0f4
* `active_transform` for Fox_Ears_Bell_Ribbon (18934) was reverted. Thanks to @spinzaku

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-05-18 12:46:57 +07:00
Cydh Ramdh
1e584cb0f4 Item DB Fixes
* Fixed #1276.
  * Cursed_Lyre (1741) now cannot be equipped by Archers
  * Falken_Blitz (Falken_Blitz) now only for Sniper & Ranger
  * (Rhe rest are correct) Thanks to @darknessfmy
* Fixed #1275.
  * Fox_Ears_Bell_Ribbon (18934) now has 1 slot and require level 50 to equipped.
  * Thanks to @spinzaku

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-05-18 08:32:55 +07:00
Lemongrass3110
0a79b4bc6d Cleaned and merged the chat functions
This adresses the issue that clients from late 2015 will not zero terminate most of their messages anymore.
It should also fix the problem with the unknown packets that were most likely caused by adding the zero termination directly into the packet buffer.
2016-05-17 23:38:53 +02:00
aleos89
b3c1866cf5 Updated Defender and Neutral Barrier reductions (fixes #1065)
* Defender now reduces Acid Demonstration damage (renewal mode).
* Defender no longer reduces Throw Zeny and Rapid Throw damage.
* Acid Demonstration now misses on targets in Neutral Barrier.
2016-05-17 10:38:03 -04:00
Lemongrass3110
0b126bae37 Merge pull request #1273 from Jeybla/AddFeedingLog
Thanks to @Jeybla for pointing out that I forgot to add the update script.
2016-05-17 07:57:49 +02:00
nanakiwurtz
01a324478a Item DB SQL Sync
* Updated item_db_re.sql

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2016-05-17 12:35:01 +07:00
nanakiwurtz
c4ded914e6 Updated Item DB
* Added missing costumes
* Thanks to @zackdreaver

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2016-05-17 12:33:06 +07:00
nanakiwurtz
44e27bd6bc Merge pull request #1257 from zackdreaver/master
* Added new costumes and fix item name translation
* Thanks to @zackdreaver
2016-05-17 12:22:30 +07:00
Jey
9bd10dacf4 Follow up to 879ddcc1af:
Upgrade Script for feeding log.
2016-05-17 02:27:55 +02:00
aleos89
fe4eefb787 Implemented script command active_transform (fixes #1006)
* Works the same as script command transform and can be stacked with it as well.
* active_transform has display priority if transform is active.
Thanks to Ziu and @Darkelfen!
2016-05-16 14:15:22 -04:00
aleos89
717eb225ba Corrected weapon attack versus infinite defense (fixes #1169)
* Resolves Exceed Break, Spell Fist, and Giant Growth doing extra damage to infinite defense targets.
2016-05-15 09:10:02 -04:00
aleos89
cb703c5bfa Expanded instance_db to include idle time
* Follow up to c97be60.
* Adjusted the instance_db to allow instance idle time to be adjustable.
2016-05-14 12:06:04 -04:00
aleos89
8f7d2208a9 Adjusted instance scripts to new format
* Follow up to c97be60.
* Adjusted script command instance_create to include owner ID.
2016-05-14 12:01:22 -04:00
aleos89
c97be60bbf Expanded the instance system to support new modes
* New modes include: No player attached, single player, and guild.
* Expanded script command instance_create to take in an owner ID and an optional mode.
* Added a new script command instance_check_guild (works the same as instance_check_party).
* Refactored all instance_id to unsigned short.
2016-05-14 11:57:54 -04:00
aleos89
4c617bcd59 Corrected Graffiti removing all units (fixes #1263)
* Graffiti will no longer remove all units of the Rogue class.
* Graffiti will now fail to cast again if a Graffiti already exists on the map.
* Graffiti should only be removed on map changes, but Remover/Cleaner still removes it (custom) since the skill was never officially implemented.
2016-05-14 09:39:40 -04:00
aleos89
ca049a66f4 Resolved a compile error for CentOS (fixes #1190)
* Send a 0 instead of NULL to the va_list when freeing item groups.
2016-05-13 13:59:27 -04:00
zackdreaver
ebf0ad345b sort item based id
Signed-off-by: zackdreaver <zackdreaver@gmail.com>
2016-05-13 14:29:00 +07:00
aleos89
9cd7e595cf Updated 16th Night effect (fixes #1164)
* No longer drains 1 SP every second.
- Description states it does but tests show it does not.
2016-05-12 14:18:51 -04:00
Cydh Ramdh
b8b2593c9c Corrected weapon's MATK, not as item bonus
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-05-12 18:00:02 +07:00
zackdreaver
0b59a45005 Follow up 9c994e0986
Signed-off-by: zackdreaver <zackdreaver@gmail.com>
2016-05-12 01:34:20 +07:00
aleos89
952b072468 Implemented item bonuses bWeaponAtkRate and bWeaponMatkRate (fixes #1161)
* Increases an equipped weapon's ATK/MATK by given rate.
* bWeaponMatkRate does not work in pre-renewal as there is no MATK for weapons in pre-renewal.
* Renamed 'bonus2 bWeaponAtkRate' to 'bonus2 bWeaponDamageRate'.
- Seems to be unused in the current item database.
- Damage fits the bonus name better as it increased the final damage, not the weapon's attack specifically.
2016-05-11 13:36:59 -04:00
zackdreaver
9c994e0986 Added new costumes and fix item name translation
Signed-off-by: zackdreaver <zackdreaver@gmail.com>
2016-05-11 19:45:30 +07:00
aleos89
af8524aa7d Follow up to 10bac96
* Adjusted the directional check for script command pushpc.
2016-05-11 08:42:11 -04:00
Aleos
cdb626c628 Merge pull request #1252 from wilkemeyer/fix/clif-emblem-validate
Refactored part of guild emblem validation
* Corrected clif_validate_emblem returning incorrect value types.
* Created readable constants.
Thanks to @wilkemeyer!
2016-05-10 08:15:56 -04:00
Lemongrass3110
3132b6060d Added bonus for Purple Cowboy Hat(5816)
Thanks to @zackdreaver
2016-05-10 13:26:24 +02:00
Lemongrass3110
1c8eb5cafd Merge pull request #1255 from Daegaladh/patch-1
The names of Classic_Hat_J and Cowboy_Hat_J were swapped.
2016-05-10 13:20:21 +02:00
Lemongrass3110
2e770337ea Removed a disturbing whitespace
Fixes #1256
2016-05-10 13:04:18 +02:00
Aleos
440c6ef5bb Corrected some packet structure issues* Resolves
Corrected some packet structure issues
* Resolves a chatting issue while using fake names.
* Resolves an incorrect packet header size for requesting player registries.
Thanks to @wilkemeyer!
2016-05-09 09:24:48 -04:00
Daegaladh
b76dea774e Fixed Classic_Hat_J and Cowboy_Hat_J names swapped 2016-05-08 23:12:05 +02:00
Daegaladh
5c64185abe Fixed Classic_Hat_J and Cowboy_Hat_J names swapped 2016-05-08 23:10:51 +02:00
Lemongrass3110
c4390e58d5 Fixed compilation with visual studio
Follow up to 0da7136.
Fixes # 1254.
2016-05-08 17:18:30 +02:00
rAthenaAPI
b556d20ff6 SQL synchronization
[ci skip]
2016-05-08 17:03:12 +02:00
Aleos
62d9a9b040 Add Requiem weapon set
Added Requiem weapons
* Implemented two item bonuses bMagicAddRace2 and bIgnoreMdefRace2Rate.
Thanks to @secretdataz!
2016-05-08 08:53:03 -04:00
Florian Wilkemeyer
d2ded889cb map-server: return-type-fix clif_validate_emblem was declared to return bool but actually returned int-value 2016-05-07 22:17:25 +02:00
aleos89
c6ba347a54 Increased MAX_RACE2_MOBS for future use 2016-05-07 13:44:49 -04:00
Aleos
0da7136ae7 Merge pull request #1241 from wilkemeyer/optimize/pathsearch-memallocations
Optimized path_search() by reducing amount of allocations per call.
Thanks to @wilkemeyer!
2016-05-07 13:00:36 -04:00
Florian Wilkemeyer
6104db8d1e map-server: clif: fixed missing wfifo allocation in global-message-parser 2016-05-07 16:46:19 +02:00
Florian Wilkemeyer
b414faef45 map-server: intif fixed too small wfifo allocation 2016-05-07 16:46:13 +02:00
Jittapan Pluemsumran
7ec06ca1a8 Follow up to dc74119 2016-05-07 10:29:24 +07:00
aleos89
0c09928dd3 Fixed the Monster Transform status icon (fixes #1215)
* Resolved the timer getting removed from the icon on map changes.
* The status is not infinite so it should not be sent to the client as infinite.
2016-05-06 08:59:23 -04:00
Lemongrass3110
2b61f45a94 Fixed readparam behaviour for variables
Readparam now works correctly with variables.
This is a follow up to e112fc1 which addressed #647.

Fixes #1213, thanks to @Everade.
2016-05-06 01:14:12 +02:00
aleos89
55165ac0bf Fixed a map crash from the mob mode update (fixes #1235 and fixes #1238)
* Follow up to 55e4df1.
* Added an extra check to make sure block list is not null on skill use.
Thanks to @Vomaito, @keitenai, @spinzaku, @Playtester, and @Tokeiburu!
2016-05-05 12:36:33 -04:00
Lemongrass3110
09974e8ded Merge pull request #1243 from wilkemeyer/fix/skillidx-can-become-out-of-bounds
map-server: increased size of skilldb_id2idx[] array, to fix crash caused by array oob access.
2016-05-05 00:06:00 +02:00
Florian Wilkemeyer
f7bc696335 map-server: increased size of skilldb_id2idx[] array, to prevent out-of-bounds access.
Bug:
It was Initially declared as size of UINT16_MAX (0xffff) but as the skill-id itself which will be used
as offset can reach this value, it's too small.
2016-05-04 21:57:10 +02:00
aleos89
d83559cb7f Added missing Summoner constants
* Added JOB_SUMMONER and EAJ_SUMMONER constants.
* Updated eA Job System documentation.
2016-05-04 12:58:09 -04:00
Florian Wilkemeyer
ce97b9ae0f corrected some typos in descriptive comments 2016-05-04 14:46:29 +02:00
Florian Wilkemeyer
99cb385f34 map-server: optimized path_search(), by removing dynamic memory allocation for each call.
Pathfinding uses BHEAP_* (vector) operations from db.h, before this optimization each pathsearch resulted in an call to aMalloc() / aFree()  which is quite costly as it fragments memory over time & may cause software stalls when the application's heap must be resized.

Now it allocates the Heap once (& may grow it accordingly) and re-uses the allocated memory every time/call.

This makes also tons of monsters less cpu-time intensive.
2016-05-04 14:00:37 +02:00
Playtester
8a37f1b2a9 Marionette Control, Mechanic Back/Front Slide
- Marionette Control now has a range of 7 (fixes #1239)
- Mechanic Back/Front Slide skills are no longer blocked by gear that makes you knock-back immune (fixes #1227)
2016-05-03 22:04:43 +02:00
Lemongrass3110
2170cfc01b Fixed a cashshop crash after reloaditemdb
Fixes #1234, thanks to @julia40124009.

Please note that it is currently not supported to resend the cashshop data to the players. It is only transmitted once during login as per request from the client.
2016-05-03 19:33:23 +02:00
Lemongrass3110
6a43804f98 Fixed airship combo
It now gives the correct HP bonus.
Fixes #1237, thanks to @Asheraf.
2016-05-03 18:00:30 +02:00
rAthenaAPI
7cac060fad SQL synchronization
[ci skip]
2016-05-03 17:46:20 +02:00
aleos89
79ba46c9a0 Fixed Champion Monster modes (fixes #1226)
* The monster modes were stored in decimal format so the converter created invalid hexadecimal modes.
* Resolved a few issues with the Monster Converter tool.
-- Fixed some run time errors.
-- Added support to check for decimal format when converting.
2016-05-03 10:48:51 -04:00
Lemongrass3110
b14b3e2888 Used weapon type constants where possible
This commit makes those item scripts a little more readable and decreases the chance of mistakenly using an incorrect weapon type id.

Follow up to c6187fa.
2016-05-02 23:30:04 +02:00
Playtester
89f86b2533 Lunatic Carrot Beat, Catnip Meteor, Grand Cross (fixes #1219)
- Lunatic Carrot Beat and Catnip Meteor now deal 300% to 700% damage which is calculated once and split between multiple hits rather than calculating damage per hit; despite this, they can still hit plants
- Reduced cast time of Lunatic Carrot Beat from 3000ms to 1500ms and cooldown from 8000ms to 6000ms according to latest tests on kRO
- Fixed Catnip Meteor still having a fixed cast time
- Increased stun chance of Lunatic Carrot Beat from 10% to 20%
- Increased curse chance of Catnip Meteor from 10% to 20%
- Increased cast time of Grand Cross in pre-re to 3000ms (see #1140)
- Fixed Grand Cross sometimes having 4 intervals instead of 3 (see #1140)
2016-05-02 23:27:08 +02:00
Lemongrass3110
c6187fa5c1 Corrected weapon types for Daehyon Card
Fixes #1230.
Thanks to @joelolopez
2016-05-02 23:17:42 +02:00
aleos89
cb52138eaa Corrected Tiger Cannon combo bonus (fixes #1233)
* Tiger Cannon combo bonus should not be applied when used through Flash Combo.
* Follow up to e30df46.
2016-05-02 13:01:18 -04:00
Lemongrass3110
1967fab1ce Merge pull request #1232 from wilkemeyer/fix/pc_setpos-return-enum
fix return values in pc_setpos
2016-05-02 15:42:38 +02:00
Florian Wilkemeyer
7ff50e46a7 fix return values in pc_setpos (use enum constants instead of INT-values for return return value) 2016-05-02 15:19:37 +02:00
aleos89
abaed18016 Corrected Tension Relax HP regeneration while overweight (fixes #1177)
* When Tension Relax ends so should the HP regeneration bonus.
2016-05-01 09:51:19 -04:00
aleos89
d36610d605 Fixed a compile error on pre-renewal
* Follow up to 44cf0d0.
2016-04-30 12:04:25 -04:00
aleos89
44cf0d0e93 Corrected Enchant Blade damage formula (fixes #975)
* Enchant Blade now factors in target's DEF/MDEF and source's MATK.
2016-04-30 10:09:49 -04:00
aleos89
ba1c45c45d Fixed an issue with Chorus skill range (fixes #1162)
* Follow up to 497cca1.
* Resolves some Chorus skills not activating properly.
2016-04-29 16:21:11 -04:00
aleos89
703b1ec6ed Fixed NPC_SUMMONMONSTER switching monster mode to the slave mode (fixes #1221)
* NPC_SUMMONMONSTER should not call status_calc_slave_mode as it should be spawned like a normal monster.
2016-04-28 13:44:47 -04:00
aleos89
b02115e163 Updated Fresh Shrimp heal rate (fixes #1220)
* Fresh Shrimp now heals 4% of max HP.
2016-04-28 12:29:34 -04:00
Aleos
7a3b3e5a8c Merge pull request #1216 from rathena/hotfix/issue1214
Updated stack logic in atcommand item2
* Resolves shadow equipment stacking.
* Cleaned up how pet eggs are created.
Thanks to @julia40124009 and @Lemongrass3110!
2016-04-27 13:05:25 -04:00
Lemongrass3110
16f2d54248 Updated the logic in atcommand item2
Now shadow equipments will not stack anymore.
Pet eggs are created as in normal item atcommand.

Fixes #1214
Thanks to @julia40124009 for reporting.
2016-04-27 10:22:00 +02:00
aleos89
9fd08ef540 Corrected a comment to match the config value
* Follow up to 6227135.
2016-04-26 10:06:45 -04:00
Jittapan Pluemsumran
6620c3dcec Item database update - Requiem weapons 2016-04-26 00:36:12 +07:00
Jittapan Pluemsumran
dc74119b1e Follow up to 0f1b1af
documentation update
2016-04-26 00:33:29 +07:00
Jittapan Pluemsumran
0f1b1af928 Implemented additional item bonus bMagicAddRace2 and bIGnoreMdefRace2Rate 2016-04-26 00:31:24 +07:00
Aleos
62271358da Merge pull request #1203 from rathena/hotfix/issue1198
Small refactor of pc_setpos
* pc_setpos now delivers an enum for the error that happened.
* Additionally it now returns a different return value when the targeted player is in autotrade state.
* Added usage of this new return value to all recall commands.
* Cleaned up some outdated conf translations.
Thanks to @Lemongrass3110!
2016-04-25 12:26:30 -04:00
aleos89
f0b093f0fd Follow up to 6ab9fd0
* Adjusted the message returned.
2016-04-25 11:10:53 -04:00
Florian Wilkemeyer
1f34a8cd10 Re-Added PostBuild Step to map-server VCProject which copies the corresponding conf/import-tmpl to conf/import if they do'nt exist.
Note:
this build-step has been taken from the old VCProject file.
A cleaner way would be a separate POST_BUILD Dummy-Project which executes a batch file which would perform these actions. (So it's subject-to-change :))
2016-04-25 12:56:44 +02:00
Florian Wilkemeyer
4f47f1fab0 Added Visual Studio 2013 Solution && Clean Project Files with proper dependencies
- x64/AMD64 Support prepared (will be added in a followup commit, it needs some changes in 3rdpary libs)
2016-04-25 12:49:35 +02:00
Florian Wilkemeyer
5052751f83 Removed old VS9-15 Solutions && VC-Project files. 2016-04-25 11:47:13 +02:00
Lemongrass3110
6688089192 Follow up to 6ab9fd0
Fixed a typo.
2016-04-24 20:41:01 +02:00
Lemongrass3110
6ab9fd0eea Small refactor of pc_setpos
pc_setpos now delivers an enum for the error that happened.
Additionallly it now returns a different return value when the targeted player is in autotrade state.
Added usage of this new return value to all recall commands.
2016-04-24 20:32:05 +02:00
Aleos
e5af11309b Merge pull request #1201 from rathena/cleanup/recallall-redundant-deathcheck
Removed a redundant death check in atcommand recallall.
* This check is also done in pc_setpos.
-- It additionally corrects recallall ignoring a configuration by doing the check in the atcommand.
2016-04-24 11:26:43 -04:00
Lemongrass3110
0a92487d19 Removed a redundant death check in recallall
This check is also done in pc_setpos. It additionally ignores one of the configurations by doing this here.
2016-04-24 12:07:24 +02:00
Aleos
de8c0b78c0 Merge pull request #1200 from wilkemeyer/fwi/map_skill_cleanup_id2idx_ansi-c
* Cleaned up and optimized skill index lookup.
Thanks to @wilkemeyer!
2016-04-23 12:32:11 -04:00
Florian Wilkemeyer
2a60f56a7a map-server: skill-subsystem: removed yet another useless DBMap (skilldb_id2idx).
As a skill ID is UINT16 && our skill index is also UINT16 - there is absolutly NO need for a B-Tree.
The lookup id2idx is done really often. so a tree-traversal is a bit too costly here.

The new -array based- implementation will consume 256 KiB on 32 Bit && 512 KiB memory to provide
a static lookup table.
2016-04-23 16:45:45 +02:00
Florian Wilkemeyer
80d4474bc7 map-server: cleanup: skilldb_name2id declared in header not in source-file. 2016-04-23 16:24:07 +02:00
Cydh Ramdh
94840b1734 Follow up e8f2fc166f
* Fixed compilation warning, incompatible types for timer.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-04-23 17:59:36 +07:00
aleos89
10bac969ee Added DIR_* to script constants
* Adjusted a few location in source to use the constants.
Thanks to @Lemongrass3110!
2016-04-22 23:12:47 -04:00
aleos89
e8f2fc166f Added comments to rental functions
* Follow up to 074bdde.
* Changed pc_inventory_rental_end to a bool type.
2016-04-21 12:13:45 -04:00
aleos89
eff0dca005 Updated bone_drop configuration description
* Added a note to state the default item's trade restrictions.
2016-04-20 14:59:17 -04:00
aleos89
ef779946fa Resolved a compile warning
* Removed an unused variable from 55e4df1.
2016-04-19 08:49:34 -04:00
rAthenaAPI
a010531159 SQL synchronization
[ci skip]
2016-04-18 22:06:54 +02:00
aleos89
55e4df14c2 Overhaul of the mob mode system
* This rewrite allows for better adaptation from the Aegis Class and Attribute fields.
* Refactored the renewal level penalty function.
* Slaves are now properly assigned an official slave mode of CanWalk, CanAttack, and NoRandomWalk.
* Removed extra Boss checks and adjusted others to use their proper functions.
* Properly implemented Skill Immunity mode to match Aegis.
* Separated MVP and Boss modes.
-- MVP mode defines when mobs should give MEXP, MVP Drops, and show the MVP sign.
-- MVP now have their own item drop configurations.
* Updated the mob_db and mob_skill_db to match the new mode structure.
-- Included a Perl tool (tools/convert_monstermode.pl) to allow people to convert their custom mobs to the new mode structure.
Thanks to @Playtester and @Lemongrass3110 for help with debugging and information!
2016-04-18 14:49:27 -04:00
Atemo
6649d2e98d Merge pull request #1175 from rathena/followup_eqi
Correct docs and script follow up the refactor of EQI
2016-04-18 16:54:27 +02:00
Atemo
1a87f90aa9 Structure change of F_getpositionname 2016-04-18 16:48:54 +02:00
Atemo
7d6be7e21e Add F_getpositionname to return the EQI_* name 2016-04-18 15:50:28 +02:00
Lemongrass3110
31652610cc Added Visual Studio 2015 Update 2 files to gitignore
Merged pull request #1186.
Thanks to @secretdataz
2016-04-18 12:35:10 +02:00
Jittapan Pluemsumran
459d3083ac Update .gitignore
Ignore Visual Studio 2015 Update 2 generated file
2016-04-18 14:12:57 +07:00
Lemongrass3110
5070855f0a Reverted f0aa0e5
This commit fixed one problem, but actually broke a lot of other things.
2016-04-17 23:47:09 +02:00
Lemongrass3110
2e192b0406 Merge pull request #1170 from rathena/3rdparty-upgrade/zlib-1.2.8
Updated ZLIB to 1.2.8

This will only affect windows builds after all.
2016-04-17 22:32:48 +02:00
Lemongrass3110
f0aa0e5b60 Fixed the unknown packets on clients from october 2015 onwards
Sorry guys, we actually created this issue ourselves, because we overwrote the data of the next incoming packet eventually.
Maybe this will make 2015-10-29 also useable again.

Fixes #1049.
2016-04-17 22:31:19 +02:00
Aleos
76922d87a3 Adjusted some characters in a comment
* Corrected a comment to use UTF-8 characters.
2016-04-17 12:47:00 -04:00
aleos89
e30df46797 Fixed Tiger Cannon and Sky Net Blow splash damage (fixes #1025)
* Tiger Cannon and Sky Net Blow will now properly give Combo State bonus damage to splash targets.
* Corrected Flash Combo not delaying attacks, acting, and item usage for the entire cast time.
2016-04-17 10:51:16 -04:00
Lemongrass3110
c796a77a72 Fixed position of Costume RWC Shouting Mouth
Fixes #1184
2016-04-17 15:46:48 +02:00
Jittapan Pluemsumran
77212ece52 Follow up to 21c636c
Move CELL_CHKLANDPROTECTOR check to ST_WATER check
2016-04-17 18:30:55 +07:00
Jittapan Pluemsumran
21c636c12b Correct Aqua Benedicta interaction with Watery Evasion to match official behavior. Fixes #1119 2016-04-17 17:45:02 +07:00
Playtester
33efbd0869 Summoner, Novice and Level 151+ HP/SP updated (fixes #1181)
* Summoner HP/SP values are now accurate for both HP/SP tables and the automatic calculation
* Summoner HP/SP adjustments in the code are now at the correct place and only used when the HP/SP tables are not used
* Super Novices now gain +2000 HP at both level 99 and level 150 and the bonus stays even on level 100-149 and 151+ (fixes #979)
* Normal Novices no longer get a HP boost
* Updated HP/SP tables to official values for level 151-175 and extrapolated new values for up to level 500
* Removed 3rd classes from the HP/SP tables in pre-re and replaced them with dummy data (using Novice values)
-- Note: This way updates like this one don't need to be done twice. If you want to use 3rd classes in pre-re just copy over the lines you need from the re folder or even better, use the import folder. You should use it for all customizations you do for easier updating.
2016-04-17 01:08:44 +02:00
Atemo
05a1b61bed Correct script part 2016-04-16 16:45:33 +02:00
Atemo
803a139e78 Correct docs and script follow up the refactor of EQI 2016-04-16 15:55:20 +02:00
aleos89
5d446e533b Updated Power of Sea effect (fixes #1174)
* Now gives MHP + 1000 and MSP + 100.
* Spending 20 skill points on Fish-type skills the bonus becomes MHP + 3000 and MSP + 300.
2016-04-16 09:51:14 -04:00
Lemongrass3110
7046cf8fc5 Fixed two npcs which used hardcoded EQI_ values
Follow up to 2bf64c9
2016-04-16 11:14:36 +02:00
Lemongrass3110
5731eca3b0 Fixed two item's weapon type
Thanks to @admkakaroto
Fixes #1172
2016-04-15 21:39:37 +02:00
aleos89
63e772956b Corrected some skills healing immune targets (fixes #1109)
* Gentle Touch - Cure and Tuna Belly will no longer heal Emperium or Barricades.
Thanks to @admkakaroto and @Darkelfen!
2016-04-15 10:50:13 -04:00
aleos89
a1777407f9 Resolved final GCC compile warnings
* Fully fixes #1171.
* Follow up to ee3cf98.
2016-04-15 10:02:51 -04:00
nanakiwurtz
a85a907df6 Item DB Update
* Added more Doram items and combo
* Thanks to @Darkelfen, @secretdataz, @Daniel4rt

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2016-04-15 09:49:24 +07:00
Lemongrass3110
7264099fb9 Fixes some compiler warnings on GCC
Partially fixes #1171 as a follow up to 2bf64c9.
2016-04-14 23:24:15 +02:00
Aleos
a41ba12cf2 Fixed character deletion on 2015-11-04 and higher (fixes #1167)
* Resolves characters not being removed from the character select screen after the delete time is met and clicking the delete button.
Thanks to @joelolopez, @Darkelfen, and @Lemongrass3110!
2016-04-14 17:01:29 -04:00
nanakiwurtz
fdf67ed119 Follow up to ad9df23
* Added padding to job bitmask to prevent confusion

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2016-04-15 02:02:25 +07:00
aleos89
9a3afff176 Merge branch 'master' of https://github.com/rathena/rathena 2016-04-13 14:07:39 -04:00
aleos89
bd3952c3d4 Updated Body Style command
* Now allows for Arch Bishop class.
2016-04-13 14:07:06 -04:00
Playtester
7e97b0db86 Summoner skill status changes
* Until tested, Summoner skills will now use the default renewal base duration for their status changes
-- Bleeding: 120s
-- Stun: 5s
* Moved status change durations to duration2 for these skills
2016-04-13 18:14:49 +02:00
Playtester
e3500093b1 Catnip Meteor Cast, AoE and Damage (fixes #1166)
* Catnip Meteor now has a variable cast time of 7500ms (previous 6000ms)
* Catnip Meteor now has a cooldown of 5000ms on all levels (previously 2000-6000ms)
* Each meteor now has an AoE range of 7x7 (previously 3x3)
* Each meteor now deals 5 hits regardless of level used (previous 1-5 hits)
* Each hit now only deals 40%+20%*level damage (previously 200%+100%*level)
-- Note: As damage is multiplied by number of hits (can hit plants), damage per meteor is now 200%+100%*level
2016-04-13 17:51:31 +02:00
aleos89
67e26c885d Added a new script command unitexists
* Small follow up to 4f16d82.
* Checks to see if a unit exists or not.
2016-04-13 09:34:43 -04:00
nanakiwurtz
2874b76b98 Removed excess right curly brackets on item_db_re
* Thanks to @Yuchinin

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2016-04-13 18:19:01 +07:00
Lemongrass3110
2bf64c9773 Refactored the EQI constants
The EQI constants of the constants database did not match the ones used in the source up to now.
For whatever reason long long ago an array was created which mapped the const_db EQI constants to the source's EQP constant(aegis bitmasks).
With this commit we now use the already existing array from pc.h(which was moved from pc.c to be accessible).

This merges and closes #1147 due to follow up changes with 1cd3741.
2016-04-13 11:11:42 +02:00
rAthenaAPI
99fe9a4418 SQL synchronization
[ci skip]
2016-04-12 20:03:43 +02:00
Lemongrass3110
ad9df23d91 Merge pull request #1153 from secretdataz/db/item/vicious
Item database update - Vicious Mind weapons

Thanks to @secretdataz for the updates and @nanakiwurtz for reviewing!
2016-04-12 20:02:24 +02:00
aleos89
4f16d82540 Added return values for unit script commands (fixes #1143)
* Script commands getunitdata and setunitdata will return -1 when the given GID is not found.
* Script commands getunitname and setunitname will return Unknown when the given GID is not found.
2016-04-12 10:16:58 -04:00
aleos89
ee3cf98daa Fixed a possible item ID overflow for script command makeitem (fixes #1160)
* Fixed a possible overflow with script command getareadropitem.
* Adjusted item count variables to match item ID variable type as well.
2016-04-12 09:52:06 -04:00
Jittapan Pluemsumran
ade6b2ae98 Follow up to 3ba54ff 2016-04-12 13:36:06 +07:00
nanakiwurtz
c8ee48ab10 Follow up to cee4081
* Reverted MATK value of Eden Group Foxtail I (1699)
* Thanks to @zackdreaver and @julia40124009

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2016-04-12 11:40:44 +07:00
Playtester
87471044aa Auto spell error log (fixes #1154)
* When using auto spell, it will no longer print error messages to the map-server when no valid skill was selected

Note: This needs to be done because the client sends us random IDs if the user simply presses on "Ok" without selecting a skill, so it's technically not an error, but expected behavior that needs to be handled.

Special thanks to @anacondaqq and @stealth62 for helping to reproduce the error.
2016-04-11 19:51:51 +02:00
aleos89
17685a3247 Fixed Heaven Drive not doing any damage (fixes #1156)
* Moved the Silver Vine Root Twist cancellation from Heaven Drive to skill_additional_effect as it was breaking out of the switch before skill_attack.
2016-04-11 09:45:03 -04:00
Aleos
6dfdc4519a Merge pull request #1122 from rathena/cleanup/runonce-warnings
Removed some warnings in run-once mode
* Some notice and warning messages are not important in run-once mode.
Thanks to @Lemongrass3110!
2016-04-10 09:53:52 -04:00
Aleos
1cd3741055 Merge pull request #1120 from secretdataz/feature/geteqweaponlv
Made a new argument for script command getequipweaponlv
* Added -1 which will return the weapon level that the item is compounded on.
Thanks to @secretdataz!
2016-04-09 10:08:15 -04:00
MysticFutur0
c38bc88b8e Corrected Power of Life (fixes #1138)
* Skill was giving 2 instead of 20 CRIT to players.
Thanks to @MysticFurur0RE!
2016-04-09 08:52:11 -04:00
Jittapan Pluemsumran
3ba54ffa34 Item database update - Vicious Mind weapons 2016-04-09 01:21:47 +07:00
aleos89
5e58149bbc Added support for 2015-11-04aRagEXE
* Added support for this client to replace the 2015-10-29aRagEXERE which had issues with unknown packets causing random disconnects.
Thanks to @icxbb-xx and @renniw!
2016-04-08 12:36:46 -04:00
aleos89
5766fc6209 Corrected the return value for script command query_sql
* Should return 0 on an empty query and -1 on a query failure.
* Updated script command documentation.
2016-04-08 09:27:14 -04:00
Playtester
98dc0608c7 Catnip Meteor (follow-up to 1365d94, hopefully fixes #1149)
* Fixed Catnip Meteor not deploying units when using a catnip fruit

Special thanks to @MysticFurur0RE
2016-04-07 21:49:41 +02:00
aleos89
09dd7bd77f Fixed players getting stuck in storage
* Resolves an issue when the server saves character data and the character is in their storage resulting in the storage_flag being removed too early.
Thanks to @stealth62!
2016-04-07 11:04:22 -04:00
aleos89
cedc56f74a Resolved compile errors for 2015 clients
* Refactored some missing inventory checks from recent updates.
2016-04-07 10:01:13 -04:00
Lemongrass3110
9efd319900 Updated ZLIB
Upgraded from version 1.2.7 to the latest version 1.2.8

Source:
http://www.zlib.net/
2016-04-07 01:02:15 +02:00
aleos89
2305a66101 Resolved a flag overlap for status_change_clear_buffs
* Small follow up to 894d6f2.
* Resolves Chemical Protection flag coinciding with the Lux Anima flag.
* Changed all bitmask values to readable constants.
2016-04-06 09:09:39 -04:00
nanakiwurtz
486495cab8 Edited small typo on script_commands.txt
Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2016-04-06 13:12:01 +07:00
nanakiwurtz
cee4081364 Follow up to a40b0e5 (Updated Doram items)
* Updated item_db.txt, item_db.sql, item_combo_db.txt
* Thanks to @cydh, @Darkelfen, @julia40124009, @secretdataz

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2016-04-06 13:07:24 +07:00
Aleos
8a3c6727a2 Merge pull request #1130 from rathena/cleanup/status-mode-access
Standardized access to mode fields
* Preparation for future update.
Thanks to @Lemongrass3110!
2016-04-05 12:51:56 -04:00
Lemongrass3110
397728c213 Fixed an issue with mob randomwalk
This was caused accidently while trying to resolve some compiler warnings.
Partial revert of 8d43623
2016-04-05 09:41:32 +02:00
Playtester
2369f39854 Eska (fixes #1136)
* Eska no longer changes hard DEF
* In pre-renewal, Eska increases soft DEF by a random 0~99 each hit
* In renewal, Eska increases soft DEF by a fixed 80
* Eska no longer uses a weird timer that doesn't work anyway
* Fixed the effect of Eska not being removed when the status change ends on monsters
2016-04-04 22:44:04 +02:00
Atemo
2b7861531b Kvm items usable (tested with Tasty White Ration) 2016-04-04 21:20:16 +02:00
Atemo
e6f3bf2035 Added some mapflag and removed phen card & co. since map_flag_gvg already block bNoCastCancel in unit.c (and the other effect of the items sholdn't be removed) 2016-04-04 20:58:08 +02:00
Atemo
3a558ff83b Rename canParticipateSiegeTE into getpermissionwoete 2016-04-04 20:35:58 +02:00
Atemo
b3d150c3a5 Merge branch 'master' into woe_te-restrictions 2016-04-04 20:22:25 +02:00
aleos89
8d43623a2b Resolved several compile warnings
* Miscellaneous compile warning fixes.
2016-04-04 13:27:43 -04:00
Atemo
d53a294a19 Merge pull request #1135 from secretdataz/db/item/update-1
Minify item scripts
Thanks @secretdataz
2016-04-04 18:27:13 +02:00
Jittapan Pluemsumran
5a4ed0d206 Follow up to 97e8891
I goofed hard.
2016-04-04 22:44:02 +07:00
Jittapan Pluemsumran
97e8891550 Fix typo in Big_Eggring_Card script 2016-04-04 21:37:06 +07:00
Jittapan Pluemsumran
691866ba34 Follow up to a266d5aa22
Fix unmatched ')'
2016-04-04 21:34:02 +07:00
Jittapan Pluemsumran
a266d5aa22 SQL synchronization 2016-04-04 19:04:15 +07:00
Jittapan Pluemsumran
f6254b8706 Follow up to a0619d72c5
Update combo scripts to use min/max
2016-04-04 18:58:44 +07:00
Jittapan Pluemsumran
80ff2e3893 Update Pre-Re item db to use min/max 2016-04-04 18:53:49 +07:00
Atemo
5f46a5c1f7 Items and skills restrictions 2016-04-04 03:36:39 +02:00
Cydh Ramdh
29f66186cd Fixed #1131 - Corrected KO_MAKIBISHI item required.
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-04-04 08:11:14 +07:00
rAthenaAPI
c43e8db227 SQL synchronization
[ci skip]
2016-04-03 21:44:42 +02:00
Lemongrass3110
7a0b628acb Fixed character deletion for 2015-10-01 onwards
Fixes #1133
2016-04-03 21:06:31 +02:00
aleos89
4165b1dde1 Merge branch 'master' of https://github.com/rathena/rathena 2016-04-03 08:53:33 -04:00
aleos89
1ee4f445ab Corrected King's Grace behavior (fixes #1068)
* Users affected can no longer consume items or do physical attacks.
2016-04-03 08:52:59 -04:00
Playtester
fea90673d9 Fixed monster unlocking target during cast (fixes #1134)
* Monsters will no longer unlock their target when they use a skill that has a cast time on a target they need to chase
2016-04-03 14:46:43 +02:00
Playtester
75fce5df98 Provoke chance and animation (fixes #1132)
* The Provoke chance is now 70% + 3%*skill_lv + srcBaseLevel% - tarBaseLevel%
* When Provoke fails, it will no longer make the caster display any animation
2016-04-03 13:39:32 +02:00
Lemongrass3110
b6abe3fcbf Standardized access to mode fields
Additionally cleaned RC2 access too.
2016-04-03 03:10:25 +02:00
Lemongrass3110
3e2210c827 Merge pull request #1124 from rathena/feature/atcommand-set-arraysupport
Added support for arrays to atcommand set
2016-04-03 00:19:17 +02:00
Playtester
35bcde65d4 Copy Blaze Shield (fixes #1129)
* Blaze Shield can now be copied by Plagiarism and Reproduce
2016-04-02 19:43:58 +02:00
aleos89
e0edc9956b Follow up to 19e4f59
* Fixed a compile error.
2016-04-02 11:59:27 -04:00
aleos89
19e4f599de Updated Arrullo and Deep Sleep Lullaby (fixes #1063)
* Deep Sleep status is now avoidable thus removing the 5 second minimum duration.
* Corrected the success chance for Arrullo and Deep Sleep Lullaby being 10x higher.
* Deep Sleep status duration is now BaseDuration - 25 * tarBaseINT - 50 * tarBaseLevel.
-- Deep Sleep Lullaby duration is doubled with BaseDuration - 50 * tarBaseINT - 50 * tarBaseLevel.
2016-04-02 11:03:56 -04:00
Playtester
c14758f932 Unwanted auto attacks (fixes #1127)
* Players will no longer do auto-attacks unless you keep the mouse clicked or use "Ctrl+Click"
* When the client sends a packet to stop auto-attack, it will now be properly stopped
2016-04-02 00:56:15 +02:00
Playtester
3cad4cd3a7 Sura combos, Tumbling (follow-up to 7ccca9d, fixes #1100)
* Sura combos will now target the trigger of the combo if you currently don't have any auto-target
* Fixed Tumbling sometimes displaying the stance even though it didn't trigger
* Fixed Tumbling not triggering when suffering the "Burning" status effect
2016-04-01 23:38:01 +02:00
Jittapan Pluemsumran
ee979f30f0 Follow up to 2a29ac0
documentation update according to @aleos89's suggestion.
2016-04-02 02:23:14 +07:00
aleos89
c75ffa15d5 Updated Offertorium curing status list (fixes #1111)
* Removes Magnificat, Blind, Curse, Poison, Hallucination, Confusion, Bleeding, Burning, Freezing, Mandragora Howling, Paralysis, Pyrexia, Death Hurt, Leech End, Venom Bleed, Toxin, and Magic Mushroom.
* Doesn't prevent the above statuses from being used again.
* Moved status removal to status_change_start overlap check.
2016-04-01 07:58:11 -04:00
Lemongrass3110
b53e00bcc2 Added support for arrays to atcommand set
Removed allocation and freeing of an unneeded script data structure.
Additionally removed a message that could never be shown.
2016-03-31 22:47:20 +02:00
Lemongrass3110
cb87186578 Added some active contributors to the author list
Thanks for helping us a lot lately @secretdataz and @jezznar.
2016-03-31 19:49:35 +02:00
Aleos
59eef4c73b Merge pull request #1092 from secretdataz/patch-1
Added support for Summoner Basic Skill to Kafra (fixes #1117)
* Added two new global NPC functions F_CanOpenStorage and F_CanChangeJob to remove redundancy.
Thanks to @secretdataz!
2016-03-31 09:10:30 -04:00
Lemongrass3110
a0b3e517c8 Removed some warnings in run-once mode 2016-03-31 00:04:51 +02:00
Jittapan Pluemsumran
2a29ac0037 Follow up to ffd16c2
Thanks to @aleos89 for advices
2016-03-31 02:08:10 +07:00
Jittapan Pluemsumran
ffd16c236e Follow up to 5e9489b
documentation update
2016-03-31 01:27:48 +07:00
Jittapan Pluemsumran
5e9489bbf2 Make arguments in getequipweaponlv command optional 2016-03-31 01:25:07 +07:00
Jittapan Pluemsumran
a0619d72c5 Item database update.
Made some item script utilize the new min/max command.
2016-03-30 22:55:48 +07:00
Playtester
1812fddc29 Adoramus vs MDEF (follow-up to 1ca9fb5, fixes #1067)
* Adoramus chance can no longer be reduced by target MDEF
2016-03-30 17:55:47 +02:00
Aleos
d89aeae750 Merge pull request #1116 from rathena/feature/minmax
Implemented script commands min and max
* These script commands support single integer values or integer arrays.
Thanks to @jezznar and @Lemongrass3110!
2016-03-30 10:35:11 -04:00
Lemongrass3110
cdd3fdfb6d Implemented min and max
These functions are based on the pull request #1091 from @jezznar.
They now are combined in one internal function using function pointers and alias names.
It is also supported to mix normal integer values and arrays now.
2016-03-30 16:04:47 +02:00
Atemo
a63604d92a Merge pull request #978 from rathena/command_update
Removed the displayed name in from of the message displayed by npctal…
2016-03-30 00:37:11 +02:00
aleos89
d88a6aca45 Optimized Inventory, Cart Inventory, and Storage usage
* These storage types now mimic Guild Storage and can be loaded/saved whenever needed.
* Relieves mmo_charstatus from having to send storage types and lets the char-server handle it.
* All storage types now have an increased max amount.
* Fixes #441 - Players will no longer be required to log out to resync cart item data before opening a Vending Store.
* Refactored player weight and cart weight calculations into their own functions.
* Added script commands guildstoragecountitem[2] and guildstoragedelitem[2].
* Refactored several function return types as well as documentation.
Thanks to @lighta and @cydh for their help with it!
2016-03-29 13:30:27 -04:00
aleos89
fe97051adf Updated Warmer effect (fixes #1097)
* Warmer should not re-apply status immunities every 3 seconds.
* Warmer status immunity should end once outside of the unit.
2016-03-29 11:01:58 -04:00
aleos89
ba640cf230 Updated Banding count check (fixes #1039)
* Banding now counts self (the caster) when casted.
2016-03-28 13:40:48 -04:00
Playtester
1365d9418e Meteor Storm, Catnip Meteor (fixes #983)
* Official implementation of Meteor Storm behavior
-- It deploys all units directly at castend
-- Each unit has a different expiration time
-- On the last interval of a unit the meteor will appear
-- When the unit expires, it will deal damage
-- If the unit gets removed at any time, no meteor will appear and no damage will be dealt
* It is now easily possible to configure Meteor Storm behavior via database files, no more extra coding required
* Fixed Meteor Storm sometimes dealing damage even though no meteor appeared
* Fixed Meteor Storm being able to hit through walls when the caster has moved in the meantime
* Catnip Meteor will now create 3-7 meteors depending on level
* Catnip Meteor now has an interval of 500ms instead of 1000ms
* Catnip Meteor now has a curse duration of 20s instead of 5s
2016-03-28 16:37:46 +02:00
Playtester
894d6f2fe6 Tarot Card/Gospel vs Chemical Protection (fixes #1108)
* The High Priestess Card from Tarot Card of Fate now removes Chemical Protection (all)
* Gospel now removes Chemical Protection (all) on the caster
2016-03-28 10:20:27 +02:00
aleos89
31ef12b947 Fixed a parsing issue with #commands
* Resolves an issue that makes #commands apply to a character that wasn't supplied.
Thanks to @MishimaHaruna at HerculesWS/Hercules@e4cf73f!
2016-03-27 10:48:09 -04:00
Playtester
084fbc8251 Fixed some Linux compiler warnings (fixes #1105) 2016-03-27 09:46:30 +02:00
Cydh Ramdh
0f41f98716 Item DB Update
* Follow up 7a7ba75369 for pre-renewal.
* Fixed wrong variable usage in autobonus script. Thank @Darkelfen in #1006
* Updated sql files.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-03-27 14:18:50 +07:00
aleos89
88d2dde632 Updated Volcanic Ash effect (fixes #1090)
* No longer gives 150% increased damage to fire type attacks.
* No longer damages self and allies on normal map types.
2016-03-26 10:25:22 -04:00
Playtester
590f42cd15 Fixed defense overflow exploit (fixes #1104)
* The defense penalty for being attacked by many enemies at the same time can no longer make DEF go negative
* Fixed two potential overflow exploits
2016-03-26 13:15:06 +01:00
Playtester
7ccca9ddbb Combo activation and targeting (fixes #1100)
* You no longer need to use combo skills on the enemy that triggered the combo except for Flying Side Kick
* Taekwon stances can now activate even when another stance is still active
2016-03-26 12:18:23 +01:00
Jittapan Pluemsumran
bd6539a9ba Follow up to c23688c
Unify all checks into one function.
Suggested by @Cydh.
2016-03-26 10:52:30 +07:00
Atemo
a2941b7c4d Fixed issue #949 (requirement inversion)
and corrected variable typo in alchemist.txt

Signed-off-by: Atemo <capucrath@gmail.com>
2016-03-26 00:53:27 +01:00
Cydh Ramdh
cbfa9c9ea1 Merge branch 'feature/exp-giving-script'
Merge pull request #1032 from rathena/feature/exp-giving-script

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-03-26 01:45:36 +07:00
Cydh Ramdh
7a7ba75369 Merge pull request #1099 from rathena/bonus/bCriticalLong
Implemented Official Long Range Critical Bonus
* Fixed #1098
* Added bonus `bonus bCriticalLong,n;`.
* Add critical rate for normal long range attack.
* Bonus value won't be showed in status window.
* Updated item script following official (Aegis) script for:
  * Sharp Arrow (1764/Incisive_Arrow)
  * Drosera Card (4421/Drosera_Card)
  * Upd Bow Guardian Card (4550/Upd_Bow_Guardian_Card)
2016-03-25 19:15:37 +01:00
Playtester
a4aad69750 Exp tables updated (fixes #1102)
* Fixed a problem that many of the exp requirements were 1 level off
* Removed custom level requirements from the default pre-re/re rAthena files
* Optimized the structure of these files; no more redundant data
* Added a few custom exp rows to import-tmpl/job_exp.txt that can optionally be used
* Updated 1st and 2nd trans job exp requirements to the new official values from 2015
* Fixed a bug that caused monsters to still give 1 base/job exp even though their exp in the db is 0
* Updated Summoner EXP requirements according to latest test results; as Summoner has exactly the same base exp requirements as 3rd classes starting at level 99, it will now use the same row
2016-03-25 18:36:16 +01:00
nanakiwurtz
a40b0e5e33 Follow up to 107a724e
* Updated item_db_re.sql

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2016-03-25 21:40:49 +07:00
nanakiwurtz
107a724ed9 Merge pull request #1087 from secretdataz/itemdb
Item database update - Doram
* Thanks to @secretdataz
2016-03-25 21:38:18 +07:00
nanakiwurtz
ad49794428 Fixed #1088
* Thanks to @Paoly28 and @secretdataz

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2016-03-25 21:24:39 +07:00
aleos89
18b50f46a9 Corrected Power Swing weapon requirement (fixes #1079)
* Power Swing should only cast while wearing a 1H Axe or 2H Axe.
2016-03-25 09:33:04 -04:00
aleos89
c6720b21a6 Added placeholders for Summoner class in pre-renewal databases (fixes #1095)
* This is a temporary fix until a more in-depth fix is applied.
2016-03-24 12:42:44 -04:00
aleos89
960007a88e Updated FAW Removal item requirement (fixes #1075)
* FAW Removal should consume 1 Monkey Wrench on use.
2016-03-24 10:32:49 -04:00
Cydh Ramdh
9e82454a79 Implemented Official Long Range Critical Bonus
* Added bonus `bonus bCriticalLong,n;`.
* Add critical rate for normal long range attack.
* Bonus value won't be showed in status window.
* Updated item script following official (Aegis) script for:
  * Sharp Arrow (1764/Incisive_Arrow)
  * Drosera Card (4421/Drosera_Card)
  * Upd Bow Guardian Card (4550/Upd_Bow_Guardian_Card)

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-03-24 21:03:32 +07:00
aleos89
e071256247 Couple fixes for Vellum Vanish
* Small follow up to 6dc437f.
* Separated calculation for different vanish bonus types.
-- This resolves "double" vanish calculations from happening.
* Defaulted isspdamage to false before calculating vanish damage.
-- This resolves monsters doing SP damage to targets.
2016-03-23 21:28:22 -04:00
aleos89
6dc437fd08 Implemented the official effect of Vellum Vanish (fixes #900 and fixes #1021)
* The Vellum Vanish bonus only refers to bHPVanishRaceRate and bSPVanishRaceRate.
* Requires client 2013-03-20 and newer to display blue damage.
* Properly displays blue damage being done for SP Vellum Vanish.
* Vellum Vanish items no longer deal physical damage except on skill usage.
* Skill usage with Vellum Vanish does not cause vanish.
* HP and SP Vellum Vanish items do not stack (SP will override HP).
2016-03-23 14:25:58 -04:00
Jittapan Pluemsumran
c23688cea4 Clean up basic skill checks 2016-03-23 21:11:57 +07:00
Jittapan Pluemsumran
901495ca27 Follow up 10651ee
Fix typo in Elegant_Doram_Manteau item script
thanks to @julia40124009
2016-03-23 14:02:46 +07:00
Jittapan Pluemsumran
10651ee14c Follow up 0ea8c90
Add more items
Add combo script for armor sets
2016-03-23 12:00:51 +07:00
Playtester
1c055f923c Summoner Job Exp Level 35-50
* Adjusted the last 15 levels of summoner class to reflect a very steep curve as this is closer to our kRO test results
* Note: Right now only base level 1-59 and job level 1-29 could be fully verified
2016-03-22 22:28:55 +01:00
Matej Pristak
df1108923a Fixing venders being stuck when map->char connection gets reset. 2016-03-22 20:55:34 +01:00
aleos89
242b3c1ab4 Corrected item requires for Repair (fixes #1076)
* No longer requires Magic Gear Fuel.
* Repair Kit will now be properly checked.
2016-03-22 12:35:25 -04:00
Jittapan Pluemsumran
0ea8c909b1 Item database update
Add Doram related items.
Scripts are implemented using divine-pride.net as reference
2016-03-22 22:48:26 +07:00
Atemo
5429ba824a Follow up 7574a726b0
I forgot to remove my note
2016-03-22 15:25:23 +01:00
Atemo
7574a726b0 Fixed issue #1072 to learn bioethic again 2016-03-22 15:23:46 +01:00
Playtester
0bd337d9ad Monster logging/EXP, Knuckle Arrow damage
* Removed the self-logging aspect of monsters for non-damage skills (follow-up to a6f73a6)
-- Officially, these skills don't log and don't increase exp
* Fixed a wrong reference that caused Knuckle Arrow damage to depend on own weight rather than enemy weight (see #1071)
2016-03-21 22:40:20 +01:00
aleos89
787f41cb0b Summoner official EXP (fixes #1083)
* Implemented official Base and Job EXP tables for Summoner.
Thanks to @Playtester!
2016-03-21 17:07:46 -04:00
Lemongrass3110
33f397c025 Fixed the WFIFO issue in char select
Fixed #1082
"Reverted" aea025e
2016-03-21 16:27:12 +01:00
aleos89
41ed114493 Follow up to Doram release (fixes #1080)
* Resolves an issue with skill normalizations.
* Resolves an issue with becoming a High Novice automatically giving players the Basic Skill fully leveled.
* Updated the Job EXP table for Doram to match official. Still missing Base EXP table.
2016-03-21 10:56:37 -04:00
aleos89
7f7af2e97e Corrected Fire Expansion effect (fixes #1064)
* Fire Expansion level 3 and 4 should apply to all targets (except self) in the AoE.
* Small revert of 237579c.
2016-03-20 14:58:13 -04:00
Playtester
989a2525ec Skills vs Icewalls/Traps, Talkie Box, Feint Bomb
* Implemented official behavior when attacking icewalls and traps with skills (fixes #1056)
-- Skills hitting icewalls and traps: Arrow Shower, Cold Slower, Tornado Kick, Sightless Mind, Meteor Assault, Spread Attack, Throw Huuma, Sightrasher, Sight Blaster, Earth Shaker, Rampage Blaster, Feint Bomb, Magnum Break, Fire Trap, Ice Trap, Cart Revolution, Napalm Vulcan, Triple Attack, Occult Impaction, Throw Spirit Sphere, Asura Strike, Spear Stab, Spiral Pierce, Holy Cross
-- Can target icewalls and traps but have strange behavior: Bowling Bash, Focused Arrow Strike, First Wind
-- Can hit icewalls and traps, but not target traps: Grimtooth, Raging Thrust, Blitz Beat, Napalm Beat, Fireball, Vulcan Arm, Tiger Cannon
-- Can hit icewalls and traps ONLY in PVP: Dragon Breath, Suicidal Destruction, Axe Tornado, Sky Blow
-- Can hit icewalls only: All other single target skills, Counter Slash
-- Can target icewalls but have strange behavior: Brandish Spear, Wind Cutter, Cannon Spear, Flame Launcher
-- Can not hit icewalls and traps: All unit skills, Frost Nova, Comet, Arms Cannon, Fatal Menace, Lion Howling
-- Can destroy traps but not hit icewalls: Claymore Trap
* When monsters use skills, they hit icewalls and traps and the damage displays, but they will no longer deal actual damage to the icewall or trap
-- Added an option to skill.conf with which you can define which types can damage icewalls and traps, by default it's 1 (player only), if you want to revert to previous behavior, set it to 31 (all)
* Fixed an issue where traps could not hit icewalls and other traps in PVP
* Taekwon combos can now trigger on traps
* Fixed an issue that caused damage to be displayed twice when attacking a trap with certain skills
* Fixed Feint Bomb causing knock-back to the target (see #1070)
* Fixed Talkie Box being triggered by monsters (fixes #1074)
2016-03-20 17:44:47 +01:00
Cydh Ramdh
09b2ea06ee * Refactor pc_setparam for SP_BASEEXP and SP_JOBEXP.
* Added script command `getexp2` for safety usage of `set BaseExp,n;` and `set JobExp,n` usages.
* Cleanup exp lost functionto `pc_lostexp`.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-03-20 12:31:44 +07:00
aleos89
daa9e018f4 Release of Doram Race!
* Requires client 2015-10-01 and newer.
* All skills are usable from from the base list to all 3 branch types.
-- Some skills still need their official activation chance and durations.
* Adjusted the char-server start point and start item split functions to be more dynamic.
Thanks to Rytech and @NovaRagnarok for their information!
2016-03-19 14:09:30 -04:00
Playtester
1ca9fb58f2 Decrease Agi, Adoramus (fixes #1067)
* The chance of Decrease Agi and Adoramus is now reduced by a fixed 1% per MDEF
* Decrease Agi can now overwrite itself with a lower level
* The base chance to cause blind when Adoramus activates is now 1000%
* Adoramus now has a blind duration of 7s+1s*level and an Adoramus duration of 10s+5s*level for both players and monsters
* Adoramus and Decrease Agi cancel each other out
* Adoramus no longer reduces speed (only AGI reduction and blind)
* Adoramus no longer cancels ASPD/Speed increasing buffs
* Adoramus can no longer be blocked/canceled by ASPD/Speed increasing buffs
* When Adoramus ends, it will no longer automatically end blind at the same time
2016-03-18 23:06:29 +01:00
Playtester
207c67d72c Cleanup (follow-up to 718e478)
* Visual Studio likes to add spaces, sometimes I don't agree
2016-03-18 20:17:01 +01:00
aleos89
a021829cda Fixed Epiclesis interval checks (fixes #1066)
* Epiclesis will now properly check for hidden players every 5 seconds.
* Adjusted the skill unit interval to check every second rather than every 3 seconds.
2016-03-18 13:38:12 -04:00
Playtester
718e4785ae Follow-up to 78419ba (monster random walk)
* Fixed a problem with monsters always ending up in the south-western corner eventually
* Fixed a problem that monsters had a high chance to stick to walls
* Fixed a problem that monsters didn't actually check all cells before giving up
* Code even more optimized as a free cell will now be found faster than before on average
2016-03-17 23:12:52 +01:00
Playtester
aa6a1110bd Arrow Shower and Arms Cannon (follow-up to 7906f0a)
* Fixed Arrow Shower not hitting Traps and Icewall in pre-renewal
* Arms Cannon can no longer hit Traps and Icewall (see #1056)
2016-03-17 21:24:37 +01:00
aleos89
0664fac298 Fixed Garment/Robe disappearing on player movement (fixes #1036)
* Garment/Robe will no longer be removed from display of other players in sight when the wearer player walks.
2016-03-17 09:38:50 -04:00
Cydh Ramdh
f31475d5e3 Merge pull request #986 from rathena/feature/pk_traps_setting
Trap Invisibility, Fixes #892
* Changed `traps_setting` config values.
  * 0 = Always visible (default)
  * 1 = Enable invisibility in versus maps (GVG/PVP/BG)
  * 2 = Enable invisibility in all maps
* Added skill unit flag `UF_HIDDEN_TRAP = 0x20000` for trap invisibility. By default, there are (renewal) Hunter traps with this flag:
  * HT_SKIDTRAP
  * HT_LANDMINE
  * HT_ANKLESNARE
  * HT_SHOCKWAVE
  * HT_SANDMAN
  * HT_FLASHER
  * HT_FREEZINGTRAP
  * HT_TALKIEBOX
* Added some skills and effects that can reveal hidden traps. By default, Detect, Sight, Ruwach, and Improve Concentration can reveal hidden traps.
2016-03-17 05:45:27 +01:00
Atemo
5510dc239e Merge pull request #1059 from rathena/fix_diag
Some diag fix
2016-03-17 03:56:19 +01:00
Atemo
15d27a4ad9 Corrected the announce of the party name when entering MalangdoCulvert instance
Updated dialog to offical for Eden 140
2016-03-17 03:38:14 +01:00
Lemongrass3110
aea025eca2 Fixed an error popup at the char select
for clients from 2015-10-01 and onwards
2016-03-16 23:53:23 +01:00
aleos89
2a4fc75baa Fixed script command unitkill crashing the server (fixes #1027)
* Resolves an issue with Mercenary causing the server to crash when killed through the script command unitkill.
* Blame dd67f9d.
2016-03-16 10:13:03 -04:00
Playtester
c6ed8a4f92 Fixed critical duel exploit (fixes #1055)
* Entering or leaving duel will now remove all the skill units you've placed
* Entering or leaving duel will now behave like warping / moving on a different tile
2016-03-15 21:17:09 +01:00
Napster (icxbb-xx)
ae10da3a61 Follow up 85749e84b9
thank you @cydh
2016-03-15 21:31:29 +07:00
Aleos
d378ef2a0b Merge pull request #1054 from AtlantisRO/master
Fixes to some quests and typo errors
* Corrected miscellaneous Korean to English translations.
* Corrected the position and facing direction of NPC [Promotional Staff#iz] from [Onward to the New World] Quest (pre-renewal).
* Fixed NPC [Iromo's Mother#ep3_2] from [Alberta Boy] Quest where players could have their quest progress reset.
* Fixed NPC [The Blacksmith#rus06] from [Koschei the Immortal] Quest giving Iron_Boots01 instead of Iron_Boots02 to Ninja and Gunslinger classes.
Thanks to @AtlantisRO!
2016-03-15 09:56:16 -04:00
Napster (icxbb-xx)
e155db9272 Merge branch 'master' of https://github.com/rathena/rathena 2016-03-15 09:52:20 +07:00
Napster (icxbb-xx)
85749e84b9 Fixed #850 MVP exp message issue clients 2013-12-23cRagexe and newer.
* gravity remove packet MVP exp message, if you want re-enables the message
  check you battle config mvp_exp_reward_message
2016-03-15 09:51:55 +07:00
AtlantisRO
f3fa99fffd Fixed facing value in [Promotional Staff#iz] from script [npc/pre-re/quests/quests_13_1.txt] 2016-03-14 15:59:53 -07:00
AtlantisRO
9c99c5c87c Fix to NPC [The Blacksmith#rus06] from [Koschei the Immortal] Quest.
The boots Iron_Boots01 is only equipable by Swordsman Class, Archer Class, Merchant Class and Thief Class.
Any other job must receive Iron_Boots02 (included Ninja and Gunslinger).
2016-03-14 16:52:59 -07:00
rAthenaAPI
c895b3603e SQL synchronization
[ci skip]
2016-03-14 23:53:48 +01:00
aleos89
074bdded09 Cleaned up rental item expiration
* Boarding Halter will now properly be removed on expiration when a player is logged out. (fixes #1035)
* Removed hard coded checks for other official rental items.
* Rental items now call the OnUnequip Script of the item which can be used to remove player states.
* Updated various items in the database to match the new format.
2016-03-14 18:50:29 -04:00
AtlantisRO
438e33a8d3 Fix to NPC [Iromo's Mother#ep3_2] from [Alberta Boy] Quest.
When player is in step 9 from Alberta Boy quest (variable "ep13_2_hiki"), this NPC restart the entire quest, because there is no case to prevent variable > 8.
2016-03-14 15:20:50 -07:00
AtlantisRO
3cd6774910 Position of NPC [Promotional Staff#iz] from [Onward to the New World] Quest
In Pre-Renewal the localization of Promotional Staff#iz is izlude,99,136 instead of izlude,101,173.

Reference: http://irowiki.org/classic/Onward_to_the_New_World_Quest
2016-03-14 15:15:12 -07:00
Aleos
dce5907062 Updated atcommand documentation
* Added missing atccommand adopt (from 0f5b6db).
* Added a missing variation for atcommand duel which allows an integer value for duel size.
2016-03-13 16:16:16 -04:00
Playtester
b5de854b90 Snap, Ganbantein, Gravitational Field, Flying Kick (fixes #1052)
* Snap now has a server-sided range of 14
* Snap, Ganbantein and Gravitational Field will no longer cause you to move if you target a cell out of range
* Snap and Flying Kick will now check for obstacles on a linear path rather than on the normal walkpath
* Range specified in skill_db is now equal to the client-sided range
* Some range code cleanup
2016-03-13 16:42:46 +01:00
Playtester
fbb8edba39 Fear status change (#1048)
* Fear now causes the SC_ANKLE status change for 2 seconds rather than having a weird custom implementation
* Fear now removes blind and makes you immune to it
* Fixed SC_ANKLE not properly blocking teleportation
* Some code optimizations
2016-03-12 23:07:13 +01:00
Aleos
4b3d8ddc5c Small typo in Ayothaya Dungeon Quest
* Fixed Shaman displaying the incorrect item requirement from the array.
Thanks to @Jeybla!
2016-03-12 13:07:24 -05:00
AtlantisRO
c5cd672cd8 Fixes to Typo Errors. 2016-03-12 10:41:18 -07:00
Playtester
916e45f0e3 Merge branch 'master' of https://github.com/rathena/rathena 2016-03-12 16:51:45 +01:00
Playtester
a6f73a6227 Status changes that cause damage reworked (fixes #1033, fixes #448)
* Created a better structure for status changes with intervals and integrated the status changes Stone, Poison, Deadly Poison, Bleeding, Magic Mushroom, Burning, Pyrexia, Leech's End and Toxin into the new structure
-- The exact remaining duration of these status changes will now be stored
-- The correct duration is reloaded when logging back in, you can't avoid a single tick be re-logging
-- It will now show the correct duration on the icon of the status change after re-logging, no longer negative values
-- The durations are now accurately transferred when using Deadly Infect
-- These status changes now use unified code, which makes it much easier to integrate more status changes into this structure with low risk of breaking something
* Removed all the status change specific logging of damage and integrated it into the normal logging behavior
-- The following skills deal "No source" damage: Stone, Poison, Deadly Poison, Bleeding, Coma, Magic Mushroom
-- The following skills deal "Self" damage: Burning, Pyrexia, Leech's End, Toxin
-- "No source" will neither be logged nor contribute to the total damage, your exp share doesn't increase from the damage, but it also won't cause the monster to give less EXP, it won't break freeze or similar status changes, it won't make you stand up, it won't make you stop moving, it won't prevent you from logging out
-- "Self" damage will now be logged and contribute to the total damage, it makes monster give the exp tap bonus, but also makes monsters give less exp the more "self damage" they've taken, it will break freeze and similar status changes, it will make you stand up properly now, it will make you flinch and stop moving, it will prevent you from logging out, but angry type monsters will not lose their aggressive bit from it and it will not cause monsters to use their rude-attack skill
-- Monsters will now use their rude-attack skill on the first rude-attack as long as the damage does not come from self
-- When a monster takes damage from a status change, its HP meter will now be updated
* Burning now has an interval of 3s and a minimum duration of 10s
* Pyrexia now causes blind for Pyrexia's duration instead of just 30s
* Ground Drift's poison base duration is now 60s in pre-re (follow-up to e7150ee)
* Fixed a bug where the minimum duration failed to apply when the received duration was below 1ms
* map_foreachindir and map_foreachinshootarea will now properly print their function names in case of an error
* Updated documentation (transferring source ID is no longer required, remaining tick should now always be in val4)

If this breaks anything, please report asap.
2016-03-12 16:50:50 +01:00
Lemongrass3110
081b03c646 Added placeholders for mob db entries from kRO patch 2016-03-09 2016-03-12 16:40:24 +01:00
rAthenaAPI
180dbc88fb SQL synchronization
[ci skip]
2016-03-12 16:34:16 +01:00
Atemo
bb66035048 Removed duplicate of canParticipateSiegeTE
Added some mapflag
Corrected typo in god quest
2016-03-12 16:27:47 +01:00
Atemo
d072a80ac5 Merge branch 'woe_te-restrictions' of https://github.com/rathena/rathena into woe_te-restrictions 2016-03-12 16:24:40 +01:00
Atemo
6f34c14c0e Fix a mistake in npctalk 2016-03-12 16:03:16 +01:00
Cydh Ramdh
292098d911 Documentation update for
* `canParticipateSiegeTE` script

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-03-12 06:29:30 +07:00
aleos89
0f5b6db813 Implemented new adoption methods
* Implemented atcommand adopt.
* Implemented script command adopt.
* Circumvents adoption issues with 2013-08+ clients (Related to #768).
* Suggested from https://rathena.org/board/topic/104014-suggestion-add-adopt-or-etc/
2016-03-11 13:45:17 -05:00
Cydh Ramdh
ac1db5de02 Merge pull request #1043 from AtlantisRO/master
Fix to NPC [Larissa#mos_01] in script [npc/quests/quests_moscovia.txt]
2016-03-11 09:35:50 +01:00
TeMPlatonic
f1c90899f0 Fix to NPC [Larissa#mos_01] in script [npc/quests/quests_moscovia.txt] from [Help Mikhail] Quest.
delitem script uses ".@di" array instead of ".@n" array.
2016-03-11 00:04:07 -07:00
aleos89
ed7157c80b Refactored Party Booking defines (fixes #1018)
* Adjusted the name of the defines to better suit their purpose.
Thanks to @Artuvazro!
2016-03-10 13:47:01 -05:00
aleos89
0fb78d45b7 Corrected Tiger Cannon splash damage (fixes #1020)
* The splash damage now factors in resistances from the splash targets.
2016-03-09 13:32:49 -05:00
aleos89
b98ba7a274 Expanded script command addrid
* Added another option to attach players based on a specified map.
* As suggested in https://rathena.org/board/topic/88331-addrid-addition/ and  https://rathena.org/board/topic/103478-addrid-map-support/
2016-03-08 12:43:09 -05:00
Cydh Ramdh
9ebf59c37b * Official EXP-Giving Script
* Fixed #980.
  * Job Quest EXP always be shown in yellow color.
  * Miracle Tonic (12259) and Leap of Fantasy (12261) give fixed EXP through `pc_setparam` that ignore EXP item bonuses and exp rates. Not as Quest EXP from `getexp` script.
  * If given EXP is 0 by `getexp`, it won't be notified in client EXP log.
  * If given EXP for base/job that reach max level, client will be notified as 0 EXP gained.
* Follow up 20588abcd8
  * Some clean up on `pc_gainexp`.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-03-08 18:03:59 +07:00
Cydh Ramdh
71cdcb3a0a Follow up b70b25945e
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-03-08 17:47:24 +07:00
nanakiwurtz
d4488d6889 Merge pull request #1023 from secretdataz/fix/item_db1
Item database update. Fixes #1012 and fixes #1022
Thanks to @secretdataz
2016-03-08 01:10:05 +07:00
aleos89
709424a75f Resolved a compile error
* Small follow up to 0d5e491.
2016-03-07 10:32:25 -05:00
aleos89
0d5e491b4e Fixed a potential crash with script command setunitdata (fixes #1024)
* Corrected the mercenary client refresh function using monster data rather than mercenary data.
Thanks to @Racaae and @julia40124009!
2016-03-07 09:33:00 -05:00
Jittapan Pluemsumran
59c92b76fb Add job condition for Ozs_New_Wing_Ring (2988) and Bloody_Floral_Decoration_Bracelet (2989). Fixes #1012 2016-03-07 11:49:37 +07:00
Jittapan Pluemsumran
96bf0814a7 Add RWC_Gold_Brooch + RWC_Brooch combo script. Fixes #1022 2016-03-07 11:48:51 +07:00
rAthenaAPI
7235152d7e SQL synchronization
[ci skip]
2016-03-06 23:25:18 +01:00
Lemongrass3110
8636cb2489 Added a sample NPC for the new navigateto script command
Additionally fixed up the documentation some more.
2016-03-06 23:24:33 +01:00
aleos89
809f220b9f Added to script command navigateto documentation
* Small follow up to 179f734.
* Also corrected an invalid constant.
2016-03-06 16:15:54 -05:00
aleos89
179f734249 Added documentation for script command navigateto
* Follow up to 4f13007.
* Corrected a few constants from PLANE -> AIRSHIP.
2016-03-06 16:10:15 -05:00
Lemongrass3110
4f13007fec Implemented serverside navigation system start
This feature was hidden in the client since 2011 and just came to our attention recently.
2016-03-06 21:48:47 +01:00
Playtester
80e026433f Official status change base durations for Stun (fixes #1019)
* NPC_LICK now has a base chance of 20%*level and a base duration of 5s
* Excruciating Palm now has a base duration 5s
* Shield Press now has a base duration of 5s+0.5s*level
* Earth Shaker now has a base duration of 2s (level 2-3) and 3s (level 4-5)
* Blind follow-up: Sightless Mind now has a base duration of 30s in pre-re and 20s in renewal
2016-03-06 19:46:45 +01:00
Lemongrass3110
614a010f59 Fixed two missing color markers
Fixes #1017
2016-03-06 16:08:43 +01:00
Playtester
e7150ee936 Gunslinger Mine / Ground Drift (fixes #998)
* Fixed knock back being 6 tiles instead of 3
* Stun duration is now 5 seconds
* Blind / Silence durations are now 30 seconds (pre-re) or 20 seconds (re)
* The damage is now delayed by aMotion; as the status effect kicks in immediately, damage will break Freeze
* The base chance for a status change is now 50% instead of 5%
* It is now a weapon skill, damage% increase/reductions are now considered, in renewal the skill can completely miss
* Damage in pre-renewal is 100% + fixed damage of 50*level
* Damage in renewal is 200%+20%*level
* Fixed sphere attack not being considered in the damage formula
* The ground effect disappears immediately after activation now
2016-03-06 12:09:46 +01:00
Lemongrass3110
b70b25945e Fixed experience overflow on high rates
Fixes #1014
2016-03-06 05:16:58 +01:00
Lemongrass3110
551bf2ef5d Fixed experience not counting for the next level
This was broken on 20588ab because the function pc_thisbaseexp was misinterpreted.

Now you get the required exp for the level you just mastered -1 again. Fixes #1013

Thanks to @Sweet520 for reporting.
2016-03-06 05:04:36 +01:00
Playtester
7906f0a3ff Line of Sight System updated (fixes #937, fixes #994)
* You can now target walls with ground skills
* Updated path check to not check the last cell
* Unit skills will now place units depending on line of sight to the caster rather than the cast center
* Implemented a new algorithm that retrieves all units in an area that are in line of sight with the area center
* Arrow Shower, Dragon Breath, Cold Slower, Wind Cutter and Arms Cannon now use the new algorithm (Arrow Shower is no longer a unit skill)
* Nodamage skills will no longer fail when the target walked around a corner
* The following damage skills will no longer damage through walls: Raging Thrust, Tornado Kick, Splash Attack, Venom Splasher, Fireball, Meteor Assault, Desperado, Spread Attack, Pulse Strike, Hell's Judgment, Vampire Gift, Magnum Break, Sightrasher, Frost Nova, Explosion, Self Destruction, Firing Trap, Icebound Trap, Cluster Bomb, Claymore, Fire Pillar
2016-03-05 18:02:22 +01:00
Lemongrass3110
fb4cf3e5e3 Merge pull request #1001 from secretdataz/fix/message
Fixed chat message that already have zero termination being misinterpreted as corrupted packets.
This issue was reported on #1000 by @secretdataz and was on clients from 2015-10-01 onwards and was mainly caused by Frost Joke.

Thanks to @secretdataz for additionally providing a fix for it in this pull request too.
2016-03-05 16:28:36 +01:00
Lemongrass3110
fef0d3d175 Fixed SG_DEVIL not giving blind anymore
Additionally fixed setting BaseExp and JobExp variables by script to not go over the new maximum.
2016-03-05 16:10:06 +01:00
aleos89
0677347527 Updated Madogear effect
* Partial revert of 744aed5.
* Blocked Canto Candidus giving Increase Agility to Madogear-ed players.
* Was fixed in a kRO patch on Feb. 24, 2016.
2016-03-05 09:54:09 -05:00
Lemongrass3110
ae8ba78449 Fixed multi level up exploit, which allowed going over the defined maximum levels
Fixed #1010
2016-03-05 13:35:51 +01:00
Playtester
2b7eb9f523 Follow-up to ecb01c4 (Angry mode)
* When monsters switch modes from or to angry mode, the aggressive bit will now be set properly
2016-03-04 21:40:38 +01:00
Playtester
ecb01c44f4 Monster angry mode and provoke (fixes #1011)
* When provoked, monsters will now only switch targets when they would also change targets on damage
* Added a new option to the mob_ai setting to restore the old behavior (monsters always go after the one casting provoke)
* When casting provoke on an angry mode monster before it was attacked, it will now go for the one casting provoke and not switch back to the closest target
* Angry mode will now always be reset when the monster switches to idle
2016-03-04 21:22:16 +01:00
Lemongrass3110
b1b3aae1e9 Fixed a bug where experience might go above the defined maximum
Might be related to #1010
2016-03-04 18:22:57 +01:00
aleos89
4eb3a9eeda Updated callshop script command for Item and Point Shop (fixes #1008)
* Follow up to a16fb7c.
* Resolves the callshop script command not using the new Cash Shop interface for Item and Point Shop.
2016-03-04 09:19:56 -05:00
Lemongrass3110
543d2c361e Added some missing mob placeholders
[ci skip]
2016-03-04 00:29:46 +01:00
Lemongrass3110
98fedbdf09 Fixed null termination on party chat for 2015-10 onwards
Fixed #1003
Fixed #992
2016-03-03 23:12:09 +01:00
Playtester
61a48b9b0b Jack Frost, Status Traps, Stone Fling, Leap, Cannon Spear
* Fixed status base chances of Jack Frost and Status Traps (fixes #997)
-- Jack Frost: 200% freeze chance instead of 100%
-- Land Mine: 10% stun chance instead of 35%-55%
-- Flasher: 100% blind chance instead of 40%-80%
-- Freezing Trap: 100% freeze chance of instead 38%-50%
* Sandman Sleep and Throw Stone Blind base duration is now 30s in pre-re and 20s in renewal
* Leap now has a shorter distance when used diagonally (fixes #1007)
* Cannon Spear now shows the skill animation even if it doesn't hit anything (fixes #1004)
2016-03-03 22:11:41 +01:00
aleos89
3a5f3a3f98 Fixed a possible crash with NPC currencies (fixes #1002 and fixes #1005)
* Resolved the nullpo return message.
* If the Cash Shop opened through the client button is used it will now properly return the cash value.
2016-03-03 14:47:25 -05:00
aleos89
101b07130c Corrected a typo in Body Style command (fixes #999)
* Adjusted parenthesis.
2016-03-03 13:20:30 -05:00
Jittapan Pluemsumran
e9c9fd65d4 Don't add null if the message is already null-terminated. Fixes #1000 2016-03-03 11:33:39 +07:00
Atemo
033cdba82b Added mapflags in que_ba quest map
Thanks @Playtester
2016-03-03 00:10:18 +01:00
aleos89
2fd0517351 Updated some Cash Shop related comments
* Small follow up to a16fb7c.
* Updated/corrected miscellaneous comments for NPC shops.
* Added enum values for Cash Shop failure client messages.
* Re-ordered some functions be with other related functions.
2016-03-02 09:34:19 -05:00
aleos89
1616e06b9e Corrected Chain Lightning skill delay (fixes #995)
* Should have a global cast delay of 3 seconds.
2016-03-01 12:55:46 -05:00
aleos89
a16fb7c176 Updated Item and Point Shop (fixes #843)
* Item and Point Shop now works like the NPC Cash Shop.
* No longer has issues with player Zeny checks.
2016-02-29 20:54:23 -05:00
Atemo
38aaba07ca Corrected typo
Thanks @aleos89
2016-03-01 01:56:57 +01:00
Playtester
f5b6e9f7c4 Merge branch 'master' of https://github.com/rathena/rathena 2016-02-29 22:18:38 +01:00
Playtester
1bf8537140 Berserk HP recovery (fixes #993)
* Fixed a problem that HP/SP didn't recover properly when casting Berserk, MERC_HPUP or MERC_SPUP while attacking
2016-02-29 22:17:49 +01:00
Atemo
afb740442e Typo 2016-02-29 20:18:53 +01:00
Atemo
db53e580af Typo update 2016-02-29 20:06:24 +01:00
Atemo
7e66be5932 Replace strnpcinfo(1) by the current npc name and fix some mistake
Signed-off-by: Atemo <capucrath@gmail.com>
2016-02-29 19:45:45 +01:00
Cydh Ramdh
4ff4fe42ee Follwo up 20588abcd8
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-02-29 22:07:36 +07:00
Cydh Ramdh
20588abcd8 Merge pull request #987 from rathena/feature/exp_max_level
EXP on Max Level
* Fixed #942
* 'Last' EXP for max base level is 99,999,999 and 999,999,999 for Job EXP on max job level.
* Player still obtains EXP on max level (of course until both base & job reach 100%).
* This behavior is used for Base EXP check for:
  * Super Novice's Explosion Spirit.
  * Royal Guard's Inspiration.
  * High Priest's Redemptio.
* Added config `death_penalty_maxlv`, default is set to 0. Player on max level, never loss EXP by death penalty.
* On EXP lost by death penalty. EXP will be shown as negative value.
* Fixed check for EXP value on packet `0x07f6`. EXP is limited to INT_MIN until INT_MAX by client (so don't expect client to displays value more than this!)
* Added EXP gained/lost message by `@showexp` on death penalty too.	
* Fixed PR_REDEMPTIO and LG_INSPIRATION requirement  …
  * Only charge the Base EXP.
  * Lost EXP will be displayed
2016-02-29 21:05:45 +07:00
Cydh Ramdh
dc679b8c06 Follow up d9a35c8c6a
* A little check to avoid unnecessary process.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-02-29 19:50:24 +07:00
Cydh Ramdh
077738bea1 Follow up f2f135708b
* Corrected documentation for `death_penalty_maxlv` config.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-02-29 09:04:07 +07:00
aleos89
811723f3aa Corrected random Start Point issues (fixes #955)
* Follow up to 994b406.
* Fixes new characters initial spawn locations getting set to maps that aren't defined in the config.
* Fixes issues with reading maps from import not resetting the array of maps read from the char_config.
* Cleaned up the Start Item parser to follow the Start Point parser.
Thanks to @LiamKarlMitchell!
2016-02-28 12:12:21 -05:00
Playtester
b3b3e9cc71 Official status change base durations for Silence and Stone (fixes #990)
* The renewal default duration for Silence is now 20s (30s in pre-re)
* Items, NPC_SILENCEATTACK and NPC_WIDESILENCE and monster Lex Divina use the default silence duration
* Incubation time for Stone is now subtracted from the Stone duration
* Incubation time is now 100ms for all Stone skills except Stone Curse (5 seconds)
* The Stone timer is now more exact and now deal 1% HP damage exactly every 5 seconds, even if it's on the last tick
* Fixed Sienna Execrate missing its skill animation
2016-02-28 17:37:41 +01:00
Cydh Ramdh
ccf52095a3 Follow up 26dcf345fe
* Added necessary mapflags.
* Corrected documentation.
* Fixed some typos.
* Thanks to @Atemo

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-02-28 18:17:49 +07:00
Playtester
ec59446043 Official status change base durations for Freeze and Blind (fixes #988)
* Snowflake Draft now has a skill-specific duration of 5s*level
* All freeze durations (default and skill-specific) are increased by 2.5s in renewal
* The renewal default duration is now 27.5s (+2.5s)
* Items, Storm Gust, Frost Joke, NPC_ICEBREATH and NPC_WIDEFREEZE use the default freeze duration
* All items and skills that cause blind now have a base duration of 30s in pre-re and 20s in renewal
* Fixed NPC_DARKCROSS and NPC_GRANDDARKNESS not giving the blind status change
2016-02-28 01:03:14 +01:00
Aleos
35d3c971a3 Merge pull request #985 from secretdataz/fix/temporal_int
Correct Temporal Int Boots (22001) and Temporal Int Boots_ (22009) script
* Should increase MATK by 60 if the source's base INT is greater than or equal to 120.
Thanks to @secretdataz!
2016-02-27 14:05:39 -05:00
Lemongrass3110
fa561fbfe2 Added NPC IDs 10175-10203
Merged from HerculesWS/Hercules@f95290c
Thanks to @Jedzkie
2016-02-27 15:20:51 +01:00
Jittapan Pluemsumran
59994e9c96 Correct Temporal_INT_Boots and Temporal_INT_Boots_ item script 2016-02-27 11:44:16 +07:00
aleos89
1b9a0b5af5 Updated Kyomu effect and Magic Reflection effect
* All skills have a chance of failing at 25%, not just Shield Reflect and Reflect Damage.
* Kaite, Magic Mirror, and Shield Spell - Defense are not nullified by Kyomu.
* Item-based and Magic Mirror reflection damage Boss monsters, Kaite does not.
2016-02-26 18:33:07 -05:00
Playtester
6f74f67da0 Fixed range exploit (fixes #984)
* Players will no longer get +2 range server-sided when using a target spell
* This will prevent players from modifying the client to get extra range
2016-02-25 22:40:44 +01:00
Playtester
7cfdd9ddef Pre-renewal Impressive Riff (fixes #111)
* Fixed the pre-renewal ASPD bonus being almost double as high as officially
* Follow-up to 13d1c2d
2016-02-25 19:06:58 +01:00
aleos89
11699dff87 Updated Body Style command
* Now allows for Royal Guard class.
2016-02-25 09:05:49 -05:00
Playtester
7273b4d6ba Fixed Taekwon Ranker HP/SP bonus (fixes #982)
* The HP/SP bonus will now be applied to the base HP/SP similar to the 25% HP/SP bonus for Trans classes
* HP/SP rate increase items it will now give the full HP/SP percent bonus rather than just a third
* Fixed HP/SP increase items will no longer give triple the amount they should
2016-02-24 21:36:49 +01:00
aleos89
473e7f8fa5 Fixed compile warnings
* Follow up to 03fab34.
2016-02-24 13:48:33 -05:00
aleos89
03fab34fa3 Updated wall checks for some 3rd class skills
* Wind Cutter, Cold Slower, Arms Cannon, Dragon Breath, Dragon Breath - Water, and Arrow Storm will no longer damage targets around walls.
2016-02-24 13:31:36 -05:00
Playtester
6aad510818 Frost Joke pre-renewal freeze duration (follow-up to f5ea1dc)
* The freeze duration of Frost Joke is now 12s in pre-renewal

Note: Each status change has a default duration on official servers and most skills use it. The standard duration for Freeze in pre-renewal is 12s, but it was increased to 30s in renewal. Both Storm Gust and Frost Joke could be proven to use the standard duration, whereas Frost Diver and Snowflake Draft have a custom duration per level set.
2016-02-24 17:32:12 +01:00
Atemo
c094314b66 Merge branch 'woe_te' into woe_te-restrictions
Signed-off-by: Atemo <capucrath@gmail.com>
2016-02-24 16:44:36 +01:00
Cydh Ramdh
9944c1dd46 Fixed PR_REDEMPTIO and LG_INSPIRATION requirement
* Only charge the Base EXP.
* Lost EXP will be displayed.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-02-24 12:26:04 +07:00
Atemo
883b5cc919 Little update 2016-02-24 04:45:47 +01:00
Atemo
321b1d22e8 Removed the displayed name in from of the message displayed by npctalk and unittalk scripts commands (so we can append whatever we want to).
Signed-off-by: Atemo <capucrath@gmail.com>
2016-02-23 22:12:18 +01:00
Atemo
a27a545332 Fixed dialog 2016-02-23 21:58:30 +01:00
Playtester
c144febc30 Elemental Resist Potions vs Dispell (fixes #977)
* The status effect from Elemental Resist Potions can no longer be removed by "Dispell"
2016-02-23 18:07:27 +01:00
aleos89
d512f1588c Refactored Monster Mode
* Refactored all monster mode checks to use the enum e_mode.
* Created elemental_skillmode enum to separate usage from monster mode enum.
* Renamed EL_SKILLMODE_PASIVE -> EL_SKILLMODE_PASSIVE.
* elemental_change_mode() will now return the proper value from elemental_change_mode_ack().
2016-02-23 11:21:45 -05:00
aleos89
5c3d4e3e90 Updated Cursed Circle effect
* Should not stack/refresh itself.
2016-02-23 10:02:18 -05:00
Cydh Ramdh
d9a35c8c6a Follow up 51c422cf7c.
* Added some skills and effects that can reveal hidden traps.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-02-22 23:33:27 +07:00
Cydh Ramdh
51c422cf7c Corrected trap invisibilty behavior.
* Changed `traps_setting` config values.
  * 0 = Always visible (default)
  * 1 = Enable invisibility in versus maps (GVG/PVP/BG)
  * 2 = Enable invisibility in all maps
* Added skill unit flag `UF_HIDDEN_TRAP 0x20000` for trap invisibilty.

NOTES:
* Invisible traps are always visible for the trapper and trapper's partymates.
* If the trap is invisible, it always be hid immediately (except the people above).
* Revealed hidden traps, are always visible by everyone.
* Currently, only `HT_DETECTING` that can reveal the hidden traps (hardcoded). TODO: Sight, Ruwach, and Improve Concentration also able to reveal hidden traps.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-02-22 22:34:08 +07:00
aleos89
2ad4972be8 Corrected Moon Slasher effect
* Now able to stop Boss monsters.
* Has a random duration of 1~3 seconds.
Thanks to @Playtester!
2016-02-22 09:14:54 -05:00
Cydh Ramdh
f2f135708b Follow up 70a67d6c57
* On EXP lost by death penalty. EXP will be shown as negative value.
* Fixed check for EXP value on packet `0x07f6`. EXP is limited to INT_MIN until INT_MAX by client (so don't expect client to displays value more than this!)
* Added EXP gained/lost message by `@showexp` on death penalty too.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-02-22 12:33:39 +07:00
Playtester
de08a3677e Follow up to 9721dc9
* NPC_EVILLAND and Sanctuary effects will now be slightly longer visible (just a cosmetic improvement)
2016-02-21 19:52:22 +01:00
Playtester
3449b67abc Follow-up to 8d20393 and a63b031
* Thunder Storm, Exploding Dragon, Lightning Jolt and Snowflake Draft can now damage more than just once every 500ms
* Fixed a problem with negative aftercast delay
2016-02-21 19:34:34 +01:00
Playtester
a63b031958 aMotion delay is now set at cast begin (fixes #944)
* When casting a spell with cast time shorter than aMotion, the delay will now be set to aMotion or min_skill_delay_limit
* aMotion and min_skill_delay_limit are no longer applied at cast end nor by auto spells
* Aftercast delay can only increase the delay and never decrease it
* When there is no aftercast delay, the client will no longer show a non-existent 10 second delay
* Removed "double cast" code of Jupitel and Waterball, it's no longer needed as it fits into the official delay system
* Added a constant SECURITY_CASTTIME, which is added at cast begin and subtracted at cast end to prevent hackers to send in skill packets before the timer triggers cast end
* Set skill_amotion_leniency to 0 by default as it applies delay at cast end and would consequently block the official system from working; you can set it back to 90 or even 140 for increased security
2016-02-21 17:06:39 +01:00
aleos89
f264885411 Follow up to 7c5bda2
* Corrected the Flash Combo bonus ATK not being applied to the caster and not displaying in the status window.
* Corrected Sky Net Blow not casting at the end of Flash Combo if the target is dead.
2016-02-21 09:53:05 -05:00
Cydh Ramdh
70a67d6c57 Official EXP on Max Level
* Fixed #942
* 'Last' EXP for max base level is 99,999,999 and 999,999,999 for Job EXP on max job level.
* Player still obtains EXP on max level (of course until both base & job reach 100%).
* This behavior is used for Base EXP check for:
  * Super Novice's Explosion Spirit.
  * Royal Guard's Inspiration.
  * High Priest's Redemptio.
* Added config `death_penalty_maxlv`, default is set to 0. Player on max level, never loss EXP by death penalty.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-02-21 18:43:24 +07:00
Playtester
4c1c6e6d2f Merge branch 'master' of https://github.com/rathena/rathena 2016-02-20 21:42:01 +01:00
Playtester
8d20393b10 Ninja Skills vs Land Protector (fixes #971)
* Exploding Dragon, Lightning Jolt and Snowflake Draft are now unit skills
-- They no longer can deal damage on Land Protector
-- They will deal damage instantly, regardless of your ASPD
* Exploding Dragon now deals 150%+150%*level damage divided by number of hits, it can no longer damage plants
* Snowflake Draft's freeze base duration is now 2500ms+5000ms*level
* Renewal: Lightning Jolt's AoE is now 3x3 on level 1-2, 5x5 on level 3-4 and 7x7 on level 5
* Pre-Renewal: Cast time of Wind Blade level 8-10 is now 500ms shorter
* Watery Evasion now makes non-Ninja enemies stop when they walk on it and are not knock-back immune
2016-02-20 21:41:01 +01:00
aleos89
10b57568ee Corrected Sniper Trap behavior
* Cluster Bomb and Ice Bound Trap now have a 1 second delay after activation.
* Firing Trap is now activated immediately.
Thanks to @Tokeiburu!
2016-02-20 08:16:31 -05:00
Cydh Ramdh
26dcf345fe Added WOE:TE Restrictions
* Added mapflag `gvg_te`, `gvg_te_castle`, this is will be activated during WOE:TE sessions. These changes are needed because of:
  * If `gvgon` is used, TE castles become `gvg`, it makes the restriction failure. Items that are supposed to only can be used/equipped in TE Castles, also affected in 'normal' GVG/WOE maps.
  * These flags used form `item_noequip`, `skill_nocast`, and `status_disabled` flag 16. (If just assume TE Castles are Restricted Zone 8, the failure will occurs as point 1 above).
* Added Restricted Zone 8 for TE Guild Dungeons, to prevent marriage skills can be casted there.
* Added command `gvgon3` to set GVG for WOE:TE Castles.
* Added command `canParticipateSiegeTE` is 'hardcoded' function to check player's job that can participate in WOE:TE.
  * Current usages in `GD_EMERGENCYCALL` and replace the in-script function.
* Changed default config `allow_consume_restricted_item` to 'no'. All restricted usable/consumable/healing items are always failed to be used.
* Changed the GVG items/skills restriction check. "Item cannot be equipped in GVG maps" are supposed to ignore the agit flag statuses, as long as the map is GVG flagged, items/skills are always restricted and otherwise.
* Moved previous entries of `skill_nocast` flag 16 as hardcode (for now).

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-02-20 09:33:07 +07:00
rAthenaAPI
b97676e5c5 SQL synchronization
[ci skip]
2016-02-20 00:26:45 +01:00
Playtester
cac5b3cb1d Monster level 10 skills (Part 3), Fire Pillar, Storm Gust (fixes #973)
* Monster level 10 Frost Diver now deals 500% damage and has a 100% freeze base chance
* Added the remaining explanations and corresponding rAthena level to mob_skill_db_powerskill.txt, now all powered-up skills are listed
* Damage of Fire Pillar is now multiplied by number of hits when used by monsters
* Storm Gust's freeze duration is now 30 seconds in renewal
2016-02-19 23:25:05 +01:00
Aleos
9b87f47b57 Merge pull request #952 from CairoLee/master
CashShop Database cleanup
* Fixes #970.
* Now uses sv_readdb.
Thanks to @CairoLee!
2016-02-19 10:12:09 -05:00
aleos89
e51b7f1d86 Follow up to 8828312
* Compile error. Sorry!
2016-02-19 10:06:04 -05:00
aleos89
88283126e8 Updated Autospell effect
* Skill delay is now applied when autocasting spells during attacks.
2016-02-19 09:42:59 -05:00
Playtester
2c3cb602dc Blaze Shield slowdown, Sanctuary knock-back (fixes #963)
* Blaze Shield now properly slows down enemies while still making sure they take all the hits while moving over a fire cell
* Fixed some skills still having damage delay, even though their source is a unit (BL_SKILL)
* Sanctuary knock-back is now 2 cells instead of 1 and pushes "away from cell center of each cell", similar to Storm Gust
2016-02-18 18:42:13 +01:00
aleos89
d53ed80226 Updated Prestige effect
* Prestige's status is now refreshed when casted again.
* Prestige is now removed by Banding.
2016-02-18 09:41:58 -05:00
aleos89
9f0ae12824 Fixes #863
* Striking now takes the target's weapon level into account.
* Now displays the proper skill fail message when used on wrong targets.
2016-02-17 10:49:18 -05:00
Atemo
cc645c7e00 Fixed issue #966
Thanks @Tokeiburu
2016-02-17 03:14:17 +01:00
Playtester
307207ffeb Reverted c4fe3be and re-fixed #779 (fixes #964)
* The original fix broke all "addele" and "subele" bonuses from items
* These bonuses require a full recalculation because the bonus needs to be reset before calculating the item bonus
2016-02-16 20:13:31 +01:00
aleos89
cff0c35662 Fixes #919
* Marsh of Abyss was removing the wrong status change for Increase Agility.
* Moved the skill to the proper switch to get rid of unused values.
2016-02-16 10:41:51 -05:00
aleos89
7c5bda2978 Updated Flash Combo effect
* Clean up of revert fc68007.
* Removes SR_FLASHCOMBO_ATK_STEP# skills. Packet dump shows these skill IDs are not used.
* Fixes damage calculation for Tiger Cannon and Skynet Blow.
* Tiger Cannon is now passed as a neutral elemental attack.
* Tiger Cannon now properly removes 10% of damage done to target instead of 10% of max SP.
* Skynet Blow now properly casts at the end of Flash Combo.
* Updated the range for Dragon Combo, Fallen Empire, and Tiger Cannon to 1.
Thanks to @RagnarokNova and @Lemongrass3110 for packet information!
2016-02-15 18:12:53 -05:00
rAthenaAPI
a368ef6535 SQL synchronization
[ci skip]
2016-02-14 16:11:02 +01:00
aleos89
1df18a4a78 Compile Warning Cleanup
* Resolves some warnings from the gcc compiler.
2016-02-14 09:10:42 -05:00
Playtester
bd5911abb5 Monster level 10 skills (Part 2), Magnum, Brandish (fixes #958)
* The following monster level 10 skills now have their official effect
-- Brandish Spear: 5x5 line of damage. 562% damage to all cells.
-- Magnum Break: 9x9 AoE. 600% damage to all cells.
-- Mammonite: 1200% damage.
-- Fireball: Renewal: 1020% damage. Pre-renewal: 510% damage.
* Added explanations and corresponding rAthena level to mob_skill_db_powerskill.txt
* When used by monsters, Brandish Spear and Magnum Break now always deal full damage, independent of distance
2016-02-14 13:01:52 +01:00
aleos89
95a8d656a2 Follow up to b307ae8
* MD_FIXED_ITEMDROP only applies to renewal level penalty mod.
2016-02-13 08:27:19 -05:00
Playtester
719c43fb07 Fixed Weaponry Research's hidden hit bonus not working in pre-renewal
* The hidden hit bonus exists in both pre-renewal and renewal
* This is a partial revert of b0bc485
2016-02-13 13:30:07 +01:00
Playtester
7a62ab49dc Monster level 10 skills (Part 1), LoV (fixes #957)
* The following monster level 10 skills now have their official effect
-- Two-Hand Quicken: Increases ASPD by 70%. Duration 300s.
-- Lord of Vermilion: Deploys units in a 15x15 area that splash 1 cell into LP each. 520% damage per wave.
-- Thunderstorm: 20 Hits, 7x7 AoE. Splashes 3 cells into LP.
-- Decrease Agility: Reduces Agi by 50. Duration 130s.
-- Hammer Fall: 25x25 AoE. 100% base stun chance.
* Added a document that will contain all information on these special level 10 monsters skills
* Implemented official damage formula for renewal Lord of Vermilion; it only applies to LoV cast by players
2016-02-13 11:50:12 +01:00
aleos89
c9fde7655c Updated Illusion - Death effect
* Curse duration is not reduced by VIT.
* Cannot kill the target when lowering HP.
2016-02-12 09:21:12 -05:00
Playtester
e3667f4a07 Fixed boss monster skills being completely random (fixes #951)
- Boss monster skills no longer will have a random element
- Fixed boss monster skills being significantly weaker than they should be
- Prepared layout defines for upcoming MVP skill fixes
- Increased MAX_SKILLTIMERSKILL to 50 as this is maximum number of meteors you can have "in store" officially
2016-02-11 20:34:36 +01:00
Atemo
dbf21462ef Merge pull request #956 from rathena/fix_script
Fixes some bug in npc/cities folder and corrected syntax
2016-02-11 18:29:28 +01:00
aleos89
b9cce000bf Follow up to a7de6f8
* Fixed a compile error.
2016-02-11 11:06:59 -05:00
aleos89
a7de6f8f63 Updated Wedding Skills effect
* Male max HP required increased from 10% to 15%.
* Female max SP required increased from 10% to 15%.
-- These changes only affect renewal mode.
2016-02-11 09:54:25 -05:00
Atemo
befc6123be Fixes some bug in npc/cities folder and corrected syntax
Corrected some npc view
2016-02-11 02:06:10 +01:00
aleos89
30141bdbbd Updated Cart Cannon effect
* Cart Cannon endowed with fire should not break Thorn Trap.
* Cart Cannon should never deal damage to Wall of Thorns.
2016-02-10 10:31:18 -05:00
Playtester
8677277121 Falcon Assault, Land Mine, Mercenary skill database updates
- Falcon Assault now has a fixed range of 9 and cannot be increased by Vulture's Eye (fixes #953)
- Land Mine is now correctly defined as non-splash skill (follow up to 04a1173)
- Applied all the skill fixes from the past years to the mercenary versions of those skills
2016-02-09 20:12:43 +01:00
aleos89
bddb3fb3b3 Fixes #708
* Follow up to 4f4d8fe.
* Dispell is now usable outside PvP in Duels.
* Dispell is now usable outside PvP in the caster's party.
2016-02-09 10:12:32 -05:00
CairoLee
b96fba7e36 Follow up to b43853e 2016-02-09 12:55:26 +08:00
Playtester
0fd46eb3a6 Freeze, Stun, Sleep and Stone behavior (fixes #950)
- These status changes no longer make the target stand up
- Sleep and Stone (first phase) no longer make the target stop moving/singing/dancing
- Stone (second phase) will now make the target stop singing/dancing, but only make you stop moving in this one case
- You can now sit down while in the first phase of Stone
- You can no longer stand up while having any of these status changes (except first phase of Stone)
2016-02-08 20:52:09 +01:00
aleos89
744aed55e3 Updated Madogear effect
* Canto Candidus can now increase the agility of Madogear-ed players in the party.
* Heal, Increase Agility, Decrease Agility, Dispell, Renovatio, and Highness Heal now display the correct skill fail message.
2016-02-08 10:34:56 -05:00
CairoLee
b43853e174 Follow up to c1014ea
Thanks to cydh
2016-02-08 19:46:19 +08:00
CairoLee
c1014ea864 Use sv_readdb to read CashShop Database 2016-02-08 15:34:08 +08:00
Playtester
f5ea1dcb3e Several no-damage status change skills updated
* Scream and Frost Joke (fixes #945)
-- The delay until the status change kicks in was increased from 2s to 3s
-- Aftercast delay in pre-renewal was increased from 3s to 4s (already 4s in renewal)
-- Duration of Freeze from Frost Joke increased from 10-14s to 30s
* Hammer Fall, Lex Divina and offensive Status Recovery (fixes #945)
-- A delay of 1 second until the status change kicks in was added
-- Hammer Fall will hit the targets that are in the AoE before the delay (so you can't dodge)
-- Offensive Status Recovery's base duration reduced from 30s to 20s and base chance increased to 100%
-- Increased the maximum number of skill timers from 15 to 40 as they are needed for delayed status changes
* Stone and Freeze now remove Lex Aeterna (fixes #947)
-- For stone this refers to the second phase
* Scream, Frost Joke and Hammer Fall no longer make a target stop (fixes #948)
-- Similar behavior to e.g. Ankle Snare against bosses or in WoE
-- If the target was singing/dancing, it will still stop and the song/dance will be canceled
-- Fixed a bug that caused position lag when targets that are still moving but can't move anymore are hit
2016-02-07 18:58:53 +01:00
aleos89
620e953e1d Updated Item Delay Database
* Added Emergency Scrolls (12968, 12969, 12970) to the SC_REUSE_LIMIT_RECALL group.
* Removed the Vending Scrolls (12580, 12581) and Catalog Scroll (12591) from the SC_REUSE_LIMIT_RECALL group.
* Added ASPD Potion (12684) to the SC_REUSE_LIMIT_ASPD_POTION group (renewal only).
* Added Eclage items (12812, 12913, 12814, 12815) to the SC_REUSE_LIMIT_ECL group (renewal only).
* Updated Eden Group Mark (22508) from 120 minutes to 20 minutes. (renewal only).
2016-02-07 10:08:55 -05:00
aleos89
a6811c7c18 Fixes #179
* Resolves NPC files not being loaded if the one before failed to load on Windows OS.
Thanks to @Lemongrass3110!
2016-02-06 09:36:36 -05:00
aleos89
8e283d2a00 Follow up to 0a77835
* Some basic refactoring.
* Cleaned up the documentation for script command getmapxy.
-- Removed UNITTYPE_MOB from the script command.
2016-02-05 12:38:30 -05:00
Atemo
adc8c46b4f Follow up de44eb1938 2016-02-05 15:52:04 +01:00
Atemo
9373c697b5 Added some source part. Thanks @aleos89 / @Cydh
Some debug thanks @Cydh
2016-02-05 15:48:26 +01:00
aleos89
0a77835029 Unit Controller Updates
* Added missing UMOB_CANMOVETICK option.
* Restructured script command getunittype return values to match the order of script command getmapxy to allow for more universal usage.
* Created constants for script commands getmapxy and getunittype.
* Updated NPCs using script command getmapxy to use the new constant values.
* Updated Battleground NPCs to use constant value for script command setunitdata.
2016-02-04 10:47:16 -05:00
Atemo
de44eb1938 Added God items script TE Hervor and Jormungand.
Todo:
    Review the unittalk part (only the message should be displayed)
      - unittalk display the npc hidden name
      - npctalk display the visible name and don't have parameter to call another npc
2016-02-04 03:27:05 +01:00
Playtester
c0f2ee85fd Merge branch 'master' of https://github.com/rathena/rathena 2016-02-03 23:06:46 +01:00
Playtester
2b05c3c46f Fixed resistance cards reducing the damage to 0 (fixes #935)
* Damage reductions/increases from items will now always be rounded down, rather than the damage itself
2016-02-03 23:06:09 +01:00
aleos89
31c5914bb2 Updated Stasis effect
* Fixes #830 and fixes #918.
* All players within the skills range (depending on level) are effected by Stasis.
-- Resolves issue with players behind walls not being effected.
* Duration is now 10 + (10 * skill_lv) seconds with a minimum of 10 seconds after being reduced by VIT + DEX.
* Status Recovery now removes Stasis and White Imprison.
* All players effected by Stasis are unable to cast any skill except Status Recovery, Dispell, Clearance, and Banishing Buster.
2016-02-03 15:16:23 -05:00
Playtester
03118326b6 Pre-renewal monster database fixes
* Updated some MVP drops to the most reliable pre-renewal data available
* Changed Aunoe and Fanat from their iRO version to the kRO version (weaker)
* Fixed MVP EXP of Satan Morroc and Kublin
* Fixed modes of all SE Guild Dungeon monsters
* Other minor corrections
2016-02-03 20:45:43 +01:00
Atemo
eec366f3ad Clean a redundant/ugly part 2016-02-03 02:48:43 +01:00
Playtester
6ad062f6e3 Official line of damage path algorithm (fixes #658)
* Implemented the official line of damage algorithm that official servers use; it will calculate the direction between caster and target and apply one of eight possible AoEs
* Added a config setting with which you can switch back to the custom emulator path algorithm
* Updated Brandish Spear(5x5), Focused Arrow Strike(13x3), First Wind(5-9x3), NPC Breath attacks(14x7), Flame Launcher(5x3) and Cannon Spear(11x3) to use this algorithm and corrected range, splash and maxcount values for all these skills
* Fixed Brandish Spear's AoE being completely wrong and having holes in its AoE when attacking diagonally; also fixed the knock back being 3 instead of 2 and not working at all for the longest reach; Brandish Spear's AoE width and length can now be defined in skill_db.txt
* Focused Arrow Strike, First Wind and NPC breath attacks will at least hit one target, if no enemy is on the AoE, the target will be hit instead; Brandish Spear, Flame Launcher and Cannon Spear can completely miss
2016-02-02 23:41:05 +01:00
aleos89
79229c83c5 Follow up to 77e9eff
* Resolves compile warnings from the revert.
2016-02-02 11:58:47 -05:00
aleos89
77e9eff40d Revert "Updated Flash Combo effect"
This reverts commit fc68007.
2016-02-02 11:37:45 -05:00
aleos89
a765f96657 Follow up to d457d2f
* Added missing import copy for VS.
2016-02-02 09:16:57 -05:00
Nova
b99e9b7e97 Revert "Reverting Playtester's merge."
This reverts commit 21021751da.
2016-02-01 14:33:23 -08:00
Nova
21021751da Reverting Playtester's merge. 2016-02-01 14:14:57 -08:00
Atemo
14f09ca2bb Added unversioned files 2016-02-01 20:47:29 +01:00
Atemo
06db9fe81f TODO:
Check for maprespawnguildid parameter value (should remove monster?) Manager_TE npc in main_TE.txt
	Change in the folder:
		agitcheck -> agitcheck3
		OnAgitStart -> OnAgitStart3
		OnAgitInit -> OnAgitInit3
		OnAgitEnd -> OnAgitEnd3
	Add:
		OnAgitStart3
		OnAgitInit3
		OnAgitEnd3
		mob into mob_db.txt
		item_db restricted
	Convert:
		CheckSiegeTime 3 -> agitcheck3
		OpenHour_SiegeMode 3 3600 (seems to return 1 if woe start in less than 3600 secs)
		IsAllianceGuild
		ResetBuffLowLevelSiege
	Maybe move:
		te_merchant in merchant folder
		CanEnterwoeTE function into global function
	Search:
		hour start/end woe TE
		CanParticipatewoeTE function should include rebellion?
2016-02-01 20:44:16 +01:00
aleos89
d457d2f5f9 Implemented SC Blocking Database
* This database contains status (SC) that will be disabled/blocked on certain map.
* The specified map for SC is determined by map type or zone.
* The disabled SC will be removed if player has the SC from previous map and will fail to be applied again.
Thanks to @cydh!
2016-02-01 12:20:18 -05:00
aleos89
918ef966f8 Updated renewal mapcache 2016-01-31 10:52:57 -05:00
Playtester
78e8147c39 Miracle no longer dispels on death (fixes #940) 2016-01-30 19:07:19 +01:00
Playtester
dfb56658a3 Updated Mob Mode documentation once more according to latest test results
* Also fixed a few explanations
2016-01-30 18:24:18 +01:00
aleos89
79d6eb29ee Compile Warning Cleanup
* Resolves some warnings from the gcc compiler.
2016-01-30 11:47:03 -05:00
aleos89
b307ae8004 Added MD_FIXED_ITEMDROP mob mode
* When active the mob's drops are not affected by item drop modifiers.
2016-01-30 11:20:20 -05:00
Playtester
922f8b2579 Added monster type 24 to documentation 2016-01-30 15:38:46 +01:00
Playtester
78419baa76 Monster random walk code optimized (fixes #208)
* Monsters will now always find a cell to walk to on first attempt as long as there is at least one cell available
* Performance for searching a cell improved, a monster no longer tries the same cell twice
* Removed the "MOB can't move" warning by default; the warning could appear with legit behavior like using Icewall and actually made the monster re-spawn
* Added a config option to monster.conf, where you can re-enable the warning and the re-spawning again
2016-01-30 14:33:52 +01:00
Playtester
92bf61cd6f Kaahi is now able to overwrite higher levels (fixes #933)
* Also some small code cleanups
2016-01-30 09:51:30 +01:00
Playtester
d018648a3e Added information on "class" and "attr" modes to documentation 2016-01-30 00:31:36 +01:00
Playtester
dbb19abb66 Fixed elemental armor not reducing damage to 0 in pre-renewal (fixes #924) 2016-01-29 22:07:24 +01:00
Lemongrass3110
3f78f16db9 Added some more missing monsters
Sorry missed them in the last commit
2016-01-29 20:09:16 +01:00
aleos89
627d7d36a3 Merge branch 'master' of https://github.com/rathena/rathena 2016-01-29 11:15:30 -05:00
aleos89
fc6800701b Updated Flash Combo effect
* Includes fixes for Dragon Combo, Fallen Empire, Tiger Cannon, and Sky Net Blow.
* Removed the SR_FLASHCOMBO_ATK_STEP usage.
* Fixes #627, fixes #725, fixes #741, and fixes #765.
Thanks to @exneval and @Rytech!
2016-01-29 11:15:00 -05:00
rAthenaAPI
d8e4695eab SQL synchronization
[ci skip]
2016-01-29 15:16:41 +01:00
Lemongrass3110
3011639bf3 Added some newer mob sprite names to mob db 2016-01-29 01:15:19 +01:00
aleos89
e3c274ac5e Added support for client 2015-10-01 / 2015-10-29
* This does not add support for Doram server side.
Thanks to @Rytech!
2016-01-28 14:38:25 -05:00
aleos89
497cca198e Updated Chorus skill type effect
* Fixes 921
* Chorus skills now work as long as another performer is in the same party and on screen as the caster -- no longer has to be adjacent to caster.
2016-01-27 09:58:17 -05:00
Lemongrass3110
2da17bb098 Fixed #929
Fixed item selection dialogs for 2015-05-13 and later

Follow up to d2d1fd2 and 71c6896
2016-01-27 11:02:55 +01:00
Cydh Ramdh
39d918f70c Merge pull request #717 from officialronode/master
Fixed Cash Shop NPC
* Follow up 11f42f27ab
* Fixed #931. Failing to buy item from NPC cashshop if no item in item_cash_db
2016-01-27 13:31:55 +07:00
Cydh Ramdh
dddc313c7d Clean up usage of unit_movepos and GVG/BG mpa checks on skill.c.
* Follow up 5afc620e74, 45936c7dc6

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-01-27 13:03:05 +07:00
Cydh Ramdh
fd1b360c93 Merge pull request #896 from rathena/hotfix/issue779
Fixed #779 
* Fixed 'Elemental Resistance Potions' doesn't work without changing any equipment.
* Moved player's Elemental resistance & attack bonus from status_calc_pc_ that need SCB_BASE to status_calc_atk_ele_pc and status_calc_def_ele_pc as a child of SCB_ATK_ELE and SCB_DEF_ELE (doesn't need to calculate everything just for these points)
2016-01-27 12:37:09 +07:00
aleos89
5afc620e74 Updated Illusion - Bewitch effect
* Positions are not swapped on GvG/Battleground maps.
* Confusion is applied no matter the map type and ignores status resistances.
2016-01-26 14:40:01 -05:00
Playtester
d170b55d6d Renewal damage, Spear Stab damage, range behavior (fixes #932)
* Fixed the renewal damage formula, the base damage formula is now 100% official
* Fixed the Spear Mastery riding bonus not working
* Fixed Spear Stab only giving +15% per level instead of +20% (it used to be +15% pre-trans, but is +20% in pre-re and re)
* Implemented proper behavior of range when players use skills
-- All skills with range 4 or higher are considered ranged and can be blocked by Pneuma instead of Safety Wall
-- This mainly affects Spear Stab which is now ranged instead of melee
-- Removed unnecessary code for Gate of Hell
2016-01-26 20:30:19 +01:00
rAthenaAPI
ff6caab275 SQL synchronization
[ci skip]
2016-01-26 10:10:51 +01:00
aleos89
45936c7dc6 Updated Knuckle Arrow effect
* Caster can not move to target on GvG/Battleground maps.
2016-01-25 14:12:16 -05:00
Playtester
0de5e008cf Merge branch 'master' of https://github.com/rathena/rathena 2016-01-25 19:13:39 +01:00
Playtester
ec149014a6 Fixed server crash when monster use blacksmith skills (fixes #930)
* Special thanks @reunite-ro
2016-01-25 19:13:10 +01:00
Cydh Ramdh
7426c4bf2f Merge pull request #891 from rathena/hotfix/issue879
* Fixed #879. Added check while equipping Gun-type weapon X Ammo (bullets and grenades).
* Fixed Gunslinger's Spread Shot can be used by equipping Shotgun + Bullet or Grenade Launcher + Grenade.
2016-01-25 10:43:25 +07:00
Playtester
5971745dfd Fixed Land Mine, Blast Mine and Claymore Mine not ignoring damage reduction cards (fixes #732) 2016-01-24 22:48:26 +01:00
Playtester
41e6b4a049 Sightblaster (fixes #788)
* Fixed Sightblaster printing errors to the map server log every time it's not used against a trap
* Fixed Sightblaster displaying damage twice and showing it's animation on every hit (partial revert of d95f5d2)
(Added a few comments so that it's clear it can't be moved to the other traps.)
2016-01-24 22:06:03 +01:00
Playtester
4fd4c1d5bf Pneuma / ArrowShower / Ranges, Charge Attack, Waterball / Jupitel fixes
* Pneuma / Arrow Shower / Ranges (fixes #915)
-- Pneuma now also protects against knockback from ranged skills
-- Arrow Shower cast by monsters is now always a melee skill and cannot be blocked by Pneuma, but can always be blocked by Safety Wall
-- When monsters cast a skill that has no specific rule, it will be considered melee when the target is within a 7x7 area around the monster, rather than a 11x11 area
* Charge Attack (fixes #417)
-- Damage: 0-3 cells 100%, 4-6 cells 200%, 7-9 cells 300%, 10-12 cells 400%, 13 cells 500%
-- Cast time pre-Renewal: 0-3 cells 500ms, 4-6 cells 1000ms, 7+ cells 1500ms
-- Cast time renewal: 500ms (250ms fixed)
-- The caster will now move to the cell next to the target rather than right on it
-- When the attack misses, there won't be knockback (but the caster will still move)
* Waterball/Jupitel (follow up to 6ebcb67, fixes #907)
-- Waterball/Jupitel now can hit through shootable walls
-- Waterball cells now can overlap
2016-01-24 17:54:02 +01:00
Playtester
9721dc94a5 NPC_EVILLAND and Sanctuary updates (fixes #927)
* NPC_EVILLAND now has 3+level intervals, a target range of 7 and ignores flee,
* NPC_EVILLAND's area of effect per unit is now 11x11 on level 1-9 and 27x27 on level 10
* NPC_EVILLAND now ignores Devotion
* Sanctuary now has exactly 1+3*level heal intervals, regardless of number of players healed
* Sanctuary will end early when 3+level targets have been hit, targets currently on Sanctuary might still be hit when it expires
2016-01-24 01:06:00 +01:00
Playtester
4fdcb2ea61 Official monster/MVP target selection (fixes #926)
* Monsters with mode MD_CHANGETARGET_MELEE will now only change targets on "attack" state if they are attacked by a normal attack
* Monsters will change targets if the target is within "attack range+1" distance instead of a static distance of 3
* When a monster gets attacked, it will now switch to the attacker even if the attacker is farther away than its current target and the current target is auto-attacking it
* Angry mode monsters will now always switch target to the first person that attacked them
2016-01-23 18:14:23 +01:00
Playtester
418dc47751 Fixed monster type 08 (see #926)
* Updated documentation for monster type 08
* Fixed mode of Luciola Vespa
2016-01-23 11:59:22 +01:00
Playtester
42b7d27e10 Merge branch 'master' of https://github.com/rathena/rathena 2016-01-22 22:57:42 +01:00
Playtester
e12fb643de Blacksmith skill update (fixes #912)
* Power-Thrust will no longer affects players that don't have a weapon equipped
* If weapon requirements on Adrenaline Rush or Power-Thrust are not met, the target will no longer display the buff animation
* Party members now only gain +5% ATK from Power-Thrust on all skill levels
* Hilt binding now increases the duration of Adrenaline Rush, Power-Thrust and Power Maximize for all party members as long as the caster has learned it
2016-01-22 22:57:21 +01:00
aleos89
8e6a65fff9 Updated Warg skills effects
* Tooth of Warg damage is now considered Weapon Mastery ATK which ignores elements.
* Warg Dash damage is no longer affected by player weight.
* When under the Warg Bite status players cannot use Hide, Cloaking, Cloaking Exceed, or Camouflage.
* Dance With Wug:
-- Damage is now considered a SC bonus.
-- Skills affected by Dance With Wug are now in INF3.
* Warg Strike and Warg Bite:
-- No longer affected by caster's % damage cards.
-- No longer ignores target's flee.
-- Ignores Demi-Human and Elemental reductions.

Thanks to @NovaRagnarok for helping test and get info!
2016-01-22 14:09:14 -05:00
Aleos
994b406575 Merge pull request #889 from rathena/feature/random_start_point
Implemented Randomized Start Point
* Fixes #805.
* Character's will follow somewhat of the official method of a 'random' start point at their first login.
* Official servers use load balancing for setting the start point dynamically according to user count, whereas we at rAthena wanted to stay simple since we don't believe you guys will need this kind of load balancing for new characters.
2016-01-22 12:23:22 -05:00
rAthenaAPI
23ab09cb72 SQL synchronization
[ci skip]
2016-01-22 10:10:25 +01:00
nanakiwurtz
1922f892f4 Merge pull request #885 from secretdataz/carddrops
Mob DB Update
* Thanks to @secretdataz
2016-01-22 02:26:43 +07:00
Cydh Ramdh
4068266d12 Fixed #893, #920. Success rate of Tarot Card of Fate's Death was accidently changed in b385fd048a
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-01-21 17:31:18 +07:00
Playtester
30395fa9cf Merge branch 'master' of https://github.com/rathena/rathena 2016-01-20 21:39:36 +01:00
Playtester
cccd1496f7 Monster Vulture's Eye and Snake's Eye removed (fixes #916)
* Monsters no longer have Vulture's Eye level 10 and Snake's Eye level 10 learned by default
* When you tank Cecil Damon from 10-14 cells away, she will no longer use her target skills
* Added a configuration with which you can set the level of Vulture's Eye and Snake's Eye that monsters have learned
2016-01-20 21:35:54 +01:00
aleos89
5c30116c11 Follow up to a2270aa
* Fixed VC14 failing to compile on Release mode. Thanks to @mrdiablo.
2016-01-20 12:58:00 -05:00
aleos89
af773a94a9 Follow up to b98fe0b
* Added a check if allocation fails.
2016-01-20 12:52:10 -05:00
aleos89
b98fe0b597 Cleanup
* Moved parsing for start_point and start_items to separate functions.
* Moved startitem struct to mmo.h and declared start_items in the charserv_config.
* Adjusted the MAP_DEFAULT_NAME for pre-renewal to the correct map.
2016-01-20 10:18:26 -05:00
nanakiwurtz
3227356840 Item DB SQL Sync
* Synced new items from commit 1d2dc2a8

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2016-01-20 14:24:02 +07:00
nanakiwurtz
759cc41d99 Tool Update
* Added Unique Index to convert_sql.pl

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2016-01-20 14:22:20 +07:00
nanakiwurtz
1d2dc2a82a Item DB Update
* Added item 6941, 6942, 6960, 17569, 22899, 22901

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2016-01-20 14:19:41 +07:00
Napster
8413ae905b Follow up to d70b173
* Add support Mechanic Outfit, thank you to Rytech for client support
2016-01-20 11:53:45 +07:00
Napster
b8a05178f1 Follow up d70b173 Fixed compile warning.
thank you to @Playtester point this.
2016-01-20 10:31:18 +07:00
aleos89
20e4029e26 Updated Volcanic Ash effect
* Follow up to 71ffda3.
* Skill cast failure chance should only occur at the end of cast.
2016-01-19 14:45:14 -05:00
Playtester
9cfca1cc08 Follow up to 5d7d994 and 6ebcb67 (code optimizations)
* Waterball now uses UNT_DUMMYSKILL
* Deluge/Volcano/Gale will no longer be blocked by UNT_DUMMYSKILL units
* Waterball will no longer cancel when damage is 0, on official servers this only happens if damage is negative but rAthena is no longer coded to handle negative damage unless you enable a custom feature, so... just don't use Waterball on water monsters, ok?
* Fixed two compiler warnings
2016-01-19 20:17:04 +01:00
Playtester
4c2d5153c3 Pre-renewal cast time fixes
* Mystical Amplification cast time can no longer be reduced by item bonuses except Staff of Destruction (fixes #903)
* Foresight will no longer stack additively with other cast time reductions (fixes #899)
* Suffragium and Foresight will now be consumed by skills, even if they aren't affected by them

Note: Whether skill-specific reductions stack additively with general reductions and how it works in renewal still needs to be tested, going to create separate issues for those once confirmed.
2016-01-18 21:01:38 +01:00
Cydh Ramdh
0d0c144b09 Follow up 6ebcb67601. Fixed compile error.
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-01-18 10:54:58 +07:00
Playtester
5d7d994ca0 Follow up to 9db667c (BSS fixed)
* Simplified the check (no need to check for ensemble and Adoramus separately)
* Fixed PR_BENEDICTIO not working at all
* Fixed chorus skills and WZ_COMET only counting to 1 rather than MAX_PARTY
2016-01-17 20:59:26 +01:00
Playtester
6ebcb67601 Waterball, Jupitel Thunder and Mystical Amplification behavior improved
- Implemented Waterball and Jupitel Thunder double cast (fixes #907)
* Waterball and Jupitel now won't apply a delay after they have been cast and won't notify the client about the spell until 150ms later, if another skill request is received, it will actually be cast as well
* To prevent exploits this behavior can only be used every 2 seconds
* This allows you to cast a spell after Jupitel that would not have enough range to be cast after knockback
- Finally implemented the official waterball unit behavior
* When casting Waterball, water, deluge and suiton units will be turned into waterball units
* These waterball units are then turned into waterballs one-by-one
* All unit behavior now also applies to waterball, special handling is now solved via db files
* If there are multiple waterball timers active at the same time, they will actually compete for the waterball units
* When waterball does not deal damage (100% resist), it will now cancel, allowing you to act and move again
* If this breaks anything, please notify me
- Mystical Amplification improved (fixes #908)
* Mystical Amplification will now toggle at cast begin rather than cast end
* When Mystical Amplification ends, spell damage will be immediately lower even for ongoing spells
2016-01-17 18:00:18 +01:00
Playtester
bbe9601c0d Fixed Soul Destroyer range (fixes #905)
- It is actually 9 in both renewal and pre-renewal
2016-01-16 13:37:09 +01:00
Napster
3a8aac4fb0 Follow up d70b173
*Missing document for body style
2016-01-13 16:37:23 +07:00
Napster
c1f843d755 Follow up d70b173
* Remove sctipt command closedressroom not used this
* cleanup some code
* check white space
* add detail&document packets
2016-01-13 13:10:57 +07:00
Nova
88d2cd7cfd Fixed Makibishi
Fixed an error where Makibishi unit_db was set to have an AoE, so when
you would refresh the screen you would see
http://i.imgur.com/mr3g1zG.png become http://i.imgur.com/UnecX60.png
This makes the skill behave as intended, as before the real AoE was that
of the second image.
2016-01-12 16:00:08 -08:00
aleos89
b85885c0a6 Updated Water Screen Option effect
* Behaves like Devotion now.
* Damage beyond Aqua's HP is not reflected back to the master.
* Damage is now properly displayed on Aqua rather than the master.
Thanks to @exneval.
2016-01-12 18:10:35 -05:00
Aleos
01ba54c77c Merge pull request #832 from CairoLee/master
Fixes #652 and #818
* Resolves players being able to talk to NPCs when a shop is open.
Thanks to @CairoLee, @anacondaqq, and @admkakaroto.
2016-01-12 17:56:31 -05:00
Atemo
6a62aab6d4 Merged Hercules@de7a8c0eaaeeb0994f58c8b419e5d2523c7df5a7, Eden quest were giving wrong equipments.
Merged Hercules@c7c956f71e63c9dd477c59d778c25690c6267b83 and fixed another bug in Collect Poison Spores case
2016-01-12 23:02:08 +01:00
aleos89
b439ef3168 Follow up to 8a730cd
* Fixes pc_delitem checking for an invalid index.
* Adjusted to not count Magnifiers if other checks fail.
2016-01-12 14:34:50 -05:00
aleos89
e4a3811b92 Fixes #681
* Follow up to 4019fb4.
* Corrects Hover not avoiding splash attack skills.
2016-01-12 14:17:51 -05:00
aleos89
8a730cdec9 Follow up to 5fe8145
* Cleaned up and added a few more checks to oneclick_itemidentify.
2016-01-12 12:16:21 -05:00
Lemongrass3110
9046e7ecf7 Fixed #884
Thanks to @mrjnumber1 and @csnv
2016-01-12 17:52:03 +01:00
aleos89
9db667c6ac Follow up to 4871dab
* Expanded the array for Comet's SP cost to MAX_PARTY to avoid overflow.
* Refined the count check for skill_check_condition_char_sub:
-- Included Adoramus in the check.
-- Added a fail safe check.
Thanks to @theultramage.
2016-01-12 10:51:29 -05:00
Lemongrass3110
f424a2a71d Reverted 2d03e7f and d32c857
Fixes #890 and #897

Sorry for the inconveniences guys!
2016-01-12 15:59:42 +01:00
Napster
05cb1607c5 Follow up 3f26c3d
* forgot change packets version, stick on 20130807
2016-01-12 11:06:40 +07:00
Napster
d70b1734c8 Add support body style implementation
* This feature require the client support before 2015-05-13 or newer
   Make sure you data&lub support for this

  note : read info to https://rathena.org/board/topic/104205-2015-client-support/

  Special Thanks you to Rytech, @aleos89
2016-01-12 01:55:30 +07:00
nanakiwurtz
3f26c3ddcc Fixed #895
* Thanks to @Dark8008 and @Playtester

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2016-01-12 00:14:47 +07:00
Napster
2debd47b6b Merge branch 'master' of https://github.com/rathena/rathena 2016-01-11 22:47:06 +07:00
Napster
a636732f46 Follow up to d2d1fd2
* Update Packets Change size for newer client
2016-01-11 22:46:23 +07:00
Cydh Ramdh
45aab55ca1 Fixed #866. Chain Lighting animation was sent in wrong flow.
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-01-10 10:50:34 +07:00
Cydh Ramdh
9643230521 Follow up 0be6389c48.
* Fixed compile error, thanks to @anacondaqq

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-01-09 18:11:37 +07:00
Aleos
0be6389c48 Merge pull request #888 from secretdataz/patch-1
Add master ID check in script command setunitdata
* Fixes #887
* Thanks to @secretdataz!
2016-01-08 14:32:38 -05:00
Jittapan Pluemsumran
08e26c9de9 Don't set the md->state.copy_master_mode if master_id check fails. 2016-01-09 01:51:04 +07:00
aleos89
b7eb62ffb4 Follow up to a54bb65
* Fixed the config format.
* Adjusted atcommand go to properly place players on renewal mode.
2016-01-08 13:33:24 -05:00
aleos89
a54bb653de Randomized Start Point
* Fixes #805
2016-01-08 12:27:10 -05:00
Lemongrass3110
85a4c272ca Follow up to 2b00879
Added the missing status icons(which were not in const.txt when converting it).
Also validated the status changes and removed the TODO mark since all of them are exported correctly.
2016-01-08 15:57:56 +01:00
Jittapan Pluemsumran
f2bad5e832 Add master id check in setunitdata script command. Fixes #887 2016-01-08 16:57:22 +07:00
Jittapan Pluemsumran
f987f1bcbe Mob DB Update - Added card drops
- Lighthalzen Biolab F4
- Hall of Abyss
- Malaya Port
- Eclage
- Old Glast Heim
2016-01-08 13:18:29 +07:00
Lemongrass3110
315056b02e Merge pull request #880 from rathena/cleanup/itemdb_aegisname
Added unique indices to ensure that aegis name is only used once per table.
Also added all scripts from sql-files to the travis CI script so that our build check will fail if we have a sql syntax error in there or some duplicate values.
2016-01-07 19:54:09 +01:00
Lemongrass3110
e76fdbf15b Merge pull request #881 from rathena/cleanup/const.txt
Clean up the way we handle our script constants.
Since most of them come from source anyway we now export them directly into the scripting engine to ensure that they use the correct values.
The main benefits are that you users don't have to fear that we forget to adjust something according to source changes, if you use the constants in your scripts that is, and we developers do not have to think about updating them anyway. It also guarantees that constants that used wrong values before this use the correct values that are defined source side.
2016-01-07 19:31:37 +01:00
Cydh Ramdh
68ab3d89fb Reverted Ground Drift changes on c699304bd9
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-01-07 11:37:01 +07:00
aleos89
9b48263026 Fixes #882
* Resolves a potential crash with Soul Exhale and SC_NORECOVER_STATE. Thanks to @stmarier and @mrjnumber1.
2016-01-06 22:24:59 -05:00
Lemongrass3110
65347041c1 Migrated all boolean constants to source exports 2016-01-07 00:53:31 +01:00
Lemongrass3110
76725b436d Follow up to 958b6cd
Fixed compilation on linux, since those constants were only defined on windows.
2016-01-07 00:52:00 +01:00
Lemongrass3110
00ec41eaac Follow up to 33729eb
Fixed duplicate export of looks.
2016-01-07 00:49:07 +01:00
Lemongrass3110
33729eb961 Migrated all look constants to source exports 2016-01-07 00:43:26 +01:00
Lemongrass3110
958b6cd5d9 Migrated all font weight constants to source exports 2016-01-07 00:28:15 +01:00
Cydh Ramdh
ecb70d47f3 Another follow up of c4fe3be0a1, sc null pointer check is done too eearly. Thank @Lemongrass3110
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-01-07 06:24:28 +07:00
Lemongrass3110
de61a19eca Migrated all getpetinfo constants to source exports
Created the respective enum on source side.
2016-01-07 00:19:37 +01:00
Cydh Ramdh
0ffbc20fd4 Follow up c699304bd9, removed redundant check. Thank @Lemongrass3110
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-01-07 06:18:38 +07:00
Lemongrass3110
28e337127e Migrated all getmonsterinfo constants to source exports
Created the respective enum on source side and changed the script doc to only refer to the constants not the direct values.
Additionally adjusted the sample script.
2016-01-06 23:55:06 +01:00
Lemongrass3110
a68ab0c88d Migrated all getpetinfo constants to source exports
Created the respective enum on source side and changed the script doc to only refer to the constants not the direct values.
2016-01-06 23:28:05 +01:00
nanakiwurtz
4c6cf469a4 Fixed #618
* Thanks to @anacondaqq and @Playtester

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2016-01-07 02:56:52 +07:00
Cydh Ramdh
c699304bd9 Gunslinger Fixes
* Fixed #879. Added check while equiping Gun-type weapon X Ammo (bullets and grenades).
* Fixed Gunslinger's Spread Shot can be used by equipping Shotgun + Bullet or Grenade Launcher + Grenade.
* Fixed Gunslinger's Mine (Ground Drift) must cannot be casted on target's foot and must cannot be stacked.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-01-07 00:54:57 +07:00
Lemongrass3110
90dcd845e2 Added additional constants
As @cydh requested we now also export weapon and ammunition types.
2016-01-06 14:13:36 +01:00
Lemongrass3110
72fe7f9ec6 Follow up to 56a7440
Added debug output to the quest log related commands to make it easier to find the source if a command fails(usually AEGIS script logic fails...).
2016-01-06 03:54:59 +01:00
Atemo
56a744014b Fixed some quest log issues.
#871
#872
#873
Fixed #875
2016-01-06 03:42:19 +01:00
Lemongrass3110
192badd150 Fixed #878 2016-01-06 02:43:38 +01:00
Lemongrass3110
bd69396ffa Added all missing sql scripts to the travis CI check 2016-01-06 02:14:06 +01:00
Lemongrass3110
09a87306b1 Added a unique index for aegis name to the item tables 2016-01-06 02:13:19 +01:00
Lemongrass3110
d32c857e16 Renamed custome headgear constans in src
They now match with those currently used in scripts and also match the ones for normal headgears and additionally they are easier to understand.
2016-01-06 00:08:27 +01:00
Lemongrass3110
5ea3f30d32 Removed two unused constants for alchemists
* Job_Alchem(Job_Alchemist would be correct)
* Job_Baby_Alchem(Job_Baby_Alchemist would be correct)

Both are currently unused in our delivered npc and item scripts.
Please consider using their correct constants instead.
2016-01-06 00:04:37 +01:00
aleos89
8ab031f707 Follow up to e4ab3be
* Fixes #860 - Pre-renewal Kunai should only deal 100%+90 damage per hit. Thanks to @Playtester.
2016-01-05 11:17:40 -05:00
rAthenaAPI
887dd7e80e Follow up to e368b5f
The aegis name check should only be applied to items. @lighta

Follow up to 6206537

Reverted the mob skill db SQL changes.
2016-01-05 15:27:38 +01:00
rAthenaAPI
6206537855 SQL synchronization
[ci skip]
2016-01-05 15:06:47 +01:00
Lemongrass3110
ab7947adb8 Follow up to d289bf8
Also fixed #867 on pre-renewal.
2016-01-05 15:05:47 +01:00
nanakiwurtz
8655913be7 Fixed #877
* Thanks to @Playtester

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2016-01-05 14:28:38 +07:00
nanakiwurtz
77578826f6 Item DB Update
* Removed AegisName duplicates

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2016-01-05 14:21:56 +07:00
nanakiwurtz
d289bf8fb0 Fixed #867
* Thanks to @Dark8008 and @Playtester

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2016-01-05 14:15:46 +07:00
nanakiwurtz
1abb02c840 Item DB Update
* Added new costumes

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2016-01-04 14:31:26 +07:00
lighta
1352b460fc Fixed #194
Update install.sh and uninstall.sh, fix smalls typos.
Move npc folder into usr/. Evenif using it as opt/ the layout is set to
be turned into a proper module.
2016-01-03 16:26:29 -05:00
lighta
e368b5f759 Update tools/convert_sql.pl to check if AegisName are duplicated and and a trailing _ if it's the case. 2016-01-03 15:43:19 -04:00
lighta
dbf2916c83 Update .gitattributes to force some line ending style for some file.
Fix cygwin not able to process 'configure' when fetched on windows directly.
2016-01-03 15:42:16 -04:00
Lemongrass3110
d909601b8a Fixed compilation on pre-renewal 2016-01-03 16:42:00 +01:00
Lemongrass3110
7cfd0df649 Partially merged #864
Thanks to @admkakaroto
2016-01-03 15:28:55 +01:00
Lemongrass3110
8d152e9139 Fixed compilation on linux.
Stupid me, why did I do this in the first place.
2016-01-03 14:48:20 +01:00
Lemongrass3110
80f5d1b27f Fixed #858
Issue existed since cc8edaa.
2016-01-02 02:11:24 +01:00
Lemongrass3110
d30b250fb2 Migrated all parameter constants to source exports 2016-01-02 01:54:39 +01:00
Lemongrass3110
6532f74c3b Migrated all quest check constants to source exports 2016-01-02 01:10:51 +01:00
Lemongrass3110
087a0f4a5e Migrated all binding constants to source exports 2016-01-02 01:08:55 +01:00
Lemongrass3110
d37e8958ce Migrated all bonus script flag constants to source exports 2016-01-02 01:07:28 +01:00
Lemongrass3110
b1e97ce6b1 Migrated all add skill type constants to source exports 2016-01-02 01:06:41 +01:00
Lemongrass3110
a2a13eeee3 Migrated all item type constants to source exports 2016-01-02 01:02:21 +01:00
Lemongrass3110
5b789412e7 Migrated all mercenary guild constants to source exports 2016-01-02 00:59:13 +01:00
Lemongrass3110
00057d7535 Migrated all send target constants to source exports 2016-01-02 00:57:37 +01:00
Lemongrass3110
3929f7adc3 Migrated all emoticon constants to source exports 2016-01-02 00:55:17 +01:00
Lemongrass3110
43d9445c6d Migrated all battle and auto trigger flag constants to source exports 2016-01-02 00:48:55 +01:00
Lemongrass3110
2eb8b933a7 Migrated all class and size constants to source exports 2016-01-02 00:43:43 +01:00
Lemongrass3110
f558f85abf Migrated all race constants to source exports 2016-01-02 00:38:56 +01:00
Lemongrass3110
7565dcc16b Migrated all element constants to source exports 2016-01-02 00:36:34 +01:00
Lemongrass3110
2b0087955e Migrated all status icon constants to source exports 2016-01-02 00:31:17 +01:00
nanakiwurtz
a3877abdea Updated item script for 18536
* Thanks to @ernestfegarido

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2016-01-01 23:25:22 +07:00
nanakiwurtz
3f44493d07 Follow up to 2807be3
* Reverted item 575, 583, 587

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2016-01-01 23:20:45 +07:00
Lemongrass3110
2174395717 Migrated all status change constants to source exports 2015-12-31 15:56:10 +01:00
nanakiwurtz
22a9a74d0c Fixed #781
* Thanks to @ernestfegarido, @Atemo, @Historica and @cydh

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2015-12-31 16:01:06 +07:00
nanakiwurtz
19ceb84324 Item Buying Store update
* Added missing items into item_buyingstore.txt

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2015-12-31 15:42:21 +07:00
nanakiwurtz
0506fc98e7 Item Trade update
* Added WOE TE item restrictions

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2015-12-31 15:42:20 +07:00
nanakiwurtz
2807be3381 Fixed #853
* Thanks to @secretdataz

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2015-12-31 15:42:19 +07:00
lighta
da205da728 Merge pull request #847 from rathena/hotfix/issue772
Fixed #772.
2015-12-31 01:47:00 -04:00
lighta
1ed2c92995 Merge pull request #822 from RomeroMalaquias/master
Avoiding conditional directives that break statements
2015-12-31 01:40:24 -04:00
Lemongrass3110
6322d609f4 Migrated all look constants to source exports 2015-12-31 04:17:50 +01:00
Lemongrass3110
2d03e7fb9e Migrated all equip position constants to source exports 2015-12-31 04:12:19 +01:00
Lemongrass3110
a1b08c380a Migrated all setcell and getcell constants to source exports 2015-12-31 04:06:50 +01:00
Lemongrass3110
8d3cff4b0e Migrated all mapflag constants to source exports 2015-12-31 04:02:26 +01:00
Lemongrass3110
2ee3765456 Migrated all broadcast constants to source exports 2015-12-31 03:56:05 +01:00
Lemongrass3110
e68ad2bef5 Migrated all eAthena job constants to source exports 2015-12-31 03:51:42 +01:00
Lemongrass3110
fb6688951d Migrated all job constants to source exports 2015-12-31 03:32:26 +01:00
Lemongrass3110
737fcc41f9 Included the new script_constants.h file
and migrated all existing exports over.
2015-12-31 03:02:30 +01:00
Lemongrass3110
79295b4c05 Added a new file to export source side constants into the script engine. 2015-12-31 02:49:44 +01:00
Lemongrass3110
48116ba9f8 Fixed MAX_CART constant being exported to script constants with wrong value(MAX_INVENTORY). 2015-12-31 02:26:35 +01:00
Lemongrass3110
55caed2db3 Follow up to 98c30e6
Sorry forgot to remove some debug stuff! :(
2015-12-31 01:13:00 +01:00
Lemongrass3110
98c30e6c4d Fixed #852 2015-12-31 01:10:49 +01:00
Lemongrass3110
a7f920a071 Follow up to 4871dab
Also suggested by @lighta
2015-12-31 00:49:21 +01:00
Lemongrass3110
d03e56073c Follow up to 879ddcc
Minor language fix suggested from @lighta.
2015-12-31 00:42:41 +01:00
Lemongrass3110
4871dab7de Fixed #854
Thanks to @theultramage for reporting and pinpointing the error as always!

Commiting this one for @aleos89, he fixed it for you guys.
2015-12-30 21:20:25 +01:00
Lemongrass3110
2f471a135c Fixed #856 2015-12-30 21:00:52 +01:00
Lemongrass3110
879ddcc1af Feeding log feature
Merged the feeding log feature requested by @MrAntares and implemented by @cydh in cydh/rathena@3f35e3a.

Don't forget to create the new SQL log table.
2015-12-30 12:48:44 +01:00
Napster
118fa28ae9 Follow up to 0042fe5bb6
*Fixed issues Character Deletion Time for the client 2015-09-16
2015-12-26 22:22:13 +07:00
Napster
67f8cb285f Merge branch 'master' of https://github.com/rathena/rathena 2015-12-25 10:54:21 +07:00
Napster
99845c1fd6 Follow up to 71c6896541
* check white space
* add missing old packet
2015-12-25 10:53:43 +07:00
nanakiwurtz
d14f75ef23 Fixed #705
* Thanks to @joelolopez

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2015-12-24 20:43:55 +07:00
Napster
060f33408d Merge branch 'master' of https://github.com/rathena/rathena 2015-12-24 16:31:10 +07:00
Napster
71c6896541 Add New Skill(Pushcart Decoration)Packet Implemented
* This feature require the client support before 2015-08-26 or newer
  user can select cart for change to new design
​  Make sure you data&lub support for this

  Special Thanks you @Lemongrass3110, @renniw
  This is a Christmas gift for the rAthena people.
2015-12-24 16:29:40 +07:00
aleos89
f47d4dcc0f Updated Hells Plant effect
* Hells Plant can be removed from Crazy Weed and Land Protector.
2015-12-23 14:15:07 -05:00
aleos89
dccf7a3e3d Follow up to 3be6f5a
* Drum Battlefield damage should not be affected by target size.
2015-12-23 14:13:08 -05:00
CairoLee
0c9218884d Follow up to c8db271ed9 2015-12-23 11:56:31 +08:00
aleos89
9632d2a217 Updated Howling of Mandragora effect
* Timer is not refreshed when casted on target again.
* Target's SP is not zapped again when already active.
2015-12-22 12:05:13 -05:00
aleos89
49f1c439b9 Updated Flying Side Kick effect
* Fog Wall should still apply to players who use Flying Side Kick to get out.
* Follow up to 08667a3.
2015-12-22 10:36:30 -05:00
aleos89
71ffda39fb Updated Volcanic Ash effect
* Only the Fire property attack bonus should affect Boss type monsters.
* Skill cast failure chance and Hit/Def/ATK/Flee reductions don't affect Boss type monsters.
2015-12-22 10:25:53 -05:00
aleos89
c0e6faee1b Updated Fire Pillar effect
* Fire Pillar no longer requires a Blue Gemstone for levels 6-10 on renewal.
2015-12-21 13:34:24 -05:00
aleos89
649acd8310 Documentation Updates
* Corrected the storage location for different variable types.
2015-12-21 10:22:18 -05:00
Napster
01adc9c3ff Vending&Buying Store report Packet Implemented
* New Feature for 2014-10-23 client or newer
  When user close shop, the client showing report for buy/sell
2015-12-21 20:05:40 +07:00
Lemongrass3110
d8830d21f6 Follow up to 9aa8325
Thanks to @CairoLee.
2015-12-20 15:24:11 +01:00
Lemongrass3110
eec88365e1 Merged HerculesWS/Hercules@5b4d1ac
Fixes two bugs in sealed shrine which existed since the instance system was rewritten in cd95d1c.

Thanks to @Ancyker and @MishimaHaruna.
2015-12-20 12:14:53 +01:00
Napster
0042fe5bb6 Follow up to https://github.com/rathena/rathena/commit/d2d1fd2
*Fixed issues Character Deletion Time for the client 2014 or newer. Thanks you to @Nova
2015-12-20 12:21:19 +07:00
Lemongrass3110
18de636c1f Fixed #772.
This is not a real fix but rather a fix which issues a warning for this kind of problem to show clearly that it is working as "intended".
2015-12-18 21:15:44 +01:00
Lemongrass3110
9aa832570e Fixed a lot of wrong SC group IDs for item delay database.
It also is able to parse the value for the script engine constants now.

Fixed #846.
2015-12-18 20:43:46 +01:00
Napster
22a1cc0174 Merge branch 'master' of https://github.com/rathena/rathena 2015-12-18 23:05:49 +07:00
Napster
ba184ab9a2 Follow up to https://github.com/rathena/rathena/commit/d2d1fd2
* Update Packets Change size for newer client
2015-12-18 23:04:32 +07:00
nanakiwurtz
b53eacd7b2 Follow up to ee0d256f
* Thanks to @zackdreaver

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2015-12-18 08:10:59 +07:00
Lemongrass3110
c75cc2a227 Fixed #796 2015-12-17 18:05:21 +01:00
nanakiwurtz
ee0d256f7b Fixed #844
* Thanks to @ernestfegarido

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2015-12-17 17:55:39 +07:00
rAthenaAPI
ec65a9f699 SQL synchronization
[ci skip]
2015-12-17 00:41:48 +01:00
Napster
be903ddb1b Follow up to 5fe81455b0
* forgot something Oops XD, Thank you @Lemongrass, @Aleos
2015-12-16 22:08:45 +07:00
Napster
5fe81455b0 Oneclick Itemidentify Packet Implemented
* New Feature for 2015-05-13 client or newer
  Request 1 Magnifier when use (ctrl + click right)
2015-12-16 22:03:29 +07:00
Cydh Ramdh
70eb71d0ef Updated idRO cash_trader NPC
* Fixed typo on shop list.
* 'Re-grab' the item list.
* Added 'missing' location.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2015-12-16 08:40:17 +07:00
aleos89
3f8055dcc2 Fixed #831
* Magnetic Field will now properly drain SP and lock targets.
2015-12-15 13:27:46 -05:00
Lemongrass3110
468bd6fa9b Fixed mvp hp bars not being updated.
Now mvps are correctly flagged as mvps on spawn already.
2015-12-15 17:24:46 +01:00
Atemo
d6343fba9e Fixed issue #840 2015-12-15 02:19:49 +01:00
Lemongrass3110
a85c10bfed Follow up to c7062e5
Fixed #838
2015-12-14 20:26:50 +01:00
aleos89
2f8699bbcc Follow up to bdff641
* Adjusted the HP/SP skill requirements to a signed value to account for negative values.
2015-12-13 14:17:45 -05:00
CairoLee
c8db271ed9 Fixed #652 #818
Signed-off-by: CairoLee <cairoliyu@gmail.com>
2015-12-12 16:24:44 +08:00
aleos89
27e90f8f45 Fixed #828
* Resolves required equipment check needing all equipment given to be equipped rather than just one. Thanks to @Paoly28.
2015-12-11 08:47:32 -05:00
nanakiwurtz
b2b37fc3ae Fixed #824
* Thanks to @secretdataz and @Historica

Signed-off-by: nanakiwurtz <nanakiwurtz240@gmail.com>
2015-12-11 12:07:42 +07:00
Atemo
0af2a80d06 Fixed some typo and change classchange to setnpcdisplay in novice adacemie #800 2015-12-11 00:44:39 +01:00
aleos89
c17b275502 Updated Blood Sucker effect
* Should only do 1 damage to infinite defense.
2015-12-10 15:02:35 -05:00
aleos89
9c7fbb2b67 Follow up to 3f8b381
* Added the missing knock back from Death Bound.
2015-12-10 14:43:01 -05:00
aleos89
3f8b381980 Updated Death Bound effect
* Death Bound will no longer reflect Hells Plant damage.
2015-12-10 14:06:20 -05:00
aleos89
174244b2a8 Updated Dragon Breath effect
* Concentration no longer increases Dragon Breath damage.
2015-12-10 14:04:11 -05:00
aleos89
aec1b1147a Updated Cart Cannon effect
* Should now ignore target's Flee.
2015-12-10 14:00:52 -05:00
aleos89
66298f3de5 Updated Chaos Panic effect
* Placing Chaos Panic down again will remove the previous instance.
2015-12-10 13:58:25 -05:00
aleos89
43585041e9 Updated Emergency Escape effect
* Now does a single fluid back slide.
* Adjusted Emergency Escape and Feint Bomb to use blewcount in skill_db.
2015-12-10 12:19:56 -05:00
aleos89
598def8544 Follow up to be3d5fe
* Fixes a compile warning.
2015-12-10 11:47:24 -05:00
aleos89
b0e289fbf3 Follow up to 89a33a7
* Added missing status change defines to const database.
* Updated documentation for bSateNoRecoverRace.
2015-12-10 11:36:13 -05:00
aleos89
29306b1f84 Follow up to c7ede8d
* Cleaned up Shadow Form to not be canceled by detection skills at 100%.
* Phantom Menace and Sensitive Keen do not do damage if the target is in Shadow Form.
* Body Paint has a chance to decrease attack speed and blind all targets around the caster, not just the hidden targets.
2015-12-10 10:34:35 -05:00
Romero Malaquias
64436bf42d checking sd before attempting to read 2015-12-10 01:18:16 -03:00
aleos89
bdff64181e Follow up to f7f1ec0
* Bumped HP/SP skill requirement variable up to uint32. Thanks to @CairoLee.
2015-12-09 21:10:20 -05:00
Atemo
447351a485 Merge pull request #825 from rathena/cleanup/redundant_getarg
Another clean-up follow-up bb38739af6
2015-12-09 23:14:21 +01:00
Atemo
3a45dd97f9 Another clean-up 2015-12-09 23:09:17 +01:00
Lemongrass3110
c28c9f61be Removed maximum packet size from configuration
It's a source side define now, because you should really only change this if you know what you are doing.
Beautified the number for pre 2013-12-23, thanks to @dastgir.
Fixed a warning which was added by the last commit and was issued with the default settings, thanks to @cydh.

Follow up to f4b42b2
2015-12-09 19:28:44 +01:00
Cydh Ramdh
7489fab958 Spaces cleanup follow up 2b5332a3b1
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2015-12-09 20:17:20 +07:00
Cydh Ramdh
96119fb1d0 Follow up c4fe3be0a1
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2015-12-09 19:42:01 +07:00
Cydh Ramdh
bb38739af6 Merge pull request #816 from rathena/cleanup/redundant_getarg
* Cleanup redundant usage of `getarg()` in scripts
2015-12-09 13:05:43 +07:00
Cydh Ramdh
c4fe3be0a1 Fixed #779
* Fixed 'Elemental Reistance Potions' doesn't work without changing any equipment.
* Moved player's Elemental resistance & attack bonus from `status_calc_pc_` that need `SCB_BASE` to `status_calc_atk_ele_pc` and `status_calc_def_ele_pc` as a child of `SCB_ATK_ELE` and `SCB_DEF_ELE` (doesn't need to calculate everything just for these points)

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2015-12-09 13:01:26 +07:00
Romero Malaquias
ede159ee20 Avoiding conditional directives that break statements 2015-12-09 01:06:27 -03:00
Cydh Ramdh
241e10b92c Follow up 89a33a77ad
* Corrected documentaion of `bStateNoRecoverRace`
* Added `bStateNoRecoverRace` to const.txt

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2015-12-09 05:26:18 +07:00
aleos89
f04156756d Merge branch 'master' of https://github.com/rathena/rathena 2015-12-08 14:40:00 -05:00
aleos89
89a33a77ad Updated Genetic Sling Item effects
* Moved all item effects to source.
* Updated HP/SP Increase Potions to use the official statuses.
* Updated Vellum Flail to use the official status instead of Critical Wound.
Thanks to @exneval.
2015-12-08 14:38:55 -05:00
Lemongrass3110
f4b42b26fb Updated the maximum size for packets
According to 3ceam revision 764 clients from 2013-12-23 on can deal with bigger packets. 3ceam uses 65636 as maximum, but we decided to stick with the maximum for unsigned shorts. Thanks to Rytech!

Please consider staying with the default value, because we will remove this configuration soon and make it a source side define which is depending on the packetversion define.
2015-12-08 17:35:58 +01:00
aleos89
be3d5fe298 Fixes #821
* Earth Strain no longer strips enemies that don't receive damage.
* Cleaned up the dmg_lv parameter type for skill_additional_effect().
2015-12-07 20:14:49 -05:00
aleos89
2e2e1abdc8 Fixes #804
* Corrected Hesperus Lit and Ray of Genesis Banding check.
2015-12-07 16:53:53 -05:00
aleos89
f7f1ec0769 Fixes #819
* Resolves Tiger Cannon not reducing HP when max HP is out of variable bounds. Thanks to @CairoLee.
2015-12-07 14:12:23 -05:00
Napster
0c9bd301d8 Follow up to 8b3b32e
* Revert code, found problem with npcshopattach
2015-12-07 12:47:38 +07:00
Lemongrass3110
5fc3cbf5b0 Merge pull request #789 from Baalberith6/clif_quest_info2
Fixing quest objectives being shown by client incorrectly on monster kill.
2015-12-06 14:01:40 +01:00
Cydh Ramdh
f5beee1744 Follow up 36d85277b4, Thank @dastgir.
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2015-12-06 12:40:56 +07:00
Cydh Ramdh
36d85277b4 * Cleanup redundant usage of getarg() in scripts
* `npc:enchan_mal.txt`

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2015-12-06 12:03:12 +07:00
Napster
8b3b32e000 Fixed #503
* when use the callshop, then player can't move in the game. thank to @CairoLee
2015-12-06 01:01:07 +07:00
aleos89
0212d44bb4 Fixes #809
* Reverted 42b7ba9 and cef2f9e NPC shop ID checks.
2015-12-05 10:08:18 -05:00
aleos89
4b7301ac89 Follow up to c7ede8d
* Adjusted the check for hidden targets for Earth Shaker.
2015-12-04 17:00:05 -05:00
aleos89
c7ede8ddbd Fixes #563
* Updated various detection skills pulling out hidden targets.
2015-12-04 16:24:54 -05:00
aleos89
8f4660b774 Fixes #524
* Spore Explosion will now properly give damage to targets.
2015-12-04 16:10:13 -05:00
aleos89
feb885cb37 Fixes #797
* Elemental Control will no longer be removed on map change/Teleport.
2015-12-04 15:53:37 -05:00
aleos89
42b7ba9d63 Fixes #790
* Fixes the close button not displaying after canceling a shop transaction.
2015-12-04 15:15:33 -05:00
icxbb-xx
92d617bbb0 Fixed #807
* Add missing packets version check, @thank you to @cold-hr
2015-12-04 20:29:41 +07:00
aleos89
523cb145f5 Follow up to a7b8fd4
* Resolves a check for skills that have required equipment items to check for all items in the list.
* Fixes #782 - Removed renewal items from pre-renewal skill requirements for 3rd classes.
2015-12-03 11:20:12 -05:00
Atemo
1f47604f57 Fixed issue #800 2015-12-02 21:31:11 +01:00
icxbb-xx
1f1160300b Follow up to d2d1fd2
* Add missing packets other
* Fixed #785, Big HP Bar show only MVP (this not sure, needs official info)

note: BIG HP Bar for MVP, Now not update status hp
2015-12-02 21:33:46 +07:00
Atemo
01e041874c Fixed some typo 2015-12-02 01:54:07 +01:00
Atemo
2b5332a3b1 Merge pull request #795 from rathena/academie
Academie
2015-12-02 01:22:45 +01:00
Atemo
24ecdadf48 Merge branch 'master' into academie 2015-12-02 00:40:42 +01:00
Atemo
1a5b5f6057 Typo 2015-12-02 00:21:40 +01:00
Atemo
564f4f8100 Partial revert of 65b6861e84
Created Small_cleanup branch to merge the mapcache clean up later, after debug.
2015-12-02 00:07:36 +01:00
Atemo
c3125026d2 Merge branch 'master' into academie 2015-11-29 16:03:09 +01:00
Atemo
3e7b90d8cb Coquille 2015-11-29 16:00:17 +01:00
marha
6f5f53dae6 Fixing quest objectives being shown by client incorrectly on monster kill. Client only shows the first monster received, but we want to show the killed monster. 2015-11-29 13:07:36 +01:00
Atemo
c3e56b9c1b Update 2015-11-26 23:11:22 +01:00
Atemo
7fcd0f5b9d Clean up 2015-11-24 23:22:42 +01:00
Atemo
4f3f483bfa Remove setquestinfo_req state 3 unused in aegis (currently commented) 2015-11-24 18:12:52 +01:00
Atemo
9b13351817 Merge branch 'master' into academie 2015-11-24 18:01:09 +01:00
lighta
65b6861e84 Small cleanup
And updata mapcache to use DBPATH instead rechecking RENEWAL macro,
(code duplication)
Make mapcache use cli.o to give some feedback on arguments given.
2015-11-18 06:34:14 -05:00
lighta
8703eacfe4 Merge branch 'academie' of https://github.com/rathena/rathena into academie 2015-11-17 22:19:38 -05:00
Atemo
1e80d1b720 Removed comment and corrected typo 2015-11-18 03:36:37 +01:00
Atemo
cc8edaaac6 Merged novice academie from Hercules 21564acf13
-> All Credit to Kisuka for this big work.

Added news commands to alter questinfo conditions :
- setquestinfo_level : Add level range criteria for quest info with quest id 'quest_id'.
- setquestinfo_req : Add quest requirement for quest info with quest id 'quest_id'.
   -> Player have / doesn't have the required quest.
- setquestinfo_job : To add additionnal job criteria.
-> Credit to Cydh !
2015-11-16 00:34:00 +01:00
officialronode
a85c232671 Fixed Cash Shop NPC
This update fix the cash shop npc error ( The Purchase has failed because the NPC does not exist. ) Tried & Tested for 2012-04-10 and 2013-08-07 client.
2015-10-25 01:04:13 +08:00
1335 changed files with 179621 additions and 71734 deletions

9
.gitattributes vendored
View File

@@ -2,4 +2,11 @@
*.c diff=cpp
*.sln merge=union
*.vcproj merge=union
*.vcxproj merge=union
*.vcxproj merge=union
*.sln text eol=crlf
*.bat text eol=crlf
configure text eol=lf
configure.in text eol=lf
Makefile text eol=lf
Makefile.in text eol=lf
*.sh text eol=lf

175
.github/CONTRIBUTING.md vendored Normal file
View File

@@ -0,0 +1,175 @@
# Contributing to rAthena
Table of Contents
-----------------
* [Reporting Bugs](#reporting-bugs)
* [Suggesting Enhancements](#suggesting-enhancements)
* [Issue Labels](#issue-labels)
* [Become a Team Member](#become-a-team-member)
Reporting Bugs
--------------
This bit of information is here to guide you through the process of creating a bug report for rAthena! Issues cannot only be used for developers to track bugs, but they can also track enhancements and tasks. The more detailed your report is, the easier it is for developers to reproduce and resolve the bug!
### Did you find a bug? :bug:
* **Ensure the bug is not coming from a customization** within your files!
* **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/rathena/rathena/issues). If the same issue exists, feel free to leave a comment and tell us you are experiencing the issue as well and if possible add some additional or missing information!
* If you are unable to find an open issue addressing the problem, [open a new one](#submit-a-bug-report)!
#### Submit A Bug Report :inbox_tray:
There are several things that go into making a bug report a good bug report!
This is a breakdown of a generic Issue:
* **Title** should give some general insight as to what the bug is about.
* **Description** should give greater detail of the bug that cannot be explained in the **Title**.
* **Labels** are colored to represent a category they fall into.
* **Milestones** are what developers use to group tasks together and quickly evaluate how close the project deliverable is near completion.
* **Assignees** are developers who are directly linked to resolve the issue.
* **Comments** allow other members to give feedback on the issue.
#### What are some good details to provide in a bug report? :pencil2:
When describing your Issue through the **Description** area, it is recommended that you provide as much information as possible to resolve the Issue as fast as possible. Keep in mind that you can tag people within the **Description** area through the `@mention` feature. You can also tag other Issues or Pull Requests by typing `#` which will pull up a list of issues. You can find a markdown guide at [Mastering Markdown](https://guides.github.com/features/mastering-markdown/).
Some information to keep in mind while creating an Issue:
* **GitHub Hash**: The hash is a 40 alpha-numeric string (which can be broken down to the first 7 characters) which states the version you are at. (**If you are using SVN instead of Git:** Please also put the change date and first line of the commit message beside the revision number, or we will not be able to look up the corresponding Git hash).
* **Client Date**: The client date provides specific details depending on the issue. The main detail is that it helps narrow down issues that are related to a packet problem.
* **Modifications that may affect results**: It is always best to try to reproduce your issue on a clean rAthena if you have lots of modifications.
* **Description of Issue**: Describe your issue in detail! Screenshots and videos help a lot! Please also provide crash dumps if one of the servers is crashing.
* **How to Reproduce Issue**: Describe how to reproduce your issue in detail! The more the merrier!
* **Official Info**: Provide creditable sources to state why it is a bug! Please do not provide an iRO Wiki link as there is a high chance it does not match kRO behavior.
#### Be wary of the `@mention` feature! :warning:
Since rAthena uses custom `@commands`, when describing an issue that deals with these commands please keep in mind that this does clash with the `@mention` system for GitHub! Always quote the text when mentioning an ``` `@command` ```(like this) so that you do not tag uninvolved GitHub users!
Suggesting Enhancements
-----------------------
### Did you write a patch that fixes a bug? :bookmark_tabs:
* Open a new GitHub Pull Request with the patch.
* Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.
### Do you intend to add a new feature or change an existing one? :bulb:
* Open a new GitHub Pull Request with the feature addition or changes.
* Ensure the PR description clearly describes what the addition or changes are for. Include the relevant issue number if applicable.
#### How to create Pull Requests :pencil:
1. Make sure you have a [GitHub account](https://github.com/signup/free).
2. Next, you will need to [fork rAthena](https://help.github.com/articles/fork-a-repo/#step-3-configure-git-to-sync-your-fork-with-the-original-spoon-knife-repository) to your account.
3. Before making changes, make sure you [create a new branch](https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/) for your working tree.
4. After completing your changes, commit and push it to your branch.
5. Now you are ready to [create a Pull Request](https://help.github.com/articles/creating-a-pull-request/) for rAthena!
* Upon creating the Pull Request, make sure you follow our [template](https://github.com/rathena/rathena/blob/master/.github/PULL_REQUEST_TEMPLATE.md) and provide the required information.
* **OPTIONAL**: We would greatly appreciate those that check the box to [allow edits by maintainers](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/), so we can apply small cleanups or additions to your changes before merging them!
Issue Labels
------------
For the most part you as a user will have no reason to worry about the **Milestone** or **Assignee** parts of an Issue. The different **Labels** of an Issue allow developers to quickly understand the issue and also allows for fast searching or sorting.
:bangbang: Users should be aware of the 'Mode' and 'Status' Type **Labels** as these sometimes require feedback! :bangbang:
#### Component
| Label Name | Search Link | Description |
| --- | --- | --- |
| `component:core` | [search][search-rathena-label-componentcore] | A fault that lies within the main framework of rAthena. |
| `component:database` | [search][search-rathena-label-componentdatabase] | A fault that lies within the database of rAthena. |
| `component:documentation` | [search][search-rathena-label-componentdocumentation] | A fault that lies within the documentation of rAthena. |
| `component:script` | [search][search-rathena-label-componentscript] | A fault that lies within the scripts of rAthena. |
| `component:skill` | [search][search-rathena-label-componentskill] | A fault that deals specifically with a skill. |
| `component:tool` | [search][search-rathena-label-componenttool] | A fault that lies within a tool of rAthena. |
#### Missing
| Label Name | Search Link | Description |
| --- | --- | --- |
| `missing:clientdate` | [search][search-rathena-label-missingclientdate] | Issue **Title** or **Description** does not state the client date used to create the bug. |
| `missing:mode` | [search][search-rathena-label-missingmode] | Issue **Title** or **Description** does not state pre-renewal or renewal mode. |
| `missing:revision` | [search][search-rathena-label-missingrevision] | Issue **Description** does not state the revision of rAthena used when the bug occurred. |
#### Mode
| Label Name | Search Link | Description |
| --- | --- | --- |
| `mode:prerenewal` | [search][search-rathena-label-modeprerenewal] | A fault that exists within the pre-renewal mode. |
| `mode:renewal` | [search][search-rathena-label-moderenewal] | A fault that exists within the renewal mode. |
#### Priority
| Label Name | Search Link | Description |
| --- | --- | --- |
| `priority:high` | [search][search-rathena-label-priorityhigh] | A fault that makes rAthena unstable or unusable. |
| `priority:medium` | [search][search-rathena-label-prioritymedium] | A fault that makes rAthena have significant repercussions but does not render rAthena unusable. |
| `priority:low` | [search][search-rathena-label-prioritylow] | A fault that affects rAthena in one piece of functionality and is self-contained. |
#### Status
| Label Name | Search Link | Description |
| --- | --- | --- |
| `status:code-review` | [search][search-rathena-label-statuscodereview] | Pull Request that requires reviewing from other developers before being pushed to master. |
| `status:confirmed` | [search][search-rathena-label-statusconfirmed] | Issue that has been validated by a developer to affect rAthena. |
| `status:duplicate` | [search][search-rathena-label-statusduplicate] | Issue that has been reported before. |
| `status:inprogress` | [search][search-rathena-label-statusinprogress] | Issue that has begun resolution by a developer. |
| `status:invalid` | [search][search-rathena-label-statusinvalid] | Issue that is either not official or is not related to rAthena. |
| `status:need more info` | [search][search-rathena-label-statusneedmoreinfo] | Issue that needs more information from a creditable source. |
| `status:need user input` | [search][search-rathena-label-statusneeduserinput] | Issue that needs more information from the issue creator. |
| `status:outdated emulator` | [search][search-rathena-label-statusoutdatedemulator] | Issue that requires the creator's local files to be updated to be resolved. |
| `status:unable to reproduce` | [search][search-rathena-label-statusunabletoreproduce] | Issue that was unable to be reproduced on rAthena. |
| `status:wontfix` | [search][search-rathena-label-statuswontfix] | Issue that cannot be fixed through some limitation or is intended behavior. |
#### Type
| Label Name | Search Link | Description |
| --- | --- | --- |
| `type:bug` | [search][search-rathena-label-typebug] | Issue that is a bug within rAthena. |
| `type:enhancement` | [search][search-rathena-label-typeenhancement] | Issue that is an enhancement to rAthena. |
| `type:maintenance` | [search][search-rathena-label-typemaintenance] | Issue for refactoring rAthena. |
| `type:question` | [search][search-rathena-label-typequestion] | Issue that is a question for rAthena. |
[search-rathena-label-componentcore]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3Acomponent%3Acore
[search-rathena-label-componentdatabase]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3Acomponent%3Adatabase
[search-rathena-label-componentdocumentation]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3Acomponent%3Adocumentation
[search-rathena-label-componentscript]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3Acomponent%3Ascript
[search-rathena-label-componentskill]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3Acomponent%3Askill
[search-rathena-label-componenttool]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3Acomponent%3Atool
[search-rathena-label-missingclientdate]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3Amissing%3Aclientdate
[search-rathena-label-missingmode]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3Amissing%3Amode
[search-rathena-label-missingrevision]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3Amissing%3Arevision
[search-rathena-label-modeprerenewal]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3Amode%3Aprerenewal
[search-rathena-label-moderenewal]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3Amode%3Arenewal
[search-rathena-label-priorityhigh]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3Apriority%3Ahigh
[search-rathena-label-prioritymedium]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3Apriority%3Amedium
[search-rathena-label-prioritylow]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3Apriority%3Alow
[search-rathena-label-statuscodereview]: https://github.com/rathena/rathena/pulls?q=is%3Apr+is%3Aopen+label%3Astatus%3Acode-review
[search-rathena-label-statusconfirmed]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3Astatus%3Aconfirmed
[search-rathena-label-statusduplicate]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3Astatus%3Aduplicate
[search-rathena-label-statusinprogress]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3Astatus%3Ainprogress
[search-rathena-label-statusinvalid]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3Astatus%3Ainvalid
[search-rathena-label-statusneedmoreinfo]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3A"status%3Aneed+more+info"
[search-rathena-label-statusneeduserinput]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3A"status%3Aneed+user+input"
[search-rathena-label-statusoutdatedemulator]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3A"status%3Aoutdated+emulator"
[search-rathena-label-statusunabletoreproduce]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3A"status%3Aunable+to+reproduce"
[search-rathena-label-statuswontfix]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3Astatus%3Awontfix
[search-rathena-label-typebug]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3Atype%3Abug
[search-rathena-label-typeenhancement]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3Atype%3Aenhancement
[search-rathena-label-typemaintenance]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3Atype%3Amaintenance
[search-rathena-label-typequestion]: https://github.com/rathena/rathena/issues?q=is%3Aissue+is%3Aopen+label%3Atype%3Aquestion
Become a Team Member
--------------------
1. Before you send in a staff application, make sure you have an [rAthena account](https://rathena.org/board/register/).
* If you are new to the community, go ahead and [introduce yourself](https://rathena.org/board/forum/89-introductions/)!
2. Please fill out the [Staff Application](https://rathena.org/board/staffapplications/) and you will be notified shortly.
The rAthena team is comprised of all volunteers ([AUTHORS](https://github.com/rathena/rathena/blob/master/AUTHORS)). We encourage you to pitch in and submit bug reports or Pull Requests!
Thanks!
rAthena Team

29
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,29 @@
<!-- NOTE: Anything within these brackets will be hidden on the preview of the Issue. -->
* **rAthena Hash**:
<!-- Please specify the rAthena [GitHub hash](https://help.github.com/articles/autolinked-references-and-urls/#commit-shas) on which you encountered this issue.
How to get your GitHub Hash:
1. cd your/rAthena/directory/
2. git rev-parse --short HEAD
3. Copy the resulting hash.
-->
* **Client Date**:
<!-- Please specify the client date you used. -->
* **Server Mode**:
<!-- Which mode does your server use: Pre-Renewal or Renewal? -->
* **Description of Issue**:
* Result: <!-- Describe the issue that you experienced in detail. -->
* Expected Result: <!-- Describe what you would expect to happen in detail. -->
* How to Reproduce: <!-- If you have not stated in the description of the result already, please give us a short guide how we can reproduce your issue. -->
* Official Information:<!-- If possible, provide information from official servers (kRO or other sources) which prove that the result is wrong. Please take into account that iRO (especially iRO Wiki) is not always the same as kRO. -->
<!-- * _NOTE: Make sure you quote ``` `@atcommands` ``` just like this so that you do not tag uninvolved GitHub users!_ -->
* **Modifications that may affect results**:
<!-- * Please provide any information that could influence the expected result. -->
<!-- * This can be either configurations you changed, database values you changed, or even external source modifications. -->

16
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,16 @@
<!-- NOTE: Anything within these brackets will be hidden on the preview of the Pull Request. -->
* **Addressed Issue(s)**:
<!--
Please specify the rAthena [GitHub issue(s)](https://help.github.com/articles/autolinked-references-and-urls/#issues-and-pull-requests) this pull request amends.
If no issue exists yet, please [create one](https://github.com/rathena/rathena/issues/new) first and then link your pull request to the amendment!
-->
* **Server Mode**:
<!-- Which mode does this pull request apply to: Pre-Renewal, Renewal, or Both? -->
* **Description of Pull Request**:
<!-- Describe how this pull request will resolve the issue(s) listed above. -->

32
.gitignore vendored
View File

@@ -14,6 +14,8 @@ Thumbs.db
/*.exe
/*.exe.*
/*.ilk
/*.iobj
/*.ipdb
/*.log
/*.ncb
/*.opensdf
@@ -25,11 +27,12 @@ Thumbs.db
/*.suo
*.o
*.a
*.yml
*.vcxproj.user
/char-server
/config.log
/config.status
/core
/enc_temp_folder
/ipch
/login-server
/Makefile
@@ -47,6 +50,9 @@ Thumbs.db
/3rdparty/mt19937ar/Makefile
/3rdparty/mt19937ar/*.o
# /3rdparty/yaml-cpp/
/3rdparty/yaml-cpp/Makefile
# /db/
/db/import
@@ -54,9 +60,6 @@ Thumbs.db
/conf/import
/conf/msg_conf/import
# /doc/
/doc/doxygen
# /log/
/log/*.log
/log/*.leaks
@@ -98,8 +101,17 @@ Thumbs.db
/tools/*.ilk
/tools/*.pdb
# /vcproj-15/
/vcproj-15/char-server
/vcproj-15/login-server
/vcproj-15/mapcache
/vcproj-15/map-server
/vcproj-15/*.user
# /vcproj-14/
.vs
*.VC.db
*.VC.opendb
/vcproj-14/char-server
/vcproj-14/login-server
/vcproj-14/mapcache
@@ -141,3 +153,15 @@ Thumbs.db
/.idea/workspace.xml
/build/
# bat tools
/charserv.bat
/logserv.bat
/mapcache.bat
/mapserv.bat
/runserver.bat
/serv.bat
# dlls
/libmysql.dll
/pcre8.dll
/zlib.dll

View File

@@ -1,20 +1,41 @@
language: c
language: cpp
compiler:
- clang
- gcc
dist: trusty
before_script:
- uname -a
- mysql -u $DB_ROOT -e "CREATE DATABASE $DB_NAME;" || aborterror "Unable to create database."
- mysql -u $DB_ROOT $DB_NAME < sql-files/main.sql || aborterror "Unable to import main database."
- mysql -u $DB_ROOT $DB_NAME < sql-files/logs.sql || aborterror "Unable to import logs database."
- mysql -u $DB_ROOT $DB_NAME < sql-files/item_cash_db.sql || aborterror "Unable to import cash item table."
- mysql -u $DB_ROOT $DB_NAME < sql-files/item_cash_db2.sql || aborterror "Unable to import cash item 2 table."
- mysql -u $DB_ROOT $DB_NAME < sql-files/item_db.sql || aborterror "Unable to import pre-renewal item table."
- mysql -u $DB_ROOT $DB_NAME < sql-files/item_db2.sql || aborterror "Unable to import pre-renewal item 2 table."
- mysql -u $DB_ROOT $DB_NAME < sql-files/item_db_re.sql || aborterror "Unable to import renewal item table."
- mysql -u $DB_ROOT $DB_NAME < sql-files/item_db2_re.sql || aborterror "Unable to import renewal item 2 table."
- mysql -u $DB_ROOT $DB_NAME < sql-files/mob_db.sql || aborterror "Unable to import pre-renewal monster table."
- mysql -u $DB_ROOT $DB_NAME < sql-files/mob_db2.sql || aborterror "Unable to import pre-renewal monster 2 table."
- mysql -u $DB_ROOT $DB_NAME < sql-files/mob_db_re.sql || aborterror "Unable to import renewal monster table."
- mysql -u $DB_ROOT $DB_NAME < sql-files/mob_db2_re.sql || aborterror "Unable to import renewal monster 2 table."
- mysql -u $DB_ROOT $DB_NAME < sql-files/mob_skill_db.sql || aborterror "Unable to import pre-renewal monster skill table."
- mysql -u $DB_ROOT $DB_NAME < sql-files/mob_skill_db2.sql || aborterror "Unable to import pre-renewal monster skill 2 table."
- mysql -u $DB_ROOT $DB_NAME < sql-files/mob_skill_db_re.sql || aborterror "Unable to import renewal monster skill table."
- mysql -u $DB_ROOT $DB_NAME < sql-files/mob_skill_db2_re.sql || aborterror "Unable to import renewal monster skill 2 table."
- mysql -u $DB_ROOT $DB_NAME < sql-files/roulette_default_data.sql || aborterror "Unable to import roulette table."
- mysql -u $DB_ROOT -e "GRANT ALL ON *.* TO '$DB_USER'@'$DB_HOST' IDENTIFIED BY '$DB_PASS';"
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo apt-get update -q
- sudo apt-get install gcc-5 -y
- sudo apt-get install g++-5 -y
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 1
script:
- ./configure $CONFIGURE_FLAGS
- make clean
- make server
- 'echo packet_db_ver: $PACKETDBVER >> db/import/packet_db.txt'
- ./map-server --run-once
env:
@@ -24,10 +45,11 @@ env:
- DB_NAME="ragnarok"
- DB_USER="ragnarok"
- DB_PASS="ragnarok"
- PACKETDBVER=45
matrix:
- CONFIGURE_FLAGS="--enable-prere=no"
- CONFIGURE_FLAGS="--enable-prere=yes"
- CONFIGURE_FLAGS="--enable-prere=no --enable-vip=no --enable-buildbot=yes"
- CONFIGURE_FLAGS="--enable-prere=yes --enable-vip=no --enable-buildbot=yes"
- CONFIGURE_FLAGS="--enable-prere=no --enable-vip=yes --enable-buildbot=yes"
- CONFIGURE_FLAGS="--enable-prere=yes --enable-vip=yes --enable-buildbot=yes"
notifications:
email: false

View File

@@ -53,3 +53,4 @@ add_subdirectory( mt19937ar )
add_subdirectory( mysql )
add_subdirectory( pcre )
add_subdirectory( zlib )
add_subdirectory( yaml-cpp )

54
3rdparty/cmake/GetGitVersion.cmake vendored Normal file
View File

@@ -0,0 +1,54 @@
# - Returns a version string from Git tags
#
# This function inspects the annotated git tags for the project and returns a string
# into a CMake variable
# higly adapted from https://raw.githubusercontent.com/google/benchmark/master/cmake/GetGitVersion.cmake
# lighta
#
# get_git_version()
#
# - Example
#
# include(GetGitVersion)
# get_git_version(GIT_VERSION)
# return
# - GIT_VERSION : remote tracking sha of master
# - GIT_HEAD_VERSION : current sha of current branch
#
# Requires CMake 2.8.11+
find_package(Git)
if(__get_git_version)
return()
endif()
set(__get_git_version INCLUDED)
function(get_git_version)
if(GIT_EXECUTABLE)
#determine remote tracking master sha
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse origin/master
RESULT_VARIABLE status
OUTPUT_VARIABLE GIT_VERSION
ERROR_QUIET)
if(${status})
set(GIT_VERSION "unknow")
else()
string(STRIP ${GIT_VERSION} GIT_VERSION)
endif()
#determine current head sha
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --verify HEAD
RESULT_VARIABLE status
OUTPUT_VARIABLE GIT_HEAD_VERSION
ERROR_QUIET)
if(${status})
set(GIT_HEAD_VERSION "unknow")
else()
string(STRIP ${GIT_HEAD_VERSION} GIT_HEAD_VERSION)
endif()
endif()
message("-- git Version: ${GIT_VERSION}, ${GIT_HEAD_VERSION}")
set(GIT_VERSION ${GIT_VERSION} PARENT_SCOPE)
set(GIT_HEAD_VERSION ${GIT_HEAD_VERSION} PARENT_SCOPE)
endfunction()

44
3rdparty/cmake/GetSvnVersion.cmake vendored Normal file
View File

@@ -0,0 +1,44 @@
#
# Find svnversion
#
function(get_svn_version)
message( STATUS "Detecting svnversion" )
find_program( SVNVERSION_EXECUTABLE svnversion )
mark_as_advanced( SVNVERSION_EXECUTABLE )
if( SVNVERSION_EXECUTABLE )
message( STATUS "Found svnversion: ${SVNVERSION_EXECUTABLE}" )
endif()
message( STATUS "Detecting svnversion - done" )
#
# Find Subversion
#
message( STATUS "Detecting Subversion" )
find_package( Subversion )
message( STATUS "Detecting Subversion - done" )
#
# SVNVERSION
#
if( SVNVERSION_EXECUTABLE )
message( STATUS "Getting svn version" )
execute_process( COMMAND ${SVNVERSION_EXECUTABLE} ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE SVNVERSION
OUTPUT_STRIP_TRAILING_WHITESPACE )
if( SVNVERSION MATCHES "^Unversioned" )
set( SVNVERSION )
endif()
string( REGEX REPLACE "[^1234567890MSexported]" "_" SVNVERSION "${SVNVERSION}" )
message( STATUS "Found SVNversion: ${SVNVERSION}" )
message( STATUS "Getting svn version - done" )
endif()
if( Subversion_FOUND AND SVNVERSION )
message( STATUS "Getting svn branch" )
Subversion_WC_INFO( ${PROJECT_SOURCE_DIR} rAthena )
if( rAthena_WC_URL )
string( REGEX MATCH "[^/]+$" BRANCH ${rAthena_WC_URL} )
set( SVNVERSION "${BRANCH}-${SVNVERSION}" )
message( STATUS "Found branch: ${BRANCH}" )
endif()
message( STATUS "Getting svn branch - done" )
endif()
set(SVNVERSION ${SVNVERSION} PARENT_SCOPE)
endfunction()

171
3rdparty/libconfig/libconfig.vcxproj vendored Normal file
View File

@@ -0,0 +1,171 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClInclude Include="grammar.h" />
<ClInclude Include="libconfig.h" />
<ClInclude Include="parsectx.h" />
<ClInclude Include="scanctx.h" />
<ClInclude Include="scanner.h" />
<ClInclude Include="strbuf.h" />
<ClInclude Include="wincompat.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="grammar.c" />
<ClCompile Include="libconfig.c" />
<ClCompile Include="scanctx.c" />
<ClCompile Include="scanner.c" />
<ClCompile Include="strbuf.c" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{F6CC5F60-BD13-41B1-81D3-822A45EC0DBD}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>libconfig</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir).vs\build\</OutDir>
<IntDir>$(SolutionDir).vs\build\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir).vs\build\</OutDir>
<IntDir>$(SolutionDir).vs\build\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir).vs\build\</OutDir>
<IntDir>$(SolutionDir).vs\build\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir).vs\build\</OutDir>
<IntDir>$(SolutionDir).vs\build\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>YY_USE_CONST;LIBCONFIG_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>YY_USE_CONST;LIBCONFIG_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>YY_USE_CONST;LIBCONFIG_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>YY_USE_CONST;LIBCONFIG_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="grammar.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="libconfig.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="parsectx.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="scanctx.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="scanner.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="strbuf.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wincompat.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="grammar.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="libconfig.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="scanctx.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="scanner.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="strbuf.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

158
3rdparty/mt19937ar/mt19937ar.vcxproj vendored Normal file
View File

@@ -0,0 +1,158 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClInclude Include="mt19937ar.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="mt19937ar.c" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{7AE31676-6137-4FB3-AE9C-AD47D8A861CF}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>mt19937ar</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir).vs\build\</OutDir>
<IntDir>$(SolutionDir).vs\build\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir).vs\build\</OutDir>
<IntDir>$(SolutionDir).vs\build\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir).vs\build\</OutDir>
<IntDir>$(SolutionDir).vs\build\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir).vs\build\</OutDir>
<IntDir>$(SolutionDir).vs\build\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>$(DefineConstants);WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>$(DefineConstants);WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>$(DefineConstants);WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>$(DefineConstants);WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="mt19937ar.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="mt19937ar.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

114
3rdparty/mysql/include/big_endian.h vendored Normal file
View File

@@ -0,0 +1,114 @@
/* Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#include <string.h>
/*
Data in big-endian format.
*/
static inline void float4store(uchar *T, float A)
{ *(T)= ((uchar *) &A)[3];
*((T)+1)=(char) ((uchar *) &A)[2];
*((T)+2)=(char) ((uchar *) &A)[1];
*((T)+3)=(char) ((uchar *) &A)[0]; }
static inline void float4get (float *V, const uchar *M)
{ float def_temp;
((uchar*) &def_temp)[0]=(M)[3];
((uchar*) &def_temp)[1]=(M)[2];
((uchar*) &def_temp)[2]=(M)[1];
((uchar*) &def_temp)[3]=(M)[0];
(*V)=def_temp; }
static inline void float8store(uchar *T, double V)
{ *(T)= ((uchar *) &V)[7];
*((T)+1)=(char) ((uchar *) &V)[6];
*((T)+2)=(char) ((uchar *) &V)[5];
*((T)+3)=(char) ((uchar *) &V)[4];
*((T)+4)=(char) ((uchar *) &V)[3];
*((T)+5)=(char) ((uchar *) &V)[2];
*((T)+6)=(char) ((uchar *) &V)[1];
*((T)+7)=(char) ((uchar *) &V)[0]; }
static inline void float8get (double *V, const uchar *M)
{ double def_temp;
((uchar*) &def_temp)[0]=(M)[7];
((uchar*) &def_temp)[1]=(M)[6];
((uchar*) &def_temp)[2]=(M)[5];
((uchar*) &def_temp)[3]=(M)[4];
((uchar*) &def_temp)[4]=(M)[3];
((uchar*) &def_temp)[5]=(M)[2];
((uchar*) &def_temp)[6]=(M)[1];
((uchar*) &def_temp)[7]=(M)[0];
(*V) = def_temp; }
static inline void ushortget(uint16 *V, const uchar *pM)
{ *V = (uint16) (((uint16) ((uchar) (pM)[1]))+
((uint16) ((uint16) (pM)[0]) << 8)); }
static inline void shortget (int16 *V, const uchar *pM)
{ *V = (short) (((short) ((uchar) (pM)[1]))+
((short) ((short) (pM)[0]) << 8)); }
static inline void longget (int32 *V, const uchar *pM)
{ int32 def_temp;
((uchar*) &def_temp)[0]=(pM)[0];
((uchar*) &def_temp)[1]=(pM)[1];
((uchar*) &def_temp)[2]=(pM)[2];
((uchar*) &def_temp)[3]=(pM)[3];
(*V)=def_temp; }
static inline void ulongget (uint32 *V, const uchar *pM)
{ uint32 def_temp;
((uchar*) &def_temp)[0]=(pM)[0];
((uchar*) &def_temp)[1]=(pM)[1];
((uchar*) &def_temp)[2]=(pM)[2];
((uchar*) &def_temp)[3]=(pM)[3];
(*V)=def_temp; }
static inline void shortstore(uchar *T, int16 A)
{ uint def_temp=(uint) (A) ;
*(((char*)T)+1)=(char)(def_temp);
*(((char*)T)+0)=(char)(def_temp >> 8); }
static inline void longstore (uchar *T, int32 A)
{ *(((char*)T)+3)=((A));
*(((char*)T)+2)=(((A) >> 8));
*(((char*)T)+1)=(((A) >> 16));
*(((char*)T)+0)=(((A) >> 24)); }
static inline void floatget(float *V, const uchar *M)
{
memcpy(V, (M), sizeof(float));
}
static inline void floatstore(uchar *T, float V)
{
memcpy((T), (&V), sizeof(float));
}
static inline void doubleget(double *V, const uchar *M)
{
memcpy(V, (M), sizeof(double));
}
static inline void doublestore(uchar *T, double V)
{
memcpy((T), &V, sizeof(double));
}
static inline void longlongget(longlong *V, const uchar *M)
{
memcpy(V, (M), sizeof(ulonglong));
}
static inline void longlongstore(uchar *T, longlong V)
{
memcpy((T), &V, sizeof(ulonglong));
}

View File

@@ -0,0 +1,70 @@
/* Copyright (c) 2014, 2015 Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/**
@file binary_log_types.h
@brief This file contains the field type.
@note This file can be imported both from C and C++ code, so the
definitions have to be constructed to support this.
*/
#ifndef BINARY_LOG_TYPES_INCLUDED
#define BINARY_LOG_TYPES_INCLUDED
#ifdef __cplusplus
extern "C"
{
#endif
/*
* Constants exported from this package.
*/
typedef enum enum_field_types {
MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG,
MYSQL_TYPE_FLOAT, MYSQL_TYPE_DOUBLE,
MYSQL_TYPE_NULL, MYSQL_TYPE_TIMESTAMP,
MYSQL_TYPE_LONGLONG,MYSQL_TYPE_INT24,
MYSQL_TYPE_DATE, MYSQL_TYPE_TIME,
MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR,
MYSQL_TYPE_NEWDATE, MYSQL_TYPE_VARCHAR,
MYSQL_TYPE_BIT,
MYSQL_TYPE_TIMESTAMP2,
MYSQL_TYPE_DATETIME2,
MYSQL_TYPE_TIME2,
MYSQL_TYPE_JSON=245,
MYSQL_TYPE_NEWDECIMAL=246,
MYSQL_TYPE_ENUM=247,
MYSQL_TYPE_SET=248,
MYSQL_TYPE_TINY_BLOB=249,
MYSQL_TYPE_MEDIUM_BLOB=250,
MYSQL_TYPE_LONG_BLOB=251,
MYSQL_TYPE_BLOB=252,
MYSQL_TYPE_VAR_STRING=253,
MYSQL_TYPE_STRING=254,
MYSQL_TYPE_GEOMETRY=255
} enum_field_types;
#define DATETIME_MAX_DECIMALS 6
#ifdef __cplusplus
}
#endif // __cplusplus
#endif /* BINARY_LOG_TYPES_INCLUDED */

View File

@@ -0,0 +1,97 @@
/* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/*
Endianness-independent definitions for architectures other
than the x86 architecture.
*/
static inline int16 sint2korr(const uchar *A)
{
return
(int16) (((int16) (A[0])) +
((int16) (A[1]) << 8))
;
}
static inline int32 sint4korr(const uchar *A)
{
return
(int32) (((int32) (A[0])) +
(((int32) (A[1]) << 8)) +
(((int32) (A[2]) << 16)) +
(((int32) (A[3]) << 24)))
;
}
static inline uint16 uint2korr(const uchar *A)
{
return
(uint16) (((uint16) (A[0])) +
((uint16) (A[1]) << 8))
;
}
static inline uint32 uint4korr(const uchar *A)
{
return
(uint32) (((uint32) (A[0])) +
(((uint32) (A[1])) << 8) +
(((uint32) (A[2])) << 16) +
(((uint32) (A[3])) << 24))
;
}
static inline ulonglong uint8korr(const uchar *A)
{
return
((ulonglong)(((uint32) (A[0])) +
(((uint32) (A[1])) << 8) +
(((uint32) (A[2])) << 16) +
(((uint32) (A[3])) << 24)) +
(((ulonglong) (((uint32) (A[4])) +
(((uint32) (A[5])) << 8) +
(((uint32) (A[6])) << 16) +
(((uint32) (A[7])) << 24))) <<
32))
;
}
static inline longlong sint8korr(const uchar *A)
{
return (longlong) uint8korr(A);
}
static inline void int2store(uchar *T, uint16 A)
{
uint def_temp= A ;
*(T)= (uchar)(def_temp);
*(T+1)= (uchar)(def_temp >> 8);
}
static inline void int4store(uchar *T, uint32 A)
{
*(T)= (uchar) (A);
*(T+1)=(uchar) (A >> 8);
*(T+2)=(uchar) (A >> 16);
*(T+3)=(uchar) (A >> 24);
}
static inline void int8store(uchar *T, ulonglong A)
{
uint def_temp= (uint) A,
def_temp2= (uint) (A >> 32);
int4store(T, def_temp);
int4store(T+4,def_temp2);
}

View File

@@ -0,0 +1,56 @@
/* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/*
Optimized functions for the x86 architecture (_WIN32 included).
x86 handles misaligned reads and writes just fine, so suppress
UBSAN warnings for these functions.
*/
static inline int16 sint2korr(const uchar *A) SUPPRESS_UBSAN;
static inline int16 sint2korr(const uchar *A) { return *((int16*) A); }
static inline int32 sint4korr(const uchar *A) SUPPRESS_UBSAN;
static inline int32 sint4korr(const uchar *A) { return *((int32*) A); }
static inline uint16 uint2korr(const uchar *A) SUPPRESS_UBSAN;
static inline uint16 uint2korr(const uchar *A) { return *((uint16*) A); }
static inline uint32 uint4korr(const uchar *A) SUPPRESS_UBSAN;
static inline uint32 uint4korr(const uchar *A) { return *((uint32*) A); }
static inline ulonglong uint8korr(const uchar *A) SUPPRESS_UBSAN;
static inline ulonglong uint8korr(const uchar *A) { return *((ulonglong*) A);}
static inline longlong sint8korr(const uchar *A) SUPPRESS_UBSAN;
static inline longlong sint8korr(const uchar *A) { return *((longlong*) A); }
static inline void int2store(uchar *T, uint16 A) SUPPRESS_UBSAN;
static inline void int2store(uchar *T, uint16 A)
{
*((uint16*) T)= A;
}
static inline void int4store(uchar *T, uint32 A) SUPPRESS_UBSAN;
static inline void int4store(uchar *T, uint32 A)
{
*((uint32*) T)= A;
}
static inline void int8store(uchar *T, ulonglong A) SUPPRESS_UBSAN;
static inline void int8store(uchar *T, ulonglong A)
{
*((ulonglong*) T)= A;
}

View File

@@ -1,470 +0,0 @@
/* Copyright (C) 2000 MySQL AB
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; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; 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 */
/* Defines for Win32 to make it compatible for MySQL */
#ifdef __WIN2000__
/* We have to do this define before including windows.h to get the AWE API
functions */
#define _WIN32_WINNT 0x0500
#endif
#if defined(_MSC_VER) && _MSC_VER >= 1400
/* Avoid endless warnings about sprintf() etc. being unsafe. */
#define _CRT_SECURE_NO_DEPRECATE 1
#endif
#include <sys/locking.h>
#include <windows.h>
#include <math.h> /* Because of rint() */
#include <fcntl.h>
#include <io.h>
#include <malloc.h>
#define HAVE_SMEM 1
#if defined(_WIN64) || defined(WIN64)
#define SYSTEM_TYPE "Win64"
#elif defined(_WIN32) || defined(WIN32)
#define SYSTEM_TYPE "Win32"
#else
#define SYSTEM_TYPE "Windows"
#endif
#if defined(_M_IA64)
#define MACHINE_TYPE "ia64"
#elif defined(_M_IX86)
#define MACHINE_TYPE "ia32"
#elif defined(_M_ALPHA)
#define MACHINE_TYPE "axp"
#else
#define MACHINE_TYPE "unknown" /* Define to machine type name */
#endif
#if !(defined(_WIN64) || defined(WIN64))
#ifndef _WIN32
#define _WIN32 /* Compatible with old source */
#endif
#ifndef __WIN32__
#define __WIN32__
#endif
#endif /* _WIN64 */
#ifndef __WIN__
#define __WIN__ /* To make it easier in VC++ */
#endif
#ifndef MAX_INDEXES
#define MAX_INDEXES 64
#endif
/* File and lock constants */
#define O_SHARE 0x1000 /* Open file in sharing mode */
#ifdef __BORLANDC__
#define F_RDLCK LK_NBLCK /* read lock */
#define F_WRLCK LK_NBRLCK /* write lock */
#define F_UNLCK LK_UNLCK /* remove lock(s) */
#else
#define F_RDLCK _LK_NBLCK /* read lock */
#define F_WRLCK _LK_NBRLCK /* write lock */
#define F_UNLCK _LK_UNLCK /* remove lock(s) */
#endif
#define F_EXCLUSIVE 1 /* We have only exclusive locking */
#define F_TO_EOF (INT_MAX32/2) /* size for lock of all file */
#define F_OK 0 /* parameter to access() */
#define W_OK 2
#define S_IROTH S_IREAD /* for my_lib */
#ifdef __BORLANDC__
#define FILE_BINARY O_BINARY /* my_fopen in binary mode */
#define O_TEMPORARY 0
#define O_SHORT_LIVED 0
#define SH_DENYNO _SH_DENYNO
#else
#define O_BINARY _O_BINARY /* compability with MSDOS */
#define FILE_BINARY _O_BINARY /* my_fopen in binary mode */
#define O_TEMPORARY _O_TEMPORARY
#define O_SHORT_LIVED _O_SHORT_LIVED
#define SH_DENYNO _SH_DENYNO
#endif
#define NO_OPEN_3 /* For my_create() */
#define SIGQUIT SIGTERM /* No SIGQUIT */
#undef _REENTRANT /* Crashes something for win32 */
#undef SAFE_MUTEX /* Can't be used on windows */
#if defined(_MSC_VER) && _MSC_VER >= 1310
#define LL(A) A##ll
#define ULL(A) A##ull
#else
#define LL(A) ((__int64) A)
#define ULL(A) ((unsigned __int64) A)
#endif
#define LONGLONG_MIN LL(0x8000000000000000)
#define LONGLONG_MAX LL(0x7FFFFFFFFFFFFFFF)
#define ULONGLONG_MAX ULL(0xFFFFFFFFFFFFFFFF)
/* Type information */
#if defined(__EMX__) || !defined(HAVE_UINT)
#undef HAVE_UINT
#define HAVE_UINT
typedef unsigned short ushort;
typedef unsigned int uint;
#endif /* defined(__EMX__) || !defined(HAVE_UINT) */
typedef unsigned __int64 ulonglong; /* Microsofts 64 bit types */
typedef __int64 longlong;
#ifndef HAVE_SIGSET_T
typedef int sigset_t;
#endif
#define longlong_defined
/*
off_t should not be __int64 because of conflicts in header files;
Use my_off_t or os_off_t instead
*/
#ifndef HAVE_OFF_T
typedef long off_t;
#endif
typedef __int64 os_off_t;
#ifdef _WIN64
typedef UINT_PTR rf_SetTimer;
#else
#ifndef HAVE_SIZE_T
typedef unsigned int size_t;
#endif
typedef uint rf_SetTimer;
#endif
#define Socket_defined
#define my_socket SOCKET
#define bool BOOL
#define SIGPIPE SIGINT
#define RETQSORTTYPE void
#define QSORT_TYPE_IS_VOID
#define RETSIGTYPE void
#define SOCKET_SIZE_TYPE int
#define my_socket_defined
#define bool_defined
#define byte_defined
#define HUGE_PTR
#define STDCALL __stdcall /* Used by libmysql.dll */
#define isnan(X) _isnan(X)
#define finite(X) _finite(X)
#ifndef UNDEF_THREAD_HACK
#define THREAD
#endif
#define VOID_SIGHANDLER
#define SIZEOF_CHAR 1
#define SIZEOF_LONG 4
#define SIZEOF_LONG_LONG 8
#define SIZEOF_OFF_T 8
#ifdef _WIN64
#define SIZEOF_CHARP 8
#else
#define SIZEOF_CHARP 4
#endif
#define HAVE_BROKEN_NETINET_INCLUDES
#ifdef __NT__
#define HAVE_NAMED_PIPE /* We can only create pipes on NT */
#endif
/* ERROR is defined in wingdi.h */
#undef ERROR
/* We need to close files to break connections on shutdown */
#ifndef SIGNAL_WITH_VIO_CLOSE
#define SIGNAL_WITH_VIO_CLOSE
#endif
/* Use all character sets in MySQL */
#define USE_MB 1
#define USE_MB_IDENT 1
#define USE_STRCOLL 1
/* All windows servers should support .sym files */
#undef USE_SYMDIR
#define USE_SYMDIR
/* If LOAD DATA LOCAL INFILE should be enabled by default */
#define ENABLED_LOCAL_INFILE 1
/* Convert some simple functions to Posix */
#define my_sigset(A,B) signal((A),(B))
#define finite(A) _finite(A)
#define sleep(A) Sleep((A)*1000)
#define popen(A,B) _popen((A),(B))
#define pclose(A) _pclose(A)
#ifndef __BORLANDC__
#define access(A,B) _access(A,B)
#endif
#if !defined(__cplusplus)
#define inline __inline
#endif /* __cplusplus */
inline double rint(double nr)
{
double f = floor(nr);
double c = ceil(nr);
return (((c-nr) >= (nr-f)) ? f :c);
}
#ifdef _WIN64
#define ulonglong2double(A) ((double) (ulonglong) (A))
#define my_off_t2double(A) ((double) (my_off_t) (A))
#else
inline double ulonglong2double(ulonglong value)
{
longlong nr=(longlong) value;
if (nr >= 0)
return (double) nr;
return (18446744073709551616.0 + (double) nr);
}
#define my_off_t2double(A) ulonglong2double(A)
#endif /* _WIN64 */
#if SIZEOF_OFF_T > 4
#define lseek(A,B,C) _lseeki64((A),(longlong) (B),(C))
#define tell(A) _telli64(A)
#endif
#define set_timespec(ABSTIME,SEC) { (ABSTIME).tv_sec=time((time_t*)0) + (time_t) (SEC); (ABSTIME).tv_nsec=0; }
#define STACK_DIRECTION -1
/* Optimized store functions for Intel x86 */
#ifndef _WIN64
#define sint2korr(A) (*((int16 *) (A)))
#define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \
(((uint32) 255L << 24) | \
(((uint32) (uchar) (A)[2]) << 16) |\
(((uint32) (uchar) (A)[1]) << 8) | \
((uint32) (uchar) (A)[0])) : \
(((uint32) (uchar) (A)[2]) << 16) |\
(((uint32) (uchar) (A)[1]) << 8) | \
((uint32) (uchar) (A)[0])))
#define sint4korr(A) (*((long *) (A)))
#define uint2korr(A) (*((uint16 *) (A)))
/*
ATTENTION !
Please, note, uint3korr reads 4 bytes (not 3) !
It means, that you have to provide enough allocated space !
*/
#define uint3korr(A) (long) (*((unsigned int *) (A)) & 0xFFFFFF)
#define uint4korr(A) (*((unsigned long *) (A)))
#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\
(((uint32) ((uchar) (A)[1])) << 8) +\
(((uint32) ((uchar) (A)[2])) << 16) +\
(((uint32) ((uchar) (A)[3])) << 24)) +\
(((ulonglong) ((uchar) (A)[4])) << 32))
#define uint8korr(A) (*((ulonglong *) (A)))
#define sint8korr(A) (*((longlong *) (A)))
#define int2store(T,A) *((uint16*) (T))= (uint16) (A)
#define int3store(T,A) { *(T)= (uchar) ((A));\
*(T+1)=(uchar) (((uint) (A) >> 8));\
*(T+2)=(uchar) (((A) >> 16)); }
#define int4store(T,A) *((long *) (T))= (long) (A)
#define int5store(T,A) { *(T)= (uchar)((A));\
*((T)+1)=(uchar) (((A) >> 8));\
*((T)+2)=(uchar) (((A) >> 16));\
*((T)+3)=(uchar) (((A) >> 24)); \
*((T)+4)=(uchar) (((A) >> 32)); }
#define int8store(T,A) *((ulonglong *) (T))= (ulonglong) (A)
#define doubleget(V,M) do { *((long *) &V) = *((long*) M); \
*(((long *) &V)+1) = *(((long*) M)+1); } while(0)
#define doublestore(T,V) do { *((long *) T) = *((long*) &V); \
*(((long *) T)+1) = *(((long*) &V)+1); } while(0)
#define float4get(V,M) { *((long *) &(V)) = *((long*) (M)); }
#define floatstore(T,V) memcpy((byte*)(T), (byte*)(&V), sizeof(float))
#define floatget(V,M) memcpy((byte*)(&V), (byte*)(M), sizeof(float))
#define float8get(V,M) doubleget((V),(M))
#define float4store(V,M) memcpy((byte*) V,(byte*) (&M),sizeof(float))
#define float8store(V,M) doublestore((V),(M))
#endif /* _WIN64 */
#define HAVE_PERROR
#define HAVE_VFPRINT
#define HAVE_RENAME /* Have rename() as function */
#define HAVE_BINARY_STREAMS /* Have "b" flag in streams */
#define HAVE_LONG_JMP /* Have long jump function */
#define HAVE_LOCKING /* have locking() call */
#define HAVE_ERRNO_AS_DEFINE /* errno is a define */
#define HAVE_STDLIB /* everything is include in this file */
#define HAVE_MEMCPY
#define HAVE_MEMMOVE
#define HAVE_GETCWD
#define HAVE_TELL
#define HAVE_TZNAME
#define HAVE_PUTENV
#define HAVE_SELECT
#define HAVE_SETLOCALE
#define HAVE_SOCKET /* Giangi */
#define HAVE_FLOAT_H
#define HAVE_LIMITS_H
#define HAVE_STDDEF_H
#define HAVE_RINT /* defined in this file */
#define NO_FCNTL_NONBLOCK /* No FCNTL */
#define HAVE_ALLOCA
#define HAVE_STRPBRK
#define HAVE_STRSTR
#define HAVE_COMPRESS
#define HAVE_CREATESEMAPHORE
#define HAVE_ISNAN
#define HAVE_FINITE
#define HAVE_QUERY_CACHE
#define SPRINTF_RETURNS_INT
#define HAVE_SETFILEPOINTER
#define HAVE_VIO_READ_BUFF
#define HAVE_STRNLEN
#ifndef __NT__
#undef FILE_SHARE_DELETE
#define FILE_SHARE_DELETE 0 /* Not implemented on Win 98/ME */
#endif
#ifdef NOT_USED
#define HAVE_SNPRINTF /* Gave link error */
#define _snprintf snprintf
#endif
#ifdef _MSC_VER
#define HAVE_LDIV /* The optimizer breaks in zortech for ldiv */
#define HAVE_ANSI_INCLUDE
#define HAVE_SYS_UTIME_H
#define HAVE_STRTOUL
#endif
#define my_reinterpret_cast(A) reinterpret_cast <A>
#define my_const_cast(A) const_cast<A>
/* MYSQL OPTIONS */
#ifdef _CUSTOMCONFIG_
#include <custom_conf.h>
#else
#define DEFAULT_MYSQL_HOME "c:\\mysql"
#define PACKAGE "mysql"
#define DEFAULT_BASEDIR "C:\\"
#define SHAREDIR "share"
#define DEFAULT_CHARSET_HOME "C:/mysql/"
#endif
#ifndef DEFAULT_HOME_ENV
#define DEFAULT_HOME_ENV MYSQL_HOME
#endif
#ifndef DEFAULT_GROUP_SUFFIX_ENV
#define DEFAULT_GROUP_SUFFIX_ENV MYSQL_GROUP_SUFFIX
#endif
/* File name handling */
#define FN_LIBCHAR '\\'
#define FN_ROOTDIR "\\"
#define FN_NETWORK_DRIVES /* Uses \\ to indicate network drives */
#define FN_NO_CASE_SENCE /* Files are not case-sensitive */
#define OS_FILE_LIMIT 2048
#define DO_NOT_REMOVE_THREAD_WRAPPERS
#define thread_safe_increment(V,L) InterlockedIncrement((long*) &(V))
#define thread_safe_decrement(V,L) InterlockedDecrement((long*) &(V))
/* The following is only used for statistics, so it should be good enough */
#ifdef __NT__ /* This should also work on Win98 but .. */
#define thread_safe_add(V,C,L) InterlockedExchangeAdd((long*) &(V),(C))
#define thread_safe_sub(V,C,L) InterlockedExchangeAdd((long*) &(V),-(long) (C))
#define statistic_add(V,C,L) thread_safe_add((V),(C),(L))
#else
#define thread_safe_add(V,C,L) \
pthread_mutex_lock((L)); (V)+=(C); pthread_mutex_unlock((L));
#define thread_safe_sub(V,C,L) \
pthread_mutex_lock((L)); (V)-=(C); pthread_mutex_unlock((L));
#define statistic_add(V,C,L) (V)+=(C)
#endif
#define statistic_increment(V,L) thread_safe_increment((V),(L))
#define statistic_decrement(V,L) thread_safe_decrement((V),(L))
#define shared_memory_buffer_length 16000
#define default_shared_memory_base_name "MYSQL"
#ifdef CYBOZU
#define MYSQL_DEFAULT_CHARSET_NAME "utf8"
#define MYSQL_DEFAULT_COLLATION_NAME "utf8_general_cs"
#define HAVE_UTF8_GENERAL_CS 1
#else
#define MYSQL_DEFAULT_CHARSET_NAME "latin1"
#define MYSQL_DEFAULT_COLLATION_NAME "latin1_swedish_ci"
#endif
#define HAVE_SPATIAL 1
#define HAVE_RTREE_KEYS 1
#define HAVE_OPENSSL 1
#define HAVE_YASSL 1
/* Define charsets you want */
/* #undef HAVE_CHARSET_armscii8 */
/* #undef HAVE_CHARSET_ascii */
#ifndef CYBOZU
#define HAVE_CHARSET_big5 1
#define HAVE_CHARSET_cp1250 1
#endif
/* #undef HAVE_CHARSET_cp1251 */
/* #undef HAVE_CHARSET_cp1256 */
/* #undef HAVE_CHARSET_cp1257 */
/* #undef HAVE_CHARSET_cp850 */
/* #undef HAVE_CHARSET_cp852 */
/* #undef HAVE_CHARSET_cp866 */
#define HAVE_CHARSET_cp932 1
/* #undef HAVE_CHARSET_dec8 */
#ifndef CYBOZU
#define HAVE_CHARSET_eucjpms 1
#define HAVE_CHARSET_euckr 1
#define HAVE_CHARSET_gb2312 1
#define HAVE_CHARSET_gbk 1
#endif
/* #undef HAVE_CHARSET_greek */
/* #undef HAVE_CHARSET_hebrew */
/* #undef HAVE_CHARSET_hp8 */
/* #undef HAVE_CHARSET_keybcs2 */
/* #undef HAVE_CHARSET_koi8r */
/* #undef HAVE_CHARSET_koi8u */
#ifndef CYBOZU
#define HAVE_CHARSET_latin1 1
#define HAVE_CHARSET_latin2 1
#endif
/* #undef HAVE_CHARSET_latin5 */
/* #undef HAVE_CHARSET_latin7 */
/* #undef HAVE_CHARSET_macce */
/* #undef HAVE_CHARSET_macroman */
#define HAVE_CHARSET_sjis 1
/* #undef HAVE_CHARSET_swe7 */
#ifndef CYBOZU
#define HAVE_CHARSET_tis620 1
#define HAVE_CHARSET_ucs2 1
#define HAVE_CHARSET_ujis 1
#endif
#define HAVE_CHARSET_utf8 1
#define HAVE_UCA_COLLATIONS 1

137
3rdparty/mysql/include/decimal.h vendored Normal file
View File

@@ -0,0 +1,137 @@
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifndef DECIMAL_INCLUDED
#define DECIMAL_INCLUDED
typedef enum
{TRUNCATE=0, HALF_EVEN, HALF_UP, CEILING, FLOOR}
decimal_round_mode;
typedef int32 decimal_digit_t;
/**
intg is the number of *decimal* digits (NOT number of decimal_digit_t's !)
before the point
frac is the number of decimal digits after the point
len is the length of buf (length of allocated space) in decimal_digit_t's,
not in bytes
sign false means positive, true means negative
buf is an array of decimal_digit_t's
*/
typedef struct st_decimal_t {
int intg, frac, len;
my_bool sign;
decimal_digit_t *buf;
} decimal_t;
#ifndef MYSQL_ABI_CHECK
int internal_str2dec(const char *from, decimal_t *to, char **end,
my_bool fixed);
int decimal2string(const decimal_t *from, char *to, int *to_len,
int fixed_precision, int fixed_decimals,
char filler);
int decimal2ulonglong(decimal_t *from, ulonglong *to);
int ulonglong2decimal(ulonglong from, decimal_t *to);
int decimal2longlong(decimal_t *from, longlong *to);
int longlong2decimal(longlong from, decimal_t *to);
int decimal2double(const decimal_t *from, double *to);
int double2decimal(double from, decimal_t *to);
int decimal_actual_fraction(decimal_t *from);
int decimal2bin(decimal_t *from, uchar *to, int precision, int scale);
int bin2decimal(const uchar *from, decimal_t *to, int precision, int scale);
/**
Convert decimal to lldiv_t.
The integer part is stored in to->quot.
The fractional part is multiplied to 10^9 and stored to to->rem.
@param from Decimal value
@param to lldiv_t value
@retval 0 on success
@retval !0 in error
*/
int decimal2lldiv_t(const decimal_t *from, lldiv_t *to);
/**
Convert doube to lldiv_t.
The integer part is stored in to->quot.
The fractional part is multiplied to 10^9 and stored to to->rem.
@param from Decimal value
@param to lldiv_t value
@retval 0 on success
@retval !0 in error
*/
int double2lldiv_t(double from, lldiv_t *to);
int decimal_size(int precision, int scale);
int decimal_bin_size(int precision, int scale);
int decimal_result_size(decimal_t *from1, decimal_t *from2, char op,
int param);
int decimal_intg(const decimal_t *from);
int decimal_add(const decimal_t *from1, const decimal_t *from2, decimal_t *to);
int decimal_sub(const decimal_t *from1, const decimal_t *from2, decimal_t *to);
int decimal_cmp(const decimal_t *from1, const decimal_t *from2);
int decimal_mul(const decimal_t *from1, const decimal_t *from2, decimal_t *to);
int decimal_div(const decimal_t *from1, const decimal_t *from2, decimal_t *to,
int scale_incr);
int decimal_mod(const decimal_t *from1, const decimal_t *from2, decimal_t *to);
int decimal_round(const decimal_t *from, decimal_t *to, int new_scale,
decimal_round_mode mode);
int decimal_is_zero(const decimal_t *from);
void max_decimal(int precision, int frac, decimal_t *to);
#define string2decimal(A,B,C) internal_str2dec((A), (B), (C), 0)
#define string2decimal_fixed(A,B,C) internal_str2dec((A), (B), (C), 1)
/* set a decimal_t to zero */
#define decimal_make_zero(dec) do { \
(dec)->buf[0]=0; \
(dec)->intg=1; \
(dec)->frac=0; \
(dec)->sign=0; \
} while(0)
/*
returns the length of the buffer to hold string representation
of the decimal (including decimal dot, possible sign and \0)
*/
#define decimal_string_size(dec) (((dec)->intg ? (dec)->intg : 1) + \
(dec)->frac + ((dec)->frac > 0) + 2)
/*
conventions:
decimal_smth() == 0 -- everything's ok
decimal_smth() <= 1 -- result is usable, but precision loss is possible
decimal_smth() <= 2 -- result can be unusable, most significant digits
could've been lost
decimal_smth() > 2 -- no result was generated
*/
#define E_DEC_OK 0
#define E_DEC_TRUNCATED 1
#define E_DEC_OVERFLOW 2
#define E_DEC_DIV_ZERO 4
#define E_DEC_BAD_NUM 8
#define E_DEC_OOM 16
#define E_DEC_ERROR 31
#define E_DEC_FATAL_ERROR 30
#endif // !MYSQL_ABI_CHECK
#endif

113
3rdparty/mysql/include/errmsg.h vendored Normal file
View File

@@ -0,0 +1,113 @@
#ifndef ERRMSG_INCLUDED
#define ERRMSG_INCLUDED
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/* Error messages for MySQL clients */
/* (Error messages for the daemon are in sql/share/errmsg.txt) */
#ifdef __cplusplus
extern "C" {
#endif
void init_client_errs(void);
void finish_client_errs(void);
extern const char *client_errors[]; /* Error messages */
#ifdef __cplusplus
}
#endif
#define CR_MIN_ERROR 2000 /* For easier client code */
#define CR_MAX_ERROR 2999
#if !defined(ER)
#define ER(X) (((X) >= CR_ERROR_FIRST && (X) <= CR_ERROR_LAST)? \
client_errors[(X)-CR_ERROR_FIRST]: client_errors[CR_UNKNOWN_ERROR])
#endif
#define CLIENT_ERRMAP 2 /* Errormap used by my_error() */
/* Do not add error numbers before CR_ERROR_FIRST. */
/* If necessary to add lower numbers, change CR_ERROR_FIRST accordingly. */
#define CR_ERROR_FIRST 2000 /*Copy first error nr.*/
#define CR_UNKNOWN_ERROR 2000
#define CR_SOCKET_CREATE_ERROR 2001
#define CR_CONNECTION_ERROR 2002
#define CR_CONN_HOST_ERROR 2003
#define CR_IPSOCK_ERROR 2004
#define CR_UNKNOWN_HOST 2005
#define CR_SERVER_GONE_ERROR 2006
#define CR_VERSION_ERROR 2007
#define CR_OUT_OF_MEMORY 2008
#define CR_WRONG_HOST_INFO 2009
#define CR_LOCALHOST_CONNECTION 2010
#define CR_TCP_CONNECTION 2011
#define CR_SERVER_HANDSHAKE_ERR 2012
#define CR_SERVER_LOST 2013
#define CR_COMMANDS_OUT_OF_SYNC 2014
#define CR_NAMEDPIPE_CONNECTION 2015
#define CR_NAMEDPIPEWAIT_ERROR 2016
#define CR_NAMEDPIPEOPEN_ERROR 2017
#define CR_NAMEDPIPESETSTATE_ERROR 2018
#define CR_CANT_READ_CHARSET 2019
#define CR_NET_PACKET_TOO_LARGE 2020
#define CR_EMBEDDED_CONNECTION 2021
#define CR_PROBE_SLAVE_STATUS 2022
#define CR_PROBE_SLAVE_HOSTS 2023
#define CR_PROBE_SLAVE_CONNECT 2024
#define CR_PROBE_MASTER_CONNECT 2025
#define CR_SSL_CONNECTION_ERROR 2026
#define CR_MALFORMED_PACKET 2027
#define CR_WRONG_LICENSE 2028
/* new 4.1 error codes */
#define CR_NULL_POINTER 2029
#define CR_NO_PREPARE_STMT 2030
#define CR_PARAMS_NOT_BOUND 2031
#define CR_DATA_TRUNCATED 2032
#define CR_NO_PARAMETERS_EXISTS 2033
#define CR_INVALID_PARAMETER_NO 2034
#define CR_INVALID_BUFFER_USE 2035
#define CR_UNSUPPORTED_PARAM_TYPE 2036
#define CR_SHARED_MEMORY_CONNECTION 2037
#define CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR 2038
#define CR_SHARED_MEMORY_CONNECT_ANSWER_ERROR 2039
#define CR_SHARED_MEMORY_CONNECT_FILE_MAP_ERROR 2040
#define CR_SHARED_MEMORY_CONNECT_MAP_ERROR 2041
#define CR_SHARED_MEMORY_FILE_MAP_ERROR 2042
#define CR_SHARED_MEMORY_MAP_ERROR 2043
#define CR_SHARED_MEMORY_EVENT_ERROR 2044
#define CR_SHARED_MEMORY_CONNECT_ABANDONED_ERROR 2045
#define CR_SHARED_MEMORY_CONNECT_SET_ERROR 2046
#define CR_CONN_UNKNOW_PROTOCOL 2047
#define CR_INVALID_CONN_HANDLE 2048
#define CR_UNUSED_1 2049
#define CR_FETCH_CANCELED 2050
#define CR_NO_DATA 2051
#define CR_NO_STMT_METADATA 2052
#define CR_NO_RESULT_SET 2053
#define CR_NOT_IMPLEMENTED 2054
#define CR_SERVER_LOST_EXTENDED 2055
#define CR_STMT_CLOSED 2056
#define CR_NEW_STMT_METADATA 2057
#define CR_ALREADY_CONNECTED 2058
#define CR_AUTH_PLUGIN_CANNOT_LOAD 2059
#define CR_DUPLICATE_CONNECTION_ATTR 2060
#define CR_AUTH_PLUGIN_ERR 2061
#define CR_INSECURE_API_ERR 2062
#define CR_ERROR_LAST /*Copy last error nr:*/ 2062
/* Add error numbers before CR_ERROR_LAST and change it accordingly. */
#endif /* ERRMSG_INCLUDED */

156
3rdparty/mysql/include/keycache.h vendored Normal file
View File

@@ -0,0 +1,156 @@
/* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/* Key cache variable structures */
#ifndef _keycache_h
#define _keycache_h
#include "my_sys.h" /* flush_type */
C_MODE_START
/* declare structures that is used by st_key_cache */
struct st_block_link;
typedef struct st_block_link BLOCK_LINK;
struct st_hash_link;
typedef struct st_hash_link HASH_LINK;
/* Thread specific variables */
typedef struct st_keycache_thread_var
{
mysql_cond_t suspend;
struct st_keycache_thread_var *next,**prev;
void *opt_info;
} st_keycache_thread_var;
/* info about requests in a waiting queue */
typedef struct st_keycache_wqueue
{
st_keycache_thread_var *last_thread; /* circular list of waiting threads */
} KEYCACHE_WQUEUE;
#define CHANGED_BLOCKS_HASH 128 /* must be power of 2 */
/*
The key cache structure
It also contains read-only statistics parameters.
*/
typedef struct st_key_cache
{
my_bool key_cache_inited;
my_bool in_resize; /* true during resize operation */
my_bool resize_in_flush; /* true during flush of resize operation */
my_bool can_be_used; /* usage of cache for read/write is allowed */
size_t key_cache_mem_size; /* specified size of the cache memory */
uint key_cache_block_size; /* size of the page buffer of a cache block */
ulonglong min_warm_blocks; /* min number of warm blocks; */
ulonglong age_threshold; /* age threshold for hot blocks */
ulonglong keycache_time; /* total number of block link operations */
uint hash_entries; /* max number of entries in the hash table */
int hash_links; /* max number of hash links */
int hash_links_used; /* number of hash links currently used */
int disk_blocks; /* max number of blocks in the cache */
ulong blocks_used; /* maximum number of concurrently used blocks */
ulong blocks_unused; /* number of currently unused blocks */
ulong blocks_changed; /* number of currently dirty blocks */
ulong warm_blocks; /* number of blocks in warm sub-chain */
ulong cnt_for_resize_op; /* counter to block resize operation */
long blocks_available; /* number of blocks available in the LRU chain */
HASH_LINK **hash_root; /* arr. of entries into hash table buckets */
HASH_LINK *hash_link_root; /* memory for hash table links */
HASH_LINK *free_hash_list; /* list of free hash links */
BLOCK_LINK *free_block_list; /* list of free blocks */
BLOCK_LINK *block_root; /* memory for block links */
uchar *block_mem; /* memory for block buffers */
BLOCK_LINK *used_last; /* ptr to the last block of the LRU chain */
BLOCK_LINK *used_ins; /* ptr to the insertion block in LRU chain */
mysql_mutex_t cache_lock; /* to lock access to the cache structure */
KEYCACHE_WQUEUE resize_queue; /* threads waiting during resize operation */
/*
Waiting for a zero resize count. Using a queue for symmetry though
only one thread can wait here.
*/
KEYCACHE_WQUEUE waiting_for_resize_cnt;
KEYCACHE_WQUEUE waiting_for_hash_link; /* waiting for a free hash link */
KEYCACHE_WQUEUE waiting_for_block; /* requests waiting for a free block */
BLOCK_LINK *changed_blocks[CHANGED_BLOCKS_HASH]; /* hash for dirty file bl.*/
BLOCK_LINK *file_blocks[CHANGED_BLOCKS_HASH]; /* hash for other file bl.*/
/*
The following variables are and variables used to hold parameters for
initializing the key cache.
*/
ulonglong param_buff_size; /* size the memory allocated for the cache */
ulonglong param_block_size; /* size of the blocks in the key cache */
ulonglong param_division_limit; /* min. percentage of warm blocks */
ulonglong param_age_threshold; /* determines when hot block is downgraded */
/* Statistics variables. These are reset in reset_key_cache_counters(). */
ulong global_blocks_changed; /* number of currently dirty blocks */
ulonglong global_cache_w_requests;/* number of write requests (write hits) */
ulonglong global_cache_write; /* number of writes from cache to files */
ulonglong global_cache_r_requests;/* number of read requests (read hits) */
ulonglong global_cache_read; /* number of reads from files to cache */
int blocks; /* max number of blocks in the cache */
my_bool in_init; /* Set to 1 in MySQL during init/resize */
} KEY_CACHE;
/* The default key cache */
extern KEY_CACHE dflt_key_cache_var, *dflt_key_cache;
extern int init_key_cache(KEY_CACHE *keycache, ulonglong key_cache_block_size,
size_t use_mem, ulonglong division_limit,
ulonglong age_threshold);
extern int resize_key_cache(KEY_CACHE *keycache,
st_keycache_thread_var *thread_var,
ulonglong key_cache_block_size,
size_t use_mem, ulonglong division_limit,
ulonglong age_threshold);
extern uchar *key_cache_read(KEY_CACHE *keycache,
st_keycache_thread_var *thread_var,
File file, my_off_t filepos, int level,
uchar *buff, uint length,
uint block_length,int return_buffer);
extern int key_cache_insert(KEY_CACHE *keycache,
st_keycache_thread_var *thread_var,
File file, my_off_t filepos, int level,
uchar *buff, uint length);
extern int key_cache_write(KEY_CACHE *keycache,
st_keycache_thread_var *thread_var,
File file, my_off_t filepos, int level,
uchar *buff, uint length,
uint block_length,int force_write);
extern int flush_key_blocks(KEY_CACHE *keycache,
st_keycache_thread_var *thread_var,
int file, enum flush_type type);
extern void end_key_cache(KEY_CACHE *keycache, my_bool cleanup);
/* Functions to handle multiple key caches */
extern my_bool multi_keycache_init(void);
extern void multi_keycache_free(void);
extern KEY_CACHE *multi_key_cache_search(uchar *key, uint length);
extern my_bool multi_key_cache_set(const uchar *key, uint length,
KEY_CACHE *key_cache);
extern void multi_key_cache_change(KEY_CACHE *old_data,
KEY_CACHE *new_data);
extern int reset_key_cache_counters(const char *name,
KEY_CACHE *key_cache);
C_MODE_END
#endif /* _keycache_h */

93
3rdparty/mysql/include/little_endian.h vendored Normal file
View File

@@ -0,0 +1,93 @@
#ifndef LITTLE_ENDIAN_INCLUDED
#define LITTLE_ENDIAN_INCLUDED
/* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/*
Data in little-endian format.
*/
#include <string.h>
static inline void float4get (float *V, const uchar *M)
{
memcpy(V, (M), sizeof(float));
}
static inline void float4store(uchar *V, float M)
{
memcpy(V, (&M), sizeof(float));
}
static inline void float8get (double *V, const uchar *M)
{
memcpy(V, M, sizeof(double));
}
static inline void float8store(uchar *V, double M)
{
memcpy(V, &M, sizeof(double));
}
static inline void floatget (float *V, const uchar *M) { float4get(V, M); }
static inline void floatstore (uchar *V, float M) { float4store(V, M); }
/* Bi-endian hardware.... */
#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
static inline void doublestore(uchar *T, double V)
{ *(((char*)T)+0)=(char) ((uchar *) &V)[4];
*(((char*)T)+1)=(char) ((uchar *) &V)[5];
*(((char*)T)+2)=(char) ((uchar *) &V)[6];
*(((char*)T)+3)=(char) ((uchar *) &V)[7];
*(((char*)T)+4)=(char) ((uchar *) &V)[0];
*(((char*)T)+5)=(char) ((uchar *) &V)[1];
*(((char*)T)+6)=(char) ((uchar *) &V)[2];
*(((char*)T)+7)=(char) ((uchar *) &V)[3]; }
static inline void doubleget(double *V, const uchar *M)
{ double def_temp;
((uchar*) &def_temp)[0]=(M)[4];
((uchar*) &def_temp)[1]=(M)[5];
((uchar*) &def_temp)[2]=(M)[6];
((uchar*) &def_temp)[3]=(M)[7];
((uchar*) &def_temp)[4]=(M)[0];
((uchar*) &def_temp)[5]=(M)[1];
((uchar*) &def_temp)[6]=(M)[2];
((uchar*) &def_temp)[7]=(M)[3];
(*V) = def_temp; }
#else /* Bi-endian hardware.... */
static inline void doublestore(uchar *T, double V) { memcpy(T, &V, sizeof(double)); }
static inline void doubleget (double *V, const uchar *M) { memcpy(V, M, sizeof(double)); }
#endif /* Bi-endian hardware.... */
static inline void ushortget(uint16 *V, const uchar *pM) { *V= uint2korr(pM); }
static inline void shortget (int16 *V, const uchar *pM) { *V= sint2korr(pM); }
static inline void longget (int32 *V, const uchar *pM) { *V= sint4korr(pM); }
static inline void ulongget (uint32 *V, const uchar *pM) { *V= uint4korr(pM); }
static inline void shortstore(uchar *T, int16 V) { int2store(T, V); }
static inline void longstore (uchar *T, int32 V) { int4store(T, V); }
static inline void longlongget(longlong *V, const uchar *M)
{
memcpy(V, (M), sizeof(ulonglong));
}
static inline void longlongstore(uchar *T, longlong V)
{
memcpy((T), &V, sizeof(ulonglong));
}
#endif /* LITTLE_ENDIAN_INCLUDED */

View File

@@ -1,9 +1,8 @@
/* Copyright (C) 2000 MySQL AB
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
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; either version 2 of the License, or
(at your option) any later version.
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; without even the implied warranty of
@@ -12,16 +11,17 @@
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 */
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/*
A better inplementation of the UNIX ctype(3) library.
Notes: my_global.h should be included before ctype.h
*/
#ifndef _m_ctype_h
#define _m_ctype_h
#include "my_global.h" /* uint16, uchar */
#ifdef __cplusplus
extern "C" {
#endif
@@ -37,17 +37,113 @@ extern "C" {
#define my_wc_t ulong
#define MY_CS_REPLACEMENT_CHARACTER 0xFFFD
/*
On i386 we store Unicode->CS conversion tables for
some character sets using Big-endian order,
to copy two bytes at onces.
This gives some performance improvement.
*/
#ifdef __i386__
#define MB2(x) (((x) >> 8) + (((x) & 0xFF) << 8))
#define MY_PUT_MB2(s, code) { *((uint16*)(s))= (code); }
#else
#define MB2(x) (x)
#define MY_PUT_MB2(s, code) { (s)[0]= code >> 8; (s)[1]= code & 0xFF; }
#endif
typedef struct unicase_info_char_st
{
uint32 toupper;
uint32 tolower;
uint32 sort;
} MY_UNICASE_CHARACTER;
typedef struct unicase_info_st
{
uint16 toupper;
uint16 tolower;
uint16 sort;
my_wc_t maxchar;
const MY_UNICASE_CHARACTER **page;
} MY_UNICASE_INFO;
extern MY_UNICASE_INFO *my_unicase_default[256];
extern MY_UNICASE_INFO *my_unicase_turkish[256];
extern MY_UNICASE_INFO my_unicase_default;
extern MY_UNICASE_INFO my_unicase_turkish;
extern MY_UNICASE_INFO my_unicase_mysql500;
extern MY_UNICASE_INFO my_unicase_unicode520;
#define MY_UCA_MAX_CONTRACTION 6
#define MY_UCA_MAX_WEIGHT_SIZE 8
#define MY_UCA_WEIGHT_LEVELS 1
typedef struct my_contraction_t
{
my_wc_t ch[MY_UCA_MAX_CONTRACTION]; /* Character sequence */
uint16 weight[MY_UCA_MAX_WEIGHT_SIZE];/* Its weight string, 0-terminated */
my_bool with_context;
} MY_CONTRACTION;
typedef struct my_contraction_list_t
{
size_t nitems; /* Number of items in the list */
MY_CONTRACTION *item; /* List of contractions */
char *flags; /* Character flags, e.g. "is contraction head") */
} MY_CONTRACTIONS;
my_bool my_uca_can_be_contraction_head(const MY_CONTRACTIONS *c, my_wc_t wc);
my_bool my_uca_can_be_contraction_tail(const MY_CONTRACTIONS *c, my_wc_t wc);
uint16 *my_uca_contraction2_weight(const MY_CONTRACTIONS *c,
my_wc_t wc1, my_wc_t wc2);
/* Collation weights on a single level (e.g. primary, secondary, tertiarty) */
typedef struct my_uca_level_info_st
{
my_wc_t maxchar;
uchar *lengths;
uint16 **weights;
MY_CONTRACTIONS contractions;
} MY_UCA_WEIGHT_LEVEL;
typedef struct uca_info_st
{
MY_UCA_WEIGHT_LEVEL level[MY_UCA_WEIGHT_LEVELS];
/* Logical positions */
my_wc_t first_non_ignorable;
my_wc_t last_non_ignorable;
my_wc_t first_primary_ignorable;
my_wc_t last_primary_ignorable;
my_wc_t first_secondary_ignorable;
my_wc_t last_secondary_ignorable;
my_wc_t first_tertiary_ignorable;
my_wc_t last_tertiary_ignorable;
my_wc_t first_trailing;
my_wc_t last_trailing;
my_wc_t first_variable;
my_wc_t last_variable;
} MY_UCA_INFO;
extern MY_UCA_INFO my_uca_v400;
typedef struct uni_ctype_st
{
uchar pctype;
uchar *ctype;
} MY_UNI_CTYPE;
extern MY_UNI_CTYPE my_uni_ctype[256];
/* wm_wc and wc_mb return codes */
#define MY_CS_ILSEQ 0 /* Wrong by sequence: wb_wc */
@@ -73,79 +169,123 @@ extern MY_UNICASE_INFO *my_unicase_turkish[256];
#define MY_CS_BINSORT 16 /* if binary sort order */
#define MY_CS_PRIMARY 32 /* if primary collation */
#define MY_CS_STRNXFRM 64 /* if strnxfrm is used for sort */
#define MY_CS_UNICODE 128 /* is a charset is full unicode */
#define MY_CS_UNICODE 128 /* is a charset is BMP Unicode */
#define MY_CS_READY 256 /* if a charset is initialized */
#define MY_CS_AVAILABLE 512 /* If either compiled-in or loaded*/
#define MY_CS_CSSORT 1024 /* if case sensitive sort order */
#define MY_CS_CSSORT 1024 /* if case sensitive sort order */
#define MY_CS_HIDDEN 2048 /* don't display in SHOW */
#define MY_CS_PUREASCII 4096 /* if a charset is pure ascii */
#define MY_CS_NONASCII 8192 /* if not ASCII-compatible */
#define MY_CS_UNICODE_SUPPLEMENT 16384 /* Non-BMP Unicode characters */
#define MY_CS_LOWER_SORT 32768 /* If use lower case as weight */
#define MY_CHARSET_UNDEFINED 0
/* Character repertoire flags */
#define MY_REPERTOIRE_ASCII 1 /* Pure ASCII U+0000..U+007F */
#define MY_REPERTOIRE_EXTENDED 2 /* Extended characters: U+0080..U+FFFF */
#define MY_REPERTOIRE_UNICODE30 3 /* ASCII | EXTENDED: U+0000..U+FFFF */
/* Flags for strxfrm */
#define MY_STRXFRM_LEVEL1 0x00000001 /* for primary weights */
#define MY_STRXFRM_LEVEL2 0x00000002 /* for secondary weights */
#define MY_STRXFRM_LEVEL3 0x00000004 /* for tertiary weights */
#define MY_STRXFRM_LEVEL4 0x00000008 /* fourth level weights */
#define MY_STRXFRM_LEVEL5 0x00000010 /* fifth level weights */
#define MY_STRXFRM_LEVEL6 0x00000020 /* sixth level weights */
#define MY_STRXFRM_LEVEL_ALL 0x0000003F /* Bit OR for the above six */
#define MY_STRXFRM_NLEVELS 6 /* Number of possible levels*/
#define MY_STRXFRM_PAD_WITH_SPACE 0x00000040 /* if pad result with spaces */
#define MY_STRXFRM_PAD_TO_MAXLEN 0x00000080 /* if pad tail(for filesort) */
#define MY_STRXFRM_DESC_LEVEL1 0x00000100 /* if desc order for level1 */
#define MY_STRXFRM_DESC_LEVEL2 0x00000200 /* if desc order for level2 */
#define MY_STRXFRM_DESC_LEVEL3 0x00000300 /* if desc order for level3 */
#define MY_STRXFRM_DESC_LEVEL4 0x00000800 /* if desc order for level4 */
#define MY_STRXFRM_DESC_LEVEL5 0x00001000 /* if desc order for level5 */
#define MY_STRXFRM_DESC_LEVEL6 0x00002000 /* if desc order for level6 */
#define MY_STRXFRM_DESC_SHIFT 8
#define MY_STRXFRM_UNUSED_00004000 0x00004000 /* for future extensions */
#define MY_STRXFRM_UNUSED_00008000 0x00008000 /* for future extensions */
#define MY_STRXFRM_REVERSE_LEVEL1 0x00010000 /* if reverse order for level1 */
#define MY_STRXFRM_REVERSE_LEVEL2 0x00020000 /* if reverse order for level2 */
#define MY_STRXFRM_REVERSE_LEVEL3 0x00040000 /* if reverse order for level3 */
#define MY_STRXFRM_REVERSE_LEVEL4 0x00080000 /* if reverse order for level4 */
#define MY_STRXFRM_REVERSE_LEVEL5 0x00100000 /* if reverse order for level5 */
#define MY_STRXFRM_REVERSE_LEVEL6 0x00200000 /* if reverse order for level6 */
#define MY_STRXFRM_REVERSE_SHIFT 16
typedef struct my_uni_idx_st
{
uint16 from;
uint16 to;
uchar *tab;
uint16 from;
uint16 to;
const uchar *tab;
} MY_UNI_IDX;
typedef struct
{
uint beg;
uint end;
uint mblen;
uint mb_len;
} my_match_t;
enum my_lex_states
{
MY_LEX_START, MY_LEX_CHAR, MY_LEX_IDENT,
MY_LEX_IDENT_SEP, MY_LEX_IDENT_START,
MY_LEX_REAL, MY_LEX_HEX_NUMBER, MY_LEX_BIN_NUMBER,
MY_LEX_CMP_OP, MY_LEX_LONG_CMP_OP, MY_LEX_STRING, MY_LEX_COMMENT, MY_LEX_END,
MY_LEX_OPERATOR_OR_IDENT, MY_LEX_NUMBER_IDENT, MY_LEX_INT_OR_REAL,
MY_LEX_REAL_OR_POINT, MY_LEX_BOOL, MY_LEX_EOL, MY_LEX_ESCAPE,
MY_LEX_LONG_COMMENT, MY_LEX_END_LONG_COMMENT, MY_LEX_SEMICOLON,
MY_LEX_SET_VAR, MY_LEX_USER_END, MY_LEX_HOSTNAME, MY_LEX_SKIP,
MY_LEX_USER_VARIABLE_DELIMITER, MY_LEX_SYSTEM_VAR,
MY_LEX_IDENT_OR_KEYWORD,
MY_LEX_IDENT_OR_HEX, MY_LEX_IDENT_OR_BIN, MY_LEX_IDENT_OR_NCHAR,
MY_LEX_STRING_OR_DELIMITER
};
struct charset_info_st;
typedef struct my_charset_loader_st
{
char error[128];
void *(*once_alloc)(size_t);
void *(*mem_malloc)(size_t);
void *(*mem_realloc)(void *, size_t);
void (*mem_free)(void *);
void (*reporter)(enum loglevel, const char *format, ...);
int (*add_collation)(struct charset_info_st *cs);
} MY_CHARSET_LOADER;
extern int (*my_string_stack_guard)(int);
/* See strings/CHARSET_INFO.txt for information about this structure */
typedef struct my_collation_handler_st
{
my_bool (*init)(struct charset_info_st *, void *(*alloc)(uint));
my_bool (*init)(struct charset_info_st *, MY_CHARSET_LOADER *);
/* Collation routines */
int (*strnncoll)(struct charset_info_st *,
const uchar *, uint, const uchar *, uint, my_bool);
int (*strnncollsp)(struct charset_info_st *,
const uchar *, uint, const uchar *, uint,
int (*strnncoll)(const struct charset_info_st *,
const uchar *, size_t, const uchar *, size_t, my_bool);
int (*strnncollsp)(const struct charset_info_st *,
const uchar *, size_t, const uchar *, size_t,
my_bool diff_if_only_endspace_difference);
int (*strnxfrm)(struct charset_info_st *,
uchar *, uint, const uchar *, uint);
uint (*strnxfrmlen)(struct charset_info_st *, uint);
my_bool (*like_range)(struct charset_info_st *,
const char *s, uint s_length,
size_t (*strnxfrm)(const struct charset_info_st *,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags);
size_t (*strnxfrmlen)(const struct charset_info_st *, size_t);
my_bool (*like_range)(const struct charset_info_st *,
const char *s, size_t s_length,
pchar w_prefix, pchar w_one, pchar w_many,
uint res_length,
size_t res_length,
char *min_str, char *max_str,
uint *min_len, uint *max_len);
int (*wildcmp)(struct charset_info_st *,
size_t *min_len, size_t *max_len);
int (*wildcmp)(const struct charset_info_st *,
const char *str,const char *str_end,
const char *wildstr,const char *wildend,
int escape,int w_one, int w_many);
int (*strcasecmp)(struct charset_info_st *, const char *, const char *);
int (*strcasecmp)(const struct charset_info_st *, const char *,
const char *);
uint (*instr)(struct charset_info_st *,
const char *b, uint b_length,
const char *s, uint s_length,
uint (*instr)(const struct charset_info_st *,
const char *b, size_t b_length,
const char *s, size_t s_length,
my_match_t *match, uint nmatch);
/* Hash calculation */
void (*hash_sort)(struct charset_info_st *cs, const uchar *key, uint len,
ulong *nr1, ulong *nr2);
my_bool (*propagate)(struct charset_info_st *cs, const uchar *str, uint len);
void (*hash_sort)(const struct charset_info_st *cs, const uchar *key,
size_t len, ulong *nr1, ulong *nr2);
my_bool (*propagate)(const struct charset_info_st *cs, const uchar *str,
size_t len);
} MY_COLLATION_HANDLER;
extern MY_COLLATION_HANDLER my_collation_mb_bin_handler;
@@ -153,66 +293,95 @@ extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler;
extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler;
extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler;
/* Some typedef to make it easy for C++ to make function pointers */
typedef int (*my_charset_conv_mb_wc)(const struct charset_info_st *,
my_wc_t *, const uchar *, const uchar *);
typedef int (*my_charset_conv_wc_mb)(const struct charset_info_st *, my_wc_t,
uchar *, uchar *);
typedef size_t (*my_charset_conv_case)(const struct charset_info_st *,
char *, size_t, char *, size_t);
/* See strings/CHARSET_INFO.txt about information on this structure */
typedef struct my_charset_handler_st
{
my_bool (*init)(struct charset_info_st *, void *(*alloc)(uint));
my_bool (*init)(struct charset_info_st *, MY_CHARSET_LOADER *loader);
/* Multibyte routines */
int (*ismbchar)(struct charset_info_st *, const char *, const char *);
int (*mbcharlen)(struct charset_info_st *, uint);
uint (*numchars)(struct charset_info_st *, const char *b, const char *e);
uint (*charpos)(struct charset_info_st *, const char *b, const char *e, uint pos);
uint (*well_formed_len)(struct charset_info_st *,
uint (*ismbchar)(const struct charset_info_st *, const char *,
const char *);
uint (*mbcharlen)(const struct charset_info_st *, uint c);
size_t (*numchars)(const struct charset_info_st *, const char *b,
const char *e);
size_t (*charpos)(const struct charset_info_st *, const char *b,
const char *e, size_t pos);
size_t (*well_formed_len)(const struct charset_info_st *,
const char *b,const char *e,
uint nchars, int *error);
uint (*lengthsp)(struct charset_info_st *, const char *ptr, uint length);
uint (*numcells)(struct charset_info_st *, const char *b, const char *e);
size_t nchars, int *error);
size_t (*lengthsp)(const struct charset_info_st *, const char *ptr,
size_t length);
size_t (*numcells)(const struct charset_info_st *, const char *b,
const char *e);
/* Unicode convertion */
int (*mb_wc)(struct charset_info_st *cs,my_wc_t *wc,
const unsigned char *s,const unsigned char *e);
int (*wc_mb)(struct charset_info_st *cs,my_wc_t wc,
unsigned char *s,unsigned char *e);
/* Functions for case and sort convertion */
void (*caseup_str)(struct charset_info_st *, char *);
void (*casedn_str)(struct charset_info_st *, char *);
uint (*caseup)(struct charset_info_st *, char *src, uint srclen,
char *dst, uint dstlen);
uint (*casedn)(struct charset_info_st *, char *src, uint srclen,
char *dst, uint dstlen);
/* Unicode conversion */
my_charset_conv_mb_wc mb_wc;
my_charset_conv_wc_mb wc_mb;
/* CTYPE scanner */
int (*ctype)(const struct charset_info_st *cs, int *ctype,
const uchar *s, const uchar *e);
/* Functions for case and sort conversion */
size_t (*caseup_str)(const struct charset_info_st *, char *);
size_t (*casedn_str)(const struct charset_info_st *, char *);
my_charset_conv_case caseup;
my_charset_conv_case casedn;
/* Charset dependant snprintf() */
int (*snprintf)(struct charset_info_st *, char *to, uint n, const char *fmt,
...);
int (*long10_to_str)(struct charset_info_st *, char *to, uint n, int radix,
long int val);
int (*longlong10_to_str)(struct charset_info_st *, char *to, uint n,
int radix, longlong val);
size_t (*snprintf)(const struct charset_info_st *, char *to, size_t n,
const char *fmt,
...) MY_ATTRIBUTE((format(printf, 4, 5)));
size_t (*long10_to_str)(const struct charset_info_st *, char *to, size_t n,
int radix, long int val);
size_t (*longlong10_to_str)(const struct charset_info_st *, char *to,
size_t n, int radix, longlong val);
void (*fill)(struct charset_info_st *, char *to, uint len, int fill);
void (*fill)(const struct charset_info_st *, char *to, size_t len,
int fill);
/* String-to-number convertion routines */
long (*strntol)(struct charset_info_st *, const char *s, uint l,
int base, char **e, int *err);
ulong (*strntoul)(struct charset_info_st *, const char *s, uint l,
int base, char **e, int *err);
longlong (*strntoll)(struct charset_info_st *, const char *s, uint l,
int base, char **e, int *err);
ulonglong (*strntoull)(struct charset_info_st *, const char *s, uint l,
int base, char **e, int *err);
double (*strntod)(struct charset_info_st *, char *s, uint l, char **e,
int *err);
longlong (*strtoll10)(struct charset_info_st *cs,
/* String-to-number conversion routines */
long (*strntol)(const struct charset_info_st *, const char *s,
size_t l, int base, char **e, int *err);
ulong (*strntoul)(const struct charset_info_st *, const char *s,
size_t l, int base, char **e, int *err);
longlong (*strntoll)(const struct charset_info_st *, const char *s,
size_t l, int base, char **e, int *err);
ulonglong (*strntoull)(const struct charset_info_st *, const char *s,
size_t l, int base, char **e, int *err);
double (*strntod)(const struct charset_info_st *, char *s,
size_t l, char **e, int *err);
longlong (*strtoll10)(const struct charset_info_st *cs,
const char *nptr, char **endptr, int *error);
ulong (*scan)(struct charset_info_st *, const char *b, const char *e,
int sq);
ulonglong (*strntoull10rnd)(const struct charset_info_st *cs,
const char *str, size_t length,
int unsigned_fl,
char **endptr, int *error);
size_t (*scan)(const struct charset_info_st *, const char *b,
const char *e, int sq);
} MY_CHARSET_HANDLER;
extern MY_CHARSET_HANDLER my_charset_8bit_handler;
extern MY_CHARSET_HANDLER my_charset_ascii_handler;
extern MY_CHARSET_HANDLER my_charset_ucs2_handler;
/*
We define this CHARSET_INFO_DEFINED here to prevent a repeat of the
typedef in hash.c, which will cause a compiler error.
*/
#define CHARSET_INFO_DEFINED
/* See strings/CHARSET_INFO.txt about information on this structure */
typedef struct charset_info_st
{
uint number;
@@ -223,38 +392,45 @@ typedef struct charset_info_st
const char *name;
const char *comment;
const char *tailoring;
uchar *ctype;
uchar *to_lower;
uchar *to_upper;
uchar *sort_order;
uint16 *contractions;
uint16 **sort_order_big;
uint16 *tab_to_uni;
MY_UNI_IDX *tab_from_uni;
MY_UNICASE_INFO **caseinfo;
uchar *state_map;
uchar *ident_map;
const uchar *ctype;
const uchar *to_lower;
const uchar *to_upper;
const uchar *sort_order;
MY_UCA_INFO *uca; /* This can be changed in apply_one_rule() */
const uint16 *tab_to_uni;
const MY_UNI_IDX *tab_from_uni;
const MY_UNICASE_INFO *caseinfo;
const struct lex_state_maps_st *state_maps; /* parser internal data */
const uchar *ident_map; /* parser internal data */
uint strxfrm_multiply;
uchar caseup_multiply;
uchar casedn_multiply;
uint mbminlen;
uint mbmaxlen;
uint16 min_sort_char;
uint16 max_sort_char; /* For LIKE optimization */
uint mbmaxlenlen;
my_wc_t min_sort_char;
my_wc_t max_sort_char; /* For LIKE optimization */
uchar pad_char;
my_bool escape_with_backslash_is_dangerous;
uchar levels_for_compare;
uchar levels_for_order;
MY_CHARSET_HANDLER *cset;
MY_COLLATION_HANDLER *coll;
} CHARSET_INFO;
#define ILLEGAL_CHARSET_INFO_NUMBER (~0U)
extern CHARSET_INFO my_charset_bin;
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_bin;
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_latin1;
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_filename;
extern CHARSET_INFO my_charset_big5_chinese_ci;
extern CHARSET_INFO my_charset_big5_bin;
extern CHARSET_INFO my_charset_cp932_japanese_ci;
extern CHARSET_INFO my_charset_cp932_bin;
extern CHARSET_INFO my_charset_cp1250_czech_ci;
extern CHARSET_INFO my_charset_eucjpms_japanese_ci;
extern CHARSET_INFO my_charset_eucjpms_bin;
extern CHARSET_INFO my_charset_euckr_korean_ci;
@@ -263,7 +439,8 @@ extern CHARSET_INFO my_charset_gb2312_chinese_ci;
extern CHARSET_INFO my_charset_gb2312_bin;
extern CHARSET_INFO my_charset_gbk_chinese_ci;
extern CHARSET_INFO my_charset_gbk_bin;
extern CHARSET_INFO my_charset_latin1;
extern CHARSET_INFO my_charset_gb18030_chinese_ci;
extern CHARSET_INFO my_charset_gb18030_bin;
extern CHARSET_INFO my_charset_latin1_german2_ci;
extern CHARSET_INFO my_charset_latin1_bin;
extern CHARSET_INFO my_charset_latin2_czech_ci;
@@ -273,152 +450,267 @@ extern CHARSET_INFO my_charset_tis620_thai_ci;
extern CHARSET_INFO my_charset_tis620_bin;
extern CHARSET_INFO my_charset_ucs2_general_ci;
extern CHARSET_INFO my_charset_ucs2_bin;
extern CHARSET_INFO my_charset_ucs2_general_uca;
extern CHARSET_INFO my_charset_ucs2_unicode_ci;
extern CHARSET_INFO my_charset_ucs2_general_mysql500_ci;
extern CHARSET_INFO my_charset_ujis_japanese_ci;
extern CHARSET_INFO my_charset_ujis_bin;
extern CHARSET_INFO my_charset_utf8_general_ci;
extern CHARSET_INFO my_charset_utf16_bin;
extern CHARSET_INFO my_charset_utf16_general_ci;
extern CHARSET_INFO my_charset_utf16_unicode_ci;
extern CHARSET_INFO my_charset_utf16le_bin;
extern CHARSET_INFO my_charset_utf16le_general_ci;
extern CHARSET_INFO my_charset_utf32_bin;
extern CHARSET_INFO my_charset_utf32_general_ci;
extern CHARSET_INFO my_charset_utf32_unicode_ci;
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_utf8_general_ci;
extern CHARSET_INFO my_charset_utf8_tolower_ci;
extern CHARSET_INFO my_charset_utf8_unicode_ci;
extern CHARSET_INFO my_charset_utf8_bin;
extern CHARSET_INFO my_charset_cp1250_czech_ci;
extern CHARSET_INFO my_charset_utf8_general_mysql500_ci;
extern CHARSET_INFO my_charset_utf8mb4_bin;
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_utf8mb4_general_ci;
extern CHARSET_INFO my_charset_utf8mb4_unicode_ci;
#define MY_UTF8MB3 "utf8"
#define MY_UTF8MB4 "utf8mb4"
/* declarations for simple charsets */
extern int my_strnxfrm_simple(CHARSET_INFO *, uchar *, uint, const uchar *,
uint);
uint my_strnxfrmlen_simple(CHARSET_INFO *, uint);
extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, uint,
const uchar *, uint, my_bool);
extern size_t my_strnxfrm_simple(const CHARSET_INFO *,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags);
size_t my_strnxfrmlen_simple(const CHARSET_INFO *, size_t);
extern int my_strnncoll_simple(const CHARSET_INFO *, const uchar *, size_t,
const uchar *, size_t, my_bool);
extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, uint,
const uchar *, uint,
extern int my_strnncollsp_simple(const CHARSET_INFO *, const uchar *, size_t,
const uchar *, size_t,
my_bool diff_if_only_endspace_difference);
extern void my_hash_sort_simple(CHARSET_INFO *cs,
const uchar *key, uint len,
extern void my_hash_sort_simple(const CHARSET_INFO *cs,
const uchar *key, size_t len,
ulong *nr1, ulong *nr2);
extern uint my_lengthsp_8bit(CHARSET_INFO *cs, const char *ptr, uint length);
extern size_t my_lengthsp_8bit(const CHARSET_INFO *cs, const char *ptr,
size_t length);
extern uint my_instr_simple(struct charset_info_st *,
const char *b, uint b_length,
const char *s, uint s_length,
extern uint my_instr_simple(const struct charset_info_st *,
const char *b, size_t b_length,
const char *s, size_t s_length,
my_match_t *match, uint nmatch);
/* Functions for 8bit */
extern void my_caseup_str_8bit(CHARSET_INFO *, char *);
extern void my_casedn_str_8bit(CHARSET_INFO *, char *);
extern uint my_caseup_8bit(CHARSET_INFO *, char *src, uint srclen,
char *dst, uint dstlen);
extern uint my_casedn_8bit(CHARSET_INFO *, char *src, uint srclen,
char *dst, uint dstlen);
extern size_t my_caseup_str_8bit(const CHARSET_INFO *, char *);
extern size_t my_casedn_str_8bit(const CHARSET_INFO *, char *);
extern size_t my_caseup_8bit(const CHARSET_INFO *, char *src, size_t srclen,
char *dst, size_t dstlen);
extern size_t my_casedn_8bit(const CHARSET_INFO *, char *src, size_t srclen,
char *dst, size_t dstlen);
extern int my_strcasecmp_8bit(CHARSET_INFO * cs, const char *, const char *);
extern int my_strcasecmp_8bit(const CHARSET_INFO * cs, const char *,
const char *);
int my_mb_wc_8bit(CHARSET_INFO *cs,my_wc_t *wc, const uchar *s,const uchar *e);
int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc, uchar *s, uchar *e);
int my_mb_wc_8bit(const CHARSET_INFO *cs,my_wc_t *wc, const uchar *s,
const uchar *e);
int my_wc_mb_8bit(const CHARSET_INFO *cs,my_wc_t wc, uchar *s, uchar *e);
ulong my_scan_8bit(CHARSET_INFO *cs, const char *b, const char *e, int sq);
int my_mb_ctype_8bit(const CHARSET_INFO *,int *, const uchar *,const uchar *);
int my_mb_ctype_mb(const CHARSET_INFO *,int *, const uchar *,const uchar *);
int my_snprintf_8bit(struct charset_info_st *, char *to, uint n,
const char *fmt, ...);
size_t my_scan_8bit(const CHARSET_INFO *cs, const char *b, const char *e,
int sq);
long my_strntol_8bit(CHARSET_INFO *, const char *s, uint l, int base,
char **e, int *err);
ulong my_strntoul_8bit(CHARSET_INFO *, const char *s, uint l, int base,
char **e, int *err);
longlong my_strntoll_8bit(CHARSET_INFO *, const char *s, uint l, int base,
char **e, int *err);
ulonglong my_strntoull_8bit(CHARSET_INFO *, const char *s, uint l, int base,
char **e, int *err);
double my_strntod_8bit(CHARSET_INFO *, char *s, uint l,char **e,
size_t my_snprintf_8bit(const struct charset_info_st *, char *to, size_t n,
const char *fmt, ...)
MY_ATTRIBUTE((format(printf, 4, 5)));
long my_strntol_8bit(const CHARSET_INFO *, const char *s, size_t l,
int base, char **e, int *err);
ulong my_strntoul_8bit(const CHARSET_INFO *, const char *s, size_t l,
int base, char **e, int *err);
longlong my_strntoll_8bit(const CHARSET_INFO *, const char *s, size_t l,
int base, char **e, int *err);
ulonglong my_strntoull_8bit(const CHARSET_INFO *, const char *s, size_t l,
int base, char **e, int *err);
double my_strntod_8bit(const CHARSET_INFO *, char *s, size_t l, char **e,
int *err);
int my_long10_to_str_8bit(CHARSET_INFO *, char *to, uint l, int radix,
long int val);
int my_longlong10_to_str_8bit(CHARSET_INFO *, char *to, uint l, int radix,
longlong val);
size_t my_long10_to_str_8bit(const CHARSET_INFO *, char *to, size_t l,
int radix, long int val);
size_t my_longlong10_to_str_8bit(const CHARSET_INFO *, char *to, size_t l,
int radix, longlong val);
longlong my_strtoll10_8bit(CHARSET_INFO *cs,
longlong my_strtoll10_8bit(const CHARSET_INFO *cs,
const char *nptr, char **endptr, int *error);
longlong my_strtoll10_ucs2(CHARSET_INFO *cs,
longlong my_strtoll10_ucs2(const CHARSET_INFO *cs,
const char *nptr, char **endptr, int *error);
void my_fill_8bit(CHARSET_INFO *cs, char* to, uint l, int fill);
ulonglong my_strntoull10rnd_8bit(const CHARSET_INFO *cs,
const char *str, size_t length, int
unsigned_fl, char **endptr, int *error);
ulonglong my_strntoull10rnd_ucs2(const CHARSET_INFO *cs,
const char *str, size_t length,
int unsigned_fl, char **endptr, int *error);
my_bool my_like_range_simple(CHARSET_INFO *cs,
const char *ptr, uint ptr_length,
void my_fill_8bit(const CHARSET_INFO *cs, char* to, size_t l, int fill);
/* For 8-bit character set */
my_bool my_like_range_simple(const CHARSET_INFO *cs,
const char *ptr, size_t ptr_length,
pbool escape, pbool w_one, pbool w_many,
uint res_length,
size_t res_length,
char *min_str, char *max_str,
uint *min_length, uint *max_length);
size_t *min_length, size_t *max_length);
my_bool my_like_range_mb(CHARSET_INFO *cs,
const char *ptr, uint ptr_length,
/* For ASCII-based multi-byte character sets with mbminlen=1 */
my_bool my_like_range_mb(const CHARSET_INFO *cs,
const char *ptr, size_t ptr_length,
pbool escape, pbool w_one, pbool w_many,
uint res_length,
size_t res_length,
char *min_str, char *max_str,
uint *min_length, uint *max_length);
size_t *min_length, size_t *max_length);
my_bool my_like_range_ucs2(CHARSET_INFO *cs,
const char *ptr, uint ptr_length,
pbool escape, pbool w_one, pbool w_many,
uint res_length,
char *min_str, char *max_str,
uint *min_length, uint *max_length);
/* For other character sets, with arbitrary mbminlen and mbmaxlen numbers */
my_bool my_like_range_generic(const CHARSET_INFO *cs,
const char *ptr, size_t ptr_length,
pbool escape, pbool w_one, pbool w_many,
size_t res_length,
char *min_str, char *max_str,
size_t *min_length, size_t *max_length);
int my_wildcmp_8bit(CHARSET_INFO *,
int my_wildcmp_8bit(const CHARSET_INFO *,
const char *str,const char *str_end,
const char *wildstr,const char *wildend,
int escape, int w_one, int w_many);
int my_wildcmp_bin(CHARSET_INFO *,
int my_wildcmp_bin(const CHARSET_INFO *,
const char *str,const char *str_end,
const char *wildstr,const char *wildend,
int escape, int w_one, int w_many);
uint my_numchars_8bit(CHARSET_INFO *, const char *b, const char *e);
uint my_numcells_8bit(CHARSET_INFO *, const char *b, const char *e);
uint my_charpos_8bit(CHARSET_INFO *, const char *b, const char *e, uint pos);
uint my_well_formed_len_8bit(CHARSET_INFO *, const char *b, const char *e,
uint pos, int *error);
int my_mbcharlen_8bit(CHARSET_INFO *, uint c);
size_t my_numchars_8bit(const CHARSET_INFO *, const char *b, const char *e);
size_t my_numcells_8bit(const CHARSET_INFO *, const char *b, const char *e);
size_t my_charpos_8bit(const CHARSET_INFO *, const char *b, const char *e,
size_t pos);
size_t my_well_formed_len_8bit(const CHARSET_INFO *, const char *b,
const char *e, size_t pos, int *error);
uint my_mbcharlen_8bit(const CHARSET_INFO *, uint c);
/* Functions for multibyte charsets */
extern void my_caseup_str_mb(CHARSET_INFO *, char *);
extern void my_casedn_str_mb(CHARSET_INFO *, char *);
extern uint my_caseup_mb(CHARSET_INFO *, char *src, uint srclen,
char *dst, uint dstlen);
extern uint my_casedn_mb(CHARSET_INFO *, char *src, uint srclen,
char *dst, uint dstlen);
extern int my_strcasecmp_mb(CHARSET_INFO * cs,const char *, const char *);
extern size_t my_caseup_str_mb(const CHARSET_INFO *, char *);
extern size_t my_casedn_str_mb(const CHARSET_INFO *, char *);
extern size_t my_caseup_mb(const CHARSET_INFO *, char *src, size_t srclen,
char *dst, size_t dstlen);
extern size_t my_casedn_mb(const CHARSET_INFO *, char *src, size_t srclen,
char *dst, size_t dstlen);
extern size_t my_caseup_mb_varlen(const CHARSET_INFO *, char *src,
size_t srclen, char *dst, size_t dstlen);
extern size_t my_casedn_mb_varlen(const CHARSET_INFO *, char *src,
size_t srclen, char *dst, size_t dstlen);
extern size_t my_caseup_ujis(const CHARSET_INFO *, char *src, size_t srclen,
char *dst, size_t dstlen);
extern size_t my_casedn_ujis(const CHARSET_INFO *, char *src, size_t srclen,
char *dst, size_t dstlen);
extern int my_strcasecmp_mb(const CHARSET_INFO * cs,const char *,
const char *);
int my_wildcmp_mb(CHARSET_INFO *,
int my_wildcmp_mb(const CHARSET_INFO *,
const char *str,const char *str_end,
const char *wildstr,const char *wildend,
int escape, int w_one, int w_many);
uint my_numchars_mb(CHARSET_INFO *, const char *b, const char *e);
uint my_numcells_mb(CHARSET_INFO *, const char *b, const char *e);
uint my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, uint pos);
uint my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e,
uint pos, int *error);
uint my_instr_mb(struct charset_info_st *,
const char *b, uint b_length,
const char *s, uint s_length,
size_t my_numchars_mb(const CHARSET_INFO *, const char *b, const char *e);
size_t my_numcells_mb(const CHARSET_INFO *, const char *b, const char *e);
size_t my_charpos_mb(const CHARSET_INFO *, const char *b, const char *e,
size_t pos);
size_t my_well_formed_len_mb(const CHARSET_INFO *, const char *b,
const char *e, size_t pos, int *error);
uint my_instr_mb(const struct charset_info_st *,
const char *b, size_t b_length,
const char *s, size_t s_length,
my_match_t *match, uint nmatch);
int my_wildcmp_unicode(CHARSET_INFO *cs,
int my_strnncoll_mb_bin(const CHARSET_INFO * cs,
const uchar *s, size_t slen,
const uchar *t, size_t tlen,
my_bool t_is_prefix);
int my_strnncollsp_mb_bin(const CHARSET_INFO *cs,
const uchar *a, size_t a_length,
const uchar *b, size_t b_length,
my_bool diff_if_only_endspace_difference);
int my_wildcmp_mb_bin(const CHARSET_INFO *cs,
const char *str,const char *str_end,
const char *wildstr,const char *wildend,
int escape, int w_one, int w_many);
int my_strcasecmp_mb_bin(const CHARSET_INFO * cs MY_ATTRIBUTE((unused)),
const char *s, const char *t);
void my_hash_sort_mb_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
const uchar *key, size_t len,ulong *nr1, ulong *nr2);
size_t my_strnxfrm_mb(const CHARSET_INFO *,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags);
size_t my_strnxfrm_unicode(const CHARSET_INFO *,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags);
size_t my_strnxfrm_unicode_full_bin(const CHARSET_INFO *,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags);
size_t my_strnxfrmlen_unicode_full_bin(const CHARSET_INFO *, size_t);
int my_wildcmp_unicode(const CHARSET_INFO *cs,
const char *str, const char *str_end,
const char *wildstr, const char *wildend,
int escape, int w_one, int w_many,
MY_UNICASE_INFO **weights);
const MY_UNICASE_INFO *weights);
extern my_bool my_parse_charset_xml(const char *bug, uint len,
int (*add)(CHARSET_INFO *cs));
extern my_bool my_parse_charset_xml(MY_CHARSET_LOADER *loader,
const char *buf, size_t buflen);
extern char *my_strchr(const CHARSET_INFO *cs, const char *str,
const char *end, pchar c);
extern size_t my_strcspn(const CHARSET_INFO *cs, const char *str,
const char *end, const char *reject,
size_t reject_length);
my_bool my_propagate_simple(CHARSET_INFO *cs, const uchar *str, uint len);
my_bool my_propagate_complex(CHARSET_INFO *cs, const uchar *str, uint len);
my_bool my_propagate_simple(const CHARSET_INFO *cs, const uchar *str,
size_t len);
my_bool my_propagate_complex(const CHARSET_INFO *cs, const uchar *str,
size_t len);
uint my_string_repertoire(const CHARSET_INFO *cs, const char *str, size_t len);
my_bool my_charset_is_ascii_based(const CHARSET_INFO *cs);
my_bool my_charset_is_8bit_pure_ascii(const CHARSET_INFO *cs);
uint my_charset_repertoire(const CHARSET_INFO *cs);
uint my_strxfrm_flag_normalize(uint flags, uint nlevels);
void my_strxfrm_desc_and_reverse(uchar *str, uchar *strend,
uint flags, uint level);
size_t my_strxfrm_pad_desc_and_reverse(const CHARSET_INFO *cs,
uchar *str, uchar *frmend, uchar *strend,
uint nweights, uint flags, uint level);
my_bool my_charset_is_ascii_compatible(const CHARSET_INFO *cs);
const MY_CONTRACTIONS *my_charset_get_contractions(const CHARSET_INFO *cs,
int level);
extern size_t my_vsnprintf_ex(const CHARSET_INFO *cs, char *to, size_t n,
const char* fmt, va_list ap);
size_t my_convert(char *to, size_t to_length, const CHARSET_INFO *to_cs,
const char *from, size_t from_length,
const CHARSET_INFO *from_cs, uint *errors);
uint my_mbcharlen_ptr(const CHARSET_INFO *cs, const char *s, const char *e);
#define _MY_U 01 /* Upper case */
#define _MY_L 02 /* Lower case */
#define _MY_NMR 04 /* Numeral (digit) */
@@ -453,7 +745,8 @@ my_bool my_propagate_complex(CHARSET_INFO *cs, const uchar *str, uint len);
#define my_binary_compare(s) ((s)->state & MY_CS_BINSORT)
#define use_strnxfrm(s) ((s)->state & MY_CS_STRNXFRM)
#define my_strnxfrm(s, a, b, c, d) ((s)->coll->strnxfrm((s), (a), (b), (c), (d)))
#define my_strnxfrm(cs, d, dl, s, sl) \
((cs)->coll->strnxfrm((cs), (d), (dl), (dl), (s), (sl), MY_STRXFRM_PAD_WITH_SPACE))
#define my_strnncoll(s, a, b, c, d) ((s)->coll->strnncoll((s), (a), (b), (c), (d), 0))
#define my_like_range(s, a, b, c, d, e, f, g, h, i, j) \
((s)->coll->like_range((s), (a), (b), (c), (d), (e), (f), (g), (h), (i), (j)))
@@ -464,11 +757,39 @@ my_bool my_propagate_complex(CHARSET_INFO *cs, const uchar *str, uint len);
#define use_mb(s) ((s)->cset->ismbchar != NULL)
#define my_ismbchar(s, a, b) ((s)->cset->ismbchar((s), (a), (b)))
#ifdef USE_MB
#define my_mbcharlen(s, a) ((s)->cset->mbcharlen((s),(a)))
#else
#define my_mbcharlen(s, a) 1
#endif
/**
Get the length of gb18030 code by the given two leading bytes
@param[in] s charset_info
@param[in] a first byte of gb18030 code
@param[in] b second byte of gb18030 code
@return the length of gb18030 code starting with given two bytes,
the length would be 2 or 4 for valid gb18030 code,
or 0 for invalid gb18030 code
*/
#define my_mbcharlen_2(s, a, b) ((s)->cset->mbcharlen((s),((((a) & 0xFF) << 8) + ((b) & 0xFF))))
/**
Get the maximum length of leading bytes needed to determine the length of a
multi-byte gb18030 code
@param[in] s charset_info
@return number of leading bytes we need, would be 2 for gb18030
and 1 for all other charsets
*/
#define my_mbmaxlenlen(s) ((s)->mbmaxlenlen)
/**
Judge if the given byte is a possible leading byte for a charset.
For gb18030 whose mbmaxlenlen is 2, we can't determine the length of
a multi-byte character by looking at the first byte only
@param[in] s charset_info
@param[in] i possible leading byte
@return true if it is, otherwise false
*/
#define my_ismb1st(s, i) \
(my_mbcharlen((s), (i)) > 1 || \
(my_mbmaxlenlen((s)) == 2 && my_mbcharlen((s), (i)) == 0))
#define my_caseup_str(s, a) ((s)->cset->caseup_str((s), (a)))
#define my_casedn_str(s, a) ((s)->cset->casedn_str((s), (a)))
@@ -478,14 +799,6 @@ my_bool my_propagate_complex(CHARSET_INFO *cs, const uchar *str, uint len);
#define my_strntoull(s, a, b, c,d, e) ((s)->cset->strntoull((s),(a),(b),(c),(d),(e)))
#define my_strntod(s, a, b, c, d) ((s)->cset->strntod((s),(a),(b),(c),(d)))
/* XXX: still need to take care of this one */
#ifdef MY_CHARSET_TIS620
#error The TIS620 charset is broken at the moment. Tell tim to fix it.
#define USE_TIS620
#include "t_ctype.h"
#endif
#ifdef __cplusplus
}
#endif

344
3rdparty/mysql/include/m_string.h vendored Normal file
View File

@@ -0,0 +1,344 @@
/*
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifndef _m_string_h
#define _m_string_h
#include "my_global.h" /* HAVE_* */
#include <string.h>
#define bfill please_use_memset_rather_than_bfill
#define bzero please_use_memset_rather_than_bzero
#define bmove please_use_memmove_rather_than_bmove
#define strmov please_use_my_stpcpy_or_my_stpmov_rather_than_strmov
#define strnmov please_use_my_stpncpy_or_my_stpnmov_rather_than_strnmov
#include "mysql/service_my_snprintf.h"
#if defined(__cplusplus)
extern "C" {
#endif
/*
my_str_malloc(), my_str_realloc() and my_str_free() are assigned to
implementations in strings/alloc.c, but can be overridden in
the calling program.
*/
extern void *(*my_str_malloc)(size_t);
extern void *(*my_str_realloc)(void *, size_t);
extern void (*my_str_free)(void *);
/* Declared in int2str() */
extern char _dig_vec_upper[];
extern char _dig_vec_lower[];
/* Prototypes for string functions */
extern void bchange(uchar *dst,size_t old_len,const uchar *src,
size_t new_len,size_t tot_len);
extern void strappend(char *s,size_t len,pchar fill);
extern char *strend(const char *s);
extern char *strcend(const char *, pchar);
extern char *strfill(char * s,size_t len,pchar fill);
extern char *strmake(char *dst,const char *src,size_t length);
extern char *my_stpmov(char *dst,const char *src);
extern char *my_stpnmov(char *dst, const char *src, size_t n);
extern char *strcont(const char *src, const char *set);
extern char *strxmov(char *dst, const char *src, ...);
extern char *strxnmov(char *dst, size_t len, const char *src, ...);
/**
Copy a string from src to dst until (and including) terminating null byte.
@param dst Destination
@param src Source
@note src and dst cannot overlap.
Use my_stpmov() if src and dst overlaps.
@note Unsafe, consider using my_stpnpy() instead.
@return pointer to terminating null byte.
*/
static inline char *my_stpcpy(char *dst, const char *src)
{
#if defined(HAVE_BUILTIN_STPCPY)
return __builtin_stpcpy(dst, src);
#elif defined(HAVE_STPCPY)
return stpcpy(dst, src);
#else
/* Fallback to implementation supporting overlap. */
return my_stpmov(dst, src);
#endif
}
/**
Copy fixed-size string from src to dst.
@param dst Destination
@param src Source
@param n Maximum number of characters to copy.
@note src and dst cannot overlap
Use my_stpnmov() if src and dst overlaps.
@return pointer to terminating null byte.
*/
static inline char *my_stpncpy(char *dst, const char *src, size_t n)
{
#if defined(HAVE_STPNCPY)
return stpncpy(dst, src, n);
#else
/* Fallback to implementation supporting overlap. */
return my_stpnmov(dst, src, n);
#endif
}
static inline longlong my_strtoll(const char *nptr, char **endptr, int base)
{
#if defined _WIN32
return _strtoi64(nptr, endptr, base);
#else
return strtoll(nptr, endptr, base);
#endif
}
static inline ulonglong my_strtoull(const char *nptr, char **endptr, int base)
{
#if defined _WIN32
return _strtoui64(nptr, endptr, base);
#else
return strtoull(nptr, endptr, base);
#endif
}
static inline char *my_strtok_r(char *str, const char *delim, char **saveptr)
{
#if defined _WIN32
return strtok_s(str, delim, saveptr);
#else
return strtok_r(str, delim, saveptr);
#endif
}
/* native_ rather than my_ since my_strcasecmp already exists */
static inline int native_strcasecmp(const char *s1, const char *s2)
{
#if defined _WIN32
return _stricmp(s1, s2);
#else
return strcasecmp(s1, s2);
#endif
}
/* native_ rather than my_ for consistency with native_strcasecmp */
static inline int native_strncasecmp(const char *s1, const char *s2, size_t n)
{
#if defined _WIN32
return _strnicmp(s1, s2, n);
#else
return strncasecmp(s1, s2, n);
#endif
}
size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
/* Prototypes of normal stringfunctions (with may ours) */
#ifndef HAVE_STRNLEN
extern size_t strnlen(const char *s, size_t n);
#endif
extern int is_prefix(const char *, const char *);
/* Conversion routines */
typedef enum {
MY_GCVT_ARG_FLOAT,
MY_GCVT_ARG_DOUBLE
} my_gcvt_arg_type;
double my_strtod(const char *str, char **end, int *error);
double my_atof(const char *nptr);
size_t my_fcvt(double x, int precision, char *to, my_bool *error);
size_t my_gcvt(double x, my_gcvt_arg_type type, int width, char *to,
my_bool *error);
#define NOT_FIXED_DEC 31
/*
The longest string my_fcvt can return is 311 + "precision" bytes.
Here we assume that we never cal my_fcvt() with precision >= NOT_FIXED_DEC
(+ 1 byte for the terminating '\0').
*/
#define FLOATING_POINT_BUFFER (311 + NOT_FIXED_DEC)
/*
We want to use the 'e' format in some cases even if we have enough space
for the 'f' one just to mimic sprintf("%.15g") behavior for large integers,
and to improve it for numbers < 10^(-4).
That is, for |x| < 1 we require |x| >= 10^(-15), and for |x| > 1 we require
it to be integer and be <= 10^DBL_DIG for the 'f' format to be used.
We don't lose precision, but make cases like "1e200" or "0.00001" look nicer.
*/
#define MAX_DECPT_FOR_F_FORMAT DBL_DIG
/*
The maximum possible field width for my_gcvt() conversion.
(DBL_DIG + 2) significant digits + sign + "." + ("e-NNN" or
MAX_DECPT_FOR_F_FORMAT zeros for cases when |x|<1 and the 'f' format is used).
*/
#define MY_GCVT_MAX_FIELD_WIDTH (DBL_DIG + 4 + MY_MAX(5, MAX_DECPT_FOR_F_FORMAT)) \
extern char *llstr(longlong value,char *buff);
extern char *ullstr(longlong value,char *buff);
extern char *int2str(long val, char *dst, int radix, int upcase);
extern char *int10_to_str(long val,char *dst,int radix);
extern char *str2int(const char *src,int radix,long lower,long upper,
long *val);
longlong my_strtoll10(const char *nptr, char **endptr, int *error);
#if SIZEOF_LONG == SIZEOF_LONG_LONG
#define ll2str(A,B,C,D) int2str((A),(B),(C),(D))
#define longlong10_to_str(A,B,C) int10_to_str((A),(B),(C))
#undef strtoll
#define strtoll(A,B,C) strtol((A),(B),(C))
#define strtoull(A,B,C) strtoul((A),(B),(C))
#else
extern char *ll2str(longlong val,char *dst,int radix, int upcase);
extern char *longlong10_to_str(longlong val,char *dst,int radix);
#endif
#define longlong2str(A,B,C) ll2str((A),(B),(C),1)
#if defined(__cplusplus)
}
#endif
/*
LEX_STRING -- a pair of a C-string and its length.
(it's part of the plugin API as a MYSQL_LEX_STRING)
Ditto LEX_CSTRING/MYSQL_LEX_CSTRING.
*/
#include <mysql/mysql_lex_string.h>
typedef struct st_mysql_lex_string LEX_STRING;
typedef struct st_mysql_const_lex_string LEX_CSTRING;
#define STRING_WITH_LEN(X) (X), ((sizeof(X) - 1))
#define USTRING_WITH_LEN(X) ((uchar*) X), ((sizeof(X) - 1))
#define C_STRING_WITH_LEN(X) ((char *) (X)), ((sizeof(X) - 1))
/**
Skip trailing space.
On most systems reading memory in larger chunks (ideally equal to the size of
the chinks that the machine physically reads from memory) causes fewer memory
access loops and hence increased performance.
This is why the 'int' type is used : it's closest to that (according to how
it's defined in C).
So when we determine the amount of whitespace at the end of a string we do
the following :
1. We divide the string into 3 zones :
a) from the start of the string (__start) to the first multiple
of sizeof(int) (__start_words)
b) from the end of the string (__end) to the last multiple of sizeof(int)
(__end_words)
c) a zone that is aligned to sizeof(int) and can be safely accessed
through an int *
2. We start comparing backwards from (c) char-by-char. If all we find is
space then we continue
3. If there are elements in zone (b) we compare them as unsigned ints to a
int mask (SPACE_INT) consisting of all spaces
4. Finally we compare the remaining part (a) of the string char by char.
This covers for the last non-space unsigned int from 3. (if any)
This algorithm works well for relatively larger strings, but it will slow
the things down for smaller strings (because of the additional calculations
and checks compared to the naive method). Thus the barrier of length 20
is added.
@param ptr pointer to the input string
@param len the length of the string
@return the last non-space character
*/
#if defined(__sparc) || defined(__sparcv9)
static inline const uchar *skip_trailing_space(const uchar *ptr,size_t len)
{
/* SPACE_INT is a word that contains only spaces */
#if SIZEOF_INT == 4
const unsigned SPACE_INT= 0x20202020U;
#elif SIZEOF_INT == 8
const unsigned SPACE_INT= 0x2020202020202020ULL;
#else
#error define the appropriate constant for a word full of spaces
#endif
const uchar *end= ptr + len;
if (len > 20)
{
const uchar *end_words= (const uchar *)(intptr)
(((ulonglong)(intptr)end) / SIZEOF_INT * SIZEOF_INT);
const uchar *start_words= (const uchar *)(intptr)
((((ulonglong)(intptr)ptr) + SIZEOF_INT - 1) / SIZEOF_INT * SIZEOF_INT);
DBUG_ASSERT(end_words > ptr);
while (end > end_words && end[-1] == 0x20)
end--;
if (end[-1] == 0x20 && start_words < end_words)
while (end > start_words && ((unsigned *)end)[-1] == SPACE_INT)
end -= SIZEOF_INT;
}
while (end > ptr && end[-1] == 0x20)
end--;
return (end);
}
#else
/*
Reads 8 bytes at a time, ignoring alignment.
We use uint8korr, which is fast (it simply reads a *ulonglong)
on all platforms, except sparc.
*/
static inline const uchar *skip_trailing_space(const uchar *ptr, size_t len)
{
const uchar *end= ptr + len;
while (end - ptr >= 8)
{
if (uint8korr(end-8) != 0x2020202020202020ULL)
break;
end-= 8;
}
while (end > ptr && end[-1] == 0x20)
end--;
return (end);
}
#endif
static inline void lex_string_set(LEX_STRING *lex_str, const char *c_str)
{
lex_str->str= (char *) c_str;
lex_str->length= strlen(c_str);
}
static inline void lex_cstring_set(LEX_CSTRING *lex_str, const char *c_str)
{
lex_str->str= c_str;
lex_str->length= strlen(c_str);
}
#endif

View File

@@ -1,9 +1,8 @@
/* Copyright (C) 2000 MySQL AB
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
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; either version 2 of the License, or
(at your option) any later version.
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; without even the implied warranty of
@@ -12,9 +11,9 @@
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 */
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/*
/*
Data structures for mysys/my_alloc.c (root memory allocator)
*/
@@ -24,6 +23,13 @@
#define ALLOC_MAX_BLOCK_TO_DROP 4096
#define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10
/* PSI_memory_key */
#include "mysql/psi/psi_memory.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct st_used_mem
{ /* struct for once_alloc (block) */
struct st_used_mem *next; /* Next block in use */
@@ -38,15 +44,22 @@ typedef struct st_mem_root
USED_MEM *used; /* blocks almost without free memory */
USED_MEM *pre_alloc; /* preallocated block */
/* if block have less memory it will be put in 'used' list */
unsigned int min_malloc;
unsigned int block_size; /* initial block size */
size_t min_malloc;
size_t block_size; /* initial block size */
unsigned int block_num; /* allocated blocks counter */
/*
first free block in queue test counter (if it exceed
/*
first free block in queue test counter (if it exceed
MAX_BLOCK_USAGE_BEFORE_DROP block will be dropped in 'used' list)
*/
unsigned int first_block_usage;
void (*error_handler)(void);
PSI_memory_key m_psi_key;
} MEM_ROOT;
#ifdef __cplusplus
}
#endif
#endif

213
3rdparty/mysql/include/my_byteorder.h vendored Normal file
View File

@@ -0,0 +1,213 @@
#ifndef MY_BYTEORDER_INCLUDED
#define MY_BYTEORDER_INCLUDED
/* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/*
Functions for reading and storing in machine independent
format (low byte first). There are 'korr' (assume 'corrector') variants
for integer types, but 'get' (assume 'getter') for floating point types.
*/
#if defined(__i386__) || defined(_WIN32) || defined(__x86_64__)
#include "byte_order_generic_x86.h"
#else
#include "byte_order_generic.h"
#endif
static inline int32 sint3korr(const uchar *A)
{
return
((int32) (((A[2]) & 128) ?
(((uint32) 255L << 24) |
(((uint32) A[2]) << 16) |
(((uint32) A[1]) << 8) |
((uint32) A[0])) :
(((uint32) A[2]) << 16) |
(((uint32) A[1]) << 8) |
((uint32) A[0])))
;
}
static inline uint32 uint3korr(const uchar *A)
{
return
(uint32) (((uint32) (A[0])) +
(((uint32) (A[1])) << 8) +
(((uint32) (A[2])) << 16))
;
}
static inline ulonglong uint5korr(const uchar *A)
{
return
((ulonglong)(((uint32) (A[0])) +
(((uint32) (A[1])) << 8) +
(((uint32) (A[2])) << 16) +
(((uint32) (A[3])) << 24)) +
(((ulonglong) (A[4])) << 32))
;
}
static inline ulonglong uint6korr(const uchar *A)
{
return
((ulonglong)(((uint32) (A[0])) +
(((uint32) (A[1])) << 8) +
(((uint32) (A[2])) << 16) +
(((uint32) (A[3])) << 24)) +
(((ulonglong) (A[4])) << 32) +
(((ulonglong) (A[5])) << 40))
;
}
static inline void int3store(uchar *T, uint A)
{
*(T)= (uchar) (A);
*(T+1)= (uchar) (A >> 8);
*(T+2)= (uchar) (A >> 16);
}
static inline void int5store(uchar *T, ulonglong A)
{
*(T)= (uchar) (A);
*(T+1)= (uchar) (A >> 8);
*(T+2)= (uchar) (A >> 16);
*(T+3)= (uchar) (A >> 24);
*(T+4)= (uchar) (A >> 32);
}
static inline void int6store(uchar *T, ulonglong A)
{
*(T)= (uchar) (A);
*(T+1)= (uchar) (A >> 8);
*(T+2)= (uchar) (A >> 16);
*(T+3)= (uchar) (A >> 24);
*(T+4)= (uchar) (A >> 32);
*(T+5)= (uchar) (A >> 40);
}
#ifdef __cplusplus
static inline int16 sint2korr(const char *pT)
{
return sint2korr(static_cast<const uchar*>(static_cast<const void*>(pT)));
}
static inline uint16 uint2korr(const char *pT)
{
return uint2korr(static_cast<const uchar*>(static_cast<const void*>(pT)));
}
static inline uint32 uint3korr(const char *pT)
{
return uint3korr(static_cast<const uchar*>(static_cast<const void*>(pT)));
}
static inline int32 sint3korr(const char *pT)
{
return sint3korr(static_cast<const uchar*>(static_cast<const void*>(pT)));
}
static inline uint32 uint4korr(const char *pT)
{
return uint4korr(static_cast<const uchar*>(static_cast<const void*>(pT)));
}
static inline int32 sint4korr(const char *pT)
{
return sint4korr(static_cast<const uchar*>(static_cast<const void*>(pT)));
}
static inline ulonglong uint6korr(const char *pT)
{
return uint6korr(static_cast<const uchar*>(static_cast<const void*>(pT)));
}
static inline ulonglong uint8korr(const char *pT)
{
return uint8korr(static_cast<const uchar*>(static_cast<const void*>(pT)));
}
static inline longlong sint8korr(const char *pT)
{
return sint8korr(static_cast<const uchar*>(static_cast<const void*>(pT)));
}
static inline void int2store(char *pT, uint16 A)
{
int2store(static_cast<uchar*>(static_cast<void*>(pT)), A);
}
static inline void int3store(char *pT, uint A)
{
int3store(static_cast<uchar*>(static_cast<void*>(pT)), A);
}
static inline void int4store(char *pT, uint32 A)
{
int4store(static_cast<uchar*>(static_cast<void*>(pT)), A);
}
static inline void int5store(char *pT, ulonglong A)
{
int5store(static_cast<uchar*>(static_cast<void*>(pT)), A);
}
static inline void int6store(char *pT, ulonglong A)
{
int6store(static_cast<uchar*>(static_cast<void*>(pT)), A);
}
static inline void int8store(char *pT, ulonglong A)
{
int8store(static_cast<uchar*>(static_cast<void*>(pT)), A);
}
#endif /* __cplusplus */
/*
Functions for reading and storing in machine format from/to
short/long to/from some place in memory V should be a variable
and M a pointer to byte.
*/
#ifdef WORDS_BIGENDIAN
#include "big_endian.h"
#else
#include "little_endian.h"
#endif
#ifdef __cplusplus
static inline void float4store(char *V, float M)
{
float4store(static_cast<uchar*>(static_cast<void*>(V)), M);
}
static inline void float8get(double *V, const char *M)
{
float8get(V, static_cast<const uchar*>(static_cast<const void*>(M)));
}
static inline void float8store(char *V, double M)
{
float8store(static_cast<uchar*>(static_cast<void*>(V)), M);
}
#endif /* __cplusplus */
#endif /* MY_BYTEORDER_INCLUDED */

64
3rdparty/mysql/include/my_command.h vendored Normal file
View File

@@ -0,0 +1,64 @@
/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifndef _mysql_command_h
#define _mysql_command_h
/**
@enum enum_server_command
@brief You should add new commands to the end of this list, otherwise old
servers won't be able to handle them as 'unsupported'.
*/
enum enum_server_command
{
COM_SLEEP,
COM_QUIT,
COM_INIT_DB,
COM_QUERY,
COM_FIELD_LIST,
COM_CREATE_DB,
COM_DROP_DB,
COM_REFRESH,
COM_SHUTDOWN,
COM_STATISTICS,
COM_PROCESS_INFO,
COM_CONNECT,
COM_PROCESS_KILL,
COM_DEBUG,
COM_PING,
COM_TIME,
COM_DELAYED_INSERT,
COM_CHANGE_USER,
COM_BINLOG_DUMP,
COM_TABLE_DUMP,
COM_CONNECT_OUT,
COM_REGISTER_SLAVE,
COM_STMT_PREPARE,
COM_STMT_EXECUTE,
COM_STMT_SEND_LONG_DATA,
COM_STMT_CLOSE,
COM_STMT_RESET,
COM_SET_OPTION,
COM_STMT_FETCH,
COM_DAEMON,
COM_BINLOG_DUMP_GTID,
COM_RESET_CONNECTION,
/* don't forget to update const char *command_name[] in sql_parse.cc */
/* Must be last */
COM_END
};
#endif /* _mysql_command_h */

178
3rdparty/mysql/include/my_compiler.h vendored Normal file
View File

@@ -0,0 +1,178 @@
#ifndef MY_COMPILER_INCLUDED
#define MY_COMPILER_INCLUDED
/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/**
Header for compiler-dependent features.
Intended to contain a set of reusable wrappers for preprocessor
macros, attributes, pragmas, and any other features that are
specific to a target compiler.
*/
#include <stddef.h> /* size_t */
#if defined __GNUC__
/*
Convenience macro to test the minimum required GCC version.
These should be used with care as Clang also sets __GNUC__ and
__GNUC_MINOR__ (currently to 4.2). Prefer using feature specific
CMake checks in configure.cmake instead.
*/
# define MY_GNUC_PREREQ(maj, min) \
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
# define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
#else
# define MY_GNUC_PREREQ(maj, min) (0)
#endif
/*
The macros below are borrowed from include/linux/compiler.h in the
Linux kernel. Use them to indicate the likelyhood of the truthfulness
of a condition. This serves two purposes - newer versions of gcc will be
able to optimize for branch predication, which could yield siginficant
performance gains in frequently executed sections of the code, and the
other reason to use them is for documentation
*/
#ifdef HAVE_BUILTIN_EXPECT
// likely/unlikely are likely to clash with other symbols, do not #define
#if defined(__cplusplus)
inline bool likely(bool expr)
{
return __builtin_expect(expr, true);
}
inline bool unlikely(bool expr)
{
return __builtin_expect(expr, false);
}
#else
# define likely(x) __builtin_expect((x),1)
# define unlikely(x) __builtin_expect((x),0)
#endif
#else /* HAVE_BUILTIN_EXPECT */
#if defined(__cplusplus)
inline bool likely(bool expr)
{
return expr;
}
inline bool unlikely(bool expr)
{
return expr;
}
#else
# define likely(x) (x)
# define unlikely(x) (x)
#endif
#endif /* HAVE_BUILTIN_EXPECT */
/* Comunicate to the compiler the unreachability of the code. */
#ifdef HAVE_BUILTIN_UNREACHABLE
# define MY_ASSERT_UNREACHABLE() __builtin_unreachable()
#else
# define MY_ASSERT_UNREACHABLE() do { assert(0); } while (0)
#endif
#if defined __GNUC__ || defined __SUNPRO_C || defined __SUNPRO_CC
/* Specifies the minimum alignment of a type. */
# define MY_ALIGNOF(type) __alignof__(type)
/* Determine the alignment requirement of a type. */
# define MY_ALIGNED(n) __attribute__((__aligned__((n))))
/* Microsoft Visual C++ */
#elif defined _MSC_VER
# define MY_ALIGNOF(type) __alignof(type)
# define MY_ALIGNED(n) __declspec(align(n))
#else /* Make sure they are defined for other compilers. */
# define MY_ALIGNOF(type)
# define MY_ALIGNED(size)
#endif
/* Visual Studio requires '__inline' for C code */
#if !defined(__cplusplus) && defined(_MSC_VER)
# define inline __inline
#endif
/* Provide __func__ macro definition for Visual Studio. */
#if defined(_MSC_VER)
# define __func__ __FUNCTION__
#endif
/**
C++ Type Traits
*/
#ifdef __cplusplus
/**
Opaque storage with a particular alignment.
Partial specialization used due to MSVC++.
*/
template<size_t alignment> struct my_alignment_imp;
template<> struct MY_ALIGNED(1) my_alignment_imp<1> {};
template<> struct MY_ALIGNED(2) my_alignment_imp<2> {};
template<> struct MY_ALIGNED(4) my_alignment_imp<4> {};
template<> struct MY_ALIGNED(8) my_alignment_imp<8> {};
template<> struct MY_ALIGNED(16) my_alignment_imp<16> {};
/**
A POD type with a given size and alignment.
@remark If the compiler does not support a alignment attribute
(MY_ALIGN macro), the default alignment of a double is
used instead.
@tparam size The minimum size.
@tparam alignment The desired alignment: 1, 2, 4, 8 or 16.
*/
template <size_t size, size_t alignment>
struct my_aligned_storage
{
union
{
char data[size];
my_alignment_imp<alignment> align;
};
};
#endif /* __cplusplus */
/*
Disable MY_ATTRIBUTE for Sun Studio and Visual Studio.
Note that Sun Studio supports some __attribute__ variants,
but not format or unused which we use quite a lot.
*/
#ifndef MY_ATTRIBUTE
#if defined(__GNUC__)
# define MY_ATTRIBUTE(A) __attribute__(A)
#else
# define MY_ATTRIBUTE(A)
#endif
#endif
#ifndef __has_attribute
# define __has_attribute(x) 0
#endif
#if __has_attribute(no_sanitize_undefined)
# define SUPPRESS_UBSAN __attribute__((no_sanitize_undefined))
#else
# define SUPPRESS_UBSAN
#endif
#endif /* MY_COMPILER_INCLUDED */

454
3rdparty/mysql/include/my_config.h vendored Normal file
View File

@@ -0,0 +1,454 @@
/* Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifndef MY_CONFIG_H
#define MY_CONFIG_H
/*
* From configure.cmake, in order of appearance
*/
/* #undef HAVE_LLVM_LIBCPP */
#define _LARGEFILE_SOURCE 1
/* Libraries */
/* #undef HAVE_LIBM */
/* #undef HAVE_LIBNSL */
/* #undef HAVE_LIBCRYPT */
/* #undef HAVE_LIBSOCKET */
/* #undef HAVE_LIBDL */
/* #undef HAVE_LIBRT */
/* #undef HAVE_LIBWRAP */
/* Header files */
/* #undef HAVE_ALLOCA_H */
/* #undef HAVE_ARPA_INET_H */
/* #undef HAVE_DIRENT_H */
/* #undef HAVE_DLFCN_H */
/* #undef HAVE_EXECINFO_H */
/* #undef HAVE_FPU_CONTROL_H */
/* #undef HAVE_GRP_H */
/* #undef HAVE_IEEEFP_H */
/* #undef HAVE_LANGINFO_H */
#define HAVE_MALLOC_H 1
/* #undef HAVE_NETINET_IN_H */
/* #undef HAVE_POLL_H */
/* #undef HAVE_PWD_H */
/* #undef HAVE_STRINGS_H */
/* #undef HAVE_SYS_CDEFS_H */
/* #undef HAVE_SYS_IOCTL_H */
/* #undef HAVE_SYS_MMAN_H */
/* #undef HAVE_SYS_RESOURCE_H */
/* #undef HAVE_SYS_SELECT_H */
/* #undef HAVE_SYS_SOCKET_H */
/* #undef HAVE_TERM_H */
/* #undef HAVE_TERMIOS_H */
/* #undef HAVE_TERMIO_H */
/* #undef HAVE_UNISTD_H */
/* #undef HAVE_SYS_WAIT_H */
/* #undef HAVE_SYS_PARAM_H */
/* #undef HAVE_FNMATCH_H */
/* #undef HAVE_SYS_UN_H */
/* #undef HAVE_VIS_H */
/* #undef HAVE_SASL_SASL_H */
/* Libevent */
/* #undef HAVE_DEVPOLL */
/* #undef HAVE_SYS_DEVPOLL_H */
/* #undef HAVE_SYS_EPOLL_H */
/* #undef HAVE_TAILQFOREACH */
/* Functions */
#define HAVE_ALIGNED_MALLOC 1
/* #undef HAVE_BACKTRACE */
/* #undef HAVE_PRINTSTACK */
/* #undef HAVE_INDEX */
/* #undef HAVE_CLOCK_GETTIME */
/* #undef HAVE_CUSERID */
/* #undef HAVE_DIRECTIO */
/* #undef HAVE_FTRUNCATE */
#define HAVE_COMPRESS 1
/* #undef HAVE_CRYPT */
/* #undef HAVE_DLOPEN */
/* #undef HAVE_FCHMOD */
/* #undef HAVE_FCNTL */
/* #undef HAVE_FDATASYNC */
/* #undef HAVE_DECL_FDATASYNC */
/* #undef HAVE_FEDISABLEEXCEPT */
/* #undef HAVE_FSEEKO */
/* #undef HAVE_FSYNC */
/* #undef HAVE_GETHOSTBYADDR_R */
/* #undef HAVE_GETHRTIME */
#define HAVE_GETNAMEINFO 1
/* #undef HAVE_GETPASS */
/* #undef HAVE_GETPASSPHRASE */
/* #undef HAVE_GETPWNAM */
/* #undef HAVE_GETPWUID */
/* #undef HAVE_GETRLIMIT */
/* #undef HAVE_GETRUSAGE */
/* #undef HAVE_INITGROUPS */
/* #undef HAVE_ISSETUGID */
/* #undef HAVE_GETUID */
/* #undef HAVE_GETEUID */
/* #undef HAVE_GETGID */
/* #undef HAVE_GETEGID */
/* #undef HAVE_LSTAT */
/* #undef HAVE_MADVISE */
/* #undef HAVE_MALLOC_INFO */
/* #undef HAVE_MEMRCHR */
/* #undef HAVE_MLOCK */
/* #undef HAVE_MLOCKALL */
/* #undef HAVE_MMAP64 */
/* #undef HAVE_POLL */
/* #undef HAVE_POSIX_FALLOCATE */
/* #undef HAVE_POSIX_MEMALIGN */
/* #undef HAVE_PREAD */
/* #undef HAVE_PTHREAD_CONDATTR_SETCLOCK */
/* #undef HAVE_PTHREAD_SIGMASK */
/* #undef HAVE_READDIR_R */
/* #undef HAVE_READLINK */
/* #undef HAVE_REALPATH */
/* #undef HAVE_SETFD */
/* #undef HAVE_SIGACTION */
/* #undef HAVE_SLEEP */
/* #undef HAVE_STPCPY */
/* #undef HAVE_STPNCPY */
/* #undef HAVE_STRLCPY */
#define HAVE_STRNLEN 1
/* #undef HAVE_STRLCAT */
/* #undef HAVE_STRSIGNAL */
/* #undef HAVE_FGETLN */
/* #undef HAVE_STRSEP */
#define HAVE_TELL 1
/* #undef HAVE_VASPRINTF */
/* #undef HAVE_MEMALIGN */
/* #undef HAVE_NL_LANGINFO */
/* #undef HAVE_HTONLL */
/* #undef DNS_USE_CPU_CLOCK_FOR_ID */
/* #undef HAVE_EPOLL */
/* #undef HAVE_EVENT_PORTS */
#define HAVE_INET_NTOP 1
/* #undef HAVE_WORKING_KQUEUE */
/* #undef HAVE_TIMERADD */
/* #undef HAVE_TIMERCLEAR */
/* #undef HAVE_TIMERCMP */
/* #undef HAVE_TIMERISSET */
/* WL2373 */
/* #undef HAVE_SYS_TIME_H */
/* #undef HAVE_SYS_TIMES_H */
/* #undef HAVE_TIMES */
/* #undef HAVE_GETTIMEOFDAY */
/* Symbols */
/* #undef HAVE_LRAND48 */
/* #undef GWINSZ_IN_SYS_IOCTL */
/* #undef FIONREAD_IN_SYS_IOCTL */
/* #undef FIONREAD_IN_SYS_FILIO */
/* #undef HAVE_SIGEV_THREAD_ID */
/* #undef HAVE_SIGEV_PORT */
#define HAVE_LOG2 1
#define HAVE_ISINF 1
/* #undef HAVE_KQUEUE_TIMERS */
/* #undef HAVE_POSIX_TIMERS */
/* Endianess */
/* #undef WORDS_BIGENDIAN */
/* Type sizes */
#define SIZEOF_VOIDP 8
#define SIZEOF_CHARP 8
#define SIZEOF_LONG 4
#define SIZEOF_SHORT 2
#define SIZEOF_INT 4
#define SIZEOF_LONG_LONG 8
#define SIZEOF_OFF_T 4
#define SIZEOF_TIME_T 8
/* #undef HAVE_UINT */
/* #undef HAVE_ULONG */
/* #undef HAVE_U_INT32_T */
#define HAVE_STRUCT_TIMESPEC
/* Support for tagging symbols with __attribute__((visibility("hidden"))) */
/* #undef HAVE_VISIBILITY_HIDDEN */
/* Code tests*/
#define STACK_DIRECTION -1
/* #undef TIME_WITH_SYS_TIME */
#define NO_FCNTL_NONBLOCK 1
/* #undef HAVE_PAUSE_INSTRUCTION */
/* #undef HAVE_FAKE_PAUSE_INSTRUCTION */
/* #undef HAVE_HMT_PRIORITY_INSTRUCTION */
/* #undef HAVE_ABI_CXA_DEMANGLE */
/* #undef HAVE_BSS_START */
/* #undef HAVE_BUILTIN_UNREACHABLE */
/* #undef HAVE_BUILTIN_EXPECT */
/* #undef HAVE_BUILTIN_STPCPY */
/* #undef HAVE_GCC_ATOMIC_BUILTINS */
/* #undef HAVE_GCC_SYNC_BUILTINS */
/* #undef HAVE_VALGRIND */
/* IPV6 */
/* #undef HAVE_NETINET_IN6_H */
#define HAVE_STRUCT_SOCKADDR_IN6 1
#define HAVE_STRUCT_IN6_ADDR 1
#define HAVE_IPV6 1
/* #undef ss_family */
/* #undef HAVE_SOCKADDR_IN_SIN_LEN */
/* #undef HAVE_SOCKADDR_IN6_SIN6_LEN */
/*
* Platform specific CMake files
*/
#define MACHINE_TYPE "x86_64"
/* #undef HAVE_LINUX_LARGE_PAGES */
/* #undef HAVE_SOLARIS_LARGE_PAGES */
/* #undef HAVE_SOLARIS_ATOMIC */
/* #undef HAVE_SOLARIS_STYLE_GETHOST */
#define SYSTEM_TYPE "Win64"
/* Windows stuff, mostly functions, that have Posix analogs but named differently */
/* #undef IPPROTO_IPV6 */
/* #undef IPV6_V6ONLY */
/* This should mean case insensitive file system */
#define FN_NO_CASE_SENSE 1
/*
* From main CMakeLists.txt
*/
#define MAX_INDEXES 64U
/* #undef WITH_INNODB_MEMCACHED */
/* #undef ENABLE_MEMCACHED_SASL */
/* #undef ENABLE_MEMCACHED_SASL_PWDB */
#define ENABLED_PROFILING 1
/* #undef HAVE_ASAN */
#define ENABLED_LOCAL_INFILE 1
/* #undef OPTIMIZER_TRACE */
#define DEFAULT_MYSQL_HOME "C:/Program Files/MySQL/MySQL Server 6.1"
#define SHAREDIR "share"
#define DEFAULT_BASEDIR "C:/Program Files/MySQL/MySQL Server 6.1"
#define MYSQL_DATADIR "C:/Program Files/MySQL/MySQL Server 6.1/data"
#define MYSQL_KEYRINGDIR "C:/Program Files/MySQL/MySQL Server 6.1/keyring"
#define DEFAULT_CHARSET_HOME "C:/Program Files/MySQL/MySQL Server 6.1"
#define PLUGINDIR "C:/Program Files/MySQL/MySQL Server 6.1/lib/plugin"
/* #undef DEFAULT_SYSCONFDIR */
#define DEFAULT_TMPDIR ""
#define INSTALL_SBINDIR "/bin"
#define INSTALL_BINDIR "/bin"
#define INSTALL_MYSQLSHAREDIR "/share"
#define INSTALL_SHAREDIR "/share"
#define INSTALL_PLUGINDIR "/lib/plugin"
#define INSTALL_INCLUDEDIR "/include"
#define INSTALL_SCRIPTDIR "/scripts"
#define INSTALL_MYSQLDATADIR "/data"
#define INSTALL_MYSQLKEYRINGDIR "/keyring"
/* #undef INSTALL_PLUGINTESTDIR */
#define INSTALL_INFODIR "/docs"
#define INSTALL_MYSQLTESTDIR "/mysql-test"
#define INSTALL_DOCREADMEDIR "/."
#define INSTALL_DOCDIR "/docs"
#define INSTALL_MANDIR "/man"
#define INSTALL_SUPPORTFILESDIR "/support-files"
#define INSTALL_LIBDIR "/lib"
/*
* Readline
*/
/* #undef HAVE_MBSTATE_T */
/* #undef HAVE_LANGINFO_CODESET */
/* #undef HAVE_WCSDUP */
/* #undef HAVE_WCHAR_T */
/* #undef HAVE_WINT_T */
/* #undef HAVE_CURSES_H */
/* #undef HAVE_NCURSES_H */
/* #undef USE_LIBEDIT_INTERFACE */
/* #undef HAVE_HIST_ENTRY */
/* #undef USE_NEW_EDITLINE_INTERFACE */
/*
* Libedit
*/
/* #undef HAVE_DECL_TGOTO */
/*
* DTrace
*/
/* #undef HAVE_DTRACE */
/*
* Character sets
*/
#define MYSQL_DEFAULT_CHARSET_NAME "latin1"
#define MYSQL_DEFAULT_COLLATION_NAME "latin1_swedish_ci"
#define HAVE_CHARSET_armscii8 1
#define HAVE_CHARSET_ascii 1
#define HAVE_CHARSET_big5 1
#define HAVE_CHARSET_cp1250 1
#define HAVE_CHARSET_cp1251 1
#define HAVE_CHARSET_cp1256 1
#define HAVE_CHARSET_cp1257 1
#define HAVE_CHARSET_cp850 1
#define HAVE_CHARSET_cp852 1
#define HAVE_CHARSET_cp866 1
#define HAVE_CHARSET_cp932 1
#define HAVE_CHARSET_dec8 1
#define HAVE_CHARSET_eucjpms 1
#define HAVE_CHARSET_euckr 1
#define HAVE_CHARSET_gb2312 1
#define HAVE_CHARSET_gbk 1
#define HAVE_CHARSET_gb18030 1
#define HAVE_CHARSET_geostd8 1
#define HAVE_CHARSET_greek 1
#define HAVE_CHARSET_hebrew 1
#define HAVE_CHARSET_hp8 1
#define HAVE_CHARSET_keybcs2 1
#define HAVE_CHARSET_koi8r 1
#define HAVE_CHARSET_koi8u 1
#define HAVE_CHARSET_latin1 1
#define HAVE_CHARSET_latin2 1
#define HAVE_CHARSET_latin5 1
#define HAVE_CHARSET_latin7 1
#define HAVE_CHARSET_macce 1
#define HAVE_CHARSET_macroman 1
#define HAVE_CHARSET_sjis 1
#define HAVE_CHARSET_swe7 1
#define HAVE_CHARSET_tis620 1
#define HAVE_CHARSET_ucs2 1
#define HAVE_CHARSET_ujis 1
#define HAVE_CHARSET_utf8mb4 1
/* #undef HAVE_CHARSET_utf8mb3 */
#define HAVE_CHARSET_utf8 1
#define HAVE_CHARSET_utf16 1
#define HAVE_CHARSET_utf32 1
#define HAVE_UCA_COLLATIONS 1
/*
* Feature set
*/
#define WITH_PARTITION_STORAGE_ENGINE 1
/*
* Performance schema
*/
/* #undef WITH_PERFSCHEMA_STORAGE_ENGINE */
/* #undef DISABLE_PSI_THREAD */
/* #undef DISABLE_PSI_MUTEX */
/* #undef DISABLE_PSI_RWLOCK */
/* #undef DISABLE_PSI_COND */
/* #undef DISABLE_PSI_FILE */
/* #undef DISABLE_PSI_TABLE */
/* #undef DISABLE_PSI_SOCKET */
/* #undef DISABLE_PSI_STAGE */
/* #undef DISABLE_PSI_STATEMENT */
/* #undef DISABLE_PSI_SP */
/* #undef DISABLE_PSI_PS */
/* #undef DISABLE_PSI_IDLE */
/* #undef DISABLE_PSI_STATEMENT_DIGEST */
/* #undef DISABLE_PSI_METADATA */
/* #undef DISABLE_PSI_MEMORY */
/* #undef DISABLE_PSI_TRANSACTION */
/*
* syscall
*/
/* #undef HAVE_SYS_THREAD_SELFID */
/* #undef HAVE_SYS_GETTID */
/* #undef HAVE_PTHREAD_GETTHREADID_NP */
/* #undef HAVE_PTHREAD_SETNAME_NP */
/* #undef HAVE_INTEGER_PTHREAD_SELF */
/* Platform-specific C++ compiler behaviors we rely upon */
/*
This macro defines whether the compiler in use needs a 'typename' keyword
to access the types defined inside a class template, such types are called
dependent types. Some compilers require it, some others forbid it, and some
others may work with or without it. For example, GCC requires the 'typename'
keyword whenever needing to access a type inside a template, but msvc
forbids it.
*/
#define HAVE_IMPLICIT_DEPENDENT_NAME_TYPING 1
/*
* MySQL version
*/
#define DOT_FRM_VERSION 6
#define MYSQL_VERSION_MAJOR 6
#define MYSQL_VERSION_MINOR 1
#define MYSQL_VERSION_PATCH 9
#define MYSQL_VERSION_EXTRA ""
#define PACKAGE "mysql"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME "MySQL Server"
#define PACKAGE_STRING "MySQL Server 6.1.9"
#define PACKAGE_TARNAME "mysql"
#define PACKAGE_VERSION "6.1.9"
#define VERSION "6.1.9"
#define PROTOCOL_VERSION 10
/*
* CPU info
*/
#define CPU_LEVEL1_DCACHE_LINESIZE 64
/*
* NDB
*/
/* #undef WITH_NDBCLUSTER_STORAGE_ENGINE */
/* #undef HAVE_PTHREAD_SETSCHEDPARAM */
/*
* Other
*/
/* #undef EXTRA_DEBUG */
/* #undef HAVE_CHOWN */
/*
* Hardcoded values needed by libevent/NDB/memcached
*/
#define HAVE_FCNTL_H 1
#define HAVE_GETADDRINFO 1
#define HAVE_INTTYPES_H 1
/* libevent's select.c is not Windows compatible */
#ifndef _WIN32
#define HAVE_SELECT 1
#endif
#define HAVE_SIGNAL_H 1
#define HAVE_STDARG_H 1
#define HAVE_STDINT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRDUP 1
#define HAVE_STRTOK_R 1
#define HAVE_STRTOLL 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
#define SIZEOF_CHAR 1
/*
* Needed by libevent
*/
/* #undef HAVE_SOCKLEN_T */
/* For --secure-file-priv */
#define DEFAULT_SECURE_FILE_PRIV_DIR "NULL"
#define DEFAULT_SECURE_FILE_PRIV_EMBEDDED_DIR "NULL"
/* #undef HAVE_LIBNUMA */
/* For default value of --early_plugin_load */
/* #undef DEFAULT_EARLY_PLUGIN_LOAD */
#endif

View File

@@ -1,9 +1,8 @@
/* Copyright (C) 2000 MySQL AB
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
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; either version 2 of the License, or
(at your option) any later version.
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; without even the implied warranty of
@@ -12,90 +11,235 @@
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 */
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifndef _dbug_h
#define _dbug_h
#ifndef MY_DBUG_INCLUDED
#define MY_DBUG_INCLUDED
#ifdef __cplusplus
#include "my_global.h" /* MYSQL_PLUGIN_IMPORT */
#ifdef __cplusplus
extern "C" {
#endif
#if !defined(DBUG_OFF) && !defined(_lint)
extern int _db_on_,_no_db_;
extern FILE *_db_fp_;
extern char *_db_process_;
extern int _db_keyword_(const char *keyword);
extern int _db_strict_keyword_(const char *keyword);
extern void _db_setjmp_(void);
extern void _db_longjmp_(void);
extern void _db_push_(const char *control);
extern void _db_pop_(void);
extern void _db_enter_(const char *_func_,const char *_file_,uint _line_,
const char **_sfunc_,const char **_sfile_,
uint *_slevel_, char ***);
extern void _db_return_(uint _line_,const char **_sfunc_,const char **_sfile_,
uint *_slevel_);
extern void _db_pargs_(uint _line_,const char *keyword);
extern void _db_doprnt_ _VARARGS((const char *format,...));
extern void _db_dump_(uint _line_,const char *keyword,const char *memory,
uint length);
extern void _db_output_(uint flag);
extern void _db_lock_file(void);
extern void _db_unlock_file(void);
#if !defined(DBUG_OFF)
#define DBUG_ENTER(a) const char *_db_func_, *_db_file_; uint _db_level_; \
char **_db_framep_; \
_db_enter_ (a,__FILE__,__LINE__,&_db_func_,&_db_file_,&_db_level_, \
&_db_framep_)
#define DBUG_LEAVE \
(_db_return_ (__LINE__, &_db_func_, &_db_file_, &_db_level_))
#define DBUG_RETURN(a1) {DBUG_LEAVE; return(a1);}
#define DBUG_VOID_RETURN {DBUG_LEAVE; return;}
struct _db_stack_frame_ {
const char *func; /* function name of the previous stack frame */
const char *file; /* filename of the function of previous frame */
uint level; /* this nesting level, highest bit enables tracing */
struct _db_stack_frame_ *prev; /* pointer to the previous frame */
};
struct _db_code_state_;
extern MYSQL_PLUGIN_IMPORT my_bool _dbug_on_;
extern my_bool _db_keyword_(struct _db_code_state_ *, const char *, int);
extern int _db_explain_(struct _db_code_state_ *cs, char *buf, size_t len);
extern int _db_explain_init_(char *buf, size_t len);
extern int _db_is_pushed_(void);
extern void _db_setjmp_(void);
extern void _db_longjmp_(void);
extern void _db_process_(const char *name);
extern void _db_push_(const char *control);
extern void _db_pop_(void);
extern void _db_set_(const char *control);
extern void _db_set_init_(const char *control);
extern void _db_enter_(const char *_func_, const char *_file_, uint _line_,
struct _db_stack_frame_ *_stack_frame_);
extern void _db_return_(uint _line_, struct _db_stack_frame_ *_stack_frame_);
extern void _db_pargs_(uint _line_,const char *keyword);
extern int _db_enabled_();
extern void _db_doprnt_(const char *format,...)
MY_ATTRIBUTE((format(printf, 1, 2)));
extern void _db_doputs_(const char *log);
extern void _db_dump_(uint _line_,const char *keyword,
const unsigned char *memory, size_t length);
extern void _db_end_(void);
extern void _db_lock_file_(void);
extern void _db_unlock_file_(void);
extern FILE *_db_fp_(void);
extern void _db_flush_();
extern const char* _db_get_func_(void);
#define DBUG_ENTER(a) struct _db_stack_frame_ _db_stack_frame_; \
_db_enter_ (a,__FILE__,__LINE__,&_db_stack_frame_)
#define DBUG_LEAVE _db_return_ (__LINE__, &_db_stack_frame_)
#define DBUG_RETURN(a1) do {DBUG_LEAVE; return(a1);} while(0)
#define DBUG_VOID_RETURN do {DBUG_LEAVE; return;} while(0)
#define DBUG_EXECUTE(keyword,a1) \
{if (_db_on_) {if (_db_keyword_ (keyword)) { a1 }}}
do {if (_db_keyword_(0, (keyword), 0)) { a1 }} while(0)
#define DBUG_EXECUTE_IF(keyword,a1) \
do {if (_db_keyword_(0, (keyword), 1)) { a1 }} while(0)
#define DBUG_EVALUATE(keyword,a1,a2) \
(_db_keyword_(0,(keyword), 0) ? (a1) : (a2))
#define DBUG_EVALUATE_IF(keyword,a1,a2) \
(_db_keyword_(0,(keyword), 1) ? (a1) : (a2))
#define DBUG_PRINT(keyword,arglist) \
{if (_db_on_) {_db_pargs_(__LINE__,keyword); _db_doprnt_ arglist;}}
do \
{ \
if (_dbug_on_) \
{ \
_db_pargs_(__LINE__,keyword); \
if (_db_enabled_()) \
{ \
_db_doprnt_ arglist; \
} \
} \
} while(0)
/*
An alternate to DBUG_PRINT() macro, which takes a single string
as the second argument.
*/
#define DBUG_PUTS(keyword,arg) \
do \
{ \
if (_dbug_on_) \
{ \
_db_pargs_(__LINE__,keyword); \
if (_db_enabled_()) \
{ \
_db_doputs_(arg); \
} \
} \
} while(0)
#define DBUG_PUSH(a1) _db_push_ (a1)
#define DBUG_POP() _db_pop_ ()
#define DBUG_PROCESS(a1) (_db_process_ = a1)
#define DBUG_FILE (_db_fp_)
#define DBUG_SET(a1) _db_set_ (a1)
#define DBUG_SET_INITIAL(a1) _db_set_init_ (a1)
#define DBUG_PROCESS(a1) _db_process_(a1)
#define DBUG_FILE _db_fp_()
#define DBUG_SETJMP(a1) (_db_setjmp_ (), setjmp (a1))
#define DBUG_LONGJMP(a1,a2) (_db_longjmp_ (), longjmp (a1, a2))
#define DBUG_DUMP(keyword,a1,a2)\
{if (_db_on_) {_db_dump_(__LINE__,keyword,a1,a2);}}
#define DBUG_IN_USE (_db_fp_ && _db_fp_ != stderr)
#define DEBUGGER_OFF _no_db_=1;_db_on_=0;
#define DEBUGGER_ON _no_db_=0
#define DBUG_LOCK_FILE { _db_lock_file(); }
#define DBUG_UNLOCK_FILE { _db_unlock_file(); }
#define DBUG_OUTPUT(A) { _db_output_(A); }
#define DBUG_DUMP(keyword,a1,a2) _db_dump_(__LINE__,keyword,a1,a2)
#define DBUG_END() _db_end_ ()
#define DBUG_LOCK_FILE _db_lock_file_()
#define DBUG_UNLOCK_FILE _db_unlock_file_()
#define DBUG_ASSERT(A) assert(A)
#define DBUG_EXECUTE_IF(keyword,a1) \
{if (_db_on_) {if (_db_strict_keyword_ (keyword)) { a1 }}}
#else /* No debugger */
#define DBUG_EXPLAIN(buf,len) _db_explain_(0, (buf),(len))
#define DBUG_EXPLAIN_INITIAL(buf,len) _db_explain_init_((buf),(len))
#define DEBUGGER_OFF do { _dbug_on_= 0; } while(0)
#define DEBUGGER_ON do { _dbug_on_= 1; } while(0)
#ifndef _WIN32
#define DBUG_ABORT() (_db_flush_(), abort())
#else
/*
Avoid popup with abort/retry/ignore buttons. When BUG#31745 is fixed we can
call abort() instead of _exit(2) (now it would cause a "test signal" popup).
*/
#include <crtdbg.h>
#define DBUG_ABORT() (_db_flush_(),\
(void)_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE),\
(void)_CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR),\
_exit(2))
#endif
#define DBUG_CHECK_CRASH(func, op) \
do { char _dbuf_[255]; strxnmov(_dbuf_, sizeof(_dbuf_)-1, (func), (op)); \
DBUG_EXECUTE_IF(_dbuf_, DBUG_ABORT()); } while(0)
#define DBUG_CRASH_ENTER(func) \
DBUG_ENTER(func); DBUG_CHECK_CRASH(func, "_crash_enter")
#define DBUG_CRASH_RETURN(val) \
DBUG_CHECK_CRASH(_db_get_func_(), "_crash_return")
#define DBUG_CRASH_VOID_RETURN \
DBUG_CHECK_CRASH (_db_get_func_(), "_crash_return")
/*
Make the program fail, without creating a core file.
abort() will send SIGABRT which (most likely) generates core.
Use SIGKILL instead, which cannot be caught.
We also pause the current thread, until the signal is actually delivered.
An alternative would be to use _exit(EXIT_FAILURE),
but then valgrind would report lots of memory leaks.
*/
#ifdef _WIN32
#define DBUG_SUICIDE() DBUG_ABORT()
#else
extern void _db_suicide_();
extern void _db_flush_gcov_();
#define DBUG_SUICIDE() (_db_flush_(), _db_suicide_())
#endif
#else /* No debugger */
#define DBUG_ENTER(a1)
#define DBUG_RETURN(a1) return(a1)
#define DBUG_VOID_RETURN return
#define DBUG_EXECUTE(keyword,a1) {}
#define DBUG_EXECUTE_IF(keyword,a1) {}
#define DBUG_PRINT(keyword,arglist) {}
#define DBUG_PUSH(a1) {}
#define DBUG_POP() {}
#define DBUG_PROCESS(a1) {}
#define DBUG_LEAVE
#define DBUG_RETURN(a1) do { return(a1); } while(0)
#define DBUG_VOID_RETURN do { return; } while(0)
#define DBUG_EXECUTE(keyword,a1) do { } while(0)
#define DBUG_EXECUTE_IF(keyword,a1) do { } while(0)
#define DBUG_EVALUATE(keyword,a1,a2) (a2)
#define DBUG_EVALUATE_IF(keyword,a1,a2) (a2)
#define DBUG_PRINT(keyword,arglist) do { } while(0)
#define DBUG_PUTS(keyword,arg) do { } while(0)
#define DBUG_LOG(keyword,arglist) do { } while(0)
#define DBUG_PUSH(a1) do { } while(0)
#define DBUG_SET(a1) do { } while(0)
#define DBUG_SET_INITIAL(a1) do { } while(0)
#define DBUG_POP() do { } while(0)
#define DBUG_PROCESS(a1) do { } while(0)
#define DBUG_SETJMP(a1) setjmp(a1)
#define DBUG_LONGJMP(a1) longjmp(a1)
#define DBUG_DUMP(keyword,a1,a2) do { } while(0)
#define DBUG_END() do { } while(0)
#define DBUG_ASSERT(A) do { } while(0)
#define DBUG_LOCK_FILE do { } while(0)
#define DBUG_FILE (stderr)
#define DBUG_SETJMP setjmp
#define DBUG_LONGJMP longjmp
#define DBUG_DUMP(keyword,a1,a2) {}
#define DBUG_IN_USE 0
#define DEBUGGER_OFF
#define DEBUGGER_ON
#define DBUG_LOCK_FILE
#define DBUG_UNLOCK_FILE
#define DBUG_OUTPUT(A)
#define DBUG_ASSERT(A) {}
#define DBUG_UNLOCK_FILE do { } while(0)
#define DBUG_EXPLAIN(buf,len)
#define DBUG_EXPLAIN_INITIAL(buf,len)
#define DEBUGGER_OFF do { } while(0)
#define DEBUGGER_ON do { } while(0)
#define DBUG_ABORT() do { } while(0)
#define DBUG_CRASH_ENTER(func)
#define DBUG_CRASH_RETURN(val) do { return(val); } while(0)
#define DBUG_CRASH_VOID_RETURN do { return; } while(0)
#define DBUG_SUICIDE() do { } while(0)
#endif
#ifdef EXTRA_DEBUG
/**
Sync points allow us to force the server to reach a certain line of code
and block there until the client tells the server it is ok to go on.
The client tells the server to block with SELECT GET_LOCK()
and unblocks it with SELECT RELEASE_LOCK(). Used for debugging difficult
concurrency problems
*/
#define DBUG_SYNC_POINT(lock_name,lock_timeout) \
debug_sync_point(lock_name,lock_timeout)
void debug_sync_point(const char* lock_name, uint lock_timeout);
#else
#define DBUG_SYNC_POINT(lock_name,lock_timeout)
#endif /* EXTRA_DEBUG */
#ifdef __cplusplus
}
#endif
#endif
#ifdef __cplusplus
#if !defined(DBUG_OFF)
#include <sstream>
/*
A C++ interface to the DBUG_PUTS macro. The DBUG_LOG macro also
takes two arguments. The first argument is the keyword, as that of the
DBUG_PRINT. The 2nd argument 'v' will be passed to a C++ output stream.
This enables the use of C++ style output stream operator. In the code, it
will be used as follows:
DBUG_LOG("blob", "space: " << space_id);
Note: DBUG_PRINT() has a limitation of 1024 bytes for a single
print out. This limitation is not there for DBUG_PUTS and DBUG_LOG
macros.
*/
#define DBUG_LOG(keyword, v) do { \
std::ostringstream sout; \
sout << v; \
DBUG_PUTS(keyword, sout.str().c_str()); \
} while(0)
#endif /* DBUG_OFF */
#endif /* __cplusplus */
#endif /* MY_DBUG_INCLUDED */

93
3rdparty/mysql/include/my_dir.h vendored Normal file
View File

@@ -0,0 +1,93 @@
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifndef MY_DIR_H
#define MY_DIR_H
#include "my_global.h"
#include <sys/stat.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Defines for my_dir and my_stat */
#ifdef _WIN32
#define S_IROTH _S_IREAD
#define S_IFIFO _S_IFIFO
#endif
#define MY_S_IFMT S_IFMT /* type of file */
#define MY_S_IFDIR S_IFDIR /* directory */
#define MY_S_IFCHR S_IFCHR /* character special */
#define MY_S_IFBLK S_IFBLK /* block special */
#define MY_S_IFREG S_IFREG /* regular */
#define MY_S_IFIFO S_IFIFO /* fifo */
#define MY_S_ISUID S_ISUID /* set user id on execution */
#define MY_S_ISGID S_ISGID /* set group id on execution */
#define MY_S_ISVTX S_ISVTX /* save swapped text even after use */
#define MY_S_IREAD S_IREAD /* read permission, owner */
#define MY_S_IWRITE S_IWRITE /* write permission, owner */
#define MY_S_IEXEC S_IEXEC /* execute/search permission, owner */
#define MY_S_ISDIR(m) (((m) & MY_S_IFMT) == MY_S_IFDIR)
#define MY_S_ISCHR(m) (((m) & MY_S_IFMT) == MY_S_IFCHR)
#define MY_S_ISBLK(m) (((m) & MY_S_IFMT) == MY_S_IFBLK)
#define MY_S_ISREG(m) (((m) & MY_S_IFMT) == MY_S_IFREG)
#define MY_S_ISFIFO(m) (((m) & MY_S_IFMT) == MY_S_IFIFO)
#define MY_DONT_SORT 512 /* my_lib; Don't sort files */
#define MY_WANT_STAT 1024 /* my_lib; stat files */
/* typedefs for my_dir & my_stat */
#if(_MSC_VER)
#define MY_STAT struct _stati64 /* 64 bit file size */
#else
#define MY_STAT struct stat /* Orginal struct have what we need */
#endif
/* Struct describing one file returned from my_dir */
typedef struct fileinfo
{
char *name;
MY_STAT *mystat;
} FILEINFO;
typedef struct st_my_dir /* Struct returned from my_dir */
{
/*
These members are just copies of parts of DYNAMIC_ARRAY structure,
which is allocated right after the end of MY_DIR structure (MEM_ROOT
for storing names is also resides there). We've left them here because
we don't want to change code that uses my_dir.
*/
struct fileinfo *dir_entry;
uint number_off_files;
} MY_DIR;
extern MY_DIR *my_dir(const char *path,myf MyFlags);
extern void my_dirend(MY_DIR *buffer);
extern MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags);
extern int my_fstat(int filenr, MY_STAT *stat_area, myf MyFlags);
#ifdef __cplusplus
}
#endif
#endif /* MY_DIR_H */

149
3rdparty/mysql/include/my_getopt.h vendored Normal file
View File

@@ -0,0 +1,149 @@
/*
Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifndef _my_getopt_h
#define _my_getopt_h
#include "my_sys.h" /* loglevel */
C_MODE_START
#define GET_NO_ARG 1
#define GET_BOOL 2
#define GET_INT 3
#define GET_UINT 4
#define GET_LONG 5
#define GET_ULONG 6
#define GET_LL 7
#define GET_ULL 8
#define GET_STR 9
#define GET_STR_ALLOC 10
#define GET_DISABLED 11
#define GET_ENUM 12
#define GET_SET 13
#define GET_DOUBLE 14
#define GET_FLAGSET 15
#define GET_PASSWORD 16
#if SIZEOF_INT == 4
#define GET_INT32 GET_INT
#define GET_UINT32 GET_UINT
#elif SIZEOF_LONG == 4
#define GET_INT32 GET_LONG
#define GET_UINT32 GET_ULONG
#else
#error Neither int or long is of 4 bytes width
#endif
#define GET_ASK_ADDR 128
#define GET_TYPE_MASK 127
/**
Enumeration of the my_option::arg_type attributes.
It should be noted that for historical reasons variables with the combination
arg_type=NO_ARG, my_option::var_type=GET_BOOL still accepts
arguments. This is someone counter intuitive and care should be taken
if the code is refactored.
*/
enum get_opt_arg_type { NO_ARG, OPT_ARG, REQUIRED_ARG };
struct st_typelib;
struct my_option
{
const char *name; /**< Name of the option. name=NULL
marks the end of the my_option[]
array.
*/
int id; /**< For 0<id<=255 it's means one
character for a short option
(like -A), if >255 no short option
is created, but a long option still
can be identified uniquely in the
my_get_one_option() callback.
If an opton needs neither special
treatment in the my_get_one_option()
nor one-letter short equivalent
use id=0.
id=-1 is a special case and is used
to generate deprecation warnings for
plugin options. It should not be
used for anything else.
*/
const char *comment; /**< option comment, for autom. --help.
if it's NULL the option is not
visible in --help.
*/
void *value; /**< A pointer to the variable value */
void *u_max_value; /**< The user def. max variable value */
struct st_typelib *typelib; /**< Pointer to possible values */
ulong var_type; /**< GET_BOOL, GET_ULL, etc */
enum get_opt_arg_type arg_type; /**< e.g. REQUIRED_ARG or OPT_ARG */
longlong def_value; /**< Default value */
longlong min_value; /**< Min allowed value (for numbers) */
ulonglong max_value; /**< Max allowed value (for numbers) */
longlong sub_size; /**< Unused */
long block_size; /**< Value should be a mult. of this (for numbers) */
void *app_type; /**< To be used by an application */
};
typedef my_bool (*my_get_one_option)(int, const struct my_option *, char *);
/**
Used to retrieve a reference to the object (variable) that holds the value
for the given option. For example, if var_type is GET_UINT, the function
must return a pointer to a variable of type uint. A argument is stored in
the location pointed to by the returned pointer.
*/
typedef void *(*my_getopt_value)(const char *, size_t, const struct my_option *,
int *);
extern char *disabled_my_option;
extern my_bool my_getopt_print_errors;
extern my_bool my_getopt_skip_unknown;
extern my_error_reporter my_getopt_error_reporter;
extern int handle_options (int *argc, char ***argv,
const struct my_option *longopts, my_get_one_option);
extern int my_handle_options (int *argc, char ***argv,
const struct my_option *longopts,
my_get_one_option,
const char **command_list, my_bool ignore_unknown_option);
extern void print_cmdline_password_warning();
extern void my_cleanup_options(const struct my_option *options);
extern void my_cleanup_options(const struct my_option *options);
extern void my_print_help(const struct my_option *options);
extern void my_print_variables(const struct my_option *options);
extern void my_print_variables_ex(const struct my_option *options, FILE* file);
extern void my_getopt_register_get_addr(my_getopt_value);
ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp,
my_bool *fix);
longlong getopt_ll_limit_value(longlong, const struct my_option *,
my_bool *fix);
double getopt_double_limit_value(double num, const struct my_option *optp,
my_bool *fix);
my_bool getopt_compare_strings(const char *s, const char *t, uint length);
ulonglong max_of_int_range(int var_type);
ulonglong getopt_double2ulonglong(double);
double getopt_ulonglong2double(ulonglong);
C_MODE_END
#endif /* _my_getopt_h */

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,8 @@
/* Copyright (C) 2000 MySQL AB
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
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; either version 2 of the License, or
(at your option) any later version.
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; without even the implied warranty of
@@ -12,7 +11,7 @@
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 */
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifndef _list_h_
#define _list_h_
@@ -34,11 +33,11 @@ extern LIST *list_cons(void *data,LIST *root);
extern LIST *list_reverse(LIST *root);
extern void list_free(LIST *root,unsigned int free_data);
extern unsigned int list_length(LIST *);
extern int list_walk(LIST *,list_walk_action action,gptr argument);
extern int list_walk(LIST *,list_walk_action action,unsigned char * argument);
#define list_rest(a) ((a)->next)
#define list_push(a,b) (a)=list_cons((b),(a))
#define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old) ; my_free((gptr) old,MYF(MY_FAE)); }
#define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old); my_free(old); }
#ifdef __cplusplus
}

View File

@@ -1,717 +0,0 @@
/* Copyright (C) 2000 MySQL AB
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; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; 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 */
/* Defines to make different thread packages compatible */
#ifndef _my_pthread_h
#define _my_pthread_h
#include <errno.h>
#ifndef ETIME
#define ETIME ETIMEDOUT /* For FreeBSD */
#endif
#ifdef __cplusplus
#define EXTERNC extern "C"
extern "C" {
#else
#define EXTERNC
#endif /* __cplusplus */
#if defined(__WIN__) || defined(OS2)
#ifdef OS2
typedef ULONG HANDLE;
typedef ULONG DWORD;
typedef int sigset_t;
#endif
#ifdef OS2
typedef HMTX pthread_mutex_t;
#else
typedef CRITICAL_SECTION pthread_mutex_t;
#endif
typedef HANDLE pthread_t;
typedef struct thread_attr {
DWORD dwStackSize ;
DWORD dwCreatingFlag ;
int priority ;
} pthread_attr_t ;
typedef struct { int dummy; } pthread_condattr_t;
/* Implementation of posix conditions */
typedef struct st_pthread_link {
DWORD thread_id;
struct st_pthread_link *next;
} pthread_link;
typedef struct {
uint32 waiting;
#ifdef OS2
HEV semaphore;
#else
HANDLE semaphore;
#endif
} pthread_cond_t;
#ifndef OS2
struct timespec { /* For pthread_cond_timedwait() */
time_t tv_sec;
long tv_nsec;
};
#endif
typedef int pthread_mutexattr_t;
#define win_pthread_self my_thread_var->pthread_self
#ifdef OS2
#define pthread_handler_t EXTERNC void * _Optlink
typedef void * (_Optlink *pthread_handler)(void *);
#else
#define pthread_handler_t EXTERNC void * __cdecl
typedef void * (__cdecl *pthread_handler)(void *);
#endif
void win_pthread_init(void);
int win_pthread_setspecific(void *A,void *B,uint length);
int pthread_create(pthread_t *,pthread_attr_t *,pthread_handler,void *);
int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr);
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
struct timespec *abstime);
int pthread_cond_signal(pthread_cond_t *cond);
int pthread_cond_broadcast(pthread_cond_t *cond);
int pthread_cond_destroy(pthread_cond_t *cond);
int pthread_attr_init(pthread_attr_t *connect_att);
int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack);
int pthread_attr_setprio(pthread_attr_t *connect_att,int priority);
int pthread_attr_destroy(pthread_attr_t *connect_att);
struct tm *localtime_r(const time_t *timep,struct tm *tmp);
struct tm *gmtime_r(const time_t *timep,struct tm *tmp);
void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/
#ifndef OS2
#define ETIMEDOUT 145 /* Win32 doesn't have this */
#define getpid() GetCurrentThreadId()
#endif
#define pthread_self() win_pthread_self
#define HAVE_LOCALTIME_R 1
#define _REENTRANT 1
#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
#ifdef USE_TLS /* For LIBMYSQL.DLL */
#undef SAFE_MUTEX /* This will cause conflicts */
#define pthread_key(T,V) DWORD V
#define pthread_key_create(A,B) ((*A=TlsAlloc())==0xFFFFFFFF)
#define pthread_key_delete(A) TlsFree(A)
#define pthread_getspecific(A) (TlsGetValue(A))
#define my_pthread_getspecific(T,A) ((T) TlsGetValue(A))
#define my_pthread_getspecific_ptr(T,V) ((T) TlsGetValue(V))
#define my_pthread_setspecific_ptr(T,V) (!TlsSetValue((T),(V)))
#define pthread_setspecific(A,B) (!TlsSetValue((A),(B)))
#else
#define pthread_key(T,V) __declspec(thread) T V
#define pthread_key_create(A,B) pthread_dummy(0)
#define pthread_key_delete(A) pthread_dummy(0)
#define pthread_getspecific(A) (&(A))
#define my_pthread_getspecific(T,A) (&(A))
#define my_pthread_getspecific_ptr(T,V) (V)
#define my_pthread_setspecific_ptr(T,V) ((T)=(V),0)
#define pthread_setspecific(A,B) win_pthread_setspecific(&(A),(B),sizeof(A))
#endif /* USE_TLS */
#define pthread_equal(A,B) ((A) == (B))
#ifdef OS2
extern int pthread_mutex_init (pthread_mutex_t *, const pthread_mutexattr_t *);
extern int pthread_mutex_lock (pthread_mutex_t *);
extern int pthread_mutex_unlock (pthread_mutex_t *);
extern int pthread_mutex_destroy (pthread_mutex_t *);
#define my_pthread_setprio(A,B) DosSetPriority(PRTYS_THREAD,PRTYC_NOCHANGE, B, A)
#define pthread_kill(A,B) raise(B)
#define pthread_exit(A) pthread_dummy()
#else
#define pthread_mutex_init(A,B) (InitializeCriticalSection(A),0)
#define pthread_mutex_lock(A) (EnterCriticalSection(A),0)
#define pthread_mutex_trylock(A) (WaitForSingleObject((A), 0) == WAIT_TIMEOUT)
#define pthread_mutex_unlock(A) LeaveCriticalSection(A)
#define pthread_mutex_destroy(A) DeleteCriticalSection(A)
#define my_pthread_setprio(A,B) SetThreadPriority(GetCurrentThread(), (B))
#define pthread_kill(A,B) pthread_dummy(0)
#endif /* OS2 */
/* Dummy defines for easier code */
#define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
#define my_pthread_attr_setprio(A,B) pthread_attr_setprio(A,B)
#define pthread_attr_setscope(A,B)
#define pthread_detach_this_thread()
#define pthread_condattr_init(A)
#define pthread_condattr_destroy(A)
/*Irena: compiler does not like this: */
/*#define my_pthread_getprio(pthread_t thread_id) pthread_dummy(0) */
#define my_pthread_getprio(thread_id) pthread_dummy(0)
#elif defined(HAVE_UNIXWARE7_THREADS)
#include <thread.h>
#include <synch.h>
#ifndef _REENTRANT
#define _REENTRANT
#endif
#define HAVE_NONPOSIX_SIGWAIT
#define pthread_t thread_t
#define pthread_cond_t cond_t
#define pthread_mutex_t mutex_t
#define pthread_key_t thread_key_t
typedef int pthread_attr_t; /* Needed by Unixware 7.0.0 */
#define pthread_key_create(A,B) thr_keycreate((A),(B))
#define pthread_key_delete(A) thr_keydelete(A)
#define pthread_handler_t EXTERNC void *
#define pthread_key(T,V) pthread_key_t V
void * my_pthread_getspecific_imp(pthread_key_t key);
#define my_pthread_getspecific(A,B) ((A) my_pthread_getspecific_imp(B))
#define my_pthread_getspecific_ptr(T,V) my_pthread_getspecific(T,V)
#define pthread_setspecific(A,B) thr_setspecific(A,B)
#define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,V)
#define pthread_create(A,B,C,D) thr_create(NULL,65536L,(C),(D),THR_DETACHED,(A))
#define pthread_cond_init(a,b) cond_init((a),USYNC_THREAD,NULL)
#define pthread_cond_destroy(a) cond_destroy(a)
#define pthread_cond_signal(a) cond_signal(a)
#define pthread_cond_wait(a,b) cond_wait((a),(b))
#define pthread_cond_timedwait(a,b,c) cond_timedwait((a),(b),(c))
#define pthread_cond_broadcast(a) cond_broadcast(a)
#define pthread_mutex_init(a,b) mutex_init((a),USYNC_THREAD,NULL)
#define pthread_mutex_lock(a) mutex_lock(a)
#define pthread_mutex_unlock(a) mutex_unlock(a)
#define pthread_mutex_destroy(a) mutex_destroy(a)
#define pthread_self() thr_self()
#define pthread_exit(A) thr_exit(A)
#define pthread_equal(A,B) (((A) == (B)) ? 1 : 0)
#define pthread_kill(A,B) thr_kill((A),(B))
#define HAVE_PTHREAD_KILL
#define pthread_sigmask(A,B,C) thr_sigsetmask((A),(B),(C))
extern int my_sigwait(const sigset_t *set,int *sig);
#define pthread_detach_this_thread() pthread_dummy(0)
#define pthread_attr_init(A) pthread_dummy(0)
#define pthread_attr_destroy(A) pthread_dummy(0)
#define pthread_attr_setscope(A,B) pthread_dummy(0)
#define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
#define my_pthread_setprio(A,B) pthread_dummy (0)
#define my_pthread_getprio(A) pthread_dummy (0)
#define my_pthread_attr_setprio(A,B) pthread_dummy(0)
#else /* Normal threads */
#ifdef HAVE_rts_threads
#define sigwait org_sigwait
#include <signal.h>
#undef sigwait
#endif
#include <pthread.h>
#ifndef _REENTRANT
#define _REENTRANT
#endif
#ifdef HAVE_THR_SETCONCURRENCY
#include <thread.h> /* Probably solaris */
#endif
#ifdef HAVE_SCHED_H
#include <sched.h>
#endif
#ifdef HAVE_SYNCH_H
#include <synch.h>
#endif
#if defined(__EMX__) && (!defined(EMX_PTHREAD_REV) || (EMX_PTHREAD_REV < 2))
#error Requires at least rev 2 of EMX pthreads library.
#endif
#ifdef __NETWARE__
void my_pthread_exit(void *status);
#define pthread_exit(A) my_pthread_exit(A)
#endif
extern int my_pthread_getprio(pthread_t thread_id);
#define pthread_key(T,V) pthread_key_t V
#define my_pthread_getspecific_ptr(T,V) my_pthread_getspecific(T,(V))
#define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,(void*) (V))
#define pthread_detach_this_thread()
#define pthread_handler_t EXTERNC void *
typedef void *(* pthread_handler)(void *);
/* Test first for RTS or FSU threads */
#if defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM)
#define HAVE_rts_threads
extern int my_pthread_create_detached;
#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
#define PTHREAD_CREATE_DETACHED &my_pthread_create_detached
#define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_GLOBAL
#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_LOCAL
#define USE_ALARM_THREAD
#elif defined(HAVE_mit_thread)
#define USE_ALARM_THREAD
#undef HAVE_LOCALTIME_R
#define HAVE_LOCALTIME_R
#undef HAVE_GMTIME_R
#define HAVE_GMTIME_R
#undef HAVE_PTHREAD_ATTR_SETSCOPE
#define HAVE_PTHREAD_ATTR_SETSCOPE
#undef HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE /* If we are running linux */
#undef HAVE_RWLOCK_T
#undef HAVE_RWLOCK_INIT
#undef HAVE_PTHREAD_RWLOCK_RDLOCK
#undef HAVE_SNPRINTF
#define my_pthread_attr_setprio(A,B)
#endif /* defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM) */
#if defined(_BSDI_VERSION) && _BSDI_VERSION < 199910
int sigwait(sigset_t *set, int *sig);
#endif
#ifndef HAVE_NONPOSIX_SIGWAIT
#define my_sigwait(A,B) sigwait((A),(B))
#else
int my_sigwait(const sigset_t *set,int *sig);
#endif
#ifdef HAVE_NONPOSIX_PTHREAD_MUTEX_INIT
#ifndef SAFE_MUTEX
#define pthread_mutex_init(a,b) my_pthread_mutex_init((a),(b))
extern int my_pthread_mutex_init(pthread_mutex_t *mp,
const pthread_mutexattr_t *attr);
#endif /* SAFE_MUTEX */
#define pthread_cond_init(a,b) my_pthread_cond_init((a),(b))
extern int my_pthread_cond_init(pthread_cond_t *mp,
const pthread_condattr_t *attr);
#endif /* HAVE_NONPOSIX_PTHREAD_MUTEX_INIT */
#if defined(HAVE_SIGTHREADMASK) && !defined(HAVE_PTHREAD_SIGMASK)
#define pthread_sigmask(A,B,C) sigthreadmask((A),(B),(C))
#endif
#if !defined(HAVE_SIGWAIT) && !defined(HAVE_mit_thread) && !defined(HAVE_rts_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS) && !defined(_AIX)
int sigwait(sigset_t *setp, int *sigp); /* Use our implemention */
#endif
/*
We define my_sigset() and use that instead of the system sigset() so that
we can favor an implementation based on sigaction(). On some systems, such
as Mac OS X, sigset() results in flags such as SA_RESTART being set, and
we want to make sure that no such flags are set.
*/
#if defined(HAVE_SIGACTION) && !defined(my_sigset)
#define my_sigset(A,B) do { struct sigaction s; sigset_t set; \
sigemptyset(&set); \
s.sa_handler = (B); \
s.sa_mask = set; \
s.sa_flags = 0; \
sigaction((A), &s, (struct sigaction *) NULL); \
} while (0)
#elif defined(HAVE_SIGSET) && !defined(my_sigset)
#define my_sigset(A,B) sigset((A),(B))
#elif !defined(my_sigset)
#define my_sigset(A,B) signal((A),(B))
#endif
#ifndef my_pthread_setprio
#if defined(HAVE_PTHREAD_SETPRIO_NP) /* FSU threads */
#define my_pthread_setprio(A,B) pthread_setprio_np((A),(B))
#elif defined(HAVE_PTHREAD_SETPRIO)
#define my_pthread_setprio(A,B) pthread_setprio((A),(B))
#else
extern void my_pthread_setprio(pthread_t thread_id,int prior);
#endif
#endif
#ifndef my_pthread_attr_setprio
#ifdef HAVE_PTHREAD_ATTR_SETPRIO
#define my_pthread_attr_setprio(A,B) pthread_attr_setprio((A),(B))
#else
extern void my_pthread_attr_setprio(pthread_attr_t *attr, int priority);
#endif
#endif
#if !defined(HAVE_PTHREAD_ATTR_SETSCOPE) || defined(HAVE_DEC_3_2_THREADS)
#define pthread_attr_setscope(A,B)
#undef HAVE_GETHOSTBYADDR_R /* No definition */
#endif
#if defined(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT) && !defined(SAFE_MUTEX)
extern int my_pthread_cond_timedwait(pthread_cond_t *cond,
pthread_mutex_t *mutex,
struct timespec *abstime);
#define pthread_cond_timedwait(A,B,C) my_pthread_cond_timedwait((A),(B),(C))
#endif
#if defined(OS2)
#define my_pthread_getspecific(T,A) ((T) &(A))
#define pthread_setspecific(A,B) win_pthread_setspecific(&(A),(B),sizeof(A))
#elif !defined( HAVE_NONPOSIX_PTHREAD_GETSPECIFIC)
#define my_pthread_getspecific(A,B) ((A) pthread_getspecific(B))
#else
#define my_pthread_getspecific(A,B) ((A) my_pthread_getspecific_imp(B))
void *my_pthread_getspecific_imp(pthread_key_t key);
#endif /* OS2 */
#ifndef HAVE_LOCALTIME_R
struct tm *localtime_r(const time_t *clock, struct tm *res);
#endif
#ifndef HAVE_GMTIME_R
struct tm *gmtime_r(const time_t *clock, struct tm *res);
#endif
#ifdef HAVE_PTHREAD_CONDATTR_CREATE
/* DCE threads on HPUX 10.20 */
#define pthread_condattr_init pthread_condattr_create
#define pthread_condattr_destroy pthread_condattr_delete
#endif
/* FSU THREADS */
#if !defined(HAVE_PTHREAD_KEY_DELETE) && !defined(pthread_key_delete)
#define pthread_key_delete(A) pthread_dummy(0)
#endif
#ifdef HAVE_CTHREADS_WRAPPER /* For MacOSX */
#define pthread_cond_destroy(A) pthread_dummy(0)
#define pthread_mutex_destroy(A) pthread_dummy(0)
#define pthread_attr_delete(A) pthread_dummy(0)
#define pthread_condattr_delete(A) pthread_dummy(0)
#define pthread_attr_setstacksize(A,B) pthread_dummy(0)
#define pthread_equal(A,B) ((A) == (B))
#define pthread_cond_timedwait(a,b,c) pthread_cond_wait((a),(b))
#define pthread_attr_init(A) pthread_attr_create(A)
#define pthread_attr_destroy(A) pthread_attr_delete(A)
#define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
#define pthread_create(A,B,C,D) pthread_create((A),*(B),(C),(D))
#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
#define pthread_kill(A,B) pthread_dummy(0)
#undef pthread_detach_this_thread
#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(&tmp); }
#endif
#ifdef HAVE_DARWIN5_THREADS
#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
#define pthread_kill(A,B) pthread_dummy(0)
#define pthread_condattr_init(A) pthread_dummy(0)
#define pthread_condattr_destroy(A) pthread_dummy(0)
#undef pthread_detach_this_thread
#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(tmp); }
#endif
#if ((defined(HAVE_PTHREAD_ATTR_CREATE) && !defined(HAVE_SIGWAIT)) || defined(HAVE_DEC_3_2_THREADS)) && !defined(HAVE_CTHREADS_WRAPPER)
/* This is set on AIX_3_2 and Siemens unix (and DEC OSF/1 3.2 too) */
#define pthread_key_create(A,B) \
pthread_keycreate(A,(B) ?\
(pthread_destructor_t) (B) :\
(pthread_destructor_t) pthread_dummy)
#define pthread_attr_init(A) pthread_attr_create(A)
#define pthread_attr_destroy(A) pthread_attr_delete(A)
#define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
#define pthread_create(A,B,C,D) pthread_create((A),*(B),(C),(D))
#ifndef pthread_sigmask
#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
#endif
#define pthread_kill(A,B) pthread_dummy(0)
#undef pthread_detach_this_thread
#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(&tmp); }
#elif !defined(__NETWARE__) /* HAVE_PTHREAD_ATTR_CREATE && !HAVE_SIGWAIT */
#define HAVE_PTHREAD_KILL
#endif
#endif /* defined(__WIN__) */
#if defined(HPUX10) && !defined(DONT_REMAP_PTHREAD_FUNCTIONS)
#undef pthread_cond_timedwait
#define pthread_cond_timedwait(a,b,c) my_pthread_cond_timedwait((a),(b),(c))
int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
struct timespec *abstime);
#endif
#if defined(HPUX10)
#define pthread_attr_getstacksize(A,B) my_pthread_attr_getstacksize(A,B)
void my_pthread_attr_getstacksize(pthread_attr_t *attrib, size_t *size);
#endif
#if defined(HAVE_POSIX1003_4a_MUTEX) && !defined(DONT_REMAP_PTHREAD_FUNCTIONS)
#undef pthread_mutex_trylock
#define pthread_mutex_trylock(a) my_pthread_mutex_trylock((a))
int my_pthread_mutex_trylock(pthread_mutex_t *mutex);
#endif
/* safe_mutex adds checking to mutex for easier debugging */
#if defined(__NETWARE__) && !defined(SAFE_MUTEX_DETECT_DESTROY)
#define SAFE_MUTEX_DETECT_DESTROY
#endif
typedef struct st_safe_mutex_t
{
pthread_mutex_t global,mutex;
const char *file;
uint line,count;
pthread_t thread;
#ifdef SAFE_MUTEX_DETECT_DESTROY
struct st_safe_mutex_info_t *info; /* to track destroying of mutexes */
#endif
} safe_mutex_t;
#ifdef SAFE_MUTEX_DETECT_DESTROY
/*
Used to track the destroying of mutexes. This needs to be a seperate
structure because the safe_mutex_t structure could be freed before
the mutexes are destroyed.
*/
typedef struct st_safe_mutex_info_t
{
struct st_safe_mutex_info_t *next;
struct st_safe_mutex_info_t *prev;
const char *init_file;
uint32 init_line;
} safe_mutex_info_t;
#endif /* SAFE_MUTEX_DETECT_DESTROY */
int safe_mutex_init(safe_mutex_t *mp, const pthread_mutexattr_t *attr,
const char *file, uint line);
int safe_mutex_lock(safe_mutex_t *mp,const char *file, uint line);
int safe_mutex_unlock(safe_mutex_t *mp,const char *file, uint line);
int safe_mutex_destroy(safe_mutex_t *mp,const char *file, uint line);
int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp,const char *file,
uint line);
int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp,
struct timespec *abstime, const char *file, uint line);
void safe_mutex_global_init(void);
void safe_mutex_end(FILE *file);
/* Wrappers if safe mutex is actually used */
#ifdef SAFE_MUTEX
#undef pthread_mutex_init
#undef pthread_mutex_lock
#undef pthread_mutex_unlock
#undef pthread_mutex_destroy
#undef pthread_mutex_wait
#undef pthread_mutex_timedwait
#undef pthread_mutex_t
#undef pthread_cond_wait
#undef pthread_cond_timedwait
#undef pthread_mutex_trylock
#define pthread_mutex_init(A,B) safe_mutex_init((A),(B),__FILE__,__LINE__)
#define pthread_mutex_lock(A) safe_mutex_lock((A),__FILE__,__LINE__)
#define pthread_mutex_unlock(A) safe_mutex_unlock((A),__FILE__,__LINE__)
#define pthread_mutex_destroy(A) safe_mutex_destroy((A),__FILE__,__LINE__)
#define pthread_cond_wait(A,B) safe_cond_wait((A),(B),__FILE__,__LINE__)
#define pthread_cond_timedwait(A,B,C) safe_cond_timedwait((A),(B),(C),__FILE__,__LINE__)
#define pthread_mutex_trylock(A) pthread_mutex_lock(A)
#define pthread_mutex_t safe_mutex_t
#define safe_mutex_assert_owner(mp) \
DBUG_ASSERT((mp)->count > 0 && \
pthread_equal(pthread_self(), (mp)->thread))
#define safe_mutex_assert_not_owner(mp) \
DBUG_ASSERT(! (mp)->count || \
! pthread_equal(pthread_self(), (mp)->thread))
#else
#define safe_mutex_assert_owner(mp)
#define safe_mutex_assert_not_owner(mp)
#endif /* SAFE_MUTEX */
/* READ-WRITE thread locking */
#ifdef HAVE_BROKEN_RWLOCK /* For OpenUnix */
#undef HAVE_PTHREAD_RWLOCK_RDLOCK
#undef HAVE_RWLOCK_INIT
#undef HAVE_RWLOCK_T
#endif
#if defined(USE_MUTEX_INSTEAD_OF_RW_LOCKS)
/* use these defs for simple mutex locking */
#define rw_lock_t pthread_mutex_t
#define my_rwlock_init(A,B) pthread_mutex_init((A),(B))
#define rw_rdlock(A) pthread_mutex_lock((A))
#define rw_wrlock(A) pthread_mutex_lock((A))
#define rw_tryrdlock(A) pthread_mutex_trylock((A))
#define rw_trywrlock(A) pthread_mutex_trylock((A))
#define rw_unlock(A) pthread_mutex_unlock((A))
#define rwlock_destroy(A) pthread_mutex_destroy((A))
#elif defined(HAVE_PTHREAD_RWLOCK_RDLOCK)
#define rw_lock_t pthread_rwlock_t
#define my_rwlock_init(A,B) pthread_rwlock_init((A),(B))
#define rw_rdlock(A) pthread_rwlock_rdlock(A)
#define rw_wrlock(A) pthread_rwlock_wrlock(A)
#define rw_tryrdlock(A) pthread_rwlock_tryrdlock((A))
#define rw_trywrlock(A) pthread_rwlock_trywrlock((A))
#define rw_unlock(A) pthread_rwlock_unlock(A)
#define rwlock_destroy(A) pthread_rwlock_destroy(A)
#elif defined(HAVE_RWLOCK_INIT)
#ifdef HAVE_RWLOCK_T /* For example Solaris 2.6-> */
#define rw_lock_t rwlock_t
#endif
#define my_rwlock_init(A,B) rwlock_init((A),USYNC_THREAD,0)
#else
/* Use our own version of read/write locks */
typedef struct _my_rw_lock_t {
pthread_mutex_t lock; /* lock for structure */
pthread_cond_t readers; /* waiting readers */
pthread_cond_t writers; /* waiting writers */
int state; /* -1:writer,0:free,>0:readers */
int waiters; /* number of waiting writers */
} my_rw_lock_t;
#define rw_lock_t my_rw_lock_t
#define rw_rdlock(A) my_rw_rdlock((A))
#define rw_wrlock(A) my_rw_wrlock((A))
#define rw_tryrdlock(A) my_rw_tryrdlock((A))
#define rw_trywrlock(A) my_rw_trywrlock((A))
#define rw_unlock(A) my_rw_unlock((A))
#define rwlock_destroy(A) my_rwlock_destroy((A))
extern int my_rwlock_init(my_rw_lock_t *, void *);
extern int my_rwlock_destroy(my_rw_lock_t *);
extern int my_rw_rdlock(my_rw_lock_t *);
extern int my_rw_wrlock(my_rw_lock_t *);
extern int my_rw_unlock(my_rw_lock_t *);
extern int my_rw_tryrdlock(my_rw_lock_t *);
extern int my_rw_trywrlock(my_rw_lock_t *);
#endif /* USE_MUTEX_INSTEAD_OF_RW_LOCKS */
#define GETHOSTBYADDR_BUFF_SIZE 2048
#ifndef HAVE_THR_SETCONCURRENCY
#define thr_setconcurrency(A) pthread_dummy(0)
#endif
#if !defined(HAVE_PTHREAD_ATTR_SETSTACKSIZE) && ! defined(pthread_attr_setstacksize)
#define pthread_attr_setstacksize(A,B) pthread_dummy(0)
#endif
/* Define mutex types, see my_thr_init.c */
#define MY_MUTEX_INIT_SLOW NULL
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
extern pthread_mutexattr_t my_fast_mutexattr;
#define MY_MUTEX_INIT_FAST &my_fast_mutexattr
#else
#define MY_MUTEX_INIT_FAST NULL
#endif
#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
extern pthread_mutexattr_t my_errorcheck_mutexattr;
#define MY_MUTEX_INIT_ERRCHK &my_errorcheck_mutexattr
#else
#define MY_MUTEX_INIT_ERRCHK NULL
#endif
extern my_bool my_thread_global_init(void);
extern void my_thread_global_end(void);
extern my_bool my_thread_init(void);
extern void my_thread_end(void);
extern const char *my_thread_name(void);
extern long my_thread_id(void);
extern int pthread_no_free(void *);
extern int pthread_dummy(int);
/* All thread specific variables are in the following struct */
#define THREAD_NAME_SIZE 10
#ifndef DEFAULT_THREAD_STACK
#if SIZEOF_CHARP > 4
/*
MySQL can survive with 32K, but some glibc libraries require > 128K stack
To resolve hostnames. Also recursive stored procedures needs stack.
*/
#define DEFAULT_THREAD_STACK (256*1024L)
#else
#define DEFAULT_THREAD_STACK (192*1024)
#endif
#endif
struct st_my_thread_var
{
int thr_errno;
pthread_cond_t suspend;
pthread_mutex_t mutex;
pthread_mutex_t * volatile current_mutex;
pthread_cond_t * volatile current_cond;
pthread_t pthread_self;
long id;
int cmp_length;
int volatile abort;
my_bool init;
struct st_my_thread_var *next,**prev;
void *opt_info;
#ifndef DBUG_OFF
gptr dbug;
char name[THREAD_NAME_SIZE+1];
#endif
};
extern struct st_my_thread_var *_my_thread_var(void) __attribute__ ((const));
#define my_thread_var (_my_thread_var())
#define my_errno my_thread_var->thr_errno
/*
Keep track of shutdown,signal, and main threads so that my_end() will not
report errors with them
*/
extern pthread_t shutdown_th, main_th, signal_th;
/* statistics_xxx functions are for not essential statistic */
#ifndef thread_safe_increment
#ifdef HAVE_ATOMIC_ADD
#define thread_safe_increment(V,L) atomic_inc((atomic_t*) &V)
#define thread_safe_decrement(V,L) atomic_dec((atomic_t*) &V)
#define thread_safe_add(V,C,L) atomic_add((C),(atomic_t*) &V)
#define thread_safe_sub(V,C,L) atomic_sub((C),(atomic_t*) &V)
#else
#define thread_safe_increment(V,L) \
(pthread_mutex_lock((L)), (V)++, pthread_mutex_unlock((L)))
#define thread_safe_decrement(V,L) \
(pthread_mutex_lock((L)), (V)--, pthread_mutex_unlock((L)))
#define thread_safe_add(V,C,L) (pthread_mutex_lock((L)), (V)+=(C), pthread_mutex_unlock((L)))
#define thread_safe_sub(V,C,L) \
(pthread_mutex_lock((L)), (V)-=(C), pthread_mutex_unlock((L)))
#endif /* HAVE_ATOMIC_ADD */
#ifdef SAFE_STATISTICS
#define statistic_increment(V,L) thread_safe_increment((V),(L))
#define statistic_decrement(V,L) thread_safe_decrement((V),(L))
#define statistic_add(V,C,L) thread_safe_add((V),(C),(L))
#else
#define statistic_decrement(V,L) (V)--
#define statistic_increment(V,L) (V)++
#define statistic_add(V,C,L) (V)+=(C)
#endif /* SAFE_STATISTICS */
#endif /* thread_safe_increment */
#ifdef __cplusplus
}
#endif
#endif /* _my_ptread_h */

File diff suppressed because it is too large Load Diff

186
3rdparty/mysql/include/my_thread.h vendored Normal file
View File

@@ -0,0 +1,186 @@
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
/* Defines to make different thread packages compatible */
#ifndef MY_THREAD_INCLUDED
#define MY_THREAD_INCLUDED
#include "my_global.h" /* my_bool */
#if !defined(_WIN32)
#include <pthread.h>
#endif
#ifndef ETIME
#define ETIME ETIMEDOUT /* For FreeBSD */
#endif
#ifndef ETIMEDOUT
#define ETIMEDOUT 145 /* Win32 doesn't have this */
#endif
/*
MySQL can survive with 32K, but some glibc libraries require > 128K stack
To resolve hostnames. Also recursive stored procedures needs stack.
*/
#if SIZEOF_CHARP > 4
#define DEFAULT_THREAD_STACK (256*1024L)
#else
#define DEFAULT_THREAD_STACK (192*1024)
#endif
#ifdef __cplusplus
#define EXTERNC extern "C"
#else
#define EXTERNC
#endif
C_MODE_START
#ifdef _WIN32
typedef volatile LONG my_thread_once_t;
typedef DWORD my_thread_t;
typedef struct thread_attr
{
DWORD dwStackSize;
int detachstate;
} my_thread_attr_t;
#define MY_THREAD_CREATE_JOINABLE 0
#define MY_THREAD_CREATE_DETACHED 1
typedef void * (__cdecl *my_start_routine)(void *);
#define MY_THREAD_ONCE_INIT 0
#define MY_THREAD_ONCE_INPROGRESS 1
#define MY_THREAD_ONCE_DONE 2
#else
typedef pthread_once_t my_thread_once_t;
typedef pthread_t my_thread_t;
typedef pthread_attr_t my_thread_attr_t;
#define MY_THREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE
#define MY_THREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED
typedef void *(* my_start_routine)(void *);
#define MY_THREAD_ONCE_INIT PTHREAD_ONCE_INIT
#endif
typedef struct st_my_thread_handle
{
my_thread_t thread;
#ifdef _WIN32
HANDLE handle;
#endif
} my_thread_handle;
int my_thread_once(my_thread_once_t *once_control, void (*init_routine)(void));
static inline my_thread_t my_thread_self()
{
#ifdef _WIN32
return GetCurrentThreadId();
#else
return pthread_self();
#endif
}
static inline int my_thread_equal(my_thread_t t1, my_thread_t t2)
{
#ifdef _WIN32
return t1 == t2;
#else
return pthread_equal(t1, t2);
#endif
}
static inline int my_thread_attr_init(my_thread_attr_t *attr)
{
#ifdef _WIN32
attr->dwStackSize= 0;
/* Set to joinable by default to match Linux */
attr->detachstate= MY_THREAD_CREATE_JOINABLE;
return 0;
#else
return pthread_attr_init(attr);
#endif
}
static inline int my_thread_attr_destroy(my_thread_attr_t *attr)
{
#ifdef _WIN32
attr->dwStackSize= 0;
/* Set to joinable by default to match Linux */
attr->detachstate= MY_THREAD_CREATE_JOINABLE;
return 0;
#else
return pthread_attr_destroy(attr);
#endif
}
static inline int my_thread_attr_setstacksize(my_thread_attr_t *attr,
size_t stacksize)
{
#ifdef _WIN32
attr->dwStackSize= (DWORD)stacksize;
return 0;
#else
return pthread_attr_setstacksize(attr, stacksize);
#endif
}
static inline int my_thread_attr_setdetachstate(my_thread_attr_t *attr,
int detachstate)
{
#ifdef _WIN32
attr->detachstate= detachstate;
return 0;
#else
return pthread_attr_setdetachstate(attr, detachstate);
#endif
}
static inline int my_thread_attr_getstacksize(my_thread_attr_t *attr,
size_t *stacksize)
{
#ifdef _WIN32
*stacksize= (size_t)attr->dwStackSize;
return 0;
#else
return pthread_attr_getstacksize(attr, stacksize);
#endif
}
static inline void my_thread_yield()
{
#ifdef _WIN32
SwitchToThread();
#else
sched_yield();
#endif
}
int my_thread_create(my_thread_handle *thread, const my_thread_attr_t *attr,
my_start_routine func, void *arg);
int my_thread_join(my_thread_handle *thread, void **value_ptr);
int my_thread_cancel(my_thread_handle *thread);
void my_thread_exit(void *value_ptr);
extern my_bool my_thread_global_init();
extern void my_thread_global_reinit();
extern void my_thread_global_end();
extern my_bool my_thread_init();
extern void my_thread_end();
C_MODE_END
#endif /* MY_THREAD_INCLUDED */

107
3rdparty/mysql/include/my_thread_local.h vendored Normal file
View File

@@ -0,0 +1,107 @@
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
#ifndef MY_THREAD_LOCAL_INCLUDED
#define MY_THREAD_LOCAL_INCLUDED
#ifndef _WIN32
#include <pthread.h>
#endif
struct _db_code_state_;
typedef uint32 my_thread_id;
C_MODE_START
#ifdef _WIN32
typedef DWORD thread_local_key_t;
#else
typedef pthread_key_t thread_local_key_t;
#endif
static inline int my_create_thread_local_key(thread_local_key_t *key,
void (*destructor)(void *))
{
#ifdef _WIN32
*key= TlsAlloc();
return (*key == TLS_OUT_OF_INDEXES);
#else
return pthread_key_create(key, destructor);
#endif
}
static inline int my_delete_thread_local_key(thread_local_key_t key)
{
#ifdef _WIN32
return !TlsFree(key);
#else
return pthread_key_delete(key);
#endif
}
static inline void* my_get_thread_local(thread_local_key_t key)
{
#ifdef _WIN32
return TlsGetValue(key);
#else
return pthread_getspecific(key);
#endif
}
static inline int my_set_thread_local(thread_local_key_t key,
void *value)
{
#ifdef _WIN32
return !TlsSetValue(key, value);
#else
return pthread_setspecific(key, value);
#endif
}
/**
Retrieve the MySQL thread-local storage variant of errno.
*/
int my_errno();
/**
Set the MySQL thread-local storage variant of errno.
*/
void set_my_errno(int my_errno);
#ifdef _WIN32
/*
thr_winerr is used for returning the original OS error-code in Windows,
my_osmaperr() returns EINVAL for all unknown Windows errors, hence we
preserve the original Windows Error code in thr_winerr.
*/
int thr_winerr();
void set_thr_winerr(int winerr);
#endif
#ifndef DBUG_OFF
/* Return pointer to DBUG for holding current state */
struct _db_code_state_ **my_thread_var_dbug();
my_thread_id my_thread_var_id();
void set_my_thread_var_id(my_thread_id id);
#endif
C_MODE_END
#endif // MY_THREAD_LOCAL_INCLUDED

96
3rdparty/mysql/include/my_xml.h vendored Normal file
View File

@@ -0,0 +1,96 @@
/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#ifndef _my_xml_h
#define _my_xml_h
#ifdef __cplusplus
extern "C" {
#endif
#define MY_XML_OK 0
#define MY_XML_ERROR 1
/*
A flag whether to use absolute tag names in call-back functions,
like "a", "a.b" and "a.b.c" (used in character set file parser),
or relative names like "a", "b" and "c".
*/
#define MY_XML_FLAG_RELATIVE_NAMES 1
/*
A flag whether to skip normilization of text values before calling
call-back functions: i.e. skip leading/trailing spaces,
\r, \n, \t characters.
*/
#define MY_XML_FLAG_SKIP_TEXT_NORMALIZATION 2
enum my_xml_node_type
{
MY_XML_NODE_TAG, /* can have TAG, ATTR and TEXT children */
MY_XML_NODE_ATTR, /* can have TEXT children */
MY_XML_NODE_TEXT /* cannot have children */
};
typedef struct xml_stack_st
{
int flags;
enum my_xml_node_type current_node_type;
char errstr[128];
struct {
char static_buffer[128];
char *buffer;
size_t buffer_size;
char *start;
char *end;
} attr;
const char *beg;
const char *cur;
const char *end;
void *user_data;
int (*enter)(struct xml_stack_st *st,const char *val, size_t len);
int (*value)(struct xml_stack_st *st,const char *val, size_t len);
int (*leave_xml)(struct xml_stack_st *st,const char *val, size_t len);
} MY_XML_PARSER;
void my_xml_parser_create(MY_XML_PARSER *st);
void my_xml_parser_free(MY_XML_PARSER *st);
int my_xml_parse(MY_XML_PARSER *st,const char *str, size_t len);
void my_xml_set_value_handler(MY_XML_PARSER *st, int (*)(MY_XML_PARSER *,
const char *,
size_t len));
void my_xml_set_enter_handler(MY_XML_PARSER *st, int (*)(MY_XML_PARSER *,
const char *,
size_t len));
void my_xml_set_leave_handler(MY_XML_PARSER *st, int (*)(MY_XML_PARSER *,
const char *,
size_t len));
void my_xml_set_user_data(MY_XML_PARSER *st, void *);
size_t my_xml_error_pos(MY_XML_PARSER *st);
uint my_xml_error_lineno(MY_XML_PARSER *st);
const char *my_xml_error_string(MY_XML_PARSER *st);
#ifdef __cplusplus
}
#endif
#endif /* _my_xml_h */

View File

@@ -1,9 +1,8 @@
/* Copyright (C) 2000-2003 MySQL AB
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
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; either version 2 of the License, or
(at your option) any later version.
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; without even the implied warranty of
@@ -12,71 +11,80 @@
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 */
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/*
This file defines the client API to MySQL and also the ABI of the
dynamically linked libmysqlclient.
The ABI should never be changed in a released product of MySQL,
thus you need to take great care when changing the file. In case
the file is changed so the ABI is broken, you must also update
the SHARED_LIB_MAJOR_VERSION in cmake/mysql_version.cmake
*/
#ifndef _mysql_h
#define _mysql_h
#ifdef __CYGWIN__ /* CYGWIN implements a UNIX API */
#undef WIN
#undef _WIN
#undef _WIN32
#undef _WIN64
#undef __WIN__
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _global_h /* If not standard header */
#ifndef MY_GLOBAL_INCLUDED /* If not standard header */
#ifndef MYSQL_ABI_CHECK
#include <sys/types.h>
#ifdef __LCC__
#include <winsock.h> /* For windows */
#endif
typedef char my_bool;
#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__)
#define __WIN__
#endif
#if !defined(__WIN__)
#if !defined(_WIN32)
#define STDCALL
#else
#define STDCALL __stdcall
#endif
typedef char * gptr;
#ifndef my_socket_defined
#ifdef __WIN__
#ifdef _WIN32
#include <windows.h>
#ifdef WIN32_LEAN_AND_MEAN
#include <winsock2.h>
#endif
#define my_socket SOCKET
#else
typedef int my_socket;
#endif /* __WIN__ */
#endif /* _WIN32 */
#endif /* my_socket_defined */
#endif /* _global_h */
#endif /* MY_GLOBAL_INCLUDED */
#include "mysql_version.h"
#include "mysql_com.h"
#include "mysql_time.h"
#include "mysql_version.h"
#include "typelib.h"
#include "my_list.h" /* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */
/* Include declarations of plug-in API */
#include "mysql/client_plugin.h"
/*
Declare my_init() here because it is a documented C API function exported
from the client library. No need to include whole my_sys.h, however.
*/
my_bool my_init(void);
extern unsigned int mysql_port;
extern char *mysql_unix_port;
#define CLIENT_NET_READ_TIMEOUT 365*24*3600 /* Timeout on read */
#define CLIENT_NET_WRITE_TIMEOUT 365*24*3600 /* Timeout on write */
#ifdef __NETWARE__
#pragma pack(push, 8) /* 8 byte alignment */
#endif
#define IS_PRI_KEY(n) ((n) & PRI_KEY_FLAG)
#define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG)
#define IS_BLOB(n) ((n) & BLOB_FLAG)
#define IS_NUM(t) ((t) <= FIELD_TYPE_INT24 || (t) == FIELD_TYPE_YEAR || (t) == FIELD_TYPE_NEWDECIMAL)
#define IS_NUM_FIELD(f) ((f)->flags & NUM_FLAG)
#define INTERNAL_NUM_FIELD(f) (((f)->type <= FIELD_TYPE_INT24 && ((f)->type != FIELD_TYPE_TIMESTAMP || (f)->length == 14 || (f)->length == 8)) || (f)->type == FIELD_TYPE_YEAR)
/**
Returns true if the value is a number which does not need quotes for
the sql_lex.cc parser to parse correctly.
*/
#define IS_NUM(t) (((t) <= MYSQL_TYPE_INT24 && (t) != MYSQL_TYPE_TIMESTAMP) || (t) == MYSQL_TYPE_YEAR || (t) == MYSQL_TYPE_NEWDECIMAL)
#define IS_LONGDATA(t) ((t) >= MYSQL_TYPE_TINY_BLOB && (t) <= MYSQL_TYPE_STRING)
typedef struct st_mysql_field {
@@ -100,21 +108,22 @@ typedef struct st_mysql_field {
unsigned int decimals; /* Number of decimals in field */
unsigned int charsetnr; /* Character set */
enum enum_field_types type; /* Type of field. See mysql_com.h for types */
void *extension;
} MYSQL_FIELD;
typedef char **MYSQL_ROW; /* return data as array of strings */
typedef unsigned int MYSQL_FIELD_OFFSET; /* offset to current field */
#ifndef _global_h
#if defined(NO_CLIENT_LONG_LONG)
typedef unsigned long my_ulonglong;
#elif defined (__WIN__)
#ifndef MY_GLOBAL_INCLUDED
#if defined (_WIN32)
typedef unsigned __int64 my_ulonglong;
#else
typedef unsigned long long my_ulonglong;
#endif
#endif
#include "typelib.h"
#define MYSQL_COUNT_ERROR (~(my_ulonglong) 0)
/* backward compatibility define - to be removed eventually */
@@ -132,15 +141,16 @@ typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */
typedef struct embedded_query_result EMBEDDED_QUERY_RESULT;
typedef struct st_mysql_data {
MYSQL_ROWS *data;
struct embedded_query_result *embedded_info;
MEM_ROOT alloc;
my_ulonglong rows;
unsigned int fields;
MYSQL_ROWS *data;
MEM_ROOT alloc;
/* extra info for embedded library */
struct embedded_query_result *embedded_info;
void *extension;
} MYSQL_DATA;
enum mysql_option
enum mysql_option
{
MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS, MYSQL_OPT_NAMED_PIPE,
MYSQL_INIT_COMMAND, MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP,
@@ -149,9 +159,29 @@ enum mysql_option
MYSQL_OPT_WRITE_TIMEOUT, MYSQL_OPT_USE_RESULT,
MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION,
MYSQL_OPT_GUESS_CONNECTION, MYSQL_SET_CLIENT_IP, MYSQL_SECURE_AUTH,
MYSQL_REPORT_DATA_TRUNCATION, MYSQL_OPT_RECONNECT
MYSQL_REPORT_DATA_TRUNCATION, MYSQL_OPT_RECONNECT,
MYSQL_OPT_SSL_VERIFY_SERVER_CERT, MYSQL_PLUGIN_DIR, MYSQL_DEFAULT_AUTH,
MYSQL_OPT_BIND,
MYSQL_OPT_SSL_KEY, MYSQL_OPT_SSL_CERT,
MYSQL_OPT_SSL_CA, MYSQL_OPT_SSL_CAPATH, MYSQL_OPT_SSL_CIPHER,
MYSQL_OPT_SSL_CRL, MYSQL_OPT_SSL_CRLPATH,
MYSQL_OPT_CONNECT_ATTR_RESET, MYSQL_OPT_CONNECT_ATTR_ADD,
MYSQL_OPT_CONNECT_ATTR_DELETE,
MYSQL_SERVER_PUBLIC_KEY,
MYSQL_ENABLE_CLEARTEXT_PLUGIN,
MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS,
MYSQL_OPT_SSL_ENFORCE,
MYSQL_OPT_MAX_ALLOWED_PACKET, MYSQL_OPT_NET_BUFFER_LENGTH,
MYSQL_OPT_TLS_VERSION,
MYSQL_OPT_SSL_MODE
};
/**
@todo remove the "extension", move st_mysql_options completely
out of mysql.h
*/
struct st_mysql_options_extention;
struct st_mysql_options {
unsigned int connect_timeout, read_timeout, write_timeout;
unsigned int port, protocol;
@@ -166,30 +196,28 @@ struct st_mysql_options {
char *ssl_cipher; /* cipher to use */
char *shared_memory_base_name;
unsigned long max_allowed_packet;
my_bool use_ssl; /* if to use SSL or not */
my_bool use_ssl; /* Deprecated ! Former use_ssl */
my_bool compress,named_pipe;
/*
On connect, find out the replication role of the server, and
establish connections to all the peers
*/
my_bool rpl_probe;
/*
Each call to mysql_real_query() will parse it to tell if it is a read
or a write, and direct it to the slave or the master
*/
my_bool rpl_parse;
/*
If set, never read from a master, only from slave, when doing
a read that is replication-aware
*/
my_bool no_master_reads;
#if !defined(CHECK_EMBEDDED_DIFFERENCES) || defined(EMBEDDED_LIBRARY)
my_bool separate_thread;
#endif
my_bool unused1;
my_bool unused2;
my_bool unused3;
my_bool unused4;
enum mysql_option methods_to_use;
char *client_ip;
/* Refuse client connecting to server if it uses old (pre-4.1.1) protocol */
my_bool secure_auth;
union {
/*
The ip/hostname to use when authenticating
client against embedded server built with
grant tables - only used in embedded server
*/
char *client_ip;
/*
The local address to bind when connecting to
remote server - not used in embedded server
*/
char *bind_address;
} ci;
my_bool unused5;
/* 0 - never report, 1 - always report (default) */
my_bool report_data_truncation;
@@ -199,26 +227,25 @@ struct st_mysql_options {
void (*local_infile_end)(void *);
int (*local_infile_error)(void *, char *, unsigned int);
void *local_infile_userdata;
struct st_mysql_options_extention *extension;
};
enum mysql_status
enum mysql_status
{
MYSQL_STATUS_READY,MYSQL_STATUS_GET_RESULT,MYSQL_STATUS_USE_RESULT
MYSQL_STATUS_READY, MYSQL_STATUS_GET_RESULT, MYSQL_STATUS_USE_RESULT,
MYSQL_STATUS_STATEMENT_GET_RESULT
};
enum mysql_protocol_type
enum mysql_protocol_type
{
MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET,
MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY
};
/*
There are three types of queries - the ones that have to go to
the master, the ones that go to a slave, and the adminstrative
type which must happen on the pivot connectioin
*/
enum mysql_rpl_type
enum mysql_ssl_mode
{
MYSQL_RPL_MASTER, MYSQL_RPL_SLAVE, MYSQL_RPL_ADMIN
SSL_MODE_DISABLED= 1, SSL_MODE_PREFERRED, SSL_MODE_REQUIRED,
SSL_MODE_VERIFY_CA, SSL_MODE_VERIFY_IDENTITY
};
typedef struct character_set
@@ -234,13 +261,14 @@ typedef struct character_set
} MY_CHARSET_INFO;
struct st_mysql_methods;
struct st_mysql_stmt;
typedef struct st_mysql
{
NET net; /* Communication parameters */
gptr connector_fd; /* ConnectorFd for SSL */
char *host,*user,*passwd,*unix_socket,*server_version,*host_info,*info;
char *db;
unsigned char *connector_fd; /* ConnectorFd for SSL */
char *host,*user,*passwd,*unix_socket,*server_version,*host_info;
char *info, *db;
struct charset_info_st *charset;
MYSQL_FIELD *fields;
MEM_ROOT field_alloc;
@@ -263,85 +291,57 @@ typedef struct st_mysql
/* session-wide random string */
char scramble[SCRAMBLE_LENGTH+1];
/*
Set if this is the original connection, not a master or a slave we have
added though mysql_rpl_probe() or mysql_set_master()/ mysql_add_slave()
*/
my_bool rpl_pivot;
/*
Pointers to the master, and the next slave connections, points to
itself if lone connection.
*/
struct st_mysql* master, *next_slave;
struct st_mysql* last_used_slave; /* needed for round-robin slave pick */
/* needed for send/read/store/use result to work correctly with replication */
struct st_mysql* last_used_con;
my_bool unused1;
void *unused2, *unused3, *unused4, *unused5;
LIST *stmts; /* list of all statements */
const struct st_mysql_methods *methods;
void *thd;
/*
Points to boolean flag in MYSQL_RES or MYSQL_STMT. We set this flag
Points to boolean flag in MYSQL_RES or MYSQL_STMT. We set this flag
from mysql_stmt_close if close had to cancel result set of this object.
*/
my_bool *unbuffered_fetch_owner;
#if defined(EMBEDDED_LIBRARY) || defined(EMBEDDED_LIBRARY_COMPATIBLE) || MYSQL_VERSION_ID >= 50100
/* needed for embedded server - no net buffer to store the 'info' */
char *info_buffer;
#endif
void *extension;
} MYSQL;
typedef struct st_mysql_res {
my_ulonglong row_count;
my_ulonglong row_count;
MYSQL_FIELD *fields;
MYSQL_DATA *data;
MYSQL_ROWS *data_cursor;
unsigned long *lengths; /* column lengths of current row */
MYSQL *handle; /* for unbuffered reads */
MEM_ROOT field_alloc;
unsigned int field_count, current_field;
const struct st_mysql_methods *methods;
MYSQL_ROW row; /* If unbuffered read */
MYSQL_ROW current_row; /* buffer to current row */
MEM_ROOT field_alloc;
unsigned int field_count, current_field;
my_bool eof; /* Used by mysql_fetch_row */
/* mysql_stmt_close() had to cancel this result */
my_bool unbuffered_fetch_cancelled;
const struct st_mysql_methods *methods;
my_bool unbuffered_fetch_cancelled;
void *extension;
} MYSQL_RES;
#define MAX_MYSQL_MANAGER_ERR 256
#define MAX_MYSQL_MANAGER_MSG 256
#define MANAGER_OK 200
#define MANAGER_INFO 250
#define MANAGER_ACCESS 401
#define MANAGER_CLIENT_ERR 450
#define MANAGER_INTERNAL_ERR 500
#if !defined(MYSQL_SERVER) && !defined(MYSQL_CLIENT)
#define MYSQL_CLIENT
#endif
typedef struct st_mysql_manager
{
NET net;
char *host,*user,*passwd;
unsigned int port;
my_bool free_me;
my_bool eof;
int cmd_status;
int last_errno;
char* net_buf,*net_buf_pos,*net_data_end;
int net_buf_size;
char last_error[MAX_MYSQL_MANAGER_ERR];
} MYSQL_MANAGER;
/*
Note: MYSQL_PARAMETERS and mysql_get_parameters() have been removed
in server 5.7. But we keep them here to not break compatibility in
Con/C 6.1 series.
*/
typedef struct st_mysql_parameters
{
unsigned long *p_max_allowed_packet;
unsigned long *p_net_buffer_length;
void *extension;
} MYSQL_PARAMETERS;
#if !defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY)
@@ -349,6 +349,8 @@ typedef struct st_mysql_parameters
#define net_buffer_length (*mysql_get_parameters()->p_net_buffer_length)
#endif
MYSQL_PARAMETERS *STDCALL mysql_get_parameters(void);
/*
Set up and bring down the server; to ensure that applications will
work when linked against either the standard client library or the
@@ -356,6 +358,7 @@ typedef struct st_mysql_parameters
*/
int STDCALL mysql_server_init(int argc, char **argv, char **groups);
void STDCALL mysql_server_end(void);
/*
mysql_server_init/end need to be called when using libmysqld or
libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so
@@ -368,7 +371,6 @@ void STDCALL mysql_server_end(void);
#define mysql_library_init mysql_server_init
#define mysql_library_end mysql_server_end
MYSQL_PARAMETERS *STDCALL mysql_get_parameters(void);
/*
Set up and bring down a thread; these function should be called
@@ -409,7 +411,8 @@ MYSQL * STDCALL mysql_init(MYSQL *mysql);
my_bool STDCALL mysql_ssl_set(MYSQL *mysql, const char *key,
const char *cert, const char *ca,
const char *capath, const char *cipher);
my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
const char * STDCALL mysql_get_ssl_cipher(MYSQL *mysql);
my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
const char *passwd, const char *db);
MYSQL * STDCALL mysql_real_connect(MYSQL *mysql, const char *host,
const char *user,
@@ -427,19 +430,17 @@ int STDCALL mysql_real_query(MYSQL *mysql, const char *q,
MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql);
MYSQL_RES * STDCALL mysql_use_result(MYSQL *mysql);
/* perform query on master */
my_bool STDCALL mysql_master_query(MYSQL *mysql, const char *q,
unsigned long length);
my_bool STDCALL mysql_master_send_query(MYSQL *mysql, const char *q,
unsigned long length);
/* perform query on slave */
my_bool STDCALL mysql_slave_query(MYSQL *mysql, const char *q,
unsigned long length);
my_bool STDCALL mysql_slave_send_query(MYSQL *mysql, const char *q,
unsigned long length);
void STDCALL mysql_get_character_set_info(MYSQL *mysql,
MY_CHARSET_INFO *charset);
int STDCALL mysql_session_track_get_first(MYSQL *mysql,
enum enum_session_state_type type,
const char **data,
size_t *length);
int STDCALL mysql_session_track_get_next(MYSQL *mysql,
enum enum_session_state_type type,
const char **data,
size_t *length);
/* local infile support */
#define LOCAL_INFILE_ERROR_LEN 512
@@ -458,37 +459,6 @@ mysql_set_local_infile_handler(MYSQL *mysql,
void
mysql_set_local_infile_default(MYSQL *mysql);
/*
enable/disable parsing of all queries to decide if they go on master or
slave
*/
void STDCALL mysql_enable_rpl_parse(MYSQL* mysql);
void STDCALL mysql_disable_rpl_parse(MYSQL* mysql);
/* get the value of the parse flag */
int STDCALL mysql_rpl_parse_enabled(MYSQL* mysql);
/* enable/disable reads from master */
void STDCALL mysql_enable_reads_from_master(MYSQL* mysql);
void STDCALL mysql_disable_reads_from_master(MYSQL* mysql);
/* get the value of the master read flag */
my_bool STDCALL mysql_reads_from_master_enabled(MYSQL* mysql);
enum mysql_rpl_type STDCALL mysql_rpl_query_type(const char* q, int len);
/* discover the master and its slaves */
my_bool STDCALL mysql_rpl_probe(MYSQL* mysql);
/* set the master, close/free the old one, if it is not a pivot */
int STDCALL mysql_set_master(MYSQL* mysql, const char* host,
unsigned int port,
const char* user,
const char* passwd);
int STDCALL mysql_add_slave(MYSQL* mysql, const char* host,
unsigned int port,
const char* user,
const char* passwd);
int STDCALL mysql_shutdown(MYSQL *mysql,
enum mysql_enum_shutdown_level
shutdown_level);
@@ -511,7 +481,11 @@ MYSQL_RES * STDCALL mysql_list_dbs(MYSQL *mysql,const char *wild);
MYSQL_RES * STDCALL mysql_list_tables(MYSQL *mysql,const char *wild);
MYSQL_RES * STDCALL mysql_list_processes(MYSQL *mysql);
int STDCALL mysql_options(MYSQL *mysql,enum mysql_option option,
const char *arg);
const void *arg);
int STDCALL mysql_options4(MYSQL *mysql,enum mysql_option option,
const void *arg1, const void *arg2);
int STDCALL mysql_get_option(MYSQL *mysql, enum mysql_option option,
const void *arg);
void STDCALL mysql_free_result(MYSQL_RES *result);
void STDCALL mysql_data_seek(MYSQL_RES *result,
my_ulonglong offset);
@@ -531,37 +505,18 @@ unsigned long STDCALL mysql_hex_string(char *to,const char *from,
unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql,
char *to,const char *from,
unsigned long length);
void STDCALL mysql_debug(const char *debug);
char * STDCALL mysql_odbc_escape_string(MYSQL *mysql,
char *to,
unsigned long to_length,
const char *from,
unsigned long from_length,
void *param,
char *
(*extend_buffer)
(void *, char *to,
unsigned long *length));
void STDCALL myodbc_remove_escape(MYSQL *mysql,char *name);
unsigned int STDCALL mysql_thread_safe(void);
my_bool STDCALL mysql_embedded(void);
MYSQL_MANAGER* STDCALL mysql_manager_init(MYSQL_MANAGER* con);
MYSQL_MANAGER* STDCALL mysql_manager_connect(MYSQL_MANAGER* con,
const char* host,
const char* user,
const char* passwd,
unsigned int port);
void STDCALL mysql_manager_close(MYSQL_MANAGER* con);
int STDCALL mysql_manager_command(MYSQL_MANAGER* con,
const char* cmd, int cmd_len);
int STDCALL mysql_manager_fetch_line(MYSQL_MANAGER* con,
char* res_buf,
int res_buf_size);
my_bool STDCALL mysql_read_query_result(MYSQL *mysql);
unsigned long STDCALL mysql_real_escape_string_quote(MYSQL *mysql,
char *to, const char *from,
unsigned long length, char quote);
void STDCALL mysql_debug(const char *debug);
void STDCALL myodbc_remove_escape(MYSQL *mysql,char *name);
unsigned int STDCALL mysql_thread_safe(void);
my_bool STDCALL mysql_embedded(void);
my_bool STDCALL mysql_read_query_result(MYSQL *mysql);
int STDCALL mysql_reset_connection(MYSQL *mysql);
/*
The following definitions are added for the enhanced
The following definitions are added for the enhanced
client-server protocol
*/
@@ -643,26 +598,29 @@ typedef struct st_mysql_bind
void *buffer; /* buffer to get/put data */
/* set this if you want to track data truncations happened during fetch */
my_bool *error;
enum enum_field_types buffer_type; /* buffer type */
/* output buffer length, must be set when fetching str/binary */
unsigned long buffer_length;
unsigned char *row_ptr; /* for the current data position */
unsigned long offset; /* offset position for char/binary fetch */
unsigned long length_value; /* Used if length is 0 */
unsigned int param_number; /* For null count and error messages */
unsigned int pack_length; /* Internal length for packed data */
my_bool error_value; /* used if error is 0 */
my_bool is_unsigned; /* set if integer type is unsigned */
my_bool long_data_used; /* If used with mysql_send_long_data */
my_bool is_null_value; /* Used if is_null is 0 */
void (*store_param_func)(NET *net, struct st_mysql_bind *param);
void (*fetch_result)(struct st_mysql_bind *, MYSQL_FIELD *,
unsigned char **row);
void (*skip_result)(struct st_mysql_bind *, MYSQL_FIELD *,
unsigned char **row);
/* output buffer length, must be set when fetching str/binary */
unsigned long buffer_length;
unsigned long offset; /* offset position for char/binary fetch */
unsigned long length_value; /* Used if length is 0 */
unsigned int param_number; /* For null count and error messages */
unsigned int pack_length; /* Internal length for packed data */
enum enum_field_types buffer_type; /* buffer type */
my_bool error_value; /* used if error is 0 */
my_bool is_unsigned; /* set if integer type is unsigned */
my_bool long_data_used; /* If used with mysql_send_long_data */
my_bool is_null_value; /* Used if is_null is 0 */
void *extension;
} MYSQL_BIND;
struct st_mysql_stmt_extension;
/* statement handler */
typedef struct st_mysql_stmt
{
@@ -674,15 +632,15 @@ typedef struct st_mysql_stmt
MYSQL_FIELD *fields; /* result set metadata */
MYSQL_DATA result; /* cached result set */
MYSQL_ROWS *data_cursor; /* current row in cached result */
/* copy of mysql->affected_rows after statement execution */
my_ulonglong affected_rows;
my_ulonglong insert_id; /* copy of mysql->insert_id */
/*
mysql_stmt_fetch() calls this function to fetch one row (it's different
for buffered, unbuffered and cursor fetch).
*/
int (*read_row_func)(struct st_mysql_stmt *stmt,
int (*read_row_func)(struct st_mysql_stmt *stmt,
unsigned char **row);
/* copy of mysql->affected_rows after statement execution */
my_ulonglong affected_rows;
my_ulonglong insert_id; /* copy of mysql->insert_id */
unsigned long stmt_id; /* Id for prepared statement */
unsigned long flags; /* i.e. type of cursor to open */
unsigned long prefetch_rows; /* number of rows per one COM_FETCH */
@@ -702,19 +660,20 @@ typedef struct st_mysql_stmt
my_bool bind_param_done; /* input buffers were supplied */
unsigned char bind_result_done; /* output buffers were supplied */
/* mysql_stmt_close() had to cancel this result */
my_bool unbuffered_fetch_cancelled;
my_bool unbuffered_fetch_cancelled;
/*
Is set to true if we need to calculate field->max_length for
Is set to true if we need to calculate field->max_length for
metadata fields when doing mysql_stmt_store_result.
*/
my_bool update_max_length;
my_bool update_max_length;
struct st_mysql_stmt_extension *extension;
} MYSQL_STMT;
enum enum_stmt_attr_type
{
/*
When doing mysql_stmt_store_result calculate max_length attribute
of statement metadata. This is to be consistent with the old API,
of statement metadata. This is to be consistent with the old API,
where this was done automatically.
In the new API we do that only by request because it slows down
mysql_stmt_store_result sufficiently.
@@ -733,43 +692,12 @@ enum enum_stmt_attr_type
};
typedef struct st_mysql_methods
{
my_bool (*read_query_result)(MYSQL *mysql);
my_bool (*advanced_command)(MYSQL *mysql,
enum enum_server_command command,
const char *header,
unsigned long header_length,
const char *arg,
unsigned long arg_length,
my_bool skip_check);
MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
unsigned int fields);
MYSQL_RES * (*use_result)(MYSQL *mysql);
void (*fetch_lengths)(unsigned long *to,
MYSQL_ROW column, unsigned int field_count);
void (*flush_use_result)(MYSQL *mysql);
#if !defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY)
MYSQL_FIELD * (*list_fields)(MYSQL *mysql);
my_bool (*read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt);
int (*stmt_execute)(MYSQL_STMT *stmt);
int (*read_binary_rows)(MYSQL_STMT *stmt);
int (*unbuffered_fetch)(MYSQL *mysql, char **row);
void (*free_embedded_thd)(MYSQL *mysql);
const char *(*read_statistics)(MYSQL *mysql);
my_bool (*next_result)(MYSQL *mysql);
int (*read_change_user_result)(MYSQL *mysql, char *buff, const char *passwd);
int (*read_rows_from_cursor)(MYSQL_STMT *stmt);
#endif
} MYSQL_METHODS;
MYSQL_STMT * STDCALL mysql_stmt_init(MYSQL *mysql);
int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query,
unsigned long length);
int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt);
int STDCALL mysql_stmt_fetch(MYSQL_STMT *stmt);
int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind,
int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind_arg,
unsigned int column,
unsigned long offset);
int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt);
@@ -785,16 +713,16 @@ my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
my_bool STDCALL mysql_stmt_close(MYSQL_STMT * stmt);
my_bool STDCALL mysql_stmt_reset(MYSQL_STMT * stmt);
my_bool STDCALL mysql_stmt_free_result(MYSQL_STMT *stmt);
my_bool STDCALL mysql_stmt_send_long_data(MYSQL_STMT *stmt,
my_bool STDCALL mysql_stmt_send_long_data(MYSQL_STMT *stmt,
unsigned int param_number,
const char *data,
const char *data,
unsigned long length);
MYSQL_RES *STDCALL mysql_stmt_result_metadata(MYSQL_STMT *stmt);
MYSQL_RES *STDCALL mysql_stmt_param_metadata(MYSQL_STMT *stmt);
unsigned int STDCALL mysql_stmt_errno(MYSQL_STMT * stmt);
const char *STDCALL mysql_stmt_error(MYSQL_STMT * stmt);
const char *STDCALL mysql_stmt_sqlstate(MYSQL_STMT * stmt);
MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek(MYSQL_STMT *stmt,
MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek(MYSQL_STMT *stmt,
MYSQL_ROW_OFFSET offset);
MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell(MYSQL_STMT *stmt);
void STDCALL mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong offset);
@@ -808,6 +736,7 @@ my_bool STDCALL mysql_rollback(MYSQL * mysql);
my_bool STDCALL mysql_autocommit(MYSQL * mysql, my_bool auto_mode);
my_bool STDCALL mysql_more_results(MYSQL *mysql);
int STDCALL mysql_next_result(MYSQL *mysql);
int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt);
void STDCALL mysql_close(MYSQL *sock);
@@ -817,29 +746,8 @@ void STDCALL mysql_close(MYSQL *sock);
#define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT)
#ifdef USE_OLD_FUNCTIONS
MYSQL * STDCALL mysql_connect(MYSQL *mysql, const char *host,
const char *user, const char *passwd);
int STDCALL mysql_create_db(MYSQL *mysql, const char *DB);
int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB);
#define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT)
#endif
#define HAVE_MYSQL_REAL_CONNECT
/*
The following functions are mainly exported because of mysqlbinlog;
They are not for general usage
*/
#define simple_command(mysql, command, arg, length, skip_check) \
(*(mysql)->methods->advanced_command)(mysql, command, \
NullS, 0, arg, length, skip_check)
unsigned long net_safe_read(MYSQL* mysql);
#ifdef __NETWARE__
#pragma pack(pop) /* restore alignment */
#endif
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,28 @@
/* Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifndef CLIENT_AUTHENTICATION_H
#define CLIENT_AUTHENTICATION_H
#include <my_global.h>
#include "mysql.h"
#include "mysql/client_plugin.h"
C_MODE_START
int sha256_password_auth_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql);
int sha256_password_init(char *, size_t, int, va_list);
int sha256_password_deinit(void);
C_MODE_END
#endif

View File

@@ -0,0 +1,202 @@
#ifndef MYSQL_CLIENT_PLUGIN_INCLUDED
/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/**
@file
MySQL Client Plugin API
This file defines the API for plugins that work on the client side
*/
#define MYSQL_CLIENT_PLUGIN_INCLUDED
#ifndef MYSQL_ABI_CHECK
#include <stdarg.h>
#include <stdlib.h>
#endif
/*
On Windows, exports from DLL need to be declared.
Also, plugin needs to be declared as extern "C" because MSVC
unlike other compilers, uses C++ mangling for variables not only
for functions.
*/
#undef MYSQL_PLUGIN_EXPORT
#if defined(_MSC_VER)
#if defined(MYSQL_DYNAMIC_PLUGIN)
#ifdef __cplusplus
#define MYSQL_PLUGIN_EXPORT extern "C" __declspec(dllexport)
#else
#define MYSQL_PLUGIN_EXPORT __declspec(dllexport)
#endif
#else /* MYSQL_DYNAMIC_PLUGIN */
#ifdef __cplusplus
#define MYSQL_PLUGIN_EXPORT extern "C"
#else
#define MYSQL_PLUGIN_EXPORT
#endif
#endif /*MYSQL_DYNAMIC_PLUGIN */
#else /*_MSC_VER */
#define MYSQL_PLUGIN_EXPORT
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* known plugin types */
#define MYSQL_CLIENT_reserved1 0
#define MYSQL_CLIENT_reserved2 1
#define MYSQL_CLIENT_AUTHENTICATION_PLUGIN 2
#define MYSQL_CLIENT_TRACE_PLUGIN 3
#define MYSQL_CLIENT_AUTHENTICATION_PLUGIN_INTERFACE_VERSION 0x0100
#define MYSQL_CLIENT_TRACE_PLUGIN_INTERFACE_VERSION 0x0100
#define MYSQL_CLIENT_MAX_PLUGINS 4
#define mysql_declare_client_plugin(X) \
MYSQL_PLUGIN_EXPORT struct st_mysql_client_plugin_ ## X \
_mysql_client_plugin_declaration_ = { \
MYSQL_CLIENT_ ## X ## _PLUGIN, \
MYSQL_CLIENT_ ## X ## _PLUGIN_INTERFACE_VERSION,
#define mysql_end_client_plugin }
/* generic plugin header structure */
#define MYSQL_CLIENT_PLUGIN_HEADER \
int type; \
unsigned int interface_version; \
const char *name; \
const char *author; \
const char *desc; \
unsigned int version[3]; \
const char *license; \
void *mysql_api; \
int (*init)(char *, size_t, int, va_list); \
int (*deinit)(void); \
int (*options)(const char *option, const void *);
struct st_mysql_client_plugin
{
MYSQL_CLIENT_PLUGIN_HEADER
};
struct st_mysql;
/******** authentication plugin specific declarations *********/
#include "plugin_auth_common.h"
struct st_mysql_client_plugin_AUTHENTICATION
{
MYSQL_CLIENT_PLUGIN_HEADER
int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, struct st_mysql *mysql);
};
/******** using plugins ************/
/**
loads a plugin and initializes it
@param mysql MYSQL structure.
@param name a name of the plugin to load
@param type type of plugin that should be loaded, -1 to disable type check
@param argc number of arguments to pass to the plugin initialization
function
@param ... arguments for the plugin initialization function
@retval
a pointer to the loaded plugin, or NULL in case of a failure
*/
struct st_mysql_client_plugin *
mysql_load_plugin(struct st_mysql *mysql, const char *name, int type,
int argc, ...);
/**
loads a plugin and initializes it, taking va_list as an argument
This is the same as mysql_load_plugin, but take va_list instead of
a list of arguments.
@param mysql MYSQL structure.
@param name a name of the plugin to load
@param type type of plugin that should be loaded, -1 to disable type check
@param argc number of arguments to pass to the plugin initialization
function
@param args arguments for the plugin initialization function
@retval
a pointer to the loaded plugin, or NULL in case of a failure
*/
struct st_mysql_client_plugin *
mysql_load_plugin_v(struct st_mysql *mysql, const char *name, int type,
int argc, va_list args);
/**
finds an already loaded plugin by name, or loads it, if necessary
@param mysql MYSQL structure.
@param name a name of the plugin to load
@param type type of plugin that should be loaded
@retval
a pointer to the plugin, or NULL in case of a failure
*/
struct st_mysql_client_plugin *
mysql_client_find_plugin(struct st_mysql *mysql, const char *name, int type);
/**
adds a plugin structure to the list of loaded plugins
This is useful if an application has the necessary functionality
(for example, a special load data handler) statically linked into
the application binary. It can use this function to register the plugin
directly, avoiding the need to factor it out into a shared object.
@param mysql MYSQL structure. It is only used for error reporting
@param plugin an st_mysql_client_plugin structure to register
@retval
a pointer to the plugin, or NULL in case of a failure
*/
struct st_mysql_client_plugin *
mysql_client_register_plugin(struct st_mysql *mysql,
struct st_mysql_client_plugin *plugin);
/**
set plugin options
Can be used to set extra options and affect behavior for a plugin.
This function may be called multiple times to set several options
@param plugin an st_mysql_client_plugin structure
@param option a string which specifies the option to set
@param value value for the option.
@retval 0 on success, 1 in case of failure
**/
int mysql_plugin_options(struct st_mysql_client_plugin *plugin,
const char *option, const void *value);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,39 @@
struct st_mysql_client_plugin
{
int type; unsigned int interface_version; const char *name; const char *author; const char *desc; unsigned int version[3]; const char *license; void *mysql_api; int (*init)(char *, size_t, int, va_list); int (*deinit)(void); int (*options)(const char *option, const void *);
};
struct st_mysql;
#include "plugin_auth_common.h"
typedef struct st_plugin_vio_info
{
enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET,
MYSQL_VIO_PIPE, MYSQL_VIO_MEMORY } protocol;
int socket;
} MYSQL_PLUGIN_VIO_INFO;
typedef struct st_plugin_vio
{
int (*read_packet)(struct st_plugin_vio *vio,
unsigned char **buf);
int (*write_packet)(struct st_plugin_vio *vio,
const unsigned char *packet,
int packet_len);
void (*info)(struct st_plugin_vio *vio, struct st_plugin_vio_info *info);
} MYSQL_PLUGIN_VIO;
struct st_mysql_client_plugin_AUTHENTICATION
{
int type; unsigned int interface_version; const char *name; const char *author; const char *desc; unsigned int version[3]; const char *license; void *mysql_api; int (*init)(char *, size_t, int, va_list); int (*deinit)(void); int (*options)(const char *option, const void *);
int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, struct st_mysql *mysql);
};
struct st_mysql_client_plugin *
mysql_load_plugin(struct st_mysql *mysql, const char *name, int type,
int argc, ...);
struct st_mysql_client_plugin *
mysql_load_plugin_v(struct st_mysql *mysql, const char *name, int type,
int argc, va_list args);
struct st_mysql_client_plugin *
mysql_client_find_plugin(struct st_mysql *mysql, const char *name, int type);
struct st_mysql_client_plugin *
mysql_client_register_plugin(struct st_mysql *mysql,
struct st_mysql_client_plugin *plugin);
int mysql_plugin_options(struct st_mysql_client_plugin *plugin,
const char *option, const void *value);

View File

@@ -0,0 +1,36 @@
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/*
** Ask for a password from tty
** This is an own file to avoid conflicts with curses
*/
#ifndef MYSQL_GET_PASSWORD_H_INCLUDED
#define MYSQL_GET_PASSWORD_H_INCLUDED
#ifdef __cplusplus
extern "C" {
#endif
typedef char *(* strdup_handler_t)(const char *, int);
char *get_tty_password_ext(const char *opt_message,
strdup_handler_t strdup_function);
#ifdef __cplusplus
}
#endif
#endif /* ! MYSQL_GET_PASSWORD_H_INCLUDED */

View File

@@ -0,0 +1,33 @@
/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifndef MYSQL_LEX_STRING_INCLUDED
#define MYSQL_LEX_STRING_INCLUDED
struct st_mysql_lex_string
{
char *str;
size_t length;
};
typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
struct st_mysql_const_lex_string
{
const char *str;
size_t length;
};
typedef struct st_mysql_const_lex_string MYSQL_LEX_CSTRING;
#endif // MYSQL_LEX_STRING_INCLUDED

View File

@@ -0,0 +1,143 @@
#ifndef MYSQL_PLUGIN_AUTH_COMMON_INCLUDED
/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/**
@file
This file defines constants and data structures that are the same for
both client- and server-side authentication plugins.
*/
#define MYSQL_PLUGIN_AUTH_COMMON_INCLUDED
/** the max allowed length for a user name */
#define MYSQL_USERNAME_LENGTH 96
/**
return values of the plugin authenticate_user() method.
*/
/**
Authentication failed, plugin internal error.
An error occurred in the authentication plugin itself.
These errors are reported in table performance_schema.host_cache,
column COUNT_AUTH_PLUGIN_ERRORS.
*/
#define CR_AUTH_PLUGIN_ERROR 3
/**
Authentication failed, client server handshake.
An error occurred during the client server handshake.
These errors are reported in table performance_schema.host_cache,
column COUNT_HANDSHAKE_ERRORS.
*/
#define CR_AUTH_HANDSHAKE 2
/**
Authentication failed, user credentials.
For example, wrong passwords.
These errors are reported in table performance_schema.host_cache,
column COUNT_AUTHENTICATION_ERRORS.
*/
#define CR_AUTH_USER_CREDENTIALS 1
/**
Authentication failed. Additionally, all other CR_xxx values
(libmysql error code) can be used too.
The client plugin may set the error code and the error message directly
in the MYSQL structure and return CR_ERROR. If a CR_xxx specific error
code was returned, an error message in the MYSQL structure will be
overwritten. If CR_ERROR is returned without setting the error in MYSQL,
CR_UNKNOWN_ERROR will be user.
*/
#define CR_ERROR 0
/**
Authentication (client part) was successful. It does not mean that the
authentication as a whole was successful, usually it only means
that the client was able to send the user name and the password to the
server. If CR_OK is returned, the libmysql reads the next packet expecting
it to be one of OK, ERROR, or CHANGE_PLUGIN packets.
*/
#define CR_OK -1
/**
Authentication was successful.
It means that the client has done its part successfully and also that
a plugin has read the last packet (one of OK, ERROR, CHANGE_PLUGIN).
In this case, libmysql will not read a packet from the server,
but it will use the data at mysql->net.read_pos.
A plugin may return this value if the number of roundtrips in the
authentication protocol is not known in advance, and the client plugin
needs to read one packet more to determine if the authentication is finished
or not.
*/
#define CR_OK_HANDSHAKE_COMPLETE -2
/**
Flag to be passed back to server from authentication plugins via
authenticated_as when proxy mapping should be done by the server.
*/
#define PROXY_FLAG 0
/*
We need HANDLE definition if on Windows. Define WIN32_LEAN_AND_MEAN (if
not already done) to minimize amount of imported declarations.
*/
#ifdef _WIN32
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#endif
typedef struct st_plugin_vio_info
{
enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET,
MYSQL_VIO_PIPE, MYSQL_VIO_MEMORY } protocol;
int socket; /**< it's set, if the protocol is SOCKET or TCP */
#ifdef _WIN32
HANDLE handle; /**< it's set, if the protocol is PIPE or MEMORY */
#endif
} MYSQL_PLUGIN_VIO_INFO;
/**
Provides plugin access to communication channel
*/
typedef struct st_plugin_vio
{
/**
Plugin provides a pointer reference and this function sets it to the
contents of any incoming packet. Returns the packet length, or -1 if
the plugin should terminate.
*/
int (*read_packet)(struct st_plugin_vio *vio,
unsigned char **buf);
/**
Plugin provides a buffer with data and the length and this
function sends it as a packet. Returns 0 on success, 1 on failure.
*/
int (*write_packet)(struct st_plugin_vio *vio,
const unsigned char *packet,
int packet_len);
/**
Fills in a st_plugin_vio_info structure, providing the information
about the connection.
*/
void (*info)(struct st_plugin_vio *vio, struct st_plugin_vio_info *info);
} MYSQL_PLUGIN_VIO;
#endif

View File

@@ -0,0 +1,349 @@
/* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifndef PLUGIN_TRACE_INCLUDED
#define PLUGIN_TRACE_INCLUDED
/**
@file
========================================================================
Declarations for client-side plugins of type MYSQL_CLIENT_TRACE_PLUGIN
========================================================================
See libmysql/mysql_trace.c for a brief description of the client-side
protocol tracing infrastructure.
*/
#include <mysql/client_plugin.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
Lists of protocol stages and trace events
=========================================
These lists are defined with PROTOCOL_STAGE_LIST() and TRACE_EVENT_LIST(),
respectively. Macros accept a disposition name as an argument.
For example, to process list of protocol stages using disposition "foo",
define protocol_stage_foo(Stage) macro and then put
PROTOCOL_STAGE_LIST(foo)
in your code. This will expand to sequence of protocol_stage_foo(X)
macros where X ranges over the list of protocol stages, and these macros
should generate the actual code. See below how this technique is used
to generate protocol_stage and trace_events enums.
*/
/**
Protocol stages
---------------
A client following the MySQL protocol goes through several stages of it. Each
stage determines what packets can be expected from the server or can be send
by the client.
Upon receiving each trace event, trace plugin will be notified of the current
protocol stage so that it can correctly interpret the event.
These are the possible protocol stages and the transitions between them.
.. digraph:: protocol_stages
CONNECTING -> WAIT_FOR_INIT_PACKET;
CONNECTING -> DISCONNECTED [ label = "failed connection" ];
WAIT_FOR_INIT_PACKET -> AUTHENTICATE;
WAIT_FOR_INIT_PACKET -> SSL_NEGOTIATION -> AUTHENTICATE;
AUTHENTICATE -> READY_FOR_COMMAND [ label = "accepted" ];
AUTHENTICATE -> DISCONNECTED [ label = "rejected" ];
READY_FOR_COMMAND -> DISCONNECTED [ label = "COM_QUIT" ];
READY_FOR_COMMAND -> AUTHENTICATE [ label="after change user" ];
READY_FOR_COMMAND -> WAIT_FOR_PACKET
[ label="wait for a single packet after, e.g., COM_STATISTICS" ];
READY_FOR_COMMAND -> WAIT_FOR_RESULT;
READY_FOR_COMMAND -> WAIT_FOR_PS_DESCRIPTION
[ label="after prepare command" ];
WAIT_FOR_PACKET -> READY_FOR_COMAND;
WAIT_FOR_RESULT -> READY_FOR_COMMAND [ label="simple reply" ];
WAIT_FOR_RESULT -> WAIT_FOR_FIELD_DEF;
WAIT_FOR_RESULT -> FILE_REQUEST;
WAIT_FOR_FIELD_DEF -> WAIT_FOR_ROW [ label="in a resultset" ];
WAIT_FOR_FIELD_DEF -> READY_FOR_COMMAND
[ label="after describe table or prepare command" ];
WAIT_FOR_ROW -> READY_FOR_COMMAND;
WAIT_FOR_ROW -> WAIT_FOR_RESULT [ label="multi-resultset" ];
WAIT_FOR_PS_DESCRIPTION -> WAIT_FOR_PARAM_DEF;
WAIT_FOR_PS_DESCRIPTION -> READY_FOR_COMMAND
[ label="no params and result" ];
WAIT_FOR_PS_DESCRIPTION -> WAIT_FOR_FIELD_DEF [ label="no params" ];
WAIT_FOR_PARAM_DEF -> WAIT_FOR_FIELD_DEF;
WAIT_FOR_PARAM_DEF -> READY_FOR_COMMAND [ label="no result" ];
FILE_REQUEST -> WAIT_FOR_RESULT [label="when whole file sent"];
*/
#define PROTOCOL_STAGE_LIST(X) \
protocol_stage_ ## X(CONNECTING) \
protocol_stage_ ## X(WAIT_FOR_INIT_PACKET) \
protocol_stage_ ## X(AUTHENTICATE) \
protocol_stage_ ## X(SSL_NEGOTIATION) \
protocol_stage_ ## X(READY_FOR_COMMAND) \
protocol_stage_ ## X(WAIT_FOR_PACKET) \
protocol_stage_ ## X(WAIT_FOR_RESULT) \
protocol_stage_ ## X(WAIT_FOR_FIELD_DEF) \
protocol_stage_ ## X(WAIT_FOR_ROW) \
protocol_stage_ ## X(FILE_REQUEST) \
protocol_stage_ ## X(WAIT_FOR_PS_DESCRIPTION) \
protocol_stage_ ## X(WAIT_FOR_PARAM_DEF) \
protocol_stage_ ## X(DISCONNECTED)
/**
Trace events
------------
The following events are generated during the various stages of the
client-server conversation.
---------------------- -----------------------------------------------------
Connection events
---------------------- -----------------------------------------------------
CONNECTING Client is connecting to the server.
CONNECTED Physical connection has been established.
DISCONNECTED Connection with server was broken.
---------------------- -----------------------------------------------------
SSL events
---------------------- -----------------------------------------------------
SEND_SSL_REQUEST Client is sending SSL connection request.
SSL_CONNECT Client is initiating SSL handshake.
SSL_CONNECTED SSL connection has been established.
---------------------- -----------------------------------------------------
Authentication events
---------------------- -----------------------------------------------------
CHALLENGE_RECEIVED Client received authentication challenge.
AUTH_PLUGIN Client selects an authentication plugin to be used
in the following authentication exchange.
SEND_AUTH_RESPONSE Client sends response to the authentication
challenge.
SEND_AUTH_DATA Client sends extra authentication data packet.
AUTHENTICATED Server has accepted connection.
---------------------- -----------------------------------------------------
Command phase events
---------------------- -----------------------------------------------------
SEND_COMMAND Client is sending a command to the server.
SEND_FILE Client is sending local file contents to the server.
---------------------- -----------------------------------------------------
General events
---------------------- -----------------------------------------------------
READ_PACKET Client starts waiting for a packet from server.
PACKET_RECEIVED A packet from server has been received.
PACKET_SENT After successful sending of a packet to the server.
ERROR Client detected an error.
---------------------- -----------------------------------------------------
*/
#define TRACE_EVENT_LIST(X) \
trace_event_ ## X(ERROR) \
trace_event_ ## X(CONNECTING) \
trace_event_ ## X(CONNECTED) \
trace_event_ ## X(DISCONNECTED) \
trace_event_ ## X(SEND_SSL_REQUEST) \
trace_event_ ## X(SSL_CONNECT) \
trace_event_ ## X(SSL_CONNECTED) \
trace_event_ ## X(INIT_PACKET_RECEIVED) \
trace_event_ ## X(AUTH_PLUGIN) \
trace_event_ ## X(SEND_AUTH_RESPONSE) \
trace_event_ ## X(SEND_AUTH_DATA) \
trace_event_ ## X(AUTHENTICATED) \
trace_event_ ## X(SEND_COMMAND) \
trace_event_ ## X(SEND_FILE) \
trace_event_ ## X(READ_PACKET) \
trace_event_ ## X(PACKET_RECEIVED) \
trace_event_ ## X(PACKET_SENT)
/**
Some trace events have additional arguments. These are stored in
st_trace_event_args structure. Various events store their arguments in the
structure as follows. Unused members are set to 0/NULL.
AUTH_PLUGIN
------------- ----------------------------------
plugin_name the name of the plugin
------------- ----------------------------------
SEND_COMMAND
------------- ----------------------------------
cmd the command code
hdr pointer to command packet header
hdr_len length of the header
pkt pointer to command arguments
pkt_len length of arguments
------------- ----------------------------------
Other SEND_* and *_RECEIVED events
------------- ----------------------------------
pkt the data sent or received
pkt_len length of the data
------------- ----------------------------------
PACKET_SENT
------------- ----------------------------------
pkt_len number of bytes sent
------------- ----------------------------------
*/
struct st_trace_event_args
{
const char *plugin_name;
int cmd;
const unsigned char *hdr;
size_t hdr_len;
const unsigned char *pkt;
size_t pkt_len;
};
/* Definitions of protocol_stage and trace_event enums. */
#define protocol_stage_enum(X) PROTOCOL_STAGE_ ## X,
enum protocol_stage {
PROTOCOL_STAGE_LIST(enum)
PROTOCOL_STAGE_LAST
};
#define trace_event_enum(X) TRACE_EVENT_ ## X,
enum trace_event {
TRACE_EVENT_LIST(enum)
TRACE_EVENT_LAST
};
/*
Trace plugin methods
====================
*/
struct st_mysql_client_plugin_TRACE;
struct st_mysql;
/**
Trace plugin tracing_start() method.
Called when tracing with this plugin starts on a connection. A trace
plugin might want to maintain per-connection information. It can
return a pointer to memory area holding such information. It will be
stored in a connection handle and passed to other plugin methods.
@param self pointer to the plugin instance
@param connection_handle
@param stage protocol stage in which tracing has started - currently
it is always CONNECTING stage.
@return A pointer to plugin-specific, per-connection data if any.
*/
typedef
void* (tracing_start_callback)(struct st_mysql_client_plugin_TRACE *self,
struct st_mysql *connection_handle,
enum protocol_stage stage);
/**
Trace plugin tracing_stop() method.
Called when tracing of the connection has ended. If a plugin
allocated any per-connection resources, it should de-allocate them
here.
@param self pointer to the plugin instance
@param connection_handle
@param plugin_data pointer to plugin's per-connection data.
*/
typedef
void (tracing_stop_callback)(struct st_mysql_client_plugin_TRACE *self,
struct st_mysql *connection_handle,
void *plugin_data);
/**
Trace plugin trace_event() method.
Called when a trace event occurs. Plugin can decide to stop tracing
this connection by returning non-zero value.
@param self pointer to the plugin instance
@param plugin_data pointer to plugin's per-connection data
@param connection_handle
@param stage current protocol stage
@param event the trace event
@param args trace event arguments
@return Non-zero if tracing of the connection should end here.
*/
typedef
int (trace_event_handler)(struct st_mysql_client_plugin_TRACE *self,
void *plugin_data,
struct st_mysql *connection_handle,
enum protocol_stage stage,
enum trace_event event,
struct st_trace_event_args args);
struct st_mysql_client_plugin_TRACE
{
MYSQL_CLIENT_PLUGIN_HEADER
tracing_start_callback *tracing_start;
tracing_stop_callback *tracing_stop;
trace_event_handler *trace_event;
};
/**
The global trace_plugin pointer. If it is not NULL, it points at a
loaded trace plugin which should be used to trace all connections made
to the server.
*/
extern
struct st_mysql_client_plugin_TRACE *trace_plugin;
#ifndef DBUG_OFF
/*
Functions for getting names of trace events and protocol
stages for debugging purposes.
*/
const char* protocol_stage_name(enum protocol_stage stage);
const char* trace_event_name(enum trace_event ev);
#endif
#ifdef __cplusplus
}
#endif
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,96 @@
/* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
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; 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,
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
#ifndef MYSQL_IDLE_H
#define MYSQL_IDLE_H
/**
@file mysql/psi/mysql_idle.h
Instrumentation helpers for idle waits.
*/
#include "mysql/psi/psi.h"
#ifndef PSI_IDLE_CALL
#define PSI_IDLE_CALL(M) PSI_DYNAMIC_CALL(M)
#endif
/**
@defgroup Idle_instrumentation Idle Instrumentation
@ingroup Instrumentation_interface
@{
*/
/**
@def MYSQL_START_IDLE_WAIT
Instrumentation helper for table io_waits.
This instrumentation marks the start of a wait event.
@param LOCKER the locker
@param STATE the locker state
@sa MYSQL_END_IDLE_WAIT.
*/
#ifdef HAVE_PSI_IDLE_INTERFACE
#define MYSQL_START_IDLE_WAIT(LOCKER, STATE) \
LOCKER= inline_mysql_start_idle_wait(STATE, __FILE__, __LINE__)
#else
#define MYSQL_START_IDLE_WAIT(LOCKER, STATE) \
do {} while (0)
#endif
/**
@def MYSQL_END_IDLE_WAIT
Instrumentation helper for idle waits.
This instrumentation marks the end of a wait event.
@param LOCKER the locker
@sa MYSQL_START_IDLE_WAIT.
*/
#ifdef HAVE_PSI_IDLE_INTERFACE
#define MYSQL_END_IDLE_WAIT(LOCKER) \
inline_mysql_end_idle_wait(LOCKER)
#else
#define MYSQL_END_IDLE_WAIT(LOCKER) \
do {} while (0)
#endif
#ifdef HAVE_PSI_IDLE_INTERFACE
/**
Instrumentation calls for MYSQL_START_IDLE_WAIT.
@sa MYSQL_END_IDLE_WAIT.
*/
static inline struct PSI_idle_locker *
inline_mysql_start_idle_wait(PSI_idle_locker_state *state,
const char *src_file, int src_line)
{
struct PSI_idle_locker *locker;
locker= PSI_IDLE_CALL(start_idle_wait)(state, src_file, src_line);
return locker;
}
/**
Instrumentation calls for MYSQL_END_IDLE_WAIT.
@sa MYSQL_START_IDLE_WAIT.
*/
static inline void
inline_mysql_end_idle_wait(struct PSI_idle_locker *locker)
{
if (likely(locker != NULL))
PSI_IDLE_CALL(end_idle_wait)(locker);
}
#endif
/** @} (end of group Idle_instrumentation) */
#endif

View File

@@ -0,0 +1,121 @@
/* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
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; 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,
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
#ifndef MYSQL_MDL_H
#define MYSQL_MDL_H
/**
@file mysql/psi/mysql_mdl.h
Instrumentation helpers for metadata locks.
*/
#include "mysql/psi/psi.h"
#ifndef PSI_METADATA_CALL
#define PSI_METADATA_CALL(M) PSI_DYNAMIC_CALL(M)
#endif
/**
@defgroup Thread_instrumentation Metadata Instrumentation
@ingroup Instrumentation_interface
@{
*/
/**
@def mysql_mdl_create(K, M, A)
Instrumented metadata lock creation.
@param I Metadata lock identity
@param K Metadata key
@param T Metadata lock type
@param D Metadata lock duration
@param S Metadata lock status
@param F request source file
@param L request source line
*/
#ifdef HAVE_PSI_METADATA_INTERFACE
#define mysql_mdl_create(I, K, T, D, S, F, L) \
inline_mysql_mdl_create(I, K, T, D, S, F, L)
#else
#define mysql_mdl_create(I, K, T, D, S, F, L) NULL
#endif
#ifdef HAVE_PSI_METADATA_INTERFACE
#define mysql_mdl_set_status(L, S) \
inline_mysql_mdl_set_status(L, S)
#else
#define mysql_mdl_set_status(L, S) \
do {} while (0)
#endif
/**
@def mysql_mdl_destroy(M)
Instrumented metadata lock destruction.
@param M Metadata lock
*/
#ifdef HAVE_PSI_METADATA_INTERFACE
#define mysql_mdl_destroy(M) \
inline_mysql_mdl_destroy(M, __FILE__, __LINE__)
#else
#define mysql_mdl_destroy(M) \
do {} while (0)
#endif
#ifdef HAVE_PSI_METADATA_INTERFACE
static inline PSI_metadata_lock *
inline_mysql_mdl_create(void *identity,
const MDL_key *mdl_key,
enum_mdl_type mdl_type,
enum_mdl_duration mdl_duration,
MDL_ticket::enum_psi_status mdl_status,
const char *src_file, uint src_line)
{
PSI_metadata_lock *result;
/* static_cast: Fit a round C++ enum peg into a square C int hole ... */
result= PSI_METADATA_CALL(create_metadata_lock)
(identity,
mdl_key,
static_cast<opaque_mdl_type> (mdl_type),
static_cast<opaque_mdl_duration> (mdl_duration),
static_cast<opaque_mdl_status> (mdl_status),
src_file, src_line);
return result;
}
static inline void inline_mysql_mdl_set_status(
PSI_metadata_lock *psi,
MDL_ticket::enum_psi_status mdl_status)
{
if (psi != NULL)
PSI_METADATA_CALL(set_metadata_lock_status)(psi, mdl_status);
}
static inline void inline_mysql_mdl_destroy(
PSI_metadata_lock *psi,
const char *src_file, uint src_line)
{
if (psi != NULL)
PSI_METADATA_CALL(destroy_metadata_lock)(psi);
}
#endif /* HAVE_PSI_METADATA_INTERFACE */
/** @} (end of group Metadata_instrumentation) */
#endif

View File

@@ -0,0 +1,62 @@
/* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
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; 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,
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
#ifndef MYSQL_MEMORY_H
#define MYSQL_MEMORY_H
/**
@file mysql/psi/mysql_memory.h
Instrumentation helpers for memory allocation.
*/
#include "mysql/psi/psi.h"
#ifndef PSI_MEMORY_CALL
#define PSI_MEMORY_CALL(M) PSI_DYNAMIC_CALL(M)
#endif
/**
@defgroup Memory_instrumentation Memory Instrumentation
@ingroup Instrumentation_interface
@{
*/
/**
@def mysql_memory_register(P1, P2, P3)
Memory registration.
*/
#define mysql_memory_register(P1, P2, P3) \
inline_mysql_memory_register(P1, P2, P3)
static inline void inline_mysql_memory_register(
#ifdef HAVE_PSI_MEMORY_INTERFACE
const char *category,
PSI_memory_info *info,
int count)
#else
const char *category MY_ATTRIBUTE((unused)),
void *info MY_ATTRIBUTE((unused)),
int count MY_ATTRIBUTE((unused)))
#endif
{
#ifdef HAVE_PSI_MEMORY_INTERFACE
PSI_MEMORY_CALL(register_memory)(category, info, count);
#endif
}
/** @} (end of group Memory_instrumentation) */
#endif

View File

@@ -0,0 +1,88 @@
/* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifndef MYSQL_PS_H
#define MYSQL_PS_H
/**
@file mysql/psi/mysql_ps.h
Instrumentation helpers for prepared statements.
*/
#include "mysql/psi/psi.h"
#ifndef PSI_PS_CALL
#define PSI_PS_CALL(M) PSI_DYNAMIC_CALL(M)
#endif
#ifdef HAVE_PSI_PS_INTERFACE
#define MYSQL_CREATE_PS(IDENTITY, ID, LOCKER, NAME, NAME_LENGTH, SQLTEXT, SQLTEXT_LENGTH) \
inline_mysql_create_prepared_stmt(IDENTITY, ID, LOCKER, NAME, NAME_LENGTH, SQLTEXT, SQLTEXT_LENGTH)
#define MYSQL_EXECUTE_PS(LOCKER, PREPARED_STMT) \
inline_mysql_execute_prepared_stmt(LOCKER, PREPARED_STMT)
#define MYSQL_DESTROY_PS(PREPARED_STMT) \
inline_mysql_destroy_prepared_stmt(PREPARED_STMT)
#define MYSQL_REPREPARE_PS(PREPARED_STMT) \
inline_mysql_reprepare_prepared_stmt(PREPARED_STMT)
#else
#define MYSQL_CREATE_PS(IDENTITY, ID, LOCKER, NAME, NAME_LENGTH, SQLTEXT, SQLTEXT_LENGTH) \
NULL
#define MYSQL_EXECUTE_PS(LOCKER, PREPARED_STMT) \
do {} while (0)
#define MYSQL_DESTROY_PS(PREPARED_STMT) \
do {} while (0)
#define MYSQL_REPREPARE_PS(PREPARED_STMT) \
do {} while (0)
#endif
#ifdef HAVE_PSI_PS_INTERFACE
static inline struct PSI_prepared_stmt*
inline_mysql_create_prepared_stmt(void *identity, uint stmt_id,
PSI_statement_locker *locker,
const char *stmt_name, size_t stmt_name_length,
const char *sqltext, size_t sqltext_length)
{
if (locker == NULL)
return NULL;
return PSI_PS_CALL(create_prepared_stmt)(identity, stmt_id,
locker,
stmt_name, stmt_name_length,
sqltext, sqltext_length);
}
static inline void
inline_mysql_execute_prepared_stmt(PSI_statement_locker *locker,
PSI_prepared_stmt* prepared_stmt)
{
if (prepared_stmt != NULL && locker != NULL)
PSI_PS_CALL(execute_prepared_stmt)(locker, prepared_stmt);
}
static inline void
inline_mysql_destroy_prepared_stmt(PSI_prepared_stmt *prepared_stmt)
{
if (prepared_stmt != NULL)
PSI_PS_CALL(destroy_prepared_stmt)(prepared_stmt);
}
static inline void
inline_mysql_reprepare_prepared_stmt(PSI_prepared_stmt *prepared_stmt)
{
if (prepared_stmt != NULL)
PSI_PS_CALL(reprepare_prepared_stmt)(prepared_stmt);
}
#endif
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,97 @@
/* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifndef MYSQL_SP_H
#define MYSQL_SP_H
/**
@file mysql/psi/mysql_sp.h
Instrumentation helpers for stored programs.
*/
#include "mysql/psi/psi.h"
#ifndef PSI_SP_CALL
#define PSI_SP_CALL(M) PSI_DYNAMIC_CALL(M)
#endif
#ifdef HAVE_PSI_SP_INTERFACE
#define MYSQL_START_SP(STATE, SP_SHARE) \
inline_mysql_start_sp(STATE, SP_SHARE)
#else
#define MYSQL_START_SP(STATE, SP_SHARE) \
NULL
#endif
#ifdef HAVE_PSI_SP_INTERFACE
#define MYSQL_END_SP(LOCKER) \
inline_mysql_end_sp(LOCKER)
#else
#define MYSQL_END_SP(LOCKER) \
do {} while (0)
#endif
#ifdef HAVE_PSI_SP_INTERFACE
#define MYSQL_DROP_SP(OT, SN, SNL, ON, ONL) \
inline_mysql_drop_sp(OT, SN, SNL, ON, ONL)
#else
#define MYSQL_DROP_SP(OT, SN, SNL, ON, ONL) \
do {} while (0)
#endif
#ifdef HAVE_PSI_SP_INTERFACE
#define MYSQL_GET_SP_SHARE(OT, SN, SNL, ON, ONL) \
inline_mysql_get_sp_share(OT, SN, SNL, ON, ONL)
#else
#define MYSQL_GET_SP_SHARE(OT, SN, SNL, ON, ONL) \
NULL
#endif
#ifdef HAVE_PSI_SP_INTERFACE
static inline struct PSI_sp_locker*
inline_mysql_start_sp(PSI_sp_locker_state *state, PSI_sp_share *sp_share)
{
return PSI_SP_CALL(start_sp)(state, sp_share);
}
static inline void inline_mysql_end_sp(PSI_sp_locker *locker)
{
if (likely(locker != NULL))
PSI_SP_CALL(end_sp)(locker);
}
static inline void
inline_mysql_drop_sp(uint sp_type,
const char* schema_name, uint shcema_name_length,
const char* object_name, uint object_name_length)
{
PSI_SP_CALL(drop_sp)(sp_type,
schema_name, shcema_name_length,
object_name, object_name_length);
}
static inline PSI_sp_share*
inline_mysql_get_sp_share(uint sp_type,
const char* schema_name, uint shcema_name_length,
const char* object_name, uint object_name_length)
{
return PSI_SP_CALL(get_sp_share)(sp_type,
schema_name, shcema_name_length,
object_name, object_name_length);
}
#endif
#endif

View File

@@ -0,0 +1,198 @@
/* Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifndef MYSQL_STAGE_H
#define MYSQL_STAGE_H
/**
@file mysql/psi/mysql_stage.h
Instrumentation helpers for stages.
*/
#include "mysql/psi/psi.h"
#ifndef PSI_STAGE_CALL
#define PSI_STAGE_CALL(M) PSI_DYNAMIC_CALL(M)
#endif
/**
@defgroup Stage_instrumentation Stage Instrumentation
@ingroup Instrumentation_interface
@{
*/
/**
@def mysql_stage_register(P1, P2, P3)
Stage registration.
*/
#ifdef HAVE_PSI_STAGE_INTERFACE
#define mysql_stage_register(P1, P2, P3) \
inline_mysql_stage_register(P1, P2, P3)
#else
#define mysql_stage_register(P1, P2, P3) \
do {} while (0)
#endif
/**
@def MYSQL_SET_STAGE
Set the current stage.
Use this API when the file and line
is passed from the caller.
@param K the stage key
@param F the source file name
@param L the source file line
@return the current stage progress
*/
#ifdef HAVE_PSI_STAGE_INTERFACE
#define MYSQL_SET_STAGE(K, F, L) \
inline_mysql_set_stage(K, F, L)
#else
#define MYSQL_SET_STAGE(K, F, L) \
NULL
#endif
/**
@def mysql_set_stage
Set the current stage.
@param K the stage key
@return the current stage progress
*/
#ifdef HAVE_PSI_STAGE_INTERFACE
#define mysql_set_stage(K) \
inline_mysql_set_stage(K, __FILE__, __LINE__)
#else
#define mysql_set_stage(K) \
NULL
#endif
/**
@def mysql_end_stage
End the last stage
*/
#ifdef HAVE_PSI_STAGE_INTERFACE
#define mysql_end_stage \
inline_mysql_end_stage
#else
#define mysql_end_stage \
do {} while (0)
#endif
#ifdef HAVE_PSI_STAGE_INTERFACE
static inline void inline_mysql_stage_register(
const char *category, PSI_stage_info **info, int count)
{
PSI_STAGE_CALL(register_stage)(category, info, count);
}
#endif
#ifdef HAVE_PSI_STAGE_INTERFACE
static inline PSI_stage_progress*
inline_mysql_set_stage(PSI_stage_key key,
const char *src_file, int src_line)
{
return PSI_STAGE_CALL(start_stage)(key, src_file, src_line);
}
#endif
#ifdef HAVE_PSI_STAGE_INTERFACE
static inline void
inline_mysql_end_stage()
{
PSI_STAGE_CALL(end_stage)();
}
#endif
#ifdef HAVE_PSI_STAGE_INTERFACE
#define mysql_stage_set_work_completed(P1, P2) \
inline_mysql_stage_set_work_completed(P1, P2)
#define mysql_stage_get_work_completed(P1) \
inline_mysql_stage_get_work_completed(P1)
#else
#define mysql_stage_set_work_completed(P1, P2) \
do {} while (0)
#define mysql_stage_get_work_completed(P1) \
do {} while (0)
#endif
#ifdef HAVE_PSI_STAGE_INTERFACE
#define mysql_stage_inc_work_completed(P1, P2) \
inline_mysql_stage_inc_work_completed(P1, P2)
#else
#define mysql_stage_inc_work_completed(P1, P2) \
do {} while (0)
#endif
#ifdef HAVE_PSI_STAGE_INTERFACE
#define mysql_stage_set_work_estimated(P1, P2) \
inline_mysql_stage_set_work_estimated(P1, P2)
#define mysql_stage_get_work_estimated(P1) \
inline_mysql_stage_get_work_estimated(P1)
#else
#define mysql_stage_set_work_estimated(P1, P2) \
do {} while (0)
#define mysql_stage_get_work_estimated(P1) \
do {} while (0)
#endif
#ifdef HAVE_PSI_STAGE_INTERFACE
static inline void
inline_mysql_stage_set_work_completed(PSI_stage_progress *progress,
ulonglong val)
{
if (progress != NULL)
progress->m_work_completed= val;
}
static inline ulonglong
inline_mysql_stage_get_work_completed(PSI_stage_progress *progress)
{
return progress->m_work_completed;
}
#endif
#ifdef HAVE_PSI_STAGE_INTERFACE
static inline void
inline_mysql_stage_inc_work_completed(PSI_stage_progress *progress,
ulonglong val)
{
if (progress != NULL)
progress->m_work_completed+= val;
}
#endif
#ifdef HAVE_PSI_STAGE_INTERFACE
static inline void
inline_mysql_stage_set_work_estimated(PSI_stage_progress *progress,
ulonglong val)
{
if (progress != NULL)
progress->m_work_estimated= val;
}
static inline ulonglong
inline_mysql_stage_get_work_estimated(PSI_stage_progress *progress)
{
return progress->m_work_estimated;
}
#endif
/** @} (end of group Stage_instrumentation) */
#endif

View File

@@ -0,0 +1,235 @@
/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifndef MYSQL_STATEMENT_H
#define MYSQL_STATEMENT_H
/**
@file mysql/psi/mysql_statement.h
Instrumentation helpers for statements.
*/
#include "mysql/psi/psi.h"
class Diagnostics_area;
typedef struct charset_info_st CHARSET_INFO;
#ifndef PSI_STATEMENT_CALL
#define PSI_STATEMENT_CALL(M) PSI_DYNAMIC_CALL(M)
#endif
#ifndef PSI_DIGEST_CALL
#define PSI_DIGEST_CALL(M) PSI_DYNAMIC_CALL(M)
#endif
/**
@defgroup Statement_instrumentation Statement Instrumentation
@ingroup Instrumentation_interface
@{
*/
/**
@def mysql_statement_register(P1, P2, P3)
Statement registration.
*/
#ifdef HAVE_PSI_STATEMENT_INTERFACE
#define mysql_statement_register(P1, P2, P3) \
inline_mysql_statement_register(P1, P2, P3)
#else
#define mysql_statement_register(P1, P2, P3) \
do {} while (0)
#endif
#ifdef HAVE_PSI_STATEMENT_DIGEST_INTERFACE
#define MYSQL_DIGEST_START(LOCKER) \
inline_mysql_digest_start(LOCKER)
#else
#define MYSQL_DIGEST_START(LOCKER) \
NULL
#endif
#ifdef HAVE_PSI_STATEMENT_DIGEST_INTERFACE
#define MYSQL_DIGEST_END(LOCKER, DIGEST) \
inline_mysql_digest_end(LOCKER, DIGEST)
#else
#define MYSQL_DIGEST_END(LOCKER, DIGEST) \
do {} while (0)
#endif
#ifdef HAVE_PSI_STATEMENT_INTERFACE
#define MYSQL_START_STATEMENT(STATE, K, DB, DB_LEN, CS, SPS) \
inline_mysql_start_statement(STATE, K, DB, DB_LEN, CS, SPS, __FILE__, __LINE__)
#else
#define MYSQL_START_STATEMENT(STATE, K, DB, DB_LEN, CS, SPS) \
NULL
#endif
#ifdef HAVE_PSI_STATEMENT_INTERFACE
#define MYSQL_REFINE_STATEMENT(LOCKER, K) \
inline_mysql_refine_statement(LOCKER, K)
#else
#define MYSQL_REFINE_STATEMENT(LOCKER, K) \
NULL
#endif
#ifdef HAVE_PSI_STATEMENT_INTERFACE
#define MYSQL_SET_STATEMENT_TEXT(LOCKER, P1, P2) \
inline_mysql_set_statement_text(LOCKER, P1, P2)
#else
#define MYSQL_SET_STATEMENT_TEXT(LOCKER, P1, P2) \
do {} while (0)
#endif
#ifdef HAVE_PSI_STATEMENT_INTERFACE
#define MYSQL_SET_STATEMENT_LOCK_TIME(LOCKER, P1) \
inline_mysql_set_statement_lock_time(LOCKER, P1)
#else
#define MYSQL_SET_STATEMENT_LOCK_TIME(LOCKER, P1) \
do {} while (0)
#endif
#ifdef HAVE_PSI_STATEMENT_INTERFACE
#define MYSQL_SET_STATEMENT_ROWS_SENT(LOCKER, P1) \
inline_mysql_set_statement_rows_sent(LOCKER, P1)
#else
#define MYSQL_SET_STATEMENT_ROWS_SENT(LOCKER, P1) \
do {} while (0)
#endif
#ifdef HAVE_PSI_STATEMENT_INTERFACE
#define MYSQL_SET_STATEMENT_ROWS_EXAMINED(LOCKER, P1) \
inline_mysql_set_statement_rows_examined(LOCKER, P1)
#else
#define MYSQL_SET_STATEMENT_ROWS_EXAMINED(LOCKER, P1) \
do {} while (0)
#endif
#ifdef HAVE_PSI_STATEMENT_INTERFACE
#define MYSQL_END_STATEMENT(LOCKER, DA) \
inline_mysql_end_statement(LOCKER, DA)
#else
#define MYSQL_END_STATEMENT(LOCKER, DA) \
do {} while (0)
#endif
#ifdef HAVE_PSI_STATEMENT_INTERFACE
static inline void inline_mysql_statement_register(
const char *category, PSI_statement_info *info, int count)
{
PSI_STATEMENT_CALL(register_statement)(category, info, count);
}
#ifdef HAVE_PSI_STATEMENT_DIGEST_INTERFACE
static inline struct PSI_digest_locker *
inline_mysql_digest_start(PSI_statement_locker *locker)
{
PSI_digest_locker* digest_locker= NULL;
if (likely(locker != NULL))
digest_locker= PSI_DIGEST_CALL(digest_start)(locker);
return digest_locker;
}
#endif
#ifdef HAVE_PSI_STATEMENT_DIGEST_INTERFACE
static inline void
inline_mysql_digest_end(PSI_digest_locker *locker, const sql_digest_storage *digest)
{
if (likely(locker != NULL))
PSI_DIGEST_CALL(digest_end)(locker, digest);
}
#endif
static inline struct PSI_statement_locker *
inline_mysql_start_statement(PSI_statement_locker_state *state,
PSI_statement_key key,
const char *db, uint db_len,
const CHARSET_INFO *charset,
PSI_sp_share *sp_share,
const char *src_file, int src_line)
{
PSI_statement_locker *locker;
locker= PSI_STATEMENT_CALL(get_thread_statement_locker)(state, key, charset,
sp_share);
if (likely(locker != NULL))
PSI_STATEMENT_CALL(start_statement)(locker, db, db_len, src_file, src_line);
return locker;
}
static inline struct PSI_statement_locker *
inline_mysql_refine_statement(PSI_statement_locker *locker,
PSI_statement_key key)
{
if (likely(locker != NULL))
{
locker= PSI_STATEMENT_CALL(refine_statement)(locker, key);
}
return locker;
}
static inline void
inline_mysql_set_statement_text(PSI_statement_locker *locker,
const char *text, uint text_len)
{
if (likely(locker != NULL))
{
PSI_STATEMENT_CALL(set_statement_text)(locker, text, text_len);
}
}
static inline void
inline_mysql_set_statement_lock_time(PSI_statement_locker *locker,
ulonglong count)
{
if (likely(locker != NULL))
{
PSI_STATEMENT_CALL(set_statement_lock_time)(locker, count);
}
}
static inline void
inline_mysql_set_statement_rows_sent(PSI_statement_locker *locker,
ulonglong count)
{
if (likely(locker != NULL))
{
PSI_STATEMENT_CALL(set_statement_rows_sent)(locker, count);
}
}
static inline void
inline_mysql_set_statement_rows_examined(PSI_statement_locker *locker,
ulonglong count)
{
if (likely(locker != NULL))
{
PSI_STATEMENT_CALL(set_statement_rows_examined)(locker, count);
}
}
static inline void
inline_mysql_end_statement(struct PSI_statement_locker *locker,
Diagnostics_area *stmt_da)
{
PSI_STAGE_CALL(end_stage)();
if (likely(locker != NULL))
PSI_STATEMENT_CALL(end_statement)(locker, stmt_da);
}
#endif
/** @} (end of group Statement_instrumentation) */
#endif

View File

@@ -0,0 +1,142 @@
/* Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
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; 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,
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
#ifndef MYSQL_TABLE_H
#define MYSQL_TABLE_H
/**
@file mysql/psi/mysql_table.h
Instrumentation helpers for table io.
*/
#include "mysql/psi/psi.h"
#ifndef PSI_TABLE_CALL
#define PSI_TABLE_CALL(M) PSI_DYNAMIC_CALL(M)
#endif
/**
@defgroup Table_instrumentation Table Instrumentation
@ingroup Instrumentation_interface
@{
*/
/**
@def MYSQL_TABLE_WAIT_VARIABLES
Instrumentation helper for table waits.
This instrumentation declares local variables.
Do not use a ';' after this macro
@param LOCKER the locker
@param STATE the locker state
@sa MYSQL_START_TABLE_IO_WAIT.
@sa MYSQL_END_TABLE_IO_WAIT.
@sa MYSQL_START_TABLE_LOCK_WAIT.
@sa MYSQL_END_TABLE_LOCK_WAIT.
*/
#ifdef HAVE_PSI_TABLE_INTERFACE
#define MYSQL_TABLE_WAIT_VARIABLES(LOCKER, STATE) \
struct PSI_table_locker* LOCKER; \
PSI_table_locker_state STATE;
#else
#define MYSQL_TABLE_WAIT_VARIABLES(LOCKER, STATE)
#endif
/**
@def MYSQL_START_TABLE_LOCK_WAIT
Instrumentation helper for table lock waits.
This instrumentation marks the start of a wait event.
@param LOCKER the locker
@param STATE the locker state
@param PSI the instrumented table
@param OP the table operation to be performed
@param FLAGS per table operation flags.
@sa MYSQL_END_TABLE_LOCK_WAIT.
*/
#ifdef HAVE_PSI_TABLE_INTERFACE
#define MYSQL_START_TABLE_LOCK_WAIT(LOCKER, STATE, PSI, OP, FLAGS) \
LOCKER= inline_mysql_start_table_lock_wait(STATE, PSI, \
OP, FLAGS, __FILE__, __LINE__)
#else
#define MYSQL_START_TABLE_LOCK_WAIT(LOCKER, STATE, PSI, OP, FLAGS) \
do {} while (0)
#endif
/**
@def MYSQL_END_TABLE_LOCK_WAIT
Instrumentation helper for table lock waits.
This instrumentation marks the end of a wait event.
@param LOCKER the locker
@sa MYSQL_START_TABLE_LOCK_WAIT.
*/
#ifdef HAVE_PSI_TABLE_INTERFACE
#define MYSQL_END_TABLE_LOCK_WAIT(LOCKER) \
inline_mysql_end_table_lock_wait(LOCKER)
#else
#define MYSQL_END_TABLE_LOCK_WAIT(LOCKER) \
do {} while (0)
#endif
#ifdef HAVE_PSI_TABLE_INTERFACE
#define MYSQL_UNLOCK_TABLE(T) \
inline_mysql_unlock_table(T)
#else
#define MYSQL_UNLOCK_TABLE(T) \
do {} while (0)
#endif
#ifdef HAVE_PSI_TABLE_INTERFACE
/**
Instrumentation calls for MYSQL_START_TABLE_LOCK_WAIT.
@sa MYSQL_END_TABLE_LOCK_WAIT.
*/
static inline struct PSI_table_locker *
inline_mysql_start_table_lock_wait(PSI_table_locker_state *state,
struct PSI_table *psi,
enum PSI_table_lock_operation op,
ulong flags, const char *src_file, int src_line)
{
if (psi != NULL)
{
struct PSI_table_locker *locker;
locker= PSI_TABLE_CALL(start_table_lock_wait)
(state, psi, op, flags, src_file, src_line);
return locker;
}
return NULL;
}
/**
Instrumentation calls for MYSQL_END_TABLE_LOCK_WAIT.
@sa MYSQL_START_TABLE_LOCK_WAIT.
*/
static inline void
inline_mysql_end_table_lock_wait(struct PSI_table_locker *locker)
{
if (locker != NULL)
PSI_TABLE_CALL(end_table_lock_wait)(locker);
}
static inline void
inline_mysql_unlock_table(struct PSI_table *table)
{
if (table != NULL)
PSI_TABLE_CALL(unlock_table)(table);
}
#endif
/** @} (end of group Table_instrumentation) */
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,213 @@
/* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifndef MYSQL_TRANSACTION_H
#define MYSQL_TRANSACTION_H
/**
@file mysql/psi/mysql_transaction.h
Instrumentation helpers for transactions.
*/
#include "mysql/psi/psi.h"
#ifndef PSI_TRANSACTION_CALL
#define PSI_TRANSACTION_CALL(M) PSI_DYNAMIC_CALL(M)
#endif
/**
@defgroup Transaction_instrumentation Transaction Instrumentation
@ingroup Instrumentation_interface
@{
*/
#ifdef HAVE_PSI_TRANSACTION_INTERFACE
#define MYSQL_START_TRANSACTION(STATE, XID, TRXID, ISO, RO, AC) \
inline_mysql_start_transaction(STATE, XID, TRXID, ISO, RO, AC, __FILE__, __LINE__)
#else
#define MYSQL_START_TRANSACTION(STATE, XID, TRXID, ISO, RO, AC) \
do {} while (0)
#endif
#ifdef HAVE_PSI_TRANSACTION_INTERFACE
#define MYSQL_SET_TRANSACTION_GTID(LOCKER, P1, P2) \
inline_mysql_set_transaction_gtid(LOCKER, P1, P2)
#else
#define MYSQL_SET_TRANSACTION_GTID(LOCKER, P1, P2) \
do {} while (0)
#endif
#ifdef HAVE_PSI_TRANSACTION_INTERFACE
#define MYSQL_SET_TRANSACTION_XID(LOCKER, P1, P2) \
inline_mysql_set_transaction_xid(LOCKER, P1, P2)
#else
#define MYSQL_SET_TRANSACTION_XID(LOCKER, P1, P2) \
do {} while (0)
#endif
#ifdef HAVE_PSI_TRANSACTION_INTERFACE
#define MYSQL_SET_TRANSACTION_XA_STATE(LOCKER, P1) \
inline_mysql_set_transaction_xa_state(LOCKER, P1)
#else
#define MYSQL_SET_TRANSACTION_XA_STATE(LOCKER, P1) \
do {} while (0)
#endif
#ifdef HAVE_PSI_TRANSACTION_INTERFACE
#define MYSQL_SET_TRANSACTION_TRXID(LOCKER, P1) \
inline_mysql_set_transaction_trxid(LOCKER, P1)
#else
#define MYSQL_SET_TRANSACTION_TRXID(LOCKER, P1) \
do {} while (0)
#endif
#ifdef HAVE_PSI_TRANSACTION_INTERFACE
#define MYSQL_INC_TRANSACTION_SAVEPOINTS(LOCKER, P1) \
inline_mysql_inc_transaction_savepoints(LOCKER, P1)
#else
#define MYSQL_INC_TRANSACTION_SAVEPOINTS(LOCKER, P1) \
do {} while (0)
#endif
#ifdef HAVE_PSI_TRANSACTION_INTERFACE
#define MYSQL_INC_TRANSACTION_ROLLBACK_TO_SAVEPOINT(LOCKER, P1) \
inline_mysql_inc_transaction_rollback_to_savepoint(LOCKER, P1)
#else
#define MYSQL_INC_TRANSACTION_ROLLBACK_TO_SAVEPOINT(LOCKER, P1) \
do {} while (0)
#endif
#ifdef HAVE_PSI_TRANSACTION_INTERFACE
#define MYSQL_INC_TRANSACTION_RELEASE_SAVEPOINT(LOCKER, P1) \
inline_mysql_inc_transaction_release_savepoint(LOCKER, P1)
#else
#define MYSQL_INC_TRANSACTION_RELEASE_SAVEPOINT(LOCKER, P1) \
do {} while (0)
#endif
#ifdef HAVE_PSI_TRANSACTION_INTERFACE
#define MYSQL_ROLLBACK_TRANSACTION(LOCKER) \
inline_mysql_rollback_transaction(LOCKER)
#else
#define MYSQL_ROLLBACK_TRANSACTION(LOCKER) \
NULL
#endif
#ifdef HAVE_PSI_TRANSACTION_INTERFACE
#define MYSQL_COMMIT_TRANSACTION(LOCKER) \
inline_mysql_commit_transaction(LOCKER)
#else
#define MYSQL_COMMIT_TRANSACTION(LOCKER) \
NULL
#endif
#ifdef HAVE_PSI_TRANSACTION_INTERFACE
static inline struct PSI_transaction_locker *
inline_mysql_start_transaction(PSI_transaction_locker_state *state,
const void *xid,
const ulonglong *trxid,
int isolation_level,
my_bool read_only,
my_bool autocommit,
const char *src_file, int src_line)
{
PSI_transaction_locker *locker;
locker= PSI_TRANSACTION_CALL(get_thread_transaction_locker)(state,
xid, trxid,
isolation_level,
read_only,
autocommit);
if (likely(locker != NULL))
PSI_TRANSACTION_CALL(start_transaction)(locker, src_file, src_line);
return locker;
}
static inline void
inline_mysql_set_transaction_gtid(PSI_transaction_locker *locker,
const void *sid,
const void *gtid_spec)
{
if (likely(locker != NULL))
PSI_TRANSACTION_CALL(set_transaction_gtid)(locker, sid, gtid_spec);
}
static inline void
inline_mysql_set_transaction_xid(PSI_transaction_locker *locker,
const void *xid,
int xa_state)
{
if (likely(locker != NULL))
PSI_TRANSACTION_CALL(set_transaction_xid)(locker, xid, xa_state);
}
static inline void
inline_mysql_set_transaction_xa_state(PSI_transaction_locker *locker,
int xa_state)
{
if (likely(locker != NULL))
PSI_TRANSACTION_CALL(set_transaction_xa_state)(locker, xa_state);
}
static inline void
inline_mysql_set_transaction_trxid(PSI_transaction_locker *locker,
const ulonglong *trxid)
{
if (likely(locker != NULL))
PSI_TRANSACTION_CALL(set_transaction_trxid)(locker, trxid);
}
static inline void
inline_mysql_inc_transaction_savepoints(PSI_transaction_locker *locker,
ulong count)
{
if (likely(locker != NULL))
PSI_TRANSACTION_CALL(inc_transaction_savepoints)(locker, count);
}
static inline void
inline_mysql_inc_transaction_rollback_to_savepoint(PSI_transaction_locker *locker,
ulong count)
{
if (likely(locker != NULL))
PSI_TRANSACTION_CALL(inc_transaction_rollback_to_savepoint)(locker, count);
}
static inline void
inline_mysql_inc_transaction_release_savepoint(PSI_transaction_locker *locker,
ulong count)
{
if (likely(locker != NULL))
PSI_TRANSACTION_CALL(inc_transaction_release_savepoint)(locker, count);
}
static inline void
inline_mysql_rollback_transaction(struct PSI_transaction_locker *locker)
{
if (likely(locker != NULL))
PSI_TRANSACTION_CALL(end_transaction)(locker, false);
}
static inline void
inline_mysql_commit_transaction(struct PSI_transaction_locker *locker)
{
if (likely(locker != NULL))
PSI_TRANSACTION_CALL(end_transaction)(locker, true);
}
#endif
/** @} (end of group Transaction_instrumentation) */
#endif

2980
3rdparty/mysql/include/mysql/psi/psi.h vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,155 @@
/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
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; 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,
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
#ifndef MYSQL_PSI_BASE_H
#define MYSQL_PSI_BASE_H
#ifdef __cplusplus
extern "C" {
#endif
/**
@file mysql/psi/psi_base.h
Performance schema instrumentation interface.
@defgroup Instrumentation_interface Instrumentation Interface
@ingroup Performance_schema
@{
*/
#define PSI_INSTRUMENT_ME 0
#define PSI_NOT_INSTRUMENTED 0
/**
Global flag.
This flag indicate that an instrumentation point is a global variable,
or a singleton.
*/
#define PSI_FLAG_GLOBAL (1 << 0)
/**
Mutable flag.
This flag indicate that an instrumentation point is a general placeholder,
that can mutate into a more specific instrumentation point.
*/
#define PSI_FLAG_MUTABLE (1 << 1)
#define PSI_FLAG_THREAD (1 << 2)
/**
Stage progress flag.
This flag apply to the stage instruments only.
It indicates the instrumentation provides progress data.
*/
#define PSI_FLAG_STAGE_PROGRESS (1 << 3)
/**
Shared Exclusive flag.
Indicates that rwlock support the shared exclusive state.
*/
#define PSI_RWLOCK_FLAG_SX (1 << 4)
/**
Transferable flag.
This flag indicate that an instrumented object can
be created by a thread and destroyed by another thread.
*/
#define PSI_FLAG_TRANSFER (1 << 5)
/**
Volatility flag.
This flag indicate that an instrumented object
has a volatility (life cycle) comparable
to the volatility of a session.
*/
#define PSI_FLAG_VOLATILITY_SESSION (1 << 6)
#ifdef HAVE_PSI_INTERFACE
/**
@def PSI_VERSION_1
Performance Schema Interface number for version 1.
This version is supported.
*/
#define PSI_VERSION_1 1
/**
@def PSI_VERSION_2
Performance Schema Interface number for version 2.
This version is not implemented, it's a placeholder.
*/
#define PSI_VERSION_2 2
/**
@def PSI_CURRENT_VERSION
Performance Schema Interface number for the most recent version.
The most current version is @c PSI_VERSION_1
*/
#define PSI_CURRENT_VERSION 1
/**
@def USE_PSI_1
Define USE_PSI_1 to use the interface version 1.
*/
/**
@def USE_PSI_2
Define USE_PSI_2 to use the interface version 2.
*/
/**
@def HAVE_PSI_1
Define HAVE_PSI_1 if the interface version 1 needs to be compiled in.
*/
/**
@def HAVE_PSI_2
Define HAVE_PSI_2 if the interface version 2 needs to be compiled in.
*/
#ifndef USE_PSI_2
#ifndef USE_PSI_1
#define USE_PSI_1
#endif
#endif
#ifdef USE_PSI_1
#define HAVE_PSI_1
#endif
#ifdef USE_PSI_2
#define HAVE_PSI_2
#endif
/*
Allow to override PSI_XXX_CALL at compile time
with more efficient implementations, if available.
If nothing better is available,
make a dynamic call using the PSI_server function pointer.
*/
#define PSI_DYNAMIC_CALL(M) PSI_server->M
#endif /* HAVE_PSI_INTERFACE */
/** @} */
#ifdef __cplusplus
}
#endif
#endif /* MYSQL_PSI_BASE_H */

View File

@@ -0,0 +1,155 @@
/* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
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; 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,
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
#ifndef MYSQL_PSI_MEMORY_H
#define MYSQL_PSI_MEMORY_H
#include "psi_base.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
@file mysql/psi/psi_memory.h
Performance schema instrumentation interface.
@defgroup Instrumentation_interface Instrumentation Interface
@ingroup Performance_schema
@{
*/
#ifdef HAVE_PSI_INTERFACE
#ifndef DISABLE_ALL_PSI
#ifndef DISABLE_PSI_MEMORY
#define HAVE_PSI_MEMORY_INTERFACE
#endif /* DISABLE_PSI_MEMORY */
#endif /* DISABLE_ALL_PSI */
#endif /* HAVE_PSI_INTERFACE */
struct PSI_thread;
/**
Instrumented memory key.
To instrument memory, a memory key must be obtained using @c register_memory.
Using a zero key always disable the instrumentation.
*/
typedef unsigned int PSI_memory_key;
#ifdef HAVE_PSI_1
/**
@defgroup Group_PSI_v1 Application Binary Interface, version 1
@ingroup Instrumentation_interface
@{
*/
/**
Memory instrument information.
@since PSI_VERSION_1
This structure is used to register instrumented memory.
*/
struct PSI_memory_info_v1
{
/** Pointer to the key assigned to the registered memory. */
PSI_memory_key *m_key;
/** The name of the memory instrument to register. */
const char *m_name;
/**
The flags of the socket instrument to register.
@sa PSI_FLAG_GLOBAL
*/
int m_flags;
};
typedef struct PSI_memory_info_v1 PSI_memory_info_v1;
/**
Memory registration API.
@param category a category name (typically a plugin name)
@param info an array of memory info to register
@param count the size of the info array
*/
typedef void (*register_memory_v1_t)
(const char *category, struct PSI_memory_info_v1 *info, int count);
/**
Instrument memory allocation.
@param key the memory instrument key
@param size the size of memory allocated
@param[out] owner the memory owner
@return the effective memory instrument key
*/
typedef PSI_memory_key (*memory_alloc_v1_t)
(PSI_memory_key key, size_t size, struct PSI_thread ** owner);
/**
Instrument memory re allocation.
@param key the memory instrument key
@param old_size the size of memory previously allocated
@param new_size the size of memory re allocated
@param[in, out] owner the memory owner
@return the effective memory instrument key
*/
typedef PSI_memory_key (*memory_realloc_v1_t)
(PSI_memory_key key, size_t old_size, size_t new_size, struct PSI_thread ** owner);
/**
Instrument memory claim.
@param key the memory instrument key
@param size the size of memory allocated
@param[in, out] owner the memory owner
@return the effective memory instrument key
*/
typedef PSI_memory_key (*memory_claim_v1_t)
(PSI_memory_key key, size_t size, struct PSI_thread ** owner);
/**
Instrument memory free.
@param key the memory instrument key
@param size the size of memory allocated
@param owner the memory owner
*/
typedef void (*memory_free_v1_t)
(PSI_memory_key key, size_t size, struct PSI_thread * owner);
/** @} (end of group Group_PSI_v1) */
#endif /* HAVE_PSI_1 */
#ifdef HAVE_PSI_2
struct PSI_memory_info_v2
{
int placeholder;
};
#endif /* HAVE_PSI_2 */
#ifdef USE_PSI_1
typedef struct PSI_memory_info_v1 PSI_memory_info;
#endif
#ifdef USE_PSI_2
typedef struct PSI_memory_info_v2 PSI_memory_info;
#endif
/** @} (end of group Instrumentation_interface) */
#ifdef __cplusplus
}
#endif
#endif /* MYSQL_PSI_MEMORY_H */

View File

@@ -0,0 +1,101 @@
#ifndef MYSQL_SERVICE_MY_SNPRINTF_INCLUDED
#define MYSQL_SERVICE_MY_SNPRINTF_INCLUDED
/* Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/**
@file
my_snprintf service
Portable and limited vsnprintf() implementation.
This is a portable, limited vsnprintf() implementation, with some
extra features. "Portable" means that it'll produce identical result
on all platforms (for example, on Windows and Linux system printf %e
formats the exponent differently, on different systems %p either
prints leading 0x or not, %s may accept null pointer or crash on
it). "Limited" means that it does not support all the C89 features.
But it supports few extensions, not in any standard.
my_vsnprintf(to, n, fmt, ap)
@param[out] to A buffer to store the result in
@param[in] n Store up to n-1 characters, followed by an end 0
@param[in] fmt printf-like format string
@param[in] ap Arguments
@return a number of bytes written to a buffer *excluding* terminating '\0'
@post
The syntax of a format string is generally the same:
% <flag> <width> <precision> <length modifier> <format>
where everithing but the format is optional.
Three one-character flags are recognized:
'0' has the standard zero-padding semantics;
'-' is parsed, but silently ignored;
'`' (backtick) is only supported for strings (%s) and means that the
string will be quoted according to MySQL identifier quoting rules.
Both <width> and <precision> can be specified as numbers or '*'.
If an asterisk is used, an argument of type int is consumed.
<length modifier> can be 'l', 'll', or 'z'.
Supported formats are 's' (null pointer is accepted, printed as
"(null)"), 'b' (extension, see below), 'c', 'd', 'i', 'u', 'x', 'o',
'X', 'p' (works as 0x%x).
Standard syntax for positional arguments $n is supported.
Extensions:
Flag '`' (backtick): see above.
Format 'b': binary buffer, prints exactly <precision> bytes from the
argument, without stopping at '\0'.
*/
#ifdef __cplusplus
extern "C" {
#endif
#ifndef MYSQL_ABI_CHECK
#include <stdarg.h>
#include <stdlib.h>
#endif
extern struct my_snprintf_service_st {
size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
} *my_snprintf_service;
#ifdef MYSQL_DYNAMIC_PLUGIN
#define my_vsnprintf my_snprintf_service->my_vsnprintf_type
#define my_snprintf my_snprintf_service->my_snprintf_type
#else
size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
#endif
#ifdef __cplusplus
}
#endif
#endif /* #define MYSQL_SERVICE_MY_SNPRINTF_INCLUDED */

View File

@@ -0,0 +1,81 @@
/* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifndef MYSQL_SERVICE_MYSQL_ALLOC_INCLUDED
#define MYSQL_SERVICE_MYSQL_ALLOC_INCLUDED
#ifndef MYSQL_ABI_CHECK
#include <stdlib.h>
#endif
/* PSI_memory_key */
#include "mysql/psi/psi_memory.h"
#ifdef __cplusplus
extern "C" {
#endif
/* myf */
typedef int myf_t;
typedef void * (*mysql_malloc_t)(PSI_memory_key key, size_t size, myf_t flags);
typedef void * (*mysql_realloc_t)(PSI_memory_key key, void *ptr, size_t size, myf_t flags);
typedef void (*mysql_claim_t)(void *ptr);
typedef void (*mysql_free_t)(void *ptr);
typedef void * (*my_memdup_t)(PSI_memory_key key, const void *from, size_t length, myf_t flags);
typedef char * (*my_strdup_t)(PSI_memory_key key, const char *from, myf_t flags);
typedef char * (*my_strndup_t)(PSI_memory_key key, const char *from, size_t length, myf_t flags);
struct mysql_malloc_service_st
{
mysql_malloc_t mysql_malloc;
mysql_realloc_t mysql_realloc;
mysql_claim_t mysql_claim;
mysql_free_t mysql_free;
my_memdup_t my_memdup;
my_strdup_t my_strdup;
my_strndup_t my_strndup;
};
extern struct mysql_malloc_service_st *mysql_malloc_service;
#ifdef MYSQL_DYNAMIC_PLUGIN
#define my_malloc mysql_malloc_service->mysql_malloc
#define my_realloc mysql_malloc_service->mysql_realloc
#define my_claim mysql_malloc_service->mysql_claim
#define my_free mysql_malloc_service->mysql_free
#define my_memdup mysql_malloc_service->my_memdup
#define my_strdup mysql_malloc_service->my_strdup
#define my_strndup mysql_malloc_service->my_strndup
#else
extern void * my_malloc(PSI_memory_key key, size_t size, myf_t flags);
extern void * my_realloc(PSI_memory_key key, void *ptr, size_t size, myf_t flags);
extern void my_claim(void *ptr);
extern void my_free(void *ptr);
extern void * my_memdup(PSI_memory_key key, const void *from, size_t length, myf_t flags);
extern char * my_strdup(PSI_memory_key key, const char *from, myf_t flags);
extern char * my_strndup(PSI_memory_key key, const char *from, size_t length, myf_t flags);
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,9 +1,8 @@
/* Copyright (C) 2000 MySQL AB
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
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; either version 2 of the License, or
(at your option) any later version.
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; without even the implied warranty of
@@ -12,7 +11,7 @@
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 */
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/*
** Common definition between mysql server & client
@@ -20,13 +19,41 @@
#ifndef _mysql_com_h
#define _mysql_com_h
#define NAME_LEN 64 /* Field/table name length */
#include "binary_log_types.h"
#include "my_command.h"
#define HOSTNAME_LENGTH 60
#define USERNAME_LENGTH 16
#define SYSTEM_CHARSET_MBMAXLEN 3
#define FILENAME_CHARSET_MBMAXLEN 5
#define NAME_CHAR_LEN 64 /* Field/table name length */
#define USERNAME_CHAR_LENGTH 32
#define USERNAME_CHAR_LENGTH_STR "32"
#ifndef NAME_LEN
#define NAME_LEN (NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN)
#endif
#define USERNAME_LENGTH (USERNAME_CHAR_LENGTH*SYSTEM_CHARSET_MBMAXLEN)
#define MYSQL_AUTODETECT_CHARSET_NAME "auto"
#define SERVER_VERSION_LENGTH 60
#define SQLSTATE_LENGTH 5
/*
Maximum length of comments
*/
#define TABLE_COMMENT_INLINE_MAXLEN 180 /* pre 6.0: 60 characters */
#define TABLE_COMMENT_MAXLEN 2048
#define COLUMN_COMMENT_MAXLEN 1024
#define INDEX_COMMENT_MAXLEN 1024
#define TABLE_PARTITION_COMMENT_MAXLEN 1024
/*
Maximum length of protocol packet.
OK packet length limit also restricted to this value as any length greater
than this value will have first byte of OK packet to be 254 thus does not
provide a means to identify if this is OK or EOF packet.
*/
#define MAX_PACKET_LENGTH (256L*256L*256L-1)
/*
USER_HOST_BUFF_SIZE -- length of string buffer, that is enough to contain
username and hostname parts of the user identifier with trailing zero in
@@ -39,41 +66,25 @@
#define LOCAL_HOST_NAMEDPIPE "."
#if defined(__WIN__) && !defined( _CUSTOMCONFIG_)
#if defined(_WIN32)
#define MYSQL_NAMEDPIPE "MySQL"
#define MYSQL_SERVICENAME "MySQL"
#endif /* __WIN__ */
#endif /* _WIN32 */
/* The length of the header part for each generated column in the .frm file. */
#define FRM_GCOL_HEADER_SIZE 4
/*
You should add new commands to the end of this list, otherwise old
servers won't be able to handle them as 'unsupported'.
Maximum length of the expression statement defined for generated columns.
*/
enum enum_server_command
{
COM_SLEEP, COM_QUIT, COM_INIT_DB, COM_QUERY, COM_FIELD_LIST,
COM_CREATE_DB, COM_DROP_DB, COM_REFRESH, COM_SHUTDOWN, COM_STATISTICS,
COM_PROCESS_INFO, COM_CONNECT, COM_PROCESS_KILL, COM_DEBUG, COM_PING,
COM_TIME, COM_DELAYED_INSERT, COM_CHANGE_USER, COM_BINLOG_DUMP,
COM_TABLE_DUMP, COM_CONNECT_OUT, COM_REGISTER_SLAVE,
COM_STMT_PREPARE, COM_STMT_EXECUTE, COM_STMT_SEND_LONG_DATA, COM_STMT_CLOSE,
COM_STMT_RESET, COM_SET_OPTION, COM_STMT_FETCH,
/* don't forget to update const char *command_name[] in sql_parse.cc */
/* Must be last */
COM_END
};
#define GENERATED_COLUMN_EXPRESSION_MAXLEN 65535 - FRM_GCOL_HEADER_SIZE
/*
Length of random string sent by server on handshake; this is also length of
obfuscated password, recieved from client
obfuscated password, received from client
*/
#define SCRAMBLE_LENGTH 20
#define SCRAMBLE_LENGTH_323 8
#define AUTH_PLUGIN_DATA_PART_1_LENGTH 8
/* length of password stored in the db: new passwords are preceeded with '*' */
#define SCRAMBLED_PASSWORD_CHAR_LENGTH (SCRAMBLE_LENGTH*2+1)
#define SCRAMBLED_PASSWORD_CHAR_LENGTH_323 (SCRAMBLE_LENGTH_323*2)
#define NOT_NULL_FLAG 1 /* Field can't be NULL */
@@ -91,11 +102,27 @@ enum enum_server_command
#define TIMESTAMP_FLAG 1024 /* Field is a timestamp */
#define SET_FLAG 2048 /* field is a set */
#define NO_DEFAULT_VALUE_FLAG 4096 /* Field doesn't have default value */
#define ON_UPDATE_NOW_FLAG 8192 /* Field is set to NOW on UPDATE */
#define NUM_FLAG 32768 /* Field is num (for clients) */
#define PART_KEY_FLAG 16384 /* Intern; Part of some key */
#define GROUP_FLAG 32768 /* Intern: Group field */
#define UNIQUE_FLAG 65536 /* Intern: Used by sql_yacc */
#define BINCMP_FLAG 131072 /* Intern: Used by sql_yacc */
#define GET_FIXED_FIELDS_FLAG (1 << 18) /* Used to get fields in item tree */
#define FIELD_IN_PART_FUNC_FLAG (1 << 19)/* Field part of partition func */
/**
Intern: Field in TABLE object for new version of altered table,
which participates in a newly added index.
*/
#define FIELD_IN_ADD_INDEX (1 << 20)
#define FIELD_IS_RENAMED (1<< 21) /* Intern: Field is being renamed */
#define FIELD_FLAGS_STORAGE_MEDIA 22 /* Field storage media, bit 22-23 */
#define FIELD_FLAGS_STORAGE_MEDIA_MASK (3 << FIELD_FLAGS_STORAGE_MEDIA)
#define FIELD_FLAGS_COLUMN_FORMAT 24 /* Field column format, bit 24-25 */
#define FIELD_FLAGS_COLUMN_FORMAT_MASK (3 << FIELD_FLAGS_COLUMN_FORMAT)
#define FIELD_IS_DROPPED (1<< 26) /* Intern: Field is being dropped */
#define EXPLICIT_NULL_FLAG (1<< 27) /* Field is explicitly specified as
NULL by the user */
#define REFRESH_GRANT 1 /* Refresh grant tables */
#define REFRESH_LOG 2 /* Start on new log file */
@@ -107,6 +134,12 @@ enum enum_server_command
thread */
#define REFRESH_MASTER 128 /* Remove all bin logs in the index
and truncate the index */
#define REFRESH_ERROR_LOG 256 /* Rotate only the erorr log */
#define REFRESH_ENGINE_LOG 512 /* Flush all storage engine logs */
#define REFRESH_BINARY_LOG 1024 /* Flush the binary log */
#define REFRESH_RELAY_LOG 2048 /* Flush the relay log */
#define REFRESH_GENERAL_LOG 4096 /* Flush the general log */
#define REFRESH_SLOW_LOG 8192 /* Flush the slow query log */
/* The following can't be set with mysql_refresh() */
#define REFRESH_READ_LOCK 16384 /* Lock tables for read */
@@ -117,6 +150,8 @@ enum enum_server_command
#define REFRESH_QUERY_CACHE_FREE 0x20000L /* pack query cache */
#define REFRESH_DES_KEY_FILE 0x40000L
#define REFRESH_USER_RESOURCES 0x80000L
#define REFRESH_FOR_EXPORT 0x100000L /* FLUSH TABLES ... FOR EXPORT */
#define REFRESH_OPTIMIZER_COSTS 0x200000L /* FLUSH OPTIMIZER_COSTS */
#define CLIENT_LONG_PASSWORD 1 /* new more secure passwords */
#define CLIENT_FOUND_ROWS 2 /* Found instead of affected rows */
@@ -133,30 +168,146 @@ enum enum_server_command
#define CLIENT_IGNORE_SIGPIPE 4096 /* IGNORE sigpipes */
#define CLIENT_TRANSACTIONS 8192 /* Client knows about transactions */
#define CLIENT_RESERVED 16384 /* Old flag for 4.1 protocol */
#define CLIENT_SECURE_CONNECTION 32768 /* New 4.1 authentication */
#define CLIENT_MULTI_STATEMENTS 65536 /* Enable/disable multi-stmt support */
#define CLIENT_MULTI_RESULTS 131072 /* Enable/disable multi-results */
#define CLIENT_REMEMBER_OPTIONS (((ulong) 1) << 31)
#define CLIENT_RESERVED2 32768 /* Old flag for 4.1 authentication */
#define CLIENT_MULTI_STATEMENTS (1UL << 16) /* Enable/disable multi-stmt support */
#define CLIENT_MULTI_RESULTS (1UL << 17) /* Enable/disable multi-results */
#define CLIENT_PS_MULTI_RESULTS (1UL << 18) /* Multi-results in PS-protocol */
#define SERVER_STATUS_IN_TRANS 1 /* Transaction has started */
#define CLIENT_PLUGIN_AUTH (1UL << 19) /* Client supports plugin authentication */
#define CLIENT_CONNECT_ATTRS (1UL << 20) /* Client supports connection attributes */
/* Enable authentication response packet to be larger than 255 bytes. */
#define CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA (1UL << 21)
/* Don't close the connection for a connection with expired password. */
#define CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS (1UL << 22)
/**
Capable of handling server state change information. Its a hint to the
server to include the state change information in Ok packet.
*/
#define CLIENT_SESSION_TRACK (1UL << 23)
/* Client no longer needs EOF packet */
#define CLIENT_DEPRECATE_EOF (1UL << 24)
#define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30)
#define CLIENT_REMEMBER_OPTIONS (1UL << 31)
#ifdef HAVE_COMPRESS
#define CAN_CLIENT_COMPRESS CLIENT_COMPRESS
#else
#define CAN_CLIENT_COMPRESS 0
#endif
/* Gather all possible capabilites (flags) supported by the server */
#define CLIENT_ALL_FLAGS (CLIENT_LONG_PASSWORD \
| CLIENT_FOUND_ROWS \
| CLIENT_LONG_FLAG \
| CLIENT_CONNECT_WITH_DB \
| CLIENT_NO_SCHEMA \
| CLIENT_COMPRESS \
| CLIENT_ODBC \
| CLIENT_LOCAL_FILES \
| CLIENT_IGNORE_SPACE \
| CLIENT_PROTOCOL_41 \
| CLIENT_INTERACTIVE \
| CLIENT_SSL \
| CLIENT_IGNORE_SIGPIPE \
| CLIENT_TRANSACTIONS \
| CLIENT_RESERVED \
| CLIENT_RESERVED2 \
| CLIENT_MULTI_STATEMENTS \
| CLIENT_MULTI_RESULTS \
| CLIENT_PS_MULTI_RESULTS \
| CLIENT_SSL_VERIFY_SERVER_CERT \
| CLIENT_REMEMBER_OPTIONS \
| CLIENT_PLUGIN_AUTH \
| CLIENT_CONNECT_ATTRS \
| CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA \
| CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS \
| CLIENT_SESSION_TRACK \
| CLIENT_DEPRECATE_EOF \
)
/*
Switch off the flags that are optional and depending on build flags
If any of the optional flags is supported by the build it will be switched
on before sending to the client during the connection handshake.
*/
#define CLIENT_BASIC_FLAGS (((CLIENT_ALL_FLAGS & ~CLIENT_SSL) \
& ~CLIENT_COMPRESS) \
& ~CLIENT_SSL_VERIFY_SERVER_CERT)
/**
Is raised when a multi-statement transaction
has been started, either explicitly, by means
of BEGIN or COMMIT AND CHAIN, or
implicitly, by the first transactional
statement, when autocommit=off.
*/
#define SERVER_STATUS_IN_TRANS 1
#define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */
#define SERVER_STATUS_MORE_RESULTS 4 /* More results on server */
#define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */
#define SERVER_QUERY_NO_GOOD_INDEX_USED 16
#define SERVER_QUERY_NO_INDEX_USED 32
/*
/**
The server was able to fulfill the clients request and opened a
read-only non-scrollable cursor for a query. This flag comes
in reply to COM_STMT_EXECUTE and COM_STMT_FETCH commands.
*/
#define SERVER_STATUS_CURSOR_EXISTS 64
/*
/**
This flag is sent when a read-only cursor is exhausted, in reply to
COM_STMT_FETCH command.
*/
#define SERVER_STATUS_LAST_ROW_SENT 128
#define SERVER_STATUS_DB_DROPPED 256 /* A database was dropped */
#define SERVER_STATUS_NO_BACKSLASH_ESCAPES 512
/**
Sent to the client if after a prepared statement reprepare
we discovered that the new statement returns a different
number of result set columns.
*/
#define SERVER_STATUS_METADATA_CHANGED 1024
#define SERVER_QUERY_WAS_SLOW 2048
/**
To mark ResultSet containing output parameter values.
*/
#define SERVER_PS_OUT_PARAMS 4096
/**
Set at the same time as SERVER_STATUS_IN_TRANS if the started
multi-statement transaction is a read-only transaction. Cleared
when the transaction commits or aborts. Since this flag is sent
to clients in OK and EOF packets, the flag indicates the
transaction status at the end of command execution.
*/
#define SERVER_STATUS_IN_TRANS_READONLY 8192
/**
This status flag, when on, implies that one of the state information has
changed on the server because of the execution of the last statement.
*/
#define SERVER_SESSION_STATE_CHANGED (1UL << 14)
/**
Server status flags that must be cleared when starting
execution of a new SQL statement.
Flags from this set are only added to the
current server status by the execution engine, but
never removed -- the execution engine expects them
to disappear automagically by the next command.
*/
#define SERVER_STATUS_CLEAR_SET (SERVER_QUERY_NO_GOOD_INDEX_USED| \
SERVER_QUERY_NO_INDEX_USED|\
SERVER_MORE_RESULTS_EXISTS|\
SERVER_STATUS_METADATA_CHANGED |\
SERVER_QUERY_WAS_SLOW |\
SERVER_STATUS_DB_DROPPED |\
SERVER_STATUS_CURSOR_EXISTS|\
SERVER_STATUS_LAST_ROW_SENT|\
SERVER_SESSION_STATE_CHANGED)
#define MYSQL_ERRMSG_SIZE 512
#define NET_READ_TIMEOUT 30 /* Timeout on read */
@@ -165,6 +316,7 @@ enum enum_server_command
#define ONLY_KILL_QUERY 1
struct st_vio; /* Only C */
typedef struct st_vio Vio;
@@ -174,71 +326,58 @@ typedef struct st_vio Vio;
#define MAX_INT_WIDTH 10 /* Max width for a LONG w.o. sign */
#define MAX_BIGINT_WIDTH 20 /* Max width for a LONGLONG */
#define MAX_CHAR_WIDTH 255 /* Max length for a CHAR colum */
#define MAX_BLOB_WIDTH 8192 /* Default width for blob */
#define MAX_BLOB_WIDTH 16777216 /* Default width for blob */
typedef struct st_net {
#if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY)
Vio* vio;
Vio *vio;
unsigned char *buff,*buff_end,*write_pos,*read_pos;
my_socket fd; /* For Perl DBI/dbd */
unsigned long max_packet,max_packet_size;
unsigned int pkt_nr,compress_pkt_nr;
unsigned int write_timeout, read_timeout, retry_count;
int fcntl;
my_bool compress;
/*
The following variable is set if we are doing several queries in one
command ( as in LOAD TABLE ... FROM MASTER ),
and do not want to confuse the client with OK at the wrong time
*/
unsigned long remain_in_buf,length, buf_length, where_b;
unsigned long max_packet,max_packet_size;
unsigned int pkt_nr,compress_pkt_nr;
unsigned int write_timeout, read_timeout, retry_count;
int fcntl;
unsigned int *return_status;
unsigned char reading_or_writing;
char save_char;
my_bool no_send_ok; /* For SPs and other things that do multiple stmts */
my_bool no_send_eof; /* For SPs' first version read-only cursors */
/*
Set if OK packet is already sent, and we do not need to send error
messages
*/
my_bool no_send_error;
my_bool unused1; /* Please remove with the next incompatible ABI change */
my_bool unused2; /* Please remove with the next incompatible ABI change */
my_bool compress;
my_bool unused3; /* Please remove with the next incompatible ABI change. */
/*
Pointer to query object in query cache, do not equal NULL (0) for
queries in cache that have not stored its results yet
*/
#endif
char last_error[MYSQL_ERRMSG_SIZE], sqlstate[SQLSTATE_LENGTH+1];
/*
Unused, please remove with the next incompatible ABI change.
*/
unsigned char *unused;
unsigned int last_errno;
unsigned char error;
gptr query_cache_query;
my_bool report_error; /* We should report error (we have unreported error) */
my_bool return_errno;
unsigned char error;
my_bool unused4; /* Please remove with the next incompatible ABI change. */
my_bool unused5; /* Please remove with the next incompatible ABI change. */
/** Client library error message buffer. Actually belongs to struct MYSQL. */
char last_error[MYSQL_ERRMSG_SIZE];
/** Client library sqlstate buffer. Set along with the error message. */
char sqlstate[SQLSTATE_LENGTH+1];
/**
Extension pointer, for the caller private use.
Any program linking with the networking library can use this pointer,
which is handy when private connection specific data needs to be
maintained.
The mysqld server process uses this pointer internally,
to maintain the server internal instrumentation for the connection.
*/
void *extension;
} NET;
#define packet_error (~(unsigned long) 0)
enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG,
MYSQL_TYPE_FLOAT, MYSQL_TYPE_DOUBLE,
MYSQL_TYPE_NULL, MYSQL_TYPE_TIMESTAMP,
MYSQL_TYPE_LONGLONG,MYSQL_TYPE_INT24,
MYSQL_TYPE_DATE, MYSQL_TYPE_TIME,
MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR,
MYSQL_TYPE_NEWDATE, MYSQL_TYPE_VARCHAR,
MYSQL_TYPE_BIT,
MYSQL_TYPE_NEWDECIMAL=246,
MYSQL_TYPE_ENUM=247,
MYSQL_TYPE_SET=248,
MYSQL_TYPE_TINY_BLOB=249,
MYSQL_TYPE_MEDIUM_BLOB=250,
MYSQL_TYPE_LONG_BLOB=251,
MYSQL_TYPE_BLOB=252,
MYSQL_TYPE_VAR_STRING=253,
MYSQL_TYPE_STRING=254,
MYSQL_TYPE_GEOMETRY=255
};
/* For backward compatibility */
#define CLIENT_MULTI_QUERIES CLIENT_MULTI_STATEMENTS
#define FIELD_TYPE_DECIMAL MYSQL_TYPE_DECIMAL
@@ -297,9 +436,7 @@ enum mysql_enum_shutdown_level {
/* don't flush InnoDB buffers, flush other storage engines' buffers*/
SHUTDOWN_WAIT_CRITICAL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1) + 1,
/* Now the 2 levels of the KILL command */
#if MYSQL_VERSION_ID >= 50000
KILL_QUERY= 254,
#endif
KILL_CONNECTION= 255
};
@@ -320,6 +457,30 @@ enum enum_mysql_set_option
MYSQL_OPTION_MULTI_STATEMENTS_OFF
};
/*
Type of state change information that the server can include in the Ok
packet.
Note : 1) session_state_type shouldn't go past 255 (i.e. 1-byte boundary).
2) Modify the definition of SESSION_TRACK_END when a new member is
added.
*/
enum enum_session_state_type
{
SESSION_TRACK_SYSTEM_VARIABLES, /* Session system variables */
SESSION_TRACK_SCHEMA, /* Current schema */
SESSION_TRACK_STATE_CHANGE, /* track session state changes */
SESSION_TRACK_GTIDS,
SESSION_TRACK_TRANSACTION_CHARACTERISTICS, /* Transaction chistics */
SESSION_TRACK_TRANSACTION_STATE /* Transaction state */
};
#define SESSION_TRACK_BEGIN SESSION_TRACK_SYSTEM_VARIABLES
#define SESSION_TRACK_END SESSION_TRACK_TRANSACTION_STATE
#define IS_SESSION_STATE_TYPE(T) \
(((int)(T) >= SESSION_TRACK_BEGIN) && ((T) <= SESSION_TRACK_END))
#define net_new_transaction(net) ((net)->pkt_nr=0)
#ifdef __cplusplus
@@ -327,25 +488,23 @@ extern "C" {
#endif
my_bool my_net_init(NET *net, Vio* vio);
void my_net_local_init(NET *net);
void net_end(NET *net);
void net_clear(NET *net);
my_bool net_realloc(NET *net, unsigned long length);
void my_net_local_init(NET *net);
void net_end(NET *net);
void net_clear(NET *net, my_bool check_buffer);
void net_claim_memory_ownership(NET *net);
my_bool net_realloc(NET *net, size_t length);
my_bool net_flush(NET *net);
my_bool my_net_write(NET *net,const char *packet,unsigned long len);
my_bool my_net_write(NET *net,const unsigned char *packet, size_t len);
my_bool net_write_command(NET *net,unsigned char command,
const char *header, unsigned long head_len,
const char *packet, unsigned long len);
int net_real_write(NET *net,const char *packet,unsigned long len);
const unsigned char *header, size_t head_len,
const unsigned char *packet, size_t len);
my_bool net_write_packet(NET *net, const unsigned char *packet, size_t length);
unsigned long my_net_read(NET *net);
/*
The following function is not meant for normal usage
Currently it's used internally by manager.c
*/
struct sockaddr;
int my_connect(my_socket s, const struct sockaddr *name, unsigned int namelen,
unsigned int timeout);
#ifdef MY_GLOBAL_INCLUDED
void my_net_set_write_timeout(NET *net, uint timeout);
void my_net_set_read_timeout(NET *net, uint timeout);
#endif
struct rand_struct {
unsigned long seed1,seed2,max_value;
@@ -370,18 +529,24 @@ typedef struct st_udf_args
char *maybe_null; /* Set to 1 for all maybe_null args */
char **attributes; /* Pointer to attribute name */
unsigned long *attribute_lengths; /* Length of attribute arguments */
void *extension;
} UDF_ARGS;
/* This holds information about the result */
typedef struct st_udf_init
{
my_bool maybe_null; /* 1 if function can return NULL */
unsigned int decimals; /* for real functions */
unsigned long max_length; /* For string functions */
char *ptr; /* free pointer for function data */
my_bool const_item; /* 0 if result is independent of arguments */
my_bool maybe_null; /* 1 if function can return NULL */
unsigned int decimals; /* for real functions */
unsigned long max_length; /* For string functions */
char *ptr; /* free pointer for function data */
my_bool const_item; /* 1 if function always returns the same value */
void *extension;
} UDF_INIT;
/*
TODO: add a notion for determinism of the UDF.
See Item_udf_func::update_used_tables ()
*/
/* Constants when using compression */
#define NET_HEADER_SIZE 4 /* standard header size */
@@ -406,14 +571,14 @@ void create_random_string(char *to, unsigned int length, struct rand_struct *ran
void hash_password(unsigned long *to, const char *password, unsigned int password_len);
void make_scrambled_password_323(char *to, const char *password);
void scramble_323(char *to, const char *message, const char *password);
my_bool check_scramble_323(const char *, const char *message,
my_bool check_scramble_323(const unsigned char *reply, const char *message,
unsigned long *salt);
void get_salt_from_password_323(unsigned long *res, const char *password);
void make_password_from_salt_323(char *to, const unsigned long *salt);
void make_scrambled_password(char *to, const char *password);
void scramble(char *to, const char *message, const char *password);
my_bool check_scramble(const char *reply, const char *message,
my_bool check_scramble(const unsigned char *reply, const char *message,
const unsigned char *hash_stage2);
void get_salt_from_password(unsigned char *res, const char *password);
void make_password_from_salt(char *to, const unsigned char *hash_stage2);
@@ -421,24 +586,19 @@ char *octet2hex(char *to, const char *str, unsigned int len);
/* end of password.c */
char *get_tty_password(char *opt_message);
char *get_tty_password(const char *opt_message);
const char *mysql_errno_to_sqlstate(unsigned int mysql_errno);
/* Some other useful functions */
my_bool my_init(void);
extern int modify_defaults_file(const char *file_location, const char *option,
const char *option_value,
const char *section_name, int remove_option);
int load_defaults(const char *conf_file, const char **groups,
int *argc, char ***argv);
my_bool my_thread_init(void);
void my_thread_end(void);
#ifdef _global_h
#ifdef MY_GLOBAL_INCLUDED
ulong STDCALL net_field_length(uchar **packet);
my_ulonglong net_field_length_ll(uchar **packet);
char *net_store_length(char *pkg, ulonglong length);
uchar *net_store_length(uchar *pkg, ulonglong length);
unsigned int net_length_size(ulonglong num);
#endif
#ifdef __cplusplus
@@ -449,4 +609,5 @@ char *net_store_length(char *pkg, ulonglong length);
#define MYSQL_STMT_HEADER 4
#define MYSQL_LONG_DATA_HEADER 6
#define NOT_FIXED_DEC 31
#endif

View File

@@ -0,0 +1,41 @@
/* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/*
Definitions private to the server,
used in the networking layer to notify specific events.
*/
#ifndef _mysql_com_server_h
#define _mysql_com_server_h
struct st_net_server;
typedef void (*before_header_callback_fn)
(struct st_net *net, void *user_data, size_t count);
typedef void (*after_header_callback_fn)
(struct st_net *net, void *user_data, size_t count, my_bool rc);
struct st_net_server
{
before_header_callback_fn m_before_header;
after_header_callback_fn m_after_header;
void *m_user_data;
};
typedef struct st_net_server NET_SERVER;
#endif

29
3rdparty/mysql/include/mysql_embed.h vendored Normal file
View File

@@ -0,0 +1,29 @@
#ifndef MYSQL_EMBED_INCLUDED
#define MYSQL_EMBED_INCLUDED
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/* Defines that are unique to the embedded version of MySQL */
#ifdef EMBEDDED_LIBRARY
/* Things we don't need in the embedded version of MySQL */
/* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */
#undef HAVE_DLOPEN /* No udf functions */
#endif /* EMBEDDED_LIBRARY */
#endif /* MYSQL_EMBED_INCLUDED */

View File

@@ -1,9 +1,8 @@
/* Copyright (C) 2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
/* Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
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; either version 2 of the License, or
(at your option) any later version.
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; without even the implied warranty of
@@ -12,7 +11,7 @@
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 */
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#ifndef _mysql_time_h_
#define _mysql_time_h_
@@ -48,7 +47,7 @@ enum enum_mysql_timestamp_type
typedef struct st_mysql_time
{
unsigned int year, month, day, hour, minute, second;
unsigned long second_part;
unsigned long second_part; /**< microseconds */
my_bool neg;
enum enum_mysql_timestamp_type time_type;
} MYSQL_TIME;

View File

@@ -1,5 +1,7 @@
/* Copyright Abandoned 1996, 1999, 2001 MySQL AB
This file is public domain and comes with NO WARRANTY of any kind */
/* Copyright Abandoned 1996,1999 TCX DataKonsult AB & Monty Program KB
& Detron HB, 1996, 1999-2004, 2007 MySQL AB.
This file is public domain and comes with NO WARRANTY of any kind
*/
/* Version numbers for protocol & mysqld */
@@ -8,22 +10,22 @@
#ifdef _CUSTOMCONFIG_
#include <custom_conf.h>
#else
#define PROTOCOL_VERSION 10
#define MYSQL_SERVER_VERSION "5.0.20"
#define MYSQL_BASE_VERSION "mysqld-5.0"
#define MYSQL_SERVER_SUFFIX_DEF "-community-max-nt"
#define FRM_VER 6
#define MYSQL_VERSION_ID 50020
#define MYSQL_PORT 3306
#define MYSQL_UNIX_ADDR "/tmp/mysql.sock"
#define MYSQL_CONFIG_NAME "my"
#define MYSQL_COMPILATION_COMMENT "MySQL Community Edition - Max (GPL)"
#define PROTOCOL_VERSION 10
#define MYSQL_SERVER_VERSION "5.7.16"
#define MYSQL_VERSION_ID 50716
#define MYSQL_PORT 3306
#define MYSQL_PORT_DEFAULT 0
#define MYSQL_UNIX_ADDR "/tmp/mysql.sock"
#define MYSQL_CONFIG_NAME "my"
#define MYSQL_COMPILATION_COMMENT "MySQL Connector/C (GPL)"
#define LIBMYSQL_VERSION "6.1.9"
#define LIBMYSQL_VERSION_ID 60109
/* mysqld compile time options */
#endif /* _CUSTOMCONFIG_ */
#ifndef LICENSE
#define LICENSE GPL
#define LICENSE GPL
#endif /* LICENSE */
#endif /* _mysql_version_h */

1082
3rdparty/mysql/include/mysqld_ername.h vendored Normal file

File diff suppressed because it is too large Load Diff

1089
3rdparty/mysql/include/mysqld_error.h vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,159 +0,0 @@
/* Copyright (C) 2000 MySQL AB
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; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; 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 */
/* Parser needs these defines always, even if USE_RAID is not defined */
#define RAID_TYPE_0 1 /* Striping */
#define RAID_TYPE_x 2 /* Some new modes */
#define RAID_TYPE_y 3
#define RAID_DEFAULT_CHUNKS 4
#define RAID_DEFAULT_CHUNKSIZE 256*1024 /* 256kB */
C_MODE_START
#define my_raid_type(raid_type) raid_type_string[(int)(raid_type)]
extern const char *raid_type_string[];
C_MODE_END
#ifdef DONT_USE_RAID
#undef USE_RAID
#endif
#if defined(USE_RAID)
#include "my_dir.h"
/* Trap all occurences of my_...() in source and use our wrapper around this function */
#ifdef MAP_TO_USE_RAID
#define my_read(A,B,C,D) my_raid_read(A,B,C,D)
#define my_write(A,B,C,D) my_raid_write(A,B,C,D)
#define my_pwrite(A,B,C,D,E) my_raid_pwrite(A,B,C,D,E)
#define my_pread(A,B,C,D,E) my_raid_pread(A,B,C,D,E)
#define my_chsize(A,B,C,D) my_raid_chsize(A,B,C,D)
#define my_close(A,B) my_raid_close(A,B)
#define my_tell(A,B) my_raid_tell(A,B)
#define my_seek(A,B,C,D) my_raid_seek(A,B,C,D)
#define my_lock(A,B,C,D,E) my_raid_lock(A,B,C,D,E)
#define my_fstat(A,B,C) my_raid_fstat(A,B,C)
#endif /* MAP_TO_USE_RAID */
#ifdef __cplusplus
extern "C" {
#endif
void init_raid(void);
void end_raid(void);
bool is_raid(File fd);
File my_raid_create(const char *FileName, int CreateFlags, int access_flags,
uint raid_type, uint raid_chunks, ulong raid_chunksize,
myf MyFlags);
File my_raid_open(const char *FileName, int Flags,
uint raid_type, uint raid_chunks, ulong raid_chunksize,
myf MyFlags);
int my_raid_rename(const char *from, const char *to, uint raid_chunks,
myf MyFlags);
int my_raid_delete(const char *from, uint raid_chunks, myf MyFlags);
int my_raid_redel(const char *old_name, const char *new_name,
uint raid_chunks, myf MyFlags);
my_off_t my_raid_seek(File fd, my_off_t pos, int whence, myf MyFlags);
my_off_t my_raid_tell(File fd, myf MyFlags);
uint my_raid_write(File,const byte *Buffer, uint Count, myf MyFlags);
uint my_raid_read(File Filedes, byte *Buffer, uint Count, myf MyFlags);
uint my_raid_pread(File Filedes, byte *Buffer, uint Count, my_off_t offset,
myf MyFlags);
uint my_raid_pwrite(int Filedes, const byte *Buffer, uint Count,
my_off_t offset, myf MyFlags);
int my_raid_lock(File,int locktype, my_off_t start, my_off_t length,
myf MyFlags);
int my_raid_chsize(File fd, my_off_t newlength, int filler, myf MyFlags);
int my_raid_close(File, myf MyFlags);
int my_raid_fstat(int Filedes, struct stat *buf, myf MyFlags);
#ifdef __cplusplus
}
#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class implementation */
#endif
class RaidName {
public:
RaidName(const char *FileName);
~RaidName();
bool IsRaid();
int Rename(const char * from, const char * to, myf MyFlags);
private:
uint _raid_type; /* RAID_TYPE_0 or RAID_TYPE_1 or RAID_TYPE_5 */
uint _raid_chunks; /* 1..n */
ulong _raid_chunksize; /* 1..n in bytes */
};
class RaidFd {
public:
RaidFd(uint raid_type, uint raid_chunks , ulong raid_chunksize);
~RaidFd();
File Create(const char *FileName, int CreateFlags, int access_flags,
myf MyFlags);
File Open(const char *FileName, int Flags, myf MyFlags);
my_off_t Seek(my_off_t pos,int whence,myf MyFlags);
my_off_t Tell(myf MyFlags);
int Write(const byte *Buffer, uint Count, myf MyFlags);
int Read(const byte *Buffer, uint Count, myf MyFlags);
int Lock(int locktype, my_off_t start, my_off_t length, myf MyFlags);
int Chsize(File fd, my_off_t newlength, int filler, myf MyFlags);
int Fstat(int fd, MY_STAT *stat_area, myf MyFlags );
int Close(myf MyFlags);
static bool IsRaid(File fd);
static DYNAMIC_ARRAY _raid_map; /* Map of RaidFD* */
private:
uint _raid_type; /* RAID_TYPE_0 or RAID_TYPE_1 or RAID_TYPE_5 */
uint _raid_chunks; /* 1..n */
ulong _raid_chunksize; /* 1..n in bytes */
ulong _total_block; /* We are operating with block no x (can be 0..many). */
uint _this_block; /* can be 0.._raid_chunks */
uint _remaining_bytes; /* Maximum bytes that can be written in this block */
my_off_t _position;
my_off_t _size; /* Cached file size for faster seek(SEEK_END) */
File _fd;
File *_fd_vector; /* Array of File */
off_t *_seek_vector; /* Array of cached seek positions */
inline void Calculate()
{
DBUG_ENTER("RaidFd::_Calculate");
DBUG_PRINT("info",("_position: %lu _raid_chunksize: %d, _size: %lu",
(ulong) _position, _raid_chunksize, (ulong) _size));
_total_block = (ulong) (_position / _raid_chunksize);
_this_block = _total_block % _raid_chunks; /* can be 0.._raid_chunks */
_remaining_bytes = (uint) (_raid_chunksize -
(_position - _total_block * _raid_chunksize));
DBUG_PRINT("info",
("_total_block: %d this_block: %d _remaining_bytes:%d",
_total_block, _this_block, _remaining_bytes));
DBUG_VOID_RETURN;
}
};
#endif /* __cplusplus */
#endif /* USE_RAID */

206
3rdparty/mysql/include/sql_common.h vendored Normal file
View File

@@ -0,0 +1,206 @@
#ifndef SQL_COMMON_INCLUDED
#define SQL_COMMON_INCLUDED
/* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#define SQL_COMMON_INCLUDED
#ifdef __cplusplus
extern "C" {
#endif
#include <mysql.h>
#include <hash.h>
extern const char *unknown_sqlstate;
extern const char *cant_connect_sqlstate;
extern const char *not_error_sqlstate;
/*
Free all memory allocated in MYSQL handle except the
current options.
*/
void mysql_close_free(MYSQL *mysql);
/*
Clear connection options stored in MYSQL handle and
free memory used by them.
*/
void mysql_close_free_options(MYSQL *mysql);
/**
The structure is used to hold the state change information
received from the server. LIST functions are used for manipulation
of the members of the structure.
*/
typedef struct st_session_track_info_node {
/** head_node->data is a LEX_STRING which contains the variable name. */
LIST *head_node;
LIST *current_node;
} STATE_INFO_NODE;
/**
Store the change info received from the server in an array of linked lists
with STATE_INFO_NODE elements (one per state type).
*/
typedef struct st_session_track_info {
/** Array of STATE_NODE_INFO elements (one per state type). */
struct st_session_track_info_node info_list[SESSION_TRACK_END + 1];
} STATE_INFO;
/*
Access to MYSQL::extension member.
Note: functions mysql_extension_{init,free}() are defined
in client.c.
*/
struct st_mysql_trace_info;
typedef struct st_mysql_extension {
struct st_mysql_trace_info *trace_data;
struct st_session_track_info state_change;
} MYSQL_EXTENSION;
/* "Constructor/destructor" for MYSQL extension structure. */
struct st_mysql_extension* mysql_extension_init(struct st_mysql*);
void mysql_extension_free(struct st_mysql_extension*);
/*
Note: Allocated extension structure is freed in mysql_close_free()
called by mysql_close().
*/
#define MYSQL_EXTENSION_PTR(H) \
( \
(struct st_mysql_extension*) \
( (H)->extension ? \
(H)->extension : ((H)->extension= mysql_extension_init(H)) \
) \
)
struct st_mysql_options_extention {
char *plugin_dir;
char *default_auth;
char *ssl_crl; /* PEM CRL file */
char *ssl_crlpath; /* PEM directory of CRL-s? */
HASH connection_attributes;
char *server_public_key_path;
size_t connection_attributes_length;
my_bool enable_cleartext_plugin;
my_bool unused0; /* Former ssl_enforce */
char *tls_version; /* TLS version option */
long ssl_ctx_flags; /* SSL ctx options flag */
unsigned int ssl_mode;
};
typedef struct st_mysql_methods
{
my_bool (*read_query_result)(MYSQL *mysql);
my_bool (*advanced_command)(MYSQL *mysql,
enum enum_server_command command,
const unsigned char *header,
size_t header_length,
const unsigned char *arg,
size_t arg_length,
my_bool skip_check,
MYSQL_STMT *stmt);
MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
unsigned int fields);
MYSQL_RES * (*use_result)(MYSQL *mysql);
void (*fetch_lengths)(unsigned long *to,
MYSQL_ROW column, unsigned int field_count);
void (*flush_use_result)(MYSQL *mysql, my_bool flush_all_results);
int (*read_change_user_result)(MYSQL *mysql);
#if !defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY)
MYSQL_FIELD * (*list_fields)(MYSQL *mysql);
my_bool (*read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt);
int (*stmt_execute)(MYSQL_STMT *stmt);
int (*read_binary_rows)(MYSQL_STMT *stmt);
int (*unbuffered_fetch)(MYSQL *mysql, char **row);
void (*free_embedded_thd)(MYSQL *mysql);
const char *(*read_statistics)(MYSQL *mysql);
my_bool (*next_result)(MYSQL *mysql);
int (*read_rows_from_cursor)(MYSQL_STMT *stmt);
void (*free_rows)(MYSQL_DATA *cur);
#endif
} MYSQL_METHODS;
#define simple_command(mysql, command, arg, length, skip_check) \
((mysql)->methods \
? (*(mysql)->methods->advanced_command)(mysql, command, 0, \
0, arg, length, skip_check, NULL) \
: (set_mysql_error(mysql, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate), 1))
#define stmt_command(mysql, command, arg, length, stmt) \
((mysql)->methods \
? (*(mysql)->methods->advanced_command)(mysql, command, 0, \
0, arg, length, 1, stmt) \
: (set_mysql_error(mysql, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate), 1))
extern CHARSET_INFO *default_client_charset_info;
MYSQL_FIELD *unpack_fields(MYSQL *mysql, MYSQL_ROWS *data,MEM_ROOT *alloc,
uint fields, my_bool default_value,
uint server_capabilities);
MYSQL_FIELD * cli_read_metadata_ex(MYSQL *mysql, MEM_ROOT *alloc,
unsigned long field_count,
unsigned int fields);
MYSQL_FIELD * cli_read_metadata(MYSQL *mysql, unsigned long field_count,
unsigned int fields);
void free_rows(MYSQL_DATA *cur);
void free_old_query(MYSQL *mysql);
void end_server(MYSQL *mysql);
my_bool mysql_reconnect(MYSQL *mysql);
void mysql_read_default_options(struct st_mysql_options *options,
const char *filename,const char *group);
my_bool
cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
const unsigned char *header, size_t header_length,
const unsigned char *arg, size_t arg_length,
my_bool skip_check, MYSQL_STMT *stmt);
unsigned long cli_safe_read(MYSQL *mysql, my_bool *is_data_packet);
unsigned long cli_safe_read_with_ok(MYSQL *mysql, my_bool parse_ok,
my_bool *is_data_packet);
void net_clear_error(NET *net);
void set_stmt_errmsg(MYSQL_STMT *stmt, NET *net);
void set_stmt_error(MYSQL_STMT *stmt, int errcode, const char *sqlstate,
const char *err);
void set_mysql_error(MYSQL *mysql, int errcode, const char *sqlstate);
void set_mysql_extended_error(MYSQL *mysql, int errcode, const char *sqlstate,
const char *format, ...);
/* client side of the pluggable authentication */
struct st_plugin_vio_info;
void mpvio_info(Vio *vio, struct st_plugin_vio_info *info);
int run_plugin_auth(MYSQL *mysql, char *data, uint data_len,
const char *data_plugin, const char *db);
int mysql_client_plugin_init();
void mysql_client_plugin_deinit();
struct st_mysql_client_plugin;
extern struct st_mysql_client_plugin *mysql_client_builtins[];
uchar * send_client_connect_attrs(MYSQL *mysql, uchar *buf);
extern my_bool libmysql_cleartext_plugin_enabled;
void read_ok_ex(MYSQL *mysql, unsigned long len);
#ifdef __cplusplus
}
#endif
#define protocol_41(A) ((A)->server_capabilities & CLIENT_PROTOCOL_41)
#endif /* SQL_COMMON_INCLUDED */

255
3rdparty/mysql/include/sql_state.h vendored Normal file
View File

@@ -0,0 +1,255 @@
/* Autogenerated file, please don't edit */
{ ER_DUP_KEY ,"23000", "" },
{ ER_OUTOFMEMORY ,"HY001", "S1001" },
{ ER_OUT_OF_SORTMEMORY ,"HY001", "S1001" },
{ ER_CON_COUNT_ERROR ,"08004", "" },
{ ER_BAD_HOST_ERROR ,"08S01", "" },
{ ER_HANDSHAKE_ERROR ,"08S01", "" },
{ ER_DBACCESS_DENIED_ERROR ,"42000", "" },
{ ER_ACCESS_DENIED_ERROR ,"28000", "" },
{ ER_NO_DB_ERROR ,"3D000", "" },
{ ER_UNKNOWN_COM_ERROR ,"08S01", "" },
{ ER_BAD_NULL_ERROR ,"23000", "" },
{ ER_BAD_DB_ERROR ,"42000", "" },
{ ER_TABLE_EXISTS_ERROR ,"42S01", "" },
{ ER_BAD_TABLE_ERROR ,"42S02", "" },
{ ER_NON_UNIQ_ERROR ,"23000", "" },
{ ER_SERVER_SHUTDOWN ,"08S01", "" },
{ ER_BAD_FIELD_ERROR ,"42S22", "S0022" },
{ ER_WRONG_FIELD_WITH_GROUP ,"42000", "S1009" },
{ ER_WRONG_GROUP_FIELD ,"42000", "S1009" },
{ ER_WRONG_SUM_SELECT ,"42000", "S1009" },
{ ER_WRONG_VALUE_COUNT ,"21S01", "" },
{ ER_TOO_LONG_IDENT ,"42000", "S1009" },
{ ER_DUP_FIELDNAME ,"42S21", "S1009" },
{ ER_DUP_KEYNAME ,"42000", "S1009" },
{ ER_DUP_ENTRY ,"23000", "S1009" },
{ ER_WRONG_FIELD_SPEC ,"42000", "S1009" },
{ ER_PARSE_ERROR ,"42000", "s1009" },
{ ER_EMPTY_QUERY ,"42000", "" },
{ ER_NONUNIQ_TABLE ,"42000", "S1009" },
{ ER_INVALID_DEFAULT ,"42000", "S1009" },
{ ER_MULTIPLE_PRI_KEY ,"42000", "S1009" },
{ ER_TOO_MANY_KEYS ,"42000", "S1009" },
{ ER_TOO_MANY_KEY_PARTS ,"42000", "S1009" },
{ ER_TOO_LONG_KEY ,"42000", "S1009" },
{ ER_KEY_COLUMN_DOES_NOT_EXITS ,"42000", "S1009" },
{ ER_BLOB_USED_AS_KEY ,"42000", "S1009" },
{ ER_TOO_BIG_FIELDLENGTH ,"42000", "S1009" },
{ ER_WRONG_AUTO_KEY ,"42000", "S1009" },
{ ER_FORCING_CLOSE ,"08S01", "" },
{ ER_IPSOCK_ERROR ,"08S01", "" },
{ ER_NO_SUCH_INDEX ,"42S12", "S1009" },
{ ER_WRONG_FIELD_TERMINATORS ,"42000", "S1009" },
{ ER_BLOBS_AND_NO_TERMINATED ,"42000", "S1009" },
{ ER_CANT_REMOVE_ALL_FIELDS ,"42000", "" },
{ ER_CANT_DROP_FIELD_OR_KEY ,"42000", "" },
{ ER_BLOB_CANT_HAVE_DEFAULT ,"42000", "" },
{ ER_WRONG_DB_NAME ,"42000", "" },
{ ER_WRONG_TABLE_NAME ,"42000", "" },
{ ER_TOO_BIG_SELECT ,"42000", "" },
{ ER_UNKNOWN_PROCEDURE ,"42000", "" },
{ ER_WRONG_PARAMCOUNT_TO_PROCEDURE ,"42000", "" },
{ ER_UNKNOWN_TABLE ,"42S02", "" },
{ ER_FIELD_SPECIFIED_TWICE ,"42000", "" },
{ ER_UNSUPPORTED_EXTENSION ,"42000", "" },
{ ER_TABLE_MUST_HAVE_COLUMNS ,"42000", "" },
{ ER_UNKNOWN_CHARACTER_SET ,"42000", "" },
{ ER_TOO_BIG_ROWSIZE ,"42000", "" },
{ ER_WRONG_OUTER_JOIN ,"42000", "" },
{ ER_NULL_COLUMN_IN_INDEX ,"42000", "" },
{ ER_PASSWORD_ANONYMOUS_USER ,"42000", "" },
{ ER_PASSWORD_NOT_ALLOWED ,"42000", "" },
{ ER_PASSWORD_NO_MATCH ,"42000", "" },
{ ER_WRONG_VALUE_COUNT_ON_ROW ,"21S01", "" },
{ ER_INVALID_USE_OF_NULL ,"22004", "" },
{ ER_REGEXP_ERROR ,"42000", "" },
{ ER_MIX_OF_GROUP_FUNC_AND_FIELDS ,"42000", "" },
{ ER_NONEXISTING_GRANT ,"42000", "" },
{ ER_TABLEACCESS_DENIED_ERROR ,"42000", "" },
{ ER_COLUMNACCESS_DENIED_ERROR ,"42000", "" },
{ ER_ILLEGAL_GRANT_FOR_TABLE ,"42000", "" },
{ ER_GRANT_WRONG_HOST_OR_USER ,"42000", "" },
{ ER_NO_SUCH_TABLE ,"42S02", "" },
{ ER_NONEXISTING_TABLE_GRANT ,"42000", "" },
{ ER_NOT_ALLOWED_COMMAND ,"42000", "" },
{ ER_SYNTAX_ERROR ,"42000", "" },
{ ER_ABORTING_CONNECTION ,"08S01", "" },
{ ER_NET_PACKET_TOO_LARGE ,"08S01", "" },
{ ER_NET_READ_ERROR_FROM_PIPE ,"08S01", "" },
{ ER_NET_FCNTL_ERROR ,"08S01", "" },
{ ER_NET_PACKETS_OUT_OF_ORDER ,"08S01", "" },
{ ER_NET_UNCOMPRESS_ERROR ,"08S01", "" },
{ ER_NET_READ_ERROR ,"08S01", "" },
{ ER_NET_READ_INTERRUPTED ,"08S01", "" },
{ ER_NET_ERROR_ON_WRITE ,"08S01", "" },
{ ER_NET_WRITE_INTERRUPTED ,"08S01", "" },
{ ER_TOO_LONG_STRING ,"42000", "" },
{ ER_TABLE_CANT_HANDLE_BLOB ,"42000", "" },
{ ER_TABLE_CANT_HANDLE_AUTO_INCREMENT ,"42000", "" },
{ ER_WRONG_COLUMN_NAME ,"42000", "" },
{ ER_WRONG_KEY_COLUMN ,"42000", "" },
{ ER_DUP_UNIQUE ,"23000", "" },
{ ER_BLOB_KEY_WITHOUT_LENGTH ,"42000", "" },
{ ER_PRIMARY_CANT_HAVE_NULL ,"42000", "" },
{ ER_TOO_MANY_ROWS ,"42000", "" },
{ ER_REQUIRES_PRIMARY_KEY ,"42000", "" },
{ ER_KEY_DOES_NOT_EXITS ,"42000", "S1009" },
{ ER_CHECK_NO_SUCH_TABLE ,"42000", "" },
{ ER_CHECK_NOT_IMPLEMENTED ,"42000", "" },
{ ER_CANT_DO_THIS_DURING_AN_TRANSACTION ,"25000", "" },
{ ER_NEW_ABORTING_CONNECTION ,"08S01", "" },
{ ER_MASTER_NET_READ ,"08S01", "" },
{ ER_MASTER_NET_WRITE ,"08S01", "" },
{ ER_TOO_MANY_USER_CONNECTIONS ,"42000", "" },
{ ER_READ_ONLY_TRANSACTION ,"25000", "" },
{ ER_NO_PERMISSION_TO_CREATE_USER ,"42000", "" },
{ ER_LOCK_DEADLOCK ,"40001", "" },
{ ER_NO_REFERENCED_ROW ,"23000", "" },
{ ER_ROW_IS_REFERENCED ,"23000", "" },
{ ER_CONNECT_TO_MASTER ,"08S01", "" },
{ ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT ,"21000", "" },
{ ER_USER_LIMIT_REACHED ,"42000", "" },
{ ER_SPECIFIC_ACCESS_DENIED_ERROR ,"42000", "" },
{ ER_NO_DEFAULT ,"42000", "" },
{ ER_WRONG_VALUE_FOR_VAR ,"42000", "" },
{ ER_WRONG_TYPE_FOR_VAR ,"42000", "" },
{ ER_CANT_USE_OPTION_HERE ,"42000", "" },
{ ER_NOT_SUPPORTED_YET ,"42000", "" },
{ ER_WRONG_FK_DEF ,"42000", "" },
{ ER_OPERAND_COLUMNS ,"21000", "" },
{ ER_SUBQUERY_NO_1_ROW ,"21000", "" },
{ ER_ILLEGAL_REFERENCE ,"42S22", "" },
{ ER_DERIVED_MUST_HAVE_ALIAS ,"42000", "" },
{ ER_SELECT_REDUCED ,"01000", "" },
{ ER_TABLENAME_NOT_ALLOWED_HERE ,"42000", "" },
{ ER_NOT_SUPPORTED_AUTH_MODE ,"08004", "" },
{ ER_SPATIAL_CANT_HAVE_NULL ,"42000", "" },
{ ER_COLLATION_CHARSET_MISMATCH ,"42000", "" },
{ ER_WARN_TOO_FEW_RECORDS ,"01000", "" },
{ ER_WARN_TOO_MANY_RECORDS ,"01000", "" },
{ ER_WARN_NULL_TO_NOTNULL ,"22004", "" },
{ ER_WARN_DATA_OUT_OF_RANGE ,"22003", "" },
{ WARN_DATA_TRUNCATED ,"01000", "" },
{ ER_WRONG_NAME_FOR_INDEX ,"42000", "" },
{ ER_WRONG_NAME_FOR_CATALOG ,"42000", "" },
{ ER_UNKNOWN_STORAGE_ENGINE ,"42000", "" },
{ ER_TRUNCATED_WRONG_VALUE ,"22007", "" },
{ ER_SP_NO_RECURSIVE_CREATE ,"2F003", "" },
{ ER_SP_ALREADY_EXISTS ,"42000", "" },
{ ER_SP_DOES_NOT_EXIST ,"42000", "" },
{ ER_SP_LILABEL_MISMATCH ,"42000", "" },
{ ER_SP_LABEL_REDEFINE ,"42000", "" },
{ ER_SP_LABEL_MISMATCH ,"42000", "" },
{ ER_SP_UNINIT_VAR ,"01000", "" },
{ ER_SP_BADSELECT ,"0A000", "" },
{ ER_SP_BADRETURN ,"42000", "" },
{ ER_SP_BADSTATEMENT ,"0A000", "" },
{ ER_UPDATE_LOG_DEPRECATED_IGNORED ,"42000", "" },
{ ER_UPDATE_LOG_DEPRECATED_TRANSLATED ,"42000", "" },
{ ER_QUERY_INTERRUPTED ,"70100", "" },
{ ER_SP_WRONG_NO_OF_ARGS ,"42000", "" },
{ ER_SP_COND_MISMATCH ,"42000", "" },
{ ER_SP_NORETURN ,"42000", "" },
{ ER_SP_NORETURNEND ,"2F005", "" },
{ ER_SP_BAD_CURSOR_QUERY ,"42000", "" },
{ ER_SP_BAD_CURSOR_SELECT ,"42000", "" },
{ ER_SP_CURSOR_MISMATCH ,"42000", "" },
{ ER_SP_CURSOR_ALREADY_OPEN ,"24000", "" },
{ ER_SP_CURSOR_NOT_OPEN ,"24000", "" },
{ ER_SP_UNDECLARED_VAR ,"42000", "" },
{ ER_SP_FETCH_NO_DATA ,"02000", "" },
{ ER_SP_DUP_PARAM ,"42000", "" },
{ ER_SP_DUP_VAR ,"42000", "" },
{ ER_SP_DUP_COND ,"42000", "" },
{ ER_SP_DUP_CURS ,"42000", "" },
{ ER_SP_SUBSELECT_NYI ,"0A000", "" },
{ ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG ,"0A000", "" },
{ ER_SP_VARCOND_AFTER_CURSHNDLR ,"42000", "" },
{ ER_SP_CURSOR_AFTER_HANDLER ,"42000", "" },
{ ER_SP_CASE_NOT_FOUND ,"20000", "" },
{ ER_DIVISION_BY_ZERO ,"22012", "" },
{ ER_ILLEGAL_VALUE_FOR_TYPE ,"22007", "" },
{ ER_PROCACCESS_DENIED_ERROR ,"42000", "" },
{ ER_XAER_NOTA ,"XAE04", "" },
{ ER_XAER_INVAL ,"XAE05", "" },
{ ER_XAER_RMFAIL ,"XAE07", "" },
{ ER_XAER_OUTSIDE ,"XAE09", "" },
{ ER_XAER_RMERR ,"XAE03", "" },
{ ER_XA_RBROLLBACK ,"XA100", "" },
{ ER_NONEXISTING_PROC_GRANT ,"42000", "" },
{ ER_DATA_TOO_LONG ,"22001", "" },
{ ER_SP_BAD_SQLSTATE ,"42000", "" },
{ ER_CANT_CREATE_USER_WITH_GRANT ,"42000", "" },
{ ER_SP_DUP_HANDLER ,"42000", "" },
{ ER_SP_NOT_VAR_ARG ,"42000", "" },
{ ER_SP_NO_RETSET ,"0A000", "" },
{ ER_CANT_CREATE_GEOMETRY_OBJECT ,"22003", "" },
{ ER_TOO_BIG_SCALE ,"42000", "S1009" },
{ ER_TOO_BIG_PRECISION ,"42000", "S1009" },
{ ER_M_BIGGER_THAN_D ,"42000", "S1009" },
{ ER_TOO_LONG_BODY ,"42000", "S1009" },
{ ER_TOO_BIG_DISPLAYWIDTH ,"42000", "S1009" },
{ ER_XAER_DUPID ,"XAE08", "" },
{ ER_DATETIME_FUNCTION_OVERFLOW ,"22008", "" },
{ ER_ROW_IS_REFERENCED_2 ,"23000", "" },
{ ER_NO_REFERENCED_ROW_2 ,"23000", "" },
{ ER_SP_BAD_VAR_SHADOW ,"42000", "" },
{ ER_SP_WRONG_NAME ,"42000", "" },
{ ER_SP_NO_AGGREGATE ,"42000", "" },
{ ER_MAX_PREPARED_STMT_COUNT_REACHED ,"42000", "" },
{ ER_NON_GROUPING_FIELD_USED ,"42000", "" },
{ ER_FOREIGN_DUPLICATE_KEY_OLD_UNUSED ,"23000", "S1009" },
{ ER_CANT_CHANGE_TX_CHARACTERISTICS ,"25001", "" },
{ ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT ,"42000", "" },
{ ER_WRONG_PARAMETERS_TO_NATIVE_FCT ,"42000", "" },
{ ER_WRONG_PARAMETERS_TO_STORED_FCT ,"42000", "" },
{ ER_DUP_ENTRY_WITH_KEY_NAME ,"23000", "S1009" },
{ ER_XA_RBTIMEOUT ,"XA106", "" },
{ ER_XA_RBDEADLOCK ,"XA102", "" },
{ ER_FUNC_INEXISTENT_NAME_COLLISION ,"42000", "" },
{ ER_DUP_SIGNAL_SET ,"42000", "" },
{ ER_SIGNAL_WARN ,"01000", "" },
{ ER_SIGNAL_NOT_FOUND ,"02000", "" },
{ ER_SIGNAL_EXCEPTION ,"HY000", "" },
{ ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER ,"0K000", "" },
{ ER_SPATIAL_MUST_HAVE_GEOM_COL ,"42000", "" },
{ ER_DATA_OUT_OF_RANGE ,"22003", "" },
{ ER_ACCESS_DENIED_NO_PASSWORD_ERROR ,"28000", "" },
{ ER_TRUNCATE_ILLEGAL_FK ,"42000", "" },
{ ER_DA_INVALID_CONDITION_NUMBER ,"35000", "" },
{ ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO,"23000", "S1009" },
{ ER_FOREIGN_DUPLICATE_KEY_WITHOUT_CHILD_INFO,"23000", "S1009" },
{ ER_CANT_EXECUTE_IN_READ_ONLY_TRANSACTION,"25006", "" },
{ ER_ALTER_OPERATION_NOT_SUPPORTED ,"0A000", "" },
{ ER_ALTER_OPERATION_NOT_SUPPORTED_REASON ,"0A000", "" },
{ ER_DUP_UNKNOWN_IN_INDEX ,"23000", "" },
{ ER_ACCESS_DENIED_CHANGE_USER_ERROR ,"28000", "" },
{ ER_GET_STACKED_DA_WITHOUT_ACTIVE_HANDLER,"0Z002", "" },
{ ER_INVALID_ARGUMENT_FOR_LOGARITHM ,"2201E", "" },
{ ER_GIS_INVALID_DATA ,"22023", "" },
{ ER_USER_LOCK_WRONG_NAME ,"42000", "" },
{ ER_ILLEGAL_USER_VAR ,"42000", "S1009" },
{ ER_NET_OK_PACKET_TOO_LARGE ,"08S01", "" },
{ ER_WRONG_TABLESPACE_NAME ,"42000", "" },
{ ER_LOCKING_SERVICE_WRONG_NAME ,"42000", "" },
{ ER_INVALID_JSON_TEXT ,"22032", "" },
{ ER_INVALID_JSON_TEXT_IN_PARAM ,"22032", "" },
{ ER_INVALID_JSON_PATH ,"42000", "" },
{ ER_INVALID_JSON_CHARSET ,"22032", "" },
{ ER_INVALID_JSON_CHARSET_IN_FUNCTION ,"22032", "" },
{ ER_INVALID_TYPE_FOR_JSON ,"22032", "" },
{ ER_INVALID_CAST_TO_JSON ,"22032", "" },
{ ER_INVALID_JSON_PATH_CHARSET ,"42000", "" },
{ ER_INVALID_JSON_PATH_WILDCARD ,"42000", "" },
{ ER_JSON_VALUE_TOO_BIG ,"22032", "" },
{ ER_JSON_KEY_TOO_BIG ,"22032", "" },
{ ER_JSON_USED_AS_KEY ,"42000", "" },
{ ER_JSON_VACUOUS_PATH ,"42000", "" },
{ ER_JSON_BAD_ONE_OR_ALL_ARG ,"42000", "" },
{ ER_NUMERIC_JSON_VALUE_OUT_OF_RANGE ,"22003", "" },
{ ER_INVALID_JSON_VALUE_FOR_CAST ,"22018", "" },
{ ER_JSON_DOCUMENT_TOO_DEEP ,"22032", "" },
{ ER_JSON_DOCUMENT_NULL_KEY ,"22032", "" },
{ ER_INVALID_JSON_PATH_ARRAY_CELL ,"42000", "" },

63
3rdparty/mysql/include/sslopt-case.h vendored Normal file
View File

@@ -0,0 +1,63 @@
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
#ifndef MYSQL_CLIENT
#error This header is supposed to be used only in the client
#endif
case OPT_SSL_MODE:
opt_ssl_mode= find_type_or_exit(argument, &ssl_mode_typelib,
opt->name);
ssl_mode_set_explicitly= TRUE;
break;
case OPT_SSL_SSL:
CLIENT_WARN_DEPRECATED("--ssl", "--ssl-mode");
if (!opt_use_ssl_arg)
opt_ssl_mode= SSL_MODE_DISABLED;
else if (opt_ssl_mode < SSL_MODE_REQUIRED)
opt_ssl_mode= SSL_MODE_REQUIRED;
break;
case OPT_SSL_VERIFY_SERVER_CERT:
CLIENT_WARN_DEPRECATED("--ssl-verify-server-cert",
"--ssl-mode=VERIFY_IDENTITY");
if (!opt_ssl_verify_server_cert_arg)
{
if (opt_ssl_mode >= SSL_MODE_VERIFY_IDENTITY)
opt_ssl_mode= SSL_MODE_VERIFY_CA;
}
else
opt_ssl_mode= SSL_MODE_VERIFY_IDENTITY;
break;
case OPT_SSL_CA:
case OPT_SSL_CAPATH:
/* Don't change ssl-mode if set explicitly. */
if (!ssl_mode_set_explicitly)
opt_ssl_mode= SSL_MODE_VERIFY_CA;
break;
case OPT_SSL_KEY:
case OPT_SSL_CERT:
case OPT_SSL_CIPHER:
case OPT_SSL_CRL:
case OPT_SSL_CRLPATH:
case OPT_TLS_VERSION:
#ifdef HAVE_YASSL
/* crl has no effect in yaSSL. */
opt_ssl_crl= NULL;
opt_ssl_crlpath= NULL;
#endif /* HAVE_YASSL */
break;
#endif /* HAVE_OPENSSL */

View File

@@ -0,0 +1,67 @@
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
#ifdef MYSQL_CLIENT
{"ssl-mode", OPT_SSL_MODE,
"SSL connection mode.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"ssl", OPT_SSL_SSL,
"Deprecated. Use --ssl-mode instead.",
&opt_use_ssl_arg, &opt_use_ssl_arg, 0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},
{"ssl-verify-server-cert", OPT_SSL_VERIFY_SERVER_CERT,
"Deprecated. Use --ssl-mode=VERIFY_IDENTITY instead.",
&opt_ssl_verify_server_cert_arg, &opt_ssl_verify_server_cert_arg,
0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
#else
{"ssl", OPT_SSL_SSL,
"If set to ON, this option enforces that SSL is established before client "
"attempts to authenticate to the server. To disable client SSL capabilities "
"use --ssl=OFF.",
&opt_use_ssl, &opt_use_ssl, 0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},
#endif
{"ssl-ca", OPT_SSL_CA,
"CA file in PEM format.",
&opt_ssl_ca, &opt_ssl_ca, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
{"ssl-capath", OPT_SSL_CAPATH,
"CA directory.",
&opt_ssl_capath, &opt_ssl_capath, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
{"ssl-cert", OPT_SSL_CERT, "X509 cert in PEM format.",
&opt_ssl_cert, &opt_ssl_cert, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
{"ssl-cipher", OPT_SSL_CIPHER, "SSL cipher to use.",
&opt_ssl_cipher, &opt_ssl_cipher, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
{"ssl-key", OPT_SSL_KEY, "X509 key in PEM format.",
&opt_ssl_key, &opt_ssl_key, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
{"ssl-crl", OPT_SSL_CRL, "Certificate revocation list.",
&opt_ssl_crl, &opt_ssl_crl, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
{"ssl-crlpath", OPT_SSL_CRLPATH,
"Certificate revocation list path.",
&opt_ssl_crlpath, &opt_ssl_crlpath, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
{"tls-version", OPT_TLS_VERSION, "TLS version to use, "
#ifndef HAVE_YASSL
"permitted values are: TLSv1, TLSv1.1, TLSv1.2",
#else
"permitted values are: TLSv1, TLSv1.1",
#endif
&opt_tls_version, &opt_tls_version, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
#endif /* HAVE_OPENSSL */

75
3rdparty/mysql/include/sslopt-vars.h vendored Normal file
View File

@@ -0,0 +1,75 @@
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifndef SSLOPT_VARS_INCLUDED
#define SSLOPT_VARS_INCLUDED
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
#ifndef MYSQL_CLIENT
#error This header is supposed to be used only in the client
#endif
const char *ssl_mode_names_lib[] =
{"DISABLED", "PREFERRED", "REQUIRED", "VERIFY_CA", "VERIFY_IDENTITY",
NullS };
TYPELIB ssl_mode_typelib = {array_elements(ssl_mode_names_lib) - 1, "",
ssl_mode_names_lib, NULL};
static uint opt_ssl_mode = SSL_MODE_PREFERRED;
static char *opt_ssl_ca = 0;
static char *opt_ssl_capath = 0;
static char *opt_ssl_cert = 0;
static char *opt_ssl_cipher = 0;
static char *opt_ssl_key = 0;
static char *opt_ssl_crl = 0;
static char *opt_ssl_crlpath = 0;
static char *opt_tls_version = 0;
static my_bool ssl_mode_set_explicitly= FALSE;
static my_bool opt_use_ssl_arg= TRUE;
static my_bool opt_ssl_verify_server_cert_arg= FALSE;
static void set_client_ssl_options(MYSQL *mysql)
{
/*
Print a warning if explicitly defined combination of --ssl-mode other than
VERIFY_CA or VERIFY_IDENTITY with explicit --ssl-ca or --ssl-capath values.
*/
if (ssl_mode_set_explicitly &&
opt_ssl_mode < SSL_MODE_VERIFY_CA &&
(opt_ssl_ca || opt_ssl_capath))
{
printf("WARNING: no verification of server certificate will be done. "
"Use --ssl-mode=VERIFY_CA or VERIFY_IDENTITY.\n");
}
/* Set SSL parameters: key, cert, ca, capath, cipher, clr, clrpath. */
if (opt_ssl_mode >= SSL_MODE_VERIFY_CA)
mysql_ssl_set(mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
opt_ssl_capath, opt_ssl_cipher);
else
mysql_ssl_set(mysql, opt_ssl_key, opt_ssl_cert, NULL,
NULL, opt_ssl_cipher);
mysql_options(mysql, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
mysql_options(mysql, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
mysql_options(mysql, MYSQL_OPT_TLS_VERSION, opt_tls_version);
mysql_options(mysql, MYSQL_OPT_SSL_MODE, &opt_ssl_mode);
}
#define SSL_SET_OPTIONS(mysql) set_client_ssl_options(mysql);
#else
#define SSL_SET_OPTIONS(mysql) do { } while(0)
#endif
#endif /* SSLOPT_VARS_INCLUDED */

201
3rdparty/mysql/include/thr_cond.h vendored Normal file
View File

@@ -0,0 +1,201 @@
#ifndef THR_COND_INCLUDED
#define THR_COND_INCLUDED
/* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/**
MySQL condition variable implementation.
There are three "layers":
1) native_cond_*()
Functions that map directly down to OS primitives.
Windows - ConditionVariable
Other OSes - pthread
2) my_cond_*()
Functions that use SAFE_MUTEX (default for debug).
Otherwise native_cond_*() is used.
3) mysql_cond*()
Functions that include Performance Schema instrumentation.
See include/mysql/psi/mysql_thread.h
*/
#include "my_thread.h"
#include "thr_mutex.h"
C_MODE_START
#ifdef _WIN32
typedef CONDITION_VARIABLE native_cond_t;
#else
typedef pthread_cond_t native_cond_t;
#endif
#ifdef _WIN32
/**
Convert abstime to milliseconds
*/
static DWORD get_milliseconds(const struct timespec *abstime)
{
#ifndef HAVE_STRUCT_TIMESPEC
long long millis;
union ft64 now;
if (abstime == NULL)
return INFINITE;
GetSystemTimeAsFileTime(&now.ft);
/*
Calculate time left to abstime
- subtract start time from current time(values are in 100ns units)
- convert to millisec by dividing with 10000
*/
millis= (abstime->tv.i64 - now.i64) / 10000;
/* Don't allow the timeout to be negative */
if (millis < 0)
return 0;
/*
Make sure the calculated timeout does not exceed original timeout
value which could cause "wait for ever" if system time changes
*/
if (millis > abstime->max_timeout_msec)
millis= abstime->max_timeout_msec;
if (millis > UINT_MAX)
millis= UINT_MAX;
return (DWORD)millis;
#else
/*
Convert timespec to millis and subtract current time.
my_getsystime() returns time in 100 ns units.
*/
ulonglong future= abstime->tv_sec * 1000 + abstime->tv_nsec / 1000000;
ulonglong now= my_getsystime() / 10000;
/* Don't allow the timeout to be negative. */
if (future < now)
return 0;
return (DWORD)(future - now);
#endif
}
#endif /* _WIN32 */
static inline int native_cond_init(native_cond_t *cond)
{
#ifdef _WIN32
InitializeConditionVariable(cond);
return 0;
#else
/* pthread_condattr_t is not used in MySQL */
return pthread_cond_init(cond, NULL);
#endif
}
static inline int native_cond_destroy(native_cond_t *cond)
{
#ifdef _WIN32
return 0; /* no destroy function */
#else
return pthread_cond_destroy(cond);
#endif
}
static inline int native_cond_timedwait(native_cond_t *cond,
native_mutex_t *mutex,
const struct timespec *abstime)
{
#ifdef _WIN32
DWORD timeout= get_milliseconds(abstime);
if (!SleepConditionVariableCS(cond, mutex, timeout))
return ETIMEDOUT;
return 0;
#else
return pthread_cond_timedwait(cond, mutex, abstime);
#endif
}
static inline int native_cond_wait(native_cond_t *cond, native_mutex_t *mutex)
{
#ifdef _WIN32
if (!SleepConditionVariableCS(cond, mutex, INFINITE))
return ETIMEDOUT;
return 0;
#else
return pthread_cond_wait(cond, mutex);
#endif
}
static inline int native_cond_signal(native_cond_t *cond)
{
#ifdef _WIN32
WakeConditionVariable(cond);
return 0;
#else
return pthread_cond_signal(cond);
#endif
}
static inline int native_cond_broadcast(native_cond_t *cond)
{
#ifdef _WIN32
WakeAllConditionVariable(cond);
return 0;
#else
return pthread_cond_broadcast(cond);
#endif
}
#ifdef SAFE_MUTEX
int safe_cond_wait(native_cond_t *cond, my_mutex_t *mp,
const char *file, uint line);
int safe_cond_timedwait(native_cond_t *cond, my_mutex_t *mp,
const struct timespec *abstime,
const char *file, uint line);
#endif
static inline int my_cond_timedwait(native_cond_t *cond, my_mutex_t *mp,
const struct timespec *abstime
#ifdef SAFE_MUTEX
, const char *file, uint line
#endif
)
{
#ifdef SAFE_MUTEX
return safe_cond_timedwait(cond, mp, abstime, file, line);
#else
return native_cond_timedwait(cond, mp, abstime);
#endif
}
static inline int my_cond_wait(native_cond_t *cond, my_mutex_t *mp
#ifdef SAFE_MUTEX
, const char *file, uint line
#endif
)
{
#ifdef SAFE_MUTEX
return safe_cond_wait(cond, mp, file, line);
#else
return native_cond_wait(cond, mp);
#endif
}
C_MODE_END
#endif /* THR_COND_INCLUDED */

227
3rdparty/mysql/include/thr_mutex.h vendored Normal file
View File

@@ -0,0 +1,227 @@
#ifndef THR_MUTEX_INCLUDED
#define THR_MUTEX_INCLUDED
/* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/**
MySQL mutex implementation.
There are three "layers":
1) native_mutex_*()
Functions that map directly down to OS primitives.
Windows - CriticalSection
Other OSes - pthread
2) my_mutex_*()
Functions that implement SAFE_MUTEX (default for debug),
Otherwise native_mutex_*() is used.
3) mysql_mutex_*()
Functions that include Performance Schema instrumentation.
See include/mysql/psi/mysql_thread.h
*/
#include <my_global.h>
#include "my_thread.h"
C_MODE_START
#ifdef _WIN32
typedef CRITICAL_SECTION native_mutex_t;
typedef int native_mutexattr_t;
#else
typedef pthread_mutex_t native_mutex_t;
typedef pthread_mutexattr_t native_mutexattr_t;
#endif
/* Define mutex types, see my_thr_init.c */
#define MY_MUTEX_INIT_SLOW NULL
/* Can be set in /usr/include/pthread.h */
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
extern native_mutexattr_t my_fast_mutexattr;
#define MY_MUTEX_INIT_FAST &my_fast_mutexattr
#else
#define MY_MUTEX_INIT_FAST NULL
#endif
/* Can be set in /usr/include/pthread.h */
#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
extern native_mutexattr_t my_errorcheck_mutexattr;
#define MY_MUTEX_INIT_ERRCHK &my_errorcheck_mutexattr
#else
#define MY_MUTEX_INIT_ERRCHK NULL
#endif
static inline int native_mutex_init(native_mutex_t *mutex,
const native_mutexattr_t *attr)
{
#ifdef _WIN32
InitializeCriticalSection(mutex);
return 0;
#else
return pthread_mutex_init(mutex, attr);
#endif
}
static inline int native_mutex_lock(native_mutex_t *mutex)
{
#ifdef _WIN32
EnterCriticalSection(mutex);
return 0;
#else
return pthread_mutex_lock(mutex);
#endif
}
static inline int native_mutex_trylock(native_mutex_t *mutex)
{
#ifdef _WIN32
if (TryEnterCriticalSection(mutex))
{
/* Don't allow recursive lock */
if (mutex->RecursionCount > 1){
LeaveCriticalSection(mutex);
return EBUSY;
}
return 0;
}
return EBUSY;
#else
return pthread_mutex_trylock(mutex);
#endif
}
static inline int native_mutex_unlock(native_mutex_t *mutex)
{
#ifdef _WIN32
LeaveCriticalSection(mutex);
return 0;
#else
return pthread_mutex_unlock(mutex);
#endif
}
static inline int native_mutex_destroy(native_mutex_t *mutex)
{
#ifdef _WIN32
DeleteCriticalSection(mutex);
return 0;
#else
return pthread_mutex_destroy(mutex);
#endif
}
#ifdef SAFE_MUTEX
/* safe_mutex adds checking to mutex for easier debugging */
typedef struct st_safe_mutex_t
{
native_mutex_t global, mutex;
const char *file;
uint line, count;
my_thread_t thread;
} my_mutex_t;
void safe_mutex_global_init();
int safe_mutex_init(my_mutex_t *mp, const native_mutexattr_t *attr,
const char *file, uint line);
int safe_mutex_lock(my_mutex_t *mp, my_bool try_lock, const char *file, uint line);
int safe_mutex_unlock(my_mutex_t *mp, const char *file, uint line);
int safe_mutex_destroy(my_mutex_t *mp, const char *file, uint line);
static inline void safe_mutex_assert_owner(const my_mutex_t *mp)
{
DBUG_ASSERT(mp->count > 0 &&
my_thread_equal(my_thread_self(), mp->thread));
}
static inline void safe_mutex_assert_not_owner(const my_mutex_t *mp)
{
DBUG_ASSERT(!mp->count ||
!my_thread_equal(my_thread_self(), mp->thread));
}
#else
typedef native_mutex_t my_mutex_t;
#endif
static inline int my_mutex_init(my_mutex_t *mp, const native_mutexattr_t *attr
#ifdef SAFE_MUTEX
, const char *file, uint line
#endif
)
{
#ifdef SAFE_MUTEX
return safe_mutex_init(mp, attr, file, line);
#else
return native_mutex_init(mp, attr);
#endif
}
static inline int my_mutex_lock(my_mutex_t *mp
#ifdef SAFE_MUTEX
, const char *file, uint line
#endif
)
{
#ifdef SAFE_MUTEX
return safe_mutex_lock(mp, FALSE, file, line);
#else
return native_mutex_lock(mp);
#endif
}
static inline int my_mutex_trylock(my_mutex_t *mp
#ifdef SAFE_MUTEX
, const char *file, uint line
#endif
)
{
#ifdef SAFE_MUTEX
return safe_mutex_lock(mp, TRUE, file, line);
#else
return native_mutex_trylock(mp);
#endif
}
static inline int my_mutex_unlock(my_mutex_t *mp
#ifdef SAFE_MUTEX
, const char *file, uint line
#endif
)
{
#ifdef SAFE_MUTEX
return safe_mutex_unlock(mp, file, line);
#else
return native_mutex_unlock(mp);
#endif
}
static inline int my_mutex_destroy(my_mutex_t *mp
#ifdef SAFE_MUTEX
, const char *file, uint line
#endif
)
{
#ifdef SAFE_MUTEX
return safe_mutex_destroy(mp, file, line);
#else
return native_mutex_destroy(mp);
#endif
}
C_MODE_END
#endif /* THR_MUTEX_INCLUDED */

214
3rdparty/mysql/include/thr_rwlock.h vendored Normal file
View File

@@ -0,0 +1,214 @@
#ifndef THR_RWLOCK_INCLUDED
#define THR_RWLOCK_INCLUDED
/* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
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; 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/**
MySQL rwlock implementation.
There are two "layers":
1) native_rw_*()
Functions that map directly down to OS primitives.
Windows - SRWLock
Other OSes - pthread
2) mysql_rw*()
Functions that include Performance Schema instrumentation.
See include/mysql/psi/mysql_thread.h
This file also includes rw_pr_*(), which implements a special
version of rwlocks that prefer readers. The P_S version of these
are mysql_prlock_*() - see include/mysql/psi/mysql_thread.h
*/
#include "my_global.h"
#include "my_thread.h"
#include "thr_cond.h"
C_MODE_START
#ifdef _WIN32
typedef struct st_my_rw_lock_t
{
SRWLOCK srwlock; /* native reader writer lock */
BOOL have_exclusive_srwlock; /* used for unlock */
} native_rw_lock_t;
#else
typedef pthread_rwlock_t native_rw_lock_t;
#endif
static inline int native_rw_init(native_rw_lock_t *rwp)
{
#ifdef _WIN32
InitializeSRWLock(&rwp->srwlock);
rwp->have_exclusive_srwlock = FALSE;
return 0;
#else
/* pthread_rwlockattr_t is not used in MySQL */
return pthread_rwlock_init(rwp, NULL);
#endif
}
static inline int native_rw_destroy(native_rw_lock_t *rwp)
{
#ifdef _WIN32
return 0; /* no destroy function */
#else
return pthread_rwlock_destroy(rwp);
#endif
}
static inline int native_rw_rdlock(native_rw_lock_t *rwp)
{
#ifdef _WIN32
AcquireSRWLockShared(&rwp->srwlock);
return 0;
#else
return pthread_rwlock_rdlock(rwp);
#endif
}
static inline int native_rw_tryrdlock(native_rw_lock_t *rwp)
{
#ifdef _WIN32
if (!TryAcquireSRWLockShared(&rwp->srwlock))
return EBUSY;
return 0;
#else
return pthread_rwlock_tryrdlock(rwp);
#endif
}
static inline int native_rw_wrlock(native_rw_lock_t *rwp)
{
#ifdef _WIN32
AcquireSRWLockExclusive(&rwp->srwlock);
rwp->have_exclusive_srwlock= TRUE;
return 0;
#else
return pthread_rwlock_wrlock(rwp);
#endif
}
static inline int native_rw_trywrlock(native_rw_lock_t *rwp)
{
#ifdef _WIN32
if (!TryAcquireSRWLockExclusive(&rwp->srwlock))
return EBUSY;
rwp->have_exclusive_srwlock= TRUE;
return 0;
#else
return pthread_rwlock_trywrlock(rwp);
#endif
}
static inline int native_rw_unlock(native_rw_lock_t *rwp)
{
#ifdef _WIN32
if (rwp->have_exclusive_srwlock)
{
rwp->have_exclusive_srwlock= FALSE;
ReleaseSRWLockExclusive(&rwp->srwlock);
}
else
ReleaseSRWLockShared(&rwp->srwlock);
return 0;
#else
return pthread_rwlock_unlock(rwp);
#endif
}
/**
Portable implementation of special type of read-write locks.
These locks have two properties which are unusual for rwlocks:
1) They "prefer readers" in the sense that they do not allow
situations in which rwlock is rd-locked and there is a
pending rd-lock which is blocked (e.g. due to pending
request for wr-lock).
This is a stronger guarantee than one which is provided for
PTHREAD_RWLOCK_PREFER_READER_NP rwlocks in Linux.
MDL subsystem deadlock detector relies on this property for
its correctness.
2) They are optimized for uncontended wr-lock/unlock case.
This is scenario in which they are most oftenly used
within MDL subsystem. Optimizing for it gives significant
performance improvements in some of tests involving many
connections.
Another important requirement imposed on this type of rwlock
by the MDL subsystem is that it should be OK to destroy rwlock
object which is in unlocked state even though some threads might
have not yet fully left unlock operation for it (of course there
is an external guarantee that no thread will try to lock rwlock
which is destroyed).
Putting it another way the unlock operation should not access
rwlock data after changing its state to unlocked.
TODO/FIXME: We should consider alleviating this requirement as
it blocks us from doing certain performance optimizations.
*/
typedef struct st_rw_pr_lock_t {
/**
Lock which protects the structure.
Also held for the duration of wr-lock.
*/
native_mutex_t lock;
/**
Condition variable which is used to wake-up
writers waiting for readers to go away.
*/
native_cond_t no_active_readers;
/** Number of active readers. */
uint active_readers;
/** Number of writers waiting for readers to go away. */
uint writers_waiting_readers;
/** Indicates whether there is an active writer. */
my_bool active_writer;
#ifdef SAFE_MUTEX
/** Thread holding wr-lock (for debug purposes only). */
my_thread_t writer_thread;
#endif
} rw_pr_lock_t;
extern int rw_pr_init(rw_pr_lock_t *);
extern int rw_pr_rdlock(rw_pr_lock_t *);
extern int rw_pr_wrlock(rw_pr_lock_t *);
extern int rw_pr_unlock(rw_pr_lock_t *);
extern int rw_pr_destroy(rw_pr_lock_t *);
static inline void
rw_pr_lock_assert_write_owner(const rw_pr_lock_t *rwlock MY_ATTRIBUTE((unused)))
{
#ifdef SAFE_MUTEX
DBUG_ASSERT(rwlock->active_writer &&
my_thread_equal(my_thread_self(), rwlock->writer_thread));
#endif
}
static inline void
rw_pr_lock_assert_not_write_owner(const rw_pr_lock_t *rwlock MY_ATTRIBUTE((unused)))
{
#ifdef SAFE_MUTEX
DBUG_ASSERT(!rwlock->active_writer ||
!my_thread_equal(my_thread_self(), rwlock->writer_thread));
#endif
}
C_MODE_END
#endif /* THR_RWLOCK_INCLUDED */

View File

@@ -1,9 +1,8 @@
/* Copyright (C) 2000 MySQL AB
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
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; either version 2 of the License, or
(at your option) any later version.
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; without even the implied warranty of
@@ -12,12 +11,14 @@
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 */
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#ifndef _typelib_h
#define _typelib_h
#include "my_alloc.h"
typedef struct st_typelib { /* Different types saved here */
unsigned int count; /* How many types */
const char *name; /* Name of typelib */
@@ -25,10 +26,29 @@ typedef struct st_typelib { /* Different types saved here */
unsigned int *type_lengths;
} TYPELIB;
extern int find_type(char *x,TYPELIB *typelib,unsigned int full_name);
extern my_ulonglong find_typeset(char *x, TYPELIB *typelib,int *error_position);
extern int find_type_or_exit(const char *x, TYPELIB *typelib,
const char *option);
#define FIND_TYPE_BASIC 0
/** makes @c find_type() require the whole name, no prefix */
#define FIND_TYPE_NO_PREFIX (1 << 0)
/** always implicitely on, so unused, but old code may pass it */
#define FIND_TYPE_NO_OVERWRITE (1 << 1)
/** makes @c find_type() accept a number */
#define FIND_TYPE_ALLOW_NUMBER (1 << 2)
/** makes @c find_type() treat ',' as terminator */
#define FIND_TYPE_COMMA_TERM (1 << 3)
extern int find_type(const char *x, const TYPELIB *typelib, unsigned int flags);
extern void make_type(char *to,unsigned int nr,TYPELIB *typelib);
extern const char *get_type(TYPELIB *typelib,unsigned int nr);
extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from);
extern TYPELIB sql_protocol_typelib;
my_ulonglong find_set_from_flags(const TYPELIB *lib, unsigned int default_name,
my_ulonglong cur_set, my_ulonglong default_set,
const char *str, unsigned int length,
char **err_pos, unsigned int *err_len);
#endif /* _typelib_h */

BIN
3rdparty/mysql/lib/Win32/libmysql.dll vendored Normal file

Binary file not shown.

BIN
3rdparty/mysql/lib/Win32/libmysql.lib vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
3rdparty/mysql/lib/x64/libmysql.dll vendored Normal file

Binary file not shown.

BIN
3rdparty/mysql/lib/x64/libmysql.lib vendored Normal file

Binary file not shown.

View File

@@ -5,7 +5,7 @@
/* This is the public header file for the PCRE library, to be #included by
applications that call the PCRE functions.
Copyright (c) 1997-2012 University of Cambridge
Copyright (c) 1997-2013 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
/* The current PCRE version information. */
#define PCRE_MAJOR 8
#define PCRE_MINOR 30
#define PCRE_MINOR 33
#define PCRE_PRERELEASE
#define PCRE_DATE 2012-02-04
#define PCRE_DATE 2013-05-28
/* When an application links to a PCRE DLL in Windows, the symbols that are
imported have to be identified as such. When building PCRE, the appropriate
@@ -95,54 +95,77 @@ it is needed here for malloc. */
extern "C" {
#endif
/* Options. Some are compile-time only, some are run-time only, and some are
both, so we keep them all distinct. However, almost all the bits in the options
word are now used. In the long run, we may have to re-use some of the
compile-time only bits for runtime options, or vice versa. In the comments
below, "compile", "exec", and "DFA exec" mean that the option is permitted to
be set for those functions; "used in" means that an option may be set only for
compile, but is subsequently referenced in exec and/or DFA exec. Any of the
compile-time options may be inspected during studying (and therefore JIT
compiling). */
/* Public options. Some are compile-time only, some are run-time only, and some
are both. Most of the compile-time options are saved with the compiled regex so
that they can be inspected during studying (and therefore JIT compiling). Note
that pcre_study() has its own set of options. Originally, all the options
defined here used distinct bits. However, almost all the bits in a 32-bit word
are now used, so in order to conserve them, option bits that were previously
only recognized at matching time (i.e. by pcre_exec() or pcre_dfa_exec()) may
also be used for compile-time options that affect only compiling and are not
relevant for studying or JIT compiling.
#define PCRE_CASELESS 0x00000001 /* Compile */
#define PCRE_MULTILINE 0x00000002 /* Compile */
#define PCRE_DOTALL 0x00000004 /* Compile */
#define PCRE_EXTENDED 0x00000008 /* Compile */
#define PCRE_ANCHORED 0x00000010 /* Compile, exec, DFA exec */
#define PCRE_DOLLAR_ENDONLY 0x00000020 /* Compile, used in exec, DFA exec */
#define PCRE_EXTRA 0x00000040 /* Compile */
#define PCRE_NOTBOL 0x00000080 /* Exec, DFA exec */
#define PCRE_NOTEOL 0x00000100 /* Exec, DFA exec */
#define PCRE_UNGREEDY 0x00000200 /* Compile */
#define PCRE_NOTEMPTY 0x00000400 /* Exec, DFA exec */
/* The next two are also used in exec and DFA exec */
#define PCRE_UTF8 0x00000800 /* Compile (same as PCRE_UTF16) */
#define PCRE_UTF16 0x00000800 /* Compile (same as PCRE_UTF8) */
#define PCRE_NO_AUTO_CAPTURE 0x00001000 /* Compile */
/* The next two are also used in exec and DFA exec */
#define PCRE_NO_UTF8_CHECK 0x00002000 /* Compile (same as PCRE_NO_UTF16_CHECK) */
#define PCRE_NO_UTF16_CHECK 0x00002000 /* Compile (same as PCRE_NO_UTF8_CHECK) */
#define PCRE_AUTO_CALLOUT 0x00004000 /* Compile */
#define PCRE_PARTIAL_SOFT 0x00008000 /* Exec, DFA exec */
#define PCRE_PARTIAL 0x00008000 /* Backwards compatible synonym */
#define PCRE_DFA_SHORTEST 0x00010000 /* DFA exec */
#define PCRE_DFA_RESTART 0x00020000 /* DFA exec */
#define PCRE_FIRSTLINE 0x00040000 /* Compile, used in exec, DFA exec */
#define PCRE_DUPNAMES 0x00080000 /* Compile */
#define PCRE_NEWLINE_CR 0x00100000 /* Compile, exec, DFA exec */
#define PCRE_NEWLINE_LF 0x00200000 /* Compile, exec, DFA exec */
#define PCRE_NEWLINE_CRLF 0x00300000 /* Compile, exec, DFA exec */
#define PCRE_NEWLINE_ANY 0x00400000 /* Compile, exec, DFA exec */
#define PCRE_NEWLINE_ANYCRLF 0x00500000 /* Compile, exec, DFA exec */
#define PCRE_BSR_ANYCRLF 0x00800000 /* Compile, exec, DFA exec */
#define PCRE_BSR_UNICODE 0x01000000 /* Compile, exec, DFA exec */
#define PCRE_JAVASCRIPT_COMPAT 0x02000000 /* Compile, used in exec */
#define PCRE_NO_START_OPTIMIZE 0x04000000 /* Compile, exec, DFA exec */
#define PCRE_NO_START_OPTIMISE 0x04000000 /* Synonym */
#define PCRE_PARTIAL_HARD 0x08000000 /* Exec, DFA exec */
#define PCRE_NOTEMPTY_ATSTART 0x10000000 /* Exec, DFA exec */
#define PCRE_UCP 0x20000000 /* Compile, used in exec, DFA exec */
Some options for pcre_compile() change its behaviour but do not affect the
behaviour of the execution functions. Other options are passed through to the
execution functions and affect their behaviour, with or without affecting the
behaviour of pcre_compile().
Options that can be passed to pcre_compile() are tagged Cx below, with these
variants:
C1 Affects compile only
C2 Does not affect compile; affects exec, dfa_exec
C3 Affects compile, exec, dfa_exec
C4 Affects compile, exec, dfa_exec, study
C5 Affects compile, exec, study
Options that can be set for pcre_exec() and/or pcre_dfa_exec() are flagged with
E and D, respectively. They take precedence over C3, C4, and C5 settings passed
from pcre_compile(). Those that are compatible with JIT execution are flagged
with J. */
#define PCRE_CASELESS 0x00000001 /* C1 */
#define PCRE_MULTILINE 0x00000002 /* C1 */
#define PCRE_DOTALL 0x00000004 /* C1 */
#define PCRE_EXTENDED 0x00000008 /* C1 */
#define PCRE_ANCHORED 0x00000010 /* C4 E D */
#define PCRE_DOLLAR_ENDONLY 0x00000020 /* C2 */
#define PCRE_EXTRA 0x00000040 /* C1 */
#define PCRE_NOTBOL 0x00000080 /* E D J */
#define PCRE_NOTEOL 0x00000100 /* E D J */
#define PCRE_UNGREEDY 0x00000200 /* C1 */
#define PCRE_NOTEMPTY 0x00000400 /* E D J */
#define PCRE_UTF8 0x00000800 /* C4 ) */
#define PCRE_UTF16 0x00000800 /* C4 ) Synonyms */
#define PCRE_UTF32 0x00000800 /* C4 ) */
#define PCRE_NO_AUTO_CAPTURE 0x00001000 /* C1 */
#define PCRE_NO_UTF8_CHECK 0x00002000 /* C1 E D J ) */
#define PCRE_NO_UTF16_CHECK 0x00002000 /* C1 E D J ) Synonyms */
#define PCRE_NO_UTF32_CHECK 0x00002000 /* C1 E D J ) */
#define PCRE_AUTO_CALLOUT 0x00004000 /* C1 */
#define PCRE_PARTIAL_SOFT 0x00008000 /* E D J ) Synonyms */
#define PCRE_PARTIAL 0x00008000 /* E D J ) */
/* This pair use the same bit. */
#define PCRE_NEVER_UTF 0x00010000 /* C1 ) Overlaid */
#define PCRE_DFA_SHORTEST 0x00010000 /* D ) Overlaid */
#define PCRE_DFA_RESTART 0x00020000 /* D */
#define PCRE_FIRSTLINE 0x00040000 /* C3 */
#define PCRE_DUPNAMES 0x00080000 /* C1 */
#define PCRE_NEWLINE_CR 0x00100000 /* C3 E D */
#define PCRE_NEWLINE_LF 0x00200000 /* C3 E D */
#define PCRE_NEWLINE_CRLF 0x00300000 /* C3 E D */
#define PCRE_NEWLINE_ANY 0x00400000 /* C3 E D */
#define PCRE_NEWLINE_ANYCRLF 0x00500000 /* C3 E D */
#define PCRE_BSR_ANYCRLF 0x00800000 /* C3 E D */
#define PCRE_BSR_UNICODE 0x01000000 /* C3 E D */
#define PCRE_JAVASCRIPT_COMPAT 0x02000000 /* C5 */
#define PCRE_NO_START_OPTIMIZE 0x04000000 /* C2 E D ) Synonyms */
#define PCRE_NO_START_OPTIMISE 0x04000000 /* C2 E D ) */
#define PCRE_PARTIAL_HARD 0x08000000 /* E D J */
#define PCRE_NOTEMPTY_ATSTART 0x10000000 /* E D J */
#define PCRE_UCP 0x20000000 /* C3 */
/* Exec-time and get/set-time error codes */
@@ -156,8 +179,9 @@ compiling). */
#define PCRE_ERROR_NOSUBSTRING (-7)
#define PCRE_ERROR_MATCHLIMIT (-8)
#define PCRE_ERROR_CALLOUT (-9) /* Never used by PCRE itself */
#define PCRE_ERROR_BADUTF8 (-10) /* Same for 8/16 */
#define PCRE_ERROR_BADUTF16 (-10) /* Same for 8/16 */
#define PCRE_ERROR_BADUTF8 (-10) /* Same for 8/16/32 */
#define PCRE_ERROR_BADUTF16 (-10) /* Same for 8/16/32 */
#define PCRE_ERROR_BADUTF32 (-10) /* Same for 8/16/32 */
#define PCRE_ERROR_BADUTF8_OFFSET (-11) /* Same for 8/16 */
#define PCRE_ERROR_BADUTF16_OFFSET (-11) /* Same for 8/16 */
#define PCRE_ERROR_PARTIAL (-12)
@@ -179,6 +203,10 @@ compiling). */
#define PCRE_ERROR_JIT_STACKLIMIT (-27)
#define PCRE_ERROR_BADMODE (-28)
#define PCRE_ERROR_BADENDIANNESS (-29)
#define PCRE_ERROR_DFA_BADRESTART (-30)
#define PCRE_ERROR_JIT_BADOPTION (-31)
#define PCRE_ERROR_BADLENGTH (-32)
#define PCRE_ERROR_UNSET (-33)
/* Specific error codes for UTF-8 validity checks */
@@ -204,6 +232,7 @@ compiling). */
#define PCRE_UTF8_ERR19 19
#define PCRE_UTF8_ERR20 20
#define PCRE_UTF8_ERR21 21
#define PCRE_UTF8_ERR22 22 /* Unused (was non-character) */
/* Specific error codes for UTF-16 validity checks */
@@ -211,7 +240,14 @@ compiling). */
#define PCRE_UTF16_ERR1 1
#define PCRE_UTF16_ERR2 2
#define PCRE_UTF16_ERR3 3
#define PCRE_UTF16_ERR4 4
#define PCRE_UTF16_ERR4 4 /* Unused (was non-character) */
/* Specific error codes for UTF-32 validity checks */
#define PCRE_UTF32_ERR0 0
#define PCRE_UTF32_ERR1 1
#define PCRE_UTF32_ERR2 2 /* Unused (was non-character) */
#define PCRE_UTF32_ERR3 3
/* Request types for pcre_fullinfo() */
@@ -234,6 +270,13 @@ compiling). */
#define PCRE_INFO_MINLENGTH 15
#define PCRE_INFO_JIT 16
#define PCRE_INFO_JITSIZE 17
#define PCRE_INFO_MAXLOOKBEHIND 18
#define PCRE_INFO_FIRSTCHARACTER 19
#define PCRE_INFO_FIRSTCHARACTERFLAGS 20
#define PCRE_INFO_REQUIREDCHAR 21
#define PCRE_INFO_REQUIREDCHARFLAGS 22
#define PCRE_INFO_MATCHLIMIT 23
#define PCRE_INFO_RECURSIONLIMIT 24
/* Request types for pcre_config(). Do not re-arrange, in order to remain
compatible. */
@@ -250,13 +293,17 @@ compatible. */
#define PCRE_CONFIG_JIT 9
#define PCRE_CONFIG_UTF16 10
#define PCRE_CONFIG_JITTARGET 11
#define PCRE_CONFIG_UTF32 12
/* Request types for pcre_study(). Do not re-arrange, in order to remain
compatible. */
#define PCRE_STUDY_JIT_COMPILE 0x0001
#define PCRE_STUDY_JIT_COMPILE 0x0001
#define PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE 0x0002
#define PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE 0x0004
#define PCRE_STUDY_EXTRA_NEEDED 0x0008
/* Bit flags for the pcre[16]_extra structure. Do not re-arrange or redefine
/* Bit flags for the pcre[16|32]_extra structure. Do not re-arrange or redefine
these bits, just add new ones on the end, in order to remain compatible. */
#define PCRE_EXTRA_STUDY_DATA 0x0001
@@ -275,12 +322,18 @@ typedef struct real_pcre pcre;
struct real_pcre16; /* declaration; the definition is private */
typedef struct real_pcre16 pcre16;
struct real_pcre32; /* declaration; the definition is private */
typedef struct real_pcre32 pcre32;
struct real_pcre_jit_stack; /* declaration; the definition is private */
typedef struct real_pcre_jit_stack pcre_jit_stack;
struct real_pcre16_jit_stack; /* declaration; the definition is private */
typedef struct real_pcre16_jit_stack pcre16_jit_stack;
struct real_pcre32_jit_stack; /* declaration; the definition is private */
typedef struct real_pcre32_jit_stack pcre32_jit_stack;
/* If PCRE is compiled with 16 bit character support, PCRE_UCHAR16 must contain
a 16 bit wide signed data type. Otherwise it can be a dummy data type since
pcre16 functions are not implemented. There is a check for this in pcre_internal.h. */
@@ -292,6 +345,17 @@ pcre16 functions are not implemented. There is a check for this in pcre_internal
#define PCRE_SPTR16 const PCRE_UCHAR16 *
#endif
/* If PCRE is compiled with 32 bit character support, PCRE_UCHAR32 must contain
a 32 bit wide signed data type. Otherwise it can be a dummy data type since
pcre32 functions are not implemented. There is a check for this in pcre_internal.h. */
#ifndef PCRE_UCHAR32
#define PCRE_UCHAR32 unsigned int
#endif
#ifndef PCRE_SPTR32
#define PCRE_SPTR32 const PCRE_UCHAR32 *
#endif
/* When PCRE is compiled as a C++ library, the subject pointer type can be
replaced with a custom type. For conventional use, the public interface is a
const char *. */
@@ -328,6 +392,19 @@ typedef struct pcre16_extra {
void *executable_jit; /* Contains a pointer to a compiled jit code */
} pcre16_extra;
/* Same structure as above, but with 32 bit char pointers. */
typedef struct pcre32_extra {
unsigned long int flags; /* Bits for which fields are set */
void *study_data; /* Opaque data from pcre_study() */
unsigned long int match_limit; /* Maximum number of calls to match() */
void *callout_data; /* Data passed back in callouts */
const unsigned char *tables; /* Pointer to character tables */
unsigned long int match_limit_recursion; /* Max recursive calls to match() */
PCRE_UCHAR32 **mark; /* For passing back a mark pointer */
void *executable_jit; /* Contains a pointer to a compiled jit code */
} pcre32_extra;
/* The structure for passing out data via the pcre_callout_function. We use a
structure so that new fields can be added on the end in future versions,
without changing the API of the function, thereby allowing old clients to work
@@ -375,6 +452,28 @@ typedef struct pcre16_callout_block {
/* ------------------------------------------------------------------ */
} pcre16_callout_block;
/* Same structure as above, but with 32 bit char pointers. */
typedef struct pcre32_callout_block {
int version; /* Identifies version of block */
/* ------------------------ Version 0 ------------------------------- */
int callout_number; /* Number compiled into pattern */
int *offset_vector; /* The offset vector */
PCRE_SPTR32 subject; /* The subject being matched */
int subject_length; /* The length of the subject */
int start_match; /* Offset to start of this match attempt */
int current_position; /* Where we currently are in the subject */
int capture_top; /* Max current capture */
int capture_last; /* Most recently closed capture */
void *callout_data; /* Data passed in with the call */
/* ------------------- Added for Version 1 -------------------------- */
int pattern_position; /* Offset to next item in the pattern */
int next_item_length; /* Length of next item in the pattern */
/* ------------------- Added for Version 2 -------------------------- */
const PCRE_UCHAR32 *mark; /* Pointer to current mark or NULL */
/* ------------------------------------------------------------------ */
} pcre32_callout_block;
/* Indirection for store get and free functions. These can be set to
alternative malloc/free functions if required. Special ones are used in the
non-recursive case for "frames". There is also an optional callout function
@@ -393,6 +492,12 @@ PCRE_EXP_DECL void (*pcre16_free)(void *);
PCRE_EXP_DECL void *(*pcre16_stack_malloc)(size_t);
PCRE_EXP_DECL void (*pcre16_stack_free)(void *);
PCRE_EXP_DECL int (*pcre16_callout)(pcre16_callout_block *);
PCRE_EXP_DECL void *(*pcre32_malloc)(size_t);
PCRE_EXP_DECL void (*pcre32_free)(void *);
PCRE_EXP_DECL void *(*pcre32_stack_malloc)(size_t);
PCRE_EXP_DECL void (*pcre32_stack_free)(void *);
PCRE_EXP_DECL int (*pcre32_callout)(pcre32_callout_block *);
#else /* VPCOMPAT */
PCRE_EXP_DECL void *pcre_malloc(size_t);
PCRE_EXP_DECL void pcre_free(void *);
@@ -405,12 +510,19 @@ PCRE_EXP_DECL void pcre16_free(void *);
PCRE_EXP_DECL void *pcre16_stack_malloc(size_t);
PCRE_EXP_DECL void pcre16_stack_free(void *);
PCRE_EXP_DECL int pcre16_callout(pcre16_callout_block *);
PCRE_EXP_DECL void *pcre32_malloc(size_t);
PCRE_EXP_DECL void pcre32_free(void *);
PCRE_EXP_DECL void *pcre32_stack_malloc(size_t);
PCRE_EXP_DECL void pcre32_stack_free(void *);
PCRE_EXP_DECL int pcre32_callout(pcre32_callout_block *);
#endif /* VPCOMPAT */
/* User defined callback which provides a stack just before the match starts. */
typedef pcre_jit_stack *(*pcre_jit_callback)(void *);
typedef pcre16_jit_stack *(*pcre16_jit_callback)(void *);
typedef pcre32_jit_stack *(*pcre32_jit_callback)(void *);
/* Exported PCRE functions */
@@ -418,83 +530,131 @@ PCRE_EXP_DECL pcre *pcre_compile(const char *, int, const char **, int *,
const unsigned char *);
PCRE_EXP_DECL pcre16 *pcre16_compile(PCRE_SPTR16, int, const char **, int *,
const unsigned char *);
PCRE_EXP_DECL pcre32 *pcre32_compile(PCRE_SPTR32, int, const char **, int *,
const unsigned char *);
PCRE_EXP_DECL pcre *pcre_compile2(const char *, int, int *, const char **,
int *, const unsigned char *);
PCRE_EXP_DECL pcre16 *pcre16_compile2(PCRE_SPTR16, int, int *, const char **,
int *, const unsigned char *);
PCRE_EXP_DECL pcre32 *pcre32_compile2(PCRE_SPTR32, int, int *, const char **,
int *, const unsigned char *);
PCRE_EXP_DECL int pcre_config(int, void *);
PCRE_EXP_DECL int pcre16_config(int, void *);
PCRE_EXP_DECL int pcre32_config(int, void *);
PCRE_EXP_DECL int pcre_copy_named_substring(const pcre *, const char *,
int *, int, const char *, char *, int);
PCRE_EXP_DECL int pcre16_copy_named_substring(const pcre16 *, PCRE_SPTR16,
int *, int, PCRE_SPTR16, PCRE_UCHAR16 *, int);
PCRE_EXP_DECL int pcre32_copy_named_substring(const pcre32 *, PCRE_SPTR32,
int *, int, PCRE_SPTR32, PCRE_UCHAR32 *, int);
PCRE_EXP_DECL int pcre_copy_substring(const char *, int *, int, int,
char *, int);
PCRE_EXP_DECL int pcre16_copy_substring(PCRE_SPTR16, int *, int, int,
PCRE_UCHAR16 *, int);
PCRE_EXP_DECL int pcre32_copy_substring(PCRE_SPTR32, int *, int, int,
PCRE_UCHAR32 *, int);
PCRE_EXP_DECL int pcre_dfa_exec(const pcre *, const pcre_extra *,
const char *, int, int, int, int *, int , int *, int);
PCRE_EXP_DECL int pcre16_dfa_exec(const pcre16 *, const pcre16_extra *,
PCRE_SPTR16, int, int, int, int *, int , int *, int);
PCRE_EXP_DECL int pcre32_dfa_exec(const pcre32 *, const pcre32_extra *,
PCRE_SPTR32, int, int, int, int *, int , int *, int);
PCRE_EXP_DECL int pcre_exec(const pcre *, const pcre_extra *, PCRE_SPTR,
int, int, int, int *, int);
PCRE_EXP_DECL int pcre16_exec(const pcre16 *, const pcre16_extra *,
PCRE_SPTR16, int, int, int, int *, int);
PCRE_EXP_DECL int pcre32_exec(const pcre32 *, const pcre32_extra *,
PCRE_SPTR32, int, int, int, int *, int);
PCRE_EXP_DECL int pcre_jit_exec(const pcre *, const pcre_extra *,
PCRE_SPTR, int, int, int, int *, int,
pcre_jit_stack *);
PCRE_EXP_DECL int pcre16_jit_exec(const pcre16 *, const pcre16_extra *,
PCRE_SPTR16, int, int, int, int *, int,
pcre16_jit_stack *);
PCRE_EXP_DECL int pcre32_jit_exec(const pcre32 *, const pcre32_extra *,
PCRE_SPTR32, int, int, int, int *, int,
pcre32_jit_stack *);
PCRE_EXP_DECL void pcre_free_substring(const char *);
PCRE_EXP_DECL void pcre16_free_substring(PCRE_SPTR16);
PCRE_EXP_DECL void pcre32_free_substring(PCRE_SPTR32);
PCRE_EXP_DECL void pcre_free_substring_list(const char **);
PCRE_EXP_DECL void pcre16_free_substring_list(PCRE_SPTR16 *);
PCRE_EXP_DECL void pcre32_free_substring_list(PCRE_SPTR32 *);
PCRE_EXP_DECL int pcre_fullinfo(const pcre *, const pcre_extra *, int,
void *);
PCRE_EXP_DECL int pcre16_fullinfo(const pcre16 *, const pcre16_extra *, int,
void *);
PCRE_EXP_DECL int pcre32_fullinfo(const pcre32 *, const pcre32_extra *, int,
void *);
PCRE_EXP_DECL int pcre_get_named_substring(const pcre *, const char *,
int *, int, const char *, const char **);
PCRE_EXP_DECL int pcre16_get_named_substring(const pcre16 *, PCRE_SPTR16,
int *, int, PCRE_SPTR16, PCRE_SPTR16 *);
PCRE_EXP_DECL int pcre32_get_named_substring(const pcre32 *, PCRE_SPTR32,
int *, int, PCRE_SPTR32, PCRE_SPTR32 *);
PCRE_EXP_DECL int pcre_get_stringnumber(const pcre *, const char *);
PCRE_EXP_DECL int pcre16_get_stringnumber(const pcre16 *, PCRE_SPTR16);
PCRE_EXP_DECL int pcre32_get_stringnumber(const pcre32 *, PCRE_SPTR32);
PCRE_EXP_DECL int pcre_get_stringtable_entries(const pcre *, const char *,
char **, char **);
PCRE_EXP_DECL int pcre16_get_stringtable_entries(const pcre16 *, PCRE_SPTR16,
PCRE_UCHAR16 **, PCRE_UCHAR16 **);
PCRE_EXP_DECL int pcre32_get_stringtable_entries(const pcre32 *, PCRE_SPTR32,
PCRE_UCHAR32 **, PCRE_UCHAR32 **);
PCRE_EXP_DECL int pcre_get_substring(const char *, int *, int, int,
const char **);
PCRE_EXP_DECL int pcre16_get_substring(PCRE_SPTR16, int *, int, int,
PCRE_SPTR16 *);
PCRE_EXP_DECL int pcre32_get_substring(PCRE_SPTR32, int *, int, int,
PCRE_SPTR32 *);
PCRE_EXP_DECL int pcre_get_substring_list(const char *, int *, int,
const char ***);
PCRE_EXP_DECL int pcre16_get_substring_list(PCRE_SPTR16, int *, int,
PCRE_SPTR16 **);
PCRE_EXP_DECL int pcre32_get_substring_list(PCRE_SPTR32, int *, int,
PCRE_SPTR32 **);
PCRE_EXP_DECL const unsigned char *pcre_maketables(void);
PCRE_EXP_DECL const unsigned char *pcre16_maketables(void);
PCRE_EXP_DECL const unsigned char *pcre32_maketables(void);
PCRE_EXP_DECL int pcre_refcount(pcre *, int);
PCRE_EXP_DECL int pcre16_refcount(pcre16 *, int);
PCRE_EXP_DECL int pcre32_refcount(pcre32 *, int);
PCRE_EXP_DECL pcre_extra *pcre_study(const pcre *, int, const char **);
PCRE_EXP_DECL pcre16_extra *pcre16_study(const pcre16 *, int, const char **);
PCRE_EXP_DECL pcre32_extra *pcre32_study(const pcre32 *, int, const char **);
PCRE_EXP_DECL void pcre_free_study(pcre_extra *);
PCRE_EXP_DECL void pcre16_free_study(pcre16_extra *);
PCRE_EXP_DECL void pcre32_free_study(pcre32_extra *);
PCRE_EXP_DECL const char *pcre_version(void);
PCRE_EXP_DECL const char *pcre16_version(void);
PCRE_EXP_DECL const char *pcre32_version(void);
/* Utility functions for byte order swaps. */
PCRE_EXP_DECL int pcre_pattern_to_host_byte_order(pcre *, pcre_extra *,
const unsigned char *);
PCRE_EXP_DECL int pcre16_pattern_to_host_byte_order(pcre16 *, pcre16_extra *,
const unsigned char *);
PCRE_EXP_DECL int pcre32_pattern_to_host_byte_order(pcre32 *, pcre32_extra *,
const unsigned char *);
PCRE_EXP_DECL int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *,
PCRE_SPTR16, int, int *, int);
PCRE_EXP_DECL int pcre32_utf32_to_host_byte_order(PCRE_UCHAR32 *,
PCRE_SPTR32, int, int *, int);
/* JIT compiler related functions. */
PCRE_EXP_DECL pcre_jit_stack *pcre_jit_stack_alloc(int, int);
PCRE_EXP_DECL pcre16_jit_stack *pcre16_jit_stack_alloc(int, int);
PCRE_EXP_DECL pcre32_jit_stack *pcre32_jit_stack_alloc(int, int);
PCRE_EXP_DECL void pcre_jit_stack_free(pcre_jit_stack *);
PCRE_EXP_DECL void pcre16_jit_stack_free(pcre16_jit_stack *);
PCRE_EXP_DECL void pcre32_jit_stack_free(pcre32_jit_stack *);
PCRE_EXP_DECL void pcre_assign_jit_stack(pcre_extra *,
pcre_jit_callback, void *);
PCRE_EXP_DECL void pcre16_assign_jit_stack(pcre16_extra *,
pcre16_jit_callback, void *);
PCRE_EXP_DECL void pcre32_assign_jit_stack(pcre32_extra *,
pcre32_jit_callback, void *);
#ifdef __cplusplus
} /* extern "C" */

BIN
3rdparty/pcre/lib/Win32/pcre8.dll vendored Normal file

Binary file not shown.

BIN
3rdparty/pcre/lib/Win32/pcre8.lib vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
3rdparty/pcre/lib/x64/pcre8.dll vendored Normal file

Binary file not shown.

BIN
3rdparty/pcre/lib/x64/pcre8.lib vendored Normal file

Binary file not shown.

83
3rdparty/yaml-cpp/CMakeLists.txt vendored Normal file
View File

@@ -0,0 +1,83 @@
cmake_minimum_required(VERSION 2.8)
## start setting
SET (this_target yaml-cpp)
PROJECT(${this_target})
find_path( YAML_INCLUDE_DIRS "yaml-cpp/yaml.h"
PATHS "${CMAKE_CURRENT_SOURCE_DIR}/include"
NO_DEFAULT_PATH )
find_path( YAML_SOURCE_DIR "regex_yaml.cpp"
PATHS "${CMAKE_CURRENT_SOURCE_DIR}/src"
NO_DEFAULT_PATH )
mark_as_advanced( YAML_INCLUDE_DIRS )
mark_as_advanced( YAML_SOURCE_DIR )
set( YAML_HEADERS
"${YAML_INCLUDE_DIRS}/yaml-cpp/yaml.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/traits.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/stlemitter.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/parser.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/ostream_wrapper.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/null.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/noncopyable.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/mark.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/exceptions.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/eventhandler.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/emitterstyle.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/emittermanip.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/emitter.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/emitterdef.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/emitfromevents.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/dll.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/binary.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/anchor.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/node/type.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/node/ptr.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/node/parse.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/node/node.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/node/iterator.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/node/impl.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/node/emit.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/node/convert.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/contrib/graphbuilder.h"
"${YAML_INCLUDE_DIRS}/yaml-cpp/contrib/anchordict.h"
CACHE INTERNAL "yaml headers" )
set( YAML_SOURCES
"${YAML_SOURCE_DIR}/binary.cpp"
"${YAML_SOURCE_DIR}/convert.cpp"
"${YAML_SOURCE_DIR}/directives.cpp"
"${YAML_SOURCE_DIR}/emit.cpp"
"${YAML_SOURCE_DIR}/emitfromevents.cpp"
"${YAML_SOURCE_DIR}/emitter.cpp"
"${YAML_SOURCE_DIR}/emitterstate.cpp"
"${YAML_SOURCE_DIR}/emitterutils.cpp"
"${YAML_SOURCE_DIR}/exceptions.cpp"
"${YAML_SOURCE_DIR}/exp.cpp"
"${YAML_SOURCE_DIR}/memory.cpp"
"${YAML_SOURCE_DIR}/nodebuilder.cpp"
"${YAML_SOURCE_DIR}/node.cpp"
"${YAML_SOURCE_DIR}/node_data.cpp"
"${YAML_SOURCE_DIR}/nodeevents.cpp"
"${YAML_SOURCE_DIR}/null.cpp"
"${YAML_SOURCE_DIR}/ostream_wrapper.cpp"
"${YAML_SOURCE_DIR}/parse.cpp"
"${YAML_SOURCE_DIR}/parser.cpp"
"${YAML_SOURCE_DIR}/regex_yaml.cpp"
"${YAML_SOURCE_DIR}/scanner.cpp"
"${YAML_SOURCE_DIR}/scanscalar.cpp"
"${YAML_SOURCE_DIR}/scantag.cpp"
"${YAML_SOURCE_DIR}/scantoken.cpp"
"${YAML_SOURCE_DIR}/simplekey.cpp"
"${YAML_SOURCE_DIR}/singledocparser.cpp"
"${YAML_SOURCE_DIR}/stream.cpp"
"${YAML_SOURCE_DIR}/tag.cpp"
"${YAML_SOURCE_DIR}/contrib/graphbuilderadapter.cpp"
"${YAML_SOURCE_DIR}/contrib/graphbuilder.cpp"
CACHE INTERNAL "yaml sources" )
set( YAML_DEFINITIONS
"-std=c++11"
CACHE INTERNAL "yaml definitions" )
include_directories(${YAML_INCLUDE_DIRS} ${YAML_SOURCE_DIR})
message(STATUS "YAML_INCLUDE_DIRS : ${YAML_INCLUDE_DIRS}, YAML_SOURCE_DIR=${YAML_SOURCE_DIR}")
ADD_LIBRARY(${this_target} STATIC ${YAML_SOURCES} )

42
3rdparty/yaml-cpp/Makefile.in vendored Normal file
View File

@@ -0,0 +1,42 @@
YAML_CPP_OBJ = $(shell find * -type f -name "*.cpp" | sed -e "s/\.cpp/\.o/g")
YAML_CPP_DIR_OBJ = $(YAML_CPP_OBJ:%=obj/%)
YAML_CPP_H = $(shell find * -type f -name "*.h")
YAML_CPP_AR = obj/yaml-cpp.a
CXXFLAG =-std=c++11
INC=-Iinclude
@SET_MAKE@
#####################################################################
.PHONY : all clean help yaml-cpp
all: yaml-cpp
clean:
@echo " CLEAN yaml-cpp"
@rm -rf obj *.o
help:
@echo "possible targets are 'all' 'clean' 'help'"
@echo "'yaml-cpp' - build $(YAML_CPP_AR)
@echo "'all' - builds $(YAML_CPP_DIR_OBJ)"
@echo "'clean' - deletes $(YAML_CPP_DIR_OBJ)"
@echo "'help' - outputs this message"
#####################################################################
obj:
@echo " MKDIR obj/src/contrib"
@mkdir -p obj/src/contrib
obj/%.o: %.cpp $(YAML_CPP_H)
@echo " CXX $<"
@@CXX@ $(CXXFLAG) @CFLAGS_AR@ @CPPFLAGS@ -g $(INC) -c $(OUTPUT_OPTION) $<
yaml-cpp: obj $(YAML_CPP_DIR_OBJ) $(YAML_CPP_AR)
$(YAML_CPP_AR): $(YAML_CPP_DIR_OBJ)
@echo " AR $@"
@@AR@ rcs obj/yaml-cpp.a $(YAML_CPP_DIR_OBJ)

View File

@@ -0,0 +1,17 @@
#ifndef ANCHOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#define ANCHOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#if defined(_MSC_VER) || \
(defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
(__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
#pragma once
#endif
#include <cstddef>
namespace YAML {
typedef std::size_t anchor_t;
const anchor_t NullAnchor = 0;
}
#endif // ANCHOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66

View File

@@ -0,0 +1,67 @@
#ifndef BASE64_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#define BASE64_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#if defined(_MSC_VER) || \
(defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
(__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
#pragma once
#endif
#include <string>
#include <vector>
#include "yaml-cpp/dll.h"
namespace YAML {
YAML_CPP_API std::string EncodeBase64(const unsigned char *data,
std::size_t size);
YAML_CPP_API std::vector<unsigned char> DecodeBase64(const std::string &input);
class YAML_CPP_API Binary {
public:
Binary() : m_unownedData(0), m_unownedSize(0) {}
Binary(const unsigned char *data_, std::size_t size_)
: m_unownedData(data_), m_unownedSize(size_) {}
bool owned() const { return !m_unownedData; }
std::size_t size() const { return owned() ? m_data.size() : m_unownedSize; }
const unsigned char *data() const {
return owned() ? &m_data[0] : m_unownedData;
}
void swap(std::vector<unsigned char> &rhs) {
if (m_unownedData) {
m_data.swap(rhs);
rhs.clear();
rhs.resize(m_unownedSize);
std::copy(m_unownedData, m_unownedData + m_unownedSize, rhs.begin());
m_unownedData = 0;
m_unownedSize = 0;
} else {
m_data.swap(rhs);
}
}
bool operator==(const Binary &rhs) const {
const std::size_t s = size();
if (s != rhs.size())
return false;
const unsigned char *d1 = data();
const unsigned char *d2 = rhs.data();
for (std::size_t i = 0; i < s; i++) {
if (*d1++ != *d2++)
return false;
}
return true;
}
bool operator!=(const Binary &rhs) const { return !(*this == rhs); }
private:
std::vector<unsigned char> m_data;
const unsigned char *m_unownedData;
std::size_t m_unownedSize;
};
}
#endif // BASE64_H_62B23520_7C8E_11DE_8A39_0800200C9A66

View File

@@ -0,0 +1,39 @@
#ifndef ANCHORDICT_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#define ANCHORDICT_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#if defined(_MSC_VER) || \
(defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
(__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
#pragma once
#endif
#include <vector>
#include "../anchor.h"
namespace YAML {
/**
* An object that stores and retrieves values correlating to {@link anchor_t}
* values.
*
* <p>Efficient implementation that can make assumptions about how
* {@code anchor_t} values are assigned by the {@link Parser} class.
*/
template <class T>
class AnchorDict {
public:
void Register(anchor_t anchor, T value) {
if (anchor > m_data.size()) {
m_data.resize(anchor);
}
m_data[anchor - 1] = value;
}
T Get(anchor_t anchor) const { return m_data[anchor - 1]; }
private:
std::vector<T> m_data;
};
}
#endif // ANCHORDICT_H_62B23520_7C8E_11DE_8A39_0800200C9A66

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