diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-06-13 03:35:56 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-06-13 03:35:56 -0300 |
| commit | 15b40c7915fca14e537534ae9ba03f3add965943 (patch) | |
| tree | de3ee3c61962b300bd7457cc81845e7891c4b896 /src/map.cc | |
| parent | 7d298e5a4119df0910daa070af1d23567a83e90c (diff) | |
| download | game-15b40c7915fca14e537534ae9ba03f3add965943.tar.gz game-15b40c7915fca14e537534ae9ba03f3add965943.zip | |
more work on `operate.cc`
Diffstat (limited to 'src/map.cc')
| -rw-r--r-- | src/map.cc | 27 |
1 files changed, 0 insertions, 27 deletions
@@ -1971,33 +1971,6 @@ void ChangeObject(Object Obj, INSTANCEATTRIBUTE Attribute, uint32 Value){ Obj.setAttribute(Attribute, Value); } -// TODO(fusion): This probably belongs to `operate.cc`. -void ChangeObject(Object Obj, ObjectType NewType, uint32 Value){ - if(!Obj.exists()){ - error("ChangeObject: Übergebenes Objekt existiert nicht (1, NewType=%d).\n", NewType.TypeID); - return; - } - - // TODO(fusion): Why are we checking if `Obj` exists a second time? There is - // no reason to assume `Obj.getContainer()` would change anything since the - // first call. - Object Con = Obj.getContainer(); - if(!Obj.exists()){ - error("ChangeObject: Übergebenes Objekt existiert nicht (2, NewType=%d).\n", NewType.TypeID); - return; - } - - ObjectType ObjType = Obj.getObjectType(); - if(ObjType.getFlag(CUMULATIVE)){ - uint32 Amount = Obj.getAttribute(AMOUNT); - if(Amount > 1){ - Move(0, Obj, Con, Amount - 1, true, NONE); - } - } - - Change(Obj, NewType, Value); -} - int GetObjectPriority(Object Obj){ if(!Obj.exists()){ error("GetObjectPriority: Übergebenes Objekt existiert nicht.\n"); |
