2606 Commits

Author SHA1 Message Date
FlavioJS
b524f75cd0 - Reversed revision #9415 (messages with server_tick field being sent as 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://svn.code.sf.net/p/rathena/svn/trunk@9443 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-09 15:57:22 +00:00
skotlex
7a607a433a - Now you can request a trade regardless of the state of the target trader.
- 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://svn.code.sf.net/p/rathena/svn/trunk@9438 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-08 15:05:48 +00:00
skotlex
2d7b67257e - Fixed crash when looters became full.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9437 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-08 14:43:47 +00:00
skotlex
e906a6f074 - Moved attackedcount to md->state and made it an unsigned char.
- Autospell delay time is now the skill's full delay. 
- Removed variable attackedplayers, since Aegis is state driven, the best approximation to Aegis would be to use the last player that hit the mob.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9436 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-08 13:43:48 +00:00
FlavioJS
7ecc1ab6e1 - Fixed ladmin's linux compilation and moved some platform specific defines to cbasetypes.h
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9435 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-07 23:59:26 +00:00
skotlex
e81a812069 - Cleaned up implementation of NPC_EMOTION/NPC_EMOTION_ON. Now val0 is the emotion, val1 sets the mode, val2 adds to the mode, val3 removes from the mode. val4 asks to remove the previous mode change.
- Updated the mob skill reading code so it accepts hexadecimals in the 'val' fields. Also, it will optimize the NPC values so that when you set a mob's mode to their db mode, it will just remove the previous mode.
- NPC_EMOTION_ON will now automatically move it's new mode to val2 since it should add a mode, and if this mode doesn't has the aggressive bit, it will remove it. See this "ancient" hypothesis on how NPC_EMOTION_ON should work for the details:
	http://www.eathena.ws/board/index.php?showtopic=63606
- Updated mob_skill_db to account for the updated mob modes on NPC_EMOTION skills.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9433 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-07 16:42:25 +00:00
toms
912fc7a427 Fixed npc commands atcommand & charcommand not working with a custom command_symbol
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9431 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-07 12:55:00 +00:00
skotlex
3f3172a720 - Changed the order of view-change packets for SC xmas/wedding, should fix crashing if you change into xmas suit while in fighting stance.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9427 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-06 21:30:45 +00:00
skotlex
8b8aa14493 - Renamed the mob mode Cast-Sensor Melee to Cast-Sensor idle since these mobs really should only be cast-sensing when they are not after another target.
- Added a Aegis Mob Type -> eA Mode table conversion to the mob modes doc.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9426 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-06 21:11:12 +00:00
skotlex
3adbc9b589 - Gave a minimum think time to the dummy mob and to clones.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9423 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-06 18:29:44 +00:00
skotlex
5036e3591a - Cleaned up the implementation of map_foreachinmovearea so that the number of arguments passed is less.
- Moved setting a mob's chase/attack states from the mob_ai to unit_attack and unit_walktobl.
- Cleaned the change-target/cast-sensor code to account for the new mob modes.
- Cleaned up a bit the mob ai sub hard function.
- Made the monster_active_enable config setting take effect on mob load.
- Updated the doc explaining mob modes.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9422 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-06 18:21:32 +00:00
skotlex
c5dc6d7e04 - Fixed the compile error when trying to build the ladmin exe.
- 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://svn.code.sf.net/p/rathena/svn/trunk@9420 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-06 15:52:01 +00:00
FlavioJS
27cc2312fb - Fixing a compilation error caused by me in rev 9414: -.-;
utils.h:35: error: syntax error before "va_list"

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9416 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-06 11:17:08 +00:00
FlavioJS
0931ce5d81 - Messages with server_tick field are sent as soon as possible now.
This might fix client synchronization issues.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9415 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-06 10:57:31 +00:00
FlavioJS
53a7ca362b - Added StringBuf_Vprintf to utils.c and changed the showmsg.c buffer.
Now it uses a static buffer and a StringBuf when needed (a debug message indicating the static buffer needs to be increased is shown).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9414 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-06 04:25:13 +00:00
skotlex
2e89ae68c4 - The can log value now is "reset" when you die allowing you to respawn/quit instantly after death.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9413 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-05 21:29:45 +00:00
skotlex
efce12bf28 - Fixed sc data load failing when using charsave_method: 1
- Fixed the interserver link reserve size being 8 times instead of 1/8th the default size. Changed it to be 1/4th as well.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9411 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-05 17:09:02 +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
FlavioJS
7d701ea977 - Found the position of emblem_id in packet 1b6, commented out the old fix while it's in trial period.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9409 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-05 11:43:20 +00:00
FlavioJS
6fda364348 - Moved START_ACCOUNT_NUM and END_ACCOUNT_NUM from login.h to mmo.h and 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://svn.code.sf.net/p/rathena/svn/trunk@9408 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-05 07:24:29 +00:00
skotlex
ec8570d59f - Oops, fixed sql compile error.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9407 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-04 19:11:53 +00:00
skotlex
a7cd3bf966 - Fixed HVAN_INSTRUCT int bonuses.
- Renamed mob_db's "adelay" column to ThinkTime and made the mob.c code use it instead of MIN_MOBTHINKTIME. The adelay of mobs will also be equal to their thinktime unless their thinktime is less than their attack motion.
- Cleaned the mob_db reading code a bit.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9406 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-04 19:07:18 +00:00
skotlex
384fe7b6fc - Changed some pc_authfails to clif_authfail_fd since pc_authfail prints 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://svn.code.sf.net/p/rathena/svn/trunk@9404 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-04 17:41:02 +00:00
skotlex
722b1689e3 - Changed clif_blown to use fixpos again as per aegis packets.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9402 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-04 16:08:42 +00:00
skotlex
1424d93e12 - Repairing items via scripts no longer displays "item has been repaired"
- 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://svn.code.sf.net/p/rathena/svn/trunk@9401 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-04 15:37:09 +00:00
skotlex
0043aed5fd - Fixed the txt->sql converter not escaping character names before saving them.
- 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://svn.code.sf.net/p/rathena/svn/trunk@9400 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-04 13:59:42 +00:00
skotlex
231f495291 - Removed sd->sex since it's redundant (we can always use sd->status.sex)
- 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://svn.code.sf.net/p/rathena/svn/trunk@9398 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-03 19:46:43 +00:00
FlavioJS
7831807dc5 - Fixed even share exp flutuating as described in:
http://www.eathena.ws/board/index.php?showtopic=126139
  thanks to TheUltraMague for the fix.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9397 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-03 19:23:27 +00:00
FlavioJS
5d65da8e0c - Made ers double frees report as missing entries on destruction.
- Only one swap function (in cbasetypes.h) is used.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9396 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-03 16:50:58 +00:00
Lance
e82fd31056 * Added buildin_checkvending and buildin_checkchatting.
modified   Changelog-Trunk.txt
modified   src/map/script.c


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9395 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-03 09:37:36 +00:00
Lance
ffbcbb0b54 git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9394 54d463be-8e91-2dee-dedb-b68131a5f0ec 2006-12-02 23:47:21 +00:00
Lance
90352e92a2 * Enabled atcommand parsing for clients with Korean langtype and version.
modified   Changelog-Trunk.txt
modified   src/map/atcommand.c
modified   src/map/charcommand.c


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9393 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-02 18:22:37 +00:00
FlavioJS
09f54754c7 - Added missing min/max definitions to cbasetypes.h, needed for the @send change.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9388 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-02 04:41:23 +00:00
FlavioJS
b522ca0cdc - Replaced @send with the version I use for testing packets.
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://svn.code.sf.net/p/rathena/svn/trunk@9387 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-02 04:21:35 +00:00
skotlex
8e68089e85 - Fixed passive mobs becoming increasingly unlikely to retaliate to attacks after they got inflicted by a disabling status change.
- Changed the "is_boss" define to check for mode MD_BOSS instead of giving mvp exp.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9384 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-02 01:49:27 +00:00
skotlex
2de8486627 - Fixed txt-converter compilation.
- 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://svn.code.sf.net/p/rathena/svn/trunk@9374 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-01 17:17:09 +00:00
Lance
b59e7b8596 Minor tweak in
modified   src/map/script.c


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9373 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-01 04:06:18 +00:00
skotlex
7f67461a49 - Added a missing map_quit in clif_parse which was the real reason for the 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://svn.code.sf.net/p/rathena/svn/trunk@9368 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-29 20:54:55 +00:00
skotlex
b421d38216 - Added overflow protection to @main whisper parsing.
- Fixed a bug in slaves_inherit_speed
- Miscellanous silly cleanups (format, unnecessary assignments, comments, etc)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9367 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-29 20:11:12 +00:00
FlavioJS
636089bb3a - Probably fixed the Segmentation Faults we've been having.
Description: A player quits and it's session is freed and set to NULL, 
       but the char server already sent a packet with player information 
       (registers, storage, ...). If a message is sent in consequence of 
       updating that info, a segmentation fault happens because 
       session[sd->fd] is already NULL.
  Fix: make shure the session of the target player is valid before 
       processing the rest of the char server's message.
- Some minor cleanups.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9366 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-29 20:07:22 +00:00
skotlex
72ee155c06 - Fixed the new npc parsing code not accounting for windows-style line terminators, which as a side effect messed up mapflag parsing if the file had windows-style terminators, which coincidentally was the case for the nopvp file, which unfortunately meant that all towns became pvp!
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9363 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-29 18:41:31 +00:00
skotlex
02330c9d81 - Fixed (likely) deleting homs from the menu causing a double free'd error.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9362 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-29 16:32:50 +00:00
skotlex
19b4efdc6c - HT_PHANTASMIC no longer knocks back even when it misses.
- Earned exp by dead homuns will now be lost (same treatment as earned exp from players that died)
- Some minor cleaning in mob_dead


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9361 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-29 16:09:54 +00:00
skotlex
c22f5854dc - Now gvg_dungeon mapflag will activate the other mapflags which are 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://svn.code.sf.net/p/rathena/svn/trunk@9360 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-29 15:22:47 +00:00
skotlex
e4e42fbcb7 - Some cleaning on the homunc speed calculating code, so that it correctly 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://svn.code.sf.net/p/rathena/svn/trunk@9359 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-29 14:18:20 +00:00
skotlex
0f2e649828 - Fixed a typo which made the wedding_ignore_palette setting not work when you log on with them equipped
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9353 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-28 21:14:42 +00:00
skotlex
e23391b60d - Increased line buffer size when parsing scripts. Helps when trying to define pretty big shops.
- Applied The Ultra Mage's patch to use strict npc header formatting parsing. Updated the relevant stock scripts/mapflags that didn't conform to the standard.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9352 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-28 20:11:54 +00:00
skotlex
e3615a4cb5 - Reverted the previous SG freeze counter method. Now the counter is reset on status_change_clear.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9351 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-28 19:48:24 +00:00
skotlex
228979981d - Moved the blocking of casting supportive skills on homunculus from battle_check_target to status_check_skilluse as bct is not invoked unless the skill is offensive (or party/guild only)
- Cleaned up status_calc_bl_sub_hom, fixed recasting dex/str/vit/int bonuses skills making their atk/def/mdef stack with itself over and over.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9350 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-28 19:07:38 +00:00
skotlex
9692efa6f0 - Fixed a possible crash due to the recent core.c upgrade.
- 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://svn.code.sf.net/p/rathena/svn/trunk@9347 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-28 16:26:08 +00:00