summaryrefslogtreecommitdiff
path: root/src/map/charcommand.c
AgeCommit message (Collapse)AuthorFilesLines
2008-07-20Corrected #storagelist target typo (bugreport:1873)sketchyphoenix1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12967 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-13Modified storage data loadingultramage1-61/+49
* storage is now loaded/saved along with character status * as a consequence, a lot of storage handling code was removed * there is no more locking done within storage data * mapservers no longer cache the data (solves muiltimapserver exploit) * loading storage on char select may decrease charserver performance git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12950 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-13storage code cleanup (no behavioral changes yet)ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12948 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-10Renamed 'storage_' to 'items' in the storage_data structure.ultramage1-7/+7
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12933 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-10Renamed 'struct storage' to 'struct storage_data' (to make 'storage' ↵ultramage1-2/+2
available as a variable name). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12932 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-13Replaced some foreach-based functions by their inlined iterator equivalents.ultramage1-2/+2
Changed the dynamic mobs system, so that the flag that indicates whether a particular mob can be unloaded is stored in the mob's respawn data structure. Cleaned up related parts of the source code. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12358 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-29- Added #cash and #points to add cash/kafra points to a character.zephyrus1-0/+50
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12267 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-12Fixed a typo in #item preventing it from working (see r12195).ultramage1-61/+56
Cleaned up #item, now uses a common function for item giving. GM min/max level drop restrictions now apply to #item (see bugreport:396). Item trade restrictions now apply to #item. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12196 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-11Getting rid of map_getallusers(), part 1ultramage1-96/+56
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12195 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-07- Fixed Freezing Trap doing no damage (changed type from misc to weapon)skotlex1-1/+1
- Changed suiton's element to water (apparently fixes not being able to use water-based skills on it) - Fixed Landmine doing no damage (decreased trigger range to 0 to match its splash range) - Fixed the disguise commands using the wrong variable when attempting to disguise as an npc. - Fixed a compilation warning on CELL_CHKNODAMAGE (which is a totally bad-ripoff of basilica cells anyway) - Corrected and optimized npc_remove_map's npc array cleanup (@reloadscripts no longer report 'too many npcs per map and related dangling pointer crashes are fixed) - Removed suspicious, yet totally unused npc_data variable 'n' - HP loss item scripts can no longer kill you. - Corrected the item-drop-rate check to avoid duplicate entries in @whodrops after a @reloadmobdb - Cleaned up and optimized map_addnpc (there are never any gaps in the npc array so npc_num always points to the last valid entry) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12180 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-04- Some code cleanups.zephyrus1-0/+4
- Added new Cell types (NoChat and NoDamage) - Added JobChangeLevel and FreeSKPoints to #stats - Added a Crash protection in clif_send with invalid fd values. - Merged a missing update in TK Mission. - Added script command 'getmapflag' - Merged some new Status Change to Stable. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12175 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-21Fixed/cleaned r12114 and 12117.ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12119 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-21- Optimized some code about @size changes in chars.zephyrus1-1/+6
- Fixed #jailtime (Bug Report 853) crash. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12117 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-07- removed the timer heap correction code when the timers overflow since ↵skotlex1-9/+9
Flavio points out that it is not needed. - Modified a bit the changesex code so you get saved and quit before changing your sex rather than afterwards. - Cleaned up #changesex - Signum Crucis now works on bosses. - party_recv_data will not set the sd pointer for not-yet-authed characters. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11867 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-22- Changed the status_change structure to use dynamic rather than static ↵skotlex1-4/+4
memory to hold the individual status changes, this should have a noticeable impact on the server's memory consumption. - Had to add a few 'ugly' flags to status_change since now you can't track SC related information while said SC is not active (happens only for Storm Gust, Joint Beat and Magic Power). - Since I am unable to fully test, watch out for any bugs~ git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11786 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-06Patching a gcc compilation problem...ultramage1-0/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11689 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-01Fixed silly copy-paste typo in r11607 preventing #-commands from working...ultramage1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11631 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-29Fixed a compilation problem and warning (maybe).ultramage1-1/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11611 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-29Command code cleaning (refer to topic:169759)ultramage1-383/+349
* separated the execution part of command code into interface part and internal part to better see which checks are done and when (fixes problem where 'nocommand' mapflag blocked server npcs) * moved the internal commands list (array) to the end of the file, this let me discard that long block of ACMD_FUNC() declarations * removed enum AtCommandType from command headers and commands array; its purpose was perhaps to identify aliased commands, but apparently it was never finished because the rest of the code doesn't use it (also doing aliases like this is not a very good idea) * internally, commands are now referenced to using their function name * removed the @/# symbols from the command lists; all lookup functions will now properly deal with strings with- and without a command symbol (commands interface still requires the symbol tho', so TODO for later) * removed several unneeded commands (*id2 code, dmalloc debug commands) * reverted atcommand config from alphabetically-sorted to how it was before (with additional fixes; see /conf changelog) * added missing code for #dropall / #storeall * added a warning when trying to set gm level of an undefined command The structure of the commands table has changed, please adjust docs/guides to match the new format (sorry for the inconvenience). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11607 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-24- added defines JOB_MAX_BASIC and JOB_MAX to mmo.h so the code can know ↵skotlex1-6/+2
which are the max valid classes. - @/#jobchange no longer strip your equipment since pc_jobchange removes any unequippables already. - removed the wasteful define MAX_PC_CLASS and replaced it by the CLASS_COUNT define (which is automatically updated using the previous JOB_MAX* defines) + pc_class2idx function (which converts high class IDs into values that fit in CLASS_COUNT) - Made status_charge a function rather than a define to get rid of those warnings that have been there since forever. - Merged the CELL_NOVENDING code (see topic #129209) - Small check that disables the pet catching process if you try to use another item. - Added a check to fix a warning and prevent a crash in the npc duplicate check (even though I have no idea what this check is supposed to do, therefore I can't fix it properly other than to avoid the crash) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11572 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-21* Fixed 'unequip' removing items in the wrong position (bugreport:252)ultramage1-1/+1
* Fixed #refine unequpping the caller's item by mistake (bugreport:265) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11534 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-18* Removed commented-out code for check_fake_id()ultramage1-5/+9
* Merged improved/cleaned up (WiP) code for clif_parse_WisMessage * Removed the requirement to provide a character name in the message string when calling is_atcommand() (needed for the previous fix) - currently both ways work, but old will be removed in the upcoming command cleanup so please adjust your custom code if you use this! * Added clif_process_message(), an unified way to validate all four types of player message packets and retrieve their components * Applied the new checking function to clif code, this fixes various length mismatches caused by incomplete code in r11386 (bugreport:198) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11507 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-18Some code cleaning...ultramage1-3/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11505 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-20* Merged the tmpsql branch:FlavioJS1-0/+1
- 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-16Fixed some problems making gcc error outultramage1-22/+19
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11223 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-15Getting some (mostly atcommand) code cleaning out of the way...ultramage1-35/+24
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11222 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-01Fixed certain typos in src/npc/doc filesultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11102 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-30- Cleaned up a bit the homunculus evolution code, and fixed homevolution ↵skotlex1-15/+11
allowing the homunc to 're-evolve' even though it was already evolved. - Optimized a bit the skillheal code in regards to Apple of Idun and Sanctuary git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11090 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-19* Cleaned/clarified some #include relationships between headersultramage1-5/+5
* 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-15* Some serious code cleanupsultramage1-10/+1
- 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-12* Replaced some mob_avail.txt entries with a simple example entryultramage1-1/+2
* 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-04* Removed weird mvp reward item drop behavior (see topic:160077)ultramage1-1/+1
* Fixed Cart Revolution not transferring status effects on attack, and Cart Termination doing it when it shouldn't (see topic:156745) * Fixed #refine not accepting names with spaces in them * Fixed disguises not doing sit-down properly (missing self packet), broken since r6299 stable / r5833 trunk * Added missing /blackmith packet action to packet_db.txt * Removed "eathena's custom equipped mobs" from mob&skill db git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10946 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-19Reformatting @_@ultramage1-358/+146
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10581 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-17Massive at+charcommand cleanup, big thanks to HiddenDragonDracoRPG1-409/+2765
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10272 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-09* Played around with MinGW a bit today...ultramage1-1/+0
- adjusted code so that it handles mingw-specific compatibility problems - adjusted the makefile, mingw is not a subset of cygwin * As an experiment Corrected many /W4 warnings on the txt login server git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10192 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-06I'm still here!DracoRPG1-2/+2
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-01- Reviewed atcommand.c and charcommand.c to make sure there's no scanf where ↵skotlex1-4/+4
a string argument is specified without a size limit. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10111 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-30* Added all the missing defines for ctype.h functions and converted all the ↵FlavioJS1-3/+3
direct uses to the defines. Ref: http://www.eathena.ws/board/index.php?showtopic=145235 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10091 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-26- Fixed # commands not being blocked when muted if the mute config settings ↵skotlex1-0/+3
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-22Some generic typo fixes (src and npc)ultramage1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10054 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-13Mapcache update, should polish off remaining bugsDracoRPG1-6/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10003 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-11- Added player not attached crash prevention to countitem/countitem2skotlex1-1/+1
- Probably corrected delitem not deleting pet eggs at all. - Possibly nullpo fix on npcskilleffect - Corrected a warning when using #fakename - Hopefully fixed hidenpc/disablenpc not working on Guild flag sprites. - Mob skill state "anytarget" no longer triggers when the mob has an item-target (looting). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9991 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-06- Moved define CHAT_SIZE to clif.c, added define CHATBOX_SIZE to specify ↵skotlex1-1/+1
that 70 char limit of the input area. - Fixed #lvup having the gm level check backwards. - Fixed the stormgust freeze counter going up even if the attack is blocked/cancelled. - Updated mes_len_check to receive max expected size as well (clif.c) - Cleaned up parsing functions for /mm, /resetskill, /resetstate, /item, /monster, /hide - git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9811 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-06- Fixed @lvup, #lvup not doing a stat reset and lowering your status points ↵skotlex1-11/+9
if you had 0 status points at that time. - Fixed MvP exp and item rewards being given even when the mob_dead flag specifies you should not receive exp or items. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9795 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-05- Fixed a duplicate warp name in Rachelskotlex1-54/+53
- Fixed Venom Splasher not being Poison elemental - Cleaned up #blv - Fixed the skill tree not always updating when using @allskill - Probably fixed the target-change on melee attack setting not working. - Moved the deletion of the invincible timer when using skills so that it is not deleted for skills such as Ashura (when just selecting a target) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9791 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-01- Item search is now a bit smarter. When no item is found with the same ↵skotlex1-1/+4
'aegis name', then the 'normal' name is used instead. - Updated the @/# commands that take an item name so that you can use quotes when specifying item names with spaces in them. For example, @item "poring card" 1 will work now. Note that only the commands that work on ONE item have been updated, those that do an item list need to be updated as well. - Removed some garbage from the item_data structure. - Improved a bit the description of the mvp item get time config settings. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9767 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-20* Fixed the server not reacting properly to atcommands/charcommands when ↵ultramage1-4/+4
using langtype 10/11 (the |XY codepage indicator wasn't being trimmed) * Fixed some joker's code trying to dereference a null pointer in atcommand_param git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9679 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-07Undid the memset->malloc_set replacementultramage1-37/+37
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9626 54d463be-8e91-2dee-dedb-b68131a5f0ec