summaryrefslogtreecommitdiff
path: root/src/map/chrif.c
AgeCommit message (Collapse)AuthorFilesLines
2012-10-31Fixed bugreport:6836 apparently msvc didn't like the inlines altho both gcc ↵shennetsind1-9/+9
and clang did not mind (I guess I'm missing something important, but its too late for me and I'll just remove them for now) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16851 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-10-31Follow up r16837 replaces sprintf with snprintf to at least ensure we dont ↵shennetsind1-303/+302
go over our length in a modified msg table -- (in the future we should make that a #define or something else practical and clever). The commit should've stopped on this, however as I was to compile I realized my recently-updated osx got rid of my makefile during the update, so I had to download and install it over. and during that download period I've gone over the whole chrif.c file and applied some syntax love to it, or as some of my lovely colleagues would say: I gayed it up. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16846 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-10-29-Fixed action assignation follow up r16837,r16836,r16835glighta1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16838 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-10-29-Fixed bugreport:6432 Shadow Formation effect range is 10 while casting ↵glighta1-1/+1
range is 5 -Fixed and add some documentation on map fonctions. (JIS->UTF8 unwanted transformation) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16837 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-10-29- Fixed warnings from r16835.brianluau1-5/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16836 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-10-29-Add some src basic documentation.glighta1-39/+29
-Change some remaining -1 for status ending timer. -Move some hardcoded msg in msg_athena -Small optimisation on battle_attr_fix git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16835 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-09-16Introducing rAthena's anonymous data collector. This aims at improving ↵shennetsind1-1/+15
rAthena's overall features by letting we know which options are most and least used. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16785 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-09-02Hello! few things.shennetsind1-1/+1
1) fixed bugreport:6603 - delayed clearunit now makes use of the ERS which is quite convenient for it speeds up due to the previous amount of mallocs that function would spend. 2) added extra debug information to the ERS system (before on any of its warnings we'd go OH MY GOD WHICH ONE OF THEM DID IT!!!), now upon allocation you give it a const, human-readable, name. 3) added support for options in the ERS system to save multiple/redudant processing in battle_delayed_damage and clif_clearunit_delayed and perhaps also in the future. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16736 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-22Major cleanup all over the place, made possible by mkbu95's scan-build ↵shennetsind1-4/+1
report he provided us with. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16687 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-07-26Added the merges proposed in evilpuncker's list of suggestions: ↵shennetsind1-1/+1
http://rathena.org/board/topic/63001-my-rathena-suggestions/page__st__20#entry124218 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16500 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-06-14Added support for new carts (requires packetver 20120201 or newer). ↵shennetsind1-6/+3
Super-Ultra-Plus thanks to Fatal Error and Judas. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16297 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-20Initial support for Genetic, Sorcerer and Elemental Summons. Special Thanks ↵shennetsind1-0/+3
to 3CeAM for the base. Notice this revision onwards requires you to update your char sql table and add the elemental sql table (check sql-files/upgrade_svn15885_log.sql) If you step by any bugs, let us know at http://rathena.org/board/tracker/ Thank you very much. ARRIBA ARRIBA. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15885 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-13Enhanced `DBMap` implementation to allow storing integer type data in ↵gepard19841-8/+17
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15682 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-05- Guild Castle code cleanup:gepard19841-0/+3
- 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15658 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-04- Guild Castle code cleanup:gepard19841-0/+1
- 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15657 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-17Fixed chrif_authreq possible crash, bugreport:5337shennetsind1-7/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15595 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-13 - Added `libconfig` (configuration file library: ↵gepard19841-4/+4
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15572 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-30- Removed more trailing tabs.brianluau1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15527 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-20Merged TXT removal branch back to trunk.gepard19841-12/+2
* TXT save engine is removed and no longer supported. * See also tid:53926, tid:57717. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15503 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-17* Merged changes ONLY eAthena 15002.eathenabot1-0/+1
[ai4rei] * Preparation clean up in clif.h - Synced function declarations and argument names with clif.c including whitespace. - Removed orphaned function declarations. - Removed include to storage.h and put it into .c files that need it instead. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15469 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-15Fixed a bug with the output message of chrif_authokshennetsind1-3/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15461 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-14another cool multi-map-server ancient bugfix:shennetsind1-4/+5
- added a 'changing_mapservers' state, so the map server receiving the player knows he doesn't have to do certain things, in this case not display motd and use the aurafix. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15445 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-14Fixed ancient multi-map-server bug where gmlevel was lost during changing ↵shennetsind1-2/+3
map-servers. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15444 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-11Picklog improvements:gepard19841-2/+2
- 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15420 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-23While rAthena is under active development...I don't think this warning is ↵jmanfffreak1-7/+1
needed anymore. Please continue to use diligence with using in a production environment, and report all bugs! git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15218 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-15monsters no longer use rudeattacked skills when they receive reflected ↵shennetsind1-1/+1
damage from a player who died, bugreport:3912 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15131 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-14Removing a friend will also remove you from your friends friendlist, ↵shennetsind1-2/+19
bugreport:2977 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15119 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-14minor message renameshennetsind1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15113 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-05Merging RREmu into rAthena -- quite a few stuff yet to be renamed, but we'll ↵shennetsind1-1/+7
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15009 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-09-06* Restrict intif_quest_save to sql only. txt char-server doesn't support the ↵flaviojs1-0/+2
packet and disconnects the map-server. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14954 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-06-30Replaced custom type 'intptr' with standard 'intptr_t'.ultramage1-5/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14873 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-06-23* Made chrif_save always call pc_makesavestatus. (no reason to prevent the ↵flaviojs1-3/+2
call, and was interfering with multi map-server; fixes bugreport:1400) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14863 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-06-22Added enum e_skill_flag to represent the values of struct s_skill's ↵ultramage1-2/+2
complicated 'flag' field. Reordered the enum values so SKILL_FLAG_REPLACED_LV_0 goes last and arithmetic can be done on it safely (for storing skill level values). This also adds support for skill levels higher than 10. Fixed several places where SKILL_FLAG_TEMPORARY was not handled properly, and instead was considered as one of the saved skill level values (resulting in skill level -1). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14861 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-06-16* Merges from charmerge:flaviojs1-32/+67
- Added DBMap::exists. (r14090) - Added sv_parse_next, a stepped version of sv_parse (delim-separated parser). (r14100 r14104) - Added missing fd check to do_close. (r14145) - Normalized, refactored and restructured some code (in preparation for shutdown/reconnect code). (r14145 r14150) - Changed the char select request code to allow the char-server to reject it. (player in map-server trying to go to char select) (r14150) - Added shutdown support to the servers. (incomplete) (r14152) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14851 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-01-14* Replaced remaining occurences of '-1' with 'INVALID_TIMER', where ↵ai4rei1-1/+1
appropriate (follow up to r12998). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14670 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-01-13* Removed ladmin (remote administration tool), all related support code and ↵ai4rei1-29/+2
the checkversion.pl tool with it's support code, which was shared with ladmin (topic:262934, related bugreport:1147, bugreport:1889, r9408 and r9610). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14667 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-01-13* Fixed chrif-packet processing considering free/unused packet IDs ↵ai4rei1-3/+3
incorrectly as variable length packets (-1 = variable length, 0 = disabled packet). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14666 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-12* Updates to dynamic server information `ragsrvinfo` on SQL.ai4rei1-30/+8
- Fixed exp and drop rates (int) getting truncated (short) when sent to char-server. - Removed `motd` from `ragsrvinfo` as it is not dynamically changed by the server and as such can be read by 3rd party applications directly from conf/motd.txt if required. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14579 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-07* Reverted r14563, due to multiple issues which render the source ↵ai4rei1-4/+4
malfunctioning or uncompilable. To be redone later (bugreport:4627). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14567 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-07Changed almost all instances of sprintf() to snprintf().Paradox924X1-4/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14563 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-08-29Force a map_quit() call on the session data after a block/ban/changesex/acc ↵Paradox924X1-0/+3
deletion to remove leftovers of a player's session caused by when the fd has already been set to eof (player is not connected) but session data is kept (e.g. autotrading). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14398 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-08-20Removed processing for undocumented and unused event 'OnCharIfInit' which is ↵Paradox924X1-1/+0
essentially an alias for event 'OnInterIfInit'. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14389 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-08-19- Implemented usage of packets 0x7fa and 0x7f7, 0x7f8, 0x7f9. These are used ↵Skotlex1-2/+2
for proper deletion of items as well as movement/spawn packets for Renewal clients. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14383 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-02-27Some generic code cleanups (unused struct, user counting, code comment). ultramage1-7/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14254 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-01-15* Fixed change cart packet doesn't check for skill.Inkfish1-2/+2
* Added new packets for Plagiarism. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14218 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-10-27Fixed quest will never get erased when it's the only quest you have.Inkfish1-2/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14105 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-08-12- Optimization to instance system.zephyrus1-2/+3
* Removed the crc feature to generate instance npc names. The instance npc name will be "dup_" + instanceid + "_" + srcnpcid. * Removed the big array under map structure and coded in a different way. It was only used to generate map names, but i just used the instance_id + "origin map name". * Moved all instance features to separated files. * Moved the npc duplication for instances into npc.c as Ultramage says (removed npcname_db from npc.h). * Added recomendations for scripts commands by Saithis. - Testing required, i will prepare Endless Tower script soon. I hope this do almost anything in bugreport 3276. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14003 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-07-28* Some more updates to Quest LogInkfish1-1/+1
- Implemented a new saving mechanism. Now they can be saved every 'autosave_time' in case the char-server is not online when you get a quest. - Improved 'changequest' code. - Increase MAX_QUEST_DB to 1200. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13973 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-07-25Rewrote Quest Log system.Inkfish1-0/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13959 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-20- Instancing System (Thanks to Sirius White who did most of the code, with ↵zephyrus1-2/+3
some of my work to implement client side information, some optimizations and bugfixes). Also thanks to contributions from UEAUP team and Orcao. - Fixed a bug on areamobuseskill and changed it to make it as Aegis. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13901 54d463be-8e91-2dee-dedb-b68131a5f0ec