summaryrefslogtreecommitdiff
path: root/src/map/map.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-12Fixed some badly merged code in the #include part of map.c.ultramage1-13/+1
Updated effect_list.txt according to data from latest exe. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11422 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-10* Partially removed the usage of 'flags' to direct the execution path in ↵ultramage1-1/+1
skill unit code (some people seem to really like flags >_>) - wiped out r8478 and its multiple levels of useless flag propagation - skill_unit_onlimit (expiration) no longer executes in skill_delunit - added skill_unit_ondelete for proper handling of this event git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11399 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-10* Fixed itemdb_read_sqldb blowing up the server with segmentation faults.FlavioJS1-1/+1
* Added an option for parse_script to ignore the checks for the set of brackets around the script. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11398 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-06 * the mapserver won't exit when no mapcache is found, with use_grf: yesultramage1-34/+17
* Fixed some \r uses, now looks better; /thx to Ai4rei (topic:165952) * Removed that ridiculous spinner that displays during map/npc loading, and added a more informative progress indicator (idea from jA/eapp) * Checked/fixed/removed some old script and npc commands * cmdothernpc - a specialized 'donpcevent' with the event specified as two arguments * enablearena/disablearena - completely equivalent to enablewaitingroomevent & co. * inittimer/stoptimer - removed since its logic was incompatible with the code it depended on * Removed loads of code that supported these functions. Result: -100b per npc => -1,5MB of wasted memory * Fixed related npcs that erroneously used 'stoptimer' git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11374 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-04* Corrected Icewall skill to be closer to official behavior (part of ↵ultramage1-4/+4
bugreport:38) - now works on occupied squares (previously it disappeared) - now you can walk out of an icewall square (removed code that blocked pathfinding if the origin cell was of a nonwalkable type) - added back the hack where mapcell changes are broadcast to whole map (prevents client from leaving the cells non-walkable if you warp away) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11354 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-27* Loot code using charid's instead of id's in pick priority.FlavioJS1-4/+4
* configure script using svn:eol-style LF and require mysql/pcre when --with-mysql/pcre is used. Added a forgotten file from r11311. (script_commands.txt) Note: charid's are globally unique, id's are equal for characters in the same account. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11312 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-25* Fixed the double free's caused by r11290 (wrong option in the database ↵FlavioJS1-2/+2
constructors). Readded tick cache variables (deleted by mistake). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11292 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-25* Disabled tick cache (to enable it: define TICK_CACHE to the number of ↵FlavioJS1-61/+123
calls that should be cached). * Added a charid2sd database for fast charid searches. * Reworked the nick cache to only contain offline characters. Note: The tick cache was causing _some_ of the desync problems in eA. Gameplay should be much smother, but desync problems still exist. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11290 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-23* map_addflooritem and struct item_drop_list using id's instead of struct ↵FlavioJS1-27/+9
map_session_data's (fixes bugreport:36). * Fixed buildin_escape_sql not properly escaping in sql servers. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11279 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-20* Merged the tmpsql branch:FlavioJS1-80/+58
- Abstraction for the sql code (sql.c/h). - New configure script and makefiles. - Restored txt zeny logging code. (r10814) - Rewrote mapserver's sql code - itemdb, mobdb, mapreg, logs. (r10814) - Fixed a precedence issue (&& and ) in char_sql/char.c. (r10833) - Improved db reading code a bit for consistency. (r11077) - Added separate atcommand for mail deletion. (r11077) - Corrected a few messages that said "new" instead of "unread". (r11077) - Broadcast (*) messages now use "*" as the target's name (not ""). (r11077) - Moved StringBuf code from utils.c/h to strlib.c/h. (r11084 r11117) - Some misc login server cleanups (reformatting etc). (r11136) - Corrected/modified some header entries. (r11141 r11147 11148) - Adjusted VS project files. (r11147) - Adjusted the way the sql charserver does item saving. (r11192) - Corrected usage of reserved keyword 'friend' in mmo.h. (r11192) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11245 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-11- Corrected /invite letting you invite people even if you are not the party ↵skotlex1-0/+6
leader. - Added some reply messages when you try /invite and a. the character is not found or b. you are not the party leader. - Added a check so that the 'save on crash' routine won't get stuck if it happens to crash while attempting to save characters. - People in chat-rooms no longer receive @main messages. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11179 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-10* Added a safeguard to skill_get_unit_layout() against incorrectly defined ↵ultramage1-2/+2
layout ids (will give weird results but won't crash at least) * Fixed Firewall/Icewall being oriented backwards (no real difference though...) * Removed some junk Landprotector/Graffiti code; Graffiti doesn't get placed randomly anymore * Icewall can now be cast on yourself... but for some reason, the cell on yourself immediately expires! * Merged together functions clif_set0192() and clif_changemapcell() - also removed its "send to whole map" mode which is just plain wrong (although aegis actually does use it to 'inform' caster about changes) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11175 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-10- Removed bonus bAddEffWhenHitShort as it is unneeded and unused.skotlex1-2/+8
- Corrected getpetinfo so it actually returns "null" when there's no pet and you request the name (the docs state it so). - Also cleaned up a bit getpetinfo - Added gethominfo (which behaves in the same way as getpetinfo). - The 'maxcount' skill_db field now can store independant values per skill-level, required for Kamaitachi since it uses different range values per level. - Corrected bonus3 bAutoSpell(WhenHit) to select target enemy (rather than self) for skills with inf self and inf2 'don't target self' (aka: auto-select target skills). - Corrected map_foreachinpath to do a wall check for targets beyond the initially selected tile. - Corrected Kamaitachi's range to be 9, and the path range to be 4+SkillLv git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11169 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-19* Cleaned/clarified some #include relationships between headersultramage1-11/+11
* Changed clif_sitting() to use 'bl' instead of 'sd' (for non-player objects) * Removed way messed-up script function 'unitdeadsit' * Tagged 'FIXME' lines written by myself git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11040 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-16* Fixed npc chatrooms not being deleted on npc unload/reload (crash)ultramage1-1/+1
* Modified chat code a bit for more clarity - replaced double-indirection on 'owner' with a normal pointer - separated some common functionality to 'chat_createchat()' git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11023 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-15* Some serious code cleanupsultramage1-2/+2
- adjusted @reloadbattleconf to not depend on variable ordering - changed all battle vars to 'int' (removes pointless duplicit coding) - added min, max and default columns to battle config data structure - added properly bounded values for these columns (or at least tried to) - battle-conf loading will now complain if it finds unknown settings, and will reject values that are outside of the allowed range - added CHATROOM_TITLE_SIZE and CHATROOM_PASS_SIZE - partially cleaned up chatroom manipulation code * Fixed 'Job_Professer' typo in mage jobchange quest git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11017 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-14- Modified map_foreachinrange so that you can also specify the max length of ↵skotlex1-7/+16
the path to use. The max_count field in the skill_db is used to specify this range for path-type skills (Sharpshooting, Kamaitachi and the NPC Breath skills. - Implemented the 'new' NPC skills described here: http://ro.doddlercon.com/wiki/index.php?title=Monster_Skills . It is mostly complete, but the new status changes (slow cast, critical wounds, etc) don't have any visual effects yet (icon or opt changes? I don't know if they should have). Also I could not find the unit_id for Evil Land, so it looks just like Sanctuary for now. Apart from those, the only skills which I couldn't get to display properly are the Breath skills (with the exception of Fire Breath). - skill_calc_heal now takes the target as argument to properly support Critical Wounds - battle_calc_return_damage now takes a flag to know if the attack was direct or not, needed since Magic Mirror also reflects indirect attacks. - cleaned up the 'description' field in skill.c, added skill_get_desc to it - Removed 'splash' support from Lex Divina as it is no longer needed. - Modified the way Sight/Sightblaster work so that the skill id is no longer guessed (needed to properly acquire the splash range for Wide Sight) - Corrected gtb_sc_immunity setting not taking effect if your block value was the same (that is, if the config said 30%, then you would only get status change immunity at 31%, nor 30%) - Uncommented the 'new' npc skills from mob_skill_db as they are implemented now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11000 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-12* Replaced some mob_avail.txt entries with a simple example entryultramage1-33/+11
* Removed "Crusader quest monsters" from mob_avail (not used anymore) * Updated the mapcache with data for moscovia maps * Fixed one problem in map_delmap() * Fixed a bad message in @disguise git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10988 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-09- stable -> trunk syncultramage1-31/+12
- battle.c and pc.c formatting - fixed one badly defined npc shop format string - removed the "selling item for no buying price" warning when the item has a buying price of 20 (see topic:157465) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10971 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-08* Cleaned up junk left in the code by the mapcache/mapindex updateultramage1-2/+2
- Added mapindex_getmapname(_ext) to help with ".gat" adding/removing - Moved related processing to the interface (prevents duplicity) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10963 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-06* Cleaned up some nasty code related to skill_blownultramage1-27/+37
- split 'direction' value from flags - moved (almost) entire direction calculating code to the outside - bowling bash now has the 'suck-in' effect (knockback is now done in the direction you were last facing, not in your-target direction) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10861 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-03- Re-coded 'soundeffectall'; removed the third parameter ('coverage')ultramage1-6/+6
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10844 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-01Cleaned up some parts of the code.ultramage1-8/+8
Removed obsolete script function 'hasitems'. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10838 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-06-11- Fixed pet equip not displaying correctly at all (closes topic:153753)ultramage1-1/+2
- Removed old fixpos packet (the 'new' one is way smaller) - Fixed some major logical typos in the code, cleaned up many places git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10746 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-06-03- Fixed missing client update when 'return to savepoint' failsultramage1-1/+1
- Fixed a bad copy-paste from r10028 letting players escape jail (char was dead on login, so statuses (SC_JAILED) couln't be applied) - Added clif_standing() to clif_sitting(), and used them in clif.c - Cleaned up clif.c a bit - clif_clearchar->clif_clearunit_area, clif_clearchar_id->clif_clearunit_single git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10668 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-25Corrected some weird fgets() statements, plus reformatted themultramage1-2/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10616 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-23- Added new flag to skill_castnodex.txt, to allow per-skill tweaking of cast ↵ultramage1-1/+1
time and delay reducibility by item scripts (cards and such) - Fixed Martyr's Reckoning never triggering for gms with all skills - Added MO_TRIPLEATTACK and RG_SNATCHER to @skillall's skill filter - Made gm_skill_unconditional bypass skill blocking (guild timer, etc) - Reverted the weird delay_dependon_agi thing (r8923, r9055, r9059) - Changed a few memsets to strncpy (reading past buffer is a bad idea) - Sped up some memset operations (multiples of 4 are faster) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10613 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-21- Removed the TURBO socket mechanism - it was in fact just using a variable ↵ultramage1-3/+1
to cache a few arithmetic operations (premature optimization) - Since the fifohead mess is gone, fixed leftover bad code structuring git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10599 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-19Reformatting @_@ultramage1-176/+176
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10581 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-19Fixed server crashes when you use long hostnames (/thx to Ancyker)ultramage1-3/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10579 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-05- imported the latest working grfio code from stableultramage1-13/+6
- re-added usage of managed allocation routines in grfio - eol-styled some new files - some cosmetic fixes here and there git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10468 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-04adding read-from-GRF/GAT back in. Read Changelog-Trunk.txt for more details.blackhole891-2/+104
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10455 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-18- Now @whogm hides perfect-hide gms only if their GM level is greater than ↵skotlex1-4/+1
the one who invoked the command. - Some minor cleanups. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10290 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-18- Some more cleanups that should prevent the double-login issue even further.skotlex1-7/+9
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10286 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-11- Trade-requests now fail if the target is in a NPC.skotlex1-1/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10214 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-07- Added function str2ip() to do platform-safe conversionsultramage1-0/+1
- Removed a bunch of unused stuff - Moved SIGILL to unix-only defines since tests and docs show that Windows doesn't issue SIGILL - Fixed several annoying compilation warnings git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10177 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-07- Moved e_mail_check() and config_switch() to strlib.hultramage1-15/+3
- Synchronized the login servers a bit git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10174 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-06I'm still here!DracoRPG1-40/+30
Rewrote fame ranking lists- changed MAP_NAME_LENGTH to 12, now there's MAP_NAME_LENGTH_EXT at 16 for uses where there is / may be the .gat extension, code adjusted accordingly - moved map_normalize_name to mapindex_normalize_name so that everything handling map names uses the same extension-removing function - greatly enhanced the map cache generator, complete documentation on the tool and the map cache format can be found in doc/ - the map cache format changed a bit as a consequence, but of course a new valid one is included (contains latest Nameless Island maps) - fixed a duplicate entry in map index git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10167 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-05Fixing several compilation & runtime problemsultramage1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10164 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-05* Made a crazy attempt to at least partially synchronize login&char codeultramage1-11/+10
* Major edit to the way the servers handle ip addresses, making them obey the "host byte order inside, network byte order outside" rule - hopefully covered all entry- and exit-points for IP address data - discovered several places where Gravity's client breaks the convention, will need to come up with a suitable countermeasure for that - other than that, the code should be portable, except for printing and ipban mask testing (those still assume a specific byte order) - tested both txt and sql in all usual situations; tested single- and multi-server setups, all seems to work (but watch out for hidden bugs!) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10162 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-02* Some source code cleaningultramage1-33/+18
- Fixed the badly worded messages during mapserver startup - Cleaned up socket config reading - Split resolve_hostbyname() into 2 separate functions for clarity - Moved the probably obsolete LOWER/UPPER macros to db.c (TODO: remove) - Moved the badly placed compare_item() function to storage.c (see r779) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10119 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-29- Added "do_abort" function to the core. It is invoked when the server has ↵skotlex1-0/+28
received a Segmentation Fault or Floating Point Exception signal. Currently the only one that uses it is the map-server, which then attempts to save all online characters before aborting. - Note that due to the current coding of the sig plugin, do_abort will not be invoked if you use it! This plugin needs to be updated... - Cleaned up a bit the change element code. val1 is the elemental level, val2 is the element now. - Hardcoded the element and elemental level of SC_CHANGEUNDEAD. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10089 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-28- Added defines script_getnum and script_getstr to further simplify variable ↵skotlex1-4/+0
reading code. - Applied mass replacing of text to enforce usage of script_hasdata, script_getnum, script_getstr and data_isstring defines where possible. - Cleaned up the 'input' command code. - Minor other cleanups in script.c - Removed OPTION_SIGHTTRASHER as there's no indication this value exists. - Corrected OPTION_XMAS since 2007 clients have split it up from OPTION_FLYING (on previous clients both were the same option value) - Removed GRF_PATH_FILENAME references (it wasn't used anymore) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10085 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-27- Moved coma to skill_additional_effect, added special_state.bonus_coma to ↵skotlex1-1/+1
prevent doing comma calculations for every player attack. - Added config "vending_tax" to apply a tax to all vending requests, as it was in kRO Sakray some time ago (requested by Playtester) (items.conf). - Some cleaning of skill_additional_effect - Moved the starting of SC_DANCING from skill_initunitgroup to skill_unitsetting - Moved the checks for player_skill_partner_check and (gm_skilluncond for it) to skill_check_pc_partner - Negative aspd rate bonuses will be handled as aspd add rate since the default non-stackable bonus is useless on penalty bonuses. - Added check to prevent the client from using passive skills. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10082 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-27- Removed a missing file reference in the athena-start scriptultramage1-1/+1
- Fixed a #error "<malloc.h> has been replaced by <stdlib.h>" problem - Fixed the msg_silent setting not being announced every time git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10077 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-26- Fixed # commands not being blocked when muted if the mute config settings ↵skotlex1-2/+2
say you should be. - Moved skill db reading before loading mobs so that the new mob condition checks work. - Cleaned up the warning/errors of the mob skill reading function. They are now warnings if the skill is read anyway (default conditions are used) and an error when the skill is not loaded. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10075 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-20- Removed Magic Rod's cast bar.skotlex1-0/+2
- Corrected warning on login sql. - Gravitation no longer causes damage flinch. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10038 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-19Increased MAX_STATUCHANGE to 300 so we won't get the same error over and ↵DracoRPG1-5/+8
over next time we add an SC... Reverted the map index reading for the map-server to the old system (from map_list.txt and not map_cache.dat) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10034 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-18- Removed the old 'mapserver charsave' mechanismultramage1-89/+21
- Fixed some wrong sql login logic - Fixed some compiler warnings, cleaned up mapserver sql-related vars git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10027 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-13Mapcache update, should polish off remaining bugsDracoRPG1-15/+7
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10003 54d463be-8e91-2dee-dedb-b68131a5f0ec