Language: 
To browser these website, it's necessary to store cookies on your computer.
The cookies contain no personal information, they are required for program control.
  the storage of cookies while browsing this website, on Login and Register.

Author Topic:  nasty bug in ThingPickUp  (Read 48 times)

0 Members and 0 Guests are viewing this topic.

Dolfo

« on: 11, January 2022, 16:26:35 »
When trying to transfer 1000 copper from inventar with get in a pouch, the check for the weight is missing. You have a nasty block bug there.

One if else block is one level to low, check must be relativ to container corpse check, not above this.
item.c line 536
Code: [Select]
/* Apart from corpses, certain types of object can not be put in
* containers. */
if ((where->subtype & 1) != SUBTYPE_CONTAINER_CORPSE)
{
  /* Containers can't be put in other containers. As per #00099 from
  * Shroud, corpses are an exception to this. */
  if (what->type == CONTAINER)
  {
    if (pl)
    {
      ndi(NDI_UNIQUE, 0, who, "Containers can't be put in other containers!");
    }

    return NULL;
  }
  /* where may be a container which cannot hold what. */
  else if (where->race &&
         where->race != what->race)
  {
  if (pl)
    {
      ndi(NDI_UNIQUE, 0, who, "Only ~%s~ can be put into %s!",
            where->race, query_name(where, who, ARTICLE_DEFINITE, 0));
    }

    return NULL;
  }

  /* Check that where has enough space for what. */
  /* TODO: If nrof > 1 perhaps split what to fit? */
  else if (where->weight_limit < where->carrying + weight)
  {
    if (pl)
    {
       ndi(NDI_UNIQUE, 0, who, "%s %s too heavy to fit in %s!",
             query_name(what, who, ARTICLE_DEFINITE, 0),
             (nrof > 1) ? "are" : "is",
             query_name(where, who, ARTICLE_DEFINITE, 0));
     }
     return NULL;
   }
 }
Don't believe the shit, you hear in mainstream. Believe your own body. Your body is speaking always the true to you. But you need to understand your body. Hear to your body, not to your ego. And when body is calling to you: "Hey something is wrong!" find the reason(s) for that. Man in White don't go for that, they don't want to heal you. They want earn money and sell you medicine, you should take rest of your life. You are not the patient, you are their customer. Never forget this!

Tags:
 

Related Topics

  Subject / Started by Replies Last post
1 Replies
16321 Views
Last post 04, May 2005, 01:08:31
by michtoen
2 Replies
820 Views
Last post 17, June 2006, 12:04:06
by dwarrior
3 Replies
910 Views
Last post 14, March 2007, 09:25:51
by grommit
4 Replies
1260 Views
Last post 10, April 2008, 08:10:54
by Torchwood
2 Replies
4667 Views
Last post 25, December 2009, 14:54:56
by tarriel