Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Khanat code
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tycho Brahe
Khanat code
Commits
e4cb1430
Commit
e4cb1430
authored
Nov 03, 2017
by
compil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correction du merge
parent
675bcee5
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
52 deletions
+31
-52
code/ryzom/client/src/interface_v3/interface_manager.cpp
code/ryzom/client/src/interface_v3/interface_manager.cpp
+7
-10
code/ryzom/client/src/interface_v3/inventory_manager.cpp
code/ryzom/client/src/interface_v3/inventory_manager.cpp
+2
-0
code/ryzom/common/src/game_share/time_weather_season/time_and_season.cpp
...on/src/game_share/time_weather_season/time_and_season.cpp
+2
-0
code/ryzom/common/src/game_share/time_weather_season/time_and_season.h
...mmon/src/game_share/time_weather_season/time_and_season.h
+8
-18
code/ryzom/server/src/ai_service/ai_place.cpp
code/ryzom/server/src/ai_service/ai_place.cpp
+0
-10
code/ryzom/server/src/ai_service/commands.cpp
code/ryzom/server/src/ai_service/commands.cpp
+10
-12
code/ryzom/server/src/ai_service/generic_logic_action.cpp
code/ryzom/server/src/ai_service/generic_logic_action.cpp
+2
-2
No files found.
code/ryzom/client/src/interface_v3/interface_manager.cpp
View file @
e4cb1430
...
...
@@ -130,7 +130,6 @@ using namespace NLGUI;
#include "../global.h"
#include "user_agent.h"
#include "../item_group_manager.h"
using
namespace
NLMISC
;
...
...
@@ -1499,7 +1498,6 @@ void CInterfaceManager::updateFrameEvents()
toString
(
", %d"
,
(
uint
)(
roundWeatherValue
(
WeatherManager
.
getWeatherValue
())
*
100.
f
))
+
"% "
+
CI18N
::
get
(
"uiHumidity"
);
CViewText
*
pVT
=
dynamic_cast
<
CViewText
*>
(
CWidgetManager
::
getInstance
()
->
getElementFromId
(
"ui:interface:map:content:map_content:weather"
));
if
(
pVT
!=
NULL
)
pVT
->
setText
(
str
);
...
...
@@ -1513,6 +1511,7 @@ void CInterfaceManager::updateFrameEvents()
pTooltip
->
setDefaultContextHelp
(
tt
);
}
// The date feature is temporarily disabled
str
.
clear
();
...
...
@@ -1526,13 +1525,13 @@ void CInterfaceManager::updateFrameEvents()
// literal version
// str = CI18N::get("uiDate");
str
+=
toString
(
"%02d"
,
(
sint
)
RT
.
getRyzomTime
())
+
" - "
;
uint
minutes
=
((
RT
.
getRyzomTime
()
-
(
sint
)
RT
.
getRyzomTime
())
*
(
float
)
RYZOM_HOUR_IN_MINUTES
);
str
+=
toString
(
"%02d:%02d"
,
(
sint
)
RT
.
getRyzomTime
(),
minutes
)
+
" - "
;
str
+=
CI18N
::
get
(
"ui"
+
WEEKDAY
::
toString
(
(
WEEKDAY
::
EWeekDay
)
RT
.
getRyzomDayOfWeek
()
))
+
", "
;
str
+=
CI18N
::
get
(
"ui"
+
MONTH
::
toString
(
(
MONTH
::
EMonth
)
RT
.
getRyzomMonthInCurrentCycle
()
))
+
" "
;
str
+=
toString
(
"%02d"
,
RT
.
getRyzomDayOfMonth
()
+
1
)
+
", "
;
str
+=
CI18N
::
get
(
"uiAtysianCycle"
+
toString
(
RT
.
getRyzomCycle
()
+
1
)
+
"Ordinal"
)
+
" "
+
CI18N
::
get
(
"uiAtysianCycle"
)
+
" "
;
str
+=
toString
(
"%04d"
,
RT
.
getRyzomYear
());
str
+=
toString
(
"%d:%d"
,
(
sint
)
RT
.
getRyzomWeek
(),
minutes
)
+
" "
;
str
+=
CI18N
::
get
(
"ui"
+
WEEKDAY
::
toString
(
(
WEEKDAY
::
EWeekDay
)
RT
.
getRyzomDayOfWeek
()
))
+
" - "
;
ucstring
year
=
RT
.
getRyzomYearStr
();
str
+=
year
+
" - "
;
str
+=
CI18N
::
get
(
"uiEon"
);
pVT
=
dynamic_cast
<
CViewText
*>
(
CWidgetManager
::
getInstance
()
->
getElementFromId
(
"ui:interface:map:content:map_content:time"
));
if
(
pVT
!=
NULL
)
...
...
@@ -1572,8 +1571,6 @@ void CInterfaceManager::updateFrameEvents()
CBGDownloaderAccess
::
getInstance
().
update
();
CItemGroupManager
::
getInstance
()
->
update
();
}
// ------------------------------------------------------------------------------------------------
...
...
code/ryzom/client/src/interface_v3/inventory_manager.cpp
View file @
e4cb1430
...
...
@@ -2120,6 +2120,7 @@ bool SBagOptions::canDisplay(CDBCtrlSheet *pCS) const
const
CItemSheet
*
pIS
=
pCS
->
asItemSheet
();
if
(
pIS
!=
NULL
)
{
if
(
SearchFilter
.
size
()
>
0
)
{
bool
match
=
true
;
...
...
@@ -2548,6 +2549,7 @@ class CHandlerInvSetSearch : public IActionHandler
};
REGISTER_ACTION_HANDLER
(
CHandlerInvSetSearch
,
"inv_set_search"
);
// ***************************************************************************
// COMMON INVENTORIES Test if we can drop an item to a slot or a list
class
CHandlerInvCanDropTo
:
public
IActionHandler
...
...
code/ryzom/common/src/game_share/time_weather_season/time_and_season.cpp
View file @
e4cb1430
...
...
@@ -83,9 +83,11 @@ namespace WEEKDAY
void
CRyzomTime
::
updateRyzomClock
(
uint32
gameCyle
)
{
static
const
uint32
ticksPerDay
=
(
RYZOM_DAY_IN_HOUR
*
RYZOM_HOURS_IN_TICKS
);
static
const
float
ticksPerHour
=
(
float
)
RYZOM_HOURS_IN_TICKS
;
uint32
totalTicks
=
gameCyle
+
_TickOffset
;
uint32
days
=
totalTicks
/
RYZOM_DAY_IN_TICKS
;
uint32
dayCycle
=
totalTicks
-
(
days
*
RYZOM_DAY_IN_TICKS
);
// Avoid rollover for low amount of days
...
...
code/ryzom/common/src/game_share/time_weather_season/time_and_season.h
View file @
e4cb1430
...
...
@@ -20,17 +20,16 @@
#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
;
const
uint
RYZOM_HOUR_IN_MINUTES
=
60
;
const
uint
RYZOM_DAY_IN_TICKS
=
RYZOM_HOURS_IN_TICKS
*
RYZOM_DAY_IN_HOUR
;
const
uint
RYZOM_SEASON_IN_DAY
=
90
;
const
uint
RYZOM_MONTH_IN_DAY
=
30
;
const
uint
RYZOM_YEAR_IN_MONTH
=
48
;
const
uint
RYZOM_WEEK_IN_DAY
=
6
;
const
uint
RYZOM_YEAR_IN_DAY
=
RYZOM_MONTH_IN_DAY
*
RYZOM_YEAR_IN_MONTH
;
const
uint
RYZOM_CYCLE_IN_MONTH
=
12
;
const
uint
RYZOM_YEAR_IN_WEEK
=
120
;
const
uint
RYZOM_WEEK_IN_DAY
=
4
;
const
uint
RYZOM_YEAR_IN_DAY
=
RYZOM_WEEK_IN_DAY
*
RYZOM_YEAR_IN_WEEK
;
const
uint
RYZOM_START_YEAR
=
0
;
const
uint
RYZOM_START_SPRING
=
0
;
...
...
@@ -87,7 +86,7 @@ namespace WEEKDAY
Reldei
,
Cibdei
,
Vondei
,
UNKNOWN
,
NUM_WEEKDAY
=
UNKNOWN
};
...
...
@@ -149,6 +148,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
NLMISC
::
CI18N
::
get
(
"uiYear"
).
length
()
==
0
?
NLMISC
::
toString
(
_RyzomDay
/
RYZOM_YEAR_IN_DAY
+
RYZOM_START_YEAR
)
:
NLMISC
::
CI18N
::
get
(
"uiYear"
);
}
// get ryzom week
inline
uint32
getRyzomWeek
()
const
{
return
(
_RyzomDay
%
RYZOM_YEAR_IN_DAY
)
/
RYZOM_WEEK_IN_DAY
;
}
...
...
@@ -158,21 +160,9 @@ public:
// get Season
static
inline
ESeason
getSeasonByDay
(
uint32
day
)
{
return
(
ESeason
)
(
(
(
day
%
RYZOM_YEAR_IN_DAY
)
/
RYZOM_SEASON_IN_DAY
)
%
(
EGSPD
::
CSeason
::
Invalid
)
);
}
// get ryzom month
inline
uint
getRyzomMonth
()
const
{
return
(
_RyzomDay
%
RYZOM_YEAR_IN_DAY
)
/
RYZOM_MONTH_IN_DAY
;
}
// get ryzom month in cycle
inline
MONTH
::
EMonth
getRyzomMonthInCurrentCycle
()
const
{
return
(
MONTH
::
EMonth
)
(
getRyzomMonth
()
%
RYZOM_CYCLE_IN_MONTH
);
}
// get ryzom cycle
inline
uint32
getRyzomCycle
()
const
{
return
getRyzomMonth
()
/
RYZOM_CYCLE_IN_MONTH
;
}
// get ryzom day of week
inline
WEEKDAY
::
EWeekDay
getRyzomDayOfWeek
()
const
{
return
(
WEEKDAY
::
EWeekDay
)
(
_RyzomDay
%
RYZOM_WEEK_IN_DAY
);
}
// get ryzom day of month
inline
uint32
getRyzomDayOfMonth
()
const
{
return
(
_RyzomDay
%
RYZOM_MONTH_IN_DAY
);
}
// get ryzom day of season
inline
uint32
getRyzomDayOfSeason
()
const
{
return
(
_RyzomDay
%
RYZOM_SEASON_IN_DAY
);
}
...
...
code/ryzom/server/src/ai_service/ai_place.cpp
View file @
e4cb1430
...
...
@@ -127,7 +127,6 @@ bool CFaunaGenericPlace::getActive() const
std
::
vector
<
std
::
string
>
dayIntervals
;
NLMISC
::
explode
(
_DayInterval
,
std
::
string
(
","
),
dayIntervals
,
true
);
std
::
string
season
=
EGSPD
::
CSeason
::
toString
(
rt
.
getRyzomSeason
());
std
::
string
month
=
MONTH
::
toString
((
MONTH
::
EMonth
)
rt
.
getRyzomMonth
());
std
::
string
weekday
=
WEEKDAY
::
toString
((
WEEKDAY
::
EWeekDay
)
rt
.
getRyzomDay
());
bool
found
=
false
;
for
(
uint
k
=
0
;
k
<
dayIntervals
.
size
();
++
k
)
...
...
@@ -147,15 +146,6 @@ bool CFaunaGenericPlace::getActive() const
{
goodToken
=
true
;
}
if
(
NLMISC
::
nlstricmp
(
dayIntervals
[
k
],
month
)
==
0
)
{
found
=
true
;
break
;
}
if
(
MONTH
::
toMonth
(
dayIntervals
[
k
])
!=
MONTH
::
UNKNOWN
)
{
goodToken
=
true
;
}
if
(
NLMISC
::
nlstricmp
(
dayIntervals
[
k
],
weekday
)
==
0
)
{
found
=
true
;
...
...
code/ryzom/server/src/ai_service/commands.cpp
View file @
e4cb1430
...
...
@@ -39,7 +39,7 @@
#include "fx_entity_manager.h"
#include "ai_script_data_manager.h"
#include "commands.h"
#include "nel/misc/i18n.h"
#include "ais_user_models.h"
extern
bool
GrpHistoryRecordLog
;
...
...
@@ -3065,17 +3065,15 @@ static void displayTime(const CRyzomTime &rt, NLMISC::CLog &log)
std
::
string
result
;
result
=
NLMISC
::
toString
(
"hh:mm = %d:%d; "
,
(
int
)
floorf
(
rt
.
getRyzomTime
())
,
(
int
)
floorf
(
60.
f
*
fmodf
(
rt
.
getRyzomTime
(),
1.
f
)));
log
.
displayNL
(
result
.
c_str
());
uint32
month
=
rt
.
getRyzomMonth
();
MONTH
::
EMonth
monthInCycle
=
rt
.
getRyzomMonthInCurrentCycle
();
std
::
string
monthName
=
MONTH
::
toString
((
MONTH
::
EMonth
)
monthInCycle
);
uint32
dayOfMonth
=
rt
.
getRyzomDayOfMonth
();
std
::
string
dayName
=
WEEKDAY
::
toString
((
WEEKDAY
::
EWeekDay
)
rt
.
getRyzomDayOfWeek
());
result
=
NLMISC
::
toString
(
"mm:dd:yy = %d:%d:%d (%s:%s)"
,
(
int
)
(
month
+
1
),
(
int
)
(
dayOfMonth
+
1
),
(
int
)
rt
.
getRyzomYear
(),
monthName
.
c_str
(),
dayName
.
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
=
rt
.
getRyzomYearStr
().
toUtf8
();
std
::
string
eon
=
CI18N
::
get
(
"uiEon"
).
toUtf8
();
result
=
NLMISC
::
toString
(
"week:day:year:eon = %s:%s:%s:%s"
,
week
.
c_str
(),
dayName
.
c_str
(),
year
.
c_str
(),
eon
.
c_str
());
log
.
displayNL
(
result
.
c_str
());
log
.
displayNL
(
"day of year = %d/%d"
,
(
int
)
(
rt
.
getRyzomDayOfYear
()
+
1
),
(
int
)
RYZOM_YEAR_IN_DAY
);
log
.
displayNL
(
"season = %d/4 (%s)"
,
(
int
)
rt
.
getRyzomSeason
()
+
1
,
EGSPD
::
CSeason
::
toString
(
rt
.
getRyzomSeason
()).
c_str
());
...
...
code/ryzom/server/src/ai_service/generic_logic_action.cpp
View file @
e4cb1430
...
...
@@ -830,11 +830,11 @@ public:
break
;
case
tm_monthday
:
{
uint32
dom
=
CTimeInterface
::
getRyzomTime
().
getRyzomDayOfMonth
();
/*
uint32 dom = CTimeInterface::getRyzomTime().getRyzomDayOfMonth();
while (dom < _DayNumber)
dom += RYZOM_MONTH_IN_DAY;
_Min
=
_Max
=
timeTicks
+
dom
*
RYZOM_DAY_IN_TICKS
;
_Min = _Max = timeTicks + dom * RYZOM_DAY_IN_TICKS;*/
}
break
;
case
tm_seasonday
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment