Commit Graph
797 Commits
Author SHA1 Message Date
Gleb Mazovetskiy 1519e995cf Move store graphics out of stores.cpp
These graphics are used in various places outside of `stores.cpp`.
2022-01-30 14:56:04 +01:00
ephphatha 68b3252d24 Call dropitem when spawning a quest reward in a network game
This allows the item to appear in the delta sync when a new player joins the game, but does not cause the item to drop for other players on the same level at the time the action occurs due to differences in the way this message is handled.
2022-01-24 21:12:13 +01:00
ephphatha db1d776539 Deduplicate PItem and DItem 2022-01-24 21:12:13 +01:00
staphen b85485b8f3 Resolve game crash when syncing Diablo items in Hellfire games 2022-01-17 00:31:27 +01:00
obligaron 35dc64312e Show preview CelSprite for player actions (Introduce PlayerStruct.pPreviewCelSprite and UpdatePreviewFrame) 2022-01-12 12:26:39 +01:00
ephphatha 8bf05571a1 Dedupe code which determines how much life/mana to restore for potions
This is very similar to the code used when casting heal other, except for how the amount to heal is chosen. Could potentially reuse it there as well with a bit of work.
2022-01-08 09:29:26 +01:00
ephphatha 77a783098d Use ObjectAtPosition when checking if an item can be dropped
This extracts some of the common object logic from ItemSpaceOk and CanPut, these functions are almost identical except for the way players and monsters are checked...
2021-12-28 16:01:37 +01:00
Anders Jenbo 6de6825ce0 Correct false positives translation warnings 2021-12-25 11:10:57 +01:00
Anders Jenbo 6d346c7e18 Use std::string in PrintItemPower 2021-12-13 01:02:07 +01:00
Anders Jenbo af08a99691 Perform item requirement check when entering vendors 2021-12-13 00:56:38 +01:00
ephphatha 3598ee313c Remove StoreStatOk, replace with calls to CanUseItem 2021-12-12 20:07:05 +01:00
ephphatha 6e2751649a Move ItemMinStats to a member function on Player 2021-12-12 20:07:05 +01:00
qndel 8d318ae397 🐛 Make item stat checking consistent
- Prevent negative stats from affecting the ability to use items
2021-12-09 21:05:07 +01:00
Anders Jenbo c2515f4724 Fix number of witch items for Diablo, clean up store spawn code 2021-11-25 13:02:38 +01:00
Gleb Mazovetskiy c57644970f Move UiFlags and UiPanels into their own files
The first breaks circular dependency between `DiabloUI` and `text_render`.
The latter one moves `UiPanels` to a more appropriate place.
2021-11-25 12:22:27 +01:00
Andrew James 4a940b1b07 Remove uses of Items[] as a temporary for other Item variables (#2924) 2021-11-25 09:34:13 +01:00
obligaron 43841477bc Add OptionEntry Test Bard 2021-11-24 09:31:39 +01:00
ephphatha b8b220311a Remove AvailableItems, no longer required 2021-11-23 19:08:41 +01:00
ephphatha 18658f6a42 Remove duplicate argument to DeleteItem 2021-11-23 19:08:41 +01:00
ephphatha f60cc3bfd9 Update calls to DeleteItem to use ActiveItems inline
This highlights how all (except one) call sites duplicate the i argument. With the exception of the use in msg.cpp this can be treated as a offset into activeItems and doesn't care about the real index.
2021-11-23 19:08:41 +01:00
ephphatha 55a52b82c2 Use unsigned types for Items array indexes consistently
Actual type used varied based on context, this addresses some type conversion warnings.
2021-11-23 19:08:41 +01:00
ephphatha 71e39dda6f Extract common logic for loading items from a save
This was duplicated for loading a save from the menu and transitioning to a new level
2021-11-23 19:08:41 +01:00
qndel 30a28fd21e fix displaying unique stats 2021-11-22 18:15:20 +01:00
Anders Jenbo 799f1763af Performce UTF8 aware limited string copies 2021-11-22 03:28:51 +01:00
Anders Jenbo 9d4a5f4890 Clean up item name generation 2021-11-22 03:28:51 +01:00
obligaron 677303cba9 Reduce use of view globals in game menu 2021-11-20 21:57:32 +01:00
Anders Jenbo 69b4a64a8f Fix OOB in ItemSpaceOk
Fixes #3557
2021-11-20 21:17:19 +01:00
qndel 18c0b1858f use DUR_INDESTRUCTIBLE (#3468) 2021-11-10 10:41:17 +01:00
Anders Jenbo 56170b3372 Clean up id normalization 2021-11-07 23:15:10 +01:00
ephphatha 335b0b9349 Use crawl table based search for item checks
fixes #3207
2021-11-07 20:13:31 +01:00
Andrew James 796e2813cf Use scoped enums for DungeonFlags/BFLAG (#3135) 2021-11-07 03:11:16 +01:00
Gleb Mazovetskiy 64a88343e8 Refactor: Use item iterators in 7 more places 2021-10-31 13:28:08 +00:00
Anders Jenbo 2d986430be Allow for slightly better item name generation 2021-10-28 22:02:57 +02:00
Anders Jenbo e9bc05063c [translation] Allow reordering of prefix 2021-10-28 01:43:50 +02:00
Anders Jenbo bff9140995 Expand buffers to handle Bulgarian translation 2021-10-26 17:57:46 +02:00
qndel 0ccdf940f7 fix bounds checks (#3237) 2021-10-24 17:20:04 +02:00
qndel 78c75aa7c7 update vision of other players 2021-10-24 16:19:20 +02:00
qndel d81de165d4 code cleanup (#3235) 2021-10-24 16:05:44 +02:00
staphen 2e9dd1defa Use unsigned char in CornerstoneSave() 2021-10-13 02:33:48 +02:00
staphen ab13fba13f Use Rune Bomb or Cathedral Map to open Hive or Crypt 2021-10-12 15:21:37 +02:00
qndel 91fd583fe6 Revert "fix loot" for 1.3.0 (#3064)
This reverts commit e268ff9afa963142455fbaba84d3ed222c9da9f0.
2021-10-09 10:45:35 +02:00
Anders Jenbo ba10fa3182 Correct name generation of staffs 2021-10-06 08:49:24 +02:00
Anders Jenbo ebc0ad94eb Clean up SetupAllItems initialization 2021-09-25 05:58:51 +02:00
qndel c44ae7b0d4 Faster and better debug unique drop
Drop unique debug command tweak
2021-09-24 16:03:19 +02:00
Gleb Mazovetskiy ec13c333a9 Refactor: Use item iterators for scroll checks
Refs #2586
2021-09-24 01:56:44 +01:00
Anders Jenbo 4f791948ff Fix missing switch cases 2021-09-23 16:55:13 +02:00
Anders Jenbo 0c5bdf5dbf 🐛 Reject items that would cause an OOB to 2021-09-23 10:20:54 +02:00
Anders Jenbo 671fdbd125 Implement contextural translation (pgettext)
Fixes #2369
Fixes #2790
2021-09-20 04:18:35 +02:00
Gleb Mazovetskiy 55b49bfea4 Simplify unique info window drawing
1. Use `BlitFrom` instead of a custom loop for drawing the divider line.
2. De-duplicate position calculation.
2021-09-19 15:56:37 +02:00
Anders Jenbo 7771a08d03 Translatable mainpanel 2021-09-19 07:21:52 +02:00