Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#2018 closed defect (fixed)

[PATCH] traders garrisoned in ships not taken into account

Reported by: mimo Owned by: leper
Priority: Should Have Milestone: Alpha 14
Component: Core engine Keywords: patch
Cc: Patch:

Description

If we (un)garrison a trader in a ship after the trade route has been setup, it is not taken into account in the trade gain because the gain is never recomputed. Here is a fix to do it. In addition, the Calculate gain function has an extra argument which is never used. This patch removes it also.

Attachments (1)

tradergarrison.diff (993 bytes ) - added by mimo 11 years ago.

Download all attachments as: .zip

Change History (3)

by mimo, 11 years ago

Attachment: tradergarrison.diff added

comment:1 by leper, 11 years ago

Owner: set to leper
Resolution: fixed
Status: newclosed

In 13520:

Recalculate trader gain when garrisoned entities change. Patch by mimo. Fixes #2018.

comment:2 by leper, 11 years ago

Keywords: review removed
Milestone: BacklogAlpha 14

Thanks for the patch, I removed the this.gain && as we don't reset this.gain anywhere, so it is useless (and the case where both markets are set and we have no gain isn't possible).

Note: See TracTickets for help on using tickets.