summaryrefslogtreecommitdiff
path: root/src/map/unit.c
AgeCommit message (Collapse)AuthorFilesLines
2020-02-09Added skill_is_item_skill() function.Kenpachi Developer1-6/+2
2020-02-09Added pc_itemskill_clear() function.Kenpachi Developer1-16/+4
2020-02-09Added a new option flag to itemskill() script command to be able to ↵Kenpachi Developer1-0/+2
forcefully cast skill on on invoking character.
2020-02-09Added a new option flag to itemskill() script command, to be able to cast a ↵Kenpachi Developer1-0/+13
skill without cast time.
2020-02-09Fixed skill conditions check and <flag> parameter in itemskill() script command.Kenpachi Developer1-19/+28
* itemskill() script command should check for the skill's conditions and also consumes them. SP are not consumed. * The same applies to Hocus-pocus skill. Conditions should be checked and consumed, SP are not consumed. * This was bugged for more than 6 years now. See linked bug report and commits. Related bug: * https://herc.ws/oldboard/tracker/issue-7210-itemskill-command-does-not-check-for-required-items/ Related commits: * https://github.com/HerculesWS/Hercules/commit/b864056b8d088660fca9129bddad477732ed8df9 * https://github.com/HerculesWS/Hercules/commit/07272f7a16db87970583286db03167ca79604a69
2020-01-13Update copyright headers for year 2020Haru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2020-01-09Adding PCBLOCK_NPC to setpcblock script commandRidley1-2/+4
2019-11-17Merge pull request #2577 from Asheraf/dehardcodestatusiconsHaru1-2/+2
Dehardcode Status Icons
2019-11-17Merge pull request #2564 from skyleo/target_to_fixesHaru1-1/+3
Fix ud->target_to not being cleared appropriately
2019-11-06Dehardcode Status IconsAsheraf1-2/+2
2019-10-20Fix ud->target_to not being cleared appropriatelyskyleo1-1/+3
2019-10-10Fix Chaotic Blessings never healing the enemyskyleo1-0/+6
It has a chance to roll for enemy and heal the enemy, While calculating the chance was correct, it was getting the enemy with battle->check_target. But unit->stop_attack has been called before in unit->skilluse_id2, making battle->check_target return NULL at that point, since it has no attack target anymore. So it defaulted to heal the Homunculus itself, instead of the enemy.
2019-10-10Fix Homunculus skill requirements being put on owner as wellskyleo1-7/+0
This fixes not being able to use Homunculus skills when having 90% overweight. This also fixes not being able to use Homunculus skills when the owner has low HP or SP, even though the Homunculus has enough HP or SP to use the skill.
2019-05-06Merge pull request #2453 from Emistry/scriptcommand_unitwarpHaru1-1/+1
Update unitwarp script command.
2019-05-05Add missing checks for prevend flagAndrei Karas1-0/+1
2019-05-01Update unitwarp script command.Emistry Haoyan1-1/+1
- allow NPC to warp to non-walkable cell. Just like `*movenpc`
2018-12-12Remove typedef from clr_type.Andrei Karas1-4/+4
2018-11-16Merge pull request #2322 from MishimaHaruna/fix-allychat-leaveguildHaru1-0/+1
Fix allychat leaveguild
2018-11-13Replace sd->channels with a VECTORHaru1-0/+1
This removes some shady array compaction code and prepares the ground for some further fixes. Signed-off-by: Haru <haru@dotalux.com>
2018-08-04Fixed defense overflow exploitDastgir1-1/+1
* The defense penalty for being attacked by many enemies at the same time can no longer make DEF go negative * Fixed two potential overflow exploits When being hit by a lot of monsters, your DEF will become negative and then eventually overflow, making you almost invincible. On official servers the simultaneous attacker count is limited to 22. So at max, your def is reduced by ((22-2)*5%) = 100%. So it should neither be able to make your DEF negative nor cause an overflow. Merge from https://github.com/rathena/rathena/commit/590f42cd15c58de78cff8be6053109852375bce1#diff-d96b6365b4bdad78139e676d6e7e3295R4589
2018-07-24Implemented Title System.Dastgir1-0/+1
2018-07-24Implementation of the official Achievement System.smokexyz1-0/+1
Source: http://ro.gnjoy.com/news/update/View.asp?seq=163&curpage=1 Script Commands - ``` achievement_progress(<ach_id>,<obj_idx>,<progress>,<incremental?>{,<char_id>}); ``` Includes an achievement_db.conf generator that reads from the item_db, mob_db (server side) and achievement_list.lub files to determine valid achievement entries based on item/monster availability. Achievements containing unsupported entries are commented out. This feature, although renewal-only in official servers, is capable of being used in pre-renewal mode on Hercules. Does not include the title system yet. A big thanks to - @MishimaHaruna for constantly reviewing. @4144 for all the support. @Asheraf for a lot of official information. Co-authored-by: "Dastgir" <dastgirp@gmail.com>
2018-07-12Split btype and item_id parameters in function clif_skill_fail.Andrei Karas1-10/+10
2018-07-01Change functions to static where possible (Part 4 - map)Haru1-53/+53
This fixes issues with plugins defining symbols with the same names Signed-off-by: Haru <haru@dotalux.com>
2018-06-02Merge pull request #842 from AnnieRuru/request_6Haru1-1/+1
Add new *pcblock script command
2018-05-312012-2018 !Maytichai Saowa1-1/+1
2018-05-04Add setpcblock & checkpcblock script commandsAnnieRuru1-1/+1
thanks to @MishimaHaruna for the updated syntax
2018-04-03Merge pull request #1965 from dastgir/2018/3-hateffectHaru1-0/+1
Implemented HatEffect
2018-03-01Fix use after free with option "delay_battle_damage: false".Andrei Karas1-5/+11
2018-02-10Clean up trailing whitespace and non-indent tabsHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2018-02-09Implemented hatEffect.Dastgir1-0/+1
Allows the player to have hatEffect specialeffects. Base taken from rAthena
2018-01-25Implementation of Official Clan SystemMurilo Pereti Tavares1-0/+2
All official features work including the autokick for inactive members And the system is completely customizable.
2017-08-20Ignore hidden units in the cell stack limit checksHaru1-1/+1
- This improves the Dancer Quest experience as well as other cases of hidden NPCs blocking off certain cells - Fixes #1135 Signed-off-by: Haru <haru@dotalux.com>
2017-05-22Add storage_data reception, parsing and sending to/from the map-server.Smokexyz1-0/+2
Remove loading and saving of storage_data through char.c Re-declaration of structure storage_data as a vector. Re-code of portions in the map-server using storage_data. A new approach is taken by saving the loaded storage data from sql into memory for the duration of the session, thereby removing the need of querying the database to re-load all items everytime a storage save routine is issued from the map-server. Saving of storage items is done through a new function that significantly reduces the number of queries compared to char_memitemdata_tosql(), and therefore run-time speed. This method potentially reduces the number of update and delete queries from MAX_STORAGE (which could be >= 600) times to literally 1. Storage items are stored in a dynamically allocated array and handled accordingly. struct mmo_charstatus size reduces by 34,800 bytes. Update pc_checkitem() with masks for item checks. `sd->state.itemcheck` has been changed to `sd->itemcheck` of type `enum pc_checkitem_types` `battle/items.conf` has been updated to reflect configuration changes. Further updates to assert a successful reception of storage data in related functions.
2017-04-20Made prevent_logout effect on log-in optionalJedzkie1-0/+10
kRO does not prevent players from logging out after connecting to its zone servers. Credits to @secretdataz of rAthena
2017-03-10Merge pull request #1509 from 4144/fixwarnsmokexyz1-4/+5
Fix assert in unit_resume_running.
2017-02-19Merge pull request #1457 from Ridley8819/unitIbrahem Hossam1-1/+1
Fixes Range Exploit
2017-01-14Fix assert in unit_resume_running.Andrei Karas1-4/+5
Fix issue from http://herc.ws/board/topic/13719-map-error-need-help-here/
2016-10-28Fixed copyright year for 2016Lemongrass31101-1/+1
2016-10-22Implemented SU_SV_ROOTTWIST Skill.Dastgir Pojee1-0/+1
Duration: (5+(2*SkillLv)) seconds. Cannot be used on Boss Monsters. Effect is cancelled when Heaven's Drive or Trample is used. Enemies trapped on roots receive poison property damage.
2016-10-22Implemented SU_LOPE Skill.Dastgir Pojee1-1/+1
Skill Cannot be Used on GvG/Battlegrounds. Cast time of Emergency Call doubles. Moves to Another Position by performing High Jump: Lv 1: Move 6 cells Lv 2: Move 10 cells Lv 3: Move 14 cells
2016-10-22Implemented SU_HIDE Skill.Dastgir Pojee1-0/+2
Transforms into Bush.
2016-10-03Fixes Range ExploitRidley1-1/+1
issue#841 Original Commit by Playtester on rAthena, https://github.com/rathena/rathena/commit/6f74f67da060a063183e1147dfc893c9454af853 * Players will no longer get +2 range server-sided when using a target spell * This will prevent players from modifying the client to get extra range
2016-09-21Fixed a wrong check in the SA_FREECAST handling codeHaru1-2/+2
- Don't skip the check for Free Cast's absence unless the cast skill's INF2_FREE_CAST_* flags aren't unset. - Follow-up to 19a06cae9a03ae7c390db18ca95b74bd6033dc4e - Fixes #1439 Signed-off-by: Haru <haru@dotalux.com>
2016-09-19Add missing checks into unit.cAndrei Karas1-31/+69
2016-09-13Corrected a wrong check that allowed walking while casting guild skillsHaru1-3/+11
- The check was originally meant to have guild skills ignore SA_FREECAST (and always block movements) - Since 8953417 - Fixes #1428 Signed-off-by: Haru <haru@dotalux.com>
2016-07-19Add skill atributes for allow moving while casting skill.Andrei Karas1-6/+8
New SkillInfo attributes: FreeCastReduced - allow move while casting with slowdown FreeCastNormal - allow move while casting with normal speed
2016-07-14Simplify clif_skillcasting and rename to clif_useskill.Andrei Karas1-2/+2
2016-04-27Fix unit_data unitialisation.Andrei Karas1-4/+13
Introduce method unit->init_ud.
2016-04-23Changed map_session_data::chatID to int (and renamed to chat_id)Haru1-1/+1
- Chat IDs are signed integers. - Resolves various warnings, depending on the compiler settings. Signed-off-by: Haru <haru@dotalux.com>