Cian
-
Posts
6 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by Cian
-
-
Hello Guys,
I want read a Vnum from Database...
However it does not work.
My Source code :
Spoilerlong 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;
}What is wrong?
Thanks for your help!
Sorry for my bad English ..
-
Download from Windows Server Source?
-
Nice Thanks!
-
- 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:
Best Regards Cian.
-
Thanks
~Cian
[C++] Read from Database
in Community Support - Questions & Answers
Posted
Thanks all for help !