diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-08-25 21:41:42 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-08-25 21:41:42 -0300 |
| commit | 5b247aa5cd48b8c6a00e61fb3e68892b32d6a258 (patch) | |
| tree | 3f4020e0c58926be99ebc2a5978724754c2d3fcb /src/operate.cc | |
| parent | 466473ece3ad8643f5d5602cd8dc72927a5f9227 (diff) | |
| download | game-5b247aa5cd48b8c6a00e61fb3e68892b32d6a258.tar.gz game-5b247aa5cd48b8c6a00e61fb3e68892b32d6a258.zip | |
fix look at NAMEDOOR -- fixes #4
Diffstat (limited to 'src/operate.cc')
| -rw-r--r-- | src/operate.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/operate.cc b/src/operate.cc index c60db21..dd75066 100644 --- a/src/operate.cc +++ b/src/operate.cc @@ -2083,11 +2083,14 @@ void Look(uint32 CreatureID, Object Obj){ uint16 HouseID = GetHouseID(ObjX, ObjY, ObjZ); if(HouseID != 0){ - // TODO(fusion): Make `GetHouseOwner` return "Nobody" when there - // is no owner name. + const char *HouseOwner = GetHouseOwner(HouseID); + if(HouseOwner == NULL || HouseOwner[0] == 0){ + HouseOwner = "Nobody"; + } + snprintf(Help, sizeof(Help), ". It belongs to house '%s'. %s owns this house", - GetHouseName(HouseID), GetHouseOwner(HouseID)); + GetHouseName(HouseID), HouseOwner); strcat(Description, Help); }else{ error("Look: NameDoor auf [%d,%d,%d] gehört zu keinem Haus.\n", ObjX, ObjY, ObjZ); |
