922 Commits

Author SHA1 Message Date
eathenabot
cbce9ab414 * Merged changes up to eAthena 15085.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15819 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-31 22:52:58 +00:00
shennetsind
7f57ab9eee Fixed bugreport:5497, LK/RG/PD/RG new mounts are now available again to clients prior to november 2011, items with delayed consumption are no longer available to users in new mount state. Updated setoption to consider pc_cant_mount and remove OPTION_MOUNTING from the opt bundle
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15808 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-28 04:39:54 +00:00
eathenabot
a678624e64 * Merged changes up to eAthena 15083.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15773 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-23 04:57:11 +00:00
epoque11
7bcfb36e0e - Fixed Clown/Gypsy/Minstrel/Wanderer not receiving skill points upon change-sex
- Fixed missing casts from void* to struct online_char_data* in char.c

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15735 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-20 14:01:10 +00:00
gepard1984
b610cb1a7c - Script label db now utilizes DBMap's ability to store integer-type data (follow-up to r15682).
- Some minor code cleanups.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15734 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-19 23:35:42 +00:00
lordttseven
58c5c34e81 Refine DB update
* DB courtesy of Kenpachi
 * added support for different stats per refine level for renewal
 * cleaned up the corresponding code a little
 * REMODE now displays the atk values on the client correctly

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15730 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-19 14:43:41 +00:00
gepard1984
691872fdc7 Enhanced DBMap implementation to allow storing integer type data in addition to void pointers.
- Added enum for data: `int`, `unsigned int` and `void*`
 - Replaced generic `void*` data with `DBData` struct to hold `int`, `unsigned int` or `void*` (member of `DBNode`)
 - Added `db_i2data`, `db_ui2data` and `db_ptr2data` functions to cast from `int`/`uint`/`void*` to `DBData` (used in `DBMap::put()`)
 - Added `db_data2i`, `db_data2ui` and `db_data2ptr` functions to get `int`/`uint`/`void*` from `DBData`
 - Enabled statistics for new functions in `db_stats` struct
 - `DBCreateData` functions (used in `DBMap::ensure()`) now return `DBData` instead of `void*`
 - `DBApply` functions (used in `DBMap::foreach()` and `DBMap::destroy()`) now take `DBData*` as a parameter instead of `void*`
 - `DBMatcher` functions (used in `DBMap::getall()`) now take `DBData` as a parameter instead of `void*`
 - `DBReleaser` functions now take `DBData` as parameter instead of `void*`
 - Default releasers release data if it is `void*` (`DB_DATA_PTR`) type
 - `DBIterator` functions: `first()`, `last()`, `next()` and `prev()` now return `DBData*` instead of `void*`
 - `DBIterator::remove()` now returns `int` (1 if node was found and removed, 0 otherwise) instead of `void*` and takes an extra `DBData*` parameter for the data of removed entry
 - `DBMap::get()` and `DBMap::ensure()` now return `DBData*` instead of `void*`
 - `DBMap::remove()` and `DBMap::put()` now return `int` (1 if node already existed, 0 otherwise) instead of `void*` and take an extra `DBData*` parameter for the data of removed entry
 - `DBMap::put()` now takes `DBData` as parameter instead of `void*`
 - `DBMap::getall()` now puts data into `DBData**` buffer instead of `void**` buffer
 - Updated macros:
   - (`i`/`ui`/`str`)`db_get` and (`i`/`ui`/`str`)`db_ensure` were wrapped with `db_data2ptr` to extract data from `DBData*` that is now returned by `DBMap::get()`
   - added (`i`/`ui`/`str`)`db_iget` and (`i`/`ui`/`str`)`db_uiget` that get `DBData` from `DBMap` and extract `int`/`unsigned int` from it (with `db_data2i`/`db_data2ui`)
   - `db_put`, `idb_put`, `uidb_put` and `strdb_put` data params were wrapped with `db_ptr2data` to match new signature of `DBMap::put()` (`DBData` instead of `void*`)
   - added (`i`/`ui`/`str`)`db_iput` and (`i`/`ui`/`str`)`db_uiput` that put `int`/`unsigned int` into `DBMap` (first wrapping it with `DBData`)
   - added `NULL` in place of extra parameter for removed data in `db_remove` macros
   - `dbi_first`, `dbi_last`, `dbi_next` and `dbi_prev` were wrapped with `db_data2ptr` to extract data from `DBData*` that is now returned by these `DBIterator` functions
 - Updated `DBMap` documentation, and fixed a dozen of typos in it.
 - Updated rest of rA code to reflect `DBMap` changes (mostly required signature changes of `DBCreateData` and `DBApply` functions).
 - Fixed a bug where `DBMap::put()` would return data of a deleted entry.
 - Removed some unnecessary pointer casts.
 - Increased `showmsg.c` static buffer size to fit entire DBMap stats report.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15682 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-13 14:46:28 +00:00
gepard1984
47fc6d2fe2 - Guild Castle code cleanup:
- all changes to guild castle data are now handled first by map-server and only sent to char-server for saving
  - ensured that changes made to guild castle during char-server disconnection time will be resent on reconnect
  - actually removed definition of `MAX_GUILDCASTLE` (r15657)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15658 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-05 00:08:28 +00:00
gepard1984
f810293de3 - Guild Castle code cleanup:
- removed `MAX_GUILDCASTLE` limit
  - char-server now caches guild castles in `DBMap`
  - improved guild castle SQL queries to support non-default values of `MAX_GUARDIANS`
  - disallowed declaring guild castles on maps that are on other map-servers 
  - map-server now requests data for all guild castles from char-server on initial connect (bugreport:287)
  - removed ''guildcastleinfo events'' as they were esentially duplicated ''OnAgitInit''
  - optimized castle data load packets (bugreport:287)
  - updated WoE scripts to reflect source changes (scripts no longer need or should request castle or guild data)
  - updated related docs
- Added `db_size` macro.
- Replaced manual counting of castles occupied by a guild with `guild_checkcastles()` calls.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15657 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-04 18:37:29 +00:00
lordttseven
9f938e0c70 * fixed getiteminfo offset being off by one in REMODE (bugreport:5378)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15652 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-03 13:15:01 +00:00
gepard1984
654676b73e Replaced some magic numbers related to castle guardians with MAX_GUARDIANS.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15650 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-02 17:00:17 +00:00
gepard1984
17bb9ae684 Enabled DB_OPT_RELEASE_DATA for several DBMaps to simplify data freeing.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15644 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-01 23:21:45 +00:00
gepard1984
09193ae095 Added getgroupid() script command (follow-up to r15572).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15583 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-15 00:34:32 +00:00
gepard1984
334d5959be Removed deprecated memory manager macros (follow-up to r14916).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15581 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-14 15:29:00 +00:00
gepard1984
4b96270a30 Fixed strtolower and strtoupper script functions (bug:5331).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15580 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-14 14:46:11 +00:00
gepard1984
22f0714c07 - Added libconfig (configuration file library: http://www.hyperrealm.com/libconfig/):
- Updated VS9/10 project files.
   - Updated `configure` & `Makefile`s.
 - New GM, Commands & Permissions system:
   - '''This is a backwards compatibility breaking update''', please read tid:58877
   - Replaced GM levels with Player Groups.
   - Commands permissions & other privileges now depend on group, not GM level.
 - `@help` command improvements: requires "commandname" param and shows more detailed info about commands.
 - Modified GM whisper system to deliver messages basing on permissions, not GM level.
 - Remote trade request is now possible only if player is allowed to use `@trade` command as well.
 - Added a proper permission to use `/changemaptype` command.
 - `clif_displaymessage` is now capable of displaying multiline messages.
 - All `ACMD_FUNC`s are static now, and the only way to invoke them is with `is_atcommand()`; all client commands (starting with `/`) are now translated into corresponding atcommands (with exception of `/kick` used on monster, as there is no atcommand to kill single monster).
 - Removed nonsense "bot check" triggering when player blocked (`/ex`) Server.
 - Merged `@monster`, `@monsterbig` and `@monstersmall`.
 - Improved flow of atcommand execution to avoid revealing info about online players or existing commands to non-privileged players.
 - Merged `atcommand` and `charcommand` script functions (`charcommand` is aliased to `atcommand`).
   - Fixed `atcommand` script function reading unknown memory area (possible access violation).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15572 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-13 01:19:04 +00:00
gepard1984
0709205ee8 Merged getmapmobs script function into mobcount (bugreport:244). See script commands documentation for details.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15530 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-31 15:15:32 +00:00
brianluau
00367cd7b7 - Removed more trailing tabs.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15527 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-30 20:17:55 +00:00
brianluau
3aede46965 - Removed trailing tabs, and fixed some spacing.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15524 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-30 16:02:55 +00:00
xazax-hun
d4cae50fe1 Minor cleanups, mostly reducing scopes.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15504 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-22 13:49:09 +00:00
gepard1984
bf1c81839f Merged TXT removal branch back to trunk.
* TXT save engine is removed and no longer supported.
* See also tid:53926, tid:57717.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15503 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-20 20:33:32 +00:00
gepard1984
b575345ac7 Reorganized picklog functions a bit to reuse some common code.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15486 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-18 00:45:35 +00:00
gepard1984
54ac5c18de Enabled Mersenne Twister MT19937 as random number generator instead of standard rand() function (follow-up to r14865, r14870).
- It fixes issues caused by RAND_MAX being only 32k in Windows system (bugreport:1927, bugreport:86).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15483 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-17 18:06:34 +00:00
brianluau
43dcf27318 - Updates to script_commands.txt, and added svn:keywords property.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15473 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-17 06:15:05 +00:00
shennetsind
5024a18fce ubuntu's gcc 4.6x warning fix, bugreport:5232 credits to gepard
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15435 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-12 03:32:11 +00:00
gepard1984
8b3a63cf11 Picklog improvements:
- now it is finally possible to log every item players gain or lose
 - added 3 log types: `I` for auctioned items, `B` for buying shop transactions and `X` for all other items transactions that don't fall into another category (for detailed explanation on all log types read `conf/log_athena.conf`)
 - it also fixes items being logged as picked up/gained by player when in fact they were dropped on the ground due to full inventory


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15420 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-11 17:35:28 +00:00
shennetsind
9558a9cace fixed grouprandomitem to always create unidentified items, bugreport:2802
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15382 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-04 04:45:15 +00:00
shennetsind
01b818b0ac Added 4 new all-handy script functions; special thanks to KeyWorld!
* getargcount()
-- to be used inside functions/callsub labels, returns quantity of arguments provided
* is_function(<function name>)
-- checks weather a "user" function exists, returning 1 if function is found and 0 otherwise.
* freeloop(<toggle>)
-- lets you to enable/disable (1 or 0) the loop infinity protection for that specific npc instance, allowing your script to loop as much as it may need.
* get_revision()
-- retrieves the current svn revision

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15340 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-31 23:02:50 +00:00
xazax-hun
33cc72690e Fixed setting and removing restricted mapflags. bugreport:4119
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15273 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-25 18:49:58 +00:00
eathenabot
9085803c84 * Merged changes up to eAthena 15040.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15245 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-24 14:13:39 +00:00
xantara
b465413c40 ` Fixed MF_BATTLEGROUND by Toshiro, bugreport:5150
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15219 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-23 01:50:17 +00:00
brianluau
d6d87a6f65 - Fixed pet.c not checking log_config.enable_logs setting. [lighta]
- Updated documentation for 'showevent'.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15152 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-17 07:35:04 +00:00
brianluau
e969df2ff8 - Replaced log_config.enable_logs constants with LOG_ enums that existed since r9599.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15150 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-17 06:25:11 +00:00
epoque11
18a6fb23bf - Fixed floating shops being accessible from any location through 3rd party programs
- TODO: needs amending for the walking glitch (bugreport:5016)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15099 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-14 00:37:17 +00:00
eathenabot
bef21f4f2f * Merged changes up to eAthena 15033.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15098 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-13 22:44:01 +00:00
epoque11
9d32a824b5 - Fixed rand() script command not allowing a range of over 32767 on several systems
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15090 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-13 17:31:31 +00:00
GodLesZ
642584042e Added error message if a script tries to access an instance variable while no instance is attached (bugreport:4962)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15089 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-13 11:51:35 +00:00
epoque11
b6d144c4c4 - Added support for multi-line messages when using mes;
- Added getstatus; script command to retrieve information about a specific, active status effect

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15072 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-12 03:32:34 +00:00
shennetsind
f7466db029 Fixing the last buildbot warning; should brian be happy, we'll open champagne
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15068 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-12 00:03:07 +00:00
brianluau
27f53c1386 - Renamed 'RRConfig' folder to 'config'.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15052 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-10 01:27:41 +00:00
shennetsind
05cad74427 Renewal Mode DEF calc fixed (can go over 127 now), bugreport:5110
Fixed Logic Issues with r15039 script command set

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15051 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-09 23:58:15 +00:00
brianluau
ce4717c6a7 - Added ToastOfDoom's String Commands Package. (tid:53411, topic:204976)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15039 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-09 02:46:31 +00:00
shennetsind
be428f5b9f getmapflag() fix by Kenpachi (bugreport:5097)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15011 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-06 02:56:12 +00:00
shennetsind
a785b383d7 Merging RREmu into rAthena -- quite a few stuff yet to be renamed, but we'll get it sorted.
Some of the stuff included in RREmu that is now part of rAthena:
- RE Drop Rate Modifier
- RE Experience Rate Modifier
- RE Weapon MATK
- RE Shield ASPD job-specific penalty
- RE Cast Time
- Renewal-specific item DEF
- 3.1 classes.
- All-New Mounts
- Official Magical Reflection
- And other perks, such as fully-functional @mapflag
also merged eAthena 15006 into rAthena.
For Bugs, Comments and Suggestions: http://rathena.org/board/tracker/

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15009 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-05 20:51:58 +00:00
ai4rei
05673d2336 * Fixed removing item scripts through script command *setitemscript not working the way it is stated in script_commands.txt (related r9831).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14999 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-11-28 20:24:43 +00:00
ai4rei
ddd5609af3 * Changed function-like macros into inline functions where it seemed appropriate (topic:264007).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14976 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-10-16 06:46:57 +00:00
L0ne_W0lf
d25e1c287b * Applied map flag update patch provided by Daegaladh. Will mess with custom restricted items.
- Adds a reset mapflag which is checked when using the Neuralizer.
- Syncronizes the item_noequip_db bitmasks with with skill_nocast_db.
- Updates mapflags, and both skills and items which are restricted.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14961 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-09-20 23:46:48 +00:00
flaviojs
9703374f8a * Fix C++ compilation issues.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14955 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-09-08 19:47:26 +00:00
ultramage
225a4b2ce2 Fixed 'getitem' documentation typo (stating the optional 3rd argument is char id instead of account id).
Initial documentation mistakes from r2402, propagated to code documentation in r9599, only partially fixed in r12648.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14950 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-09-01 21:19:10 +00:00
Skotlex
81ce878498 - Oh, forgot to make unitwarp support the mapname "this"
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14934 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-08-11 15:56:30 +00:00