// Ryzom - MMORPG Framework
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
#ifndef RY_ITEM_INFOS_H
#define RY_ITEM_INFOS_H
#include "nel/misc/types_nl.h"
#include "damage_types.h"
#include "protection_type.h"
#include "people.h"
#include "skills.h"
#include "characteristics.h"
#include "sphrase_com.h"
#include "type_skill_mod.h"
///\structure defining the protection of an item
struct SProtection
{
inline SProtection():Factor(0.0f),Max(0){}
void serial( NLMISC::IStream & f )
{
f.serial( Factor );
f.serial( Max );
}
/// protection factor ( must be in [0..1] range 0 means no protection)
float Factor;
/// max absorbed damage
uint16 Max;
};
/**
* class used to store the item advanced infos and to send it to the client
* \author Nicolas Brigand
* \author Nevrax France
* \date 2003
*/
class CItemInfos
{
public:
enum
{
// The number of bits of the lower bits part (the index part)
// 10 because the trading list can have 1024 entries
SlotIdIndexBitSize= 11,
SlotIdIndexBitMask= (1< TypeSkillMods;
// magic focus factor
enum TMagicFactorType
{
OffensiveElemental=0, // elemental spells (DD acid, fire...)
OffensiveAffliction, // offensive affliction spells
DefensiveHeal, // heal spells
DefensiveAffliction, // defensive affliction spells
NumMagicFactorType
};
float CastingSpeedFactor[NumMagicFactorType];
float MagicPowerFactor[NumMagicFactorType];
CSPhraseCom Enchantment;
float WearEquipmentMalus; // Malus for wearing this equipment (malus is used when execute an magic, forage action, craft action...), malus is only applicable for weapon and armor pieces
ucstring CustomText;
ucstring R2ItemDescription;
ucstring R2ItemComment;
//@}
};
#endif // RY_ITEM_INFOS_H
/* End of item_infos.h */