chore: vcard removed
This commit is contained in:
@@ -97,7 +97,6 @@ enum
|
||||
|
||||
HEADER_GD_AUTH_LOGIN = 100,
|
||||
HEADER_GD_LOGIN_BY_KEY = 101,
|
||||
HEADER_GD_VCARD = 105,
|
||||
HEADER_GD_MALL_LOAD = 107,
|
||||
|
||||
HEADER_GD_MYSHOP_PRICELIST_UPDATE = 108, ///< 가격정보 갱신 요청
|
||||
@@ -222,8 +221,6 @@ enum
|
||||
|
||||
HEADER_DG_CHANGE_CHARACTER_PRIV = 127,
|
||||
|
||||
HEADER_DG_VCARD = 131,
|
||||
|
||||
HEADER_DG_CREATE_OBJECT = 140,
|
||||
HEADER_DG_DELETE_OBJECT = 141,
|
||||
HEADER_DG_UPDATE_LAND = 142,
|
||||
@@ -1157,15 +1154,6 @@ typedef struct SPacketGDHammerOfTor
|
||||
uint32_t delay;
|
||||
} TPacketGDHammerOfTor;
|
||||
|
||||
typedef struct SPacketGDVCard
|
||||
{
|
||||
uint32_t dwID;
|
||||
char szSellCharacter[CHARACTER_NAME_MAX_LEN + 1];
|
||||
char szSellAccount[LOGIN_MAX_LEN + 1];
|
||||
char szBuyCharacter[CHARACTER_NAME_MAX_LEN + 1];
|
||||
char szBuyAccount[LOGIN_MAX_LEN + 1];
|
||||
} TPacketGDVCard;
|
||||
|
||||
typedef struct SGuildReserve
|
||||
{
|
||||
uint32_t dwID;
|
||||
|
||||
@@ -1873,28 +1873,6 @@ void CClientManager::UpdateLand(DWORD * pdw)
|
||||
ForwardPacket(HEADER_DG_UPDATE_LAND, p, sizeof(building::TLand));
|
||||
}
|
||||
|
||||
void CClientManager::VCard(TPacketGDVCard * p)
|
||||
{
|
||||
sys_log(0, "VCARD: %u %s %s %s %s",
|
||||
p->dwID, p->szSellCharacter, p->szSellAccount, p->szBuyCharacter, p->szBuyAccount);
|
||||
|
||||
m_queue_vcard.push(*p);
|
||||
}
|
||||
|
||||
void CClientManager::VCardProcess()
|
||||
{
|
||||
if (!m_pkAuthPeer)
|
||||
return;
|
||||
|
||||
while (!m_queue_vcard.empty())
|
||||
{
|
||||
m_pkAuthPeer->EncodeHeader(HEADER_DG_VCARD, 0, sizeof(TPacketGDVCard));
|
||||
m_pkAuthPeer->Encode(&m_queue_vcard.front(), sizeof(TPacketGDVCard));
|
||||
|
||||
m_queue_vcard.pop();
|
||||
}
|
||||
}
|
||||
|
||||
// BLOCK_CHAT
|
||||
void CClientManager::BlockChat(TPacketBlockChat* p)
|
||||
{
|
||||
@@ -2375,10 +2353,6 @@ void CClientManager::ProcessPackets(CPeer * peer)
|
||||
UpdateLand((DWORD *) data);
|
||||
break;
|
||||
|
||||
case HEADER_GD_VCARD:
|
||||
VCard((TPacketGDVCard *) data);
|
||||
break;
|
||||
|
||||
case HEADER_GD_MARRIAGE_ADD:
|
||||
MarriageAdd((TPacketMarriageAdd *) data);
|
||||
break;
|
||||
@@ -2973,7 +2947,6 @@ int CClientManager::Process()
|
||||
}
|
||||
#endif
|
||||
|
||||
VCardProcess();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -370,10 +370,6 @@ class CClientManager : public CNetBase, public singleton<CClientManager>
|
||||
void DeleteObject(DWORD dwID);
|
||||
void UpdateLand(DWORD * pdw);
|
||||
|
||||
// VCard
|
||||
void VCard(TPacketGDVCard * p);
|
||||
void VCardProcess();
|
||||
|
||||
// BLOCK_CHAT
|
||||
void BlockChat(TPacketBlockChat * p);
|
||||
// END_OF_BLOCK_CHAT
|
||||
@@ -425,8 +421,6 @@ class CClientManager : public CNetBase, public singleton<CClientManager>
|
||||
std::vector<building::TObjectProto> m_vec_kObjectProto;
|
||||
std::map<DWORD, building::TObject *> m_map_pkObjectTable;
|
||||
|
||||
std::queue<TPacketGDVCard> m_queue_vcard;
|
||||
|
||||
bool m_bShutdowned;
|
||||
|
||||
TPlayerTableCacheMap m_map_playerCache; // 플레이어 id가 key
|
||||
|
||||
@@ -3744,11 +3744,6 @@ bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell)
|
||||
item->SetCount(item->GetCount()-1);
|
||||
break;
|
||||
|
||||
case 90008: // VCARD
|
||||
case 90009: // VCARD
|
||||
VCardUse(this, this, item);
|
||||
break;
|
||||
|
||||
case ITEM_ELK_VNUM: // 돈꾸러미
|
||||
{
|
||||
int iGold = item->GetSocket(0);
|
||||
|
||||
@@ -634,29 +634,6 @@ void DBManager::SendMoneyLog(BYTE type, DWORD vnum, int gold)
|
||||
db_clientdesc->DBPacket(HEADER_GD_MONEY_LOG, 0, &p, sizeof(p));
|
||||
}
|
||||
|
||||
void VCardUse(LPCHARACTER CardOwner, LPCHARACTER CardTaker, LPITEM item)
|
||||
{
|
||||
TPacketGDVCard p;
|
||||
|
||||
p.dwID = item->GetSocket(0);
|
||||
strlcpy(p.szSellCharacter, CardOwner->GetName(), sizeof(p.szSellCharacter));
|
||||
strlcpy(p.szSellAccount, CardOwner->GetDesc()->GetAccountTable().login, sizeof(p.szSellAccount));
|
||||
strlcpy(p.szBuyCharacter, CardTaker->GetName(), sizeof(p.szBuyCharacter));
|
||||
strlcpy(p.szBuyAccount, CardTaker->GetDesc()->GetAccountTable().login, sizeof(p.szBuyAccount));
|
||||
|
||||
db_clientdesc->DBPacket(HEADER_GD_VCARD, 0, &p, sizeof(TPacketGDVCard));
|
||||
|
||||
CardTaker->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%d분의 결제시간이 추가 되었습니다. (결제번호 %d)"), item->GetSocket(1) / 60, item->GetSocket(0));
|
||||
|
||||
LogManager::instance().VCardLog(p.dwID, CardTaker->GetX(), CardTaker->GetY(), g_stHostname.c_str(),
|
||||
CardOwner->GetName(), CardOwner->GetDesc()->GetHostName(),
|
||||
CardTaker->GetName(), CardTaker->GetDesc()->GetHostName());
|
||||
|
||||
ITEM_MANAGER::instance().RemoveItem(item);
|
||||
|
||||
sys_log(0, "VCARD_TAKE: %u %s -> %s", p.dwID, CardOwner->GetName(), CardTaker->GetName());
|
||||
}
|
||||
|
||||
void DBManager::RequestBlockException(const char *login, int cmd)
|
||||
{
|
||||
TPacketBlockException packet;
|
||||
|
||||
@@ -162,9 +162,6 @@ typedef struct SHighscoreRegisterQueryInfo
|
||||
bool bOrder;
|
||||
} THighscoreRegisterQueryInfo;
|
||||
|
||||
extern void VCardUse(LPCHARACTER CardOwner, LPCHARACTER CardTaker, LPITEM item);
|
||||
|
||||
|
||||
// ACCOUNT_DB
|
||||
class AccountDB : public singleton<AccountDB>
|
||||
{
|
||||
|
||||
@@ -439,12 +439,6 @@ bool CExchange::Done()
|
||||
|
||||
assert(empty_pos >= 0);
|
||||
|
||||
if (item->GetVnum() == 90008 || item->GetVnum() == 90009) // VCARD
|
||||
{
|
||||
VCardUse(m_pOwner, victim, item);
|
||||
continue;
|
||||
}
|
||||
|
||||
m_pOwner->SyncQuickslot(QUICKSLOT_TYPE_ITEM, item->GetCell(), 255);
|
||||
|
||||
item->RemoveFromCharacter();
|
||||
|
||||
@@ -243,8 +243,6 @@ protected:
|
||||
|
||||
void SetEventFlag(const char* c_pData);
|
||||
|
||||
void VCard(const char * c_pData);
|
||||
|
||||
void CreateObject(const char * c_pData);
|
||||
void DeleteObject(const char * c_pData);
|
||||
void UpdateLand(const char * c_pData);
|
||||
|
||||
@@ -1850,61 +1850,6 @@ void CInputDB::Notice(const char * c_pData)
|
||||
SendNotice(szBuf);
|
||||
}
|
||||
|
||||
void CInputDB::VCard(const char * c_pData)
|
||||
{
|
||||
TPacketGDVCard * p = (TPacketGDVCard *) c_pData;
|
||||
|
||||
sys_log(0, "VCARD: %u %s %s %s %s", p->dwID, p->szSellCharacter, p->szSellAccount, p->szBuyCharacter, p->szBuyAccount);
|
||||
|
||||
std::unique_ptr<SQLMsg> pmsg(DBManager::instance().DirectQuery("SELECT sell_account, buy_account, time FROM vcard WHERE id=%u", p->dwID));
|
||||
if (pmsg->Get()->uiNumRows != 1)
|
||||
{
|
||||
sys_log(0, "VCARD_FAIL: no data");
|
||||
return;
|
||||
}
|
||||
|
||||
MYSQL_ROW row = mysql_fetch_row(pmsg->Get()->pSQLResult);
|
||||
|
||||
if (strcmp(row[0], p->szSellAccount))
|
||||
{
|
||||
sys_log(0, "VCARD_FAIL: sell account differ %s", row[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!row[1] || *row[1])
|
||||
{
|
||||
sys_log(0, "VCARD_FAIL: buy account already exist");
|
||||
return;
|
||||
}
|
||||
|
||||
int time = 0;
|
||||
str_to_number(time, row[2]);
|
||||
|
||||
if (!row[2] || time < 0)
|
||||
{
|
||||
sys_log(0, "VCARD_FAIL: time null");
|
||||
return;
|
||||
}
|
||||
|
||||
std::unique_ptr<SQLMsg> pmsg1(DBManager::instance().DirectQuery("UPDATE GameTime SET LimitTime=LimitTime+%d WHERE UserID='%s'", time, p->szBuyAccount));
|
||||
|
||||
if (pmsg1->Get()->uiAffectedRows == 0 || pmsg1->Get()->uiAffectedRows == (uint32_t)-1)
|
||||
{
|
||||
sys_log(0, "VCARD_FAIL: cannot modify GameTime table");
|
||||
return;
|
||||
}
|
||||
|
||||
std::unique_ptr<SQLMsg> pmsg2(DBManager::instance().DirectQuery("UPDATE vcard,GameTime SET sell_pid='%s', buy_pid='%s', buy_account='%s', sell_time=NOW(), new_time=GameTime.LimitTime WHERE vcard.id=%u AND GameTime.UserID='%s'", p->szSellCharacter, p->szBuyCharacter, p->szBuyAccount, p->dwID, p->szBuyAccount));
|
||||
|
||||
if (pmsg2->Get()->uiAffectedRows == 0 || pmsg2->Get()->uiAffectedRows == (uint32_t)-1)
|
||||
{
|
||||
sys_log(0, "VCARD_FAIL: cannot modify vcard table");
|
||||
return;
|
||||
}
|
||||
|
||||
sys_log(0, "VCARD_SUCCESS: %s %s", p->szBuyAccount, p->szBuyCharacter);
|
||||
}
|
||||
|
||||
void CInputDB::GuildWarReserveAdd(TGuildWarReserve * p)
|
||||
{
|
||||
CGuildManager::instance().ReserveWarAdd(p);
|
||||
@@ -2235,10 +2180,6 @@ int CInputDB::Analyze(LPDESC d, BYTE bHeader, const char * c_pData)
|
||||
SetEventFlag(c_pData);
|
||||
break;
|
||||
|
||||
case HEADER_DG_VCARD:
|
||||
VCard(c_pData);
|
||||
break;
|
||||
|
||||
case HEADER_DG_CREATE_OBJECT:
|
||||
CreateObject(c_pData);
|
||||
break;
|
||||
|
||||
@@ -245,12 +245,6 @@ void LogManager::BootLog(const char * c_pszHostName, BYTE bChannel)
|
||||
c_pszHostName, bChannel);
|
||||
}
|
||||
|
||||
void LogManager::VCardLog(DWORD vcard_id, DWORD x, DWORD y, const char * hostname, const char * giver_name, const char * giver_ip, const char * taker_name, const char * taker_ip)
|
||||
{
|
||||
Query("INSERT DELAYED INTO vcard_log (vcard_id, x, y, hostname, giver_name, giver_ip, taker_name, taker_ip) VALUES(%u, %u, %u, '%s', '%s', '%s', '%s', '%s')",
|
||||
vcard_id, x, y, hostname, giver_name, giver_ip, taker_name, taker_ip);
|
||||
}
|
||||
|
||||
void LogManager::FishLog(DWORD dwPID, int prob_idx, int fish_id, int fish_level, DWORD dwMiliseconds, DWORD dwVnum, DWORD dwValue)
|
||||
{
|
||||
Query("INSERT INTO fish_log%s VALUES(NOW(), %u, %d, %u, %d, %u, %u, %u)",
|
||||
|
||||
@@ -46,7 +46,6 @@ class LogManager : public singleton<LogManager>
|
||||
void ShoutLog(BYTE bChannel, BYTE bEmpire, const char * pszText);
|
||||
void LevelLog(LPCHARACTER pChar, unsigned int level, unsigned int playhour);
|
||||
void BootLog(const char * c_pszHostName, BYTE bChannel);
|
||||
void VCardLog(DWORD vcard_id, DWORD x, DWORD y, const char * hostname, const char * giver_name, const char * giver_ip, const char * taker_name, const char * taker_ip);
|
||||
void FishLog(DWORD dwPID, int prob_idx, int fish_id, int fish_level, DWORD dwMiliseconds, DWORD dwVnum = false, DWORD dwValue = 0);
|
||||
void QuestRewardLog(const char * c_pszQuestName, DWORD dwPID, DWORD dwLevel, int iValue1, int iValue2);
|
||||
void DetailLoginLog(bool isLogin, LPCHARACTER ch);
|
||||
|
||||
@@ -345,36 +345,28 @@ int CShop::Buy(LPCHARACTER ch, BYTE pos)
|
||||
{
|
||||
m_pkPC->SyncQuickslot(QUICKSLOT_TYPE_ITEM, item->GetCell(), 255);
|
||||
|
||||
if (item->GetVnum() == 90008 || item->GetVnum() == 90009) // VCARD
|
||||
char buf[512];
|
||||
|
||||
if (item->GetVnum() >= 80003 && item->GetVnum() <= 80007)
|
||||
{
|
||||
VCardUse(m_pkPC, ch, item);
|
||||
item = NULL;
|
||||
snprintf(buf, sizeof(buf), "%s FROM: %u TO: %u PRICE: %u", item->GetName(), ch->GetPlayerID(), m_pkPC->GetPlayerID(), dwPrice);
|
||||
LogManager::instance().GoldBarLog(ch->GetPlayerID(), item->GetID(), SHOP_BUY, buf);
|
||||
LogManager::instance().GoldBarLog(m_pkPC->GetPlayerID(), item->GetID(), SHOP_SELL, buf);
|
||||
}
|
||||
|
||||
item->RemoveFromCharacter();
|
||||
if (item->IsDragonSoul())
|
||||
item->AddToCharacter(ch, TItemPos(DRAGON_SOUL_INVENTORY, iEmptyPos));
|
||||
else
|
||||
{
|
||||
char buf[512];
|
||||
item->AddToCharacter(ch, TItemPos(INVENTORY, iEmptyPos));
|
||||
ITEM_MANAGER::instance().FlushDelayedSave(item);
|
||||
|
||||
|
||||
if (item->GetVnum() >= 80003 && item->GetVnum() <= 80007)
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "%s FROM: %u TO: %u PRICE: %u", item->GetName(), ch->GetPlayerID(), m_pkPC->GetPlayerID(), dwPrice);
|
||||
LogManager::instance().GoldBarLog(ch->GetPlayerID(), item->GetID(), SHOP_BUY, buf);
|
||||
LogManager::instance().GoldBarLog(m_pkPC->GetPlayerID(), item->GetID(), SHOP_SELL, buf);
|
||||
}
|
||||
|
||||
item->RemoveFromCharacter();
|
||||
if (item->IsDragonSoul())
|
||||
item->AddToCharacter(ch, TItemPos(DRAGON_SOUL_INVENTORY, iEmptyPos));
|
||||
else
|
||||
item->AddToCharacter(ch, TItemPos(INVENTORY, iEmptyPos));
|
||||
ITEM_MANAGER::instance().FlushDelayedSave(item);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s %u(%s) %u %u", item->GetName(), m_pkPC->GetPlayerID(), m_pkPC->GetName(), dwPrice, item->GetCount());
|
||||
LogManager::instance().ItemLog(ch, item, "SHOP_BUY", buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s %u(%s) %u %u", item->GetName(), m_pkPC->GetPlayerID(), m_pkPC->GetName(), dwPrice, item->GetCount());
|
||||
LogManager::instance().ItemLog(ch, item, "SHOP_BUY", buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s %u(%s) %u %u", item->GetName(), ch->GetPlayerID(), ch->GetName(), dwPrice, item->GetCount());
|
||||
LogManager::instance().ItemLog(m_pkPC, item, "SHOP_SELL", buf);
|
||||
}
|
||||
snprintf(buf, sizeof(buf), "%s %u(%s) %u %u", item->GetName(), ch->GetPlayerID(), ch->GetName(), dwPrice, item->GetCount());
|
||||
LogManager::instance().ItemLog(m_pkPC, item, "SHOP_SELL", buf);
|
||||
|
||||
r_item.pkItem = NULL;
|
||||
BroadcastUpdateItem(pos);
|
||||
|
||||
Reference in New Issue
Block a user