[ScryMUD] SVN Commit Info r725 - branches/version-2-1/mud/grrmud/server
scrymud at wanfear.com
scrymud at wanfear.com
Thu Dec 2 04:03:56 PST 2004
Author: eroper
Date: 2004-12-02 04:03:54 -0800 (Thu, 02 Dec 2004)
New Revision: 725
Modified:
branches/version-2-1/mud/grrmud/server/command2.cc
branches/version-2-1/mud/grrmud/server/object.h
Log:
I think I've fixed price display issues with vending machines, though I'm not
really sure what I may have broken in the process ;)
--Khaav
Modified: branches/version-2-1/mud/grrmud/server/command2.cc
===================================================================
--- branches/version-2-1/mud/grrmud/server/command2.cc 2004-12-02 10:44:56 UTC (rev 724)
+++ branches/version-2-1/mud/grrmud/server/command2.cc 2004-12-02 12:03:54 UTC (rev 725)
@@ -1976,7 +1976,7 @@
&restrict_buf);
}
else {
- Sprintf(buf, " [%i][%i]%P06 [*%i]%P12 %S%P50%i %S", id_num,
+ Sprintf(buf, " [%i][min lvl: %i]%P06 [qty: %i]%P12 %S%P50%i %S", id_num,
obj_ptr->getLevel(),
item_counts[id_num], &(obj_ptr->short_desc), price,
&restrict_buf);
@@ -1989,14 +1989,14 @@
hack = -1;
}
if (obj_ptr->in_list || (item_counts[id_num] == 1)) {
- Sprintf(buf, " [%i][%i]%P12 %S%P50%i %S", hack,
+ Sprintf(buf, " [%i][min lvl: %i]%P12 %S%P50%i %S", hack,
obj_ptr->getLevel(),
&(obj_ptr->short_desc),
price,
&restrict_buf);
}
else {
- Sprintf(buf, " [%i][%i] [*%i]%P12 %S%P50%i %S", hack,
+ Sprintf(buf, " [%i][min lvl: %i] [qty: %i]%P12 %S%P50%i %S", hack,
obj_ptr->getLevel(),
item_counts[id_num],
&(obj_ptr->short_desc), price,
@@ -2032,8 +2032,8 @@
if (crit_owner) {
price = crit_owner->findItemSalePrice(*obj_ptr, pc);
}
- else if (obj_owner) {
- price = obj_owner->getDefaultPrice();
+ else if (obj_owner->isVendingMachine()) {
+ price = obj_ptr->getDefaultPrice();
}
else {
return -1;
Modified: branches/version-2-1/mud/grrmud/server/object.h
===================================================================
--- branches/version-2-1/mud/grrmud/server/object.h 2004-12-02 10:44:56 UTC (rev 724)
+++ branches/version-2-1/mud/grrmud/server/object.h 2004-12-02 12:03:54 UTC (rev 725)
@@ -278,6 +278,7 @@
int isCoins() const { return OBJ_FLAGS.get(55); }
int isNoDonate() const { return OBJ_FLAGS.get(4); }
int isHerb() const;
+ int isVendingMachine() const { return obj_flags.get(73); }
int isPaused() const { return pause > 0; }
int isModified() const { return (in_list && 1); } //ie is it a SOBJ
int hasScript() const { return obj_flags.get(76); }
More information about the ScryMUD
mailing list