fixed missing include for server when trying to get the date

This commit is contained in:
SIELA1915 2016-01-31 15:39:32 +01:00
parent d6e8706581
commit db771f1d2b
5 changed files with 11 additions and 27 deletions

View file

@ -876,12 +876,8 @@ class CAHGuildSheetOpen : public IActionHandler
rt.updateRyzomClock(rGuildMembers[i].EnterDate);
ucstring str = toString("%03d", (sint)RT.getRyzomWeek()) + " ";
str += CI18N::get("ui"+WEEKDAY::toString( (WEEKDAY::EWeekDay)RT.getRyzomDayOfWeek() )) + " - ";
ucstring year = CI18N::get("uiYear");
if (year.length() == 0) {
str += toString("%04d", RT.getRyzomYear()) + " - ";
} else {
str += year + " - ";
}
ucstring year = RT.getRyzomYearStr();
str += year + " - "
str += CI18N::get("uiEon");
pViewEnterDate->setText(str);
}

View file

@ -1487,12 +1487,8 @@ void CInterfaceManager::updateFrameEvents()
str += toString("%02d", (sint)RT.getRyzomTime()) + CI18N::get("uiMissionTimerHour") + " - ";
str += toString("%d", (sint)RT.getRyzomWeek()) + " ";
str += CI18N::get("ui"+WEEKDAY::toString( (WEEKDAY::EWeekDay)RT.getRyzomDayOfWeek() )) + " - ";
ucstring year = CI18N::get("uiYear");
if (year.length() == 0) {
str += toString("%04d", RT.getRyzomYear()) + " - ";
} else {
str += year + " - ";
}
ucstring year = RT.getRyzomYearStr();
str += year + " - ";
str += CI18N::get("uiEon");
pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:map:content:map_content:time"));

View file

@ -20,6 +20,7 @@
#define RY_TIME_AND_SEASON_H
#include "nel/misc/types_nl.h"
#include "nel/misc/i18n.h"
const uint RYZOM_HOURS_IN_TICKS = 9000;
const uint RYZOM_DAY_IN_HOUR = 24;
@ -153,6 +154,9 @@ public:
// get ryzom Year
inline uint32 getRyzomYear() const { return _RyzomDay / RYZOM_YEAR_IN_DAY + RYZOM_START_YEAR; }
// get ryzom Year as string
inline ucstring getRyzomYearStr() const { return CI18N::get("uiYear").length()==0?toString(_RyzomDay / RYZOM_YEAR_IN_DAY + RYZOM_START_YEAR):CI18N::get("uiYear"); }
// get ryzom week
inline uint32 getRyzomWeek() const { return (_RyzomDay % RYZOM_YEAR_IN_DAY) / RYZOM_WEEK_IN_DAY; }

View file

@ -39,7 +39,7 @@
#include "fx_entity_manager.h"
#include "ai_script_data_manager.h"
#include "commands.h"
#include "i18n.h"
#include "ais_user_models.h"
extern bool GrpHistoryRecordLog;
@ -3065,14 +3065,8 @@ static void displayTime(const CRyzomTime &rt, NLMISC::CLog &log)
log.displayNL(result.c_str());
std::string week = toString("%03d", rt.getRyzomWeek());
std::string dayName = CI18N::get("ui"+WEEKDAY::toString((WEEKDAY::EWeekDay) rt.getRyzomDayOfWeek())).toUtf8();
std::string year;
std::string year = rt.getRyzomYearStr().toUtf8();
std::string eon = CI18N::get("uiEon").toUtf8();
ucstring yearBool = CI18N::get("uiYear");
if (yearBool.length() == 0) {
year = toString("%04d", rt.getRyzomYear());
} else {
year = yearBool.toUtf8();
}
result = NLMISC::toString("week:day:year:eon = %s:%s:%s:%s",
week,
dayName,

View file

@ -3366,14 +3366,8 @@ void getRyzomDateStr__s(CStateInstance* entity, CScriptStack& stack)
std::string week = toString("%03d", rt.getRyzomWeek());
std::string dayName = CI18N::get("ui"+WEEKDAY::toString((WEEKDAY::EWeekDay) rt.getRyzomDayOfWeek())).toUtf8();
std::string year;
std::string year = toString(rt.getRyzomYearStr());
std::string eon = CI18N::get("uiEon").toUtf8();
ucstring yearBool = CI18N::get("uiYear");
if (yearBool.length() == 0) {
year = toString("%04d", rt.getRyzomYear());
} else {
year = yearBool.toUtf8();
}
result += NLMISC::toString(" / %s %s - %s - %s",
week,
dayName,