3141 Commits

Author SHA1 Message Date
ultramage
892f36f0b7 * Added a safeguard to skill_get_unit_layout() against incorrectly defined layout ids (will give weird results but won't crash at least)
* Fixed Firewall/Icewall being oriented backwards (no real difference though...)
* Removed some junk Landprotector/Graffiti code; Graffiti doesn't get placed randomly anymore
* Icewall can now be cast on yourself... but for some reason, the cell on yourself immediately expires!
* Merged together functions clif_set0192() and clif_changemapcell()
- also removed its "send to whole map" mode which is just plain wrong (although aegis actually does use it to 'inform' caster about changes)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11175 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-10 20:50:55 +00:00
ultramage
562e687322 Added config option 'quest_exp_rate' to adjust exp gained by the 'getexp' script command (followup to r11165).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11171 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-10 18:11:10 +00:00
skotlex
7233562a1a - Removed bonus bAddEffWhenHitShort as it is unneeded and unused.
- Corrected getpetinfo so it actually returns "null" when there's no pet and you request the name (the docs state it so).
- Also cleaned up a bit getpetinfo
- Added gethominfo (which behaves in the same way as getpetinfo).
- The 'maxcount' skill_db field now can store independant values per skill-level, required for Kamaitachi since it uses different range values per level.
- Corrected bonus3 bAutoSpell(WhenHit) to select target enemy (rather than self) for skills with inf self and inf2 'don't target self' (aka: auto-select target skills).
- Corrected map_foreachinpath to do a wall check for targets beyond the initially selected tile.
- Corrected Kamaitachi's range to be 9, and the path range to be 4+SkillLv


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11169 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-10 17:07:35 +00:00
skotlex
ad2df1c5ce - Modified bonus3 bAddEff/bAddEffWhenHit so that the last parameter is now passed directly as "trigger" flag. The possible trigger values are ATF_LONG, ATF_SHORT, ATF_TARGET, ATF_SELF. Explanation added to doc/item_bonus.txt
- Updated some cards to use the new format of bonus3 bAddEff*


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11157 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-09 18:05:16 +00:00
ultramage
8519665bdb Adjusted a spot that still caused a guild leader's guild skills to get blocked on login
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11146 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-08 16:54:12 +00:00
skotlex
574c76e799 - Added support for the new party invite/reply packets from the latest client version.
- Cleared up some TODO's
- Added auto-rejecting party/guild invites when the target is disconnected from the server.
- Added a correction in the walking code to abort it when map_moveblock cancels the player's walking (by warping/knocking back),the default code would fail because unit_stopwalking would do nothing since the walk timer was already -1 in that moment.
- Corrected mob_randomwalk to use unsigned int for the tick variable.
- Changed the default @Main format to prevent crashes in the newer clients.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11134 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-07 07:31:58 +00:00
skotlex
a100bf890c - bonus3 autospell (and autospell when hit) will now select for spell target self when the skill is tagged a support skill.
- Increased the amount of autospells that can be held at a time from 10 to 15
- Updated several item scripts to use bonus3 autospells rather than bonus4 ones.
- Changed the "autocasted strip skills don't have a duration" to apply only to Full Strip.
- Cleaned up some the Signum Crucis code.
- Added initialization of hp_loss/sp_loss/hp_regen/sp_regen which somehow was not commited before.
- Magic Mirror's duration now is reduced /15 when used on players.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11124 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-04 17:55:26 +00:00
skotlex
dc1bbff3e7 - Removed usage of MAX_PC_BONUS all over the code, it is now only used in map.h (this is done so that individual bonuses can have their array length modified without having to change all the other bonuses as well).
- Removed bonus bAddDamageByClass since it is not needed, and implemented bAddDefClass which can be used for the same (but previously was doing nothing).
- Cleaned up the weapon_data structure to use a sub-structure to hold the add_dmg information.
- Cleaned up some of the add dmg/def bonuses so the 'count' variable is not needed anymore.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11121 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-04 05:21:17 +00:00
skotlex
1f1dbd4927 - Made regen work always, like Hp/Sp Loss, it no longer displays healing numbers as well.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11118 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-03 23:02:55 +00:00
ultramage
2084299342 fixed && -> || typo in r11113 ...
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11115 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-03 22:05:03 +00:00
ultramage
21f57419f0 Fixed a copy-paste typo in r11112.
Applied the useful ARR_FIND() macro to 4 item bonuses.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11113 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-03 21:05:19 +00:00
skotlex
88e0559d2c - Added bonuses bSPRegenRate, bHPRegenRate. They behave like the opposite of bHPLossRate/bSPLossRate, making you gain x Hp/Sp every y ms.
- Added bonus bIgnoreMdefRate, used to ignore a % of the target's mdef when using magic attacks (bonus2 will ignore part of the mdef of all targets, bonus3 receives a race argument)
- You can now use bonus2 bCastRate to adjust the cast rate of a single skill.
- Cleaned the code for bleeding (hp-loss) and extended it to handle regen as well.
- Some small cleanups in the pc_bonus functions
- Removed bonus3 bHpLossRate since it was doing nothing and is not used.
- Corrected bGetZeny bonus to be like in Aegis. The amount received is from 1 to the given amount, you can use negative zeny values to use an amount dependant on mob's level (amount*lv).
- Updated doc/item_bonus.txt with all these changes
- Anti-Magic/Stone-Skin now increase/decrease def/mdef only and in an absolute mode (+20*lv rather than +20%*lv). Also the duration is greatly decreased (x/15) when used on players.
- Now when a player uses a strip skill without having it in the skill tree (auto-casted) the duration will be 0, the equipment will be stripped without causing the status change that blocks reequipping.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11112 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-03 20:00:33 +00:00
skotlex
5748269898 - Merged @whereis from my server (displays normal spawn maps for given mobs). This command should be working correctly considering I've been using it since July. I was meant to merge it as soon as I got my hard-drive back, but I kinda forgot @_@
- bonus3 autospell (and autospell when hit) will change the target to self when the skill to be casted is inf&4 (self skill).
- Corrected script homevolution not making the homunculus /swt if it is invoked when not loyal.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11110 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-03 03:35:42 +00:00
ultramage
1dbdda4a4b Fixed one HORRIBLE typo in the last chat.c update (ARRAYSIZE -> ARRAYLENGTH)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11103 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-01 09:01:54 +00:00
ultramage
e7e0ddde9d Fixed certain typos in src/npc/doc files
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11102 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-01 08:14:36 +00:00
ultramage
1481fc1524 * Documented/cleaned up chatroom code and packetry
* Added some comments to clif_changechatowner()
- totally broken, see the code + topic:163829
* Implemented the chatroom display packet properly
- now has 4 types: public, private, npc and non-clickable npc chatroom
* Implemented the chatroom leave packet properly
- now utilizes the 'kicked' flag when the user was forced to leave
- TODO: banlist support to prevent re-entry, see jAthena code

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11100 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-31 17:08:27 +00:00
skotlex
f6c97de344 - Oops, forgot a very important check in homevolution D:
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11092 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-30 05:01:39 +00:00
skotlex
d25b5ad103 - Cleaned up a bit the homunculus evolution code, and fixed homevolution allowing the homunc to 're-evolve' even though it was already evolved.
- Optimized a bit the skillheal code in regards to Apple of Idun and Sanctuary


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11090 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-30 04:39:59 +00:00
skotlex
48ab0fe34b - Added a piece of missing code from the addition of sd->skillheal
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11089 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-30 03:03:00 +00:00
skotlex
d92276ac7a - oops, fixed bSkillHeal raising bSkillAtk instead
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11086 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-29 19:32:22 +00:00
skotlex
dafa566df8 - Added bonus bSkillHeal to distinguish offensive skill damage increases from healing power boosts.
- Moved battle_skillatk_bonus to pc.c, cleaned up the related skillatk bonus code to consider the skillheal bonus option.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11085 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-29 18:30:25 +00:00
ultramage
3417441a6f Fixed a rare crash concerning invalid homunculus data and one NULL-pointer.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11075 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-24 19:38:38 +00:00
skotlex
4612bb8a10 - Fixed the hotkey list sending to the client not displaying right away.
- Corrected the unit_id of NPC_EVILLAND (taken from jA)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11071 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-24 01:15:56 +00:00
skotlex
f9f1076a9e - Fixed Dragon Fear's status change selection and duration.
- Fixed Metamorphosis not displaying a speed-change update on the client.
- Status changes that were blocked by element are no longer blocked, instead, now no-damage skills are blocked if they have an element which is absorbed by the target (This is the behaviour that Tharis believes is correct).


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11067 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-22 22:49:54 +00:00
ultramage
8e7e11775e Corrected item drop rate limits to allow full 0.01%-100% range (fixes mistake from r11043)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11059 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-21 14:25:09 +00:00
skotlex
81faa4770b - Oops, forgot to add the Pulse Strike damage modifier.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11055 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-20 19:02:01 +00:00
skotlex
cc3c71cbae - Fixed Earthquake not clearing out the target-count before counting targets.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11052 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-20 18:07:23 +00:00
ultramage
60836b7613 More compilation warning fixes...
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11051 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-20 08:52:56 +00:00
ultramage
137877aebf Fixed a gcc compilation error and some warnings.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11046 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-19 19:47:43 +00:00
ultramage
e476015e82 Set proper limits to drop rates to prevent integer overflow.
Minor details cleanup.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11043 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-19 16:28:24 +00:00
ultramage
0072a0189e * Cleaned/clarified some #include relationships between headers
* Changed clif_sitting() to use 'bl' instead of 'sd' (for non-player objects)
* Removed way messed-up script function 'unitdeadsit'
* Tagged 'FIXME' lines written by myself

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11040 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-19 12:55:29 +00:00
ultramage
312714cfa9 Again removed the IG_ list from itemdb.h (see r10100 and r10113) due to popular request.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11037 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-19 06:27:29 +00:00
ultramage
97e812dda1 * Fixed a deallocation mistake and some buffer overflows in npc_chat.c after doing rtfm@pcre.txt (all caused by incorrect usage of pcre api)
* Removed underscores in npc_chat.c's variable names (easier to read)
* Reindented the whole thing (used spaces half of the time ._.)
* Moved npc pcre-data deallocation from npc_remove_map to npc_unload

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11036 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-19 06:04:34 +00:00
skotlex
1518e0240b - Cleaned up some the pet armor display code.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11034 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-19 00:55:46 +00:00
skotlex
29a07a72e7 - Corrected a bit npc_remove_map, map_deliddb and strdb_remove calls belong to npc_unload rather than npc_remove_map. Also improved a bit the removal of the npc from the map's npc list.
- Added back the hair-style/hair-bottom fields to the spawn packet, and the pet-idle packet is no longer sent when the pet does not has an armor equipped (this should cut down on bandwidth a bit for non-equipped pets)
- Moved the position of the map_addblock/clif_spawn code section in parse_LoadEndAck to above the party-hp blocks, this corrects party-member HP display mnot being updated when someone spawns in your range of sight.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11033 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-18 03:22:11 +00:00
ultramage
d9cc3b4951 Changed the duel_time_interval setting's lower bound to 0 (to allow disabling the delay)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11031 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-17 19:32:41 +00:00
ultramage
99ad0f978a * Implemented the official dual-wield aspd equation
- using 0.7 instead of 0.66 as modifier (so aspd will be lower now)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11030 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-17 19:29:03 +00:00
Playtester
ed98c68a49 Fixed eAthena's wrong interpretation of the respawn times
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11027 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-16 18:59:00 +00:00
ultramage
e8f6f4ad38 Added pc_isidle() to simplify a few idle-no-share checks.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11026 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-16 18:52:59 +00:00
Playtester
518ec82222 Added icons for NPC_CRITICALWOUND and NPC_SLOWCAST
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11025 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-16 18:04:49 +00:00
skotlex
e7dc538c16 - fixed Ruwach (the last NPC skill update modified the way Sight/Sightblaster/Ruwach work, but the latter did not get updated properly)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11024 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-16 17:31:15 +00:00
ultramage
8076b535d4 * Fixed npc chatrooms not being deleted on npc unload/reload (crash)
* Modified chat code a bit for more clarity
- replaced double-indirection on 'owner' with a normal pointer
- separated some common functionality to 'chat_createchat()'

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11023 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-16 14:14:11 +00:00
skotlex
0c1a8f2b37 - Cleaned some more the hotkey code: The order by and limit specifications are not really needed when loading hotkeys, and added hotkey deletion when you delete the character.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11022 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-16 03:55:16 +00:00
skotlex
025a1b5120 - 'make clean' now removes the svnversion.h file in src/common/ since otherwise it is pretty much never updated.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11020 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-15 23:08:22 +00:00
skotlex
dff80559d4 - Merged and completed Latio's work on server-side hot-key saving (http://www.eathena.ws/board/index.php?s=&showtopic=159388&view=findpost&p=884453)
- Now hotkeys are stored server-side (table hotkey in SQL servers, file save/hotkeys.txt for TXT servers). You can disable this behaviour by commenting out the 'HOTKEY_SAVING' define in mmo.h
- Fixed a few compilation warnings/errors.
- Apply upgrade_svn11018.sql to create the hotkey table.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11019 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-15 22:08:30 +00:00
Playtester
efff167bc0 * Added Critical Wounds to Anubis's skills
- also added some icon info

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11018 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-15 20:33:28 +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
c8bd07a0bb small mapindex.c typo fix
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11014 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-15 09:24:45 +00:00
skotlex
2d6cef47d6 - Modified map_foreachinrange so that you can also specify the max length of the path to use. The max_count field in the skill_db is used to specify this range for path-type skills (Sharpshooting, Kamaitachi and the NPC Breath skills.
- Implemented the 'new' NPC skills described here: http://ro.doddlercon.com/wiki/index.php?title=Monster_Skills . It is mostly complete, but the new status changes (slow cast, critical wounds, etc) don't have any visual effects yet (icon or opt changes? I don't know if they should have). Also I could not find the unit_id for Evil Land, so it looks just like Sanctuary for now. Apart from those, the only skills which I couldn't get to display properly are the Breath skills (with the exception of Fire Breath).
- skill_calc_heal now takes the target as argument to properly support Critical Wounds
- battle_calc_return_damage now takes a flag to know if the attack was direct or not, needed since Magic Mirror also reflects indirect attacks.
- cleaned up the 'description' field in skill.c, added skill_get_desc to it
- Removed 'splash' support from Lex Divina as it is no longer needed.
- Modified the way Sight/Sightblaster work so that the skill id is no longer guessed (needed to properly acquire the splash range for Wide Sight)
- Corrected gtb_sc_immunity setting not taking effect if your block value was the same (that is, if the config said 30%, then you would only get status change immunity at 31%, nor 30%)
- Uncommented the 'new' npc skills from mob_skill_db as they are implemented now.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11000 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-14 00:05:13 +00:00
ultramage
44f421f12e * Corrected skill-based hp/sp regen (SM_RECOVERY, MG_SRECOVERY, MO_SPIRITSRECOVERY, NJ_NINPOU, TK_HPTIME, TK_SPTIME)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10991 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-13 08:14:12 +00:00