summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
AgeCommit message (Collapse)AuthorFilesLines
2017-06-25fix guild leader change in 2017 clients. Based on rathena commit:Andrei Karas1-1/+1
commit b51617cb730cdc6d91bc03df16c887a060323f3a Author: Lemongrass3110 <lemongrass@kstp.at> Date: Sat Jun 3 17:03:56 2017 +0200 Added support for 2017's guild leader change
2017-05-28add support for custom atcommands in can_use_commandgumi1-14/+17
2017-05-28allow custom atcommands to have different permissions for each groupgumi1-2/+6
2017-05-27Merge pull request #1722 from Smokexyz/mmo_charstatus-fixHaru1-7/+20
Dismemberment of `storage_data` from `mmo_charstatus`.
2017-05-22Add storage_data reception, parsing and sending to/from the map-server.Smokexyz1-7/+20
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-05-09Merge pull request #1699 from Jedzkie/11-SummerCostumeHaru1-19/+34
Implemented Official Summer 2 Costume
2017-05-01Merge pull request #1698 from Jedzkie/10-BodyStyleHaru1-3/+17
Added job checks for @bodystyle command
2017-05-01Added job checks for @bodystyle commandJedzkie1-3/+17
Signed-off-by: Haru <haru@dotalux.com>
2017-04-24Removed hard coded values on @cashmount and setcashmount.Jedzkie1-6/+8
2017-04-23Coding-style Fixes and White space adjustmentsJedzkie1-19/+28
2017-04-19Implemented Official Summer 2 CostumeJedzkie1-0/+6
Added summer2_ignorepalette configuration
2017-03-13Enable display of custom commands in @commands.Emistry Haoyan1-0/+30
- Based on @Dastgir's commit. https://github.com/RagEmu/Renewal/commit/9409e435cab3c7ee24172f09b865b2803411f0ff - only GM with the minimum group id able to view it.
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-12-03Clarify some Job Class vs MapID confusion (2/2)Haru1-4/+4
This commit ensures that `sd->job` and related variables only contain MapIDs (i.e. the serverside optimized values, where High Novice is MAPID_NOVICE | JOBL_UPPER) and are never checked against the client-based Job Class values. As a rule of thumb, from now on, when a variable is named `job` or `jobid`, it is intended to contain a MapID and not a Job Class ID. The type of such variable shall be an unsigned `uint16` or `uint32`. To ensure that related third party code is also verified when this commit is merged, the variable `struct map_session_data::class_ (i.e. `sd->class_`) is renamed to `job`. Some issues in related lines are also fixed, including: - The atcommand `@mount` would not check properly that the requesting character is a 2nd class Swordsman type. - `pc->addfame()` would silently accept invalid MapIDs, sending unknown values to the client (more on this in a subsequent commit). - `pc->famerank()` would not use the passed job as a bitmask, causing the caller to have to mask it beforehand (more on this in a subsequent commit). - The Soul Linker check in TK_JUMPKICK wasn't future-proof (no harm caused currently). - Gunslingers would be able to be targeted by Spiritual Bestowment (`MO_KITRANSLATION`) and Spiritual Sphere Absorption (`MO_ABSORBSPIRITS`) due to a faulty check introduced when the Rebellion class was implemented (causing unintended interaction with Coins). Signed-off-by: Haru <haru@dotalux.com>
2016-12-03Clarify some Job Class vs MapID confusion (1/2)Haru1-4/+4
This commit ensures that `sd->status.class` and related variables only contain Job Classes (i.e. the client-compatible values, where High Novice 4001) and are never checked against the bitmask-based MapID values. As a rule of thumb, from now on, when a variable is named `class`, it is intended to contain a Job Class ID and not a MapID. The type of such variable shall be a signed `int16` or `int`. To ensure that related third party code is also verified when this commit is merged, the variable `struct mmo_charstatus::class_ (i.e. `sd->status.class_`) is renamed to `class`. Some issues in related lines are also fixed, including: - A wrong check in the char server would prevent the correct detection of babies in code related to the family exp sharing. - Baby Arch Bishops would not be affected by Eucharistica. - A wrong check would cause the `questinfo()` script command not to display its information for most classes (except 1-1 classes). - Map IDs and Job Classes were mixed up in `itemdb_jobid2mapid()` and `itemdb_jobmask2mapid()` for 1-1 classes (causing currently no harm, since they just happen to coincide). - The Baby Sura class would not cause parties to be marked as containing a monk type character (for SLS Team Up purposes). - Baby Geneticists would bypass the cart check when trying to equip ammunitions. - Baby Mechanics would bypass the Mado Gear check when trying to equip ammunitions. - Transcendent Shadow Chasers would lose the Stalkers' ability to clone transcendent skills. Signed-off-by: Haru <haru@dotalux.com>
2016-08-19Ported battle.conf to libconfigHaru1-1/+1
Ported to modern Hercules and cleaned up from Panikon's commits: 44fea0b3cdba6901599265220228ba4359b1f96d, 9cba05bc0811e638bbaaa6cff887d0b2c9872560 Signed-off-by: Haru <haru@dotalux.com>
2016-08-13Added atcommand configEmistry1-2/+8
Based on @Lemongrass3110's commit https://github.com/rathena/rathena/commit/9157318ee9939728b8d332a5668c13d4ad0a6f8b: Added a configuration to enable the atcommands baselevel and joblevel to trigger their respective npc events. This will help you guys with testing your custom scripts that are listening to OnPCBaseLvUpEvent or OnPCJobLvUpEvent. For safety reasons we only trigger the events on level increase.
2016-08-10Enable @b/joblvl trigger OnPCLvUpEventEmistry1-0/+3
- OnPCBaseLvUpEvent - OnPCJobLvUpEvent
2016-07-25Added a missing entry into messages.conf and added some comments where ↵epuncker1-6/+6
missing, ref #1282
2016-07-14Changed mmo_charstatus::status_point and mmo_charstatus::skill_point to intHaru1-36/+12
Fixes several -Wsign-compare issues Signed-off-by: Haru <haru@dotalux.com>
2016-07-14Changed map_session_data::change_level_2nd and ↵Haru1-2/+3
map_session_data::change_level_3rd to int Fixes several -Wsign-compare issues Signed-off-by: Haru <haru@dotalux.com>
2016-07-14Changed mmo_charstatus::base_level and mmo_charstatus::job_level to intHaru1-11/+11
Fixes several -Wsign-compare issues Signed-off-by: Haru <haru@dotalux.com>
2016-07-14Changed pc->maxbaselv() and pc->maxjoblv() to return signed int and take ↵Haru1-5/+5
const sd Removes some FIXME (and continues a chain reaction) Fixes some of the many -Wsign-compare warnings Signed-off-by: Haru <haru@dotalux.com>
2016-07-02Trivialities: indentation fixesHaru1-5/+5
Signed-off-by: Haru <haru@dotalux.com>
2016-06-30Use item attribute as flags varible. Now only ATTR_BROKEN flag exists.Andrei Karas1-2/+3
2016-06-25Moved translations template generator to a pluginHaru1-16/+0
Signed-off-by: Haru <haru@dotalux.com>
2016-05-14Fixed an issue that causes `@showmobs` to skip entriesHaru1-1/+1
- Follow-up to b3c722ecf777aeeea6317755a6adfc0216b7a2bd Signed-off-by: Haru <haru@dotalux.com>
2016-04-23Removed the 'len' argument from clif_disp_onlyself() and clif->disp_message()Haru1-5/+5
- The argument was redundant, since the passed value is always the same as the passed string's length (it doesn't make sense otherwise). The argument is implicit now. Less typing and less errors. Signed-off-by: Haru <haru@dotalux.com>
2016-04-23Corrected the type of the 'length' argument of various broadcast-related ↵Haru1-5/+5
functions - Variable types were changed to int - Corrects several warnings in VS2015 - Affected functions: `clif->broadcast()`, `clif->broadcast2()`, `intif->broadcast()`, `intif->broadcast2()` Signed-off-by: Haru <haru@dotalux.com>
2016-04-23Changed map_session_data::chatID to int (and renamed to chat_id)Haru1-2/+2
- Chat IDs are signed integers. - Resolves various warnings, depending on the compiler settings. Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped typedef from DBIteratorHaru1-9/+9
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped typedefs from union DBKey and struct DBDataHaru1-5/+6
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Added separate char* and const char* data types to struct script_dataHaru1-12/+16
Used, respectively, by C_STR and C_CONSTSTR Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Added const qualifier to some typecastsHaru1-15/+13
Signed-off-by: Haru <haru@dotalux.com>
2016-03-14Dont load roulette_db.conf if roulette disabled.Andrei Karas1-0/+2
2016-03-10Add new logging types.Andrei Karas1-1/+1
2016-03-06Fixed a parsing issue in #commandsHaru1-111/+81
- Under certain unpredictable conditions, a #command could be applied to a character other than the specified. Signed-off-by: Haru <haru@dotalux.com>
2016-02-28Changed mob mode field to 32 bit, for future expansionHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-02-27Replaced various '-1' with the correct constantHaru1-2/+2
INFINITE_DURATION, INVALID_TIMER, SC_NONE, INDEX_NOT_FOUND, depending on context. Signed-off-by: Haru <haru@dotalux.com>
2016-02-19Fix all known warnings from compiler flags -Wformat*Andrei Karas1-8/+8
Add all missing -Wformat flags into configure.
2016-02-19Fix some cast discards 'const' qualifier from pointer target type warnings.Andrei Karas1-11/+11
Add -Wcast-qual into configure comment.
2016-02-17Removed unnecessary typedefs from libconfigHaru1-9/+9
Signed-off-by: Haru <haru@dotalux.com>
2016-02-17Renamed config->read_file to config->load_fileHaru1-3/+3
- The return value is now consistent with the libconfig standard (CONFIG_TRUE/CONFIG_FALSE). - Removed some redundant error messages. Signed-off-by: Haru <haru@dotalux.com>
2016-01-29Merge pull request #1105 from dastgir/20-SendFixHaru1-7/+11
Fixes crash with @send
2016-01-16Removed Hard Coded data for SC_ALL_RIDING.Jedzkie1-1/+2
2016-01-16Fixes crash with @sendDastgir1-7/+11
2016-01-12Replaced 22-bit mask entry with a regular uint32 in the noviewid mapflag ↵Haru1-1/+1
implementation As per ultramage's suggestion in #926 Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Replaced some map->id2sd calls with the proper map->id2XX functionHaru1-7/+5
- Also added new map->id2XX convenience functions for the other bl types. Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Replaced some explicit casts with BL_UCAST/BL_UCCASTHaru1-5/+13
- Replaced casts in foreach callbacks. - Added assertions and nullpo checks where applicable. Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Replaced some explicit casts with BL_UCAST/BL_UCCASTHaru1-45/+35
- Replaced the map-iterator related casts. Signed-off-by: Haru <haru@dotalux.com>