Changed: Synchonized some changes from compatibility-develop branch

--HG--
branch : develop
hg/compatibility-develop
kervala 7 years ago
parent bd901c5a8c
commit 575f58d749

@ -16,11 +16,11 @@ SaveConfig = 1;
Driver3D="Auto"; // Valid values are "Auto" or "0", "OpengGL" or "1" & "Direct3D" or "2"
// "Auto" will choose the best suited driver depending on hardware
FullScreen = 1;
Width = 1024;
Height = 768;
Width = 0;
Height = 0;
PositionX = 0;
PositionY = 0;
Frequency = 60;
Frequency = 0;
Depth = 32;
Sleep = -1;
ProcessPriority = 0; // -2 = idle, -1 = below normal, 0 = normal, 1 = above normal, 2 = high, 3 = real time
@ -281,7 +281,7 @@ DivideTextureSizeBy2= 0; // Divide texture size
DisableVtxProgram = 0; // Disable Hardware Vertex Program.
DisableVtxAGP = 0; // Disable Hardware Vertex AGP.
DisableTextureShdr = 0; // Disable Hardware Texture Shader.
HDEntityTexture = 0;
HDEntityTexture = 1;
HDTextureInstalled = 1;
WaitVBL = 0; // 0 or 1 to wait Vertical Sync.
@ -481,7 +481,8 @@ XMLInterfaceFiles = {
"commands2.xml",
"ring_access_point_filter.xml",
"ring_window.xml",
"bg_downloader.xml"
"bg_downloader.xml",
"ryzhome_toolbar.xml"
};
XMLR2EDInterfaceFiles =
@ -569,7 +570,9 @@ HelpPages =
"fr=http://forums.ryzom.com/forum/showthread.php?t=29130",
"en=http://forums.ryzom.com/forum/showthread.php?t=29129",
"wk=http://forums.ryzom.com/forum/showthread.php?t=29129",
"de=http://forums.ryzom.com/forum/showthread.php?t=29131"
"de=http://forums.ryzom.com/forum/showthread.php?t=29131",
"es=http://forums.ryzom.com/forum/showthread.php?t=29129",
"ru=http://forums.ryzom.com/forum/showthread.php?t=29129"
};
WebIgMainDomain = "app.ryzom.com";

@ -217,7 +217,7 @@ end
-- Is its level known (not too high ...)
-- Boss/Mini-bosses/Names colored ring
function game:updateTargetConsiderUI()
--debugInfo("Updating consider widget")
-- debugInfo("Updating consider widget")
local targetWindow = getUI("ui:interface:target")
--
@ -228,12 +228,14 @@ function game:updateTargetConsiderUI()
local wgToolTip = targetWindow:find("target_tooltip")
local wgPvPTag = targetWindow:find("pvp_tags")
local wgHeader = targetWindow:find("header_opened")
local wgLock = targetWindow:find("lock")
wgTargetSlotForce.active = true
wgImpossible.active = true
-- no selection ?
if twGetTargetLevel() == -1 then
wgLock.active = false
wgTargetSlotForce.active = false
wgTargetLevel.active = false
wgImpossible.active = false
@ -254,20 +256,36 @@ function game:updateTargetConsiderUI()
wgPvPTag.active = false
wgHeader.h = 34;
-- /luaScript getUI("ui:interface:target:header_opened:lock").active=true
-- if the selection is a player, then both the local & targeted player must be in PVP mode for the level to be displayed
if (twIsTargetPlayer()) then
-- don't display anything ...
wgLock.active = false
wgTargetSlotForce.active = false
wgTargetLevel.active = false
wgImpossible.active = false
wgSlotRing.active = false
wgToolTip.tooltip = ""
if twIsTargetInPVPMode() then
debugInfo("target in pvp")
wgPvPTag.active = true
wgHeader.h = 56;
end
return
else
wgLock.active = false
local level = getDbProp(getDefine("target_player_level"))
if level == 2 then -- Locked by team of player
wgLock.active = true
wgLock.color = "50 250 250 255"
else
if level == 1 then -- Locked by another team
wgLock.active = true
wgLock.color = "250 50 50 255"
end
end
end
-- depending on the number of people in the group, set the max diff for visibility between player level

@ -269,14 +269,27 @@
posparent="slot_force"
x="-1"
y="6"
scale="true"
h="16"
w="32"
scale="true"
h="16"
w="32"
color="255 255 255 255"
texture="consider_impossible.tga"
global_color="false"
render_layer="1"
active="true" />
<view type="bitmap"
id="lock"
posref="BR BR"
posparent="slot_force"
x="-5"
y="-3"
h="14"
w="14"
color="255 255 255 255"
texture="w_win_lock.tga"
global_color="false"
render_layer="3"
active="true" />
<ctrl type="tooltip"
id="target_tooltip"
tooltip="uittConsiderTargetNoSelection"

@ -32,13 +32,15 @@ function SceneEditor:init(scene_id, form_url, translations, icons_url)
self.T = translations
end
function SceneEditor:reset()
function SceneEditor:reset(no_get_html)
self.Shapes = {}
self.Groups = {}
self.LastEditedGroup = nil
self.HaveUpdate = nil
runAH(nil, "remove_shapes", "")
self:get_html("Reseted")
if no_get_html == true then
self:get_html("Reseted")
end
end
function SceneEditor:show_menu()
@ -364,24 +366,24 @@ end
function SceneEditor:editGroup(group)
if self.LastEditedGroup then
self:removeGroup(self.LastEditedGroup)
self:removeGroup(self.LastEditedGroup, true)
self:addGroup(self.LastEditedGroup, 0, true, false)
end
self:removeGroup(group);
self:removeGroup(group, true);
self:addGroup(group, 0, true, true)
self.LastEditedGroup = group
end
function SceneEditor:addFromDb(group, db_id, json_shape)
function SceneEditor:addFromDb(group, db_id, json_shape, edit)
shape = Json.decode(json_shape)
shape.db_id = db_id
shape.group = group
shape.modified = ""
if hide then
shape_id = addShape(shape.file, shape.pos[1], shape.pos[2], shape.pos[3], "user", 1, false, "", "")
else
if edit then
shape_id = addShape(shape.file, shape.pos[1], shape.pos[2], shape.pos[3], "user", 1, true, "", "SceneEditor:show_menu()")
else
shape_id = addShape(shape.file, shape.pos[1], shape.pos[2], shape.pos[3], "user", 1, true, "", "")
end
rotateShape(shape_id, tostring(shape.rot[1]), tostring(shape.rot[2]), tostring(shape.rot[3]))
setupShape(shape_id, shape.setup)
@ -393,7 +395,7 @@ function SceneEditor:addFromDb(group, db_id, json_shape)
end
function SceneEditor:removeGroup(group)
function SceneEditor:removeGroup(group, no_get_html)
if self.Groups[group] == nil then
return
end
@ -404,6 +406,7 @@ function SceneEditor:removeGroup(group)
deleteShape(shape_id)
end
end
self.Groups[group] = nil
if self.LastEditedGroup == group then
self.LastEditedGroup = nil
@ -412,7 +415,9 @@ function SceneEditor:removeGroup(group)
ui.active=false
end
end
self:get_html("Group Removed")
if no_get_html == nil then
self:get_html("Group Removed")
end
end
function SceneEditor:enc64(data)
@ -479,12 +484,28 @@ function SceneEditor:show_shape_list()
end
end
function SceneEditor:getShapesByGroups()
local groups = {}
for shape_id, shape in pairs(self.Shapes) do
if shape.group == nil then
shape.group = ""
end
if groups[shape.group] == nil then
groups[shape.group] = {}
end
table.insert(groups[shape.group], shape_id)
end
return groups
end
function SceneEditor:get_html_section(message, color)
return '<table width="100%" cellspacing="0" cellpadding="0"><tr bgcolor="'..color..'"><td align="center" valign="middle"><font color="#FFFFFF" size="12">'..message..'</font></td></tr></table>'
end
function SceneEditor:get_html(message, message_bg)
debug("get_html :"..message)
local new_group = '&nbsp;&nbsp;<a class="ryzom-ui-button" href="'..self.baseUrl..'_AddGroup&amp;add_new_group=1&amp;scene_id='..self.sceneId..'"><img src="'..self.iconsUrl..'/32/chart_organisation_add.png" alt="'..self.T["add_new_group"]..'" /></a>'
local show_hide_cols = '&nbsp;&nbsp;<a class="ryzom-ui-button" href="ah:ark_pacs_borders"><img src="'..self.iconsUrl..'/32/show_hide_cols.png" alt="'..self.T["show_hide_cols"]..'" /></a>'
local reset_scene = '</td><td align="center" bgcolor="#502020" width="40px"><a class="ryzom-ui-button" href="'..self.baseUrl..'_SaveShapes&amp;reset_scene=1&amp;scene_id='..self.sceneId..'"><img src="'..self.iconsUrl..'/32/bin.png" alt="'..self.T["reset_scene"]..'" /></a>'
@ -493,24 +514,17 @@ function SceneEditor:get_html(message, message_bg)
html = html .. '<form action="'..self.baseUrl..'_SaveShapes" method="POST"><input type="hidden" name="group" value="'..(self.LastEditedGroup or "")..'" /><input type="hidden" name="scene_id" value="'..self.sceneId..'" />\
<table width="100%" cellspacing="0" cellpadding="0">'
local groups = {}
for shape_id, shape in pairs(self.Shapes) do
if shape.group == nil then
shape.group = ""
end
if groups[shape.group] == nil then
groups[shape.group] = {}
end
table.insert(groups[shape.group], shape_id)
end
local groups = self:getShapesByGroups()
for group, shapes in pairsByKeys(self.Groups) do
debug("Group : "..group)
local groupname = group
html = html .. '<tr bgcolor="#444444"><td height="20px"><table width="100%"><tr><td>&nbsp;'..groupname..' ('..(self.Groups[group].props.count or '0')..') </td><td align="right"><input type="hidden" name="shape[]", value="#"/>'
if self.Groups[group].props.show then
debug("Group : show")
if self.Groups[group].props.edit then
html = html .. '<a href="ah:lua:SceneEditor:show_shape_list()"><img src="'..self.iconsUrl..'/16/box_add.png" alt="'..self.T["add_shape"]..'"/></a></td><td align="right">'
if self.HaveUpdate then

@ -485,6 +485,7 @@ void CContinent::select(const CVectorD &pos, NLMISC::IProgressCallback &progress
{
H_AUTO(InitRZWorldPacs)
releasePACS();
// Init PACS
std::string pacsRBankPath = CPath::lookup(PacsRBank, false);
@ -931,6 +932,9 @@ void CContinent::unselect()
// Remove the primitive for all entitites (new PACS coming soon and need new primitives).
EntitiesMngr.removeCollision();
// Remove the instances (shapes).
EntitiesMngr.removeInstances();
// release collision primitives
if (IGCallbacks)
{

@ -60,8 +60,7 @@ CLFECOMMON::TCLEntityId SlotUnderCursor;
uint32 MissionId = 0;
uint32 MissionRingId = 0;
sint32 InstanceId = 0;
UInstance selectedInstance;
const UInstance noSelectedInstance;
sint32 selectedInstance = -1;
string selectedInstanceURL;
static NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> s_UserCharFade;
@ -129,7 +128,7 @@ void initContextualCursor()
ContextCur.add(true, "MISSION", string(""), 0.0f, checkUnderCursor, contextMission);
ContextCur.add(true, "WEB PAGE", string(""), 0.0f, checkUnderCursor, contextWebPage);
ContextCur.add(true, "WEBIG", string(""), 0.0f, checkUnderCursor, contextWebIG);
ContextCur.add(false, "ARKITECT", string("curs_pick.tga"), 0.0f, checkUnderCursor, contextARKitect);
ContextCur.add(false, "ARKITECT", string("curs_create.tga"), 0.0f, checkUnderCursor, contextARKitect);
ContextCur.add(true, "OUTPOST", string(""), 0.0f, checkUnderCursor, contextOutpost);
ContextCur.add(true, "RING MISSION", string(""), 0.0f, checkUnderCursor, contextRingMission);
ContextCur.add(true, "BUILD_TOTEM", string("uimGcmChooseBuilding"), 0.0f, checkUnderCursor, contextBuildTotem);
@ -346,7 +345,6 @@ void checkUnderCursor()
// Entity Under the cursor is the entity selected.
else
{
// Wait for the target is up to date. Do not display context cursor if the user is mounted.
if( (UserEntity->selection() == UserEntity->targetSlot()) &&
(! UserEntity->isRiding()) )
@ -536,59 +534,49 @@ void checkUnderCursor()
sint32 instance_idx;
CShapeInstanceReference instref = EntitiesMngr.getShapeInstanceUnderPos(cursX, cursY, instance_idx);
if (EntitiesMngr.instancesRemoved())
selectedInstance = noSelectedInstance;
std::vector<string> keys;
keys.push_back("colorize");
if (instance_idx != selectedInstance && selectedInstance != -1) {
std::vector<string> values;
values.push_back("0");
EntitiesMngr.setupInstance((uint32)selectedInstance, keys, values);
}
UInstance instance = instref.Instance;
if (!instance.empty())
if (!instance.empty() && !instref.ContextURL.empty())
{
if (instance.getObjectPtr() != selectedInstance.getObjectPtr())
{
for(uint j=0;j<selectedInstance.getNumMaterials();j++)
{
// unhighlight
selectedInstance.getMaterial(j).setEmissive(CRGBA(255,255,255,255));
selectedInstance.getMaterial(j).setShininess( 10.0f );
}
selectedInstance = instance;
// For all materials
for(uint j=0;j<selectedInstance.getNumMaterials();j++)
{
// highlight
selectedInstance.getMaterial(j).setEmissive(CRGBA(255,0,0,255));
selectedInstance.getMaterial(j).setShininess( 1000.0f );
}
}
selectedInstanceURL = instref.ContextURL;
if (instref.ContextText.empty())
{
if (instance_idx != -1) {
std::vector<string> values;
values.push_back("#FF0000FF");
EntitiesMngr.setupInstance((uint32)instance_idx, keys, values);
selectedInstance = instance_idx;
}
cursor->setCursor("r2ed_tool_select_move_over.tga");
InstanceId = instance_idx;
if(ContextCur.context("ARKITECT", 0.f, ucstring()))
if (ContextCur.context("ARKITECT", 0.f, ucstring("Edit")))
return;
}
else
{
cursor->setCursor("curs_pick.tga");
ucstring contextText;
contextText.fromUtf8(instref.ContextText);
if(ContextCur.context("WEBIG", 0.f, contextText))
if (ContextCur.context("WEBIG", 0.f, contextText))
return;
}
}
else
{
if (!selectedInstance.empty())
{
for(uint j=0;j<selectedInstance.getNumMaterials();j++)
{
//unhighlight
selectedInstance.getMaterial(j).setEmissive(CRGBA(255,255,255,255));
selectedInstance.getMaterial(j).setShininess( 10.0f );
}
selectedInstance = noSelectedInstance;
} else {
if (!selectedInstanceURL.empty()) {
cursor->setCursor("curs_default.tga");
selectedInstanceURL.clear();
}
}
SlotUnderCursor = CLFECOMMON::INVALID_SLOT;
}
}
@ -896,7 +884,8 @@ void contextWebIG(bool rightClick, bool dblClick)
CInterface3DShape *el= dynamic_cast<CInterface3DShape*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:bot_chat_object:scene3d:object_1"));
if (el != NULL)
{
el->setName(selectedInstance.getShapeName());
//TODO: Fix that
//el->setName(selectedInstance.getShapeName());
el->setPosX(0.0f);
}
if (selectedInstanceURL.empty())

@ -703,6 +703,57 @@ double CEntityManager::getInstanceColOrient(uint32 idx)
return primitive->getOrientation(dynamicWI);
}
CVector CEntityManager::getInstanceBBoxMin(uint32 idx)
{
if (!Scene || idx >= _ShapeInstances.size() || _ShapeInstances[idx].Deleted)
return CVector(0,0,0);
UInstance instance = _ShapeInstances[idx].Instance;
if (instance.empty())
return CVector(0,0,0);
NLMISC::CAABBox bbox;
_ShapeInstances[idx].Instance.getShapeAABBox(bbox);
CVector bbox_min;
if (bbox.getCenter() == CVector::Null)
bbox_min = CVector(-0.5f, -0.5f, -0.5f);
else
bbox_min = bbox.getMin();
bbox_min.x *= _ShapeInstances[idx].Instance.getScale().x;
bbox_min.y *= _ShapeInstances[idx].Instance.getScale().y;
bbox_min.z *= _ShapeInstances[idx].Instance.getScale().z;
return bbox_min+_ShapeInstances[idx].Instance.getPos();
}
CVector CEntityManager::getInstanceBBoxMax(uint32 idx)
{
if (!Scene || idx >= _ShapeInstances.size() || _ShapeInstances[idx].Deleted)
return CVector(0,0,0);
UInstance instance = _ShapeInstances[idx].Instance;
if(instance.empty())
return CVector(0,0,0);
NLMISC::CAABBox bbox;
_ShapeInstances[idx].Instance.getShapeAABBox(bbox);
CVector bbox_max;
if (bbox.getCenter() == CVector::Null)
bbox_max = CVector(-0.5f, -0.5f, -0.5f);
else
bbox_max = bbox.getMax();
bbox_max.x *= _ShapeInstances[idx].Instance.getScale().x;
bbox_max.y *= _ShapeInstances[idx].Instance.getScale().y;
bbox_max.z *= _ShapeInstances[idx].Instance.getScale().z;
return bbox_max+_ShapeInstances[idx].Instance.getPos();
}
bool CEntityManager::removeInstances()
{
@ -756,14 +807,28 @@ bool CEntityManager::setupInstance(uint32 idx, const vector<string> &keys, const
}
else if (param == "colorize")
{
CRGBA c;
if( fromString( values[i], c ) )
if (values[i] == "0")
{
for(uint j=0;j<instance.getNumMaterials();j++)
{
instance.getMaterial(j).setShininess( 1000.0f );
instance.getMaterial(j).setEmissive(c);
instance.getMaterial(j).setDiffuse(c);
instance.getMaterial(j).setShininess( 10.0f );
instance.getMaterial(j).setEmissive(CRGBA(255,255,255,255));
instance.getMaterial(j).setAmbient(CRGBA(0,0,0,255));
instance.getMaterial(j).setDiffuse(CRGBA(255,255,255,255));
}
}
else
{
CRGBA c;
if( fromString( values[i], c ) )
{
for(uint j=0;j<instance.getNumMaterials();j++)
{
instance.getMaterial(j).setShininess( 1000.0f );
instance.getMaterial(j).setEmissive(c);
instance.getMaterial(j).setAmbient(c);
instance.getMaterial(j).setDiffuse(c);
}
}
}
}
@ -782,6 +847,43 @@ bool CEntityManager::setupInstance(uint32 idx, const vector<string> &keys, const
}
}
}
else if (param == "skeleton")
{
// TODO
}
else if (param == "context")
{
_ShapeInstances[idx].ContextText = values[i];
}
else if (param == "url")
{
_ShapeInstances[idx].ContextURL = values[i];
}
else if (param == "move x" || param == "move y" || param == "move z")
{
float v;
CVector pos = getInstancePos(idx);
if( getRelativeFloatFromString( values[i], v ) ) {
updateVector(param, pos, v, true);
} else {
updateVector(param, pos, v, false);
}
setInstancePos(idx, pos);
}
else if (param == "rot x" || param == "rot y" || param == "rot z")
{
float v;
CVector rot = getInstanceRot(idx);
if( getRelativeFloatFromString( values[i], v ) ) {
updateVector(param, rot, v, true);
} else {
updateVector(param, rot, v, false);
}
setInstanceRot(idx, rot);
}
else if (param == "scale x" || param == "scale y" || param == "scale z")
{
float v;
@ -879,6 +981,10 @@ bool CEntityManager::setupInstance(uint32 idx, const vector<string> &keys, const
fromString(values[i], active);
primitive->setObstacle(active);
}
else if (param == "col obstacle")
{
}
}
return true;
@ -933,7 +1039,16 @@ CShapeInstanceReference CEntityManager::getShapeInstanceUnderPos(float x, float
bbox_max = bbox.getMax();
}
bbox.setMinMax((bbox_min*_ShapeInstances[i].Instance.getScale().x)+_ShapeInstances[i].Instance.getPos(), (bbox_max*_ShapeInstances[i].Instance.getScale().x)+_ShapeInstances[i].Instance.getPos());
bbox_min.x *= _ShapeInstances[i].Instance.getScale().x;
bbox_min.y *= _ShapeInstances[i].Instance.getScale().y;
bbox_min.z *= _ShapeInstances[i].Instance.getScale().z;
bbox_max.x *= _ShapeInstances[i].Instance.getScale().x;
bbox_max.y *= _ShapeInstances[i].Instance.getScale().y;
bbox_max.z *= _ShapeInstances[i].Instance.getScale().z;
bbox.setMinMax(bbox_min+_ShapeInstances[i].Instance.getPos(), bbox_max+_ShapeInstances[i].Instance.getPos());
if(bbox.intersect(pos, pos+dir*100.0f))
{

@ -236,6 +236,8 @@ public:
CVector getInstanceColPos(uint32 idx);
CVector getInstanceColScale(uint32 idx);
double getInstanceColOrient(uint32 idx);
CVector getInstanceBBoxMin(uint32 idx);
CVector getInstanceBBoxMax(uint32 idx);
bool setInstanceRot(uint32 idx, CVector pos);
bool instancesRemoved();
bool setupInstance(uint32 idx, const std::vector<std::string> &keys, const std::vector<std::string> &values);

@ -96,9 +96,14 @@ REGISTER_ACTION_HANDLER (CAHDisplayInfos, "display_infos");
// ------------------------------------------------------------------------------------------------
class CAHToggleARKPACSBorders : public IActionHandler
{
virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */)
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
{
ARKPACSBorders = !ARKPACSBorders;
if (!getParam(Params, "on").empty())
ARKPACSBorders = true;
else if (!getParam(Params, "off").empty())
ARKPACSBorders = false;
else ARKPACSBorders = !ARKPACSBorders;
}
};
REGISTER_ACTION_HANDLER (CAHToggleARKPACSBorders, "ark_pacs_borders");

@ -2048,7 +2048,8 @@ int CLuaIHMRyzom::addShape(CLuaState &ls)
float x = 0.0f, y = 0.0f, z = 0.0f;
float scale = 1.0f;
string context, url, skeleton, texture;
bool highlight, transparency = false;
bool highlight = false;
bool transparency = false;
bool collision = true;
if (ls.getTop() >= 2)
@ -2150,14 +2151,14 @@ int CLuaIHMRyzom::addShape(CLuaState &ls)
if (!highlight)
{
instance.getMaterial(j).setAmbient(CRGBA(0,0,0,255));
instance.getMaterial(j).setShininess( 10.0f );
instance.getMaterial(j).setEmissive(CRGBA(255,255,255,255));
instance.getMaterial(j).setShininess(10.0f);
}
else
{
instance.getMaterial(j).setAmbient(CRGBA(0,0,0,255));
instance.getMaterial(j).setEmissive(CRGBA(255,0,0,255));
instance.getMaterial(j).setShininess( 1000.0f );
instance.getMaterial(j).setShininess(1000.0f);
}
if (!texture.empty())

@ -47,7 +47,6 @@
#include "editor.h"
//
#include "nel/gui/lua_helper.h"
using namespace NLGUI;
#include "nel/gui/group_tree.h"
#include "../interface_v3/interface_manager.h"
#include "../contextual_cursor.h"
@ -122,7 +121,7 @@ using namespace NLGUI;
using namespace NLMISC;
using namespace NLNET;
using namespace NL3D;
using namespace NLGUI;
extern CEventsListener EventsListener;
extern CLog g_log;

@ -1551,7 +1551,8 @@
<leaf name="DESPAWN"
type="I7" />
<leaf name="NAME"
type="I32" />
type="I32"
is_true="1" />
</branch>
</branch>
<branch name="DEBUG_INFO"

@ -355,11 +355,11 @@
<leaf name="EQUIP"
sendto="EGS"
format="u16 u16 u16"
description="the client equip character (equipped inventory, equipped inventory slot, bag slot)" />
description="the client equip character (equiped inventory, equiped inventory slot, bag slot)" />
<leaf name="UNEQUIP"
sendto="EGS"
format="u16 u16"
description="the client unequip character (equipped inventory, equipped inventory slot)" />
description="the client unequip character (equiped inventory, equiped inventory slot)" />
<leaf name="TEMP_TO_BAG"
sendto="EGS"
format="u16"

@ -362,7 +362,7 @@ void CBankAccessor_PLR::TUSER::init(ICDBStructNode *parent)
node = parent->getNode( ICDBStructNode::CTextId("IS_INVISIBLE"), false );
nlassert(node != NULL);
_IS_INVISIBLE = node;
node = parent->getNode( ICDBStructNode::CTextId("COUNTER"), false );
nlassert(node != NULL);
_COUNTER = node;
@ -1198,6 +1198,14 @@ void CBankAccessor_PLR::TEXCHANGE::TGIVE::TArray::init(ICDBStructNode *parent, u
nlassert(node != NULL);
_QUANTITY = node;
node = parent->getNode( ICDBStructNode::CTextId("CREATE_TIME"), false );
nlassert(node != NULL);
_CREATE_TIME = node;
node = parent->getNode( ICDBStructNode::CTextId("SERIAL"), false );
nlassert(node != NULL);
_SERIAL = node;
node = parent->getNode( ICDBStructNode::CTextId("USER_COLOR"), false );
nlassert(node != NULL);
_USER_COLOR = node;
@ -1277,6 +1285,14 @@ void CBankAccessor_PLR::TEXCHANGE::TRECEIVE::TArray::init(ICDBStructNode *parent
nlassert(node != NULL);
_QUANTITY = node;
node = parent->getNode( ICDBStructNode::CTextId("CREATE_TIME"), false );
nlassert(node != NULL);
_CREATE_TIME = node;
node = parent->getNode( ICDBStructNode::CTextId("SERIAL"), false );
nlassert(node != NULL);
_SERIAL = node;
node = parent->getNode( ICDBStructNode::CTextId("USER_COLOR"), false );
nlassert(node != NULL);
_USER_COLOR = node;
@ -1484,6 +1500,14 @@ void CBankAccessor_PLR::TINVENTORY::TTEMP::TArray::init(ICDBStructNode *parent,
nlassert(node != NULL);
_QUANTITY = node;
node = parent->getNode( ICDBStructNode::CTextId("CREATE_TIME"), false );
nlassert(node != NULL);
_CREATE_TIME = node;
node = parent->getNode( ICDBStructNode::CTextId("SERIAL"), false );
nlassert(node != NULL);
_SERIAL = node;
node = parent->getNode( ICDBStructNode::CTextId("USER_COLOR"), false );
nlassert(node != NULL);
_USER_COLOR = node;
@ -1574,6 +1598,14 @@ void CBankAccessor_PLR::TINVENTORY::TSHARE::TArray::init(ICDBStructNode *parent,
nlassert(node != NULL);
_QUANTITY = node;
node = parent->getNode( ICDBStructNode::CTextId("CREATE_TIME"), false );
nlassert(node != NULL);
_CREATE_TIME = node;
node = parent->getNode( ICDBStructNode::CTextId("SERIAL"), false );
nlassert(node != NULL);
_SERIAL = node;
node = parent->getNode( ICDBStructNode::CTextId("USER_COLOR"), false );
nlassert(node != NULL);
_USER_COLOR = node;
@ -2126,6 +2158,14 @@ void CBankAccessor_PLR::TTRADING::TArray::init(ICDBStructNode *parent, uint inde
nlassert(node != NULL);
_QUANTITY = node;
node = parent->getNode( ICDBStructNode::CTextId("CREATE_TIME"), false );
nlassert(node != NULL);
_CREATE_TIME = node;
node = parent->getNode( ICDBStructNode::CTextId("SERIAL"), false );
nlassert(node != NULL);
_SERIAL = node;
node = parent->getNode( ICDBStructNode::CTextId("USER_COLOR"), false );
nlassert(node != NULL);
_USER_COLOR = node;
@ -3139,11 +3179,11 @@ void CBankAccessor_PLR::TPACK_ANIMAL::TBEAST::init(ICDBStructNode *parent, uint
node = parent->getNode( ICDBStructNode::CTextId("DESPAWN"), false );
nlassert(node != NULL);
_DESPAWN = node;
// WARNING: let the value to true, else it'll corrupt backups
node = parent->getNode( ICDBStructNode::CTextId("NAME"), true );
nlassert(node != NULL);
_NAME = node;
// branch init

@ -956,6 +956,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
void setIS_INVISIBLE(CCDBSynchronised &dbGroup, bool value, bool forceSending = false)
{
_setProp(dbGroup, _IS_INVISIBLE, value, forceSending);
}
@ -971,7 +973,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
{
return _IS_INVISIBLE;
}
void setCOUNTER(CCDBSynchronised &dbGroup, uint8 value, bool forceSending = false)
{
@ -1313,14 +1315,13 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
{
return _DODGE;
}
TBRICK_TICK_RANGE &getBRICK_TICK_RANGE()
TBRICK_TICK_RANGE &getBRICK_TICK_RANGE()
{
return _BRICK_TICK_RANGE;
}
};
class TTARGET
{
public:
@ -2781,6 +2782,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
ICDBStructNode *_SHEET;
ICDBStructNode *_QUALITY;
ICDBStructNode *_QUANTITY;
ICDBStructNode *_CREATE_TIME;
ICDBStructNode *_SERIAL;
ICDBStructNode *_USER_COLOR;
ICDBStructNode *_WEIGHT;
ICDBStructNode *_NAMEID;
@ -2867,6 +2870,46 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
return _QUANTITY;
}
void setCREATE_TIME(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false)
{
_setProp(dbGroup, _CREATE_TIME, value, forceSending);
}
uint32 getCREATE_TIME(const CCDBSynchronised &dbGroup)
{
uint32 value;
_getProp(dbGroup, _CREATE_TIME, value);
return value;
}
ICDBStructNode *getCREATE_TIMECDBNode()
{
return _CREATE_TIME;
}
void setSERIAL(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false)
{
_setProp(dbGroup, _SERIAL, value, forceSending);
}
uint32 getSERIAL(const CCDBSynchronised &dbGroup)
{
uint32 value;
_getProp(dbGroup, _SERIAL, value);
return value;
}
ICDBStructNode *getSERIALCDBNode()
{
return _SERIAL;
}
void setUSER_COLOR(CCDBSynchronised &dbGroup, uint8 value, bool forceSending = false)
{
@ -3080,6 +3123,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
ICDBStructNode *_SHEET;
ICDBStructNode *_QUALITY;
ICDBStructNode *_QUANTITY;
ICDBStructNode *_CREATE_TIME;
ICDBStructNode *_SERIAL;
ICDBStructNode *_USER_COLOR;
ICDBStructNode *_WEIGHT;
ICDBStructNode *_NAMEID;
@ -3166,6 +3211,46 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
return _QUANTITY;
}
void setCREATE_TIME(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false)
{
_setProp(dbGroup, _CREATE_TIME, value, forceSending);
}
uint32 getCREATE_TIME(const CCDBSynchronised &dbGroup)
{
uint32 value;
_getProp(dbGroup, _CREATE_TIME, value);
return value;
}
ICDBStructNode *getCREATE_TIMECDBNode()
{
return _CREATE_TIME;
}
void setSERIAL(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false)
{
_setProp(dbGroup, _SERIAL, value, forceSending);
}
uint32 getSERIAL(const CCDBSynchronised &dbGroup)
{
uint32 value;
_getProp(dbGroup, _SERIAL, value);
return value;
}
ICDBStructNode *getSERIALCDBNode()
{
return _SERIAL;
}
void setUSER_COLOR(CCDBSynchronised &dbGroup, uint8 value, bool forceSending = false)
{
@ -3471,6 +3556,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
void setMONEY(CCDBSynchronised &dbGroup, uint64 value, bool forceSending = false)
{
_setProp(dbGroup, _MONEY, value, forceSending);
}
@ -3710,6 +3797,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
ICDBStructNode *_SHEET;
ICDBStructNode *_QUALITY;
ICDBStructNode *_QUANTITY;
ICDBStructNode *_CREATE_TIME;
ICDBStructNode *_SERIAL;
ICDBStructNode *_USER_COLOR;
ICDBStructNode *_WEIGHT;
ICDBStructNode *_NAMEID;
@ -3796,6 +3885,46 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
return _QUANTITY;
}
void setCREATE_TIME(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false)
{
_setProp(dbGroup, _CREATE_TIME, value, forceSending);
}
uint32 getCREATE_TIME(const CCDBSynchronised &dbGroup)
{
uint32 value;
_getProp(dbGroup, _CREATE_TIME, value);
return value;
}
ICDBStructNode *getCREATE_TIMECDBNode()
{
return _CREATE_TIME;
}
void setSERIAL(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false)
{
_setProp(dbGroup, _SERIAL, value, forceSending);
}
uint32 getSERIAL(const CCDBSynchronised &dbGroup)
{
uint32 value;
_getProp(dbGroup, _SERIAL, value);
return value;
}
ICDBStructNode *getSERIALCDBNode()
{
return _SERIAL;
}
void setUSER_COLOR(CCDBSynchronised &dbGroup, uint8 value, bool forceSending = false)
{
@ -4051,6 +4180,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
ICDBStructNode *_SHEET;
ICDBStructNode *_QUALITY;
ICDBStructNode *_QUANTITY;
ICDBStructNode *_CREATE_TIME;
ICDBStructNode *_SERIAL;
ICDBStructNode *_USER_COLOR;
ICDBStructNode *_WEIGHT;
ICDBStructNode *_NAMEID;
@ -4140,6 +4271,46 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
return _QUANTITY;
}
void setCREATE_TIME(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false)
{
_setProp(dbGroup, _CREATE_TIME, value, forceSending);
}
uint32 getCREATE_TIME(const CCDBSynchronised &dbGroup)
{
uint32 value;
_getProp(dbGroup, _CREATE_TIME, value);
return value;
}
ICDBStructNode *getCREATE_TIMECDBNode()
{
return _CREATE_TIME;
}
void setSERIAL(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false)
{
_setProp(dbGroup, _SERIAL, value, forceSending);
}
uint32 getSERIAL(const CCDBSynchronised &dbGroup)
{
uint32 value;
_getProp(dbGroup, _SERIAL, value);
return value;
}
ICDBStructNode *getSERIALCDBNode()
{
return _SERIAL;
}
void setUSER_COLOR(CCDBSynchronised &dbGroup, uint8 value, bool forceSending = false)
{
@ -4572,6 +4743,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
void setMONEY(CCDBSynchronised &dbGroup, uint64 value, bool forceSending = false)
{
_setProp(dbGroup, _MONEY, value, forceSending);
}
@ -4582,12 +4755,14 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
return value;
}
ICDBStructNode *getMONEYCDBNode()
{
return _MONEY;
}
};
private:
ICDBStructNode *_BranchNode;
@ -4610,8 +4785,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
return _BranchNode;
}
void setMONEY(CCDBSynchronised &dbGroup, uint64 value, bool forceSending = false)
{
_setProp(dbGroup, _MONEY, value, forceSending);
}
@ -5687,6 +5865,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
ICDBStructNode *_SHEET;
ICDBStructNode *_QUALITY;
ICDBStructNode *_QUANTITY;
ICDBStructNode *_CREATE_TIME;
ICDBStructNode *_SERIAL;
ICDBStructNode *_USER_COLOR;
ICDBStructNode *_WEIGHT;
ICDBStructNode *_NAMEID;
@ -5785,6 +5965,46 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
return _QUANTITY;
}
void setCREATE_TIME(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false)
{
_setProp(dbGroup, _CREATE_TIME, value, forceSending);
}
uint32 getCREATE_TIME(const CCDBSynchronised &dbGroup)
{
uint32 value;
_getProp(dbGroup, _CREATE_TIME, value);
return value;
}
ICDBStructNode *getCREATE_TIMECDBNode()
{
return _CREATE_TIME;
}
void setSERIAL(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false)
{
_setProp(dbGroup, _SERIAL, value, forceSending);
}
uint32 getSERIAL(const CCDBSynchronised &dbGroup)
{
uint32 value;
_getProp(dbGroup, _SERIAL, value);
return value;
}
ICDBStructNode *getSERIALCDBNode()
{
return _SERIAL;
}
void setUSER_COLOR(CCDBSynchronised &dbGroup, uint8 value, bool forceSending = false)
{
@ -6005,6 +6225,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
void setMONEY_SHEET(CCDBSynchronised &dbGroup, NLMISC::CSheetId value, bool forceSending = false)
{
_setProp(dbGroup, _MONEY_SHEET, value, forceSending);
}
@ -8861,6 +9083,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
ICDBStructNode *_HUNGER;
ICDBStructNode *_DESPAWN;
ICDBStructNode *_NAME;
public:
void init(ICDBStructNode *parent, uint index);
@ -9049,9 +9272,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
{
return _DESPAWN;
}
void setNAME(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false)
{
_setProp(dbGroup, _NAME, value, forceSending);
}
@ -9062,11 +9287,12 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
return value;
}
ICDBStructNode *getNAMECDBNode()
{
return _NAME;
}
};

@ -1072,11 +1072,15 @@ void CCharacterInvView::updateClientSlot(uint32 slot, const CGameItemPtr item)
resaleFlag = BOTCHATTYPE::ResaleKOLockedByOwner;
}
const INVENTORIES::TItemId &itemId = item->getItemId();
INVENTORIES::CItemSlot itemSlot( slot );
itemSlot.setItemProp( INVENTORIES::Sheet, item->getSheetId().asInt() );
itemSlot.setItemProp( INVENTORIES::Quality, item->quality() );
itemSlot.setItemProp( INVENTORIES::Quantity, item->getStackSize() );
itemSlot.setItemProp( INVENTORIES::UserColor, item->color() );
itemSlot.setItemProp( INVENTORIES::CreateTime, itemId.getCreateTime() );
itemSlot.setItemProp( INVENTORIES::Serial, itemId.getSerialNumber() );
itemSlot.setItemProp( INVENTORIES::Locked, item->getLockCount() );
itemSlot.setItemProp( INVENTORIES::Weight, item->weight() / 10 );
itemSlot.setItemProp( INVENTORIES::NameId, item->sendNameId(getCharacter()) );

Loading…
Cancel
Save