summaryrefslogtreecommitdiff
path: root/src/map/chrif.c
AgeCommit message (Collapse)AuthorFilesLines
2007-05-09* Added Buuyo-Tama's shortlist for send/eof sockets (defined out for now). FlavioJS1-9/+9
* Replaced toupper/tolower in ladmin by TOUPPER/TOLOWER defines. Shortlist: It's a list of sockets that have data to send and/or are ready for eof processing. It aims to reduce the amount of time spent on do_sendrecv, where it was spending ~13.5% of execution time on a server with 1k users at WoE. thanks to Buuyo-tama for the profile info and code git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10506 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-22- Removed the include of features.h from the console.c plugin. It is ↵skotlex1-3/+3
apparently not needed (and it was preventing compilation on FreeBSD) - Fixed bug which totally broke item group bonuses. - Added warnings when setting a pvp/gvg flag removes the other flags on the same map (gvg and pvp can't coexist on the same map) - Optimized the unequip loop when changing sex. - Removed the check that prevented you from casting soul-collect when you already have 5 spirits. - Corrected Magic Rod so it doesn't displays any skill-use animation until it triggers. - Debuff on logout&2 is again set to default, instead of removing food bonuses now it removes Maximize Power, Maximum Overthrust and Steel Body. - Corrected Steel Body's icon (it actually belongs to AutoBerserk) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10317 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-06I'm still here!DracoRPG1-1/+1
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-05typos: recieve -> receiveultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10163 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-05* Made a crazy attempt to at least partially synchronize login&char codeultramage1-93/+54
* 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-6/+6
- 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-23- Made waiting_disconnect on the char server be an int to hold the timer ID ↵skotlex1-0/+11
of the timeout timer. It is now deleted when a player is successfully set offline/online. - Corrected @unjail having the GM level check backwards. - chrif_authok will now reject to store the newly received status data when the player it was received from is still online, should prevent losing data in certain situations. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10060 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-19- Rewrote the jail logic to always use a status change. This means that the ↵skotlex1-2/+3
character's save point is not changed when jailed, and the char is always warped back to the point where it was before being jailed on unjail. - Made pc_setpos fail if you are jailed, effectively blocking you from being moved out of the jail map for the duration of jail. - Modified @adjcmdlvl so you can't set a command to require higher level than yourself, and so you can't edit the level of a command which is higher than your own. - Corrected attack_attr_none setting disabling elemental resist cards. - Added missing cap check of 100% to drop rate configs for heal/use/adddrop (cards)/treasures. - Corrected Autoblitz yelling the skill name if the attack splashed. - Corrected Dispell removing Jailed status. - Corrected being able to revive with 0 hp. - Modified the "Restart" code so that it makes you stand on spot when pc_setpos fails to move you back to your originating location. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10028 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-18- Removed the old 'mapserver charsave' mechanismultramage1-24/+2
- 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-09- Added info on packet 0x86 (simple move packet). Not usable until a clear ↵FlavioJS1-1/+3
separation between entering sight/leaving sight/walking in sight is done. - Propagating const char* from the script engine. - ".gat" is appended to the map name before sending the changemapserver packet to the client. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9979 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-04- Removed delete_session from socket.h since it shouldn't be used by them.skotlex1-1/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9955 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-28- Made it possible to modify the server packet version from the Makefile.skotlex1-2/+30
- Merged packet 2b22 (from my server) to handle quick fame updates whenever someone's fame in the ranking changes, but no position swaps take place (prevents having to resend the whole fame list in such events, you lazy Draco <.<) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9936 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-27- Removed an auth procedure check that is no longer needed (fixes ↵skotlex1-4/+0
double-login checks not working right) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9927 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-26- indent cleanupsskotlex1-3/+1
- Fixed Self Destruction causing double-free'd errors and triggering twice when a self-destruct cast makes other objects trigger self destruct as well git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9924 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-28Some misc cleanups (typos, formatting, forgotten changelog entry etc)ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9733 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-24- Cleaned up some more the Joint Beat implementation, so the status don't ↵skotlex1-1/+1
take effect until the attack connects. - Some minor cleanups. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9704 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-07Undid the memset->malloc_set replacementultramage1-4/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9626 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-23- Moved "#include <limits.h>" to cbasetypes.h to ensure it's included before ↵FlavioJS1-1/+1
checking if UINT_MAX has been defined. - Minor changes in pc_readdb related to max_level being unsigned. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9561 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-05- Massive EOL normalization & 'svn:eol-style native' flag setting for all ↵FlavioJS1-1636/+1636
txt/conf/h/c files. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9410 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-04- Changed some pc_authfails to clif_authfail_fd since pc_authfail prints ↵skotlex1-2/+2
errors when invoked after a char is auth'ed. - Added a static +100 Hp to ninjas and gunslingers since it's required for the best approximated hp growth algorythm. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9404 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-03- Removed sd->sex since it's redundant (we can always use sd->status.sex)skotlex1-7/+2
- If somehow a player logs out and it's saved with 0 hp, on login his state will be set to dead as well so he can respawn (otherwise that leads to a stuck char) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9398 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-01- Fixed txt-converter compilation. skotlex1-5/+5
- 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- Some cleaning on the homunc speed calculating code, so that it correctly ↵skotlex1-5/+5
uses the default walk speed if the player has no speed yet. - Some speed up code when loading status changes (use a pointer instead of memcpy'ing all the time) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9359 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-23- Made WFIFOHEAD() check for available buffer size remaining on the ↵skotlex1-4/+6
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-09- Fixed status-change loading not working.skotlex1-2/+0
- Fixed permanent mob-spawn script-events not working. - AL_CURE won't confuse undead players. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9187 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-31- Moved the intimacy penalty of HFLI_SBR44 and HVAN_EXPLOSION to ↵skotlex1-1/+4
skill_counter_additional_effect - Simplified skillnotok_hom by using an invocation to skillnotok - Hopefully fixed BD_ADAPTATION - Homun won't lose any intimacy on death now. - Homun will be saved together with the master now (as long as the homun is active) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8564 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-27* Optional macro MEMSET_TURBO for faster low-level memory initializations.Lance1-4/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8499 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-15- Updated vc-project files to compile with the new int_homun files.skotlex1-3/+1
- Hopefully fixed the crash when using charsave_method = 1 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8302 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-18- Updated mob_db.sql to current mob_db.txt data.skotlex1-1/+1
- Some cleaning on chrif.c - The char-server will allow off-line character saves when said char is tagged for final-save (this is the scenario when the char-map reconnect). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7722 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-17Orn's and Albator's Homunculus system, finally, YAY!!DracoRPG1-0/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7706 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-12- Fixed Cart Termination's damage.skotlex1-12/+15
- Added the missing check to remove character from memory when logging out and using the charsave_method which saves character map-server-side. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7631 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-11- Fixed clif_parse not checking for func_parse before sending data to the ↵skotlex1-11/+2
connected clients. This in turn required various code-rewrites in: - duel related messaging functions (added clif targets DUEL/DUEL_WOS). - intif whisper to gm function - day/night timers - Rewrote the parse_console function to stop allocating/deallocating memory on every call. - Modified chrif_charselectreq to receive the player's ip among the data. - Added function clif_disp_message, which is the same as clif_disp_onlyself, except you can specify the targets (it sends a guild-chat packet) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7617 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-10- Login-sql server will no longer change an account's state to "7" when ↵skotlex1-2/+2
banning a player. This should fix being able to use @ban to clear out a @blocked player. Players will now be identified as banned only through the banned-until timestamp. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7604 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-10- Added login-char packet 0x2737. Sets all characters offline (login-server ↵skotlex1-23/+3
side). - Cleaned up char server "set all offline" implementation to remove only characters from the map-server from which the packet was invoked. It will also now correctly kick/set-character offline from the map-server if they are connected. - Cleaned up the char-sql reconnect code. It no longer sets everyone to offline. - Removed setting "kick_on_disconnect", servers will no longer kick characters out when there's a disconnection. Instead, it'll use the most logical approach: Set characters into a "lost" state when there's a disconnection, on reconnect, resent the list of online-characters, do a sync, and let the difference be characters to be removed. Also, the map-server won't release character data until it's saved and the ack returns from the char-server to prevent data loss (all this data is resent on reconnect for saving anyway). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7600 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-07- Some cleaning of the Sage endow skills.skotlex1-0/+4
- Added a check to free a character from memory when changing map servers. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7571 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-07- Okay, added a chrif_save_ack packet to the char-server so now the map ↵skotlex1-4/+21
server will know once a character was "final saved", and only then the character will be removed from memory. On char-server reconnection, all chars that are in final-save state are resent to save (if they are still in memory, it's because the ack hasn't gotten here from the char-server). This should effectively block all dupe problems due to heavy inter-server lag, however as it's untested, it currently prints some debug messages when people are saved and then removed from memory. Need testers so this can be debugged and merged to stable! git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7568 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-29- Made the map server send list of characters online to the char-server on ↵skotlex1-2/+1
reconnection regardless of "kick_on_disconnect" setting, as otherwise, a temporary disconnection would make the char-server tag all characters offline and refuse to save them afterwards. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7399 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-29- Fixed guild storage being "eternally in use" if you quit/logout before ↵skotlex1-1/+1
closing it. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7395 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-29- Some indentation corrections.skotlex1-2/+2
- Ending SC_CLOAK/SC_HIDE/SC_CHASEWALK will now trigger ontouch npcs. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7394 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-28- Map server will now resent the whole list of online characters to ↵skotlex1-0/+4
char-server on reconnect when the kick_on_disconnect setting is active. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7365 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-27- Cleaned up the IP sync code to...skotlex1-15/+17
- Use charif_sendallwos rather than manually altering the buffers of each server. - Use the id variable for identifying current char-server instead of scanning the connected servers for it (it's doing the same work twice) - Added config setting sync_ip_interval to specify how long to go before updating ip. Defaults to 0 (disabled) - Sending ip update packets will only be done when the ip changed now. - Removed dns_str variables, and now char_ip_str/login_ip_str/map_ip_str will hold the unresolved dns address (as these variables have no use otherwise) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7360 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-27- Fixed indentation on int_pet.c (how did it got messed up?)skotlex1-4/+2
- Added mapflag "loadevent", now load-map script events will ONLY trigger on maps with this mapflag on, rather than every map. - High Jump can now be used in all versus maps. - Added Kaite's opt3 value, taken from jA - Added state dirty == 2 to storages. Signals when a storage was sent for final saving. Said storage is removed from memory after the ack from the char-server, and they are sent to save if the map/char servers reconnect before the act arrives. In short: they are guaranteed to be saved after a char logs out. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7358 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-22* [Fixed]: Lance1-1/+1
- Compilation warnings and errors. [Improved]: - Changed and moved IP sync status messages to elaborate more. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7290 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-22- Tested and fixed resolve_hostbyname.skotlex1-13/+11
- Applied said function around most of the code where needed. Removed includes for the OS/network system pretty much from every file (our socket.c file should handle this) - Added clif_getip_long, which returns the ip as a long. Prevents having to include the files to define the int_addr structure in all files that include clif.h - Made the GM mute request bypass the manner_system setting. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7285 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-21- Added function parse_hostbyname() which takes a hostname and a char[4]. ↵skotlex1-6/+6
The hostname is resolved to an ip, whose individual components are stored in char[], the return value of the function is the inet_addr result of the lookup (or returns 0 when failed). Meant to be used in the rest of the code without the need to do socket/network related includes. - Applied use of parse_hostbyname() in chrif.c to fix compilation errors. - status_percent_change will now account for when the target's max hp/sp is above INT_MAX. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7281 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-21- and the documentationLance1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7276 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-21* [Added]: Lance1-1/+16
- DNS (WAN) sync for those pesky disconnections (dynamic ip renewal). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7275 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-19- Removed the mysterious array of two of char_dat (char/sql server), ↵skotlex1-1/+1
replaced it with a static structure. - Added function char_loadName to extract the character name of a given ID. - Fixed fame-list updating crashing char-sql server when the given char-id just got into ranking. - Sorry I didn't check if it compiles cleanly because I don't have sql here <.< (am gonna test it in a second, though) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7248 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-15- Altered a bit how status_set_viewdata behaves in regards to Wedding/Xmas ↵skotlex1-3/+5
options. - Added back OPTION_XMAS, but the actual value is missing! - Corrected chrif_save so that the player is not set offline on map-change. - Added change-look support in pc_setoption when specifying OPTION_XMAS - Fixed clif_parse_RemoveOption removing all options instead of just Falcon/Cart/Peco git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7183 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-05- Fixed skill_unitsetting using layout->count for the for instead of ↵skotlex1-8/+6
group->count - Added SC_INCDEXRATE/SC_INCAGIRATE. NPC_POWERUP/NPC_AGIUP now correctly increase dex/agi by 40% per level. - Fixed char-sql server not deleting character variables git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6984 54d463be-8e91-2dee-dedb-b68131a5f0ec