Jump to content

Cian

Inactive Member
  • Posts

    6
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Cian

  1. Hello Guys,

    I want read a Vnum from Database... 

    However it does not work.

    My Source code :

    Spoiler

    long CItem::GetPetVnum()
    {
        char Query[1024 + 1];
        snprintf(Query, sizeof(Query), "SELECT Petvnum FROM pet_summon WHERE PetSummonItemVnum='%d'", GetVnum());
        std::auto_ptr<SQLMsg> msg(DBManager::instance().DirectQuery(Query));
        MYSQL_ROW row = mysql_fetch_row(msg->Get()->pSQLResult);
        long alrow = atoi(row[0]);
        sys_log(0, "TEST_VNUM : %d\n", alrow);
        return alrow;
    }

    5673950941c14cf08b271f5546eb5aa3.png

    What is wrong?

    Thanks for your help!

    Sorry for my bad English .. :D

    • Open:

    UserInterface/InstanceBaseEffect.cpp

    • Search:

    UINT CInstanceBase::GetNameColorIndex()

    • Go to:

    else if (IsNPC())

    • Add:

    int vnum = GetRace();
            if (vnum == yourpetvnum)
           {
                return NAMECOLOR_PET;
           }

    • Open:

    UserInterface/InstanceBase.h

    • Search:

    NAMECOLOR_PC,

    • Add:

    NAMECOLOR_PET,

    • Open:

    UserInterface/PythonCharacterManagerModule.cpp

    • Search:

    PyModule_AddIntConstant(poModule, "NAMECOLOR_PC", CInstanceBase::NAMECOLOR_NORMAL_PC);

    • Add:

    PyModule_AddIntConstant(poModule, "NAMECOLOR_PET", CInstanceBase::NAMECOLOR_PET);

    • Python:

     

    • Open: 

    root/introloading.py

     

    • Search: 

    chrmgr.NAMECOLOR_PC : colorInfo.CHR_NAME_RGB_PC,

    • Add: 

    chrmgr.NAMECOLOR_PET : colorInfo.CHR_NAME_RGB_PET,

     

    • Open:

    root/colorinfo.py

    • Add:

    CHR_NAME_RGB_PET = (0, 0, 255)##Blue

     

    I think this Works.

     

    Works:

    Ybyqc.jpg

     

    Best Regards Cian.
     

     

     

     

     

×
×
  • 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.