summaryrefslogtreecommitdiff
path: root/src/map/npc.c
AgeCommit message (Collapse)AuthorFilesLines
2020-06-01Merge pull request #2713 from 4144/updatepacketsHaru1-1/+3
Update packets up to 2020-05-20
2020-06-01Make Unit->Id can be grouped by levelsKenpachi Developer1-1/+1
2020-06-01fix motd on load/unload npc.Andrei Karas1-1/+3
2020-05-03add a config flag to allow to local functions to be event handlersgumi1-1/+3
2020-05-03allow local NPC functions to be public or privategumi1-4/+7
2020-03-11Free StringBuf is case of error in npc_expanded_barter_fromsql() functionKenpachi Developer1-0/+1
2020-03-08Refactor code using directions to use enum unit_dirskyleo1-1/+1
This removes a lot of duplicated code, especially related to people not using the arrays dirx and diry. Assertions for whenever these arrays are used have been added as well, to ensure valid index range. Some trailing white space has been removed as well.
2020-02-09Merge pull request #2627 from Kenpachi2k13/issue#2073Haru1-26/+41
Change NPC ID validation in npc_scriptcont()
2020-02-09Applied code style and added some minor code improvements to src/map/npc.c.Kenpachi Developer1-73/+124
2020-02-09Applied code style and some minor improvements.Kenpachi Developer1-48/+57
* Added new message 1517 (Script could not be unloaded.) * Applied code style to several functions I touched. * Added some minor improments to the function where I applied code style.
2020-02-09Change unload NPC behavior to kill mobs that were spawned by unloaded NPC ↵Kenpachi Developer1-12/+39
(non-permanent monster spawns) [Issue #2530] Mobs spawned by NPC will be removed on @reloadnpc, @unloadnpc, and @unloadnpcfile. Additionally OnNPCUnload NPC label was added, to revert other changes made by NPC. For example set/removed mapflags or added mob drops.
2020-02-09Dont save barter and expanded barter entries into db if amount is -1Andrei Karas1-1/+4
2020-02-09Add npc functions for expanded barter shopsAndrei Karas1-5/+347
2020-02-09Apply code style to npc_scriptcont() functionKenpachi Developer1-23/+32
2020-02-08Change NPC ID validation in npc_scriptcont()Kenpachi Developer1-7/+13
npc_scriptcont() will now validate the NPC ID - if SECURE_NPCTIMEOUT is _not_ defined or - if SECURE_NPCTIMEOUT is defined and the charcters idle timer is still running.
2020-01-13Update copyright headers for year 2020Haru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2019-08-26Prevent MVP tombstones from showing their message multiple times when clickedHaru1-1/+6
Signed-off-by: Haru <haru@dotalux.com>
2019-08-26Prevent players from getting stuck when an MVP respawns while talking to its ↵Haru1-2/+4
tombstone Signed-off-by: Haru <haru@dotalux.com>
2019-08-21Add new version for packet ZC_NPC_MARKET_PURCHASE_RESULTAndrei Karas1-10/+10
Also add enum for result field in packet ZC_NPC_MARKET_PURCHASE_RESULT
2019-06-30Merge pull request #2410 from AnnieRuru/74-adjust_skill_damage_ShowWarningHaru1-4/+5
Suppress ShowWarning for certain mapflags when @reloadscript
2019-06-02Merge pull request #2221 from carloshenrq/nostorageHaru1-0/+4
Mapflag nostorage and nogstorage
2019-05-06Move questinfo data from map to npc_dataAsheraf1-2/+18
this will fix the issue where having multiple `questinfo()` blocks wont work properly
2019-04-07Rename clif_charnameack into clif_blname_ackAndrei Karas1-1/+1
2019-03-23Suppress ShowWarning for certain mapflags when @reloadscriptAnnieRuru1-4/+5
2019-02-11Change type for class variables from short to intAndrei Karas1-3/+3
2019-01-14Add support for saving/loading barter shops from sql table.Andrei Karas1-23/+135
Also allow add duplicated item id to barter shops if price is different.
2019-01-14Add packet CZ_NPC_BARTER_PURCHASEAndrei Karas1-0/+124
2019-01-14Add barter type shop and add packet ZC_NPC_BARTER_OPENAndrei Karas1-5/+10
2018-12-14Add inventory size field into db and using it in server.Andrei Karas1-1/+1
2018-12-12Add missing result values for packet ZC_PC_PURCHASE_RESULTAndrei Karas1-0/+4
2018-12-04Added mapflags 'nostorage' and 'nogstorage'Carlos Henrique1-0/+4
nostorage 1 -- blocks only @storage nostorage 2 -- blocks only openstorage(); nostorage 3 -- blocks @storage and openstorage() nogstorage 1 -- blocks only @gstorage nogstorage 2 -- blocks only guildopenstorage(); nogstorage 3 -- blocks @gstorage and guildopenstorage()
2018-11-13use a dedicated zone remove function when reloading zonesgumi1-1/+1
2018-08-26Merge pull request #2164 from mekolat/addvariableHaru1-2/+2
always set the type to C_NAME when adding variables through script->add_str
2018-08-26Merge pull request #2162 from mekolat/setzoneHaru1-0/+1
add atcommand_setzone, and fix #2133
2018-08-25Fix some const violations detected with the const-safe strchr() implementationHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2018-08-01reload the zone db on npc reloadgumi1-0/+1
2018-07-30always set the type when doing script->add_strgumi1-2/+2
2018-07-28correct sell item achievement being validated after item is deletedAsheraf1-2/+3
2018-07-24Implementation of the official Achievement System.smokexyz1-0/+4
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-01Change functions to static where possible (Part 4 - map)Haru1-118/+156
This fixes issues with plugins defining symbols with the same names Signed-off-by: Haru <haru@dotalux.com>
2018-05-312012-2018 !Maytichai Saowa1-1/+1
2018-05-07Merge pull request #2027 from MishimaHaruna/sa_summonmonsterHaru1-4/+4
Fix the name of monsters summoned through SA_SUMMONMONSTER
2018-05-04Implementation of Private AirShipAsheraf1-0/+4
2018-05-01Replace "--ja--" and "--en--" with constants (source only)Haru1-4/+4
- Use `DEFAULT_MOB_NAME` instead of a literal "--en--" - Use `DEFAULT_MOB_JNAME` instead of a literal "--ja--" Signed-off-by: Haru <haru@dotalux.com>
2018-01-25Implementation of Official Clan SystemMurilo Pereti Tavares1-0/+49
All official features work including the autokick for inactive members And the system is completely customizable.
2017-11-28Fix invisible NPCs (such as FAKE_NPC) showing up as NoviceHaru1-1/+1
Use the correct view data (INVISIBLE_CLASS) when initializing new NPCs. The issue was introduced in #1893 Fixes #1916 Signed-off-by: Haru <haru@dotalux.com>
2017-11-18Pass the correct types and sizes to the StmtBind functionsHaru1-3/+3
Fixes #1531 (and other similar issues) Signed-off-by: Haru <haru@dotalux.com>
2017-11-04Refresh npc after changing fields in setunitdata.Andrei Karas1-0/+13
2017-11-04Allow each npc use own view_data structure.Andrei Karas1-1/+3
Allow npc to use player classes (for older than 20170726 npc visible as players). View_data structure can be copied from predefined view_data lists created new if npc using player type.
2017-10-30Add monster spawn boss flag for miniboss: miniboss_monsterAndrei Karas1-2/+7
also fix boss_monster flag for works as mvp and not like mini boss. unhide boss flag if hp bar disabled.