void ItemBaseManager::Initialize()
{
    ItemBaseParser m_Parser;
	m_Parser.LoadItemBase(m_ItemDB);

    InitializeHash();
    InitializeList();
	SetRefineInfo();
}
Beispiel #2
0
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                             %
%                                                                             %
%                                                                             %
%   G e t W i z a r d M a g i c k                                             %
%                                                                             %
%                                                                             %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  GetWizardMagick() produces a unique signature useful for verifying that a
%  structure or file is in fact Wizard related.
%
%  The format of the GetWizardMagick method is:
%
%      StringInfo GetWizardMagick(const char *signature,const size_t length)
%
%  A description of each parameter follows:
%
%    o signature: Derive the magick from this signature.
%
%
*/
WizardExport StringInfo *GetWizardMagick(const unsigned char *signature,
  const size_t length)
{
  HashInfo
    *hash_info;

  StringInfo
    *magick,
    *tag;

  hash_info=AcquireHashInfo(SHA2256Hash);
  InitializeHash(hash_info);
  tag=AcquireStringInfo(length);
  SetStringInfoDatum(tag,signature);
  UpdateHash(hash_info,tag);
  tag=DestroyStringInfo(tag);
  FinalizeHash(hash_info);
  magick=CloneStringInfo(GetHashDigest(hash_info));
  hash_info=DestroyHashInfo(hash_info);
  return(magick);
}