merge
This commit is contained in:
parent
9a5d240163
commit
12a20bd94c
70 changed files with 3290 additions and 1461 deletions
|
@ -405,7 +405,7 @@ MACRO(NL_SETUP_BUILD)
|
||||||
SET(NL_RELEASE_CFLAGS "/MD /D NDEBUG ${SPEED_OPTIMIZATIONS}")
|
SET(NL_RELEASE_CFLAGS "/MD /D NDEBUG ${SPEED_OPTIMIZATIONS}")
|
||||||
SET(NL_DEBUG_LINKFLAGS "/NODEFAULTLIB:msvcrt /INCREMENTAL:YES")
|
SET(NL_DEBUG_LINKFLAGS "/NODEFAULTLIB:msvcrt /INCREMENTAL:YES")
|
||||||
SET(NL_RELEASE_LINKFLAGS "/OPT:REF /OPT:ICF /INCREMENTAL:NO")
|
SET(NL_RELEASE_LINKFLAGS "/OPT:REF /OPT:ICF /INCREMENTAL:NO")
|
||||||
ELSE(WIN32)
|
ELSE(MSVC)
|
||||||
IF(HOST_CPU STREQUAL "x86_64" AND TARGET_CPU STREQUAL "x86")
|
IF(HOST_CPU STREQUAL "x86_64" AND TARGET_CPU STREQUAL "x86")
|
||||||
SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -m32 -march=i686")
|
SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -m32 -march=i686")
|
||||||
ENDIF(HOST_CPU STREQUAL "x86_64" AND TARGET_CPU STREQUAL "x86")
|
ENDIF(HOST_CPU STREQUAL "x86_64" AND TARGET_CPU STREQUAL "x86")
|
||||||
|
@ -414,7 +414,7 @@ MACRO(NL_SETUP_BUILD)
|
||||||
SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -m64")
|
SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -m64")
|
||||||
ENDIF(HOST_CPU STREQUAL "x86" AND TARGET_CPU STREQUAL "x86_64")
|
ENDIF(HOST_CPU STREQUAL "x86" AND TARGET_CPU STREQUAL "x86_64")
|
||||||
|
|
||||||
SET(PLATFORM_CFLAGS "{PLATFORM_CFLAGS} -g -D_REENTRANT -pipe -ftemplate-depth-48 -Wall -ansi -W -Wpointer-arith -Wsign-compare -Wno-deprecated-declarations -Wno-multichar -Wno-unused -fno-strict-aliasing")
|
SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -g -D_REENTRANT -pipe -ftemplate-depth-48 -Wall -ansi -W -Wpointer-arith -Wsign-compare -Wno-deprecated-declarations -Wno-multichar -Wno-unused -fno-strict-aliasing")
|
||||||
|
|
||||||
IF(WITH_COVERAGE)
|
IF(WITH_COVERAGE)
|
||||||
SET(PLATFORM_CFLAGS "-fprofile-arcs -ftest-coverage ${PLATFORM_CFLAGS}")
|
SET(PLATFORM_CFLAGS "-fprofile-arcs -ftest-coverage ${PLATFORM_CFLAGS}")
|
||||||
|
@ -437,7 +437,7 @@ MACRO(NL_SETUP_BUILD)
|
||||||
|
|
||||||
SET(NL_DEBUG_CFLAGS "-DNL_DEBUG -D_DEBUG")
|
SET(NL_DEBUG_CFLAGS "-DNL_DEBUG -D_DEBUG")
|
||||||
SET(NL_RELEASE_CFLAGS "-DNL_RELEASE -DNDEBUG -O6")
|
SET(NL_RELEASE_CFLAGS "-DNL_RELEASE -DNDEBUG -O6")
|
||||||
ENDIF(WIN32)
|
ENDIF(MSVC)
|
||||||
ENDMACRO(NL_SETUP_BUILD)
|
ENDMACRO(NL_SETUP_BUILD)
|
||||||
|
|
||||||
MACRO(NL_SETUP_BUILD_FLAGS)
|
MACRO(NL_SETUP_BUILD_FLAGS)
|
||||||
|
|
|
@ -178,8 +178,8 @@ static const CStringConversion<TKey>::CPair stringTable [] =
|
||||||
{ "KeyZOOM", KeyZOOM },
|
{ "KeyZOOM", KeyZOOM },
|
||||||
{ "KeyNONAME", KeyNONAME },
|
{ "KeyNONAME", KeyNONAME },
|
||||||
{ "KeyPA1", KeyPA1 },
|
{ "KeyPA1", KeyPA1 },
|
||||||
{ "KeyOEM_CLEAR", KeyOEM_CLEAR },
|
{ "KeyOEM_CLEAR", KeyOEM_CLEAR }
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
static CStringConversion<TKey> KeyConversion(stringTable, sizeof(stringTable) / sizeof(stringTable[0]), KeyCount);
|
static CStringConversion<TKey> KeyConversion(stringTable, sizeof(stringTable) / sizeof(stringTable[0]), KeyCount);
|
||||||
|
|
|
@ -354,8 +354,8 @@ SystemInfoColors =
|
||||||
|
|
||||||
// NEW System Info Categories
|
// NEW System Info Categories
|
||||||
"SYS", "255 255 255 255 normal", // Default system messages
|
"SYS", "255 255 255 255 normal", // Default system messages
|
||||||
"BC", "255 255 255 255 center", // Broadcast messages
|
"BC", "255 255 255 255 centeraround", // Broadcast messages
|
||||||
"TAGBC", "255 255 255 255 center", // Taged broadcast messages : color should remain white as some word are tagged
|
"TAGBC", "255 255 255 255 centeraround", // Taged broadcast messages : color should remain white as some word are tagged
|
||||||
"XP", "255 255 64 255 over", // XP Gain
|
"XP", "255 255 64 255 over", // XP Gain
|
||||||
"SP", "255 255 64 255 over", // SP Gain
|
"SP", "255 255 64 255 over", // SP Gain
|
||||||
"TTL", "255 255 64 255 over", // Title
|
"TTL", "255 255 64 255 over", // Title
|
||||||
|
@ -443,6 +443,7 @@ R2EDReloadFiles = {
|
||||||
XMLInterfaceFiles = {
|
XMLInterfaceFiles = {
|
||||||
"config.xml",
|
"config.xml",
|
||||||
"widgets.xml",
|
"widgets.xml",
|
||||||
|
"webig_widgets.xml",
|
||||||
"player.xml",
|
"player.xml",
|
||||||
"inventory.xml",
|
"inventory.xml",
|
||||||
"interaction.xml",
|
"interaction.xml",
|
||||||
|
@ -559,6 +560,15 @@ HelpPages =
|
||||||
"de=http://forums.ryzom.com/forum/showthread.php?t=29131"
|
"de=http://forums.ryzom.com/forum/showthread.php?t=29131"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
WebIgMainDomain = "atys.ryzom.com";
|
||||||
|
|
||||||
|
WebIgTrustedDomains =
|
||||||
|
{
|
||||||
|
"atys.ryzom.com"
|
||||||
|
};
|
||||||
|
|
||||||
|
PatchletUrl = "http://atys.ryzom.com/start/app_patchlet.php?patch=preload";
|
||||||
|
|
||||||
SelectedSlot = 0;
|
SelectedSlot = 0;
|
||||||
|
|
||||||
BuildName = "RELEASE_HEAD";
|
BuildName = "RELEASE_HEAD";
|
||||||
|
|
|
@ -80,6 +80,9 @@ XMLOutGameInterfaceFiles = {
|
||||||
"out_v2_keys.xml",
|
"out_v2_keys.xml",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
TexturesInterface = "texture_interfaces_v3";
|
||||||
|
TexturesInterfaceDXTC = "texture_interfaces_dxtc";
|
||||||
|
|
||||||
|
|
||||||
// The ligo primitive class file
|
// The ligo primitive class file
|
||||||
LigoPrimitiveClass = "world_editor_classes.xml";
|
LigoPrimitiveClass = "world_editor_classes.xml";
|
||||||
|
@ -352,8 +355,8 @@ SystemInfoColors =
|
||||||
|
|
||||||
// NEW System Info Categories
|
// NEW System Info Categories
|
||||||
"SYS", "255 255 255 255 normal", // Default system messages
|
"SYS", "255 255 255 255 normal", // Default system messages
|
||||||
"BC", "255 255 255 255 center", // Broadcast messages
|
"BC", "255 255 255 255 centeraround", // Broadcast messages
|
||||||
"TAGBC", "255 255 255 255 center", // Taged broadcast messages : color should remain white as some word are tagged
|
"TAGBC", "255 255 255 255 centeraround", // Taged broadcast messages : color should remain white as some word are tagged
|
||||||
"XP", "255 255 64 255 over", // XP Gain
|
"XP", "255 255 64 255 over", // XP Gain
|
||||||
"SP", "255 255 64 255 over", // SP Gain
|
"SP", "255 255 64 255 over", // SP Gain
|
||||||
"TTL", "255 255 64 255 over", // Title
|
"TTL", "255 255 64 255 over", // Title
|
||||||
|
@ -441,6 +444,7 @@ R2EDReloadFiles = {
|
||||||
XMLInterfaceFiles = {
|
XMLInterfaceFiles = {
|
||||||
"config.xml",
|
"config.xml",
|
||||||
"widgets.xml",
|
"widgets.xml",
|
||||||
|
"webig_widgets.xml",
|
||||||
"player.xml",
|
"player.xml",
|
||||||
"inventory.xml",
|
"inventory.xml",
|
||||||
"interaction.xml",
|
"interaction.xml",
|
||||||
|
@ -557,6 +561,15 @@ HelpPages =
|
||||||
"de=http://forums.ryzom.com/forum/showthread.php?t=29131"
|
"de=http://forums.ryzom.com/forum/showthread.php?t=29131"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
WebIgMainDomain = "atys.ryzom.com";
|
||||||
|
|
||||||
|
WebIgTrustedDomains =
|
||||||
|
{
|
||||||
|
"atys.ryzom.com"
|
||||||
|
};
|
||||||
|
|
||||||
|
PatchletUrl = "http://atys.ryzom.com/start/app_patchlet.php?patch=preload";
|
||||||
|
|
||||||
SelectedSlot = 0;
|
SelectedSlot = 0;
|
||||||
|
|
||||||
BuildName = "RELEASE_HEAD";
|
BuildName = "RELEASE_HEAD";
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 4 MiB After Width: | Height: | Size: 4 MiB |
File diff suppressed because it is too large
Load diff
|
@ -78,9 +78,18 @@
|
||||||
<command name="guildinvite" action="command" params="a guildInvite $" />
|
<command name="guildinvite" action="command" params="a guildInvite $" />
|
||||||
<command name="invite" action="command" params="a teamInvite $" />
|
<command name="invite" action="command" params="a teamInvite $" />
|
||||||
|
|
||||||
<command name="channel" action="command" params="a connectUserChannel +" />
|
<command name="channel" action="command" params='a connectUserChannel "$"' />
|
||||||
|
<command name="channel" action="command" params='a connectUserChannel "$" +' />
|
||||||
|
|
||||||
|
<command name="leaguekick" action="command" params="a leagueKick $" />
|
||||||
|
<command name="leaguequit" action="command" params="a setLeague" />
|
||||||
|
<command name="leagueinvite" action="command" params="a leagueInvite $" />
|
||||||
|
<command name="league" action="command" params='a setLeague "$"' />
|
||||||
|
|
||||||
|
<command name="resetname" action="command" params="a resetName"/>
|
||||||
|
|
||||||
<!-- WebIG -->
|
<!-- WebIG -->
|
||||||
<command name="go" action="browse" params="name=ui:interface:webig:content:html|url=home"/>
|
<command name="go" action="browse" params="name=ui:interface:webig:content:html|url=home"/>
|
||||||
|
<command name="webdev" action="browse" params="name=ui:interface:webig:content:html|url=http://localhost/index.html"/>
|
||||||
|
|
||||||
</interface_config>
|
</interface_config>
|
||||||
|
|
|
@ -258,6 +258,9 @@
|
||||||
<variable entry="UI:SAVE:INSCENE:USER:TITLE"
|
<variable entry="UI:SAVE:INSCENE:USER:TITLE"
|
||||||
type="bool"
|
type="bool"
|
||||||
value="false" />
|
value="false" />
|
||||||
|
<variable entry="UI:SAVE:INSCENE:USER:RPTAGS"
|
||||||
|
type="bool"
|
||||||
|
value="false" />
|
||||||
<variable entry="UI:SAVE:INSCENE:USER:GUILD_NAME"
|
<variable entry="UI:SAVE:INSCENE:USER:GUILD_NAME"
|
||||||
type="bool"
|
type="bool"
|
||||||
value="false" />
|
value="false" />
|
||||||
|
@ -291,6 +294,9 @@
|
||||||
<variable entry="UI:SAVE:INSCENE:FRIEND:TITLE"
|
<variable entry="UI:SAVE:INSCENE:FRIEND:TITLE"
|
||||||
type="bool"
|
type="bool"
|
||||||
value="true" />
|
value="true" />
|
||||||
|
<variable entry="UI:SAVE:INSCENE:FRIEND:RPTAGS"
|
||||||
|
type="bool"
|
||||||
|
value="true" />
|
||||||
<variable entry="UI:SAVE:INSCENE:FRIEND:GUILD_NAME"
|
<variable entry="UI:SAVE:INSCENE:FRIEND:GUILD_NAME"
|
||||||
type="bool"
|
type="bool"
|
||||||
value="true" />
|
value="true" />
|
||||||
|
@ -327,6 +333,9 @@
|
||||||
<variable entry="UI:SAVE:INSCENE:ENEMY:TITLE"
|
<variable entry="UI:SAVE:INSCENE:ENEMY:TITLE"
|
||||||
type="bool"
|
type="bool"
|
||||||
value="true" />
|
value="true" />
|
||||||
|
<variable entry="UI:SAVE:INSCENE:ENEMY:RPTAGS"
|
||||||
|
type="bool"
|
||||||
|
value="true" />
|
||||||
<variable entry="UI:SAVE:INSCENE:ENEMY:GUILD_NAME"
|
<variable entry="UI:SAVE:INSCENE:ENEMY:GUILD_NAME"
|
||||||
type="bool"
|
type="bool"
|
||||||
value="true" />
|
value="true" />
|
||||||
|
@ -2797,6 +2806,9 @@ This MUST follow the Enum MISSION_DESC::TIconId
|
||||||
<variable entry="UI:SAVE:GUILD_LIST:SORT_ORDER"
|
<variable entry="UI:SAVE:GUILD_LIST:SORT_ORDER"
|
||||||
type="sint32"
|
type="sint32"
|
||||||
value="0" />
|
value="0" />
|
||||||
|
<variable entry="UI:SAVE:CHATLOG_STATE"
|
||||||
|
type="sint32"
|
||||||
|
value="0" />
|
||||||
<!-- Auto Convert ACT_TSTART end TEND from server to smoothServerTick -->
|
<!-- Auto Convert ACT_TSTART end TEND from server to smoothServerTick -->
|
||||||
<link expr="@SERVER:USER:ACT_TSTART"
|
<link expr="@SERVER:USER:ACT_TSTART"
|
||||||
action="set"
|
action="set"
|
||||||
|
@ -2963,7 +2975,28 @@ This MUST follow the Enum MISSION_DESC::TIconId
|
||||||
<variable entry="UI:SAVE:CHAT:COLORS:TELL"
|
<variable entry="UI:SAVE:CHAT:COLORS:TELL"
|
||||||
type="rgba"
|
type="rgba"
|
||||||
value="170 170 170 255" />
|
value="170 170 170 255" />
|
||||||
<variable entry="UI:SAVE:CHAT:COLORS:DYN"
|
<variable entry="UI:SAVE:CHAT:COLORS:DYN:0"
|
||||||
|
type="rgba"
|
||||||
|
value="162 255 173 255" />
|
||||||
|
<variable entry="UI:SAVE:CHAT:COLORS:DYN:1"
|
||||||
|
type="rgba"
|
||||||
|
value="162 255 173 255" />
|
||||||
|
<variable entry="UI:SAVE:CHAT:COLORS:DYN:2"
|
||||||
|
type="rgba"
|
||||||
|
value="162 255 173 255" />
|
||||||
|
<variable entry="UI:SAVE:CHAT:COLORS:DYN:3"
|
||||||
|
type="rgba"
|
||||||
|
value="162 255 173 255" />
|
||||||
|
<variable entry="UI:SAVE:CHAT:COLORS:DYN:4"
|
||||||
|
type="rgba"
|
||||||
|
value="162 255 173 255" />
|
||||||
|
<variable entry="UI:SAVE:CHAT:COLORS:DYN:5"
|
||||||
|
type="rgba"
|
||||||
|
value="162 255 173 255" />
|
||||||
|
<variable entry="UI:SAVE:CHAT:COLORS:DYN:6"
|
||||||
|
type="rgba"
|
||||||
|
value="162 255 173 255" />
|
||||||
|
<variable entry="UI:SAVE:CHAT:COLORS:DYN:7"
|
||||||
type="rgba"
|
type="rgba"
|
||||||
value="162 255 173 255" />
|
value="162 255 173 255" />
|
||||||
<variable entry="UI:SAVE:CHAT:ENTER_DONT_QUIT_CB"
|
<variable entry="UI:SAVE:CHAT:ENTER_DONT_QUIT_CB"
|
||||||
|
@ -2975,6 +3008,9 @@ This MUST follow the Enum MISSION_DESC::TIconId
|
||||||
<variable entry="UI:SAVE:CHAT:SHOW_DYN_CHANNEL_NAME_IN_CHAT_CB"
|
<variable entry="UI:SAVE:CHAT:SHOW_DYN_CHANNEL_NAME_IN_CHAT_CB"
|
||||||
type="bool"
|
type="bool"
|
||||||
value="false" />
|
value="false" />
|
||||||
|
<variable entry="UI:SAVE:CHAT:SHOW_ONLINE_OFFLINE_NOTIFICATIONS_CB"
|
||||||
|
type="bool"
|
||||||
|
value="true" />
|
||||||
<!-- ***************************** -->
|
<!-- ***************************** -->
|
||||||
<!-- * SYSTEM INFO COLORS * -->
|
<!-- * SYSTEM INFO COLORS * -->
|
||||||
<!-- ***************************** -->
|
<!-- ***************************** -->
|
||||||
|
@ -3045,6 +3081,9 @@ This MUST follow the Enum MISSION_DESC::TIconId
|
||||||
<variable entry="UI:SAVE:INV_BAG:FILTER_MISSMP"
|
<variable entry="UI:SAVE:INV_BAG:FILTER_MISSMP"
|
||||||
type="sint32"
|
type="sint32"
|
||||||
value="1" />
|
value="1" />
|
||||||
|
<variable entry="UI:SAVE:INV_BAG:FILTER_TP"
|
||||||
|
type="sint32"
|
||||||
|
value="1" />
|
||||||
<variable entry="UI:SAVE:INV_PA0:SORT_TYPE"
|
<variable entry="UI:SAVE:INV_PA0:SORT_TYPE"
|
||||||
type="sint32"
|
type="sint32"
|
||||||
value="0" />
|
value="0" />
|
||||||
|
@ -3066,6 +3105,9 @@ This MUST follow the Enum MISSION_DESC::TIconId
|
||||||
<variable entry="UI:SAVE:INV_PA0:FILTER_MISSMP"
|
<variable entry="UI:SAVE:INV_PA0:FILTER_MISSMP"
|
||||||
type="sint32"
|
type="sint32"
|
||||||
value="1" />
|
value="1" />
|
||||||
|
<variable entry="UI:SAVE:INV_PA0:FILTER_TP"
|
||||||
|
type="sint32"
|
||||||
|
value="1" />
|
||||||
<variable entry="UI:SAVE:INV_PA1:SORT_TYPE"
|
<variable entry="UI:SAVE:INV_PA1:SORT_TYPE"
|
||||||
type="sint32"
|
type="sint32"
|
||||||
value="0" />
|
value="0" />
|
||||||
|
@ -3087,6 +3129,9 @@ This MUST follow the Enum MISSION_DESC::TIconId
|
||||||
<variable entry="UI:SAVE:INV_PA1:FILTER_MISSMP"
|
<variable entry="UI:SAVE:INV_PA1:FILTER_MISSMP"
|
||||||
type="sint32"
|
type="sint32"
|
||||||
value="1" />
|
value="1" />
|
||||||
|
<variable entry="UI:SAVE:INV_PA1:FILTER_TP"
|
||||||
|
type="sint32"
|
||||||
|
value="1" />
|
||||||
<variable entry="UI:SAVE:INV_PA2:SORT_TYPE"
|
<variable entry="UI:SAVE:INV_PA2:SORT_TYPE"
|
||||||
type="sint32"
|
type="sint32"
|
||||||
value="0" />
|
value="0" />
|
||||||
|
@ -3108,6 +3153,9 @@ This MUST follow the Enum MISSION_DESC::TIconId
|
||||||
<variable entry="UI:SAVE:INV_PA2:FILTER_MISSMP"
|
<variable entry="UI:SAVE:INV_PA2:FILTER_MISSMP"
|
||||||
type="sint32"
|
type="sint32"
|
||||||
value="1" />
|
value="1" />
|
||||||
|
<variable entry="UI:SAVE:INV_PA2:FILTER_TP"
|
||||||
|
type="sint32"
|
||||||
|
value="1" />
|
||||||
<variable entry="UI:SAVE:INV_PA3:SORT_TYPE"
|
<variable entry="UI:SAVE:INV_PA3:SORT_TYPE"
|
||||||
type="sint32"
|
type="sint32"
|
||||||
value="0" />
|
value="0" />
|
||||||
|
@ -3129,6 +3177,9 @@ This MUST follow the Enum MISSION_DESC::TIconId
|
||||||
<variable entry="UI:SAVE:INV_PA3:FILTER_MISSMP"
|
<variable entry="UI:SAVE:INV_PA3:FILTER_MISSMP"
|
||||||
type="sint32"
|
type="sint32"
|
||||||
value="1" />
|
value="1" />
|
||||||
|
<variable entry="UI:SAVE:INV_PA3:FILTER_TP"
|
||||||
|
type="sint32"
|
||||||
|
value="1" />
|
||||||
<variable entry="UI:SAVE:INV_GUILD:SORT_TYPE"
|
<variable entry="UI:SAVE:INV_GUILD:SORT_TYPE"
|
||||||
type="sint32"
|
type="sint32"
|
||||||
value="1" />
|
value="1" />
|
||||||
|
@ -3151,6 +3202,9 @@ This MUST follow the Enum MISSION_DESC::TIconId
|
||||||
<variable entry="UI:SAVE:INV_GUILD:FILTER_MISSMP"
|
<variable entry="UI:SAVE:INV_GUILD:FILTER_MISSMP"
|
||||||
type="sint32"
|
type="sint32"
|
||||||
value="1" />
|
value="1" />
|
||||||
|
<variable entry="UI:SAVE:INV_GUILD:FILTER_TP"
|
||||||
|
type="sint32"
|
||||||
|
value="1" />
|
||||||
<variable entry="UI:SAVE:INV_ROOM:SORT_TYPE"
|
<variable entry="UI:SAVE:INV_ROOM:SORT_TYPE"
|
||||||
type="sint32"
|
type="sint32"
|
||||||
value="1" />
|
value="1" />
|
||||||
|
@ -3173,6 +3227,9 @@ This MUST follow the Enum MISSION_DESC::TIconId
|
||||||
<variable entry="UI:SAVE:INV_ROOM:FILTER_MISSMP"
|
<variable entry="UI:SAVE:INV_ROOM:FILTER_MISSMP"
|
||||||
type="sint32"
|
type="sint32"
|
||||||
value="1" />
|
value="1" />
|
||||||
|
<variable entry="UI:SAVE:INV_ROOM:FILTER_TP"
|
||||||
|
type="sint32"
|
||||||
|
value="1" />
|
||||||
<!-- List Menu 1 -->
|
<!-- List Menu 1 -->
|
||||||
<variable entry="UI:VARIABLES:ISACTIVE:SETS"
|
<variable entry="UI:VARIABLES:ISACTIVE:SETS"
|
||||||
type="sint32"
|
type="sint32"
|
||||||
|
@ -3809,4 +3866,10 @@ This MUST follow the Enum MISSION_DESC::TIconId
|
||||||
<variable entry="UI:TEMP:R2_DRAW_ARRAY"
|
<variable entry="UI:TEMP:R2_DRAW_ARRAY"
|
||||||
type="bool"
|
type="bool"
|
||||||
value="0" />
|
value="0" />
|
||||||
|
<variable entry="UI:TEMP:DEFAULT_WEB_RETRY_TIMEOUT"
|
||||||
|
type="sint32"
|
||||||
|
value="2" />
|
||||||
|
<variable entry="UI:SAVE:WEBIG_RETRY_DELAY"
|
||||||
|
type="sint32"
|
||||||
|
value="2" />
|
||||||
</interface_config>
|
</interface_config>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<variable entry="UI:VARIABLES:ENCY:REWARDBRICK:SHEET" type="sint32" value="0" />
|
<variable entry="UI:VARIABLES:ENCY:REWARDBRICK:SHEET" type="sint32" value="0" />
|
||||||
<variable entry="UI:VARIABLES:ENCY:ALBUMBRICK:SHEET" type="sint32" value="0" />
|
<variable entry="UI:VARIABLES:ENCY:ALBUMBRICK:SHEET" type="sint32" value="0" />
|
||||||
|
|
||||||
<style style="ency_title" type="text" color="255 255 255 255" fontsize="14" shadow="true" case_mode="%case_first_string_letter_up"/>
|
<style style="ency_title" type="text" color="255 255 255 255" fontsize="14" shadow="true" case_mode="%case_normal"/>
|
||||||
<style style="ency_title2" type="text" color="255 255 255 192" fontsize="12" shadow="true" />
|
<style style="ency_title2" type="text" color="255 255 255 192" fontsize="12" shadow="true" />
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1615,19 +1615,82 @@
|
||||||
x="0"
|
x="0"
|
||||||
y="-4" />
|
y="-4" />
|
||||||
<instance template="tgcw_color"
|
<instance template="tgcw_color"
|
||||||
id="cc_dyn"
|
id="cc_dyn0"
|
||||||
text="uiDynColor"
|
text="uiDynColor0"
|
||||||
title="uiCCDDyn"
|
title="uiCCDDyn0"
|
||||||
tooltip="uittChooseDynColor"
|
tooltip="uittChooseDynColor0"
|
||||||
posref="BL TL"
|
posref="BL TL"
|
||||||
posparent="cc_shout"
|
posparent="cc_shout"
|
||||||
x="0"
|
x="0"
|
||||||
y="-4" />
|
y="-4" />
|
||||||
|
<instance template="tgcw_color"
|
||||||
|
id="cc_dyn1"
|
||||||
|
text="uiDynColor1"
|
||||||
|
title="uiCCDDyn1"
|
||||||
|
tooltip="uittChooseDynColor1"
|
||||||
|
posref="BL TL"
|
||||||
|
posparent="cc_dyn0"
|
||||||
|
x="0"
|
||||||
|
y="-4" />
|
||||||
|
<instance template="tgcw_color"
|
||||||
|
id="cc_dyn2"
|
||||||
|
text="uiDynColor2"
|
||||||
|
title="uiCCDDyn2"
|
||||||
|
tooltip="uittChooseDynColor2"
|
||||||
|
posref="BL TL"
|
||||||
|
posparent="cc_dyn1"
|
||||||
|
x="0"
|
||||||
|
y="-4" />
|
||||||
|
<instance template="tgcw_color"
|
||||||
|
id="cc_dyn3"
|
||||||
|
text="uiDynColor3"
|
||||||
|
title="uiCCDDyn3"
|
||||||
|
tooltip="uittChooseDynColor3"
|
||||||
|
posref="BL TL"
|
||||||
|
posparent="cc_dyn2"
|
||||||
|
x="0"
|
||||||
|
y="-4" />
|
||||||
|
<instance template="tgcw_color"
|
||||||
|
id="cc_dyn4"
|
||||||
|
text="uiDynColor4"
|
||||||
|
title="uiCCDDyn4"
|
||||||
|
tooltip="uittChooseDynColor4"
|
||||||
|
posref="BL TL"
|
||||||
|
posparent="cc_dyn3"
|
||||||
|
x="0"
|
||||||
|
y="-4" />
|
||||||
|
<instance template="tgcw_color"
|
||||||
|
id="cc_dyn5"
|
||||||
|
text="uiDynColor5"
|
||||||
|
title="uiCCDDyn5"
|
||||||
|
tooltip="uittChooseDynColor5"
|
||||||
|
posref="BL TL"
|
||||||
|
posparent="cc_dyn4"
|
||||||
|
x="0"
|
||||||
|
y="-4" />
|
||||||
|
<instance template="tgcw_color"
|
||||||
|
id="cc_dyn6"
|
||||||
|
text="uiDynColor6"
|
||||||
|
title="uiCCDDyn6"
|
||||||
|
tooltip="uittChooseDynColor6"
|
||||||
|
posref="BL TL"
|
||||||
|
posparent="cc_dyn5"
|
||||||
|
x="0"
|
||||||
|
y="-4" />
|
||||||
|
<instance template="tgcw_color"
|
||||||
|
id="cc_dyn7"
|
||||||
|
text="uiDynColor7"
|
||||||
|
title="uiCCDDyn7"
|
||||||
|
tooltip="uittChooseDynColor7"
|
||||||
|
posref="BL TL"
|
||||||
|
posparent="cc_dyn6"
|
||||||
|
x="0"
|
||||||
|
y="-4" />
|
||||||
<instance template="tgcw_checkbox"
|
<instance template="tgcw_checkbox"
|
||||||
id="enter_dontquit_cb"
|
id="enter_dontquit_cb"
|
||||||
text="uiEnterDontQuitCB"
|
text="uiEnterDontQuitCB"
|
||||||
tooltip="uittChatEnter"
|
tooltip="uittChatEnter"
|
||||||
posparent="cc_dyn"
|
posparent="cc_dyn7"
|
||||||
posref="BL TL"
|
posref="BL TL"
|
||||||
x="0"
|
x="0"
|
||||||
y="-8" />
|
y="-8" />
|
||||||
|
@ -1647,11 +1710,19 @@
|
||||||
posref="BL TL"
|
posref="BL TL"
|
||||||
x="0"
|
x="0"
|
||||||
y="-8" />
|
y="-8" />
|
||||||
<instance template="tgcw_scrollbarint"
|
<instance template="tgcw_checkbox"
|
||||||
|
id="show_online_offline_notifications_cb"
|
||||||
|
text="uiShowOnlineOfflineNotifications"
|
||||||
|
tooltip="uittShowOnlineOfflineNotifications"
|
||||||
|
posparent="show_dyn_channel_name_in_chat_cb"
|
||||||
|
posref="BL TL"
|
||||||
|
x="0"
|
||||||
|
y="-8" />
|
||||||
|
<instance template="tgcw_scrollbarint"
|
||||||
id="font_size"
|
id="font_size"
|
||||||
text="uiFontSize"
|
text="uiFontSize"
|
||||||
posref="BL TL"
|
posref="BL TL"
|
||||||
posparent="show_dyn_channel_name_in_chat_cb"
|
posparent="show_online_offline_notifications_cb"
|
||||||
x="0"
|
x="0"
|
||||||
y="-8" />
|
y="-8" />
|
||||||
<link expr="@UI:SAVE:CHAT:ENTER_DONT_QUIT_CB"
|
<link expr="@UI:SAVE:CHAT:ENTER_DONT_QUIT_CB"
|
||||||
|
@ -1660,7 +1731,9 @@
|
||||||
target="show_times_in_chat_cb:c:pushed" />
|
target="show_times_in_chat_cb:c:pushed" />
|
||||||
<link expr="@UI:SAVE:CHAT:SHOW_DYN_CHANNEL_NAME_IN_CHAT_CB"
|
<link expr="@UI:SAVE:CHAT:SHOW_DYN_CHANNEL_NAME_IN_CHAT_CB"
|
||||||
target="show_dyn_channel_name_in_chat_cb:c:pushed" />
|
target="show_dyn_channel_name_in_chat_cb:c:pushed" />
|
||||||
</group>
|
<link expr="@UI:SAVE:CHAT:SHOW_ONLINE_OFFLINE_NOTIFICATIONS_CB"
|
||||||
|
target="show_online_offline_notifications_cb:c:pushed" />
|
||||||
|
</group>
|
||||||
<ctrl style="skin_scroll"
|
<ctrl style="skin_scroll"
|
||||||
id="sb_chat_colors"
|
id="sb_chat_colors"
|
||||||
align="T"
|
align="T"
|
||||||
|
@ -1886,12 +1959,20 @@
|
||||||
posparent="is_user_name"
|
posparent="is_user_name"
|
||||||
x="0"
|
x="0"
|
||||||
y="-4" />
|
y="-4" />
|
||||||
|
<instance template="tgcw_checkbox"
|
||||||
|
id="is_user_rptags"
|
||||||
|
text="uiRpTags"
|
||||||
|
tooltip="uittRpTags"
|
||||||
|
posref="BL TL"
|
||||||
|
posparent="is_user_title"
|
||||||
|
x="0"
|
||||||
|
y="-4" />
|
||||||
<instance template="tgcw_checkbox"
|
<instance template="tgcw_checkbox"
|
||||||
id="is_user_guild_name"
|
id="is_user_guild_name"
|
||||||
text="uigcGuildName"
|
text="uigcGuildName"
|
||||||
tooltip="uittGuildName"
|
tooltip="uittGuildName"
|
||||||
posref="BL TL"
|
posref="BL TL"
|
||||||
posparent="is_user_title"
|
posparent="is_user_rptags"
|
||||||
x="0"
|
x="0"
|
||||||
y="-4" />
|
y="-4" />
|
||||||
<instance template="tgcw_checkbox"
|
<instance template="tgcw_checkbox"
|
||||||
|
@ -1995,12 +2076,20 @@
|
||||||
posparent="is_friend_name"
|
posparent="is_friend_name"
|
||||||
x="0"
|
x="0"
|
||||||
y="-4" />
|
y="-4" />
|
||||||
|
<instance template="tgcw_checkbox"
|
||||||
|
id="is_friend_rptags"
|
||||||
|
text="uiRpTags"
|
||||||
|
tooltip="uittRpTags"
|
||||||
|
posref="BL TL"
|
||||||
|
posparent="is_friend_title"
|
||||||
|
x="0"
|
||||||
|
y="-4" />
|
||||||
<instance template="tgcw_checkbox"
|
<instance template="tgcw_checkbox"
|
||||||
id="is_friend_guild_name"
|
id="is_friend_guild_name"
|
||||||
text="uigcGuildName"
|
text="uigcGuildName"
|
||||||
tooltip="uittGuildName"
|
tooltip="uittGuildName"
|
||||||
posref="BL TL"
|
posref="BL TL"
|
||||||
posparent="is_friend_title"
|
posparent="is_friend_rptags"
|
||||||
x="0"
|
x="0"
|
||||||
y="-4" />
|
y="-4" />
|
||||||
<instance template="tgcw_checkbox"
|
<instance template="tgcw_checkbox"
|
||||||
|
@ -2112,12 +2201,20 @@
|
||||||
posparent="is_enemy_name"
|
posparent="is_enemy_name"
|
||||||
x="0"
|
x="0"
|
||||||
y="-4" />
|
y="-4" />
|
||||||
|
<instance template="tgcw_checkbox"
|
||||||
|
id="is_enemy_rptags"
|
||||||
|
text="uiRpTags"
|
||||||
|
tooltip="uittRpTags"
|
||||||
|
posref="BL TL"
|
||||||
|
posparent="is_enemy_title"
|
||||||
|
x="0"
|
||||||
|
y="-4" />
|
||||||
<instance template="tgcw_checkbox"
|
<instance template="tgcw_checkbox"
|
||||||
id="is_enemy_guild_name"
|
id="is_enemy_guild_name"
|
||||||
text="uigcGuildName"
|
text="uigcGuildName"
|
||||||
tooltip="uittGuildName"
|
tooltip="uittGuildName"
|
||||||
posref="BL TL"
|
posref="BL TL"
|
||||||
posparent="is_enemy_title"
|
posparent="is_enemy_rptags"
|
||||||
x="0"
|
x="0"
|
||||||
y="-4" />
|
y="-4" />
|
||||||
<instance template="tgcw_checkbox"
|
<instance template="tgcw_checkbox"
|
||||||
|
@ -3095,10 +3192,45 @@
|
||||||
widget="colbut"
|
widget="colbut"
|
||||||
link="UI:SAVE:CHAT:COLORS:SHOUT"
|
link="UI:SAVE:CHAT:COLORS:SHOUT"
|
||||||
realtime="true" />
|
realtime="true" />
|
||||||
<param ui="chat_colors:cc_dyn:c"
|
<param ui="chat_colors:cc_dyn0:c"
|
||||||
type="db"
|
type="db"
|
||||||
widget="colbut"
|
widget="colbut"
|
||||||
link="UI:SAVE:CHAT:COLORS:DYN"
|
link="UI:SAVE:CHAT:COLORS:DYN:0"
|
||||||
|
realtime="true" />
|
||||||
|
<param ui="chat_colors:cc_dyn1:c"
|
||||||
|
type="db"
|
||||||
|
widget="colbut"
|
||||||
|
link="UI:SAVE:CHAT:COLORS:DYN:1"
|
||||||
|
realtime="true" />
|
||||||
|
<param ui="chat_colors:cc_dyn2:c"
|
||||||
|
type="db"
|
||||||
|
widget="colbut"
|
||||||
|
link="UI:SAVE:CHAT:COLORS:DYN:2"
|
||||||
|
realtime="true" />
|
||||||
|
<param ui="chat_colors:cc_dyn3:c"
|
||||||
|
type="db"
|
||||||
|
widget="colbut"
|
||||||
|
link="UI:SAVE:CHAT:COLORS:DYN:3"
|
||||||
|
realtime="true" />
|
||||||
|
<param ui="chat_colors:cc_dyn4:c"
|
||||||
|
type="db"
|
||||||
|
widget="colbut"
|
||||||
|
link="UI:SAVE:CHAT:COLORS:DYN:4"
|
||||||
|
realtime="true" />
|
||||||
|
<param ui="chat_colors:cc_dyn5:c"
|
||||||
|
type="db"
|
||||||
|
widget="colbut"
|
||||||
|
link="UI:SAVE:CHAT:COLORS:DYN:5"
|
||||||
|
realtime="true" />
|
||||||
|
<param ui="chat_colors:cc_dyn6:c"
|
||||||
|
type="db"
|
||||||
|
widget="colbut"
|
||||||
|
link="UI:SAVE:CHAT:COLORS:DYN:6"
|
||||||
|
realtime="true" />
|
||||||
|
<param ui="chat_colors:cc_dyn7:c"
|
||||||
|
type="db"
|
||||||
|
widget="colbut"
|
||||||
|
link="UI:SAVE:CHAT:COLORS:DYN:7"
|
||||||
realtime="true" />
|
realtime="true" />
|
||||||
<!--
|
<!--
|
||||||
<param ui="chat_colors:cc_shout:c" type="db" widget="colbut" link="UI:SAVE:CHAT:COLORS:SHOUT" realtime="true" />
|
<param ui="chat_colors:cc_shout:c" type="db" widget="colbut" link="UI:SAVE:CHAT:COLORS:SHOUT" realtime="true" />
|
||||||
|
@ -3120,6 +3252,11 @@
|
||||||
widget="boolbut"
|
widget="boolbut"
|
||||||
link="UI:SAVE:CHAT:SHOW_DYN_CHANNEL_NAME_IN_CHAT_CB"
|
link="UI:SAVE:CHAT:SHOW_DYN_CHANNEL_NAME_IN_CHAT_CB"
|
||||||
realtime="true" />
|
realtime="true" />
|
||||||
|
<param ui="chat_colors:show_online_offline_notifications_cb:c"
|
||||||
|
type="db"
|
||||||
|
widget="boolbut"
|
||||||
|
link="UI:SAVE:CHAT:SHOW_ONLINE_OFFLINE_NOTIFICATIONS_CB"
|
||||||
|
realtime="true" />
|
||||||
<param ui="chat_colors:font_size:c"
|
<param ui="chat_colors:font_size:c"
|
||||||
type="db"
|
type="db"
|
||||||
widget="sbint"
|
widget="sbint"
|
||||||
|
@ -3222,6 +3359,11 @@
|
||||||
widget="boolbut"
|
widget="boolbut"
|
||||||
link="UI:SAVE:INSCENE:USER:TITLE"
|
link="UI:SAVE:INSCENE:USER:TITLE"
|
||||||
realtime="true" />
|
realtime="true" />
|
||||||
|
<param ui="in_scene_user:is_user_rptags:c"
|
||||||
|
type="db"
|
||||||
|
widget="boolbut"
|
||||||
|
link="UI:SAVE:INSCENE:USER:RPTAGS"
|
||||||
|
realtime="true" />
|
||||||
<param ui="in_scene_user:is_user_guild_name:c"
|
<param ui="in_scene_user:is_user_guild_name:c"
|
||||||
type="db"
|
type="db"
|
||||||
widget="boolbut"
|
widget="boolbut"
|
||||||
|
@ -3272,6 +3414,11 @@
|
||||||
widget="boolbut"
|
widget="boolbut"
|
||||||
link="UI:SAVE:INSCENE:FRIEND:TITLE"
|
link="UI:SAVE:INSCENE:FRIEND:TITLE"
|
||||||
realtime="true" />
|
realtime="true" />
|
||||||
|
<param ui="in_scene_friend:is_friend_rptags:c"
|
||||||
|
type="db"
|
||||||
|
widget="boolbut"
|
||||||
|
link="UI:SAVE:INSCENE:FRIEND:RPTAGS"
|
||||||
|
realtime="true" />
|
||||||
<param ui="in_scene_friend:is_friend_guild_name:c"
|
<param ui="in_scene_friend:is_friend_guild_name:c"
|
||||||
type="db"
|
type="db"
|
||||||
widget="boolbut"
|
widget="boolbut"
|
||||||
|
@ -3327,6 +3474,11 @@
|
||||||
widget="boolbut"
|
widget="boolbut"
|
||||||
link="UI:SAVE:INSCENE:ENEMY:TITLE"
|
link="UI:SAVE:INSCENE:ENEMY:TITLE"
|
||||||
realtime="true" />
|
realtime="true" />
|
||||||
|
<param ui="in_scene_enemy:is_enemy_rptags:c"
|
||||||
|
type="db"
|
||||||
|
widget="boolbut"
|
||||||
|
link="UI:SAVE:INSCENE:ENEMY:RPTAGS"
|
||||||
|
realtime="true" />
|
||||||
<param ui="in_scene_enemy:is_enemy_guild_name:c"
|
<param ui="in_scene_enemy:is_enemy_guild_name:c"
|
||||||
type="db"
|
type="db"
|
||||||
widget="boolbut"
|
widget="boolbut"
|
||||||
|
|
|
@ -463,27 +463,7 @@
|
||||||
<!-- ***************** -->
|
<!-- ***************** -->
|
||||||
<!-- * GUILD FORUM * -->
|
<!-- * GUILD FORUM * -->
|
||||||
<!-- ***************** -->
|
<!-- ***************** -->
|
||||||
<proc id="guild_forum_proc_active">
|
|
||||||
<action handler="set"
|
|
||||||
params="dblink=UI:VARIABLES:ISACTIVE:GUILD_FORUM|value=1" />
|
|
||||||
<action handler="set"
|
|
||||||
cond="not(%is_guild_present)"
|
|
||||||
params="target='ui:interface:guild_forum:active'|value=0" />
|
|
||||||
<action handler="browse"
|
|
||||||
params="name=ui:interface:guild_forum:content:html|url=home|show=0" />
|
|
||||||
</proc>
|
|
||||||
<proc id="guild_forum_proc_deactive">
|
|
||||||
<action handler="set"
|
|
||||||
params="dblink=UI:VARIABLES:ISACTIVE:GUILD_FORUM|value=0" />
|
|
||||||
</proc>
|
|
||||||
<group type="menu"
|
|
||||||
id="guild_forum_menu"
|
|
||||||
extends="base_menu_with_color">
|
|
||||||
<action id="home"
|
|
||||||
name="uiHOME"
|
|
||||||
handler="browse"
|
|
||||||
params="name=ui:interface:guild_forum:content:html|url=home" />
|
|
||||||
</group>
|
|
||||||
<group type="container"
|
<group type="container"
|
||||||
id="guild_forum"
|
id="guild_forum"
|
||||||
w="480"
|
w="480"
|
||||||
|
@ -531,7 +511,7 @@
|
||||||
w="0"
|
w="0"
|
||||||
h="0"
|
h="0"
|
||||||
posref="TL TL">
|
posref="TL TL">
|
||||||
<group type="forum_html"
|
<group type="html"
|
||||||
id="html"
|
id="html"
|
||||||
posref="TL TL"
|
posref="TL TL"
|
||||||
url="home"
|
url="home"
|
||||||
|
@ -828,24 +808,7 @@
|
||||||
<!-- ************** -->
|
<!-- ************** -->
|
||||||
<!-- * MAIL BOX * -->
|
<!-- * MAIL BOX * -->
|
||||||
<!-- ************** -->
|
<!-- ************** -->
|
||||||
<proc id="mailbox_proc_active">
|
|
||||||
<action handler="set"
|
|
||||||
params="dblink=UI:VARIABLES:ISACTIVE:MAILBOX|value=1" />
|
|
||||||
<action handler="browse"
|
|
||||||
params="name=ui:interface:mailbox:content:html|url=home|show=0" />
|
|
||||||
</proc>
|
|
||||||
<proc id="mailbox_proc_deactive">
|
|
||||||
<action handler="set"
|
|
||||||
params="dblink=UI:VARIABLES:ISACTIVE:MAILBOX|value=0" />
|
|
||||||
</proc>
|
|
||||||
<group type="menu"
|
|
||||||
id="mailbox_menu"
|
|
||||||
extends="base_menu_with_color">
|
|
||||||
<action id="home"
|
|
||||||
name="uiHOME"
|
|
||||||
handler="browse"
|
|
||||||
params="name=ui:interface:mailbox:content:html|url=home" />
|
|
||||||
</group>
|
|
||||||
<group type="container"
|
<group type="container"
|
||||||
id="mailbox"
|
id="mailbox"
|
||||||
w="480"
|
w="480"
|
||||||
|
@ -892,7 +855,7 @@
|
||||||
w="0"
|
w="0"
|
||||||
h="0"
|
h="0"
|
||||||
posref="TL TL">
|
posref="TL TL">
|
||||||
<group type="mail_html"
|
<group type="html"
|
||||||
id="html"
|
id="html"
|
||||||
posref="TL TL"
|
posref="TL TL"
|
||||||
url="home"
|
url="home"
|
||||||
|
@ -976,8 +939,6 @@
|
||||||
<proc id="webig_proc_active">
|
<proc id="webig_proc_active">
|
||||||
<action handler="set"
|
<action handler="set"
|
||||||
params="dblink=UI:VARIABLES:ISACTIVE:WEBIG|value=1" />
|
params="dblink=UI:VARIABLES:ISACTIVE:WEBIG|value=1" />
|
||||||
<action handler="browse"
|
|
||||||
params="name=ui:interface:webig:content:html|url=home" />
|
|
||||||
</proc>
|
</proc>
|
||||||
<proc id="webig_proc_deactive">
|
<proc id="webig_proc_deactive">
|
||||||
<action handler="set"
|
<action handler="set"
|
||||||
|
@ -1088,7 +1049,7 @@
|
||||||
<group type="webig_html"
|
<group type="webig_html"
|
||||||
id="html"
|
id="html"
|
||||||
posref="TL TL"
|
posref="TL TL"
|
||||||
url="http://atys.ryzom.com/start/index.php"
|
url=""
|
||||||
home="http://atys.ryzom.com/start/index.php"
|
home="http://atys.ryzom.com/start/index.php"
|
||||||
sizeref="wh"
|
sizeref="wh"
|
||||||
x="0"
|
x="0"
|
||||||
|
@ -1254,8 +1215,8 @@
|
||||||
<group type="webig_html"
|
<group type="webig_html"
|
||||||
id="html"
|
id="html"
|
||||||
posref="TL TL"
|
posref="TL TL"
|
||||||
url="http://atys.ryzom.com/start/app_ig_start.php"
|
url=""
|
||||||
home="http://atys.ryzom.com/start/app_ig_start.php"
|
home="http://atys.ryzom.com/start/init_ig.php"
|
||||||
sizeref="wh"
|
sizeref="wh"
|
||||||
x="0"
|
x="0"
|
||||||
y="0"
|
y="0"
|
||||||
|
|
|
@ -283,17 +283,14 @@ function game:onDrawNpcWebPage()
|
||||||
local utf8Url = ucUrl:toUtf8()
|
local utf8Url = ucUrl:toUtf8()
|
||||||
local isRing = string.find(utf8Url, "ring_access_point=1") ~= nil
|
local isRing = string.find(utf8Url, "ring_access_point=1") ~= nil
|
||||||
if isRing then
|
if isRing then
|
||||||
-- when in ring mode, add the parameters ourselves. 60 sec timeout because of zope...
|
|
||||||
-- browseNpcWebPage(uiStr, utf8Url .. game.RingAccessPointFilter:getURLParameters(), false, 60)
|
|
||||||
-- Use new window after revamp
|
|
||||||
--RingAccessPoint:getWindow().active = 1
|
|
||||||
--RingAccessPoint:getWindow():center()
|
|
||||||
--RingAccessPoint:getWindow():blink(1)
|
|
||||||
--RingAccessPoint:show()
|
|
||||||
getUI("ui:interface:npc_web_browser").active = false
|
getUI("ui:interface:npc_web_browser").active = false
|
||||||
runAH(nil, "context_ring_sessions", "")
|
runAH(nil, "context_ring_sessions", "")
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
|
local hideWindow = string.find(utf8Url, "_hideWindow=1") ~= nil
|
||||||
|
if hideWindow then
|
||||||
|
getUI("ui:interface:npc_web_browser").active = false
|
||||||
|
end
|
||||||
self.NpcWebPage.BrowseDone= true;
|
self.NpcWebPage.BrowseDone= true;
|
||||||
browseNpcWebPage(uiStr, utf8Url, true, 10); -- 'true' is for 'add parameters' here. 10 is standard timeout
|
browseNpcWebPage(uiStr, utf8Url, true, 10); -- 'true' is for 'add parameters' here. 10 is standard timeout
|
||||||
end
|
end
|
||||||
|
@ -302,9 +299,9 @@ function game:onDrawNpcWebPage()
|
||||||
-- if this is a ring window, then only the refresh button to access to filter will be available
|
-- if this is a ring window, then only the refresh button to access to filter will be available
|
||||||
local isRing = string.find(utf8Url, "ring_access_point=1") ~= nil
|
local isRing = string.find(utf8Url, "ring_access_point=1") ~= nil
|
||||||
local browser = getUI("ui:interface:npc_web_browser")
|
local browser = getUI("ui:interface:npc_web_browser")
|
||||||
browser:find("browse_redo").active = not isRing
|
browser:find("browse_redo").active = true
|
||||||
browser:find("browse_undo").active = not isRing
|
browser:find("browse_undo").active = true
|
||||||
browser:find("browse_refresh").active = isRing
|
browser:find("browse_refresh").active = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -978,6 +975,7 @@ function RingPlayerInfo:tooltipRRPs(dbBase, ttFormat)
|
||||||
setContextHelpText(fmt);
|
setContextHelpText(fmt);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
function RingPlayerInfo:tooltipRingRating(level, progress, ttFormat)
|
function RingPlayerInfo:tooltipRingRating(level, progress, ttFormat)
|
||||||
|
@ -1012,6 +1010,27 @@ function RingPlayerInfo:getLevelRatingAndImprovementRate(val)
|
||||||
return level, progress
|
return level, progress
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------------------------------------
|
||||||
|
--
|
||||||
|
function game:updateOrganization(path, uiOrgText, uiStatusText, uiPointsText)
|
||||||
|
|
||||||
|
local org = getDbProp(path.."1:VALUE")
|
||||||
|
getUICaller()[uiOrgText].uc_hardtext = i18n.get('uiOrganization_' .. org)
|
||||||
|
|
||||||
|
local status = getDbProp(path.."2:VALUE")
|
||||||
|
getUICaller()[uiStatusText].uc_hardtext= status
|
||||||
|
|
||||||
|
local points = getDbProp(path.."3:VALUE")
|
||||||
|
getUICaller()[uiPointsText].uc_hardtext= points
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------------------------------------
|
||||||
|
function game:organizationTooltip()
|
||||||
|
-- set the tooltip in InterfaceManager
|
||||||
|
setContextHelpText( i18n.get('uittOrganization') );
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------------------------------------
|
||||||
function game:popMissionList()
|
function game:popMissionList()
|
||||||
|
@ -1393,6 +1412,8 @@ end
|
||||||
function game:onMainLoopBegin()
|
function game:onMainLoopBegin()
|
||||||
game.InGameDbInitialized = false
|
game.InGameDbInitialized = false
|
||||||
game.PrevSessionMission = getDbProp("UI:VARIABLES:MISSION_SELECTED_PREV_SESSION")
|
game.PrevSessionMission = getDbProp("UI:VARIABLES:MISSION_SELECTED_PREV_SESSION")
|
||||||
|
|
||||||
|
debugInfo("onMainLoopBegin()")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -1408,6 +1429,29 @@ function game:onInGameDbInitialized()
|
||||||
if game.PrevSessionMission ~= -1 then
|
if game.PrevSessionMission ~= -1 then
|
||||||
self:setCurrentMission(game.PrevSessionMission)
|
self:setCurrentMission(game.PrevSessionMission)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
game:setInfoPlayerCharacterRace()
|
||||||
|
end
|
||||||
|
|
||||||
|
function game:onWebIgReady()
|
||||||
|
-- Call init webig
|
||||||
|
getUI("ui:interface:web_transactions:content:html"):browse("home")
|
||||||
|
getUI("ui:interface:webig:content:html"):browse("home")
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------------------------------------
|
||||||
|
-- handler called by C++ at the start of a far TP (log to char selection or far tp)
|
||||||
|
function game:onFarTpStart()
|
||||||
|
debugInfo("game:onFarTpStart()")
|
||||||
|
--game:deinitWebIgApps()
|
||||||
|
end
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------------------------------------
|
||||||
|
-- handler called by C++ after characer reselection or the end of a far TP
|
||||||
|
function game:onFarTpEnd()
|
||||||
|
debugInfo("game:onFarTpEnd()")
|
||||||
|
--game:preInitWebIgApps()
|
||||||
end
|
end
|
||||||
|
|
||||||
--------------------------------------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1415,8 +1459,8 @@ end
|
||||||
function game:onMainLoopEnd()
|
function game:onMainLoopEnd()
|
||||||
game.InGameDbInitialized = false
|
game.InGameDbInitialized = false
|
||||||
game:updateMissionJournalFixedEntry()
|
game:updateMissionJournalFixedEntry()
|
||||||
end
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
--------------------------------------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------------------------------------
|
||||||
-- ring journal on / off
|
-- ring journal on / off
|
||||||
|
@ -1471,6 +1515,11 @@ function game:onNewMissionStepAdded(stepIndex)
|
||||||
local missionWnd = getMissionWindow()
|
local missionWnd = getMissionWindow()
|
||||||
local missionIndex = getDbProp("UI:SAVE:MISSION_SELECTED")
|
local missionIndex = getDbProp("UI:SAVE:MISSION_SELECTED")
|
||||||
local dbPath
|
local dbPath
|
||||||
|
|
||||||
|
if missionIndex < 0 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- debugInfo("New Step")
|
-- debugInfo("New Step")
|
||||||
if missionIndex < 15 then
|
if missionIndex < 15 then
|
||||||
dbPath = "SERVER:MISSIONS:" .. tostring(missionIndex) .. ":GOALS:" .. tostring(stepIndex) .. ":TEXT"
|
dbPath = "SERVER:MISSIONS:" .. tostring(missionIndex) .. ":GOALS:" .. tostring(stepIndex) .. ":TEXT"
|
||||||
|
@ -1651,3 +1700,64 @@ function game:getRPJobs()
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------------------------------------
|
||||||
|
function game:setInfoPlayerCharacterRace()
|
||||||
|
getUI("ui:interface:info_player_skills:content:basics_skills:character_race_name").uc_hardtext = i18n.get("io"..getUserRace())
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- --------------------------------------------------------------------------------------------------------------
|
||||||
|
-- game.preInitTimer = 0
|
||||||
|
-- function game:preInitWebIgAppsLoop()
|
||||||
|
-- if game.preInitTimer == nil then game.preInitTimer = 0 end
|
||||||
|
|
||||||
|
-- game.preInitTimer = game.preInitTimer - 1
|
||||||
|
-- if (not game.preWebIgAppsInitialized) and game.preInitTimer < 0 then
|
||||||
|
-- debugInfo("initWebIgAppsLoop(): calling app_ig_preinit.php")
|
||||||
|
-- getUI("ui:interface:web_transactions:content:html"):browse("http://atys.ryzom.com/start/app_ig_preinit.php")
|
||||||
|
-- game.preInitTimer = getDbProp("UI:SAVE:WEBIG_RETRY_DELAY")
|
||||||
|
-- end
|
||||||
|
|
||||||
|
-- if game.preWebIgAppsInitialized then
|
||||||
|
-- debugInfo("preInitWebIgAppsLoop(): Calling removeOnDbChange()")
|
||||||
|
-- removeOnDbChange(getUI("ui:interface"), "@UI:VARIABLES:CURRENT_SERVER_TICK")
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
|
||||||
|
-- --------------------------------------------------------------------------------------------------------------
|
||||||
|
-- function game:preInitWebIgApps()
|
||||||
|
-- debugInfo("game:preInitWebIgApps()")
|
||||||
|
-- addOnDbChange(getUI("ui:interface"), "@UI:VARIABLES:CURRENT_SERVER_TICK", "game:preInitWebIgAppsLoop()")
|
||||||
|
-- end
|
||||||
|
|
||||||
|
-- --------------------------------------------------------------------------------------------------------------
|
||||||
|
-- game.postInitTimer = 0
|
||||||
|
-- function game:postInitWebIgAppsLoop()
|
||||||
|
-- if game.postInitTimer == nil then game.postInitTimer = 0 end
|
||||||
|
|
||||||
|
-- game.postInitTimer = game.postInitTimer - 1
|
||||||
|
-- if game.postInitTimer < 0 then
|
||||||
|
-- debugInfo("initWebIgAppsLoop(): calling app_ig_postinit.php")
|
||||||
|
-- getUI("ui:interface:web_transactions:content:html"):browse("http://atys.ryzom.com/start/app_ig_postinit.php")
|
||||||
|
-- game.postInitTimer = getDbProp("UI:SAVE:WEBIG_RETRY_DELAY")
|
||||||
|
-- end
|
||||||
|
|
||||||
|
-- if game.postWebIgAppsInitialized then
|
||||||
|
-- debugInfo("postInitWebIgAppsLoop(): Calling removeOnDbChange()")
|
||||||
|
-- removeOnDbChange(getUI("ui:interface:milko_pad"), "@UI:VARIABLES:CURRENT_SERVER_TICK")
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
|
||||||
|
-- --------------------------------------------------------------------------------------------------------------
|
||||||
|
-- function game:postInitWebIgApps()
|
||||||
|
-- debugInfo("game:postInitWebIgApps()")
|
||||||
|
-- addOnDbChange(getUI("ui:interface:milko_pad"), "@UI:VARIABLES:CURRENT_SERVER_TICK", "game:postInitWebIgAppsLoop()")
|
||||||
|
-- end
|
||||||
|
|
||||||
|
-- --------------------------------------------------------------------------------------------------------------
|
||||||
|
-- function game:deinitWebIgApps()
|
||||||
|
-- debugInfo("game:deinitWebIgApps()")
|
||||||
|
-- game.preWebIgAppsInitialized = nil
|
||||||
|
-- game.postWebIgAppsInitialized = nil
|
||||||
|
-- titleSetted = nil
|
||||||
|
-- end
|
||||||
|
|
|
@ -676,54 +676,32 @@
|
||||||
y="0"
|
y="0"
|
||||||
h="0"
|
h="0"
|
||||||
posref="TL TL">
|
posref="TL TL">
|
||||||
<group id="title"
|
<view type="text"
|
||||||
posref="TL TL"
|
id="character_race_title"
|
||||||
sizeref="w"
|
posparent="basics_skills"
|
||||||
w="-1"
|
posref="TL TL"
|
||||||
h="24"
|
x="0"
|
||||||
y="-22">
|
y="-24"
|
||||||
<view type="text"
|
hardtext="uiRaceBold"
|
||||||
id="player_title_txt"
|
shadow="true"
|
||||||
posref="TL TL"
|
color="255 255 255 255"
|
||||||
x="0"
|
global_color="false"
|
||||||
y="-4"
|
fontsize="12" />
|
||||||
hardtext="uiPlayerTitle"
|
<view type="text"
|
||||||
shadow="true"
|
id="character_race_name"
|
||||||
color="255 255 255 255"
|
posparent="character_race_title"
|
||||||
global_color="false"
|
posref="TR TL"
|
||||||
fontsize="12" />
|
shadow="true"
|
||||||
<group type="combo_box"
|
color="255 200 55 255"
|
||||||
id="player_title"
|
global_color="false"
|
||||||
w="300"
|
x="2"
|
||||||
h="20"
|
fontsize="12"
|
||||||
value="UI:TITLE"
|
hardtext="" />
|
||||||
posparent="player_title_txt"
|
|
||||||
posref="TR TL"
|
|
||||||
x="4"
|
|
||||||
y="4"
|
|
||||||
on_select_start="title_combobox_button">
|
|
||||||
<instance template="combo_box_def1" />
|
|
||||||
</group>
|
|
||||||
<instance template="text_tt"
|
|
||||||
posparent="player_title"
|
|
||||||
tooltip="uittIdentityTitle" />
|
|
||||||
<link expr="@UI:TITLE"
|
|
||||||
action="title_combobox_changed" />
|
|
||||||
</group>
|
|
||||||
<ctrl style="text_button_16"
|
|
||||||
id="inf"
|
|
||||||
posref="TR TR"
|
|
||||||
y="-24"
|
|
||||||
wmargin="8"
|
|
||||||
hardtext="uiInfo"
|
|
||||||
tooltip="uittIdentityInfo"
|
|
||||||
onclick_l="open_title_help"
|
|
||||||
params_l="from=user" />
|
|
||||||
<group id="guild"
|
<group id="guild"
|
||||||
posref="TL TL"
|
posref="TL TL"
|
||||||
sizeref="w"
|
sizeref="w"
|
||||||
h="14"
|
h="14"
|
||||||
y="-52">
|
y="-48">
|
||||||
<view type="text"
|
<view type="text"
|
||||||
id="guild_title"
|
id="guild_title"
|
||||||
posref="TL TL"
|
posref="TL TL"
|
||||||
|
@ -1231,23 +1209,23 @@
|
||||||
posref="BL TL"
|
posref="BL TL"
|
||||||
y="0"
|
y="0"
|
||||||
val="%player_protect_cold" />
|
val="%player_protect_cold" />
|
||||||
<instance template="tipc_magic_protect"
|
|
||||||
id="Fire"
|
|
||||||
posparent="Cold"
|
|
||||||
posref="BL TL"
|
|
||||||
y="0"
|
|
||||||
val="%player_protect_fire" />
|
|
||||||
<instance template="tipc_magic_protect"
|
<instance template="tipc_magic_protect"
|
||||||
id="Rot"
|
id="Rot"
|
||||||
posparent="Fire"
|
posparent="Cold"
|
||||||
posref="BL TL"
|
posref="BL TL"
|
||||||
y="0"
|
y="0"
|
||||||
val="%player_protect_rot" />
|
val="%player_protect_rot" />
|
||||||
<instance template="tipc_magic_protect"
|
<instance template="tipc_magic_protect"
|
||||||
id="Shockwave"
|
id="Fire"
|
||||||
posparent="Rot"
|
posparent="Rot"
|
||||||
posref="BL TL"
|
posref="BL TL"
|
||||||
y="0"
|
y="0"
|
||||||
|
val="%player_protect_fire" />
|
||||||
|
<instance template="tipc_magic_protect"
|
||||||
|
id="Shockwave"
|
||||||
|
posparent="Fire"
|
||||||
|
posref="BL TL"
|
||||||
|
y="0"
|
||||||
val="%player_protect_shockwave" />
|
val="%player_protect_shockwave" />
|
||||||
<instance template="tipc_magic_protect"
|
<instance template="tipc_magic_protect"
|
||||||
id="Poison"
|
id="Poison"
|
||||||
|
@ -1420,9 +1398,60 @@
|
||||||
fontsize="12" />
|
fontsize="12" />
|
||||||
<instance template="faction_points_widget"
|
<instance template="faction_points_widget"
|
||||||
id="fp"
|
id="fp"
|
||||||
posref="TL TL"
|
posparent="ecosystem_points"
|
||||||
|
posref="BL TL"
|
||||||
x="0"
|
x="0"
|
||||||
y="-150" />
|
y="-10" />
|
||||||
|
<group id="pvp_points"
|
||||||
|
posparent="fp"
|
||||||
|
posref="BL TL"
|
||||||
|
sizeref="wh"
|
||||||
|
w="-1"
|
||||||
|
h="40"
|
||||||
|
y="-10">
|
||||||
|
<view type="text"
|
||||||
|
id="pvppoints_t"
|
||||||
|
posref="TL TL"
|
||||||
|
x="0"
|
||||||
|
y="0"
|
||||||
|
hardtext="uiPvpPoints"
|
||||||
|
shadow="true"
|
||||||
|
color="255 255 255 255"
|
||||||
|
global_color="false"
|
||||||
|
fontsize="12" />
|
||||||
|
<group id="black"
|
||||||
|
posref="TL TL"
|
||||||
|
x="0"
|
||||||
|
sizeref="w"
|
||||||
|
y="-14"
|
||||||
|
w="0"
|
||||||
|
h="26"
|
||||||
|
inherit_gc_alpha="true">
|
||||||
|
<view type="text"
|
||||||
|
id="total"
|
||||||
|
posref="ML ML"
|
||||||
|
x="8"
|
||||||
|
y="0"
|
||||||
|
hardtext="uiPvpTotal"
|
||||||
|
shadow="true"
|
||||||
|
color="255 255 255 255"
|
||||||
|
global_color="true"
|
||||||
|
fontsize="12" />
|
||||||
|
<view type="text_number"
|
||||||
|
id="val"
|
||||||
|
posref="MR MR"
|
||||||
|
x="-8"
|
||||||
|
y="0"
|
||||||
|
color="255 255 255 255"
|
||||||
|
global_color="true"
|
||||||
|
fontsize="12"
|
||||||
|
value="SERVER:USER:RRPS_LEVELS0:VALUE"
|
||||||
|
shadow="true" />
|
||||||
|
</group>
|
||||||
|
<instance template="inner_thin_border"
|
||||||
|
posparent="black"
|
||||||
|
inherit_gc_alpha="true" />
|
||||||
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group h="0" id="rpjobs" posref="TL TL" sizeref="wh" w="0" y="0">
|
<group h="0" id="rpjobs" posref="TL TL" sizeref="wh" w="0" y="0">
|
||||||
<ctrl style="text_button_header"
|
<ctrl style="text_button_header"
|
||||||
|
@ -1514,11 +1543,57 @@
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group h="0" id="webinfos" posref="TL TL" sizeref="wh" w="0" y="0">
|
<group h="0" id="webinfos" posref="TL TL" sizeref="wh" w="0" y="0">
|
||||||
|
<group id="title"
|
||||||
|
posref="TL TL"
|
||||||
|
sizeref="w"
|
||||||
|
active="true"
|
||||||
|
w="-1"
|
||||||
|
h="24"
|
||||||
|
y="-8">
|
||||||
|
<view type="text"
|
||||||
|
id="player_title_txt"
|
||||||
|
posref="TL TL"
|
||||||
|
x="8"
|
||||||
|
y="-4"
|
||||||
|
hardtext="uiPlayerTitle"
|
||||||
|
shadow="true"
|
||||||
|
color="255 255 255 255"
|
||||||
|
global_color="false"
|
||||||
|
fontsize="12" />
|
||||||
|
<group type="combo_box"
|
||||||
|
id="player_title"
|
||||||
|
w="300"
|
||||||
|
h="20"
|
||||||
|
value="UI:TITLE"
|
||||||
|
posparent="player_title_txt"
|
||||||
|
posref="TR TL"
|
||||||
|
x="4"
|
||||||
|
y="4"
|
||||||
|
on_select_start="title_combobox_button">
|
||||||
|
<instance template="combo_box_def1" />
|
||||||
|
</group>
|
||||||
|
<instance template="text_tt"
|
||||||
|
posparent="player_title"
|
||||||
|
tooltip="uittIdentityTitle" />
|
||||||
|
<link expr="@UI:TITLE"
|
||||||
|
action="title_combobox_changed" />
|
||||||
|
</group>
|
||||||
|
<ctrl style="text_button_16"
|
||||||
|
id="inf"
|
||||||
|
posref="TR TR"
|
||||||
|
active="true"
|
||||||
|
y="-9"
|
||||||
|
wmargin="8"
|
||||||
|
hardtext="uiInfo"
|
||||||
|
tooltip="uittIdentityInfo"
|
||||||
|
onclick_l="open_title_help"
|
||||||
|
params_l="from=user" />
|
||||||
<ctrl style="text_button_header"
|
<ctrl style="text_button_header"
|
||||||
button_type="push_button"
|
button_type="push_button"
|
||||||
id="browse_home"
|
id="browse_home"
|
||||||
posref="TR TR"
|
posref="BR TR"
|
||||||
x="-1"
|
posparent="title"
|
||||||
|
x="0"
|
||||||
y="-2"
|
y="-2"
|
||||||
hardtext="uiBrowseRefresh"
|
hardtext="uiBrowseRefresh"
|
||||||
tooltip="uittBrowseRefresh"
|
tooltip="uittBrowseRefresh"
|
||||||
|
@ -1533,7 +1608,7 @@
|
||||||
title_prefix=""
|
title_prefix=""
|
||||||
sizeref="wh"
|
sizeref="wh"
|
||||||
x="0"
|
x="0"
|
||||||
y="-8"
|
y="-42"
|
||||||
w="0"
|
w="0"
|
||||||
h="0"
|
h="0"
|
||||||
background_color="0 0 0 255"
|
background_color="0 0 0 255"
|
||||||
|
@ -1905,7 +1980,7 @@
|
||||||
<group id="content"
|
<group id="content"
|
||||||
x="0"
|
x="0"
|
||||||
y="0"
|
y="0"
|
||||||
h="272"
|
h="300"
|
||||||
posref="TL TL">
|
posref="TL TL">
|
||||||
<group id="you"
|
<group id="you"
|
||||||
posref="TL TL"
|
posref="TL TL"
|
||||||
|
@ -2004,7 +2079,7 @@
|
||||||
id="kami"
|
id="kami"
|
||||||
posref="TL TL"
|
posref="TL TL"
|
||||||
x="4"
|
x="4"
|
||||||
y="-180"
|
y="-160"
|
||||||
color="255 255 255 255"
|
color="255 255 255 255"
|
||||||
fontsize="10"
|
fontsize="10"
|
||||||
shadow="true"
|
shadow="true"
|
||||||
|
@ -2013,7 +2088,7 @@
|
||||||
id="karavan"
|
id="karavan"
|
||||||
posref="TL TL"
|
posref="TL TL"
|
||||||
x="4"
|
x="4"
|
||||||
y="-210"
|
y="-190"
|
||||||
color="255 255 255 255"
|
color="255 255 255 255"
|
||||||
fontsize="10"
|
fontsize="10"
|
||||||
shadow="true"
|
shadow="true"
|
||||||
|
@ -2021,7 +2096,7 @@
|
||||||
<group id="cult_allegiance_group"
|
<group id="cult_allegiance_group"
|
||||||
posref="TL TL"
|
posref="TL TL"
|
||||||
x="4"
|
x="4"
|
||||||
y="-240"
|
y="-220"
|
||||||
child_resize_h="true"
|
child_resize_h="true"
|
||||||
child_resize_w="true">
|
child_resize_w="true">
|
||||||
<view type="text"
|
<view type="text"
|
||||||
|
@ -2090,6 +2165,87 @@
|
||||||
id="fb5"
|
id="fb5"
|
||||||
x="100"
|
x="100"
|
||||||
path="SERVER:FAME:PLAYER5" />
|
path="SERVER:FAME:PLAYER5" />
|
||||||
|
<view type="text"
|
||||||
|
id="organization_text"
|
||||||
|
posref="TL TL"
|
||||||
|
x="0"
|
||||||
|
y="-245"
|
||||||
|
color="255 255 255 255"
|
||||||
|
fontsize="10"
|
||||||
|
global_color="true"
|
||||||
|
shadow="true"
|
||||||
|
hardtext="uiOrganization" />
|
||||||
|
<group id="organization"
|
||||||
|
posref="TL TL"
|
||||||
|
x="2"
|
||||||
|
y="-260"
|
||||||
|
h="34"
|
||||||
|
w="-4"
|
||||||
|
sizeref="w" >
|
||||||
|
<view type="text"
|
||||||
|
id="name"
|
||||||
|
posref="TL TL"
|
||||||
|
x="2"
|
||||||
|
y="-5"
|
||||||
|
color="255 255 255 255"
|
||||||
|
fontsize="10"
|
||||||
|
global_color="false"
|
||||||
|
shadow="true"
|
||||||
|
hardtext="" />
|
||||||
|
<view type="text"
|
||||||
|
id="text_points"
|
||||||
|
posref="BL BL"
|
||||||
|
x="4"
|
||||||
|
y="2"
|
||||||
|
color="255 255 255 255"
|
||||||
|
fontsize="10"
|
||||||
|
global_color="true"
|
||||||
|
shadow="true"
|
||||||
|
hardtext="uiPoints" />
|
||||||
|
<view type="text"
|
||||||
|
id="points"
|
||||||
|
posparent="text_points"
|
||||||
|
posref="MR ML"
|
||||||
|
x="4"
|
||||||
|
y="0"
|
||||||
|
color="255 255 255 255"
|
||||||
|
fontsize="10"
|
||||||
|
global_color="false"
|
||||||
|
shadow="true"
|
||||||
|
hardtext="0" />
|
||||||
|
<view type="text"
|
||||||
|
id="status"
|
||||||
|
posref="BR BR"
|
||||||
|
x="-4"
|
||||||
|
y="2"
|
||||||
|
color="255 255 255 255"
|
||||||
|
fontsize="10"
|
||||||
|
global_color="false"
|
||||||
|
shadow="true"
|
||||||
|
hardtext="0" />
|
||||||
|
<view type="text"
|
||||||
|
id="text_status"
|
||||||
|
posparent="status"
|
||||||
|
posref="ML MR"
|
||||||
|
x="-4"
|
||||||
|
y="0"
|
||||||
|
color="255 255 255 255"
|
||||||
|
fontsize="10"
|
||||||
|
global_color="true"
|
||||||
|
shadow="true"
|
||||||
|
hardtext="uiSkillJobLVL" />
|
||||||
|
<link expr="@SERVER:USER:RRPS_LEVELS1"
|
||||||
|
action="lua:game:updateOrganization('SERVER:USER:RRPS_LEVELS', 'name', 'status', 'points')" />
|
||||||
|
<link expr="@SERVER:USER:RRPS_LEVELS2"
|
||||||
|
action="lua:game:updateOrganization('SERVER:USER:RRPS_LEVELS', 'name', 'status', 'points')" />
|
||||||
|
<link expr="@SERVER:USER:RRPS_LEVELS3"
|
||||||
|
action="lua:game:updateOrganization('SERVER:USER:RRPS_LEVELS', 'name', 'status', 'points')" />
|
||||||
|
<instance template="text_tt"
|
||||||
|
posparent="parent"
|
||||||
|
on_tooltip="lua:game:organizationTooltip()" />
|
||||||
|
<instance template="inner_thin_border"
|
||||||
|
inherit_gc_alpha="true" />
|
||||||
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group id="guild"
|
<group id="guild"
|
||||||
posref="TL TL"
|
posref="TL TL"
|
||||||
|
|
|
@ -301,7 +301,6 @@
|
||||||
<view type="bitmap"
|
<view type="bitmap"
|
||||||
id="tag_1"
|
id="tag_1"
|
||||||
posref="TL TL"
|
posref="TL TL"
|
||||||
posparent="pvp_tags"
|
|
||||||
x="2"
|
x="2"
|
||||||
y="0"
|
y="0"
|
||||||
texture="alpha_10.tga"
|
texture="alpha_10.tga"
|
||||||
|
@ -2116,7 +2115,14 @@
|
||||||
name="uimDismiss"
|
name="uimDismiss"
|
||||||
handler="dismiss_member"
|
handler="dismiss_member"
|
||||||
params="" />
|
params="" />
|
||||||
<!-- <action id="successor" name="uimSetSuccesor" handler="set_successor" params=""/>-->
|
<action id="leader"
|
||||||
|
name="uimSetTeamLeader"
|
||||||
|
handler="set_team_leader"
|
||||||
|
params=""/>
|
||||||
|
<action id="successor"
|
||||||
|
name="uimSetSuccesor"
|
||||||
|
handler="set_successor"
|
||||||
|
params=""/>
|
||||||
<!-- <action id="emote" name="uimEmotes" hanlder="" params="">
|
<!-- <action id="emote" name="uimEmotes" hanlder="" params="">
|
||||||
<action id="emote1" name="uimEmote1" handler="emote" params="emote_id=0"/>
|
<action id="emote1" name="uimEmote1" handler="emote" params="emote_id=0"/>
|
||||||
<action id="emote2" name="uimEmote2" handler="emote" params="emote_id=1"/>
|
<action id="emote2" name="uimEmote2" handler="emote" params="emote_id=1"/>
|
||||||
|
@ -2147,6 +2153,10 @@
|
||||||
<!-- links to enable leader options -->
|
<!-- links to enable leader options -->
|
||||||
<link expr="eq(band(@SERVER:GROUP:LEADER_INDEX, 15), 15)"
|
<link expr="eq(band(@SERVER:GROUP:LEADER_INDEX, 15), 15)"
|
||||||
target="ui:interface:team_member_menu:dismiss:active" />
|
target="ui:interface:team_member_menu:dismiss:active" />
|
||||||
|
<link expr="eq(band(@SERVER:GROUP:LEADER_INDEX, 15), 15)"
|
||||||
|
target="ui:interface:team_member_menu:leader:active" />
|
||||||
|
<link expr="eq(band(@SERVER:GROUP:LEADER_INDEX, 15), 15)"
|
||||||
|
target="ui:interface:team_member_menu:successor:active" />
|
||||||
<!-- menu on the chat of the team for the leader -->
|
<!-- menu on the chat of the team for the leader -->
|
||||||
<group type="menu"
|
<group type="menu"
|
||||||
id="team_chat_leader_menu"
|
id="team_chat_leader_menu"
|
||||||
|
@ -2481,21 +2491,13 @@
|
||||||
<view type="text"
|
<view type="text"
|
||||||
id="text"
|
id="text"
|
||||||
posref="TM TM"
|
posref="TM TM"
|
||||||
color="233 197 42 255"
|
color="42 197 233 255"
|
||||||
x="10"
|
x="10"
|
||||||
y="-10"
|
y="-10"
|
||||||
fontsize="14"
|
fontsize="12"
|
||||||
global_color="false"
|
global_color="false"
|
||||||
shadow="true"
|
shadow="true"
|
||||||
hardtext="uiJoinDuelProposal" />
|
hardtext="uiJoinLeagueProposal" />
|
||||||
<view type="bitmap"
|
|
||||||
id="warning"
|
|
||||||
posparent="text"
|
|
||||||
posref="ML MR"
|
|
||||||
y="4"
|
|
||||||
x="-4"
|
|
||||||
global_color="false"
|
|
||||||
texture="w_warning.tga" />
|
|
||||||
<group id="content"
|
<group id="content"
|
||||||
child_resize_h="true"
|
child_resize_h="true"
|
||||||
child_resize_hmargin="10">
|
child_resize_hmargin="10">
|
||||||
|
|
|
@ -206,6 +206,7 @@ SYNTAXE:
|
||||||
positive="true"
|
positive="true"
|
||||||
suffix=""
|
suffix=""
|
||||||
prefix=""
|
prefix=""
|
||||||
|
format="false" // make the number thousands formatted
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -676,8 +676,7 @@
|
||||||
<!-- Simple Message Box with just a OK button -->
|
<!-- Simple Message Box with just a OK button -->
|
||||||
<group type="modal" id="message_box" exit_click_out="true" posparent="char3d" posref="MM MM" w="250" child_resize_h="true" child_resize_hmargin="100"
|
<group type="modal" id="message_box" exit_click_out="true" posparent="char3d" posref="MM MM" w="250" child_resize_h="true" child_resize_hmargin="100"
|
||||||
on_enter="leave_modal" mouse_pos="false" escapable="false"
|
on_enter="leave_modal" mouse_pos="false" escapable="false"
|
||||||
display="false"
|
display="false">
|
||||||
>
|
|
||||||
<instance template="outgame_popup" id="back" posref="TL TL" />
|
<instance template="outgame_popup" id="back" posref="TL TL" />
|
||||||
|
|
||||||
<view type="text" id="text" posref="TL TL" line_maxw="234" x="8" y="-56" w="0" h="0" color="255 255 255 255" fontsize="12" shadow="true" multi_line="true" multi_line_space="0" case_mode="%case_first_sentence_letter_up"/>
|
<view type="text" id="text" posref="TL TL" line_maxw="234" x="8" y="-56" w="0" h="0" color="255 255 255 255" fontsize="12" shadow="true" multi_line="true" multi_line_space="0" case_mode="%case_first_sentence_letter_up"/>
|
||||||
|
@ -687,15 +686,9 @@
|
||||||
onclick_l="leave_modal" />
|
onclick_l="leave_modal" />
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
|
<group id="webstart" posref="MM MM" w="800" h="600" active="true" >
|
||||||
|
<group id="content" x="0" y="0" w="800" h="600" posref="MM MM" >
|
||||||
|
<group id="webstart_html" type="html" posref="MM MM"
|
||||||
|
|
||||||
|
|
||||||
<!-- Web box
|
|
||||||
<group id="webstart" posref="BR BR" w="200" h="200" active="true" >
|
|
||||||
<group id="content" x="0" y="0" w="200" h="200" posref="TL TL" >
|
|
||||||
<group type="html" id="webstart_html" posref="TL TL"
|
|
||||||
url=""
|
url=""
|
||||||
title_prefix="uiQuickhelpTitle"
|
title_prefix="uiQuickhelpTitle"
|
||||||
sizeref="wh" x="0" y="0" w="-40" h="-40"
|
sizeref="wh" x="0" y="0" w="-40" h="-40"
|
||||||
|
@ -739,7 +732,6 @@
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
-->
|
|
||||||
|
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
-- In this file we define functions that serves for player windows
|
-- In this file we define functions that serves for player windows
|
||||||
|
|
||||||
|
function getDbPropU(dbEntry)
|
||||||
|
value = getDbProp(dbEntry)
|
||||||
|
if (value < 0) then
|
||||||
|
value = 4294967296+value
|
||||||
|
end
|
||||||
|
return value
|
||||||
|
end
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------
|
||||||
-- create the game namespace without reseting if already created in an other file.
|
-- create the game namespace without reseting if already created in an other file.
|
||||||
|
@ -109,9 +116,9 @@ end
|
||||||
------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------
|
||||||
-- Update player pvp tag
|
-- Update player pvp tag
|
||||||
function game:pvpTagUpdateDisplay()
|
function game:pvpTagUpdateDisplay()
|
||||||
local currentServerTick = getDbProp('UI:VARIABLES:CURRENT_SERVER_TICK');
|
local currentServerTick = getDbPropU('UI:VARIABLES:CURRENT_SERVER_TICK');
|
||||||
local pvpServerTagTimer = getDbProp('SERVER:CHARACTER_INFO:PVP_FACTION_TAG:ACTIVATION_TIME');
|
local pvpServerTagTimer = getDbPropU('SERVER:CHARACTER_INFO:PVP_FACTION_TAG:ACTIVATION_TIME');
|
||||||
local pvpServerFlagTimer = getDbProp('SERVER:CHARACTER_INFO:PVP_FACTION_TAG:FLAG_PVP_TIME_LEFT');
|
local pvpServerFlagTimer = getDbPropU('SERVER:CHARACTER_INFO:PVP_FACTION_TAG:FLAG_PVP_TIME_LEFT');
|
||||||
local uiPlayer= getUI('ui:interface:player:header_opened');
|
local uiPlayer= getUI('ui:interface:player:header_opened');
|
||||||
|
|
||||||
-- get the current state
|
-- get the current state
|
||||||
|
@ -222,9 +229,9 @@ function game:updatePvpTag()
|
||||||
setDbProp('UI:TEMP:PVP_FACTION:TAG_PVP', booleanToNumber(pvpServerTag));
|
setDbProp('UI:TEMP:PVP_FACTION:TAG_PVP', booleanToNumber(pvpServerTag));
|
||||||
|
|
||||||
-- launch timer DB if necessary
|
-- launch timer DB if necessary
|
||||||
local currentServerTick = getDbProp('UI:VARIABLES:CURRENT_SERVER_TICK');
|
local currentServerTick = getDbPropU('UI:VARIABLES:CURRENT_SERVER_TICK');
|
||||||
local pvpServerTagTimer = getDbProp('SERVER:CHARACTER_INFO:PVP_FACTION_TAG:ACTIVATION_TIME');
|
local pvpServerTagTimer = getDbPropU('SERVER:CHARACTER_INFO:PVP_FACTION_TAG:ACTIVATION_TIME');
|
||||||
local pvpServerFlagTimer = getDbProp('SERVER:CHARACTER_INFO:PVP_FACTION_TAG:FLAG_PVP_TIME_LEFT');
|
local pvpServerFlagTimer = getDbPropU('SERVER:CHARACTER_INFO:PVP_FACTION_TAG:FLAG_PVP_TIME_LEFT');
|
||||||
|
|
||||||
if(pvpServerTagTimer > currentServerTick) or (pvpServerFlagTimer > currentServerTick) then
|
if(pvpServerTagTimer > currentServerTick) or (pvpServerFlagTimer > currentServerTick) then
|
||||||
local ui = getUI('ui:interface:player');
|
local ui = getUI('ui:interface:player');
|
||||||
|
@ -252,9 +259,9 @@ function game:updatePvpTimer()
|
||||||
self:pvpTagUpdateDisplay();
|
self:pvpTagUpdateDisplay();
|
||||||
|
|
||||||
-- try to stop
|
-- try to stop
|
||||||
local currentServerTick = getDbProp('UI:VARIABLES:CURRENT_SERVER_TICK');
|
local currentServerTick = getDbPropU('UI:VARIABLES:CURRENT_SERVER_TICK');
|
||||||
local pvpServerTagTimer = getDbProp('SERVER:CHARACTER_INFO:PVP_FACTION_TAG:ACTIVATION_TIME');
|
local pvpServerTagTimer = getDbPropU('SERVER:CHARACTER_INFO:PVP_FACTION_TAG:ACTIVATION_TIME');
|
||||||
local pvpServerFlagTimer = getDbProp('SERVER:CHARACTER_INFO:PVP_FACTION_TAG:FLAG_PVP_TIME_LEFT');
|
local pvpServerFlagTimer = getDbPropU('SERVER:CHARACTER_INFO:PVP_FACTION_TAG:FLAG_PVP_TIME_LEFT');
|
||||||
|
|
||||||
-- Manage Tag Timer display
|
-- Manage Tag Timer display
|
||||||
if(pvpServerTagTimer <= currentServerTick) then
|
if(pvpServerTagTimer <= currentServerTick) then
|
||||||
|
@ -299,8 +306,8 @@ function game:playerTTPvp()
|
||||||
|
|
||||||
-- Flag mode?
|
-- Flag mode?
|
||||||
if(buttonMode==2) then
|
if(buttonMode==2) then
|
||||||
local pvpServerFlagTimer = getDbProp('SERVER:CHARACTER_INFO:PVP_FACTION_TAG:FLAG_PVP_TIME_LEFT');
|
local pvpServerFlagTimer = getDbPropU('SERVER:CHARACTER_INFO:PVP_FACTION_TAG:FLAG_PVP_TIME_LEFT');
|
||||||
local currentServerTick = getDbProp('UI:VARIABLES:CURRENT_SERVER_TICK');
|
local currentServerTick = getDbPropU('UI:VARIABLES:CURRENT_SERVER_TICK');
|
||||||
local tempsString = game:formatTime( pvpServerFlagTimer - currentServerTick );
|
local tempsString = game:formatTime( pvpServerFlagTimer - currentServerTick );
|
||||||
text = i18n.get('uittPvPModeFlag');
|
text = i18n.get('uittPvPModeFlag');
|
||||||
text = findReplaceAll(text, '%temps', tempsString);
|
text = findReplaceAll(text, '%temps', tempsString);
|
||||||
|
@ -320,8 +327,8 @@ function game:playerTTPvp()
|
||||||
end
|
end
|
||||||
-- timer
|
-- timer
|
||||||
if(buttonTimer) then
|
if(buttonTimer) then
|
||||||
local pvpServerTagTimer = getDbProp('SERVER:CHARACTER_INFO:PVP_FACTION_TAG:ACTIVATION_TIME');
|
local pvpServerTagTimer = getDbPropU('SERVER:CHARACTER_INFO:PVP_FACTION_TAG:ACTIVATION_TIME');
|
||||||
local currentServerTick = getDbProp('UI:VARIABLES:CURRENT_SERVER_TICK');
|
local currentServerTick = getDbPropU('UI:VARIABLES:CURRENT_SERVER_TICK');
|
||||||
local tempsString = game:formatTime( pvpServerTagTimer - currentServerTick );
|
local tempsString = game:formatTime( pvpServerTagTimer - currentServerTick );
|
||||||
local timeFmt= i18n.get('uittPvPTagTimer');
|
local timeFmt= i18n.get('uittPvPTagTimer');
|
||||||
timeFmt= findReplaceAll(timeFmt, '%temps', tempsString);
|
timeFmt= findReplaceAll(timeFmt, '%temps', tempsString);
|
||||||
|
@ -402,7 +409,7 @@ function game:outpostUpdatePVPTimer(textSlot, ui)
|
||||||
|
|
||||||
-- Get the timer of interest (priority to player leaving the zone)
|
-- Get the timer of interest (priority to player leaving the zone)
|
||||||
local endTimer= 0;
|
local endTimer= 0;
|
||||||
local endOfPvpTimer= getDbProp('SERVER:CHARACTER_INFO:PVP_OUTPOST:FLAG_PVP_TIME_END');
|
local endOfPvpTimer= getDbPropU('SERVER:CHARACTER_INFO:PVP_OUTPOST:FLAG_PVP_TIME_END');
|
||||||
if( endOfPvpTimer>0 ) then
|
if( endOfPvpTimer>0 ) then
|
||||||
endTimer= endOfPvpTimer;
|
endTimer= endOfPvpTimer;
|
||||||
else
|
else
|
||||||
|
@ -415,7 +422,7 @@ function game:outpostUpdatePVPTimer(textSlot, ui)
|
||||||
-- Use a text with a timer?
|
-- Use a text with a timer?
|
||||||
if( endTimer>0 ) then
|
if( endTimer>0 ) then
|
||||||
-- compute the time that lefts in sec (suppose a smooth server tick is 1 ms)
|
-- compute the time that lefts in sec (suppose a smooth server tick is 1 ms)
|
||||||
local curTick= getDbProp('UI:VARIABLES:CURRENT_SERVER_TICK');
|
local curTick= getDbPropU('UI:VARIABLES:CURRENT_SERVER_TICK');
|
||||||
local timeSec= (endTimer- curTick)/10;
|
local timeSec= (endTimer- curTick)/10;
|
||||||
-- replace in str
|
-- replace in str
|
||||||
local text= "@{FF6F}" .. runFct('secondsToTimeStringShort', timeSec);
|
local text= "@{FF6F}" .. runFct('secondsToTimeStringShort', timeSec);
|
||||||
|
@ -619,8 +626,8 @@ function game:updatePlayerBonusMalus()
|
||||||
local pvpOutpostEndOfRound= 0;
|
local pvpOutpostEndOfRound= 0;
|
||||||
if(pvpOutpostPresent~=0) then
|
if(pvpOutpostPresent~=0) then
|
||||||
local pvpOutpostLevel= 0;
|
local pvpOutpostLevel= 0;
|
||||||
pvpOutpostEndOfPVPFlag= getDbProp('SERVER:CHARACTER_INFO:PVP_OUTPOST:FLAG_PVP_TIME_END');
|
pvpOutpostEndOfPVPFlag= getDbPropU('SERVER:CHARACTER_INFO:PVP_OUTPOST:FLAG_PVP_TIME_END');
|
||||||
pvpOutpostEndOfRound= getDbProp('SERVER:CHARACTER_INFO:PVP_OUTPOST:ROUND_END_DATE');
|
pvpOutpostEndOfRound= getDbPropU('SERVER:CHARACTER_INFO:PVP_OUTPOST:ROUND_END_DATE');
|
||||||
-- set a level only if we have some round, and if the out timer is not set
|
-- set a level only if we have some round, and if the out timer is not set
|
||||||
if(pvpOutpostEndOfRound~=0 and pvpOutpostEndOfPVPFlag==0) then
|
if(pvpOutpostEndOfRound~=0 and pvpOutpostEndOfPVPFlag==0) then
|
||||||
pvpOutpostLevel= 1 + getDbProp('SERVER:CHARACTER_INFO:PVP_OUTPOST:ROUND_LVL_CUR');
|
pvpOutpostLevel= 1 + getDbProp('SERVER:CHARACTER_INFO:PVP_OUTPOST:ROUND_LVL_CUR');
|
||||||
|
|
|
@ -417,7 +417,7 @@
|
||||||
tx_over="W_button_24_over.tga"
|
tx_over="W_button_24_over.tga"
|
||||||
w="24"
|
w="24"
|
||||||
h="24"
|
h="24"
|
||||||
scale="true"
|
scale="false"
|
||||||
global_color_normal="false"
|
global_color_normal="false"
|
||||||
global_color_over="false"
|
global_color_over="false"
|
||||||
global_color_pushed="false"
|
global_color_pushed="false"
|
||||||
|
@ -488,15 +488,15 @@
|
||||||
<!-- PVP Tag Button -->
|
<!-- PVP Tag Button -->
|
||||||
<instance template="t_pvp_tag_button"
|
<instance template="t_pvp_tag_button"
|
||||||
id="pvp_tag_button_0"
|
id="pvp_tag_button_0"
|
||||||
tx="pvp_green.tga"
|
tx="no_pvp.tga"
|
||||||
mode="0" />
|
mode="0" />
|
||||||
<instance template="t_pvp_tag_button"
|
<instance template="t_pvp_tag_button"
|
||||||
id="pvp_tag_button_1"
|
id="pvp_tag_button_1"
|
||||||
tx="pvp_orange.tga"
|
tx="pvp_tag.tga"
|
||||||
mode="1" />
|
mode="1" />
|
||||||
<instance template="t_pvp_tag_button"
|
<instance template="t_pvp_tag_button"
|
||||||
id="pvp_tag_button_2"
|
id="pvp_tag_button_2"
|
||||||
tx="pvp_red.tga"
|
tx="pvp_flag.tga"
|
||||||
mode="2" />
|
mode="2" />
|
||||||
<!-- PVP Tag special overed pushed icon. pushed == over rotated !!. (NB: Ugly to save icon space) -->
|
<!-- PVP Tag special overed pushed icon. pushed == over rotated !!. (NB: Ugly to save icon space) -->
|
||||||
<view type="bitmap"
|
<view type="bitmap"
|
||||||
|
@ -1104,7 +1104,9 @@
|
||||||
global_color_over="true"
|
global_color_over="true"
|
||||||
header_color="UI:SAVE:WIN:COLORS:ANI"
|
header_color="UI:SAVE:WIN:COLORS:ANI"
|
||||||
title_delta_max_w="-150"
|
title_delta_max_w="-150"
|
||||||
title_over_extend_view_text="true">
|
title_over_extend_view_text="true"
|
||||||
|
on_tooltip="userpa_name_tooltip"
|
||||||
|
on_tooltip_params="#index">
|
||||||
<group id="header_closed"
|
<group id="header_closed"
|
||||||
h="12"
|
h="12"
|
||||||
posref="TL TL"></group>
|
posref="TL TL"></group>
|
||||||
|
|
|
@ -318,21 +318,53 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<group type="container" id="accept_trade_invitation" w="260" h="512" resizer="false" pop_max_h="512"
|
<group type="container"
|
||||||
active="false" savable="false" openable="false" opened="true" movable="true"
|
id="accept_trade_invitation"
|
||||||
on_close_button="proc" on_close_button_params="player_decline_invitation" title_opened="uiTradeInvitation" >
|
w="260"
|
||||||
|
h="512"
|
||||||
<group id="content" child_resize_h="true" child_resize_hmargin="10" >
|
resizer="false"
|
||||||
<group id="inside" sizeref="w" posref="TL TL" y="-4" child_resize_h="true" child_resize_hmargin="6">
|
pop_max_h="512"
|
||||||
<view type="text_id" id="invite_phrase" posref="MM MM" x="0" y="0" color="255 255 255 255" fontsize="12" shadow="true"
|
active="false"
|
||||||
multi_line="true" multi_line_space="0" line_maxw="250" />
|
savable="false"
|
||||||
|
openable="false"
|
||||||
|
opened="true"
|
||||||
|
movable="true"
|
||||||
|
on_close_button="proc"
|
||||||
|
on_close_button_params="player_decline_invitation"
|
||||||
|
title_opened="uiTradeInvitation" >
|
||||||
|
<group id="content"
|
||||||
|
child_resize_h="true"
|
||||||
|
child_resize_hmargin="10" >
|
||||||
|
<group id="inside"
|
||||||
|
sizeref="w"
|
||||||
|
posref="TL TL"
|
||||||
|
y="-4"
|
||||||
|
child_resize_h="true"
|
||||||
|
child_resize_hmargin="6">
|
||||||
|
<view type="text_id"
|
||||||
|
id="invite_phrase"
|
||||||
|
posref="MM MM"
|
||||||
|
x="0"
|
||||||
|
y="0"
|
||||||
|
color="255 255 255 255"
|
||||||
|
fontsize="12"
|
||||||
|
shadow="true"
|
||||||
|
multi_line="true"
|
||||||
|
multi_line_space="0"
|
||||||
|
line_maxw="250" />
|
||||||
</group>
|
</group>
|
||||||
<instance template="button_ok_cancel" posparent="inside" posref="BR TR" x="-4" y="-4"
|
<instance template="button_ok_cancel"
|
||||||
ok_text="uiAccept" cancel_text="uiDecline"
|
posparent="inside"
|
||||||
onclick_ok="proc" onclick_ok_param="player_accept_invitation"
|
posref="BR TR"
|
||||||
onclick_cancel="proc" onclick_cancel_param="player_decline_invitation" />
|
x="-4"
|
||||||
|
y="-4"
|
||||||
|
ok_text="uiAccept"
|
||||||
|
cancel_text="uiDecline"
|
||||||
|
onclick_ok="proc"
|
||||||
|
onclick_ok_param="player_accept_invitation"
|
||||||
|
onclick_cancel="proc"
|
||||||
|
onclick_cancel_param="player_decline_invitation" />
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -261,6 +261,7 @@
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_BAG:FILTER_TOOL|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_BAG:FILTER_TOOL|value=1" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_BAG:FILTER_MP|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_BAG:FILTER_MP|value=1" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_BAG:FILTER_MISSMP|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_BAG:FILTER_MISSMP|value=1" />
|
||||||
|
<action handler="set" params="dblink=UI:SAVE:INV_BAG:FILTER_TP|value=1" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_PA0:SORT_TYPE|value=0" />
|
<action handler="set" params="dblink=UI:SAVE:INV_PA0:SORT_TYPE|value=0" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_PA0:ICON_LIST|value=0" />
|
<action handler="set" params="dblink=UI:SAVE:INV_PA0:ICON_LIST|value=0" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_PA0:FILTER_ARMOR|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_PA0:FILTER_ARMOR|value=1" />
|
||||||
|
@ -275,6 +276,7 @@
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_PA1:FILTER_TOOL|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_PA1:FILTER_TOOL|value=1" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_PA1:FILTER_MP|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_PA1:FILTER_MP|value=1" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_PA1:FILTER_MISSMP|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_PA1:FILTER_MISSMP|value=1" />
|
||||||
|
<action handler="set" params="dblink=UI:SAVE:INV_PA1:FILTER_TP|value=1" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_PA2:SORT_TYPE|value=0" />
|
<action handler="set" params="dblink=UI:SAVE:INV_PA2:SORT_TYPE|value=0" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_PA2:ICON_LIST|value=0" />
|
<action handler="set" params="dblink=UI:SAVE:INV_PA2:ICON_LIST|value=0" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_PA2:FILTER_ARMOR|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_PA2:FILTER_ARMOR|value=1" />
|
||||||
|
@ -282,6 +284,7 @@
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_PA2:FILTER_TOOL|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_PA2:FILTER_TOOL|value=1" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_PA2:FILTER_MP|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_PA2:FILTER_MP|value=1" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_PA2:FILTER_MISSMP|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_PA2:FILTER_MISSMP|value=1" />
|
||||||
|
<action handler="set" params="dblink=UI:SAVE:INV_PA2:FILTER_TP|value=1" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_PA3:SORT_TYPE|value=0" />
|
<action handler="set" params="dblink=UI:SAVE:INV_PA3:SORT_TYPE|value=0" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_PA3:ICON_LIST|value=0" />
|
<action handler="set" params="dblink=UI:SAVE:INV_PA3:ICON_LIST|value=0" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_PA3:FILTER_ARMOR|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_PA3:FILTER_ARMOR|value=1" />
|
||||||
|
@ -289,6 +292,7 @@
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_PA3:FILTER_TOOL|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_PA3:FILTER_TOOL|value=1" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_PA3:FILTER_MP|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_PA3:FILTER_MP|value=1" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_PA3:FILTER_MISSMP|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_PA3:FILTER_MISSMP|value=1" />
|
||||||
|
<action handler="set" params="dblink=UI:SAVE:INV_PA3:FILTER_TP|value=1" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_GUILD:SORT_TYPE|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_GUILD:SORT_TYPE|value=1" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_GUILD:ICON_LIST|value=0" />
|
<action handler="set" params="dblink=UI:SAVE:INV_GUILD:ICON_LIST|value=0" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_GUILD:FILTER_ARMOR|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_GUILD:FILTER_ARMOR|value=1" />
|
||||||
|
@ -296,6 +300,7 @@
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_GUILD:FILTER_TOOL|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_GUILD:FILTER_TOOL|value=1" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_GUILD:FILTER_MP|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_GUILD:FILTER_MP|value=1" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_GUILD:FILTER_MISSMP|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_GUILD:FILTER_MISSMP|value=1" />
|
||||||
|
<action handler="set" params="dblink=UI:SAVE:INV_GUILD:FILTER_TP|value=1" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_ROOM:SORT_TYPE|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_ROOM:SORT_TYPE|value=1" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_ROOM:ICON_LIST|value=0" />
|
<action handler="set" params="dblink=UI:SAVE:INV_ROOM:ICON_LIST|value=0" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_ROOM:FILTER_ARMOR|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_ROOM:FILTER_ARMOR|value=1" />
|
||||||
|
@ -303,6 +308,7 @@
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_ROOM:FILTER_TOOL|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_ROOM:FILTER_TOOL|value=1" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_ROOM:FILTER_MP|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_ROOM:FILTER_MP|value=1" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:INV_ROOM:FILTER_MISSMP|value=1" />
|
<action handler="set" params="dblink=UI:SAVE:INV_ROOM:FILTER_MISSMP|value=1" />
|
||||||
|
<action handler="set" params="dblink=UI:SAVE:INV_ROOM:FILTER_TP|value=1" />
|
||||||
|
|
||||||
<action handler="set" params="dblink=UI:SAVE:ISDETACHED:MAIN_CHAT|value=0" />
|
<action handler="set" params="dblink=UI:SAVE:ISDETACHED:MAIN_CHAT|value=0" />
|
||||||
<action handler="set" params="dblink=UI:SAVE:ISDETACHED:GUILD_CHAT|value=0" />
|
<action handler="set" params="dblink=UI:SAVE:ISDETACHED:GUILD_CHAT|value=0" />
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2 MiB After Width: | Height: | Size: 4 MiB |
|
@ -243,7 +243,7 @@
|
||||||
<view type="bitmap"
|
<view type="bitmap"
|
||||||
id="win_top"
|
id="win_top"
|
||||||
posref="TL TL"
|
posref="TL TL"
|
||||||
y="-10"
|
y="-15"
|
||||||
texture="Infos_top.tga"
|
texture="Infos_top.tga"
|
||||||
global_color="true" />
|
global_color="true" />
|
||||||
<view type="bitmap"
|
<view type="bitmap"
|
||||||
|
@ -265,7 +265,7 @@
|
||||||
id="win_jauge_mid"
|
id="win_jauge_mid"
|
||||||
posref="TL ML"
|
posref="TL ML"
|
||||||
x="0"
|
x="0"
|
||||||
y="1"
|
y="-2"
|
||||||
posparent="win_bot"
|
posparent="win_bot"
|
||||||
scale="true"
|
scale="true"
|
||||||
w="128"
|
w="128"
|
||||||
|
@ -288,7 +288,7 @@
|
||||||
id="info0"
|
id="info0"
|
||||||
posref="TL TL"
|
posref="TL TL"
|
||||||
x="0"
|
x="0"
|
||||||
y="-3"
|
y="-10"
|
||||||
fontsize="14"
|
fontsize="14"
|
||||||
shadow="true"
|
shadow="true"
|
||||||
hardtext=""
|
hardtext=""
|
||||||
|
@ -298,7 +298,7 @@
|
||||||
id="info1"
|
id="info1"
|
||||||
posref="TL TL"
|
posref="TL TL"
|
||||||
x="0"
|
x="0"
|
||||||
y="-17"
|
y="-28"
|
||||||
fontsize="12"
|
fontsize="12"
|
||||||
shadow="true"
|
shadow="true"
|
||||||
hardtext=""
|
hardtext=""
|
||||||
|
@ -308,7 +308,7 @@
|
||||||
id="info2"
|
id="info2"
|
||||||
posref="TL TL"
|
posref="TL TL"
|
||||||
x="0"
|
x="0"
|
||||||
y="-32"
|
y="-40"
|
||||||
fontsize="10"
|
fontsize="10"
|
||||||
shadow="true"
|
shadow="true"
|
||||||
hardtext=""
|
hardtext=""
|
||||||
|
@ -350,7 +350,59 @@
|
||||||
y=""
|
y=""
|
||||||
texture="target_mission.tga"
|
texture="target_mission.tga"
|
||||||
global_color="false" />
|
global_color="false" />
|
||||||
<view type="bitmap"
|
<view type="bitmap"
|
||||||
|
id="rp_logo_1"
|
||||||
|
posref="BR BL"
|
||||||
|
x="4"
|
||||||
|
y="0"
|
||||||
|
slot="false"
|
||||||
|
posparent="info0"
|
||||||
|
color="255 255 255 255"
|
||||||
|
render_layer="1"
|
||||||
|
texture=""
|
||||||
|
w="24"
|
||||||
|
h="24"
|
||||||
|
global_color="false" />
|
||||||
|
<view type="bitmap"
|
||||||
|
id="rp_logo_2"
|
||||||
|
posref="BR BL"
|
||||||
|
x="32"
|
||||||
|
y="0"
|
||||||
|
slot="false"
|
||||||
|
posparent="info0"
|
||||||
|
color="255 255 255 255"
|
||||||
|
render_layer="1"
|
||||||
|
texture=""
|
||||||
|
w="24"
|
||||||
|
h="24"
|
||||||
|
global_color="false" />
|
||||||
|
<view type="bitmap"
|
||||||
|
id="rp_logo_3"
|
||||||
|
posref="TR TL"
|
||||||
|
x="60"
|
||||||
|
y="0"
|
||||||
|
slot="false"
|
||||||
|
posparent="info0"
|
||||||
|
color="255 255 255 255"
|
||||||
|
render_layer="1"
|
||||||
|
texture=""
|
||||||
|
w="24"
|
||||||
|
h="24"
|
||||||
|
global_color="false" />
|
||||||
|
<view type="bitmap"
|
||||||
|
id="rp_logo_4"
|
||||||
|
posref="TR TL"
|
||||||
|
x="88"
|
||||||
|
y="0"
|
||||||
|
slot="false"
|
||||||
|
posparent="info0"
|
||||||
|
color="255 255 255 255"
|
||||||
|
render_layer="1"
|
||||||
|
texture=""
|
||||||
|
w="24"
|
||||||
|
h="24"
|
||||||
|
global_color="false" />
|
||||||
|
<view type="bitmap"
|
||||||
id="bar0"
|
id="bar0"
|
||||||
posref="TL TL"
|
posref="TL TL"
|
||||||
posparent="win_jauge_top"
|
posparent="win_jauge_top"
|
||||||
|
@ -415,14 +467,14 @@
|
||||||
<ctrl type="sheet"
|
<ctrl type="sheet"
|
||||||
id="guild_logo"
|
id="guild_logo"
|
||||||
posref="ML MR"
|
posref="ML MR"
|
||||||
x="-8"
|
x="-4"
|
||||||
slot="false"
|
slot="false"
|
||||||
posparent="right"
|
posparent="right"
|
||||||
nature="guild_flag"
|
nature="guild_flag"
|
||||||
value="UI:TEMP:GUILD_SHEET"
|
value="UI:TEMP:GUILD_SHEET"
|
||||||
dragable="false"
|
dragable="false"
|
||||||
color="255 255 255 255" />
|
color="255 255 255 255" />
|
||||||
<view type="bitmap"
|
<view type="bitmap"
|
||||||
id="npc_mission_logo"
|
id="npc_mission_logo"
|
||||||
posref="TL TR"
|
posref="TL TR"
|
||||||
x="-8"
|
x="-8"
|
||||||
|
@ -459,7 +511,7 @@
|
||||||
child_resize_h="true"
|
child_resize_h="true"
|
||||||
child_resize_wmargin="4" >
|
child_resize_wmargin="4" >
|
||||||
<view type="bitmap"
|
<view type="bitmap"
|
||||||
id="pvp_faction_civ_logo"
|
id="pvp_faction_logo"
|
||||||
posref="TL TL"
|
posref="TL TL"
|
||||||
texture="mp_pearl.tga"
|
texture="mp_pearl.tga"
|
||||||
x="2"
|
x="2"
|
||||||
|
@ -467,9 +519,10 @@
|
||||||
h="24"
|
h="24"
|
||||||
global_color="false" />
|
global_color="false" />
|
||||||
<view type="bitmap"
|
<view type="bitmap"
|
||||||
id="pvp_faction_cult_logo"
|
id="pvp_safe_logo"
|
||||||
|
active="false"
|
||||||
posref="TR TL"
|
posref="TR TL"
|
||||||
posparent="pvp_faction_civ_logo"
|
posparent="pvp_faction_logo"
|
||||||
texture="mp_pearl.tga"
|
texture="mp_pearl.tga"
|
||||||
x="2"
|
x="2"
|
||||||
w="24"
|
w="24"
|
||||||
|
@ -499,7 +552,7 @@
|
||||||
x="2"
|
x="2"
|
||||||
w="24"
|
w="24"
|
||||||
h="24"
|
h="24"
|
||||||
texture="ICO_Multi_Fight.tga"
|
texture="pvp_duel.tga"
|
||||||
global_color="false" />
|
global_color="false" />
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
|
@ -1736,7 +1789,11 @@
|
||||||
<action id="xp_catalyser_use"
|
<action id="xp_catalyser_use"
|
||||||
name="uimXpCatalyserUse"
|
name="uimXpCatalyserUse"
|
||||||
handler="xp_catalyser_use" />
|
handler="xp_catalyser_use" />
|
||||||
<separator />
|
<action id="item_text_display"
|
||||||
|
name="uiOpen"
|
||||||
|
handler="item_text_display"
|
||||||
|
params="ui:interface:edit_custom" />
|
||||||
|
<separator />
|
||||||
<!-- Move to an Animal -->
|
<!-- Move to an Animal -->
|
||||||
<action id="move"
|
<action id="move"
|
||||||
name="uimMoveTo">
|
name="uimMoveTo">
|
||||||
|
@ -1781,14 +1838,13 @@
|
||||||
<action id="infos"
|
<action id="infos"
|
||||||
name="uimBoldInfo"
|
name="uimBoldInfo"
|
||||||
handler="open_item_help" />
|
handler="open_item_help" />
|
||||||
|
<action id="lockunlock"
|
||||||
|
name="uimLockItem"
|
||||||
|
handler="lock_inv_item" />
|
||||||
<action id="item_text_edition"
|
<action id="item_text_edition"
|
||||||
name="uimItemTextEdit"
|
name="uimItemTextEdit"
|
||||||
handler="item_text_edition"
|
handler="item_text_edition"
|
||||||
params="ui:interface:edit_custom" />
|
params="ui:interface:edit_custom" />
|
||||||
<action id="item_text_display"
|
|
||||||
name="uimItemTextDisplay"
|
|
||||||
handler="item_text_display"
|
|
||||||
params="ui:interface:edit_custom" />
|
|
||||||
</group>
|
</group>
|
||||||
<!-- MAX_INVENTORY_ANIMAL -->
|
<!-- MAX_INVENTORY_ANIMAL -->
|
||||||
<link expr="switch(@%pa_beast0:TYPE, 'uimMtPaMount0', 'uimMtPaMount0', 'uimMtPaPacker0', 'uimMtPaDemon0')"
|
<link expr="switch(@%pa_beast0:TYPE, 'uimMtPaMount0', 'uimMtPaMount0', 'uimMtPaPacker0', 'uimMtPaDemon0')"
|
||||||
|
@ -1802,7 +1858,8 @@
|
||||||
<!-- item menu when we are in self -->
|
<!-- item menu when we are in self -->
|
||||||
<group type="menu"
|
<group type="menu"
|
||||||
id="item_menu_in_self"
|
id="item_menu_in_self"
|
||||||
extends="base_menu">
|
extends="base_menu"
|
||||||
|
on_active="item_menu_base_check" >
|
||||||
<!--<action id="drop" name="uimDrop" handler="proc" params="drop_item_proc"/>-->
|
<!--<action id="drop" name="uimDrop" handler="proc" params="drop_item_proc"/>-->
|
||||||
<action id="destroy"
|
<action id="destroy"
|
||||||
name="uimDestroy"
|
name="uimDestroy"
|
||||||
|
@ -1812,11 +1869,15 @@
|
||||||
name="uimBoldInfo"
|
name="uimBoldInfo"
|
||||||
handler="open_item_help"
|
handler="open_item_help"
|
||||||
params="" />
|
params="" />
|
||||||
|
<action id="lockunlock"
|
||||||
|
name="uimLockItem"
|
||||||
|
handler="lock_inv_item" />
|
||||||
</group>
|
</group>
|
||||||
<!-- item menu default -->
|
<!-- item menu default -->
|
||||||
<group type="menu"
|
<group type="menu"
|
||||||
id="item_menu"
|
id="item_menu"
|
||||||
extends="base_menu">
|
extends="base_menu"
|
||||||
|
on_active="item_menu_base_check" >
|
||||||
<!--<action id="drop" name="uimDrop" handler="proc" params="drop_item_proc"/>-->
|
<!--<action id="drop" name="uimDrop" handler="proc" params="drop_item_proc"/>-->
|
||||||
<action id="destroy"
|
<action id="destroy"
|
||||||
name="uimDestroy"
|
name="uimDestroy"
|
||||||
|
@ -1830,6 +1891,9 @@
|
||||||
name="uimBoldInfo"
|
name="uimBoldInfo"
|
||||||
handler="open_item_help"
|
handler="open_item_help"
|
||||||
params="" />
|
params="" />
|
||||||
|
<action id="lockunlock"
|
||||||
|
name="uimLockItem"
|
||||||
|
handler="lock_inv_item" />
|
||||||
</group>
|
</group>
|
||||||
<define id="item_modal_menu"
|
<define id="item_modal_menu"
|
||||||
value="ui:interface:item_menu" />
|
value="ui:interface:item_menu" />
|
||||||
|
@ -1959,7 +2023,8 @@
|
||||||
fontsize="10"
|
fontsize="10"
|
||||||
value="#value"
|
value="#value"
|
||||||
global_color="false"
|
global_color="false"
|
||||||
positive="true" />
|
positive="true"
|
||||||
|
format="true" />
|
||||||
<view type="text"
|
<view type="text"
|
||||||
id="bad_price"
|
id="bad_price"
|
||||||
posparent="box1"
|
posparent="box1"
|
||||||
|
@ -2070,6 +2135,7 @@
|
||||||
global_color="false" />
|
global_color="false" />
|
||||||
</group>
|
</group>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- ********************* -->
|
<!-- ********************* -->
|
||||||
<!-- * FACTION POINTS * -->
|
<!-- * FACTION POINTS * -->
|
||||||
<!-- ********************* -->
|
<!-- ********************* -->
|
||||||
|
@ -6245,6 +6311,8 @@
|
||||||
<!-- onClickR on a filter -->
|
<!-- onClickR on a filter -->
|
||||||
<proc id="pinv_item_filter">
|
<proc id="pinv_item_filter">
|
||||||
<!-- Reset all filter first -->
|
<!-- Reset all filter first -->
|
||||||
|
<action handler="set"
|
||||||
|
params="dblink=UI:SAVE:@0:FILTER_TP|value=0" />
|
||||||
<action handler="set"
|
<action handler="set"
|
||||||
params="dblink=UI:SAVE:@0:FILTER_MISSMP|value=0" />
|
params="dblink=UI:SAVE:@0:FILTER_MISSMP|value=0" />
|
||||||
<action handler="set"
|
<action handler="set"
|
||||||
|
@ -6370,6 +6438,7 @@
|
||||||
filter_tool="UI:SAVE:#inv_type:FILTER_TOOL"
|
filter_tool="UI:SAVE:#inv_type:FILTER_TOOL"
|
||||||
filter_mp="UI:SAVE:#inv_type:FILTER_MP"
|
filter_mp="UI:SAVE:#inv_type:FILTER_MP"
|
||||||
filter_missmp="UI:SAVE:#inv_type:FILTER_MISSMP"
|
filter_missmp="UI:SAVE:#inv_type:FILTER_MISSMP"
|
||||||
|
filter_tp="UI:SAVE:#inv_type:FILTER_TP"
|
||||||
wspace="2"
|
wspace="2"
|
||||||
hspace="2"
|
hspace="2"
|
||||||
startitem="0"
|
startitem="0"
|
||||||
|
@ -6426,6 +6495,7 @@
|
||||||
filter_tool="UI:SAVE:#inv_type:FILTER_TOOL"
|
filter_tool="UI:SAVE:#inv_type:FILTER_TOOL"
|
||||||
filter_mp="UI:SAVE:#inv_type:FILTER_MP"
|
filter_mp="UI:SAVE:#inv_type:FILTER_MP"
|
||||||
filter_missmp="UI:SAVE:#inv_type:FILTER_MISSMP"
|
filter_missmp="UI:SAVE:#inv_type:FILTER_MISSMP"
|
||||||
|
filter_tp="UI:SAVE:#inv_type:FILTER_TP"
|
||||||
hspace="2"
|
hspace="2"
|
||||||
xitem="2"
|
xitem="2"
|
||||||
yitem="-2"
|
yitem="-2"
|
||||||
|
@ -6480,17 +6550,26 @@
|
||||||
<link expr="eq(@UI:SAVE:#inv_type:ICON_LIST, 0)"
|
<link expr="eq(@UI:SAVE:#inv_type:ICON_LIST, 0)"
|
||||||
target="bag_list:active,sep2:active" />
|
target="bag_list:active,sep2:active" />
|
||||||
<instance template="tinv_item_list_filter"
|
<instance template="tinv_item_list_filter"
|
||||||
id="filter_missmp"
|
id="filter_tp"
|
||||||
x="-35"
|
x="-35"
|
||||||
y="1"
|
y="1"
|
||||||
posref="BR BR"
|
posref="BR BR"
|
||||||
inv_type="#inv_type"
|
inv_type="#inv_type"
|
||||||
|
dblink="UI:SAVE:#inv_type:FILTER_TP"
|
||||||
|
texture="filter_tp.tga"
|
||||||
|
tooltip="uittFilterTP" />
|
||||||
|
<instance template="tinv_item_list_filter"
|
||||||
|
id="filter_missmp"
|
||||||
|
x="-60"
|
||||||
|
y="1"
|
||||||
|
posref="BR BR"
|
||||||
|
inv_type="#inv_type"
|
||||||
dblink="UI:SAVE:#inv_type:FILTER_MISSMP"
|
dblink="UI:SAVE:#inv_type:FILTER_MISSMP"
|
||||||
texture="filter_mission.tga"
|
texture="filter_mission.tga"
|
||||||
tooltip="uittFilterMissMP" />
|
tooltip="uittFilterMissMP" />
|
||||||
<instance template="tinv_item_list_filter"
|
<instance template="tinv_item_list_filter"
|
||||||
id="filter_mp"
|
id="filter_mp"
|
||||||
x="-60"
|
x="-85"
|
||||||
y="1"
|
y="1"
|
||||||
posref="BR BR"
|
posref="BR BR"
|
||||||
inv_type="#inv_type"
|
inv_type="#inv_type"
|
||||||
|
@ -6499,7 +6578,7 @@
|
||||||
tooltip="uittFilterMP" />
|
tooltip="uittFilterMP" />
|
||||||
<instance template="tinv_item_list_filter"
|
<instance template="tinv_item_list_filter"
|
||||||
id="filter_tool"
|
id="filter_tool"
|
||||||
x="-85"
|
x="-110"
|
||||||
y="1"
|
y="1"
|
||||||
posref="BR BR"
|
posref="BR BR"
|
||||||
inv_type="#inv_type"
|
inv_type="#inv_type"
|
||||||
|
@ -6508,7 +6587,7 @@
|
||||||
tooltip="uittFilterTool" />
|
tooltip="uittFilterTool" />
|
||||||
<instance template="tinv_item_list_filter"
|
<instance template="tinv_item_list_filter"
|
||||||
id="filter_weapon"
|
id="filter_weapon"
|
||||||
x="-110"
|
x="-135"
|
||||||
y="1"
|
y="1"
|
||||||
posref="BR BR"
|
posref="BR BR"
|
||||||
inv_type="#inv_type"
|
inv_type="#inv_type"
|
||||||
|
@ -6517,7 +6596,7 @@
|
||||||
tooltip="uittFilterWeapon" />
|
tooltip="uittFilterWeapon" />
|
||||||
<instance template="tinv_item_list_filter"
|
<instance template="tinv_item_list_filter"
|
||||||
id="filter_armor"
|
id="filter_armor"
|
||||||
x="-135"
|
x="-160"
|
||||||
y="1"
|
y="1"
|
||||||
posref="BR BR"
|
posref="BR BR"
|
||||||
inv_type="#inv_type"
|
inv_type="#inv_type"
|
||||||
|
|
|
@ -628,7 +628,7 @@ void CCDBNodeBranch::display (const std::string &prefix)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCDBNodeBranch::removeNode (CTextId& id)
|
void CCDBNodeBranch::removeNode (const CTextId& id)
|
||||||
{
|
{
|
||||||
// Look for the node
|
// Look for the node
|
||||||
CCDBNodeBranch *pNode = dynamic_cast<CCDBNodeBranch*>(getNode(id,false));
|
CCDBNodeBranch *pNode = dynamic_cast<CCDBNodeBranch*>(getNode(id,false));
|
||||||
|
|
|
@ -165,7 +165,7 @@ public:
|
||||||
|
|
||||||
virtual void display (const std::string &prefix);
|
virtual void display (const std::string &prefix);
|
||||||
|
|
||||||
void removeNode (CTextId& id);
|
void removeNode (const CTextId& id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* add an observer to a property
|
* add an observer to a property
|
||||||
|
|
|
@ -358,17 +358,8 @@ CCharacterCL::CCharacterCL()
|
||||||
|
|
||||||
_EventFactionId = 0;
|
_EventFactionId = 0;
|
||||||
_PvpMode = PVP_MODE::None;
|
_PvpMode = PVP_MODE::None;
|
||||||
_PvpClan = PVP_CLAN::None;
|
|
||||||
|
|
||||||
for (uint8 i = 0; i < PVP_CLAN::NbClans; i++)
|
|
||||||
{
|
|
||||||
_PvpAllies[i] = false;
|
|
||||||
_PvpEnemies[i] = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
_ClanCivMaxFame = PVP_CLAN::None;
|
|
||||||
_ClanCultMaxFame = PVP_CLAN::None;
|
|
||||||
|
|
||||||
|
_LeagueId = 0;
|
||||||
_OutpostId = 0;
|
_OutpostId = 0;
|
||||||
_OutpostSide = OUTPOSTENUMS::UnknownPVPSide;
|
_OutpostSide = OUTPOSTENUMS::UnknownPVPSide;
|
||||||
|
|
||||||
|
@ -1842,9 +1833,30 @@ void CCharacterCL::updateVisualPropertyGuildNameID(const NLMISC::TGameCycle &/*
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
void CCharacterCL::updateVisualPropertyEventFactionID(const NLMISC::TGameCycle &/* gameCycle */, const sint64 &prop)
|
void CCharacterCL::updateVisualPropertyEventFactionID(const NLMISC::TGameCycle &/* gameCycle */, const sint64 &prop)
|
||||||
{
|
{
|
||||||
_EventFactionId = uint32(prop);
|
// ODD Hack by Ulukyn
|
||||||
|
//_EventFactionId = uint32(prop);
|
||||||
|
_PvpMode = uint32(prop);
|
||||||
|
|
||||||
buildInSceneInterface();
|
buildInSceneInterface();
|
||||||
|
|
||||||
|
if (isUser())
|
||||||
|
{
|
||||||
|
uint i;
|
||||||
|
uint numEntity = (uint)EntitiesMngr.entities().size();
|
||||||
|
for (i=0; i<numEntity; i++)
|
||||||
|
{
|
||||||
|
CEntityCL *entity = EntitiesMngr.entity(i);
|
||||||
|
if (entity)
|
||||||
|
{
|
||||||
|
CCharacterCL *character = dynamic_cast<CCharacterCL*>(entity);
|
||||||
|
if (character)
|
||||||
|
{
|
||||||
|
if( character->getPvpMode() != 0 && !character->isUser())
|
||||||
|
character->buildInSceneInterface ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
} // updateVisualPropertyEventFactionID //
|
} // updateVisualPropertyEventFactionID //
|
||||||
|
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
|
@ -1853,8 +1865,8 @@ void CCharacterCL::updateVisualPropertyEventFactionID(const NLMISC::TGameCycle &
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
void CCharacterCL::updateVisualPropertyPvpMode(const NLMISC::TGameCycle &/* gameCycle */, const sint64 &prop)
|
void CCharacterCL::updateVisualPropertyPvpMode(const NLMISC::TGameCycle &/* gameCycle */, const sint64 &prop)
|
||||||
{
|
{
|
||||||
_PvpMode = (uint8)prop;
|
//_PvpMode = uint32(prop);
|
||||||
buildInSceneInterface();
|
//buildInSceneInterface();
|
||||||
|
|
||||||
} // updateVisualPropertyPvpMode //
|
} // updateVisualPropertyPvpMode //
|
||||||
|
|
||||||
|
@ -1864,18 +1876,26 @@ void CCharacterCL::updateVisualPropertyPvpMode(const NLMISC::TGameCycle &/* game
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
void CCharacterCL::updateVisualPropertyPvpClan(const NLMISC::TGameCycle &/* gameCycle */, const sint64 &prop)
|
void CCharacterCL::updateVisualPropertyPvpClan(const NLMISC::TGameCycle &/* gameCycle */, const sint64 &prop)
|
||||||
{
|
{
|
||||||
// get fames signs from prop
|
_LeagueId = uint32(prop);
|
||||||
for (uint8 fameIdx = 0; fameIdx < 7; fameIdx++)
|
|
||||||
|
if (isUser())
|
||||||
{
|
{
|
||||||
_PvpAllies[fameIdx] = (prop & (SINT64_CONSTANT(1) << (2*fameIdx))) != 0;
|
uint i;
|
||||||
_PvpEnemies[fameIdx] = (prop & (SINT64_CONSTANT(1) << (2*fameIdx+1))) != 0;
|
uint numEntity = (uint)EntitiesMngr.entities().size();
|
||||||
|
for (i=0; i<numEntity; i++)
|
||||||
|
{
|
||||||
|
CEntityCL *entity = EntitiesMngr.entity(i);
|
||||||
|
if (entity)
|
||||||
|
{
|
||||||
|
CCharacterCL *character = dynamic_cast<CCharacterCL*>(entity);
|
||||||
|
if (character)
|
||||||
|
{
|
||||||
|
if( character->getPvpMode() != 0 && !character->isUser())
|
||||||
|
character->buildInSceneInterface ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_ClanCivMaxFame = PVP_CLAN::TPVPClan((prop & (0x03 << 2*7)) >> 2*7);
|
|
||||||
_ClanCultMaxFame = PVP_CLAN::TPVPClan(4 + ((prop & (0x03 << 2*8)) >> 2*8));
|
|
||||||
|
|
||||||
buildInSceneInterface();
|
|
||||||
|
|
||||||
} // updateVisualPropertyPvpClan //
|
} // updateVisualPropertyPvpClan //
|
||||||
|
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
|
@ -4522,10 +4542,6 @@ void CCharacterCL::applyBehaviourFlyingHPs(const CBehaviourContext &bc, const MB
|
||||||
else
|
else
|
||||||
deltaHPColor = ClientCfg.SystemInfoParams["dg"].Color;
|
deltaHPColor = ClientCfg.SystemInfoParams["dg"].Color;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
deltaHPColor = CRGBA(127,127,127);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -10252,7 +10268,7 @@ NLMISC_COMMAND(pvpMode, "modify pvp mode", "[<pvp mode> <state>]")
|
||||||
|
|
||||||
if( args.size() == 0 )
|
if( args.size() == 0 )
|
||||||
{
|
{
|
||||||
uint8 pvpMode = playerTarget->getPvpMode();
|
uint16 pvpMode = playerTarget->getPvpMode();
|
||||||
string str;
|
string str;
|
||||||
if( pvpMode&PVP_MODE::PvpDuel )
|
if( pvpMode&PVP_MODE::PvpDuel )
|
||||||
str+="duel ";
|
str+="duel ";
|
||||||
|
@ -10270,6 +10286,10 @@ NLMISC_COMMAND(pvpMode, "modify pvp mode", "[<pvp mode> <state>]")
|
||||||
str+="faction ";
|
str+="faction ";
|
||||||
if( pvpMode&PVP_MODE::PvpFactionFlagged)
|
if( pvpMode&PVP_MODE::PvpFactionFlagged)
|
||||||
str+="faction_flagged ";
|
str+="faction_flagged ";
|
||||||
|
if( pvpMode&PVP_MODE::PvpZoneSafe)
|
||||||
|
str+="in_safe_zone ";
|
||||||
|
if( pvpMode&PVP_MODE::PvpSafe)
|
||||||
|
str+="safe ";
|
||||||
IM->displaySystemInfo(ucstring(str));
|
IM->displaySystemInfo(ucstring(str));
|
||||||
nlinfo("<pvpMode> %s",str.c_str());
|
nlinfo("<pvpMode> %s",str.c_str());
|
||||||
}
|
}
|
||||||
|
@ -10280,14 +10300,14 @@ NLMISC_COMMAND(pvpMode, "modify pvp mode", "[<pvp mode> <state>]")
|
||||||
fromString(args[1], state);
|
fromString(args[1], state);
|
||||||
if( state )
|
if( state )
|
||||||
{
|
{
|
||||||
uint8 currentPVPMode = playerTarget->getPvpMode();
|
uint16 currentPVPMode = playerTarget->getPvpMode();
|
||||||
currentPVPMode |= pvpMode;
|
currentPVPMode |= pvpMode;
|
||||||
playerTarget->setPvpMode(currentPVPMode);
|
playerTarget->setPvpMode(currentPVPMode);
|
||||||
IM->displaySystemInfo(toString("<pvpMode> adding pvp mode %s",args[0].c_str()));
|
IM->displaySystemInfo(toString("<pvpMode> adding pvp mode %s",args[0].c_str()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
uint8 currentPVPMode = playerTarget->getPvpMode();
|
uint16 currentPVPMode = playerTarget->getPvpMode();
|
||||||
currentPVPMode &= ~pvpMode;
|
currentPVPMode &= ~pvpMode;
|
||||||
playerTarget->setPvpMode(currentPVPMode);
|
playerTarget->setPvpMode(currentPVPMode);
|
||||||
IM->displaySystemInfo(toString("<pvpMode> removing pvp mode %s",args[0].c_str()));
|
IM->displaySystemInfo(toString("<pvpMode> removing pvp mode %s",args[0].c_str()));
|
||||||
|
@ -10297,7 +10317,7 @@ NLMISC_COMMAND(pvpMode, "modify pvp mode", "[<pvp mode> <state>]")
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
NLMISC_COMMAND(pvpClan, "modify pvp clan", "<pvp clan>")
|
NLMISC_COMMAND(pvpClan, "modify pvp clan", "<pvp clan>")
|
||||||
{
|
{
|
||||||
if (args.size() != 1) return false;
|
if (args.size() != 1) return false;
|
||||||
|
@ -10319,13 +10339,13 @@ NLMISC_COMMAND(pvpClan, "modify pvp clan", "<pvp clan>")
|
||||||
if (!playerTarget)
|
if (!playerTarget)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
PVP_CLAN::TPVPClan clan = PVP_CLAN::fromString(args[0]);
|
// PVP_CLAN::TPVPClan clan = PVP_CLAN::fromString(args[0]);
|
||||||
playerTarget->setPvpClan(clan);
|
// playerTarget->setPvpClan(clan);
|
||||||
playerTarget->buildInSceneInterface();
|
playerTarget->buildInSceneInterface();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
#endif // !FINAL_VERSION
|
#endif // !FINAL_VERSION
|
||||||
|
|
||||||
#include "r2/editor.h"
|
#include "r2/editor.h"
|
||||||
|
|
|
@ -84,7 +84,7 @@ public:
|
||||||
enum { MaxNumAura = 2 };
|
enum { MaxNumAura = 2 };
|
||||||
enum TAtkHeight
|
enum TAtkHeight
|
||||||
{
|
{
|
||||||
AtkUnknownHeight = 0,
|
AtkUnkownHeight = 0,
|
||||||
AtkLow,
|
AtkLow,
|
||||||
AtkMiddle,
|
AtkMiddle,
|
||||||
AtkHigh
|
AtkHigh
|
||||||
|
@ -368,48 +368,10 @@ public:
|
||||||
virtual uint64 getGuildSymbol () const { return _GuildSymbol; }
|
virtual uint64 getGuildSymbol () const { return _GuildSymbol; }
|
||||||
|
|
||||||
virtual uint32 getEventFactionID() const { return _EventFactionId; }
|
virtual uint32 getEventFactionID() const { return _EventFactionId; }
|
||||||
virtual uint8 getPvpMode() const { return _PvpMode; }
|
virtual uint16 getPvpMode() const { return _PvpMode; }
|
||||||
void setPvpMode(uint8 mode) { _PvpMode=mode; }
|
void setPvpMode(uint16 mode) { _PvpMode=mode; }
|
||||||
virtual PVP_CLAN::TPVPClan getPvpClan() const { return _PvpClan; }
|
virtual uint32 getLeagueID() const { return _LeagueId; }
|
||||||
void setPvpClan(PVP_CLAN::TPVPClan clan) { _PvpClan=clan; }
|
void setLeagueID(uint32 league) { _LeagueId=league; }
|
||||||
|
|
||||||
virtual PVP_CLAN::TPVPClan getClanCivMaxFame() const { return _ClanCivMaxFame; }
|
|
||||||
void setClanCivMaxFame(PVP_CLAN::TPVPClan clan) { _ClanCivMaxFame=clan; }
|
|
||||||
virtual PVP_CLAN::TPVPClan getClanCultMaxFame() const { return _ClanCultMaxFame; }
|
|
||||||
void setClanCultMaxFame(PVP_CLAN::TPVPClan clan) { _ClanCultMaxFame=clan; }
|
|
||||||
|
|
||||||
virtual bool isPvpAlly(uint8 faction) const { if (faction < PVP_CLAN::NbClans) return _PvpAllies[faction]; else return false; }
|
|
||||||
virtual bool isPvpEnnemy(uint8 faction) const { if (faction < PVP_CLAN::NbClans) return _PvpEnemies[faction]; else return false; }
|
|
||||||
|
|
||||||
virtual bool isPvpMarauder() const
|
|
||||||
{
|
|
||||||
for (uint8 i = 0; i < 4; i++)
|
|
||||||
if (!_PvpEnemies[i])
|
|
||||||
return false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool isPvpTrytonist() const
|
|
||||||
{
|
|
||||||
if (_PvpEnemies[4] && _PvpEnemies[6])
|
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool isPvpPrimas() const
|
|
||||||
{
|
|
||||||
if (_PvpAllies[4] && _PvpAllies[6])
|
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool isPvpRanger() const
|
|
||||||
{
|
|
||||||
for (uint8 i = 0; i < 4; i++)
|
|
||||||
if (!_PvpAllies[i])
|
|
||||||
return false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual uint16 getOutpostId() const { return _OutpostId; }
|
virtual uint16 getOutpostId() const { return _OutpostId; }
|
||||||
virtual OUTPOSTENUMS::TPVPSide getOutpostSide() const { return _OutpostSide; }
|
virtual OUTPOSTENUMS::TPVPSide getOutpostSide() const { return _OutpostSide; }
|
||||||
|
@ -727,12 +689,9 @@ protected:
|
||||||
uint32 _GuildNameId;
|
uint32 _GuildNameId;
|
||||||
uint64 _GuildSymbol;
|
uint64 _GuildSymbol;
|
||||||
uint32 _EventFactionId;
|
uint32 _EventFactionId;
|
||||||
uint8 _PvpMode;
|
uint16 _PvpMode;
|
||||||
PVP_CLAN::TPVPClan _PvpClan;
|
PVP_CLAN::TPVPClan _PvpClan;
|
||||||
PVP_CLAN::TPVPClan _ClanCivMaxFame;
|
uint32 _LeagueId;
|
||||||
PVP_CLAN::TPVPClan _ClanCultMaxFame;
|
|
||||||
bool _PvpAllies[PVP_CLAN::NbClans];
|
|
||||||
bool _PvpEnemies[PVP_CLAN::NbClans];
|
|
||||||
uint16 _OutpostId;
|
uint16 _OutpostId;
|
||||||
OUTPOSTENUMS::TPVPSide _OutpostSide;
|
OUTPOSTENUMS::TPVPSide _OutpostSide;
|
||||||
|
|
||||||
|
|
|
@ -422,15 +422,12 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
string sCmdLine = cmdline;
|
string sCmdLine = cmdline;
|
||||||
#if FINAL_VERSION
|
#if FINAL_VERSION
|
||||||
if (sCmdLine.find("/multi") == string::npos) // If '/multi' not found
|
//if (sCmdLine.find("/multi") == string::npos) // If '/multi' not found
|
||||||
{
|
//{
|
||||||
HANDLE mutex = CreateMutex (NULL, false, "RyzomClient");
|
// HANDLE mutex = CreateMutex (NULL, false, "RyzomClient");
|
||||||
if (mutex && GetLastError() == ERROR_ALREADY_EXISTS)
|
// if (mutex && GetLastError() == ERROR_ALREADY_EXISTS)
|
||||||
{
|
// exit (0);
|
||||||
delete appContext;
|
//}
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
initCrashReport ();
|
initCrashReport ();
|
||||||
#endif // FINAL_VERSION
|
#endif // FINAL_VERSION
|
||||||
|
|
|
@ -424,6 +424,7 @@ CClientConfig::CClientConfig()
|
||||||
PatchWanted = false;
|
PatchWanted = false;
|
||||||
#endif
|
#endif
|
||||||
PatchUrl = "";
|
PatchUrl = "";
|
||||||
|
PatchletUrl = "";
|
||||||
PatchVersion = "";
|
PatchVersion = "";
|
||||||
PatchServer = "";
|
PatchServer = "";
|
||||||
|
|
||||||
|
@ -433,6 +434,7 @@ CClientConfig::CClientConfig()
|
||||||
RingReleaseNotePath = "http://"+WebIgMainDomain+"/releasenotes_ring/index.php";
|
RingReleaseNotePath = "http://"+WebIgMainDomain+"/releasenotes_ring/index.php";
|
||||||
ReleaseNotePath = "http://"+WebIgMainDomain+"/releasenotes/index.php";
|
ReleaseNotePath = "http://"+WebIgMainDomain+"/releasenotes/index.php";
|
||||||
|
|
||||||
|
|
||||||
///////////////
|
///////////////
|
||||||
// ANIMATION //
|
// ANIMATION //
|
||||||
// With a bigger angle, rotation is animated.
|
// With a bigger angle, rotation is animated.
|
||||||
|
@ -1044,9 +1046,13 @@ void CClientConfig::setValues()
|
||||||
READ_STRING_DEV(ReleaseNotePath)
|
READ_STRING_DEV(ReleaseNotePath)
|
||||||
READ_STRING_FV(PatchServer)
|
READ_STRING_FV(PatchServer)
|
||||||
|
|
||||||
|
/////////////////////////
|
||||||
|
// NEW PATCHLET SYSTEM //
|
||||||
|
READ_STRING_FV(PatchletUrl)
|
||||||
|
|
||||||
////////////////////////
|
////////////////////////
|
||||||
// WEBIG //
|
// WEBIG //
|
||||||
READ_STRING_DEV(WebIgMainDomain);
|
READ_STRING_FV(WebIgMainDomain);
|
||||||
READ_STRINGVECTOR_FV(WebIgTrustedDomains);
|
READ_STRINGVECTOR_FV(WebIgTrustedDomains);
|
||||||
|
|
||||||
///////////////
|
///////////////
|
||||||
|
|
|
@ -286,17 +286,17 @@ struct CClientConfig
|
||||||
// NEW PATCHING SYSTEM //
|
// NEW PATCHING SYSTEM //
|
||||||
bool PatchWanted;
|
bool PatchWanted;
|
||||||
std::string PatchUrl;
|
std::string PatchUrl;
|
||||||
|
std::string PatchletUrl;
|
||||||
std::string PatchVersion;
|
std::string PatchVersion;
|
||||||
std::string PatchServer;
|
std::string PatchServer;
|
||||||
|
|
||||||
std::string RingReleaseNotePath;
|
std::string RingReleaseNotePath;
|
||||||
std::string ReleaseNotePath;
|
std::string ReleaseNotePath;
|
||||||
|
|
||||||
////////////////////////
|
|
||||||
// WEBIG //
|
|
||||||
std::string WebIgMainDomain;
|
std::string WebIgMainDomain;
|
||||||
std::vector<string> WebIgTrustedDomains;
|
std::vector<string> WebIgTrustedDomains;
|
||||||
|
|
||||||
|
|
||||||
///////////////
|
///////////////
|
||||||
// ANIMATION //
|
// ANIMATION //
|
||||||
// With a bigger angle, rotation is animated.
|
// With a bigger angle, rotation is animated.
|
||||||
|
|
|
@ -963,16 +963,10 @@ void CClientChatManager::buildTellSentence(const ucstring &sender, const ucstrin
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Does the char have a CSR title?
|
// Does the char have a CSR title?
|
||||||
if (CHARACTER_TITLE::isCsrTitle(CEntityCL::getTitleFromName(sender))) csr = ucstring("(CSR) ");
|
csr = CHARACTER_TITLE::isCsrTitle(CEntityCL::getTitleFromName(sender)) ? ucstring("(CSR) ") : ucstring("");
|
||||||
}
|
}
|
||||||
|
|
||||||
ucstring cur_time;
|
result = csr + name + ucstring(" ") + CI18N::get("tellsYou") + ucstring(": ") + msg;
|
||||||
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false);
|
|
||||||
if (pNL && pNL->getValueBool())
|
|
||||||
{
|
|
||||||
cur_time = CInterfaceManager::getTimestampHuman();
|
|
||||||
}
|
|
||||||
result = cur_time + csr + name + ucstring(" ") + CI18N::get("tellsYou") + ucstring(": ") + msg;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1002,23 +996,18 @@ void CClientChatManager::buildChatSentence(TDataSetIndex /* compressedSenderInde
|
||||||
if (!catStr.empty())
|
if (!catStr.empty())
|
||||||
cat = string("&")+catStr+"&";
|
cat = string("&")+catStr+"&";
|
||||||
|
|
||||||
|
if ( ! cat.empty())
|
||||||
|
{
|
||||||
|
result = msg;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Format the sentence with the provided sender name
|
// Format the sentence with the provided sender name
|
||||||
ucstring senderName = CEntityCL::removeTitleAndShardFromName(sender);
|
ucstring senderName = CEntityCL::removeTitleAndShardFromName(sender);
|
||||||
|
|
||||||
// Add time if not a &bbl&
|
|
||||||
ucstring cur_time;
|
|
||||||
if (cat.toString() != "&bbl&")
|
|
||||||
{
|
|
||||||
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false);
|
|
||||||
if (pNL && pNL->getValueBool())
|
|
||||||
{
|
|
||||||
cur_time = CInterfaceManager::getTimestampHuman();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ucstring csr;
|
ucstring csr;
|
||||||
// Does the char have a CSR title?
|
// Does the char have a CSR title?
|
||||||
if (CHARACTER_TITLE::isCsrTitle(CEntityCL::getTitleFromName(sender))) csr = ucstring("(CSR) ");
|
csr = CHARACTER_TITLE::isCsrTitle(CEntityCL::getTitleFromName(sender)) ? ucstring("(CSR) ") : ucstring("");
|
||||||
|
|
||||||
if (UserEntity && senderName == UserEntity->getDisplayName())
|
if (UserEntity && senderName == UserEntity->getDisplayName())
|
||||||
{
|
{
|
||||||
|
@ -1026,10 +1015,10 @@ void CClientChatManager::buildChatSentence(TDataSetIndex /* compressedSenderInde
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
case CChatGroup::shout:
|
case CChatGroup::shout:
|
||||||
result = cat + cur_time + csr + CI18N::get("youShout") + ucstring(": ") + finalMsg;
|
result = cat + csr + CI18N::get("youShout") + ucstring(": ") + finalMsg;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
result = cat + cur_time + csr + CI18N::get("youSay") + ucstring(": ") + finalMsg;
|
result = cat + csr + CI18N::get("youSay") + ucstring(": ") + finalMsg;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1048,10 +1037,10 @@ void CClientChatManager::buildChatSentence(TDataSetIndex /* compressedSenderInde
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
case CChatGroup::shout:
|
case CChatGroup::shout:
|
||||||
result = cat + cur_time + csr + senderName + ucstring(" ") + CI18N::get("heShout") + ucstring(": ") + finalMsg;
|
result = cat + csr + senderName + ucstring(" ") + CI18N::get("heShout") + ucstring(": ") + finalMsg;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
result = cat + cur_time + csr + senderName + ucstring(" ") + CI18N::get("heSays") + ucstring(": ") + finalMsg;
|
result = cat + csr + senderName + ucstring(" ") + CI18N::get("heSays") + ucstring(": ") + finalMsg;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1185,14 +1174,8 @@ class CHandlerTell : public IActionHandler
|
||||||
ucstring finalMsg;
|
ucstring finalMsg;
|
||||||
CChatWindow::encodeColorTag(prop.getRGBA(), finalMsg, false);
|
CChatWindow::encodeColorTag(prop.getRGBA(), finalMsg, false);
|
||||||
|
|
||||||
ucstring cur_time;
|
ucstring csr(CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw()) ? "(CSR) " : "");
|
||||||
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false);
|
finalMsg += csr + CI18N::get("youTell") + ": ";
|
||||||
if (pNL && pNL->getValueBool())
|
|
||||||
cur_time = CInterfaceManager::getTimestampHuman();
|
|
||||||
|
|
||||||
ucstring csr;
|
|
||||||
if (CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw())) csr += ucstring("(CSR) ");
|
|
||||||
finalMsg += cur_time + csr + CI18N::get("youTell") + ": ";
|
|
||||||
prop.readRGBA("UI:SAVE:CHAT:COLORS:TELL"," ");
|
prop.readRGBA("UI:SAVE:CHAT:COLORS:TELL"," ");
|
||||||
CChatWindow::encodeColorTag(prop.getRGBA(), finalMsg, true);
|
CChatWindow::encodeColorTag(prop.getRGBA(), finalMsg, true);
|
||||||
finalMsg += message;
|
finalMsg += message;
|
||||||
|
@ -1351,8 +1334,18 @@ class CHandlerTalk : public IActionHandler
|
||||||
{
|
{
|
||||||
string str = text.toUtf8();
|
string str = text.toUtf8();
|
||||||
string cmdWithArgs = str.substr(1);
|
string cmdWithArgs = str.substr(1);
|
||||||
/* In the chat context, only ' ' is a possible separator */
|
|
||||||
|
// Get the command name from the string, can contain spaces
|
||||||
string cmd = cmdWithArgs.substr(0, cmdWithArgs.find(' '));
|
string cmd = cmdWithArgs.substr(0, cmdWithArgs.find(' '));
|
||||||
|
if (cmdWithArgs.find('"') == 0)
|
||||||
|
{
|
||||||
|
string::size_type pos = cmdWithArgs.find('"', 1);
|
||||||
|
if (string::npos != pos)
|
||||||
|
{
|
||||||
|
cmd = cmdWithArgs.substr(1, pos - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( NLMISC::ICommand::exists( cmd ) )
|
if ( NLMISC::ICommand::exists( cmd ) )
|
||||||
{
|
{
|
||||||
NLMISC::ICommand::execute( cmdWithArgs, g_log );
|
NLMISC::ICommand::execute( cmdWithArgs, g_log );
|
||||||
|
|
|
@ -192,7 +192,7 @@ NLMISC_COMMAND(where, "Ask information on the position", "")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
NLMISC_COMMAND(who, "Display all players currently in game","[<options (GM)>]")
|
NLMISC_COMMAND(who, "Display all players currently in region","[<options (GM, channel name)>]")
|
||||||
{
|
{
|
||||||
// Check parameters.
|
// Check parameters.
|
||||||
if(args.size() > 1)
|
if(args.size() > 1)
|
||||||
|
@ -1177,7 +1177,7 @@ NLMISC_COMMAND(db, "Modify Database","<Property> <Value>")
|
||||||
if(node)
|
if(node)
|
||||||
node->setValue64(value);
|
node->setValue64(value);
|
||||||
else
|
else
|
||||||
pIM->displaySystemInfo(toString("DB %s don't exist.", args[0].c_str()));
|
pIM->displaySystemInfo(toString("DB '%s' does not exist.", args[0].c_str()));
|
||||||
#else
|
#else
|
||||||
pIM->displaySystemInfo(ucstring("Can't write to DB when in Final Version."));
|
pIM->displaySystemInfo(ucstring("Can't write to DB when in Final Version."));
|
||||||
#endif
|
#endif
|
||||||
|
@ -1193,7 +1193,7 @@ NLMISC_COMMAND(db, "Modify Database","<Property> <Value>")
|
||||||
nlinfo("%s", str.c_str());
|
nlinfo("%s", str.c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
pIM->displaySystemInfo(toString("DB %s don't exist.", args[0].c_str()));
|
pIM->displaySystemInfo(toString("DB '%s' does not exist.", args[0].c_str()));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1295,6 +1295,24 @@ NLMISC_COMMAND(setItemName, "set name of items, sbrick, etc..","<sheet_id> <name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
NLMISC_COMMAND(setMissingDynstringText, "set text of missing dynamic string"," <name> <text>")
|
||||||
|
{
|
||||||
|
if (args.size() < 2) return false;
|
||||||
|
ucstring name;
|
||||||
|
name.fromUtf8(args[0]);
|
||||||
|
ucstring text;
|
||||||
|
text.fromUtf8(args[1]);
|
||||||
|
|
||||||
|
STRING_MANAGER::CStringManagerClient *pSMC = STRING_MANAGER::CStringManagerClient::instance();
|
||||||
|
if (pSMC)
|
||||||
|
pSMC->replaceDynString(name, text);
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -5243,7 +5261,7 @@ bool CUserCommand::execute(const std::string &/* rawCommandString */, const std:
|
||||||
{
|
{
|
||||||
if ((uint)index >= args.size())
|
if ((uint)index >= args.size())
|
||||||
{
|
{
|
||||||
// Not enough argument
|
// Not enough arguments
|
||||||
pIM->displaySystemInfo (ucstring(CommandName+" : ")+CI18N::get ("uiCommandWrongArgumentCount"));
|
pIM->displaySystemInfo (ucstring(CommandName+" : ")+CI18N::get ("uiCommandWrongArgumentCount"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -5253,11 +5271,18 @@ bool CUserCommand::execute(const std::string &/* rawCommandString */, const std:
|
||||||
finalArgs += /*ucstring(*/args[index++]/*).toUtf8()*/;
|
finalArgs += /*ucstring(*/args[index++]/*).toUtf8()*/;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
finalArgs += /*ucstring(*/args[index++]/*).toUtf8()*/;
|
|
||||||
while (index<args.size())
|
while (index<args.size())
|
||||||
{
|
{
|
||||||
finalArgs += " ";
|
finalArgs += (index > 0) ? " " : "";
|
||||||
finalArgs += /*ucstring(*/args[index++]/*).toUtf8()*/;
|
// If arg contains spaces then put it in quotes
|
||||||
|
if (string::npos != args[index].find(" "))
|
||||||
|
{
|
||||||
|
finalArgs += "\"" + args[index++] + "\"";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
finalArgs += args[index++];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -244,20 +244,20 @@ class CAHOnReloadTestPage: public IActionHandler
|
||||||
REGISTER_ACTION_HANDLER (CAHOnReloadTestPage, "on_reload_test_page");
|
REGISTER_ACTION_HANDLER (CAHOnReloadTestPage, "on_reload_test_page");
|
||||||
|
|
||||||
|
|
||||||
//void initWebBrowser()
|
void initWebBrowser()
|
||||||
//{
|
{
|
||||||
// CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
// pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_WEBSTART);
|
//pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_WEBSTART);
|
||||||
//
|
|
||||||
// // start the browser
|
// start the browser
|
||||||
// CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(pIM->getElementFromId(GROUP_BROWSER));
|
CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(pIM->getElementFromId(GROUP_BROWSER));
|
||||||
//
|
|
||||||
// if (pGH)
|
if (pGH)
|
||||||
// {
|
{
|
||||||
// pGH->setActive(true);
|
pGH->setActive(true);
|
||||||
// pGH->browse(MainPageURL.c_str());
|
pGH->browse(ClientCfg.PatchletUrl.c_str());
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
@ -392,9 +392,6 @@ bool connection (const string &cookie, const string &fsaddr)
|
||||||
pIM->getDbProp ("UI:CURRENT_SCREEN")->setValue32(ClientCfg.Local ? 6 : -1); // TMP TMP
|
pIM->getDbProp ("UI:CURRENT_SCREEN")->setValue32(ClientCfg.Local ? 6 : -1); // TMP TMP
|
||||||
CCDBNodeBranch::flushObserversCalls();
|
CCDBNodeBranch::flushObserversCalls();
|
||||||
|
|
||||||
// Init web box
|
|
||||||
//initWebBrowser();
|
|
||||||
|
|
||||||
// Active inputs
|
// Active inputs
|
||||||
Actions.enable(true);
|
Actions.enable(true);
|
||||||
EditActions.enable(true);
|
EditActions.enable(true);
|
||||||
|
@ -422,6 +419,10 @@ bool connection (const string &cookie, const string &fsaddr)
|
||||||
|
|
||||||
nlinfo ("PROFILE: %d seconds for connection", (uint32)(ryzomGetLocalTime ()-connStart)/1000);
|
nlinfo ("PROFILE: %d seconds for connection", (uint32)(ryzomGetLocalTime ()-connStart)/1000);
|
||||||
|
|
||||||
|
// Init web box
|
||||||
|
nlinfo("ok");
|
||||||
|
initWebBrowser();
|
||||||
|
|
||||||
// TMP TMP
|
// TMP TMP
|
||||||
if (ClientCfg.Local)
|
if (ClientCfg.Local)
|
||||||
{
|
{
|
||||||
|
|
|
@ -484,6 +484,9 @@ void checkUnderCursor()
|
||||||
if(ContextCur.context("ATTACK"))
|
if(ContextCur.context("ATTACK"))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(testMissionOption(0))
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
// Dead
|
// Dead
|
||||||
else
|
else
|
||||||
|
|
|
@ -115,7 +115,7 @@ NLMISC::CRGBA CEntityCL::_UserPackAnimalColor;
|
||||||
NLMISC::CRGBA CEntityCL::_PvpEnemyColor;
|
NLMISC::CRGBA CEntityCL::_PvpEnemyColor;
|
||||||
NLMISC::CRGBA CEntityCL::_PvpNeutralColor;
|
NLMISC::CRGBA CEntityCL::_PvpNeutralColor;
|
||||||
NLMISC::CRGBA CEntityCL::_PvpAllyInTeamColor;
|
NLMISC::CRGBA CEntityCL::_PvpAllyInTeamColor;
|
||||||
NLMISC::CRGBA CEntityCL::_PvpAllyInGuildColor;
|
NLMISC::CRGBA CEntityCL::_PvpAllyInLeagueColor;
|
||||||
NLMISC::CRGBA CEntityCL::_PvpAllyColor;
|
NLMISC::CRGBA CEntityCL::_PvpAllyColor;
|
||||||
NLMISC::CRGBA CEntityCL::_GMTitleColor[CHARACTER_TITLE::EndGmTitle - CHARACTER_TITLE::BeginGmTitle + 1];
|
NLMISC::CRGBA CEntityCL::_GMTitleColor[CHARACTER_TITLE::EndGmTitle - CHARACTER_TITLE::BeginGmTitle + 1];
|
||||||
uint8 CEntityCL::_InvalidGMTitleCode = 0xFF;
|
uint8 CEntityCL::_InvalidGMTitleCode = 0xFF;
|
||||||
|
@ -2295,6 +2295,7 @@ void CEntityCL::onStringAvailable(uint /* stringId */, const ucstring &value)
|
||||||
womenTitle = true;
|
womenTitle = true;
|
||||||
}
|
}
|
||||||
const ucstring replacement(STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw,womenTitle));
|
const ucstring replacement(STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw,womenTitle));
|
||||||
|
_Tags = STRING_MANAGER::CStringManagerClient::getTitleInfos(_TitleRaw,womenTitle);
|
||||||
if (!replacement.empty() || !ClientCfg.DebugStringManager)
|
if (!replacement.empty() || !ClientCfg.DebugStringManager)
|
||||||
{
|
{
|
||||||
// build the final name
|
// build the final name
|
||||||
|
@ -2436,7 +2437,6 @@ public:
|
||||||
CEntityCL::_PvpEnemyColor = pIM->getDbProp("UI:SAVE:ENTITY:COLORS:PVPENEMY")->getValueRGBA();
|
CEntityCL::_PvpEnemyColor = pIM->getDbProp("UI:SAVE:ENTITY:COLORS:PVPENEMY")->getValueRGBA();
|
||||||
CEntityCL::_PvpAllyColor = pIM->getDbProp("UI:SAVE:ENTITY:COLORS:PVPALLY")->getValueRGBA();
|
CEntityCL::_PvpAllyColor = pIM->getDbProp("UI:SAVE:ENTITY:COLORS:PVPALLY")->getValueRGBA();
|
||||||
CEntityCL::_PvpAllyInTeamColor = pIM->getDbProp("UI:SAVE:ENTITY:COLORS:PVPALLYINTEAM")->getValueRGBA();
|
CEntityCL::_PvpAllyInTeamColor = pIM->getDbProp("UI:SAVE:ENTITY:COLORS:PVPALLYINTEAM")->getValueRGBA();
|
||||||
CEntityCL::_PvpAllyInGuildColor = pIM->getDbProp("UI:SAVE:ENTITY:COLORS:PVPALLYINGUILD")->getValueRGBA();
|
|
||||||
CEntityCL::_PvpNeutralColor = pIM->getDbProp("UI:SAVE:ENTITY:COLORS:PVPNEUTRAL")->getValueRGBA();
|
CEntityCL::_PvpNeutralColor = pIM->getDbProp("UI:SAVE:ENTITY:COLORS:PVPNEUTRAL")->getValueRGBA();
|
||||||
|
|
||||||
// don't save these colors in .icfg because players can't change them
|
// don't save these colors in .icfg because players can't change them
|
||||||
|
@ -2463,7 +2463,7 @@ bool CEntityCL::isTarget () const
|
||||||
|
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
|
|
||||||
bool CEntityCL::isInGuild () const
|
bool CEntityCL::isInSameGuild () const
|
||||||
{
|
{
|
||||||
if (Type != Player && Type != User)
|
if (Type != Player && Type != User)
|
||||||
return false;
|
return false;
|
||||||
|
@ -2477,6 +2477,33 @@ bool CEntityCL::isInGuild () const
|
||||||
|
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
|
|
||||||
|
bool CEntityCL::oneInLeague () const
|
||||||
|
{
|
||||||
|
if (Type != Player && Type != User)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
const uint32 leagueID = getLeagueID();
|
||||||
|
if ((UserEntity && (UserEntity->getLeagueID() != 0)) || leagueID != 0)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------
|
||||||
|
|
||||||
|
bool CEntityCL::isInSameLeague () const
|
||||||
|
{
|
||||||
|
if (Type != Player && Type != User)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
const uint32 leagueID = getLeagueID();
|
||||||
|
if ((leagueID != 0) && UserEntity && (leagueID == UserEntity->getLeagueID()))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
//-----------------------------------------------
|
||||||
|
|
||||||
NLMISC::CRGBA CEntityCL::getColor () const
|
NLMISC::CRGBA CEntityCL::getColor () const
|
||||||
{
|
{
|
||||||
// target
|
// target
|
||||||
|
@ -2511,46 +2538,43 @@ NLMISC::CRGBA CEntityCL::getColor () const
|
||||||
{
|
{
|
||||||
if (isEnemy())
|
if (isEnemy())
|
||||||
{
|
{
|
||||||
if (getPvpMode()&PVP_MODE::PvpFactionFlagged || getPvpMode()&PVP_MODE::PvpChallenge)
|
if (getPvpMode()&PVP_MODE::PvpFaction)
|
||||||
return _PvpEnemyColor;
|
|
||||||
else
|
|
||||||
return CRGBA(min(255, _PvpEnemyColor.R+150), min(255, _PvpEnemyColor.G+150), min(255, _PvpEnemyColor.B+150),_PvpEnemyColor.A);
|
return CRGBA(min(255, _PvpEnemyColor.R+150), min(255, _PvpEnemyColor.G+150), min(255, _PvpEnemyColor.B+150),_PvpEnemyColor.A);
|
||||||
|
else
|
||||||
|
return _PvpEnemyColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// neutral pvp
|
|
||||||
if (isNeutralPVP())
|
|
||||||
{
|
|
||||||
if (isInTeam())
|
|
||||||
return _PvpAllyInTeamColor;
|
|
||||||
if (isInGuild())
|
|
||||||
return _PvpAllyInGuildColor;
|
|
||||||
|
|
||||||
return _PvpNeutralColor;
|
|
||||||
}
|
|
||||||
// ally
|
// ally
|
||||||
if (isAlly())
|
if (isAlly())
|
||||||
{
|
{
|
||||||
if (getPvpMode() & PVP_MODE::PvpFactionFlagged)
|
if (getPvpMode() & PVP_MODE::PvpFactionFlagged)
|
||||||
{
|
{
|
||||||
if (isInTeam())
|
if(isInSameLeague())
|
||||||
return _PvpAllyInTeamColor;
|
return CRGBA(max(0, _PvpAllyColor.R-100), max(0, _PvpAllyColor.G-100), max(0, _PvpAllyColor.B-100),_PvpAllyColor.A);
|
||||||
if(isInGuild())
|
return CRGBA(max(0, _PvpAllyInTeamColor.R-100), max(0, _PvpAllyInTeamColor.G-100), max(0, _PvpAllyInTeamColor.B-100),_PvpAllyInTeamColor.A);
|
||||||
return _PvpAllyInGuildColor;
|
|
||||||
return _PvpAllyColor;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (isInTeam())
|
if(isInSameLeague())
|
||||||
return CRGBA(min(255, _PvpAllyInTeamColor.R+150), min(255, _PvpAllyInTeamColor.G+150), min(255, _PvpAllyInTeamColor.B+150),_PvpAllyInTeamColor.A);
|
return _PvpAllyColor;
|
||||||
if(isInGuild())
|
return _PvpAllyInTeamColor;
|
||||||
return CRGBA(min(255, _PvpAllyInGuildColor.R+150), min(255, _PvpAllyInGuildColor.G+150), min(255, _PvpAllyInGuildColor.B+150),_PvpAllyInGuildColor.A);
|
|
||||||
return CRGBA(min(255, _PvpAllyColor.R+150), min(255, _PvpAllyColor.G+150), min(255, _PvpAllyColor.B+150),_PvpAllyColor.A);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// neutral pvp
|
||||||
|
if (isNeutralPVP())
|
||||||
|
return _PvpNeutralColor;
|
||||||
|
|
||||||
// neutral
|
// neutral
|
||||||
if (isInTeam())
|
if (isInTeam())
|
||||||
return _GroupColor;
|
return _GroupColor;
|
||||||
if (isInGuild())
|
|
||||||
|
// neutral
|
||||||
|
if (isInSameLeague())
|
||||||
|
return CRGBA(min(255, _GroupColor.R+50), min(255, _GroupColor.G+50), min(255, _GroupColor.B+50),_GroupColor.A);
|
||||||
|
|
||||||
|
if (isInSameGuild())
|
||||||
return _GuildColor;
|
return _GuildColor;
|
||||||
}
|
}
|
||||||
return _EntitiesColor[Type];
|
return _EntitiesColor[Type];
|
||||||
|
|
|
@ -686,7 +686,7 @@ public:
|
||||||
virtual bool isNeutralPVP() const { return false; }
|
virtual bool isNeutralPVP() const { return false; }
|
||||||
|
|
||||||
/// Return true if this player has the viewing properties of a friend (inscene bars...)
|
/// Return true if this player has the viewing properties of a friend (inscene bars...)
|
||||||
virtual bool isViewedAsFriend() const { return isNeutral() || isFriend() || isInTeam() || isInGuild(); }
|
virtual bool isViewedAsFriend() const { return isNeutral() || isFriend() || isInTeam() || isInSameGuild() || isInSameLeague(); }
|
||||||
|
|
||||||
/// Return the People for the entity (unknown by default)
|
/// Return the People for the entity (unknown by default)
|
||||||
virtual EGSPD::CPeople::TPeople people() const;
|
virtual EGSPD::CPeople::TPeople people() const;
|
||||||
|
@ -733,7 +733,13 @@ public:
|
||||||
bool isInTeam () const { return _IsInTeam; }
|
bool isInTeam () const { return _IsInTeam; }
|
||||||
|
|
||||||
// Return true if this entity is in the user guild
|
// Return true if this entity is in the user guild
|
||||||
bool isInGuild () const;
|
bool isInSameGuild () const;
|
||||||
|
|
||||||
|
// Return true if this entity is in the user league
|
||||||
|
bool isInSameLeague () const;
|
||||||
|
|
||||||
|
// Return true if this entity or the user is in a league
|
||||||
|
bool oneInLeague () const;
|
||||||
|
|
||||||
// Return true if this entity is a Mount owned by the User
|
// Return true if this entity is a Mount owned by the User
|
||||||
bool isUserMount () const {return _IsUserMount;}
|
bool isUserMount () const {return _IsUserMount;}
|
||||||
|
@ -746,8 +752,9 @@ public:
|
||||||
virtual uint64 getGuildSymbol () const { return 0; }
|
virtual uint64 getGuildSymbol () const { return 0; }
|
||||||
|
|
||||||
virtual uint32 getEventFactionID() const { return 0; }
|
virtual uint32 getEventFactionID() const { return 0; }
|
||||||
virtual uint8 getPvpMode() const { return PVP_MODE::None; }
|
virtual uint16 getPvpMode() const { return PVP_MODE::None; }
|
||||||
virtual PVP_CLAN::TPVPClan getPvpClan() const { return PVP_CLAN::None; }
|
virtual PVP_CLAN::TPVPClan getPvpClan() const { return PVP_CLAN::None; }
|
||||||
|
virtual uint32 getLeagueID() const { return 0; }
|
||||||
|
|
||||||
virtual uint16 getOutpostId() const { return 0; }
|
virtual uint16 getOutpostId() const { return 0; }
|
||||||
virtual OUTPOSTENUMS::TPVPSide getOutpostSide() const { return OUTPOSTENUMS::UnknownPVPSide; }
|
virtual OUTPOSTENUMS::TPVPSide getOutpostSide() const { return OUTPOSTENUMS::UnknownPVPSide; }
|
||||||
|
@ -760,6 +767,16 @@ public:
|
||||||
return _Title;
|
return _Title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Return the entity tags
|
||||||
|
const ucstring &getTag(uint8 id) const
|
||||||
|
{
|
||||||
|
if (_Tags.size() > id) {
|
||||||
|
return _Tags[id];
|
||||||
|
}
|
||||||
|
static ucstring empty;
|
||||||
|
return empty;
|
||||||
|
}
|
||||||
|
|
||||||
/// Return the raw unparsed entity title
|
/// Return the raw unparsed entity title
|
||||||
const ucstring getTitleRaw() const
|
const ucstring getTitleRaw() const
|
||||||
{
|
{
|
||||||
|
@ -910,6 +927,8 @@ protected:
|
||||||
ucstring _EntityName;
|
ucstring _EntityName;
|
||||||
// Current entity title
|
// Current entity title
|
||||||
ucstring _Title;
|
ucstring _Title;
|
||||||
|
// Current entity tags
|
||||||
|
std::vector<ucstring> _Tags;
|
||||||
// Current entity title string id
|
// Current entity title string id
|
||||||
std::string _TitleRaw;
|
std::string _TitleRaw;
|
||||||
// Current permanent content symbol for the entity
|
// Current permanent content symbol for the entity
|
||||||
|
@ -1006,7 +1025,7 @@ protected:
|
||||||
static NLMISC::CRGBA _PvpEnemyColor;
|
static NLMISC::CRGBA _PvpEnemyColor;
|
||||||
static NLMISC::CRGBA _PvpNeutralColor;
|
static NLMISC::CRGBA _PvpNeutralColor;
|
||||||
static NLMISC::CRGBA _PvpAllyInTeamColor;
|
static NLMISC::CRGBA _PvpAllyInTeamColor;
|
||||||
static NLMISC::CRGBA _PvpAllyInGuildColor;
|
static NLMISC::CRGBA _PvpAllyInLeagueColor;
|
||||||
static NLMISC::CRGBA _PvpAllyColor;
|
static NLMISC::CRGBA _PvpAllyColor;
|
||||||
// colors for GM players
|
// colors for GM players
|
||||||
static NLMISC::CRGBA _GMTitleColor[CHARACTER_TITLE::EndGmTitle - CHARACTER_TITLE::BeginGmTitle + 1];
|
static NLMISC::CRGBA _GMTitleColor[CHARACTER_TITLE::EndGmTitle - CHARACTER_TITLE::BeginGmTitle + 1];
|
||||||
|
|
|
@ -57,6 +57,9 @@
|
||||||
#include "sbrick_manager.h"
|
#include "sbrick_manager.h"
|
||||||
#include "sphrase_manager.h"
|
#include "sphrase_manager.h"
|
||||||
#include "action_handler_help.h"
|
#include "action_handler_help.h"
|
||||||
|
#include "nel/misc/i18n.h"
|
||||||
|
#include "nel/misc/algo.h"
|
||||||
|
#include "nel/net/email.h"
|
||||||
#include "game_share/mission_desc.h"
|
#include "game_share/mission_desc.h"
|
||||||
#include "game_share/inventories.h"
|
#include "game_share/inventories.h"
|
||||||
#include "game_share/visual_slot_manager.h"
|
#include "game_share/visual_slot_manager.h"
|
||||||
|
@ -378,7 +381,7 @@ CInterfaceGroup *CInterfaceHelp::activateNextWindow(CDBCtrlSheet *elt, sint forc
|
||||||
setup.setupDefaultIDs();
|
setup.setupDefaultIDs();
|
||||||
setup.SrcSheet = elt;
|
setup.SrcSheet = elt;
|
||||||
setup.HelpWindow = group;
|
setup.HelpWindow = group;
|
||||||
setupCreatorName(setup);
|
//setupCreatorName(setup);
|
||||||
|
|
||||||
// Hide elements by defaults
|
// Hide elements by defaults
|
||||||
resetSheetHelp(setup);
|
resetSheetHelp(setup);
|
||||||
|
@ -2064,6 +2067,12 @@ void getItemText (CDBCtrlSheet *item, ucstring &itemText, const CItemSheet*pIS)
|
||||||
strFindReplace(itemText, "%r2_comment_text", toString(itemInfo.R2ItemComment));
|
strFindReplace(itemText, "%r2_comment_text", toString(itemInfo.R2ItemComment));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case ITEMFAMILY::PET_ANIMAL_TICKET:
|
||||||
|
{
|
||||||
|
string nr = (itemInfo.PetNumber > 0) ? toString(itemInfo.PetNumber) : "(slot)" + toString(item->getIndexInDB());
|
||||||
|
strFindReplace(itemText, "%petnumber", nr);
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
strFindReplace(itemText, "%no_rent", pIS->IsItemNoRent ? CI18N::get("uihelpItemNoRent") : string(""));
|
strFindReplace(itemText, "%no_rent", pIS->IsItemNoRent ? CI18N::get("uihelpItemNoRent") : string(""));
|
||||||
|
@ -2745,8 +2754,15 @@ void setupCreatorName(CSheetHelpSetup &setup)
|
||||||
CViewText *vthd = dynamic_cast<CViewText*>(setup.HelpWindow->getView("creator_header"));
|
CViewText *vthd = dynamic_cast<CViewText*>(setup.HelpWindow->getView("creator_header"));
|
||||||
if (vtid != NULL)
|
if (vtid != NULL)
|
||||||
{
|
{
|
||||||
// if not an item, disable the view
|
bool bIsRM = false;
|
||||||
if(!setup.SrcSheet || setup.SrcSheet->getType()!=CCtrlSheetInfo::SheetType_Item )
|
if (setup.SrcSheet)
|
||||||
|
{
|
||||||
|
const CItemSheet *pIS= dynamic_cast<const CItemSheet*>(SheetMngr.get(CSheetId(setup.SrcSheet->getSheetId())));
|
||||||
|
bIsRM = (pIS && pIS->Family == ITEMFAMILY::RAW_MATERIAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
// if a RM or not an item, disable the view
|
||||||
|
if(!setup.SrcSheet || bIsRM || setup.SrcSheet->getType()!=CCtrlSheetInfo::SheetType_Item )
|
||||||
{
|
{
|
||||||
// important else a brick could display a creator name....
|
// important else a brick could display a creator name....
|
||||||
vtid->setActive(false);
|
vtid->setActive(false);
|
||||||
|
@ -3569,6 +3585,31 @@ public:
|
||||||
};
|
};
|
||||||
REGISTER_ACTION_HANDLER( CHandlerAuraModifierTooltip, "aura_modifier_tooltip");
|
REGISTER_ACTION_HANDLER( CHandlerAuraModifierTooltip, "aura_modifier_tooltip");
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
class CHandlerUserPaToolTip : public IActionHandler
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void execute(CCtrlBase *pCaller, const string &Params)
|
||||||
|
{
|
||||||
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
|
|
||||||
|
uint8 index;
|
||||||
|
fromString(Params, index);
|
||||||
|
--index; // Param is 1-based so subtract 1
|
||||||
|
if (index < 0 || index >= MAX_INVENTORY_ANIMAL)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ucstring txt;
|
||||||
|
CCDBNodeLeaf *node = pIM->getDbProp(toString("SERVER:PACK_ANIMAL:BEAST%d:NAME", index));
|
||||||
|
if (node && CStringManagerClient::instance()->getDynString(node->getValue32(), txt))
|
||||||
|
{
|
||||||
|
pIM->setContextHelpText(CEntityCL::removeTitleFromName(txt));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
REGISTER_ACTION_HANDLER( CHandlerUserPaToolTip, "userpa_name_tooltip");
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
class CHandlerAnimalDeadPopupTooltip : public IActionHandler
|
class CHandlerAnimalDeadPopupTooltip : public IActionHandler
|
||||||
|
@ -3922,7 +3963,7 @@ public:
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
if (Driver)
|
if (Driver)
|
||||||
{
|
{
|
||||||
HWND wnd = Driver->getDisplay();
|
HWND wnd = (HWND) Driver->getDisplay();
|
||||||
ShowWindow(wnd, SW_MINIMIZE);
|
ShowWindow(wnd, SW_MINIMIZE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -64,6 +64,15 @@ void refreshItemHelp(CSheetHelpSetup &setup);
|
||||||
// refresh help for a mission
|
// refresh help for a mission
|
||||||
void refreshMissionHelp(CSheetHelpSetup &setup, const CPrerequisitInfos &infos);
|
void refreshMissionHelp(CSheetHelpSetup &setup, const CPrerequisitInfos &infos);
|
||||||
|
|
||||||
|
class CPetAnimalItemInfoWaiter : public IItemInfoWaiter
|
||||||
|
{
|
||||||
|
void infoReceived()
|
||||||
|
{
|
||||||
|
//ItemSheet
|
||||||
|
//ItemSlotId
|
||||||
|
CClientItemInfo info = getInventory().getItemInfo(ItemSlotId);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
|
@ -31,9 +31,11 @@
|
||||||
#include "../net_manager.h"
|
#include "../net_manager.h"
|
||||||
#include "group_menu.h"
|
#include "group_menu.h"
|
||||||
#include "../global.h"
|
#include "../global.h"
|
||||||
|
#include "group_html.h"
|
||||||
|
|
||||||
//
|
//
|
||||||
#include "game_share/inventories.h"
|
#include "game_share/inventories.h"
|
||||||
|
#include "game_share/bot_chat_types.h"
|
||||||
|
|
||||||
#include "macrocmd_manager.h"
|
#include "macrocmd_manager.h"
|
||||||
#include "inventory_manager.h"
|
#include "inventory_manager.h"
|
||||||
|
@ -43,6 +45,7 @@
|
||||||
#include "view_bitmap.h"
|
#include "view_bitmap.h"
|
||||||
|
|
||||||
extern CSheetManager SheetMngr;
|
extern CSheetManager SheetMngr;
|
||||||
|
extern NLMISC::CLog g_log;
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
|
@ -80,8 +83,6 @@ void CInterfaceItemEdition::setCurrWindow(CDBCtrlSheet* ctrlSheet, const std::st
|
||||||
_CurrWindow.IsInEditionMode = isInEditionMode;
|
_CurrWindow.IsInEditionMode = isInEditionMode;
|
||||||
_CurrWindow.begin();
|
_CurrWindow.begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ********************************************************************************************
|
// ********************************************************************************************
|
||||||
|
@ -153,13 +154,26 @@ void CInterfaceItemEdition::CItemEditionWindow::infoReceived()
|
||||||
if (itemInfo.CustomText.empty())
|
if (itemInfo.CustomText.empty())
|
||||||
display->setTextFormatTaged(ucstring(STRING_MANAGER::CStringManagerClient::getItemLocalizedDescription(pIS->Id)));
|
display->setTextFormatTaged(ucstring(STRING_MANAGER::CStringManagerClient::getItemLocalizedDescription(pIS->Id)));
|
||||||
else
|
else
|
||||||
display->setTextFormatTaged(itemInfo.CustomText);
|
{
|
||||||
}
|
ucstring text = itemInfo.CustomText;
|
||||||
|
string::size_type delimiter = text.find(' ');
|
||||||
|
if(text.size() > 3 && text[0]=='@' && text[1]=='W' && text[2]=='E' && text[3]=='B')
|
||||||
|
{
|
||||||
|
CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(pIM->getElementFromId("ui:interface:web_transactions:content:html"));
|
||||||
|
if (pGH)
|
||||||
|
pGH->browse(ucstring(text.substr(4, delimiter-4)).toString().c_str());
|
||||||
|
if (delimiter == string::npos)
|
||||||
|
group->setActive(false);
|
||||||
|
else
|
||||||
|
text = text.substr(delimiter, text.size()-delimiter);
|
||||||
|
}
|
||||||
|
|
||||||
|
display->setTextFormatTaged(text);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -278,7 +292,21 @@ void CInterfaceItemEdition::CItemEditionWindow::begin()
|
||||||
if (itemInfo.CustomText.empty())
|
if (itemInfo.CustomText.empty())
|
||||||
display->setTextFormatTaged(ucstring(STRING_MANAGER::CStringManagerClient::getItemLocalizedDescription(pIS->Id)));
|
display->setTextFormatTaged(ucstring(STRING_MANAGER::CStringManagerClient::getItemLocalizedDescription(pIS->Id)));
|
||||||
else
|
else
|
||||||
display->setTextFormatTaged(itemInfo.CustomText);
|
{
|
||||||
|
ucstring text = itemInfo.CustomText;
|
||||||
|
string::size_type delimiter = text.find(' ');
|
||||||
|
if(text.size() > 3 && text[0]=='@' && text[1]=='W' && text[2]=='E' && text[3]=='B')
|
||||||
|
{
|
||||||
|
CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(pIM->getElementFromId("ui:interface:web_transactions:content:html"));
|
||||||
|
if (pGH)
|
||||||
|
pGH->browse(ucstring(text.substr(4, delimiter-4)).toString().c_str());
|
||||||
|
if (delimiter == string::npos)
|
||||||
|
group->setActive(false);
|
||||||
|
else
|
||||||
|
text = text.substr(delimiter, text.size()-delimiter);
|
||||||
|
}
|
||||||
|
display->setTextFormatTaged(text);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -287,7 +315,6 @@ void CInterfaceItemEdition::CItemEditionWindow::begin()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -366,7 +393,6 @@ void CInterfaceItemEdition::CItemEditionWindow::validate()
|
||||||
text = editBoxLarge->getInputString();
|
text = editBoxLarge->getInputString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (textValid)
|
if (textValid)
|
||||||
{
|
{
|
||||||
CBitMemStream out;
|
CBitMemStream out;
|
||||||
|
@ -972,6 +998,12 @@ bool checkCanExchangeItem(CDBCtrlSheet *pCSSrc)
|
||||||
bDropOrSell = pIS->canExchangeOrGive(PlayerTrade.BotChatGiftContext);
|
bDropOrSell = pIS->canExchangeOrGive(PlayerTrade.BotChatGiftContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Locked by owner; cannot trade
|
||||||
|
if (pCSSrc->getLockedByOwner())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Special case if this is an animal ticket
|
// Special case if this is an animal ticket
|
||||||
if ((pIS != NULL) && (pIS->Family == ITEMFAMILY::PET_ANIMAL_TICKET))
|
if ((pIS != NULL) && (pIS->Family == ITEMFAMILY::PET_ANIMAL_TICKET))
|
||||||
{
|
{
|
||||||
|
@ -1209,6 +1241,13 @@ class CHandlerDestroyItem : public IActionHandler
|
||||||
nlwarning("<CHandlerDestroyItem::execute> no caller sheet found");
|
nlwarning("<CHandlerDestroyItem::execute> no caller sheet found");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Don't destroy locked items
|
||||||
|
if (item->getLockedByOwner())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// if the item is currently selected, removes the selection
|
// if the item is currently selected, removes the selection
|
||||||
if (item == CDBCtrlSheet::getCurrSelection())
|
if (item == CDBCtrlSheet::getCurrSelection())
|
||||||
{
|
{
|
||||||
|
@ -1712,11 +1751,15 @@ class CHandlerItemMenuCheck : public IActionHandler
|
||||||
CViewTextMenu *pXpCatalyserUse = dynamic_cast<CViewTextMenu*>(pMenu->getView("xp_catalyser_use"));
|
CViewTextMenu *pXpCatalyserUse = dynamic_cast<CViewTextMenu*>(pMenu->getView("xp_catalyser_use"));
|
||||||
CViewTextMenu *pDrop = dynamic_cast<CViewTextMenu*>(pMenu->getView("drop"));
|
CViewTextMenu *pDrop = dynamic_cast<CViewTextMenu*>(pMenu->getView("drop"));
|
||||||
CViewTextMenu *pDestroy = dynamic_cast<CViewTextMenu*>(pMenu->getView("destroy"));
|
CViewTextMenu *pDestroy = dynamic_cast<CViewTextMenu*>(pMenu->getView("destroy"));
|
||||||
|
CViewTextMenu *pLockUnlock = dynamic_cast<CViewTextMenu*>(pMenu->getView("lockunlock"));
|
||||||
CViewTextMenu *pMoveSubMenu = dynamic_cast<CViewTextMenu*>(pMenu->getView("move"));
|
CViewTextMenu *pMoveSubMenu = dynamic_cast<CViewTextMenu*>(pMenu->getView("move"));
|
||||||
CViewTextMenu *pMoveToBag = dynamic_cast<CViewTextMenu*>(pMenu->getView("bag"));
|
CViewTextMenu *pMoveToBag = dynamic_cast<CViewTextMenu*>(pMenu->getView("bag"));
|
||||||
CViewTextMenu *pMoveToGuild = dynamic_cast<CViewTextMenu*>(pMenu->getView("guild"));
|
CViewTextMenu *pMoveToGuild = dynamic_cast<CViewTextMenu*>(pMenu->getView("guild"));
|
||||||
CViewTextMenu *pMoveToRoom = dynamic_cast<CViewTextMenu*>(pMenu->getView("room"));
|
CViewTextMenu *pMoveToRoom = dynamic_cast<CViewTextMenu*>(pMenu->getView("room"));
|
||||||
CViewTextMenu *pMoveToPa[MAX_INVENTORY_ANIMAL];
|
CViewTextMenu *pMoveToPa[MAX_INVENTORY_ANIMAL];
|
||||||
|
|
||||||
|
bool bIsLockedByOwner = pCS->getLockedByOwner();
|
||||||
|
|
||||||
for(i=0;i<MAX_INVENTORY_ANIMAL;i++)
|
for(i=0;i<MAX_INVENTORY_ANIMAL;i++)
|
||||||
{
|
{
|
||||||
pMoveToPa[i]= dynamic_cast<CViewTextMenu*>(pMenu->getView(toString("pa%d", i)));
|
pMoveToPa[i]= dynamic_cast<CViewTextMenu*>(pMenu->getView(toString("pa%d", i)));
|
||||||
|
@ -1735,24 +1778,27 @@ class CHandlerItemMenuCheck : public IActionHandler
|
||||||
if(pXpCatalyserUse) pXpCatalyserUse->setActive(false);
|
if(pXpCatalyserUse) pXpCatalyserUse->setActive(false);
|
||||||
if(pItemTextDisplay) pItemTextDisplay->setActive(false);
|
if(pItemTextDisplay) pItemTextDisplay->setActive(false);
|
||||||
if(pItemTextEdition) pItemTextEdition->setActive(false);
|
if(pItemTextEdition) pItemTextEdition->setActive(false);
|
||||||
|
|
||||||
|
if(pLockUnlock) pLockUnlock->setActive(true);
|
||||||
|
|
||||||
const CItemSheet *pIS = pCS->asItemSheet();
|
const CItemSheet *pIS = pCS->asItemSheet();
|
||||||
if (invId != INVENTORIES::guild)
|
if (invId != INVENTORIES::guild)
|
||||||
if (pIS != NULL)
|
if (pIS != NULL)
|
||||||
{
|
{
|
||||||
if (pCrisEnchant && pIS->Family == ITEMFAMILY::CRYSTALLIZED_SPELL)
|
if (pCrisEnchant && pIS->Family == ITEMFAMILY::CRYSTALLIZED_SPELL && !bIsLockedByOwner)
|
||||||
pCrisEnchant->setActive(true);
|
pCrisEnchant->setActive(true);
|
||||||
if (pCrisReload && pIS->Family == ITEMFAMILY::ITEM_SAP_RECHARGE)
|
if (pCrisReload && pIS->Family == ITEMFAMILY::ITEM_SAP_RECHARGE && !bIsLockedByOwner)
|
||||||
pCrisReload->setActive(true);
|
pCrisReload->setActive(true);
|
||||||
// teleport can be used only from bag (NB: should not exist in mektoub....)
|
// teleport can be used only from bag (NB: should not exist in mektoub....)
|
||||||
if (pTeleportUse && pIS->Family == ITEMFAMILY::TELEPORT && pCS->getInventoryIndex()==INVENTORIES::bag)
|
if (pTeleportUse && pIS->Family == ITEMFAMILY::TELEPORT && pCS->getInventoryIndex()==INVENTORIES::bag && !bIsLockedByOwner)
|
||||||
{
|
{
|
||||||
pTeleportUse->setActive(true);
|
pTeleportUse->setActive(true);
|
||||||
}
|
}
|
||||||
if (pItemConsume && pIS->IsConsumable == true && pCS->getInventoryIndex()==INVENTORIES::bag)
|
if (pItemConsume && pIS->IsConsumable == true && pCS->getInventoryIndex()==INVENTORIES::bag && !bIsLockedByOwner)
|
||||||
{
|
{
|
||||||
pItemConsume->setActive(true);
|
pItemConsume->setActive(true);
|
||||||
}
|
}
|
||||||
if (pXpCatalyserUse && pIS->Family == ITEMFAMILY::XP_CATALYSER && pCS->getInventoryIndex()==INVENTORIES::bag)
|
if (pXpCatalyserUse && pIS->Family == ITEMFAMILY::XP_CATALYSER && pCS->getInventoryIndex()==INVENTORIES::bag && !bIsLockedByOwner)
|
||||||
{
|
{
|
||||||
pXpCatalyserUse->setActive(true);
|
pXpCatalyserUse->setActive(true);
|
||||||
}
|
}
|
||||||
|
@ -1815,9 +1861,10 @@ class CHandlerItemMenuCheck : public IActionHandler
|
||||||
for(i=0;i<MAX_INVENTORY_ANIMAL;i++)
|
for(i=0;i<MAX_INVENTORY_ANIMAL;i++)
|
||||||
if(pMoveToPa[i]) pMoveToPa[i]->setActive(false);
|
if(pMoveToPa[i]) pMoveToPa[i]->setActive(false);
|
||||||
|
|
||||||
// additionnaly, cannot drop/destroy an animal item.
|
// additionnaly, cannot drop/destroy/lock an animal item.
|
||||||
if(pDrop) pDrop->setActive(false);
|
if(pDrop) pDrop->setActive(false);
|
||||||
if(pDestroy) pDestroy->setActive(false);
|
if(pDestroy) pDestroy->setActive(false);
|
||||||
|
if(pLockUnlock) pLockUnlock->setActive(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1845,6 +1892,7 @@ class CHandlerItemMenuCheck : public IActionHandler
|
||||||
// std case: can drop / destroy
|
// std case: can drop / destroy
|
||||||
if(pDrop) pDrop->setActive(invId!=INVENTORIES::guild);
|
if(pDrop) pDrop->setActive(invId!=INVENTORIES::guild);
|
||||||
if(pDestroy) pDestroy->setActive(invId!=INVENTORIES::guild);
|
if(pDestroy) pDestroy->setActive(invId!=INVENTORIES::guild);
|
||||||
|
if(pLockUnlock) pLockUnlock->setActive(invId!=INVENTORIES::guild);
|
||||||
}
|
}
|
||||||
|
|
||||||
// hide the move entry completely?
|
// hide the move entry completely?
|
||||||
|
@ -1899,6 +1947,29 @@ class CHandlerItemMenuCheck : public IActionHandler
|
||||||
pItemTextDisplay->setGrayed(pIM->getDbProp("UI:VARIABLES:ISACTIVE:PHRASE_EDIT_CUSTOM")->getValueBool());
|
pItemTextDisplay->setGrayed(pIM->getDbProp("UI:VARIABLES:ISACTIVE:PHRASE_EDIT_CUSTOM")->getValueBool());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pCS->getGrayed())
|
||||||
|
{
|
||||||
|
if (pEquip) pEquip->setActive(false);
|
||||||
|
if (pDestroy) pDestroy->setActive(false);
|
||||||
|
if (pLockUnlock) pLockUnlock->setActive(false);
|
||||||
|
if (pMoveSubMenu) pMoveSubMenu->setActive(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bIsLockedByOwner)
|
||||||
|
{
|
||||||
|
if (pLockUnlock) pLockUnlock->setHardText("uimUnlockItem");
|
||||||
|
// Cannot drop/destroy if locked by owner
|
||||||
|
if (pDrop) pDrop->setActive(false);
|
||||||
|
if (pDestroy) pDestroy->setActive(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (pLockUnlock) pLockUnlock->setHardText("uimLockItem");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only show lock menu item if inventory contains the info
|
||||||
|
if (pLockUnlock) pLockUnlock->setActive(pCS->canOwnerLock());
|
||||||
|
|
||||||
|
|
||||||
// **** Gray Entries
|
// **** Gray Entries
|
||||||
// If ourselves are not available, then gray all
|
// If ourselves are not available, then gray all
|
||||||
|
@ -1911,6 +1982,7 @@ class CHandlerItemMenuCheck : public IActionHandler
|
||||||
if(pXpCatalyserUse) pXpCatalyserUse->setGrayed(true);
|
if(pXpCatalyserUse) pXpCatalyserUse->setGrayed(true);
|
||||||
if(pDrop) pDrop->setGrayed(true);
|
if(pDrop) pDrop->setGrayed(true);
|
||||||
if(pDestroy) pDestroy->setGrayed(true);
|
if(pDestroy) pDestroy->setGrayed(true);
|
||||||
|
if(pLockUnlock) pLockUnlock->setGrayed(true);
|
||||||
if(pMoveSubMenu) pMoveSubMenu->setGrayed(true);
|
if(pMoveSubMenu) pMoveSubMenu->setGrayed(true);
|
||||||
if(pMoveToBag) pMoveToBag->setGrayed(true);
|
if(pMoveToBag) pMoveToBag->setGrayed(true);
|
||||||
for(i=0;i<MAX_INVENTORY_ANIMAL;i++)
|
for(i=0;i<MAX_INVENTORY_ANIMAL;i++)
|
||||||
|
@ -1929,6 +2001,7 @@ class CHandlerItemMenuCheck : public IActionHandler
|
||||||
if(pXpCatalyserUse) pXpCatalyserUse->setGrayed(false);
|
if(pXpCatalyserUse) pXpCatalyserUse->setGrayed(false);
|
||||||
if(pDrop) pDrop->setGrayed(false);
|
if(pDrop) pDrop->setGrayed(false);
|
||||||
if(pDestroy) pDestroy->setGrayed(false);
|
if(pDestroy) pDestroy->setGrayed(false);
|
||||||
|
if(pLockUnlock) pLockUnlock->setGrayed(false);
|
||||||
if(pMoveSubMenu) pMoveSubMenu->setGrayed(false);
|
if(pMoveSubMenu) pMoveSubMenu->setGrayed(false);
|
||||||
|
|
||||||
// check each inventory dest if available
|
// check each inventory dest if available
|
||||||
|
@ -1956,6 +2029,45 @@ class CHandlerItemMenuDeactivate : public IActionHandler
|
||||||
};
|
};
|
||||||
REGISTER_ACTION_HANDLER( CHandlerItemMenuDeactivate, "item_menu_deactivate" );
|
REGISTER_ACTION_HANDLER( CHandlerItemMenuDeactivate, "item_menu_deactivate" );
|
||||||
|
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
|
||||||
|
class CHandlerItemMenuBaseCheck : public IActionHandler
|
||||||
|
{
|
||||||
|
void execute (CCtrlBase *pCaller, const std::string &/* sParams */)
|
||||||
|
{
|
||||||
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
|
|
||||||
|
// Get the ctrl sheet that launched this menu
|
||||||
|
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(pIM->getCtrlLaunchingModal());
|
||||||
|
if (pCS == NULL) return;
|
||||||
|
INVENTORIES::TInventory invId= (INVENTORIES::TInventory)pCS->getInventoryIndex();
|
||||||
|
|
||||||
|
// Get the menu launched
|
||||||
|
CInterfaceGroup *pMenu= dynamic_cast<CInterfaceGroup*>(pCaller);
|
||||||
|
if(!pMenu) return;
|
||||||
|
|
||||||
|
// Get all needed text entries
|
||||||
|
CViewTextMenu *pDestroy = dynamic_cast<CViewTextMenu*>(pMenu->getView("destroy"));
|
||||||
|
CViewTextMenu *pLockUnlock = dynamic_cast<CViewTextMenu*>(pMenu->getView("lockunlock"));
|
||||||
|
|
||||||
|
if (pCS->getLockedByOwner())
|
||||||
|
{
|
||||||
|
pLockUnlock->setHardText("uimUnlockItem");
|
||||||
|
// Cannot destroy if locked by owner
|
||||||
|
if (pDestroy) pDestroy->setActive(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pLockUnlock->setHardText("uimLockItem");
|
||||||
|
if (pDestroy) pDestroy->setActive(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
REGISTER_ACTION_HANDLER( CHandlerItemMenuBaseCheck, "item_menu_base_check" );
|
||||||
|
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
static void sendMsgUseItem(uint16 slot)
|
static void sendMsgUseItem(uint16 slot)
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include "group_editbox.h"
|
#include "group_editbox.h"
|
||||||
#include "dbview_bar.h"
|
#include "dbview_bar.h"
|
||||||
#include "skill_manager.h"
|
#include "skill_manager.h"
|
||||||
|
#include "game_share/bot_chat_types.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
|
@ -69,7 +69,9 @@ const std::string FaberPhraseItemResultGroup= FaberPhraseWindow + ":header_opene
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
CActionPhraseFaber::CActionPhraseFaber()
|
CActionPhraseFaber::CActionPhraseFaber()
|
||||||
{
|
{
|
||||||
_InventoryMirror.resize(INVENTORIES::NUM_INVENTORY * MAX_PLAYER_INV_ENTRIES);
|
uint size = MAX_PLAYER_INV_ENTRIES + (MAX_ANIMALINV_ENTRIES * MAX_INVENTORY_ANIMAL) +
|
||||||
|
MAX_GUILDINV_ENTRIES + MAX_ROOMINV_ENTRIES;
|
||||||
|
_InventoryMirror.resize(size);
|
||||||
_InventoryObsSetup= false;
|
_InventoryObsSetup= false;
|
||||||
_ExecuteFromItemPlanBrick= NULL;
|
_ExecuteFromItemPlanBrick= NULL;
|
||||||
}
|
}
|
||||||
|
@ -275,25 +277,64 @@ void CActionPhraseFaber::fillFaberPlanSelection(const std::string &brickDB, ui
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
CItemImage *CActionPhraseFaber::getInvMirrorItemImage(uint slotIndex)
|
CItemImage *CActionPhraseFaber::getInvMirrorItemImage(uint slotIndex, uint& invId, uint& indexInInv)
|
||||||
{
|
{
|
||||||
uint invId= slotIndex/MAX_PLAYER_INV_ENTRIES;
|
if (slotIndex < MAX_PLAYER_INV_ENTRIES)
|
||||||
uint indexInInv= slotIndex%MAX_PLAYER_INV_ENTRIES;
|
{
|
||||||
|
invId = INVENTORIES::bag;
|
||||||
|
indexInInv = slotIndex;
|
||||||
|
return &getInventory().getBagItem(slotIndex);
|
||||||
|
}
|
||||||
|
slotIndex -= MAX_PLAYER_INV_ENTRIES;
|
||||||
|
|
||||||
// get the item image from bag, steed, pack animal...
|
if (slotIndex < (MAX_ANIMALINV_ENTRIES * MAX_INVENTORY_ANIMAL))
|
||||||
if(invId==INVENTORIES::bag && indexInInv<MAX_BAGINV_ENTRIES)
|
{
|
||||||
return &getInventory().getBagItem(indexInInv);
|
uint animal = slotIndex / MAX_ANIMALINV_ENTRIES;
|
||||||
else if(invId>=INVENTORIES::pet_animal && invId<INVENTORIES::pet_animal+MAX_INVENTORY_ANIMAL && indexInInv<MAX_ANIMALINV_ENTRIES)
|
uint index = slotIndex % MAX_ANIMALINV_ENTRIES;
|
||||||
return &getInventory().getPAItem(invId-INVENTORIES::pet_animal, indexInInv);
|
invId = INVENTORIES::pet_animal + animal;
|
||||||
|
indexInInv = index;
|
||||||
|
return &getInventory().getPAItem(animal, index);
|
||||||
|
}
|
||||||
|
slotIndex -= (MAX_ANIMALINV_ENTRIES * MAX_INVENTORY_ANIMAL);
|
||||||
|
|
||||||
|
if (slotIndex < MAX_GUILDINV_ENTRIES)
|
||||||
|
{
|
||||||
|
if (getInventory().isInventoryAvailable(INVENTORIES::guild))
|
||||||
|
{
|
||||||
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
|
CCDBNodeBranch *itemBranch = im->getDbBranch(SERVER_INVENTORY ":GUILD:" + toString(slotIndex));
|
||||||
|
static CItemImage image;
|
||||||
|
image.build(itemBranch);
|
||||||
|
invId = INVENTORIES::guild;
|
||||||
|
indexInInv = slotIndex;
|
||||||
|
return ℑ
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
slotIndex -= MAX_GUILDINV_ENTRIES;
|
||||||
|
|
||||||
|
if (slotIndex < MAX_ROOMINV_ENTRIES)
|
||||||
|
{
|
||||||
|
if (getInventory().isInventoryAvailable(INVENTORIES::player_room))
|
||||||
|
{
|
||||||
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
|
CCDBNodeBranch *itemBranch = im->getDbBranch(SERVER_INVENTORY ":ROOM:" + toString(slotIndex));
|
||||||
|
static CItemImage image;
|
||||||
|
image.build(itemBranch);
|
||||||
|
invId = INVENTORIES::player_room;
|
||||||
|
indexInInv = slotIndex;
|
||||||
|
return ℑ
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
bool CActionPhraseFaber::isMpAvailable(CItemSheet *mpSheet, uint slotIndex) const
|
bool CActionPhraseFaber::isMpAvailable(CItemSheet *mpSheet, uint invId, uint slotIndex) const
|
||||||
{
|
{
|
||||||
uint invId= slotIndex / MAX_PLAYER_INV_ENTRIES;
|
|
||||||
return mpSheet && mpSheet->Family==ITEMFAMILY::RAW_MATERIAL && getInventory().isInventoryAvailable((INVENTORIES::TInventory)invId);
|
return mpSheet && mpSheet->Family==ITEMFAMILY::RAW_MATERIAL && getInventory().isInventoryAvailable((INVENTORIES::TInventory)invId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -396,14 +437,14 @@ void CActionPhraseFaber::validateFaberPlanSelection(CSBrickSheet *itemPlanBrick
|
||||||
_InventoryMirror[i].reset();
|
_InventoryMirror[i].reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint invId = 0;
|
||||||
|
uint indexInInv = 0;
|
||||||
// Run all the inventories.
|
// Run all the inventories.
|
||||||
for(i=0;i<_InventoryMirror.size();i++)
|
for(i=0;i<_InventoryMirror.size();i++)
|
||||||
{
|
{
|
||||||
uint invId= i/MAX_PLAYER_INV_ENTRIES;
|
CItemImage *itemImage= getInvMirrorItemImage(i, invId, indexInInv);
|
||||||
uint indexInInv= i%MAX_PLAYER_INV_ENTRIES;
|
bool bLockedByOwner = itemImage && itemImage->getLockedByOwner();
|
||||||
CItemImage *itemImage= getInvMirrorItemImage(i);
|
// item found and not locked?
|
||||||
|
|
||||||
// item found?
|
|
||||||
if(itemImage)
|
if(itemImage)
|
||||||
{
|
{
|
||||||
// setup the origin
|
// setup the origin
|
||||||
|
@ -413,7 +454,7 @@ void CActionPhraseFaber::validateFaberPlanSelection(CSBrickSheet *itemPlanBrick
|
||||||
// The item must be a mp
|
// The item must be a mp
|
||||||
CSheetId sheetId= CSheetId(itemImage->getSheetID());
|
CSheetId sheetId= CSheetId(itemImage->getSheetID());
|
||||||
CItemSheet *mpSheet= dynamic_cast<CItemSheet*>(SheetMngr.get(sheetId));
|
CItemSheet *mpSheet= dynamic_cast<CItemSheet*>(SheetMngr.get(sheetId));
|
||||||
if( isMpAvailable(mpSheet, i) )
|
if( isMpAvailable(mpSheet, invId, i) && !bLockedByOwner)
|
||||||
{
|
{
|
||||||
_InventoryMirror[i].Sheet= sheetId;
|
_InventoryMirror[i].Sheet= sheetId;
|
||||||
_InventoryMirror[i].Quality= itemImage->getQuality();
|
_InventoryMirror[i].Quality= itemImage->getQuality();
|
||||||
|
@ -422,6 +463,7 @@ void CActionPhraseFaber::validateFaberPlanSelection(CSBrickSheet *itemPlanBrick
|
||||||
_InventoryMirror[i].Weight= itemImage->getWeight();
|
_InventoryMirror[i].Weight= itemImage->getWeight();
|
||||||
// Bkup original quantity from inventory
|
// Bkup original quantity from inventory
|
||||||
_InventoryMirror[i].OriginalQuantity= _InventoryMirror[i].Quantity;
|
_InventoryMirror[i].OriginalQuantity= _InventoryMirror[i].Quantity;
|
||||||
|
_InventoryMirror[i].LockedByOwner= bLockedByOwner;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1311,17 +1353,22 @@ void CActionPhraseFaber::onInventoryChange()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Run all the Bag
|
// Run all the Bag
|
||||||
|
uint invId = 0;
|
||||||
|
uint indexInInv = 0;
|
||||||
for(i=0;i<_InventoryMirror.size();i++)
|
for(i=0;i<_InventoryMirror.size();i++)
|
||||||
{
|
{
|
||||||
CItemImage *itemImage= getInvMirrorItemImage(i);
|
CItemImage *itemImage= getInvMirrorItemImage(i, invId, indexInInv);
|
||||||
|
|
||||||
if(itemImage)
|
if(itemImage)
|
||||||
{
|
{
|
||||||
CSheetId sheetId= CSheetId(itemImage->getSheetID());
|
CSheetId sheetId= CSheetId(itemImage->getSheetID());
|
||||||
CItemSheet *mpSheet= dynamic_cast<CItemSheet*>(SheetMngr.get(sheetId));
|
CItemSheet *mpSheet= dynamic_cast<CItemSheet*>(SheetMngr.get(sheetId));
|
||||||
CItem newInvItem;
|
CItem newInvItem;
|
||||||
|
|
||||||
// The item must be a mp, and the item must be available
|
bool bLockedByOwner = itemImage->getLockedByOwner();
|
||||||
if( isMpAvailable(mpSheet, i) )
|
|
||||||
|
// The item must be a mp, and the item must be available and unlocked
|
||||||
|
if( isMpAvailable(mpSheet, invId, i) && !bLockedByOwner)
|
||||||
{
|
{
|
||||||
newInvItem.Sheet= sheetId;
|
newInvItem.Sheet= sheetId;
|
||||||
newInvItem.Quality= itemImage->getQuality();
|
newInvItem.Quality= itemImage->getQuality();
|
||||||
|
@ -1329,12 +1376,13 @@ void CActionPhraseFaber::onInventoryChange()
|
||||||
newInvItem.UserColor= itemImage->getUserColor();
|
newInvItem.UserColor= itemImage->getUserColor();
|
||||||
newInvItem.Weight= itemImage->getWeight();
|
newInvItem.Weight= itemImage->getWeight();
|
||||||
newInvItem.OriginalQuantity= newInvItem.Quantity;
|
newInvItem.OriginalQuantity= newInvItem.Quantity;
|
||||||
|
newInvItem.LockedByOwner = bLockedByOwner;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* There is 4 cases:
|
/* There is 5 cases:
|
||||||
- no changes => no op.
|
- no changes => no op.
|
||||||
- new Mp on a empty or non Mp slot. Easy, just add.
|
- new/unlocked Mp on a empty or non Mp slot. Easy, just add.
|
||||||
- old Mp removed (not same sheetId/quality/userColor)
|
- old Mp removed (not same sheetId/quality/userColor/locked)
|
||||||
- old Mp with quantity changed to be greater
|
- old Mp with quantity changed to be greater
|
||||||
- old Mp with quantity changed to be smaller
|
- old Mp with quantity changed to be smaller
|
||||||
*/
|
*/
|
||||||
|
@ -1348,8 +1396,8 @@ void CActionPhraseFaber::onInventoryChange()
|
||||||
// If the item was not a mp
|
// If the item was not a mp
|
||||||
if(_InventoryMirror[i].Sheet==CSheetId::Unknown)
|
if(_InventoryMirror[i].Sheet==CSheetId::Unknown)
|
||||||
{
|
{
|
||||||
// if now it is, easy, just add
|
// if now it is, easy, just add if not locked
|
||||||
if(newInvItem.Sheet!=CSheetId::Unknown)
|
if(newInvItem.Sheet!=CSheetId::Unknown && !newInvItem.LockedByOwner)
|
||||||
curInvItem= newInvItem;
|
curInvItem= newInvItem;
|
||||||
}
|
}
|
||||||
// else must test change or remove
|
// else must test change or remove
|
||||||
|
@ -1358,7 +1406,8 @@ void CActionPhraseFaber::onInventoryChange()
|
||||||
bool sameMp;
|
bool sameMp;
|
||||||
sameMp= curInvItem.Sheet == newInvItem.Sheet &&
|
sameMp= curInvItem.Sheet == newInvItem.Sheet &&
|
||||||
curInvItem.Quality == newInvItem.Quality &&
|
curInvItem.Quality == newInvItem.Quality &&
|
||||||
curInvItem.UserColor == newInvItem.UserColor ;
|
curInvItem.UserColor == newInvItem.UserColor &&
|
||||||
|
curInvItem.LockedByOwner == newInvItem.LockedByOwner;
|
||||||
|
|
||||||
// if the Mp was deleted from this slot, delete it from all faber execution
|
// if the Mp was deleted from this slot, delete it from all faber execution
|
||||||
if(!sameMp)
|
if(!sameMp)
|
||||||
|
|
|
@ -92,6 +92,7 @@ private:
|
||||||
uint Selected;
|
uint Selected;
|
||||||
// This is the original quantity in inventory
|
// This is the original quantity in inventory
|
||||||
sint32 OriginalQuantity;
|
sint32 OriginalQuantity;
|
||||||
|
bool LockedByOwner;
|
||||||
|
|
||||||
CItem() : Sheet(0)
|
CItem() : Sheet(0)
|
||||||
{
|
{
|
||||||
|
@ -233,8 +234,8 @@ private:
|
||||||
void removeMpSlotThatUseInvSlot(uint invSlot, uint quantityToRemove);
|
void removeMpSlotThatUseInvSlot(uint invSlot, uint quantityToRemove);
|
||||||
|
|
||||||
// from an index in _InventoryMirror, get the ItemImage
|
// from an index in _InventoryMirror, get the ItemImage
|
||||||
CItemImage *getInvMirrorItemImage(uint slotIndex);
|
CItemImage *getInvMirrorItemImage(uint slotIndex, uint& invId, uint& indexInInv);
|
||||||
bool isMpAvailable(CItemSheet *mpSheet, uint slotIndex) const;
|
bool isMpAvailable(CItemSheet *mpSheet, uint invId, uint slotIndex) const;
|
||||||
|
|
||||||
void updateItemResult();
|
void updateItemResult();
|
||||||
};
|
};
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
#include "../sheet_manager.h"
|
#include "../sheet_manager.h"
|
||||||
#include "../user_entity.h"
|
#include "../user_entity.h"
|
||||||
#include "view_bitmap.h"
|
#include "view_bitmap.h"
|
||||||
|
#include "nel/misc/common.h"
|
||||||
|
|
||||||
using namespace std::rel_ops;
|
using namespace std::rel_ops;
|
||||||
|
|
||||||
|
@ -996,7 +997,7 @@ void CBotChatPageTrade::startSellDialog(CDBCtrlSheet *sheet, CCtrlBase * /* pCal
|
||||||
CCtrlTextButton *confirmButton = dynamic_cast<CCtrlTextButton*>(ig->getCtrl("ok"));
|
CCtrlTextButton *confirmButton = dynamic_cast<CCtrlTextButton*>(ig->getCtrl("ok"));
|
||||||
if (confirmButton)
|
if (confirmButton)
|
||||||
{
|
{
|
||||||
confirmButton->setActive( true );
|
confirmButton->setActive( sheet->getLockedByOwner() );
|
||||||
confirmButton->setText(CI18N::get("uiSellImmediately"));
|
confirmButton->setText(CI18N::get("uiSellImmediately"));
|
||||||
confirmButton->setDefaultContextHelp(CI18N::get("uittDirectSellButton"));
|
confirmButton->setDefaultContextHelp(CI18N::get("uittDirectSellButton"));
|
||||||
}
|
}
|
||||||
|
@ -1538,10 +1539,12 @@ void CBotChatPageTrade::setupResellGroup(bool sellMode, uint defaultQuantity, CI
|
||||||
CViewText *vt= dynamic_cast<CViewText*>(cantResellGroup->getView("reason"));
|
CViewText *vt= dynamic_cast<CViewText*>(cantResellGroup->getView("reason"));
|
||||||
if(vt)
|
if(vt)
|
||||||
{
|
{
|
||||||
if(resaleFlag==BOTCHATTYPE::ResaleKOBroken)
|
if(resaleFlag == BOTCHATTYPE::ResaleKOBroken)
|
||||||
vt->setHardText("uiCantResaleCauseDamaged");
|
vt->setHardText("uiCantResaleCauseDamaged");
|
||||||
else
|
else if (resaleFlag == BOTCHATTYPE::ResaleKONoTimeLeft)
|
||||||
vt->setHardText("uiCantResaleCauseTooLate");
|
vt->setHardText("uiCantResaleCauseTooLate");
|
||||||
|
else
|
||||||
|
vt->setHardText("uiCantResaleLockedByOwner");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// else setup "can_resell:choose_resell group"
|
// else setup "can_resell:choose_resell group"
|
||||||
|
@ -2575,9 +2578,9 @@ static DECLARE_INTERFACE_USER_FCT(getPriceWithFame)
|
||||||
if(value==-1)
|
if(value==-1)
|
||||||
result.setUCString(CI18N::get("uiBadPrice"));
|
result.setUCString(CI18N::get("uiBadPrice"));
|
||||||
else if(value==valueFame)
|
else if(value==valueFame)
|
||||||
result.setUCString(toString(value));
|
result.setUCString(NLMISC::formatThousands(toString(value)));
|
||||||
else
|
else
|
||||||
result.setUCString(toString("%d (%d)", valueFame, value));
|
result.setUCString(NLMISC::formatThousands(toString(valueFame)) + " (" + NLMISC::formatThousands(toString(value)) + ")");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2592,8 +2595,8 @@ static DECLARE_INTERFACE_USER_FCT(getBonusOnResale)
|
||||||
|
|
||||||
sint valueHigh= (sint)args[0].getInteger();
|
sint valueHigh= (sint)args[0].getInteger();
|
||||||
sint valueLow= (sint)args[1].getInteger();
|
sint valueLow= (sint)args[1].getInteger();
|
||||||
sint diff = valueHigh - valueLow;
|
sint diff = valueHigh - valueLow;
|
||||||
result.setUCString(toString("+%d", diff));
|
result.setUCString("+" + NLMISC::formatThousands(toString(diff)));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -378,7 +378,7 @@ void CChatTargetFilter::setTargetGroup(CChatGroup::TGroupType groupType, uint32
|
||||||
const bool guildActive = pIM->getDbProp("SERVER:GUILD:NAME")->getValueBool();
|
const bool guildActive = pIM->getDbProp("SERVER:GUILD:NAME")->getValueBool();
|
||||||
switch(groupType)
|
switch(groupType)
|
||||||
{
|
{
|
||||||
case CChatGroup::dyn_chat: entry+="DYN"; break;
|
case CChatGroup::dyn_chat: entry+="DYN:" + NLMISC::toString(dynamicChannelDbIndex); break;
|
||||||
case CChatGroup::say: entry+="SAY"; break;
|
case CChatGroup::say: entry+="SAY"; break;
|
||||||
case CChatGroup::shout: entry+="SHOUT"; break;
|
case CChatGroup::shout: entry+="SHOUT"; break;
|
||||||
case CChatGroup::team: if(!teamActive) return; entry+="GROUP"; break;
|
case CChatGroup::team: if(!teamActive) return; entry+="GROUP"; break;
|
||||||
|
|
|
@ -148,18 +148,43 @@ CViewBase *CChatTextManager::createMsgText(const ucstring &cstMsg, NLMISC::CRGBA
|
||||||
vt->setMultiLineSpace(getTextMultiLineSpace());
|
vt->setMultiLineSpace(getTextMultiLineSpace());
|
||||||
vt->setModulateGlobalColor(false);
|
vt->setModulateGlobalColor(false);
|
||||||
|
|
||||||
|
ucstring cur_time;
|
||||||
|
static CCDBNodeLeaf* node = CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false);
|
||||||
|
if (node)
|
||||||
|
{
|
||||||
|
if (node->getValueBool())
|
||||||
|
{
|
||||||
|
cur_time = CInterfaceManager::getTimestampHuman();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// if text contain any color code, set the text formated and white,
|
// if text contain any color code, set the text formated and white,
|
||||||
// otherwise, set text normal and apply global color
|
// otherwise, set text normal and apply global color
|
||||||
if (msg.find(ucstring("@{")) != ucstring::npos)
|
size_t codePos = msg.find(ucstring("@{"));
|
||||||
|
if (codePos != ucstring::npos)
|
||||||
{
|
{
|
||||||
|
// Prepend the current time (do it after the color if the color at first position.
|
||||||
|
if (codePos == 0)
|
||||||
|
{
|
||||||
|
codePos = msg.find(ucstring("}"));
|
||||||
|
msg = msg.substr(0, codePos + 1) + cur_time + msg.substr(codePos + 1, msg.length() - codePos);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
msg = cur_time + msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
vt->setTextFormatTaged(msg);
|
vt->setTextFormatTaged(msg);
|
||||||
vt->setColor(NLMISC::CRGBA::White);
|
vt->setColor(NLMISC::CRGBA::White);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
msg = cur_time + msg;
|
||||||
vt->setText(msg);
|
vt->setText(msg);
|
||||||
vt->setColor(col);
|
vt->setColor(col);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!commandGroup)
|
if (!commandGroup)
|
||||||
{
|
{
|
||||||
return vt;
|
return vt;
|
||||||
|
|
|
@ -472,15 +472,9 @@ void CChatWindow::displayLocalPlayerTell(const ucstring &receiver, const ucstrin
|
||||||
CInterfaceProperty prop;
|
CInterfaceProperty prop;
|
||||||
prop.readRGBA("UI:SAVE:CHAT:COLORS:SPEAKER"," ");
|
prop.readRGBA("UI:SAVE:CHAT:COLORS:SPEAKER"," ");
|
||||||
encodeColorTag(prop.getRGBA(), finalMsg, false);
|
encodeColorTag(prop.getRGBA(), finalMsg, false);
|
||||||
ucstring cur_time;
|
|
||||||
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false);
|
ucstring csr(CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw()) ? "(CSR) " : "");
|
||||||
if (pNL && pNL->getValueBool())
|
finalMsg += csr + CI18N::get("youTell") + ": ";
|
||||||
{
|
|
||||||
cur_time = CInterfaceManager::getTimestampHuman();
|
|
||||||
}
|
|
||||||
ucstring csr;
|
|
||||||
if (CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw())) csr += ucstring("(CSR) ");
|
|
||||||
finalMsg += cur_time + csr + CI18N::get("youTell") + ": ";
|
|
||||||
prop.readRGBA("UI:SAVE:CHAT:COLORS:TELL"," ");
|
prop.readRGBA("UI:SAVE:CHAT:COLORS:TELL"," ");
|
||||||
encodeColorTag(prop.getRGBA(), finalMsg, true);
|
encodeColorTag(prop.getRGBA(), finalMsg, true);
|
||||||
finalMsg += msg;
|
finalMsg += msg;
|
||||||
|
@ -1294,8 +1288,18 @@ public:
|
||||||
CChatWindow::_ChatWindowLaunchingCommand = chat;
|
CChatWindow::_ChatWindowLaunchingCommand = chat;
|
||||||
string str = text.toUtf8();
|
string str = text.toUtf8();
|
||||||
string cmdWithArgs = str.substr(1);
|
string cmdWithArgs = str.substr(1);
|
||||||
/* In the chat context, only ' ' is a possible separator */
|
|
||||||
|
// Get the command name from the string, can contain spaces
|
||||||
string cmd = cmdWithArgs.substr(0, cmdWithArgs.find(' '));
|
string cmd = cmdWithArgs.substr(0, cmdWithArgs.find(' '));
|
||||||
|
if (cmdWithArgs.find('"') == 0)
|
||||||
|
{
|
||||||
|
string::size_type pos = cmdWithArgs.find('"', 1);
|
||||||
|
if (string::npos != pos)
|
||||||
|
{
|
||||||
|
cmd = cmdWithArgs.substr(1, pos - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( NLMISC::ICommand::exists( cmd ) )
|
if ( NLMISC::ICommand::exists( cmd ) )
|
||||||
{
|
{
|
||||||
NLMISC::ICommand::execute( cmdWithArgs, g_log );
|
NLMISC::ICommand::execute( cmdWithArgs, g_log );
|
||||||
|
@ -1314,7 +1318,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Clear input string
|
// Clear input string
|
||||||
pEB->setInputString (string(""));
|
pEB->setInputString (ucstring(""));
|
||||||
CGroupContainer *gc = pEB->getEnclosingContainer();
|
CGroupContainer *gc = pEB->getEnclosingContainer();
|
||||||
if (gc)
|
if (gc)
|
||||||
{
|
{
|
||||||
|
|
|
@ -115,6 +115,7 @@ public:
|
||||||
// @{
|
// @{
|
||||||
// Event part
|
// Event part
|
||||||
void setActionOnLeftClick (const std::string &actionHandlerName) { _AHOnLeftClickString = actionHandlerName; _AHOnLeftClick = getAH(actionHandlerName, _AHLeftClickParams); }
|
void setActionOnLeftClick (const std::string &actionHandlerName) { _AHOnLeftClickString = actionHandlerName; _AHOnLeftClick = getAH(actionHandlerName, _AHLeftClickParams); }
|
||||||
|
void setActionOnLeftClickParams(const std::string ¶ms) { _AHOnLeftClickStringParams = params; }
|
||||||
void setActionOnRightClick (const std::string &actionHandlerName) { _AHOnRightClick = getAH(actionHandlerName, _AHRightClickParams); }
|
void setActionOnRightClick (const std::string &actionHandlerName) { _AHOnRightClick = getAH(actionHandlerName, _AHRightClickParams); }
|
||||||
void setActionOnClockTick (const std::string &ahName) { _AHOnClockTick = getAH(ahName, _AHClockTickParams); }
|
void setActionOnClockTick (const std::string &ahName) { _AHOnClockTick = getAH(ahName, _AHClockTickParams); }
|
||||||
void setParamsOnLeftClick (const std::string ¶msHandlerName) { _AHLeftClickParams = paramsHandlerName; }
|
void setParamsOnLeftClick (const std::string ¶msHandlerName) { _AHLeftClickParams = paramsHandlerName; }
|
||||||
|
@ -204,6 +205,7 @@ protected:
|
||||||
IActionHandler *_AHOnOver;
|
IActionHandler *_AHOnOver;
|
||||||
CStringShared _AHOverParams;
|
CStringShared _AHOverParams;
|
||||||
std::string _AHOnLeftClickString;
|
std::string _AHOnLeftClickString;
|
||||||
|
std::string _AHOnLeftClickStringParams;
|
||||||
IActionHandler *_AHOnLeftClick;
|
IActionHandler *_AHOnLeftClick;
|
||||||
CStringShared _AHLeftClickParams;
|
CStringShared _AHLeftClickParams;
|
||||||
IActionHandler *_AHOnLeftDblClick;
|
IActionHandler *_AHOnLeftDblClick;
|
||||||
|
|
|
@ -338,7 +338,14 @@ bool CCtrlButton::getMouseOverShape(string &texName, uint8 &rot, CRGBA &col)
|
||||||
{
|
{
|
||||||
if (_AHOnLeftClickString == "browse")
|
if (_AHOnLeftClickString == "browse")
|
||||||
{
|
{
|
||||||
texName = "curs_pick.tga";
|
if (!_AHOnLeftClickStringParams.empty())
|
||||||
|
{
|
||||||
|
texName = "@curs_pick.tga@"+_AHOnLeftClickStringParams;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
texName = "curs_pick.tga";
|
||||||
|
}
|
||||||
rot= 0;
|
rot= 0;
|
||||||
col = CRGBA::White;
|
col = CRGBA::White;
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
#include "../client_sheets/sphrase_sheet.h"
|
#include "../client_sheets/sphrase_sheet.h"
|
||||||
#include "game_share/xml_auto_ptr.h"
|
#include "game_share/xml_auto_ptr.h"
|
||||||
#include "lua_ihm.h"
|
#include "lua_ihm.h"
|
||||||
|
#include "game_share/bot_chat_types.h"
|
||||||
|
|
||||||
#include "../r2/editor.h"
|
#include "../r2/editor.h"
|
||||||
|
|
||||||
|
@ -123,6 +124,14 @@ ucstring CControlSheetTooltipInfoWaiter::infoValidated(CDBCtrlSheet* ctrlSheet,
|
||||||
|
|
||||||
return help;
|
return help;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CDBCtrlSheet::luaGetDraggedSheet(CLuaState &ls)
|
||||||
|
{
|
||||||
|
CLuaIHM::pushUIOnStack(ls, dynamic_cast<CInterfaceElement *>(_LastDraggedSheet));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
int CDBCtrlSheet::luaGetHpBuff(CLuaState &ls)
|
int CDBCtrlSheet::luaGetHpBuff(CLuaState &ls)
|
||||||
{
|
{
|
||||||
|
@ -179,6 +188,62 @@ int CDBCtrlSheet::luaGetName(CLuaState &ls)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// **********************************************************************************************************
|
||||||
|
class LuaInfoWaiter : public IItemInfoWaiter
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
volatile bool done;
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual void infoReceived();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void LuaInfoWaiter::infoReceived()
|
||||||
|
{
|
||||||
|
getInventory().removeItemInfoWaiter(this);
|
||||||
|
this->done = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static LuaInfoWaiter luaInfoWaiter;
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CDBCtrlSheet::luaGetCreatorName(CLuaState &ls)
|
||||||
|
{
|
||||||
|
uint32 itemSlotId = getInventory().getItemSlotId(this);
|
||||||
|
CClientItemInfo itemInfo = getInventory().getItemInfo(itemSlotId);
|
||||||
|
ucstring creatorName;
|
||||||
|
STRING_MANAGER::CStringManagerClient::instance()->getString(itemInfo.CreatorName, creatorName);
|
||||||
|
CLuaIHM::push(ls, creatorName);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
int CDBCtrlSheet::luaWaitInfo(CLuaState &ls)
|
||||||
|
{
|
||||||
|
static bool sent = false;
|
||||||
|
CDBCtrlSheet *ctrlSheet = const_cast<CDBCtrlSheet*>(this);
|
||||||
|
uint32 itemSlotId= getInventory().getItemSlotId(ctrlSheet);
|
||||||
|
CClientItemInfo itemInfo = getInventory().getItemInfo(itemSlotId);
|
||||||
|
|
||||||
|
if (sent || itemInfo.versionInfo != 0)
|
||||||
|
{
|
||||||
|
ls.push((bool)(luaInfoWaiter.done));
|
||||||
|
if (luaInfoWaiter.done)
|
||||||
|
sent = false;
|
||||||
|
return luaInfoWaiter.done ? 1 : 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
luaInfoWaiter.ItemSlotId = itemSlotId;
|
||||||
|
luaInfoWaiter.ItemSheet = this->getSheetId();
|
||||||
|
luaInfoWaiter.done = false;
|
||||||
|
getInventory().addItemInfoWaiter(&luaInfoWaiter);
|
||||||
|
sent = true;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
int CDBCtrlSheet::luaBuildCrystallizedSpellListBrick(CLuaState &ls)
|
int CDBCtrlSheet::luaBuildCrystallizedSpellListBrick(CLuaState &ls)
|
||||||
|
@ -1797,8 +1862,16 @@ void CDBCtrlSheet::draw()
|
||||||
string params = string("src=") + pCSSrc->getId();
|
string params = string("src=") + pCSSrc->getId();
|
||||||
if (!_AHCanDropParams.empty())
|
if (!_AHCanDropParams.empty())
|
||||||
{
|
{
|
||||||
string sTmp = _AHCanDropParams;
|
if (getAHName(_AHOnCanDrop) == "lua")
|
||||||
params = sTmp + "|" + params;
|
{
|
||||||
|
params = _AHCanDropParams;
|
||||||
|
strFindReplace(params, "%src", pCSSrc->getId());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string sTmp = _AHCanDropParams;
|
||||||
|
params = sTmp + "|" + params;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pIM->runActionHandler (_AHOnCanDrop, this, params);
|
pIM->runActionHandler (_AHOnCanDrop, this, params);
|
||||||
}
|
}
|
||||||
|
@ -2138,6 +2211,12 @@ void CDBCtrlSheet::drawSheet (sint32 x, sint32 y, bool draging, bool showSelecti
|
||||||
|
|
||||||
// if a raw material for example, must add special icon text.
|
// if a raw material for example, must add special icon text.
|
||||||
displayCharBitmaps(_RenderLayer+2, x, y, curSheetColor);
|
displayCharBitmaps(_RenderLayer+2, x, y, curSheetColor);
|
||||||
|
|
||||||
|
// Add the lock overlay if needed
|
||||||
|
if (getLockedByOwner())
|
||||||
|
{
|
||||||
|
rVR.draw11RotFlipBitmap (_RenderLayer+1, x - 2, y + 8, 0, false, rVR.getSystemTextureId(CViewRenderer::ItemLockedByOwnerTexture), curSheetColor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
// Action
|
// Action
|
||||||
|
@ -2600,8 +2679,16 @@ bool CDBCtrlSheet::handleEvent (const CEventDescriptor &event)
|
||||||
string params = string("src=") + _Id;
|
string params = string("src=") + _Id;
|
||||||
if (!pCSdest->_AHCanDropParams.empty())
|
if (!pCSdest->_AHCanDropParams.empty())
|
||||||
{
|
{
|
||||||
string sTmp = pCSdest->_AHCanDropParams;
|
if (getAHName(pCSdest->_AHOnCanDrop) == "lua")
|
||||||
params = sTmp + "|" + params;
|
{
|
||||||
|
params = pCSdest->_AHCanDropParams;
|
||||||
|
strFindReplace(params, "%src", _Id);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string sTmp = pCSdest->_AHCanDropParams;
|
||||||
|
params = sTmp + "|" + params;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pIM->runActionHandler (pCSdest->_AHOnCanDrop, pCSdest, params);
|
pIM->runActionHandler (pCSdest->_AHOnCanDrop, pCSdest, params);
|
||||||
|
|
||||||
|
@ -2612,8 +2699,16 @@ bool CDBCtrlSheet::handleEvent (const CEventDescriptor &event)
|
||||||
string params = string("src=") + _Id;
|
string params = string("src=") + _Id;
|
||||||
if (!pCSdest->_AHDropParams.empty())
|
if (!pCSdest->_AHDropParams.empty())
|
||||||
{
|
{
|
||||||
string sTmp = pCSdest->_AHDropParams;
|
if (getAHName(pCSdest->_AHOnDrop) == "lua")
|
||||||
params = sTmp + "|" + params; // must copy 'drop' params at start because it could be the name of a procedure
|
{
|
||||||
|
params = pCSdest->_AHDropParams;
|
||||||
|
strFindReplace(params, "%src", _Id);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string sTmp = pCSdest->_AHDropParams;
|
||||||
|
params = sTmp + "|" + params;// must copy 'drop' params at start because it could be the name of a procedure
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// call action
|
// call action
|
||||||
pIM->runActionHandler (pCSdest->_AHOnDrop, pCSdest, params);
|
pIM->runActionHandler (pCSdest->_AHOnDrop, pCSdest, params);
|
||||||
|
@ -2649,8 +2744,16 @@ bool CDBCtrlSheet::handleEvent (const CEventDescriptor &event)
|
||||||
string params = string("src=") + _Id;
|
string params = string("src=") + _Id;
|
||||||
if (!pList->getCtrlSheetInfo()._AHCanDropParams.empty())
|
if (!pList->getCtrlSheetInfo()._AHCanDropParams.empty())
|
||||||
{
|
{
|
||||||
string sTmp = pList->getCtrlSheetInfo()._AHCanDropParams;
|
if (getAHName(pList->getCtrlSheetInfo()._AHOnCanDrop) == "lua")
|
||||||
params = sTmp + "|" + params;
|
{
|
||||||
|
params = pList->getCtrlSheetInfo()._AHCanDropParams;
|
||||||
|
strFindReplace(params, "%src", _Id);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string sTmp = pList->getCtrlSheetInfo()._AHCanDropParams;
|
||||||
|
params = sTmp + "|" + params;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pIM->runActionHandler (pList->getCtrlSheetInfo()._AHOnCanDrop, pList, params);
|
pIM->runActionHandler (pList->getCtrlSheetInfo()._AHOnCanDrop, pList, params);
|
||||||
|
|
||||||
|
@ -2661,8 +2764,16 @@ bool CDBCtrlSheet::handleEvent (const CEventDescriptor &event)
|
||||||
string params = string("src=") + _Id;
|
string params = string("src=") + _Id;
|
||||||
if (!pList->getCtrlSheetInfo()._AHDropParams.empty())
|
if (!pList->getCtrlSheetInfo()._AHDropParams.empty())
|
||||||
{
|
{
|
||||||
string sTmp = pList->getCtrlSheetInfo()._AHDropParams;
|
if (getAHName(pList->getCtrlSheetInfo()._AHOnDrop) == "lua")
|
||||||
params = sTmp + "|" + params; // must copy 'drop' params at start because it could be the name of a procedure
|
{
|
||||||
|
params = pList->getCtrlSheetInfo()._AHDropParams;
|
||||||
|
strFindReplace(params, "%src", _Id);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string sTmp = pList->getCtrlSheetInfo()._AHDropParams;
|
||||||
|
params = sTmp + "|" + params; // must copy 'drop' params at start because it could be the name of a procedure
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// call action
|
// call action
|
||||||
pIM->runActionHandler (pList->getCtrlSheetInfo()._AHOnDrop, pList, params);
|
pIM->runActionHandler (pList->getCtrlSheetInfo()._AHOnDrop, pList, params);
|
||||||
|
@ -2975,9 +3086,32 @@ void CDBCtrlSheet::getContextHelp(ucstring &help) const
|
||||||
}
|
}
|
||||||
else if(getType() == CCtrlSheetInfo::SheetType_Item)
|
else if(getType() == CCtrlSheetInfo::SheetType_Item)
|
||||||
{
|
{
|
||||||
const CItemSheet *item = asItemSheet();
|
const CItemSheet *item= asItemSheet();
|
||||||
if (item)
|
if(item)
|
||||||
help = getItemActualName();
|
{
|
||||||
|
if (item->Family == ITEMFAMILY::CRYSTALLIZED_SPELL || item->Family == ITEMFAMILY::JEWELRY || item->Family == ITEMFAMILY::ARMOR)
|
||||||
|
{
|
||||||
|
string luaMethodName = ( (item->Family == ITEMFAMILY::CRYSTALLIZED_SPELL) ? "updateCrystallizedSpellTooltip" : "updateBuffItemTooltip");
|
||||||
|
CDBCtrlSheet *ctrlSheet = const_cast<CDBCtrlSheet*>(this);
|
||||||
|
if ( ! getInventory().isItemInfoUpToDate(getInventory().getItemSlotId(ctrlSheet)))
|
||||||
|
{
|
||||||
|
// Prepare the waiter
|
||||||
|
ControlSheetTooltipUpdater.ItemSheet= ctrlSheet->getSheetId();
|
||||||
|
ControlSheetTooltipUpdater.LuaMethodName = luaMethodName;
|
||||||
|
ControlSheetTooltipUpdater.ItemSlotId= getInventory().getItemSlotId(ctrlSheet);
|
||||||
|
ControlSheetTooltipUpdater.CtrlSheet = ctrlSheet;
|
||||||
|
|
||||||
|
// Add the waiter
|
||||||
|
getInventory().addItemInfoWaiter(&ControlSheetTooltipUpdater);
|
||||||
|
}
|
||||||
|
|
||||||
|
help = ControlSheetTooltipUpdater.infoValidated(ctrlSheet, luaMethodName);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
help= getItemActualName();
|
||||||
|
|
||||||
|
}
|
||||||
else
|
else
|
||||||
help= _ContextHelp;
|
help= _ContextHelp;
|
||||||
}
|
}
|
||||||
|
@ -3936,6 +4070,17 @@ void CDBCtrlSheet::setItemResaleFlag(sint32 rf)
|
||||||
node->setValue32(rf);
|
node->setValue32(rf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
bool CDBCtrlSheet::getLockedByOwner() const
|
||||||
|
{
|
||||||
|
return (getItemResaleFlag() == BOTCHATTYPE::ResaleKOLockedByOwner);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
bool CDBCtrlSheet::canOwnerLock() const
|
||||||
|
{
|
||||||
|
return (NULL != getItemResaleFlagPtr());
|
||||||
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
sint32 CDBCtrlSheet::getItemSellerType() const
|
sint32 CDBCtrlSheet::getItemSellerType() const
|
||||||
|
|
|
@ -194,16 +194,20 @@ public:
|
||||||
void setActionOnLeftClick (const std::string &ActionHandlerName) { _AHOnLeftClick = getAH(ActionHandlerName, _AHLeftClickParams); }
|
void setActionOnLeftClick (const std::string &ActionHandlerName) { _AHOnLeftClick = getAH(ActionHandlerName, _AHLeftClickParams); }
|
||||||
void setActionOnRightClick (const std::string &ActionHandlerName) { _AHOnRightClick = getAH(ActionHandlerName, _AHRightClickParams); }
|
void setActionOnRightClick (const std::string &ActionHandlerName) { _AHOnRightClick = getAH(ActionHandlerName, _AHRightClickParams); }
|
||||||
void setActionOnDrop (const std::string &ActionHandlerName) { _AHOnDrop = getAH(ActionHandlerName, _AHDropParams); }
|
void setActionOnDrop (const std::string &ActionHandlerName) { _AHOnDrop = getAH(ActionHandlerName, _AHDropParams); }
|
||||||
|
void setActionOnCanDrop (const std::string &ActionHandlerName) { _AHOnCanDrop = getAH(ActionHandlerName, _AHCanDropParams); }
|
||||||
void setParamsOnLeftClick (const std::string &ParamsHandlerName) { _AHLeftClickParams = ParamsHandlerName; }
|
void setParamsOnLeftClick (const std::string &ParamsHandlerName) { _AHLeftClickParams = ParamsHandlerName; }
|
||||||
void setParamsOnRightClick (const std::string &ParamsHandlerName) { _AHRightClickParams = ParamsHandlerName; }
|
void setParamsOnRightClick (const std::string &ParamsHandlerName) { _AHRightClickParams = ParamsHandlerName; }
|
||||||
void setParamsOnDrop (const std::string &ParamsHandlerName) { _AHDropParams = ParamsHandlerName; }
|
void setParamsOnDrop (const std::string &ParamsHandlerName) { _AHDropParams = ParamsHandlerName; }
|
||||||
|
void setParamsOnCanDrop (const std::string &ParamsHandlerName) { _AHCanDropParams = ParamsHandlerName; }
|
||||||
|
|
||||||
const std::string &getActionOnLeftClick () const { return getAHName(_AHOnLeftClick); }
|
const std::string &getActionOnLeftClick () const { return getAHName(_AHOnLeftClick); }
|
||||||
const std::string &getActionOnRightClick () const { return getAHName(_AHOnRightClick); }
|
const std::string &getActionOnRightClick () const { return getAHName(_AHOnRightClick); }
|
||||||
const std::string &getActionOnDrop () const { return getAHName(_AHOnDrop); }
|
const std::string &getActionOnDrop () const { return getAHName(_AHOnDrop); }
|
||||||
|
const std::string &getActionOnCanDrop () const { return getAHName(_AHOnCanDrop); }
|
||||||
const std::string &getParamsOnLeftClick () const { return _AHLeftClickParams; }
|
const std::string &getParamsOnLeftClick () const { return _AHLeftClickParams; }
|
||||||
const std::string &getParamsOnRightClick () const { return _AHRightClickParams; }
|
const std::string &getParamsOnRightClick () const { return _AHRightClickParams; }
|
||||||
const std::string &getParamsOnDrop () const { return _AHDropParams; }
|
const std::string &getParamsOnDrop () const { return _AHDropParams; }
|
||||||
|
const std::string &getParamsOnCanDrop () const { return _AHCanDropParams; }
|
||||||
|
|
||||||
void setListMenuLeft (const std::string &cm) { CCtrlSheetInfo::setListMenuLeft(cm); }
|
void setListMenuLeft (const std::string &cm) { CCtrlSheetInfo::setListMenuLeft(cm); }
|
||||||
void setListMenuRight (const std::string &cm) { CCtrlSheetInfo::setListMenuRight(cm); }
|
void setListMenuRight (const std::string &cm) { CCtrlSheetInfo::setListMenuRight(cm); }
|
||||||
|
@ -215,6 +219,7 @@ public:
|
||||||
void setCanDrop (bool cd) { _CanDrop = cd; }
|
void setCanDrop (bool cd) { _CanDrop = cd; }
|
||||||
bool getCanDrop () const { return _CanDrop; }
|
bool getCanDrop () const { return _CanDrop; }
|
||||||
bool isDragable() { return _Dragable; }
|
bool isDragable() { return _Dragable; }
|
||||||
|
void setDragable(bool dragable) { _Dragable = dragable; }
|
||||||
bool isDraging() { return _Draging; }
|
bool isDraging() { return _Draging; }
|
||||||
sint32 getDeltaDragX() {return _DeltaDragX;}
|
sint32 getDeltaDragX() {return _DeltaDragX;}
|
||||||
sint32 getDeltaDragY() {return _DeltaDragY;}
|
sint32 getDeltaDragY() {return _DeltaDragY;}
|
||||||
|
@ -265,19 +270,35 @@ public:
|
||||||
REFLECT_SINT32("back", getGuildBack, setGuildBack);
|
REFLECT_SINT32("back", getGuildBack, setGuildBack);
|
||||||
REFLECT_SINT32("symbol", getGuildSymbol, setGuildSymbol);
|
REFLECT_SINT32("symbol", getGuildSymbol, setGuildSymbol);
|
||||||
REFLECT_BOOL("invert_symbol", getInvertGuildSymbol, setInvertGuildSymbol);
|
REFLECT_BOOL("invert_symbol", getInvertGuildSymbol, setInvertGuildSymbol);
|
||||||
|
REFLECT_BOOL("dragable", isDragable, setDragable);
|
||||||
|
REFLECT_BOOL("can_drop", getCanDrop, setCanDrop);
|
||||||
|
REFLECT_STRING ("left_click", getActionOnLeftClick, setActionOnLeftClick);
|
||||||
|
REFLECT_STRING ("right_click", getActionOnRightClick, setActionOnRightClick);
|
||||||
|
REFLECT_STRING ("left_click_params", getParamsOnLeftClick, setParamsOnLeftClick);
|
||||||
|
REFLECT_STRING ("right_click_params", getParamsOnRightClick, setParamsOnRightClick);
|
||||||
|
REFLECT_STRING ("on_drop", getActionOnDrop, setActionOnDrop);
|
||||||
|
REFLECT_STRING ("on_drop_params", getParamsOnDrop, setParamsOnDrop);
|
||||||
|
REFLECT_STRING ("on_can_drop", getActionOnCanDrop, setActionOnCanDrop);
|
||||||
|
REFLECT_STRING ("on_can_drop_params", getParamsOnCanDrop, setParamsOnCanDrop);
|
||||||
|
REFLECT_LUA_METHOD("getDraggedSheet", luaGetDraggedSheet)
|
||||||
REFLECT_LUA_METHOD("getHpBuff", luaGetHpBuff)
|
REFLECT_LUA_METHOD("getHpBuff", luaGetHpBuff)
|
||||||
REFLECT_LUA_METHOD("getSapBuff", luaGetSapBuff)
|
REFLECT_LUA_METHOD("getSapBuff", luaGetSapBuff)
|
||||||
REFLECT_LUA_METHOD("getFocusBuff", luaGetFocusBuff)
|
REFLECT_LUA_METHOD("getFocusBuff", luaGetFocusBuff)
|
||||||
REFLECT_LUA_METHOD("getStaBuff", luaGetStaBuff)
|
REFLECT_LUA_METHOD("getStaBuff", luaGetStaBuff)
|
||||||
REFLECT_LUA_METHOD("getName", luaGetName)
|
REFLECT_LUA_METHOD("getName", luaGetName)
|
||||||
|
REFLECT_LUA_METHOD("getCreatorName", luaGetCreatorName)
|
||||||
|
REFLECT_LUA_METHOD("waitInfo", luaWaitInfo)
|
||||||
REFLECT_LUA_METHOD("buildCrystallizedSpellListBrick", luaBuildCrystallizedSpellListBrick)
|
REFLECT_LUA_METHOD("buildCrystallizedSpellListBrick", luaBuildCrystallizedSpellListBrick)
|
||||||
REFLECT_EXPORT_END
|
REFLECT_EXPORT_END
|
||||||
|
|
||||||
|
int luaGetDraggedSheet(CLuaState &ls);
|
||||||
int luaGetHpBuff(CLuaState &ls);
|
int luaGetHpBuff(CLuaState &ls);
|
||||||
int luaGetSapBuff(CLuaState &ls);
|
int luaGetSapBuff(CLuaState &ls);
|
||||||
int luaGetFocusBuff(CLuaState &ls);
|
int luaGetFocusBuff(CLuaState &ls);
|
||||||
int luaGetStaBuff(CLuaState &ls);
|
int luaGetStaBuff(CLuaState &ls);
|
||||||
int luaGetName(CLuaState &ls);
|
int luaGetName(CLuaState &ls);
|
||||||
|
int luaGetCreatorName(CLuaState &ls);
|
||||||
|
int luaWaitInfo(CLuaState &ls);
|
||||||
int luaBuildCrystallizedSpellListBrick(CLuaState &ls);
|
int luaBuildCrystallizedSpellListBrick(CLuaState &ls);
|
||||||
|
|
||||||
// hardcode creation. User must setup other CtrlBase value (parent etc...)
|
// hardcode creation. User must setup other CtrlBase value (parent etc...)
|
||||||
|
@ -355,9 +376,9 @@ public:
|
||||||
/// Special ContextHelp for ctrl sheet.
|
/// Special ContextHelp for ctrl sheet.
|
||||||
virtual void getContextHelp(ucstring &help) const;
|
virtual void getContextHelp(ucstring &help) const;
|
||||||
|
|
||||||
/// Special ContextHelp for ctrl sheet.
|
|
||||||
virtual void getContextHelpToolTip(ucstring &help) const;
|
virtual void getContextHelpToolTip(ucstring &help) const;
|
||||||
|
|
||||||
|
|
||||||
/** true if an item of another ctrlSheet can be dropped on this slot.
|
/** true if an item of another ctrlSheet can be dropped on this slot.
|
||||||
* also return true if src is 0, or if _ItemSlot==UNDEFINED
|
* also return true if src is 0, or if _ItemSlot==UNDEFINED
|
||||||
*/
|
*/
|
||||||
|
@ -494,6 +515,12 @@ public:
|
||||||
// set item RESALE_FLAG
|
// set item RESALE_FLAG
|
||||||
void setItemResaleFlag(sint32 rf);
|
void setItemResaleFlag(sint32 rf);
|
||||||
|
|
||||||
|
// get item locked by owner
|
||||||
|
bool getLockedByOwner() const;
|
||||||
|
|
||||||
|
// true if the inventory supports owner locking
|
||||||
|
bool canOwnerLock() const;
|
||||||
|
|
||||||
// get item SELLER_TYPE. 0 if no DB
|
// get item SELLER_TYPE. 0 if no DB
|
||||||
sint32 getItemSellerType() const;
|
sint32 getItemSellerType() const;
|
||||||
CCDBNodeLeaf *getItemSellerTypePtr() const;
|
CCDBNodeLeaf *getItemSellerTypePtr() const;
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include "game_share/pvp_clan.h"
|
#include "game_share/pvp_clan.h"
|
||||||
#include "../string_manager_client.h"
|
#include "../string_manager_client.h"
|
||||||
#include "../entity_cl.h"
|
#include "../entity_cl.h"
|
||||||
|
#include "nel/misc/common.h"
|
||||||
|
|
||||||
|
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
|
@ -264,7 +265,7 @@ void CDBGroupListSheetTrade::CSheetChildTrade::updateViewText(CDBGroupListSheetT
|
||||||
{
|
{
|
||||||
STRING_MANAGER::CStringManagerClient *pSMC = STRING_MANAGER::CStringManagerClient::instance();
|
STRING_MANAGER::CStringManagerClient *pSMC = STRING_MANAGER::CStringManagerClient::instance();
|
||||||
text += string("\n") + pSMC->getOutpostBuildingLocalizedDescription(CSheetId(Ctrl->getSheetId()));
|
text += string("\n") + pSMC->getOutpostBuildingLocalizedDescription(CSheetId(Ctrl->getSheetId()));
|
||||||
text += "\n" + CI18N::get("uiBotChatPrice") + toString(pOBS->CostDapper);
|
text += "\n" + CI18N::get("uiBotChatPrice") + NLMISC::formatThousands(toString(pOBS->CostDapper));
|
||||||
text += CI18N::get("uiBotChatTime") + toString(pOBS->CostTime/60) + CI18N::get("uiBotChatTimeMinute");
|
text += CI18N::get("uiBotChatTime") + toString(pOBS->CostTime/60) + CI18N::get("uiBotChatTimeMinute");
|
||||||
if ((pOBS->CostTime % 60) != 0)
|
if ((pOBS->CostTime % 60) != 0)
|
||||||
text += toString(pOBS->CostTime%60) + CI18N::get("uiBotChatTimeSecond");
|
text += toString(pOBS->CostTime%60) + CI18N::get("uiBotChatTimeSecond");
|
||||||
|
@ -341,7 +342,7 @@ void CDBGroupListSheetTrade::CSheetChildTrade::updateViewText(CDBGroupListSheetT
|
||||||
if (pIS && pIS->Family == ITEMFAMILY::GUILD_OPTION)
|
if (pIS && pIS->Family == ITEMFAMILY::GUILD_OPTION)
|
||||||
{
|
{
|
||||||
text+= "\n" + CI18N::get("uiBotChatSkillPointCost") + toString(pIS->GuildOption.XPCost);
|
text+= "\n" + CI18N::get("uiBotChatSkillPointCost") + toString(pIS->GuildOption.XPCost);
|
||||||
text+= "\n" + CI18N::get("uiBotChatPrice") + toString(pIS->GuildOption.MoneyCost);
|
text+= "\n" + CI18N::get("uiBotChatPrice") + NLMISC::formatThousands(toString(pIS->GuildOption.MoneyCost));
|
||||||
guildOption= true;
|
guildOption= true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -376,10 +377,10 @@ void CDBGroupListSheetTrade::CSheetChildTrade::updateViewText(CDBGroupListSheetT
|
||||||
if (LastPrice > 0)
|
if (LastPrice > 0)
|
||||||
{
|
{
|
||||||
if(displayMulPrice)
|
if(displayMulPrice)
|
||||||
text+= "\n" + CI18N::get("uiBotChatPrice") + toString(sint32(LastPrice * priceFactor)) + " ("
|
text+= "\n" + CI18N::get("uiBotChatPrice") + NLMISC::formatThousands(toString(sint32(LastPrice * priceFactor))) + " ("
|
||||||
+ toString( sint32(factor) * sint32(LastPrice * priceFactor) ) + ")";
|
+ NLMISC::formatThousands(toString( sint32(factor) * sint32(LastPrice * priceFactor) )) + ")";
|
||||||
else
|
else
|
||||||
text+= "\n" + CI18N::get("uiBotChatPrice") + toString( sint32(factor * LastPrice * priceFactor) );
|
text+= "\n" + CI18N::get("uiBotChatPrice") + NLMISC::formatThousands(toString( sint32(factor * LastPrice * priceFactor) ));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((LastFactionPointPrice != 0) && (LastFactionType >= PVP_CLAN::BeginClans) && (LastFactionType <= PVP_CLAN::EndClans))
|
if ((LastFactionPointPrice != 0) && (LastFactionType >= PVP_CLAN::BeginClans) && (LastFactionType <= PVP_CLAN::EndClans))
|
||||||
|
@ -390,7 +391,7 @@ void CDBGroupListSheetTrade::CSheetChildTrade::updateViewText(CDBGroupListSheetT
|
||||||
text+= "\n";
|
text+= "\n";
|
||||||
|
|
||||||
text+= CI18N::get("uiBotChatFactionType") + PVP_CLAN::toString((PVP_CLAN::TPVPClan)LastFactionType)
|
text+= CI18N::get("uiBotChatFactionType") + PVP_CLAN::toString((PVP_CLAN::TPVPClan)LastFactionType)
|
||||||
+ CI18N::get("uiBotChatFactionPointPrice") + toString(LastFactionPointPrice);
|
+ CI18N::get("uiBotChatFactionPointPrice") + NLMISC::formatThousands(toString(LastFactionPointPrice));
|
||||||
}
|
}
|
||||||
|
|
||||||
// some additional info for resale
|
// some additional info for resale
|
||||||
|
@ -402,10 +403,10 @@ void CDBGroupListSheetTrade::CSheetChildTrade::updateViewText(CDBGroupListSheetT
|
||||||
{
|
{
|
||||||
// append price
|
// append price
|
||||||
if(pIS && pIS->Stackable>1 && zeFather->getMultiplyPriceByQuantityFlag())
|
if(pIS && pIS->Stackable>1 && zeFather->getMultiplyPriceByQuantityFlag())
|
||||||
text+= CI18N::get("uiBotChatRetirePrice") + toString(LastPriceRetire) + " ("
|
text+= CI18N::get("uiBotChatRetirePrice") + NLMISC::formatThousands(toString(LastPriceRetire)) + " ("
|
||||||
+ toString(factor * LastPriceRetire) + ")";
|
+ NLMISC::formatThousands(toString(factor * LastPriceRetire)) + ")";
|
||||||
else
|
else
|
||||||
text+= CI18N::get("uiBotChatRetirePrice") + toString(factor * LastPriceRetire);
|
text+= CI18N::get("uiBotChatRetirePrice") + NLMISC::formatThousands(toString(factor * LastPriceRetire));
|
||||||
// set resale time left
|
// set resale time left
|
||||||
ucstring fmt= CI18N::get("uiBotChatResaleTimeLeft");
|
ucstring fmt= CI18N::get("uiBotChatResaleTimeLeft");
|
||||||
strFindReplace(fmt, "%d", toString(LastResaleTimeLeft/RYZOM_DAY_IN_HOUR));
|
strFindReplace(fmt, "%d", toString(LastResaleTimeLeft/RYZOM_DAY_IN_HOUR));
|
||||||
|
@ -482,6 +483,12 @@ bool CDBGroupListSheetTrade::CSheetChildTrade::isSheetValid(CDBGroupListSheetTex
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Locked by owner; cannot trade
|
||||||
|
if (Ctrl->getLockedByOwner())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Check seller type?
|
// Check seller type?
|
||||||
TSellerTypeFilter stf= father->getSellerTypeFilter();
|
TSellerTypeFilter stf= father->getSellerTypeFilter();
|
||||||
if( stf != None)
|
if( stf != None)
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "dbview_number.h"
|
#include "dbview_number.h"
|
||||||
#include "interface_manager.h"
|
#include "interface_manager.h"
|
||||||
#include "game_share/xml_auto_ptr.h"
|
#include "game_share/xml_auto_ptr.h"
|
||||||
|
#include "nel/misc/common.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace NL3D;
|
using namespace NL3D;
|
||||||
|
@ -102,30 +103,6 @@ bool CDBViewNumber::parse (xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
|
||||||
// Helper function
|
|
||||||
ucstring formatThousands(const ucstring& s, const ucstring& separator)
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
int k;
|
|
||||||
int topI = s.length() - 1;
|
|
||||||
|
|
||||||
if (topI < 4) return s;
|
|
||||||
|
|
||||||
ucstring ns;
|
|
||||||
do
|
|
||||||
{
|
|
||||||
for (j = topI, k = 0; j >= 0 && k < 3; --j, ++k )
|
|
||||||
{
|
|
||||||
ns = s[j] + ns; // new char is added to front of ns
|
|
||||||
if( j > 0 && k == 2) ns = separator + ns; // j > 0 means still more digits
|
|
||||||
}
|
|
||||||
topI -= 3;
|
|
||||||
|
|
||||||
} while(topI >= 0);
|
|
||||||
return ns;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CDBViewNumber::checkCoords()
|
void CDBViewNumber::checkCoords()
|
||||||
{
|
{
|
||||||
|
@ -134,8 +111,7 @@ void CDBViewNumber::checkCoords()
|
||||||
if (_Cache != val)
|
if (_Cache != val)
|
||||||
{
|
{
|
||||||
_Cache= val;
|
_Cache= val;
|
||||||
static ucstring separator = NLMISC::CI18N::get("uiThousandsSeparator");
|
ucstring value = _Format ? NLMISC::formatThousands(toString(val)) : toString(val);
|
||||||
ucstring value = _Format ? formatThousands(toString(val), separator) : toString(val);
|
|
||||||
if (_Positive) setText(val >= 0 ? ( ucstring(_Prefix) + value + ucstring(_Suffix) ) : ucstring("?"));
|
if (_Positive) setText(val >= 0 ? ( ucstring(_Prefix) + value + ucstring(_Suffix) ) : ucstring("?"));
|
||||||
else setText( ucstring(_Prefix) + value + ucstring(_Suffix) );
|
else setText( ucstring(_Prefix) + value + ucstring(_Suffix) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -587,6 +587,12 @@ bool CGroupCompasMenu::parse(xmlNodePtr cur, CInterfaceGroup *parent /*=NULL*/)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Helper for sorting landmarks
|
||||||
|
static inline bool UserLandMarksSortPredicate(const CUserLandMark& lm1, const CUserLandMark& lm2)
|
||||||
|
{
|
||||||
|
return toLower(lm1.Title) < toLower(lm2.Title);
|
||||||
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
// Called when we activate the compass menu
|
// Called when we activate the compass menu
|
||||||
void CGroupCompasMenu::setActive (bool state)
|
void CGroupCompasMenu::setActive (bool state)
|
||||||
|
@ -803,6 +809,10 @@ void CGroupCompasMenu::setActive (bool state)
|
||||||
}
|
}
|
||||||
// User landmarks
|
// User landmarks
|
||||||
uint nbUserLandMarks = std::min( uint(currCont->UserLandMarks.size()), CContinent::getMaxNbUserLandMarks() );
|
uint nbUserLandMarks = std::min( uint(currCont->UserLandMarks.size()), CContinent::getMaxNbUserLandMarks() );
|
||||||
|
|
||||||
|
// Sort the landmarks
|
||||||
|
std::sort(currCont->UserLandMarks.begin(), currCont->UserLandMarks.end(), UserLandMarksSortPredicate);
|
||||||
|
|
||||||
for(k = 0; k < nbUserLandMarks; ++k)
|
for(k = 0; k < nbUserLandMarks; ++k)
|
||||||
{
|
{
|
||||||
if (currCont->UserLandMarks[k].Type < CUserLandMark::UserLandMarkTypeCount)
|
if (currCont->UserLandMarks[k].Type < CUserLandMark::UserLandMarkTypeCount)
|
||||||
|
|
|
@ -34,6 +34,7 @@ extern "C"
|
||||||
#include "view_link.h"
|
#include "view_link.h"
|
||||||
#include "ctrl_scroll.h"
|
#include "ctrl_scroll.h"
|
||||||
#include "ctrl_button.h"
|
#include "ctrl_button.h"
|
||||||
|
#include "dbctrl_sheet.h"
|
||||||
#include "ctrl_text_button.h"
|
#include "ctrl_text_button.h"
|
||||||
#include "action_handler.h"
|
#include "action_handler.h"
|
||||||
#include "group_paragraph.h"
|
#include "group_paragraph.h"
|
||||||
|
@ -64,12 +65,54 @@ CGroupHTML *CGroupHTML::_ConnectingLock = NULL;
|
||||||
extern CActionsContext ActionsContext;
|
extern CActionsContext ActionsContext;
|
||||||
|
|
||||||
// Check if domain is on TrustedDomain
|
// Check if domain is on TrustedDomain
|
||||||
bool CGroupHTML::isTrustedDomain(const string &domain) {
|
bool CGroupHTML::isTrustedDomain(const string &domain)
|
||||||
|
{
|
||||||
vector<string>::iterator it;
|
vector<string>::iterator it;
|
||||||
it = find (ClientCfg.WebIgTrustedDomains.begin(), ClientCfg.WebIgTrustedDomains.end(), domain);
|
it = find (ClientCfg.WebIgTrustedDomains.begin(), ClientCfg.WebIgTrustedDomains.end(), domain);
|
||||||
return it != ClientCfg.WebIgTrustedDomains.end();
|
return it != ClientCfg.WebIgTrustedDomains.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CGroupHTML::setImage(CViewBase * view, const string &file)
|
||||||
|
{
|
||||||
|
CCtrlButton *btn = dynamic_cast<CCtrlButton*>(view);
|
||||||
|
if(btn)
|
||||||
|
{
|
||||||
|
btn->setTexture (file);
|
||||||
|
btn->setTexturePushed(file);
|
||||||
|
btn->invalidateCoords();
|
||||||
|
btn->invalidateContent();
|
||||||
|
btn->resetInvalidCoords();
|
||||||
|
btn->updateCoords();
|
||||||
|
paragraphChange();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CViewBitmap *btm = dynamic_cast<CViewBitmap*>(view);
|
||||||
|
if(btm)
|
||||||
|
{
|
||||||
|
btm->setTexture (file);
|
||||||
|
btm->invalidateCoords();
|
||||||
|
btm->invalidateContent();
|
||||||
|
btm->resetInvalidCoords();
|
||||||
|
btm->updateCoords();
|
||||||
|
paragraphChange();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CGroupCell *btgc = dynamic_cast<CGroupCell*>(view);
|
||||||
|
if(btgc)
|
||||||
|
{
|
||||||
|
btgc->setTexture (file);
|
||||||
|
btgc->invalidateCoords();
|
||||||
|
btgc->invalidateContent();
|
||||||
|
btgc->resetInvalidCoords();
|
||||||
|
btgc->updateCoords();
|
||||||
|
paragraphChange();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Get an url and return the local filename with the path where the url image should be
|
// Get an url and return the local filename with the path where the url image should be
|
||||||
string CGroupHTML::localImageName(const string &url)
|
string CGroupHTML::localImageName(const string &url)
|
||||||
{
|
{
|
||||||
|
@ -99,30 +142,38 @@ void CGroupHTML::addImageDownload(const string &url, CViewBase *img)
|
||||||
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, true);
|
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, true);
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
|
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
|
||||||
|
|
||||||
string dest = localImageName(url)+".tmp";
|
string dest = localImageName(url);
|
||||||
|
string tmpdest = localImageName(url)+".tmp";
|
||||||
#ifdef LOG_DL
|
#ifdef LOG_DL
|
||||||
nlwarning("add to download '%s' dest '%s' img %p", url.c_str(), dest.c_str(), img);
|
nlwarning("add to download '%s' dest '%s' img %p", url.c_str(), dest.c_str(), img);
|
||||||
#endif
|
#endif
|
||||||
// create the local file
|
|
||||||
if (NLMISC::CFile::fileExists(dest))
|
|
||||||
{
|
|
||||||
CFile::setRWAccess(dest);
|
|
||||||
NLMISC::CFile::deleteFile(dest);
|
|
||||||
}
|
|
||||||
FILE *fp = fopen (dest.c_str(), "wb");
|
|
||||||
if (fp == NULL)
|
|
||||||
{
|
|
||||||
nlwarning("Can't open file '%s' for writing: code=%d '%s'", dest.c_str (), errno, strerror(errno));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
curl_easy_setopt(curl, CURLOPT_FILE, fp);
|
|
||||||
|
|
||||||
curl_multi_add_handle(MultiCurl, curl);
|
// erase the tmp file if exists
|
||||||
Curls.push_back(CDataDownload(curl, url, fp, ImgType, img, "", ""));
|
if (NLMISC::CFile::fileExists(tmpdest))
|
||||||
#ifdef LOG_DL
|
NLMISC::CFile::deleteFile(tmpdest);
|
||||||
nlwarning("adding handle %x, %d curls", curl, Curls.size());
|
|
||||||
#endif
|
if (!NLMISC::CFile::fileExists(dest))
|
||||||
RunningCurls++;
|
{
|
||||||
|
|
||||||
|
FILE *fp = fopen (tmpdest.c_str(), "wb");
|
||||||
|
if (fp == NULL)
|
||||||
|
{
|
||||||
|
nlwarning("Can't open file '%s' for writing: code=%d '%s'", tmpdest.c_str (), errno, strerror(errno));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
curl_easy_setopt(curl, CURLOPT_FILE, fp);
|
||||||
|
|
||||||
|
curl_multi_add_handle(MultiCurl, curl);
|
||||||
|
Curls.push_back(CDataDownload(curl, url, fp, ImgType, img, "", ""));
|
||||||
|
#ifdef LOG_DL
|
||||||
|
nlwarning("adding handle %x, %d curls", curl, Curls.size());
|
||||||
|
#endif
|
||||||
|
RunningCurls++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setImage(img, dest);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGroupHTML::initImageDownload()
|
void CGroupHTML::initImageDownload()
|
||||||
|
@ -297,41 +348,11 @@ void CGroupHTML::checkDownloads()
|
||||||
for(uint i = 0; i < it->imgs.size(); i++)
|
for(uint i = 0; i < it->imgs.size(); i++)
|
||||||
{
|
{
|
||||||
// don't display image that are not power of 2
|
// don't display image that are not power of 2
|
||||||
uint32 w, h;
|
//uint32 w, h;
|
||||||
CBitmap::loadSize (file, w, h);
|
//CBitmap::loadSize (file, w, h);
|
||||||
if (w == 0 || h == 0 || ((!NLMISC::isPowerOf2(w) || !NLMISC::isPowerOf2(h)) && !NL3D::CTextureFile::supportNonPowerOfTwoTextures()))
|
//if (w == 0 || h == 0 || ((!NLMISC::isPowerOf2(w) || !NLMISC::isPowerOf2(h)) && !NL3D::CTextureFile::supportNonPowerOfTwoTextures()))
|
||||||
file.clear();
|
// file.clear();
|
||||||
|
setImage(it->imgs[i], file);
|
||||||
CCtrlButton *btn = dynamic_cast<CCtrlButton*>(it->imgs[i]);
|
|
||||||
if(btn)
|
|
||||||
{
|
|
||||||
#ifdef LOG_DL
|
|
||||||
nlwarning("refresh new downloading image %d button %p", i, it->imgs[i]);
|
|
||||||
#endif
|
|
||||||
btn->setTexture (file);
|
|
||||||
btn->setTexturePushed(file);
|
|
||||||
btn->invalidateCoords();
|
|
||||||
btn->invalidateContent();
|
|
||||||
btn->resetInvalidCoords();
|
|
||||||
btn->updateCoords();
|
|
||||||
paragraphChange();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CViewBitmap *btm = dynamic_cast<CViewBitmap*>(it->imgs[i]);
|
|
||||||
if(btm)
|
|
||||||
{
|
|
||||||
#ifdef LOG_DL
|
|
||||||
nlwarning("refresh new downloading image %d image %p", i, it->imgs[i]);
|
|
||||||
#endif
|
|
||||||
btm->setTexture (file);
|
|
||||||
btm->invalidateCoords();
|
|
||||||
btm->invalidateContent();
|
|
||||||
btm->resetInvalidCoords();
|
|
||||||
btm->updateCoords();
|
|
||||||
paragraphChange();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -446,6 +467,28 @@ void CGroupHTML::beginBuild ()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TStyle CGroupHTML::parseStyle (const string &str_styles)
|
||||||
|
{
|
||||||
|
TStyle styles;
|
||||||
|
vector<string> elements;
|
||||||
|
NLMISC::splitString(str_styles, ";", elements);
|
||||||
|
|
||||||
|
for(uint i = 0; i < elements.size(); ++i)
|
||||||
|
{
|
||||||
|
vector<string> style;
|
||||||
|
NLMISC::splitString(elements[i], ":", style);
|
||||||
|
if (style.size() >= 2)
|
||||||
|
{
|
||||||
|
string fullstyle = style[1];
|
||||||
|
for (uint j=2; j < style.size(); j++)
|
||||||
|
fullstyle += ":"+style[j];
|
||||||
|
styles[trim(style[0])] = fullstyle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return styles;
|
||||||
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
||||||
void CGroupHTML::addText (const char * buf, int len)
|
void CGroupHTML::addText (const char * buf, int len)
|
||||||
|
@ -556,9 +599,31 @@ void CGroupHTML::addLink (uint element_number, uint /* attribute_number */, HTCh
|
||||||
_Link.push_back("");
|
_Link.push_back("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(uint8 i = MY_HTML_A_ACCESSKEY; i < MY_HTML_A_Z_ACTION_SHORTCUT; i++)
|
||||||
|
{
|
||||||
|
if (present[i] && value[i])
|
||||||
|
{
|
||||||
|
string title = value[i];
|
||||||
|
// nlinfo("key %d = %s", i, title.c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//nlinfo("key of TITLE is : %d", MY_HTML_A_Z_ACTION_PARAMS);
|
||||||
|
if (present[MY_HTML_A_Z_ACTION_PARAMS] && value[MY_HTML_A_Z_ACTION_PARAMS])
|
||||||
|
{
|
||||||
|
string title = value[MY_HTML_A_Z_ACTION_PARAMS];
|
||||||
|
_LinkTitle.push_back(title);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
_LinkTitle.push_back("");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
_Link.push_back("");
|
_Link.push_back("");
|
||||||
|
_LinkTitle.push_back("");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -626,7 +691,6 @@ static const char *scanColorComponent(const char *src, uint8 &intensity)
|
||||||
return src;
|
return src;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class CNameToCol
|
class CNameToCol
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -831,6 +895,11 @@ void CGroupHTML::beginElement (uint element_number, const BOOL *present, const c
|
||||||
_GlobalColor.push_back(LinkColorGlobalColor);
|
_GlobalColor.push_back(LinkColorGlobalColor);
|
||||||
_A.push_back(true);
|
_A.push_back(true);
|
||||||
|
|
||||||
|
if (present[MY_HTML_A_TITLE] && value[MY_HTML_A_TITLE])
|
||||||
|
_LinkTitle.push_back(value[MY_HTML_A_TITLE]);
|
||||||
|
if (present[MY_HTML_A_CLASS] && value[MY_HTML_A_CLASS])
|
||||||
|
_LinkClass.push_back(value[MY_HTML_A_CLASS]);
|
||||||
|
|
||||||
// Quick help
|
// Quick help
|
||||||
if (_TrustedDomain && present[MY_HTML_A_Z_ACTION_SHORTCUT] && value[MY_HTML_A_Z_ACTION_SHORTCUT])
|
if (_TrustedDomain && present[MY_HTML_A_Z_ACTION_SHORTCUT] && value[MY_HTML_A_Z_ACTION_SHORTCUT])
|
||||||
{
|
{
|
||||||
|
@ -856,15 +925,87 @@ void CGroupHTML::beginElement (uint element_number, const BOOL *present, const c
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case HTML_DIV:
|
case HTML_DIV:
|
||||||
{
|
{
|
||||||
if (present[MY_HTML_DIV_NAME] && value[MY_HTML_DIV_NAME])
|
if (present[MY_HTML_DIV_NAME] && value[MY_HTML_DIV_NAME])
|
||||||
{
|
|
||||||
_DivName = value[MY_HTML_DIV_NAME];
|
_DivName = value[MY_HTML_DIV_NAME];
|
||||||
|
|
||||||
|
string instClass;
|
||||||
|
if (present[MY_HTML_DIV_CLASS] && value[MY_HTML_DIV_CLASS])
|
||||||
|
instClass = value[MY_HTML_DIV_CLASS];
|
||||||
|
|
||||||
|
// use generic template system
|
||||||
|
if (_TrustedDomain && !instClass.empty() && instClass == "ryzom-ui-grouptemplate")
|
||||||
|
{
|
||||||
|
string id;
|
||||||
|
if (present[MY_HTML_DIV_ID] && value[MY_HTML_DIV_ID])
|
||||||
|
id = value[MY_HTML_DIV_ID];
|
||||||
|
|
||||||
|
string style;
|
||||||
|
if (present[MY_HTML_DIV_STYLE] && value[MY_HTML_DIV_STYLE])
|
||||||
|
style = value[MY_HTML_DIV_STYLE];
|
||||||
|
|
||||||
|
typedef pair<string, string> TTmplParam;
|
||||||
|
vector<TTmplParam> tmplParams;
|
||||||
|
|
||||||
|
string templateName;
|
||||||
|
if (!style.empty())
|
||||||
|
{
|
||||||
|
TStyle styles = parseStyle(style);
|
||||||
|
TStyle::iterator it;
|
||||||
|
for (it=styles.begin(); it != styles.end(); it++)
|
||||||
|
{
|
||||||
|
if ((*it).first == "template")
|
||||||
|
templateName = (*it).second;
|
||||||
|
else
|
||||||
|
tmplParams.push_back(TTmplParam((*it).first, (*it).second));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!templateName.empty())
|
||||||
|
{
|
||||||
|
string parentId;
|
||||||
|
bool haveParentDiv = getDiv() != NULL;
|
||||||
|
if (haveParentDiv)
|
||||||
|
parentId = getDiv()->getId();
|
||||||
|
else
|
||||||
|
parentId = _Paragraph->getId();
|
||||||
|
|
||||||
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
|
CInterfaceGroup *inst = im->createGroupInstance(templateName, parentId+":"+id, tmplParams);
|
||||||
|
if (inst)
|
||||||
|
{
|
||||||
|
inst->setId(parentId+":"+id);
|
||||||
|
inst->updateCoords();
|
||||||
|
if (haveParentDiv)
|
||||||
|
{
|
||||||
|
inst->setParent(getDiv());
|
||||||
|
inst->setParentSize(getDiv());
|
||||||
|
inst->setParentPos(getDiv());
|
||||||
|
inst->setPosRef(Hotspot_TL);
|
||||||
|
inst->setParentPosRef(Hotspot_TL);
|
||||||
|
getDiv()->addGroup(inst);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!_Paragraph)
|
||||||
|
{
|
||||||
|
newParagraph (0);
|
||||||
|
paragraphChange ();
|
||||||
|
}
|
||||||
|
|
||||||
|
getParagraph()->addChild(inst);
|
||||||
|
paragraphChange();
|
||||||
|
}
|
||||||
|
_Divs.push_back(inst);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HTML_FONT:
|
case HTML_FONT:
|
||||||
{
|
{
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
@ -898,11 +1039,42 @@ void CGroupHTML::beginElement (uint element_number, const BOOL *present, const c
|
||||||
addString(ucstring ("\n"));
|
addString(ucstring ("\n"));
|
||||||
break;
|
break;
|
||||||
case HTML_BODY:
|
case HTML_BODY:
|
||||||
if (present[HTML_BODY_BGCOLOR] && value[HTML_BODY_BGCOLOR])
|
|
||||||
{
|
{
|
||||||
// Get the color
|
if (present[HTML_BODY_BGCOLOR] && value[HTML_BODY_BGCOLOR])
|
||||||
CRGBA bgColor = getColor (value[HTML_BODY_BGCOLOR]);
|
{
|
||||||
setBackgroundColor (bgColor);
|
CRGBA bgColor = getColor (value[HTML_BODY_BGCOLOR]);
|
||||||
|
setBackgroundColor (bgColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
string style;
|
||||||
|
if (present[HTML_BODY_STYLE] && value[HTML_BODY_STYLE])
|
||||||
|
style = value[HTML_BODY_STYLE];
|
||||||
|
|
||||||
|
|
||||||
|
if (!style.empty())
|
||||||
|
{
|
||||||
|
TStyle styles = parseStyle(style);
|
||||||
|
TStyle::iterator it;
|
||||||
|
|
||||||
|
it = styles.find("background-repeat");
|
||||||
|
bool repeat = (it != styles.end() && it->second == "1");
|
||||||
|
|
||||||
|
// Webig only
|
||||||
|
it = styles.find("background-scale");
|
||||||
|
bool scale = (it != styles.end() && it->second == "1");
|
||||||
|
|
||||||
|
it = styles.find("background-image");
|
||||||
|
if (it != styles.end())
|
||||||
|
{
|
||||||
|
string image = it->second;
|
||||||
|
string::size_type texExt = strlwr(image).find("url(");
|
||||||
|
// Url image
|
||||||
|
if (texExt != string::npos)
|
||||||
|
// Remove url()
|
||||||
|
image = image.substr(4, image.size()-5);
|
||||||
|
setBackground (image, scale, repeat);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case HTML_FORM:
|
case HTML_FORM:
|
||||||
|
@ -1000,7 +1172,24 @@ void CGroupHTML::beginElement (uint element_number, const BOOL *present, const c
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
addImage (value[MY_HTML_IMG_SRC], globalColor);
|
// Get the option to reload (class==reload)
|
||||||
|
bool reloadImg = false;
|
||||||
|
|
||||||
|
string style;
|
||||||
|
if (present[MY_HTML_IMG_STYLE] && value[MY_HTML_IMG_STYLE])
|
||||||
|
style = value[MY_HTML_IMG_STYLE];
|
||||||
|
|
||||||
|
if (!style.empty())
|
||||||
|
{
|
||||||
|
TStyle styles = parseStyle(style);
|
||||||
|
TStyle::iterator it;
|
||||||
|
|
||||||
|
it = styles.find("reload");
|
||||||
|
if (it != styles.end() && (*it).second == "1")
|
||||||
|
reloadImg = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
addImage (value[MY_HTML_IMG_SRC], globalColor, reloadImg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1312,8 +1501,43 @@ void CGroupHTML::beginElement (uint element_number, const BOOL *present, const c
|
||||||
if (!_Cells.empty())
|
if (!_Cells.empty())
|
||||||
{
|
{
|
||||||
_Cells.back() = new CGroupCell(CViewBase::TCtorParam());
|
_Cells.back() = new CGroupCell(CViewBase::TCtorParam());
|
||||||
|
string style;
|
||||||
|
if (present[MY_HTML_TD_STYLE] && value[MY_HTML_TD_STYLE])
|
||||||
|
style = value[MY_HTML_TD_STYLE];
|
||||||
|
|
||||||
// Set the cell parameters
|
// Set the cell parameters
|
||||||
|
if (!style.empty())
|
||||||
|
{
|
||||||
|
TStyle styles = parseStyle(style);
|
||||||
|
TStyle::iterator it;
|
||||||
|
|
||||||
|
it = styles.find("background-repeat");
|
||||||
|
_Cells.back()->setTextureTile(it != styles.end());
|
||||||
|
|
||||||
|
// Webig only
|
||||||
|
it = styles.find("background-scale");
|
||||||
|
_Cells.back()->setTextureScale(it != styles.end());
|
||||||
|
|
||||||
|
it = styles.find("background-image");
|
||||||
|
if (it != styles.end())
|
||||||
|
{
|
||||||
|
nlinfo("found background-image %s", it->second.c_str());
|
||||||
|
string image = (*it).second;
|
||||||
|
string::size_type texExt = strlwr(image).find("url(");
|
||||||
|
// Url image
|
||||||
|
if (texExt != string::npos)
|
||||||
|
{
|
||||||
|
// Remove url()
|
||||||
|
image = image.substr(4, image.size()-5);
|
||||||
|
addImageDownload(image, _Cells.back());
|
||||||
|
// Image in BNP
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_Cells.back()->setTexture(image);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
_Cells.back()->BgColor = _CellParams.back().BgColor;
|
_Cells.back()->BgColor = _CellParams.back().BgColor;
|
||||||
_Cells.back()->Align = _CellParams.back().Align;
|
_Cells.back()->Align = _CellParams.back().Align;
|
||||||
_Cells.back()->VAlign = _CellParams.back().VAlign;
|
_Cells.back()->VAlign = _CellParams.back().VAlign;
|
||||||
|
@ -1435,6 +1659,8 @@ void CGroupHTML::endElement (uint element_number)
|
||||||
popIfNotEmpty (_GlobalColor);
|
popIfNotEmpty (_GlobalColor);
|
||||||
popIfNotEmpty (_A);
|
popIfNotEmpty (_A);
|
||||||
popIfNotEmpty (_Link);
|
popIfNotEmpty (_Link);
|
||||||
|
popIfNotEmpty (_LinkTitle);
|
||||||
|
popIfNotEmpty (_LinkClass);
|
||||||
break;
|
break;
|
||||||
case HTML_H1:
|
case HTML_H1:
|
||||||
case HTML_H2:
|
case HTML_H2:
|
||||||
|
@ -1452,6 +1678,7 @@ void CGroupHTML::endElement (uint element_number)
|
||||||
break;
|
break;
|
||||||
case HTML_DIV:
|
case HTML_DIV:
|
||||||
_DivName = "";
|
_DivName = "";
|
||||||
|
popIfNotEmpty (_Divs);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HTML_TABLE:
|
case HTML_TABLE:
|
||||||
|
@ -1551,7 +1778,7 @@ void CGroupHTML::endElement (uint element_number)
|
||||||
if (addBnpDownload(_ObjectData, _ObjectAction, _ObjectScript, _ObjectMD5Sum))
|
if (addBnpDownload(_ObjectData, _ObjectAction, _ObjectScript, _ObjectMD5Sum))
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
pIM->executeLuaScript(_ObjectScript, true);
|
pIM->executeLuaScript("\nlocal __ALLREADYDL__=true\n"+_ObjectScript, true);
|
||||||
}
|
}
|
||||||
_ObjectScript = "";
|
_ObjectScript = "";
|
||||||
}
|
}
|
||||||
|
@ -1586,6 +1813,7 @@ void CGroupHTML::endUnparsedElement(const char *buffer, int length)
|
||||||
_ParsingLua = false;
|
_ParsingLua = false;
|
||||||
// execute the embeded lua script
|
// execute the embeded lua script
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
|
_LuaScript = "\nlocal __CURRENT_WINDOW__=\""+this->_Id+"\" \n"+_LuaScript;
|
||||||
pIM->executeLuaScript(_LuaScript, true);
|
pIM->executeLuaScript(_LuaScript, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2211,40 +2439,77 @@ void CGroupHTML::addString(const ucstring &str)
|
||||||
// Not added ?
|
// Not added ?
|
||||||
if (!added)
|
if (!added)
|
||||||
{
|
{
|
||||||
CViewLink *newLink = new CViewLink(CViewBase::TCtorParam());
|
if (getA() && string(getLinkClass()) == "ryzom-ui-button")
|
||||||
if (getA())
|
|
||||||
{
|
{
|
||||||
newLink->Link = getLink();
|
string buttonTemplate = DefaultButtonGroup;
|
||||||
if (!newLink->Link.empty())
|
// Action handler parameters : "name=group_html_id|form=id_of_the_form|submit_button=button_name"
|
||||||
{
|
string param = "name=" + this->_Id + "|url=" + getLink();
|
||||||
newLink->setHTMLView (this);
|
|
||||||
newLink->setUnderlined (true);
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
}
|
typedef pair<string, string> TTmplParam;
|
||||||
}
|
vector<TTmplParam> tmplParams;
|
||||||
newLink->setText(tmpStr);
|
tmplParams.push_back(TTmplParam("id", ""));
|
||||||
newLink->setColor(getTextColor());
|
tmplParams.push_back(TTmplParam("onclick", "browse"));
|
||||||
newLink->setFontSize(getFontSize());
|
tmplParams.push_back(TTmplParam("onclick_param", param));
|
||||||
newLink->setMultiLineSpace((uint)((float)getFontSize()*LineSpaceFontFactor));
|
tmplParams.push_back(TTmplParam("active", "true"));
|
||||||
newLink->setMultiLine(true);
|
CInterfaceGroup *buttonGroup = im->createGroupInstance(buttonTemplate, _Paragraph->getId(), tmplParams);
|
||||||
newLink->setModulateGlobalColor(getGlobalColor());
|
if (buttonGroup)
|
||||||
// newLink->setLineAtBottom (true);
|
{
|
||||||
|
|
||||||
|
// Add the ctrl button
|
||||||
|
CCtrlTextButton *ctrlButton = dynamic_cast<CCtrlTextButton*>(buttonGroup->getCtrl("button"));
|
||||||
|
if (!ctrlButton) ctrlButton = dynamic_cast<CCtrlTextButton*>(buttonGroup->getCtrl("b"));
|
||||||
|
if (ctrlButton)
|
||||||
|
{
|
||||||
|
ctrlButton->setModulateGlobalColorAll (false);
|
||||||
|
|
||||||
|
// Translate the tooltip
|
||||||
|
ctrlButton->setDefaultContextHelp(ucstring::makeFromUtf8(getLinkTitle()));
|
||||||
|
ctrlButton->setText(tmpStr);
|
||||||
|
}
|
||||||
|
getParagraph()->addChild (buttonGroup);
|
||||||
|
paragraphChange ();
|
||||||
|
}
|
||||||
|
|
||||||
if (getA() && !newLink->Link.empty())
|
|
||||||
{
|
|
||||||
getParagraph()->addChildLink(newLink);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
getParagraph()->addChild(newLink);
|
CViewLink *newLink = new CViewLink(CViewBase::TCtorParam());
|
||||||
|
if (getA())
|
||||||
|
{
|
||||||
|
newLink->Link = getLink();
|
||||||
|
newLink->LinkTitle = getLinkTitle();
|
||||||
|
if (!newLink->Link.empty())
|
||||||
|
{
|
||||||
|
newLink->setHTMLView (this);
|
||||||
|
newLink->setUnderlined (true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
newLink->setText(tmpStr);
|
||||||
|
newLink->setColor(getTextColor());
|
||||||
|
newLink->setFontSize(getFontSize());
|
||||||
|
newLink->setMultiLineSpace((uint)((float)getFontSize()*LineSpaceFontFactor));
|
||||||
|
newLink->setMultiLine(true);
|
||||||
|
newLink->setModulateGlobalColor(getGlobalColor());
|
||||||
|
// newLink->setLineAtBottom (true);
|
||||||
|
|
||||||
|
if (getA() && !newLink->Link.empty())
|
||||||
|
{
|
||||||
|
getParagraph()->addChildLink(newLink);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
getParagraph()->addChild(newLink);
|
||||||
|
}
|
||||||
|
paragraphChange ();
|
||||||
}
|
}
|
||||||
paragraphChange ();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
||||||
void CGroupHTML::addImage(const char *img, bool globalColor)
|
void CGroupHTML::addImage(const char *img, bool globalColor, bool reloadImg)
|
||||||
{
|
{
|
||||||
// In a paragraph ?
|
// In a paragraph ?
|
||||||
if (_Paragraph)
|
if (_Paragraph)
|
||||||
|
@ -2268,6 +2533,7 @@ void CGroupHTML::addImage(const char *img, bool globalColor)
|
||||||
newImage->Link = getLink();
|
newImage->Link = getLink();
|
||||||
newImage->setHTMLView (this);
|
newImage->setHTMLView (this);
|
||||||
}*/
|
}*/
|
||||||
|
newImage->setRenderLayer(getRenderLayer()+1);
|
||||||
newImage->setTexture (finalUrl);
|
newImage->setTexture (finalUrl);
|
||||||
newImage->setModulateGlobalColor(globalColor);
|
newImage->setModulateGlobalColor(globalColor);
|
||||||
|
|
||||||
|
@ -2284,7 +2550,7 @@ void CGroupHTML::addImage(const char *img, bool globalColor)
|
||||||
// 2/ if it doesn't work, try to load the image in cache
|
// 2/ if it doesn't work, try to load the image in cache
|
||||||
//
|
//
|
||||||
image = localImageName(img);
|
image = localImageName(img);
|
||||||
if (lookupLocalFile (finalUrl, image.c_str(), false))
|
if (!reloadImg && lookupLocalFile (finalUrl, image.c_str(), false))
|
||||||
{
|
{
|
||||||
// No more text in this text view
|
// No more text in this text view
|
||||||
_CurrentViewLink = NULL;
|
_CurrentViewLink = NULL;
|
||||||
|
@ -2314,7 +2580,9 @@ void CGroupHTML::addImage(const char *img, bool globalColor)
|
||||||
else*/
|
else*/
|
||||||
getParagraph()->addChild(newImage);
|
getParagraph()->addChild(newImage);
|
||||||
paragraphChange ();
|
paragraphChange ();
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
//
|
//
|
||||||
// 3/ if it doesn't work, display a placeholder and ask to dl the image into the cache
|
// 3/ if it doesn't work, display a placeholder and ask to dl the image into the cache
|
||||||
|
@ -2527,6 +2795,9 @@ CCtrlButton *CGroupHTML::addButton(CCtrlButton::EType type, const std::string &/
|
||||||
|
|
||||||
ctrlButton->setInstantContextHelp(true);
|
ctrlButton->setInstantContextHelp(true);
|
||||||
ctrlButton->setToolTipParent(TTMouse);
|
ctrlButton->setToolTipParent(TTMouse);
|
||||||
|
ctrlButton->setToolTipParentPosRef(Hotspot_TTAuto);
|
||||||
|
ctrlButton->setToolTipPosRef(Hotspot_TTAuto);
|
||||||
|
ctrlButton->setActionOnLeftClickParams(tooltip);
|
||||||
}
|
}
|
||||||
|
|
||||||
getParagraph()->addChild (ctrlButton);
|
getParagraph()->addChild (ctrlButton);
|
||||||
|
@ -2556,6 +2827,7 @@ void CGroupHTML::clearContext()
|
||||||
_UL.clear();
|
_UL.clear();
|
||||||
_A.clear();
|
_A.clear();
|
||||||
_Link.clear();
|
_Link.clear();
|
||||||
|
_LinkTitle.clear();
|
||||||
_Tables.clear();
|
_Tables.clear();
|
||||||
_Cells.clear();
|
_Cells.clear();
|
||||||
_TR.clear();
|
_TR.clear();
|
||||||
|
@ -2632,6 +2904,9 @@ CInterfaceGroup *CGroupHTML::getCurrentGroup()
|
||||||
|
|
||||||
void CGroupHTML::addGroup (CInterfaceGroup *group, uint beginSpace)
|
void CGroupHTML::addGroup (CInterfaceGroup *group, uint beginSpace)
|
||||||
{
|
{
|
||||||
|
if (!group)
|
||||||
|
return;
|
||||||
|
|
||||||
// Remove previous paragraph if empty
|
// Remove previous paragraph if empty
|
||||||
if (_Paragraph && (_Paragraph->getNumChildren() == 0))
|
if (_Paragraph && (_Paragraph->getNumChildren() == 0))
|
||||||
{
|
{
|
||||||
|
@ -2796,7 +3071,30 @@ void CGroupHTML::setBackgroundColor (const CRGBA &bgcolor)
|
||||||
{
|
{
|
||||||
// Change the background color
|
// Change the background color
|
||||||
bitmap->setColor (bgcolor);
|
bitmap->setColor (bgcolor);
|
||||||
bitmap->setModulateGlobalColor(true);
|
bitmap->setModulateGlobalColor(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
|
||||||
|
void CGroupHTML::setBackground (const string &bgtex, bool scale, bool tile)
|
||||||
|
{
|
||||||
|
// Should have a child named bg
|
||||||
|
CViewBase *view = getView (DefaultBackgroundBitmapView);
|
||||||
|
if (view)
|
||||||
|
{
|
||||||
|
CViewBitmap *bitmap = dynamic_cast<CViewBitmap*> (view);
|
||||||
|
if (bitmap)
|
||||||
|
{
|
||||||
|
bitmap->setParentPosRef(Hotspot_TL);
|
||||||
|
bitmap->setPosRef(Hotspot_TL);
|
||||||
|
bitmap->setX(0);
|
||||||
|
bitmap->setY(0);
|
||||||
|
bitmap->setRenderLayer(-2);
|
||||||
|
bitmap->setScale(scale);
|
||||||
|
bitmap->setTile(tile);
|
||||||
|
addImageDownload(bgtex, view);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2897,9 +3195,6 @@ void CGroupHTML::handle ()
|
||||||
_Browsing = true;
|
_Browsing = true;
|
||||||
updateRefreshButton();
|
updateRefreshButton();
|
||||||
|
|
||||||
// Add custom get params
|
|
||||||
addHTTPGetParams (finalUrl);
|
|
||||||
|
|
||||||
// Save new url
|
// Save new url
|
||||||
_URL = finalUrl;
|
_URL = finalUrl;
|
||||||
|
|
||||||
|
@ -2910,6 +3205,10 @@ void CGroupHTML::handle ()
|
||||||
initLibWWW();
|
initLibWWW();
|
||||||
_TrustedDomain = isTrustedDomain(setCurrentDomain(finalUrl));
|
_TrustedDomain = isTrustedDomain(setCurrentDomain(finalUrl));
|
||||||
|
|
||||||
|
// Add custom get params
|
||||||
|
addHTTPGetParams (finalUrl, _TrustedDomain);
|
||||||
|
|
||||||
|
|
||||||
// Get the final URL
|
// Get the final URL
|
||||||
C3WSmartPtr uri = HTParse(finalUrl.c_str(), NULL, PARSE_ALL);
|
C3WSmartPtr uri = HTParse(finalUrl.c_str(), NULL, PARSE_ALL);
|
||||||
|
|
||||||
|
@ -3030,7 +3329,7 @@ void CGroupHTML::handle ()
|
||||||
HTParseFormInput(formfields, (_PostFormSubmitButton + "_y=0").c_str());
|
HTParseFormInput(formfields, (_PostFormSubmitButton + "_y=0").c_str());
|
||||||
|
|
||||||
// Add custom params
|
// Add custom params
|
||||||
addHTTPPostParams (formfields);
|
addHTTPPostParams(formfields, _TrustedDomain);
|
||||||
|
|
||||||
// Reset the title
|
// Reset the title
|
||||||
if(_TitlePrefix.empty())
|
if(_TitlePrefix.empty())
|
||||||
|
@ -3146,13 +3445,13 @@ void CGroupHTML::endBuild ()
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
||||||
void CGroupHTML::addHTTPGetParams (string &/* url */)
|
void CGroupHTML::addHTTPGetParams (string &/* url */, bool /*trustedDomain*/)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
||||||
void CGroupHTML::addHTTPPostParams (HTAssocList * /* formfields */)
|
void CGroupHTML::addHTTPPostParams (HTAssocList * /* formfields */, bool /*trustedDomain*/)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3401,7 +3700,7 @@ int CGroupHTML::luaRefresh(CLuaState &ls)
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
int CGroupHTML::luaRemoveContent(CLuaState &ls)
|
int CGroupHTML::luaRemoveContent(CLuaState &ls)
|
||||||
{
|
{
|
||||||
const char *funcName = "refresh";
|
const char *funcName = "removeContent";
|
||||||
CLuaIHM::checkArgCount(ls, funcName, 0);
|
CLuaIHM::checkArgCount(ls, funcName, 0);
|
||||||
removeContent();
|
removeContent();
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -30,6 +30,8 @@
|
||||||
#include "ctrl_button.h"
|
#include "ctrl_button.h"
|
||||||
#include "group_table.h"
|
#include "group_table.h"
|
||||||
|
|
||||||
|
typedef std::map<std::string, std::string> TStyle;
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
#include "WWWInit.h"
|
#include "WWWInit.h"
|
||||||
|
@ -147,6 +149,7 @@ public:
|
||||||
std::string DefaultCheckBoxBitmapPushed;
|
std::string DefaultCheckBoxBitmapPushed;
|
||||||
std::string DefaultCheckBoxBitmapOver;
|
std::string DefaultCheckBoxBitmapOver;
|
||||||
std::string DefaultBackgroundBitmapView;
|
std::string DefaultBackgroundBitmapView;
|
||||||
|
std::string CurrentLinkTitle;
|
||||||
|
|
||||||
// Browser home
|
// Browser home
|
||||||
std::string Home;
|
std::string Home;
|
||||||
|
@ -216,10 +219,10 @@ protected :
|
||||||
virtual void endUnparsedElement(const char *buffer, int length);
|
virtual void endUnparsedElement(const char *buffer, int length);
|
||||||
|
|
||||||
// Add GET params to the url
|
// Add GET params to the url
|
||||||
virtual void addHTTPGetParams (std::string &url);
|
virtual void addHTTPGetParams (std::string &url, bool trustedDomain);
|
||||||
|
|
||||||
// Add POST params to the libwww list
|
// Add POST params to the libwww list
|
||||||
virtual void addHTTPPostParams (HTAssocList *formfields);
|
virtual void addHTTPPostParams (HTAssocList *formfields, bool trustedDomain);
|
||||||
|
|
||||||
// the current request is terminated
|
// the current request is terminated
|
||||||
virtual void requestTerminated(HTRequest *request);
|
virtual void requestTerminated(HTRequest *request);
|
||||||
|
@ -227,6 +230,9 @@ protected :
|
||||||
// Get Home URL
|
// Get Home URL
|
||||||
virtual std::string home();
|
virtual std::string home();
|
||||||
|
|
||||||
|
// Parse style html tag
|
||||||
|
TStyle parseStyle(const std::string &str_styles);
|
||||||
|
|
||||||
// Handle some work at each pass
|
// Handle some work at each pass
|
||||||
virtual void handle ();
|
virtual void handle ();
|
||||||
|
|
||||||
|
@ -251,7 +257,7 @@ protected :
|
||||||
void addString(const ucstring &str);
|
void addString(const ucstring &str);
|
||||||
|
|
||||||
// Add an image in the current paragraph
|
// Add an image in the current paragraph
|
||||||
void addImage(const char *image, bool globalColor);
|
void addImage(const char *image, bool globalColor, bool reloadImg=false);
|
||||||
|
|
||||||
// Add a text area in the current paragraph
|
// Add a text area in the current paragraph
|
||||||
CInterfaceGroup *addTextArea (const std::string &templateName, const char *name, uint rows, uint cols, bool multiLine, const ucstring &content);
|
CInterfaceGroup *addTextArea (const std::string &templateName, const char *name, uint rows, uint cols, bool multiLine, const ucstring &content);
|
||||||
|
@ -266,6 +272,9 @@ protected :
|
||||||
// Set the background color
|
// Set the background color
|
||||||
void setBackgroundColor (const NLMISC::CRGBA &bgcolor);
|
void setBackgroundColor (const NLMISC::CRGBA &bgcolor);
|
||||||
|
|
||||||
|
// Set the background
|
||||||
|
void setBackground (const std::string &bgtex, bool scale, bool tile);
|
||||||
|
|
||||||
// Force the current string to be in a single string
|
// Force the current string to be in a single string
|
||||||
void flushString();
|
void flushString();
|
||||||
|
|
||||||
|
@ -397,6 +406,30 @@ protected :
|
||||||
return _Link.back().c_str();
|
return _Link.back().c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<std::string> _LinkTitle;
|
||||||
|
inline const char *getLinkTitle() const
|
||||||
|
{
|
||||||
|
if (_LinkTitle.empty())
|
||||||
|
return "";
|
||||||
|
return _LinkTitle.back().c_str();
|
||||||
|
}
|
||||||
|
std::vector<std::string> _LinkClass;
|
||||||
|
inline const char *getLinkClass() const
|
||||||
|
{
|
||||||
|
if (_LinkClass.empty())
|
||||||
|
return "";
|
||||||
|
return _LinkClass.back().c_str();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Divs (i.e. interface group)
|
||||||
|
std::vector<class CInterfaceGroup*> _Divs;
|
||||||
|
inline CInterfaceGroup *getDiv() const
|
||||||
|
{
|
||||||
|
if (_Divs.empty())
|
||||||
|
return NULL;
|
||||||
|
return _Divs.back();
|
||||||
|
}
|
||||||
|
|
||||||
// Tables
|
// Tables
|
||||||
std::vector<class CGroupTable*> _Tables;
|
std::vector<class CGroupTable*> _Tables;
|
||||||
inline CGroupTable *getTable() const
|
inline CGroupTable *getTable() const
|
||||||
|
@ -475,6 +508,7 @@ protected :
|
||||||
NoWrap = false;
|
NoWrap = false;
|
||||||
}
|
}
|
||||||
NLMISC::CRGBA BgColor;
|
NLMISC::CRGBA BgColor;
|
||||||
|
std::string Style;
|
||||||
CGroupCell::TAlign Align;
|
CGroupCell::TAlign Align;
|
||||||
CGroupCell::TVAlign VAlign;
|
CGroupCell::TVAlign VAlign;
|
||||||
sint32 LeftMargin;
|
sint32 LeftMargin;
|
||||||
|
@ -582,9 +616,9 @@ private:
|
||||||
void checkImageDownload();
|
void checkImageDownload();
|
||||||
void addImageDownload(const std::string &url, CViewBase *img);
|
void addImageDownload(const std::string &url, CViewBase *img);
|
||||||
std::string localImageName(const std::string &url);
|
std::string localImageName(const std::string &url);
|
||||||
|
|
||||||
bool isTrustedDomain(const std::string &domain);
|
bool isTrustedDomain(const std::string &domain);
|
||||||
|
void setImage(CViewBase *view, const std::string &file);
|
||||||
|
|
||||||
|
|
||||||
// BnpDownload system
|
// BnpDownload system
|
||||||
void initBnpDownload();
|
void initBnpDownload();
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include "group_html_cs.h"
|
#include "group_html_cs.h"
|
||||||
#include "game_share/xml_auto_ptr.h"
|
#include "game_share/xml_auto_ptr.h"
|
||||||
#include "../client_cfg.h"
|
#include "../client_cfg.h"
|
||||||
|
#include "interface_manager.h"
|
||||||
|
|
||||||
// used for login cookie to be sent to the web server
|
// used for login cookie to be sent to the web server
|
||||||
#include "../net_manager.h"
|
#include "../net_manager.h"
|
||||||
|
@ -49,7 +50,7 @@ CGroupHTMLCS::~CGroupHTMLCS()
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
||||||
void CGroupHTMLCS::addHTTPGetParams (string &url)
|
void CGroupHTMLCS::addHTTPGetParams (string &url, bool /*trustedDomain*/)
|
||||||
{
|
{
|
||||||
url += ((url.find('?') != string::npos) ? "&" : "?");
|
url += ((url.find('?') != string::npos) ? "&" : "?");
|
||||||
|
|
||||||
|
@ -69,7 +70,7 @@ void CGroupHTMLCS::addHTTPGetParams (string &url)
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
||||||
void CGroupHTMLCS::addHTTPPostParams (HTAssocList *formfields)
|
void CGroupHTMLCS::addHTTPPostParams (HTAssocList *formfields, bool /*trustedDomain*/)
|
||||||
{
|
{
|
||||||
std::vector<CParameter> parameters;
|
std::vector<CParameter> parameters;
|
||||||
getParameters (parameters, false);
|
getParameters (parameters, false);
|
||||||
|
@ -120,6 +121,15 @@ void CGroupHTMLCS::getParameters (std::vector<CParameter> ¶meters, bool enco
|
||||||
string s = getDebugInformation();
|
string s = getDebugInformation();
|
||||||
s += getSystemInformation();
|
s += getSystemInformation();
|
||||||
|
|
||||||
|
static bool webIgReady = false;
|
||||||
|
|
||||||
|
if (!webIgReady) // Webig is ready when getParameters of CGroupHTMLCS is called
|
||||||
|
{
|
||||||
|
webIgReady = true;
|
||||||
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
|
pIM->executeLuaScript("game:onWebIgReady()");
|
||||||
|
}
|
||||||
|
|
||||||
// For each line
|
// For each line
|
||||||
string::size_type startOfLine = 0;
|
string::size_type startOfLine = 0;
|
||||||
string::size_type endOfLine;
|
string::size_type endOfLine;
|
||||||
|
|
|
@ -39,8 +39,8 @@ public:
|
||||||
~CGroupHTMLCS();
|
~CGroupHTMLCS();
|
||||||
|
|
||||||
// From CGroupHTML
|
// From CGroupHTML
|
||||||
virtual void addHTTPGetParams (std::string &url);
|
virtual void addHTTPGetParams (std::string &url, bool trustedDomain);
|
||||||
virtual void addHTTPPostParams (HTAssocList *formfields);
|
virtual void addHTTPPostParams (HTAssocList *formfields, bool trustedDomain);
|
||||||
virtual std::string home();
|
virtual std::string home();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -51,9 +51,9 @@ CGroupHTMLForum::~CGroupHTMLForum()
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
||||||
void CGroupHTMLForum::addHTTPGetParams (string &url)
|
void CGroupHTMLForum::addHTTPGetParams (string &url, bool /*trustedDomain*/)
|
||||||
{
|
{
|
||||||
ucstring user_name = UserEntity->getDisplayName ();
|
ucstring user_name = UserEntity->getLoginName ();
|
||||||
const SGuild &guild = CGuildManager::getInstance()->getGuild();
|
const SGuild &guild = CGuildManager::getInstance()->getGuild();
|
||||||
string gname = guild.Name.toUtf8();
|
string gname = guild.Name.toUtf8();
|
||||||
|
|
||||||
|
@ -83,9 +83,9 @@ void CGroupHTMLForum::addHTTPGetParams (string &url)
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
||||||
void CGroupHTMLForum::addHTTPPostParams (HTAssocList *formfields)
|
void CGroupHTMLForum::addHTTPPostParams (HTAssocList *formfields, bool /*trustedDomain*/)
|
||||||
{
|
{
|
||||||
ucstring user_name = UserEntity->getDisplayName ();
|
ucstring user_name = UserEntity->getLoginName ();
|
||||||
const SGuild &guild = CGuildManager::getInstance()->getGuild();
|
const SGuild &guild = CGuildManager::getInstance()->getGuild();
|
||||||
string gname = guild.Name.toUtf8();
|
string gname = guild.Name.toUtf8();
|
||||||
|
|
||||||
|
@ -115,12 +115,13 @@ string CGroupHTMLForum::home ()
|
||||||
|
|
||||||
void CGroupHTMLForum::handle ()
|
void CGroupHTMLForum::handle ()
|
||||||
{
|
{
|
||||||
// Do nothing if WebServer is not initialized
|
/* // Do nothing if WebServer is not initialized
|
||||||
if (!WebServer.empty())
|
if (!WebServer.empty())
|
||||||
{
|
{
|
||||||
Home = WebServer+"forum.php";
|
Home = WebServer+"forum.php";
|
||||||
CGroupHTML::handle ();
|
CGroupHTML::handle ();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
|
@ -39,8 +39,8 @@ public:
|
||||||
~CGroupHTMLForum();
|
~CGroupHTMLForum();
|
||||||
|
|
||||||
// From CGroupHTML
|
// From CGroupHTML
|
||||||
virtual void addHTTPGetParams (std::string &url);
|
virtual void addHTTPGetParams (std::string &url, bool trustedDomain);
|
||||||
virtual void addHTTPPostParams (HTAssocList *formfields);
|
virtual void addHTTPPostParams (HTAssocList *formfields, bool trustedDomain);
|
||||||
virtual std::string home();
|
virtual std::string home();
|
||||||
virtual void handle ();
|
virtual void handle ();
|
||||||
|
|
||||||
|
|
|
@ -50,9 +50,9 @@ CGroupHTMLMail::~CGroupHTMLMail()
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
||||||
void CGroupHTMLMail::addHTTPGetParams (string &url)
|
void CGroupHTMLMail::addHTTPGetParams (string &url, bool /*trustedDomain*/)
|
||||||
{
|
{
|
||||||
ucstring user_name = UserEntity->getDisplayName ();
|
ucstring user_name = UserEntity->getLoginName ();
|
||||||
url += ((url.find('?') != string::npos) ? "&" : "?") +
|
url += ((url.find('?') != string::npos) ? "&" : "?") +
|
||||||
string("shard=") + toString(CharacterHomeSessionId) +
|
string("shard=") + toString(CharacterHomeSessionId) +
|
||||||
string("&user_login=") + user_name.toString() +
|
string("&user_login=") + user_name.toString() +
|
||||||
|
@ -62,9 +62,9 @@ void CGroupHTMLMail::addHTTPGetParams (string &url)
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
||||||
void CGroupHTMLMail::addHTTPPostParams (HTAssocList *formfields)
|
void CGroupHTMLMail::addHTTPPostParams (HTAssocList *formfields, bool /*trustedDomain*/)
|
||||||
{
|
{
|
||||||
ucstring user_name = UserEntity->getDisplayName ();
|
ucstring user_name = UserEntity->getLoginName ();
|
||||||
HTParseFormInput(formfields, ("shard="+toString(CharacterHomeSessionId)).c_str());
|
HTParseFormInput(formfields, ("shard="+toString(CharacterHomeSessionId)).c_str());
|
||||||
HTParseFormInput(formfields, ("user_login="+user_name.toString()).c_str());
|
HTParseFormInput(formfields, ("user_login="+user_name.toString()).c_str());
|
||||||
HTParseFormInput(formfields, ("session_cookie="+NetMngr.getLoginCookie().toString()).c_str());
|
HTParseFormInput(formfields, ("session_cookie="+NetMngr.getLoginCookie().toString()).c_str());
|
||||||
|
@ -85,11 +85,12 @@ string CGroupHTMLMail::home ()
|
||||||
void CGroupHTMLMail::handle ()
|
void CGroupHTMLMail::handle ()
|
||||||
{
|
{
|
||||||
// Do nothing if WebServer is not initialized
|
// Do nothing if WebServer is not initialized
|
||||||
if (!WebServer.empty())
|
/* if (!WebServer.empty())
|
||||||
{
|
{
|
||||||
Home = WebServer+"mailbox.php";
|
Home = WebServer+"mailbox.php";
|
||||||
CGroupHTML::handle ();
|
CGroupHTML::handle ();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
|
@ -39,8 +39,8 @@ public:
|
||||||
~CGroupHTMLMail();
|
~CGroupHTMLMail();
|
||||||
|
|
||||||
// From CGroupHTML
|
// From CGroupHTML
|
||||||
virtual void addHTTPGetParams (std::string &url);
|
virtual void addHTTPGetParams (std::string &url, bool trustedDomain);
|
||||||
virtual void addHTTPPostParams (HTAssocList *formfields);
|
virtual void addHTTPPostParams (HTAssocList *formfields, bool trustedDomain);
|
||||||
virtual std::string home();
|
virtual std::string home();
|
||||||
virtual void handle ();
|
virtual void handle ();
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "game_share/xml_auto_ptr.h"
|
#include "game_share/xml_auto_ptr.h"
|
||||||
#include "../client_cfg.h"
|
#include "../client_cfg.h"
|
||||||
#include "../user_entity.h"
|
#include "../user_entity.h"
|
||||||
|
#include "../entities.h"
|
||||||
#include "interface_manager.h"
|
#include "interface_manager.h"
|
||||||
|
|
||||||
// used for login cookie to be sent to the web server
|
// used for login cookie to be sent to the web server
|
||||||
|
@ -55,7 +56,7 @@ static string getWebAuthKey()
|
||||||
// authkey = <sharid><name><cid><cookie>
|
// authkey = <sharid><name><cid><cookie>
|
||||||
uint32 cid = NetMngr.getLoginCookie().getUserId() * 16 + PlayerSelectedSlot;
|
uint32 cid = NetMngr.getLoginCookie().getUserId() * 16 + PlayerSelectedSlot;
|
||||||
string rawKey = toString(CharacterHomeSessionId) +
|
string rawKey = toString(CharacterHomeSessionId) +
|
||||||
UserEntity->getDisplayName().toString() +
|
UserEntity->getLoginName().toString() +
|
||||||
toString(cid) +
|
toString(cid) +
|
||||||
NetMngr.getLoginCookie().toString();
|
NetMngr.getLoginCookie().toString();
|
||||||
string key = getMD5((const uint8*)rawKey.c_str(), (uint32)rawKey.size()).toString();
|
string key = getMD5((const uint8*)rawKey.c_str(), (uint32)rawKey.size()).toString();
|
||||||
|
@ -64,18 +65,72 @@ static string getWebAuthKey()
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
void addWebIGParams (string &url)
|
void addWebIGParams (string &url, bool trustedDomain)
|
||||||
{
|
{
|
||||||
if(!UserEntity || !NetMngr.getLoginCookie().isValid()) return;
|
if(!UserEntity || !NetMngr.getLoginCookie().isValid()) return;
|
||||||
|
|
||||||
uint32 cid = NetMngr.getLoginCookie().getUserId() * 16 + PlayerSelectedSlot;
|
uint32 cid = NetMngr.getLoginCookie().getUserId() * 16 + PlayerSelectedSlot;
|
||||||
url += ((url.find('?') != string::npos) ? "&" : "?") +
|
url += ((url.find('?') != string::npos) ? "&" : "?") +
|
||||||
string("shardid=") + toString(CharacterHomeSessionId) +
|
string("shardid=") + toString(CharacterHomeSessionId) +
|
||||||
string("&name=") + UserEntity->getDisplayName().toUtf8() +
|
string("&name=") + UserEntity->getLoginName().toUtf8() +
|
||||||
string("&cid=") + toString(cid) +
|
string("&lang=") + CI18N::getCurrentLanguageCode() +
|
||||||
string("&authkey=") + getWebAuthKey() +
|
string("&datasetid=") + toString(UserEntity->dataSetId()) +
|
||||||
string("&ig=1") +
|
string("&ig=1");
|
||||||
string("&lang=") + CI18N::getCurrentLanguageCode();
|
if (trustedDomain)
|
||||||
|
{
|
||||||
|
url += string("&cid=") + toString(cid) +
|
||||||
|
string("&authkey=") + getWebAuthKey();
|
||||||
|
|
||||||
|
if (url.find('$') != string::npos)
|
||||||
|
{
|
||||||
|
strFindReplace(url, "$gender$", GSGENDER::toString(UserEntity->getGender()));
|
||||||
|
strFindReplace(url, "$displayName$", UserEntity->getDisplayName().toString());
|
||||||
|
strFindReplace(url, "$posx$", toString(UserEntity->pos().x));
|
||||||
|
strFindReplace(url, "$posy$", toString(UserEntity->pos().y));
|
||||||
|
strFindReplace(url, "$posz$", toString(UserEntity->pos().z));
|
||||||
|
strFindReplace(url, "$post$", toString(atan2(UserEntity->front().y, UserEntity->front().x)));
|
||||||
|
|
||||||
|
// Target fields
|
||||||
|
const char *dbPath = "UI:VARIABLES:TARGET:SLOT";
|
||||||
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
|
CCDBNodeLeaf *node = im->getDbProp(dbPath, false);
|
||||||
|
if (node && (uint8)node->getValue32() != (uint8) CLFECOMMON::INVALID_SLOT)
|
||||||
|
{
|
||||||
|
CEntityCL *target = EntitiesMngr.entity((uint) node->getValue32());
|
||||||
|
if (target)
|
||||||
|
{
|
||||||
|
strFindReplace(url, "$tdatasetid$", toString(target->dataSetId()));
|
||||||
|
strFindReplace(url, "$tdisplayName$", target->getDisplayName().toString());
|
||||||
|
strFindReplace(url, "$tposx$", toString(target->pos().x));
|
||||||
|
strFindReplace(url, "$tposy$", toString(target->pos().y));
|
||||||
|
strFindReplace(url, "$tposz$", toString(target->pos().z));
|
||||||
|
strFindReplace(url, "$tpost$", toString(atan2(target->front().y, target->front().x)));
|
||||||
|
strFindReplace(url, "$tsheet$", target->sheetId().toString());
|
||||||
|
string type;
|
||||||
|
if (target->isFauna())
|
||||||
|
type = "fauna";
|
||||||
|
else if (target->isNPC())
|
||||||
|
type = "npc";
|
||||||
|
else if (target->isPlayer())
|
||||||
|
type = "player";
|
||||||
|
else if (target->isUser())
|
||||||
|
type = "user";
|
||||||
|
strFindReplace(url, "$ttype$", target->sheetId().toString());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
strFindReplace(url, "$tdatasetid$", "");
|
||||||
|
strFindReplace(url, "$tdisplayName$", "");
|
||||||
|
strFindReplace(url, "$tposx$", "");
|
||||||
|
strFindReplace(url, "$tposy$", "");
|
||||||
|
strFindReplace(url, "$tposz$", "");
|
||||||
|
strFindReplace(url, "$tpost$", "");
|
||||||
|
strFindReplace(url, "$tsheet$", "");
|
||||||
|
strFindReplace(url, "$ttype$", "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
@ -204,7 +259,7 @@ struct CWebigNotificationThread : public NLMISC::IRunnable
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
string url = "http://"+ClientCfg.WebIgMainDomain+"/start/index.php?app=notif&rnd="+randomString();
|
string url = "http://"+ClientCfg.WebIgMainDomain+"/start/index.php?app=notif&rnd="+randomString();
|
||||||
addWebIGParams(url);
|
addWebIGParams(url, true);
|
||||||
get(url);
|
get(url);
|
||||||
nlSleep(10*60*1000);
|
nlSleep(10*60*1000);
|
||||||
}
|
}
|
||||||
|
@ -230,11 +285,66 @@ void startWebigNotificationThread()
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
NLMISC_REGISTER_OBJECT(CViewBase, CGroupHTMLAuth, std::string, "auth_html");
|
||||||
|
|
||||||
|
CGroupHTMLAuth::CGroupHTMLAuth(const TCtorParam ¶m)
|
||||||
|
: CGroupHTML(param)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
|
||||||
|
CGroupHTMLAuth::~CGroupHTMLAuth()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGroupHTMLAuth::addHTTPGetParams (string &url, bool trustedDomain)
|
||||||
|
{
|
||||||
|
addWebIGParams(url, trustedDomain);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
|
||||||
|
void CGroupHTMLAuth::addHTTPPostParams (HTAssocList *formfields, bool trustedDomain)
|
||||||
|
{
|
||||||
|
if(!UserEntity) return;
|
||||||
|
|
||||||
|
uint32 cid = NetMngr.getLoginCookie().getUserId() * 16 + PlayerSelectedSlot;
|
||||||
|
HTParseFormInput(formfields, ("shardid="+toString(CharacterHomeSessionId)).c_str());
|
||||||
|
HTParseFormInput(formfields, ("name="+UserEntity->getLoginName().toUtf8()).c_str());
|
||||||
|
HTParseFormInput(formfields, ("lang="+CI18N::getCurrentLanguageCode()).c_str());
|
||||||
|
HTParseFormInput(formfields, "ig=1");
|
||||||
|
if (trustedDomain)
|
||||||
|
{
|
||||||
|
HTParseFormInput(formfields, ("cid="+toString(cid)).c_str());
|
||||||
|
HTParseFormInput(formfields, ("authkey="+getWebAuthKey()).c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
|
||||||
|
string CGroupHTMLAuth::home ()
|
||||||
|
{
|
||||||
|
return Home;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
|
||||||
|
void CGroupHTMLAuth::handle ()
|
||||||
|
{
|
||||||
|
CGroupHTML::handle ();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
// ***************************************************************************
|
||||||
|
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
NLMISC_REGISTER_OBJECT(CViewBase, CGroupHTMLWebIG, std::string, "webig_html");
|
NLMISC_REGISTER_OBJECT(CViewBase, CGroupHTMLWebIG, std::string, "webig_html");
|
||||||
|
|
||||||
CGroupHTMLWebIG::CGroupHTMLWebIG(const TCtorParam ¶m)
|
CGroupHTMLWebIG::CGroupHTMLWebIG(const TCtorParam ¶m)
|
||||||
: CGroupHTML(param)
|
: CGroupHTMLAuth(param)
|
||||||
{
|
{
|
||||||
startWebigNotificationThread();
|
startWebigNotificationThread();
|
||||||
}
|
}
|
||||||
|
@ -245,24 +355,18 @@ CGroupHTMLWebIG::~CGroupHTMLWebIG()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGroupHTMLWebIG::addHTTPGetParams (string &url)
|
// ***************************************************************************
|
||||||
|
|
||||||
|
void CGroupHTMLWebIG::addHTTPGetParams (string &url, bool trustedDomain)
|
||||||
{
|
{
|
||||||
addWebIGParams(url);
|
CGroupHTMLAuth::addHTTPGetParams(url, trustedDomain);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
||||||
void CGroupHTMLWebIG::addHTTPPostParams (HTAssocList *formfields)
|
void CGroupHTMLWebIG::addHTTPPostParams (HTAssocList *formfields, bool trustedDomain)
|
||||||
{
|
{
|
||||||
if(!UserEntity) return;
|
CGroupHTMLAuth::addHTTPPostParams(formfields, trustedDomain);
|
||||||
|
|
||||||
uint32 cid = NetMngr.getLoginCookie().getUserId() * 16 + PlayerSelectedSlot;
|
|
||||||
HTParseFormInput(formfields, ("shardid="+toString(CharacterHomeSessionId)).c_str());
|
|
||||||
HTParseFormInput(formfields, ("name="+UserEntity->getDisplayName().toUtf8()).c_str());
|
|
||||||
HTParseFormInput(formfields, ("cid="+toString(cid)).c_str());
|
|
||||||
HTParseFormInput(formfields, ("authkey="+getWebAuthKey()).c_str());
|
|
||||||
HTParseFormInput(formfields, "ig=1");
|
|
||||||
HTParseFormInput(formfields, ("lang="+CI18N::getCurrentLanguageCode()).c_str());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
@ -276,8 +380,6 @@ string CGroupHTMLWebIG::home ()
|
||||||
|
|
||||||
void CGroupHTMLWebIG::handle ()
|
void CGroupHTMLWebIG::handle ()
|
||||||
{
|
{
|
||||||
// Home = "http://atys.ryzom.com/start/index.php";
|
CGroupHTMLAuth::handle ();
|
||||||
CGroupHTML::handle ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
|
||||||
|
|
|
@ -20,10 +20,32 @@
|
||||||
#include "nel/misc/types_nl.h"
|
#include "nel/misc/types_nl.h"
|
||||||
#include "group_html.h"
|
#include "group_html.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Auth HTML group
|
||||||
|
*/
|
||||||
|
class CGroupHTMLAuth : public CGroupHTML
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Constructor
|
||||||
|
CGroupHTMLAuth(const TCtorParam ¶m);
|
||||||
|
~CGroupHTMLAuth();
|
||||||
|
|
||||||
|
// From CGroupHTML
|
||||||
|
virtual void addHTTPGetParams (std::string &url, bool trustedDomain);
|
||||||
|
virtual void addHTTPPostParams (HTAssocList *formfields, bool trustedDomain);
|
||||||
|
virtual std::string home();
|
||||||
|
virtual void handle ();
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WebIG HTML group
|
* WebIG HTML group
|
||||||
*/
|
*/
|
||||||
class CGroupHTMLWebIG : public CGroupHTML
|
class CGroupHTMLWebIG : public CGroupHTMLAuth
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -31,9 +53,9 @@ public:
|
||||||
CGroupHTMLWebIG(const TCtorParam ¶m);
|
CGroupHTMLWebIG(const TCtorParam ¶m);
|
||||||
~CGroupHTMLWebIG();
|
~CGroupHTMLWebIG();
|
||||||
|
|
||||||
// From CGroupHTML
|
/// From CGroupHTMLAuth
|
||||||
virtual void addHTTPGetParams (std::string &url);
|
virtual void addHTTPGetParams (std::string &url, bool trustedDomain);
|
||||||
virtual void addHTTPPostParams (HTAssocList *formfields);
|
virtual void addHTTPPostParams (HTAssocList *formfields, bool trustedDomain);
|
||||||
virtual std::string home();
|
virtual std::string home();
|
||||||
virtual void handle ();
|
virtual void handle ();
|
||||||
|
|
||||||
|
|
|
@ -973,6 +973,132 @@ void CGroupInSceneBubbleManager::dynChatOpen (uint32 nBotUID, uint32 nBotName, c
|
||||||
UserEntity->interlocutor( pChar->slot() );
|
UserEntity->interlocutor( pChar->slot() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
|
||||||
|
void CGroupInSceneBubbleManager::webIgChatOpen (uint32 nBotUID, string text, const vector<string> &strs, const vector<string> &links)
|
||||||
|
{
|
||||||
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
|
// If the character doesn't exist in view field -> do not display the bubble
|
||||||
|
|
||||||
|
CEntityCL *pEntity = EntitiesMngr.getEntityByCompressedIndex(nBotUID);
|
||||||
|
CCharacterCL *pChar = dynamic_cast<CCharacterCL*>(pEntity);
|
||||||
|
if (pChar == NULL)
|
||||||
|
{
|
||||||
|
nlwarning("character probably too far");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Look if we get a bubble with this nBotUID ?
|
||||||
|
uint32 pos, j;
|
||||||
|
for (pos = 0; pos < _DynBubbles.size(); ++pos)
|
||||||
|
{
|
||||||
|
if (_DynBubbles[pos].BotUID == nBotUID)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If the bubble doesn't exist -> create
|
||||||
|
CGroupInSceneBubble *bubble = NULL;
|
||||||
|
string id;
|
||||||
|
if (pos == _DynBubbles.size())
|
||||||
|
{
|
||||||
|
uint32 i = 0;
|
||||||
|
while (getDynBubble(i) != NULL) i++;
|
||||||
|
id = "in_scene_webig_bubble_" + toString(i);
|
||||||
|
// Create the instance
|
||||||
|
std::vector<std::pair<std::string,std::string> > templateParams;
|
||||||
|
templateParams.push_back (std::pair<std::string,std::string>("id", id));
|
||||||
|
|
||||||
|
CInterfaceGroup *group = pIM->createGroupInstance ("webig_3dbulle_L", "ui:interface", templateParams);
|
||||||
|
if (group == NULL)
|
||||||
|
{
|
||||||
|
nlwarning("cannot create webig_3dbulle_L");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Link to the interface
|
||||||
|
pIM->addWindowToMasterGroup("ui:interface", group);
|
||||||
|
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface"));
|
||||||
|
group->setParent(pRoot);
|
||||||
|
if (pRoot)
|
||||||
|
pRoot->addGroup (group);
|
||||||
|
group->setActive(false);
|
||||||
|
|
||||||
|
bubble = dynamic_cast<CGroupInSceneBubble*>(group);
|
||||||
|
if (bubble == NULL)
|
||||||
|
{
|
||||||
|
nlwarning("cannot cast to CGroupInSceneBubble");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
CDynBubble dynBubble;
|
||||||
|
dynBubble.BotName = 0;
|
||||||
|
dynBubble.BotUID = nBotUID;
|
||||||
|
dynBubble.Bubble = bubble;
|
||||||
|
_DynBubbles.push_back(dynBubble);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bubble = _DynBubbles[pos].Bubble;
|
||||||
|
// Remove from group to delete if in the same frame
|
||||||
|
for (j=0; j<_GroupToDelete.size(); j++)
|
||||||
|
if (_GroupToDelete[j] == bubble)
|
||||||
|
{
|
||||||
|
_GroupToDelete.erase(_GroupToDelete.begin()+j);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update the bubble's texts
|
||||||
|
|
||||||
|
ucstring ucText;
|
||||||
|
ucText.fromUtf8(text);
|
||||||
|
bubble->setText(ucText);
|
||||||
|
id = bubble->getId() + ":header_opened:window:";
|
||||||
|
CViewText *pVT;
|
||||||
|
CCtrlLink *pCL;
|
||||||
|
|
||||||
|
_DynBubbles[pos].DescWaiting = 0;
|
||||||
|
|
||||||
|
for (j = 0; j < 8; ++j)
|
||||||
|
{
|
||||||
|
pVT = dynamic_cast<CViewText*>(bubble->getElement(id+"opt"+toString(j)));
|
||||||
|
if (pVT != NULL)
|
||||||
|
{
|
||||||
|
pVT->setActive(false);
|
||||||
|
pVT->setText(ucstring(""));
|
||||||
|
}
|
||||||
|
pCL = dynamic_cast<CCtrlLink*>(bubble->getElement(id+"optb"+toString(j)));
|
||||||
|
if (pCL != NULL) pCL->setActive(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (j = 0; j < strs.size(); ++j)
|
||||||
|
{
|
||||||
|
string fullid = id+"opt"+toString(j);
|
||||||
|
pVT = dynamic_cast<CViewText*>(bubble->getElement(id+"opt"+toString(j)));
|
||||||
|
if (pVT != NULL)
|
||||||
|
{
|
||||||
|
pVT->setActive(true);
|
||||||
|
ucstring optionText;
|
||||||
|
optionText.fromUtf8(strs[j]);
|
||||||
|
pVT->setText(optionText);
|
||||||
|
pCL = dynamic_cast<CCtrlLink*>(bubble->getElement(id+"optb"+toString(j)));
|
||||||
|
if (pCL != NULL)
|
||||||
|
{
|
||||||
|
pCL->setActionOnLeftClick("browse");
|
||||||
|
pCL->setParamsOnLeftClick("name=ui:interface:web_transactions:content:html|show=0|url="+links[j]);
|
||||||
|
//pCL->setActionOnLeftClickParams("name=ui:interface:web_transactions:content:html|url="+links[j]);
|
||||||
|
pCL->setActive(true);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Link bubble to the character
|
||||||
|
pChar->setBubble(bubble);
|
||||||
|
|
||||||
|
// Make the npc face the character
|
||||||
|
UserEntity->interlocutor( pChar->slot() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
uint32 CGroupInSceneBubbleManager::CDynBubble::getOptionStringId(uint option)
|
uint32 CGroupInSceneBubbleManager::CDynBubble::getOptionStringId(uint option)
|
||||||
{
|
{
|
||||||
if (!Bubble) return 0;
|
if (!Bubble) return 0;
|
||||||
|
|
|
@ -64,6 +64,9 @@ public:
|
||||||
// Open a Dynamic Chat
|
// Open a Dynamic Chat
|
||||||
void dynChatOpen (uint32 nBotUID, uint32 nBotName, const std::vector<uint32> &DynStrs);
|
void dynChatOpen (uint32 nBotUID, uint32 nBotName, const std::vector<uint32> &DynStrs);
|
||||||
|
|
||||||
|
// Open a Dynamic Chat from webig
|
||||||
|
void webIgChatOpen (uint32 nBotUID, std::string sBotName, const std::vector<std::string> &strs, const std::vector<std::string> &links);
|
||||||
|
|
||||||
// Close a Dynamic Chat
|
// Close a Dynamic Chat
|
||||||
void dynChatClose (uint32 nBotUID);
|
void dynChatClose (uint32 nBotUID);
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ CRGBA CGroupInSceneUserInfo::BarColorHPNegative = CRGBA(127, 32, 0);
|
||||||
#define nlfsinfo2 if ( _Entity->isForageSource() ) nlinfo
|
#define nlfsinfo2 if ( _Entity->isForageSource() ) nlinfo
|
||||||
|
|
||||||
|
|
||||||
CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (class CEntityCL *entity)
|
CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
|
||||||
{
|
{
|
||||||
// Get the interface manager
|
// Get the interface manager
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
|
@ -129,6 +129,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (class CEntityCL *entity)
|
||||||
bool forageSourceBarDisplayed= false;
|
bool forageSourceBarDisplayed= false;
|
||||||
bool needPvPLogo= false;
|
bool needPvPLogo= false;
|
||||||
bool permanentContent = false;
|
bool permanentContent = false;
|
||||||
|
bool rpTags = false;
|
||||||
bool displayMissionIcons = pIM->getDbProp("UI:SAVE:INSCENE:FRIEND:MISSION_ICON")->getValueBool();
|
bool displayMissionIcons = pIM->getDbProp("UI:SAVE:INSCENE:FRIEND:MISSION_ICON")->getValueBool();
|
||||||
|
|
||||||
// Names
|
// Names
|
||||||
|
@ -136,6 +137,12 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (class CEntityCL *entity)
|
||||||
ucstring theTribeName;
|
ucstring theTribeName;
|
||||||
ucstring entityName = entity->getDisplayName();
|
ucstring entityName = entity->getDisplayName();
|
||||||
ucstring entityTitle = entity->getTitle();
|
ucstring entityTitle = entity->getTitle();
|
||||||
|
|
||||||
|
ucstring entityTag1 = entity->getTag(1);
|
||||||
|
ucstring entityTag2 = entity->getTag(2);
|
||||||
|
ucstring entityTag3 = entity->getTag(3);
|
||||||
|
ucstring entityTag4 = entity->getTag(4);
|
||||||
|
|
||||||
string entityPermanentContent = entity->getPermanentStatutIcon();
|
string entityPermanentContent = entity->getPermanentStatutIcon();
|
||||||
|
|
||||||
// Active fields and bars
|
// Active fields and bars
|
||||||
|
@ -160,6 +167,8 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (class CEntityCL *entity)
|
||||||
}
|
}
|
||||||
else if(npcFriendAndNeutral)
|
else if(npcFriendAndNeutral)
|
||||||
{
|
{
|
||||||
|
string dbEntry;
|
||||||
|
getBarSettings( pIM, user, entity->isPlayer(), _friend, dbEntry, bars );
|
||||||
// For RoleMasters, merchants etc... must display name and function, and nothing else
|
// For RoleMasters, merchants etc... must display name and function, and nothing else
|
||||||
for(uint i=0;i<NumBars;i++)
|
for(uint i=0;i<NumBars;i++)
|
||||||
bars[i]= false;
|
bars[i]= false;
|
||||||
|
@ -168,6 +177,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (class CEntityCL *entity)
|
||||||
title= true;
|
title= true;
|
||||||
guildName= false;
|
guildName= false;
|
||||||
templateName = "in_scene_user_info";
|
templateName = "in_scene_user_info";
|
||||||
|
rpTags = (!entityTag1.empty() || !entityTag2.empty() || !entityTag3.empty() || !entityTag4.empty() ) && pIM->getDbProp(dbEntry+"RPTAGS")->getValueBool();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -176,6 +186,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (class CEntityCL *entity)
|
||||||
getBarSettings( pIM, user, entity->isPlayer(), _friend, dbEntry, bars );
|
getBarSettings( pIM, user, entity->isPlayer(), _friend, dbEntry, bars );
|
||||||
name = !entityName.empty() && pIM->getDbProp(dbEntry+"NAME")->getValueBool();
|
name = !entityName.empty() && pIM->getDbProp(dbEntry+"NAME")->getValueBool();
|
||||||
title = !entityTitle.empty() && pIM->getDbProp(dbEntry+"TITLE")->getValueBool();
|
title = !entityTitle.empty() && pIM->getDbProp(dbEntry+"TITLE")->getValueBool();
|
||||||
|
rpTags = (!entityTag1.empty() || !entityTag2.empty() || !entityTag3.empty() || !entityTag4.empty() ) && pIM->getDbProp(dbEntry+"RPTAGS")->getValueBool();
|
||||||
// if name is empty but not title, title is displayed as name
|
// if name is empty but not title, title is displayed as name
|
||||||
if (!title && entityName.empty() && !entityTitle.empty() && pIM->getDbProp(dbEntry+"NAME")->getValueBool())
|
if (!title && entityName.empty() && !entityTitle.empty() && pIM->getDbProp(dbEntry+"NAME")->getValueBool())
|
||||||
title = true;
|
title = true;
|
||||||
|
@ -369,6 +380,26 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (class CEntityCL *entity)
|
||||||
else
|
else
|
||||||
stringSpace += textH;
|
stringSpace += textH;
|
||||||
|
|
||||||
|
if (rpTags)
|
||||||
|
{
|
||||||
|
CPlayerCL * pPlayer = dynamic_cast<CPlayerCL*>(entity);
|
||||||
|
CViewBitmap *bitmap;
|
||||||
|
if (pPlayer == NULL || (pPlayer != NULL && pPlayer->getPvpMode() & PVP_MODE::PvpFaction))
|
||||||
|
{
|
||||||
|
bitmap = dynamic_cast<CViewBitmap*>(leftGroup->getView ("rp_logo_1"));
|
||||||
|
if (bitmap)
|
||||||
|
bitmap->setTexture(entityTag1.toString());
|
||||||
|
bitmap = dynamic_cast<CViewBitmap*>(leftGroup->getView ("rp_logo_2"));
|
||||||
|
if (bitmap)
|
||||||
|
bitmap->setTexture(entityTag2.toString());
|
||||||
|
}
|
||||||
|
bitmap = dynamic_cast<CViewBitmap*>(leftGroup->getView ("rp_logo_3"));
|
||||||
|
if (bitmap)
|
||||||
|
bitmap->setTexture(entityTag3.toString());
|
||||||
|
bitmap = dynamic_cast<CViewBitmap*>(leftGroup->getView ("rp_logo_4"));
|
||||||
|
if (bitmap)
|
||||||
|
bitmap->setTexture(entityTag4.toString());
|
||||||
|
}
|
||||||
|
|
||||||
// Get the permanent content bitmap
|
// Get the permanent content bitmap
|
||||||
if(permanentContent)
|
if(permanentContent)
|
||||||
|
@ -539,162 +570,96 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (class CEntityCL *entity)
|
||||||
info->_MissionTarget = bitmap;
|
info->_MissionTarget = bitmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
CViewBase * pvpCivLogo = info->getView ("pvp_faction_civ_logo");
|
CViewBase * pvpFactionLogo = info->getView ("pvp_faction_logo");
|
||||||
CViewBase * pvpCultLogo = info->getView ("pvp_faction_cult_logo");
|
CViewBase * pvpOutpostLogo = info->getView ("pvp_outpost_logo");
|
||||||
|
CViewBase * pvpDuelLogo = info->getView ("pvp_duel_logo");
|
||||||
|
|
||||||
CPlayerCL * pPlayer = dynamic_cast<CPlayerCL*>(entity);
|
CPlayerCL * pPlayer = dynamic_cast<CPlayerCL*>(entity);
|
||||||
if (pPlayer == NULL)
|
if (pPlayer == NULL)
|
||||||
needPvPLogo = false;
|
needPvPLogo = false;
|
||||||
|
|
||||||
// set or inactive pvp logos
|
|
||||||
bool needCivPvpLogo = needPvPLogo;
|
|
||||||
bool needCultPvpLogo = needPvPLogo;
|
|
||||||
|
|
||||||
if (pPlayer != NULL && needPvPLogo && pvpCivLogo && pvpCultLogo)
|
if (pPlayer != NULL && needPvPLogo)
|
||||||
{
|
{
|
||||||
uint8 civToDisplay = (uint8)(pPlayer->getClanCivMaxFame() & 0xFF);
|
if (pvpFactionLogo)
|
||||||
uint8 cultToDisplay = (uint8)(pPlayer->getClanCultMaxFame() & 0xFF);
|
|
||||||
|
|
||||||
if (!entity->isUser())
|
|
||||||
{
|
{
|
||||||
bool civEnnemies = false;
|
pvpFactionLogo->setActive(true);
|
||||||
for (uint8 i = 0; i < 4; i++)
|
CViewBitmap * pvpFactionBitmap = dynamic_cast<CViewBitmap *>(pvpFactionLogo);
|
||||||
|
if( pvpFactionBitmap )
|
||||||
{
|
{
|
||||||
if ( (pPlayer->isPvpAlly(i) && UserEntity->isPvpEnnemy(i)) ||
|
if (user)
|
||||||
(pPlayer->isPvpEnnemy(i) && UserEntity->isPvpAlly(i)) )
|
|
||||||
{
|
{
|
||||||
civEnnemies = true;
|
if (pPlayer->getPvpMode() & PVP_MODE::PvpChallenge)
|
||||||
if ( civToDisplay == i)
|
|
||||||
break;
|
|
||||||
else
|
|
||||||
civToDisplay = i;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!civEnnemies)
|
|
||||||
{
|
|
||||||
if ( (pPlayer->isPvpAlly(i) && UserEntity->isPvpAlly(i)) ||
|
|
||||||
(pPlayer->isPvpEnnemy(i) && UserEntity->isPvpEnnemy(i)) )
|
|
||||||
{
|
{
|
||||||
if ( civToDisplay == i)
|
pvpFactionBitmap->setTexture("ico_curse.tga");
|
||||||
break;
|
}
|
||||||
else
|
else if (pPlayer->getPvpMode() & PVP_MODE::PvpFaction)
|
||||||
civToDisplay = i;
|
{
|
||||||
|
if (pPlayer->getPvpMode() & PVP_MODE::PvpZoneSafe)
|
||||||
|
pvpFactionBitmap->setTexture("pvp_neutral.tga");
|
||||||
|
else
|
||||||
|
pvpFactionBitmap->setTexture("pvp_enemy_tag.tga");
|
||||||
|
}
|
||||||
|
else if (pPlayer->getPvpMode() & PVP_MODE::PvpFactionFlagged)
|
||||||
|
{
|
||||||
|
if (pPlayer->getPvpMode() & PVP_MODE::PvpSafe)
|
||||||
|
pvpFactionBitmap->setTexture("pvp_neutral.tga");
|
||||||
|
else
|
||||||
|
pvpFactionBitmap->setTexture("pvp_enemy_flag.tga");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
for (uint8 i = 4; i < 7; i++)
|
|
||||||
{
|
|
||||||
if ( (pPlayer->isPvpAlly(i) && UserEntity->isPvpEnnemy(i)) ||
|
|
||||||
(pPlayer->isPvpEnnemy(i) && UserEntity->isPvpAlly(i)) )
|
|
||||||
{
|
|
||||||
if ( cultToDisplay == i)
|
|
||||||
break;
|
|
||||||
else
|
else
|
||||||
cultToDisplay = i;
|
pvpFactionLogo->setActive(false);
|
||||||
}
|
|
||||||
|
|
||||||
if ( (pPlayer->isPvpAlly(i) && UserEntity->isPvpAlly(i)) ||
|
|
||||||
(pPlayer->isPvpEnnemy(i) && UserEntity->isPvpEnnemy(i)) )
|
|
||||||
{
|
|
||||||
if ( cultToDisplay == i)
|
|
||||||
break;
|
|
||||||
else
|
|
||||||
cultToDisplay = i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((pPlayer->getPvpMode() & PVP_MODE::PvpFaction) || (pPlayer->getPvpMode() & PVP_MODE::PvpFactionFlagged))
|
|
||||||
{
|
|
||||||
CViewBitmap * pvpCivLogoBmp = dynamic_cast<CViewBitmap *>(pvpCivLogo);
|
|
||||||
if( pvpCivLogoBmp )
|
|
||||||
{
|
|
||||||
if (pPlayer->isPvpAlly(civToDisplay))
|
|
||||||
{
|
|
||||||
if (pPlayer->isPvpRanger())
|
|
||||||
pvpCivLogoBmp->setTexture("pvp_ally_ranger.tga");
|
|
||||||
else
|
|
||||||
pvpCivLogoBmp->setTexture("pvp_ally_"+toString(civToDisplay)+".tga");
|
|
||||||
}
|
|
||||||
else if (pPlayer->isPvpEnnemy(civToDisplay))
|
|
||||||
{
|
|
||||||
if (pPlayer->isPvpMarauder())
|
|
||||||
pvpCivLogoBmp->setTexture("pvp_enemy_marauder.tga");
|
|
||||||
else
|
|
||||||
pvpCivLogoBmp->setTexture("pvp_enemy_"+toString(civToDisplay)+".tga");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
needCivPvpLogo = false;
|
if (pPlayer->getPvpMode() & PVP_MODE::PvpChallenge)
|
||||||
}
|
pvpFactionBitmap->setTexture("ico_curse.tga");
|
||||||
}
|
else if (pPlayer->isNeutralPVP())
|
||||||
|
pvpFactionBitmap->setTexture("pvp_neutral.tga");
|
||||||
CViewBitmap * pvpCultLogoBmp = dynamic_cast<CViewBitmap *>(pvpCultLogo);
|
else if (pPlayer->isAlly() && (pPlayer->getPvpMode() & PVP_MODE::PvpFactionFlagged))
|
||||||
if( pvpCultLogoBmp )
|
pvpFactionBitmap->setTexture("pvp_ally_flag.tga");
|
||||||
{
|
else if (pPlayer->isAlly() && (pPlayer->getPvpMode() & PVP_MODE::PvpFaction))
|
||||||
if (pPlayer->isPvpAlly(cultToDisplay))
|
pvpFactionBitmap->setTexture("pvp_ally_tag.tga");
|
||||||
{
|
else if (pPlayer->isEnemy() && (pPlayer->getPvpMode() & PVP_MODE::PvpFactionFlagged))
|
||||||
if (pPlayer->isPvpPrimas())
|
pvpFactionBitmap->setTexture("pvp_enemy_flag.tga");
|
||||||
pvpCultLogoBmp->setTexture("pvp_ally_primas.tga");
|
else if (pPlayer->isEnemy() && (pPlayer->getPvpMode() & PVP_MODE::PvpFaction))
|
||||||
|
pvpFactionBitmap->setTexture("pvp_enemy_tag.tga");
|
||||||
|
else if (pPlayer->getPvpMode() & PVP_MODE::PvpFactionFlagged)
|
||||||
|
pvpFactionBitmap->setTexture("pvp_enemy_flag.tga");
|
||||||
|
else if (pPlayer->getPvpMode() & PVP_MODE::PvpFaction)
|
||||||
|
pvpFactionBitmap->setTexture("pvp_enemy_tag.tga");
|
||||||
else
|
else
|
||||||
pvpCultLogoBmp->setTexture("pvp_ally_"+toString(cultToDisplay)+".tga");
|
pvpFactionLogo->setActive(false);
|
||||||
}
|
|
||||||
else if (pPlayer->isPvpEnnemy(cultToDisplay))
|
|
||||||
{
|
|
||||||
if (pPlayer->isPvpTrytonist())
|
|
||||||
pvpCultLogoBmp->setTexture("pvp_enemy_trytonist.tga");
|
|
||||||
else
|
|
||||||
pvpCultLogoBmp->setTexture("pvp_enemy_"+toString(cultToDisplay)+".tga");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
needCultPvpLogo = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
needCivPvpLogo = false;
|
|
||||||
needCultPvpLogo = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
CViewBase * pvpOutpostLogo = info->getView ("pvp_outpost_logo");
|
|
||||||
if (pvpOutpostLogo)
|
if (pvpOutpostLogo)
|
||||||
{
|
{
|
||||||
if( pPlayer->getOutpostId() == 0 )
|
if( pPlayer->getOutpostId() != 0 )
|
||||||
{
|
pvpOutpostLogo->setActive(true);
|
||||||
|
else
|
||||||
pvpOutpostLogo->setActive(false);
|
pvpOutpostLogo->setActive(false);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CViewBase * pvpDuelLogo = info->getView ("pvp_duel_logo");
|
|
||||||
if (pvpDuelLogo)
|
if (pvpDuelLogo)
|
||||||
{
|
{
|
||||||
if( !(pPlayer->getPvpMode()&PVP_MODE::PvpDuel || pPlayer->getPvpMode()&PVP_MODE::PvpChallenge) )
|
if( pPlayer->getPvpMode()&PVP_MODE::PvpDuel )
|
||||||
{
|
pvpDuelLogo->setActive(true);
|
||||||
|
else
|
||||||
pvpDuelLogo->setActive(false);
|
pvpDuelLogo->setActive(false);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CViewBase * pvpOutpostLogo = info->getView ("pvp_outpost_logo");
|
if (pvpFactionLogo)
|
||||||
|
pvpFactionLogo->setActive(false);
|
||||||
if (pvpOutpostLogo)
|
if (pvpOutpostLogo)
|
||||||
pvpOutpostLogo->setActive(false);
|
pvpOutpostLogo->setActive(false);
|
||||||
|
|
||||||
CViewBase * pvpDuelLogo = info->getView ("pvp_duel_logo");
|
|
||||||
if (pvpDuelLogo)
|
if (pvpDuelLogo)
|
||||||
pvpDuelLogo->setActive(false);
|
pvpDuelLogo->setActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pvpCivLogo)
|
|
||||||
pvpCivLogo->setActive(needCivPvpLogo);
|
|
||||||
|
|
||||||
if (pvpCultLogo)
|
|
||||||
pvpCultLogo->setActive(needCultPvpLogo);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// No bar and no string ?
|
// No bar and no string ?
|
||||||
|
|
|
@ -55,6 +55,9 @@ CGroupCell::CGroupCell(const TCtorParam ¶m)
|
||||||
IgnoreMaxWidth = false;
|
IgnoreMaxWidth = false;
|
||||||
IgnoreMinWidth = false;
|
IgnoreMinWidth = false;
|
||||||
AddChildW = false;
|
AddChildW = false;
|
||||||
|
_UserTexture = false;
|
||||||
|
_TextureTiled = false;
|
||||||
|
_TextureScaled = false;
|
||||||
setEnclosedGroupDefaultParams();
|
setEnclosedGroupDefaultParams();
|
||||||
addGroup (Group);
|
addGroup (Group);
|
||||||
}
|
}
|
||||||
|
@ -200,20 +203,62 @@ void CGroupCell::draw ()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw the background
|
// Draw the background
|
||||||
if (BgColor.A != 0)
|
if (_UserTexture || BgColor.A != 0)
|
||||||
{
|
{
|
||||||
CViewRenderer &rVR = pIM->getViewRenderer();
|
CViewRenderer &rVR = pIM->getViewRenderer();
|
||||||
CRGBA finalColor;
|
if (_UserTexture)
|
||||||
finalColor.modulateFromColor (BgColor, pIM->getGlobalColor());
|
|
||||||
|
|
||||||
// Get the parent table
|
|
||||||
if (getParent ())
|
|
||||||
{
|
{
|
||||||
CGroupTable *table = static_cast<CGroupTable*> (getParent ());
|
CRGBA col;
|
||||||
finalColor.A = (uint8) (((uint16) table->CurrentAlpha * (uint16) finalColor.A) >> 8);
|
if (BgColor.A == 0 )
|
||||||
}
|
col = CRGBA(255,255,255,255);
|
||||||
|
else
|
||||||
|
col = BgColor;
|
||||||
|
|
||||||
rVR.drawRotFlipBitmap (_RenderLayer, _XReal, _YReal, _WReal, _HReal, 0, false, rVR.getBlankTextureId(), finalColor);
|
|
||||||
|
if (_TextureScaled && !_TextureTiled)
|
||||||
|
{
|
||||||
|
rVR.drawRotFlipBitmap (_RenderLayer, _XReal, _YReal,
|
||||||
|
_WReal, _HReal,
|
||||||
|
0, false,
|
||||||
|
_TextureId,
|
||||||
|
col );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!_TextureTiled)
|
||||||
|
{
|
||||||
|
rVR.draw11RotFlipBitmap (_RenderLayer, _XReal, _YReal,
|
||||||
|
0, false,
|
||||||
|
_TextureId,
|
||||||
|
col);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rVR.drawRotFlipBitmapTiled(_RenderLayer, _XReal, _YReal,
|
||||||
|
_WReal, _HReal,
|
||||||
|
0, false,
|
||||||
|
_TextureId,
|
||||||
|
0,
|
||||||
|
col);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CRGBA finalColor;
|
||||||
|
finalColor.modulateFromColor (BgColor, pIM->getGlobalColor());
|
||||||
|
|
||||||
|
// Get the parent table
|
||||||
|
if (getParent ())
|
||||||
|
{
|
||||||
|
CGroupTable *table = static_cast<CGroupTable*> (getParent ());
|
||||||
|
finalColor.A = (uint8) (((uint16) table->CurrentAlpha * (uint16) finalColor.A) >> 8);
|
||||||
|
}
|
||||||
|
|
||||||
|
//nlinfo("Blank Texture");
|
||||||
|
rVR.drawRotFlipBitmap (_RenderLayer, _XReal, _YReal, _WReal, _HReal, 0, false, rVR.getBlankTextureId(), finalColor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CInterfaceGroup::draw ();
|
CInterfaceGroup::draw ();
|
||||||
|
@ -231,6 +276,40 @@ sint32 CGroupCell::getMinUsedW() const
|
||||||
return Group->getMinUsedW();
|
return Group->getMinUsedW();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
void CGroupCell::setTexture(const std::string & TxName)
|
||||||
|
{
|
||||||
|
if (TxName.empty() || TxName == "none")
|
||||||
|
{
|
||||||
|
_UserTexture = false;
|
||||||
|
nlinfo("Set no texture");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nlinfo("Set texture to cell : %s", TxName.c_str());
|
||||||
|
_UserTexture = true;
|
||||||
|
_TextureId.setTexture (TxName.c_str (), 0, 0, -1, -1, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
void CGroupCell::setTextureTile(bool tiled)
|
||||||
|
{
|
||||||
|
if (tiled)
|
||||||
|
nlinfo("Set texture is Tiled");
|
||||||
|
_TextureTiled = tiled;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
void CGroupCell::setTextureScale(bool scaled)
|
||||||
|
{
|
||||||
|
if (scaled)
|
||||||
|
nlinfo("Set texture is Scaled : %s");
|
||||||
|
_TextureScaled = scaled;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
NLMISC_REGISTER_OBJECT(CViewBase, CGroupTable, std::string, "table");
|
NLMISC_REGISTER_OBJECT(CViewBase, CGroupTable, std::string, "table");
|
||||||
|
|
||||||
|
|
|
@ -80,6 +80,12 @@ public:
|
||||||
// The cell color
|
// The cell color
|
||||||
NLMISC::CRGBA BgColor;
|
NLMISC::CRGBA BgColor;
|
||||||
|
|
||||||
|
// Texture
|
||||||
|
CViewRenderer::CTextureId _TextureId; /// Accelerator
|
||||||
|
bool _UserTexture;
|
||||||
|
bool _TextureTiled;
|
||||||
|
bool _TextureScaled;
|
||||||
|
|
||||||
// Alignment
|
// Alignment
|
||||||
TAlign Align;
|
TAlign Align;
|
||||||
TVAlign VAlign;
|
TVAlign VAlign;
|
||||||
|
@ -90,6 +96,11 @@ public:
|
||||||
|
|
||||||
// The cell is nowrap
|
// The cell is nowrap
|
||||||
bool NoWrap;
|
bool NoWrap;
|
||||||
|
|
||||||
|
void setTexture(const std::string & TxName);
|
||||||
|
void setTextureTile(bool tiled);
|
||||||
|
void setTextureScale(bool scaled);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setEnclosedGroupDefaultParams();
|
void setEnclosedGroupDefaultParams();
|
||||||
};
|
};
|
||||||
|
|
|
@ -358,15 +358,54 @@ void CGuildManager::update()
|
||||||
// If all is valid no more need update and if guild is opened update the interface
|
// If all is valid no more need update and if guild is opened update the interface
|
||||||
if (bAllValid)
|
if (bAllValid)
|
||||||
{
|
{
|
||||||
|
CCDBNodeLeaf* node = CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_ONLINE_OFFLINE_NOTIFICATIONS_CB", false);
|
||||||
|
if (node && node->getValueBool())
|
||||||
|
{
|
||||||
|
// See if we need to show any online/offline messages
|
||||||
|
static vector<SGuildMember> CachedGuildMembers;
|
||||||
|
ucstring onlineMessage = CI18N::get("uiPlayerOnline");
|
||||||
|
ucstring offlineMessage = CI18N::get("uiPlayerOffline");
|
||||||
|
|
||||||
|
for (uint i = 0; i < _GuildMembers.size(); ++i)
|
||||||
|
{
|
||||||
|
for (uint j = 0; j < CachedGuildMembers.size(); ++j)
|
||||||
|
{
|
||||||
|
if ((CachedGuildMembers[j].Name == _GuildMembers[i].Name) &&
|
||||||
|
(CachedGuildMembers[j].Online != _GuildMembers[i].Online))
|
||||||
|
{
|
||||||
|
ucstring msg = (_GuildMembers[i].Online != ccs_offline) ? onlineMessage : offlineMessage;
|
||||||
|
strFindReplace(msg, "%s", _GuildMembers[i].Name);
|
||||||
|
string cat = getStringCategory(msg, msg);
|
||||||
|
map<string, CClientConfig::SSysInfoParam>::const_iterator it;
|
||||||
|
NLMISC::CRGBA col = CRGBA::Yellow;
|
||||||
|
it = ClientCfg.SystemInfoParams.find(toLower(cat));
|
||||||
|
if (it != ClientCfg.SystemInfoParams.end())
|
||||||
|
{
|
||||||
|
col = it->second.Color;
|
||||||
|
}
|
||||||
|
bool dummy;
|
||||||
|
PeopleInterraction.ChatInput.Guild.displayMessage(msg, col, 2, &dummy);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CachedGuildMembers.clear();
|
||||||
|
for (uint i = 0; i < _GuildMembers.size(); ++i)
|
||||||
|
{
|
||||||
|
CachedGuildMembers.push_back(_GuildMembers[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Search for UserEntity to find our own grade
|
// Search for UserEntity to find our own grade
|
||||||
if ((UserEntity != NULL) && (_GuildMembers.size() > 0))
|
if ((UserEntity != NULL) && (_GuildMembers.size() > 0))
|
||||||
{
|
{
|
||||||
uint i;
|
uint i;
|
||||||
_Grade = EGSPD::CGuildGrade::Member;
|
_Grade = EGSPD::CGuildGrade::Member;
|
||||||
string sUserName = strlwr(UserEntity->getEntityName().toString());
|
ucstring sUserName = toLower(UserEntity->getEntityName());
|
||||||
for (i = 0; i < _GuildMembers.size(); ++i)
|
for (i = 0; i < _GuildMembers.size(); ++i)
|
||||||
{
|
{
|
||||||
if (strlwr(_GuildMembers[i].Name.toString()) == sUserName)
|
if (toLower(_GuildMembers[i].Name) == sUserName)
|
||||||
{
|
{
|
||||||
_Grade = _GuildMembers[i].Grade;
|
_Grade = _GuildMembers[i].Grade;
|
||||||
break;
|
break;
|
||||||
|
@ -1048,11 +1087,27 @@ class CAHGuildSheetSetLeader : public IActionHandler
|
||||||
{
|
{
|
||||||
virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */)
|
virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */)
|
||||||
{
|
{
|
||||||
sendMsgSetGrade(EGSPD::CGuildGrade::Leader);
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
|
|
||||||
|
// Ask if they are sure
|
||||||
|
pIM->validMessageBox(CInterfaceManager::QuestionIconMsg, CI18N::get("uiQSetLeader"), "guild_member_do_change_leader");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
REGISTER_ACTION_HANDLER (CAHGuildSheetSetLeader, "guild_member_chg_to_leader");
|
REGISTER_ACTION_HANDLER (CAHGuildSheetSetLeader, "guild_member_chg_to_leader");
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
class CAHGuildSheetSetLeaderConfirm : public IActionHandler
|
||||||
|
{
|
||||||
|
virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */)
|
||||||
|
{
|
||||||
|
// Leadership change confirmed
|
||||||
|
sendMsgSetGrade(EGSPD::CGuildGrade::Leader);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
REGISTER_ACTION_HANDLER (CAHGuildSheetSetLeaderConfirm, "guild_member_do_change_leader");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
class CAHGuildSheetSetHighOfficer : public IActionHandler
|
class CAHGuildSheetSetHighOfficer : public IActionHandler
|
||||||
{
|
{
|
||||||
|
|
|
@ -176,13 +176,17 @@ public:
|
||||||
void setRightClickHandlerParams(const std::string ¶ms) { _AHOnRightClickParams = params; }
|
void setRightClickHandlerParams(const std::string ¶ms) { _AHOnRightClickParams = params; }
|
||||||
void setOnActiveHandler(const std::string &h) { _AHOnActive = getAH(h,_AHOnActiveParams); }
|
void setOnActiveHandler(const std::string &h) { _AHOnActive = getAH(h,_AHOnActiveParams); }
|
||||||
void setOnActiveParams(const std::string &p) { _AHOnActiveParams = p; }
|
void setOnActiveParams(const std::string &p) { _AHOnActiveParams = p; }
|
||||||
std::string getOnActiveParams() const { return _AHOnActiveParams; }
|
|
||||||
void setOnDeactiveHandler(const std::string &h) { _AHOnDeactive = getAH(h,_AHOnDeactiveParams); }
|
void setOnDeactiveHandler(const std::string &h) { _AHOnDeactive = getAH(h,_AHOnDeactiveParams); }
|
||||||
void setOnDeactiveParams(const std::string &p) { _AHOnDeactiveParams = p; }
|
void setOnDeactiveParams(const std::string &p) { _AHOnDeactiveParams = p; }
|
||||||
std::string getOnDeactiveParams() const { return _AHOnDeactiveParams; }
|
|
||||||
|
|
||||||
const std::string &getLeftClickHandler() const { return getAHName(_AHOnLeftClick); }
|
const std::string &getLeftClickHandler() const { return getAHName(_AHOnLeftClick); }
|
||||||
const std::string &getLeftClickHandlerParams() const { return _AHOnLeftClickParams; }
|
const std::string &getLeftClickHandlerParams() const { return _AHOnLeftClickParams; }
|
||||||
|
const std::string &getRightClickHandler() const { return getAHName(_AHOnRightClick); }
|
||||||
|
const std::string &getRightClickHandlerParams() const { return _AHOnRightClickParams; }
|
||||||
|
const std::string &getOnActiveHandler() const { return getAHName(_AHOnActive); }
|
||||||
|
const std::string &getOnActiveParams() const { return _AHOnActiveParams; }
|
||||||
|
const std::string &getOnDeactiveHandler() const { return getAHName(_AHOnDeactive); }
|
||||||
|
const std::string &getOnDeactiveParams() const { return _AHOnDeactiveParams; }
|
||||||
|
|
||||||
// find a sub view/ctrl/group in this group from its id
|
// find a sub view/ctrl/group in this group from its id
|
||||||
int luaFind(CLuaState &ls);
|
int luaFind(CLuaState &ls);
|
||||||
|
@ -205,8 +209,18 @@ public:
|
||||||
REFLECT_LUA_METHOD("delGroup", luaDelGroup);
|
REFLECT_LUA_METHOD("delGroup", luaDelGroup);
|
||||||
REFLECT_LUA_METHOD("getNumGroups", luaGetNumGroups);
|
REFLECT_LUA_METHOD("getNumGroups", luaGetNumGroups);
|
||||||
REFLECT_LUA_METHOD("getGroup", luaGetGroup);
|
REFLECT_LUA_METHOD("getGroup", luaGetGroup);
|
||||||
|
REFLECT_STRING ("left_click", getLeftClickHandler, setLeftClickHandler);
|
||||||
|
REFLECT_STRING ("right_click", getRightClickHandler, setRightClickHandler);
|
||||||
|
REFLECT_STRING ("left_click_params", getLeftClickHandlerParams, setLeftClickHandlerParams);
|
||||||
|
REFLECT_STRING ("right_click_params", getRightClickHandlerParams, setRightClickHandlerParams);
|
||||||
|
REFLECT_STRING ("on_active", getOnActiveHandler, setOnActiveHandler);
|
||||||
REFLECT_STRING ("on_active_params", getOnActiveParams, setOnActiveParams);
|
REFLECT_STRING ("on_active_params", getOnActiveParams, setOnActiveParams);
|
||||||
|
REFLECT_STRING ("on_deactive", getOnDeactiveHandler, setOnDeactiveHandler);
|
||||||
REFLECT_STRING ("on_deactive_params", getOnDeactiveParams, setOnDeactiveParams);
|
REFLECT_STRING ("on_deactive_params", getOnDeactiveParams, setOnDeactiveParams);
|
||||||
|
REFLECT_STRING ("on_enter", getAHOnEnter, setAHOnEnter);
|
||||||
|
REFLECT_STRING ("on_enter_params", getAHOnEnterParams, setAHOnEnterParams);
|
||||||
|
REFLECT_STRING ("on_escape", getAHOnEscape, setAHOnEscape);
|
||||||
|
REFLECT_STRING ("on_escape_params", getAHOnEscapeParams, setAHOnEscapeParams);
|
||||||
REFLECT_SINT32 ("ofsx", getOfsX, setOfsX);
|
REFLECT_SINT32 ("ofsx", getOfsX, setOfsX);
|
||||||
REFLECT_SINT32 ("ofsy", getOfsY, setOfsY);
|
REFLECT_SINT32 ("ofsy", getOfsY, setOfsY);
|
||||||
REFLECT_BOOL("child_resize_w", getResizeFromChildW, setResizeFromChildW);
|
REFLECT_BOOL("child_resize_w", getResizeFromChildW, setResizeFromChildW);
|
||||||
|
|
|
@ -824,6 +824,21 @@ void CInterfaceManager::initInGame()
|
||||||
{
|
{
|
||||||
gc->setTarget(gc->getSavedTarget());
|
gc->setTarget(gc->getSavedTarget());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CCDBNodeLeaf *node = getDbProp("UI:SAVE:CHATLOG_STATE", false);
|
||||||
|
if (node)
|
||||||
|
{
|
||||||
|
_LogState = (node->getValue32() != 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_LogState)
|
||||||
|
{
|
||||||
|
displaySystemInfo(CI18N::get("uiLogTurnedOn"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
displaySystemInfo(CI18N::get("uiLogTurnedOff"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
@ -2372,7 +2387,8 @@ void CInterfaceManager::drawContextHelp ()
|
||||||
if(newCtrl)
|
if(newCtrl)
|
||||||
{
|
{
|
||||||
// get the text
|
// get the text
|
||||||
newCtrl->getContextHelpToolTip(_ContextHelpText);
|
//newCtrl->getContextHelpToolTip(_ContextHelpText);
|
||||||
|
newCtrl->getContextHelp(_ContextHelpText);
|
||||||
// UserDefined context help
|
// UserDefined context help
|
||||||
if( !newCtrl->getContextHelpActionHandler().empty() )
|
if( !newCtrl->getContextHelpActionHandler().empty() )
|
||||||
{
|
{
|
||||||
|
@ -3408,6 +3424,13 @@ CCDBNodeLeaf* CInterfaceManager::getDbProp(const std::string & name, bool bCreat
|
||||||
return pDBNL;
|
return pDBNL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
void CInterfaceManager::delDbProp(const std::string & name)
|
||||||
|
{
|
||||||
|
if (name.empty()) return;
|
||||||
|
_DbRootNode->removeNode( ICDBNode::CTextId(name) );
|
||||||
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
CCDBNodeBranch *CInterfaceManager::getDbBranch(const std::string &name)
|
CCDBNodeBranch *CInterfaceManager::getDbBranch(const std::string &name)
|
||||||
{
|
{
|
||||||
|
@ -5759,7 +5782,7 @@ bool CInterfaceManager::executeLuaScript(const std::string &luaScript, bool smal
|
||||||
std::string msg = e.luaWhat();
|
std::string msg = e.luaWhat();
|
||||||
char filename[MAX_PATH];
|
char filename[MAX_PATH];
|
||||||
char exceptionName[MAX_PATH];
|
char exceptionName[MAX_PATH];
|
||||||
int line;
|
uint32 line;
|
||||||
// Hamster: quick fix on AJM code but sscanf is still awfull
|
// Hamster: quick fix on AJM code but sscanf is still awfull
|
||||||
if (sscanf(msg.c_str(), "%s: %s.lua:%d:",exceptionName, filename, &line) == 3) // NB: test not exact here, but should work in 99,9 % of cases
|
if (sscanf(msg.c_str(), "%s: %s.lua:%d:",exceptionName, filename, &line) == 3) // NB: test not exact here, but should work in 99,9 % of cases
|
||||||
{
|
{
|
||||||
|
@ -5770,6 +5793,20 @@ bool CInterfaceManager::executeLuaScript(const std::string &luaScript, bool smal
|
||||||
else // AJM: handle the other 0.1% of cases
|
else // AJM: handle the other 0.1% of cases
|
||||||
{
|
{
|
||||||
// Yoyo: seems that previous test doesn't work.... btw, must still print the message please...
|
// Yoyo: seems that previous test doesn't work.... btw, must still print the message please...
|
||||||
|
std::vector<string> error;
|
||||||
|
splitString(msg.c_str(), ":", error);
|
||||||
|
if (error.size() > 3)
|
||||||
|
{
|
||||||
|
std::vector<string> contextList;
|
||||||
|
explode(luaScript, string("\n"), contextList);
|
||||||
|
fromString(error[2], line);
|
||||||
|
if (line >= 3 && contextList.size() >= line)
|
||||||
|
msg = error[0]+": \n>>> "+contextList[line-3]+"\n>>> "+contextList[line-2]+"\n>>> "+contextList[line-1]+"\nError:"+error[2]+": "+error[3];
|
||||||
|
else if (line >= 2 && contextList.size() >= line)
|
||||||
|
msg = error[0]+": \n>>>"+contextList[line-2]+"\n>>>"+contextList[line-1]+"\nError:"+error[2]+": "+error[3];
|
||||||
|
else if (line >= 1 && contextList.size() >= line)
|
||||||
|
msg = error[0]+": \n>>>"+contextList[line-1]+"\nError:"+error[2]+": "+error[3];
|
||||||
|
}
|
||||||
nlwarning(formatLuaErrorNlWarn(msg).c_str());
|
nlwarning(formatLuaErrorNlWarn(msg).c_str());
|
||||||
displaySystemInfo(formatLuaErrorSysInfo(msg));
|
displaySystemInfo(formatLuaErrorSysInfo(msg));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue