summaryrefslogtreecommitdiff
path: root/src/map/npc.c
AgeCommit message (Collapse)AuthorFilesLines
2012-08-17Follow up r16656 improved unloadnpcfile stuff performance-wise, making npcs ↵shennetsind1-13/+71
from the same file share the filepath reference rather than each having its own copy. Special Ultra Super Thanks to Trojal <3 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16657 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-17Added 2 (3) new atcommands:shennetsind1-14/+29
* @unloadnpcfile <file path> ** e.g. "@unloadnpcfile npc/cities/alberta.txt" unloads all npcs created by the npc/cities/alberta.txt file. * @addperm/@rmvperm <permission_name> ** e.g. "@addperm skill_unconditional" / "#rmvperm "player" skill_unconditional" git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16656 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-07-23Follow up r16471 improved overall feature performance by making the bind ↵shennetsind1-15/+10
list a pointer array, this also allows the system to have a unlimited amount of atcommand bind instances. also fixed a memory leak that'd be caused when npc_do_atcmd_event fails (e.g. when target npc is manually reloaded) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16485 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-07-22Added the ability to bind atcommands to NPC events (ex: NPCNAME::OnEvent); ↵cookiecrumbs1-0/+66
original version by ToastOfDoom however heavily modified by I enabling command level at the invoking/character (@/#) level and fixes to prevent console errors as well as fixes aimed to ensure compatibility with rAthena. Updated the script_commands.txt documentation with the following script commands: bindatcmd, unbindatcmd and useatcmd. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16471 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-07-11nothing noteworthy, really.shennetsind1-11/+12
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16397 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-31Fixed bugreport:5839 mapflag conflicts were displaying wrong messageshennetsind1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16184 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-31Fixed bugreport:5804 Instances no longer leave "broken" timers behind. ↵shennetsind1-0/+2
Instances also will destroy themselves upon @reloadscript since they break at that. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16183 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-26- Follow up to r16147: check the price in the shop file, instead of ↵brianluau1-1/+1
id->value_buy. Thanks EvilPuncker! git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16154 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-26Fixed bugreport:5658 Instance NPCs will now be cleared properly. ↵shennetsind1-1/+1
Super-Special Thanks to Pig321 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16153 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-25- Added a warning when NPC shops sell items for 0z (FREE!)brianluau1-0/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16147 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-19NPC Loaded by @loadnpc will now trigger their OnInit labels as they're loaded.shennetsind1-8/+20
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16130 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-17Fixed bugreport:5757 Added missing Sorcerer Insignias, Credits to brAthenashennetsind1-3/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16115 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-29A minor memory improvement, and some curly brace love.shennetsind1-9/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16008 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-29Yet another performance improvement: Shut Down processing is now about to 7 ↵shennetsind1-19/+5
times faster. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16006 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-29Follow up r16004 >_<" some not-supposed-to-be-comitted debug messages ↵shennetsind1-19/+11
slipped in. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16005 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-29reasonably-sized performance improvement: @reloadscript is about to 3 times ↵shennetsind1-23/+29
faster. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16004 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-28- Updated the script engine to make use of the DBMap* structure for storing ↵epoque111-2/+2
variables (for Ind <3) - Fixed missing new-lines at the end of various files causing warnings git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15997 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-24Fixed memory leak on MvP tomb system, killer name now uses static buffer. ↵greenboxal21-1/+1
(bugreport:5615) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15954 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-21Added mvp tomb system.greenboxal21-0/+27
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15908 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-21Fixed bugreport:5586 SC_CAMOUFLAGE can be removed by using RA_CAMOUFLAGE ↵greenboxal21-1/+1
again, also portals won't warp players under this status. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15902 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-11Minor performance improvement. server no longer wastes processing time ↵shennetsind1-15/+21
creating the awfully long spawn packet when there is nobody in the map it is being spawned in (for mobs & npcs). this also makes server boot faster. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15856 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-11minor improvement on NPC parse processingshennetsind1-13/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15853 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-19 - Script label db now utilizes `DBMap`'s ability to store integer-type data ↵gepard19841-2/+2
(follow-up to r15682). - Some minor code cleanups. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15734 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-13Enhanced `DBMap` implementation to allow storing integer type data in ↵gepard19841-18/+27
addition to void pointers. - Added enum for data: `int`, `unsigned int` and `void*` - Replaced generic `void*` data with `DBData` struct to hold `int`, `unsigned int` or `void*` (member of `DBNode`) - Added `db_i2data`, `db_ui2data` and `db_ptr2data` functions to cast from `int`/`uint`/`void*` to `DBData` (used in `DBMap::put()`) - Added `db_data2i`, `db_data2ui` and `db_data2ptr` functions to get `int`/`uint`/`void*` from `DBData` - Enabled statistics for new functions in `db_stats` struct - `DBCreateData` functions (used in `DBMap::ensure()`) now return `DBData` instead of `void*` - `DBApply` functions (used in `DBMap::foreach()` and `DBMap::destroy()`) now take `DBData*` as a parameter instead of `void*` - `DBMatcher` functions (used in `DBMap::getall()`) now take `DBData` as a parameter instead of `void*` - `DBReleaser` functions now take `DBData` as parameter instead of `void*` - Default releasers release data if it is `void*` (`DB_DATA_PTR`) type - `DBIterator` functions: `first()`, `last()`, `next()` and `prev()` now return `DBData*` instead of `void*` - `DBIterator::remove()` now returns `int` (1 if node was found and removed, 0 otherwise) instead of `void*` and takes an extra `DBData*` parameter for the data of removed entry - `DBMap::get()` and `DBMap::ensure()` now return `DBData*` instead of `void*` - `DBMap::remove()` and `DBMap::put()` now return `int` (1 if node already existed, 0 otherwise) instead of `void*` and take an extra `DBData*` parameter for the data of removed entry - `DBMap::put()` now takes `DBData` as parameter instead of `void*` - `DBMap::getall()` now puts data into `DBData**` buffer instead of `void**` buffer - Updated macros: - (`i`/`ui`/`str`)`db_get` and (`i`/`ui`/`str`)`db_ensure` were wrapped with `db_data2ptr` to extract data from `DBData*` that is now returned by `DBMap::get()` - added (`i`/`ui`/`str`)`db_iget` and (`i`/`ui`/`str`)`db_uiget` that get `DBData` from `DBMap` and extract `int`/`unsigned int` from it (with `db_data2i`/`db_data2ui`) - `db_put`, `idb_put`, `uidb_put` and `strdb_put` data params were wrapped with `db_ptr2data` to match new signature of `DBMap::put()` (`DBData` instead of `void*`) - added (`i`/`ui`/`str`)`db_iput` and (`i`/`ui`/`str`)`db_uiput` that put `int`/`unsigned int` into `DBMap` (first wrapping it with `DBData`) - added `NULL` in place of extra parameter for removed data in `db_remove` macros - `dbi_first`, `dbi_last`, `dbi_next` and `dbi_prev` were wrapped with `db_data2ptr` to extract data from `DBData*` that is now returned by these `DBIterator` functions - Updated `DBMap` documentation, and fixed a dozen of typos in it. - Updated rest of rA code to reflect `DBMap` changes (mostly required signature changes of `DBCreateData` and `DBApply` functions). - Fixed a bug where `DBMap::put()` would return data of a deleted entry. - Removed some unnecessary pointer casts. - Increased `showmsg.c` static buffer size to fit entire DBMap stats report. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15682 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-09Code cleanup: replaced `DBIterator` function calls with macros where possible. gepard19841-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15668 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-02Minor NPC code cleanup: timer labels.gepard19841-72/+25
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15648 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-29Some NPC code cleanup (event labels).gepard19841-57/+20
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15640 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-17Fixed bug with official npc idle timer thing, bugreport:5343shennetsind1-2/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15598 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-14Removed deprecated memory manager macros (follow-up to r14916).gepard19841-4/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15581 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-31 * Added display name to warps created with `@addwarp`, so their name is ↵gepard19841-1/+1
visible in `@mapinfo 2` (bugreport:1491). * `@mapinfo 2` now also displays unique NPC name if it's different than display name. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15534 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-30- Removed more trailing tabs.brianluau1-6/+6
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15527 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-30- Removed trailing tabs, and fixed some spacing.brianluau1-3/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15524 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-14Fix to progressbar exploit, bugreport:5199shennetsind1-0/+7
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15442 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-14Fixed problem with OnTouch on NPC ID 139, blame on r14993, bugreport:5206shennetsind1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15441 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-11Picklog improvements:gepard19841-16/+4
- now it is finally possible to log every item players gain or lose - added 3 log types: `I` for auctioned items, `B` for buying shop transactions and `X` for all other items transactions that don't fall into another category (for detailed explanation on all log types read `conf/log_athena.conf`) - it also fixes items being logged as picked up/gained by player when in fact they were dropped on the ground due to full inventory git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15420 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-09Fixed battle configs `boss_delay_spawn`, `plant_delay_spawn` and ↵gepard19841-23/+2
`mob_delay_spawn` not being properly applied if changed during runtime (with `@reloadbattleconf` or `setbattleflag`) (bugreport:5204) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15416 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-27Fixed an issue, players were able to see disabled NPCs with maya purple ↵xazax-hun1-0/+6
card. (bugreport:2221) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15288 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-24* Merged changes up to eAthena 15040 (follow up to r15245, fixed some errors).brianluau1-2/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15248 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-24* Merged changes up to eAthena 15040.eathenabot1-10/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15245 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-17- Replaced log_config.enable_logs constants with LOG_ enums that existed ↵brianluau1-4/+4
since r9599. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15150 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-16RE cashshop fix, bugreport:4764shennetsind1-1/+84
-- requires a msgstringtable.txt modification or client will crash (will be in the client svn asap) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15137 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-14- Fixed floating shops being accessible from any location through 3rd party ↵epoque111-1/+8
programs - TODO: needs amending for the walking glitch (bugreport:5016) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15099 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-13Small clarification of the error message after OnTouch trigger fail ↵GodLesZ1-1/+1
(bugreport:4964) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15088 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-10- Renamed 'RRConfig' folder to 'config'.brianluau1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15052 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-06- Fixed undefined reference when compiling under Linux (patch for r15017)epoque111-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15018 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-06- Added support for additional item information when OnSellItem is calledepoque111-1/+28
- Added information is refine, attribute, identify flag and the item cards git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15017 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-05Merging RREmu into rAthena -- quite a few stuff yet to be renamed, but we'll ↵shennetsind1-3/+41
get it sorted. Some of the stuff included in RREmu that is now part of rAthena: - RE Drop Rate Modifier - RE Experience Rate Modifier - RE Weapon MATK - RE Shield ASPD job-specific penalty - RE Cast Time - Renewal-specific item DEF - 3.1 classes. - All-New Mounts - Official Magical Reflection - And other perks, such as fully-functional @mapflag also merged eAthena 15006 into rAthena. For Bugs, Comments and Suggestions: http://rathena.org/board/tracker/ git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15009 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-11-12* Fixed npc class HIDDEN_WARP_NPC (139) being sent to the client, causing ↵ai4rei1-1/+1
client crashes in poring war. It's a server-side "sprite" only. - Updated Aegis NPC ID constants from current npcidentity.lub (569~603). - Reintroduced HIDDEN_WARP_NPC script constant, which was removed by accident (since r14679). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14993 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-09-20* Applied map flag update patch provided by Daegaladh. Will mess with custom ↵L0ne_W0lf1-0/+2
restricted items. - Adds a reset mapflag which is checked when using the Neuralizer. - Syncronizes the item_noequip_db bitmasks with with skill_nocast_db. - Updates mapflags, and both skills and items which are restricted. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14961 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-09-08* Fix C++ compilation issues.flaviojs1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14955 54d463be-8e91-2dee-dedb-b68131a5f0ec