Okay now I have -
Code:
#include "StdAfx.h"
#include "Setup.h"
void OnEnterWorld(Player * pPlayer)
{
pPlayer->SetFFAPvPFlag();
}
void SetupMyCustomScript(ScriptMgr * mgr)
{
mgr->register_hook(SERVER_HOOK_EVENT_ON_ENTER_WORLD, OnEnterWorld);
}
and it gives me this error:
Code:
1>Compiling...
1>MyCustomScript.cpp
1>Linking...
1> Creating library ..\..\..\bin\release\script_bin/ExtraScripts.lib and object ..\..\..\bin\release\script_bin/ExtraScripts.exp
1>Setup.obj : error LNK2019: unresolved external symbol "void __cdecl MyCustomScript(class ScriptMgr *)" (?MyCustomScript@@YAXPAVScriptMgr@@@Z) referenced in function __exp_script_register
1>../../../bin/release/script_bin/ExtraScripts.dll : fatal error LNK1120: 1 unresolved externals
And if I change it to
Code:
#include "StdAfx.h"
#include "Setup.h"
class SCRIPT_DECL MyCustomScript : public GossipScript
{
public:
void OnEnterWorld(Player * pPlayer)
{
pPlayer->SetFFAPvPFlag();
}
};
void SetupMyCustomScript(ScriptMgr * mgr)
{
mgr->register_hook(SERVER_HOOK_EVENT_ON_ENTER_WORLD, OnEnterWorld);
}
I get ...
Code:
1>Compiling...
1>MyCustomScript.cpp
1>..\src\ExtraScripts\MyCustomScript.cpp(15) : error C2065: 'OnEnterWorld' : undeclared identifier
Looking at the other scripts i think I need the
Code:
class SCRIPT_DECL MyCustomScript : public GossipScript
part but, it shouldnt be a GossipScript right? It should be a different class or w/e? but what? Gettiing closer ^_^ I think...