- Joined
- Aug 16, 2012
- Messages
- 143
- Reaction score
- 6
how to reduce or increase the time duration SP ?
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!I have a value of 120MPOptionParam1 in database.
DWORD dwLiveTime = ptmpNPCMonster->MonsterInfoPtr->MPOptionParam1*60*1000;
if(dwLiveTime < i_dwCurrentTick-ptmpNPCMonster->m_dwTimeCreated)
check .dat
The method for save the time (of create and even determine the end/duration time) is made through the GetTickCount() in c++ (winbase.h header - in this case included in windows.h in stdafx.h), then you don't have a measure in seconds or minutes, but in Tick.
As you see in the piece of code above the DWORD is multiplied for 60 and after for 1000 before being compared with the m_dwTimeCreated value (with value assigned by m_dwCurrentTick variable).
Code:DWORD dwLiveTime = ptmpNPCMonster->MonsterInfoPtr->MPOptionParam1*60*1000; if(dwLiveTime < i_dwCurrentTick-ptmpNPCMonster->m_dwTimeCreated)