|
From: <gjh...@us...> - 2003-09-02 07:37:44
|
Update of /cvsroot/mistmud/mistmud
In directory sc8-pr-cvs1:/tmp/cvs-serv31663
Modified Files:
Tag: rev_1_3
protos.h reception.c utility.c
Log Message:
- make it so unrentables say they are (Magic Mushroom!)
Index: protos.h
===================================================================
RCS file: /cvsroot/mistmud/mistmud/protos.h,v
retrieving revision 1.8.2.7
retrieving revision 1.8.2.8
diff -C2 -d -r1.8.2.7 -r1.8.2.8
*** protos.h 1 Sep 2003 15:56:39 -0000 1.8.2.7
--- protos.h 2 Sep 2003 07:37:40 -0000 1.8.2.8
***************
*** 2090,2094 ****
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);
--- 2090,2094 ----
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.6.2.4
retrieving revision 1.6.2.5
diff -C2 -d -r1.6.2.4 -r1.6.2.5
*** reception.c 31 Aug 2003 05:49:40 -0000 1.6.2.4
--- reception.c 2 Sep 2003 07:37:40 -0000 1.6.2.5
***************
*** 153,162 ****
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] );
}
--- 153,162 ----
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.5.2.9
retrieving revision 1.5.2.10
diff -C2 -d -r1.5.2.9 -r1.5.2.10
*** utility.c 1 Sep 2003 15:58:31 -0000 1.5.2.9
--- utility.c 2 Sep 2003 07:37:40 -0000 1.5.2.10
***************
*** 3191,3195 ****
}
! int CountUnrentable(struct char_data *ch, struct obj_data *obj)
{
int total = 0;
--- 3191,3195 ----
}
! int CountUnrentable(struct char_data *ch, struct obj_data *obj, int warn)
{
int total = 0;
***************
*** 3200,3213 ****
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++;
}
--- 3200,3219 ----
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++;
}
|