fix #7414 - bug with Japanese names for Samurai
Description for use when an item hasn't been seen up close yet falls back to real name if there is no separate description, but was doing so before real name substitution for samurai. actualn = foo; dn = description ? description : actualn; if (Samurai) actualn = bar; So player saw a flail (via 'dn') until dknown bit got set, then nunchaku (via 'actualn' after it got set to samurai-specific value). Wait until after substitution of Japanese real names before falling back to real name when there's no description.
This commit is contained in:
@@ -144,6 +144,8 @@ shop messages refer to shk by name even when shk is not visible but some
|
||||
used pronoun "it" or "its" in same sentence; ditto for vault guards
|
||||
poly'd hero and monsters could eat through iron bars in areas where walls
|
||||
were flagged as non-diggable
|
||||
Samurai seeing items at a distance could have them be described by their
|
||||
ordinary names rather than by their Japanese names
|
||||
|
||||
|
||||
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
|
||||
|
||||
@@ -403,7 +403,7 @@ unsigned cxn_flags; /* bitmask of CXN_xxx values */
|
||||
register struct objclass *ocl = &objects[typ];
|
||||
int nn = ocl->oc_name_known, omndx = obj->corpsenm;
|
||||
const char *actualn = OBJ_NAME(*ocl);
|
||||
const char *dn = OBJ_DESCR(*ocl) ? OBJ_DESCR(*ocl) : actualn;
|
||||
const char *dn = OBJ_DESCR(*ocl);
|
||||
const char *un = ocl->oc_uname;
|
||||
boolean pluralize = (obj->quan != 1L) && !(cxn_flags & CXN_SINGULAR);
|
||||
boolean known, dknown, bknown;
|
||||
@@ -411,6 +411,10 @@ unsigned cxn_flags; /* bitmask of CXN_xxx values */
|
||||
buf = nextobuf() + PREFIX; /* leave room for "17 -3 " */
|
||||
if (Role_if(PM_SAMURAI) && Japanese_item_name(typ))
|
||||
actualn = Japanese_item_name(typ);
|
||||
/* 3.6.2: this used to be part of 'dn's initialization, but it
|
||||
needs to come after possibly overriding 'actualn' */
|
||||
if (!dn)
|
||||
dn = actualn;
|
||||
|
||||
buf[0] = '\0';
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user