PennMUSH Community

Changeset 809

Show
Ignore:
Timestamp:
05/03/07 18:07:35 (2 years ago)
Author:
shawnw
Message:

#7263: @wipe count and attribute trees, and help update

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 1.8.3/branches/devel/CHANGES.182

    r799 r809  
    4848 *  NetBSD compile and general warning fixes. [SW] 
    4949 *  Favor difftime(3) over subtraction of time_t variables. [SW] 
     50 *  Clarification of attribute trees in HELP @WIPE. Suggested by 
     51    Talvo. 
    5052 
    5153Version 1.8.2 patchlevel 3                      March 11, 2007 
  • 1.8.3/branches/devel/CHANGES.183

    r794 r809  
    5050  * wrap() of Pueblo tags didn't work very well. Fixed by 
    5151    Sketch. 
    52  
     52  * @wipe's count is accurate when attribute trees are being 
     53    deleted. Reported by Talvo. 
     54  
    5355Version 1.8.3 patchlevel 1                      March 11, 2007 
    5456 
  • 1.8.3/branches/devel/game/txt/hlp/penncmd.hlp

    r769 r809  
    35963596  all attributes which match that pattern. Note that the restrictions 
    35973597  above still apply. 
     3598 
     3599  When wiping an attribute that is the root of an attribute tree, all 
     3600  attributes in that tree will also be removed. 
    35983601& @wizwall 
    35993602  @wizwall[/emit] <message> 
  • 1.8.3/branches/devel/src/attrib.c

    r803 r809  
    680680  ATTR *ptr, **prev, *sub; 
    681681  size_t len; 
     682  int wiped = 0; 
    682683 
    683684  prev = &List(thing); 
     
    711712  atr_free_list = ptr; 
    712713  AttrCount(thing)--; 
     714  wiped++; 
    713715 
    714716  if (we_are_wiping && sub) { 
     
    727729      atr_free_list = ptr; 
    728730      AttrCount(thing)--; 
     731      wiped++; 
    729732 
    730733      ptr = *prev; 
    731734    } 
    732735  } 
    733   return 1
     736  return wiped
    734737} 
    735738 
     
    741744 * \param atr name of attribute to remove. 
    742745 * \param player enactor attempting to remove attribute. 
    743  * \retval 0 no attribute found to reset 
     746 * \retval The number of attributes removed. 
    744747 * \retval AE_SAFE attribute is safe 
    745748 * \retval AE_ERROR other failure 
     
    758761 * \param atr name of attribute to remove. 
    759762 * \param player enactor attempting to remove attribute. 
    760  * \retval 0 no attribute found to reset 
     763 * \retval The number of attributes removed 
    761764 * \retval AE_SAFE attribute is safe 
    762765 * \retval AE_ERROR other failure 
  • 1.8.3/branches/devel/src/db.c

    r807 r809  
    13821382      } 
    13831383 
    1384       if (IsPlayer(i) && (strlen(o->name) > PLAYER_NAME_LIMIT)) { 
     1384      if (IsPlayer(i) && (strlen(o->name) > (size_t)PLAYER_NAME_LIMIT)) { 
    13851385    char buff[BUFFER_LEN + 1];  /* The name plus a NUL */ 
    13861386    strncpy(buff, o->name, PLAYER_NAME_LIMIT); 
  • 1.8.3/branches/devel/src/set.c

    r803 r809  
    10951095   * attr still works, though. 
    10961096   */ 
     1097  int wiped; 
     1098 
    10971099  if (wildcard(pattern) && AF_Wizard(atr) && !God(player)) 
    10981100    return 0; 
    10991101 
    1100   switch (wipe_atr(thing, AL_NAME(atr), player)) { 
    1101   case 0: 
    1102     return 0; 
     1102  switch ((wiped = wipe_atr(thing, AL_NAME(atr), player))) { 
    11031103  case AE_SAFE: 
    11041104    notify_format(player, T("Attribute %s is SAFE. Set it !SAFE to modify it."), 
     
    11091109    return 0; 
    11101110  default: 
    1111     return 1
     1111    return wiped
    11121112  } 
    11131113}