Hello, I have a problem of compilation with my script. I checked MANGOS_DLL_SPEC DBCStorage <FactionEntry> const* GetFactionStore() is quite present in the files mangos… One have an idea?
Thank you and good day.
Code:
1> Création de la bibliothèque ..\..\..\..\bin\win32_release/MaNGOSScript.lib et de l'objet ..\..\..\..\bin\win32_release/MaNGOSScript.exp
1>ajout_rep.obj : error LNK2001: symbole externe non résolu "class DBCStorage<struct FactionEntry> sFactionStore" (?sFactionStore@@3V?$DBCStorage@UFactionEntry@@@@A)
1>..\..\..\..\bin\win32_release/MaNGOSScript.dll : fatal error LNK1120: 1 externes non résolus
Code:
#include "precompiled.h"
bool Ajout_Rep(Player* pPlayer, Item* _Item, SpellCastTargets const& targets)
{
uint32 faction_id = 930;
int32 reputation = 100;
FactionEntry const* factionEntry = sFactionStore.LookupEntry(faction_id);
pPlayer->GetReputationMgr().ModifyReputation(factionEntry, reputation);
return false;
}
void AddSC_Ajout_Rep()
{
Script *newscript;
newscript = new Script;
newscript->Name="Ajout_Rep";
newscript->pItemUse = &Ajout_Rep;
newscript->RegisterSelf();
}