Jump to content

Recommended Posts

Hi, i maked new GMLevel (GM_VIP)

 

in char.cpp have 

 

 

if (GetGMLevel() == GM_VIP)

{
m_afAffectFlag.Set(AFF_VIP);
}

 

in affect.h on line 45

 

 

AFF_VIP,

 

in instancebase.h have

 

 

AFFECT_VIP = 45,

 

in PythonCharacterModule.cpp have

 

 

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

 

 

in playersettingmodule.py have

 

 

chrmgr.RegisterEffect(chrmgr.EFFECT_AFFECT+45, "Bip01", localeInfo.FN_VIP_MARK)

 
and in game i didn't see my Vip logo on my hat..
 
where i have error? ..

 

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

char szQuery[512];
snprintf(szQuery,sizeof(szQuery),"SELECT isvip FROM player.player WHERE id = %u",GetPlayerID())
std::auto_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery(szQuery));

if(pMsg.get() && pMsg->Get()->uiNumRows > 0)
{
	MYSQL_ROW row = mysql_fetch_row(pMsg->Get()->pSQLResult);
	BYTE temp = 0;
	str_to_number(temp,row[0]);
	
	bool isVip = temp ? true : false;
	
	if(isVip)
		m_afAffectFlag.Set(AFF_VIP);
}

Check player is vip or not.

 

Kind Regards

Ken ~ TA

Do not be sorry, be better.

Link to comment
Share on other sites

i have this

 

if (!test_server)
{
if (GetGMLevel() > GM_LOW_WIZARD)
{
m_afAffectFlag.Set(AFF_YMIR);
m_bPKMode = PK_MODE_PROTECT;
}
if (GetGMLevel() == GM_VIP)
{
m_afAffectFlag.Set(AFF_VIP);
}
}

if player have GMLevel GM_VIP in gmlist game set AFF_VIP

 

if i change AFF_VIP to AFF_YMIR and i'm VIP i see GM logo on my had..

Link to comment
Share on other sites

  • 4 months later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



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