#pragma once
#include "MyTypeDef.h"
#include "RoleData/RoleDataEx.h"
#include "GlobalDef.h"
#include <vector>
#include <SmallObj/SmallObj.h>
#include <string>
using namespace std;

//----------------------------------------------------------------------------------------

class Global
{
    
public:
    static RoleValueData        ValueCal;
    static BaseAbilityStruct    Ability;
    static AccountInfoStruct    AccountInfo;
    static vector< string >     RaceName;
    static vector< string >     JobName;
    static vector< string >     SexName;
    static vector< string >     ZoneName;

    static vector< string >     PointEnumName;				//法術參考點
    static vector< string >     MotionEnumName;				//動作
    static MutilThread_CritSect CritSect;
	static int					MonsterMoney[ 200 ][ 3 ];	//0 Base 1 一般怪Rand  2精英怪Rand

	static char*				GetIniString( char* Key );
	static int					GetIniValue( char* Key, int iDefaultVal );

	static char*				GetDBSource( );
	static char*				GetGlobalDBSource( );
	static int					LanguageSetting( );

	static int					GetDirVersionID();
	static int					GetStringDirTagID();
	static int					GetDirTagID();

	static string				IniRootPath;

	static vector< NPCStrongArgStruct >			NpcStrongArg;

	static vector<float>		BaseMagicPower;
	static vector<float>		MagicPowerGrowRate;

	static vector<int>			AbilityPoint;				//參考數值表
	static vector<int>			DefPoint;					//參考數值表
	static vector<int>			HitPoint;					//參考數值表

	static string				DBSource;
	static string				DataBase;

	//編碼
	static char* EncodePassword		( const char* Password , const char* Key );
	//解碼
	static char* DecodePassword		( const char* Password , const char* Key );
	//MD5編碼
	static char* MD5EncodePassword	( const char* Password , const char* Key );

	static string				GetDataPath();
};




