63 Commits

Author SHA1 Message Date
lighta
4684090de9 InterPacket_rearrange
-Move charban and charunban packet out of 0x2b0e and mark that fonction
reserved for login request purpose.
(Charban and charunban now use 0x2b28 and 0x2b2a)
-Move chrif_savebankdata, chrif_datarequest, chrif_req_vipactive into
0x2b0e (as their some login operation request)
-Harmonize vip_time data type and fix some case where he would have get
INT_MAX value.
-Small revert on a3f0aedf @vip for vip_time alteration as the duration
should be able to get reduced.
-Fix vip_status(3) args of aFree 0x18E2777C is overflowed pointer
and incorect data returned, (altough dunno if we want this as returned
presentation string)
-fix bugreport:8289 where VIP_request anwser was broadcasted to all
mapserv
-Upd split_time month and year factor for a better approximation of
date. (splitting timestamp into years, month, days ...)
-Add loginif_isconnected to check if the loginserv is connected to char.
2013-11-28 00:21:41 -05:00
lighta
3428ae297a Adding charblock
Update HC 0x20d to send the blocklist value, based on Herc:aee2f631
Revamp ZH 0x2b0e and HA 0x2725 to send difftime instead
year,month,day,minutes,secondes values..
Remove duplicate code for char_ban
Add missing sql_upgrade for vip
2013-11-18 20:38:10 -05:00
aleos89
9e50599234 Follow-up to 56ac0ee. Corrected compile errors. 2013-11-07 14:26:14 -05:00
aleos89
56ac0eeae6 Created split_time() and solve_time() to be reused as a default format for parsing. Credits: lighta 2013-11-07 13:01:37 -05:00
lighta
02885990e5 -Merge Herc
--c0c254f (Binary heap fix & improvement), adding swapper function in specification
--e9e8914 (Fixed typo in `SC__STRIPACCESSARY`, using equip_index instead equip_pos creating mistmatch)
2013-07-25 20:01:52 -04:00
brianluau
a2bdc47daf - Undid r16968: SVN Replaced with source:/trunk/src/@16966 (tid:74924).
[16969:16991/trunk/src/] will be re-committed in the next 24 hours.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16992 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-12-05 02:53:33 +00:00
greenboxal2
a7c32653f7 Applied AStyle code formating as discussed on tid:74602.
Removed /SAFESEH option from MSVC11 projects.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16968 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-11-25 21:20:43 +00:00
blacksirius
bde86942c0 cleaned up windows header usage (added one central file to use windows / winapi specific stuff, to be able to set the appropriate flags before including it correctly)
Note: this may screw up mingw or cygwin building,  ill fix it later... 



git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16219 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-06-03 17:55:38 +00:00
brianluau
3aede46965 - Removed trailing tabs, and fixed some spacing.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15524 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-30 16:02:55 +00:00
ultramage
edcb998d59 Replaced custom type 'intptr' with standard 'intptr_t'.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14873 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-06-30 09:14:21 +00:00
ai4rei
1649f98824 * Moved detection of monotonic clock support to the configure script, which also checks, whether or not it actually works (bugreport:1003, related r11912 and r11983).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14767 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-04-05 11:11:36 +00:00
Yommy
f9c60fd3fa added --enable-rdtsc configure option to enhance timer performance, especially in virtualized environments; default disabled - credits to sirius_black
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14265 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-03-16 21:42:14 +00:00
FlavioJS
69720a42bf * Replaced the fake timer heap (sorted array) with a real heap. (improves performance)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13465 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-21 01:21:24 +00:00
FlavioJS
72542d65cc * Hunted down the simpler 64bit pointer truncations.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13380 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-11-22 15:44:17 +00:00
ultramage
19d4559ab6 Partially reverted the timer code changes from r12926 - r12969.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12999 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-26 20:13:41 +00:00
FlavioJS
cb565d9d45 ops ('|'->'&' in delete_timer debug code)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12969 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-20 02:36:23 +00:00
FlavioJS
99a1aaa9e1 * Simplified the search in pop_timer_heap and added more debug info to help determine the source condition of timer errors. (bugreport:1860)
* Fixed crash in skill_castend_id. (bugreport:1860)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12968 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-20 01:16:59 +00:00
FlavioJS
3f7b407d6d * Added a check to make sure only released timers are acquired from the free list.
* Changed TIMER_MAX_INTERVAL to 1 second (was set to 1 minute by mistake).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12963 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-16 10:34:16 +00:00
FlavioJS
47ee54852d * Fixed pop_timer_heap using max heap comparisons instead of min heap comparisons and protected timer functions against improper use. (should fix bugreport:1833 bugreport:1841)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12956 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-15 01:41:49 +00:00
FlavioJS
cdda61ce1b * Added const to the return value of get_timer.
* Added a maximum timer interval. Avoids server shutdowns being delayed for ~10 seconds under some circumstances on windows.
* Replaced the fake timer heap (ordered array) with a binary min heap.

(actually, this is just a merge and has been in use for months)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12926 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-09 01:25:19 +00:00
ultramage
290ca7eec3 Fixed a bug in the timer code which made it impossible to delete a timer with id '0' (since pre-svn, still present in jAthena).
Fixed wrong order of parameters in a ShowWarning call when freeing a locked DBMap, which caused a segfault when executed (since initial implementation in r4859).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12854 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-06-18 10:59:40 +00:00
ultramage
fc5918e335 Removed the calc_times() no-op (bugreport:1289)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12668 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-27 19:46:17 +00:00
FlavioJS
c880052f0f * Changed the data field of timers from int to intptr.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12633 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-21 21:34:31 +00:00
zephyrus
a6e03e1102 - Clean up of calc_times function.
- Moved to timer.c/h because it's used in both map and char servers.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12382 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-17 15:03:03 +00:00
FlavioJS
4dcf5bb0b9 * Tweeked the declaration and initialization defines for vectors.
* Made do_sockets leave the for loop as soon as the readable number of sockets returned by select is found.
* Made all posix compliant systems that support it and FreeBSD >= 5.1 (implements it but doesn't have the posix defines) use the precise and consistent tick() implementation.
* Minor tweek to HEAP_SEARCH (same variable can be used in from and to).
* Fixed the map server not exiting when make_listen_bind fails and returns -1.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11983 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-27 03:35:57 +00:00
ultramage
a772e3699d Added a precise and consistent tick() function for freebsd (see bugreport:240)
(TODO: apply it to multiple platforms using an appropriate configure script)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11912 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-14 10:52:51 +00:00
skotlex
e823c2e3eb - removed the timer heap correction code when the timers overflow since 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://svn.code.sf.net/p/rathena/svn/trunk@11867 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-07 08:44:52 +00:00
ultramage
59b9654397 Tried to make sense out of timer.c ... and failed
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11647 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-03 12:35:34 +00:00
ultramage
28a6350610 Fixed unix compilation problem due to a missing include (caused by r11499)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11506 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-18 10:11:54 +00:00
ultramage
6b2c679c3f * small timer.c cleaning
- removed "with less than 4 values, it's speedier to use a simple loop" as this case will never occur (premature optimization from r1284)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11499 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-17 12:07:25 +00:00
FlavioJS
62ea9e001e * Fixed the double free's caused by r11290 (wrong option in the database constructors).
Readded tick cache variables (deleted by mistake).


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11292 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-25 10:24:53 +00:00
FlavioJS
52f3681f3d * Disabled tick cache (to enable it: define TICK_CACHE to the number of 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://svn.code.sf.net/p/rathena/svn/trunk@11290 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-25 01:58:31 +00:00
ultramage
56d9a037a6 * Some serious code cleanups
- 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://svn.code.sf.net/p/rathena/svn/trunk@11017 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-15 17:13:04 +00:00
ultramage
711d01a128 Reformatting @_@
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10581 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-19 15:50:41 +00:00
FlavioJS
bc088a5ad8 * Removed the dependency on winsock.h for definitions, it's all winsock2.h now.
* Minor documentation/re-coding in chat.c.
* More work on ticket #41.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10471 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-05 14:50:07 +00:00
skotlex
d65e051707 - Added a wrapper to delete_timer so it prints out from where the invocation was done.
- Fixed some unsigned warnings.
- Fixed Splash attacks consuming 2 ammo on each attack.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9718 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-26 18:49:46 +00:00
ultramage
fbe23f27a2 Undid the memset->malloc_set replacement
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9626 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-07 16:49:03 +00:00
FlavioJS
52245f90b9 - Moved "#include <limits.h>" to cbasetypes.h to ensure it's included before checking if UINT_MAX has been defined.
- Minor changes in pc_readdb related to max_level being unsigned.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9561 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-23 03:24:32 +00:00
FlavioJS
e75a8eca56 - Change strncpy to memcpy when parsing switches in the script engine since it's guaranteed to be a word of that size (skip_word).
- Made scriptlabel_db duplicate the key. When str_buf is reallocated, the keys in scriptlabel_db could become invalid, causing a crash in npc_convertlabel_db.
( removed the readded >=0x81 equivalent )
- Now npc_convertlabel_db clears scriptlabel_db after using it.
- parse_script has an extra parameter options. At the moment it only indicates if scriptlabel_db should be used or not.
- Fixed "UINT_MAX undeclared" on systems that don't declare it in limits.h

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9557 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-22 05:27:03 +00:00
skotlex
b4ef291d27 - Added missing include of system header limits.h to timer.c
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9523 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-19 17:56:10 +00:00
skotlex
d882e5030b - Reverted the mob ThinkTime update, that field is again aDelay as it apparently should be.
- Fixed one small compilation error.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9522 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-19 13:41:25 +00:00
FlavioJS
43256aa77e - Cleanups or minor changes.
- 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://svn.code.sf.net/p/rathena/svn/trunk@9521 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-19 09:15:00 +00:00
FlavioJS
637ae9a4dc - Massive EOL normalization & 'svn:eol-style native' flag setting for all txt/conf/h/c files.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9410 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-05 13:23:07 +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
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
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
skotlex
c0652d7916 - Added back the char-sql server sending the GM list when the map server connects.
- Fixed a bug in the add_timer_interval error reporting.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5351 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-20 22:16:19 +00:00
skotlex
1fb95bcf98 - Fixed Taekwon stances not triggering.
- Added atcommand @exp
- Added error reporting when add_timer_interval receives a negative/0 interval value.
- Fixed a possible infinite recursion bug with splash self skills.
- Modified the way firewall_hits_on_undead works, to loop and invoke multiple skill_attacks based on the value.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5338 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-20 03:14:49 +00:00
Valaris
2178a86317 AS OF SVN REV. 5901, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.  EVERYTHING ELSE
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5094 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-01-29 16:10:48 +00:00
Valaris
fd99753f8e Clearing trunk.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5091 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-01-29 16:00:45 +00:00