[ScryMUD] SVN Commit Info r885 - trunk/mud/grrmud/server

scrymud at wanfear.com scrymud at wanfear.com
Tue Feb 20 00:57:34 PST 2007


Author: eroper
Date: 2007-02-20 00:57:33 -0800 (Tue, 20 Feb 2007)
New Revision: 885

Modified:
   trunk/mud/grrmud/server/command2.cc
   trunk/mud/grrmud/server/critter.h
Log:
mstat now diplays the owners name for player-owned-shopkeepers


Modified: trunk/mud/grrmud/server/command2.cc
===================================================================
--- trunk/mud/grrmud/server/command2.cc	2007-02-19 06:24:40 UTC (rev 884)
+++ trunk/mud/grrmud/server/command2.cc	2007-02-20 08:57:33 UTC (rev 885)
@@ -2434,7 +2434,8 @@
                     crit_ptr->mob->getBadAssedness(),
                     crit_ptr->mob->getSocialAwareness());
             show(buf2, pc);
-            if (crit_ptr->mob->proc_data->sh_data) {
+
+            if ( crit_ptr->mob->proc_data->hasShopData() ) {
                show("Its a shopkeeper.\n", pc);
                Sprintf(buf2, "markup  %i, buy_percentage  %i, open_time %i",
                        crit_ptr->MARKUP, crit_ptr->BUY_PERCENTAGE, 
@@ -2445,21 +2446,31 @@
                out_field(crit_ptr->SHOP_DATA_FLAGS, pc, SHOP_DATA_FLAGS_NAMES);
                show("Permanent Inventory:\n", pc);
                out_inv(crit_ptr->PERM_INV, pc, CRIT_INV);
+
+               if ( crit_ptr->isPlayerShopKeeper() ) {
+                  Sprintf(buf2, "Owned by the player: %S\n", crit_ptr->mob->proc_data->sh_data->getManager() );
+                  pc.show(buf2);
+               }
+
             }//if shopkeeper
 
             if (crit_ptr->mob->proc_data->teach_data) {
                show("Its a TEACHER.\n", pc);
                out_field(crit_ptr->TEACH_DATA_FLAGS, pc, TEACH_DATA_FLAGS_NAMES);
             }//if
+
             if (crit_ptr->mob->proc_data->give_proc) {
               show("It HAS a give proc.\n", pc);
             }//if
+
             if (crit_ptr->mob->proc_data->bow_proc) {
               show("It HAS a bow proc.\n", pc);
             }//if
+
             if (crit_ptr->mob->proc_data->curse_proc) {
               show("It HAS a curse proc.\n", pc);
             }//if
+
             Cell<say_proc_cell*> sp_cll(crit_ptr->mob->proc_data->topics);
             say_proc_cell* sp_ptr;
             while ((sp_ptr = sp_cll.next())) {

Modified: trunk/mud/grrmud/server/critter.h
===================================================================
--- trunk/mud/grrmud/server/critter.h	2007-02-19 06:24:40 UTC (rev 884)
+++ trunk/mud/grrmud/server/critter.h	2007-02-20 08:57:33 UTC (rev 885)
@@ -259,6 +259,7 @@
    void valueSet(int val_idx, int sell_val, int buy_val, critter& manager);
 
    int isPlayerShopKeeper() { return shop_data_flags.get(3); }
+   const String* getManager() const { return &manager; }
 
    int findItemSalePrice(object& obj);
    int findItemBuyPrice(object& obj);




More information about the ScryMUD mailing list