local TraceFrame = DEFAULT_CHAT_FRAME;

--			[3] classe		= "normal" ou "rare" ou "elite" ou "rareelite" ou "worldboss"
--			[4] famille		= "Crab" "Bear" "Wolf" etc

--	[1]		-- niveaux
--		[diff]	-- difficulté de l'instance
--			[80]
--				[1] = date quand vu ce niveau
--				[2]	=	dégats minimum
--				[3]	=	dégats maximum
--				[4]	=	armure
--				[5]	=	pdvmax
--	[2]		= date quand vu elite
--	[3]	=	type de créature/pnj = Bestiole, Humanoïde etc
--	[4]	=	domptable : ( nil = inconnu, 0 = indomptable, 1 = domptable, 2 = exotique
--	[5]	=	régime
--	[6]	=	technique
--	[7]	=	dépeçable				date
--	[8]	=	type non spécifié			date
--	[9]	=	date quand vu boss
--	[10]	=	famille = crabe etc
--	[11]	=	classification = trivial, normal, rare, elite, eliterare, worldboss
--	[12]	=	Requiert Minage			date
--	[13]	=	Requiert Herboristerie		date
--	[14]	=	Requiert Ingénierie		date
--	[15]	=	marchand				date
--	[16]	=	réparateur				date
--	[17]	=	banquier				date
--	[18]	=	pnj de quete			date
--	[19]	=	griffon				date								Maître des griffons
--	[20]	=	JcJ					date
--	[21]	=	faction				nil	=0	Alliance	=1	Horde	=2
--	[22]	=	faire les poches			non = 0	oui = 1
--	[23]	=	hdv					date
--	[24]	=	c'est un entraineur		tableau
--	[25]	=	aubergiste				date
--	[26]	=	maître de classe
--			{}
--				1	=	date		--	chaman
--	[27]	=	écurie				date
--	[28]	=	portail				date
--	[29]	=	guildes				date
--	[30]	=	dock					date
--	[31]	=	zeppelins				date
--	[32]	=	griffon alliance			date
--	[33]	=	griffon horde			date
--	[34]	=	maître des familiers		date

local DBCS_mobs_detail_wow_build;
local DBCS_mobs_detail_wow_build_live = 13623;
--
_, DBCS_mobs_detail_wow_build, _, _ = GetBuildInfo();
DBCS_mobs_detail_wow_build = tonumber(DBCS_mobs_detail_wow_build);

--/script DBCS_mobs_detail[45103] = nil;

local DBCS_mobs_detail_inumPNJ = 0;
local DBCS_mobs_detail_inumPNJ_max = 75000;	--70000;	--65000;	--60000;	--55000;	--50000;		--45000;
local DBCS_mobs_detail_inumPNJ_time = 0;
local DBCS_mobs_detail_inumPNJ_code = 1;

local i;
local j;

--TAMEABLE = "Domptable";
--TAMEABLE_EXOTIC = "Domptable (exotique)";
--UNIT_SKINNABLE_BOLTS = "Requiert Ingénierie";
--UNIT_SKINNABLE_HERB = "Requiert herboristerie";
--UNIT_SKINNABLE_LEATHER = "Dépeçable";
--UNIT_SKINNABLE_ROCK = "Requiert minage";

DBCS_mobs_detail_tableau_classe = {};
DBCS_mobs_detail_tableau_classe[1] = "chamans";
DBCS_mobs_detail_tableau_classe[2] = "chasseurs";
DBCS_mobs_detail_tableau_classe[3] = "d\195\169monistes";
DBCS_mobs_detail_tableau_classe[4] = "druides";
DBCS_mobs_detail_tableau_classe[5] = "guerriers";
DBCS_mobs_detail_tableau_classe[6] = "mages";
DBCS_mobs_detail_tableau_classe[7] = "paladins";
DBCS_mobs_detail_tableau_classe[8] = "pr\195\170tres";
DBCS_mobs_detail_tableau_classe[9] = "voleurs";
DBCS_mobs_detail_tableau_classe[10] = "chevaliers de la mort";
DBCS_mobs_detail_tableau_classe[11] = "moines";
DBCS_mobs_detail_tableau_classe_inverse = {};
for i = 1 , table.getn(DBCS_mobs_detail_tableau_classe) do
	DBCS_mobs_detail_tableau_classe_inverse[DBCS_mobs_detail_tableau_classe[i]] = i;
end

DBCS_mobs_detail_tableau_type = {};
DBCS_mobs_detail_tableau_type[0] = "Cadavre";
DBCS_mobs_detail_tableau_type[1] = "B\195\170te";
DBCS_mobs_detail_tableau_type[2] = "D\195\169mon";
DBCS_mobs_detail_tableau_type[3] = "Draconien";
DBCS_mobs_detail_tableau_type[4] = "El\195\169mentaire";
DBCS_mobs_detail_tableau_type[5] = "G\195\169ant";
DBCS_mobs_detail_tableau_type[6] = "Humano\195\175de";
DBCS_mobs_detail_tableau_type[7] = "Machine";
DBCS_mobs_detail_tableau_type[8] = "Mort-vivant";
DBCS_mobs_detail_tableau_type[9] = "Non sp\195\169cifi\195\169";
DBCS_mobs_detail_tableau_type[10] = "Totem";
DBCS_mobs_detail_tableau_type[11] = "Bestiole";
DBCS_mobs_detail_tableau_type[12] = "Familier pacifique";
DBCS_mobs_detail_tableau_type[13] = "Mascotte pacifique";
DBCS_mobs_detail_tableau_type[14] = "Mascotte sauvage";
--DBCS_mobs_detail_tableau_type[13] = "Gas Cloud";
DBCS_mobs_detail_tableau_type_inverse = {};
for i = 0 , table.getn(DBCS_mobs_detail_tableau_type) do
	DBCS_mobs_detail_tableau_type_inverse[DBCS_mobs_detail_tableau_type[i]] = i;
end

DBCS_mobs_detail_tableau_nourriture = {};
DBCS_mobs_detail_tableau_nourriture[4] = "Champignon";
DBCS_mobs_detail_tableau_nourriture[6] = "Fromage";
DBCS_mobs_detail_tableau_nourriture[3] = "Fruit";
DBCS_mobs_detail_tableau_nourriture[5] = "Pain";
DBCS_mobs_detail_tableau_nourriture[2] = "Poisson";
DBCS_mobs_detail_tableau_nourriture[1] = "Viande";
DBCS_mobs_detail_tableau_nourriture_inverse = {};
for i = 1 , table.getn(DBCS_mobs_detail_tableau_nourriture) do
	DBCS_mobs_detail_tableau_nourriture_inverse[DBCS_mobs_detail_tableau_nourriture[i]] = i;
end
DBCS_mobs_detail_tableau_nourriture_alpha = {};
DBCS_mobs_detail_tableau_nourriture_alpha[1] = 4;
DBCS_mobs_detail_tableau_nourriture_alpha[2] = 6;
DBCS_mobs_detail_tableau_nourriture_alpha[3] = 3;
DBCS_mobs_detail_tableau_nourriture_alpha[4] = 5;
DBCS_mobs_detail_tableau_nourriture_alpha[5] = 2;
DBCS_mobs_detail_tableau_nourriture_alpha[6] = 1;

DBCS_mobs_detail_tableau_technique = {};
DBCS_mobs_detail_tableau_technique[7] = "Arracher l'arme";
DBCS_mobs_detail_tableau_technique[8] = "Balayage";
DBCS_mobs_detail_tableau_technique[9] = "Carapace bouclier";
DBCS_mobs_detail_tableau_technique[10] = "Clouer sur place";
DBCS_mobs_detail_tableau_technique[5] = "Coup de patte";
DBCS_mobs_detail_tableau_technique[11] = "Crachat acide";
DBCS_mobs_detail_tableau_technique[12] = "Crachat de poison";
DBCS_mobs_detail_tableau_technique[13] = "D\195\169chirure du tendon";
DBCS_mobs_detail_tableau_technique[14] = "D\195\169flagration sonore";
DBCS_mobs_detail_tableau_technique[3] = "D\195\169robade";
DBCS_mobs_detail_tableau_technique[15] = "Distorsion";
DBCS_mobs_detail_tableau_technique[16] = "Encorner";
DBCS_mobs_detail_tableau_technique[17] = "Frappe spirituelle";
DBCS_mobs_detail_tableau_technique[18] = "Griffe";
DBCS_mobs_detail_tableau_technique[19] = "Griffure";
DBCS_mobs_detail_tableau_technique[4] = "Grondement";
DBCS_mobs_detail_tableau_technique[20] = "Grondeterre";
DBCS_mobs_detail_tableau_technique[21] = "Horion de N\195\169ant";
DBCS_mobs_detail_tableau_technique[22] = "Hurlement d\195\169moralisant";
DBCS_mobs_detail_tableau_technique[2] = "Hurlement furieux";
DBCS_mobs_detail_tableau_technique[23] = "Jet de toiles venimeuses";
DBCS_mobs_detail_tableau_technique[24] = "Mauvaises mani\195\168res";
DBCS_mobs_detail_tableau_technique[1] = "Morsure";
DBCS_mobs_detail_tableau_technique[25] = "Morsure monstrueuse";
DBCS_mobs_detail_tableau_technique[26] = "Nuage de poussi\195\168re";
DBCS_mobs_detail_tableau_technique[27] = "Nuage de spores";
DBCS_mobs_detail_tableau_technique[28] = "Piq\195\187re";
DBCS_mobs_detail_tableau_technique[29] = "Poison de scorpide";
DBCS_mobs_detail_tableau_technique[30] = "Poudre de s\195\169r\195\169nit\195\169";
DBCS_mobs_detail_tableau_technique[31] = "Pourfendeur sauvage";
DBCS_mobs_detail_tableau_technique[32] = "Ravage";
DBCS_mobs_detail_tableau_technique[33] = "Rets";
DBCS_mobs_detail_tableau_technique[34] = "R\195\180der";
DBCS_mobs_detail_tableau_technique[6] = "Ru\195\169e";
DBCS_mobs_detail_tableau_technique[35] = "Souffle de feu";
DBCS_mobs_detail_tableau_technique[36] = "Souffle de foudre";
DBCS_mobs_detail_tableau_technique[37] = "Souffle de lave";
DBCS_mobs_detail_tableau_technique[38] = "Souffle de temp\195\170te-de-givre";
DBCS_mobs_detail_tableau_technique_inverse = {};
for i = 1 , table.getn(DBCS_mobs_detail_tableau_technique) do
	DBCS_mobs_detail_tableau_technique_inverse[DBCS_mobs_detail_tableau_technique[i]] = i;
end
DBCS_mobs_detail_tableau_technique_alpha = {};
DBCS_mobs_detail_tableau_technique_alpha[1] = 7;
DBCS_mobs_detail_tableau_technique_alpha[2] = 8;
DBCS_mobs_detail_tableau_technique_alpha[3] = 9;
DBCS_mobs_detail_tableau_technique_alpha[4] = 10;
DBCS_mobs_detail_tableau_technique_alpha[5] = 5;
DBCS_mobs_detail_tableau_technique_alpha[6] = 11;
DBCS_mobs_detail_tableau_technique_alpha[7] = 12;
DBCS_mobs_detail_tableau_technique_alpha[8] = 13;
DBCS_mobs_detail_tableau_technique_alpha[9] = 14;
DBCS_mobs_detail_tableau_technique_alpha[10] = 3;
DBCS_mobs_detail_tableau_technique_alpha[11] = 15;
DBCS_mobs_detail_tableau_technique_alpha[12] = 16;
DBCS_mobs_detail_tableau_technique_alpha[13] = 17;
DBCS_mobs_detail_tableau_technique_alpha[14] = 18;
DBCS_mobs_detail_tableau_technique_alpha[15] = 19;
DBCS_mobs_detail_tableau_technique_alpha[16] = 4;
DBCS_mobs_detail_tableau_technique_alpha[17] = 20;
DBCS_mobs_detail_tableau_technique_alpha[18] = 21;
DBCS_mobs_detail_tableau_technique_alpha[19] = 22;
DBCS_mobs_detail_tableau_technique_alpha[20] = 2;
DBCS_mobs_detail_tableau_technique_alpha[21] = 23;
DBCS_mobs_detail_tableau_technique_alpha[22] = 24;
DBCS_mobs_detail_tableau_technique_alpha[23] = 1;
DBCS_mobs_detail_tableau_technique_alpha[24] = 25;
DBCS_mobs_detail_tableau_technique_alpha[25] = 26;
DBCS_mobs_detail_tableau_technique_alpha[26] = 27;
DBCS_mobs_detail_tableau_technique_alpha[27] = 28;
DBCS_mobs_detail_tableau_technique_alpha[28] = 29;
DBCS_mobs_detail_tableau_technique_alpha[29] = 30;
DBCS_mobs_detail_tableau_technique_alpha[30] = 31;
DBCS_mobs_detail_tableau_technique_alpha[31] = 32;
DBCS_mobs_detail_tableau_technique_alpha[32] = 33;
DBCS_mobs_detail_tableau_technique_alpha[33] = 34;
DBCS_mobs_detail_tableau_technique_alpha[34] = 6;
DBCS_mobs_detail_tableau_technique_alpha[35] = 35;
DBCS_mobs_detail_tableau_technique_alpha[36] = 36;
DBCS_mobs_detail_tableau_technique_alpha[37] = 37;
DBCS_mobs_detail_tableau_technique_alpha[38] = 38;
	
DBCS_mobs_detail_tableau_famille = {};
DBCS_mobs_detail_tableau_famille[1] = "Araign\195\169e";
DBCS_mobs_detail_tableau_famille[2] = "Charognard";
DBCS_mobs_detail_tableau_famille[3] = "Chauve-souris";
DBCS_mobs_detail_tableau_famille[4] = "Chien du Magma";
DBCS_mobs_detail_tableau_famille[5] = "Chim\195\168re";
DBCS_mobs_detail_tableau_famille[6] = "Crabe";
DBCS_mobs_detail_tableau_famille[7] = "Crocilisque";
DBCS_mobs_detail_tableau_famille[8] = "Diablosaure";
DBCS_mobs_detail_tableau_famille[9] = "Esprit de b\195\170te";
DBCS_mobs_detail_tableau_famille[10] = "Faucon-dragon";
DBCS_mobs_detail_tableau_famille[11] = "F\195\169lin";
DBCS_mobs_detail_tableau_famille[12] = "Gorille";
DBCS_mobs_detail_tableau_famille[13] = "Gu\195\170pe";
DBCS_mobs_detail_tableau_famille[14] = "Haut-trotteur";
DBCS_mobs_detail_tableau_famille[15] = "Hy\195\168ne";
DBCS_mobs_detail_tableau_famille[16] = "Loup";
DBCS_mobs_detail_tableau_famille[17] = "Oiseau de proie";
DBCS_mobs_detail_tableau_famille[18] = "Ours";
DBCS_mobs_detail_tableau_famille[19] = "Phal\195\168ne";
DBCS_mobs_detail_tableau_famille[20] = "Raie du N\195\169ant";
DBCS_mobs_detail_tableau_famille[21] = "Raptor";
DBCS_mobs_detail_tableau_famille[22] = "Ravageur";
DBCS_mobs_detail_tableau_famille[23] = "Rhinoc\195\169ros";
DBCS_mobs_detail_tableau_famille[24] = "Sanglier";
DBCS_mobs_detail_tableau_famille[25] = "Scorpide";
DBCS_mobs_detail_tableau_famille[26] = "Serpent";
DBCS_mobs_detail_tableau_famille[27] = "Serpent des vents";
DBCS_mobs_detail_tableau_famille[28] = "Silithide";
DBCS_mobs_detail_tableau_famille[29] = "Sporopt\195\168re";
DBCS_mobs_detail_tableau_famille[30] = "Tortue";
DBCS_mobs_detail_tableau_famille[31] = "Traqueur dim.";
DBCS_mobs_detail_tableau_famille[32] = "Ver";

--[[
DBCS_mobs_detail_tableau_famille[0] = "Doomguard";
DBCS_mobs_detail_tableau_famille[0] = "Felguard";
DBCS_mobs_detail_tableau_famille[0] = "Felhunter";
DBCS_mobs_detail_tableau_famille[0] = "Ghoul";
DBCS_mobs_detail_tableau_famille[0] = "Imp";
DBCS_mobs_detail_tableau_famille[0] = "Remote Control";
DBCS_mobs_detail_tableau_famille[0] = "Succubus";
DBCS_mobs_detail_tableau_famille[0] = "Voidwalker";
DBCS_mobs_detail_tableau_famille[0] = "Warp Stalker";
--]]

DBCS_mobs_detail_tableau_famille_inverse = {};
for i = 1 , table.getn(DBCS_mobs_detail_tableau_famille) do
	DBCS_mobs_detail_tableau_famille_inverse[DBCS_mobs_detail_tableau_famille[i]] = i;
end

DBCS_mobs_detail_tableau_classification = {};
DBCS_mobs_detail_tableau_classification[1] = "trivial";
DBCS_mobs_detail_tableau_classification[2] = "normal";
DBCS_mobs_detail_tableau_classification[3] = "rare";
DBCS_mobs_detail_tableau_classification[4] = "elite";
DBCS_mobs_detail_tableau_classification[5] = "rareelite";
DBCS_mobs_detail_tableau_classification[6] = "worldboss";
DBCS_mobs_detail_tableau_classification_inverse = {};
for i = 1 , table.getn(DBCS_mobs_detail_tableau_classification) do
	DBCS_mobs_detail_tableau_classification_inverse[DBCS_mobs_detail_tableau_classification[i]] = i;
end

DBCS_mobs_detail_tableau_metier = {};
DBCS_mobs_detail_tableau_metier[1] = { index = 1, name = "alchimie", [1] = 2259, [2] = 3101, [3] = 3464, [4] = 11611, [5] = 28596, [6] = 51304 };
DBCS_mobs_detail_tableau_metier[2] = { index = 2, name = "calligraphie", [1] = 45357, [2] = 45358, [3] = 45359, [4] = 45360, [5] = 45361, [6] = 45363 };
DBCS_mobs_detail_tableau_metier[3] = { index = 3, name = "couture", [1] = 3908, [2] = 3909, [3] = 3910, [4] = 12180, [5] = 26790, [6] = 51309 };
DBCS_mobs_detail_tableau_metier[4] = { index = 4, name = "cuisine", [1] = 2550, [2] = 3102, [3] = 3413, [4] = 18260, [5] = 33359, [6] = 51296 };
DBCS_mobs_detail_tableau_metier[5] = { index = 5, name = "d\195\169pe\195\167age", [1] = 8613, [2] = 8617, [3] = 8618, [4] = 10768, [5] = 32678, [6] = 50305 };
DBCS_mobs_detail_tableau_metier[6] = { index = 6, name = "enchantement", [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0, [6] = 51313 };
DBCS_mobs_detail_tableau_metier[7] = { index = 7, name = "forge", [1] = 2018, [2] = 3100, [3] = 3538, [4] = 9785, [5] = 29844, [6] = 51300 };
DBCS_mobs_detail_tableau_metier[8] = { index = 8, name = "herboristerie", [1] = 2366, [2] = 2368, [3] = 3570, [4] = 11993, [5] = 28695, [6] = 50300 };
DBCS_mobs_detail_tableau_metier[9] = { index = 9, name = "ing\195\169nierie", [1] = 4036, [2] = 4037, [3] = 4038, [4] = 12656, [5] = 30350, [6] = 51306 };
DBCS_mobs_detail_tableau_metier[10] = { index = 10, name = "joaillerie", [1] = 25229, [2] = 25230, [3] = 28894, [4] = 28895, [5] = 28897, [6] = 51311 };
DBCS_mobs_detail_tableau_metier[11] = { index = 11, name = "minage", [1] = 2575, [2] = 2576, [3] = 3564, [4] = 10248, [5] = 29354, [6] = 50310 };
DBCS_mobs_detail_tableau_metier[12] = { index = 12, name = "p\195\170che", [1] = 7620, [2] = 7731, [3] = 7732, [4] = 18248, [5] = 33095, [6] = 51294 };
DBCS_mobs_detail_tableau_metier[13] = { index = 13, name = "secourisme", [1] = 3273, [2] = 3274, [3] = 7924, [4] = 10846, [5] = 27028, [6] = 45542 };
DBCS_mobs_detail_tableau_metier[14] = { index = 14, name = "travail du cuir", [1] = 2108, [2] = 3104, [3] = 3811, [4] = 10662, [5] = 32549, [6] = 51302 };
DBCS_mobs_detail_tableau_metier[15] = { index = 15, name = "arch\195\169ologie", [1] = 000, [2] = 000, [3] = 000, [4] = 000, [5] = 000, [6] = 000 };
DBCS_mobs_detail_tableau_metier_inverse = {};
for i = 1 , table.getn(DBCS_mobs_detail_tableau_metier) do
	for j = 1 , table.getn(DBCS_mobs_detail_tableau_metier[i]) do
		DBCS_mobs_detail_tableau_metier_inverse[DBCS_mobs_detail_tableau_metier[i][j]] = {};
		DBCS_mobs_detail_tableau_metier_inverse[DBCS_mobs_detail_tableau_metier[i][j]][1] = DBCS_mobs_detail_tableau_metier[i].index;	--	index du métier
		DBCS_mobs_detail_tableau_metier_inverse[DBCS_mobs_detail_tableau_metier[i][j]][2] = j;											--	rang du métier
	end
end

DBCS_mobs_detail_tableau_metier_maitre = {};
DBCS_mobs_detail_tableau_metier_maitre[1] = { index = 1, name = "alchimistes" };
DBCS_mobs_detail_tableau_metier_maitre[2] = { index = 2, name = "calligraphes" };
DBCS_mobs_detail_tableau_metier_maitre[3] = { index = 3, name = "tailleurs" };
DBCS_mobs_detail_tableau_metier_maitre[4] = { index = 4, name = "cuisiniers" };
DBCS_mobs_detail_tableau_metier_maitre[5] = { index = 5, name = "d\195\169peceurs" };
DBCS_mobs_detail_tableau_metier_maitre[6] = { index = 6, name = "enchanteurs" };
DBCS_mobs_detail_tableau_metier_maitre[7] = { index = 7, name = "forgerons" };
DBCS_mobs_detail_tableau_metier_maitre[8] = { index = 8, name = "herboristes" };
DBCS_mobs_detail_tableau_metier_maitre[9] = { index = 9, name = "ing\195\169nieurs" };
DBCS_mobs_detail_tableau_metier_maitre[10] = { index = 10, name = "joailliers" };				--à vérifier
DBCS_mobs_detail_tableau_metier_maitre[11] = { index = 11, name = "mineurs" };
DBCS_mobs_detail_tableau_metier_maitre[12] = { index = 12, name = "p\195\170cheurs" };
DBCS_mobs_detail_tableau_metier_maitre[13] = { index = 13, name = "secouristes" };
DBCS_mobs_detail_tableau_metier_maitre[14] = { index = 14, name = "travailleurs du cuir" };
DBCS_mobs_detail_tableau_metier_maitre[15] = { index = 15, name = "ing\195\169nieurs gnomes" };
DBCS_mobs_detail_tableau_metier_maitre[16] = { index = 16, name = "ing\195\169nieurs gobelins" };
DBCS_mobs_detail_tableau_metier_maitre[17] = { index = 17, name = "fabricants d'armes" };
DBCS_mobs_detail_tableau_metier_maitre[18] = { index = 18, name = "fabricants d'armure" };
DBCS_mobs_detail_tableau_metier_maitre[19] = { index = 19, name = "travailleurs du cuir \195\169l\195\169mentaire" };
DBCS_mobs_detail_tableau_metier_maitre[20] = { index = 20, name = "travailleurs du cuir d'\195\169cailles de dragon" };
DBCS_mobs_detail_tableau_metier_maitre[21] = { index = 21, name = "travailleurs du cuir tribal" };
DBCS_mobs_detail_tableau_metier_maitre[22] = { index = 22, name = "arch\195\169ologues" };
DBCS_mobs_detail_tableau_metier_maitre_inverse = {};
for i = 1 , table.getn(DBCS_mobs_detail_tableau_metier_maitre) do
	DBCS_mobs_detail_tableau_metier_maitre_inverse[DBCS_mobs_detail_tableau_metier_maitre[i].name] = DBCS_mobs_detail_tableau_metier_maitre[i].index;
end

function DBCS_mobs_detail_OnLoad(self)

	self:RegisterEvent("AUCTION_HOUSE_SHOW");
	self:RegisterEvent("BANKFRAME_OPENED");
	self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
	self:RegisterEvent("QUEST_COMPLETE");
	self:RegisterEvent("QUEST_DETAIL");
	self:RegisterEvent("QUEST_GREETING");
	self:RegisterEvent("QUEST_PROGRESS");
	self:RegisterEvent("MERCHANT_SHOW");
	self:RegisterEvent("PLAYER_TARGET_CHANGED");
	--self:RegisterEvent("TAXIMAP_OPENED");	--	à réparer, fonction disparue
	self:RegisterEvent("CRAFT_SHOW");
	self:RegisterEvent("TRADE_SKILL_SHOW");
	self:RegisterEvent("TRAINER_SHOW");
	self:RegisterEvent("UI_ERROR_MESSAGE");
	self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED");
	self:RegisterEvent("UPDATE_MOUSEOVER_UNIT");
	self:RegisterEvent("VARIABLES_LOADED");

	--DBCS_mobs_detail = {};
	DBCS_mobs_detail_config = {};

end

function DBCS_mobs_detail_OnEvent(self,event,...)

local sGUID_7_10;
local iGUID_7_10;
local sGUID;
local smot_tout;
local snom;
local snom2;
local idate;
local irepair;
local inb;
local i;
local slink;
local sname;
local srank;
local scategory;
local sexpanded;
local sspell;
local srang;
local iid;
local sfaction;
local iindexmetier;
local irangmetier;

local arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20 = ...;

local val3,val4,val6,val7;

	if ( event == "" ) then
	elseif ( event == "AUCTION_HOUSE_SHOW" ) then
		sGUID = UnitGUID("target");
		snom2 = UnitName("target");
		if ( sGUID and snom2 ) then
			--if ( DBCS_mobs_detail_wow_build > DBCS_mobs_detail_wow_build_live ) then
				sGUID_7_10 = strsub(sGUID,6,10);
			--else
			--	sGUID_7_10 = strsub(sGUID,9,12);
			--end
			iGUID_7_10 = tonumber(sGUID_7_10,16);
			if ( DBCS_mobs_detail[iGUID_7_10] == nil ) then
				DBCS_mobs_detail[iGUID_7_10] = {};
			end
			idate = tonumber(date("%Y%m%d"));
			if ( DBCS_mobs_detail[iGUID_7_10][23] == nil ) then
if ( DBCS_debug and DBCS_debug > 1 ) then
TraceFrame:AddMessage("c'est un hdv");
end
			end
			DBCS_mobs_detail[iGUID_7_10][23] = idate;
			if ( DBCS_prog_serveur == 0 ) then
				DBCS_mobs_detail_Client[iGUID_7_10] = DBCS_mobs_detail[iGUID_7_10];
			end
		end
	elseif ( event == "BANKFRAME_OPENED" ) then
		sGUID = UnitGUID("target");
		snom2 = UnitName("target");
		snom = BankFrameTitleText:GetText();
		if ( sGUID and ( snom == snom2 ) ) then
			--if ( DBCS_mobs_detail_wow_build > DBCS_mobs_detail_wow_build_live ) then
				sGUID_7_10 = strsub(sGUID,6,10);
			--else
			--	sGUID_7_10 = strsub(sGUID,9,12);
			--end
			iGUID_7_10 = tonumber(sGUID_7_10,16);
			if ( DBCS_mobs_detail[iGUID_7_10] == nil ) then
				DBCS_mobs_detail[iGUID_7_10] = {};
			end
			idate = tonumber(date("%Y%m%d"));
			if ( DBCS_mobs_detail[iGUID_7_10][17] == nil ) then
if ( DBCS_debug and DBCS_debug > 1 ) then
TraceFrame:AddMessage("c'est une banque");
end
			end
			DBCS_mobs_detail[iGUID_7_10][17] = idate;
			if ( DBCS_prog_serveur == 0 ) then
				DBCS_mobs_detail_Client[iGUID_7_10] = DBCS_mobs_detail[iGUID_7_10];
			end
		end
	elseif ( event == "COMBAT_LOG_EVENT_UNFILTERED" ) then
		if ( InCombatLockdown() ) then
			return nil;
		end
		if ( DBCS_mobs_detail_wow_build > DBCS_mobs_detail_wow_build_live ) then
			val3 = arg4;
			val4 = arg5;
			val6 = arg7;
			val7 = arg8;
		else
			val3 = arg3;
			val4 = arg4;
			val6 = arg6;
			val7 = arg7;
		end
		sGUID = nil;
		if ( val4 and val3 and ( strsub(val3,1,5) == "0xF13" or strsub(val3,1,5) == "0xF15" or strsub(val3,1,5) == "0xF53" or strsub(val3,1,5) == "0xF55" ) ) then
			sGUID = val3;
		end
		if ( sGUID ) then
			smot_tout = "unit:"..sGUID..":bla";
			DBCS_mobs_detail_TooltipTextLeft1:SetText(nil);
			DBCS_mobs_detail_Tooltip:SetOwner(WorldFrame,"ANCHOR_NONE");
			DBCS_mobs_detail_Tooltip:SetHyperlink(smot_tout);
			DBCS_mobs_detail_tooltip(sGUID);
		end
		sGUID = nil;
		if ( val7 and val6 and ( strsub(val6,1,5) == "0xF13" or strsub(val6,1,5) == "0xF15" or strsub(val6,1,5) == "0xF53" or strsub(val6,1,5) == "0xF55" ) ) then
			sGUID = val6;
		end
		if ( sGUID ) then
			smot_tout = "unit:"..sGUID..":bla";
			DBCS_mobs_detail_TooltipTextLeft1:SetText(nil);
			DBCS_mobs_detail_Tooltip:SetOwner(WorldFrame,"ANCHOR_NONE");
			DBCS_mobs_detail_Tooltip:SetHyperlink(smot_tout);
			DBCS_mobs_detail_tooltip(sGUID);
		end
--if ( DBCS_debug and DBCS_debug > 1 ) then
--DBCS_afficherevent(event,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
--end
	elseif ( event == "QUEST_COMPLETE" or event == "QUEST_DETAIL" or event == "QUEST_GREETING" or event == "QUEST_PROGRESS" ) then
		sGUID = UnitGUID("target");
		snom2 = UnitName("target");
		snom = QuestFrameNpcNameText:GetText();
		if ( sGUID and ( snom == snom2 ) ) then
			--if ( DBCS_mobs_detail_wow_build > DBCS_mobs_detail_wow_build_live ) then
				sGUID_7_10 = strsub(sGUID,6,10);
			--else
			--	sGUID_7_10 = strsub(sGUID,9,12);
			--end
			iGUID_7_10 = tonumber(sGUID_7_10,16);
			if ( DBCS_mobs_detail[iGUID_7_10] == nil ) then
				DBCS_mobs_detail[iGUID_7_10] = {};
			end
			idate = tonumber(date("%Y%m%d"));
			if ( DBCS_mobs_detail[iGUID_7_10][18] == nil ) then
if ( DBCS_debug and DBCS_debug > 1 ) then
TraceFrame:AddMessage("c'est un pnj de qu\195\170te");
end
			end
			DBCS_mobs_detail[iGUID_7_10][18] = idate;
			if ( DBCS_prog_serveur == 0 ) then
				DBCS_mobs_detail_Client[iGUID_7_10] = DBCS_mobs_detail[iGUID_7_10];
			end
		end
	elseif ( event == "MERCHANT_SHOW" ) then
		sGUID = UnitGUID("target");
		snom2 = UnitName("target");
		snom = MerchantNameText:GetText();
		if ( sGUID and ( snom == snom2 ) ) then
			--if ( DBCS_mobs_detail_wow_build > DBCS_mobs_detail_wow_build_live ) then
				sGUID_7_10 = strsub(sGUID,6,10);
			--else
			--	sGUID_7_10 = strsub(sGUID,9,12);
			--end
			iGUID_7_10 = tonumber(sGUID_7_10,16);
			if ( DBCS_mobs_detail[iGUID_7_10] == nil ) then
				DBCS_mobs_detail[iGUID_7_10] = {};
			end
			idate = tonumber(date("%Y%m%d"));
			if ( DBCS_mobs_detail[iGUID_7_10][15] == nil ) then
if ( DBCS_debug and DBCS_debug > 1 ) then
TraceFrame:AddMessage("c'est un marchand");
end
			end
			DBCS_mobs_detail[iGUID_7_10][15] = idate;
			irepair = CanMerchantRepair();
			if ( irepair and irepair == 1 ) then
				if ( DBCS_mobs_detail[iGUID_7_10][16] == nil ) then
if ( DBCS_debug and DBCS_debug > 1 ) then
TraceFrame:AddMessage("il peut r\195\169parer");
end
				end
				DBCS_mobs_detail[iGUID_7_10][16] = idate;
			end
			if ( DBCS_prog_serveur == 0 ) then
				DBCS_mobs_detail_Client[iGUID_7_10] = DBCS_mobs_detail[iGUID_7_10];
			end
		end
	elseif ( event == "PLAYER_TARGET_CHANGED" ) then
		if ( InCombatLockdown() ) then
			return nil;
		end
		sGUID = UnitGUID("target");
		if ( sGUID and ( strsub(sGUID,1,5) == "0xF13" or strsub(sGUID,1,5) == "0xF15" or strsub(sGUID,1,5) == "0xF53" or strsub(sGUID,1,5) == "0xF55" ) ) then
			--if ( DBCS_mobs_detail_wow_build > DBCS_mobs_detail_wow_build_live ) then
				sGUID_7_10 = strsub(sGUID,6,10);
			--else
			--	sGUID_7_10 = strsub(sGUID,9,12);
			--end
			iGUID_7_10 = tonumber(sGUID_7_10,16);
			DBCS_mobs_detail_api(iGUID_7_10,"target");
			smot_tout = "unit:"..sGUID..":bla";
			DBCS_mobs_detail_TooltipTextLeft1:SetText(nil);
			DBCS_mobs_detail_Tooltip:SetOwner(WorldFrame,"ANCHOR_NONE");
			DBCS_mobs_detail_Tooltip:SetHyperlink(smot_tout);
			DBCS_mobs_detail_tooltip(sGUID);
		end
	elseif ( event == "TAXIMAP_OPENED" ) then
		sGUID = UnitGUID("target");
		snom2 = UnitName("target");
		snom = TaxiMerchant:GetText();
		if ( sGUID and ( snom == snom2 ) ) then
			--if ( DBCS_mobs_detail_wow_build > DBCS_mobs_detail_wow_build_live ) then
				sGUID_7_10 = strsub(sGUID,6,10);
			--else
			--	sGUID_7_10 = strsub(sGUID,9,12);
			--end
			iGUID_7_10 = tonumber(sGUID_7_10,16);
			if ( DBCS_mobs_detail[iGUID_7_10] == nil ) then
				DBCS_mobs_detail[iGUID_7_10] = {};
			end
			idate = tonumber(date("%Y%m%d"));
			sfaction, _ = UnitFactionGroup("player");
			if ( sfaction == "Alliance" ) then
				if ( DBCS_mobs_detail[iGUID_7_10][32] == nil ) then
if ( DBCS_debug and DBCS_debug > 1 ) then
TraceFrame:AddMessage("c'est un griffon alliance");
end
				end
				DBCS_mobs_detail[iGUID_7_10][32] = idate;
			elseif ( sfaction == "Horde" ) then
				if ( DBCS_mobs_detail[iGUID_7_10][33] == nil ) then
if ( DBCS_debug and DBCS_debug > 1 ) then
TraceFrame:AddMessage("c'est un griffon horde");
end
				end
				DBCS_mobs_detail[iGUID_7_10][33] = idate;
			else
				if ( DBCS_mobs_detail[iGUID_7_10][19] == nil ) then
if ( DBCS_debug and DBCS_debug > 1 ) then
TraceFrame:AddMessage("c'est un griffon inconnu");
end
				end
				DBCS_mobs_detail[iGUID_7_10][19] = idate;
			end
			if ( DBCS_prog_serveur == 0 ) then
				DBCS_mobs_detail_Client[iGUID_7_10] = DBCS_mobs_detail[iGUID_7_10];
			end
		end
	elseif ( event == "CRAFT_SHOW" ) then
if ( DBCS_debug and DBCS_debug > 1 ) then
DBCS_afficherevent(event,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
end
	elseif ( event == "TRADE_SKILL_SHOW" ) then
if ( DBCS_debug and DBCS_debug > 1 ) then
DBCS_afficherevent(event,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
end
	elseif ( event == "TRAINER_SHOW" ) then
		sGUID = UnitGUID("npc");
		if ( sGUID ) then
			--if ( DBCS_mobs_detail_wow_build > DBCS_mobs_detail_wow_build_live ) then
				sGUID_7_10 = strsub(sGUID,6,10);
			--else
			--	sGUID_7_10 = strsub(sGUID,9,12);
			--end
			iGUID_7_10 = tonumber(sGUID_7_10,16);
if ( DBCS_debug and DBCS_debug > 1 ) then
TraceFrame:AddMessage("TRAINER_SHOW , iGUID_7_10 = "..iGUID_7_10);
end
			inb = GetNumTrainerServices();
--if ( DBCS_debug and DBCS_debug > 1 ) then
--TraceFrame:AddMessage("GetNumTrainerServices = "..inb);
--end
			idate = tonumber(date("%Y%m%d"));
			for i = 1, inb do
				sname, srank, scategory, sexpanded = GetTrainerServiceInfo(i);
				if ( sname ) then
--if ( DBCS_debug and DBCS_debug > 1 ) then
--TraceFrame:AddMessage("sname = "..sname);
--end
				end
				slink = GetTrainerServiceItemLink(i);
				if ( slink ) then
--if ( DBCS_debug and DBCS_debug > 1 ) then
--TraceFrame:AddMessage("slink = "..slink);
--end
				end
				if ( scategory == "header" ) then
				else
					DBCS_mobs_detail_Tooltip:Hide();
					DBCS_mobs_detail_TooltipTextLeft1:SetText(nil);
					DBCS_mobs_detail_Tooltip:SetOwner(WorldFrame,"ANCHOR_NONE");
					DBCS_mobs_detail_Tooltip:SetTrainerService(i);
					DBCS_mobs_detail_Tooltip:Show();
					sspell, srang, iid = DBCS_mobs_detail_Tooltip:GetSpell();
					if ( sspell ) then
						if ( DBCS_mobs_detail_tableau_metier_inverse[iid] ) then
							iindexmetier = DBCS_mobs_detail_tableau_metier_inverse[iid][1];
							irangmetier = DBCS_mobs_detail_tableau_metier_inverse[iid][2];
							if ( DBCS_mobs_detail[iGUID_7_10] == nil ) then
								DBCS_mobs_detail[iGUID_7_10] = {};
							end
							if ( DBCS_mobs_detail[iGUID_7_10][24] == nil ) then
								DBCS_mobs_detail[iGUID_7_10][24] = {};
							end
							if ( DBCS_mobs_detail[iGUID_7_10][24][iindexmetier] == nil ) then
								DBCS_mobs_detail[iGUID_7_10][24][iindexmetier] = {};
							end
							DBCS_mobs_detail[iGUID_7_10][24][iindexmetier][irangmetier] = idate;
						end
--if ( DBCS_debug and DBCS_debug > 1 ) then
--TraceFrame:AddMessage("sspell = "..sspell..", iid = "..iid);
--end
					end
				--DBCS_mobs_detail_tableau_metier
				--UnitName("npc")
--				sname, slink = DBCS_mobs_detail_Tooltip:GetItem();
--				if ( sname ) then
--if ( DBCS_debug and DBCS_debug > 1 ) then
--TraceFrame:AddMessage("sname = "..sname..", slink = "..slink);
--end
--				end
				end
			end
			if ( DBCS_prog_serveur == 0 ) then
				DBCS_mobs_detail_Client[iGUID_7_10] = DBCS_mobs_detail[iGUID_7_10];
			end
		end

if ( DBCS_debug and DBCS_debug > 1 ) then
DBCS_afficherevent(event,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
end
	elseif ( event == "UI_ERROR_MESSAGE" ) then
		sGUID = UnitGUID("target");
		if ( sGUID and ( strsub(sGUID,1,5) == "0xF13" or strsub(sGUID,1,5) == "0xF15" or strsub(sGUID,1,5) == "0xF53" or strsub(sGUID,1,5) == "0xF55" ) and arg1 == "Pas de poches \195\160 vider" ) then
			--if ( DBCS_mobs_detail_wow_build > DBCS_mobs_detail_wow_build_live ) then
				sGUID_7_10 = strsub(sGUID,6,10);
			--else
			--	sGUID_7_10 = strsub(sGUID,9,12);
			--end
			iGUID_7_10 = tonumber(sGUID_7_10,16);
			if ( DBCS_mobs_detail[iGUID_7_10] == nil ) then
				DBCS_mobs_detail[iGUID_7_10] = {};
			end
			if ( DBCS_mobs_detail[iGUID_7_10][22] == nil ) then
if ( DBCS_debug and DBCS_debug > 1 ) then
TraceFrame:AddMessage("je ne peux pas lui faire les poches.");
end
			end
			DBCS_mobs_detail[iGUID_7_10][22] = 0;
			if ( DBCS_prog_serveur == 0 ) then
				DBCS_mobs_detail_Client[iGUID_7_10] = DBCS_mobs_detail[iGUID_7_10];
			end
		elseif ( sGUID and ( strsub(sGUID,1,5) == "0xF13" or strsub(sGUID,1,5) == "0xF15" or strsub(sGUID,1,5) == "0xF53" or strsub(sGUID,1,5) == "0xF55" ) and arg1 == "Les poches de votre cible sont d\195\169j\195\160 vides." ) then
			--if ( DBCS_mobs_detail_wow_build > DBCS_mobs_detail_wow_build_live ) then
				sGUID_7_10 = strsub(sGUID,6,10);
			--else
			--	sGUID_7_10 = strsub(sGUID,9,12);
			--end
			iGUID_7_10 = tonumber(sGUID_7_10,16);
			if ( DBCS_mobs_detail[iGUID_7_10] == nil ) then
				DBCS_mobs_detail[iGUID_7_10] = {};
			end
			if ( DBCS_mobs_detail[iGUID_7_10][22] == nil ) then
if ( DBCS_debug and DBCS_debug > 1 ) then
TraceFrame:AddMessage("je peux lui faire les poches.");
end
			end
			DBCS_mobs_detail[iGUID_7_10][22] = 1;
			if ( DBCS_prog_serveur == 0 ) then
				DBCS_mobs_detail_Client[iGUID_7_10] = DBCS_mobs_detail[iGUID_7_10];
			end
		end
--if ( DBCS_debug and DBCS_debug > 1 ) then
--DBCS_afficherevent(event,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
--end
	elseif ( event == "UNIT_SPELLCAST_SUCCEEDED" ) then
		sGUID = UnitGUID("target");
		if ( sGUID and ( strsub(sGUID,1,5) == "0xF13" or strsub(sGUID,1,5) == "0xF15" or strsub(sGUID,1,5) == "0xF53" or strsub(sGUID,1,5) == "0xF55" ) and arg2 == "Vol \195\160 la tire" ) then
			--if ( DBCS_mobs_detail_wow_build > DBCS_mobs_detail_wow_build_live ) then
				sGUID_7_10 = strsub(sGUID,6,10);
			--else
			--	sGUID_7_10 = strsub(sGUID,9,12);
			--end
			iGUID_7_10 = tonumber(sGUID_7_10,16);
			if ( DBCS_mobs_detail[iGUID_7_10] == nil ) then
				DBCS_mobs_detail[iGUID_7_10] = {};
			end
			if ( DBCS_mobs_detail[iGUID_7_10][22] == nil ) then
if ( DBCS_debug and DBCS_debug > 1 ) then
TraceFrame:AddMessage("je lui fais les poches.");
end
			end
			DBCS_mobs_detail[iGUID_7_10][22] = 1;
			if ( DBCS_prog_serveur == 0 ) then
				DBCS_mobs_detail_Client[iGUID_7_10] = DBCS_mobs_detail[iGUID_7_10];
			end
		end
--if ( DBCS_debug and DBCS_debug > 1 ) then
--DBCS_afficherevent(event,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
--end
	elseif ( event == "UPDATE_MOUSEOVER_UNIT" ) then
		if ( InCombatLockdown() ) then
			return nil;
		end
		sGUID = UnitGUID("mouseover");
		if ( sGUID and ( strsub(sGUID,1,5) == "0xF13" or strsub(sGUID,1,5) == "0xF15" or strsub(sGUID,1,5) == "0xF53" or strsub(sGUID,1,5) == "0xF55" ) ) then
			--if ( DBCS_mobs_detail_wow_build > DBCS_mobs_detail_wow_build_live ) then
				sGUID_7_10 = strsub(sGUID,6,10);
			--else
			--	sGUID_7_10 = strsub(sGUID,9,12);
			--end
			iGUID_7_10 = tonumber(sGUID_7_10,16);
			DBCS_mobs_detail_api(iGUID_7_10,"mouseover");
			smot_tout = "unit:"..sGUID..":bla";
			DBCS_mobs_detail_TooltipTextLeft1:SetText(nil);
			DBCS_mobs_detail_Tooltip:SetOwner(WorldFrame,"ANCHOR_NONE");
			DBCS_mobs_detail_Tooltip:SetHyperlink(smot_tout);
			DBCS_mobs_detail_tooltip(sGUID);
		end
	elseif ( event == "VARIABLES_LOADED" ) then
		if ( DBCS_mobs_detail_config["DBCS_mobs_detail_inumPNJ"] ) then
			DBCS_mobs_detail_inumPNJ = DBCS_mobs_detail_config["DBCS_mobs_detail_inumPNJ"];
		end
		if ( DBCS_mobs_detail_config["DBCS_mobs_detail_inumPNJ_code"] ) then
			DBCS_mobs_detail_inumPNJ_code = DBCS_mobs_detail_config["DBCS_mobs_detail_inumPNJ_code"];
		end
		if ( DBCS_data_Mobs_detail_LOADED and DBCS_data_Mobs_detail_LOADED == true ) then
		else
			DBCS_mobs_detail_copier_vers_serveur(100000);
		end
	end

end

function DBCS_mobs_detail_api(inumPNJ,stype)

--UnitLevel("unit") - Returns the level of a unit. 
--UnitHealthMax("unit") - Returns the maximum health, in points, of the specified unit. 
--UnitCreatureFamily("unit") - Returns the type of creature of the specified unit (e.g., "Crab"). 
--UnitClassification("unit") - Returns the classification of the specified unit (e.g., "elite" or "worldboss"). 
--UnitCreatureType("unit") - Returns the classification type of creature of the specified unit (e.g., "Beast"). 
--UnitFactionGroup("unit") - Returns the faction group id and name of the specified unit. (eg. "Alliance") - string returned is localization-independent (used in filepath) 

--UnitArmor("unit") - Returns the armor statistics relevant to the specified unit. 
--base, effectiveArmor, armor, posBuff, negBuff = UnitArmor(unit);
--UnitDefense("unit") - Returns the base defense skill of the specified unit. 
--baseDefense, armorDefense = UnitDefense(unit);
--UnitDamage("unit") - Returns the damage statistics relevant to the specified unit. 
--lowDmg, hiDmg, offlowDmg, offhiDmg, posBuff, negBuff, percentmod = UnitDamage("unit");

--UnitAffectingCombat("unit") - Determine if the unit is in combat or has aggro. (returns nil if "false" and 1 if "true") 
--UnitIsTapped("unit") - Returns true if the specified unit is tapped, false otherwise. 
--UnitIsTappedByPlayer("unit") - Returns true if the specified unit is tapped by the player himself, otherwise false. 
--UnitManaMax("unit") - Returns the maximum mana (or energy,rage,etc), in points, of the specified unit. (Replaced by UnitPowerMax() as of WoW 3.0.2) 
--UnitPowerType("unit") - Returns a number corresponding to the power type (e.g., mana, rage or energy) of the specified unit. 
--UnitRace("unit") - Returns the race name of the specified unit (e.g., "Human" or "Troll"). 
--

--SetRaidDifficulty(difficulty) 		1	2	3	4
--GetRaidDifficulty()				1	2	3	4
--SetDungeonDifficulty(difficulty) 		1	2
--difficulty = GetInstanceDifficulty()	1	2	3	4
--name, type, difficulty, difficultyName = GetInstanceInfo()			type     String - "none" if the player is not in an instance, "party" if in party, "raid" if in a raid, "pvp" for battleground

local iniveau;
local ipdvmax;
local idate;
local bmodif;
local sfamille;
local sclasse;
local screaturetype;
local sfaction;
local ifaction;
--local iarmure;
--local idefense;
--local idegmin;
--local idegmax;
local stypeinstance;
local idifficulte;

	iniveau = UnitLevel(stype);
	ipdvmax = UnitHealthMax(stype);
	sfamille = UnitCreatureFamily(stype);
	sclasse = UnitClassification(stype);
	screaturetype = UnitCreatureType(stype);
	sfaction, _ = UnitFactionGroup(stype);
	--iarmure, _, _, _, _ = UnitArmor(stype);
	--idefense, _ = UnitDefense(stype);
	--idegmin, idegmax, _, _, _, _, _ = UnitDamage(stype);
	_, stypeinstance, idifficulte, _ = GetInstanceInfo();
	if ( stypeinstance == "none" or stypeinstance == "pvp" ) then
		idifficulte = 0;
	end
--if ( DBCS_debug and DBCS_debug > 1 ) then
--TraceFrame:AddMessage("stypeinstance = "..stypeinstance);
--end

	if ( iniveau ) then
		bmodif = false;
		idate = tonumber(date("%Y%m%d"));
		if ( DBCS_mobs_detail[inumPNJ] == nil ) then
			DBCS_mobs_detail[inumPNJ] = {};
		end
		if ( DBCS_mobs_detail[inumPNJ][1] == nil ) then
			DBCS_mobs_detail[inumPNJ][1] = {};
		end
		if ( DBCS_mobs_detail[inumPNJ][1][idifficulte] == nil ) then
			DBCS_mobs_detail[inumPNJ][1][idifficulte] = {};
		end
		if ( DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau] == nil ) then
			DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau] = {};
			bmodif = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
TraceFrame:AddMessage("niveau = "..iniveau);
end
		end
		--if ( DBCS_mobs_detail[inumPNJ][1][iniveau][1] == idate ) then
		--else
			DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][1] = idate;
		--end
		bmodif = false;
		if ( DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][5] == ipdvmax ) then
		else
			DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][5] = ipdvmax;
			bmodif = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
TraceFrame:AddMessage("ipdvmax = "..ipdvmax);
end
		end
	end
--UnitCreatureFamily("unit") - Returns the type of creature of the specified unit (e.g., "Crab"). 
	if ( sfamille ) then
		bmodif = false;
		--DBCS_mobs_detail_tableau_famille
		if ( DBCS_mobs_detail_tableau_famille_inverse[sfamille] ) then
			if ( DBCS_mobs_detail_tableau_famille_inverse[sfamille] > 0 ) then
				if ( DBCS_mobs_detail[inumPNJ][10] == DBCS_mobs_detail_tableau_famille_inverse[sfamille] ) then
				else
					DBCS_mobs_detail[inumPNJ][10] = DBCS_mobs_detail_tableau_famille_inverse[sfamille];
					bmodif = true;
				end
			end
		else
			if ( DBCS_mobs_detail[inumPNJ][10] == sfamille ) then
			else
				DBCS_mobs_detail[inumPNJ][10] = sfamille;
				bmodif = true;
			end
		end
		btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
	if ( bmodif == true ) then
		if ( DBCS_mobs_detail_tableau_famille_inverse[sfamille] ) then
TraceFrame:AddMessage("famille = "..DBCS_mobs_detail_tableau_famille_inverse[sfamille].."="..sfamille..".");
		else
TraceFrame:AddMessage("famille = "..sfamille);
		end
	end
end
	end
--UnitArmor("unit") - Returns the armor statistics relevant to the specified unit. 
--base, effectiveArmor, armor, posBuff, negBuff = UnitArmor(unit);
--	if ( iarmure ) then
--if ( DBCS_debug and DBCS_debug > 1 ) then
--TraceFrame:AddMessage("armure = "..iarmure);
--end
--	end
--UnitDefense("unit") - Returns the base defense skill of the specified unit. 
--baseDefense, armorDefense = UnitDefense(unit);
--	if ( idefense ) then
--if ( DBCS_debug and DBCS_debug > 1 ) then
--TraceFrame:AddMessage("defense = "..idefense);
--end
--	end
--UnitDamage("unit") - Returns the damage statistics relevant to the specified unit. 
--lowDmg, hiDmg, offlowDmg, offhiDmg, posBuff, negBuff, percentmod = UnitDamage("unit");
--	if ( idegmin and idegmax ) then
--if ( DBCS_debug and DBCS_debug > 1 ) then
--TraceFrame:AddMessage("degmin = "..idegmin..", degmax = "..idegmax);
--end
--	end

--UnitClassification("unit") - Returns the classification of the specified unit (e.g., "elite" or "worldboss"). 
--classification = UnitClassification(unit);
	if ( sclasse ) then
		bmodif = false;
		if ( DBCS_mobs_detail_tableau_classification_inverse[sclasse] ) then
			if ( DBCS_mobs_detail_tableau_classification_inverse[sclasse] > 0 ) then
				if ( DBCS_mobs_detail[inumPNJ][11] == DBCS_mobs_detail_tableau_classification_inverse[sclasse] ) then
				else
					DBCS_mobs_detail[inumPNJ][11] = DBCS_mobs_detail_tableau_classification_inverse[sclasse];
					bmodif = true;
				end
			end
		else
			if ( DBCS_mobs_detail[inumPNJ][11] == sclasse ) then
			else
				DBCS_mobs_detail[inumPNJ][11] = sclasse;
				bmodif = true;
			end
		end
		btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
	if ( bmodif == true ) then
		if ( DBCS_mobs_detail_tableau_classification_inverse[sclasse] ) then
TraceFrame:AddMessage("classification = "..DBCS_mobs_detail_tableau_classification_inverse[sclasse].."="..sclasse..".");
		else
TraceFrame:AddMessage("classification = "..sclasse);
		end
	end
end
	end
--UnitCreatureType("unit") - Returns the classification type of creature of the specified unit (e.g., "Beast"). 
	if ( screaturetype ) then
		bmodif = false;
		if ( DBCS_mobs_detail_tableau_type_inverse[screaturetype] ) then
			if ( DBCS_mobs_detail_tableau_type_inverse[screaturetype] > 0 ) then
				if ( DBCS_mobs_detail[inumPNJ][3] == DBCS_mobs_detail_tableau_type_inverse[screaturetype] ) then
				else
					DBCS_mobs_detail[inumPNJ][3] = DBCS_mobs_detail_tableau_type_inverse[screaturetype];
					bmodif = true;
				end
			end
		else
			if ( DBCS_mobs_detail[inumPNJ][3] == screaturetype ) then
			else
				DBCS_mobs_detail[inumPNJ][3] = screaturetype;
				bmodif = true;
			end
		end
		btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
	if ( bmodif == true ) then
		if ( DBCS_mobs_detail_tableau_type_inverse[screaturetype] ) then
TraceFrame:AddMessage("creature type = "..DBCS_mobs_detail_tableau_type_inverse[screaturetype].."="..screaturetype..".");
		else
TraceFrame:AddMessage("creature type = "..screaturetype);
		end
	end
end
	end
	if ( sfaction ) then
		bmodif = false;
		ifaction = nil;
		if ( sfaction == "Alliance" ) then
			ifaction = 1;
		elseif ( sfaction == "Horde" ) then
			ifaction = 2;
		else
			ifaction = 0;	--sfaction
		end
		if ( DBCS_mobs_detail[inumPNJ][21] and DBCS_mobs_detail[inumPNJ][21] == ifaction ) then
		else
			DBCS_mobs_detail[inumPNJ][21] = ifaction;
			btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
TraceFrame:AddMessage("faction = "..(sfaction or ""));
end
		end
	end

	if ( DBCS_prog_serveur == 0 ) then
		DBCS_mobs_detail_Client[inumPNJ] = DBCS_mobs_detail[inumPNJ];
	end

end

function DBCS_mobs_detail_OnUpdate()

if ( InCombatLockdown() ) then
	return nil;
end

local i;
local bbon;
local smot_milieu;
local ilen;
local smot_tout;
local snom;

	if ( ( GetTime() - DBCS_mobs_detail_inumPNJ_time ) > 1 ) then
		i = 0;
		bbon = false;
		while ( bbon == false and i < 20 ) do
			i = i + 1;
			DBCS_mobs_detail_inumPNJ = DBCS_mobs_detail_inumPNJ + 1;
			if ( DBCS_mobs_detail_inumPNJ > DBCS_mobs_detail_inumPNJ_max ) then
				DBCS_mobs_detail_inumPNJ = 1;
				DBCS_mobs_detail_inumPNJ_code = DBCS_mobs_detail_inumPNJ_code + 1;
				if ( DBCS_mobs_detail_inumPNJ_code > 4 ) then
					DBCS_mobs_detail_inumPNJ_code = 1;
				end
				if ( DBCS_mobs_detail_inumPNJ_code == 1 ) then
if ( DBCS_debug and DBCS_debug > 1 ) then
TraceFrame:AddMessage("DBCS_mobs_detail_OnUpdate : utilisation du code 13");
end
				elseif ( DBCS_mobs_detail_inumPNJ_code == 2 ) then
if ( DBCS_debug and DBCS_debug > 1 ) then
TraceFrame:AddMessage("DBCS_mobs_detail_OnUpdate : utilisation du code 15");
end
				elseif ( DBCS_mobs_detail_inumPNJ_code == 3 ) then
if ( DBCS_debug and DBCS_debug > 1 ) then
TraceFrame:AddMessage("DBCS_mobs_detail_OnUpdate : utilisation du code 53");
end
				elseif ( DBCS_mobs_detail_inumPNJ_code == 4 ) then
if ( DBCS_debug and DBCS_debug > 1 ) then
TraceFrame:AddMessage("DBCS_mobs_detail_OnUpdate : utilisation du code 55");
end
				end
			end
			DBCS_mobs_detail_config["DBCS_mobs_detail_inumPNJ"] = DBCS_mobs_detail_inumPNJ;
			DBCS_mobs_detail_config["DBCS_mobs_detail_inumPNJ_code"] = DBCS_mobs_detail_inumPNJ_code;
			smot_milieu = format("%X",DBCS_mobs_detail_inumPNJ);
--if ( DBCS_debug and DBCS_debug > 1 ) then
--			if ( DBCS_mobs_detail_inumPNJ > 65536 ) then
--TraceFrame:AddMessage("DBCS_mobs_detail_OnUpdate : DBCS_mobs_detail_inumPNJ = "..DBCS_mobs_detail_inumPNJ.." , smot_milieu = "..smot_milieu);
--			end
--end
			ilen = strlen(smot_milieu);
			--if ( DBCS_mobs_detail_wow_build > DBCS_mobs_detail_wow_build_live ) then
				if ( DBCS_mobs_detail_inumPNJ_code == 1 ) then
					smot_tout = "unit:0xF13"..strrep("0",5-ilen)..smot_milieu.."00000000:bla";
				elseif ( DBCS_mobs_detail_inumPNJ_code == 2 ) then
					smot_tout = "unit:0xF15"..strrep("0",5-ilen)..smot_milieu.."00000000:bla";
				elseif ( DBCS_mobs_detail_inumPNJ_code == 3 ) then
					smot_tout = "unit:0xF53"..strrep("0",5-ilen)..smot_milieu.."00000000:bla";
				elseif ( DBCS_mobs_detail_inumPNJ_code == 4 ) then
					smot_tout = "unit:0xF55"..strrep("0",5-ilen)..smot_milieu.."00000000:bla";
				end
			--else
			--	if ( DBCS_mobs_detail_inumPNJ_code == 1 ) then
			--		smot_tout = "unit:0xF13"..strrep("0",7-ilen)..smot_milieu.."000000:bla";
			--	elseif ( DBCS_mobs_detail_inumPNJ_code == 2 ) then
			--		smot_tout = "unit:0xF15"..strrep("0",7-ilen)..smot_milieu.."000000:bla";
			--	elseif ( DBCS_mobs_detail_inumPNJ_code == 3 ) then
			--		smot_tout = "unit:0xF53"..strrep("0",7-ilen)..smot_milieu.."000000:bla";
			--	elseif ( DBCS_mobs_detail_inumPNJ_code == 4 ) then
			--		smot_tout = "unit:0xF55"..strrep("0",7-ilen)..smot_milieu.."000000:bla";
			--	end
			--end
--if ( DBCS_debug and DBCS_debug > 1 ) then
--			if ( DBCS_mobs_detail_inumPNJ > 65536 ) then
--TraceFrame:AddMessage("DBCS_mobs_detail_OnUpdate : DBCS_mobs_detail_inumPNJ = "..DBCS_mobs_detail_inumPNJ.." , smot_tout = "..smot_tout);
--			end
--end
			DBCS_mobs_detail_TooltipTextLeft1:SetText(nil);
			DBCS_mobs_detail_Tooltip:SetOwner(WorldFrame,"ANCHOR_NONE");
			DBCS_mobs_detail_Tooltip:SetHyperlink(smot_tout);
			snom = _G["DBCS_mobs_detail_TooltipTextLeft1"]:GetText();
			if ( snom ) then
				--bbon = true;
				--if ( DBCS_mobs_detail_wow_build > DBCS_mobs_detail_wow_build_live ) then
					if ( DBCS_mobs_detail_inumPNJ_code == 1 ) then
						bbon = DBCS_mobs_detail_tooltip("0xF13"..strrep("0",5-ilen)..smot_milieu.."00000000");
					elseif ( DBCS_mobs_detail_inumPNJ_code == 2 ) then
						bbon = DBCS_mobs_detail_tooltip("0xF15"..strrep("0",5-ilen)..smot_milieu.."00000000");
					elseif ( DBCS_mobs_detail_inumPNJ_code == 3 ) then
						bbon = DBCS_mobs_detail_tooltip("0xF53"..strrep("0",5-ilen)..smot_milieu.."00000000");
					elseif ( DBCS_mobs_detail_inumPNJ_code == 4 ) then
						bbon = DBCS_mobs_detail_tooltip("0xF55"..strrep("0",5-ilen)..smot_milieu.."00000000");
					end
				--else
				--	if ( DBCS_mobs_detail_inumPNJ_code == 1 ) then
				--		bbon = DBCS_mobs_detail_tooltip("0xF13"..strrep("0",7-ilen)..smot_milieu.."000000");
				--	elseif ( DBCS_mobs_detail_inumPNJ_code == 2 ) then
				--		bbon = DBCS_mobs_detail_tooltip("0xF15"..strrep("0",7-ilen)..smot_milieu.."000000");
				--	elseif ( DBCS_mobs_detail_inumPNJ_code == 3 ) then
				--		bbon = DBCS_mobs_detail_tooltip("0xF53"..strrep("0",7-ilen)..smot_milieu.."000000");
				--	elseif ( DBCS_mobs_detail_inumPNJ_code == 4 ) then
				--		bbon = DBCS_mobs_detail_tooltip("0xF55"..strrep("0",7-ilen)..smot_milieu.."000000");
				--	end
				--end
			end
		end
		DBCS_mobs_detail_inumPNJ_time = GetTime();
	end

end

--/script DBCS_mobs_detail_tooltip_vider_depecage();
function DBCS_mobs_detail_tooltip_vider_depecage()

local inumPNJ;

	if ( DBCS_mobs_detail ) then
		for inumPNJ, _ in pairs(DBCS_mobs_detail) do
			if ( DBCS_mobs_detail[inumPNJ][7] ) then
				DBCS_mobs_detail[inumPNJ][7] = nil;
			end
		end
	end

end

--/script DBCS_mobs_detail_tooltip_vider_niveau();
function DBCS_mobs_detail_tooltip_vider_niveau()

local inumPNJ;

	if ( DBCS_mobs_detail ) then
		for inumPNJ, _ in pairs(DBCS_mobs_detail) do
			if ( DBCS_mobs_detail[inumPNJ][1] ) then
				DBCS_mobs_detail[inumPNJ][1] = nil;
			end
		end
	end

end

--/script DBCS_mobs_detail_tooltip_tester_difficulte();
function DBCS_mobs_detail_tooltip_tester_difficulte()

local snom;
local stypeinstance;
local idifficulte;
local snomdiff;

	snom, stypeinstance, idifficulte, snomdiff = GetInstanceInfo();
if ( DBCS_debug and DBCS_debug > 1 ) then
TraceFrame:AddMessage("snom = "..snom);
TraceFrame:AddMessage("stypeinstance = "..stypeinstance);
TraceFrame:AddMessage("idifficulte = "..idifficulte);
TraceFrame:AddMessage("snomdiff = "..snomdiff);
end

end

function DBCS_mobs_detail_init_niveau(inumPNJ,iniveau)

local stypeinstance;
local idifficulte;
local idate;
local smot_milieu;
local ilen;
local smot_tout;
local slink;

	if ( inumPNJ == nil or iniveau == nil ) then
		return nil;
	end
	_, stypeinstance, idifficulte, _ = GetInstanceInfo();
	if ( stypeinstance == "none" or stypeinstance == "pvp" ) then
		idifficulte = 0;
	end
	idate = tonumber(date("%Y%m%d"));
	if ( DBCS_mobs_detail[inumPNJ] == nil ) then
		DBCS_mobs_detail[inumPNJ] = {};
	end
	if ( DBCS_mobs_detail[inumPNJ][1] == nil ) then
		DBCS_mobs_detail[inumPNJ][1] = {};
	end
	if ( DBCS_mobs_detail[inumPNJ][1][idifficulte] == nil ) then
		DBCS_mobs_detail[inumPNJ][1][idifficulte] = {};
	end
	if ( DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau] == nil ) then
		DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau] = {};
if ( DBCS_debug and DBCS_debug > 1 ) then
		if ( DBmobs_Local and DBmobs_Local[inumPNJ] and DBmobs_Local[inumPNJ][1] ) then
			smot_milieu = format("%X",inumPNJ);
			ilen = strlen(smot_milieu);
			smot_tout = "unit:0xF53"..strrep("0",5-ilen)..smot_milieu.."00000000:"..DBmobs_Local[inumPNJ][1][1];
			slink = "|cff4e96f7|H"..smot_tout.."|h["..DBmobs_Local[inumPNJ][1][1].."]|h|r";
TraceFrame:AddMessage("DBCS_mobs_detail_init_niveau : num = "..inumPNJ..", nom = "..slink..", niveau = "..iniveau);
		else
TraceFrame:AddMessage("DBCS_mobs_detail_init_niveau : num = "..inumPNJ..", niveau = "..iniveau);
		end
end
	end
	DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][1] = idate;

end

function DBCS_mobs_detail_init_niveau_et_pdvmax(inumPNJ,iniveau,ipdvmax)

local stypeinstance;
local idifficulte;
local idate;
local smot_milieu;
local ilen;
local smot_tout;
local slink;

	if ( inumPNJ == nil or iniveau == nil ) then
		return nil;
	end
	_, stypeinstance, idifficulte, _ = GetInstanceInfo();
	if ( stypeinstance == "none" or stypeinstance == "pvp" ) then
		idifficulte = 0;
	end
	idate = tonumber(date("%Y%m%d"));
	if ( DBCS_mobs_detail[inumPNJ] == nil ) then
		DBCS_mobs_detail[inumPNJ] = {};
	end
	if ( DBCS_mobs_detail[inumPNJ][1] == nil ) then
		DBCS_mobs_detail[inumPNJ][1] = {};
	end
	if ( DBCS_mobs_detail[inumPNJ][1][idifficulte] == nil ) then
		DBCS_mobs_detail[inumPNJ][1][idifficulte] = {};
	end
	if ( DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau] == nil ) then
		DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau] = {};
	end
	DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][1] = idate;
	if ( DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][5] == nil ) then
if ( DBCS_debug and DBCS_debug > 1 ) then
		if ( DBmobs_Local and DBmobs_Local[inumPNJ] and DBmobs_Local[inumPNJ][1] ) then
			smot_milieu = format("%X",inumPNJ);
			ilen = strlen(smot_milieu);
			smot_tout = "unit:0xF53"..strrep("0",5-ilen)..smot_milieu.."00000000:"..DBmobs_Local[inumPNJ][1][1];
			slink = "|cff4e96f7|H"..smot_tout.."|h["..DBmobs_Local[inumPNJ][1][1].."]|h|r";
TraceFrame:AddMessage("DBCS_mobs_detail_init_niveau : num = "..inumPNJ..", nom = "..slink..", niveau = "..iniveau..", pdvmax = "..ipdvmax);
		else
TraceFrame:AddMessage("DBCS_mobs_detail_init_niveau : num = "..inumPNJ..", niveau = "..iniveau..", pdvmax = "..ipdvmax);
		end
end
	end
	DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][5] = ipdvmax;

end

function DBCS_mobs_detail_tooltip(sGUID)

local sGUID_7_10;
local inumPNJ;
local slink;
local inb;
local tablo_tooltip = nil;
local i;
local j;
local smot;
local ia,ib;
local svaleur1;
local svaleur2;
local svaleur3;
local btrouve;
local iniveau;
local idate;
local ivaleur1;
local ivaleur2;
local iposdeb;
local iposfin;
local bmodif;
local stypeinstance;
local idifficulte;

	--if ( DBCS_mobs_detail_wow_build > DBCS_mobs_detail_wow_build_live ) then
		--sGUID_7_10 = strsub(sGUID,7,10);
		sGUID_7_10 = strsub(sGUID,6,10);
	--else
	--	sGUID_7_10 = strsub(sGUID,9,12);
	--end
	inumPNJ = tonumber(sGUID_7_10,16);

	bmodif = false;

	inb = DBCS_mobs_detail_Tooltip:NumLines();
	if ( inb == 0 ) then
		return bmodif;
	end

	tablo_tooltip = {};
	for i = 1 , inb do
		tablo_tooltip[i] = {};
		tablo_tooltip[i][1] = _G["DBCS_mobs_detail_TooltipTextLeft"..i]:GetText();
		tablo_tooltip[i][2] = _G["DBCS_mobs_detail_TooltipTextRight"..i]:GetText();
	end
	
	if ( DBCS_mobs_detail[inumPNJ] == nil ) then
		DBCS_mobs_detail[inumPNJ] = {};
	end

	smot_tout = "unit:"..sGUID..":"..tablo_tooltip[1][1];
	slink = "|cff4e96f7|H"..smot_tout.."|h["..tablo_tooltip[1][1].."]|h|r";
	idate = tonumber(date("%Y%m%d"));
	iniveau = nil;
--/script DBCS_ecrirecodedutexte(DBCS_mobs_detail_TooltipTextLeft2:GetText())
--/script DBCS_ecrirecodedutexte(GameTooltipTextLeft3:GetText())
--/script DBCS_ecrirecodedutexte(GameTooltipTextLeft4:GetText())
--/script DBCS_ecrirecodedutexte(GameTooltipTextLeft5:GetText())
--/script DBCS_ecrirecodedutexte(GameTooltipTextLeft6:GetText())
--/script DBCS_ecrirecodedutexte(GameTooltipTextLeft7:GetText())
--/script DBCS_ecrirecodedutexte(GameTooltipTextLeft8:GetText())
	_, stypeinstance, idifficulte, _ = GetInstanceInfo();
	if ( stypeinstance == "none" or stypeinstance == "pvp" ) then
		idifficulte = 0;
	end

	for i = 2 , inb do
		for j = 1 , 2 do
			smot = tablo_tooltip[i][j];
			if ( smot == nil ) then
			else
				btrouve = false;
				if ( btrouve == false ) then
					ia, ib, svaleur1, svaleur2 = string.find(smot, "^(.+) niveau (%d+) %(\195\137lite%)$");
					if ( ia ) then
						iniveau = tonumber(svaleur2);
						if ( DBCS_mobs_detail[inumPNJ][1] == nil ) then
							DBCS_mobs_detail[inumPNJ][1] = {};
						end
						if ( DBCS_mobs_detail[inumPNJ][1][idifficulte] == nil ) then
							DBCS_mobs_detail[inumPNJ][1][idifficulte] = {};
						end
						if ( DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau] == nil ) then
							DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau] = {};
						end
						if ( DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][1] ) then
						else
							bmodif = true;
						end
						DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][1] = idate;
						DBCS_mobs_detail[inumPNJ][2] = idate;
						if ( DBCS_mobs_detail_tableau_type_inverse[svaleur1] ) then
							if ( DBCS_mobs_detail_tableau_type_inverse[svaleur1] > 0 ) then
								if ( DBCS_mobs_detail[inumPNJ][3] == DBCS_mobs_detail_tableau_type_inverse[svaleur1] ) then
								else
									DBCS_mobs_detail[inumPNJ][3] = DBCS_mobs_detail_tableau_type_inverse[svaleur1];
									bmodif = true;
								end
								svaleur1 = DBCS_mobs_detail[inumPNJ][3];
							end
						else
							if ( DBCS_mobs_detail[inumPNJ][3] == svaleur1 ) then
							else
								DBCS_mobs_detail[inumPNJ][3] = svaleur1;
								bmodif = true;
							end
						end
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("niveau = "..iniveau.." , type = "..svaleur1..", Elite");
end
end
					end
				end
				if ( btrouve == false ) then
					ia, ib, svaleur1, svaleur2 = string.find(smot, "^(.+) niveau (%d+) %(Boss%)$");
					if ( ia ) then
						iniveau = tonumber(svaleur2);
						if ( DBCS_mobs_detail[inumPNJ][1] == nil ) then
							DBCS_mobs_detail[inumPNJ][1] = {};
						end
						if ( DBCS_mobs_detail[inumPNJ][1][idifficulte] == nil ) then
							DBCS_mobs_detail[inumPNJ][1][idifficulte] = {};
						end
						if ( DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau] == nil ) then
							DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau] = {};
						end
						if ( DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][1] ) then
						else
							bmodif = true;
						end
						DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][1] = idate;
						DBCS_mobs_detail[inumPNJ][9] = idate;
						if ( DBCS_mobs_detail_tableau_type_inverse[svaleur1] ) then
							if ( DBCS_mobs_detail_tableau_type_inverse[svaleur1] > 0 ) then
								if ( DBCS_mobs_detail[inumPNJ][3] == DBCS_mobs_detail_tableau_type_inverse[svaleur1] ) then
								else
									DBCS_mobs_detail[inumPNJ][3] = DBCS_mobs_detail_tableau_type_inverse[svaleur1];
									bmodif = true;
								end
								svaleur1 = DBCS_mobs_detail[inumPNJ][3];
							end
						else
							if ( DBCS_mobs_detail[inumPNJ][3] == svaleur1 ) then
							else
								DBCS_mobs_detail[inumPNJ][3] = svaleur1;
								bmodif = true;
							end
						end
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("niveau = "..iniveau.." , type = "..svaleur1..", Boss");
end
end
					end
				end
				if ( btrouve == false ) then
					ia, ib, svaleur1 = string.find(smot, "^(.+) niveau %?%? %(\195\137lite%)$");
					if ( ia ) then
						if ( DBCS_mobs_detail[inumPNJ][2] ) then
						else
							bmodif = true;
						end
						DBCS_mobs_detail[inumPNJ][2] = idate;
						if ( DBCS_mobs_detail_tableau_type_inverse[svaleur1] ) then
							if ( DBCS_mobs_detail_tableau_type_inverse[svaleur1] > 0 ) then
								if ( DBCS_mobs_detail[inumPNJ][3] == DBCS_mobs_detail_tableau_type_inverse[svaleur1] ) then
								else
									DBCS_mobs_detail[inumPNJ][3] = DBCS_mobs_detail_tableau_type_inverse[svaleur1];
									bmodif = true;
								end
								svaleur1 = DBCS_mobs_detail[inumPNJ][3];
							end
						else
							if ( DBCS_mobs_detail[inumPNJ][3] == svaleur1 ) then
							else
								DBCS_mobs_detail[inumPNJ][3] = svaleur1;
								bmodif = true;
							end
						end
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("niveau = ?? , type = "..svaleur1..", Elite");
end
end
					end
				end
				if ( btrouve == false ) then
					ia, ib, svaleur1 = string.find(smot, "^(.+) niveau %?%? %(Boss%)$");
					if ( ia ) then
						if ( DBCS_mobs_detail[inumPNJ][9] ) then
						else
							bmodif = true;
						end
						DBCS_mobs_detail[inumPNJ][9] = idate;
						if ( DBCS_mobs_detail_tableau_type_inverse[svaleur1] ) then
							if ( DBCS_mobs_detail_tableau_type_inverse[svaleur1] > 0 ) then
								if ( DBCS_mobs_detail[inumPNJ][3] == DBCS_mobs_detail_tableau_type_inverse[svaleur1] ) then
								else
									DBCS_mobs_detail[inumPNJ][3] = DBCS_mobs_detail_tableau_type_inverse[svaleur1];
									bmodif = true;
								end
								svaleur1 = DBCS_mobs_detail[inumPNJ][3];
							end
						else
							if ( DBCS_mobs_detail[inumPNJ][3] == svaleur1 ) then
							else
								DBCS_mobs_detail[inumPNJ][3] = svaleur1;
								bmodif = true;
							end
						end
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("niveau = ?? , type = "..svaleur1..", Boss");
end
end
					end
				end
				if ( btrouve == false ) then
					ia, ib, svaleur1 = string.find(smot, "^Niveau (%d+) %(\195\137lite%)$");
					if ( ia ) then
						iniveau = tonumber(svaleur1);
						if ( DBCS_mobs_detail[inumPNJ][1] == nil ) then
							DBCS_mobs_detail[inumPNJ][1] = {};
						end
						if ( DBCS_mobs_detail[inumPNJ][1][idifficulte] == nil ) then
							DBCS_mobs_detail[inumPNJ][1][idifficulte] = {};
						end
						if ( DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau] == nil ) then
							DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau] = {};
						end
						if ( DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][1] ) then
						else
							bmodif = true;
						end
						DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][1] = idate;
						DBCS_mobs_detail[inumPNJ][2] = idate;
						DBCS_mobs_detail[inumPNJ][8] = idate;
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("niveau = "..iniveau..", Elite");
end
end
					end
				end
				if ( btrouve == false ) then
					ia, ib, svaleur1 = string.find(smot, "^Niveau (%d+) %(Boss%)$");
					if ( ia ) then
						iniveau = tonumber(svaleur1);
						if ( DBCS_mobs_detail[inumPNJ][1] == nil ) then
							DBCS_mobs_detail[inumPNJ][1] = {};
						end
						if ( DBCS_mobs_detail[inumPNJ][1][idifficulte] == nil ) then
							DBCS_mobs_detail[inumPNJ][1][idifficulte] = {};
						end
						if ( DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau] == nil ) then
							DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau] = {};
						end
						if ( DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][1] ) then
						else
							bmodif = true;
						end
						DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][1] = idate;
						DBCS_mobs_detail[inumPNJ][8] = idate;
						DBCS_mobs_detail[inumPNJ][9] = idate;
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("niveau = "..iniveau..", Boss");
end
end
					end
				end
				if ( btrouve == false ) then
					ia, ib = string.find(smot, "^Niveau %?%? %(\195\137lite%)$");
					if ( ia ) then
						if ( DBCS_mobs_detail[inumPNJ][2] ) then
						else
							bmodif = true;
						end
						DBCS_mobs_detail[inumPNJ][2] = idate;
						DBCS_mobs_detail[inumPNJ][8] = idate;
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("niveau = ?? , Elite");
end
end
					end
				end
				if ( btrouve == false ) then
					ia, ib = string.find(smot, "^Niveau %?%? %(Boss%)$");
					if ( ia ) then
						if ( DBCS_mobs_detail[inumPNJ][9] ) then
						else
							bmodif = true;
						end
						DBCS_mobs_detail[inumPNJ][8] = idate;
						DBCS_mobs_detail[inumPNJ][9] = idate;
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("niveau = ?? , Boss");
end
end
					end
				end
				if ( btrouve == false ) then
					ia, ib, svaleur1, svaleur2 = string.find(smot, "^Mascotte de type (.+) et de niveau (%d+)$");
					if ( ia ) then
						iniveau = tonumber(svaleur2);
						if ( DBCS_mobs_detail[inumPNJ][1] == nil ) then
							DBCS_mobs_detail[inumPNJ][1] = {};
						end
						if ( DBCS_mobs_detail[inumPNJ][1][idifficulte] == nil ) then
							DBCS_mobs_detail[inumPNJ][1][idifficulte] = {};
						end
						if ( DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau] == nil ) then
							DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau] = {};
						end
						if ( DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][1] ) then
						else
							bmodif = true;
						end
						DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][1] = idate;
						--if ( DBCS_mobs_detail_tableau_type_inverse[svaleur1] ) then
						--	if ( DBCS_mobs_detail_tableau_type_inverse[svaleur1] > 0 ) then
						--		if ( DBCS_mobs_detail[inumPNJ][3] == DBCS_mobs_detail_tableau_type_inverse[svaleur1] ) then
						--		else
						--			DBCS_mobs_detail[inumPNJ][3] = DBCS_mobs_detail_tableau_type_inverse[svaleur1];
						--			bmodif = true;
						--		end
						--		svaleur1 = DBCS_mobs_detail[inumPNJ][3];
						--	end
						--else
						--	if ( DBCS_mobs_detail[inumPNJ][3] == svaleur1 ) then
						--	else
						--		DBCS_mobs_detail[inumPNJ][3] = svaleur1;
						--		bmodif = true;
						--	end
						--end
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("niveau = "..iniveau.." , type = "..svaleur1);
end
end
					end
				end
				if ( btrouve == false ) then
					ia, ib, svaleur1, svaleur2 = string.find(smot, "^(.+) niveau (%d+)$");
					if ( ia ) then
						iniveau = tonumber(svaleur2);
						if ( DBCS_mobs_detail[inumPNJ][1] == nil ) then
							DBCS_mobs_detail[inumPNJ][1] = {};
						end
						if ( DBCS_mobs_detail[inumPNJ][1][idifficulte] == nil ) then
							DBCS_mobs_detail[inumPNJ][1][idifficulte] = {};
						end
						if ( DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau] == nil ) then
							DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau] = {};
						end
						if ( DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][1] ) then
						else
							bmodif = true;
						end
						DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][1] = idate;
						if ( DBCS_mobs_detail_tableau_type_inverse[svaleur1] ) then
							if ( DBCS_mobs_detail_tableau_type_inverse[svaleur1] > 0 ) then
								if ( DBCS_mobs_detail[inumPNJ][3] == DBCS_mobs_detail_tableau_type_inverse[svaleur1] ) then
								else
									DBCS_mobs_detail[inumPNJ][3] = DBCS_mobs_detail_tableau_type_inverse[svaleur1];
									bmodif = true;
								end
								svaleur1 = DBCS_mobs_detail[inumPNJ][3];
							end
						else
							if ( DBCS_mobs_detail[inumPNJ][3] == svaleur1 ) then
							else
								DBCS_mobs_detail[inumPNJ][3] = svaleur1;
								bmodif = true;
							end
						end
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("niveau = "..iniveau.." , type = "..svaleur1);
end
end
					end
				end
				if ( btrouve == false ) then
					ia, ib, svaleur1 = string.find(smot, "^(.+) niveau %?%?$");
					if ( ia ) then
						if ( DBCS_mobs_detail_tableau_type_inverse[svaleur1] ) then
							if ( DBCS_mobs_detail_tableau_type_inverse[svaleur1] > 0 ) then
								if ( DBCS_mobs_detail[inumPNJ][3] == DBCS_mobs_detail_tableau_type_inverse[svaleur1] ) then
								else
									DBCS_mobs_detail[inumPNJ][3] = DBCS_mobs_detail_tableau_type_inverse[svaleur1];
									bmodif = true;
								end
								svaleur1 = DBCS_mobs_detail[inumPNJ][3];
							end
						else
							if ( DBCS_mobs_detail[inumPNJ][3] == svaleur1 ) then
							else
								DBCS_mobs_detail[inumPNJ][3] = svaleur1;
								bmodif = true;
							end
						end
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("niveau = ?? , type = "..svaleur1);
end
end
					end
				end
				if ( btrouve == false ) then
					ia, ib, svaleur1 = string.find(smot, "^Niveau (%d+)$");
					if ( ia ) then
						iniveau = tonumber(svaleur1);
						if ( DBCS_mobs_detail[inumPNJ][1] == nil ) then
							DBCS_mobs_detail[inumPNJ][1] = {};
						end
						if ( DBCS_mobs_detail[inumPNJ][1][idifficulte] == nil ) then
							DBCS_mobs_detail[inumPNJ][1][idifficulte] = {};
						end
						if ( DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau] == nil ) then
							DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau] = {};
						end
						if ( DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][1] ) then
						else
							bmodif = true;
						end
						DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][1] = idate;
						DBCS_mobs_detail[inumPNJ][8] = idate;
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("niveau = "..iniveau);
end
end
					end
				end
				if ( btrouve == false ) then
					ia, ib = string.find(smot, "^Niveau %?%?$");
					if ( ia ) then
						if ( DBCS_mobs_detail[inumPNJ][8] ) then
						else
							bmodif = true;
						end
						DBCS_mobs_detail[inumPNJ][8] = idate;
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("niveau = ??");
end
end
					end
				end
				if ( btrouve == false ) then
					ia, ib = string.find(smot, "^D\195\169pe\195\167able$");		--	vérifié
					if ( ia ) then
						if ( DBCS_mobs_detail[inumPNJ][7] == nil ) then
							bmodif = true;
						end
						DBCS_mobs_detail[inumPNJ][7] = idate;
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("Depecable");
end
end
					end
				end
				if ( btrouve == false ) then
					ia, ib = string.find(smot, "^Banquier$");
					if ( ia ) then
						if ( DBCS_mobs_detail[inumPNJ][17] == nil ) then
							bmodif = true;
						end
						DBCS_mobs_detail[inumPNJ][17] = idate;
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("Banquier");
end
end
					end
				end
--	[14]	=	Requiert Ingénierie		date
				if ( btrouve == false ) then
					ia, ib = string.find(smot, "^Requiert Ing\195\169nierie$");		--	vérifié
					if ( ia ) then
						if ( DBCS_mobs_detail[inumPNJ][14] == nil ) then
							bmodif = true;
						end
						DBCS_mobs_detail[inumPNJ][14] = idate;
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("Requiert Ingenierie");
end
end
					end
				end
--	[12]	=	Requiert Minage			date
				if ( btrouve == false ) then
					ia, ib = string.find(smot, "^Requiert Minage$");				--	vérifié
					if ( ia ) then
						if ( DBCS_mobs_detail[inumPNJ][12] == nil ) then
							bmodif = true;
						end
						DBCS_mobs_detail[inumPNJ][12] = idate;
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("Requiert Minage");
end
end
					end
				end
--	[13]	=	Requiert Herboristerie		date
				if ( btrouve == false ) then
					ia, ib = string.find(smot, "^Requiert Herboristerie$");			--	vérifié
					if ( ia ) then
						if ( DBCS_mobs_detail[inumPNJ][13] == nil ) then
							bmodif = true;
						end
						DBCS_mobs_detail[inumPNJ][13] = idate;
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("Requiert Herboristerie");
end
end
					end
				end
				if ( btrouve == false ) then
					ia, ib = string.find(smot, "^JcJ$");
					if ( ia ) then
						if ( DBCS_mobs_detail[inumPNJ][20] == nil ) then
							bmodif = true;
						end
						DBCS_mobs_detail[inumPNJ][20] = idate;
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("Jcj");
end
end
					end
				end
				if ( btrouve == false ) then
					ia, ib = string.find(smot, "^Aubergiste$");
					if ( ia ) then
						if ( DBCS_mobs_detail[inumPNJ][25] == nil ) then
							bmodif = true;
						end
						DBCS_mobs_detail[inumPNJ][25] = idate;
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("Aubergiste");
end
end
					end
				end
				if ( btrouve == false ) then
					ia, ib, svaleur1 = string.find(smot, "^Ma\195\174tre de vol$");
					if ( ia ) then
						if ( DBCS_mobs_detail[inumPNJ][19] == nil ) then
							bmodif = true;
						end
						DBCS_mobs_detail[inumPNJ][19] = idate;
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("Ma\195\174tre de vol");
end
end
					end
				end
				if ( btrouve == false ) then
					ia, ib, svaleur1 = string.find(smot, "^Ma\195\174tre des (.+)$");
					if ( ia ) then
						ivaleur1 = DBCS_mobs_detail_tableau_classe_inverse[svaleur1];
						if ( ivaleur1 ) then
							if ( DBCS_mobs_detail[inumPNJ][26] == nil ) then
								DBCS_mobs_detail[inumPNJ][26] = {};
								bmodif = true;
							end
							DBCS_mobs_detail[inumPNJ][26][ivaleur1] = idate;
							btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("Ma\195\174tre de classe : "..ivaleur1.." = "..svaleur1);
end
end
						else
							if ( svaleur1 == "griffons" or svaleur1 == "hippogriffes" ) then
								if ( DBCS_mobs_detail[inumPNJ][32] == nil ) then
									bmodif = true;
								end
								DBCS_mobs_detail[inumPNJ][32] = idate;
								btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("c'est un griffon alliance");
end
end
							elseif ( svaleur1 == "coursiers du vent" or svaleur1 == "faucons-dragons" ) then
								if ( DBCS_mobs_detail[inumPNJ][33] == nil ) then
									bmodif = true;
								end
								DBCS_mobs_detail[inumPNJ][33] = idate;
								btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("c'est un griffon horde");
end
end
							elseif ( svaleur1 == "\195\169curies" ) then
								if ( DBCS_mobs_detail[inumPNJ][27] == nil ) then
									bmodif = true;
								end
								DBCS_mobs_detail[inumPNJ][27] = idate;
								btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("c'est une \195\169curie");
end
end
							elseif ( svaleur1 == "portails" ) then
								if ( DBCS_mobs_detail[inumPNJ][28] == nil ) then
									bmodif = true;
								end
								DBCS_mobs_detail[inumPNJ][28] = idate;
								btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("c'est un ma\195\174tre des portails");
end
end
							elseif ( svaleur1 == "guildes" ) then
								if ( DBCS_mobs_detail[inumPNJ][29] == nil ) then
									bmodif = true;
								end
								DBCS_mobs_detail[inumPNJ][29] = idate;
								btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("c'est un ma\195\174tre des guildes");
end
end
							elseif ( svaleur1 == "docks" ) then
								if ( DBCS_mobs_detail[inumPNJ][30] == nil ) then
									bmodif = true;
								end
								DBCS_mobs_detail[inumPNJ][30] = idate;
								btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("c'est un ma\195\174tre des docks");
end
end
							elseif ( strsub(svaleur1,1,9) == "zeppelins" ) then
								if ( DBCS_mobs_detail[inumPNJ][31] == nil ) then
									bmodif = true;
								end
								DBCS_mobs_detail[inumPNJ][31] = idate;
								btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("c'est un ma\195\174tre des zeppelins");
end
end
							elseif ( svaleur1 == "familiers" ) then
								if ( DBCS_mobs_detail[inumPNJ][34] == nil ) then
									bmodif = true;
								end
								DBCS_mobs_detail[inumPNJ][34] = idate;
								btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("c'est un ma\195\174tre des familiers");
end
end
							elseif ( DBCS_mobs_detail_tableau_metier_maitre_inverse[svaleur1] ) then
								if ( DBCS_mobs_detail[inumPNJ][24] == nil ) then
									DBCS_mobs_detail[inumPNJ][24] = {};
								end
								if ( DBCS_mobs_detail[inumPNJ][24][DBCS_mobs_detail_tableau_metier_maitre_inverse[svaleur1]] == nil ) then
									DBCS_mobs_detail[inumPNJ][24][DBCS_mobs_detail_tableau_metier_maitre_inverse[svaleur1]] = {};
									bmodif = true;
								end
								DBCS_mobs_detail[inumPNJ][24][DBCS_mobs_detail_tableau_metier_maitre_inverse[svaleur1]].date = idate;
								btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("Ma\195\174tre de m\195\169tier : "..DBCS_mobs_detail_tableau_metier_maitre_inverse[svaleur1].." = "..svaleur1);
end
end
							else
								btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
TraceFrame:AddMessage("num = "..inumPNJ..", nom = "..slink);
TraceFrame:AddMessage("Ma\195\174tre des : "..svaleur1);
end
							end
						end
					end
				end
				if ( btrouve == false and iniveau ) then
					ia, ib, svaleur1, svaleur2 = string.find(smot, "^D\195\169g\195\162ts\194\160: (%d+) %- (%d+)$");
					if ( ia ) then
						ivaleur1 = tonumber(svaleur1);
						ivaleur2 = tonumber(svaleur2);
						if ( DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][2] == ivaleur1 ) then
						else
							DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][2] = ivaleur1;
							bmodif = true;
						end
						if ( DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][3] == ivaleur2 ) then
						else
							DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][3] = ivaleur2;
							bmodif = true;
						end
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("degatmin = "..ivaleur1.." , degatmax = "..ivaleur2);
end
end
					end
				end
				if ( btrouve == false and iniveau ) then
					ia, ib, svaleur1 = string.find(smot, "^Armure\194\160: (%d+)$");
					if ( ia ) then
						ivaleur1 = tonumber(svaleur1);
						if ( DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][4] == ivaleur1 ) then
						else
							DBCS_mobs_detail[inumPNJ][1][idifficulte][iniveau][4] = ivaleur1;
							bmodif = true;
						end
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("armure = "..ivaleur1);
end
end
					end
				end
				--if ( btrouve == false and iniveau ) then
				--	ia, ib, svaleur1 = string.find(smot, "^(%d+) points de vie$");
				--	if ( ia ) then
				--		ivaleur1 = tonumber(svaleur1);
				--		if ( DBCS_mobs_detail[inumPNJ][1][iniveau][5] == ivaleur1 ) then
				--		else
				--			DBCS_mobs_detail[inumPNJ][1][iniveau][5] = ivaleur1;
				--			bmodif = true;
				--		end
				--		btrouve = true;
--if ( DBCS_debug and DBCS_debug > 1 ) then
--if ( bmodif == true ) then
--TraceFrame:AddMessage("pdv = "..ivaleur1);
--end
--end
				--	end
				--end
				if ( btrouve == false ) then
					ia, ib, svaleur1 = string.find(smot, "^R\195\169gime\194\160: (.+)$");
					if ( ia ) then
						svaleur3 = strrep("0",table.getn(DBCS_mobs_detail_tableau_nourriture));
						iposfin = -1;
						while ( iposfin ) do
							iposdeb = iposfin +2;
							iposfin = strfind(svaleur1,", ",iposdeb);
							if ( iposfin ) then
								btrouve = true;
								svaleur2 = strsub(svaleur1,iposdeb,iposfin-1);
								if ( DBCS_mobs_detail_tableau_nourriture_inverse[svaleur2] ) then
									svaleur3 = strsub(svaleur3,1,DBCS_mobs_detail_tableau_nourriture_inverse[svaleur2]-1).."1"..strsub(svaleur3,DBCS_mobs_detail_tableau_nourriture_inverse[svaleur2]+1);
								end
							end
						end
						if ( btrouve == false ) then
							if ( DBCS_mobs_detail_tableau_nourriture_inverse[svaleur1] ) then
								svaleur3 = strsub(svaleur3,1,DBCS_mobs_detail_tableau_nourriture_inverse[svaleur1]-1).."1"..strsub(svaleur3,DBCS_mobs_detail_tableau_nourriture_inverse[svaleur1]+1);
							end
						else
							svaleur2 = strsub(svaleur1,iposdeb);
							if ( DBCS_mobs_detail_tableau_nourriture_inverse[svaleur2] ) then
								svaleur3 = strsub(svaleur3,1,DBCS_mobs_detail_tableau_nourriture_inverse[svaleur2]-1).."1"..strsub(svaleur3,DBCS_mobs_detail_tableau_nourriture_inverse[svaleur2]+1);
							end
						end
						if ( DBCS_mobs_detail[inumPNJ][5] == svaleur3 ) then
						else
							DBCS_mobs_detail[inumPNJ][5] = svaleur3;
							bmodif = true;
						end
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("Regime :"..DBCS_mobs_detail[inumPNJ][5]);
end
end
					end
				end
				if ( btrouve == false ) then
					ia, ib = string.find(smot, "^Insensible au domptage$");
					if ( ia ) then
						if ( DBCS_mobs_detail[inumPNJ][4] == 0 ) then
						else
							DBCS_mobs_detail[inumPNJ][4] = 0;
							bmodif = true;
						end
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("Insensible au domptage");
end
end
					end
				end
				if ( btrouve == false ) then
					ia, ib = string.find(smot, "^Domptable$");
					if ( ia ) then
						if ( DBCS_mobs_detail[inumPNJ][4] == 1 ) then
						else
							DBCS_mobs_detail[inumPNJ][4] = 1;
							bmodif = true;
						end
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("domptable");
end
end
					end
				end
				if ( btrouve == false ) then
					ia, ib = string.find(smot, "^Domptable %(exotique%)$");
					if ( ia ) then
						if ( DBCS_mobs_detail[inumPNJ][4] == 2 ) then
						else
							DBCS_mobs_detail[inumPNJ][4] = 2;
							bmodif = true;
						end
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("domptable (Exotique)");
end
end
					end
				end
				if ( btrouve == false ) then
					ia, ib, svaleur1 = string.find(smot, "^Techniques quand dress\195\169%(e%)\194\160: (.+)$");
					if ( ia ) then
						svaleur3 = strrep("0",table.getn(DBCS_mobs_detail_tableau_technique));
						iposfin = -1;
						while ( iposfin ) do
							iposdeb = iposfin +2;
							iposfin = strfind(svaleur1,", ",iposdeb);
							if ( iposfin ) then
								btrouve = true;
								svaleur2 = strsub(svaleur1,iposdeb,iposfin-1);
								if ( DBCS_mobs_detail_tableau_technique_inverse[svaleur2] ) then
									svaleur3 = strsub(svaleur3,1,DBCS_mobs_detail_tableau_technique_inverse[svaleur2]-1).."1"..strsub(svaleur3,DBCS_mobs_detail_tableau_technique_inverse[svaleur2]+1);
								end
							end
						end
						if ( btrouve == false ) then
							if ( DBCS_mobs_detail_tableau_technique_inverse[svaleur1] ) then
								svaleur3 = strsub(svaleur3,1,DBCS_mobs_detail_tableau_technique_inverse[svaleur1]-1).."1"..strsub(svaleur3,DBCS_mobs_detail_tableau_technique_inverse[svaleur1]+1);
							end
						else
							svaleur2 = strsub(svaleur1,iposdeb);
							if ( DBCS_mobs_detail_tableau_technique_inverse[svaleur2] ) then
								svaleur3 = strsub(svaleur3,1,DBCS_mobs_detail_tableau_technique_inverse[svaleur2]-1).."1"..strsub(svaleur3,DBCS_mobs_detail_tableau_technique_inverse[svaleur2]+1);
							end
						end
						if ( DBCS_mobs_detail[inumPNJ][6] == svaleur3 ) then
						else
							DBCS_mobs_detail[inumPNJ][6] = svaleur3;
							bmodif = true;
						end
						btrouve = true;
if ( DBCS_debug and DBCS_debug > 1 ) then
if ( bmodif == true ) then
TraceFrame:AddMessage("Technique :"..DBCS_mobs_detail[inumPNJ][6]);
end
end
					end
				end
			end
		end
	end
	if ( bmodif == true ) then
		if ( DBCS_prog_serveur == 0 ) then
			DBCS_mobs_detail_Client[inumPNJ] = DBCS_mobs_detail[inumPNJ];
		end
if ( DBCS_debug and DBCS_debug > 1 ) then
TraceFrame:AddMessage("num = "..inumPNJ..", nom = "..slink);
end
	end
	return bmodif;

end

--/script DBCS_mobs_detail_copier_vers_serveur();
function DBCS_mobs_detail_copier_vers_serveur(inbmax)

local inumPNJ;
local smot_milieu;
local ilen;
local smot_tout;
local slink;
local tablo;
local tablo2;
local idiff;
local iniveau;
local bmodif;
local inb;
local ireste;

	if ( inbmax == nil ) then
		inbmax = 100;
	end
	inb = 0;
	ireste = 0;
	for inumPNJ, _ in pairs(DBCS_mobs_detail_Client) do
		if ( inb < inbmax ) then
			bmodif = false;
			smot_milieu = format("%X",inumPNJ);
			ilen = strlen(smot_milieu);
			if ( DBmobs_Local and DBmobs_Local[inumPNJ] and DBmobs_Local[inumPNJ][1] and DBmobs_Local[inumPNJ][1][1] ) then
				smot_tout = "unit:0xF53"..strrep("0",5-ilen)..smot_milieu.."00000000:"..DBmobs_Local[inumPNJ][1][1];
				slink = "|cff4e96f7|H"..smot_tout.."|h["..DBmobs_Local[inumPNJ][1][1].."]|h|r";
			else
				smot_tout = "unit:0xF53"..strrep("0",5-ilen)..smot_milieu.."00000000:Inconnu";
				slink = "|cff4e96f7|H"..smot_tout.."|h[Inconnu]|h|r";
			end
			--if ( DBCS_mobs_detail[inumPNJ] == nil ) then
			--	DBCS_mobs_detail[inumPNJ] = DBCS_mobs_detail_Client[inumPNJ];
			--	bmodif = true;
--if ( DBCS_debug and DBCS_debug > 1 ) then
--TraceFrame:AddMessage("j'ajoutes tous les details du mob "..inumPNJ.." : "..slink);
--end
			--else
				if ( DBCS_mobs_detail[inumPNJ] == nil ) then
					DBCS_mobs_detail[inumPNJ] = {};
				end
				tablo = DBCS_mobs_detail_Client[inumPNJ];
				tablo2 = DBCS_mobs_detail[inumPNJ];
--	[1]		-- niveaux
--		[diff]	-- difficulté de l'instance
--			[80]	-- niveau
--				[1] = date quand vu ce niveau
--				[2]	=	dégats minimum
--				[3]	=	dégats maximum
--				[4]	=	armure
--				[5]	=	pdvmax
				if ( tablo[1] ) then
					--if ( tablo2[1] == nil ) then
					--	tablo2[1] = tablo[1];
					--	--bmodif = true;
--if ( DBCS_debug and DBCS_debug > 1 ) then
--TraceFrame:AddMessage("j'ajoutes tous les details du mob "..inumPNJ.." : "..slink..", toutes les difficultees");
--end
					--else
						if ( tablo2[1] == nil ) then
							tablo2[1] = {};
						end
						for idiff, _ in pairs(tablo[1]) do
							--if ( tablo2[1][idiff] == nil ) then
							--	tablo2[1][idiff] = tablo[1][idiff];
							--	--bmodif = true;
--if ( DBCS_debug and DBCS_debug > 1 ) then
--TraceFrame:AddMessage("j'ajoutes tous les details du mob "..inumPNJ.." : "..slink..", toute la difficultee "..idiff);
--end
							--else
								for iniveau, _ in pairs(tablo[1][idiff]) do
									--if ( tablo2[1][idiff][iniveau] == nil ) then
									--	tablo2[1][idiff][iniveau] = tablo[1][idiff][iniveau];
									--	--bmodif = true;
--if ( DBCS_debug and DBCS_debug > 1 ) then
--TraceFrame:AddMessage("j'ajoutes tous les details du mob "..inumPNJ.." : "..slink..", la difficultee "..idiff..", tout le niveau "..iniveau);
--end
									--else
										if ( tablo[1][idiff][iniveau][1] and ( tablo[1][idiff][iniveau][1] > 20101124 ) ) then
											if ( tablo2[1][idiff] == nil ) then
												tablo2[1][idiff] = {};
											end
											if ( tablo2[1][idiff][iniveau] == nil ) then
												tablo2[1][idiff][iniveau] = {};
											end
											if ( tablo2[1][idiff][iniveau][1] ) then
												if ( tablo[1][idiff][iniveau][1] > tablo2[1][idiff][iniveau][1] ) then
													if ( tablo[1][idiff][iniveau][2] ) then
														tablo2[1][idiff][iniveau][2] = tablo[1][idiff][iniveau][2];
													end
													if ( tablo[1][idiff][iniveau][3] ) then
														tablo2[1][idiff][iniveau][3] = tablo[1][idiff][iniveau][3];
													end
													if ( tablo[1][idiff][iniveau][4] ) then
														tablo2[1][idiff][iniveau][4] = tablo[1][idiff][iniveau][4];
													end
													if ( tablo[1][idiff][iniveau][5] ) then
														tablo2[1][idiff][iniveau][5] = tablo[1][idiff][iniveau][5];
													end
												--else
												--	if ( tablo[1][idiff][iniveau][2] and tablo2[1][idiff][iniveau][2] == nil ) then
												--		tablo2[1][idiff][iniveau][2] = tablo[1][idiff][iniveau][2];
												--	end
												--	if ( tablo[1][idiff][iniveau][3] and tablo2[1][idiff][iniveau][3] == nil ) then
												--		tablo2[1][idiff][iniveau][3] = tablo[1][idiff][iniveau][3];
												--	end
												--	if ( tablo[1][idiff][iniveau][4] and tablo2[1][idiff][iniveau][4] == nil ) then
												--		tablo2[1][idiff][iniveau][4] = tablo[1][idiff][iniveau][4];
												--	end
												--	if ( tablo[1][idiff][iniveau][5] and tablo2[1][idiff][iniveau][5] == nil ) then
												--		tablo2[1][idiff][iniveau][5] = tablo[1][idiff][iniveau][5];
												--	end
												end
											else
												tablo2[1][idiff][iniveau][1] = tablo[1][idiff][iniveau][1];
												if ( tablo[1][idiff][iniveau][2] ) then
													tablo2[1][idiff][iniveau][2] = tablo[1][idiff][iniveau][2];
												end
												if ( tablo[1][idiff][iniveau][3] ) then
													tablo2[1][idiff][iniveau][3] = tablo[1][idiff][iniveau][3];
												end
												if ( tablo[1][idiff][iniveau][4] ) then
													tablo2[1][idiff][iniveau][4] = tablo[1][idiff][iniveau][4];
												end
												if ( tablo[1][idiff][iniveau][5] ) then
													tablo2[1][idiff][iniveau][5] = tablo[1][idiff][iniveau][5];
												end
											end
										end
									--end
								end
							--end
						end
					--end
				end
--	[2]		= date quand vu elite
				if ( tablo[2] and ( tablo[2] > 20101124 ) ) then
					if ( tablo2[2] ) then
						if ( tablo[2] > tablo2[2] ) then
							tablo2[2] = tablo[2];
							--bmodif = true;
						end
					else
						tablo2[2] = tablo[2];
						--bmodif = true;
					end
				end
--	[3]	=	type de créature/pnj = Bestiole, Humanoïde etc
				if ( tablo[3] ) then
					tablo2[3] = tablo[3];
				end
--	[4]	=	domptable : ( nil = inconnu, 0 = indomptable, 1 = domptable, 2 = exotique
				if ( tablo[4] ) then
					tablo2[4] = tablo[4];
				end
--	[5]	=	régime
				if ( tablo[5] ) then
					tablo2[5] = tablo[5];
				end
--	[6]	=	technique
				if ( tablo[6] ) then
					tablo2[6] = tablo[6];
				end
--	[7]	=	dépeçable				date
				if ( tablo[7] and ( tablo[7] > 20101124 ) ) then
					if ( tablo2[7] ) then
						if ( tablo[7] > tablo2[7] ) then
							tablo2[7] = tablo[7];
							--bmodif = true;
						end
					else
						tablo2[7] = tablo[7];
						--bmodif = true;
					end
				end
--	[8]	=	type non spécifié			date
				if ( tablo[8] and ( tablo[8] > 20101124 ) ) then
					if ( tablo2[8] ) then
						if ( tablo[8] > tablo2[8] ) then
							tablo2[8] = tablo[8];
							--bmodif = true;
						end
					else
						tablo2[8] = tablo[8];
						--bmodif = true;
					end
				end
--	[9]	=	date quand vu boss
				if ( tablo[9] and ( tablo[9] > 20101124 ) ) then
					if ( tablo2[9] ) then
						if ( tablo[9] > tablo2[9] ) then
							tablo2[9] = tablo[9];
							--bmodif = true;
						end
					else
						tablo2[9] = tablo[9];
						--bmodif = true;
					end
				end
--	[10]	=	famille = crabe etc
				if ( tablo[10] ) then
					tablo2[10] = tablo[10];
				end
--	[11]	=	classification = trivial, normal, rare, elite, eliterare, worldboss
				if ( tablo[11] ) then
					tablo2[11] = tablo[11];
				end
--	[12]	=	Requiert Minage			date
				if ( tablo[12] and ( tablo[12] > 20101124 ) ) then
					if ( tablo2[12] ) then
						if ( tablo[12] > tablo2[12] ) then
							tablo2[12] = tablo[12];
							--bmodif = true;
						end
					else
						tablo2[12] = tablo[12];
						--bmodif = true;
					end
				end
--	[13]	=	Requiert Herboristerie		date
				if ( tablo[13] and ( tablo[13] > 20101124 ) ) then
					if ( tablo2[13] ) then
						if ( tablo[13] > tablo2[13] ) then
							tablo2[13] = tablo[13];
							--bmodif = true;
						end
					else
						tablo2[13] = tablo[13];
						--bmodif = true;
					end
				end
--	[14]	=	Requiert Ingénierie		date
				if ( tablo[14] and ( tablo[14] > 20101124 ) ) then
					if ( tablo2[14] ) then
						if ( tablo[14] > tablo2[14] ) then
							tablo2[14] = tablo[14];
							--bmodif = true;
						end
					else
						tablo2[14] = tablo[14];
						--bmodif = true;
					end
				end
--	[15]	=	marchand				date
				if ( tablo[15] and ( tablo[15] > 20101124 ) ) then
					if ( tablo2[15] ) then
						if ( tablo[15] > tablo2[15] ) then
							tablo2[15] = tablo[15];
							--bmodif = true;
						end
					else
						tablo2[15] = tablo[15];
						--bmodif = true;
					end
				end
--	[16]	=	réparateur				date
				if ( tablo[16] and ( tablo[16] > 20101124 ) ) then
					if ( tablo2[16] ) then
						if ( tablo[16] > tablo2[16] ) then
							tablo2[16] = tablo[16];
							--bmodif = true;
						end
					else
						tablo2[16] = tablo[16];
						--bmodif = true;
					end
				end
--	[17]	=	banquier				date
				if ( tablo[17] and ( tablo[17] > 20101124 ) ) then
					if ( tablo2[17] ) then
						if ( tablo[17] > tablo2[17] ) then
							tablo2[17] = tablo[17];
							--bmodif = true;
						end
					else
						tablo2[17] = tablo[17];
						--bmodif = true;
					end
				end
--	[18]	=	pnj de quete			date
				if ( tablo[18] and ( tablo[18] > 20101124 ) ) then
					if ( tablo2[18] ) then
						if ( tablo[18] > tablo2[18] ) then
							tablo2[18] = tablo[18];
							--bmodif = true;
						end
					else
						tablo2[18] = tablo[18];
						--bmodif = true;
					end
				end
--	[19]	=	griffon				date								Maître des griffons
				if ( tablo[19] and ( tablo[19] > 20101124 ) ) then
					if ( tablo2[19] ) then
						if ( tablo[19] > tablo2[19] ) then
							tablo2[19] = tablo[19];
							--bmodif = true;
						end
					else
						tablo2[19] = tablo[19];
						--bmodif = true;
					end
				end
--	[20]	=	JcJ					date
				if ( tablo[20] and ( tablo[20] > 20101124 ) ) then
					if ( tablo2[20] ) then
						if ( tablo[20] > tablo2[20] ) then
							tablo2[20] = tablo[20];
							--bmodif = true;
						end
					else
						tablo2[20] = tablo[20];
						--bmodif = true;
					end
				end
--	[21]	=	faction				nil	=0	Alliance	=1	Horde	=2
				if ( tablo[21] ) then
					tablo2[21] = tablo[21];
				end
--	[22]	=	faire les poches			non = 0	oui = 1
				if ( tablo[22] ) then
					tablo2[22] = tablo[22];
				end
--	[23]	=	hdv					date
				if ( tablo[23] and ( tablo[23] > 20101124 ) ) then
					if ( tablo2[23] ) then
						if ( tablo[23] > tablo2[23] ) then
							tablo2[23] = tablo[23];
							--bmodif = true;
						end
					else
						tablo2[23] = tablo[23];
						--bmodif = true;
					end
				end
--	[24]	=	c'est un entraineur		tableau
--							DBCS_mobs_detail[iGUID_7_10][24][iindexmetier][irangmetier] = idate;
				if ( tablo[24] ) then
					tablo2[24] = tablo[24];
				end
--	[25]	=	aubergiste				date
				if ( tablo[25] and ( tablo[25] > 20101124 ) ) then
					if ( tablo2[25] ) then
						if ( tablo[25] > tablo2[25] ) then
							tablo2[25] = tablo[25];
							--bmodif = true;
						end
					else
						tablo2[25] = tablo[25];
						--bmodif = true;
					end
				end
--	[26]	=	maître de classe
--			{}
--				1	=	date		--	chaman
				if ( tablo[26] ) then
					tablo2[26] = tablo[26];
				end
--	[27]	=	écurie				date
				if ( tablo[27] and ( tablo[27] > 20101124 ) ) then
					if ( tablo2[27] ) then
						if ( tablo[27] > tablo2[27] ) then
							tablo2[27] = tablo[27];
							--bmodif = true;
						end
					else
						tablo2[27] = tablo[27];
						--bmodif = true;
					end
				end
--	[28]	=	portail				date
				if ( tablo[28] and ( tablo[28] > 20101124 ) ) then
					if ( tablo2[28] ) then
						if ( tablo[28] > tablo2[28] ) then
							tablo2[28] = tablo[28];
							--bmodif = true;
						end
					else
						tablo2[28] = tablo[28];
						--bmodif = true;
					end
				end
--	[29]	=	guildes				date
				if ( tablo[29] and ( tablo[29] > 20101124 ) ) then
					if ( tablo2[29] ) then
						if ( tablo[29] > tablo2[29] ) then
							tablo2[29] = tablo[29];
							--bmodif = true;
						end
					else
						tablo2[29] = tablo[29];
						--bmodif = true;
					end
				end
--	[30]	=	dock					date
				if ( tablo[30] and ( tablo[30] > 20101124 ) ) then
					if ( tablo2[30] ) then
						if ( tablo[30] > tablo2[30] ) then
							tablo2[30] = tablo[30];
							--bmodif = true;
						end
					else
						tablo2[30] = tablo[30];
						--bmodif = true;
					end
				end
--	[31]	=	zeppelins				date
				if ( tablo[31] and ( tablo[31] > 20101124 ) ) then
					if ( tablo2[31] ) then
						if ( tablo[31] > tablo2[31] ) then
							tablo2[31] = tablo[31];
							--bmodif = true;
						end
					else
						tablo2[31] = tablo[31];
						--bmodif = true;
					end
				end
--	[32]	=	griffon alliance			date
				if ( tablo[32] and ( tablo[32] > 20101124 ) ) then
					if ( tablo2[32] ) then
						if ( tablo[32] > tablo2[32] ) then
							tablo2[32] = tablo[32];
							--bmodif = true;
						end
					else
						tablo2[32] = tablo[32];
						--bmodif = true;
					end
				end
--	[33]	=	griffon horde			date
				if ( tablo[33] and ( tablo[33] > 20101124 ) ) then
					if ( tablo2[33] ) then
						if ( tablo[33] > tablo2[33] ) then
							tablo2[33] = tablo[33];
							--bmodif = true;
						end
					else
						tablo2[33] = tablo[33];
						--bmodif = true;
					end
				end
--	[34]	=	maître des familiers		date
				if ( tablo[34] and ( tablo[34] > 20101124 ) ) then
					if ( tablo2[34] ) then
						if ( tablo[34] > tablo2[34] ) then
							tablo2[34] = tablo[34];
							--bmodif = true;
						end
					else
						tablo2[34] = tablo[34];
						--bmodif = true;
					end
				end
				DBCS_mobs_detail[inumPNJ] = tablo2;
			--end
			if ( inbmax == 100 ) then
				DBCS_mobs_detail_Client[inumPNJ] = nil;
			end
			if ( bmodif == true ) then
				inb = inb + 1;
				bmodif = false;
				if ( inbmax == 100 ) then
if ( DBCS_debug and DBCS_debug > 1 ) then
TraceFrame:AddMessage("j'ajoutes tous les details du mob "..inumPNJ.." : "..slink);
end
				end
			end
		else
			ireste = ireste + 1;
		end
	end
	if ( inbmax == 100 ) then
if ( DBCS_debug and DBCS_debug > 1 ) then
TraceFrame:AddMessage("il reste "..ireste.." enregistrements mobs details");
end
	end

end

--/script DBCS_mobs_supprimer_mob(12);
--/script DBCS_mobs_supprimer_mob(13);
--/script DBCS_mobs_supprimer_mob(35);
--/script DBCS_mobs_supprimer_mob(73);
--/script DBCS_mobs_supprimer_mob(74);
--/script DBCS_mobs_supprimer_mob(75);
--/script DBCS_mobs_supprimer_mob(247);
--/script DBCS_mobs_supprimer_mob(249);
--/script DBCS_mobs_supprimer_mob(250);
--/script DBCS_mobs_supprimer_mob(271);
function DBCS_mobs_supprimer_mob(inumPNJ)

	DBmobs_Local[inumPNJ] = nil;
	DBCS_mobs_detail[inumPNJ] = nil;
	DBCS_mobs_locs[inumPNJ] = nil;
	DBCS_mobs_model[inumPNJ] = nil;
	DBCS_mobs_spell[inumPNJ] = nil;

end
