Jump to content

Galet

Premium
  • Posts

    1384
  • Joined

  • Last visited

  • Days Won

    14
  • Feedback

    0%

Posts posted by Galet

  1. Judge by yourself. ^^

     

    ACMD(do_costume)
    {
        char buf[512];
        const size_t bufferSize = sizeof(buf);
    
        char arg1[256];
        one_argument(argument, arg1, sizeof(arg1));
    
        CItem* pBody = ch->GetWear(WEAR_COSTUME_BODY);
        CItem* pHair = ch->GetWear(WEAR_COSTUME_HAIR);
    
        ch->ChatPacket(CHAT_TYPE_INFO, "COSTUME status:");
    
        if (pHair)
        {
            const char* itemName = pHair->GetName();
            ch->ChatPacket(CHAT_TYPE_INFO, "  HAIR : %s", itemName);
    
            for (int i = 0; i < pHair->GetAttributeCount(); ++i)
            {
                const TPlayerItemAttribute& attr = pHair->GetAttribute(i);
                if (0 < attr.bType)
                {
                    snprintf(buf, bufferSize, FN_point_string(attr.bType), attr.sValue);
                    ch->ChatPacket(CHAT_TYPE_INFO, "     %s", buf);
                }
            }
    
            if (pHair->IsEquipped() && arg1[0] == 'h')
                ch->UnequipItem(pHair);
        }
    
        if (pBody)
        {
            const char* itemName = pBody->GetName();
            ch->ChatPacket(CHAT_TYPE_INFO, "  BODY : %s", itemName);
    
            if (pBody->IsEquipped() && arg1[0] == 'b')
                ch->UnequipItem(pBody);
        }
    }
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.