Show characteristic buffs of item in icon, fix forge enhancement, kaetemi/ryzomclassic#203

ryzomclassic-develop
kaetemi 4 years ago
parent cf16ec5c44
commit 45bc21e5c9

@ -299,7 +299,8 @@
<variable entry="UI:TEMP:TRADE_ITEM:QUALITY" type="sint64" value="0" />
<variable entry="UI:TEMP:TRADE_ITEM:QUANTITY" type="sint64" value="0" />
<variable entry="UI:TEMP:TRADE_ITEM:SLOT_TYPE" type="sint64" value="0" />
<variable entry="UI:TEMP:TRADE_ITEM:USER_COLOR" type="sint32" value="0" />
<variable entry="UI:TEMP:TRADE_ITEM:USER_COLOR" type="sint32" value="1" />
<variable entry="UI:TEMP:TRADE_ITEM:CHARAC_BUFFS" type="sint8" value="0" />
<variable entry="UI:TEMP:TRADE_ITEM:WEIGHT" type="sint32" value="0" />
<variable entry="UI:TEMP:TRADE_ITEM:NAMEID" type="sint32" value="0" />
<variable entry="UI:TEMP:TRADE_ITEM:INFO_VERSION" type="sint32" value="0" />
@ -314,7 +315,8 @@
<variable entry="UI:TEMP:TRADE_ITEM:BUILD_ITEMS:$i:QUALITY" type="sint32" value="0" size="64" />
<variable entry="UI:TEMP:TRADE_ITEM:BUILD_ITEMS:$i:QUANTITY" type="sint32" value="0" size="64" />
<variable entry="UI:TEMP:TRADE_ITEM:BUILD_ITEMS:$i:SLOT_TYPE" type="sint32" value="0" size="64" />
<variable entry="UI:TEMP:TRADE_ITEM:BUILD_ITEMS:$i:USER_COLOR" type="sint32" value="0" size="64" />
<variable entry="UI:TEMP:TRADE_ITEM:BUILD_ITEMS:$i:USER_COLOR" type="sint32" value="1" size="64" />
<variable entry="UI:TEMP:TRADE_ITEM:BUILD_ITEMS:$i:CHARAC_BUFFS" type="sint8" value="0" size="64" />
<variable entry="UI:TEMP:TRADE_ITEM:BUILD_ITEMS:$i:NAMEID" type="sint32" value="0" size="64" />
<variable entry="UI:TEMP:TRADE_ITEM:BUILD_ITEMS:$i:INFO_VERSION" type="sint32" value="0" size="64" />
<variable entry="UI:TEMP:TRADE_ITEM:BUILD_ITEMS:$i:ENCHANT" type="sint32" value="0" size="64" />
@ -532,6 +534,7 @@
<variable entry="UI:VARIABLES:BOTCHAT:FILTER_ITEM_TYPE:QUALITY" type="sint32" value="0" />
<variable entry="UI:VARIABLES:BOTCHAT:FILTER_ITEM_TYPE:QUANTITY" type="sint32" value="0" />
<variable entry="UI:VARIABLES:BOTCHAT:FILTER_ITEM_TYPE:USER_COLOR" type="sint32" value="1" />
<variable entry="UI:VARIABLES:BOTCHAT:FILTER_ITEM_TYPE:CHARAC_BUFFS" type="sint8" value="0" />
<!-- init beige by default -->
<variable entry="UI:VARIABLES:BOTCHAT:FILTER_ITEM_TYPE:WEIGHT" type="sint32" value="0" />
<!-- selection of the item type -->
@ -539,6 +542,7 @@
<variable entry="UI:VARIABLES:BOTCHAT:FILTER_ITEM_TYPE_SELECTED:$i:QUALITY" type="sint32" value="0" size="128" />
<variable entry="UI:VARIABLES:BOTCHAT:FILTER_ITEM_TYPE_SELECTED:$i:QUANTITY" type="sint32" value="0" size="128" />
<variable entry="UI:VARIABLES:BOTCHAT:FILTER_ITEM_TYPE_SELECTED:$i:USER_COLOR" type="sint32" value="1" size="128" />
<variable entry="UI:VARIABLES:BOTCHAT:FILTER_ITEM_TYPE_SELECTED:$i:CHARAC_BUFFS" type="sint8" value="0" size="128" />
<!-- init beige by default -->
<variable entry="UI:VARIABLES:BOTCHAT:FILTER_ITEM_TYPE_SELECTED:$i:WEIGHT" type="sint32" value="0" size="128" />
<!-- selection of the item type is automatically modified when the bitfield change -->

@ -25,6 +25,7 @@
<leaf name="QUALITY" type="I10" />
<leaf name="QUANTITY" type="I10" />
<leaf name="USER_COLOR" type="I3" />
<leaf name="CHARAC_BUFFS" type="I8" />
<leaf name="LOCKED" type="I10" />
<leaf name="WEIGHT" type="I16" />
<!-- weight. see DB_WEIGHT_SCALE-->
@ -50,6 +51,7 @@
<leaf name="QUALITY" type="I10" />
<leaf name="QUANTITY" type="I10" />
<leaf name="USER_COLOR" type="I3" />
<leaf name="CHARAC_BUFFS" type="I8" />
<leaf name="LOCKED" type="I10" />
<leaf name="WEIGHT" type="I16" />
<!-- weight. see DB_WEIGHT_SCALE-->
@ -83,6 +85,7 @@
<leaf name="QUALITY" type="I10" />
<leaf name="QUANTITY" type="I10" />
<leaf name="USER_COLOR" type="I3" />
<leaf name="CHARAC_BUFFS" type="I8" />
<!-- No LOCKED state -->
<leaf name="WEIGHT" type="I16" />
<!-- weight. see DB_WEIGHT_SCALE-->
@ -107,6 +110,7 @@
<leaf name="QUALITY" type="I10" />
<leaf name="QUANTITY" type="I10" />
<leaf name="USER_COLOR" type="I3" />
<leaf name="CHARAC_BUFFS" type="I8" />
<leaf name="WEIGHT" type="I16" />
<!-- weight. see DB_WEIGHT_SCALE-->
<leaf name="NAMEID" type="I32" />
@ -141,6 +145,7 @@
<leaf name="QUALITY" type="I10" />
<leaf name="QUANTITY" type="I10" />
<leaf name="USER_COLOR" type="I3" />
<leaf name="CHARAC_BUFFS" type="I8" />
<leaf name="LOCKED" type="I10" />
<leaf name="WEIGHT" type="I16" />
<!-- weight. see DB_WEIGHT_SCALE-->
@ -175,6 +180,7 @@
<leaf name="QUALITY" type="I10" />
<leaf name="QUANTITY" type="I10" />
<leaf name="USER_COLOR" type="I3" />
<leaf name="CHARAC_BUFFS" type="I8" />
<!-- <leaf name="LOCKED" type="I10"/> No longer needed -->
<leaf name="WEIGHT" type="I16" />
<!-- weight. see DB_WEIGHT_SCALE-->
@ -194,6 +200,7 @@
<leaf name="QUALITY" type="I10" />
<leaf name="QUANTITY" type="I10" />
<leaf name="USER_COLOR" type="I3" />
<leaf name="CHARAC_BUFFS" type="I8" />
<!-- <leaf name="LOCKED" type="I10"/> No longer needed -->
<leaf name="WEIGHT" type="I16" />
<!-- weight. see DB_WEIGHT_SCALE-->
@ -223,6 +230,7 @@
<leaf name="QUANTITY" type="I10" />
<!-- No LOCKED state -->
<leaf name="USER_COLOR" type="I3" />
<leaf name="CHARAC_BUFFS" type="I8" />
<leaf name="WEIGHT" type="I16" />
<!-- weight. see DB_WEIGHT_SCALE-->
<leaf name="NAMEID" type="I32" />

@ -908,7 +908,8 @@
<variable entry="UI:glob_var:help:$i:QUALITY" type="sint32" value="0" size="%MAX_HELP_WINDOW"/>
<variable entry="UI:glob_var:help:$i:QUANTITY" type="sint32" value="0" size="%MAX_HELP_WINDOW"/>
<variable entry="UI:glob_var:help:$i:SLOT_TYPE" type="sint32" value="0" size="%MAX_HELP_WINDOW"/>
<variable entry="UI:glob_var:help:$i:USER_COLOR" type="sint32" value="0" size="%MAX_HELP_WINDOW"/>
<variable entry="UI:glob_var:help:$i:USER_COLOR" type="sint32" value="1" size="%MAX_HELP_WINDOW"/>
<variable entry="UI:glob_var:help:$i:CHARAC_BUFFS" type="sint8" value="0" size="%MAX_HELP_WINDOW"/>
<variable entry="UI:glob_var:help:$i:ENCHANT" type="sint32" value="0" size="%MAX_HELP_WINDOW"/>
<variable entry="UI:glob_var:help:$i:RM_CLASS_TYPE" type="sint32" value="0" size="%MAX_HELP_WINDOW"/>
<variable entry="UI:glob_var:help:$i:RM_FABER_STAT_TYPE" type="sint32" value="0" size="%MAX_HELP_WINDOW"/>

@ -500,14 +500,16 @@
<variable entry="UI:PHRASE:FABER:MP_SELECT:$i:SHEET" type="sint32" value="0" size="%phrase_faber_selection_max" />
<variable entry="UI:PHRASE:FABER:MP_SELECT:$i:QUALITY" type="sint32" value="0" size="%phrase_faber_selection_max" />
<variable entry="UI:PHRASE:FABER:MP_SELECT:$i:QUANTITY" type="sint32" value="0" size="%phrase_faber_selection_max" />
<variable entry="UI:PHRASE:FABER:MP_SELECT:$i:USER_COLOR" type="sint32" value="0" size="%phrase_faber_selection_max" />
<variable entry="UI:PHRASE:FABER:MP_SELECT:$i:USER_COLOR" type="sint32" value="1" size="%phrase_faber_selection_max" />
<variable entry="UI:PHRASE:FABER:MP_SELECT:$i:CHARAC_BUFFS" type="sint8" value="0" size="%phrase_faber_selection_max" />
<variable entry="UI:PHRASE:FABER:MP_SELECT:$i:WEIGHT" type="sint32" value="0" size="%phrase_faber_selection_max" />
<!-- Define varaibles for the mp selected array-->
<template name="phrase_faber_def_build_mps" index="" id="" >
<variable entry="UI:PHRASE:FABER:MP_BUILD:#index:$i:SHEET" type="sint32" value="0" size="%phrase_faber_max_mp_slot" />
<variable entry="UI:PHRASE:FABER:MP_BUILD:#index:$i:QUALITY" type="sint32" value="0" size="%phrase_faber_max_mp_slot" />
<variable entry="UI:PHRASE:FABER:MP_BUILD:#index:$i:QUANTITY" type="sint32" value="0" size="%phrase_faber_max_mp_slot" />
<variable entry="UI:PHRASE:FABER:MP_BUILD:#index:$i:USER_COLOR" type="sint32" value="0" size="%phrase_faber_max_mp_slot" />
<variable entry="UI:PHRASE:FABER:MP_BUILD:#index:$i:USER_COLOR" type="sint32" value="1" size="%phrase_faber_max_mp_slot" />
<variable entry="UI:PHRASE:FABER:MP_BUILD:#index:$i:CHARAC_BUFFS" type="sint8" value="0" size="%phrase_faber_max_mp_slot" />
<variable entry="UI:PHRASE:FABER:MP_BUILD:#index:$i:WEIGHT" type="sint32" value="0" size="%phrase_faber_max_mp_slot" />
</template>
<vector template="phrase_faber_def_build_mps" id="yoyo_pipo_faber$i" index="$i" _size="%phrase_faber_max_item_req" _firstpos="TL TL" _xfirst="0" _nextpos="TR TL" _yfirst="0" />
@ -520,7 +522,8 @@
<variable entry="UI:PHRASE:FABER:STACK_SELECT:SHEET" type="sint32" value="0" />
<variable entry="UI:PHRASE:FABER:STACK_SELECT:QUALITY" type="sint32" value="0" />
<variable entry="UI:PHRASE:FABER:STACK_SELECT:QUANTITY" type="sint32" value="0" />
<variable entry="UI:PHRASE:FABER:STACK_SELECT:USER_COLOR" type="sint32" value="0" />
<variable entry="UI:PHRASE:FABER:STACK_SELECT:USER_COLOR" type="sint32" value="1" />
<variable entry="UI:PHRASE:FABER:STACK_SELECT:CHARAC_BUFFS" type="sint8" value="0" />
<variable entry="UI:PHRASE:FABER:STACK_SELECT:WEIGHT" type="sint32" value="0" />
<!-- declare the dummy mp stack selection value -->
<variable entry="UI:PHRASE:FABER:STACK_SELECT:CUR_QUANTITY" type="sint32" value="0" />
@ -529,7 +532,8 @@
<variable entry="UI:PHRASE:FABER:RESULT_ITEM:SHEET" type="sint32" value="0" />
<variable entry="UI:PHRASE:FABER:RESULT_ITEM:QUALITY" type="sint32" value="0" />
<variable entry="UI:PHRASE:FABER:RESULT_ITEM:QUANTITY" type="sint32" value="0" />
<variable entry="UI:PHRASE:FABER:RESULT_ITEM:USER_COLOR" type="sint32" value="0" />
<variable entry="UI:PHRASE:FABER:RESULT_ITEM:USER_COLOR" type="sint32" value="1" />
<variable entry="UI:PHRASE:FABER:RESULT_ITEM:CHARAC_BUFFS" type="sint8" value="0" />
<variable entry="UI:PHRASE:FABER:RESULT_ITEM:LOCKED" type="sint32" value="0" />
<variable entry="UI:PHRASE:FABER:RESULT_ITEM:WEIGHT" type="sint32" value="0" />
<variable entry="UI:PHRASE:FABER:RESULT_ITEM:NAMEID" type="sint32" value="0" />

@ -627,7 +627,8 @@
<variable entry="UI:VARIABLES:STACK_SELECTED:DSPSLOT:SHEET" type="sint32" value="0" />
<variable entry="UI:VARIABLES:STACK_SELECTED:DSPSLOT:QUANTITY" type="sint32" value="0" />
<variable entry="UI:VARIABLES:STACK_SELECTED:DSPSLOT:QUALITY" type="sint32" value="0" />
<variable entry="UI:VARIABLES:STACK_SELECTED:DSPSLOT:USER_COLOR" type="sint32" value="0" />
<variable entry="UI:VARIABLES:STACK_SELECTED:DSPSLOT:USER_COLOR" type="sint32" value="1" />
<variable entry="UI:VARIABLES:STACK_SELECTED:DSPSLOT:CHARAC_BUFFS" type="sint8" value="0" />
<variable entry="UI:VARIABLES:STACK_SELECTED:DSPSLOT:WEIGHT" type="sint32" value="0" />
<variable entry="UI:VARIABLES:STACK_SELECTED:DSPSLOT:NAMEID" type="sint32" value="0" />
<variable entry="UI:VARIABLES:STACK_SELECTED:DSPSLOT:INFOVERSION" type="sint32" value="0" />
@ -897,7 +898,8 @@
<variable entry="UI:DROP_DESTROY_ITEM:ITEM:SHEET" type="sint64" value="0" />
<variable entry="UI:DROP_DESTROY_ITEM:ITEM:QUANTITY" type="sint64" value="0" />
<variable entry="UI:DROP_DESTROY_ITEM:ITEM:QUALITY" type="sint64" value="0" />
<variable entry="UI:DROP_DESTROY_ITEM:ITEM:USER_COLOR" type="sint64" value="0" />
<variable entry="UI:DROP_DESTROY_ITEM:ITEM:USER_COLOR" type="sint64" value="1" />
<variable entry="UI:DROP_DESTROY_ITEM:ITEM:CHARAC_BUFFS" type="sint8" value="0" />
<variable entry="UI:DROP_DESTROY_ITEM:ITEM:LOCKED" type="sint64" value="0" />
<variable entry="UI:DROP_DESTROY_ITEM:ITEM:WEIGHT" type="sint64" value="0" />
<variable entry="UI:DROP_DESTROY_ITEM:ITEM:NAMEID" type="sint64" value="0" />
@ -1141,7 +1143,8 @@
<variable entry="UI:glob_var:help:$i:QUALITY" type="sint32" value="0" size="%MAX_HELP_WINDOW" />
<variable entry="UI:glob_var:help:$i:QUANTITY" type="sint32" value="0" size="%MAX_HELP_WINDOW" />
<variable entry="UI:glob_var:help:$i:SLOT_TYPE" type="sint32" value="0" size="%MAX_HELP_WINDOW" />
<variable entry="UI:glob_var:help:$i:USER_COLOR" type="sint32" value="0" size="%MAX_HELP_WINDOW" />
<variable entry="UI:glob_var:help:$i:USER_COLOR" type="sint32" value="1" size="%MAX_HELP_WINDOW" />
<variable entry="UI:glob_var:help:$i:CHARAC_BUFFS" type="sint8" value="0" size="%MAX_HELP_WINDOW" />
<variable entry="UI:glob_var:help:$i:NAMEID" type="sint32" value="0" size="%MAX_HELP_WINDOW" />
<variable entry="UI:glob_var:help:$i:INFO_VERSION" type="sint32" value="0" size="%MAX_HELP_WINDOW" />
<variable entry="UI:glob_var:help:$i:ENCHANT" type="sint32" value="0" size="%MAX_HELP_WINDOW" />
@ -1165,7 +1168,8 @@
<variable entry="UI:glob_var:help:$i:BUILD_ITEMS:#index:QUALITY" type="sint32" value="0" size="%MAX_HELP_WINDOW" />
<variable entry="UI:glob_var:help:$i:BUILD_ITEMS:#index:QUANTITY" type="sint32" value="0" size="%MAX_HELP_WINDOW" />
<variable entry="UI:glob_var:help:$i:BUILD_ITEMS:#index:SLOT_TYPE" type="sint32" value="0" size="%MAX_HELP_WINDOW" />
<variable entry="UI:glob_var:help:$i:BUILD_ITEMS:#index:USER_COLOR" type="sint32" value="0" size="%MAX_HELP_WINDOW" />
<variable entry="UI:glob_var:help:$i:BUILD_ITEMS:#index:USER_COLOR" type="sint32" value="1" size="%MAX_HELP_WINDOW" />
<variable entry="UI:glob_var:help:$i:BUILD_ITEMS:#index:CHARAC_BUFFS" type="sint8" value="0" size="%MAX_HELP_WINDOW" />
<variable entry="UI:glob_var:help:$i:BUILD_ITEMS:#index:NAMEID" type="sint32" value="0" size="%MAX_HELP_WINDOW" />
<variable entry="UI:glob_var:help:$i:BUILD_ITEMS:#index:INFO_VERSION" type="sint32" value="0" size="%MAX_HELP_WINDOW" />
<variable entry="UI:glob_var:help:$i:BUILD_ITEMS:#index:ENCHANT" type="sint32" value="0" size="%MAX_HELP_WINDOW" />

@ -568,10 +568,12 @@ CCtrlDraggable(param)
_ItemRMFaberStatType= NULL;
_NotifyAnimEndTime = 0;
#ifdef RYZOM_FORGE
_HpBuffIcon = "ico_heal.tga";
_SapBuffIcon = "ico_sap.tga";
_StaBuffIcon = "ico_stamina.tga";
_FocusBuffIcon = "ico_focus.tga";
#endif
_RegenText = NULL;
_RegenTextValue = 0;
@ -672,6 +674,7 @@ bool CDBCtrlSheet::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
prop = (char*) xmlGetProp( cur, (xmlChar*)"slot" );
if(prop) _DrawSlot= CInterfaceElement::convertBool(prop);
#ifdef RYZOM_FORGE
//
_HpBuffIcon = "ico_heal.tga";
prop = (char*) xmlGetProp( cur, (xmlChar*)"hp_buff_icon" );
@ -688,6 +691,7 @@ bool CDBCtrlSheet::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
_FocusBuffIcon = "ico_focus.tga";
prop = (char*) xmlGetProp( cur, (xmlChar*)"focus_buff_icon" );
if (prop) _FocusBuffIcon = string((const char *)prop);
#endif
updateActualType();
// Init size for Type
@ -1109,6 +1113,24 @@ void CDBCtrlSheet::updateIconSize()
}
}
void CDBCtrlSheet::updateCharacBuffs()
{
CViewRenderer &rVR = *CViewRenderer::getInstance();
uint8 characBuffs = getItemCharacBuffs();
_BuffIcons.clear();
if (characBuffs & (1 << CHARACTERISTICS::constitution)) _BuffIcons.push_back(SBuffIcon(rVR.getTextureIdFromName("ico_heal.tga")));
if (characBuffs & (1 << CHARACTERISTICS::intelligence)) _BuffIcons.push_back(SBuffIcon(rVR.getTextureIdFromName("ico_sap.tga")));
if (characBuffs & (1 << CHARACTERISTICS::strength)) _BuffIcons.push_back(SBuffIcon(rVR.getTextureIdFromName("ico_stamina.tga")));
if (characBuffs & (1 << CHARACTERISTICS::dexterity)) _BuffIcons.push_back(SBuffIcon(rVR.getTextureIdFromName("ico_focus.tga")));
// update sizes
for(uint i = 0; i < _BuffIcons.size(); ++i)
{
rVR.getTextureSizeFromId(_BuffIcons[i].TextureId, _BuffIcons[i].IconW, _BuffIcons[i].IconH);
}
}
#ifdef RYZOM_FORGE
// ***************************************************************************
void CDBCtrlSheet::clearIconBuffs()
@ -1160,6 +1182,7 @@ void CDBCtrlSheet::infoReceived()
}
}
#if 0
// buff icons
{
CViewRenderer &rVR = *CViewRenderer::getInstance();
@ -1175,6 +1198,7 @@ void CDBCtrlSheet::infoReceived()
rVR.getTextureSizeFromId(_BuffIcons[i].TextureId, _BuffIcons[i].IconW, _BuffIcons[i].IconH);
}
}
#endif
}
#endif
@ -1346,6 +1370,9 @@ void CDBCtrlSheet::setupItem ()
// Special Item requirement
updateItemCharacRequirement(_LastSheetId);
// Update buff icons
updateCharacBuffs();
#ifdef RYZOM_FORGE
// update item info markers
_ItemInfoChanged = true;
@ -2433,11 +2460,11 @@ void CDBCtrlSheet::drawSheet (sint32 x, sint32 y, bool draging, bool showSelecti
hIcon = hArea;
}
rVR.drawRotFlipBitmap (_RenderLayer+1, xIcon, yIcon, wIcon, hIcon, 0, false, _BuffIcons[i].TextureId, fastMulRGB(curSheetColor, _BuffIcons[i].Color));
xIcon += wIcon;
xIcon += wIcon / 2;
// move up the row for 3rd/4th icon
if (i % 3 == 1) {
xIcon = x;
yIcon += hIcon;
yIcon += hIcon / 2;
}
}
}
@ -3251,6 +3278,8 @@ void CDBCtrlSheet::swapSheet(CDBCtrlSheet *other)
// swap the other props only if the DB exist in the 2 version. else no-op
swapDBProps(_UserColor, other->_UserColor);
swapDBProps(getItemCharacBuffsPtr(), other->getItemCharacBuffsPtr());
swapDBProps(getItemAccessPtr(), other->getItemAccessPtr());
swapDBProps(getItemLockedPtr(), other->getItemLockedPtr());
swapDBProps(getItemWeightPtr(), other->getItemWeightPtr());
swapDBProps(getItemInfoVersionPtr(), other->getItemInfoVersionPtr());
@ -3922,6 +3951,10 @@ void CDBCtrlSheet::copyAspect(CDBCtrlSheet *dest)
// copy color for items
sint col = getItemColor();
if (col != -1) dest->setItemColor(col);
// copy charac buffs
dest->setItemCharacBuffs(getItemCharacBuffs());
// copy access
dest->setItemAccess(getItemAccess());
// copy weight
dest->setItemWeight(getItemWeight());
// copy nameId
@ -4616,6 +4649,52 @@ void CDBCtrlSheet::setItemPrerequisitValid(bool prv)
node->setValueBool(prv);
}
// ***************************************************************************
uint8 CDBCtrlSheet::getItemCharacBuffs() const
{
CCDBNodeLeaf *node = getItemCharacBuffsPtr();
return (node ? (uint8)node->getValue8() : 0);
}
// ***************************************************************************
CCDBNodeLeaf *CDBCtrlSheet::getItemCharacBuffsPtr() const
{
CCDBNodeBranch *root = getRootBranch();
if (!root) return NULL;
return dynamic_cast<CCDBNodeLeaf *>(root->getNode(ICDBNode::CTextId("CHARAC_BUFFS"), false));
}
// ***************************************************************************
void CDBCtrlSheet::setItemCharacBuffs(uint8 val)
{
CCDBNodeLeaf *node = getItemCharacBuffsPtr();
if (!node) return;
node->setValue8((sint8)val);
}
// ***************************************************************************
uint8 CDBCtrlSheet::getItemAccess() const // TODO: Guild grade & proper default
{
CCDBNodeLeaf *node = getItemAccessPtr();
return (node ? (uint8)node->getValue8() : 0);
}
// ***************************************************************************
CCDBNodeLeaf *CDBCtrlSheet::getItemAccessPtr() const
{
CCDBNodeBranch *root = getRootBranch();
if (!root) return NULL;
return dynamic_cast<CCDBNodeLeaf *>(root->getNode(ICDBNode::CTextId("ACCESS"), false));
}
// ***************************************************************************
void CDBCtrlSheet::setItemAccess(uint8 val)
{
CCDBNodeLeaf *node = getItemAccessPtr();
if (!node) return;
node->setValue8((sint8)val);
}
// ***************************************************************************
void CDBCtrlSheet::initArmourColors()
{

@ -581,7 +581,7 @@ public:
// set item FABER_STAT_TYPE
void setItemRMFaberStatType(sint32 fss);
// get item PREREQUISIT_VALID. true of no DB
// get item PREREQUISIT_VALID. true if no DB
bool getItemPrerequisitValid() const;
NLMISC::CCDBNodeLeaf *getItemPrerequisitValidPtr() const;
// set item PREREQUISIT_VALID
@ -592,6 +592,18 @@ public:
// set item color (if possible)
void setItemColor(sint32 val) {if(_UserColor) _UserColor->setValue32(val);}
// get item CHARAC_BUFFS. 0 if no DB
uint8 getItemCharacBuffs() const;
NLMISC::CCDBNodeLeaf *getItemCharacBuffsPtr() const;
// set item CHARAC_BUFFS
void setItemCharacBuffs(uint8 val);
// get item ACCESS. 0 if no DB
uint8 getItemAccess() const; // TODO: Guild grade & proper default
NLMISC::CCDBNodeLeaf *getItemAccessPtr() const;
// set item CHARAC_BUFFS
void setItemAccess(uint8 val);
// Get the Actual item name. Localized version of SheetId, or given by server through NAMEID.
std::string getItemActualName() const;
@ -616,6 +628,8 @@ public:
// start notify anim (at the end of regen usually)
void startNotifyAnim();
void updateCharacBuffs();
#ifdef RYZOM_FORGE
// callback from info waiter
void infoReceived();
@ -682,10 +696,12 @@ protected:
sint32 _DispOverBmpId; // Over Icon
sint32 _DispOver2BmpId; // Over Icon N0 2 for bricks / items. Useful for items when _DispOverBmpId is used to paint user color on the item.
#ifdef RYZOM_FORGE
std::string _HpBuffIcon;
std::string _SapBuffIcon;
std::string _StaBuffIcon;
std::string _FocusBuffIcon;
#endif
// texture ids to show
struct SBuffIcon

@ -169,6 +169,7 @@ bool CHugeListObs::init()
_Items[k].Weight = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:WEIGHT").c_str(), (int) k), false);
_Items[k].NameId = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:NAMEID").c_str(), (int) k), false);
_Items[k].UserColor = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:USER_COLOR").c_str(), (int) k), false);
_Items[k].CharacBuffs = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:CHARAC_BUFFS").c_str(), (int) k), false);
_Items[k].Enchant = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:ENCHANT").c_str(), (int) k), false);
_Items[k].RMClassType = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:RM_CLASS_TYPE").c_str(), (int) k), false);
_Items[k].RMFaberStatType = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:RM_FABER_STAT_TYPE").c_str(), (int) k), false);
@ -200,6 +201,7 @@ bool CHugeListObs::init()
_Items[k].Weight = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:WEIGHT").c_str(), (int) k), false);
_Items[k].NameId = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:NAMEID").c_str(), (int) k), false);
_Items[k].UserColor = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:USER_COLOR").c_str(), (int) k), false);
_Items[k].CharacBuffs = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:CHARAC_BUFFS").c_str(), (int) k), false);
_Items[k].Enchant = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:ENCHANT").c_str(), (int) k), false);
_Items[k].RMClassType = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:RM_CLASS_TYPE").c_str(), (int) k), false);
_Items[k].RMFaberStatType = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:RM_FABER_STAT_TYPE").c_str(), (int) k), false);
@ -391,6 +393,7 @@ void CHugeListObs::update(ICDBNode * /* node */)
page.Items[k].Weight= (uint16) _Items[k].Weight->getValue16();
page.Items[k].NameId= (uint32) _Items[k].NameId->getValue32();
page.Items[k].UserColor = _Items[k].UserColor->getValue32();
page.Items[k].CharacBuffs = _Items[k].CharacBuffs->getValue32();
page.Items[k].Enchant = _Items[k].Enchant->getValue32();
page.Items[k].RMClassType = _Items[k].RMClassType->getValue32();
page.Items[k].RMFaberStatType = _Items[k].RMFaberStatType->getValue32();
@ -429,6 +432,7 @@ void CHugeListObs::update(ICDBNode * /* node */)
page.Items[k].Weight= (uint16) _Items[k].Weight->getValue16();
page.Items[k].NameId= (uint32) _Items[k].NameId->getValue32();
page.Items[k].UserColor = _Items[k].UserColor->getValue32();
page.Items[k].CharacBuffs = _Items[k].CharacBuffs->getValue32();
page.Items[k].Enchant = _Items[k].Enchant->getValue32();
page.Items[k].RMClassType = _Items[k].RMClassType->getValue32();
page.Items[k].RMFaberStatType = _Items[k].RMFaberStatType->getValue32();
@ -584,6 +588,8 @@ void CHugeListObs::updateUIItemPage(uint index)
if (leaf) leaf->setValue32(currItem.NameId);
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":USER_COLOR", false);
if (leaf) leaf->setValue32(currItem.UserColor);
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":CHARAC_BUFFS", false);
if (leaf) leaf->setValue32(currItem.CharacBuffs);
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":ENCHANT", false);
if (leaf) leaf->setValue32(currItem.Enchant);
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":RM_CLASS_TYPE", false);
@ -627,6 +633,8 @@ void CHugeListObs::updateUIItemPage(uint index)
if (leaf) leaf->setValue32(currItem.NameId);
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":USER_COLOR", false);
if (leaf) leaf->setValue32(currItem.UserColor);
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":CHARAC_BUFFS", false);
if (leaf) leaf->setValue32(currItem.CharacBuffs);
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":ENCHANT", false);
if (leaf) leaf->setValue32(currItem.Enchant);
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":RM_CLASS", false);

@ -143,6 +143,7 @@ private:
NLMISC::CCDBNodeLeaf *NameId;
NLMISC::CCDBNodeLeaf *InfoVersion;
NLMISC::CCDBNodeLeaf *UserColor;
NLMISC::CCDBNodeLeaf *CharacBuffs;
NLMISC::CCDBNodeLeaf *Enchant;
NLMISC::CCDBNodeLeaf *RMClassType;
NLMISC::CCDBNodeLeaf *RMFaberStatType;
@ -172,6 +173,7 @@ private:
NameId(NULL),
InfoVersion(NULL),
UserColor(NULL),
CharacBuffs(NULL),
Enchant(NULL),
RMClassType(NULL),
RMFaberStatType(NULL),
@ -233,6 +235,7 @@ private:
uint32 NameId; // Valid for items
uint32 InfoVersion; // Valid for items
sint32 UserColor; // Valid for items
uint32 CharacBuffs; // Valid for items
uint32 Enchant;
uint32 RMClassType;
uint32 RMFaberStatType;

@ -122,8 +122,8 @@ namespace INVENTORIES
const char *InfoVersionStr = "INFO_VERSION";
const char *CItemSlot::ItemPropStr [NbItemPropId] =
{ "SHEET", "QUALITY", "QUANTITY", "USER_COLOR", "BUFFS", "LOCKED", "ACCESS", "WEIGHT", "NAMEID", "ENCHANT", "RM_CLASS_TYPE", "RM_FABER_STAT_TYPE", "PREREQUISIT_VALID", "PRICE", "RESALE_FLAG", "WORNED" };
{ "SHEET", "QUALITY", "QUANTITY", "USER_COLOR", "CHARAC_BUFFS", "LOCKED", "ACCESS", "WEIGHT", "NAMEID", "ENCHANT", "RM_CLASS_TYPE", "RM_FABER_STAT_TYPE", "PREREQUISIT_VALID", "PRICE", "RESALE_FLAG", "WORNED" };
const uint CItemSlot::DataBitSize [NbItemPropId] =
{ 32, 10, 10, 3, 8, 10, 2, 16, 32, 10, 3, 5, 1, 32, 2, 1, };
{ 32, 10, 10, 3, 8, 10, 2, 16, 32, 10, 3, 5, 1, 32, 2, 1, };
}

@ -266,7 +266,7 @@ namespace INVENTORIES
Quality,
Quantity,
UserColor,
Buffs,
CharacBuffs,
Locked,
Access,
Weight,

@ -137,7 +137,7 @@ void CGuildInventoryView::updateClientSlot(uint32 slot)
itemSlot.setItemProp( INVENTORIES::Quality, item->quality() );
itemSlot.setItemProp( INVENTORIES::Quantity, item->getStackSize() );
itemSlot.setItemProp( INVENTORIES::UserColor, item->color() );
itemSlot.setItemProp( INVENTORIES::Buffs, item->buffFlags() );
itemSlot.setItemProp( INVENTORIES::CharacBuffs, item->buffFlags() );
itemSlot.setItemProp( INVENTORIES::Locked, 0 );
itemSlot.setItemProp( INVENTORIES::Access, item->getAccessGrade() );
itemSlot.setItemProp( INVENTORIES::Weight, item->weight() / 10 );

@ -1087,7 +1087,7 @@ void CCharacterInvView::updateClientSlot(uint32 slot, const CGameItemPtr item)
itemSlot.setItemProp( INVENTORIES::Quality, item->quality() );
itemSlot.setItemProp( INVENTORIES::Quantity, item->getStackSize() );
itemSlot.setItemProp( INVENTORIES::UserColor, item->color() );
itemSlot.setItemProp( INVENTORIES::Buffs, item->buffFlags() );
itemSlot.setItemProp( INVENTORIES::CharacBuffs, item->buffFlags() );
itemSlot.setItemProp( INVENTORIES::Locked, item->getLockCount() );
itemSlot.setItemProp( INVENTORIES::Access, 0 ); // don't care here
itemSlot.setItemProp( INVENTORIES::Weight, item->weight() / 10 );

Loading…
Cancel
Save