• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Items Duration

Inactive
Joined
Jan 20, 2009
Messages
1,014
Reaction score
1,830
Price: 0

"Adds duration display for all power-ups, tickets and scrolls."

up4WwJd - Items Duration - RaGEZONE Forums


WndManager.cpp
Code:
void CWndMgr::PutKeepTime(CItemElem* pItemElem, CEditString* pEdit)
{
	CString str, strTemp;
	if (pItemElem->GetProp()->dwCircleTime != 0xffffffff)
	{
		pEdit->AddString("\n");
		if (pItemElem->GetProp()->dwCircleTime == 1)
		{
			pEdit->AddString(prj.GetText(TID_GAME_COND_USE), dwItemColor[g_Option.m_nToolTipText].dwTime);
		}
		else
		{
			CTimeSpan ct(pItemElem->GetProp()->dwCircleTime);
			strTemp.Format("Duration: ");
			pEdit->AddString(strTemp, dwItemColor[g_Option.m_nToolTipText].dwTime);
			strTemp.Format(prj.GetText(TID_TOOLTIP_DATE), static_cast<int>(ct.GetDays()), ct.GetHours(), ct.GetMinutes(), ct.GetSeconds());
			pEdit->AddString(strTemp, dwItemColor[g_Option.m_nToolTipText].dwTime);
		}
	}

#ifdef __NEW_POWER_UPS
	if (pItemElem->GetProp()->dwItemKind3 != IK3_VENDING)
	{
		if (pItemElem->GetProp()->dwSkillTime != 0xffffffff
			&& pItemElem->GetProp()->dwSkillTime != 999999999
			&& pItemElem->GetProp()->dwSkillTime != 0
			)
		{
			pEdit->AddString("\n");
			if (pItemElem->GetProp()->dwSkillTime == 1)
			{
				pEdit->AddString(prj.GetText(TID_GAME_COND_USE), dwItemColor[g_Option.m_nToolTipText].dwTime);
			}
			else
			{
				CTimeSpan ct(pItemElem->GetProp()->dwSkillTime / 1000);
				strTemp.Format("Duration: ");
				pEdit->AddString(strTemp, dwItemColor[g_Option.m_nToolTipText].dwTime);
				strTemp.Format(prj.GetText(TID_TOOLTIP_DATE), static_cast<int>(ct.GetDays()), ct.GetHours(), ct.GetMinutes(), ct.GetSeconds());
				pEdit->AddString(strTemp, dwItemColor[g_Option.m_nToolTipText].dwTime);
			}
		}
	}

	if (pItemElem->GetProp()->dwItemKind3 == IK3_SCROLL || pItemElem->GetProp()->dwItemKind3 == IK3_TICKET)
	{
		if (!pItemElem->m_dwKeepTime)
		{
			if (pItemElem->GetProp()->dwAbilityMin != 0xffffffff
				&& pItemElem->GetProp()->dwAbilityMin != 999999999
				&& pItemElem->GetProp()->dwAbilityMin != 0
				)
			{
				pEdit->AddString("\n");
				if (pItemElem->GetProp()->dwAbilityMin == 1)
				{
					pEdit->AddString(prj.GetText(TID_GAME_COND_USE), dwItemColor[g_Option.m_nToolTipText].dwTime);
				}
				else
				{
					CTimeSpan ct(pItemElem->GetProp()->dwAbilityMin * 60);
					strTemp.Format("Duration: ");
					pEdit->AddString(strTemp, dwItemColor[g_Option.m_nToolTipText].dwTime);
					strTemp.Format(prj.GetText(TID_TOOLTIP_DATE), static_cast<int>(ct.GetDays()), ct.GetHours(), ct.GetMinutes(), ct.GetSeconds());
					pEdit->AddString(strTemp, dwItemColor[g_Option.m_nToolTipText].dwTime);
				}
			}
		}
	}
#endif

	time_t t = pItemElem->m_dwKeepTime - time_null();

And define...
Code:
#define	__NEW_POWER_UPS
 

Attachments

You must be registered for see attachments list
Newbie Spellweaver
Joined
Sep 2, 2008
Messages
27
Reaction score
2
IK3_VENDING not declared, where do i have to declare it? :)
 
Back
Top