summaryrefslogtreecommitdiff
path: root/src/map/map.c
AgeCommit message (Collapse)AuthorFilesLines
2010-10-11Added NULL initialization to info variable in map_readfromcache() to satiate ↵Paradox924X1-1/+1
compiler. (bugreport:4399) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14422 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-10-09Replaced all nullpo_retr() calls which returned 0 with nullpo_ret() calls.Paradox924X1-7/+7
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14414 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-10-06* Touched up the party booking patch, seems I forgot some lines in ↵L0ne_W0lf1-1/+0
clif.c...and managed to duplicate a line in map.c. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14413 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-10-05* Added Spira's Party Booking System implementationL0ne_W0lf1-0/+2
- Added two additional mercenaries and updated data. - Added place holder values to the item database. - Added packets for the party booking system. - Updated the 13.2 monster skills to official. - Updated stats and drop rates on several monsters. - Fixed Lullaby working on allies/party members. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14412 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-09-07Ensure a pointer is valid within map_readfromcache() before attempting to ↵Paradox924X1-1/+1
access its members. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14401 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-08-16- Merged Shinryo's patch to speed up map-cache loading.Skotlex1-38/+80
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14377 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-04-01- Fixed 'OnPCLogoutEvent' being queued and never executed if brianluau1-0/+3
the player was already talking to an npc. (bugreport:1209) - Fixed 'OnPCLogoutEvent' not triggering when changing map-servers (pc_setpos). - Combined some isequipped() in item scripts. (bugreport:4158) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14278 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-02-27Some generic code cleanups (unused struct, user counting, code comment). ultramage1-9/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14254 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-02-10- Fixed a misleading description. (bugreport:4008)brianluau1-3/+3
- Changed the confusing Rare Drop Announce. (bugreport:4037) - Fixed an extra space in item script. (bugreport:4032) - Renamed the upgrade_svn file in last commit to match revision number. - Updated SQL item/mob databases to latest. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14243 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-26Moved log_sql_init() call up in map-server-init to after after ↵Paradox924X1-4/+2
map_sql_init() call to prevent unnecessary processing before a potential quit. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14172 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-24Fixed instances not initializing after reloadscript (bugreport:3522).ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14167 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-13Resolved a client hang in the scenario where the client sent loadendack ↵ultramage1-0/+4
before the server finished loading all data (bugreport:3700). Improved the performance of pc_autosave() to stop scanning players after it has already found the player it wanted to save (bugreport:3717). The 'overweight' status changes (SC_WEIGHT50/SC_WEIGHT90) will now be cleared on logout, to avoid saving them into the database (they get derived from player weight during login anyway). Improved lock.c on windows to use C's access(0) function instead of doing fopen/fclose when testing for existence of files. Re-added the 'static' attribute to mapindex_getmapname_ext's buffer; returning the address of a non-static local variable is undefined behavior (see r13901). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14144 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-01* Implemented the fix for Slim Pitcher working on WoESE objects ↵L0ne_W0lf1-0/+2
(bugreport:3618). * Added SC_SPIRIT to the list of buffs that are dispelled when the player logs out. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14115 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-10-25Reverted renaming foreach functions and create a new one for OnTouch so that ↵Inkfish1-4/+64
last commit will hopefully break NOTHING in use. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14098 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-10-25* Implemented the official version of 'OnTouch' named as 'OnTouch_'.(it can ↵Inkfish1-3/+5
be defined in script_athena.conf) * Adapted 'map_foreachinarea' to 'map_forsomeinarea' so that it allows you to specify the number of bl you wanna operate on. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14097 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-10-04- Added a missing space in help.txt (bugreport:3632)brianluau1-1/+0
- Removed duplicate lines in item_trade.txt (bugreport:3630) - Fixed typos in Turbo Track waitingrooms. (bugreport:3628) - Removed a duplicate comment line from r14003 that caused a warning. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14081 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-08-12- Optimization to instance system.zephyrus1-548/+20
* 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-29- Fixed a bug cleaning instance variable on party when instance is destroy.zephyrus1-2/+4
- Fixed a bug on Yuno Castle 2 and 3, not killing guardians. - Moved battleground team leave on unit remove map to prevent a crash on multimap servers. - Fixed a bug on checking range with the wrong target. Fix a crash on Item 2002 at refine >= 9. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13979 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-07-29* Fixed damage_level is not calculated properly on normal attack. Inkfish1-0/+2
* Kaahi is supposed to be canceled on logout. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13978 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-4/+569
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
2009-06-04* Updates to ST_PRESERVE and a few other minor details!L0ne_W0lf1-0/+7
- Recasting Preserve no longer toggles the skill off while active. - Preserve is no longer saved on log-out or mapserver changes. * Added SC_CRITICALWOUND and SC_SLOWCAST to negative statuses not saved with battle_config.debuff_on_logout&1 * Implemented the skills NPC_HELLPOWER and NPC_WIDEHELLDIGNITY, as per my personal experiences with the skill on iRO. * Increased MAX_MOBSKILLS to 50, as Satan Morroc has over 40 active skills now. * Added skill information for NPC_HELLPOWER and NPC_WIDEHELLDIGNITY, and enabled skills in mob_skill_db. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13843 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-25Now we can use 'boss_monster' to summon whatever monsters that need to be ↵Inkfish1-9/+9
radared by Convex Mirror. (bugreport:2653) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13813 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-15- Fixed a bunch of invalid memory access bugs as reported by Valgrind.skotlex1-2/+2
- Updated unit_stop_walking to not move character an extra cell when it is already half-way there unless flag 0x4 is passed. (bugreport:3078) - Fixed the monster MD_CASTSENSOR code not correctly setting the monster's aggressive state. - Corrected a few compiler warnings - Changed a bit the code for SC_BOSSMAPINFO so it is not so hideously ugly. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13774 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-04-23Fixed several occurences of map_freeblock() being used before map_deliddb() ↵ultramage1-1/+1
(caused by r13503, r13505 and r13508) (bugreport:2959). This would cause object ids (chatrooms / ground items) to never be removed when DEBUG_MEMMGR was turned on, ultimately causing a 'no free object id' fatal error. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13689 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-04-05The dynamic mobs system will no longer de-spawn mvps (because it's annoying ↵ultramage1-0/+3
as hell). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13662 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-02-26- Fixed item Nemesis.zephyrus1-0/+5
- Fixed Tarot Card being used on Emperium. - First Part of BattleGround Implementation (please wait). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13550 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-02-23 * Consolidated is_atcommand() and is_atcommand_sub()sketchyphoenix1-1/+1
- replaced gmlvl arg with a flag arg for internal/player generated checks. (dummy sds that used this arg are given gm levels) - each command check runs through is_atcommand() and is checked for its origin (internal or player generated) - charcommands are also parsed in this function. - script atcommand/charcommand function calls to is_atcommand() have been updated - also updated some clif/map functions calls to is_atcommand() * charcommands should now log properly with the target of the command included. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13545 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-02-02Fixing r13503...ultramage1-3/+8
- Added missing id_db removal calls for all flooritem objects (bugreport:2729) - Added missing destruction of skillunit_db on mapserver exit git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13505 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-31objects[] array removal (bugreport:2559)ultramage1-120/+26
- Removed the 2 MB wide static array in favor of a general-purpose DBMap (id_db for now). - Inlined functions map_addobject, map_delobject and map_delobjectnofree into their callers' code. - Replaced the free id lookup algorithm from ancient jathena with something more efficient. - Moved the algorithm to map_get_new_object_id() (similar idea as r13481). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13503 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-24* Changed the variables of the mapcache structs to fixed size equivalents. ↵FlavioJS1-7/+10
(64bit portability issue) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13483 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-24* Changed all uses of struct skill_unit_group* to group_id in ↵FlavioJS1-2/+2
status_change_entry's. (last known 64bit portability issue) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13482 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-13Mobs with nonzero spawn time can now be cached as well, saving some more ↵ultramage1-5/+8
cpu/memory (bugreport:1197). Fixed dynamic mobs being unloaded without stopping their respawn timer. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13445 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-12Added regen_db to reduce hp/sp processing delays (bugreport:2256).ultramage1-0/+32
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13443 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-23 * Added a few missing atcommands.sketchyphoenix1-1/+1
* Added more commands to configurations (bugreport:2565) * Added a missing charcommand symbol config to atcommand configs. * GM command configs under the old format will have a warning printed back to the console as being deprecated. * Other fixes/cleaning partially resolving bugreport:2549 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13409 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-18Removed charcommand code while allowing atcommand code to support its ↵sketchyphoenix1-5/+1
functionality. Charcommands still retain their '#' symbol but now looks for a character name as the first parameter instead of last. Atcommand configs now support charcommand level configurations by comma seperation (e.g. 60,99) As a result of this, all atcommands that don't affect multiple users already (@kickall, @doom, @mapexit) are capable of remote usage. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13403 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-11-22* Hunted down improper uses of va_list variables.FlavioJS1-38/+49
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13383 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-09-18- Some corrections to Basilica.zephyrus1-2/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13217 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-09-09Enabled WoE SE to be run independently of WoE. Let's see how long it is ↵L0ne_W0lf1-0/+1
before something blows up, or Ultramage pulls out his hair while cursing my existence. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13202 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-24- Moving all content of Homunculus code to a proper file Homunculus.c/hzephyrus1-1/+3
- Update of all project files. NOTE: All functions on homunculus.c should be renamed i think, to remove all the merc_*. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13122 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-23- Completed Mercenary Create, Delete, Save. Tests OK.zephyrus1-1/+2
- Incremented MAX_SKILL required for a proper load of Mercenary Skills. - Some fixes. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13118 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-20- New invisible walls system (for WOE SE and Battlegrounds).zephyrus1-1/+119
- New script commands for this system "setwall" and "delwall" - Added other scripts commands "changelook" (can be used to try clothes colors, hair styles, headgears, etc without saving this on logout). - Added getmobdrops to request a list of drop and rate of an specified class. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13101 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-15Split off mapreg code from script.cultramage1-3/+4
* new mapserver files, mapreg.h, mapreg_txt.c, mapreg_sql.c * removed MAPREGSQL from project files / makefiles * mapreg storage engine is now fully dependent on the server type * added config settings mapreg_txt and mapreg_db to inter config * added get_str() function to complement add_str() * fixed txt mapreg code allowing too long variable names git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13081 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-10Some small code cleaningultramage1-108/+147
- removed unused create_storage() function - removed unused char_db mapserver config setting - adjusted formatting of mapserver config loading code git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13063 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-30Removed the IRC bot system, now a customization (see topic:194306)ultramage1-6/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13014 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-29- Fixed a bug with Status Resist Potion.zephyrus1-0/+1
- Fixed double char data save on quit with storage opened. BugReport 1794. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13013 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-27Cleaned up several poorly chosen loginlog variable names.ultramage1-8/+6
Removed the unused login and txt->sql options in inter_athena.conf. Renamed config option log_db to log_db_db in inter_athena.conf. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13005 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-26Merged the /loginmerge branch (topic:192754)ultramage1-42/+2
* the login server storage, ipban and logging systems have been abstracted and now provide a common interface; the rest has been merged into a single login server core (no more login/login_sql duplicity) * storage systems are now added via compiler options (WITH_SQL / WITH_TXT) * multiple storage engines can be compiled in at the same time, and the config option account.engine defines which one will be used. * due to MySQL autoincrement limitations, accounts with id '0' will not be supported; account IDs from this point on should start from '1'. * login_log() functions now again record IP addresses in dotted format, not as 4-byte integers (undo from r6868). * removed config options that defined column names in the login table * removed `memo` and `error message` columns from login db/savefile * moved `loginlog` table to the logs database * added sql files upgrade_svn12975.sql and upgrade_svn12975_log.sql * due to changes to the login table layout, I added an !optional! sql file (upgrade_svn12975_view.sql) that will provide a certain degree of backwards compatibility with existing software; read the instructions inside carefully! * moved third-party includes/libs to a separate directory * updated project files / makefiles Changed the way GM levels are handled * removed conf/gm_account.txt * added the gm level column to the txt savefile (after 'email' column) * gm level information is now transferred along with account data For open problems see bugreport:1889. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13000 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-26Replaced occurences of '-1' with the more appropriate 'INVALID_TIMER' value ↵ultramage1-3/+3
where appropriate. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12998 54d463be-8e91-2dee-dedb-b68131a5f0ec