summaryrefslogtreecommitdiff
path: root/src/map/clif.c
AgeCommit message (Collapse)AuthorFilesLines
2006-12-19- Cleanups or minor changes.FlavioJS1-2/+3
- Now addtick_timer invokes settick_timer, so keep an eye for whatever timer issues it's supposed to have. - Removed the flush_fifo from clif_parse_TickSend until the socket problems are fixed. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9521 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-18- Updated POS2 macros. The 6th byte is subx0 and suby0FlavioJS1-18/+30
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9520 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-18- Added hom_setting to specify which homunculus 'quirks' are in effect. The ↵skotlex1-2/+5
default activates all of them, if you set them to 0 then homuncs will not be treated in any special matter, pretty much like standard mobs. if I missed any 'quirky' homunc behaviour from it, report it so it can be added to the list. - Made flooritem_lifetime a int so you can specify much longer life times (the default of 60k was already very close to the max of 65k) - Removed monster_ai 0x80 since it's now handled by hom_setting. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9519 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-18- When walking into a Guild Dungeon your pvp_points will be set to 5 so you ↵skotlex1-0/+4
have to die twice before being warped out. - If jobchanging while disguised, the disguise will be removed, since it can't be kept and still calculate correctly the new job class to use. - Fuuma shurikens are now unbreakable code-wise (like all maces, books, etc) - Applied Meruru's patch to increase speed of easy path seeks. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9518 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-16- Moved packet_len_table values to packet_db[SERVER].FlavioJS1-550/+579
- When an invalid packet_ver is found, all it's entries are discarted intead of just stopping the parsing. whew, I'm glad regular expressions exist. =D I'd also like to apologize for the previous revision. That build wouldn't work because I commented out the contents of packet_len_table, resulting in packet sizes being 0 (or whatever is the default value for variables). Got lazy, won't happen again... =X git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9507 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-16- Increased MAX_PACKET_DB to 0x300 and added a warning for when packet ids ↵FlavioJS1-4/+26
greater than MAX_PACKET_DB are found. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9506 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-14- Added function skill_strip to handle stripping code. The RG strip skills ↵skotlex1-9/+0
and GS_DISARM use it now. - Modified the strip-related status changes so they handle removing the equipped item instead of leaving it up to the skill-code. They return 0 when nothing could be stripped. - Cleaned some the MD_DETECTOR code. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9499 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-13- Modified flush_fifo so you can decide whether to block the current thread ↵skotlex1-1/+1
or not until the data is sent. The server-tick reply no longer blocks the current thread. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9486 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-12- Fixed a bug in the new knockback additional packet.skotlex1-6/+10
- Commented out the new knockback skill additional packet as it makes most skills not display an animation. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9482 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-12- Modifed a bit the clif_change_look function, it should fix crashes with ↵skotlex1-2/+10
the Xmas sprite when changing maps. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9478 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-12- Fixed skills displaying a 32k damage when used while disguised.skotlex1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9476 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-12- Added guild master check before asking to make/delete an alliance/oppositionskotlex1-1/+17
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9474 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-12- Minor changes to ers.FlavioJS1-1/+1
- Removed unused/hardly used cbasetypes typedefs. - Updated txt-converter's makefile to include utils.o git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9473 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-12- Modified the skill damage packet and the knockback packets to mimic aegis ↵skotlex1-7/+19
sent packets for such skills. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9471 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-12- Removed CART_MASK as OPTION_CART can take care of that.skotlex1-5/+3
- Moved the OPTION_MASK define to status.h - Reverted the knockback implementation to use clif_slide instead of clif_fixpos git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9469 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-11- Added various guild packet related missing checksskotlex1-1/+16
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9467 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-10err, ups... -.-'FlavioJS1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9447 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-10- Added more helpfull error messages when packet_ver=-1. (no more ↵FlavioJS1-31/+80
"clif_parse: Disconnecting session #XX for not having latest client version (has version -1)." messages) - Joined normal and MINICORE's main function. - Put malloc_init() first and malloc_final() last as it's needed for Show* in display_title(). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9446 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-09- Reversed revision #9415 (messages with server_tick field being sent as ↵FlavioJS1-29/+24
soon as possible) since it didn't fix the client synchronization issue. - clif_parse_TickSend is sent immediately so the client gets accurate "pings" Note: in Changelog, for my changes, if they're grouped together and in the same day I'm only gonna "sign" the bottom line. All unsigned lines are assumed to be from the same person of the previous line (below). (easier searches =P) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9443 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-08- Now you can request a trade regardless of the state of the target trader.skotlex1-7/+3
- The trade will now fail when you accept it and either character is speaking with an npc, vending or has the storage open. - Cleaned up some the trade ack function, added proper replies to some fail cases. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9438 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-06- Fixed the compile error when trying to build the ladmin exe.skotlex1-1/+1
- When GM skill unconditional is set, the arrow state of the skill will be calculated, this fixes all skills getting stuck on arrow-type after you attack normally. - Alchemist famous potions get their 50% bonus on top of the natural bonuses as a 1.5x type of bonus instead of adding linearly on top of your vit bonus (which would mean equal bonus of raising your vit by 25). - Fixed the va_arg(va, char) warning that said the program would abort when it's reached o.O; made it read a int which is then casted to char. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9420 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-06- Messages with server_tick field are sent as soon as possible now.FlavioJS1-25/+32
This might fix client synchronization issues. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9415 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-05- Found the position of emblem_id in packet 1b6, commented out the old fix ↵FlavioJS1-2/+4
while it's in trial period. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9409 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-05- Moved START_ACCOUNT_NUM and END_ACCOUNT_NUM from login.h to mmo.h and ↵FlavioJS1-33/+28
changed clif_guess_PacketVer to use that. - Made the script engine big-endian compatible. (i know it's pointless because of the move to eApp, but just couldn't resist :S) - Commented out the remnants of ladmin packet parsing in map-server. - Added a warning when a player has an invalid packet version (shouldn't happen) PS- also added info on clif_guild_basicinfo packet fields, if anyone is interested git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9408 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-04- Changed clif_blown to use fixpos again as per aegis packets.skotlex1-2/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9402 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-04- Repairing items via scripts no longer displays "item has been repaired"skotlex1-11/+2
- Status Recovery again makes mobs unlock their current target. - Moved requesting party/guilds from the char-server from pc_authok to pc_reg_received, since map_nick2sd and map_getallsd won't work until the characters are authentified. Also removed the guild master setting from clif_parse_LoadEndAck to pc_reg_received since guild master setting will work there. - Fixed homun hunger timer being started on login even when hom is vaporized/dead. - Fixed mvp exp attacker bonus applying incorrectly. - Removed duplicate msg_athena.conf entries 619 and 620 for Ninja/Gunslinger. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9401 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-04- Fixed the txt->sql converter not escaping character names before saving them.skotlex1-26/+8
- Fixed a pet's level not resetting to their db level when you enable pet leveling and later on decide to turn it off. - Fixed a bad initialization in pc_setnewpc - Fixed restricted equipment not updating your view info after they are unequipped. - Removed a bunch of extra text/checks when ignoring characters (/ex) when Aegis does none of these checks. /inall now wipes your ignore list (it does this on Aegis, too). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9400 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-02- Replaced @send with the version I use for testing packets.FlavioJS1-12342/+12301
Can display the packet length. Supports dynamic packets, quoted strings with escaped characters and fixed/variable length, and normal/hex byte/word/long data types. The number of fields is not limited, but it automatically stops parsing when the packet is full. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9387 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-01- Fixed txt-converter compilation. skotlex1-4/+13
- Added my_global.h include to login converter - Removed sd->char_id since we can use sd->status.char_id instead. - Small speedup in STRECOVERY, and made it not unlock a mob's target. - Fixed GS_GROUNDDRIFT consuming ammo when it's time expires (so it was consuming 2 grenades instead of one). Also added a "explosion effect" when their time runs out. - gvg_dungeon mapflag won't set pvp related mapflags anymore, pc_dead will force pvp ranking gain/loss on gvg_dungeon maps now. - Now when coming out of hiding land-effects will trigger on the character. - Made the pc_setpos message when being placed on an unwalkable tile tell you which player triggered it. - Fixed land effects not taking effect inmediately on map-load when the invincible timer is disabled. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9374 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-29- Added a missing map_quit in clif_parse which was the real reason for the ↵skotlex1-1/+2
crashes. - Therefore, removed the session valid checks from intif.c - Thanks for Flavio for figuring out how to reproduce the crash. And unthanks to me for introducing it on the first place D: - Note: Every connection before being closed and free'd will set eof to 1 and invoke the parse function (clif_parse for players), and since this is the last invocation, it is clif_parse's job to do any cleanup necessary. The missing map_quit what did was to leave the player pointer reference in different db's, which lead to a dangling pointer! Which obviously leads to no good. The map server's code should always ensure that session[sd->fd]->session_data == sd ALL the time (except when sd->fd is 0). - Finally, not writing any of this on the txt changelog file so Flavio can have the glory of the bugfix :B git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9368 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-29- Added overflow protection to @main whisper parsing.skotlex1-5/+5
- Fixed a bug in slaves_inherit_speed - Miscellanous silly cleanups (format, unnecessary assignments, comments, etc) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9367 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-29- Now gvg_dungeon mapflag will activate the other mapflags which are ↵skotlex1-5/+3
required: pvp, pvp_nocalcrank and pvp_noparty/pvp_noguild (they are forced to off if gvg_dungeon is on and viceversa) - Cleaned the pvp ranking code so that it takes effect even if pvp_nocalcrank is active WHEN the map is a gvg_dungeon one. - Cleaned up a bit the pvp ranking timer code. - Now homuncs and their masters are the only ones who can use support skills on the homunc. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9360 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-28- Fixed a possible crash due to the recent core.c upgrade.skotlex1-0/+10
- Changing setting the Guild Master from pc_authok to clif_parse_LoadEndAck so that it will not fail to set the gmaster flag when the first person of a guild to log on is the guild master. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9347 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-27- Updated the status change field "option" to an int rather than short. This ↵skotlex1-5/+7
fixes the option values for xmas/sightblaster not getting set, which could explain why some people crash when equipping weapons while in xmas suit. - Also did the same to opt3 since the new packet version uses LONG to store the opt3 values. - Made the clif weapon view function use the EQI constants instead of ints. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9337 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-27- Fixed the Homunculus hungry timer not starting on login.skotlex1-0/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9336 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-27- Fixed clif.c dumping unknown packets by default... (oops, used an #ifdef ↵skotlex1-1/+1
where an #if had to go) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9335 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-27Added logging for standard GM commands (/mm /b /kick etc)KarLaeda1-6/+48
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9334 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-27- Corrected KiriKage's range so it works correctly when used by non-players ↵skotlex1-1/+1
or when use weapon's range is used. - Changed service for you's flags so it affects all players on range. - Corrected the skill animation for Absorb Spirits - Cleaned up a bit the implementation of how Gravity Field blocks the caster from moving. - Mob class-changing will fail if the new class is the same as the previous one. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9325 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-24- Heaven's drive no longer targets traps.skotlex1-1/+1
- Some minor cleanups git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9316 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-24- Some cleaning of the pc_authok, clif_WantToConnection functions. Also some ↵skotlex1-94/+88
cleaning of the logout messages and some other cleanups in clif_parse git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9312 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-24- The check that blocks the skill AL_TELEPORT on noteleport maps will be ↵skotlex1-7/+15
overriden when you use Flywings/Butterfly wings, so B Wings are usable again in noteleport maps. - Removed a fd check in foreachinmovearea, which explains why autotraders sometimes were invisible to people who walked within sight of them - Corrected the ignore list sorting function to account for entries with no names so they are sent to the end, not the beginning. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9311 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-24- Fixed uninitialized variable fd being used in WFIFOHEAD in a few clif ↵skotlex1-16/+4
functions. - Some cleaning in the script.c functions that invoke the clif functions to make sure a null sd is never passed. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9308 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-24- Added all the missing FIFOHEADs in the login/sql servers (required for ↵skotlex1-115/+97
TURBO support) - Fixed the fact that the TURBO code breaks when you attempt to handle more than one connection at a time within the same function. However this broke map-server compilation, therefore, don't use TURBO yet! It needs more fixing (and I need more time to fix it) - While at it, cleaned a few packet implementations in the char/login servers which were not only ugly, but had some really stupid flaws within (stuff like escaping a string, and then using the non-escaped variable to insert to SQL? T_T) And will someone explain me why the TXT servers are coded much more cleanly, and without such horribly broken code as I find in the SQL ones? T_T; git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9307 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-23- Made WFIFOHEAD() check for available buffer size remaining on the ↵skotlex1-11/+15
connection, and when there's not enough space, it will increase it. - Added define TURBO to the Makefile. It enables MouseJstr's socket access optimization which should speed up the code when accessing the write/read buffers repeatedly within a function. - Fixed the functions where the RFIFOHEAD/WFIFOHEAD functions were used incorrectly (prevents TURBO enabled compilations from finishing) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9297 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-22- Modified slaves_inherit_speed and slaves_inherit_mode so you get better ↵skotlex1-1/+1
control of when to copy/remove modes/speed. - Reenabled usage of mode MD_CHANGETARGET, so mobs with mode 0x200 will be able to switch targets while attacking. - Simplified some more the chase-changetarget function. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9294 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-22- Recoded @send so that it uses clif.c instead of doing all the WFIFO stuff ↵skotlex1-1/+42
itself. - Cleaned up a bunch of very uglily coded atcommands which used the rather pointless charid2sessionid and accountid2sessionid functions. - Some miscellanous cleanups around usage of the session[] variable. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9293 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-21- Moved ignoreAll to state.ignoreAll so it saves some space.skotlex1-200/+215
- Cleaned up clif_parse_Wis to prevent crashes from forged packets (using a strlen() on a string where you don't know if it's null-terminated is a NO-NO) - Cleaned up the implementation of the ignore list so it's more efficient. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9282 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-20- Fixed itemskill variable being cleared before parsing the skill, this ↵skotlex1-4/+4
causes auto-casted teleport to fail to skip the skill menu. It is now cleared on castend_pos/id directly. - The item skill/lv variables now use 0 as default to signal they aren't being used (instead of -1) - Skills with state 'move_enable' will now do a "walk path" check between target cell/object and caster instead of a "shoot path" check, this would fix skills like snap or charge from letting you "teleport" across pits. - Fixed a possible double map_addblock when hatching a pet egg right before going through a warp. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9275 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-20- Raised the amount of skills that can stack on a single cell before the ↵skotlex1-1/+3
"in-area/out-area" detection code breaks to 24 (from 8) - Fixed a crash in clif_SkillInfoBlock if the passed player already disconnected. - Added limiting drop rate to 100% from item-bonuses that depend on the mob's level so that "@autoloot 100" will catch them. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9270 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-19* Hack protection from packet monkeys in clif_parse_NpcSelectMenu. Lance1-2/+9
modified Changelog-Trunk.txt modified src/map/clif.c modified src/map/map.h modified src/map/script.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9261 54d463be-8e91-2dee-dedb-b68131a5f0ec