summaryrefslogtreecommitdiff
path: root/src/map/npc.c
AgeCommit message (Collapse)AuthorFilesLines
2019-04-07Rename clif_charnameack into clif_blname_ackAndrei Karas1-1/+1
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-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.
2017-10-22Add NoAutoloot mapflagEmistry Haoyan1-0/+2
- Enable server to disable autoloot settings for certain maps.
2017-08-10Fix possible overflow in npc_parsename.Andrei Karas1-1/+1
2017-07-27Fix possible buffer overflows with snprintf.Andrei Karas1-2/+2
2017-06-13Fixes crash when npcshopattach was called on sell shop.Dastgir1-0/+11
Fixes #1772
2017-04-04Implementation of Item Options System.Smokexyz1-0/+15
Allows the infusing of equipments with bonus item options. This feature is constrained to clients of packet versions greater than or equal to `20150226`. Item Options and their effects are defined server-side in `db/item_options.conf` and client side in `data/luafiles514/lua files/datainfo/addrandomoptionnametable.lub` The ID of the option must tally with the correct index of the description provided in the client side lua file to avoid bugs. IT_OPT_* keys and MAX_ITEM_OPTIONS macro are also exported from the source as constants. An additional flag `disable_options` has been added to sql, and as `DisableOptions: true/false (boolean, defaults to false !!for equipments only!!)` to item_db.conf files. Script commands documentation is also included. SQL file updates are included. Credits: [Smokexyz](https://github.com/Smokexyz) Style and Script Fixes by [Asheraf](https://github.com/Asheraf) Initial design Idea by [secretdataz](https://github.com/secretdataz)
2016-12-03Remove the platform-dependent variables from struct status_dataHaru1-3/+3
`struct status_data::class_` was platform dependent since c30bb75ec50624429bff7b4106db4be0fda366d6 in order to silence some compile warnings (uint32 on 64 bit builds and uint16 on 32 bit builds). It's now been changed to the correct type, int32, on all platforms. Since the change has potential to silently break third party code, the variable was renamed to `class`. Signed-off-by: Haru <haru@dotalux.com>
2016-10-28Fixed copyright year for 2016Lemongrass31101-1/+1
2016-09-18Removed special handling of "clear" in npc->addsrcfile()Haru1-10/+8
- Use npc->clearsrcfile() instead. Signed-off-by: Haru <haru@dotalux.com>
2016-09-18Removed special handling of "all" by npc->delsrcfile()Haru1-12/+9
- Use npc->clearsrcfile() instead. Signed-off-by: Haru <haru@dotalux.com>
2016-09-11Allow sell items to market shop.Andrei Karas1-1/+1
2016-09-10Adds official behavior when selling to NPCs. Fixes issue #1214KirieZ1-1/+7
2016-06-25Moved translations template generator to a pluginHaru1-6/+0
Signed-off-by: Haru <haru@dotalux.com>
2016-06-25Replaced script_code::script_buf with a VECTORHaru1-1/+1
- Fixes various signed/unsigned comparisons. Signed-off-by: Haru <haru@dotalux.com>
2016-06-18Move npc static variables into npc interface.Andrei Karas1-47/+47
2016-04-27Fix unit_data unitialisation.Andrei Karas1-8/+2
Introduce method unit->init_ud.
2016-04-04Add missing checks into npc.Andrei Karas1-13/+143
2016-03-20Dropped typedef from DBMapHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped typedef from DBIteratorHaru1-6/+6
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped typedefs from union DBKey and struct DBDataHaru1-8/+8
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Removed unnecessary typedefs from sql.hHaru1-2/+4
- Sql -> struct Sql - SqlStmt -> struct SqlStmt - SqlDataType -> enum SqlDataType This is expected to improve compile time, by removing #include cycles (and forward declaring instead) Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Added const qualifier to the value argument of script->setd_subHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Edited npc->selllist() to use the new struct itemlistHaru1-27/+31
- The npc-side code no longer depends on the client data layout. Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Edited npc->buylist() to use the new struct itemlistHaru1-34/+38
- The npc-side code no longer depends on the client data layout. Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Edited npc->market_buylist() to use the new struct itemlistHaru1-30/+28
- The npc-side code no longer depends on the client data layout. Signed-off-by: Haru <haru@dotalux.com>