diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-06-27 18:57:29 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-06-27 18:57:29 -0300 |
| commit | e59667ec6be0a21ce702ce077154357a1c7f7c04 (patch) | |
| tree | 8222cce37f8dbf1694cffa138c0bb0ad6b893bf3 /src/operate.cc | |
| parent | ea319bc2fbef91e3ea062be554b215756648d1d3 (diff) | |
| download | game-e59667ec6be0a21ce702ce077154357a1c7f7c04.tar.gz game-e59667ec6be0a21ce702ce077154357a1c7f7c04.zip | |
`moveuse.cc`
Diffstat (limited to 'src/operate.cc')
| -rw-r--r-- | src/operate.cc | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/operate.cc b/src/operate.cc index e742806..8123ba0 100644 --- a/src/operate.cc +++ b/src/operate.cc @@ -1,6 +1,7 @@ #include "operate.hh" #include "config.hh" #include "info.hh" +#include "moveuse.hh" #include "stubs.hh" @@ -2107,15 +2108,12 @@ void Look(uint32 CreatureID, Object Obj){ if(CreatureID == 0 || ObjectInRange(CreatureID, Obj, 1)){ if(ObjType.getFlag(TAKE) && GetWeight(Obj, -1) > 0){ int ObjWeight = GetCompleteWeight(Obj); - if(ObjType.getFlag(CUMULATIVE) + bool Multiple = ObjType.getFlag(CUMULATIVE) && Obj.getAttribute(AMOUNT) > 1 - && IsCountable(ObjType.getName(1))){ - snprintf(Help, sizeof(Help), "\nThey weigh %d.%02d oz.", - ObjWeight / 100, ObjWeight % 100); - }else{ - snprintf(Help, sizeof(Help), "\nIt weighs %d.%02d oz.", - ObjWeight / 100, ObjWeight % 100); - } + && IsCountable(ObjType.getName(1)); + snprintf(Help, sizeof(Help), "\n%s %d.%02d oz.", + (Multiple ? "They weigh" : "It weighs"), + (ObjWeight / 100), (ObjWeight % 100)); strcat(Description, Help); } @@ -2570,7 +2568,7 @@ void Turn(uint32 CreatureID, Object Obj){ throw NOTTURNABLE; } - ObjectType RotateTarget = ObjType.getAttribute(ROTATETARGET); + ObjectType RotateTarget = (int)ObjType.getAttribute(ROTATETARGET); if(RotateTarget == ObjType){ error("Turn: Objekt %d wird durch Drehen zerstört.\n", ObjType.TypeID); } @@ -2753,7 +2751,7 @@ void ProcessCronSystem(void){ } ObjectType ObjType = Obj.getObjectType(); - ObjectType ExpireTarget = ObjType.getAttribute(EXPIRETARGET); + ObjectType ExpireTarget = (int)ObjType.getAttribute(EXPIRETARGET); if(ObjType.getFlag(CONTAINER)){ int Remainder = 0; if(!ExpireTarget.isMapContainer() && ExpireTarget.getFlag(CONTAINER)){ |
