Added: Race shape properties of sitems (!!! sitems.packed_sheets must be regenerated with freshly complilated sheets_packer tool !!!)

--HG--
branch : patches-from-atys
ulukyn 6 years ago
parent 8b1ead9e77
commit 3652b23bbb

@ -8306,10 +8306,53 @@ std::string CCharacterCL::currentAnimationSetName(TAnimationType animType) const
//--------------------------------------------------- //---------------------------------------------------
std::string CCharacterCL::shapeFromItem(const CItemSheet &itemSheet) const std::string CCharacterCL::shapeFromItem(const CItemSheet &itemSheet) const
{ {
if(_Gender == GSGENDER::female && !itemSheet.getShapeFemale().empty()) string sheet = "";
return itemSheet.getShapeFemale();
if(_Gender == GSGENDER::male)
{
if(_Sheet)
switch(_Sheet->Race)
{
case EGSPD::CPeople::Fyros:
sheet = itemSheet.getShapeFyros();
break;
case EGSPD::CPeople::Matis:
sheet = itemSheet.getShapeMatis();
break;
case EGSPD::CPeople::Tryker:
sheet = itemSheet.getShapeTryker();
break;
case EGSPD::CPeople::Zorai:
sheet = itemSheet.getShapeZorai();
break;
}
}
else else
return itemSheet.getShape(); {
if(_Sheet)
switch(_Sheet->Race)
{
case EGSPD::CPeople::Fyros:
sheet = itemSheet.getShapeFyrosFemale();
break;
case EGSPD::CPeople::Matis:
sheet = itemSheet.getShapeMatisFemale();
break;
case EGSPD::CPeople::Tryker:
sheet = itemSheet.getShapeTrykerFemale();
break;
case EGSPD::CPeople::Zorai:
sheet = itemSheet.getShapeZoraiFemale();
break;
}
if (sheet.empty())
sheet = itemSheet.getShapeFemale();
}
if (sheet.empty())
sheet = itemSheet.getShape();
return sheet;
}// shapeFromItem // }// shapeFromItem //

@ -75,6 +75,15 @@ CItemSheet::CItemSheet()
{ {
IdShape = 0; IdShape = 0;
IdShapeFemale = 0; IdShapeFemale = 0;
IdShapeFyros = 0;
IdShapeFyrosFemale = 0;
IdShapeMatis = 0;
IdShapeMatisFemale = 0;
IdShapeTryker = 0;
IdShapeTrykerFemale = 0;
IdShapeZorai = 0;
IdShapeZoraiFemale = 0;
MapVariant = 0; MapVariant = 0;
ItemType = ITEM_TYPE::UNDEFINED; ItemType = ITEM_TYPE::UNDEFINED;
Family = ITEMFAMILY::UNDEFINED; Family = ITEMFAMILY::UNDEFINED;
@ -173,6 +182,57 @@ void CItemSheet::build(const NLGEORGES::UFormElm &item)
debug("key '3d.shape_female' not found."); debug("key '3d.shape_female' not found.");
IdShapeFemale = ClientSheetsStrings.add(ShapeFemale); IdShapeFemale = ClientSheetsStrings.add(ShapeFemale);
// Load the name fyros.
string ShapeFyros;
if(!item.getValueByName(ShapeFyros, "3d.shape_fyros"))
debug("key '3d.shape_fyros' not found.");
IdShapeFyros = ClientSheetsStrings.add(ShapeFyros);
// Load the name fyros .
string ShapeFyrosFemale;
if(!item.getValueByName(ShapeFyrosFemale, "3d.shape_fyros_female"))
debug("key '3d.shape_fyros_female' not found.");
IdShapeFyrosFemale = ClientSheetsStrings.add(ShapeFyrosFemale);
// Load the name matis.
string ShapeMatis;
if(!item.getValueByName(ShapeMatis, "3d.shape_matis"))
debug("key '3d.shape_matis' not found.");
IdShapeMatis = ClientSheetsStrings.add(ShapeMatis);
// Load the name matis .
string ShapeMatisFemale;
if(!item.getValueByName(ShapeMatisFemale, "3d.shape_matis_female"))
debug("key '3d.shape_matis_female' not found.");
IdShapeMatisFemale = ClientSheetsStrings.add(ShapeMatisFemale);
// Load the name tryker.
string ShapeTryker;
if(!item.getValueByName(ShapeTryker, "3d.shape_tryker"))
debug("key '3d.shape_tryker' not found.");
IdShapeTryker = ClientSheetsStrings.add(ShapeTryker);
// Load the name tryker .
string ShapeTrykerFemale;
if(!item.getValueByName(ShapeTrykerFemale, "3d.shape_tryker_female"))
debug("key '3d.shape_tryker_female' not found.");
IdShapeTrykerFemale = ClientSheetsStrings.add(ShapeTrykerFemale);
// Load the name zorai.
string ShapeZorai;
if(!item.getValueByName(ShapeZorai, "3d.shape_zorai"))
debug("key '3d.shape_zorai' not found.");
IdShapeZorai = ClientSheetsStrings.add(ShapeZorai);
// Load the name zorai .
string ShapeZoraiFemale;
if(!item.getValueByName(ShapeZoraiFemale, "3d.shape_zorai_female"))
debug("key '3d.shape_zorai_female' not found.");
IdShapeZoraiFemale = ClientSheetsStrings.add(ShapeZoraiFemale);
// Get the icon associated. // Get the icon associated.
string IconMain; string IconMain;
if(!item.getValueByName (IconMain, "3d.icon")) if(!item.getValueByName (IconMain, "3d.icon"))
@ -615,6 +675,14 @@ void CItemSheet::serial(NLMISC::IStream &f)
{ {
ClientSheetsStrings.serial(f, IdShape); ClientSheetsStrings.serial(f, IdShape);
ClientSheetsStrings.serial(f, IdShapeFemale); ClientSheetsStrings.serial(f, IdShapeFemale);
ClientSheetsStrings.serial(f, IdShapeFyros);
ClientSheetsStrings.serial(f, IdShapeFyrosFemale);
ClientSheetsStrings.serial(f, IdShapeMatis);
ClientSheetsStrings.serial(f, IdShapeMatisFemale);
ClientSheetsStrings.serial(f, IdShapeTryker);
ClientSheetsStrings.serial(f, IdShapeTrykerFemale);
ClientSheetsStrings.serial(f, IdShapeZorai);
ClientSheetsStrings.serial(f, IdShapeZoraiFemale);
f.serial(SlotBF); // Serialize Slots used. f.serial(SlotBF); // Serialize Slots used.
f.serial(MapVariant); // Serialize Map Variant. f.serial(MapVariant); // Serialize Map Variant.
f.serialEnum(Family); // Serialize Family. f.serialEnum(Family); // Serialize Family.

@ -288,6 +288,22 @@ public:
NLMISC::TSStringId IdShape; NLMISC::TSStringId IdShape;
/// Female shape file name /// Female shape file name
NLMISC::TSStringId IdShapeFemale; NLMISC::TSStringId IdShapeFemale;
/// shape file name for fyros
NLMISC::TSStringId IdShapeFyros;
/// Female shape file name for fyros
NLMISC::TSStringId IdShapeFyrosFemale;
/// shape file name for matis
NLMISC::TSStringId IdShapeMatis;
/// Female shape file name for matis
NLMISC::TSStringId IdShapeMatisFemale;
/// shape file name for tryker
NLMISC::TSStringId IdShapeTryker;
/// Female shape file name for tryker
NLMISC::TSStringId IdShapeTrykerFemale;
/// shape file name for zorai
NLMISC::TSStringId IdShapeZorai;
/// Female shape file name for zorai
NLMISC::TSStringId IdShapeZoraiFemale;
/// Equipment slot. This is a bitField matching each bit to SLOTTYPE::TSlotType /// Equipment slot. This is a bitField matching each bit to SLOTTYPE::TSlotType
uint64 SlotBF; uint64 SlotBF;
/// texture variant. /// texture variant.
@ -385,6 +401,14 @@ public:
std::string getShape() const { return ClientSheetsStrings.get(IdShape); } std::string getShape() const { return ClientSheetsStrings.get(IdShape); }
std::string getShapeFemale() const { return ClientSheetsStrings.get(IdShapeFemale); } std::string getShapeFemale() const { return ClientSheetsStrings.get(IdShapeFemale); }
std::string getShapeFyros() const { return ClientSheetsStrings.get(IdShapeFyros); }
std::string getShapeFyrosFemale() const { return ClientSheetsStrings.get(IdShapeFyrosFemale); }
std::string getShapeMatis() const { return ClientSheetsStrings.get(IdShapeMatis); }
std::string getShapeMatisFemale() const { return ClientSheetsStrings.get(IdShapeMatisFemale); }
std::string getShapeTryker() const { return ClientSheetsStrings.get(IdShapeTryker); }
std::string getShapeTrykerFemale() const { return ClientSheetsStrings.get(IdShapeTrykerFemale); }
std::string getShapeZorai() const { return ClientSheetsStrings.get(IdShapeZorai); }
std::string getShapeZoraiFemale() const { return ClientSheetsStrings.get(IdShapeZoraiFemale); }
std::string getIconBack() const { return ClientSheetsStrings.get(IdIconBack); } std::string getIconBack() const { return ClientSheetsStrings.get(IdIconBack); }
std::string getIconMain() const { return ClientSheetsStrings.get(IdIconMain); } std::string getIconMain() const { return ClientSheetsStrings.get(IdIconMain); }
std::string getIconOver() const { return ClientSheetsStrings.get(IdIconOver); } std::string getIconOver() const { return ClientSheetsStrings.get(IdIconOver); }

@ -1386,7 +1386,7 @@ NLMISC_COMMAND(setItemName, "set name of items, sbrick, etc..","<sheet_id> <name
ucstring desc2; ucstring desc2;
if (args.size() > 2) if (args.size() > 2)
desc.fromUtf8(args[2]); desc.fromUtf8(args[2]);
if (args.size() > 2) if (args.size() > 3)
desc2.fromUtf8(args[3]); desc2.fromUtf8(args[3]);
STRING_MANAGER::CStringManagerClient *pSMC = STRING_MANAGER::CStringManagerClient::instance(); STRING_MANAGER::CStringManagerClient *pSMC = STRING_MANAGER::CStringManagerClient::instance();

@ -436,9 +436,45 @@ void SCharacter3DSetup::setupFromCS_ModelCol (SLOTTYPE::EVisualSlot s, sint32 mo
Parts[part].Quality = item->MapVariant; Parts[part].Quality = item->MapVariant;
if (Male) if (Male)
{
switch(People)
{
case EGSPD::CPeople::Fyros:
Parts[part].Name = item->getShapeFyros();
break;
case EGSPD::CPeople::Matis:
Parts[part].Name = item->getShapeMatis();
break;
case EGSPD::CPeople::Tryker:
Parts[part].Name = item->getShapeTryker();
break;
case EGSPD::CPeople::Zorai:
Parts[part].Name = item->getShapeZorai();
break;
}
if (Parts[part].Name.empty())
Parts[part].Name = item->getShape(); Parts[part].Name = item->getShape();
}
else else
{
switch(People)
{
case EGSPD::CPeople::Fyros:
Parts[part].Name = item->getShapeFyrosFemale();
break;
case EGSPD::CPeople::Matis:
Parts[part].Name = item->getShapeMatisFemale();
break;
case EGSPD::CPeople::Tryker:
Parts[part].Name = item->getShapeTrykerFemale();
break;
case EGSPD::CPeople::Zorai:
Parts[part].Name = item->getShapeZoraiFemale();
break;
}
if (Parts[part].Name.empty())
Parts[part].Name = item->getShapeFemale(); Parts[part].Name = item->getShapeFemale();
}
// use the right type of boots if wearing a caster dress // use the right type of boots if wearing a caster dress
if ((s == SLOTTYPE::FEET_SLOT) && (item->ItemType == ITEM_TYPE::LIGHT_BOOTS || item->ItemType == ITEM_TYPE::MEDIUM_BOOTS || item->ItemType == ITEM_TYPE::HEAVY_BOOTS)) if ((s == SLOTTYPE::FEET_SLOT) && (item->ItemType == ITEM_TYPE::LIGHT_BOOTS || item->ItemType == ITEM_TYPE::MEDIUM_BOOTS || item->ItemType == ITEM_TYPE::HEAVY_BOOTS))

@ -540,7 +540,48 @@ void CPlayerCL::equip(SLOTTYPE::EVisualSlot slot, uint index, uint color)
{ {
const CItemSheet *item = _Items[slot].Sheet; const CItemSheet *item = _Items[slot].Sheet;
std::string shapeName = _Gender == GSGENDER::female ? item->getShapeFemale():item->getShape(); std::string shapeName = "";
if(_Gender == GSGENDER::male)
{
switch(_PlayerSheet->People)
{
case EGSPD::CPeople::Fyros:
shapeName = item->getShapeFyros();
break;
case EGSPD::CPeople::Matis:
shapeName = item->getShapeMatis();
break;
case EGSPD::CPeople::Tryker:
shapeName = item->getShapeTryker();
break;
case EGSPD::CPeople::Zorai:
shapeName = item->getShapeZorai();
break;
}
}
else
{
switch(_PlayerSheet->People)
{
case EGSPD::CPeople::Fyros:
shapeName = item->getShapeFyrosFemale();
break;
case EGSPD::CPeople::Matis:
shapeName = item->getShapeMatisFemale();
break;
case EGSPD::CPeople::Tryker:
shapeName = item->getShapeTrykerFemale();
break;
case EGSPD::CPeople::Zorai:
shapeName = item->getShapeZoraiFemale();
break;
}
if (shapeName.empty())
shapeName = item->getShapeFemale();
}
if (shapeName.empty())
shapeName = item->getShape();
// use the right type of boots if wearing a caster dress // use the right type of boots if wearing a caster dress
if ((slot == SLOTTYPE::FEET_SLOT) && (item->ItemType == ITEM_TYPE::LIGHT_BOOTS || item->ItemType == ITEM_TYPE::MEDIUM_BOOTS || item->ItemType == ITEM_TYPE::HEAVY_BOOTS)) if ((slot == SLOTTYPE::FEET_SLOT) && (item->ItemType == ITEM_TYPE::LIGHT_BOOTS || item->ItemType == ITEM_TYPE::MEDIUM_BOOTS || item->ItemType == ITEM_TYPE::HEAVY_BOOTS))

Loading…
Cancel
Save