|
From: <gjh...@us...> - 2003-09-02 07:36:25
|
Update of /cvsroot/mistmud/mistmud
In directory sc8-pr-cvs1:/tmp/cvs-serv31397
Modified Files:
protos.h reception.c utility.c
Log Message:
- make it so unrentables actually say they are unrentable (Magic Mushroom!)
Index: protos.h
===================================================================
RCS file: /cvsroot/mistmud/mistmud/protos.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** protos.h 17 Aug 2003 03:20:10 -0000 1.10
--- protos.h 2 Sep 2003 07:36:18 -0000 1.11
***************
*** 2109,2113 ****
int CountRare(struct obj_data *obj);
int CountNonRare(struct obj_data *obj);
! int CountUnrentable(struct char_data *ch, struct obj_data *obj);
char *lower(char *s);
int getFreeAffSlot( struct obj_data *obj);
--- 2109,2113 ----
int CountRare(struct obj_data *obj);
int CountNonRare(struct obj_data *obj);
! int CountUnrentable(struct char_data *ch, struct obj_data *obj, int warn);
char *lower(char *s);
int getFreeAffSlot( struct obj_data *obj);
Index: reception.c
===================================================================
RCS file: /cvsroot/mistmud/mistmud/reception.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** reception.c 14 Aug 2003 01:00:01 -0000 1.7
--- reception.c 2 Sep 2003 07:36:18 -0000 1.8
***************
*** 152,161 ****
non_rare = CountNonRare(ch->carrying);
rare = CountRare(ch->carrying);
! unrentable = CountUnrentable(ch, ch->carrying );
for (i = 0; i < MAX_WEAR; i++) {
non_rare += CountNonRare(ch->equipment[i]);
rare += CountRare(ch->equipment[i]);
! unrentable += CountUnrentable(ch, ch->equipment[i] );
}
--- 152,161 ----
non_rare = CountNonRare(ch->carrying);
rare = CountRare(ch->carrying);
! unrentable = CountUnrentable(ch, ch->carrying, (int)receptionist );
for (i = 0; i < MAX_WEAR; i++) {
non_rare += CountNonRare(ch->equipment[i]);
rare += CountRare(ch->equipment[i]);
! unrentable += CountUnrentable(ch, ch->equipment[i], (int)receptionist );
}
Index: utility.c
===================================================================
RCS file: /cvsroot/mistmud/mistmud/utility.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** utility.c 17 Aug 2003 03:20:11 -0000 1.8
--- utility.c 2 Sep 2003 07:36:19 -0000 1.9
***************
*** 3687,3691 ****
}
! int CountUnrentable(struct char_data *ch, struct obj_data *obj)
{
int total = 0;
--- 3687,3691 ----
}
! int CountUnrentable(struct char_data *ch, struct obj_data *obj, int warn)
{
int total = 0;
***************
*** 3696,3709 ****
if (obj->contains) {
! total += CountUnrentable(ch, obj->contains);
}
if (obj->next_content) {
! total += CountUnrentable(ch, obj->next_content);
}
if (obj->item_number <= -1) {
total++;
} else if (ItemEgoClash(ch, obj, 0) <= -5) {
! act("Sorry, but $p can't be stored, it's WAY too powerful for you.",
! FALSE, ch, obj, NULL, TO_CHAR);
total++;
}
--- 3696,3715 ----
if (obj->contains) {
! total += CountUnrentable(ch, obj->contains, warn);
}
if (obj->next_content) {
! total += CountUnrentable(ch, obj->next_content, warn);
}
if (obj->item_number <= -1) {
+ if( warn ) {
+ act("Sorry, but $p can't be stored.", FALSE, ch, obj, NULL,
+ TO_CHAR);
+ }
total++;
} else if (ItemEgoClash(ch, obj, 0) <= -5) {
! if( warn ) {
! act("Sorry, but $p can't be stored, it's WAY too powerful for "
! "you.", FALSE, ch, obj, NULL, TO_CHAR);
! }
total++;
}
|