- fixed: Cost strings for dialogues must not be added in the dialogue parser but while displaying the message to properly handle stringtable entries.

This commit is contained in:
Christoph Oelckers 2013-09-03 08:24:47 +02:00
parent 260ce62175
commit 75dd5503cf
2 changed files with 4 additions and 2 deletions

View file

@ -752,7 +752,10 @@ public:
{ {
ReplyText = GStrings(ReplyText + 1); ReplyText = GStrings(ReplyText + 1);
} }
FBrokenLines *ReplyLines = V_BreakLines (SmallFont, 320-50-10, ReplyText); FString ReplyString = ReplyText;
if (reply->NeedsGold) ReplyString.AppendFormat(" for %u", reply->ItemCheck[0].Amount);
FBrokenLines *ReplyLines = V_BreakLines (SmallFont, 320-50-10, ReplyString);
mResponses.Push(mResponseLines.Size()); mResponses.Push(mResponseLines.Size());
for (j = 0; ReplyLines[j].Width >= 0; ++j) for (j = 0; ReplyLines[j].Width >= 0; ++j)

View file

@ -224,7 +224,6 @@ class USDFParser : public UDMFParserBase
if (reply->ItemCheck.Size() > 0) if (reply->ItemCheck.Size() > 0)
{ {
if (reply->ItemCheck[0].Amount <= 0) reply->NeedsGold = false; if (reply->ItemCheck[0].Amount <= 0) reply->NeedsGold = false;
if (reply->NeedsGold) ReplyString.AppendFormat(" for %u", reply->ItemCheck[0].Amount);
} }
reply->Reply = ncopystring(ReplyString); reply->Reply = ncopystring(ReplyString);