674 Commits
Author SHA1 Message Date
obligaron 2da492d203 Change some functions to Player reference 2023-12-05 20:40:30 +01:00
obligaron fae6b3d817 Change Player::getId() and MyPlayerId to uint8_t 2023-12-05 19:05:08 +01:00
Gleb Mazovetskiy c5a5dc9f5c Fix a few MSVC warnings 2023-11-05 12:57:59 +00:00
Anders Jenbo bb2e189327 Convert _sfx_id in to class enum 2023-11-02 14:34:24 +01:00
Gleb Mazovetskiy e5881688f4 text_render: Replace optional args with struct
4 options args are a bit unwieldy, especially when you want
to pass only the first and the last one.

With a struct, there is no need to specify the default values
for the args in between.
2023-10-25 09:19:14 +01:00
Gleb Mazovetskiy 09ab58343c Migrate gold drop/withdrawal to text_input
With this, all text input is handled in a unified way.
2023-10-24 20:11:04 +01:00
ephphatha 24a20ce8e2 Extract uses of MyPlayer to prevent future crashes in tests/game init 2023-09-20 05:49:54 +02:00
Gleb Mazovetskiy af869ac732 Merge branch 'master' into dev-merged 2023-09-01 20:49:34 +01:00
ephphatha fb97eb7114 Clean up hit detection for inventory slots when pasting large items 2023-08-27 18:16:04 +02:00
Stephen C. Wills 45dbe6aa61 Shift software cursor graphic and remove special casing (#6512) 2023-08-26 16:45:36 +02:00
Anders Jenbo c91e69384a Revert "Fix cursor jitter when clicking inv items (#6510)"
This reverts commit 2a393397a1.
2023-08-26 04:00:38 +02:00
Eric Robinson 2a393397a1 Fix cursor jitter when clicking inv items (#6510) 2023-08-26 01:27:48 +02:00
Gleb Mazovetskiy 8c1a847f41 Remove utils/stdcompat/string_view.hpp 2023-08-14 09:59:14 +01:00
Gleb Mazovetskiy c19bfe87fa Remove utils/stdcompat/algorithm.hpp 2023-08-14 01:54:29 +01:00
Gleb Mazovetskiy 14540164a7 Remove utils/stdcompat/optional.hpp 2023-08-14 01:54:29 +01:00
Gleb Mazovetskiy 62d067b653 Remove utils/stdcompat/abs.hpp 2023-08-14 01:54:29 +01:00
staphen a090ab7d5c Apply position-based quest completion logic to Single Player 2023-07-16 00:02:06 +02:00
staphen 9381251b9d Fix net validation of durability for items without durability 2023-06-18 06:26:22 +02:00
Anders Jenbo 89a677d0cb Validate item modifier ranges 2023-06-16 15:59:47 +02:00
Anders Jenbo 23e479e9aa Remove unused item properties from network 2023-06-16 15:59:47 +02:00
staphen 956574bfa2 Also disallow boosted stats for ground items 2023-06-16 13:50:43 +02:00
Anders Jenbo 01a7966f1d Empty cursor when closing inventory
Fixes #4205
2023-06-03 20:25:50 +02:00
obligaron c8f1804d04 Spawn Optic Amulet and Arkaine's Valor always at the same tile (#6167)
* Spawn Optic Amulet and Arkaine's Valor always at the same tile

* Multiplayer: To complete Halls of Blind and Arkaine's Valor also check drop position, because quest rewards items can be randomized
2023-06-02 20:12:39 +02:00
qndel ddd0f1b051 dont always force staff recharge to change spell 2023-05-28 16:09:01 +02:00
obligaron 31fe55a161 Prevent hellfire quests from disapearing from quest log 2023-05-28 01:51:56 +02:00
ephphatha 9987bb6be2 Avoid unnecessary item initialisation and copy 2023-05-12 06:27:12 +02:00
ephphatha 6b21728440 Inline single use function InvPutItem 2023-05-12 06:27:12 +02:00
ephphatha 4f3c70aa95 Move PlaceItemInWorld to items.h/cpp
Seems like a more appropriate home
2023-05-12 06:27:12 +02:00
ephphatha 06f6ff78f2 Extract common logic for a player dropping an item
The other class of use appears to be items spawned from NPCs or being dropped on death which shouldn't consider the CornerStone. Need to sort those later
2023-05-12 06:27:12 +02:00
ephphatha eac22b935d Make functions that create and place an item in the world more similar 2023-05-12 06:27:12 +02:00
Gleb Mazovetskiy 4fa3732526 Add missing <cstdint> includes
Done with the following script:

```ruby
Dir["Source/**/*.{h,c,cc,cpp,hpp}"].each do |path|
  v = File.read(path)
  next if !v.include?("uint32_t") || v.include?("cstdint")

  lines = v.lines
  line_num = if lines[2].start_with?(" *")
    lines.index { |l| l.start_with?(" */") } + 3
  else
    3
  end

  lines.insert(line_num, "#include <cstdint>\n")

  File.write(path, lines.join(""))
end
```

then fixed-up manually
2023-05-10 13:50:12 +01:00
ephphatha 03e35988f1 Dedupe OnRespawnItem/OnSpawnItem
Both methods were exactly the same apart from the use of temporaries for swapped message params.
2023-05-07 13:33:40 +02:00
ephphatha 3a7ae732cd use unsigned types for item seeds 2023-05-06 18:02:54 +02:00
obligaron b87711bc08 Reintroduce Player::spellFrom to seperate teleport cursor from queued spell 2023-04-17 03:22:50 +02:00
qndel ce2ce86070 inspect players command 2023-04-14 02:40:17 +02:00
obligaron c4388b0d41 Remove unused pnum from UseInvItem 2023-04-14 02:40:17 +02:00
obligaron 1522dc7031 Multiplayer: Add arena potions 2023-04-13 21:20:53 +02:00
obligaron 590c990c80 Introduce Item::getName 2023-04-13 00:07:00 +02:00
ephphatha 94c646ef8f Use rectangles for inventory/belt hit areas 2023-03-25 14:22:57 +01:00
obligaron 6e364f2167 Telekenisis respects Disable Crippling Shrines Setting 2023-03-02 10:01:05 +01:00
obligaron 44de539afb Introduce CronerStoneStruct::isAvailable() 2023-03-02 01:23:59 +01:00
staphen 5e832e75d9 Fix alignment for 2x2 armor sprite in the chest slot 2023-02-18 21:15:27 +01:00
obligaron 715e689ecb Introduce Item::isUsable() 2023-02-10 22:28:52 +01:00
Gleb Mazovetskiy ebcd6b222d Optimize SpellData size: 40 bytes -> 24 2023-02-10 10:51:06 +00:00
KPhoenix a1fbf5253f enum talk_id -> enum class TalkID 2023-02-09 13:04:01 +01:00
obligaron 2d4e84c561 Multiplayer: Enable Black Mushroom Quest 2023-02-07 08:02:38 +01:00
Gleb Mazovetskiy b61dac853b Add GetSpellData(SpellID) 2023-02-05 12:12:48 +00:00
KPhoenix d813f13700 enum spell_id -> enum class SpellID 2023-02-05 10:24:58 +00:00
Gleb Mazovetskiy 1788d2f8ec Remove miniwin
Event handling code moved to `engine/events.{hpp,cpp}`.
2023-02-01 16:06:57 +00:00
obligaron a935066180 Multiplayer: Enable Halls of the Blind Quest 2022-12-28 10:05:45 +01:00