* Moved redundant structs for vending & buyingstore, move it to vending.h
* Removed redundant query to update autotrade info (autotrade state, head, body direction, & sit state) that previously executed in vending_reopen & vending_openvending, buyingstore_reopen & buyingstore_create.
* Removed lines to execute queries each iteration to insert vending/buyingstore list, now using StringBuf and just being executed once after the item listing. (in vending_openvending & buyingstore_create)
* Revert the ways initializing autotrader list by using DBMap (vending_autotrader_db & buyingstore_autotrader_db)
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
* Bug Fixes bug:9338
* Now resend the list to map-server from char/inter-server to avoid "weird" item allocation on guild storage. Example, previously you will meet stacked item like GUID does, but it shouldn't!
* Also will check the maximum amount that can be store in guild store. If guild storage is full (the slots or item stack limit is reach) the rest value/item will be dropped.
* Account of kicked guild member won't be kicked from server anymore if the player idle on character select window (just prevents player to login when retriving items are in progress)
* Delete guild bound items from guild master when guild is disbanded! Previously, the bound type just changed to NONE. Also for party bound item.
* If kicked guild/party member is trading bound item when be kicked, the trade will be canceled!
* If the guild member is being kicked when open guild storage, storage will be closed first waiting for next item retrieval.
* Now when guild storage is opened, storage_status (changed the var to 'opened') will be used to hold char_id who opens it.
Misc:
* Cleanup guild storage prefix functions, changed them to "gstorage_*"
* Added `picklog` type 'B' for logging deleted bound item because of kicked from guild/party.
* Updated documentation for new used packet 0x3857
NOTE: Please import upgrade-20150103_log.sql
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
* Separated Sql handle for query_sql to avoid mapreg overwrite the mmysql_handle.
* New handle for query_sql: qsmysql_handle
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
* Added item flag value: 8 to init default item with BindOnEquip. Item with this flag will be character bound item once equipped.
* Added optional config 'default_bind_on_equip' in conf/battle/items.conf to set default bind type. By default the type is character bound.
* Hercules merge 1f5161a2bd
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
* Separated pet_db for Renewal & Pre-Renewal to avoid non-existant monster in different mode.
* Cleaned script command in pet_db.txt file, just point it to doc/script_commands.txt. Read them there!
* Separated damage value for petskillattack2 to its own var 'damage', that previously use 'lv' var to store the value.
* Added config 'pet_ignore_infinite_def' in conf/battle/pet.conf,
* If disabled (val:"no"), fixed damage from pet script 'petskillattack2' will be adjusted to 1. Example, just like player attacks Shining Plant.
* Enabled by default. Previously, fixed damage ignore the infinite defense, that's why it's enabled by default.
* TODO: Correcting the logic and maybe also confirm the correct behavior!
* Added validation for pet script commands,
* Skill for petskillattack, petskillattack2, & petskillsupport
* SC range for petrecovery.
* Cleaned up some source documentation.
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
* re-Disabled the ADJUST_SKILL_DAMAGE by default (core.h) that enabled by accident since 794c1a8. :P
* Removed MAX_MAP_SKILL_MODIFIER variable.
* Removed fixed array for skill damage adjustment in each map.
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
Align account_id and char_id to uint32 as this is the value they can be
in DB.
Remove src/test folder, unused
Remove useless #include to speedup compilation.
* Added safe check if `mergeitem` script command being used with no items to be merged. Thank @RadianFord
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
* Changed -1 for timer id to INVALID_TIMER
* Changed values for pc_bound_chk(). 2 to BOUND_GUILD and 3 to BOUND_PARTY
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
* Typo "status" should be "equip" at 267d521
* Follow up 3428ae2, use the 'parent' command name -atcommand_checkalias()- to compare the command, so it won't breaks alias recognition
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
* Changed wrong flag value, 6 -> 4
* Added UID check in pc_cart_additem()
* Generate GUID moved to pc_additem() for item with flag.guid
* Added card comparison in 'mergeitem' to avoid merge CARD0_* items with non-CARD0_*
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
Clean up something RENEWAL_CAST
* Moved additive bonuses (reducing/increasing) to first calculation before the rate adjustment
* Corrected `bonus(2) bFixedCastrate` shouldn't be stacked. Example between Puente_Robe (15012) is -3% and +10 Rafini_Staff (1649) is -10%, only -10% will be used not -13%.
* Reversed some value assignment, `-=` to `+=` and other part that affected by this change.
* Also as follow up c3e488e & 4f4d8fe, fixed `bonus2 bFixedCastrate,"sk",rate;` algorithm
* Corrected `bFixedCastrate` for Krieger_Knuckle2 (1827) only for skill `MO_EXTREMITYFIST`
* Moved default the 20% of fixed cast rate to conf/battle/skill.conf `default_fixed_castrate`
- Gravitational Field will now work as official servers (bugreport:4897)
* Fixed range of Ganbantein (16->14) and Gravitational Field (9->14)
* Gravitational Field never misses and can hit hidden targets
* Similar to Pressure the damage can not be increased or decreased by any means, it even hits GTB users and users protected by Devotion/Sacrifice
* Renewal damage is now 400+100*level every 500ms (200+200*level every 1000ms in pre-renewal)
* You can no longer do normal attacks while the skill is active
* You now can use skills while the skill is active, however, other skills are unable to deal any damage as long as Gravitational Field is active
* Added the possibility to link different skill unit groups together; if a skill unit group gets deleted, the linked skill unit groups are deleted as well; this was needed because when being hit, all Gravitational Fields of the person being hit need to be removed
* Gravitational Field can no longer overlap with itself
* Pressure and Gravitational Field will now be considered "physical normal attacks" and can consequently trigger Autospells; unlike manually cast spells, Autospells can deal damage while Gravitational Field is active
- Fixed that in renewal, weapons with a range of 2 and 3 did depend on DEX instead of STR (fixed#129)
* Special thanks to NovaRagnarok for the fix
* 1 = 1%, 100 = 100%... previously 1 = 100%
* Increase calculation accuracy. Example for previous calculation of Concentrated_White_Potion_Z (12428) bonus to add 20% HP recovery rate always be fail, since "1*20/100" always be round down to 0, didn't add 20%!
* Vitata_500 (12436) has incomplete vals for SC
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
* Enabled by default to take effect of `guid` function.
* When it's disabled, `guid` function will be ignored as suggestion to disable this 'weird. official feature.
* NOTE: If this feature is disabled "in the middle" of your game, the separated is still separated in inventory, storage, or guild storage until player move the item to/from storage/inventory to restack them.
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
* GUID
- `guid` field in official PackageItem.lua supposed to make item will be separated even item is stackable item.
- Currently `guid` usage is using item Unique ID that generated when item with GUID flag is appear from package.
- Some item containers in official PackageItem.lua are also separated, not stacked when player obtain it. Example when using atcommand "@item Xmas_Bless". For current implementation, the items are flagged in item_flag.txt (db folder) with flag 4.
- `isNamed` field in item group is replaced by `GUID` and move the `isNamed` as new additional field. See doc/item_group.txt or db/re/item_package.txt.
* NPC:
- Enabled npc/re/other/item_merge.txt and it's now usable.
* Script Command:
- Added `mergeitem` to merge separated items in player's inventory. See doc/script_commands.txt.
* Misc:
- Changed how to broadcast the item that obtained from package with flag `isAnnounced` to intif_broadcast, so it will be announced to all connected map-servers.
- Added some items that flagged as 'item group container' in db/re/item_flag.txt
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
* Moved additive bonuses (reducing/increasing) to first calculation before the rate adjustment
* Corrected bFixedCastrate, shouldn't be stacked. Example between Puente_Robe (15012) is -3% and +10 Rafini_Staff (1649) is -10%, only -10% will be used not -13%.
* Reversed some value assignment, `-=` to `+=` and other part that affected by this changes.
* Also as follow up c3e488e & 4f4d8fe, fixed `bonus2 bFixedCastrate,"sk",rate;`
* Corrected `bFixedCastrate` for Krieger_Knuckle2 (1827) only for skill MO_EXTREMITYFIST
* Moved default the 20% of fixed cast rate to conf/battle/skill.conf `default_fixed_castrate`
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
- Fixed Hindsight often casting level 0 of a skill when the selected auto-skill was of level 2
- Fixed song and dance effects staying forever on the screen if the bard / dancer walked out of sight (fixed#127)
- Fixed a bug that stopped characters server-sided and caused position lag when closing a skill menu (bugreport:9117)
- Fixed behavior of looter monsters (#125=fixed)
* They will now always target the oldest item in their view range (which makes it seemingly random), rather than always the most south-western item available
* Their loot range is now "0" meaning they need to be on the same cell as the item to loot it
* Their AI will no longer get stuck in an endless loop when someone drops an item around the corner