[ScryMUD] SVN Commit Info r964 - trunk/mud/grrmud/server
svn-log at scrymud.net
svn-log at scrymud.net
Sun Feb 24 16:50:04 PST 2008
Author: kaj
Date: 2008-02-24 16:50:04 -0800 (Sun, 24 Feb 2008)
New Revision: 964
Modified:
trunk/mud/grrmud/server/critter.cc
trunk/mud/grrmud/server/translations.spec
Log:
Dropping X coins now shows a message to the rest of the room.
Fixes bug MUD-194.
Modified: trunk/mud/grrmud/server/critter.cc
===================================================================
--- trunk/mud/grrmud/server/critter.cc 2008-02-24 19:37:34 UTC (rev 963)
+++ trunk/mud/grrmud/server/critter.cc 2008-02-25 00:50:04 UTC (rev 964)
@@ -5640,8 +5640,13 @@
return FALSE;
}//isOpen
+// Drops cnt gold coins in the room
/** Can fail if cnt is bad, does all messages. */
int critter::doDropCoins(int cnt) {
+ List<critter*> tmp_lst(getCurRoom()->getCrits());
+ Cell<critter*> cell(tmp_lst);
+ critter* crit_ptr;
+
if (GOLD < cnt) {
show(CS_TOO_LITTLE_GOLD);
return -1;
@@ -5651,10 +5656,21 @@
return -1;
}
else {
+ //go ahead with the drop
String buf(100);
Sprintf(buf, cstr(CS_DROP_I_COINS, *this), cnt);
show(buf);
+ //show message to everyone in the room
+ while((crit_ptr = cell.next())) {
+ if (crit_ptr != this) {
+ Sprintf(buf, cstr(CS_DROPS_I_COINS, *crit_ptr),
+ name_of_crit(*this, crit_ptr->SEE_BIT), cnt);
+ buf.Cap();
+ crit_ptr->show(buf);
+ }
+ }
+
object* gold;
gold = obj_to_sobj(obj_list[config.goldCoinsObject], getCurRoom()->getInv(),
getCurRoomNum());
Modified: trunk/mud/grrmud/server/translations.spec
===================================================================
--- trunk/mud/grrmud/server/translations.spec 2008-02-24 19:37:34 UTC (rev 963)
+++ trunk/mud/grrmud/server/translations.spec 2008-02-25 00:50:04 UTC (rev 964)
@@ -622,6 +622,10 @@
ser "Ispustio si %i dukata.\n"
~
+CS_DROPS_I_COINS
+ eng "%S drops %i coins.\n"
+ ~
+
CS_PUT_I_COINS
eng "You put %i coins in %S.\n"
~
More information about the ScryMUD
mailing list