mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-03 23:56:43 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			61 lines
		
	
	
	
		
			1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			61 lines
		
	
	
	
		
			1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
#ifndef _ESM_WEAP_H
 | 
						|
#define _ESM_WEAP_H
 | 
						|
 | 
						|
#include "esm_reader.hpp"
 | 
						|
 | 
						|
namespace ESM
 | 
						|
{
 | 
						|
 | 
						|
/*
 | 
						|
 * Weapon definition
 | 
						|
 */
 | 
						|
 | 
						|
struct Weapon
 | 
						|
{
 | 
						|
    enum Type
 | 
						|
    {
 | 
						|
        ShortBladeOneHand = 0,
 | 
						|
        LongBladeOneHand = 1,
 | 
						|
        LongBladeTwoHand = 2,
 | 
						|
        BluntOneHand = 3,
 | 
						|
        BluntTwoClose = 4,
 | 
						|
        BluntTwoWide = 5,
 | 
						|
        SpearTwoWide = 6,
 | 
						|
        AxeOneHand = 7,
 | 
						|
        AxeTwoHand = 8,
 | 
						|
        MarksmanBow = 9,
 | 
						|
        MarksmanCrossbow = 10,
 | 
						|
        MarksmanThrown = 11,
 | 
						|
        Arrow = 12,
 | 
						|
        Bolt = 13
 | 
						|
    };
 | 
						|
 | 
						|
    enum Flags
 | 
						|
    {
 | 
						|
        Magical = 0x01,
 | 
						|
        Silver = 0x02
 | 
						|
    };
 | 
						|
 | 
						|
#pragma pack(push)
 | 
						|
#pragma pack(1)
 | 
						|
    struct WPDTstruct
 | 
						|
    {
 | 
						|
        float weight;
 | 
						|
        int value;
 | 
						|
        short type;
 | 
						|
        short health;
 | 
						|
        float speed, reach;
 | 
						|
        short enchant; // Enchantment points
 | 
						|
        unsigned char chop[2], slash[2], thrust[2]; // Min and max
 | 
						|
        int flags;
 | 
						|
    }; // 32 bytes
 | 
						|
#pragma pack(pop)
 | 
						|
 | 
						|
    WPDTstruct data;
 | 
						|
 | 
						|
    std::string name, model, icon, enchant, script;
 | 
						|
 | 
						|
    void load(ESMReader &esm);
 | 
						|
};
 | 
						|
}
 | 
						|
#endif
 |