Author Topic: Quit bug, problems with inventory  (Read 2787 times)

Offline capo

  • Friend
  • **
  • Posts: 70
    • View Profile
Quit bug, problems with inventory
« on: September 18, 2006, 06:53:48 am »

This is an interesting bug.  I do not know what's causing it so anyone who might have an idea, let me know.  I've looked over interactive.c where the player quits, nothing there seems to cause this.



The bug!



When a player quits he or she is supposed to keep their inventory, but what happens now is that the player quits (and does keep their inventory) but everything they were wearing or had in their inventory is spawned again into the room.



For example:



As Capo I give Test armor:



> give armor to test

You remove magical breastplate.

You give Test magical breastplate.



Test has the armor:



> i

-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-

Total Items: 1                     Carried Weight: 50/7200

-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-



magical breastplate



-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-





Test quits... The workroom now looks like this:





     Obvious Exits: east, down



   magical breastplate

    a wooden chest

    a recycling bin





And test has the armor in his inventory.


Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1022
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
Quit bug, problems with inventory
« Reply #1 on: September 18, 2006, 07:07:31 am »

Please post the code for the armor, as well as

your /secure/include/config.h file.



Offline capo

  • Friend
  • **
  • Posts: 70
    • View Profile
Quit bug, problems with inventory
« Reply #2 on: September 18, 2006, 07:42:40 am »
code:



#ifndef s_config_h
#define s_config_h

#define DEFAULT_PROMPT           "> "
#define MUD_STATUS               "mudlib development"
#define ADMIN_EMAIL              "haven_mud@yahoo.com"
#define DEBUGGER                 "capo"
#define LOCAL_NEWS_PREFIX        "nm"

#define MUD_IS_LOCKED            0
#define AUTO_WIZ                 0
#define RESTRICTED_INTERMUD      0
#define DISABLE_INTERMUD         0
#define MINUTES_REBOOT_WARNING   20
#define TIME_TO_RESET            20000

#define GMT_OFFSET               -32000
#define MAX_LOG_SIZE             150000
#define MAX_NET_DEAD_TIME        1800
#define MIN_HISTORY_SIZE         10
#define MAX_HISTORY_SIZE         30

#define LOGON_TIMEOUT            360
#define IDLE_TIMEOUT             3600
#define LINK_WAIT_PERIOD         1800
#define MAX_PASSWORD_TRIES       3
#define MIN_USER_NAME_LENGTH     2
#define MAX_USER_NAME_LENGTH     15
#define MAX_USER_CAP_NAME_LENGTH 20
#define LOCKED_ACCESS_ALLOWED    ({ "SECURE", "ASSIST", "ELDER", "TEST" })
#define SUPPORTED_CLIENTS       ({ "amcp", "amcp/1.1" })

#define HOUR_LENGTH              1200
#define DAY_LENGTH               20

#define MAX_NEWBIE_LEVEL         3
#define AUTOSAVE_TIME            450
#define MORTAL_POSITIONS         ({ "player", "high mortal", "ambassador" })

#define DEFAULT_GRAVITY          1.0
#define DEFAULT_ITEM_MESSAGE     "You do not see that here."
#define EXTRA_TIME_OFFSET        0
#define RESET_INTERMUD           0
#define ENGLISH_ONLY             0
#define HUMANS_ONLY              0
#define PINGING_MUDS             ({"Frontiers","Dead Souls"})
#define ENABLE_ENCUMBRANCE       1
#define GLOBAL_MONITOR           0
#define PLAYER_KILL              1

#endif /* s_config_h */





and the armor, though for what it's worth this happens with any and all items:



code:



#include <lib.h>
#include <armor_types.h>
#include <damage_types.h>
inherit LIB_ARMOR;

static void create(){
    armor::create();
    SetKeyName("breastplate");
    SetId( ({"breastplate", "armor", "magical breastplate"}) );
    SetAdjectives(({"generic"}));
    SetShort("%^RESET%^%^BOLD%^%^WHITE%^magical breastplate%^RESET%^");
    SetLong("A generic piece of armor of indeterminate proportions.");
    SetMass(50);
    SetArmorType(A_BODY_ARMOR);
    SetProtection(BLUNT, 3000);
    SetProtection(COLD, 3000);
    SetProtection(POISON, 3000);
    SetProtection(MAGIC, 3000);
    SetProtection(SHOCK, 3000);
    SetProtection(ACID, 3000);
    SetProtection(WATER, 3000);
    SetProtection(GAS, 3000);
    SetProtection(KNIFE, 3000);
    SetProtection(TRAUMA, 3000);
    SetProtection(HEAT, 3000);
    SetProtection(BLADE, 3000);
    SetProtection(DISEASE, 3000);
}
void init(){
    ::init();
}


Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1022
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
Quit bug, problems with inventory
« Reply #3 on: September 18, 2006, 08:07:45 am »

I can't reproduce your problem.



:(



Offline capo

  • Friend
  • **
  • Posts: 70
    • View Profile
Quit bug, problems with inventory
« Reply #4 on: September 18, 2006, 08:26:55 am »
I changed the way interactive.c works, some, to alter the way the room looks.  I bet it's in there somewhere.  I will have to look at that file again.  It's my nemisis.