[svn] * Merge Temp dev SVN with Assembla.
* Changes include: - Implementation of w12x's Outdoor PvP and Game Event Systems. - Temporary removal of IRC Chat Bot (until infinite loop when disabled is fixed). - All mangos -> trinity (to convert your mangos_string table, please run mangos_string_to_trinity_string.sql). - Improved Config cleanup. - And many more changes. --HG-- branch : trunk
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -52,3 +52,4 @@ libtrinityscript_la_LIBADD = $(MYSQL_LIBS) $(POSTGRE_LIBS)
|
||||
EXTRA_DIST = \
|
||||
Readme.txt
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
|
||||
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
|
||||
*
|
||||
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -8,12 +10,12 @@
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@@ -34,7 +36,7 @@ int num_inst_scripts;
|
||||
extern void AddSC_default();
|
||||
// -------------------
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
void ScriptsFree()
|
||||
{ // Free resources before library unload
|
||||
for(int i=0;i<nrscripts;i++)
|
||||
@@ -47,7 +49,7 @@ void ScriptsFree()
|
||||
num_inst_scripts = 0;
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
void ScriptsInit()
|
||||
{
|
||||
nrscripts = 0;
|
||||
@@ -76,7 +78,7 @@ Script* GetScriptByName(std::string Name)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool GossipHello ( Player * player, Creature *_Creature )
|
||||
{
|
||||
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
|
||||
@@ -86,7 +88,7 @@ bool GossipHello ( Player * player, Creature *_Creature )
|
||||
return tmpscript->pGossipHello(player,_Creature);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool GossipSelect( Player *player, Creature *_Creature,uint32 sender, uint32 action )
|
||||
{
|
||||
debug_log("DEBUG: Gossip selection, sender: %d, action: %d",sender, action);
|
||||
@@ -98,7 +100,7 @@ bool GossipSelect( Player *player, Creature *_Creature,uint32 sender, uint32 act
|
||||
return tmpscript->pGossipSelect(player,_Creature,sender,action);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool GossipSelectWithCode( Player *player, Creature *_Creature, uint32 sender, uint32 action, const char* sCode )
|
||||
{
|
||||
debug_log("DEBUG: Gossip selection, sender: %d, action: %d",sender, action);
|
||||
@@ -110,7 +112,7 @@ bool GossipSelectWithCode( Player *player, Creature *_Creature, uint32 sender, u
|
||||
return tmpscript->pGossipSelectWithCode(player,_Creature,sender,action,sCode);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool QuestAccept( Player *player, Creature *_Creature, Quest *_Quest )
|
||||
{
|
||||
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
|
||||
@@ -120,7 +122,7 @@ bool QuestAccept( Player *player, Creature *_Creature, Quest *_Quest )
|
||||
return tmpscript->pQuestAccept(player,_Creature,_Quest);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool QuestSelect( Player *player, Creature *_Creature, Quest *_Quest )
|
||||
{
|
||||
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
|
||||
@@ -130,7 +132,7 @@ bool QuestSelect( Player *player, Creature *_Creature, Quest *_Quest )
|
||||
return tmpscript->pQuestSelect(player,_Creature,_Quest);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool QuestComplete( Player *player, Creature *_Creature, Quest *_Quest )
|
||||
{
|
||||
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
|
||||
@@ -140,7 +142,7 @@ bool QuestComplete( Player *player, Creature *_Creature, Quest *_Quest )
|
||||
return tmpscript->pQuestComplete(player,_Creature,_Quest);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool ChooseReward( Player *player, Creature *_Creature, Quest *_Quest, uint32 opt )
|
||||
{
|
||||
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
|
||||
@@ -150,7 +152,7 @@ bool ChooseReward( Player *player, Creature *_Creature, Quest *_Quest, uint32 op
|
||||
return tmpscript->pChooseReward(player,_Creature,_Quest,opt);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
uint32 NPCDialogStatus( Player *player, Creature *_Creature )
|
||||
{
|
||||
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
|
||||
@@ -160,7 +162,7 @@ uint32 NPCDialogStatus( Player *player, Creature *_Creature )
|
||||
return tmpscript->pNPCDialogStatus(player,_Creature);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
uint32 GODialogStatus( Player *player, GameObject *_GO )
|
||||
{
|
||||
Script *tmpscript = NULL;
|
||||
@@ -172,7 +174,7 @@ uint32 GODialogStatus( Player *player, GameObject *_GO )
|
||||
return tmpscript->pGODialogStatus(player,_GO);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool ItemHello( Player *player, Item *_Item, Quest *_Quest )
|
||||
{
|
||||
Script *tmpscript = NULL;
|
||||
@@ -184,7 +186,7 @@ bool ItemHello( Player *player, Item *_Item, Quest *_Quest )
|
||||
return tmpscript->pItemHello(player,_Item,_Quest);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool ItemQuestAccept( Player *player, Item *_Item, Quest *_Quest )
|
||||
{
|
||||
Script *tmpscript = NULL;
|
||||
@@ -196,7 +198,7 @@ bool ItemQuestAccept( Player *player, Item *_Item, Quest *_Quest )
|
||||
return tmpscript->pItemQuestAccept(player,_Item,_Quest);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool GOHello( Player *player, GameObject *_GO )
|
||||
{
|
||||
Script *tmpscript = NULL;
|
||||
@@ -208,7 +210,7 @@ bool GOHello( Player *player, GameObject *_GO )
|
||||
return tmpscript->pGOHello(player,_GO);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool GOQuestAccept( Player *player, GameObject *_GO, Quest *_Quest )
|
||||
{
|
||||
Script *tmpscript = NULL;
|
||||
@@ -220,7 +222,7 @@ bool GOQuestAccept( Player *player, GameObject *_GO, Quest *_Quest )
|
||||
return tmpscript->pGOQuestAccept(player,_GO,_Quest);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool GOChooseReward( Player *player, GameObject *_GO, Quest *_Quest, uint32 opt )
|
||||
{
|
||||
Script *tmpscript = NULL;
|
||||
@@ -232,7 +234,7 @@ bool GOChooseReward( Player *player, GameObject *_GO, Quest *_Quest, uint32 opt
|
||||
return tmpscript->pGOChooseReward(player,_GO,_Quest,opt);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool AreaTrigger ( Player *player, AreaTriggerEntry* atEntry )
|
||||
{
|
||||
Script *tmpscript = NULL;
|
||||
@@ -243,7 +245,7 @@ bool AreaTrigger ( Player *player, AreaTriggerEntry* atEntry )
|
||||
return tmpscript->pAreaTrigger(player, atEntry);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool ReceiveEmote ( Player *player, Creature *_Creature, uint32 emote )
|
||||
{
|
||||
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
|
||||
@@ -252,7 +254,7 @@ bool ReceiveEmote ( Player *player, Creature *_Creature, uint32 emote )
|
||||
return tmpscript->pReceiveEmote(player,_Creature, emote);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool ItemUse( Player *player, Item* _Item, SpellCastTargets const& targets)
|
||||
{
|
||||
Script *tmpscript = NULL;
|
||||
@@ -263,7 +265,7 @@ bool ItemUse( Player *player, Item* _Item, SpellCastTargets const& targets)
|
||||
return tmpscript->pItemUse(player,_Item,targets);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
CreatureAI* GetAI(Creature *_Creature )
|
||||
{
|
||||
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
|
||||
@@ -272,7 +274,7 @@ CreatureAI* GetAI(Creature *_Creature )
|
||||
return tmpscript->GetAI(_Creature);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
InstanceData* CreateInstanceData(Map *map)
|
||||
{
|
||||
if(!map->IsDungeon()) return NULL;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
|
||||
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
|
||||
*
|
||||
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -8,12 +10,12 @@
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef SCRIPTMGR_H
|
||||
@@ -86,7 +88,7 @@ extern int num_inst_scripts;
|
||||
|
||||
#define VISIBLE_RANGE (50.0f)
|
||||
|
||||
struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI
|
||||
struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
|
||||
{
|
||||
ScriptedAI(Creature* creature) : m_creature(creature) {}
|
||||
~ScriptedAI() {}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
|
||||
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
|
||||
*
|
||||
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -8,12 +10,12 @@
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "sc_defines.h"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
|
||||
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
|
||||
*
|
||||
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -8,12 +10,12 @@
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "sc_defines.h"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
|
||||
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
|
||||
*
|
||||
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -8,12 +10,12 @@
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef SC_DEFINES_H
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
|
||||
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
|
||||
*
|
||||
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -8,12 +10,12 @@
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
@@ -23,9 +25,9 @@
|
||||
|
||||
#ifdef WIN32
|
||||
//#include <windows.h>
|
||||
#define MANGOS_DLL_EXPORT extern "C" __declspec(dllexport)
|
||||
#define TRINITY_DLL_EXPORT extern "C" __declspec(dllexport)
|
||||
#elif defined( __GNUC__ )
|
||||
#define MANGOS_DLL_EXPORT extern "C"
|
||||
#define TRINITY_DLL_EXPORT extern "C"
|
||||
#else
|
||||
#define MANGOS_DLL_EXPORT extern "C" export
|
||||
#define TRINITY_DLL_EXPORT extern "C" export
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
|
||||
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
|
||||
*
|
||||
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -8,12 +10,12 @@
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -415,3 +415,4 @@ install-data-hook:
|
||||
done
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -633,7 +633,7 @@ void LoadDatabase()
|
||||
|
||||
// Load Script Text
|
||||
outstring_log("TSCR: Loading Script Texts...");
|
||||
LoadMangosStrings(TScriptDB,"script_texts",TEXT_SOURCE_RANGE,(TEXT_SOURCE_RANGE*2)+1);
|
||||
LoadTrinityStrings(TScriptDB,"script_texts",TEXT_SOURCE_RANGE,(TEXT_SOURCE_RANGE*2)+1);
|
||||
|
||||
// Gather Additional data from Script Texts
|
||||
result = TScriptDB.PQuery("SELECT entry, sound, type, language FROM script_texts");
|
||||
@@ -697,7 +697,7 @@ void LoadDatabase()
|
||||
|
||||
// Load Custom Text
|
||||
outstring_log("TSCR: Loading Custom Texts...");
|
||||
LoadMangosStrings(TScriptDB,"custom_texts",TEXT_SOURCE_RANGE*2,(TEXT_SOURCE_RANGE*3)+1);
|
||||
LoadTrinityStrings(TScriptDB,"custom_texts",TEXT_SOURCE_RANGE*2,(TEXT_SOURCE_RANGE*3)+1);
|
||||
|
||||
// Gather Additional data from Custom Texts
|
||||
result = TScriptDB.PQuery("SELECT entry, sound, type, language FROM custom_texts");
|
||||
@@ -1174,7 +1174,7 @@ struct TSpellSummary {
|
||||
uint8 Effects; // set of enum SelectEffect
|
||||
}extern *SpellSummary;
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
void ScriptsFree()
|
||||
{
|
||||
// Free Spell Summary
|
||||
@@ -1187,7 +1187,7 @@ void ScriptsFree()
|
||||
nrscripts = 0;
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
void ScriptsInit()
|
||||
{
|
||||
bool CanLoadDB = true;
|
||||
@@ -1931,7 +1931,7 @@ Script* GetScriptByName(std::string Name)
|
||||
//********************************
|
||||
//*** Functions to be Exported ***
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool GossipHello ( Player * player, Creature *_Creature )
|
||||
{
|
||||
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
|
||||
@@ -1941,7 +1941,7 @@ bool GossipHello ( Player * player, Creature *_Creature )
|
||||
return tmpscript->pGossipHello(player,_Creature);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool GossipSelect( Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
{
|
||||
debug_log("TSCR: Gossip selection, sender: %d, action: %d",sender, action);
|
||||
@@ -1953,7 +1953,7 @@ bool GossipSelect( Player *player, Creature *_Creature, uint32 sender, uint32 ac
|
||||
return tmpscript->pGossipSelect(player,_Creature,sender,action);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool GossipSelectWithCode( Player *player, Creature *_Creature, uint32 sender, uint32 action, const char* sCode )
|
||||
{
|
||||
debug_log("TSCR: Gossip selection with code, sender: %d, action: %d",sender, action);
|
||||
@@ -1965,7 +1965,7 @@ bool GossipSelectWithCode( Player *player, Creature *_Creature, uint32 sender, u
|
||||
return tmpscript->pGossipSelectWithCode(player,_Creature,sender,action,sCode);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool QuestAccept( Player *player, Creature *_Creature, Quest const *_Quest )
|
||||
{
|
||||
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
|
||||
@@ -1975,7 +1975,7 @@ bool QuestAccept( Player *player, Creature *_Creature, Quest const *_Quest )
|
||||
return tmpscript->pQuestAccept(player,_Creature,_Quest);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool QuestSelect( Player *player, Creature *_Creature, Quest const *_Quest )
|
||||
{
|
||||
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
|
||||
@@ -1985,7 +1985,7 @@ bool QuestSelect( Player *player, Creature *_Creature, Quest const *_Quest )
|
||||
return tmpscript->pQuestSelect(player,_Creature,_Quest);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool QuestComplete( Player *player, Creature *_Creature, Quest const *_Quest )
|
||||
{
|
||||
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
|
||||
@@ -1995,7 +1995,7 @@ bool QuestComplete( Player *player, Creature *_Creature, Quest const *_Quest )
|
||||
return tmpscript->pQuestComplete(player,_Creature,_Quest);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool ChooseReward( Player *player, Creature *_Creature, Quest const *_Quest, uint32 opt )
|
||||
{
|
||||
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
|
||||
@@ -2005,7 +2005,7 @@ bool ChooseReward( Player *player, Creature *_Creature, Quest const *_Quest, uin
|
||||
return tmpscript->pChooseReward(player,_Creature,_Quest,opt);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
uint32 NPCDialogStatus( Player *player, Creature *_Creature )
|
||||
{
|
||||
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
|
||||
@@ -2015,7 +2015,7 @@ uint32 NPCDialogStatus( Player *player, Creature *_Creature )
|
||||
return tmpscript->pNPCDialogStatus(player,_Creature);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
uint32 GODialogStatus( Player *player, GameObject *_GO )
|
||||
{
|
||||
Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName);
|
||||
@@ -2025,7 +2025,7 @@ uint32 GODialogStatus( Player *player, GameObject *_GO )
|
||||
return tmpscript->pGODialogStatus(player,_GO);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool ItemHello( Player *player, Item *_Item, Quest const *_Quest )
|
||||
{
|
||||
Script *tmpscript = GetScriptByName(_Item->GetProto()->ScriptName);
|
||||
@@ -2035,7 +2035,7 @@ bool ItemHello( Player *player, Item *_Item, Quest const *_Quest )
|
||||
return tmpscript->pItemHello(player,_Item,_Quest);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool ItemQuestAccept( Player *player, Item *_Item, Quest const *_Quest )
|
||||
{
|
||||
Script *tmpscript = GetScriptByName(_Item->GetProto()->ScriptName);
|
||||
@@ -2045,7 +2045,7 @@ bool ItemQuestAccept( Player *player, Item *_Item, Quest const *_Quest )
|
||||
return tmpscript->pItemQuestAccept(player,_Item,_Quest);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool GOHello( Player *player, GameObject *_GO )
|
||||
{
|
||||
Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName);
|
||||
@@ -2055,7 +2055,7 @@ bool GOHello( Player *player, GameObject *_GO )
|
||||
return tmpscript->pGOHello(player,_GO);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool GOQuestAccept( Player *player, GameObject *_GO, Quest const *_Quest )
|
||||
{
|
||||
Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName);
|
||||
@@ -2065,7 +2065,7 @@ bool GOQuestAccept( Player *player, GameObject *_GO, Quest const *_Quest )
|
||||
return tmpscript->pGOQuestAccept(player,_GO,_Quest);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool GOChooseReward( Player *player, GameObject *_GO, Quest const *_Quest, uint32 opt )
|
||||
{
|
||||
Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName);
|
||||
@@ -2075,7 +2075,7 @@ bool GOChooseReward( Player *player, GameObject *_GO, Quest const *_Quest, uint3
|
||||
return tmpscript->pGOChooseReward(player,_GO,_Quest,opt);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool AreaTrigger( Player *player, AreaTriggerEntry * atEntry)
|
||||
{
|
||||
Script *tmpscript = NULL;
|
||||
@@ -2086,7 +2086,7 @@ bool AreaTrigger( Player *player, AreaTriggerEntry * atEntry)
|
||||
return tmpscript->pAreaTrigger(player, atEntry);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
CreatureAI* GetAI(Creature *_Creature)
|
||||
{
|
||||
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
|
||||
@@ -2095,7 +2095,7 @@ CreatureAI* GetAI(Creature *_Creature)
|
||||
return tmpscript->GetAI(_Creature);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool ItemUse( Player *player, Item* _Item, SpellCastTargets const& targets)
|
||||
{
|
||||
Script *tmpscript = GetScriptByName(_Item->GetProto()->ScriptName);
|
||||
@@ -2104,7 +2104,7 @@ bool ItemUse( Player *player, Item* _Item, SpellCastTargets const& targets)
|
||||
return tmpscript->pItemUse(player,_Item,targets);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
bool ReceiveEmote( Player *player, Creature *_Creature, uint32 emote )
|
||||
{
|
||||
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
|
||||
@@ -2113,7 +2113,7 @@ bool ReceiveEmote( Player *player, Creature *_Creature, uint32 emote )
|
||||
return tmpscript->pReceiveEmote(player, _Creature, emote);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
TRINITY_DLL_EXPORT
|
||||
InstanceData* CreateInstanceData(Map *map)
|
||||
{
|
||||
Script *tmpscript = NULL;
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
/* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
|
||||
*
|
||||
* Thanks to the original authors: ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software licensed under GPL version 2
|
||||
* Please see the included DOCS/LICENSE.TXT for more information */
|
||||
|
||||
@@ -78,11 +81,11 @@ void DoScriptText(int32 textEntry, WorldObject* pSource, Unit* target = NULL);
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#define MANGOS_DLL_EXPORT extern "C" __declspec(dllexport)
|
||||
#define TRINITY_DLL_EXPORT extern "C" __declspec(dllexport)
|
||||
#elif defined( __GNUC__ )
|
||||
#define MANGOS_DLL_EXPORT extern "C"
|
||||
#define TRINITY_DLL_EXPORT extern "C"
|
||||
#else
|
||||
#define MANGOS_DLL_EXPORT extern "C" export
|
||||
#define TRINITY_DLL_EXPORT extern "C" export
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
/* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
|
||||
*
|
||||
* Thanks to the original authors: ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software licensed under GPL version 2
|
||||
* Please see the included DOCS/LICENSE.TXT for more information */
|
||||
|
||||
@@ -506,21 +509,21 @@ void ScriptedAI::DoTeleportPlayer(Unit* pUnit, float x, float y, float z, float
|
||||
|
||||
Unit* ScriptedAI::DoSelectLowestHpFriendly(float range, uint32 MinHPDiff)
|
||||
{
|
||||
CellPair p(MaNGOS::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
|
||||
CellPair p(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
Unit* pUnit = NULL;
|
||||
|
||||
MaNGOS::MostHPMissingInRange u_check(m_creature, range, MinHPDiff);
|
||||
MaNGOS::UnitLastSearcher<MaNGOS::MostHPMissingInRange> searcher(pUnit, u_check);
|
||||
Trinity::MostHPMissingInRange u_check(m_creature, range, MinHPDiff);
|
||||
Trinity::UnitLastSearcher<Trinity::MostHPMissingInRange> searcher(pUnit, u_check);
|
||||
|
||||
/*
|
||||
typedef TYPELIST_4(GameObject, Creature*except pets*, DynamicObject, Corpse*Bones*) AllGridObjectTypes;
|
||||
This means that if we only search grid then we cannot possibly return pets or players so this is safe
|
||||
*/
|
||||
TypeContainerVisitor<MaNGOS::UnitLastSearcher<MaNGOS::MostHPMissingInRange>, GridTypeMapContainer > grid_unit_searcher(searcher);
|
||||
TypeContainerVisitor<Trinity::UnitLastSearcher<Trinity::MostHPMissingInRange>, GridTypeMapContainer > grid_unit_searcher(searcher);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, grid_unit_searcher, *(m_creature->GetMap()));
|
||||
@@ -529,17 +532,17 @@ Unit* ScriptedAI::DoSelectLowestHpFriendly(float range, uint32 MinHPDiff)
|
||||
|
||||
std::list<Creature*> ScriptedAI::DoFindFriendlyCC(float range)
|
||||
{
|
||||
CellPair p(MaNGOS::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
|
||||
CellPair p(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
std::list<Creature*> pList;
|
||||
|
||||
MaNGOS::FriendlyCCedInRange u_check(m_creature, range);
|
||||
MaNGOS::CreatureListSearcher<MaNGOS::FriendlyCCedInRange> searcher(pList, u_check);
|
||||
Trinity::FriendlyCCedInRange u_check(m_creature, range);
|
||||
Trinity::CreatureListSearcher<Trinity::FriendlyCCedInRange> searcher(pList, u_check);
|
||||
|
||||
TypeContainerVisitor<MaNGOS::CreatureListSearcher<MaNGOS::FriendlyCCedInRange>, GridTypeMapContainer > grid_creature_searcher(searcher);
|
||||
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::FriendlyCCedInRange>, GridTypeMapContainer > grid_creature_searcher(searcher);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, grid_creature_searcher, *(m_creature->GetMap()));
|
||||
@@ -549,17 +552,17 @@ std::list<Creature*> ScriptedAI::DoFindFriendlyCC(float range)
|
||||
|
||||
std::list<Creature*> ScriptedAI::DoFindFriendlyMissingBuff(float range, uint32 spellid)
|
||||
{
|
||||
CellPair p(MaNGOS::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
|
||||
CellPair p(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
std::list<Creature*> pList;
|
||||
|
||||
MaNGOS::FriendlyMissingBuffInRange u_check(m_creature, range, spellid);
|
||||
MaNGOS::CreatureListSearcher<MaNGOS::FriendlyMissingBuffInRange> searcher(pList, u_check);
|
||||
Trinity::FriendlyMissingBuffInRange u_check(m_creature, range, spellid);
|
||||
Trinity::CreatureListSearcher<Trinity::FriendlyMissingBuffInRange> searcher(pList, u_check);
|
||||
|
||||
TypeContainerVisitor<MaNGOS::CreatureListSearcher<MaNGOS::FriendlyMissingBuffInRange>, GridTypeMapContainer > grid_creature_searcher(searcher);
|
||||
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::FriendlyMissingBuffInRange>, GridTypeMapContainer > grid_creature_searcher(searcher);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, grid_creature_searcher, *(m_creature->GetMap()));
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
/* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
|
||||
*
|
||||
* Thanks to the original authors: ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software licensed under GPL version 2
|
||||
* Please see the included DOCS/LICENSE.TXT for more information */
|
||||
|
||||
@@ -8,7 +11,7 @@
|
||||
#include "CreatureAI.h"
|
||||
#include "Creature.h"
|
||||
|
||||
struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI
|
||||
struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
|
||||
{
|
||||
ScriptedAI(Creature* creature) : m_creature(creature), InCombat(false) {}
|
||||
~ScriptedAI() {}
|
||||
@@ -26,7 +29,7 @@ struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI
|
||||
//Called at stoping attack by any attacker
|
||||
void EnterEvadeMode();
|
||||
|
||||
//Called at any heal cast/item used (call non implemented in mangos)
|
||||
//Called at any heal cast/item used (call non implemented in Trinity)
|
||||
void HealBy(Unit *healer, uint32 amount_healed) {}
|
||||
|
||||
// Called at any Damage to any victim (before damage apply)
|
||||
@@ -153,7 +156,7 @@ struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI
|
||||
bool CanCast(Unit* Target, SpellEntry const *Spell, bool Triggered = false);
|
||||
};
|
||||
|
||||
struct MANGOS_DLL_DECL Scripted_NoMovementAI : public ScriptedAI
|
||||
struct TRINITY_DLL_DECL Scripted_NoMovementAI : public ScriptedAI
|
||||
{
|
||||
Scripted_NoMovementAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
/* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
|
||||
*
|
||||
* Thanks to the original authors: ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software licensed under GPL version 2
|
||||
* Please see the included DOCS/LICENSE.TXT for more information */
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ enum EncounterState
|
||||
#define OUT_LOAD_INST_DATA_COMPLETE debug_log("SD2: Instance Data Load for Instance %s (Map %d, Instance Id: %d) is complete.",instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
|
||||
#define OUT_LOAD_INST_DATA_FAIL error_log("SD2: Unable to load Instance Data for Instance %s (Map %d, Instance Id: %d).",instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
|
||||
|
||||
class MANGOS_DLL_DECL ScriptedInstance : public InstanceData
|
||||
class TRINITY_DLL_DECL ScriptedInstance : public InstanceData
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
|
||||
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
|
||||
*
|
||||
* Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -8,12 +10,12 @@
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "precompiled.h"
|
||||
|
||||
Reference in New Issue
Block a user