[ScryMUD] SVN Commit Info r827 - trunk/mud/grrmud/server
scrymud at wanfear.com
scrymud at wanfear.com
Fri Jan 7 20:30:25 PST 2005
Author: eroper
Date: 2005-01-07 20:30:25 -0800 (Fri, 07 Jan 2005)
New Revision: 827
Modified:
trunk/mud/grrmud/server/command3.cc
trunk/mud/grrmud/server/command4.cc
trunk/mud/grrmud/server/mapper.cc
trunk/mud/grrmud/server/mapper.h
trunk/mud/grrmud/server/regex.cc
trunk/mud/grrmud/server/regex.h
Log:
Unmaking a container with inventory should be safe now.
Added a comment to special handling of bulletin boards in "do_junk"
Updated some Copyright headers.
Modified: trunk/mud/grrmud/server/command3.cc
===================================================================
--- trunk/mud/grrmud/server/command3.cc 2005-01-08 03:22:41 UTC (rev 826)
+++ trunk/mud/grrmud/server/command3.cc 2005-01-08 04:30:25 UTC (rev 827)
@@ -2511,6 +2511,11 @@
}//if
pc.GOLD += ((obj_ptr->PRICE / 50) + 1);
+ /* This special case is handled because bulletin board postings
+ * have post numbers which are treated like obj nums and therefore
+ * we'd accidently reduce cur_in_game counts for whatever objects
+ * the posting numbers coincided with
+ */
if (!obj_ptr->isBulletinBoard()) {
recursive_init_unload(*obj_ptr, 0);
}
Modified: trunk/mud/grrmud/server/command4.cc
===================================================================
--- trunk/mud/grrmud/server/command4.cc 2005-01-08 03:22:41 UTC (rev 826)
+++ trunk/mud/grrmud/server/command4.cc 2005-01-08 04:30:25 UTC (rev 827)
@@ -3093,7 +3093,24 @@
case 54: //container
if ( ! obj_ptr->isContainer() ) {
// was a container, now it's not.
- obj_ptr->inv.clearAndDestroy();
+ Cell<object*> inv_cll(obj_ptr->inv);
+ object* o_ptr;
+
+ //reduce cur_in_game counts.
+ while ( o_ptr = inv_cll.next() ) {
+ recursive_init_unload(*o_ptr, 0);
+
+ if (obj_ptr->isModified()) {
+ delete obj_ptr;
+ }//if is a SOBJ
+ obj_ptr->inv.lose(inv_cll);
+ }
+
+ // clear_obj_list(inv); <-- Think this is missing
+ // recursive_init_unloads. Maybe it shouldn't have it
+ // though. If it should in fact call recursive_init_unloads,
+ // I should fix it and use it instead of the above.
+
delete obj_ptr->bag;
obj_ptr->bag = NULL;
} else {
Modified: trunk/mud/grrmud/server/mapper.cc
===================================================================
--- trunk/mud/grrmud/server/mapper.cc 2005-01-08 03:22:41 UTC (rev 826)
+++ trunk/mud/grrmud/server/mapper.cc 2005-01-08 04:30:25 UTC (rev 827)
@@ -2,7 +2,7 @@
//
//ScryMUD Server Code
-//Copyright (C) 1998 Ben Greear
+//Copyright (C) 2005 Edward Roper
//
//This program is free software; you can redistribute it and/or
//modify it under the terms of the GNU General Public License
@@ -18,8 +18,7 @@
//along with this program; if not, write to the Free Software
//Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
-// To contact the Author, Ben Greear: greear at cyberhighway.net, (preferred)
-// greearb at agcs.com
+// To contact the Author, Edward Roper: eroper at wanfear.com
//
#include "mapper.h"
Modified: trunk/mud/grrmud/server/mapper.h
===================================================================
--- trunk/mud/grrmud/server/mapper.h 2005-01-08 03:22:41 UTC (rev 826)
+++ trunk/mud/grrmud/server/mapper.h 2005-01-08 04:30:25 UTC (rev 827)
@@ -2,7 +2,7 @@
//
//ScryMUD Server Code
-//Copyright (C) 1998 Ben Greear
+//Copyright (C) 2005 Edward Roper
//
//This program is free software; you can redistribute it and/or
//modify it under the terms of the GNU General Public License
@@ -18,8 +18,7 @@
//along with this program; if not, write to the Free Software
//Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
-// To contact the Author, Ben Greear: greear at cyberhighway.net, (preferred)
-// greearb at agcs.com
+// To contact the Author, Edward Roper: eroper at wanfear.com
//
#ifndef GRRMUD_MAPPER_INCLUDE_H
Modified: trunk/mud/grrmud/server/regex.cc
===================================================================
--- trunk/mud/grrmud/server/regex.cc 2005-01-08 03:22:41 UTC (rev 826)
+++ trunk/mud/grrmud/server/regex.cc 2005-01-08 04:30:25 UTC (rev 827)
@@ -3,7 +3,7 @@
//
//ScryMUD Server Code
-//Copyright (C) 1998 Ben Greear
+//Copyright (C) 2005 Edward Roper
//
//This program is free software; you can redistribute it and/or
//modify it under the terms of the GNU General Public License
@@ -19,9 +19,9 @@
//along with this program; if not, write to the Free Software
//Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
-// To contact the Author, Ben Greear: greear at cyberhighway.net, (preferred)
-// greearb at agcs.com
+// To contact the Author, Edward Roper: eroper at wanfear.com
//
+
#include "regex.h"
regex::regex() {
Modified: trunk/mud/grrmud/server/regex.h
===================================================================
--- trunk/mud/grrmud/server/regex.h 2005-01-08 03:22:41 UTC (rev 826)
+++ trunk/mud/grrmud/server/regex.h 2005-01-08 04:30:25 UTC (rev 827)
@@ -3,7 +3,7 @@
//
//ScryMUD Server Code
-//Copyright (C) 1998 Ben Greear
+//Copyright (C) 2005 Edward Roper
//
//This program is free software; you can redistribute it and/or
//modify it under the terms of the GNU General Public License
@@ -19,8 +19,7 @@
//along with this program; if not, write to the Free Software
//Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
-// To contact the Author, Ben Greear: greear at cyberhighway.net, (preferred)
-// greearb at agcs.com
+// To contact the Author, Edward Roper: eroper at wanfear.com
//
#ifndef GRRMUD_REGEX_INCLUDE_H
More information about the ScryMUD
mailing list