186 Commits

Author SHA1 Message Date
skotlex
42375e1896 - Rewrote the txt->sql converter. It now links directly to the char server files so that it should get auto-updated with any code changes in the later.
- The converter will now also convert: account-wide variables, parties, guilds, guild storage and guild castles. At this point the only two things not converted are login-server-wide account variables (##, they belong to the login converter) and homunculus (the SQL save function is messy and doesn't lends itself to be integrated with the converter the way all the other functions are).
- Modified the char servers so they are compatible with the converter, the define TXT_SQL_CONVERT identifies sections unique to each char-server mode (this would had been a hella lot easier if both char servers where the same code-base instead of duplicated code <.<)
- Updated the Makefiles as per the new compiling requirements for the converter.
- misceffect2 will no longer cause the effect on top of the source object when it is the fake npc.
- Added check so that Frost Nova doesn't hides hitting animation on targets.
- Added the missing brackets around the trade logs condition check, thanks to Coltaro.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8908 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-30 21:54:01 +00:00
skotlex
816e3fe096 - Probably fixed a signed/unsigned mismatch warning on the new socket code.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8848 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-22 19:22:21 +00:00
skotlex
c616fec871 - Improved a bit RFIFOFLUSH as suggested by Harbin.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8838 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-21 19:10:31 +00:00
toms
1390b25174 Fixed some gcc4 warnings (oops ^^)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8809 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-19 13:35:33 +00:00
toms
5a0f0ae14c Fixed some gcc4 warnings
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8808 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-19 13:29:30 +00:00
toms
19131abb68 Fixed some gcc4 warnings
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8807 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-19 13:25:39 +00:00
skotlex
df7e54c3df - Fixed Spider Web fire damage bonus.
- Made Global chat always reply back to you even on @/# commands, this prevents the client from muting yourself due to "hack". However, this same fix isn't easily applicable to @ commands invoked from whispers or party/guild messages, those are still pending.
- Some fixes in socket.c


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8801 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-19 02:58:40 +00:00
skotlex
da13939d47 - Merged Meruru's update to socket.c, which includes a rewritten parse function, which should hopefully be more efficient than the previous code.
- The new code includes support for two config settings (packet_athena.txt): frame_size, which can be used to alter the logic packet-size allowed by the code, and mode_neg, which when set to yes, sets TCP_NODELAY on all connections (defaults to yes).


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8799 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-18 22:28:07 +00:00
skotlex
4f24872a12 - Fixed compilation for native windows builds.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8734 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-13 16:23:24 +00:00
skotlex
a64ba50b61 - Readded the setting TCP_NODELAY on socket.c to see if it fixes the walk-lag issue.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8731 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-13 13:33:08 +00:00
skotlex
ebc1f2bc02 - Moved the packet_len variable in login.c to the login parse case, since it's used nowhere else.
- timestamp check speed-up in showmsg.c
- Swapped the blank ShowMessage on server startup to a printf
- Homunculus intimacy will go back to 500 on evolution.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8719 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-12 14:21:02 +00:00
skotlex
27c9a6fe5a - Modified set_nonblocking and setsocketoptions in socket.c, using eApp's code as reference. Hopefully should improve performance somewhat.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8710 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-11 21:32:26 +00:00
skotlex
609bfd1e48 - Updated skill_require_db's entry for Abracadabra, it requires yellow 2 gemstones (there's no such hardcoded yellow gemstone requirement anymore)
- Corrected db/const.txt entry bMagicSubRace -> bMagicAddSize
- Fixed Aex Aeterna ending on Soul Breaker's first half.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8651 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-06 14:22:16 +00:00
toms
a2ce0be45b The "delete_timer error/no such timer" report will now print the related function
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8586 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-01 23:26:08 +00:00
skotlex
a45d7c414d - The memory leak reports will now print out in the logs also the revision they belong to.
- Cleaned up the scriptable npc-shop code, it should be crash-proof now.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8525 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-28 19:22:13 +00:00
Lance
52453a6433 And a minor typo. Sorry.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8506 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-27 22:28:35 +00:00
Lance
8867e722ac Tweaked MEMSET_TURBO abit, temperory disabled GCC version.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8505 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-27 22:20:00 +00:00
toms
6dc1c19fdb - Updated svn-revision reading, now it can read the new svn file system
- Fixed a bug with homunc which could spawn on a non-walkable cell

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8500 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-27 18:47:53 +00:00
Lance
26500644dd * Optional macro MEMSET_TURBO for faster low-level memory initializations.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8499 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-27 06:38:17 +00:00
toms
4233fe5c11 - Cleanup/typo on homunc's code
- Modified @reloadmobdb & @reloadskilldb to reload homunc's db too

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8476 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-24 23:49:05 +00:00
toms
5dffc4b45e Fixed "int format, long unsigned int arg" warning
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8391 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-20 20:56:08 +00:00
skotlex
a18db9e79f - Updated the char save structure for char-TXT servers so that the homun id will be saved, now also the map info (last point, save point, memo maps) are now saved using the mapindex rather than the string. BACKUP BEFORE UPDATING since this code isn't yet tested.
- Cleaned up a bit the char-saving code, added overflow crash prevention in case there are more memos than the max-allowed saved.
- AM_CALLHOMUN can now be used to recall vaporized homuns.
- AM_RESURRECTHOMUN will now fail when the homun is vaporized.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8295 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-15 17:47:44 +00:00
toms
8e191af335 Code cleanup & optimization on guild part of char-server
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8059 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-02 16:37:02 +00:00
toms
f15fedf466 Fixed "warning: redefinition of [ushort/uint/ulong]"
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7938 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-28 09:36:47 +00:00
toms
ee5ee4fcd0 * Fix homunc & code cleanup [Toms]
- Timer problems on delete_timer
  - Intimacy problem (overflow & new values)
  - Homunc deleted if intimacy < 0
  - base exp is now given to master
  - Homunc sometimes not saved

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7913 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-27 11:56:22 +00:00
DracoRPG
d42fb96de3 Random Homunculus cleanup
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7857 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-24 16:58:29 +00:00
skotlex
97b00a11ad - Added a proper check to make aggressive mobs never override homun targets regardless of distance.
- Removed a bunch of homun-related variables that are not needed at all. The alive condition is removed, now the code checks for the hp value to know if the homun is alive or not.
- Cleaned up a bit the skill-id function, homun skill checks (such as delay and skill-lv learned) should be correct now.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7727 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-18 13:25:21 +00:00
DracoRPG
15dd140846 Orn's and Albator's Homunculus system, finally, YAY!!
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7706 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-17 00:15:33 +00:00
skotlex
b7fa70b741 - Modified the party_data structure on the map server to remove some redundant data. Added a party_data structure on the char-server to hold a more complete set of information about parties. Added to the party_member structure the class of each member so that the map server can do the appropiate checks even if the character is on another mapserver/offline. Due to the format changes in the party structure, txt servers will have to wipe their party file... (sql save format has not been changed)
- Added function char_family to check if there's a family state given the three character ids, instead of doing individual checks all the time.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7553 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-06 23:39:24 +00:00
skotlex
4d27716bf1 - Tested and fixed resolve_hostbyname.
- 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://svn.code.sf.net/p/rathena/svn/trunk@7285 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-22 01:12:52 +00:00
skotlex
84cdde2a88 - Whoops, somehow socket.h wasn't udpated correctly -.-
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7282 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-21 18:35:31 +00:00
skotlex
847d853332 - Added function parse_hostbyname() which takes a hostname and a char[4]. 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://svn.code.sf.net/p/rathena/svn/trunk@7281 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-21 18:30:39 +00:00
skotlex
89a6b23a92 - Added HM_SKILLBASE, MAX_HOMUNSKILL to specify the skill level range of Homunculus.
- Added support for reading correctly status change data from Guild and Homun skills.
- Added support for reading Homun skill data (which means the HM skills are now safe to add to skill_db, skill_require_db, etc)
- Moved StatusSkillChangeTable to StatusSkillChangeTableArray and made a function called StatusSkillChangeTable to do the conversions taking into account HM/GD skills.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7128 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-13 15:06:16 +00:00
skotlex
3b13b070e1 - Made guild member exp an unsigned int.
- Modified npc_click to receive the bl that was clicked directly. Also cleaned it up so it isn't as easy to crash the server with invalid ids <.<
- Moved npc_checknear to npc_checknear2 and added npc_checknear. The near version receives a bl, checks it's validity, and returns a TBL_NPC object, near2 does the same but doesn't checks for type NPC. The first returns a pointer, the second returns 1 on fail, 0 success.
- Also uncommented various npc_checknear calls in the code, who's idea was to comment them out so you could exploit npcs from afar with custom packets?
- Added overflow checks for bonus settings mdef_rate/def_rate.
- Added missing update of INT after a buf. 
- Small cleanup of how SC_BLEEDING works.
- Fixed party_foreach_samemap invoking the function on the CASTER instead of on the party members.
- Added clif_parse_ActionRequest_sub to handle player commands, is used from npc_click or any other function that needs to "re-route" a player's request.
- Modified clif_parse_NpcClicked to handle the different situations with different bl-objects (attack on players/mobs, click on npcs or mobs with npc attached)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7103 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-12 14:55:35 +00:00
skotlex
55df062534 - Added structure party_data and party_member_data to the map server to hold party-specific required information about parties including Monk/TK/SG/SN states and party member count.
- party Hp updates are no longer done each time the Hp is modified, but together with the party xy timer.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7083 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-10 03:58:15 +00:00
skotlex
51db3a7cdc - Modified guild exp to be an unsigned int rather than a signed one.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7059 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-09 03:51:18 +00:00
skotlex
0fac6d3cb1 - Modified map_freeblock_unlock so that aFree errors will report the file/line that INVOKED the function rather than the function itself. NOTE: Do NOT disable the memory manager as that will break this change. This change is to be temporarily set until it can be resolved.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7049 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-08 16:02:27 +00:00
skotlex
92255a237b - Moved the JOB_* defines from map.h to mmo.h, update char.c to use them.
- Added function char_read_fame_list for famelist reading. Invoked it on init, and made it be sent automatically to connecting map servers.
- Removed request to reload fame list when map server connects.
- Some cleaning of the fame-list reading code.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6895 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-31 20:08:40 +00:00
skotlex
d72c881051 - Removed typedef bool from socket.h and included cbasetypes.c instead.
- Cleaned up and corrected the calculation of hit/flee/cri/lucky dodge in status_calc_bl.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6890 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-31 14:06:22 +00:00
Lance
a28e9d802c [Optimized]
- Removed unused checks for unsigned data type and possible logic error for char type (gcc treats char as unsigned).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6814 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-29 09:53:45 +00:00
skotlex
0840bc1c5a - Increased capacity for Account Variables to 64
- Reverted Intravision implementation to that of stable's.
- Corrected Login Server taking it's first argument as both login config and lan config.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6751 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-25 13:54:31 +00:00
Lance
a7e5993400 * WARNING: New scripting system contains memory leak
TODO: Free all scripts using script_free_code() instead of old methods. 

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6690 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-22 12:15:49 +00:00
skotlex
4ef4e4dc84 - Stun time for using ES magic on non-mobs reduced to 0.5 secs.
- Eska is now usable on bosses.
- Swoo will stun you if attempted on an already 'swooned' enemy.
- clif_skill_failed will print out a debug line with the skill_id (since the current null_po does not helps at all to fix it)
- Applied TheUltraMage's suggested fixes to the grfio module.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6467 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-04 15:18:30 +00:00
Lance
020b35d68a * Using malloc for memory allocations that doesn't need to be pre-initialized.
* Eliminated initializations for pointers returned by calloc.
* Moved grfio_final to do_init since it's not used after server boot.
* Optimized scripts to return CONSTSTR instead of allocating memory just to return a constant string. Some buildin functions still need work. 
* Disabled graph since it doesn't work yet.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6355 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-29 04:00:19 +00:00
skotlex
0f3de92a52 - Added function stristr to strlib.c, used by mob.c and item_db.c for case-insensitive seeks.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6345 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-28 14:36:55 +00:00
skotlex
35cda692bd - Simplified npc_gettimerevent_tick so that it should return a tick value even after the last ontimer label has been reached.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6264 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-25 03:20:32 +00:00
skotlex
41a6c38e23 - Added SC_KEEPING/SC_BARRIER to calc_flag in status_change_end
- Added Option constants for Carts, fixed OPTION_FLYING (it conflicts with OPTION_XMAS?)
- Updated clif.c to check for OPTION_WEDDING|OPTION_XMAS instead of view class to block attacks and skill usage.
- Removed struct pc_base_job and functions pc_calc_base_job/pc_calc_base_job2 which are no longer used anywhere (were long ago deprecated infavor of the new jobid system)
- Cleaned up change-cart code.
- Modified SC_XMAS to not change your view anymore and only set the proper option value (OPTION_XMAS)
- Cleaned up the code regarding char_gm reading.
- Changed the option field to unsigned short to make room for the higher values.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6229 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-22 05:21:24 +00:00
skotlex
a0b8ab2e66 - Changed the memory manager fatal errors when allocating memory to print out the size request as well as the file and line where they originated.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6165 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-18 18:37:56 +00:00
skotlex
571402c435 - Removed water_height.txt reading (since it is always done from the rsw now)
- Fixed a possible crash in grfio_find_file
- Corrected water-level-reading to account for a return of null from the previously mentioned function


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6117 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-16 16:19:32 +00:00
Lance
458f135cd7 * Temperory fixed compiler warnings/errors. Please compile before commiting. [Lance]
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6098 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-16 02:40:46 +00:00