本文整理汇总了C++中LPCHARACTER::SetMyShopTime方法的典型用法代码示例。如果您正苦于以下问题:C++ LPCHARACTER::SetMyShopTime方法的具体用法?C++ LPCHARACTER::SetMyShopTime怎么用?C++ LPCHARACTER::SetMyShopTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LPCHARACTER
的用法示例。
在下文中一共展示了LPCHARACTER::SetMyShopTime方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StopShopping
// 상점 거래를 종료
void CShopManager::StopShopping(LPCHARACTER ch)
{
LPSHOP shop;
if (!(shop = ch->GetShop()))
return;
//PREVENT_ITEM_COPY;
ch->SetMyShopTime();
//END_PREVENT_ITEM_COPY
shop->RemoveGuest(ch);
sys_log(0, "SHOP: END: %s", ch->GetName());
}
示例2: Buy
// 아이템 구입
void CShopManager::Buy(LPCHARACTER ch, BYTE pos)
{
if (!ch->GetShop())
return;
if (!ch->GetShopOwner())
return;
if (DISTANCE_APPROX(ch->GetX() - ch->GetShopOwner()->GetX(), ch->GetY() - ch->GetShopOwner()->GetY()) > 2000)
{
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("상점과의 거리가 너무 멀어 물건을 살 수 없습니다."));
return;
}
CShop* pkShop = ch->GetShop();
if (!pkShop->IsPCShop())
{
//if (pkShop->GetVnum() == 0)
// return;
//const CMob* pkMob = CMobManager::instance().Get(pkShop->GetNPCVnum());
//if (!pkMob)
// return;
//if (pkMob->m_table.bType != CHAR_TYPE_NPC)
//{
// return;
//}
}
else
{
}
//PREVENT_ITEM_COPY
ch->SetMyShopTime();
//END_PREVENT_ITEM_COPY
int ret = pkShop->Buy(ch, pos);
if (SHOP_SUBHEADER_GC_OK != ret) // 문제가 있었으면 보낸다.
{
TPacketGCShop pack;
pack.header = HEADER_GC_SHOP;
pack.subheader = ret;
pack.size = sizeof(TPacketGCShop);
ch->GetDesc()->Packet(&pack, sizeof(pack));
}
}
示例3: DestroyPCShop
void CShopManager::DestroyPCShop(LPCHARACTER ch)
{
LPSHOP pkShop = FindPCShop(ch->GetVID());
if (!pkShop)
return;
//PREVENT_ITEM_COPY;
ch->SetMyShopTime();
//END_PREVENT_ITEM_COPY
m_map_pkShopByPC.erase(ch->GetVID());
M2_DELETE(pkShop);
}