Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

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