• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

polserver / polserver / 35774882498
82%

Build:
DEFAULT BRANCH: master
Ran 22 Sep 2026 07:56PM UTC
Jobs 1
Files 856
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Sep 2026 07:36PM UTC coverage: 81.909% (+0.2%) from 81.747%
35774882498

push

github

web-flow
Sell only what the sell window offered, and pay for all of it (#976)

* Sell only what the sell window offered, and pay for all of it

The answer to a sell window was taken on trust, and the sale it made could
go unpaid.

Both sell handlers, the core's and the one ScriptedMerchantHandlers selects:
- skip an item the pack no longer holds at its top level instead of
  returning. The core's handler had already moved the items listed before
  it and paid for none of them; the scripted one dropped the whole answer.
  Either way the vendor was never told and the window stayed armed.
- sell only what the window listed, each serial once. SendSellWindow keeps
  the listed serials and the vendor in ClientGameData::vendor_sell_offer,
  so a buy window no longer arms the sell handler, the buyable-container
  filter cannot be bypassed, and a scripted vendor no longer gets one
  shopping-list entry for every repeat of a serial.
- skip an entry for an amount of 0, which the core sold as the whole stack
  for nothing, and a container that is no longer empty, which went to the
  vendor with whatever had been put in it.
- read no more entries than the packet's length has room for. The count
  alone let the loop read stale bytes of earlier packets, or past the copy
  a 0x9F packet hook hands on.

The core's handler also:
- adds the prices up in 64 bits and skips an item that would take the sale
  past INT_MAX, the most the vendor's event can report. The 32-bit total
  wrapped.
- pays each stack into the pack or, when the pack does not take it, at the
  seller's feet. _create_item_in_container now says whether the gold went
  in, so an OnInsert script that consumes the payment does not earn a
  second one on the ground.
- moves the sold item and the rest of a split stack with Items::move_into,
  so with UseContainerSlots the sold item gets a free slot in the vendor's
  container and the rest keeps the stack's slot. The buy handler moves a
  purchase the same way instead ... (continued)

163 of 172 new or added lines in 5 files covered. (94.77%)

4 existing lines in 3 files now uncovered.

60221 of 73522 relevant lines covered (81.91%)

1648513.2 hits per line

Uncovered Changes

Lines Coverage ∆ File
7
87.93
5.0% pol-core/pol/module/uomod2.cpp
2
54.55
-1.12% pol-core/pol/network/cgdata.cpp

Coverage Regressions

Lines Coverage ∆ File
2
63.41
0.0% pol-core/pol/mobile/ufacing.cpp
1
54.55
-1.12% pol-core/pol/network/cgdata.cpp
1
94.67
-1.33% pol-core/uoconvert/terrainplane.cpp
Jobs
ID Job ID Ran Files Coverage
1 35774882498.1 22 Sep 2026 07:56PM UTC 856
81.91
GitHub Action Run
Source Files on build 35774882498
  • Tree
  • List 856
  • Changed 14
  • Source Changed 0
  • Coverage Changed 14
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • dc4df028 on github
  • Prev Build on master (#35722051391)
  • Next Build on master (#35912421022)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc