예제 #1
0
// 100104 ShinJS --- Item Point Type에 대한 툴팁 추가
void CDealItem::AddPointTypeToolTip()
{
	char buf[MAX_PATH] = {0,};

	ITEM_INFO * pItemInfo = ITEMMGR->GetItemInfo(m_wItemIdx);
	if( !pItemInfo )	return;

	switch( pItemInfo->wPointType )
	{
	case eItemPointType_Item:
		{
			// Coin Item의 정보를 구한다
			DWORD dwCoinItemIdx = pItemInfo->dwPointTypeValue1;
			DWORD dwNeedCoinCnt = pItemInfo->dwPointTypeValue2;
			ITEM_INFO* pCoinItemInfo = ITEMMGR->GetItemInfo( dwCoinItemIdx );
			if( pCoinItemInfo )
			{
				wsprintf( buf, CHATMGR->GetChatMsg(1909), pCoinItemInfo->ItemName, AddComma( dwNeedCoinCnt ) );
				AddToolTipLine( buf, TTTC_BUYPRICE );
			}
		}
		break;

	case eItemPointType_PCRoomPoint:
		{
			DWORD dwNeedPCRoomPoint = pItemInfo->dwPointTypeValue1;
			wsprintf( buf, RESRCMGR->GetMsg( 1219 ), AddComma( dwNeedPCRoomPoint ) ); // "필요 PC방 포인트 : %s"
			AddToolTipLine( buf, TTTC_BUYPRICE );
		}
		break;
	}
	
}
예제 #2
0
void CBuyRegDialog::SetRegInfo(BUY_REG_INFO& RegInfo)
{
	m_nType = RegInfo.Type;
	m_nItem = RegInfo.Item;
	m_nClass = RegInfo.Class;
	m_nVolume = RegInfo.Volume;
	m_nMoney = RegInfo.Money;

	m_pVolumeEdit->SetEditText( AddComma( m_nVolume ) );
	m_pMoneyEdit->SetEditText( AddComma( m_nMoney ) );
}
예제 #3
0
void InfoBox::GenerateStatString()
{
    auto statMgr( GetStatMgr().lock() );
    assert(statMgr);
    auto		iter( statMgr->GetStats().begin() );
    const auto	end ( statMgr->GetStats().end()   );

    while( iter != end )
    {
        Stat::pointer_t	stat ( iter->second );

        const int mod   = f_char->getMod( stat->id(), true /*with_ability*/ );
        const bool last = (++iter == end);

        if( stat->ability() || stat->internal() ) continue;

        AddAttribute( stat->name(), mod );

        if( last )
        {
            AddCR();
        }
        else
        {
            AddComma();
        }
    }
}
예제 #4
0
VOID PrintAvailableMemory()
{
	WCHAR sz[MAX_PATH] = { 0 };
	_i64tow_s(GetAvailableMemory(), sz, _countof(sz), 10);
	std::wstring s = AddComma(sz);
	logw(L"AvailableMemory: %s", s.c_str());
}
예제 #5
0
void InfoBox::GenerateBuiltinString()
{
    const int	init    = f_char->getMod( GetStatMgr().lock()->initId(), true /*with_ability*/ );
    const int	hp      = f_char->maxHP();
    const int	damage  = f_char->damage();
    const int	hp_left = f_char->hitpoints();
    const int	pct     = hp? (int)(((float)hp_left / (float) hp) * 100.0): 0;

    AddAttribute( "Init",              init    );
    AddComma();
    AddAttribute( "Max Hitpoints",     hp      );
    AddComma();
    AddAttribute( "Current Damage",    damage  );
    AddComma();
    AddAttribute( "Current Hitpoints", hp_left );
    AddPercentage( pct>=0? pct: 0 );
    AddCR();
}
예제 #6
0
void CStorageManager::NetworkMsgParse(BYTE Protocol,void* pMsg)
{
	switch(Protocol) 
	{
	case MP_STORAGE_BUY_ACK:
		{
			MSG_BYTE * pmsg = (MSG_BYTE*)pMsg;
			HERO->SetStorageNum(pmsg->bData);
			
			if(pmsg->bData == 1)
			{
				GAMEIN->GetStorageDialog()->SetItemInit(TRUE);
				GAMEIN->GetStorageDialog()->SetStorageMoney(0);
			}
		//	GAMEIN->GetStorageDialog()->ShowStorageMode(eStorageMode_StorageWare1+pmsg->bData-1);
		//	GAMEIN->GetStorageDialog()->AddStorageMode(eStorageMode_StorageWare1+pmsg->bData-1);
					
			GAMEIN->GetStorageDialog()->ShowStorageMode(eStorageMode_StorageListInfo);
			GAMEIN->GetStorageDialog()->AddStorageMode(eStorageMode_StorageListInfo);
			CHATMGR->AddMsg( CTC_SYSMSG, CHATMGR->GetChatMsg(532) );
		}
		break;
	case MP_STORAGE_PUTIN_MONEY_ACK:
		{
			MSG_DWORD* pmsg = (MSG_DWORD*)pMsg;
			GAMEIN->GetStorageDialog()->SetStorageMoney(pmsg->dwData);
		}
		break;
	case MP_STORAGE_PUTOUT_MONEY_ACK:
		{
			MSG_DWORD* pmsg = (MSG_DWORD*)pMsg;
			GAMEIN->GetStorageDialog()->SetStorageMoney(pmsg->dwData);
		}
		break;
	case MP_STORAGE_PUTOUT_MONEY_NACK:
		{
			CHATMGR->AddMsg( CTC_SYSMSG, CHATMGR->GetChatMsg( 1098 ), AddComma( MAX_INVENTORY_MONEY ) );
		}
		break;
		
		//////////////////////////////////////////////////////////////////////////
		//nack 
	case MP_STORAGE_BUY_NACK:
		{
			CHATMGR->AddMsg( CTC_SYSMSG, CHATMGR->GetChatMsg(533) );
		}
		break;
	case MP_STORAGE_PUTIN_MONEY_NACK:
		{
			CHATMGR->AddMsg( CTC_SYSMSG, CHATMGR->GetChatMsg(534) );
		}
		break;
	}
}
예제 #7
0
void InfoBox::GenerateAbilityString()
{
    f_infoBuffer->insert_at_cursor( "Name: " );
    f_infoBuffer->insert_at_cursor( f_char->name() );
    f_infoBuffer->insert_at_cursor( " " );
    Glib::RefPtr<Gtk::TextChildAnchor> refAnchor = f_infoBuffer->create_child_anchor(f_infoBuffer->end());
    Gtk::Button* editBtn = Gtk::manage( new Gtk::Button("Edit") );
    editBtn->signal_clicked().connect( sigc::mem_fun( *this, &InfoBox::OnEditCharacter ) );
    //editBtn->set_sensitive( true );
    add_child_at_anchor( *editBtn, refAnchor );
    f_infoBuffer->insert_at_cursor( "\n" );
    editBtn->show_all();

    auto statMgr( GetStatMgr().lock() );
    assert(statMgr);

    auto       iter (statMgr->GetStats().begin());
    const auto end  (statMgr->GetStats().end()  );

    while( iter != end )
    {
        Stat::pointer_t stat ( iter->second );
        Value::pointer_t value ( f_char->getStat( stat->id() ) );

        const bool last = (++iter == end);

        if( !stat->ability() ) continue;
#if 0
        if( stat->enabled() )
        {
#endif
            AddAttribute( stat->name(), value->total() );
            AddModifier( Common::StatToMod( value->total() ) );
#if 0
        }
        else
        {
            AddAttribute( stat->name(), "--" );
        }
#endif

        if( last )
        {
            AddCR();
        }
        else
        {
            AddComma();
        }
    }
}
예제 #8
0
void CBuyRegDialog::UpdateItem()
{
	//기존에 선택되어진 아이템과 다른 아이템이 선택 되었다면
	//선택값을 바꾸고 등급 리스트를 리셋 한다
	if(m_nItem != m_pItemList[m_nType]->GetCurSelectedRowIdx())
	{
		m_nItem = WORD(m_pItemList[m_nType]->GetCurSelectedRowIdx());
		m_nVolume = WORD(atoi( DEFAULT_VOLUME_TEXT ));
		
		for(int i = 0; i < ITEM_TYPE_COUNT; i++)
		{
			if(i == m_nType)
			{
				m_pItemList[i]->SetActive(TRUE);
				m_pItemList[i]->SetCurSelectedRowIdx(m_nItem);

				cPtrList* pList = m_pItemList[i]->GetListItem();
				PTRLISTPOS pos = pList->GetHeadPosition();
				
				while(pos)
				{
					ITEM* pItem = (ITEM*)pList->GetNext(pos);

					if( pItem == NULL )
						continue;

					if( pItem == m_pItemList[i]->GetItem(m_nItem) )
					{
						m_pItemList[i]->GetItem(m_nItem)->rgb = RGB_HALF(255, 255, 0);
						continue;
					}
					pItem->rgb = RGB_HALF(255, 255, 255);
				}
			}
			else
			{
				m_pItemList[i]->SetActive(FALSE);
			}
		}
		
		if(m_nType == ETC)
			m_nVolume = 1;
	
		m_nMoney = 0;
		m_pMoneyEdit->SetEditText( DEFAULT_MONEY_TEXT );
		m_pVolumeEdit->SetEditText( AddComma(m_nVolume) );
	}
}