merge from default

--HG--
branch : branch-features-geqt-plugin
hg/feature/cdb-packed
sfb 12 years ago
commit 2007b33189

@ -533,7 +533,7 @@ MACRO(NL_SETUP_BUILD)
ENDIF(APPLE)
IF(APPLE AND XCODE)
SET(CMAKE_OSX_SYSROOT "macosx" CACHE PATH "" FORCE)
# SET(CMAKE_OSX_SYSROOT "macosx" CACHE PATH "" FORCE)
ELSEIF(APPLE AND NOT XCODE)
IF(NOT CMAKE_OSX_DEPLOYMENT_TARGET)
SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.6")

@ -43,7 +43,8 @@ namespace NLDRIVERGL {
// ***************************************************************************
CVertexProgamDrvInfosGL::CVertexProgamDrvInfosGL (CDriverGL *drv, ItVtxPrgDrvInfoPtrList it) : IVertexProgramDrvInfos (drv, it)
{
H_AUTO_OGL(CVertexProgamDrvInfosGL_CVertexProgamDrvInfosGL)
H_AUTO_OGL(CVertexProgamDrvInfosGL_CVertexProgamDrvInfosGL);
// Extension must exist
nlassert (drv->_Extensions.NVVertexProgram
|| drv->_Extensions.EXTVertexShader
@ -87,7 +88,7 @@ bool CDriverGL::isVertexProgramEmulated () const
// ***************************************************************************
bool CDriverGL::activeNVVertexProgram (CVertexProgram *program)
{
H_AUTO_OGL(CVertexProgamDrvInfosGL_activeNVVertexProgram)
H_AUTO_OGL(CVertexProgamDrvInfosGL_activeNVVertexProgram);
#ifndef USE_OPENGLES
// Setup or unsetup ?
@ -209,7 +210,8 @@ bool CDriverGL::activeNVVertexProgram (CVertexProgram *program)
static
inline GLenum convSwizzleToGLFormat(CVPSwizzle::EComp comp, bool negate)
{
H_AUTO_OGL(convSwizzleToGLFormat)
H_AUTO_OGL(convSwizzleToGLFormat);
if (!negate)
{
switch(comp)
@ -1348,12 +1350,10 @@ static void ARBVertexProgramDumpInstr(const CVPInstruction &instr, std::string &
}
// ***************************************************************************
bool CDriverGL::setupARBVertexProgram (const CVPParser::TProgram &inParsedProgram, GLuint id, bool &specularWritten)
{
H_AUTO_OGL(CDriverGL_setupARBVertexProgram)
H_AUTO_OGL(CDriverGL_setupARBVertexProgram);
#ifndef USE_OPENGLES
// tmp
@ -1571,7 +1571,6 @@ bool CDriverGL::activeARBVertexProgram (CVertexProgram *program)
#endif
}
// ***************************************************************************
bool CDriverGL::activeEXTVertexShader (CVertexProgram *program)
{

@ -6,17 +6,17 @@
<message>
<location filename="../main.cpp" line="98"/>
<source>Failed to load Core plugin: %1</source>
<translation type="unfinished"></translation>
<translation>Impossible de charger le plugin principal: %1</translation>
</message>
<message>
<location filename="../main.cpp" line="193"/>
<source>Object Viewer Qt - Plugin loader messages</source>
<translation type="unfinished"></translation>
<translation>Object Viewer Qt - Messages du chargeur de plugins</translation>
</message>
<message>
<location filename="../main.cpp" line="177"/>
<source>Could not find ovqt_plugin_core in %1</source>
<translation type="unfinished"></translation>
<translation>Impossible de trouver ovqt_plugin_core dans %1</translation>
</message>
</context>
<context>
@ -24,42 +24,42 @@
<message>
<location filename="../plugins/object_viewer/animation_form.ui" line="41"/>
<source>Animation control</source>
<translation type="unfinished"></translation>
<translation>Contrôle de l&apos;animation</translation>
</message>
<message>
<location filename="../plugins/object_viewer/animation_form.ui" line="135"/>
<source>Loop</source>
<translation type="unfinished"></translation>
<translation>En boucle</translation>
</message>
<message>
<location filename="../plugins/object_viewer/animation_form.ui" line="145"/>
<source>In place</source>
<translation type="unfinished"></translation>
<translation>En place</translation>
</message>
<message>
<location filename="../plugins/object_viewer/animation_form.ui" line="155"/>
<source>Increment pos</source>
<translation type="unfinished"></translation>
<translation>Incrémenter la position</translation>
</message>
<message>
<location filename="../plugins/object_viewer/animation_form.ui" line="189"/>
<source>Use the PlayList</source>
<translation type="unfinished"></translation>
<translation>Utiliser la liste de lecture</translation>
</message>
<message>
<location filename="../plugins/object_viewer/animation_form.ui" line="233"/>
<source>Use the Mixer</source>
<translation type="unfinished"></translation>
<translation>Utilisateur le Mélangeur</translation>
</message>
<message>
<location filename="../plugins/object_viewer/animation_form.ui" line="341"/>
<source>Play/Pause</source>
<translation type="unfinished"></translation>
<translation>Lecture/Pause</translation>
</message>
<message>
<location filename="../plugins/object_viewer/animation_form.ui" line="380"/>
<source>Stop</source>
<translation type="unfinished"></translation>
<translation>Stop</translation>
</message>
</context>
<context>
@ -67,57 +67,57 @@
<message>
<location filename="../plugins/object_viewer/animation_set_form.ui" line="30"/>
<source>Animation set manager</source>
<translation type="unfinished"></translation>
<translation>Gestionnaire d&apos;ensemble d&apos;animations</translation>
</message>
<message>
<location filename="../plugins/object_viewer/animation_set_form.ui" line="67"/>
<source>Edited object:</source>
<translation type="unfinished"></translation>
<translation>Objet en cours d&apos;édition :</translation>
</message>
<message>
<location filename="../plugins/object_viewer/animation_set_form.ui" line="99"/>
<source>Animations:</source>
<translation type="unfinished"></translation>
<translation>Animations :</translation>
</message>
<message>
<location filename="../plugins/object_viewer/animation_set_form.ui" line="163"/>
<source>Add anim</source>
<translation type="unfinished"></translation>
<translation>Ajouter animation</translation>
</message>
<message>
<location filename="../plugins/object_viewer/animation_set_form.ui" line="174"/>
<source>Skeleton weight template:</source>
<translation type="unfinished"></translation>
<translation>Modèle de poids de squelette :</translation>
</message>
<message>
<location filename="../plugins/object_viewer/animation_set_form.ui" line="232"/>
<source>Add swt</source>
<translation type="unfinished"></translation>
<translation>Ajouter swt</translation>
</message>
<message>
<location filename="../plugins/object_viewer/animation_set_form.ui" line="245"/>
<source>Animations playlist:</source>
<translation type="unfinished"></translation>
<translation>Liste de lecture d&apos;animations :</translation>
</message>
<message>
<location filename="../plugins/object_viewer/animation_set_form.ui" line="305"/>
<source>Unload all anim and swt files</source>
<translation type="unfinished"></translation>
<translation>Décharger toutes les animations et les fichiers swt</translation>
</message>
<message>
<location filename="../plugins/object_viewer/animation_set_form.ui" line="351"/>
<source>Add anim in PlayList</source>
<translation type="unfinished"></translation>
<translation>Ajouter une animation dans la liste de lecture</translation>
</message>
<message>
<location filename="../plugins/object_viewer/animation_set_form.ui" line="377"/>
<source>Delete anim from PlayList</source>
<translation type="unfinished"></translation>
<translation>Supprimer une animation de la liste de lecture</translation>
</message>
<message>
<location filename="../plugins/object_viewer/animation_set_form.ui" line="467"/>
<source>Set duration of time in Animation control</source>
<translation type="unfinished"></translation>
<translation>Définir la durée dans le contrôle de l&apos;animation</translation>
</message>
</context>
<context>
@ -130,7 +130,7 @@
<message>
<location filename="../plugins/object_viewer/attrib_form.ui" line="30"/>
<source>Constant</source>
<translation type="unfinished"></translation>
<translation>Constante</translation>
</message>
<message>
<location filename="../plugins/object_viewer/attrib_form.ui" line="35"/>
@ -160,12 +160,12 @@
<message>
<location filename="../plugins/object_viewer/attrib_form.ui" line="162"/>
<source>Date</source>
<translation type="unfinished"></translation>
<translation>Date</translation>
</message>
<message>
<location filename="../plugins/object_viewer/attrib_form.ui" line="167"/>
<source>Position</source>
<translation type="unfinished"></translation>
<translation>Position</translation>
</message>
<message>
<location filename="../plugins/object_viewer/attrib_form.ui" line="172"/>
@ -175,12 +175,12 @@
<message>
<location filename="../plugins/object_viewer/attrib_form.ui" line="177"/>
<source>Speed</source>
<translation type="unfinished"></translation>
<translation>Vitesse</translation>
</message>
<message>
<location filename="../plugins/object_viewer/attrib_form.ui" line="182"/>
<source>Random</source>
<translation type="unfinished"></translation>
<translation>Aléatoire</translation>
</message>
<message>
<location filename="../plugins/object_viewer/attrib_form.ui" line="187"/>
@ -2593,7 +2593,7 @@
<message>
<location filename="../plugins/object_viewer/vegetable_landscape_form.ui" line="34"/>
<source>Power:</source>
<translation type="unfinished"></translation>
<translation>Puissance :</translation>
</message>
<message>
<location filename="../plugins/object_viewer/vegetable_landscape_form.ui" line="84"/>
@ -2603,17 +2603,17 @@
<message>
<location filename="../plugins/object_viewer/vegetable_landscape_form.ui" line="137"/>
<source>Frequency</source>
<translation type="unfinished"></translation>
<translation>Fréquence</translation>
</message>
<message>
<location filename="../plugins/object_viewer/vegetable_landscape_form.ui" line="204"/>
<source>Ambient color</source>
<translation type="unfinished"></translation>
<translation>Couleur ambiante</translation>
</message>
<message>
<location filename="../plugins/object_viewer/vegetable_landscape_form.ui" line="214"/>
<source>Diffuse color</source>
<translation type="unfinished"></translation>
<translation>Couleur diffuse</translation>
</message>
<message>
<location filename="../plugins/object_viewer/vegetable_landscape_form.ui" line="227"/>
@ -3119,67 +3119,67 @@ Reason: %3</source>
<message>
<location filename="../plugins/object_viewer/graphics_settings_page.ui" line="105"/>
<source>OpenGL</source>
<translation type="unfinished"></translation>
<translation>OpenGL</translation>
</message>
<message>
<location filename="../plugins/object_viewer/graphics_settings_page.ui" line="110"/>
<source>Direct3D</source>
<translation type="unfinished"></translation>
<translation>Direct3D</translation>
</message>
<message>
<location filename="../plugins/object_viewer/graphics_settings_page.ui" line="123"/>
<source>Qt Style</source>
<translation type="unfinished"></translation>
<translation>Style Qt</translation>
</message>
<message>
<location filename="../plugins/object_viewer/graphics_settings_page.ui" line="131"/>
<source>Style</source>
<translation type="unfinished"></translation>
<translation>Style</translation>
</message>
<message>
<location filename="../plugins/object_viewer/graphics_settings_page.ui" line="156"/>
<source>Use style&apos;s standard palette</source>
<translation type="unfinished"></translation>
<translation>Utiliser la palette standard du style</translation>
</message>
<message>
<location filename="../plugins/object_viewer/graphics_settings_page.ui" line="169"/>
<source>Font</source>
<translation type="unfinished"></translation>
<translation>Police</translation>
</message>
<message>
<location filename="../plugins/object_viewer/graphics_settings_page.ui" line="186"/>
<source>...</source>
<translation type="unfinished"></translation>
<translation>...</translation>
</message>
<message>
<location filename="../plugins/object_viewer/graphics_settings_page.ui" line="70"/>
<source>Graphics settings</source>
<translation type="unfinished"></translation>
<translation>Options graphiques</translation>
</message>
<message>
<location filename="../plugins/object_viewer/graphics_settings_page.ui" line="78"/>
<source>Driver</source>
<translation type="unfinished"></translation>
<translation>Pilote</translation>
</message>
<message>
<location filename="../plugins/object_viewer/graphics_settings_page.ui" line="26"/>
<source>Bloom effect</source>
<translation type="unfinished"></translation>
<translation>Bloom</translation>
</message>
<message>
<location filename="../plugins/object_viewer/graphics_settings_page.ui" line="34"/>
<source>Bloom density</source>
<translation type="unfinished"></translation>
<translation>Densité du bloom</translation>
</message>
<message>
<location filename="../plugins/object_viewer/graphics_settings_page.ui" line="53"/>
<source>Square bloom</source>
<translation type="unfinished"></translation>
<translation>Bloom carré</translation>
</message>
<message>
<location filename="../plugins/object_viewer/graphics_settings_page.ui" line="60"/>
<source>Enable bloom effect</source>
<translation type="unfinished"></translation>
<translation>Activer le bloom</translation>
</message>
</context>
<context>
@ -3188,17 +3188,17 @@ Reason: %3</source>
<location filename="../plugins/object_viewer/animation_set_dialog.cpp" line="153"/>
<location filename="../plugins/object_viewer/animation_set_dialog.cpp" line="179"/>
<source>Open NeL anim file</source>
<translation type="unfinished"></translation>
<translation>Ouvrir une animation NeL</translation>
</message>
<message>
<location filename="../plugins/object_viewer/animation_set_dialog.cpp" line="154"/>
<source>NeL anim files (*.anim);;</source>
<translation type="unfinished"></translation>
<translation>Animations NeL (*.anim);;</translation>
</message>
<message>
<location filename="../plugins/object_viewer/animation_set_dialog.cpp" line="180"/>
<source>NeL Skeleton Weight Template files (*.swt);;</source>
<translation type="unfinished"></translation>
<translation>NeL Skeleton Weight Template (*.swt);;</translation>
</message>
</context>
<context>
@ -3336,7 +3336,7 @@ Reason: %3</source>
<message>
<location filename="../plugins/object_viewer/attrib_widget.cpp" line="157"/>
<source>Set user param</source>
<translation type="unfinished"></translation>
<translation>Définir un paramètre utilisateur</translation>
</message>
</context>
<context>
@ -3344,7 +3344,7 @@ Reason: %3</source>
<message>
<location filename="../plugins/object_viewer/bin_op_dialog.cpp" line="41"/>
<source>Bin operator</source>
<translation type="unfinished"></translation>
<translation>Opérateur binaire</translation>
</message>
<message>
<location filename="../plugins/object_viewer/bin_op_dialog.cpp" line="44"/>
@ -3556,7 +3556,7 @@ Reason: %3</source>
<message>
<location filename="../plugins/object_viewer/value_gradient_dialog.cpp" line="126"/>
<source>Num samples:</source>
<translation type="unfinished"></translation>
<translation>Nombre d&apos;échantillons :</translation>
</message>
</context>
<context>
@ -3801,17 +3801,17 @@ Reason: %3</source>
<message>
<location filename="../plugins/object_viewer/particle_control_dialog.cpp" line="112"/>
<source>Num particles:</source>
<translation type="unfinished"></translation>
<translation>Nombre de particules :</translation>
</message>
<message>
<location filename="../plugins/object_viewer/particle_control_dialog.cpp" line="113"/>
<source>Num wanted faces:</source>
<translation type="unfinished"></translation>
<translation>Nombre de faces souhaitées :</translation>
</message>
<message>
<location filename="../plugins/object_viewer/particle_control_dialog.cpp" line="114"/>
<source>System time:</source>
<translation type="unfinished"></translation>
<translation>Temps système :</translation>
</message>
</context>
<context>
@ -3819,7 +3819,7 @@ Reason: %3</source>
<message>
<location filename="../plugins/object_viewer/particle_system_page.cpp" line="272"/>
<source>Are you sure?</source>
<translation type="unfinished"></translation>
<translation>Etes-vous sûr ?</translation>
</message>
<message>
<location filename="../plugins/object_viewer/particle_system_page.cpp" line="273"/>
@ -4077,7 +4077,7 @@ Reason: %3</source>
<location filename="../plugins/object_viewer/skeleton_scale_dialog.cpp" line="635"/>
<location filename="../plugins/object_viewer/skeleton_scale_dialog.cpp" line="680"/>
<source>Skeleton scale editor</source>
<translation type="unfinished"></translation>
<translation>Editeur de l&apos;échelle du squelette</translation>
</message>
<message>
<location filename="../plugins/object_viewer/skeleton_scale_dialog.cpp" line="276"/>
@ -4121,12 +4121,12 @@ Reason: %3</source>
<location filename="../plugins/object_viewer/skeleton_scale_dialog.cpp" line="589"/>
<location filename="../plugins/object_viewer/skeleton_scale_dialog.cpp" line="635"/>
<source>Failed to save file!</source>
<translation type="unfinished"></translation>
<translation>Impossible d&apos;enregistrer le fichier !</translation>
</message>
<message>
<location filename="../plugins/object_viewer/skeleton_scale_dialog.cpp" line="680"/>
<source>Failed to load file!</source>
<translation type="unfinished"></translation>
<translation>Impossible de charger le fichier !</translation>
</message>
</context>
<context>
@ -4142,7 +4142,7 @@ Reason: %3</source>
<location filename="../plugins/object_viewer/slot_manager_dialog.cpp" line="173"/>
<location filename="../plugins/object_viewer/slot_manager_dialog.cpp" line="201"/>
<source>empty</source>
<translation type="unfinished"></translation>
<translation>vide</translation>
</message>
<message>
<location filename="../plugins/object_viewer/slot_manager_dialog.cpp" line="178"/>

@ -476,7 +476,7 @@ XMLR2EDInterfaceFiles =
{
"r2ed.xml",
"r2_triggers.xml",
"r2_logic_entities.xml",
"r2_logic_entities.xml",
"r2ed_acts.xml",
"r2ed_scenario.xml",
"r2ed_connect.xml"
@ -560,11 +560,11 @@ HelpPages =
"de=http://forums.ryzom.com/forum/showthread.php?t=29131"
};
WebIgMainDomain = "atys.ryzom.com";
WebIgMainDomain = "app.ryzom.com";
WebIgTrustedDomains = {
"atys.ryzom.com"
"api.ryzom.com", "app.ryzom.com"
};
PatchletUrl = "http://atys.ryzom.com/start/app_patchlet.php?patch=preload";
PatchletUrl = "http://app.ryzom.com/app_patchlet/index.php?patch=preload";
SelectedSlot = 0;

@ -39,7 +39,8 @@
<value value="map" hardtext="uiMap" contexts="game, r2ed_anim_test, r2ed_anim_dm, r2ed"/>
<value value="gestion_windows" hardtext="uiTaskbar" contexts="game"/>
<value value="gestion_windows" hardtext="uiWindows" contexts="game"/>
<value value="milko_pad" hardtext="uiTaskbar" contexts="game"/>
<value value="guild" hardtext="uiGuild" contexts="game"/>
<value value="guild_forum" hardtext="uiGuildForum" contexts="game, r2ed_anim_test, r2ed_anim_dm, r2ed"/>

@ -63,6 +63,9 @@
<command name="target" action="target" params="entity=$" />
<command name="tar" action="target" params="entity=$" />
<command name="target" action="target" params="entity=$|prefer_complete_match=$" />
<command name="tar" action="target" params="entity=$|prefer_complete_match=$" />
<command name="target" action="no_target" params="" />
<command name="tar" action="no_target" params="" />
@ -88,6 +91,11 @@
<command name="resetname" action="command" params="a resetName"/>
<command name="chatlog" action="command" params="chatLog"/>
<command name="showonline" action="command" params="a showOnline $"/>
<command name="showOnline" action="command" params="a showOnline $"/>
<!-- WebIG -->
<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"/>

@ -318,6 +318,12 @@
<variable entry="UI:SAVE:INSCENE:FRIEND:PVP_LOGO"
type="bool"
value="true" />
<variable entry="UI:SAVE:INSCENE:FRIEND:NPCNAME"
type="bool"
value="true" />
<variable entry="UI:SAVE:INSCENE:FRIEND:NPCTITLE"
type="bool"
value="true" />
<variable entry="UI:SAVE:INSCENE:FRIEND:MISSION_ICON"
type="bool"
value="true" />
@ -3389,6 +3395,10 @@ This MUST follow the Enum MISSION_DESC::TIconId
<variable entry="UI:VARIABLES:ISACTIVE:COSMETICS"
type="sint32"
value="0" />
<variable entry="UI:VARIABLES:ISACTIVE:MILKO_PAD"
type="sint32"
value="0" />
<!-- ***************************** -->
<!-- * BOTCHAT VARIABLES * -->
<!-- ***************************** -->

@ -18,7 +18,7 @@
color="255 255 255 255"
fontsize="14"
shadow="true"
case_mode="%case_first_string_letter_up" />
case_mode="%case_normal" />
<style style="sgc_title2"
type="text"
color="255 255 255 192"
@ -2083,7 +2083,7 @@
posref="BL TL"
posparent="is_friend_title"
x="0"
y="-4" />
y="-4" />
<instance template="tgcw_checkbox"
id="is_friend_guild_name"
text="uigcGuildName"
@ -2132,12 +2132,28 @@
posparent="is_friend_focus"
x="0"
y="-4" />
<instance template="tgcw_checkbox"
id="is_friend_npcname"
text="uiWindowNpcName"
tooltip="uittNpcName"
posref="BL TL"
posparent="is_friend_pvp_logo"
x="0"
y="-8" />
<instance template="tgcw_checkbox"
id="is_friend_npctitle"
text="uiNpcTitle"
tooltip="uittNpcTitle"
posref="BL TL"
posparent="is_friend_npcname"
x="0"
y="-4" />
<instance template="tgcw_checkbox"
id="is_friend_mission_icon"
text="uiMissionIcon"
tooltip="uittMissionIcon"
posref="BL TL"
posparent="is_friend_pvp_logo"
posparent="is_friend_npctitle"
x="0"
y="-4" />
<instance template="tgcw_checkbox"
@ -3449,6 +3465,16 @@
widget="boolbut"
link="UI:SAVE:INSCENE:FRIEND:PVP_LOGO"
realtime="true" />
<param ui="in_scene_friend:is_friend_npcname:c"
type="db"
widget="boolbut"
link="UI:SAVE:INSCENE:FRIEND:NPCNAME"
realtime="true" />
<param ui="in_scene_friend:is_friend_npctitle:c"
type="db"
widget="boolbut"
link="UI:SAVE:INSCENE:FRIEND:NPCTITLE"
realtime="true" />
<param ui="in_scene_friend:is_friend_mission_icon:c"
type="db"
widget="boolbut"

@ -1050,7 +1050,7 @@
id="html"
posref="TL TL"
url=""
home="http://atys.ryzom.com/start/index.php"
home="http://app.ryzom.com/index.php"
sizeref="wh"
x="0"
y="0"
@ -1216,7 +1216,7 @@
id="html"
posref="TL TL"
url=""
home="http://atys.ryzom.com/start/init_ig.php"
home="http://app.ryzom.com/init_ig.php"
sizeref="wh"
x="0"
y="0"

@ -1468,7 +1468,7 @@
<group type="webig_html"
id="html"
posref="TL TL"
url="http://atys.ryzom.com/start/app_rpjobs.php"
url="http://app.ryzom.com/app_rpjobs/index.php"
title_prefix=""
sizeref="wh"
x="0"
@ -1503,7 +1503,7 @@
checkbox_bitmap_pushed="w_opacity_on.tga"
checkbox_bitmap_over=""
background_bitmap_view="black2"
home="http://atys.ryzom.com/start/app_rpjobs.php"
home="http://app.ryzom.com/app_rpjobs/index.php"
browse_next_time="true"
form_text_area_group="edit_box_widget_multiline">
<group id="black"
@ -1604,7 +1604,7 @@
id="html"
posref="TL TL"
posparent="parent"
url="http://atys.ryzom.com/start/app_profile.php"
url="http://app.ryzom.com/app_profile/index.php"
title_prefix=""
sizeref="wh"
x="0"
@ -1639,7 +1639,7 @@
checkbox_bitmap_pushed="w_opacity_on.tga"
checkbox_bitmap_over=""
background_bitmap_view="black2"
home="http://atys.ryzom.com/start/app_profile.php"
home="http://app.ryzom.com/app_profile/index.php"
browse_next_time="true"
form_text_area_group="edit_box_widget_multiline">
<group id="black"
@ -1874,8 +1874,8 @@
fontsize="10"
value="xxx tribe name"
shadow="true" />
<link expr="or(ne(@#path:VALUE,0),ne(@#path:TREND,0))"
target="active" />
<!-- <link expr="or(ne(@#path:VALUE,0),ne(@#path:TREND,0))"
target="active" />-->
</group>
</template>
<!-- **************** -->

@ -1317,7 +1317,7 @@
<group type="container"
id="gestionsets2"
w="68"
h="280"
h="300"
resizer="false"
header_active="false"
right_button="false"
@ -1339,12 +1339,12 @@
x="0"
y="0"
w="68"
h="280"
h="300"
posref="TL TL">
<group id="shortcuts"
y="-1"
w="68"
h="278"
h="300"
posref="TL TL">
<!-- The Shortcuts. Don't modify ids -->
<instance template="ctrl_alt_memory"
@ -1449,6 +1449,61 @@
tx_noitem="W_slot_shortcut_shift_id9.tga" />
</group>
</group>
<!-- Mofications Cyrillas for bar1 related selection -->
<group type="select_number"
id="select_memory"
value="UI:PHRASE:SELECT_MEMORY_2"
loop="true"
min="1"
max="10"
x="0"
y="0"
w="68"
h="300"
posparent="shortcuts"
posref="MM MM"
delta="1">
<view type="bitmap"
id="slot_number"
posref="BM BM"
texture="W_slot_number.tga" />
<view type="text"
id="number"
posparent="slot_number"
posref="MM MM"
x="0"
y="0"
color="255 255 255 255"
fontsize="12"
shadow="true"
hardtext="0"
global_color="false" />
<ctrl type="button"
id="arrow_down"
button_type="push_button"
posref="BL BL"
x="10"
y="0"
tx_normal="W_arrow_left_0.tga"
tx_pushed="W_arrow_left_0.tga"
tx_over="W_button_12_over.tga"
tooltip="uittHandSet"
tooltip_parent="win" />
<ctrl type="button"
id="arrow_up"
button_type="push_button"
posref="BR BR"
x="-9"
y="0"
tx_normal="W_arrow_right_0.tga"
tx_pushed="W_arrow_right_0.tga"
tx_over="W_button_12_over.tga"
tooltip="uittHandSet"
tooltip_parent="win" />
</group>
<link expr="@UI:PHRASE:SELECT_MEMORY_2"
action="phrase_select_memory_2"
params="value=add(@UI:PHRASE:SELECT_MEMORY_2,-1)" />
</group>
<tree node="gestionsets2" />
<!-- hands -->

@ -645,34 +645,34 @@ on_enter="leave_modal" options="no_bordure" mouse_pos="false" exit_key_pushed="t
<group id="submit_gr" x="30" y="-20" posparent="window" sizeref="wh" w="-30" h="-15" posref="TL TL" >
<!-- login -->
<view type="text" id="txt_log" posref="TL TL" hardtext="uiUsername" fontsize="12" x="0" y="-60" color="255 255 255 255" />
<view type="text" id="txt_log" posref="TL TL" hardtext="uiUsername" fontsize="10" x="0" y="-60" color="255 255 255 255" />
<instance template="edit_box_log" id="eb_login" posparent="txt_log" posref="BL BL" w="260" h="24" fontsize="12" x="190" y="0"
<instance template="edit_box_log" id="eb_login" posparent="txt_log" posref="BL BL" w="260" h="24" fontsize="12" x="190" y="-4"
text_ref="BM BM" text_y="-2"
on_focus="create_account_rules" on_focus_params="rules_login" reset_focus_on_hide="false" max_historic="0"
onenter="set_keyboard_focus" params="target=ui:login:create_account:content:submit_gr:eb_password:eb|select_all=false"
prompt="" enter_loose_focus="true" multi_line="false" max_num_chars="12" color="135 243 28 255" />
<!-- password -->
<view type="text" id="txt_pas" posparent="txt_log" posref="BL TL" hardtext="uiPassword" fontsize="12" x="0" y="-30" color="255 255 255 255" />
<view type="text" id="txt_pas" posparent="txt_log" posref="BL TL" hardtext="uiPassword" fontsize="10" x="0" y="-30" color="255 255 255 255" />
<instance template="edit_box_log" id="eb_password" posparent="txt_pas" posref="BL BL" w="260" h="24" fontsize="16" x="190" y="0"
<instance template="edit_box_log" id="eb_password" posparent="txt_pas" posref="BL BL" w="260" h="24" fontsize="14" x="190" y="-4"
text_ref="BM BM" text_y="-2"
on_focus="create_account_rules" on_focus_params="rules_password" reset_focus_on_hide="false" max_historic="0" entry_type="password"
onenter="set_keyboard_focus" params="target=ui:login:create_account:content:submit_gr:eb_confirm_password:eb|select_all=false"
prompt="" enter_loose_focus="true" multi_line="false" max_num_chars="8" color="135 243 28 255" />
<!-- confirm password -->
<view type="text" id="txt_confirm_pas" posparent="txt_pas" posref="BL TL" hardtext="uiConfirmPassword" fontsize="12" x="0" y="-30" color="255 255 255 255" />
<view type="text" id="txt_confirm_pas" posparent="txt_pas" posref="BL TL" hardtext="uiConfirmPassword" fontsize="10" x="0" y="-30" color="255 255 255 255" />
<instance template="edit_box_log" id="eb_confirm_password" posparent="txt_confirm_pas" posref="BL BL" w="260" h="24" fontsize="16" x="190" y="0"
<instance template="edit_box_log" id="eb_confirm_password" posparent="txt_confirm_pas" posref="BL BL" w="260" h="24" fontsize="14" x="190" y="-4"
text_ref="BM BM" text_y="-2"
on_focus="create_account_rules" on_focus_params="rules_password_conf" reset_focus_on_hide="false" max_historic="0" entry_type="password"
onenter="set_keyboard_focus" params="target=ui:login:create_account:content:submit_gr:eb_email:eb|select_all=false"
prompt="" enter_loose_focus="true" multi_line="false" max_num_chars="8" color="135 243 28 255" />
<!-- email -->
<view type="text" id="txt_email" posparent="txt_confirm_pas" posref="BL TL" hardtext="uiEmail" fontsize="12" x="0" y="-30" color="255 255 255 255" />
<view type="text" id="txt_email" posparent="txt_confirm_pas" posref="BL TL" hardtext="uiEmail" fontsize="10" x="0" y="-30" color="255 255 255 255" />
<instance template="edit_box_log" id="eb_email" posparent="txt_email" posref="BL BL" w="260" h="24" fontsize="12" x="190" y="0"
text_ref="BM BM" text_y="-2"
@ -687,9 +687,9 @@ on_enter="leave_modal" options="no_bordure" mouse_pos="false" exit_key_pushed="t
col_over="255 255 255 0" onclick_l="create_account_rules" params_l="" tooltip=""
/>
<view type="text" id="txt_accept_cond" posref="BR BL" posparent="accept_cond" hardtext="uiAcceptTermsOfUse1" fontsize="10" x="20" y="-2" color="255 255 255 255" />
<view type="text" id="txt_accept_cond" posref="BR BL" posparent="accept_cond" hardtext="uiAcceptTermsOfUse1" fontsize="10" x="10" y="-2" color="255 255 255 255" />
<ctrl type="text_button" id="terms_launch_url" style="log_url" posref="BR BL" posparent="txt_accept_cond" x="2" y="0" hardtext="uiAcceptTermsOfUse2"
<ctrl type="text_button" id="terms_launch_url" style="log_url" posref="BR BL" posparent="txt_accept_cond" x="-2" y="0" hardtext="uiAcceptTermsOfUse2"
onclick_l="open_url" params_l="cfg_ConditionsTermsURL"/>
<!-- ********************** -->
@ -701,8 +701,8 @@ on_enter="leave_modal" options="no_bordure" mouse_pos="false" exit_key_pushed="t
<group id="erros_txt" posparent="welcome_errors_gr" posref="TL TL" x="8" y="-8" sizeref="w" child_resize_h="true"
max_sizeparent="welcome_errors_gr" max_sizeref="h" max_h="-16">
<view type="text" id="errors_list" posref="TL TL" x="15" y="-15" fontsize="12" color="255 255 255 255" line_maxw="584"
shadow="true" multi_line="true" multi_line_space="20" multi_max_line="100" hardtext="uiCreateAccountWelcome" />
<view type="text" id="errors_list" posref="TL TL" x="15" y="-15" fontsize="10" color="255 255 255 255" line_maxw="584"
shadow="true" multi_line="true" multi_line_space="10" multi_max_line="100" hardtext="uiCreateAccountWelcome" />
</group>
<instance template="bk_scroll" id="err_back_scrollbar" active="true" posparent="welcome_errors_gr" posref="TR TL" x="4" w="24" sizeref="h" h="0" />

@ -580,14 +580,10 @@
onclick_l="proc" params_l="proc_charsel_play"/>
-->
<ctrl style="valid_txt_button" id="play_but" posref="BR BM" x="-112" y="76" hardtext="uiCharSel_Play"
<ctrl style="valid_txt_button" id="play_but" posref="BR BM" x="-112" y="56" hardtext="uiCharSel_Play"
onover="play_sound" params_over="name=specie_but_over"
onclick_l="lua" params_l="outgame:launchGame()"/>
<ctrl style="valid_txt_button" id="edit_session_but" posref="BR BM" x="-112" y="36" hardtext="uiLaunchEditor"
onover="play_sound" params_over="name=specie_but_over"
onclick_l="proc" params_l="proc_charsel_edit_menu"/>
<ctrl style="valid_txt_button" id="del_but" posref="BR BL" x="-794" y="56" hardtext="uiCharSel_Del"
onover="play_sound" params_over="name=specie_but_over"
onclick_l="proc" params_l="proc_charsel_del"/>

@ -175,6 +175,8 @@
<action handler="set" params="dblink=UI:SAVE:INSCENE:FRIEND:FOCUS|value=0" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:FRIEND:MESSAGES|value=1" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:FRIEND:PVP_LOGO|value=1" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:FRIEND:NPCNAME|value=1" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:FRIEND:NPCTITLE|value=1" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:FRIEND:MISSION_ICON|value=1" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:FRIEND:MINI_MISSION_ICON|value=0" />
<action handler="set" params="dblink=UI:SAVE:INSCENE:ENEMY:GUILD_SYMBOL|value=1" />

@ -87,12 +87,6 @@
<action handler="leave_modal" />
</proc>
<proc id="quit_dialog_launch_editor" >
<action handler="leave_modal" /> <!-- must leave modal first because 'launch game' may pop a message box in some cases if patching was uncomplete -->
<action handler="launch_game" params="slot=ingame_auto|edit_mode=1" />
</proc>
<!-- the modal (formerly: h="60") -->
<define id="quit_button_delta_y" value="-4" />
<group type="modal" id="quit_dialog" exit_click_out="false" mouse_pos="false" posref="MM MM" child_resize_w="true" child_resize_wmargin="16" child_resize_h="true" child_resize_hmargin="16" win_priority="%win_priority_highest"
@ -112,10 +106,7 @@
color="180 250 180 255" col_over="180 250 180 255" col_pushed="180 250 180 255" text_color_normal="180 250 180 160" />
<ctrl style="quit_button" id="return_mainland" posparent="cancel" posref="BL TL" y="%quit_button_delta_y" hardtext="uittReturnToMainland" onclick_l="proc" params_l="quit_dialog_mainland"
color="180 250 180 255" col_over="110 250 125 255" col_pushed="110 250 125 255" text_color_normal="110 250 125 160" />
<ctrl style="quit_button" id="launch_editor" posparent="return_mainland" posref="BL TL" y="%quit_button_delta_y" hardtext="uittLaunchEditor" onclick_l="proc" params_l="quit_dialog_launch_editor"
color="180 250 180 255" col_over="110 250 125 255" col_pushed="110 250 125 255" text_color_normal="110 250 125 160" />
<ctrl style="quit_button" id="reselect_char" posparent="launch_editor" posref="BL TL" y="%quit_button_delta_y" hardtext="uittQuitGame" onclick_l="proc" params_l="quit_dialog_reselect_char"
<ctrl style="quit_button" id="reselect_char" posparent="return_mainland" posref="BL TL" y="%quit_button_delta_y" hardtext="uittQuitGame" onclick_l="proc" params_l="quit_dialog_reselect_char"
color="240 212 110 255" col_over="240 212 110 255" col_pushed="240 212 110 255" text_color_normal="240 212 110 160" />
<!--<ctrl style="quit_button" id="game" posparent="reselect_char" posref="BL TL" y="%quit_button_delta_y" hardtext="uittQuitGame" onclick_l="proc" params_l="quit_dialog_game"
color="240 212 110 255" col_over="240 212 110 255" col_pushed="240 212 110 255" text_color_normal="240 212 110 160" />-->
@ -313,6 +304,11 @@
</template>
<proc id="mk_proc_active">
<action handler="set" params="dblink=UI:VARIABLES:ISACTIVE:MILKO_PAD|value=1"/>
<action handler="proc" params="mk_proc_mode" />
</proc>
<proc id="mk_proc_mode">
<action handler="set" params="target='ui:interface:milko_pad:content:mode1:active'|value=0"/>
<action handler="set" params="target='ui:interface:milko_pad:content:mode2:active'|value=0"/>
@ -355,12 +351,29 @@
</template>
<!-- milko_pad -->
<group type="container" id="milko_pad" header_active="false" right_button="false" options="layer0_pad"
global_color="false" opened="true" openable="false" resizer="false" locked="false"
movable="true" active="true" header_color="UI:SAVE:WIN:COLORS:HELP" savable="true"
group_onclick_r="active_menu" group_params_r="menu=ui:interface:milko_menu"
w="142" h="200" pop_max_h="400"
on_active="proc" on_active_params="mk_proc_mode" >
<group type="container"
id="milko_pad"
header_active="false"
right_button="false"
options="layer0_pad"
global_color="false"
opened="true"
openable="false"
resizer="false"
locked="false"
movable="true"
active="true"
header_color="UI:SAVE:WIN:COLORS:HELP"
savable="true"
group_onclick_r="active_menu"
group_params_r="menu=ui:interface:milko_menu"
w="142"
h="200"
pop_max_h="400"
on_active="proc"
on_active_params="mk_proc_active"
on_deactive="set"
on_deactive_params="dblink=UI:VARIABLES:ISACTIVE:MILKO_PAD|value=0" >
<group id="header_closed" x="0" y="0" h="0" posref="TL TL" >
</group>
@ -1143,6 +1156,9 @@
<instance template="win_button" id="mp3" color="UI:SAVE:WIN:COLORS:OPT" text="uimwMP3Player" posparent="connection" posref="BL TL" x="0" y="-4"
pushflag="UI:VARIABLES:ISACTIVE:MP3PLAYER" win_name="mp3_player" />
<instance template="win_button" id="mp" color="UI:SAVE:WIN:COLORS:OPT" text="uimwTaskBar" posparent="mp3" posref="BL TL" x="0" y="-4"
pushflag="UI:VARIABLES:ISACTIVE:MILKO_PAD" win_name="milko_pad" />
<!-- <instance template="win_button" id="bg_downloader" color="UI:SAVE:WIN:COLORS:OPT" text="uimwBGDownloader" posparent="mp3" posref="BL TL" x="0" y="-4"
pushflag="UI:VARIABLES:ISACTIVE:BG_DOWNLOADER" win_name="bg_downloader" /> -->
@ -1218,6 +1234,7 @@
<param value="options:macros|macros" />
<param value="options:connection|connection" />
<param value="options:mp3|mp3_player" />
<param value="options:mp|milko_pad" />
</options>

@ -98,8 +98,6 @@
value="4" />
<define id="in_scene_user_info_bar_space"
value="2" />
<define id="in_scene_user_info_text_h"
value="14" />
<define id="in_scene_user_bar_length"
value="120" />
<!-- * In scene Target Selected * -->
@ -226,69 +224,25 @@
right_button="false"
opened="true"
child_resize_w="true"
child_resize_h="true"
child_resize_hmargin="20"
child_resize_h="true"
w="0"
h="86"
h="0"
win_priority="%win_priority_world_space"
posref="BL BM"
use_cursor="false">
<group id="right"
x="42"
y="-20"
child_resize_w="true"
child_resize_h="true"
w="0"
h="86"
posref="TL TL">
<view type="bitmap"
id="win_top"
posref="TL TL"
y="-15"
texture="Infos_top.tga"
global_color="true" />
<view type="bitmap"
id="win_mid"
posref="BL TL"
posparent="win_top"
scale="true"
w="7"
h="50"
texture="Infos_mid.tga"
global_color="true" />
<view type="bitmap"
id="win_bot"
posref="BL TL"
posparent="win_mid"
texture="Infos_bot.tga"
global_color="true" />
<view type="bitmap"
id="win_jauge_mid"
posref="TL ML"
x="0"
y="-2"
posparent="win_bot"
scale="true"
w="128"
h="24"
texture="Bg_jauge_mid.tga"
global_color="true" />
<view type="bitmap"
id="win_jauge_top"
posref="TL BL"
posparent="win_jauge_mid"
texture="Bg_jauge_top.tga"
global_color="true" />
<view type="bitmap"
id="win_jauge_bot"
posref="BL TL"
posparent="win_jauge_mid"
texture="Bg_jauge_bot.tga"
global_color="true" />
x="38"
h="158"
posref="TL TL" >
<view type="text"
id="info0"
posref="TL TL"
x="0"
y="-10"
y="-7"
fontsize="14"
shadow="true"
hardtext=""
@ -296,9 +250,9 @@
global_color="true" />
<view type="text"
id="info1"
posref="TL TL"
posref="BL TL"
posparent="info0"
x="0"
y="-28"
fontsize="12"
shadow="true"
hardtext=""
@ -306,9 +260,9 @@
global_color="true" />
<view type="text"
id="info2"
posref="TL TL"
posref="BL TL"
posparent="info1"
x="0"
y="-40"
fontsize="10"
shadow="true"
hardtext=""
@ -327,7 +281,6 @@
posref="TR TL"
posparent="info0"
x="4"
y=""
texture="target.tga"
global_color="false" />
<view type="bitmap"
@ -335,7 +288,7 @@
posref="TR TL"
posparent="target"
x="2"
y="6"
y="3"
scale="true"
w="20"
h="20"
@ -345,67 +298,106 @@
<view type="bitmap"
id="mission_target"
posref="TR TL"
posparent="info0"
x="25"
y=""
posparent="invisible_logo"
x="2"
y="4"
texture="target_mission.tga"
global_color="false" />
<view type="bitmap"
id="rp_logo_1"
posref="BR BL"
x="4"
posref="TR TL"
x="2"
y="0"
slot="false"
posparent="info0"
posparent="mission_target"
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"
posref="TR TL"
x="2"
y="0"
slot="false"
posparent="info0"
posparent="rp_logo_1"
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"
x="2"
y="0"
slot="false"
posparent="info0"
posparent="rp_logo_2"
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"
x="2"
y="0"
slot="false"
posparent="info0"
posparent="rp_logo_3"
color="255 255 255 255"
render_layer="1"
texture=""
w="24"
h="24"
global_color="false" />
<view type="bitmap"
id="win_top"
posparent="info2"
posref="BL TL"
y="-8"
texture="Infos_top.tga"
global_color="true" />
<view type="bitmap"
id="win_mid"
posparent="win_top"
posref="BL TL"
scale="true"
w="70"
h="1"
texture="Infos_mid.tga"
global_color="true" />
<view type="bitmap"
id="win_bot"
posparent="win_mid"
posref="BL TL"
texture="Infos_bot.tga"
global_color="true" />
<view type="bitmap"
id="win_jauge_mid"
posparent="win_bot"
posref="TL ML"
x="0"
y="-2"
scale="true"
w="128"
h="24"
texture="Bg_jauge_mid.tga"
global_color="true" />
<view type="bitmap"
id="win_jauge_top"
posparent="win_jauge_mid"
posref="TL BL"
texture="Bg_jauge_top.tga"
global_color="true" />
<view type="bitmap"
id="win_jauge_bot"
posparent="win_jauge_mid"
posref="BL TL"
texture="Bg_jauge_bot.tga"
global_color="true" />
<view type="bitmap"
id="bar0"
posref="TL TL"
posparent="win_jauge_top"
posref="TL TL"
x="3"
y="-3"
scale="true"
@ -416,8 +408,8 @@
global_color="false" />
<view type="bitmap"
id="bar1"
posref="BL TL"
posparent="bar0"
posref="BL TL"
x="0"
y="-2"
scale="true"
@ -428,8 +420,8 @@
global_color="false" />
<view type="bitmap"
id="bar2"
posref="BL TL"
posparent="bar1"
posref="BL TL"
x="0"
y="-2"
scale="true"
@ -440,8 +432,8 @@
global_color="false" />
<view type="bitmap"
id="bar3"
posref="BL TL"
posparent="bar2"
posref="BL TL"
x="0"
y="-2"
scale="true"
@ -452,8 +444,8 @@
global_color="false" />
<view type="bitmap"
id="bar4"
posref="BL TL"
posparent="bar3"
posref="BL TL"
x="0"
y="-2"
scale="true"
@ -464,94 +456,78 @@
global_color="false" />
</group>
<ctrl type="sheet"
<ctrl type="sheet"
id="guild_logo"
posref="ML MR"
x="-4"
posref="TL TR"
posparent="right"
x="-4"
slot="false"
posparent="right"
nature="guild_flag"
value="UI:TEMP:GUILD_SHEET"
dragable="false"
color="255 255 255 255" />
<view type="bitmap"
id="npc_mission_logo"
posref="TL TR"
x="-8"
posref="TL TL"
slot="false"
posparent="right"
x="0"
color="255 255 255 255"
render_layer="1"
texture=""
global_color="false" />
<view type="bitmap"
id="npc_mission_logo_over"
posref="TL TR"
x="-8"
posref="TL TL"
slot="false"
posparent="right"
x="0"
color="255 255 255 255"
render_layer="2"
texture=""
global_color="false" />
<group id="right_pvp"
posref="TR TL"
posparent="right"
x="4"
y="-4"
h="0"
child_resize_w="true"
child_resize_h="true"
child_resize_wmargin="4" >
child_resize_h="true" >
<group id="top_pvp"
posref="TL TL"
w="0"
h="0"
child_resize_w="true"
child_resize_h="true"
child_resize_wmargin="4" >
child_resize_h="true" >
<view type="bitmap"
id="pvp_faction_logo"
posref="TL TL"
active="false"
texture="mp_pearl.tga"
x="2"
w="24"
h="24"
global_color="false" />
<view type="bitmap"
id="pvp_safe_logo"
active="false"
posref="TR TL"
active="false"
posparent="pvp_faction_logo"
texture="mp_pearl.tga"
x="2"
w="24"
h="24"
global_color="false" />
</group>
<group id="bottom_pvp"
posref="BL TL"
posparent="top_pvp"
h="0"
child_resize_w="true"
child_resize_h="true"
child_resize_wmargin="4" >
child_resize_h="true" >
<view type="bitmap"
id="pvp_outpost_logo"
active="true"
posref="TL TL"
w="24"
h="24"
active="false"
texture="building_state_24x24.tga"
global_color="false" />
<view type="bitmap"
id="pvp_duel_logo"
posref="TR TL"
posparent="pvp_outpost_logo"
active="true"
active="false"
x="2"
w="24"
h="24"
texture="pvp_duel.tga"
global_color="false" />
</group>
@ -770,26 +746,34 @@
opened="true"
child_resize_w="true"
child_resize_h="true"
child_resize_hmargin="42"
w="0"
h="86"
win_priority="%win_priority_world_space"
posref="BL BM"
use_cursor="true">
<!--<group id="right" x="240" y="320" child_resize_w="true" w="0" h="126" posref="TL TL" >-->
<group id="right"
x="42"
y="-20"
child_resize_w="true"
w="0"
h="158"
posref="TL TL"
child_resize_wmargin="4">
x="42"
y="-20"
posref="TL TL" >
<view type="text"
id="info0"
posref="TL TL"
x="0"
y="0"
fontsize="14"
shadow="true"
hardtext="Forage_Source"
color="255 255 255 255"
global_color="true" />
<view type="bitmap"
id="win_jauge_mid"
posref="TL TL"
posref="BL TL"
posparent="info0"
x="0"
y="-22"
y="-6"
scale="true"
w="152"
h="100"
@ -807,16 +791,6 @@
posparent="win_jauge_mid"
texture="Bg_source_bot.tga"
global_color="true" />
<view type="text"
id="info0"
posref="TL TL"
x="4"
y="0"
fontsize="14"
shadow="true"
hardtext="Forage_Source"
color="255 255 255 255"
global_color="true" />
<view type="bitmap"
id="bar0"
posref="TL TL"
@ -5892,7 +5866,8 @@
posparent="creator"
posref="ML MR"
fontsize="12"
hardtext="uiCreatorHeader" />
hardtext="uiCreatorHeader"
active="false" />
<!-- the scroll text (with only one text) -->
<group id="scroll_text"
sizeref="w"
@ -6040,7 +6015,6 @@
<group id="item_preview"
posref="TL TL"
sizeref="w"
posparent="text_list"
w="200"
h="300"
x="0"

@ -6183,8 +6183,7 @@ void CCharacterCL::updateVisiblePostPos(const NLMISC::TTime &currentTimeInMs, CE
if (_InSceneUserInterface)
{
// Activate
if (_InSceneUserInterface->getActive() != showIS)
_InSceneUserInterface->setActive (showIS);
_InSceneUserInterface->setActive (showIS);
if (showIS)
{

@ -343,8 +343,9 @@ void initCrashReport ()
send("/?crashtype=DURING_RELEASE");
else if (crashed)
{
DialogBox (HInstance, MAKEINTRESOURCE(IDD_CRASH_INFORMATION), NULL, ReportDialogProc);
send("/?crashtype="+CrashFeedback);
//DialogBox (HInstance, MAKEINTRESOURCE(IDD_CRASH_INFORMATION), NULL, ReportDialogProc);
//send("/?crashtype="+CrashFeedback);
send("/?crashtype=CRASHED");
}
else
send("/?crashtype=NOT_CRASHED");

@ -1040,7 +1040,7 @@ void CClientConfig::setValues()
/////////////////////////
// NEW PATCHING SYSTEM //
READ_BOOL_DEV(PatchWanted)
READ_BOOL_FV(PatchWanted)
READ_STRING_DEV(PatchUrl)
READ_STRING_DEV(PatchVersion)
READ_STRING_DEV(RingReleaseNotePath)

@ -959,6 +959,14 @@ void CClientChatManager::buildTellSentence(const ucstring &sender, const ucstrin
bool bWoman = entity && entity->getGender() == GSGENDER::female;
name = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(CEntityCL::getTitleFromName(sender), bWoman);
{
// Sometimes translation contains another title
ucstring::size_type pos = name.find('$');
if (pos != ucstring::npos)
{
name = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(CEntityCL::getTitleFromName(name), bWoman);
}
}
}
else
{
@ -1032,6 +1040,14 @@ void CClientChatManager::buildChatSentence(TDataSetIndex /* compressedSenderInde
bool bWoman = entity && entity->getGender() == GSGENDER::female;
senderName = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(CEntityCL::getTitleFromName(sender), bWoman);
{
// Sometimes translation contains another title
ucstring::size_type pos = senderName.find('$');
if (pos != ucstring::npos)
{
senderName = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(CEntityCL::getTitleFromName(senderName), bWoman);
}
}
}
switch(type)

@ -57,7 +57,6 @@
#include "time_client.h"
#include "net_manager.h"
#include "string_manager_client.h"
#include "http_client.h"
#include "far_tp.h"
#include "movie_shooter.h"
@ -223,7 +222,6 @@ void connectionRestaureVideoMode ()
}
#define GROUP_BROWSER "ui:outgame:charsel:webstart:content:webstart_html"
#define UI_VARIABLES_SCREEN_WEBSTART 8
@ -243,23 +241,6 @@ class CAHOnReloadTestPage: public IActionHandler
};
REGISTER_ACTION_HANDLER (CAHOnReloadTestPage, "on_reload_test_page");
void initWebBrowser()
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
//pIM->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_WEBSTART);
// start the browser
CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(pIM->getElementFromId(GROUP_BROWSER));
if (pGH)
{
pGH->setActive(true);
pGH->browse(ClientCfg.PatchletUrl.c_str());
}
}
// ------------------------------------------------------------------------------------------------
void setOutGameFullScreen()
{
@ -388,7 +369,6 @@ bool connection (const string &cookie, const string &fsaddr)
WaitServerAnswer = true;
}*/
pIM->activateMasterGroup ("ui:outgame", true);
pIM->getDbProp ("UI:CURRENT_SCREEN")->setValue32(ClientCfg.Local ? 6 : -1); // TMP TMP
CCDBNodeBranch::flushObserversCalls();
@ -421,7 +401,6 @@ bool connection (const string &cookie, const string &fsaddr)
// Init web box
nlinfo("ok");
initWebBrowser();
// TMP TMP
if (ClientCfg.Local)
@ -551,7 +530,6 @@ bool reconnection()
// Start the finite state machine
TInterfaceState InterfaceState = GLOBAL_MENU;
pIM->activateMasterGroup ("ui:outgame", true);
pIM->getDbProp ("UI:CURRENT_SCREEN")->setValue32(-1);
CCDBNodeBranch::flushObserversCalls();
@ -1400,19 +1378,27 @@ Deprecated {
}
*/ else if (sProp == "title")
{
bool womenTitle;
bool womanTitle;
if( CharacterSummaries[PlayerSelectedSlot].VisualPropA.PropertySubData.Sex == 1 )
{
UserEntity->setGender( GSGENDER::female );
womenTitle = true;
womanTitle = true;
}
else
{
UserEntity->setGender( GSGENDER::male );
womenTitle = false;
womanTitle = false;
}
string titleStr = CHARACTER_TITLE::toString(CharacterSummaries[PlayerSelectedSlot].Title);
sValue = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(titleStr,womenTitle);
sValue = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(titleStr, womanTitle);
{
// Sometimes translation contains another title
ucstring::size_type pos = sValue.find('$');
if (pos != ucstring::npos)
{
sValue = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(CEntityCL::getTitleFromName(sValue), womanTitle);
}
}
setTarget (pCaller, sTarget, sValue);
}
/* else if (sProp == "orient")

@ -2287,24 +2287,39 @@ void CEntityCL::onStringAvailable(uint /* stringId */, const ucstring &value)
// retrieve the translated string
_TitleRaw = id.toString();
// ucstring replacement = CI18N::get(strNewTitle);
bool womenTitle = false;
bool womanTitle = false;
CCharacterCL * c = dynamic_cast<CCharacterCL*>(this);
if(c)
{
if( c->getGender() == GSGENDER::female )
womenTitle = true;
womanTitle = ( c->getGender() == GSGENDER::female );
}
const ucstring replacement(STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw,womenTitle));
_Tags = STRING_MANAGER::CStringManagerClient::getTitleInfos(_TitleRaw,womenTitle);
ucstring replacement(STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw, womanTitle));
// Sometimes translation contains another title
{
ucstring::size_type pos = replacement.find('$');
if (pos != ucstring::npos)
{
ucstring sn = replacement;
_EntityName = sn.substr(0, pos);
ucstring::size_type pos2 = sn.find('$', pos + 1);
_TitleRaw = sn.substr(pos+1, pos2 - pos - 1);
replacement = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw, womanTitle);
}
}
_Tags = STRING_MANAGER::CStringManagerClient::getTitleInfos(_TitleRaw, womanTitle);
if (!replacement.empty() || !ClientCfg.DebugStringManager)
{
// build the final name
p1 = _EntityName.find('$');
_EntityName = _EntityName.substr(0, p1); // + _Name.substr(p2+1)
// Get extended name
_NameEx = replacement;
newtitle = _NameEx;
}
CHARACTER_TITLE::ECharacterTitle titleEnum = CHARACTER_TITLE::toCharacterTitle( _TitleRaw );
CHARACTER_TITLE::ECharacterTitle titleEnum = CHARACTER_TITLE::toCharacterTitle( _TitleRaw.toString() );
if ( titleEnum >= CHARACTER_TITLE::BeginGmTitle && titleEnum <= CHARACTER_TITLE::EndGmTitle )
{
_GMTitle = titleEnum - CHARACTER_TITLE::BeginGmTitle;
@ -2338,7 +2353,7 @@ void CEntityCL::onStringAvailable(uint /* stringId */, const ucstring &value)
if (pGC != NULL) pGC->setUCTitle(_EntityName);
CSkillManager *pSM = CSkillManager::getInstance();
pSM->setPlayerTitle(_TitleRaw);
pSM->setPlayerTitle(_TitleRaw.toString());
}
// Must rebuild the in scene interface 'cause name has changed
@ -2349,17 +2364,17 @@ void CEntityCL::onStringAvailable(uint /* stringId */, const ucstring &value)
//-----------------------------------------------
// getTitleFromName
//-----------------------------------------------
string CEntityCL::getTitleFromName(const ucstring &name)
ucstring CEntityCL::getTitleFromName(const ucstring &name)
{
ucstring::size_type p1 = name.find('$');
if (p1 != ucstring::npos)
{
ucstring::size_type p2 = name.find('$', p1 + 1);
if (p2 != ucstring::npos)
return name.toString().substr(p1+1, p2-p1-1);
return name.substr(p1+1, p2-p1-1);
}
return "";
return ucstring("");
}// getTitleFromName //
//-----------------------------------------------

@ -329,7 +329,7 @@ public:
/// Return the Name of the entity. There may be a specification in it (guard, trader, etc ...). It is then surrounded by '$'
const ucstring &getEntityName() const {return _EntityName;}
/// Return the title from a name. The specification is surrounded by '$', and tells the title of the entity (guard, matis merchant, etc ..)
static std::string getTitleFromName(const ucstring &name);
static ucstring getTitleFromName(const ucstring &name);
/// Remove the specification from a name. The specification is surrounded by '$', and tells the title of the entity (guard, matis merchant, etc ..)
static ucstring removeTitleFromName(const ucstring &name);
/// Remove the shard from a name (if player from the same shard). The shard is surrounded by (), and tells the incoming shard of the entity (aniro, leanon etc...)
@ -930,7 +930,7 @@ protected:
// Current entity tags
std::vector<ucstring> _Tags;
// Current entity title string id
std::string _TitleRaw;
ucstring _TitleRaw;
// Current permanent content symbol for the entity
std::string _PermanentStatutIcon;
// Has reserved title?

@ -34,7 +34,6 @@
#include "sound_manager.h"
#include "actions_client.h"
#include "r2/editor.h"
#include "http_client.h"
#include "global.h"
#include "release.h"
#include "nel/misc/string_conversion.h"

@ -57,7 +57,7 @@ bool CCurlHttpClient::authenticate(const std::string &user, const std::string &p
return true;
}
const char *CAFilename = "ssl_ca_cert.pem"; // this the certificate "Thawte Server CA"
const char *CAFilename = "ssl_ca_cert.pem"; // this is the certificate "Thawte Server CA"
// ***************************************************************************
bool CCurlHttpClient::verifyServer(bool verify)

@ -1940,12 +1940,21 @@ public:
CStringPostProcessRemoveTitle::cbIDStringReceived(inout);
if (inout.empty())
{
CStringPostProcessRemoveName spprn;
CEntityCL *entity = EntitiesMngr.entity(Slot);
CCharacterCL *pChar = dynamic_cast<CCharacterCL*>(entity);
bool womanTitle = false;
if (pChar != NULL)
spprn.Woman = pChar->getGender() == GSGENDER::female;
spprn.cbIDStringReceived(copyInout);
womanTitle = pChar->getGender() == GSGENDER::female;
STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(CEntityCL::getTitleFromName(copyInout), womanTitle);
// Sometimes translation contains another title
ucstring::size_type pos = copyInout.find('$');
if (pos != ucstring::npos)
{
copyInout = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(CEntityCL::getTitleFromName(copyInout), womanTitle);
}
CStringPostProcessRemoveTitle::cbIDStringReceived(copyInout);
inout = copyInout;
}
@ -2403,10 +2412,22 @@ class CAHTarget : public IActionHandler
// Get the entity name to target
ucstring entityName;
entityName.fromUtf8 (getParam (Params, "entity"));
bool preferCompleteMatch = (getParam (Params, "prefer_complete_match") != "0");
if (!entityName.empty())
{
// Get the entity
CEntityCL *entity = EntitiesMngr.getEntityByName (entityName, false, false);
CEntityCL *entity = NULL;
if (preferCompleteMatch)
{
// Try to get the entity with complete match first
entity = EntitiesMngr.getEntityByName (entityName, false, true);
}
if (entity == NULL)
{
// Get the entity with a partial match
entity = EntitiesMngr.getEntityByName (entityName, false, false);
}
if (entity)
{
CCharacterCL *character = dynamic_cast<CCharacterCL*>(entity);
@ -2937,10 +2958,7 @@ public:
CCtrlBaseButton *pBut = dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId( GAME_CONFIG_VIDEO_FULLSCREEN_BUTTON ));
if (pBut)
{
if (ClientCfg.Windowed)
pBut->setPushed(false);
else
pBut->setPushed(true);
pBut->setPushed(!ClientCfg.Windowed);
}
pIM->runActionHandler("game_config_change_vid_fullscreen",NULL);
@ -4040,7 +4058,7 @@ public:
{
CEntityCL *pSel = EntitiesMngr.entity(UserEntity->selection());
if (pSel != NULL)
UserEntity->moveToTotemBuildingPhrase( UserEntity->selection(), 2.0f, ~0, ~0, true);
UserEntity->moveToTotemBuildingPhrase( UserEntity->selection(), 2.0f, std::numeric_limits<uint>::max(), std::numeric_limits<uint>::max(), true);
}
}
};

@ -686,7 +686,7 @@ class CHandlerOpenTitleHelp : public IActionHandler
woman = pChar->getGender() == GSGENDER::female;
// extract the replacement id
string strNewTitle = CEntityCL::getTitleFromName(copyName);
ucstring strNewTitle = CEntityCL::getTitleFromName(copyName);
// retrieve the translated string
if (!strNewTitle.empty())

@ -884,11 +884,21 @@ NLMISC_COMMAND(slsn, "Temp : set the name of the last sender.", "<name>")
bool CStringPostProcessRemoveName::cbIDStringReceived(ucstring &inOut)
{
// extract the replacement id
std::string strNewTitle = CEntityCL::getTitleFromName(inOut);
ucstring strNewTitle = CEntityCL::getTitleFromName(inOut);
// retrieve the translated string
if (!strNewTitle.empty())
inOut = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(strNewTitle,Woman);
{
inOut = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(strNewTitle, Woman);
{
// Sometimes translation contains another title
ucstring::size_type pos = inOut.find('$');
if (pos != ucstring::npos)
{
inOut = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(CEntityCL::getTitleFromName(inOut), Woman);
}
}
}
else
inOut = "";

@ -1119,7 +1119,7 @@ public:
if (pCSDst->isShortCut())
memoryLine = pPM->getSelectedMemoryLineDB();
else
memoryLine = 0;
memoryLine = pPM->getSelectedMemoryAltLineDB();
if(memoryLine<0)
return;
@ -1577,6 +1577,32 @@ public:
};
REGISTER_ACTION_HANDLER(CHandlerPhraseSelectMemory, "phrase_select_memory");
class CHandlerPhraseSelectMemory2 : public IActionHandler
{
public:
virtual void execute(CCtrlBase * /* pCaller */, const string &Params)
{
string expr = getParam (Params, "value");
CInterfaceExprValue value;
if (CInterfaceExpr::eval(expr, value, NULL))
{
if (!value.toInteger())
{
nlwarning("<CHandlerPhraseSelectMemory:execute> expression doesn't evaluate to a numerical value");
}
else
{
CSPhraseManager *pPM= CSPhraseManager::getInstance();
sint val= (sint32)value.getInteger();
clamp(val, 0, MEM_SET_TYPES::NumMemories-1);
pPM->selectMemoryLineDBalt(val);
}
}
}
};
REGISTER_ACTION_HANDLER(CHandlerPhraseSelectMemory2, "phrase_select_memory_2");
// ***************************************************************************
class CHandlerPhraseSelectShortcutBar : public IActionHandler
@ -1585,7 +1611,7 @@ public:
virtual void execute(CCtrlBase * /* pCaller */, const string &Params)
{
CInterfaceManager *pIM= CInterfaceManager::getInstance();
CCDBNodeLeaf *node= pIM->getDbProp("UI:PHRASE:SELECT_MEMORY", false);
CCDBNodeLeaf *node= pIM->getDbProp("UI:PHRASE:SELECT_MEMORY_", false);
if(node)
{
sint32 val;
@ -1594,6 +1620,7 @@ public:
}
}
};
REGISTER_ACTION_HANDLER(CHandlerPhraseSelectShortcutBar, "select_shortcut_bar");

@ -416,7 +416,7 @@ class CAHUIShowHide : public IActionHandler
nlwarning("%s is not a group html", window.c_str());
return;
}
pGH->setURL("http://"+ClientCfg.WebIgMainDomain+"/start/index.php?app="+webapp);
pGH->setURL("http://"+ClientCfg.WebIgMainDomain+"/index.php?app="+webapp);
}
}
else

@ -156,8 +156,8 @@ void CBotChatPageMission::acceptMission()
}
// close the selection box
activateWindow(WIN_BOT_CHAT_ACCEPT_MISSION, false);
// close the botchat
CBotChatManager::getInstance()->setCurrPage(NULL);
//// close the botchat
//CBotChatManager::getInstance()->setCurrPage(NULL);
_CurrSel = NULL;
}

@ -31,7 +31,8 @@ CChatTextManager* CChatTextManager::_Instance = NULL;
CChatTextManager::CChatTextManager() :
_TextFontSize(NULL),
_TextMultilineSpace(NULL),
_TextShadowed(NULL)
_TextShadowed(NULL),
_ShowTimestamps(NULL)
{
}
@ -44,6 +45,8 @@ CChatTextManager::~CChatTextManager()
_TextMultilineSpace = NULL;
delete _TextShadowed;
_TextShadowed = NULL;
delete _ShowTimestamps;
_ShowTimestamps = NULL;
}
//=================================================================================
uint CChatTextManager::getTextFontSize() const
@ -81,6 +84,18 @@ bool CChatTextManager::isTextShadowed() const
return _TextShadowed->getValueBool();
}
//=================================================================================
bool CChatTextManager::showTimestamps() const
{
if (!_ShowTimestamps)
{
CInterfaceManager *im = CInterfaceManager::getInstance();
_ShowTimestamps = im->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false);
if (!_ShowTimestamps) return false;
}
return _ShowTimestamps->getValueBool();
}
//=================================================================================
static CInterfaceGroup *parseCommandTag(ucstring &line)
{
@ -149,13 +164,9 @@ CViewBase *CChatTextManager::createMsgText(const ucstring &cstMsg, NLMISC::CRGBA
vt->setModulateGlobalColor(false);
ucstring cur_time;
static CCDBNodeLeaf* node = CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false);
if (node)
if (showTimestamps())
{
if (node->getValueBool())
{
cur_time = CInterfaceManager::getTimestampHuman();
}
cur_time = CInterfaceManager::getTimestampHuman();
}
// if text contain any color code, set the text formated and white,
@ -174,7 +185,6 @@ CViewBase *CChatTextManager::createMsgText(const ucstring &cstMsg, NLMISC::CRGBA
msg = cur_time + msg;
}
vt->setTextFormatTaged(msg);
vt->setColor(NLMISC::CRGBA::White);
}

@ -59,10 +59,13 @@ private:
mutable class CCDBNodeLeaf *_TextFontSize;
mutable CCDBNodeLeaf *_TextMultilineSpace;
mutable CCDBNodeLeaf *_TextShadowed;
mutable CCDBNodeLeaf *_ShowTimestamps;
// ctor, private because of singleton
CChatTextManager();
~CChatTextManager();
bool showTimestamps() const;
};
// shortcut to get text manager instance

@ -1296,7 +1296,7 @@ void CDBCtrlSheet::setupMacro()
if (!_NeedSetup) return;
// compute from OptString
setupCharBitmaps(24, 4);
setupCharBitmaps(26, 4, 5);
_NeedSetup = false;
@ -1560,8 +1560,8 @@ void CDBCtrlSheet::setupDisplayAsPhrase(const std::vector<NLMISC::CSheetId> &bri
{
// recompute text
_OptString= iconName;
// compute from OptString. Allow only 1 line and 4 chars
setupCharBitmaps(24, 1, 4);
// compute from OptString. Allow only 1 line and 5 chars
setupCharBitmaps(26, 1, 5);
}
}
}

@ -621,8 +621,6 @@ void CGroupHTML::addLink (uint element_number, uint /* attribute_number */, HTCh
_Link.push_back("");
_LinkTitle.push_back("");
}
}
}
}
@ -1049,7 +1047,6 @@ void CGroupHTML::beginElement (uint element_number, const BOOL *present, const c
if (present[HTML_BODY_STYLE] && value[HTML_BODY_STYLE])
style = value[HTML_BODY_STYLE];
if (!style.empty())
{
TStyle styles = parseStyle(style);
@ -2470,7 +2467,6 @@ void CGroupHTML::addString(const ucstring &str)
getParagraph()->addChild (buttonGroup);
paragraphChange ();
}
}
else
{

@ -258,7 +258,7 @@ struct CWebigNotificationThread : public NLMISC::IRunnable
nlSleep(1*60*1000);
while (true)
{
string url = "http://"+ClientCfg.WebIgMainDomain+"/start/index.php?app=notif&rnd="+randomString();
string url = "http://"+ClientCfg.WebIgMainDomain+"/index.php?app=notif&rnd="+randomString();
addWebIGParams(url, true);
get(url);
nlSleep(10*60*1000);

@ -1003,7 +1003,7 @@ void CGroupInSceneBubbleManager::webIgChatOpen (uint32 nBotUID, string text, con
{
uint32 i = 0;
while (getDynBubble(i) != NULL) i++;
id = "in_scene_webig_bubble_" + toString(i);
id = "in_scene_webig_bubble_" + toString(nBotUID);
// Create the instance
std::vector<std::pair<std::string,std::string> > templateParams;
templateParams.push_back (std::pair<std::string,std::string>("id", id));
@ -1071,7 +1071,6 @@ void CGroupInSceneBubbleManager::webIgChatOpen (uint32 nBotUID, string text, con
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)
{
@ -1084,7 +1083,6 @@ void CGroupInSceneBubbleManager::webIgChatOpen (uint32 nBotUID, string text, con
{
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);
}

@ -172,9 +172,9 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
// For RoleMasters, merchants etc... must display name and function, and nothing else
for(uint i=0;i<NumBars;i++)
bars[i]= false;
name= !entityName.empty();
name= !entityName.empty() && pIM->getDbProp(dbEntry+"NPCNAME")->getValueBool();
symbol= false;
title= true;
title= (entityName.empty() && pIM->getDbProp(dbEntry+"NPCNAME")->getValueBool()) || pIM->getDbProp(dbEntry+"NPCTITLE")->getValueBool();
guildName= false;
templateName = "in_scene_user_info";
rpTags = (!entityTag1.empty() || !entityTag2.empty() || !entityTag3.empty() || !entityTag4.empty() ) && pIM->getDbProp(dbEntry+"RPTAGS")->getValueBool();
@ -281,10 +281,9 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
info->_Entity = entity;
// Some constants
sint barHeight, barSpace, textH;
sint barHeight, barSpace;
fromString(pIM->getDefine("in_scene_user_info_bar_h"), barHeight);
fromString(pIM->getDefine("in_scene_user_info_bar_space"), barSpace);
fromString(pIM->getDefine("in_scene_user_info_text_h"), textH);
fromString(pIM->getDefine("in_scene_user_bar_length"), CGroupInSceneUserInfo::_BatLength);
// Build the bars
@ -309,10 +308,9 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
bitmap->setColorRGBA (BarColor[i]);
}
info->_Bars[i] = bitmap;
barCount++;
}
}
barCount++;
}
}
@ -345,21 +343,31 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
if (!barCount)
{
// Delete
CViewBase *view = leftGroup->getView ("win_bot");
if (view)
leftGroup->delView (view);
view = leftGroup->getView ("win_mid");
if (view)
leftGroup->delView (view);
view = leftGroup->getView ("win_top");
if (view)
leftGroup->delView (view);
if (win_jauge_mid)
win_jauge_mid->setActive(false);
// leftGroup->delView (win_jauge_mid);
CViewBase *view = leftGroup->getView ("win_jauge_top");
//win_jauge_mid->setActive(false);
leftGroup->delView (win_jauge_mid);
view = leftGroup->getView ("win_jauge_top");
if (view)
view->setActive(false);
//leftGroup->delView (view);
//view->setActive(false);
leftGroup->delView (view);
view = leftGroup->getView ("win_jauge_bot");
if (view)
view->setActive(false);
//leftGroup->delView (view);
//view->setActive(false);
leftGroup->delView (view);
}
// Strings
sint stringSpace = 0;
//sint stringSpace = 0;
sint stringCount = 0;
if (name)
{
@ -368,8 +376,8 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
info->_Name = dynamic_cast<CViewText*>(text);
stringCount++;
}
else
stringSpace += textH;
//else
// stringSpace += textH;
if (title)
{
CViewBase *text = leftGroup->getView ("info"+toString(stringCount));
@ -377,8 +385,8 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
info->_Title = dynamic_cast<CViewText*>(text);
stringCount++;
}
else
stringSpace += textH;
//else
// stringSpace += textH;
if (rpTags)
{
@ -444,8 +452,8 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
stringCount++;
}
}
else
stringSpace += textH;
//else
// stringSpace += textH;
// Hide guild symbol / raw material source icon?
if ( isForageSource )
@ -467,13 +475,9 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
if ( iconFilename )
bitmap->setTexture (*iconFilename);
}
leftGroup->setW( leftGroup->getW() + 42 );
leftGroup->invalidateCoords();
}
// Increase vertical size to let bars be seen
//leftGroup->setH( leftGroup->getH() + 42 ); // hide last bar, currently
// Set ZBias of forage interface
info->setZBias(ClientCfg.ForageInterfaceZBias);
@ -507,15 +511,15 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
{
info->delView(logoOver);
}
leftGroup->setW( leftGroup->getW() + 42 );
leftGroup->invalidateCoords();
//leftGroup->setW( leftGroup->getW() + 42 );
}
else
{
info->delView(logo);
info->delView(logoOver);
leftGroup->setX(0);
//leftGroup->setX(0);
}
leftGroup->invalidateCoords();
}
}
else
@ -578,7 +582,6 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
if (pPlayer == NULL)
needPvPLogo = false;
if (pPlayer != NULL && needPvPLogo)
{
if (pvpFactionLogo)
@ -633,7 +636,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
}
}
}
if (pvpOutpostLogo)
{
if( pPlayer->getOutpostId() != 0 )
@ -641,7 +644,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
else
pvpOutpostLogo->setActive(false);
}
if (pvpDuelLogo)
{
if( pPlayer->getPvpMode()&PVP_MODE::PvpDuel )
@ -653,36 +656,36 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
}
else
{
if (pvpFactionLogo)
pvpFactionLogo->setActive(false);
if (pvpOutpostLogo)
pvpOutpostLogo->setActive(false);
if (pvpDuelLogo)
pvpDuelLogo->setActive(false);
CInterfaceGroup* grp = info->getGroup("right_pvp");
if (grp)
info->delGroup(grp);
}
}
// No bar and no string ?
if (((stringCount == 1) && !barCount) || (stringCount == 0))
{
// Delete
CViewBase *bitmap = leftGroup->getView ("win_top");
if (bitmap)
//leftGroup->delView (bitmap);
bitmap->setAlpha(0);
bitmap = leftGroup->getView ("win_mid");
if (bitmap)
//leftGroup->delView (bitmap);
bitmap->setAlpha(0);
bitmap = leftGroup->getView ("win_bot");
if (bitmap)
//leftGroup->delView (bitmap);
bitmap->setAlpha(0);
// Anti-Bug, xmargin is not take into evaluate W
/*if (info->_Name)
info->_Name->setX(0);*/
CViewBase *view = leftGroup->getView ("win_bot");
if (view)
leftGroup->delView (view);
view = leftGroup->getView ("win_mid");
if (view)
leftGroup->delView (view);
view = leftGroup->getView ("win_top");
if (view)
leftGroup->delView (view);
// Delete
view = leftGroup->getView ("win_jauge_top");
if (view)
leftGroup->delView (view);
view = leftGroup->getView ("win_jauge_mid");
if (view)
leftGroup->delView (view);
view = leftGroup->getView ("win_jauge_bot");
if (view)
leftGroup->delView (view);
}
// Delete remaining strings
@ -690,24 +693,17 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
{
CViewBase *text = leftGroup->getView ("info"+toString(i));
if (text)
leftGroup->delView(text);
text->setActive(false);
}
// Adjust win_mid
CViewBase *win_mid = leftGroup->getView ("win_mid");
if (win_mid)
{
win_mid->setH (win_mid->getH() - spaceBar/2 - stringSpace);
win_mid->setH (win_mid->getH() - spaceBar/2);
}
// Total height
sint totalHeight = info->getH ();
totalHeight -= spaceBar + stringSpace;
info->setH (totalHeight);
totalHeight = leftGroup->getH ();
totalHeight -= spaceBar + stringSpace;
leftGroup->setH (totalHeight);
// Set player name
if (info->_Name)
{
@ -893,7 +889,7 @@ void CGroupInSceneUserInfo::updateDynamicData ()
ucstring entityName = _Entity->getDisplayName();
if (pPlayer != NULL)
if (pPlayer->isAFK())
entityName += CI18N::get("uiAFK");
entityName += CI18N::get("uiAFK");
_Name->setText(entityName);
// Title color get the PVP color

@ -66,6 +66,7 @@
#include "group_in_scene_bubble.h"
#include "group_skills.h"
#include "group_compas.h"
#include "group_html.h"
// Misc
#include "../input.h"
@ -583,6 +584,17 @@ void CInterfaceManager::initOutGame()
initActions();
}
//NLMEMORY::CheckHeap (true);
// Initialize the web browser
{
CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(this->getElementFromId(GROUP_BROWSER));
if (pGH)
{
pGH->setActive(true);
pGH->browse(ClientCfg.PatchletUrl.c_str());
}
}
}
// ------------------------------------------------------------------------------------------------

@ -57,6 +57,8 @@ extern CCDBSynchronised IngameDbMngr;
///\todo nico remove that
extern bool g_hidden;
#define GROUP_BROWSER "ui:outgame:charsel:webstart:content:webstart_html"
///max botchat distance
#define MAX_BOTCHAT_DISTANCE_SQUARE 25

@ -491,6 +491,22 @@ void CSPhraseManager::selectMemoryLineDB(sint32 memoryLine)
}
}
void CSPhraseManager::selectMemoryLineDBalt(sint32 memoryLine)
{
if(memoryLine<0)
memoryLine= -1;
if(_SelectedMemoryDBalt!=memoryLine)
{
_SelectedMemoryDBalt= memoryLine;
// since memory selection changes then must update all the DB and the Ctrl states
updateMemoryDBAll();
updateAllMemoryCtrlState();
updateAllMemoryCtrlRegenTickRange();
// must update also the execution views
updateExecutionDisplay();
}
}
// ***************************************************************************
void CSPhraseManager::updateMemoryDBAll()
{
@ -517,12 +533,19 @@ void CSPhraseManager::updateMemoryDBAll()
}
}
if(_SelectedMemoryDB != -1 && (sint32)_Memories.size() > 0)
if(_SelectedMemoryDBalt == -1 || _SelectedMemoryDBalt>=(sint32)_Memories.size())
{
for(uint i=0;i<PHRASE_MAX_MEMORY_SLOT;i++)
{
_MemoryAltDbLeaves[i]->setValue32(0);
}
}
else
{
// Always update alt gestionsets
for(uint i=0;i<PHRASE_MAX_MEMORY_SLOT;i++)
{
CMemorySlot &slotAlt= _Memories[0].Slot[i];
CMemorySlot &slotAlt= _Memories[_SelectedMemoryDBalt].Slot[i];
if(!slotAlt.isPhrase())
_MemoryAltDbLeaves[i]->setValue32(0);
else
@ -548,11 +571,8 @@ void CSPhraseManager::updateMemoryDBSlot(uint32 memorySlot)
_MemoryDbLeaves[memorySlot]->setValue32(0);
else
_MemoryDbLeaves[memorySlot]->setValue32(slot.Id);
}
if (_SelectedMemoryDB == 0)
{
CMemorySlot &slotAlt= _Memories[0].Slot[memorySlot];
CMemorySlot &slotAlt= _Memories[_SelectedMemoryDBalt].Slot[memorySlot];
if(!slotAlt.isPhrase())
_MemoryAltDbLeaves[memorySlot]->setValue32(0);
else
@ -875,6 +895,7 @@ void CSPhraseManager::reset()
_InitInGameDone= false;
_SelectedMemoryDB= -1;
_SelectedMemoryDBalt = _SelectedMemoryDB;
// NB: slot under 2 can't be taken.
_MaxSlotSet= BookStartSlot-1;
_LastBookNumDbFill= 0;
@ -2678,7 +2699,7 @@ void CSPhraseManager::updateMemoryCtrlRegenTickRange(uint memorySlot, CDBCtrlShe
if (ctrl->isShortCut())
memoryLine = getSelectedMemoryLineDB();
else
memoryLine = 0;
memoryLine = getSelectedMemoryAltLineDB();
if (memoryLine < 0)
return;
sint32 phraseId= getMemorizedPhrase(memoryLine, memorySlot);
@ -2820,7 +2841,7 @@ void CSPhraseManager::updateMemoryCtrlState(uint memorySlot, CDBCtrlSheet *ctrl,
if (ctrl->isShortCut()) // No memoryLine defined
memoryLine= getSelectedMemoryLineDB();
else
memoryLine= 0;
memoryLine= getSelectedMemoryAltLineDB();
bool newIsMacro= isMemorizedMacro(memoryLine, memorySlot);
sint32 macroId= getMemorizedMacro(memoryLine, memorySlot);
sint32 phraseId= getMemorizedPhrase(memoryLine, memorySlot);

@ -235,9 +235,10 @@ public:
/// Only one memory line is displayed in the Memory DB. if -1, erased.
void selectMemoryLineDB(sint32 memoryLine);
void selectMemoryLineDBalt(sint32 memoryLine);
/// get the selected memory line.
sint32 getSelectedMemoryLineDB() const {return _SelectedMemoryDB;}
sint32 getSelectedMemoryAltLineDB() const {return _SelectedMemoryDBalt;}
/// Common Method to send the Memorize msg to server
void sendMemorizeToServer(uint32 memoryLine, uint32 memorySlot, uint32 phraseId);
/// Common Method to send the Forget msg to server
@ -518,6 +519,7 @@ private:
};
std::vector<CMemoryLine> _Memories;
sint32 _SelectedMemoryDB;
sint32 _SelectedMemoryDBalt;
void updateMemoryDBAll();
void updateMemoryDBSlot(uint32 memorySlot);

@ -49,7 +49,6 @@
#include "global.h"
#include "input.h"
#include "libwww.h"
#include "http_client.h"
#include "http_client_curl.h"
#include "login_progress_post_thread.h"
@ -141,6 +140,19 @@ uint32 TotalPatchSize;
CLoginStateMachine LoginSM;
// TODO : nico : put this in an external file, this way it isn't included by the background downloader
#ifndef RY_BG_DOWNLOADER
bool CStartupHttpClient::connectToLogin()
{
return connect(ClientCfg.ConfigFile.getVar("StartupHost").asString(0));
}
CStartupHttpClient HttpClient;
#endif // RY_BG_DOWNLOADER
// ***************************************************************************
// Pop a fatal error message box, giving the option to 'quit' the client, plus a help button
@ -2329,7 +2341,6 @@ bool initCreateAccount()
if(text)
{
text->setHardText(toString(CI18N::get("uiCreateAccountWelcome")));
text->setMultiLineSpace(20);
text->setColor(CRGBA(255, 255, 255, 255));
CInterfaceGroup * group = dynamic_cast<CInterfaceGroup*>(createAccountUI->findFromShortId("erros_txt"));
@ -2525,7 +2536,6 @@ class CAHOnCreateAccountSubmit : public IActionHandler
CViewText * text = dynamic_cast<CViewText*>(createAccountUI->findFromShortId("errors_list"));
if(text)
{
text->setMultiLineSpace(10);
text->setColor(CRGBA(250, 30, 30, 255));
std::vector< std::string > errors(5);

@ -19,6 +19,7 @@
#define CL_LOGIN_H
#include "nel/misc/types_nl.h"
#include "game_share/http_client.h"
#include <string>
#include <vector>
@ -67,6 +68,22 @@ void mainLandPatch();
extern std::vector<CShard> Shards;
extern sint32 ShardSelected;
// TODO : nico : put this in an external file, this way it isn't included by the background downloader
#ifndef RY_BG_DOWNLOADER
/*
* HTTP client preconfigured to connect to the startup login host
*/
class CStartupHttpClient : public CHttpClient
{
public:
bool connectToLogin();
};
extern CStartupHttpClient HttpClient;
#endif // RY_BG_DOWNLOADER
#endif // CL_LOGIN_H

@ -19,7 +19,7 @@
#include "nel/misc/thread.h"
#include "nel/misc/singleton.h"
#include "http_client.h"
#include "game_share/http_client.h"
namespace NLMISC

@ -3260,7 +3260,7 @@ private:
if(i != digitMaxEnd)
{
ucstring web_app = contentStr.substr(digitStart, i-digitStart);
contentStr = ucstring("http://"+ClientCfg.WebIgMainDomain+"/start/")+web_app+ucstring(".php?")+contentStr.substr(i+1);
contentStr = ucstring("http://"+ClientCfg.WebIgMainDomain+"/")+web_app+ucstring("/index.php?")+contentStr.substr(i+1);
}
else
{

@ -673,7 +673,7 @@ void CPlayerCL::updateVisualPropertyVpa(const NLMISC::TGameCycle &/* gameCycle *
}
// update title when gender changed
const ucstring replacement(STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw,_Gender == GSGENDER::female));
const ucstring replacement(STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw, _Gender == GSGENDER::female));
if (!replacement.empty() || !ClientCfg.DebugStringManager)
{
// Get extended name

@ -69,7 +69,7 @@
#include "string_manager_client.h"
#include "precipitation_clip_grid.h"
#include "interface_v3/music_player.h"
#include "http_client.h"
#include "login.h"
#include "actions_client.h"
#include "login_progress_post_thread.h"
//

@ -25,6 +25,7 @@
#include "nel/misc/hierarchical_timer.h"
#include "nel/misc/algo.h"
#include "misc.h"
#include "entity_cl.h"
using namespace std;
using namespace NLMISC;
@ -729,6 +730,13 @@ restartLoop:
}
}
// If the string contains a title, then remove it
ucstring::size_type pos = str.find('$');
if ( ! str.empty() && pos != ucstring::npos)
{
str = CEntityCL::removeTitleFromName(str);
}
// append this string
temp.append(move, src+param.ReplacementPoint);
temp += str;
@ -1603,7 +1611,7 @@ const ucchar *CStringManagerClient::getSPhraseLocalizedDescription(NLMISC::CShee
}
// ***************************************************************************
const ucchar *CStringManagerClient::getTitleLocalizedName(const std::string &titleId, bool women)
const ucchar *CStringManagerClient::getTitleLocalizedName(const ucstring &titleId, bool women)
{
vector<ucstring> listInfos = getTitleInfos(titleId, women);
@ -1613,18 +1621,16 @@ const ucchar *CStringManagerClient::getTitleLocalizedName(const std::string &tit
return _TitleWords.back().c_str();
}
ucstring ucId;
ucId.fromUtf8(titleId);
return ucId.c_str();
return titleId.c_str();
}
// ***************************************************************************
vector<ucstring> CStringManagerClient::getTitleInfos(const std::string &titleId, bool women)
vector<ucstring> CStringManagerClient::getTitleInfos(const ucstring &titleId, bool women)
{
ucstring infosUC;
infosUC.fromUtf8(titleId);
//ucstring infosUC;
//infosUC.fromUtf8(titleId);
vector<ucstring> listInfos;
splitUCString(infosUC, ucstring("#"), listInfos);
splitUCString(titleId, ucstring("#"), listInfos);
if (listInfos.size() > 0)
{

@ -106,8 +106,8 @@ public:
static const ucchar *getSPhraseLocalizedDescription(NLMISC::CSheetId id);
// Get the Localized Title name
static const ucchar *getTitleLocalizedName(const std::string &titleId, bool women);
static std::vector<ucstring> getTitleInfos(const std::string &titleId, bool women);
static const ucchar *getTitleLocalizedName(const ucstring &titleId, bool women);
static std::vector<ucstring> getTitleInfos(const ucstring &titleId, bool women);
// Get the Localized name of a classification type
static const ucchar *getClassificationTypeLocalizedName(EGSPD::CClassificationType::TClassificationType type);

@ -15,8 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdpch.h"
#include "http_client.h"
#include "client_cfg.h"
#include "game_share/http_client.h"
using namespace NLMISC;
using namespace NLNET;
@ -193,15 +192,30 @@ void CHttpClient::disconnect()
}
#ifndef RY_BG_DOWNLOADER
// ***************************************************************************
bool CStartupHttpClient::connectToLogin()
CHttpPostTask::CHttpPostTask(const std::string &host, const std::string &page, const std::string &params)
: _Host(host)
, _Page(page)
, _Params(params)
{
return connect(ClientCfg.ConfigFile.getVar("StartupHost").asString(0));
}
CStartupHttpClient HttpClient;
// ***************************************************************************
void CHttpPostTask::run(void)
{
CHttpClient httpClient;
std::string ret;
#endif
if ( ! httpClient.connect(_Host))
{
return;
}
if ( ! httpClient.sendPost(_Host + _Page, _Params))
{
return;
}
httpClient.receive(ret);
httpClient.disconnect();
}

@ -66,25 +66,22 @@ private:
NLNET::CTcpSock _Sock;
};
// ***************************************************************************
// ***************************************************************************
// ***************************************************************************
// TODO : nico : put this in an external file, this way it isn't included by the background downloader
#ifndef RY_BG_DOWNLOADER
/*
* HTTP client preconfigured to connect to the startup login host
*/
class CStartupHttpClient : public CHttpClient
class CHttpPostTask : public NLMISC::IRunnable
{
public:
CHttpPostTask(const std::string &host, const std::string &page, const std::string &params);
void run(void);
bool connectToLogin();
private:
std::string _Host;
std::string _Page;
std::string _Params;
};
extern CStartupHttpClient HttpClient;
#endif
#endif // NL_HTTP_CLIENT_H
/* End of http_client.h */

@ -31,7 +31,7 @@ const uint RYZOM_WEEK_IN_DAY = 6;
const uint RYZOM_YEAR_IN_DAY = RYZOM_MONTH_IN_DAY*RYZOM_YEAR_IN_MONTH;
const uint RYZOM_CYCLE_IN_MONTH = 12;
const uint RYZOM_START_YEAR = 2525;
const uint RYZOM_START_YEAR = 2570-1;
const uint RYZOM_START_SPRING = 61;
const uint RYZOM_START_DAY = 1111111;
const uint RYZOM_START_HOUR = 9;

@ -7,97 +7,97 @@ dssTarget :: // ask DSS to perform a GM action on the player's target
// Commands
//
addGuildMember :DEV:SGM:GM:EM: // Add a new member to a guild: <guild name> <member name>
addGuildXp :DEV:SGM:GM:EM: // Add xp to a guild: <guild name> <xp (positive or negative)>
addPetAnimal :DEV:SGM:GM:EM: // Add pet animal to character: <PetTicket>
addPosFlag :DEV:SGM:GM:EM: // Add a new position flag: <flag name>
addSkillPoints :DEV:SGM:GM:EM: // Add skill points of given type (Fight=0, Magic=1, Craft=2, Harvest=3): <SP type [0..3]> <nb SP>
addXPToSkill :DEV:SGM:GM:EM: // Gain experience in the given skill: <xp> <skill> [<count>]
broadcast :DEV:SGM:GM:EM:VG: // Broadcast a message: [repeat=<num repeat> or during=<time in seconds>] [every=<delay in secondes>] <message>
changeHairCut :DEV:SGM:GM:EM: // Change the haircut of a player: <sheet name>
changeMode :DEV:SGM:GM:EM: // Change mode of a player: <mode>
changeVar :DEV:SGM:GM:EM: // Change a variable of a player: <var> <val>
checkTargetSP :DEV:SGM:GM: // Check target player skill points
clearEventFaction :DEV:SGM:GM:EM: // Clear the event faction of player: <player name>
clearFriendsList :DEV:SGM:GM: // Clear the friend list of a player
clearGuildMessage // Clear the guild message of the day
clearIgnoreList :DEV:SGM:GM: // Clear the ignore list of a player
clearIsFriendOfList :DEV:SGM:GM: // Clear the "is friend of" list of a player
createItemInBag :DEV:SGM:GM:EM: // Create an item and put it in the player bag: <sheetId>|<sheetName> <quantity> <quality>
createItemInInv :DEV: // Create an item and put it in the given player inventory: <invId> <sheetId>|<sheetName> <quantity> <quality>
createItemInTmpInv :DEV:SGM:GM:EM: // Create an item and put it in the player temp inventory: <sheetId>|<sheetName> <quantity> <quality>
createNamedItemInBag :DEV:SGM: // Create a named item and put it in the player bag: <item name> [<quantity>]
createFullArmorSet :DEV:SGM:GM:EM: // Create and equip player with chosen full armor set: <race (fyros/matis/zorai/tryker)> <type (light/medium/heavy)> <quality>
delPosFlag :DEV:SGM:GM:EM: // Delete a position flag: <flag name>
addGuildMember :DEV:SGM:GM:EM: // Add a new member to a guild: <guild name> <member name>
addGuildXp :DEV:SGM:GM:EM: // Add xp to a guild: <guild name> <xp (positive or negative)>
addPetAnimal :DEV:SGM:GM:EM: // Add pet animal to character: <PetTicket>
addPosFlag :DEV:SGM:GM:EM: // Add a new position flag: <flag name>
addSkillPoints :DEV:SGM:GM:EM: // Add skill points of given type (Fight=0, Magic=1, Craft=2, Harvest=3): <SP type [0..3]> <nb SP>
addXPToSkill :DEV:SGM:GM:EM: // Gain experience in the given skill: <xp> <skill> [<count>]
broadcast :DEV:SGM:GM:EM:VG: // Broadcast a message: [repeat=<num repeat> or during=<time in seconds>] [every=<delay in secondes>] <message>
changeHairCut :DEV:SGM:GM:EM: // Change the haircut of a player: <sheet name>
changeMode :DEV:SGM:GM:EM: // Change mode of a player: <mode>
changeVar :DEV:SGM:GM:EM: // Change a variable of a player: <var> <val>
checkTargetSP :DEV:SGM:GM: // Check target player skill points
clearEventFaction :DEV:SGM:GM:EM: // Clear the event faction of player: <player name>
clearFriendsList :DEV:SGM:GM: // Clear the friend list of a player
clearGuildMessage // Clear the guild message of the day
clearIgnoreList :DEV:SGM:GM: // Clear the ignore list of a player
clearIsFriendOfList :DEV:SGM:GM: // Clear the "is friend of" list of a player
createItemInBag :DEV:SGM:GM:EM: audit // Create an item and put it in the player bag: <sheetId>|<sheetName> <quantity> <quality>
createItemInInv :DEV: // Create an item and put it in the given player inventory: <invId> <sheetId>|<sheetName> <quantity> <quality>
createItemInTmpInv :DEV:SGM:GM:EM: audit // Create an item and put it in the player temp inventory: <sheetId>|<sheetName> <quantity> <quality>
createNamedItemInBag :DEV:SGM: audit // Create a named item and put it in the player bag: <item name> [<quantity>]
createFullArmorSet :DEV:SGM:GM:EM: audit // Create and equip player with chosen full armor set: <race (fyros/matis/zorai/tryker)> <type (light/medium/heavy)> <quality>
delPosFlag :DEV:SGM:GM:EM: // Delete a position flag: <flag name>
dismiss :DEV:SGM:GM:VG:SG:EM:EG: // Teleport a player back to its former position (before last call to summonPlayer): <player name>
displayForageRM :DEV:SGM:GM:EM: // Display forageable raw materials near by or at the exact position of a player: <exactPos=1> <extendedInfo=0>
displayInfosOnTarget :DEV:SGM:GM:EM: // Display infos on entity target
dodge // Set the defense mode to dodge
execPhrase :DEV:SGM:GM: // Execute a phrase with given bricks: <cyclic 0/1> [<brick ids>...]
executeSabrinaPhrase :DEV:SGM:GM: // Execute a sabrina phrase: <cyclic 0/1> <phraseId>
failMission :DEV:SGM:GM: // Force mission failure: <mission idx>
forceTargetToDie :DEV:SGM:GM:EM: // Force entity target to die
getEventFaction :DEV:SGM:GM:EM: // Get the event faction of player: <player name>
giveRespawnPoint :DEV:SGM:GM: // Give a respawn point to a player: <respawn point name>
guildInvite // Send a guild invite to a player character without distance constrainte
setLeague // Create a League
leagueInvite // Send a League invite to a Team Leader character without distance constrainte
leagueKick // Kick a player or team from league
roomInvite // Send a room invite
roomKick // Remove a room invite
guildMOTD // Set the guild message of the day, command effective only for officer and more graded guild members
displayForageRM :DEV:SGM:GM:EM: // Display forageable raw materials near by or at the exact position of a player: <exactPos=1> <extendedInfo=0>
displayInfosOnTarget :DEV:SGM:GM:EM: // Display infos on entity target
dodge // Set the defense mode to dodge
execPhrase :DEV:SGM:GM: // Execute a phrase with given bricks: <cyclic 0/1> [<brick ids>...]
executeSabrinaPhrase :DEV:SGM:GM: // Execute a sabrina phrase: <cyclic 0/1> <phraseId>
failMission :DEV:SGM:GM: // Force mission failure: <mission idx>
forceTargetToDie :DEV:SGM:GM:EM: // Force entity target to die
getEventFaction :DEV:SGM:GM:EM: // Get the event faction of player: <player name>
giveRespawnPoint :DEV:SGM:GM: // Give a respawn point to a player: <respawn point name>
guildInvite // Send a guild invite to a player character without distance constrainte
setLeague // Create a League
leagueInvite // Send a League invite to a Team Leader character without distance constrainte
leagueKick // Kick a player or team from league
roomInvite // Send a room invite
roomKick // Remove a room invite
guildMOTD // Set the guild message of the day, command effective only for officer and more graded guild members
ignoreTells :DEV:SGM:GM:VG:SG:EM:EG: // Ignore incoming tell: <0/false/1/true>
infos :DEV:SGM:GM:VG:SG:G:EM:EG: // Give info on character (GodMode, Invisible...)
killMob :DEV:SGM:GM:EM:EG: // Kill a mob (/b killMob)
learnAllBricks :DEV:SGM:GM:EM: // Specified player learns all possible bricks for his skill values
learnAllForagePhrases :DEV:SGM:GM:EM: // Learn all forage phrases, begin at specified index: <index>
learnAllPhrases :DEV:SGM:GM:EM: // Specified player learns all possible phrases for his skill values
learnBrick :DEV:SGM:GM:EM: // Specified player learns given brick: <brick sheet>
unlearnBrick :DEV:SGM:GM:EM: // Specified player unlearns given brick: <brick sheet>
learnPhrase :DEV:SGM:GM:EM: // Specified player learns a phrase and set it at index knownPhraseIndex: <phrase Sheet>
listGuildMembers :DEV:SGM:GM:EM: // Display guild members list: <guild name>
listPosFlags :DEV:SGM:GM:VG:SG:G:EM:EG: // List position flags (long format): [<radius in meters>]
loadFromPDR :DEV:SGM: // Load a character from a binary PDR file: <file name>
loadFromXML :DEV:SGM: // Load a character from an XML file: <file name>
logXpGain :DEV:SGM:GM: // Log or not xp gain infos for specified player: <on/off>
lPosFlags :DEV:SGM:GM:VG:SG:G:EM:EG: // List position flags (short format): [<radius in meters>]
monitorMissions :DEV:SGM:GM: // Monitor missions of the given player: <player name>
motd :DEV:SGM:GM:EM:VG: // Set the current message of the day: <message to be displayed>
mute :DEV:SGM:GM:EM:VG:SG: // Mute a user: <player name> <duration>
muteUniverse :DEV:SGM:GM:EM:VG:SG: // Mute the universe channel: <duration>
outpostBanGuild :DEV:SGM:GM:EM: // Ban a guild for an outpost conflit: <outpost_id> <guild_name> [<all|atk|def>]
outpostBanPlayer :DEV:SGM:GM:EM: // Ban a character for an outpost conflit: <outpost_id> <eid> [<all|atk|def>]
outpostUnbanGuild :DEV:SGM:GM:EM: // Unban a guild for an outpost conflit: <outpost_id> <guild_name> [<all|atk|def>]
outpostUnbanPlayer :DEV:SGM:GM:EM: // Unban a character for an outpost conflit: <outpost_id> <eid> [<all|atk|def>]
parry // Set the defense mode to parry
progressMission :DEV:SGM:GM: // Force mission progression: <mission idx> [repeat]
renameGuild :DEV:SGM:GM:EM: // Rename a guild: <guild name> <new guild name>
renamePlayer [SU] :DEV:SGM:GM:EM: // Rename a player: <player name> <new playerName>
renamePlayerForEvent :DEV:SGM:GM:EM:EG: // Rename a player temporarily for an event: <player name> <new playerName>
resetPowerFlags :DEV:SGM:GM:EM: // Reset the ineffective aura and the power flags for given character
root :DEV:SGM:GM:EM:VG:SG: // Root a player: <player name> <time in seconds>
saveToPDR :DEV:SGM: // Save a character to a binary PDR file: <file name>
saveToXML :DEV:SGM: // Save a character to an XML file: <file name>
setEventFaction :DEV:SGM:GM:EM: // Set the event faction of player: <player name> <event faction>
setGMGuild :DEV:SGM:GM: // Set the current GM guild
setGuildChargePoint :DEV:SGM:GM:EM: // Set the charge points of a guild: <guild name> <points>
setGuildDescription :DEV:SGM:GM:EM: // Set a guild description: <guild name> <new guild description>
setGuildLeader :DEV:SGM:GM:EM: // Set the leader of a guild: <guild name> <member name>
setGuildMemberGrade :DEV:SGM:GM:EM: // Set the grade of a guild member: <guild name> <member name> <grade = Member/Officer/HighOfficer/Leader>
setGuildMessage // Set the guild message of the day: <message>
setItemSapLoad :DEV:SGM:GM:EM: // Set an item sap load: <slot index in bag (starts at 0)> <float value>
setPosFlag :DEV:SGM:GM:EM // Set a position flag: <flag name>
setPvPTag // Set player character PvP tag to true or false
setFamePlayer :DEV:SGM:GM:EM: // Set the fame value of a player in the given faction: <faction> <fame>
resetPVPTimers :DEV:SGM:GM:EM: // Reset the pvp timers of a player: <player name>
setSkillsToMaxValue :DEV:SGM:GM:EM: // Set player skills to max value
showCSR :DEV:SGM:GM:VG:SG:G:EM:EG: // Show CSR title if the player is a CSR
showFBT :DEV:SGM:GM:EM: // Show Focus Beta Tester title if the player is a FBT
startEvent :DEV:SGM:GM:EM: // Start an event with the given name: <event name>
stopEvent :DEV:SGM:GM:EM: // Stop previous started event
stopMonitorMissions :DEV:SGM:GM: // Stop monitoring missions of the given player
summon :DEV:SGM:GM:VG:SG:EM: // Summon a player in front of the CSR: <player name>
targetInfos :DEV:SGM:GM:EM: // Give infos on the target
infos :DEV:SGM:GM:VG:SG:G:EM:EG: // Give info on character (GodMode, Invisible...)
killMob :DEV:SGM:GM:EM:EG: // Kill a mob (/b killMob)
learnAllBricks :DEV:SGM:GM:EM: // Specified player learns all possible bricks for his skill values
learnAllForagePhrases :DEV:SGM:GM:EM: // Learn all forage phrases, begin at specified index: <index>
learnAllPhrases :DEV:SGM:GM:EM: // Specified player learns all possible phrases for his skill values
learnBrick :DEV:SGM:GM:EM: // Specified player learns given brick: <brick sheet>
unlearnBrick :DEV:SGM:GM:EM: // Specified player unlearns given brick: <brick sheet>
learnPhrase :DEV:SGM:GM:EM: // Specified player learns a phrase and set it at index knownPhraseIndex: <phrase Sheet>
listGuildMembers :DEV:SGM:GM:EM: // Display guild members list: <guild name>
listPosFlags :DEV:SGM:GM:VG:SG:G:EM:EG: // List position flags (long format): [<radius in meters>]
loadFromPDR :DEV:SGM: // Load a character from a binary PDR file: <file name>
loadFromXML :DEV:SGM: // Load a character from an XML file: <file name>
logXpGain :DEV:SGM:GM: // Log or not xp gain infos for specified player: <on/off>
lPosFlags :DEV:SGM:GM:VG:SG:G:EM:EG: // List position flags (short format): [<radius in meters>]
monitorMissions :DEV:SGM:GM: // Monitor missions of the given player: <player name>
motd :DEV:SGM:GM:EM:VG: // Set the current message of the day: <message to be displayed>
mute :DEV:SGM:GM:EM:VG:SG: // Mute a user: <player name> <duration>
muteUniverse :DEV:SGM:GM:EM:VG:SG: // Mute the universe channel: <duration>
outpostBanGuild :DEV:SGM:GM:EM: // Ban a guild for an outpost conflit: <outpost_id> <guild_name> [<all|atk|def>]
outpostBanPlayer :DEV:SGM:GM:EM: // Ban a character for an outpost conflit: <outpost_id> <eid> [<all|atk|def>]
outpostUnbanGuild :DEV:SGM:GM:EM: // Unban a guild for an outpost conflit: <outpost_id> <guild_name> [<all|atk|def>]
outpostUnbanPlayer :DEV:SGM:GM:EM: // Unban a character for an outpost conflit: <outpost_id> <eid> [<all|atk|def>]
parry // Set the defense mode to parry
progressMission :DEV:SGM:GM: // Force mission progression: <mission idx> [repeat]
renameGuild :DEV:SGM:GM:EM: // Rename a guild: <guild name> <new guild name>
renamePlayer [SU] :DEV:SGM:GM:EM: // Rename a player: <player name> <new playerName>
renamePlayerForEvent :DEV:SGM:GM:EM:EG: // Rename a player temporarily for an event: <player name> <new playerName>
resetPowerFlags :DEV:SGM:GM:EM: // Reset the ineffective aura and the power flags for given character
root :DEV:SGM:GM:EM:VG:SG: // Root a player: <player name> <time in seconds>
saveToPDR :DEV:SGM: // Save a character to a binary PDR file: <file name>
saveToXML :DEV:SGM: // Save a character to an XML file: <file name>
setEventFaction :DEV:SGM:GM:EM: // Set the event faction of player: <player name> <event faction>
setGMGuild :DEV:SGM:GM: // Set the current GM guild
setGuildChargePoint :DEV:SGM:GM:EM: // Set the charge points of a guild: <guild name> <points>
setGuildDescription :DEV:SGM:GM:EM: // Set a guild description: <guild name> <new guild description>
setGuildLeader :DEV:SGM:GM:EM: // Set the leader of a guild: <guild name> <member name>
setGuildMemberGrade :DEV:SGM:GM:EM: // Set the grade of a guild member: <guild name> <member name> <grade = Member/Officer/HighOfficer/Leader>
setGuildMessage // Set the guild message of the day: <message>
setItemSapLoad :DEV:SGM:GM:EM: // Set an item sap load: <slot index in bag (starts at 0)> <float value>
setPosFlag :DEV:SGM:GM:EM // Set a position flag: <flag name>
setPvPTag // Set player character PvP tag to true or false
setFamePlayer :DEV:SGM:GM:EM: // Set the fame value of a player in the given faction: <faction> <fame>
resetPVPTimers :DEV:SGM:GM:EM: // Reset the pvp timers of a player: <player name>
setSkillsToMaxValue :DEV:SGM:GM:EM: // Set player skills to max value
showCSR :DEV:SGM:GM:VG:SG:G:EM:EG: // Show CSR title if the player is a CSR
showFBT :DEV:SGM:GM:EM: // Show Focus Beta Tester title if the player is a FBT
startEvent :DEV:SGM:GM:EM: // Start an event with the given name: <event name>
stopEvent :DEV:SGM:GM:EM: // Stop previous started event
stopMonitorMissions :DEV:SGM:GM: // Stop monitoring missions of the given player
summon :DEV:SGM:GM:VG:SG:EM: // Summon a player in front of the CSR: <player name>
targetInfos :DEV:SGM:GM:EM: // Give infos on the target
teamInvite // Send a team invite to a player character
connectUserChannel // Connect to User Channel Chat
webExecCommand // Execute web command (need HMAC signature)
@ -105,75 +105,76 @@ webDelCommandsIds // Delete web transactions for web_app
webAddCommandsIds // Add web command transactions for web_app
updateTarget // Update current target
teleport :DEV:SGM:GM:VG:SG:G:OBSERVER:EM:EG: // Teleport the CSR in front of a player: <player name>
tpPosFlag :DEV:SGM:GM:VG:SG:G:EM:EG: // Teleport a player to a position flag: <flag name>
universe :DEV:SGM:GM:EM: // Chat in universe mode: <boolean>
unmute :DEV:SGM:GM:EM:VG:SG: // Unmute a user: <player name>
unmuteUniverse :DEV:SGM:GM:EM:VG:SG: // Unmute the universe channel
unroot :DEV:SGM:GM:EM:VG:SG: // Stop rooting a player: <player name>
updateGuildMembersList :DEV:SGM:GM: // update guild members list on members clients: <guild name>
//setPvpClan :DEV: // choose a clan for pvp
summonPet // player can summon it's pet one time only
allowSummonPet :DEV:SGM:GM: // autorize player to summon it's pet one time per pet
displayShopSelector :DEV:SGM: // display shop selector for a NPC
addFactionAttackableToTarget :DEV: // add attackable possibility for player on target for specified faction
forceMissionProgress :DEV: // force mission step progression (for debug purpose only)
savePlayerActiveChar :DEV:SGM: // save immediatly a player active char, a specific filename can enter for backup a character in specific situation/context
reloadPlayer :DEV:SGM: // set next filename used for loading a character (must be offline and log later) or relaod an online character to previous backup or with a specified filename.
farTPPush :DEV:SGM:GM:VG:SG:EM: // used to tp on a specific session
farTPReturn :DEV:SGM:GM:VG:SG:EM: // used to tp back to your previous session
characterMissionDump :DEV:SGM:GM: //Dump mission list for a character
removeMission :DEV:SGM:GM: //Remove a mission of a character
addMission :DEV:SGM:GM: //add a mission to a character
characterInventoryDump :DEV:SGM:GM:EM: // Dump character inventory info: <inventory> <from slot> <to slot>
deleteInventoryItem :DEV:SGM:GM:EM: // Delete an item from a characters inventory: <inventory> <slot> <sheetname> <quality> <quantity>
lockItem // Lock/unlock item for trading, selling, destruction.
setTeamLeader // Set the team leader
setPetAnimalSatiety :DEV:SGM:GM:EM: // Set the satiety of pet animal (petIndex in 0..3): <petIndex> full|<value> [<nameForAnswer>]
getPetAnimalSatiety :DEV:SGM:GM:EM: // Get the satiety of pet animal (petIndex in 0..3): <petIndex> [<nameForAnswer>]
setPetAnimalName :DEV:SGM:GM:EM:EG: // Set the name of a pet animal (petIndex in 0..3): <petIndex> <name>
setSimplePhrase :DEV:SGM:GM:EM: // Set an IOS phrase: <id> <phrase> [<language code>]
tpPosFlag :DEV:SGM:GM:VG:SG:G:EM:EG: // Teleport a player to a position flag: <flag name>
universe :DEV:SGM:GM:EM: // Chat in universe mode: <boolean>
unmute :DEV:SGM:GM:EM:VG:SG: // Unmute a user: <player name>
unmuteUniverse :DEV:SGM:GM:EM:VG:SG: // Unmute the universe channel
unroot :DEV:SGM:GM:EM:VG:SG: // Stop rooting a player: <player name>
updateGuildMembersList :DEV:SGM:GM: // update guild members list on members clients: <guild name>
//setPvpClan :DEV: // choose a clan for pvp
summonPet // player can summon it's pet one time only
allowSummonPet :DEV:SGM:GM: // autorize player to summon it's pet one time per pet
displayShopSelector :DEV:SGM: // display shop selector for a NPC
addFactionAttackableToTarget :DEV: // add attackable possibility for player on target for specified faction
forceMissionProgress :DEV: // force mission step progression (for debug purpose only)
savePlayerActiveChar :DEV:SGM: // save immediatly a player active char, a specific filename can enter for backup a character in specific situation/context
reloadPlayer :DEV:SGM: // set next filename used for loading a character (must be offline and log later) or relaod an online character to previous backup or with a specified filename.
farTPPush :DEV:SGM:GM:VG:SG:EM: audit // used to tp on a specific session
farTPReturn :DEV:SGM:GM:VG:SG:EM: // used to tp back to your previous session
characterMissionDump :DEV:SGM:GM: // Dump mission list for a character
removeMission :DEV:SGM:GM: // Remove a mission of a character
addMission :DEV:SGM:GM: // add a mission to a character
characterInventoryDump :DEV:SGM:GM:EM: // Dump character inventory info: <inventory> <from slot> <to slot>
deleteInventoryItem :DEV:SGM:GM:EM: // Delete an item from a characters inventory: <inventory> <slot> <sheetname> <quality> <quantity>
lockItem // Lock/unlock item for trading, selling, destruction.
setTeamLeader // Set the team leader
setPetAnimalSatiety :DEV:SGM:GM:EM: // Set the satiety of pet animal (petIndex in 0..3): <petIndex> full|<value> [<nameForAnswer>]
getPetAnimalSatiety :DEV:SGM:GM:EM: // Get the satiety of pet animal (petIndex in 0..3): <petIndex> [<nameForAnswer>]
setPetAnimalName :DEV:SGM:GM:EM:EG: // Set the name of a pet animal (petIndex in 0..3): <petIndex> <name>
setSimplePhrase :DEV:SGM:GM:EM: // Set an IOS phrase: <id> <phrase> [<language code>]
// Variables
//
Aggro :DEV:SGM:GM:VG:SG:EM:EG: // Mobs can aggro a player?
CreateCharacterStartSkillsValue :DEV:SGM:GM:EM: // Create character start skills, skill point and money
FBT :DEV:SGM:GM:VG:EM: // Is a Focus Beta Tester?
God :DEV:SGM:GM:EM: // God mode, invulnerability
Invulnerable :DEV:SGM:GM:EM: // Invulnerable mode, invulnerability to all
ShowFactionChannels :DEV:SGM:GM:VG:SG:G: // Show faction channel for moderation
HP :DEV:SGM:GM:EM: // Hit points of a player
MaxHP :DEV:SGM:GM:EM: // Max hit points of a bot
Invisible :DEV:SGM:GM:VG:SG:EM:EG: // Invisibility of a player
Money :DEV:SGM:GM:EM: // Money of a player
Name :DEV:SGM:GM:EM: // Name of a player
Position :DEV:SGM:GM:VG:PR:OBSERVER:EM:EG: // Position of a player (in meters) <posx>,<posy>[,<posz>]] | <bot name> | <player name> | home
Priv :DEV: // User privilege
PriviledgePVP :DEV:SGM:GM:EM:EG: // Turns PVP on/off on character (blame coder for typo)
FullPVP :DEV:SGM:GM:EM:EG: // Turns Full PVP on/off on character (blame coder for typo)
RyzomDate :DEV:SGM:GM:EM: // Current ryzom date
RyzomTime :DEV:SGM:GM:EM: // Current ryzom time
Aggro :DEV:SGM:GM:VG:SG:EM:EG: audit // Mobs can aggro a player?
CreateCharacterStartSkillsValue :DEV:SGM:GM:EM: // Create character start skills, skill point and money
FBT :DEV:SGM:GM:VG:EM: // Is a Focus Beta Tester?
God :DEV:SGM:GM:EM: audit // God mode, invulnerability
Invulnerable :DEV:SGM:GM:EM: audit // Invulnerable mode, invulnerability to all
ShowFactionChannels :DEV:SGM:GM:EM:VG:SG:G: // Show faction channel for moderation
HP :DEV:SGM:GM:EM: // Hit points of a player
MaxHP :DEV:SGM:GM:EM: // Max hit points of a bot
Invisible :DEV:SGM:GM:VG:SG:EM:EG: // Invisibility of a player
Money :DEV:SGM:GM:EM: // Money of a player
Name :DEV:SGM:GM:EM: // Name of a player
Position :DEV:SGM:GM:VG:PR:OBSERVER:EM:EG: // Position of a player (in meters) <posx>,<posy>[,<posz>]] | <bot name> | <player name> | home
Priv :DEV: // User privilege
PriviledgePVP :DEV:SGM:GM:EM:EG: // Turns PVP on/off on character (blame coder for typo)
FullPVP :DEV:SGM:GM:EM:EG: // Turns Full PVP on/off on character
RyzomDate :DEV:SGM:GM:EM: // Current ryzom date
RyzomTime :DEV:SGM:GM:EM: // Current ryzom time
// Event commands
eventCreateNpcGroup :DEV:SGM:GM:EM: // Create a npc group
eScript :DEV:SGM:GM:EM: // Execute a script on an event npc group (new version)
eventNpcGroupScript :DEV:SGM:GM:EM: // Execute a script on an event npc group
eventSetBotName :DEV:SGM:GM:EM: // Set the name of a bot
eventSetBotScale :DEV:SGM:GM:EM: // Set the scale of a bot
eventSetNpcGroupAggroRange :DEV:SGM:GM:EM: // Set the aggro range of a NPC group
eventSetNpcGroupEmote :DEV:SGM:GM:EM: // Set the emote for the NPC group to execute
eventSetFaunaBotAggroRange :DEV:SGM:GM:EM: // Set the aggro ranges (not hungry, hungry and hunting) of a fauna creature
eventResetFaunaBotAggroRange :DEV:SGM:GM:EM: // Reset the aggro range of a fauna creature to sheet values
eventSetBotCanAggro :DEV:SGM:GM:EM: // Define if a creature can take aggro for another entity
eventSetItemCustomText :DEV:SGM:GM:EM: // Set the custom text of an item. For scroll-like items it's the text displayed in the help window.
eventResetItemCustomText :DEV:SGM:GM:EM: // Reset the custom text of an item to an empty string.
eventSetBotSheet :DEV:SGM:GM:EM: // Changes the sheet of a bot: <.creature sheet>
eventSetBotFaction :DEV:SGM:GM:EM: // Changes the faction of a bot: <faction name>
eventSetBotFameByKill :DEV:SGM:GM:EM: // Changes the amount of fame earned for bot faction when killing it: <fame value>
eventSetBotURL :DEV:SGM:GM:EM: // Set the url of a bot
eventSetBotURLName :DEV:SGM:GM:EM: // Set the url name of a bot
eventSpawnToxic :DEV:SGM:GM:EM: // Add toxic cloud
eventNpcSay :DEV:SGM:GM:EM: // Have an NPC say a text
eventSetBotFacing :DEV:SGM:GM:EM: // Set the direction in which a bot faces
eventGiveControl :DEV:SGM:GM:EM: // Give control of entity A to entity B : <master eid> <slave eid>
eventLeaveControl :DEV:SGM:GM:EM: // Leave control of entity : <master eid>
eventCreateNpcGroup :DEV:SGM:GM:EM: // Create a npc group
eScript :DEV:SGM:GM:EM: // Execute a script on an event npc group (new version)
eventNpcGroupScript :DEV:SGM:GM:EM: // Execute a script on an event npc group
eventSetBotName :DEV:SGM:GM:EM: // Set the name of a bot
eventSetBotScale :DEV:SGM:GM:EM: // Set the scale of a bot
eventSetNpcGroupAggroRange :DEV:SGM:GM:EM: // Set the aggro range of a NPC group
eventSetNpcGroupEmote :DEV:SGM:GM:EM: // Set the emote for the NPC group to execute
eventSetFaunaBotAggroRange :DEV:SGM:GM:EM: // Set the aggro ranges (not hungry, hungry and hunting) of a fauna creature
eventResetFaunaBotAggroRange :DEV:SGM:GM:EM: // Reset the aggro range of a fauna creature to sheet values
eventSetBotCanAggro :DEV:SGM:GM:EM: // Define if a creature can take aggro for another entity
eventSetItemCustomText :DEV:SGM:GM:EM: // Set the custom text of an item. For scroll-like items it's the text displayed in the help window.
eventResetItemCustomText :DEV:SGM:GM:EM: // Reset the custom text of an item to an empty string.
eventSetBotSheet :DEV:SGM:GM:EM: // Changes the sheet of a bot: <.creature sheet>
eventSetBotFaction :DEV:SGM:GM:EM: // Changes the faction of a bot: <faction name>
eventSetBotFameByKill :DEV:SGM:GM:EM: // Changes the amount of fame earned for bot faction when killing it: <fame value>
eventSetBotURL :DEV:SGM:GM:EM: // Set the url of a bot
eventSetBotURLName :DEV:SGM:GM:EM: // Set the url name of a bot
eventSpawnToxic :DEV:SGM:GM:EM: // Add toxic cloud
eventNpcSay :DEV:SGM:GM:EM: // Have an NPC say a text
eventSetBotFacing :DEV:SGM:GM:EM: // Set the direction in which a bot faces
eventGiveControl :DEV:SGM:GM:EM: // Give control of entity A to entity B : <master eid> <slave eid>
eventLeaveControl :DEV:SGM:GM:EM: // Leave control of entity : <master eid>
resetName // Reset player's name; undo a temporary rename
showOnline // Set friend visibility: <user id> <mode=0,1,2>

@ -345,6 +345,23 @@ void CSpawnBot::sheetChanged()
// CMirrors::initSheet(dataSetRow(), getPersistent().getSheet()->SheetId());
}
void CSpawnBot::sendInfoToEGS() const
{
if (!EGSHasMirrorReady)
return;
const uint32& maxHp = getPersistent().getCustomMaxHp();
if (maxHp > 0.f)
{
CChangeCreatureMaxHPMsg& msgList = CAIS::instance().getCreatureChangeMaxHP();
msgList.Entities.push_back(dataSetRow());
msgList.MaxHp.push_back((uint32)(maxHp));
msgList.SetFull.push_back((uint8)(1));
}
}
//////////////////////////////////////////////////////////////////////////////
// CBot //
//////////////////////////////////////////////////////////////////////////////
@ -359,6 +376,7 @@ CBot::CBot(CGroup* owner, CAIAliasDescriptionNode* alias)
, _SetSheetData(NULL)
, _Observers(NULL)
, _ProfileData(NULL)
, _CustomMaxHp(0)
{
}
@ -372,6 +390,7 @@ CBot::CBot(CGroup* owner, uint32 alias, std::string const& name)
, _SetSheetData(NULL)
, _Observers(NULL)
, _ProfileData(NULL)
, _CustomMaxHp(0.f)
{
}

@ -69,7 +69,7 @@ public:
virtual void setTheta(CAngle theta);
virtual void sendInfoToEGS() const = 0;
virtual void sendInfoToEGS() const;
CBot& getPersistent() const;
@ -244,6 +244,9 @@ public:
const ucstring& getCustomName() const { return _CustomName; }
void setCustomName(const ucstring &name) { _CustomName = name; }
const uint32& getCustomMaxHp() const { return _CustomMaxHp; }
void setCustomMaxHp(const uint32 &maxHp) { _CustomMaxHp = maxHp; }
virtual void setClientSheet(const std::string & clientSheetName);
// Can be redefine by NpcGroup in case of a BotNpc with a fauna sheet but that we don't want the name to ignore
@ -273,6 +276,7 @@ private:
bool _Healer;
bool _BuildingBot;
ucstring _CustomName;
uint32 _CustomMaxHp;
CTimer _SetSheetTimer;
struct CSetSheetData
{

@ -62,6 +62,8 @@ void CSpawnBotNpc::sendInfoToEGS() const
if (!EGSHasMirrorReady)
return;
CSpawnBot::sendInfoToEGS();
TGenNpcDescMsgImp msg;
msg.setEntityIndex(dataSetRow());

@ -1113,6 +1113,29 @@ void CGroupNpc::setOutpostSide(OUTPOSTENUMS::TPVPSide side)
}
}
void CGroupNpc::setOutpostFactions(OUTPOSTENUMS::TPVPSide side)
{
// Attack only the declared ennemies of the outpost
if (side == OUTPOSTENUMS::OutpostOwner)
{
// Bots factions
faction ().addProperty(NLMISC::toString("outpost:%s:bot_defender", getAliasString().c_str()));
friendFaction().addProperty(NLMISC::toString("outpost:%s:bot_defender", getAliasString().c_str()));
ennemyFaction().addProperty(NLMISC::toString("outpost:%s:bot_attacker", getAliasString().c_str()));
// Players faction
ennemyFaction().addProperty(NLMISC::toString("outpost:%s:attacker", getAliasString().c_str()));
}
if (side == OUTPOSTENUMS::OutpostAttacker)
{
// Bots factions
faction ().addProperty(NLMISC::toString("outpost:%s:bot_attacker", getAliasString().c_str()));
friendFaction().addProperty(NLMISC::toString("outpost:%s:bot_attacker", getAliasString().c_str()));
ennemyFaction().addProperty(NLMISC::toString("outpost:%s:bot_defender", getAliasString().c_str()));
// Players faction
ennemyFaction().addProperty(NLMISC::toString("outpost:%s:defender", getAliasString().c_str()));
}
}
void CGroupNpc::setFactionAttackableAbove(std::string faction, sint32 threshold, bool botAttackable)
{
if (botAttackable)

@ -231,6 +231,7 @@ public:
void setColour(uint8 colour);
void setOutpostSide(OUTPOSTENUMS::TPVPSide side);
void setOutpostFactions(OUTPOSTENUMS::TPVPSide side);
bool isRingGrp() const { return _RingGrp;}
private:

@ -870,25 +870,8 @@ void COutpost::createSquad(CGroupDesc<COutpostSquadFamily> const* groupDesc, COu
}*/
grp->setOutpostSide(side);
// Attack only the declared ennemies of the outpost
if (side==OUTPOSTENUMS::OutpostOwner)
{
// Bots factions
grp->faction ().addProperty(NLMISC::toString("outpost:%s:bot_defender", getAliasString().c_str()));
grp->friendFaction().addProperty(NLMISC::toString("outpost:%s:bot_defender", getAliasString().c_str()));
grp->ennemyFaction().addProperty(NLMISC::toString("outpost:%s:bot_attacker", getAliasString().c_str()));
// Players faction
grp->ennemyFaction().addProperty(NLMISC::toString("outpost:%s:attacker", getAliasString().c_str()));
}
if (side==OUTPOSTENUMS::OutpostAttacker)
{
// Bots factions
grp->faction ().addProperty(NLMISC::toString("outpost:%s:bot_attacker", getAliasString().c_str()));
grp->friendFaction().addProperty(NLMISC::toString("outpost:%s:bot_attacker", getAliasString().c_str()));
grp->ennemyFaction().addProperty(NLMISC::toString("outpost:%s:bot_defender", getAliasString().c_str()));
// Players faction
grp->ennemyFaction().addProperty(NLMISC::toString("outpost:%s:defender", getAliasString().c_str()));
}
grp->setOutpostFactions(side);
grp->_AggroRange = 25;
grp->_UpdateNbTicks = 10;
grp->respawnTime() = respawTimeGC;

@ -1522,11 +1522,14 @@ void setMaxHP_ff_(CStateInstance* entity, CScriptStack& stack)
if (!bot->isSpawned())
continue;
CSpawnBot* const sbot = bot->getSpawnObj();
msgList.Entities.push_back(sbot->dataSetRow());
msgList.MaxHp.push_back((uint32)(maxHp));
msgList.SetFull.push_back((uint8)(setFull?1:0));
if (maxHp > 0)
{
CSpawnBot* const sbot = bot->getSpawnObj();
msgList.Entities.push_back(sbot->dataSetRow());
msgList.MaxHp.push_back((uint32)(maxHp));
msgList.SetFull.push_back((uint8)(setFull?1:0));
}
bot->setCustomMaxHp((uint32)maxHp);
}
}

@ -124,6 +124,51 @@ void setFactionProp_ss_(CStateInstance* entity, CScriptStack& stack)
}
}
void setOupostMode_ss_(CStateInstance* entity, CScriptStack& stack)
{
std::string sideStr = stack.top(); stack.pop();
std::string aliasStr = stack.top();
CGroupNpc* const npcGroup = dynamic_cast<CGroupNpc*>(entity->getGroup());
if ( ! npcGroup)
{
nlwarning("setOutpostMode on a non Npc Group, doesnt work");
return;
}
OUTPOSTENUMS::TPVPSide side;
if (sideStr == "attacker")
{
side = OUTPOSTENUMS::OutpostAttacker;
}
else if (sideStr == "owner")
{
side = OUTPOSTENUMS::OutpostOwner;
}
else
{
nlwarning("setOutpostMode: invalid side");
}
npcGroup->setOutpostSide(side);
npcGroup->setOutpostFactions(side);
FOREACH(botIt, CCont<CBot>, npcGroup->bots())
{
CBot* bot = *botIt;
CBotNpc* botNpc = NLMISC::safe_cast<CBotNpc*>(bot);
if (botNpc)
{
CSpawnBotNpc* spawnBotNpc = botNpc->getSpawn();
if (spawnBotNpc)
{
spawnBotNpc->setOutpostSide(side);
spawnBotNpc->setOutpostAlias(LigoConfig.aliasFromString(aliasStr));
}
}
}
if (npcGroup->isSpawned())
npcGroup->getSpawnObj()->sendInfoToEGS();
}
//----------------------------------------------------------------------------
/** @page code
@ -2749,6 +2794,7 @@ std::map<std::string, FScrptNativeFunc> nfGetNpcGroupNativeFunctions()
#define REGISTER_NATIVE_FUNC(cont, func) cont.insert(std::make_pair(std::string(#func), &func))
REGISTER_NATIVE_FUNC(functions, setFactionProp_ss_);
REGISTER_NATIVE_FUNC(functions, setOupostMode_ss_);
REGISTER_NATIVE_FUNC(functions, moveToZone_ss_);
REGISTER_NATIVE_FUNC(functions, setActivity_s_);
REGISTER_NATIVE_FUNC(functions, startWander_f_);

@ -831,10 +831,9 @@ void TGenNpcDescMsgImp::setChat(const CNpcChatProfileImp& chatProfile)
_ContextOptions = chatProfile.getContextOptions();
// ContextOptionsTitles = chatProfile.getContextOptionsTitles();
// ContextOptionsDetails = chatProfile.getContextOptionsDetails();
// As I don't remembre why I did an insert instead of an affectation I let it commented here.
// vector<string> const& chatOptionalProperties = chatProfile.getOptionalProperties();
// OptionalProperties.insert(OptionalProperties.end(), chatOptionalProperties.begin(), chatOptionalProperties.end());
_OptionalProperties = chatProfile.getOptionalProperties();
vector<string> const& chatOptionalProperties = chatProfile.getOptionalProperties();
_OptionalProperties.insert(_OptionalProperties.end(), chatOptionalProperties.begin(), chatOptionalProperties.end());
_Outpost = chatProfile.getOutpost();
_Organization = chatProfile.getOrganization();

@ -431,6 +431,15 @@ IFileAccess::TReturnCode CWriteFile::execute(CFileAccessManager& manager)
return MinorFailure;
}
NLMISC::COFile flog;
std::string str = getBackupFileName(Filename)+"\n";
if(str.find("characters")!=std::string::npos)
{
flog.open(getBackupFileName("new_save.txt"), true);
flog.serialBuffer((uint8*)&(str[0]), str.size());
flog.close();
}
return Success;
}

@ -49,6 +49,7 @@
#include "game_share/outpost.h"
#include "game_share/visual_slot_manager.h"
#include "game_share/shard_names.h"
#include "game_share/http_client.h"
#include "server_share/log_command_gen.h"
#include "server_share/r2_vision.h"
@ -180,8 +181,9 @@ AdminCommandsInit[] =
"validateRespawnPoint", true,
"summonPet", true,
"connectUserChannel", true,
"updateTarget", true,
"updateTarget", true,
"resetName", true,
"showOnline", true,
// Web commands managment
"webExecCommand", true,
@ -212,7 +214,7 @@ AdminCommandsInit[] =
"learnBrick", true,
"unlearnBrick", true,
"learnPhrase", true,
"learnAllForagePhrases", true,
"learnAllForagePhrases", true,
"learnAllFaberPlans", true,
"logXpGain", true,
"memorizePhrase", true,
@ -312,7 +314,7 @@ AdminCommandsInit[] =
"setGuildChargePoint", false,
"characterInventoryDump", true,
"deleteInventoryItem", true,
"setSimplePhrase", false,
"setSimplePhrase", false,
// PUT HERE THE VARIABLE / COMMAND THAT ARE TEMPORARY
// remove when message of the day interface is ready
@ -323,8 +325,8 @@ AdminCommandsInit[] =
"EntitiesNoActionFailure", false,
"EntitiesNoCastBreak", false,
"EntitiesNoResist", false,
"lockItem", true,
"setTeamLeader", true,
"lockItem", true,
"setTeamLeader", true,
// aggroable state
"Aggro", true,
@ -388,7 +390,7 @@ AdminCommandsInit[] =
"eventSetBotURLName", true,
"eventSpawnToxic", true,
"eventNpcSay", true,
"eventSetBotFacing", true,
"eventSetBotFacing", true,
"eventGiveControl", true,
"eventLeaveControl", true,
@ -422,7 +424,7 @@ bool getAIInstanceFromGroupName(string& groupName, uint32& instanceNumber)
return false;
}
instanceNumber = nr;
groupName = groupName.substr(groupName.find('@'), groupName.size());
groupName = groupName.substr(groupName.find('@') + 1, groupName.size());
}
return true;
}
@ -460,6 +462,7 @@ void initAdmin ()
cmd.Name = AdminCommandsInit[i].Name;
cmd.AddEId = AdminCommandsInit[i].AddEId;
cmd.Priv = DefaultPriv;
cmd.Audit = false;
AdminCommands.push_back(cmd);
}
@ -525,9 +528,9 @@ static void loadCommandsPrivileges(const string & fileName, bool init)
CSString fullLine = line;
// only extract the first 2 params
// only extract the first 4 params
CVectorSString params;
for (uint i = 0; !line.empty() && i < 2; i++)
for (uint i = 0; !line.empty() && i < 4; i++)
{
string param = line.strtok(" \t");
if (param.empty())
@ -546,7 +549,7 @@ static void loadCommandsPrivileges(const string & fileName, bool init)
{
// this is a forward
}
else if (params.size() > 2)
else if (params.size() > 3)
{
nlwarning("ADMIN: invalid entry: '%s'.", fullLine.c_str());
continue;
@ -563,15 +566,23 @@ static void loadCommandsPrivileges(const string & fileName, bool init)
params.push_back("");
}
if (params.size() < 4)
{
// no audit specified
params.push_back("");
}
const string & cmdName = params[0];
const string & forward = params[1];
const string & cmdPriv = params[2];
const bool & audit = (params[3] == "audit");
CAdminCommand * cmd = findAdminCommand(cmdName);
if (cmd)
{
cmd->Priv = cmdPriv;
cmd->ForwardToservice = forward.substr(1, forward.size()-2);
cmd->Audit = audit;
nlinfo("ADMIN: command '%s' forwarded to [%s] has new privileges '%s'.", cmdName.c_str(), cmd->ForwardToservice.c_str(), cmdPriv.c_str());
}
else
@ -1609,6 +1620,7 @@ NLMISC_COMMAND(createNamedItemInBag, "create a named item in bag", "<eId> <item>
quantity = 1;
}
TLogNoContext_Item noLog;
CGameItemPtr item = CNamedItems::getInstance().createNamedItem(args[1], quantity);
if (item == NULL)
{
@ -2376,16 +2388,18 @@ NLMISC_COMMAND(getPetAnimalSatiety,"Get the satiety of pet animal (petIndex in 0
return true;
}
NLMISC_COMMAND(setPetAnimalName, "Set the name of a pet animal (petIndex in 0..3)","<eid> <petIndex> <name>")
NLMISC_COMMAND(setPetAnimalName, "Set the name of a pet animal","<eid> <petIndex (0..3)> [<name>]")
{
if (args.size () < 3) return false;
if (args.size () < 2) return false;
GET_CHARACTER
if ( c )
{
uint petIndex;
fromString(args[1], petIndex);
ucstring customName = args[2];
ucstring customName;
if (args.size () == 3)
customName = args[2];
c->setAnimalName(petIndex, customName);
}
@ -2932,6 +2946,29 @@ NLMISC_DYNVARIABLE (uint32, RyzomDate, "Current ryzom date")
//
//
//
void audit(const CAdminCommand *cmd, const string &rawCommand, const CEntityId &eid, const string &name, const string &targetName)
{
if (cmd == NULL)
return;
CConfigFile::CVar *varHost = IService::getInstance()->ConfigFile.getVarPtr("AdminCommandAuditHost");
CConfigFile::CVar *varPage = IService::getInstance()->ConfigFile.getVarPtr("AdminCommandAuditPage");
if (varHost == NULL || varPage == NULL)
return;
string host = varHost->asString();
string page = varPage->asString();
if (host == "" || page == "")
return;
char params[1024];
sprintf(params, "action=audit&cmd=%s&raw=%s&name=(%s,%s)&target=%s", cmd->Name.c_str(), rawCommand.c_str(), eid.toString().c_str(), name.c_str(), targetName.c_str());
IThread *thread = IThread::create(new CHttpPostTask(host, page, params));
thread->start();
}
// all admin /a /b commands executed by the client go in this callback
void cbClientAdmin (NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
@ -3062,6 +3099,8 @@ void cbClientAdmin (NLNET::CMessage& msgin, const std::string &serviceName, NLNE
res = (string)cs_res;
nlinfo ("ADMIN: Player (%s,%s) will execute client admin command '%s' on target %s", eid.toString().c_str(), csName.c_str(), res.c_str(), targetName.c_str());
audit(cmd, res, eid, csName, targetName);
CLightMemDisplayer *CmdDisplayer = new CLightMemDisplayer("CmdDisplayer");
CLog *CmdLogger = new CLog( CLog::LOG_NO );
CmdLogger->addDisplayer( CmdDisplayer );
@ -3585,8 +3624,11 @@ NLMISC_COMMAND( killMob, "kill a mob ( /a killMob )", "<CSR eId>" )
}
if ( !creature->getContextualProperty().directAccessForStructMembers().attackable() )
{
CCharacter::sendDynamicSystemMessage( eid, "CSR_NOT_ATTACKABLE" );
return true;
if ( ! creature->checkFactionAttackable(c->getId()))
{
CCharacter::sendDynamicSystemMessage( eid, "CSR_NOT_ATTACKABLE" );
return true;
}
}
creature->getScores()._PhysicalScores[SCORES::hit_points].Current = 0;
return true;
@ -5442,35 +5484,148 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
//***************** teleport
//*************************************************
else if (command_args[0] == "teleport")
else if (command_args[0] == "teleport") // teleport![x,y,z|player name|bot name]!teleport mektoub?!check pvpflag?
{
// args: x y z [t]
if (command_args.size () < 4 ||
command_args.size () > 5 ) return false;
if (command_args.size () < 2) return false;
bool pvpValid = (c->getPvPRecentActionFlag() == false || c->getPVPFlag() == false);
if (command_args.size () > 3 && command_args[3] == "1" && !pvpValid)
{
CCharacter::sendDynamicSystemMessage(c->getEntityRowId(), "PVP_TP_FORBIDEN");
return true;
}
string value = command_args[1];
vector<string> res;
sint32 x = 0, y = 0, z = 0;
float h = 0;
if ( value.find(',') != string::npos ) // Position x,y,z,a
{
explode (value, string(","), res);
if (res.size() >= 2)
{
fromString(res[0], x);
x *= 1000;
fromString(res[1], y);
y *= 1000;
}
if (res.size() >= 3)
{
fromString(res[2], z);
z *= 1000;
}
if (res.size() >= 4)
fromString(res[3], h);
}
else
{
if ( value.find(".creature") != string::npos )
{
CSheetId creatureSheetId(value);
if( creatureSheetId != CSheetId::Unknown )
{
double minDistance = -1.;
CCreature * creature = NULL;
TMapCreatures::const_iterator it;
const TMapCreatures& creatures = CreatureManager.getCreature();
for( it = creatures.begin(); it != creatures.end(); ++it )
{
CSheetId sheetId = (*it).second->getType();
if( sheetId == creatureSheetId )
{
double distance = PHRASE_UTILITIES::getDistance( c->getEntityRowId(), (*it).second->getEntityRowId() );
if( !creature || (creature && distance < minDistance) )
{
creature = (*it).second;
minDistance = distance;
}
}
}
if( creature )
{
x = creature->getState().X();
y = creature->getState().Y();
z = creature->getState().Z();
h = creature->getState().Heading();
}
}
else
{
nlwarning ("<Position> '%s' is an invalid creature", value.c_str());
}
}
else
{
sint32 x;
sint32 y;
sint32 z;
float t;
fromString(command_args[1], x);
fromString(command_args[2], y);
fromString(command_args[3], z);
if (command_args.size() > 4)
CEntityBase *entityBase = PlayerManager.getCharacterByName (CShardNames::getInstance().makeFullNameFromRelative(c->getHomeMainlandSessionId(), value));
if (entityBase == 0)
{
// try to find the bot name
vector<TAIAlias> aliases;
CAIAliasTranslator::getInstance()->getNPCAliasesFromName( value, aliases );
if ( aliases.empty() )
{
nldebug ("<Position> Ignoring attempt to teleport because no NPC found matching name '%s'", value.c_str());
return true;
}
TAIAlias alias = aliases[0];
const CEntityId & botId = CAIAliasTranslator::getInstance()->getEntityId (alias);
if ( botId != CEntityId::Unknown )
{
entityBase = CreatureManager.getCreature (botId);
}
else
{
nlwarning ("'%s' has no eId. Is it Spawned???", value.c_str());
return true;
}
}
if (entityBase != 0)
{
x = entityBase->getState().X + sint32 (cos (entityBase->getState ().Heading) * 2000);
y = entityBase->getState().Y + sint32 (sin (entityBase->getState ().Heading) * 2000);
z = entityBase->getState().Z;
h = entityBase->getState().Heading;
}
}
}
if (x == 0 && y == 0 && z == 0)
{
fromString(command_args[4], t);
nlwarning ("'%s' is a bad value for position, don't change position", value.c_str());
return true;
}
CContinent * cont = CZoneManager::getInstance().getContinent(x,y);
bool allowPetTp = false;
if (command_args.size () == 3 && command_args[2] == "1")
allowPetTp = true;
if (allowPetTp)
c->allowNearPetTp();
else
c->forbidNearPetTp();
// Respawn player if dead
if (c->isDead())
{
t = c->getState().Heading;
PROGRESSIONPVP::CCharacterProgressionPVP::getInstance()->playerRespawn(c);
// apply respawn effects because user is dead
c->applyRespawnEffects();
}
NLNET::CMessage msgout( "TELEPORT_PLAYER" );
msgout.serial( const_cast<CEntityId &>(c->getId()) );
msgout.serial( const_cast<sint32 &>(x) );
msgout.serial( const_cast<sint32 &>(y) );
msgout.serial( const_cast<sint32 &>(z) );
msgout.serial( const_cast<float &>(t) );
sendMessageViaMirror( "EGS", msgout );
c->teleportCharacter(x,y,z,allowPetTp,true,h);
if ( cont )
{
c->getRespawnPoints().addDefaultRespawnPoint( CONTINENT::TContinent(cont->getId()) );
}
}
//*************************************************
@ -8434,6 +8589,21 @@ NLMISC_COMMAND (resetName, "Reset your name; undo a temporary rename", "<user id
return true;
}
//----------------------------------------------------------------------------
NLMISC_COMMAND(showOnline, "Set friend visibility", "<user id> <mode=0,1,2>")
{
if (args.size() < 2) return false;
GET_CHARACTER;
uint8 mode = 0;
NLMISC::fromString(args[1], mode);
if (mode < NB_FRIEND_VISIBILITY)
{
c->setFriendVisibility((TFriendVisibility)mode);
}
return true;
}
//----------------------------------------------------------------------------
NLMISC_COMMAND (lockItem, "Lock/unlock item in inventory", "<user id> <inventory> <slot> <lock=0,1>")
{
@ -8593,4 +8763,4 @@ NLMISC_COMMAND(setSimplePhrase, "Set an IOS phrase", "<id> <phrase> [<language c
msgout.serial(lang);
sendMessageViaMirror("IOS", msgout);
return true;
}
}

@ -34,6 +34,7 @@ struct CAdminCommand
bool AddEId;
std::string Priv;
std::string ForwardToservice;
bool Audit;
};
//

@ -336,6 +336,10 @@ bool CBuildingPhysicalGuild::isUserAllowed(CCharacter * user, uint16 ownerId, ui
nlassert( user );
nlassert( ownerId < _Guilds.size() );
nlassert( roomIdx < _Template->Rooms.size() );
if (user->isDead())
return false;
CGuild * guild = CGuildManager::getInstance()->getGuildFromId( user->getGuildId() );
if ( !guild )
return false;
@ -530,6 +534,9 @@ bool CBuildingPhysicalPlayer::isUserAllowed(CCharacter * user, uint16 ownerId, u
nlassert(user);
nlassert(ownerId < _Players.size() );
if (user->isDead())
return false;
CCharacter * owner = PlayerManager.getChar( _Players[ownerId] );
if (owner)
return ( (user->getId() == _Players[ownerId]) || owner->playerHaveRoomAccess(user->getId()) );

@ -307,6 +307,10 @@ bool CRoomDestination::isUserAllowed(CCharacter * user,uint16 ownerIdx)
#ifdef NL_DEBUG
nlassert(user);
#endif
if (user && user->isDead())
return false;
CMirrorPropValueRO<TYPE_CELL> mirrorCell( TheDataset, user->getEntityRowId(), DSPropertyCELL );
sint32 cell = mirrorCell;
const IRoomInstance * room = CBuildingManager::getInstance()->getRoomInstanceFromCell( cell );
@ -423,6 +427,9 @@ bool CExitDestination::build( const NLLIGO::IPrimitive* prim,const NLLIGO::IPrim
//----------------------------------------------------------------------------
bool CExitDestination::isUserAllowed(CCharacter * user, uint16 ownerIdx)
{
if (user && user->isDead())
return false;
CMirrorPropValueRO<TYPE_CELL> mirrorCell( TheDataset, user->getEntityRowId(), DSPropertyCELL );
sint32 cell = mirrorCell;
const IRoomInstance * room = CBuildingManager::getInstance()->getRoomInstanceFromCell( cell );

@ -1114,9 +1114,8 @@ void cbClientMoveInContactLists( NLNET::CMessage& msgin, const std::string &serv
if (listOrigin == 0)
{
NLMISC::CEntityId eid= c->getFriendByContactId(contactIdOrigin);
// allows the whole operation or nothing if player is not present
CCharacter * other = PlayerManager.getChar( eid );
if(other)
// allows the whole operation or nothing if player does not exist
if (eid != CEntityId::Unknown)
{
c->removePlayerFromFriendListByEntityId(eid);
c->addPlayerToIgnoreList(eid);
@ -1124,15 +1123,14 @@ void cbClientMoveInContactLists( NLNET::CMessage& msgin, const std::string &serv
else
{
// player not found => message
PHRASE_UTILITIES::sendDynamicSystemMessage( c->getEntityRowId(), "OPERATION_OFFLINE");
PHRASE_UTILITIES::sendDynamicSystemMessage( c->getEntityRowId(), "OPERATION_NOTEXIST");
}
}
else
{
NLMISC::CEntityId eid= c->getIgnoreByContactId(contactIdOrigin);
// allows the whole operation or nothing if player is not present
CCharacter * other = PlayerManager.getChar( eid );
if(other)
if(eid != CEntityId::Unknown)
{
c->removePlayerFromIgnoreListByEntityId(eid);
c->addPlayerToFriendList(eid);
@ -1140,7 +1138,7 @@ void cbClientMoveInContactLists( NLNET::CMessage& msgin, const std::string &serv
else
{
// player not found => message
PHRASE_UTILITIES::sendDynamicSystemMessage( c->getEntityRowId(), "OPERATION_OFFLINE");
PHRASE_UTILITIES::sendDynamicSystemMessage( c->getEntityRowId(), "OPERATION_NOTEXIST");
}
}
}
@ -2544,7 +2542,7 @@ void cbClientWho( NLNET::CMessage& msgin, const std::string &serviceName, NLNET:
return;
}
bool havePriv = p->havePriv(":DEV:SGM:GM:");
bool havePriv = p->havePriv(":DEV:SGM:GM:EM:");
bool hasChannel = false;
nbAnswers = 0;
@ -2578,9 +2576,10 @@ void cbClientWho( NLNET::CMessage& msgin, const std::string &serviceName, NLNET:
if (!playerNames.empty())
{
CCharacter::sendDynamicSystemMessage( id, "WHO_CHANNEL_INTRO" );
//playerNames = "Players in channel \"" + opt + "\":" + playerNames;
SM_STATIC_PARAMS_1(params, STRING_MANAGER::literal);
params[0].Literal = opt;
CCharacter::sendDynamicSystemMessage( id, "WHO_CHANNEL_INTRO", params);
//playerNames = "Players in channel \"" + opt + "\":" + playerNames;
params[0].Literal = playerNames;
CCharacter::sendDynamicSystemMessage( id, "LITERAL", params );
return;

@ -2060,9 +2060,9 @@ uint32 CCreature::tickUpdate()
setBars();
}
// test again as effects can kill the entity (dots...)
if (isDead())
{
// test again as effects can kill the entity (dots...)
if (isDead())
{
deathOccurs();
}

@ -253,7 +253,7 @@ void CChangeCreatureHPImp::callback(const string &, NLNET::TServiceId sid)
//--------------------------------------------------------------
// CChangeCreatureMaxHPImp ::callback()
// CCreatureSetUrlImp ::callback()
//--------------------------------------------------------------
void CCreatureSetUrlImp::callback(const string &, NLNET::TServiceId sid)
{

@ -504,6 +504,7 @@ void cbClientReady( CMessage& msgin, const std::string &serviceName, NLNET::TSer
if (!IsRingShard && player->havePriv(AlwaysInvisiblePriv))
{
c->setWhoSeesMe(uint64(0));
c->setInvisibility(true);
}
TheDataset.declareEntity( entityIndex ); // after the writing of properties to mirror
@ -676,8 +677,26 @@ void finalizeClientReady( uint32 userId, uint32 index )
// for GM player, trigger a 'infos' command to remember their persistent state
if (!PlayerManager.getPlayer(uint32(c->getId().getShortId())>>4)->getUserPriv().empty())
CCommandRegistry::getInstance().execute(toString("infos %s", c->getId().toString().c_str()).c_str(), InfoLog(), true);
{
string res = toString("infos %s", c->getId().toString().c_str()).c_str();
CLightMemDisplayer *CmdDisplayer = new CLightMemDisplayer("CmdDisplayer");
CLog *CmdLogger = new CLog( CLog::LOG_NO );
CmdLogger->addDisplayer( CmdDisplayer );
NLMISC::ICommand::execute(res, *CmdLogger, true);
const std::deque<std::string> &strs = CmdDisplayer->lockStrings ();
for (uint i = 0; i < strs.size(); i++)
{
InfoLog->displayNL("%s", trim(strs[i]).c_str());
SM_STATIC_PARAMS_1(params,STRING_MANAGER::literal);
params[0].Literal = trim(strs[i]);
CCharacter::sendDynamicSystemMessage( c->getId(), "LITERAL", params );
}
CmdDisplayer->unlockStrings();
CmdLogger->removeDisplayer (CmdDisplayer);
delete CmdDisplayer;
delete CmdLogger;
}
c->setFinalized(true);
} // finalizeClientReady //

@ -88,6 +88,13 @@ bool CExchangeView::putItemInExchange(uint32 bagSlot, uint32 exchangeSlot, uint3
if (item->getLockedByOwner())
return false;
// You cannot exchange genesis named items
if (item->getPhraseId().find("genesis_") == 0)
{
nlwarning("Character %s tries to sell '%s'", getCharacter()->getId().toString().c_str(), item->getPhraseId().c_str() );
return false;
}
if( getCharacter()->isAnActiveXpCatalyser(item) )
return false;

@ -953,6 +953,14 @@ void CGuild::putItem( CCharacter * user, uint32 slot, uint32 quantity, uint16 se
return;
}
// You cannot exchange genesis named items
if (item->getPhraseId().find("genesis_") == 0)
{
nlwarning("Character %s tries to put in guild '%s'", user->getId().toString().c_str(), item->getPhraseId().c_str() );
CCharacter::sendDynamicSystemMessage( user->getId(),"GUILD_ITEM_CANT_BE_PUT" );
return;
}
// try to move the required quantity of the item
if ( CInventoryBase::moveItem(
user->getInventory(INVENTORIES::bag), slot,

@ -98,16 +98,35 @@ class CMissionStepTalk : public IMissionStepTemplate
uint processEvent( const TDataSetRow & userRow, const CMissionEvent & event,uint subStepIndex,const TDataSetRow & giverRow )
{
string webAppUrl;
_User = PlayerManager.getChar(getEntityIdFromRow(userRow));
if (_IsDynamic && _User != NULL)
{
vector<string> params = _User->getCustomMissionParams(_Dynamic);
if (params.size() < 2)
{
LOGMISSIONSTEPERROR("talk_to : invalid npc name");
return 0;
}
else
{
webAppUrl = params[0];
}
}
// not check here : they are done befor. If a talk event comes here, the step is complete
if( event.Type == CMissionEvent::Talk )
{
if (!webAppUrl.empty() && _User != NULL)
_User->validateDynamicMissionStep(webAppUrl);
LOGMISSIONSTEPSUCCESS("talk_to");
return 1;
}
return 0;
}
void getInitState( std::vector<uint32>& ret )
{
ret.clear();

@ -29,6 +29,8 @@
#include "team_manager/team_manager.h"
#include "player_manager/player_manager.h"
#include "player_manager/player.h"
#include "creature_manager/creature_manager.h"
#include "creature_manager/creature.h"
#include "phrase_manager/area_effect.h"
#include "aura_effect.h"
@ -213,6 +215,15 @@ bool CAuraRootEffect::isEntityValidTarget(CEntityBase *entity, CEntityBase *crea
return true;
}
CCreature * creature = CreatureManager.getCreature( entity->getId() );
if (creature && creator)
{
if (creature->checkFactionAttackable( creator->getId() ))
{
return true;
}
}
return false;
}// isEntityValidTarget //

@ -28,9 +28,13 @@
#include "player_manager/character.h"
#include "player_manager/player_manager.h"
#include "player_manager/player.h"
#include "creature_manager/creature_manager.h"
#include "creature_manager/creature.h"
#include "range_selector.h"
#include "phrase_manager/effect_factory.h"
extern CCreatureManager CreatureManager;
using namespace std;
using namespace NLMISC;
using namespace NLNET;
@ -76,7 +80,7 @@ void CBounceEffect::removed()
//--------------------------------------------------------------
// CBounceEffect::getTargetForBounce()
//--------------------------------------------------------------
CEntityBase *CBounceEffect::getTargetForBounce() const
CEntityBase *CBounceEffect::getTargetForBounce(CEntityBase *actor) const
{
// get entities around
if (!_AffectedEntity)
@ -99,7 +103,7 @@ CEntityBase *CBounceEffect::getTargetForBounce() const
for (uint i = 0; i < entities.size() ; ++i)
{
if ( entities[i] && ( entities[i] != (CEntityBase*)(_AffectedEntity) ) && isEntityValidTarget(entities[i]) )
if ( entities[i] && ( entities[i] != (CEntityBase*)(_AffectedEntity) ) && isEntityValidTarget(entities[i], actor) )
{
selectedEntities.push_back(entities[i]);
}
@ -118,17 +122,29 @@ CEntityBase *CBounceEffect::getTargetForBounce() const
//--------------------------------------------------------------
// CBounceEffect::isEntityValidTarget()
//--------------------------------------------------------------
bool CBounceEffect::isEntityValidTarget(CEntityBase *entity) const
bool CBounceEffect::isEntityValidTarget(CEntityBase *entity, CEntityBase *actor) const
{
#ifdef NL_DEBUG
nlassert(entity);
#endif
if (entity->isDead())
return false;
if (entity->getId().getType() == RYZOMID::player)
return true;
if ( entity->getContextualProperty().getValue().attackable() )
return true;
CCreature * creature = CreatureManager.getCreature( entity->getId() );
if (creature && actor)
{
if (creature->checkFactionAttackable( actor->getId() ))
{
return true;
}
}
return false;
} // checkTargetValidity //

@ -61,11 +61,11 @@ public:
virtual void removed();
/// get entity on which the attack is redirected
CEntityBase *getTargetForBounce() const;
CEntityBase *getTargetForBounce(CEntityBase *actor) const;
private:
/// check entity is a valid target
bool isEntityValidTarget(CEntityBase *entity) const;
bool isEntityValidTarget(CEntityBase *entity, CEntityBase *actor) const;
private:
/// affected entity

@ -4633,7 +4633,7 @@ void CCombatPhrase::applyBounceEffect(CEntityBase *actingEntity, sint32 attacker
}
#endif
CEntityBase *bounceTarget = bounceEffect->getTargetForBounce();
CEntityBase *bounceTarget = bounceEffect->getTargetForBounce(actingEntity);
if (!bounceTarget)
return;

@ -28,6 +28,8 @@
#include "player_manager/character.h"
#include "player_manager/player_manager.h"
#include "player_manager/player.h"
#include "creature_manager/creature_manager.h"
#include "creature_manager/creature.h"
#include "range_selector.h"
#include "phrase_manager/effect_factory.h"
@ -68,14 +70,15 @@ bool CDamageAuraEffect::update(CTimerEvent * event, bool applyEffect)
{
// get entities in surrouding area
CRangeSelector entitiesSelector;
entitiesSelector.buildDisc( CEntityBaseManager::getEntityBasePtr(getCreatorRowId()), _AffectedEntity->getX(), _AffectedEntity->getY(), _AuraRadius, EntityMatrix, true );
CEntityBase * actor = CEntityBaseManager::getEntityBasePtr(getCreatorRowId());
entitiesSelector.buildDisc( actor, _AffectedEntity->getX(), _AffectedEntity->getY(), _AuraRadius, EntityMatrix, true );
// create or update effect on entities returned
const vector<CEntityBase*> &entities = entitiesSelector.getEntities();
const uint size = (uint)entities.size();
for (uint i = 0; i < size ; ++i)
{
if (entities[i] && (entities[i] != (CEntityBase*)_AffectedEntity) && isEntityValidTarget(entities[i]) )
if (entities[i] && (entities[i] != (CEntityBase*)_AffectedEntity) && isEntityValidTarget(entities[i], actor) )
{
CEntityBase *entity = entities[i];
@ -133,7 +136,7 @@ void CDamageAuraEffect::removed()
//--------------------------------------------------------------
// CDamageAuraEffect::removed()
//--------------------------------------------------------------
bool CDamageAuraEffect::isEntityValidTarget(CEntityBase *entity) const
bool CDamageAuraEffect::isEntityValidTarget(CEntityBase *entity, CEntityBase *actor) const
{
#ifdef NL_DEBUG
nlassert(entity);
@ -153,6 +156,15 @@ bool CDamageAuraEffect::isEntityValidTarget(CEntityBase *entity) const
else
retValue = false;
CCreature * creature = CreatureManager.getCreature( entity->getId() );
if (retValue == false && creature && actor)
{
if (creature->checkFactionAttackable( actor->getId() ))
{
retValue = true;
}
}
if (retValue)
{
// check entity isn't invulnerable

@ -82,7 +82,7 @@ public:
private:
/// check entity is a valid target
bool isEntityValidTarget(CEntityBase *entity) const;
bool isEntityValidTarget(CEntityBase *entity, CEntityBase *actor) const;
private:
/// cycle lenght in ticks

@ -704,7 +704,7 @@ void CMagicActionBasicDamage::launch(
{
CBounceEffect *bounceEffect = safe_cast<CBounceEffect *> (& (*effect));
bool bounce = false;
CEntityBase *bounceTarget = bounceEffect->getTargetForBounce();
CEntityBase *bounceTarget = bounceEffect->getTargetForBounce(actor);
if (bounceTarget)
{
bounce = true;

@ -1547,15 +1547,21 @@ bool testOffensiveActionAllowed( const NLMISC::CEntityId &actorId, const NLMISC:
return true;
else
{
CEntityBase* actor = CreatureManager.getCreature( actorId );
CCreature* actor = CreatureManager.getCreature( actorId );
if (!actor)
return false;
if (!actor->getContextualProperty().directAccessForStructMembers().attackable())
{
// actor is a guard or similar so cannot harm a player or a non attackable creature
// actor is a guard or similar so cannot harm a player or a non attackable creature, unless faction attackable
if (targetId.getType() == RYZOMID::player || !target->getContextualProperty().directAccessForStructMembers().attackable())
{
if ( actor->checkFactionAttackable( targetId ) )
{
return true;
}
return false;
}
else
return true;
}
@ -1570,7 +1576,9 @@ bool testOffensiveActionAllowed( const NLMISC::CEntityId &actorId, const NLMISC:
}
}
switch ( targetId.getType() )
RYZOMID::TTypeId targetType = (RYZOMID::TTypeId)targetId.getType();
switch ( targetType )
{
case RYZOMID::player:
{
@ -1593,7 +1601,8 @@ bool testOffensiveActionAllowed( const NLMISC::CEntityId &actorId, const NLMISC:
case RYZOMID::mount:
case RYZOMID::npc:
{
if (actorId.getType() == RYZOMID::player)
RYZOMID::TTypeId type = (RYZOMID::TTypeId)actorId.getType();
if (type == RYZOMID::player)
{
CCharacter* actor = PlayerManager.getChar( actorId );
if ( ! actor )
@ -1718,7 +1727,11 @@ bool validateSpellTarget( const TDataSetRow &actorRowId, const TDataSetRow &targ
// player can only heal other players
if ( getEntityIdFromRow(actorRowId).getType() == RYZOMID::player && target->getId().getType() != RYZOMID::player )
{
if (target->getContextualProperty().directAccessForStructMembers().attackable() )
CEntityBase * actor = CEntityBaseManager::getEntityBasePtr( actorRowId );
CCreature * creature = CreatureManager.getCreature( target->getId() );
bool bFactionAttackable = (actor && creature && creature->checkFactionAttackable( actor->getId()));
if (bFactionAttackable || target->getContextualProperty().directAccessForStructMembers().attackable() )
{
errorCode = "MAGIC_CANNOT_CAST_ON_ENEMY";
// nldebug("validateSpellTarget for entity %s returning false because %s MAGIC_CANNOT_CAST_ON_ENEMY",getEntityIdFromRow(actorRowId).toString().c_str(),TheDataset.getEntityId(targetRowId).toString().c_str());

@ -34,7 +34,7 @@
#include "player_manager/character.h"
#include "world_instances.h"
#include "player_manager/player.h"
#include "creature_manager/creature_manager.h"
#include "egs_sheets/egs_sheets.h"
//////////////
@ -49,6 +49,7 @@ using namespace NLNET;
//////////////
extern CRandom RandomGenerator;
extern CPlayerManager PlayerManager;
extern CCreatureManager CreatureManager;
//--------------------------------------------------------------
@ -130,10 +131,14 @@ bool CSpecialPowerTaunt::validate(std::string &errorCode)
}
if (!entity->getContextualProperty().directAccessForStructMembers().attackable())
{
PHRASE_UTILITIES::sendDynamicSystemMessage(_ActorRowId, "POWER_TAUNT_TARGET_NOT_ATTACKABLE");
CCreature * creature = CreatureManager.getCreature( entity->getId() );
if ( ! creature->checkFactionAttackable(actor->getId()))
{
PHRASE_UTILITIES::sendDynamicSystemMessage(_ActorRowId, "POWER_TAUNT_TARGET_NOT_ATTACKABLE");
DEBUGLOG("<CSpecialPowerTaunt::validate> Target not attackable");
return false;
DEBUGLOG("<CSpecialPowerTaunt::validate> Target not attackable");
return false;
}
}
return true;

@ -596,6 +596,8 @@ CCharacter::CCharacter(): CEntityBase(false),
_CurrentParryLevel = 1;
_BaseParryLevel = 1;
_BaseResistance = 1;
_SkillUsedForDodge = SKILLS::SF;
_CurrentParrySkill = BarehandCombatSkill;
@ -671,6 +673,8 @@ CCharacter::CCharacter(): CEntityBase(false),
_CustomMissionsParams.clear();
_FriendVisibility = VisibleToAll;
initDatabase();
} // CCharacter //
@ -1414,6 +1418,7 @@ uint32 CCharacter::tickUpdate()
}
}
bool updatePVP = false;
{
H_AUTO(CharacterUpdateOutpost);
@ -1425,6 +1430,7 @@ uint32 CCharacter::tickUpdate()
{
stopOutpostLeavingTimer();
setOutpostAlias(0);
updatePVP = true;
}
CSmartPtr<COutpost> outpost = COutpostManager::getInstance().getOutpostFromAlias( outpostAlias );
@ -1435,10 +1441,12 @@ uint32 CCharacter::tickUpdate()
{
stopOutpostLeavingTimer();
setOutpostAlias(0);
updatePVP = true;
}
else
{
outpost->fillCharacterOutpostDB(this);
updatePVP = true;
}
}
}
@ -1447,26 +1455,27 @@ uint32 CCharacter::tickUpdate()
{
H_AUTO(CharacterUpdatePVPMode);
if (_PVPSafeLastTimeChange + 20 < CTickEventHandler::getGameCycle())
if (_PVPSafeLastTimeChange + 20 < CTickEventHandler::getGameCycle() || updatePVP)
{
bool update = false;
_PVPSafeLastTimeChange = CTickEventHandler::getGameCycle();
if (_PVPSafeLastTime != getSafeInPvPSafeZone())
{
_PVPSafeLastTime = !_PVPSafeLastTime;
update = true;
updatePVP = true;
}
if (_PVPInSafeZoneLastTime != CPVPManager2::getInstance()->inSafeZone(getPosition()))
{
_PVPInSafeZoneLastTime = !_PVPInSafeZoneLastTime;
update = true;
updatePVP = true;
}
if (update) {
if (updatePVP)
{
CPVPManager2::getInstance()->setPVPModeInMirror(this);
updatePVPClanVP();
_HaveToUpdatePVPMode = false;
}
}
@ -1484,7 +1493,7 @@ uint32 CCharacter::tickUpdate()
if( getPvPRecentActionFlag() == false )
{
CMirrorPropValue<TYPE_PVP_MODE> propPvpMode( TheDataset, TheDataset.getDataSetRow(_Id), DSPropertyPVP_MODE );
CMirrorPropValue<TYPE_EVENT_FACTION_ID> propPvpMode( TheDataset, TheDataset.getDataSetRow(_Id), DSPropertyEVENT_FACTION_ID );
if( propPvpMode.getValue()&PVP_MODE::PvpFactionFlagged )
{
CPVPManager2::getInstance()->setPVPModeInMirror(this);
@ -1721,6 +1730,8 @@ void CCharacter::deathOccurs( void )
CPVPManager2::getInstance()->playerDies(this);
CBuildingManager::getInstance()->removeTriggerRequest(getEntityRowId());
if( _TimeDeath < CTickEventHandler::getGameTime() )
{
if (_Mode.getValue().Mode == MBEHAV::DEATH)
@ -2878,14 +2889,7 @@ void CCharacter::postLoadTreatment()
{
tickets[ slot ] = true;
// init pet inventory
const uint32 petMaxWeight = 0xFFFFFFFF; // no weight limit
const uint32 petMaxBulk = _PlayerPets[ i ].getAnimalMaxBulk();
const INVENTORIES::TInventory petInvId = (INVENTORIES::TInventory)(i + INVENTORIES::pet_animal);
CPetInventory *petInventory = dynamic_cast<CPetInventory*> ((CInventoryBase*)_Inventory[petInvId]);
if (petInventory)
petInventory->initPetInventory( i, petMaxWeight, petMaxBulk );
initPetInventory(i);
}
}
}
@ -3000,6 +3004,13 @@ void CCharacter::postLoadTreatment()
computeMiscBonus();
}
CPlayer * p = PlayerManager.getPlayer(PlayerManager.getPlayerId( getId() ));
if (!p->isTrialPlayer())
{
CBankAccessor_PLR::getCHARACTER_INFO().getRING_XP_CATALYSER().setLevel(_PropertyDatabase, 250);
CBankAccessor_PLR::getCHARACTER_INFO().getRING_XP_CATALYSER().setCount(_PropertyDatabase, 999);
}
{
H_AUTO(CItemServiceManager);
CItemServiceManager::getInstance()->initPersistentServices(this);
@ -5200,15 +5211,10 @@ bool CCharacter::addCharacterAnimal( const CSheetId& PetTicket, uint32 Price, CG
pet.Slot = ptr->getInventorySlot();
// init pet inventory
const uint32 petMaxWeight = 0xFFFFFFFF; // no weight limit
const uint32 petMaxBulk = _PlayerPets[ i ].getAnimalMaxBulk();
const INVENTORIES::TInventory petInvId = (INVENTORIES::TInventory)(i + INVENTORIES::pet_animal);
CPetInventory *petInventory = dynamic_cast<CPetInventory*> ((CInventoryBase*)_Inventory[petInvId]);
if (petInventory)
petInventory->initPetInventory( i, petMaxWeight, petMaxBulk );
else
if ( ! initPetInventory( i ))
{
return false;
}
return spawnCharacterAnimal( i );
}
@ -6356,7 +6362,7 @@ void CCharacter::removePetCharacterAfterDeath( uint32 index )
{
TLogContext_Item_PetDespawn logContext(_Id);
// pet founded
if( index < MAX_PACK_ANIMAL )
if( index < MAX_INVENTORY_ANIMAL )
{
// reset despawn timer
// _PropertyDatabase.setProp( _DataIndexReminder->PACK_ANIMAL.BEAST[index].DESPAWN, 0 );
@ -6765,12 +6771,15 @@ void CCharacter::setAnimalName( uint8 petIndex, ucstring customName )
animal.setCustomName(customName);
sendPetCustomNameToClient(petIndex);
TDataSetRow row = animal.SpawnedPets;
NLNET::CMessage msgout("CHARACTER_NAME");
msgout.serial(row);
msgout.serial(customName);
sendMessageViaMirror("IOS", msgout);
if ( ! customName.empty())
{
TDataSetRow row = animal.SpawnedPets;
NLNET::CMessage msgout("CHARACTER_NAME");
msgout.serial(row);
msgout.serial(customName);
sendMessageViaMirror("IOS", msgout);
}
}
//-----------------------------------------------------------------------------
@ -6932,7 +6941,10 @@ double CCharacter::addXpToSkillInternal( double XpGain, const std::string& ContS
uint32 ringCatalyserLvl = 0;
uint32 ringCatalyserCount = 0;
if( addXpMode != AddXpToSkillBranch )
// Don't take away cats if free trial limit reached and there is no DP.
bool bConsumeCats = ! ( bFreeTrialLimitReached && _DeathPenalties->isNull() );
if( bConsumeCats && (addXpMode != AddXpToSkillBranch) )
{
if( _XpCatalyserSlot != INVENTORIES::INVALID_INVENTORY_SLOT )
{
@ -6952,6 +6964,12 @@ double CCharacter::addXpToSkillInternal( double XpGain, const std::string& ContS
}
}
}
if (!p->isTrialPlayer())
{
xpBonus = XpGain;
}
XpGain += xpBonus + ringXpBonus;
// update death penalty
@ -8869,7 +8887,7 @@ void CCharacter::setDatabase()
_IneffectiveAuras.activate();
_ConsumableOverdoseEndDates.activate();
// init the RRPs
//RingRewarsdPoints.initDb();
//RingRewardPoints.initDb();
}// setDatabase //
@ -8931,7 +8949,8 @@ void CCharacter::startTradeItemSession( uint16 session )
nlwarning("fame %u is INVALID",(uint)bot->getRace() );
fame = MinFameToTrade;
}
else if ( fame < MinFameToTrade && bot->getOrganization() != getOrganization() )
if ( (bot->getOrganization() == 0 && fame < MinFameToTrade) || (bot->getOrganization() != 0 && bot->getOrganization() != getOrganization()) )
{
SM_STATIC_PARAMS_1(params, STRING_MANAGER::bot);
params[0].setEIdAIAlias( _CurrentInterlocutor, CAIAliasTranslator::getInstance()->getAIAlias(_CurrentInterlocutor) );
@ -8939,6 +8958,9 @@ void CCharacter::startTradeItemSession( uint16 session )
npcTellToPlayerEx( bot->getEntityRowId(),_EntityRowId,txt );
return;
}
else if (bot->getOrganization() != 0 && bot->getOrganization() == getOrganization())
fame = 0;
float fameFactor = 1.0f;
if(bot->getForm()->getFaction() != CStaticFames::INVALID_FACTION_INDEX)
@ -9036,7 +9058,8 @@ void CCharacter::startTradePhrases(uint16 session)
{
nlwarning("fame %u is INVALID",(uint)bot->getRace() );
}
if ( fame < MinFameToTrade && bot->getOrganization() != getOrganization() )
if ( (bot->getOrganization() == 0 && fame < MinFameToTrade) || (bot->getOrganization() != 0 && bot->getOrganization() != getOrganization()) )
{
SM_STATIC_PARAMS_1(params, STRING_MANAGER::bot);
params[0].setEIdAIAlias( _CurrentInterlocutor, CAIAliasTranslator::getInstance()->getAIAlias(_CurrentInterlocutor) );
@ -9045,7 +9068,6 @@ void CCharacter::startTradePhrases(uint16 session)
return;
}
// *** Set right rolemaster flags and race in Database
uint8 flags = 0;
if( bot->isSellingCharacteristics() )
@ -9806,7 +9828,8 @@ void CCharacter::sellItem( INVENTORIES::TInventory inv, uint32 slot, uint32 quan
nlwarning("fame %u is INVALID",(uint)bot->getRace() );
fame = MinFameToTrade;
}
else if ( fame < MinFameToTrade && bot->getOrganization() != getOrganization() )
if ( (bot->getOrganization() == 0 && fame < MinFameToTrade) || (bot->getOrganization() != 0 && bot->getOrganization() != getOrganization()) )
{
SM_STATIC_PARAMS_1(params, STRING_MANAGER::bot);
params[0].setEIdAIAlias( _CurrentInterlocutor, CAIAliasTranslator::getInstance()->getAIAlias(_CurrentInterlocutor) );
@ -9818,6 +9841,8 @@ void CCharacter::sellItem( INVENTORIES::TInventory inv, uint32 slot, uint32 quan
return;
}
else if (bot->getOrganization() != 0 && bot->getOrganization() == getOrganization())
fame = 0;
CInventoryPtr child = _Inventory[ inv ];
if( child->getSlotCount() > slot && child->getItem( slot ) != NULL )
@ -9853,6 +9878,13 @@ void CCharacter::sellItem( INVENTORIES::TInventory inv, uint32 slot, uint32 quan
return;
}
// You cannot exchange genesis named items
if (item->getPhraseId().find("genesis_") == 0)
{
nlwarning("Character %s tries to sell '%s'", _Id.toString().c_str(), item->getPhraseId().c_str() );
return;
}
if( ! ITEMFAMILY::isSellableByPlayer( itemForm->Family ) )
{
nlwarning("<CCharacter sellItem> character %s try to sell an unsealable item %s, must not permited by client", _Id.toString().c_str(), sheet.toString().c_str() );
@ -10206,7 +10238,7 @@ void CCharacter::setOrganizationStatus(uint32 status)
//-----------------------------------------------------------------------------
void CCharacter::changeOrganizationStatus(sint32 status)
{
if (status < 0 && abs(status) > _OrganizationStatus)
if (status < 0 && abs(status) > (sint32)_OrganizationStatus)
_OrganizationStatus = 0;
else
_OrganizationStatus += status;
@ -10216,7 +10248,7 @@ void CCharacter::changeOrganizationStatus(sint32 status)
//-----------------------------------------------------------------------------
void CCharacter::changeOrganizationPoints(sint32 points)
{
if (points < 0 && abs(points) > _OrganizationPoints)
if (points < 0 && abs(points) > (sint32)_OrganizationPoints)
_OrganizationPoints = 0;
else
_OrganizationPoints += points;
@ -11161,14 +11193,14 @@ bool CCharacter::validateExchange()
sint32 ticketDelta = c->_ExchangeView->getPetTicketExchanged( ITEM_TYPE::MEKTOUB_PACKER_TICKET ) - _ExchangeView->getPetTicketExchanged( ITEM_TYPE::MEKTOUB_PACKER_TICKET );
if( !checkAnimalCount( packerSheet, false, ticketDelta ) )
{
sendDynamicSystemMessage(getId(), "ANIMAL_PLAYER_HAVE_MAX()");
sendDynamicSystemMessage(getId(), "ANIMAL_PLAYER_HAVE_MAX");
c->sendDynamicSystemMessage(c->getId(), "ANIMAL_INTERLOCUTOR_HAVE_MAX");
invalidateExchange();
return false;
}
if( !c->checkAnimalCount( packerSheet, false, -ticketDelta ) )
{
c->sendDynamicSystemMessage(getId(), "ANIMAL_PLAYER_HAVE_MAX()");
c->sendDynamicSystemMessage(getId(), "ANIMAL_PLAYER_HAVE_MAX");
sendDynamicSystemMessage(c->getId(), "ANIMAL_INTERLOCUTOR_HAVE_MAX");
invalidateExchange();
return false;
@ -11180,14 +11212,14 @@ bool CCharacter::validateExchange()
sint32 ticketDelta = c->_ExchangeView->getPetTicketExchanged(ITEM_TYPE::MEKTOUB_MOUNT_TICKET) - _ExchangeView->getPetTicketExchanged(ITEM_TYPE::MEKTOUB_MOUNT_TICKET);
if( !checkAnimalCount( mountSheet, false, ticketDelta ) )
{
sendDynamicSystemMessage(getId(), "ANIMAL_PLAYER_HAVE_MAX()");
sendDynamicSystemMessage(getId(), "ANIMAL_PLAYER_HAVE_MAX");
c->sendDynamicSystemMessage(c->getId(), "ANIMAL_INTERLOCUTOR_HAVE_MAX");
invalidateExchange();
return false;
}
if( !c->checkAnimalCount( mountSheet, false, -ticketDelta ) )
{
c->sendDynamicSystemMessage(getId(), "ANIMAL_PLAYER_HAVE_MAX()");
c->sendDynamicSystemMessage(getId(), "ANIMAL_PLAYER_HAVE_MAX");
sendDynamicSystemMessage(c->getId(), "ANIMAL_INTERLOCUTOR_HAVE_MAX");
invalidateExchange();
return false;
@ -11285,21 +11317,23 @@ void CCharacter::removeExchangeItems(vector<CGameItemPtr >& itemRemoved, vector<
// addExchangeItems
//
//-----------------------------------------------
void CCharacter::addExchangeItems(CCharacter* trader,vector<CGameItemPtr >& itemToAdd, vector< CPetAnimal >& playerPetsAdd)
void CCharacter::addExchangeItems(CCharacter* trader,vector<CGameItemPtr >& itemToAdd, vector< CPetAnimal >& playerPetsAdded)
{
// inform AI
CPetSetOwner msgAI;
bool updatePetDataBase = false;
for( uint32 p = 0; p < playerPetsAdd.size(); ++p )
for( uint32 p = 0; p < playerPetsAdded.size(); ++p )
{
sint32 i = getFreePetSlot();
if( i >= 0 )
{
_PlayerPets[ i ] = playerPetsAdd[ p ];
_PlayerPets[ i ] = playerPetsAdded[ p ];
_PlayerPets[ i ].OwnerId = _Id;
initPetInventory(i);
if( _PlayerPets[ i ].PetStatus == CPetAnimal::waiting_spawn )
{
spawnCharacterAnimal( i );
@ -13567,7 +13601,7 @@ void CCharacter::sendUrl(const string &url, const string &salt)
if (!salt.empty())
{
string checksum = salt+url;
control = "&hmac="+getHMacSHA1((uint8*)&url[0], (uint32)url.size(), (uint8*)&salt[0], (uint32)salt.size()).toString();;
control = "&hmac="+getHMacSHA1((uint8*)&url[0], (uint32)url.size(), (uint8*)&salt[0], (uint32)salt.size()).toString();
}
nlinfo(url.c_str());
@ -14309,16 +14343,14 @@ void CCharacter::setAuraFlagDates()
const NLMISC::TGameCycle time = CTickEventHandler::getGameCycle();
uint32 flag = BRICK_FLAGS::Aura - BRICK_FLAGS::BeginPowerFlags;
if ( (_ForbidAuraUseEndDate > time) && (_ForbidAuraUseEndDate - time < 72000) )
{
_PowerFlagTicks[flag].StartTick = _ForbidAuraUseStartDate;
_PowerFlagTicks[flag].EndTick = _ForbidAuraUseEndDate;
}
else
{
_PowerFlagTicks[flag].StartTick = 0;
_PowerFlagTicks[flag].EndTick = 0;
if ( (_ForbidAuraUseEndDate < time) || (_ForbidAuraUseEndDate - time > 72000) )
{
_ForbidAuraUseStartDate = 0;
_ForbidAuraUseEndDate = 0;
}
_PowerFlagTicks[flag].StartTick = _ForbidAuraUseStartDate;
_PowerFlagTicks[flag].EndTick = _ForbidAuraUseEndDate;
} // setAuraFlagDates //
@ -14605,28 +14637,32 @@ uint32 CCharacter::getCarriedWeight()
}
//--------------------------------------------------------------
// CCharacter::getResistScore()
// CCharacter::getMagicResistance()
//--------------------------------------------------------------
uint32 CCharacter::getMagicResistance(RESISTANCE_TYPE::TResistanceType magicResistanceType) const
{
uint32 val = getUnclampedMagicResistance(magicResistanceType);
NLMISC::clamp( val, (uint32)0, (uint32)((_BaseResistance + MaxMagicResistanceBonus) * 100) );
return val;
}
//--------------------------------------------------------------
// CCharacter::getMagicResistance()
//--------------------------------------------------------------
uint32 CCharacter::getMagicResistance(EFFECT_FAMILIES::TEffectFamily effectFamily)
{
RESISTANCE_TYPE::TResistanceType resistanceType = EFFECT_FAMILIES::getAssociatedResistanceType(effectFamily);
if(resistanceType==RESISTANCE_TYPE::None)
return 0;
else
return _MagicResistance[resistanceType];
} // getResistScore //
return getMagicResistance(resistanceType);
}
//--------------------------------------------------------------
// CCharacter::getResistScore()
// CCharacter::getMagicResistance()
//--------------------------------------------------------------
uint32 CCharacter::getMagicResistance(DMGTYPE::EDamageType dmgType)
{
RESISTANCE_TYPE::TResistanceType resistanceType = DMGTYPE::getAssociatedResistanceType(dmgType);
if(resistanceType==RESISTANCE_TYPE::None)
return 0;
else
return _MagicResistance[resistanceType];
} // getResistScore //
return getMagicResistance(resistanceType);
}
//--------------------------------------------------------------
// addPlayerToFriendList
@ -14650,20 +14686,52 @@ void CCharacter::addPlayerToIgnoreList(const ucstring &name)
TCharConnectionState CCharacter::isFriendCharVisualyOnline(const NLMISC::CEntityId &friendId)
{
TCharConnectionState ret = ccs_offline;
if (CEntityIdTranslator::getInstance()->isEntityOnline(friendId))
{
if ( PlayerManager.hasBetterCSRGrade(friendId, _Id, true))
{
// better CSR grade return always 'offline' status
return ccs_offline;
}
ret = ccs_online;
}
// Handle friend preference setting
CCharacter *friendChar = PlayerManager.getChar(friendId);
if (friendChar != NULL)
{
volatile TFriendVisibility friendMode = friendChar->getFriendVisibility();
switch (friendMode)
{
case VisibleToGuildOnly:
{
uint32 fgid = friendChar->getGuildId();
uint32 mgid = this->getGuildId();
bool inSameGuild = (mgid != 0) && (fgid == mgid);
if ( ! inSameGuild)
{
return ccs_offline;
}
}
break;
case VisibleToGuildAndFriends:
if (this->isIgnoredBy(friendId))
{
return ccs_offline;
}
break;
case VisibleToAll: // fallthrough
default:
break; // no-op
}
}
// Additional online check for ring shard :
// - a contact is online only if it is in the same ring session
if (ret == ccs_online && IsRingShard)
{
CCharacter *friendChar = PlayerManager.getChar(friendId);
if (friendChar == NULL) // not found ! set offline
ret = ccs_offline;
else
@ -14849,7 +14917,7 @@ void CCharacter::addPlayerToFriendList(const NLMISC::CEntityId &id)
// if player not found
if (id == CEntityId::Unknown)
{
PHRASE_UTILITIES::sendDynamicSystemMessage( _EntityRowId, "OPERATION_OFFLINE");
PHRASE_UTILITIES::sendDynamicSystemMessage( _EntityRowId, "OPERATION_NOTEXIST");
return;
}
@ -14921,12 +14989,12 @@ void CCharacter::addPlayerToLeagueList(const NLMISC::CEntityId &id)
// if player not found
if (id == CEntityId::Unknown)
{
PHRASE_UTILITIES::sendDynamicSystemMessage( _EntityRowId, "OPERATION_OFFLINE");
PHRASE_UTILITIES::sendDynamicSystemMessage( _EntityRowId, "OPERATION_NOTEXIST");
return;
}
// check not already in list
const uint size = _LeagueList.size();
const uint size = (uint)_LeagueList.size();
for ( uint i =0 ; i < size ; ++i)
{
if ( _LeagueList[i].EntityId.getShortId() == id.getShortId())
@ -14990,14 +15058,12 @@ void CCharacter::addPlayerToLeagueList(const NLMISC::CEntityId &id)
//--------------------------------------------------------------
void CCharacter::addPlayerToIgnoreList(const NLMISC::CEntityId &id)
{
// if player not found
// Boris 2006-09-19 : allow adding offline player to ignore list
// if (id == CEntityId::Unknown || PlayerManager.getChar(id)==NULL)
// {
// // player not found => message
// PHRASE_UTILITIES::sendDynamicSystemMessage( _EntityRowId, "OPERATION_OFFLINE");
// return;
// }
if (id == CEntityId::Unknown)
{
// player not found => message
PHRASE_UTILITIES::sendDynamicSystemMessage( _EntityRowId, "OPERATION_NOTEXIST");
return;
}
// check not already ignored
const uint size = (uint)_IgnoreList.size();
@ -15416,25 +15482,50 @@ void CCharacter::contactListRefChange(const NLMISC::CEntityId &id, TConctactList
}
//--------------------------------------------------------------
// CCharacter::isIgnoredBy()
//--------------------------------------------------------------
bool CCharacter::isIgnoredBy(const NLMISC::CEntityId &id)
{
const uint size = (uint)_IsIgnoredBy.size();
for (uint i = 0; i < size; ++i)
{
if (_IsIgnoredBy[i].getShortId() == id.getShortId())
{
return true;
}
}
return false;
}
//--------------------------------------------------------------
// CCharacter::referencedAsFriendBy()
// CCharacter::isFriendOf()
//--------------------------------------------------------------
void CCharacter::referencedAsFriendBy( const NLMISC::CEntityId &id)
bool CCharacter::isFriendOf(const NLMISC::CEntityId &id)
{
// check this entity isn't already in the list
const uint size = (uint)_IsFriendOf.size();
for ( uint i =0 ; i < size ; ++i)
for (uint i = 0 ; i < size ; ++i)
{
if ( _IsFriendOf[i].getShortId() == id.getShortId())
if (_IsFriendOf[i].getShortId() == id.getShortId())
{
return;
return true;
}
}
return false;
}
//--------------------------------------------------------------
// CCharacter::referencedAsFriendBy()
//--------------------------------------------------------------
void CCharacter::referencedAsFriendBy( const NLMISC::CEntityId &id)
{
if (isFriendOf(id))
{
return;
}
// not found -> add it
_IsFriendOf.push_back(id);
}
//--------------------------------------------------------------
@ -17454,6 +17545,18 @@ void CCharacter::pvpActionMade()
//-----------------------------------------------------------------------------
void CCharacter::setPVPFlagDatabase()
{
// Fix for when negative ticks were saved
if ( (_PVPRecentActionTime > CTickEventHandler::getGameCycle())
|| (_PVPFlagLastTimeChange > CTickEventHandler::getGameCycle())
|| (_PVPFlagTimeSettedOn > CTickEventHandler::getGameCycle() + TimeForSetPVPFlag) )
{
_PVPRecentActionTime = 0;
_PVPFlagLastTimeChange = 0;
_PVPFlagTimeSettedOn = 0;
_PVPSafeLastTimeChange = 0;
_PVPFlag = false;
}
uint32 activationTime;
if( _PVPFlag == true )
activationTime = _PVPFlagLastTimeChange + TimeForSetPVPFlag;
@ -17788,6 +17891,7 @@ void CCharacter::setOutpostAlias( uint32 id )
CBankAccessor_PLR::getCHARACTER_INFO().getPVP_OUTPOST().setRIGHT_TO_BANISH(_PropertyDatabase, hasRightToBanish );
CPVPManager2::getInstance()->setPVPModeInMirror(this);
updatePVPClanVP();
}
//-----------------------------------------------------------------------------
@ -18539,48 +18643,49 @@ void CCharacter::updateMagicProtectionAndResistance()
_MaxAbsorption = (getSkillBaseValue(getBestSkill()) * MaxAbsorptionFactor) / 100;
// magic resistance
sint32 baseResistance = (sint32)(_Skills._Skills[SKILLS::SF].MaxLvlReached * MagicResistFactorForCombatSkills) + MagicResistSkillDelta;
if( baseResistance < ((sint32)(_Skills._Skills[SKILLS::SM].MaxLvlReached * MagicResistFactorForMagicSkills) + MagicResistSkillDelta) )
baseResistance = (sint32)(_Skills._Skills[SKILLS::SM].MaxLvlReached * MagicResistFactorForMagicSkills) + MagicResistSkillDelta;
if( baseResistance < ((sint32)(_Skills._Skills[SKILLS::SH].MaxLvlReached * MagicResistFactorForForageSkills) + MagicResistSkillDelta) )
baseResistance = (sint32)(_Skills._Skills[SKILLS::SH].MaxLvlReached * MagicResistFactorForForageSkills) + MagicResistSkillDelta;
clamp(baseResistance, 0, 225);
_BaseResistance = (sint32)(_Skills._Skills[SKILLS::SF].MaxLvlReached * MagicResistFactorForCombatSkills) + MagicResistSkillDelta;
sint32 magicResist = ((sint32)(_Skills._Skills[SKILLS::SM].MaxLvlReached * MagicResistFactorForMagicSkills) + MagicResistSkillDelta);
_BaseResistance = max(_BaseResistance, magicResist);
sint32 forageResist = ((sint32)(_Skills._Skills[SKILLS::SH].MaxLvlReached * MagicResistFactorForForageSkills) + MagicResistSkillDelta);
_BaseResistance = max(_BaseResistance, forageResist);
clamp(_BaseResistance, 0, 225);
// set up base
for( uint32 i = 0; i < RESISTANCE_TYPE::NB_RESISTANCE_TYPE; ++i )
{
_MagicResistance[i]= (uint32)baseResistance * 100;
_MagicResistance[i]= (uint32)_BaseResistance * 100;
}
switch(i)
{
case RESISTANCE_TYPE::Desert:
if( _Race == EGSPD::CPeople::Fyros )
{
_MagicResistance[i] += HominRacialResistance * 100;
}
// correct for race
switch ( _Race)
{
case EGSPD::CPeople::Fyros:
_MagicResistance[RESISTANCE_TYPE::Desert] += HominRacialResistance * 100;
break;
case RESISTANCE_TYPE::Forest:
if( _Race == EGSPD::CPeople::Matis )
{
_MagicResistance[i] += HominRacialResistance * 100;
}
case EGSPD::CPeople::Matis:
_MagicResistance[RESISTANCE_TYPE::Forest] += HominRacialResistance * 100;
break;
case RESISTANCE_TYPE::Lacustre:
if( _Race == EGSPD::CPeople::Tryker )
{
_MagicResistance[i] += HominRacialResistance * 100;
}
case EGSPD::CPeople::Tryker:
_MagicResistance[RESISTANCE_TYPE::Lacustre] += HominRacialResistance * 100;
break;
case RESISTANCE_TYPE::Jungle:
if( _Race == EGSPD::CPeople::Zorai )
{
_MagicResistance[i] += HominRacialResistance * 100;
}
case EGSPD::CPeople::Zorai:
_MagicResistance[RESISTANCE_TYPE::Jungle] += HominRacialResistance * 100;
break;
default:
break;
}
}
// correct for current region
for( uint32 i = 0; i < RESISTANCE_TYPE::NB_RESISTANCE_TYPE; ++i )
{
_MagicResistance[i] = (uint32)((sint32)max( (sint32)0, ((sint32)_MagicResistance[i]) + getRegionResistanceModifier((RESISTANCE_TYPE::TResistanceType)i) * (sint32)100));
clamp( _MagicResistance[i], (uint32)0, (uint32)((baseResistance + MaxMagicResistanceBonus) * 100) );
}
// protection
@ -18663,7 +18768,7 @@ void CCharacter::updateMagicProtectionAndResistance()
for (uint i=0; i<RESISTANCE_TYPE::NB_RESISTANCE_TYPE; ++i)
{
CBankAccessor_PLR::getCHARACTER_INFO().getMAGIC_RESISTANCE().getArray(i).setVALUE(_PropertyDatabase, checkedCast<uint16>(_MagicResistance[i]));
CBankAccessor_PLR::getCHARACTER_INFO().getMAGIC_RESISTANCE().getArray(i).setVALUE(_PropertyDatabase, checkedCast<uint16>(getUnclampedMagicResistance((RESISTANCE_TYPE::TResistanceType)i)));
}
// _PropertyDatabase.setProp("CHARACTER_INFO:MAGIC_RESISTANCE:Desert", _MagicResistance[RESISTANCE_TYPE::Desert]);
// _PropertyDatabase.setProp("CHARACTER_INFO:MAGIC_RESISTANCE:Forest", _MagicResistance[RESISTANCE_TYPE::Forest]);
@ -20120,7 +20225,9 @@ void CCharacter::setEnterCriticalZoneProposalQueueId(uint32 queueId)
uint32 CCharacter::getMagicProtection( PROTECTION_TYPE::TProtectionType magicProtectionType ) const
{
uint32 val = getUnclampedMagicProtection(magicProtectionType); NLMISC::clamp( val, (uint32)0, MaxMagicProtection ); return val;
uint32 val = getUnclampedMagicProtection(magicProtectionType);
NLMISC::clamp( val, (uint32)0, MaxMagicProtection );
return val;
}
@ -20612,3 +20719,21 @@ void CCharacter::sendNpcMissionGiverTimer(bool force)
CUnifiedNetwork::getInstance()->send( NLNET::TServiceId(_Id.getDynamicId()), msgout );
}
}
//------------------------------------------------------------------------------
bool CCharacter::initPetInventory(uint8 index)
{
// init pet inventory
const uint32 petMaxWeight = 0xFFFFFFFF; // no weight limit
const uint32 petMaxBulk = _PlayerPets[ index ].getAnimalMaxBulk();
const INVENTORIES::TInventory petInvId = (INVENTORIES::TInventory)(index + INVENTORIES::pet_animal);
CPetInventory *petInventory = dynamic_cast<CPetInventory*> ((CInventoryBase*)_Inventory[petInvId]);
if (petInventory)
{
petInventory->initPetInventory( index, petMaxWeight, petMaxBulk );
return true;
}
return false;
}

@ -395,6 +395,15 @@ struct CXpProgressInfos
}
};
enum TFriendVisibility
{
VisibleToAll = 0, // Visible to all people who have me on their friends list, even if I am ignoring them.
VisibleToGuildAndFriends, // Visible to people in my guild and those that have me on their friends list.
VisibleToGuildOnly, // Only visible to people in my guild.
NB_FRIEND_VISIBILITY
};
/**
* CCharacter
@ -1023,14 +1032,14 @@ public:
// Same but nearly empty
void setDummyStartCharacteristics();
/**
* Eval Specialization for return Characteristics value
*
* \param value is the value to parse.
* \param result is the result to fill if the value has been succesfully parsed.
* \return UnknownValue if the value is not known, ValueError is the value evaluation failed or NoError
* if it has been parsed.
*/
/**
* Eval Specialization for return Characteristics value
*
* \param value is the value to parse.
* \param result is the result to fill if the value has been succesfully parsed.
* \return UnknownValue if the value is not known, ValueError is the value evaluation failed or NoError
* if it has been parsed.
*/
virtual TReturnState evalValue (const char *value, double &result, uint32 userData);
/// Add a pact
@ -2259,6 +2268,9 @@ public:
// return unclamped magic resistance of a character
uint32 getUnclampedMagicResistance( RESISTANCE_TYPE::TResistanceType magicResistanceType ) const;
// return clamped magic resistance of a character
uint32 getMagicResistance(RESISTANCE_TYPE::TResistanceType magicResistanceType) const;
/// return NbNonNullClassificationTypesSkillMod
uint8 getNbNonNullClassificationTypesSkillMod() const;
@ -2381,6 +2393,7 @@ public:
uint32 getLastConnectedDate() const;
uint32 getPlayedTime() const;
uint32 getOrganization() const;
uint32 getOrganizationStatus() const;
const std::list<TCharacterLogTime>& getLastLogStats() const;
void updateConnexionStat();
void setDisconnexionTime();
@ -2692,6 +2705,10 @@ private:
void contactListRefChange(const NLMISC::CEntityId &id, TConctactListAction actionType);
/// return true if player is ignored by the given entity
bool isIgnoredBy(const NLMISC::CEntityId &id);
/// return true if given entity has player on friend list
bool isFriendOf(const NLMISC::CEntityId &id);
/// player is referenced as friend by the given entity
void referencedAsFriendBy( const NLMISC::CEntityId &id);
/// player is no longer referenced as friend by the given entity
@ -2767,7 +2784,7 @@ private:
void removeExchangeItems(std::vector<CGameItemPtr>& itemRemoved, std::vector< CPetAnimal >& PlayerPetsRemoved);
// add the items gained during an exchange
void addExchangeItems(CCharacter* trader,std::vector<CGameItemPtr>& itemToAdd, std::vector< CPetAnimal >& PlayerPetsAdd);
void addExchangeItems(CCharacter* trader,std::vector<CGameItemPtr>& itemToAdd, std::vector< CPetAnimal >& PlayerPetsAdded);
/// get creator name dynamic string Id
uint32 getCreatorNameId( const NLMISC::CEntityId &creatorId);
@ -2895,6 +2912,9 @@ private:
*/
double addXpToSkillInternal( double XpGain, const std::string& ContSkill, TAddXpToSkillMode addXpMode, std::map<SKILLS::ESkills,CXpProgressInfos> &gainBySkill );
/// Initialize the specified pet inventory, if it is valid
bool initPetInventory(uint8 index);
///////////////////
// Public members
///////////////////
@ -2948,6 +2968,12 @@ public:
void setFinalized(bool isFinalized) { _LoadingFinish = isFinalized; };
bool isFinalized() const { return _LoadingFinish; };
void setFriendVisibility(TFriendVisibility val) { _FriendVisibility = val; }
const TFriendVisibility& getFriendVisibility() const { return _FriendVisibility; }
void setFriendVisibilitySave(uint8 val) { if (val < NB_FRIEND_VISIBILITY) _FriendVisibility = (TFriendVisibility)val; }
uint8 getFriendVisibilitySave() const { return (uint8)_FriendVisibility; }
//////////////////
// Private members
//////////////////
@ -3407,6 +3433,8 @@ private:
// current resistance for each type of magic resistance
uint32 _MagicResistance[RESISTANCE_TYPE::NB_RESISTANCE_TYPE];
sint32 _BaseResistance;
/// currently consumed item slot
sint32 _ConsumedItemSlot;
/// currently consumed item inventory
@ -3516,6 +3544,8 @@ private:
TAIAlias _LastCreatedNpcGroup;
TFriendVisibility _FriendVisibility;
// :KLUDGE: ICDBStructNode non-const 'coz getName and getParent are not
// const methods. See CCDBSynchronised::getICDBStructNodeFromName for more
// info.

@ -902,6 +902,12 @@ inline uint32 CCharacter::getOrganization() const
}
inline uint32 CCharacter::getOrganizationStatus() const
{
return _OrganizationStatus;
}
//------------------------------------------------------------------------------
inline const std::list<TCharacterLogTime>& CCharacter::getLastLogStats() const

@ -822,6 +822,13 @@ void CCharacter::moveItem(INVENTORIES::TInventory srcInvId, uint32 srcSlot, INVE
if ((!srcForm->DropOrSell && !canPutNonDropableItemInInventory(dstInvId)) || isAnActiveXpCatalyser(srcItem))
return;
// You cannot exchange genesis named items
if (srcItem->getPhraseId().find("genesis_") == 0 && !canPutNonDropableItemInInventory(dstInvId))
{
nlwarning("Character %s tries to move '%s' to inv %u", _Id.toString().c_str(), srcItem->getPhraseId().c_str(), dstInvId );
return;
}
// cannot move a pet animal ticket
if (srcForm->Family == ITEMFAMILY::PET_ANIMAL_TICKET)
return;
@ -3035,12 +3042,16 @@ void CCharacter::stopUseItem( bool isRingCatalyser )
}
else
{
PHRASE_UTILITIES::sendDynamicSystemMessage( _EntityRowId, "XP_CATALYSER_NO_MORE_ACTIVE");
_RingXpCatalyserSlot = INVENTORIES::INVALID_INVENTORY_SLOT;
// _PropertyDatabase.setProp( "CHARACTER_INFO:RING_XP_CATALYSER:Level", 0 );
CBankAccessor_PLR::getCHARACTER_INFO().getRING_XP_CATALYSER().setLevel(_PropertyDatabase, 0 );
// _PropertyDatabase.setProp( "CHARACTER_INFO:RING_XP_CATALYSER:Count", 0 );
CBankAccessor_PLR::getCHARACTER_INFO().getRING_XP_CATALYSER().setCount(_PropertyDatabase, 0 );
CPlayer * p = PlayerManager.getPlayer(PlayerManager.getPlayerId( getId() ));
BOMB_IF(p == NULL,"Failed to find player record for character: "<<getId().toString(),return);
if (p->isTrialPlayer()) {
PHRASE_UTILITIES::sendDynamicSystemMessage( _EntityRowId, "XP_CATALYSER_NO_MORE_ACTIVE");
_RingXpCatalyserSlot = INVENTORIES::INVALID_INVENTORY_SLOT;
// _PropertyDatabase.setProp( "CHARACTER_INFO:RING_XP_CATALYSER:Level", 0 );
CBankAccessor_PLR::getCHARACTER_INFO().getRING_XP_CATALYSER().setLevel(_PropertyDatabase, 0 );
// _PropertyDatabase.setProp( "CHARACTER_INFO:RING_XP_CATALYSER:Count", 0 );
CBankAccessor_PLR::getCHARACTER_INFO().getRING_XP_CATALYSER().setCount(_PropertyDatabase, 0 );
}
}
}

@ -570,6 +570,7 @@ static void prepareCharacterPositionForStore ( COfflineEntityState & state, cons
PROP2(Invisible, bool, getInvisibility(), setInvisibility(val)) \
PROP2(Aggroable, sint8, getAggroableSave(), setAggroableSave(val)) \
PROP2(GodMode, bool, getGodModeSave(), setGodModeSave(val)) \
PROP2(FriendVisibility, uint8, getFriendVisibilitySave(), setFriendVisibilitySave(val)) \
//#pragma message( PERSISTENT_GENERATION_MESSAGE )

@ -2597,6 +2597,7 @@ NLMISC_COMMAND(setPriv,"set a privilege to a user using his user id, must be in
else if (p->havePriv(AlwaysInvisiblePriv))
{
c->setWhoSeesMe(uint64(0));
c->setInvisibility(true);
}
}
}

@ -1203,7 +1203,7 @@ void CDamageScoreManager::playerDeath(CCharacter * victimChar, const CCharacter
CCharacter * winnerChar = PlayerManager.getChar(players[k]);
BOMB_IF(winnerChar == NULL, "invalid winner!", continue);
PVP_CLAN::TPVPClan winnerFaction;
PVP_CLAN::TPVPClan winnerFaction = PVP_CLAN::None;
bool winnerGainFactionPoints = true;
if (!canPlayerWinPoints(winnerChar, victimChar))

@ -231,7 +231,7 @@ void CPVPInterface::setPVPModeInMirror() const
if ( !TheDataset.isAccessible(_Owner->getEntityRowId()) )
return;
CMirrorPropValue<TYPE_PVP_MODE> propPvpMode( TheDataset, _Owner->getEntityRowId(), DSPropertyPVP_MODE );
CMirrorPropValue<TYPE_EVENT_FACTION_ID> propPvpMode( TheDataset, _Owner->getEntityRowId(), DSPropertyEVENT_FACTION_ID );
if (_PVPSession)
{

@ -393,9 +393,10 @@ void CPVPManager2::sendChannelUsers(TChanID channel, CCharacter * user, bool out
TDataSetRow senderRow = TheDataset.getDataSetRow(user->getId());
if (outputToSys)
{
CCharacter::sendDynamicSystemMessage( user->getId(), "WHO_CHANNEL_INTRO" );
//players = "Players in channel \"" + getUserDynChannel(channel) + "\": " + players;
string channelName = DynChatEGS.getChanNameFromID(channel);
SM_STATIC_PARAMS_1(params, STRING_MANAGER::literal);
params[0].Literal = channelName;
CCharacter::sendDynamicSystemMessage( user->getId(), "WHO_CHANNEL_INTRO" );
params[0].Literal = players;
CCharacter::sendDynamicSystemMessage( user->getId(), "LITERAL", params );
}
@ -522,14 +523,14 @@ void CPVPManager2::removeFactionChannelForCharacter(TChanID channel, CCharacter
_CharacterUserChannels.insert(make_pair(user->getId(), currentChannels));
}
}
}
TChannelsCharacter::iterator cit = _UserChannelCharacters.find(channel);
if (cit != _UserChannelCharacters.end())
{
std::vector<NLMISC::CEntityId> lst = _UserChannelCharacters[channel];
lst.erase(find(lst.begin(), lst.end(), user->getId()));
_UserChannelCharacters[channel] = lst;
}
TChannelsCharacter::iterator cit = _UserChannelCharacters.find(channel);
if (cit != _UserChannelCharacters.end())
{
std::vector<NLMISC::CEntityId> lst = _UserChannelCharacters[channel];
lst.erase(find(lst.begin(), lst.end(), user->getId()));
_UserChannelCharacters[channel] = lst;
}
}
}
@ -642,13 +643,11 @@ void CPVPManager2::setPVPModeInMirror( const CCharacter * user ) const
}
}
CMirrorPropValue<TYPE_PVP_MODE> propPvpMode( TheDataset, user->getEntityRowId(), DSPropertyPVP_MODE );
CMirrorPropValue<TYPE_EVENT_FACTION_ID> propPvpMode2( TheDataset, user->getEntityRowId(), DSPropertyEVENT_FACTION_ID );
//CMirrorPropValue<TYPE_PVP_MODE> propPvpMode( TheDataset, user->getEntityRowId(), DSPropertyPVP_MODE );
CMirrorPropValue<TYPE_EVENT_FACTION_ID> propPvpMode( TheDataset, user->getEntityRowId(), DSPropertyEVENT_FACTION_ID );
if (propPvpMode.getValue() != pvpMode)
{
nlinfo("New pvp Mode : %d", pvpMode);
propPvpMode = pvpMode;
propPvpMode2 = pvpMode;
}
}
@ -775,7 +774,6 @@ bool CPVPManager2::isCurativeActionValid( CCharacter * actor, CEntityBase * targ
PVP_RELATION::TPVPRelation pvpRelation = getPVPRelation( actor, target, true );
bool actionValid;
nlinfo("Pvp relation = %d", pvpRelation);
switch( pvpRelation )
{
case PVP_RELATION::Ally :

@ -69,7 +69,7 @@ namespace SAVES
{
public:
virtual ~CRemoteSavesManager() {}
static CRemoteSavesManager* getInstance();
// interface used by CRemoteSavesInterface objects in their ctor to declare themselves

@ -39,7 +39,7 @@ namespace PATCHMAN
{
public:
virtual ~CPatchmanTester() {}
// this is a singleton so it has a getInstance() method to get to the singleton instance
static CPatchmanTester& getInstance();

@ -195,9 +195,12 @@ namespace MSW
int result = mysql_real_query(_MysqlContext, queryString.c_str(), (unsigned long)queryString.size());
if (result != 0)
{
if (result == CR_SERVER_GONE_ERROR)
// in all case, we try to reconnect
int merrno = mysql_errno(_MysqlContext);
//if (result == CR_SERVER_GONE_ERROR)
{
// reconnect and retry the request
nlinfo("%p Mysql error errno:%d result:%d : %s, try to reconnect...", _MysqlContext, merrno, result, mysql_error(_MysqlContext));
if (_connect())
result = mysql_real_query(_MysqlContext, queryString.c_str(), (unsigned long)queryString.size());
else
@ -215,7 +218,7 @@ namespace MSW
if (result != 0)
{
nlwarning("Mysql error : %s", mysql_error(_MysqlContext));
nlwarning("Mysql error errno:%d result:%d : %s", merrno, result, mysql_error(_MysqlContext));
nlwarning(" in query '%s':", queryString.c_str());
if (MSWStrictMode)
{

Loading…
Cancel
Save