|
在callfromcli.c下增加
#ifdef _PET_ITEM_LOCK
petindex = CHAR_getCharPet( fd_charaindex, petarray );
if ( petindex != -1 )
{
if ( CHAR_getInt( petindex, CHAR_PETLOCK ) != PETLOCK )
{
char buffer[4096];
sprintf( buffer, "要使用( %s )必须首先进行灵魂刻印,灵魂刻印后才能使用该宠物,但从此以后该宠物便归你所有,不得进行交易。\n\n\n您要进行灵魂刻印吗?", CHAR_getChar( petindex, CHAR_NAME) );
CHAR_setWorkInt( fd_charaindex, CHAR_WORKINDEX, petindex );
lssproto_WN_send( fd, WINDOW_MESSAGETYPE_MESSAGEANDLINEINPUT, WINDOW_BUTTONTYPE_OKCANCEL, CHAR_WINDOWTYPE_PET_LOCK, -1, buffer );
return;
}
}
在trade.c下增加
#ifdef _PET_ITEM_LOCK
int havepetindex, petindex;
if ( getStringFromIndexWithDelim(message, "|", 6, token, sizeof(token)) == FALSE )
{
return;
}
if( ( havepetindex = atoi(token) ) < 0 )
{
return;
}
petindex = CHAR_getCharPet(meindex, havepetindex);
if( !CHAR_CHECKINDEX( petindex ))
{
return;
}
if ( CHAR_getInt( petindex, CHAR_PETLOCK ) != PETLOCK )
{
TRADE_Close( fd, meindex, message );
char buffer[4096];
sprintf( buffer, "( %s )是你的灵魂刻印宠物,无法交易。", CHAR_getChar( petindex, CHAR_NAME) );
CHAR_talkToCli( meindex, -1, buffer, CHAR_COLORRED );
return;
}
#endif |
|