mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
Applied new coding standard, see http://github.com/mangos/mangos/wikis/codingstandards for more.
This commit is contained in:
parent
92441a0241
commit
2c38c1a8ee
8 changed files with 23 additions and 23 deletions
|
|
@ -25,17 +25,17 @@ AM_CPPFLAGS = $(MANGOS_INCLUDES) -I$(srcdir) -I$(srcdir)/../../../dep/include -I
|
||||||
# libmangosscript shared library will later be reused by world server daemon.
|
# libmangosscript shared library will later be reused by world server daemon.
|
||||||
lib_LTLIBRARIES = libmangosscript.la
|
lib_LTLIBRARIES = libmangosscript.la
|
||||||
libmangosscript_la_SOURCES = \
|
libmangosscript_la_SOURCES = \
|
||||||
ScriptMgr.cpp \
|
ScriptMgr.cpp \
|
||||||
ScriptMgr.h \
|
ScriptMgr.h \
|
||||||
config.h \
|
config.h \
|
||||||
system.cpp \
|
system.cpp \
|
||||||
Scripts/sc_default.cpp \
|
Scripts/sc_default.cpp \
|
||||||
Scripts/sc_defines.cpp \
|
Scripts/sc_defines.cpp \
|
||||||
Scripts/sc_defines.h
|
Scripts/sc_defines.h
|
||||||
|
|
||||||
## libtool settings
|
## libtool settings
|
||||||
# API versioning
|
# API versioning
|
||||||
# Link against dependencies
|
# Link against dependencies
|
||||||
# How to increase version info:
|
# How to increase version info:
|
||||||
# - only bug fixes implemented:
|
# - only bug fixes implemented:
|
||||||
# bump the version to LTMANGOS_CURRENT:LTMANGOS_REVISION+1:LTMANGOS_AGE
|
# bump the version to LTMANGOS_CURRENT:LTMANGOS_REVISION+1:LTMANGOS_AGE
|
||||||
|
|
@ -51,6 +51,6 @@ libmangosscript_la_LIBFLAGS = -version-info $(LTMANGOS_CURRENT):$(LTMANGOS_REVIS
|
||||||
## Additional files to include when running 'make dist'
|
## Additional files to include when running 'make dist'
|
||||||
# Scripts defaults.
|
# Scripts defaults.
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
Scripts/sc_default.cpp \
|
Scripts/sc_default.cpp \
|
||||||
Scripts/sc_defines.cpp \
|
Scripts/sc_defines.cpp \
|
||||||
Scripts/sc_defines.h
|
Scripts/sc_defines.h
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
** HOW TO SCRIPT IN C++ **
|
** HOW TO SCRIPT IN C++ **
|
||||||
|
|
||||||
1 - create a file myscript.cpp in scripts folder.
|
1 - create a file myscript.cpp in scripts folder.
|
||||||
2 - copy the content of script_default.cpp, it as the structure on how the scripting fuctions are organized.
|
2 - copy the content of script_default.cpp, it as the structure on how the scripting fuctions are organized.
|
||||||
dont forget to change the name of fuctions, like GossipHello_default to GossipHello_myscript.
|
dont forget to change the name of fuctions, like GossipHello_default to GossipHello_myscript.
|
||||||
|
|
||||||
3 - in fuction AddSC_default change to AddSC_myscript.
|
3 - in fuction AddSC_default change to AddSC_myscript.
|
||||||
4 - newscript->Name="default"; change the string to "myscript" this name is the one to be called from the db
|
4 - newscript->Name="default"; change the string to "myscript" this name is the one to be called from the db
|
||||||
|
|
@ -14,14 +14,14 @@ add your AddSC_myscript in here
|
||||||
|
|
||||||
// -- Scripts to be added --
|
// -- Scripts to be added --
|
||||||
extern void AddSC_default();
|
extern void AddSC_default();
|
||||||
// -------------------
|
// -------------------
|
||||||
|
|
||||||
and here
|
and here
|
||||||
|
|
||||||
// -- Inicialize the Scripts to be Added --
|
// -- Inicialize the Scripts to be Added --
|
||||||
AddSC_default();
|
AddSC_default();
|
||||||
// ----------------------------------------
|
// ----------------------------------------
|
||||||
|
|
||||||
now start using the player fuctions to script ;)
|
now start using the player fuctions to script ;)
|
||||||
see the sc_defines.h for some fuctions to use.
|
see the sc_defines.h for some fuctions to use.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue