API PartialPlayTime

This function is not in any way related to the rested state per character and resting in inns or cities. This function is to limit people from playing the game for too long, acting as a global account API that returns the same value no matter what character you logon.

PartialPlayTime;


 * Arguments


 * none


 * Returns


 * Returns true if you have played more than 3 hours and is in a half-tired state. This is a global account function that affects all characters. Otherwise it returns nil. This function is only working in continents like Asia where you have the rested system enabled, US and EU are not under such limitations.


 * Example

Based on the official function, changed a bit to output the text in the chat rather than the tooltip on your avatar: if ( PartialPlayTime ) then DEFAULT_CHAT_FRAME:AddMessage(format(PLAYTIME_TIRED, REQUIRED_REST_HOURS - floor(GetBillingTimeRested/60))); elseif ( NoPlayTime ) then DEFAULT_CHAT_FRAME:AddMessage(format(PLAYTIME_UNHEALTHY, REQUIRED_REST_HOURS - floor(GetBillingTimeRested/60))); else DEFAULT_CHAT_FRAME:AddMessage("You are not limited by PartialPlayTime nor NoPlayTime."); end


 * Related

Take a look on the NoPlayTime API and the GetBillingTimeRested API.