summaryrefslogtreecommitdiff
path: root/src/map/clif.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-31Commented out msg_athena.conf strings disabled in r11625.ultramage1-1/+1
Reverted changes in r11625 that used enum sc_type where it shouldn't have been used. Removed leftover npc/other/arena.txt. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11627 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-31* Added names to the SC_ and SI_ enums, now they can be used to properly ↵ultramage1-2/+2
indicate where such values are to be used (replaces usage of 'int') * removed MIN_/MAX_PORTAL_MEMO, set MAX_MEMOPOINTS from 10 to 3 * removed support for @go-ing to your memo points * simplified the overly verbose @memo command; now re-uses pc_memo() * cleaned up pc_memo(), now uses semi-correct packet replies * Minor code cleaning/formatting git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11625 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-29Command code cleaning (refer to topic:169759)ultramage1-41/+44
* 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-28- Fixed a bug on the Attachment [Mail System]zephyrus1-5/+8
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11593 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-27Followup fixes to r11583:ultramage1-45/+32
* fixed wrong sql upgrade file name, added svn:eol-style native * made 'status' variable directly use the mail_status enum * replaced some hardcoded numbers in mail queries with references to the enum * fixed a query which still used 'read_flag' * fixed all new mails being displayed as 'already read' * removed sd nullpo checks from parse_ functions as that can never happen * fixed mapserver sending (and charserver saving) junk item fields when there is no item attached to a mail * fixed wrong mail send packet interpretation saving random memory after message body ('body_len' doesn't include the terminating zero) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11584 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-27- Improvements to the mail system.zephyrus1-118/+97
- Added a sql patch, renaming "read_flag" column to "status" on the mail db. - Need more testing. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11583 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-26Moved the new novending cell check from the internal code to the ↵ultramage1-2/+2
client-server interface (allows server to force-open shop if needed) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11580 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-26* Removed confusing map_nick2sd_nocase(), let the charserver handle itultramage1-19/+6
* Added correct packet for attachment retrieval failure when overweight * Fixed one more mistake in r11571 (Sql->SqlStmt) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11579 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-24* Cleaned up some messy guild code (more to come)ultramage1-71/+72
* Cleaned up the mail code, no more pointless dynamic allocation * Added upgrade_svn11548.sql to convert the mail table to new format * Updated vs7 and vs6 project files * Increased the max. send buffer size to 5M since 1M is not enough * Please complain if something stops working ^^; git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11571 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-23* Removed the inter_athena.conf maildb settings as they are not required ↵zephyrus1-15/+15
anymore. - MailDB is now an integral part of the MainDB. - To Server Admins, use mysql tools to move your mail data to the new structure. - You can get the maildb structure from main.sql. - Renamed some vars (recomendation of Ultramage :D) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11557 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-22- Added the new mail system. Requires optimization and tests.zephyrus1-4/+419
- Updated the maildb sql structure. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11548 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-20Fixed a signed/unsigned integer glitch in r11520 messing up random lvl1 ↵ultramage1-0/+1
Teleport. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11525 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-18Fixed some gcc-specific stuff, silenced some more warningsultramage1-6/+6
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11515 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-18Fixed numerous /W4 warnings (and created more :)ultramage1-16/+19
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11514 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-18* Removed commented-out code for check_fake_id()ultramage1-281/+213
* 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-10-17* Reworked the parsing at npc.c.FlavioJS1-5/+10
- Fixes npc.c discarding the '}' at the end of file, when there is no newline. (uncovered as a side-effect of r11487) * Empty script functions always have code now (won't report as missing when you try to call them). * Changed userfunc_db to not limit the name to 50 characters. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11502 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-17Using predefined constants as parameters to the exit() function.ultramage1-3/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11501 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-16* Venom Splasher fixes according to bugreport:230ultramage1-8/+4
- added passive skillv*30% bonus from Poison React - added official splash damage calculation - damage gets split by the number of targets at range 1, then applied to all targets in range 2 - reverted some very old code - clif_calc_delay() - that was preventing skills from displaying properly, by erroneously assuming that if the target has ddelay 0, it has endure effect activated - TODO: the skill should not consume a gemstone when it fails git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11494 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-16* Fixed a copy-paste mistake in disguise code (from r5833)ultramage1-9/+10
* Commented out clif_skill_damage2() as it is not used anymore * Made Venom Splasher a splash attack that distributes damage * Fixed displaying of several splash skills (see bugreport:238) - added flag SD_PREAMBLE for skills that need the 'magic' packet (fixes Grimtooth / Cart Revolution displaying out of sync) - hacked together Venom Splasher's "no animation for central mob" - hacked in a custom packet to make Dragonfear display semi-correctly git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11491 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-10* Implemented more official Warp Portal behaviorultramage1-18/+15
- the transition from active to waiting mode is now done as a simple appearance change instead of deleting one and creating the other - due to the above, an opening warp is now properly accompanied by the log-in like sound effect git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11404 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-10Re-enabled packet 0x1ac to be sent when something gets ankle-snaredultramage1-9/+10
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11400 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-09Removed name checks from /b and /lb after finding out that /nb and /nlb use ↵ultramage1-49/+20
the same packet... git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11387 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-09* Corrected string lengths according to bugreport:198ultramage1-83/+92
- CHATBOX_SIZE: 70 -> 70+1 - removed some too aggressive checks in clif_parse_globalmessage() - removed CHAT_SIZE define as it actually doesn't apply anywhere - added CHAT_SIZE_MAX to serve as a custom limit to input string lengths - added length/contents checks to /b and /lb (against fake names) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11386 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-08* Delayed the check for required items when a skill is cast to when they are ↵FlavioJS1-11/+11
consumed. Now skills only fail due to lack of items after being cast. - Please make a bug report if you know of any skill that doesn't work like this in official. * Fixed hp of other party members not being sent when you join a party. * Removed unused global array names_id and renamed some structures that are used with variables of the same name. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11384 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-05* REALLY fixed emblem not displaying when a char logs in (compromise between ↵ultramage1-6/+8
r10624 and r11033 that hopefully works) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11369 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-05* Completed the code for SC_LIFEINSURANCE and it's status icon.zephyrus1-3/+2
- Added the summer_ignorepalette to client.conf. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11359 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-04* Corrected Icewall skill to be closer to official behavior (part of ↵ultramage1-36/+30
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-10-04* Added MAX_HOTKEYS to supplement the HOTKEY_SAVING defineultramage1-3/+3
* Fixed a compile problem when hotkey saving is disabled (topic:167265) * Added script source error reporting to countitem() (topic:167165) * Removed integer mob skill state/target definition support (unused) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11353 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-03* Cleaned up parts of skill.c related to skill unitsultramage1-128/+17
- removed some nonsense code in skill_dance_switch() (from r8876) - removed 'security system to prevent forgetting timer removal' (r1213) - renamed some skill-related data structs (had same name as variables) - commented out custom Venom Splasher countdown messaging code git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11347 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-01* Fixed various trading/vending glitchesultramage1-224/+214
- fixed vending_tax not working at all (integer division in r10182) - undid change from r8273 where pc_getzeny() treated zeny overflow as an error condition; officially, the value is just bounded to MAX_ZENY - fixed stupid code that, instead of properly checking and filtering invalid items during shop setup, opted to 'hide' these items from the vending list instead... - removed some custom error message packets related to vending - fixed a glitch where the server would open a shop with no items when all entered items were tagged as invalid - split zeny handling from trade_tradeadditem() into a separate func (trade_tradeaddzeny()) - removed loads of redundant code from vending.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11344 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-29Renamed&moved macros clif_trading() and clif_cant_act() to pc.c since ↵ultramage1-27/+20
they're completely player-status related. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11331 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-28* Implemented Summer Outfit care of Zephyrus_CR.L0ne_W0lf1-7/+9
- Increased MAX_GUILDCASTLE in mmo.h to 29 for future implementation of the 12.1 Guild Castles. * Added constants for Summer Outfit and updated the Summer_Event_Suit item script. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11321 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-26* Implemented Token of Siegfried effect care of Zephyrus_CR.L0ne_W0lf1-0/+19
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11307 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-25* Disabled tick cache (to enable it: define TICK_CACHE to the number of ↵FlavioJS1-35/+17
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-24Added back log_chat's '1 - log everything' setting (revert from r10850).ultramage1-2/+2
Don't forget to adjust your config file ... again. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11289 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-22* Added 'safestrnlen' to prevent null pointer crashesultramage1-48/+63
* Fixed global chat logging always crashing on a null pointer * Applied changes to clif_parse_globalmessage() from my WiP code - clearer processing of the individual packet components - proper code ordering, some more integrity checks - fixes to some poorly chosen ShowWarning() format strings - global chat logging no longer logs the entire string (w/ player name) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11271 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-21* Makefile deleting .svn in save folder.FlavioJS1-1/+5
* Limited the number of packets parsed per cycle to 3. (packet spammers create less lag) * Fixed sql login throwing an out-of-place debug message and escaping too much of the name string when creating a new login with _M/F. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11253 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-15Getting some (mostly atcommand) code cleaning out of the way...ultramage1-32/+23
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11222 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-11- Corrected /invite letting you invite people even if you are not the party ↵skotlex1-1/+1
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-38/+31
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-07- Added support for the new party invite/reply packets from the latest ↵skotlex1-0/+34
client version. - Cleared up some TODO's - Added auto-rejecting party/guild invites when the target is disconnected from the server. - Added a correction in the walking code to abort it when map_moveblock cancels the player's walking (by warping/knocking back),the default code would fail because unit_stopwalking would do nothing since the walk timer was already -1 in that moment. - Corrected mob_randomwalk to use unsigned int for the tick variable. - Changed the default @Main format to prevent crashes in the newer clients. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11134 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-31* Documented/cleaned up chatroom code and packetryultramage1-67/+86
* Added some comments to clif_changechatowner() - totally broken, see the code + topic:163829 * Implemented the chatroom display packet properly - now has 4 types: public, private, npc and non-clickable npc chatroom * Implemented the chatroom leave packet properly - now utilizes the 'kicked' flag when the user was forced to leave - TODO: banlist support to prevent re-entry, see jAthena code git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11100 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-24- Fixed the hotkey list sending to the client not displaying right away.skotlex1-1/+1
- Corrected the unit_id of NPC_EVILLAND (taken from jA) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11071 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-19* Cleaned/clarified some #include relationships between headersultramage1-36/+33
* 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-19- Cleaned up some the pet armor display code.skotlex1-49/+14
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11034 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-18- Corrected a bit npc_remove_map, map_deliddb and strdb_remove calls belong ↵skotlex1-9/+14
to npc_unload rather than npc_remove_map. Also improved a bit the removal of the npc from the map's npc list. - Added back the hair-style/hair-bottom fields to the spawn packet, and the pet-idle packet is no longer sent when the pet does not has an armor equipped (this should cut down on bandwidth a bit for non-equipped pets) - Moved the position of the map_addblock/clif_spawn code section in parse_LoadEndAck to above the party-hp blocks, this corrects party-member HP display mnot being updated when someone spawns in your range of sight. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11033 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-16* Fixed npc chatrooms not being deleted on npc unload/reload (crash)ultramage1-11/+24
* 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- Merged and completed Latio's work on server-side hot-key saving ↵skotlex1-2/+35
(http://www.eathena.ws/board/index.php?s=&showtopic=159388&view=findpost&p=884453) - Now hotkeys are stored server-side (table hotkey in SQL servers, file save/hotkeys.txt for TXT servers). You can disable this behaviour by commenting out the 'HOTKEY_SAVING' define in mmo.h - Fixed a few compilation warnings/errors. - Apply upgrade_svn11018.sql to create the hotkey table. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11019 54d463be-8e91-2dee-dedb-b68131a5f0ec